Skip to main content

Introducing Workflow Engine, try for FREE workflowengine.io.

Class: NodeAnnotationBuilder<T>

@react-form-builder/core.NodeAnnotationBuilder

The builder class to define the node metadata property.

Type parameters

NameDescription
Tthe property type.

Hierarchy

Constructors

constructor

new NodeAnnotationBuilder<T>(editor)

Creates a component property metadata builder.

Type parameters

NameDescription
Tthe property type.

Parameters

NameTypeDescription
editorstringthe property editor type.

Overrides

AnnotationBuilder.constructor

Properties

annotation

annotation: PreAnnotation

Partial metadata for a component property.

Inherited from

AnnotationBuilder.annotation


options

options: BuilderOptions

Options for building an annotation.

Inherited from

AnnotationBuilder.options

Accessors

array

get array(): ArrayBuilder<undefined | T[]>

Sets the property as a "array" property.

Returns

ArrayBuilder<undefined | T[]>

the instance of the metadata property builder.

Inherited from

AnnotationBuilder.array


localize

get localize(): this

Returns

this

the component property that can be localized.

Inherited from

AnnotationBuilder.localize


notLocalize

get notLocalize(): this

Returns

this

the non-localizable component property.

Inherited from

AnnotationBuilder.notLocalize


valued

get valued(): this

Returns

this

the main component property that is used as form data and for validation rules.

Inherited from

AnnotationBuilder.valued

Methods

build

build(key): Annotation

Creates component property metadata for the form builder.

Parameters

NameTypeDescription
keystringthe unique key of the component property.

Returns

Annotation

the instance of the component property metadata for the form builder.

Inherited from

AnnotationBuilder.build


calculable

calculable(calculable): NodeAnnotationBuilder<T>

Marks the component property as calculable.

Parameters

NameTypeDescription
calculablebooleantrue if the property is calculable.

Returns

NodeAnnotationBuilder<T>

the modified instance of the builder.

Inherited from

AnnotationBuilder.calculable


clone

clone(): NodeAnnotationBuilder<T>

Clones the instance of the builder.

Returns

NodeAnnotationBuilder<T>

the cloned instance of the builder.

Inherited from

AnnotationBuilder.clone


getName

Protected getName(key): string

Returns the annotation name.

Parameters

NameTypeDescription
keystringthe property name

Returns

string

the annotation name.

Inherited from

AnnotationBuilder.getName


hinted

hinted(hint): NodeAnnotationBuilder<T>

Adds the hint to the property name of the component.

Parameters

NameTypeDescription
hintReactNodethe hint.

Returns

NodeAnnotationBuilder<T>

the modified instance of the builder.

Inherited from

AnnotationBuilder.hinted


named

named(name): NodeAnnotationBuilder<T>

Specifies the name of the component property.

Parameters

NameTypeDescription
namestringthe property name.

Returns

NodeAnnotationBuilder<T>

the modified instance of the builder.

Inherited from

AnnotationBuilder.named


oneOf

oneOf<U>(...values): OneOfBuilder<U>

Sets the property as a "single select" property.

Type parameters

NameType
Uextends string | number

Parameters

NameTypeDescription
...valuesU[]the possible values for the property.

Returns

OneOfBuilder<U>

the instance of the metadata property builder.

Inherited from

AnnotationBuilder.oneOf


setup

setup(options): NodeAnnotationBuilder<T>

Modifies the component property metadata builder with custom options.

Parameters

NameTypeDescription
optionsPartial<Partial<Omit<Annotation, "key">> & Pick<Annotation, "editor"> & BuilderOptions>the custom options.

Returns

NodeAnnotationBuilder<T>

the modified instance of the builder.

Inherited from

AnnotationBuilder.setup


someOf

someOf<U>(...values): SomeOfBuilder<U>

Sets the property as a "multiple select" property.

Type parameters

NameType
Uextends string | number

Parameters

NameTypeDescription
...valuesU[]the possible values for the property.

Returns

SomeOfBuilder<U>

the instance of the metadata property builder.

Inherited from

AnnotationBuilder.someOf


typed

typed<T>(type): TypedBuilder<undefined | SchemaTypeMap[T]>

Sets the field type for the component property.

Type parameters

NameType
Textends keyof SchemaTypeMap

Parameters

NameTypeDescription
typeTthe field type.

Returns

TypedBuilder<undefined | SchemaTypeMap[T]>

the instance of the metadata property builder.

Inherited from

AnnotationBuilder.typed


withEditorProps

withEditorProps(props): NodeAnnotationBuilder<T>

Sets custom properties for the component's property editor.

Parameters

NameTypeDescription
propsanythe custom properties

Returns

NodeAnnotationBuilder<T>

the modified instance of the builder.

Inherited from

AnnotationBuilder.withEditorProps


withSlotConditionBuilder

withSlotConditionBuilder(slotConditionBuilder): NodeAnnotationBuilder<T>

Specifies a function that will create conditions that check if a child component can be bound to a parent slot.

Parameters

NameTypeDescription
slotConditionBuilder(props: any) => stringthe function that returns a string containing the source code of the function to bind child components.

Returns

NodeAnnotationBuilder<T>

the instance of the metadata property builder.


create

Static create<T>(editor): AnnotationBuilder<T>

Creates a component property metadata builder.

Type parameters

NameDescription
Tthe property type.

Parameters

NameTypeDescription
editorstringthe property editor type.

Returns

AnnotationBuilder<T>

the component property metadata builder.

Inherited from

AnnotationBuilder.create