
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
github.com/Jaspero/schema-forms
To install this library, run:
$ npm install --save @jaspero/form-builder
FileComponent
, ImageComponent
or GalleryComponent
are used.tinymce: A WYSIWYG editor.
npm i --save tinymce
assets
array in angular.json
{
"glob": "**/*",
"input": "node_modules/tinymce/themes/silver",
"output": "/themes/silver"
},
{
"glob": "**/*",
"input": "node_modules/tinymce/skins/ui/oxide",
"output": "/skins/ui/oxide"
},
{
"glob": "**/*",
"input": "node_modules/tinymce/skins/content/default",
"output": "/skins/content/default"
}
scripts
array in angular.json
"./node_modules/tinymce/tinymce.min.js"
In order to make the generated forms customizable, this library doesn't provide any default styles. This means that the styles need to be loaded in the root of your application. A good starting point are the example styles provided here.
This configuration is used for defining addition field based options. Changing the label or
what component is used to represent the field in the form. The Definitions
interface looks like this:
Property | Type | Description | Default |
---|---|---|---|
label | string | Label of the field | uses the name of the property |
hint | string | Shows a hint below the field if defined | - |
defaultValue | any | What the value of the field should be if empty | - |
component | object | {type: string, configuration: any} - The type defines the field to use and the configuration is used for any additional component specific options | What ever is the default for the property type |
Name | Selector | Description | Configuration Options |
---|---|---|---|
Input | input | A simple input | {type: 'text', 'number', 'email'} |
{
"name": {
"label": "Name",
"defaultValue": "John"
},
"age": {
"label": "Age",
"component": {
"type": "slider"
}
}
}
FieldComponent
. You should inject COMPONENT_DATA
in order to receive FieldData
, most importantly the underlining FormControl
.CUSTOM_FIELDS
provider e.g.
providers: [{
provide: CUSTOM_FIELDS
useValue: {
'new-component': NewComponent
}
}]
definitions
.The form builder supports both arrays of primitives and object arrays.
The following is required to render an object array:
{
"addresses": {
"type": "array",
"items": {
"type": "object",
"properties": {
"city": {
"type": "string"
},
"address": {
"type": "string"
}
}
}
}
}
{
"segments": [{
"array": "/addresses",
"fields": [
"/city",
"/address"
]
}]
}
{
"definitions": {
"addresses/city": {
"label": "City"
}
}
}
Primitive arrays can be displayed in two variations as a dedicated segment or as a field.
If the property is defined with out an items
value. It's expected to be used as a field.
In that case the following components can be used:
{multiple: true}
If an items value is defined then it's expected to be rendered as its own segments.
MIT © Jaspero Ltd
FAQs
Unknown package
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.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.