Skip to main content

Introducing Workflow Engine, try for FREE workflowengine.io.

Class: BuilderView

Represents all the metadata of the form builder components.

Extends​

Constructors​

Constructor​

new BuilderView(builderComponents): BuilderView

Creates metadata for form builder components.

Parameters​

builderComponents​

BuilderComponent[]

the array of metadata of form builder components.

Returns​

BuilderView

Overrides​

View.constructor

Properties​

builderComponents​

builderComponents: BuilderComponent[]

The array of metadata of form builder components.


i18nDescriptions?​

optional i18nDescriptions?: Record<`${string}-${string}`, ComponentLibraryDescription>[]

The description of the component library in different languages.


paletteFilter?​

optional paletteFilter?: (builderComponent) => boolean

The function for filtering components on the component palette.

Parameters​

builderComponent​

BuilderComponent

Returns​

boolean

Accessors​

viewerWrappers​

Get Signature​

get viewerWrappers(): FormViewerWrapper[]

Retrieves the viewer wrappers array.

Returns​

FormViewerWrapper[]

the viewer wrappers array.

Retrieves the viewer wrappers array.

Inherited from​

View.viewerWrappers

Methods​

addComponent()​

addComponent(component): void

Adds the component metadata to the form builder.

Parameters​

component​

BuilderComponent

the component metadata.

Returns​

void


all()​

all(): Model<any>[]

Returns​

Model<any>[]

all component metadata for the form viewer.

Inherited from​

View.all


define()​

define(model): void

Parameters​

model​

Model

Returns​

void

Inherit Doc​

Inherited from​

View.define


filterModels()​

filterModels(predicate): Model<any>[]

Parameters​

predicate​

(model) => boolean

the filter function.

Returns​

Model<any>[]

the array of component metadata filtered using the predicate function.

Inherited from​

View.filterModels


find()​

find(type): Model<any> | undefined

Parameters​

type​

string

the component type.

Returns​

Model<any> | undefined

the component metadata for the form viewer for the specified type or undefined.

Inherited from​

View.find


findMeta()​

findMeta(type): Meta | undefined

Returns the component metadata for the specified component type name or undefined.

Parameters​

type​

string

the component type name.

Returns​

Meta | undefined

the component metadata for the specified component type name or undefined.


get()​

get(type): Model<any>

Parameters​

type​

string

the component type.

Returns​

Model<any>

the component metadata for the form viewer for the specified type.

Inherited from​

View.get


getCssLoaders()​

getCssLoaders(biDi): CssLoaderFunction[]

Parameters​

biDi​

BiDi

the BiDi object for which to retrieve the CSS loaders.

Returns​

CssLoaderFunction[]

the array containing the CSS loaders for the specified BiDi.

Inherited from​

View.getCssLoaders


getMeta()​

getMeta(type): Meta

Returns the component metadata for the specified component type name.

Parameters​

type​

string

the component type name.

Returns​

Meta

the component metadata for the specified component type name.


removeComponent()​

removeComponent(name): void

Removes the component metadata from the form builder.

Parameters​

name​

string

the component type name.

Returns​

void


withComponentLibraryDescription()​

withComponentLibraryDescription(i18nDescription): this

Adds a description of the component library in different languages.

Parameters​

i18nDescription​

Record<LanguageFullCode, ComponentLibraryDescription>

the description of the component library in different languages.

Returns​

this

the instance of the BuilderView class.


withCssLoader()​

withCssLoader(cssLoaderType, loader): BuilderView

Parameters​

cssLoaderType​

CssLoaderType

the BiDi layout type, either 'common', 'ltr', or 'rtl'.

loader​

CssLoaderFunction

the function that returns a Promise to load CSS or other required localization resources, optionally returning a cleanup function to be called on unmount.

Returns​

BuilderView

the View instance.

Inherited from​

View.withCssLoader


withPaletteFilter()​

withPaletteFilter(filter): this

Sets a function for filtering components on the component palette.

Parameters​

filter​

(builderComponent) => boolean

the component filtering function.

Returns​

this

the instance of the BuilderView class.


withTemplates()​

withTemplates(templates): this

Creates metadata for the form builder for templates from the specified template names.

Parameters​

templates​

string[]

the array of template names.

Returns​

this

the instance of the BuilderView class.


withViewerWrapper()​

withViewerWrapper(wrapper): BuilderView

Parameters​

wrapper​

FormViewerWrapper

the viewer wrapper to be added. The wrapper is a component that wraps the form viewer.

Returns​

BuilderView

the View instance.

Inherited from​

View.withViewerWrapper


create()​

static create(models): View

Static wrapper for the View constructor.

Parameters​

models​

Model<any>[]

the components metadata.

Returns​

View

the View instance.

Inherited from​

View.create


createTemplateComponent()​

static createTemplateComponent(name): BuilderComponent

Creates an instance of BuilderComponent for the specified template name.

Parameters​

name​

string

the template name

Returns​

BuilderComponent

the BuilderComponent instance.