Skip to main content

Introducing Workflow Engine, try for FREE workflowengine.io.

Interface: Definer<T>

The builder class to define the metadata of the form builder component.

Type Parameters​

T​

T extends object

React component property type.

Properties​

data​

data: DefinerData<T>

Definer class data.

Template​

T

React component property type.

Methods​

actions()​

actions(fn): Definer<T>

Adds the metadata of the component's actions. Internal use only.

Parameters​

fn​

ActionsInitializer

the function that initializes an actions on a component.

Returns​

Definer<T>

the modified Definer class instance.


addFeature()​

addFeature(name, value): Definer<T>

Parameters​

name​

string

value​

unknown

Returns​

Definer<T>


build()​

build(): BuilderComponent

Creates component metadata for the form builder and form viewer.

Returns​

BuilderComponent

component metadata for the form builder and form viewer.


category()​

category(category): Definer<T>

Sets the category of the component.

Parameters​

category​

string

the component category.

Returns​

Definer<T>

the modified Definer class instance.


componentRole()​

componentRole(value): Definer<T>

Sets the role (e.g., label, tooltip, etc.) for the component.

Parameters​

value​

string

the component role.

Returns​

Definer<T>

the modified Definer class instance.


css()​

css(css): Definer<T>

Sets the component CSS metadata.

Parameters​

css​

Annotations<CSSObject>

the component CSS metadata.

Returns​

Definer<T>

the modified Definer class instance.


disableRemove()​

disableRemove(value?): Definer<T>

Prevent this component from being removed.

Parameters​

value?​

boolean = true

true to disable removal, false otherwise.

Returns​

Definer<T>

the modified Definer class instance.


disableToolbarAdd()​

disableToolbarAdd(value?): Definer<T>

Hides the add button on the designer component toolbar.

Parameters​

value?​

boolean = true

true to hide the add button, false otherwise.

Returns​

Definer<T>

the modified Definer class instance.


eventListeners()​

eventListeners(eventListeners?): Definer<T>

Sets the component metadata event listeners.

Parameters​

eventListeners?​

ComponentMetadataEventListeners

the component metadata event listeners.

Returns​

Definer<T>

the modified Definer class instance.


getType()​

getType(): string

Returns​

string

the component type name.


hideActionEditors()​

hideActionEditors(value?): Definer<T>

Hides or shows the 'Actions' editors.

Parameters​

value?​

boolean = true

if the value is true, the editors will be hidden.

Returns​

Definer<T>

the modified Definer class instance.


hideFromComponentPalette()​

hideFromComponentPalette(value?): Definer<T>

Hides a component from the component palette.

Parameters​

value?​

boolean = true

true to hide the component, false otherwise.

Returns​

Definer<T>

the modified Definer class instance.


hideStyleProperties()​

hideStyleProperties(value?): Definer<T>

Hides the properties editor on the styles tab.

Parameters​

value?​

boolean = true

true to hide the properties editor, false otherwise.

Returns​

Definer<T>

the modified Definer class instance.


hideTooltipEditor()​

hideTooltipEditor(value?): Definer<T>

Show or hide 'Tooltip' properties editor.

Parameters​

value?​

boolean = true

if the value is false or undefined, the editor will be displayed.

Returns​

Definer<T>

the modified Definer class instance.


icon()​

icon(icon): Definer<T>

Sets the icon of the component.

Parameters​

icon​

"Breadcrumb" | "Button" | "Card" | "Checkbox" | "CollectionEditor" | ComponentType | "Container" | "Content" | "CustomBlock" | "CustomControl" | "DatePicker" | "Default" | "Dropdown" | "Dropzone" | "ErrorMessage" | "Footer" | "Grid" | "GridLayout" | "GridView" | "Header" | "Image" | "Input" | "Label" | "Link" | "Menu" | "Message" | "NumberFormat" | "PatternFormat" | "ProgressCircle" | "ProgressLine" | "RadioGroup" | "Repeater" | "RichTextEditor" | "Search" | "Sidebar" | "Signature" | "Sparks" | "StaticContent" | "Tab" | "TextArea" | "TimePicker" | "Toggle" | "Tooltip" | "TreePicker" | "Uploader"

the component icon or the icon name.

Returns​

Definer<T>

the modified Definer class instance.


initialJson()​

initialJson(initialJson?): Definer<T>

Sets initial component JSON.

Parameters​

initialJson?​

string

the JSON source for the component (instance of ComponentStore class serialised to JSON).

Returns​

Definer<T>

the modified Definer class instance.


insertRestriction()​

insertRestriction(insertRestriction?): Definer<T>

Sets the function that restricts the insertion of a component into another component.

Parameters​

insertRestriction?​

InsertRestrictionFn

the function that restricts the insertion of a component into another component.

Returns​

Definer<T>

the modified Definer class instance.


kind()​

kind(kind): Definer<T>

Sets the kind of the component.

Parameters​

kind​

ComponentKind

the component kind.

Returns​

Definer<T>

the modified Definer class instance.


name()​

name(name): Definer<T>

Sets the name of the component.

Parameters​

name​

string

the component name.

Returns​

Definer<T>

the modified Definer class instance.


nonVisual()​

nonVisual(value?): Definer<T>

Marks the component as non-visual. Instances are kept under the form root and shown in the designer bar only. The designer hides Additional properties for non-visual components.

Parameters​

value?​

boolean = true

true to mark as non-visual, false otherwise.

Returns​

Definer<T>

the modified Definer class instance.


overrideEventHandlers()​

overrideEventHandlers(eventHandlers): Definer<T>

Overrides event handlers (for example, onChange, onBlur) that are added to the component.

Parameters​

eventHandlers​

Record<EventName, ActionEventHandler>

the custom event handlers.

Returns​

Definer<T>

the modified instance of the builder.


props()​

props(properties): Definer<T>

Sets the metadata of the component's properties.

Parameters​

properties​

Annotations<T>

the metadata of the component's properties.

Returns​

Definer<T>

the modified Definer class instance.


showClassNameStylesEditor()​

showClassNameStylesEditor(value): Definer<T>

Show or hide 'Styles for className' editor.

Parameters​

value​

boolean

if the value is true or undefined, the editor will be displayed.

Returns​

Definer<T>

the modified Definer class instance.


showInlineStylesEditor()​

showInlineStylesEditor(value): Definer<T>

Show or hide 'Inline styles' properties editor.

Parameters​

value​

boolean

if the value is true or undefined, the editor will be displayed.

Returns​

Definer<T>

the modified Definer class instance.


singleton()​

singleton(value?): Definer<T>

Marks the component as a singleton. At most one instance of this type may exist on a form.

Parameters​

value?​

boolean = true

true to allow only one instance, false otherwise.

Returns​

Definer<T>

the modified Definer class instance.


skipChildrenDuringFieldCollection()​

skipChildrenDuringFieldCollection(value?): Definer<T>

Hides child components from the field collection. It is used when components are dynamically added to the form, for example in the Repeater component.

Parameters​

value?​

boolean = true

true if the feature is enabled.

Returns​

Definer<T>

the modified Definer class instance.


type()​

type(typeName): Definer<T>

Sets the type name of the component.

Parameters​

typeName​

string

the component type name.

Returns​

Definer<T>

the modified Definer class instance.


uncoverOverflowScrollbar()​

uncoverOverflowScrollbar(value?): Definer<T>

Keeps the designer drag overlay off the component overflow scrollbar. Sets --fe-uncover-inset (default 16px) on the editable host for the overlay gap; matching view padding should use the same CSS variable.

Parameters​

value?​

boolean = true

true to leave the scrollbar uncovered, false otherwise.

Returns​

Definer<T>

the modified Definer class instance.


withoutStyles()​

withoutStyles(value?): Definer<T>

Disables the styling of the component.

Parameters​

value?​

boolean = true

true to disable the styling of the component.

Returns​

Definer<T>

the modified Definer class instance.


withoutWrapperStyles()​

withoutWrapperStyles(value?): Definer<T>

Disables the styling of the component wrapper.

Parameters​

value?​

boolean = true

true to disable the styling of the component wrapper.

Returns​

Definer<T>

the modified Definer class instance.


wrapperCss()​

wrapperCss(css): Definer<T>

Sets the component wrapper CSS metadata.

Parameters​

css​

Annotations<CSSObject>

the component wrapper CSS metadata.

Returns​

Definer<T>

the modified Definer class instance.