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.
@ng-vcl/jss-form
Advanced tools
Creates a html-form from a jsonschema.
npm install @ng-vcl/jss-form --save
import { VCLJssFormModule } from 'ng-vcl';
@NgModule({
imports: [ VCLJssFormModule ],
...
})
export class AppComponent {}
<vcl-jss-form [schema]="mySchema" [(value)]="value"></vcl-jss-form>
example-schema:
{
"title": "hero schema",
"description": "describes a simple hero",
"type": "object",
"properties": {
"name": {
"type": "string",
"formType": "text",
"placeholder": "The heroe's name",
"minLength": 4,
"maxLength": 100,
},
"color": {
"description": "color defines which team the hero belongs to",
"label": "team",
"formType": "select",
"type": "string",
"enum": ["#ff0000", "#008000", "#0000FF", "#FFFF00"],
"items": [
{
"label": "Red",
"value": "#ff0000"
},
{
"label": "Green",
"value": "#008000"
},
{
"label": "Blue",
"value": "#0000FF"
},
{
"label": "Yellow",
"value": "#FFFF00"
}
]
},
"color2": {
"label": "subcolor",
"formType": "radio",
"type": "string",
"enum": ["red", "green", "blue", "yellow"]
},
"isleader": {
"label": "leader",
"formType": "checkbox",
"type": "boolean"
},
"hp": {
"type": "number",
"formType": "slider"
},
"alive": {
"type": "boolean",
"formType": "switch"
},
"mainSkill": {
"description": "nested object",
"type": "object",
"properties": {
"name": {
"type": "string",
"formType": "text",
"minLength": 1
},
"damage": {
"type": "number",
"formType": "number",
"min": 0,
"max": 100
}
},
"required": ["name", "damage"]
}
},
"required": ["name", "color"]
};
Name | Type | Default | Description |
---|---|---|---|
schema | object | a jsonschema to build the form from | |
value | object | {} | An Object to begin editing with (2-way binding) |
error | event | Event-stream which emits schema-errors or null |
In addition to the generic keywords of jsonschema, vcl-jss-form is using keywords to let you define the generated form.
Name | Type | Default | Description |
---|---|---|---|
label | string | a label-string. attributeName will be the default | |
placeholder | string | define a placeholder which will be sued for the input-field | |
formType | string | defines the input-type of the form-element. ENUM(text, number, select, switch, slider) |
Name | Type | ValueType |
---|---|---|
text | string | string |
select | string | string of enum |
radio | string | string of enum |
checkbox | string | boolean |
switch | string | boolean |
number | string | number |
slider | string | number |
0.1.2 (2017-02-17)
FAQs
Creates a html-form from a jsonschema
The npm package @ng-vcl/jss-form receives a total of 2 weekly downloads. As such, @ng-vcl/jss-form popularity was classified as not popular.
We found that @ng-vcl/jss-form demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 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.