Skip to main content

Introducing Workflow Engine, try for FREE workflowengine.io.

Class: Annotation

Basic metadata class for a React component property for the form builder.

Extended by

Constructors

new Annotation()

new Annotation(key, name): Annotation

Creates metadata for a React component property.

Parameters

key: string

the property name.

name: string

the human-readable property name.

Returns

Annotation

Properties

calculable

readonly calculable: boolean = true

True if the property value can be a calculated property, false otherwise.


default?

readonly optional default: any

The default property value.


editor

readonly editor: string

The name of the component's property editor.


editorProps?

readonly optional editorProps: any

Additional properties for the component property editor.


errorMap?

readonly optional errorMap: ErrorMap

Message and/or error code for the validation function.


hint?

readonly optional hint: ReactNode

The hint for the component property.


key

readonly key: string

The component property key.


localizable

readonly localizable: boolean = false

True if the property value can be localized, false otherwise.


name

readonly name: string

The component property name.


readOnly

readonly readOnly: boolean = false

True if the property value controls a read-only flag, false otherwise.


required

readonly required: boolean = false

True if the component property is required, false otherwise.


slotConditionBuilder()?

readonly optional slotConditionBuilder: (props) => string

A function that returns a string containing the source code of the function to bind child components.

Parameters

props: any

the properties of the component, which are available only inside Form Builder Designer.

Returns

string


type?

readonly optional type: keyof SchemaTypeMap

The data type for the value of the property.


validator?

readonly optional validator: RuleValidator

The function for validating the property value.


valued

readonly valued: boolean = false

True if the property value is bound to form data, false otherwise.

Methods

clone()

clone(): any

Returns

any

the metadata clone.