Skip to main content

Introducing Workflow Engine, try for FREE workflowengine.io.

Class: BuilderView

@react-form-builder/designer.BuilderView

Represents all the metadata of the form builder components.

Hierarchy

Constructors

constructor

new BuilderView(builderComponents)

Creates metadata for form builder components.

Parameters

NameTypeDescription
builderComponentsBuilderComponent[]the array of metadata of form builder components.

Overrides

View.constructor

Properties

builderComponents

builderComponents: BuilderComponent[]

the array of metadata of form builder components.

Accessors

errors

get errors(): string[]

Returns

string[]

the array of strings with the names of the component types of the error.


tooltips

get tooltips(): string[]

Returns

string[]

the array of strings with the names of the component types of the tooltip.


viewerWrappers

get viewerWrappers(): FormViewerWrapper[]

Retrieves the viewer wrappers array.

Returns

FormViewerWrapper[]

the viewer wrappers array.

Inherited from

View.viewerWrappers

Methods

all

all(): Model<any>[]

Returns

Model<any>[]

all component metadata for the form viewer.

Inherited from

View.all


define

define(model): void

Defines the component's metadata for the form viewer.

Parameters

NameTypeDescription
modelModel<any>the component's metadata.

Returns

void

Inherited from

View.define


find

find(type): undefined | Model<any>

Returns the component's metadata for the form viewer for the specified type.

Parameters

NameTypeDescription
typestringthe component type.

Returns

undefined | Model<any>

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

Inherited from

View.find


findMeta

findMeta(type): undefined | Meta

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

Parameters

NameTypeDescription
typestringthe component type name.

Returns

undefined | Meta

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


get

get(type): Model<any>

Returns the component's metadata for the form viewer for the specified type.

Parameters

NameTypeDescription
typestringthe component type.

Returns

Model<any>

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

Inherited from

View.get


getCssLoaders

getCssLoaders(biDi): () => Promise<void>[]

Retrieves the CSS loaders for a given BiDi.

Parameters

NameTypeDescription
biDiBiDithe BiDi object for which to retrieve the CSS loaders.

Returns

() => Promise<void>[]

the array containing the CSS loaders for the specified BiDi.

Inherited from

View.getCssLoaders


getErrorAnnotations

getErrorAnnotations(name): undefined | Annotation[]

Returns the array of metadata properties of the error component.

Parameters

NameTypeDescription
namestringthe name of the error component type.

Returns

undefined | Annotation[]

the array of metadata properties of the error component.


getMeta

getMeta(type): Meta

Returns the component metadata for the specified component type name.

Parameters

NameTypeDescription
typestringthe component type name.

Returns

Meta

the component metadata for the specified component type name.


getTooltipAnnotations

getTooltipAnnotations(name): undefined | Annotation[]

Returns the array of metadata properties of the tooltip component.

Parameters

NameTypeDescription
namestringthe name of the tooltip component type.

Returns

undefined | Annotation[]

the array of metadata properties of the tooltip component.


withCssLoader

withCssLoader(cssLoaderType, loader): BuilderView

Applies the given CSS loader to the component based on the BiDi layout.

Parameters

NameTypeDescription
cssLoaderTypeCssLoaderTypethe BiDi layout type, either 'common', 'ltr', or 'rtl'.
loader() => Promise<void>the function that returns a Promise to load CSS or other required localization resources.

Returns

BuilderView

the View instance.

Inherited from

View.withCssLoader


withErrorMeta

withErrorMeta(builderComponent): BuilderView

Sets the metadata of the component that displays form's errors.

Parameters

NameTypeDescription
builderComponentBuilderComponentthe metadata of the component that displays the form's errors.

Returns

BuilderView

the instance of the BuilderView class.


withTemplates

withTemplates(templates): BuilderView

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

Parameters

NameTypeDescription
templatesstring[]the array of template names.

Returns

BuilderView

the instance of the BuilderView class.


withTooltipMeta

withTooltipMeta(builderComponent): BuilderView

Sets the metadata of the component that displays the form's tooltips.

Parameters

NameTypeDescription
builderComponentBuilderComponentthe metadata of the component that displays the form's tooltips.

Returns

BuilderView

the instance of the BuilderView class.


withViewerWrapper

withViewerWrapper(wrapper): this

Adds a wrapper to the list of viewers for this viewer wrapper.

Parameters

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

Returns

this

the View instance.

Inherited from

View.withViewerWrapper


create

Static create(models): View

Static wrapper for the View constructor.

Parameters

NameTypeDescription
modelsModel<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

NameTypeDescription
namestringthe template name

Returns

BuilderComponent

the BuilderComponent instance.