mike-marcacci / angular-schema-form-builder

A user interface for building definitions for angular-schema-form
MIT License
13 stars 3 forks source link

angular-schema-form-builder

A user interface for building definitions for angular-schema-form.

This repo is a response to Schema-Form Issue #304. At the moment it's really just a public design document to facilitat collaboration from the community of Schema-Form users.

Main Goals

Secondary Goals

Strategy

Palette, Designer, Inspector

Palette

Designer

Inspector

Changes to Schema-Form

For the above to be possible, schema-form will have to be modified to allow an object to be used when registering a form type with a decorator:


// old style (should maintain backwards-compatibility)
schemaFormDecoratorsProvider.addMapping(
    'bootstrapDecorator',
    'datepicker',
    'directives/decorators/bootstrap/datepicker/datepicker.html'
);

// new style defining title, description, schema, and form for configuration
schemaFormDecoratorsProvider.addMapping(
    'bootstrapDecorator',
    {
        type: 'datepicker',
        title: 'DatePicker',
        description: 'Datepicker add-on for Angular Schema Form using pickadate!',
        form: ['*'],
        schema: {
            type: 'object',
            properties: {
                minDate: {
                    type: ['string', 'null']
                },
                maxDate: {
                    type: ['string', 'null']
                }
            }
        }
    },
    'directives/decorators/bootstrap/datepicker/datepicker.html'
);