@start-app/form-builder-model
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

The FormBuilder Model package.

This package is a part of FormBuilder technology powered by Startapp.studio.

The model is a hierarchical representation of the DOM as JSON. Includes a visitor design pattern that allows you to change the representation of the model.

The key interface is

interface IModel {
    name: string;
    props: { 
        [prop: string]: any;
    }
}
  • Name is a form component’s name
  • Props is an object with a component's attributes and their values

An example that shows how a model might look.

{
    "name": "button",
    "props": {
        "type": "submit",
        "class": "btn submit"
    }
}

Test

npm run test

Licence

MIT

Readme

Keywords

Package Sidebar

Install

npm i @start-app/form-builder-model

Weekly Downloads

3

Version

1.0.4

License

MIT

Unpacked Size

10.4 kB

Total Files

14

Last publish

Collaborators

  • andygrom
  • kirdk