Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@cleo/ngx-json-schema-form
Advanced tools
This project is a [JSON Schema 7](http://json-schema.org) form builder for Angular 8+. This project contains the front end code that consumes JSON Schema and generates a user friendly form that can be used in a web interface.
This project is a JSON Schema 7 form builder for Angular 8+. This project contains the front end code that consumes JSON Schema and generates a user friendly form that can be used in a web interface.
This code needs to work in tandem with the back end JSON Schema Form Validation package.
(1) Install the library in your project
npm install @cleo/ngx-json-schema-form
(2) Import the JSFModule into your project.
@NgModule({
declarations: [],
exports: [],
imports: [
JSFModule
],
providers: []
})
export class ExampleModule { }
(3) Configure your Angular component to use the JSON Schema Form. Reference the example below as well as a detailed list below of the necessary steps.
getFormDataItems()
method to transform the JSON 7 Schema and corresponding values into an array of FormDataItems. FormDataItems are the data model that the JSF understands and uses to generate the angular forms.disableSubmit
event emitted from the JSON Schema Form and disable your submit button.this.schemaFormComponent.getFormValues();
formHeightChange
event emitted from the JSON Schema Form.@Component({
selector: 'example',
templateUrl: 'example.component.html',
styleUrls: ['./example.component.scss']
})
export class ExampleComponent {
@ViewChild(JSFComponent, { static: false }) schemaFormComponent: JSFComponent;
config = new JSFConfig(false, false, true);
formDataItems: FormDataItem[];
isSubmitDisabled = true;
constructor(private jsfDataItemService: JSFDataItemService) {
// grab schema and values from some service
this.formDataItems = this.formDataItemService.getFormDataItems(schema, values, this.config.isEdit);
}
// this event allows you to enable/disable the submit button in the parent container
onDisableSubmit(disableSubmit: boolean): void {
this.isSubmitDisabled = disableSubmit;
}
// this event allows you to modify parent container height to match the height of the form
onFormHeightChange(formHeight: number): void { }
getJSFFormValues(): void {
const jsonData = this.schemaFormComponent.getFormValues();
}
}
(4) Import the JSFComponent into your template. See example below.
<jsf-component
[formDataItems]="formDataItems"
[config]="config"
(disableSubmit)="onDisableSubmit($event)"
(formHeightChange)="onFormHeightChange($event)">
</jsf-component>
Note: be sure to only pass in a valid JSON schema object. If you don't already have your own schemas, you can use a preconfigured schema projects/jsf-launcher/src/app/schemaV2.json
to test with.
[6.0.6] (2024-05-28)
FAQs
This project is a [JSON Schema 7](http://json-schema.org) form builder for Angular 8+. This project contains the front end code that consumes JSON Schema and generates a user friendly form that can be used in a web interface.
The npm package @cleo/ngx-json-schema-form receives a total of 359 weekly downloads. As such, @cleo/ngx-json-schema-form popularity was classified as not popular.
We found that @cleo/ngx-json-schema-form demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.