Skip to main content

Introducing Workflow Engine, try for FREE workflowengine.io.

Class: SomeOfBuilder<T>

The builder class to define the metadata property of the form builder component. Used for properties where the property value can be a set of predefined values.

Extends

Type Parameters

T

the property type.

Constructors

new SomeOfBuilder()

new SomeOfBuilder<T>(): SomeOfBuilder<T>

Returns

SomeOfBuilder<T>

Inherited from

QuantifierBuilder.constructor

Properties

annotation

annotation: PreAnnotation

Partial metadata for a component property.

Inherited from

QuantifierBuilder.annotation


labels?

optional labels: string[]

Labels for the possible values of the property.

Inherited from

QuantifierBuilder.labels


options

options: BuilderOptions

Options for building an annotation.

Inherited from

QuantifierBuilder.options


values

values: (string | number)[]

Possible values for the property.

Inherited from

QuantifierBuilder.values

Accessors

localize

get localize(): this

Returns

this

the component property that can be localized.

Inherited from

QuantifierBuilder.localize


notLocalize

get notLocalize(): this

Returns

this

the non-localizable component property.

Inherited from

QuantifierBuilder.notLocalize


required

get required(): QuantifierBuilder<NonNullable<T>>

Marks the component property as required.

Returns

QuantifierBuilder<NonNullable<T>>

the modified instance of the builder.

Inherited from

QuantifierBuilder.required


valued

get valued(): this

Returns

this

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

Inherited from

QuantifierBuilder.valued

Methods

build()

build(key): Annotation

Creates component property metadata for the form builder.

Parameters

key: string

the unique key of the component property.

Returns

Annotation

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

Inherited from

QuantifierBuilder.build


calculable()

calculable(calculable): SomeOfBuilder<T>

Marks the component property as calculable.

Parameters

calculable: boolean

true if the property is calculable.

Returns

SomeOfBuilder<T>

the modified instance of the builder.

Inherited from

QuantifierBuilder.calculable


clone()

clone(): this

Clones the instance of the builder.

Returns

this

the cloned instance of the builder.

Inherited from

QuantifierBuilder.clone


default()

default(value): this

Sets the default value for the component property.

Parameters

value: T[]

the default value.

Returns

this

the modified instance of the builder.

Overrides

QuantifierBuilder.default


getName()

protected getName(key): string

Returns the annotation name.

Parameters

key: string

the property name

Returns

string

the annotation name.

Inherited from

QuantifierBuilder.getName


hideEditor()

hideEditor(): this

Hides the component property editor.

Returns

this

the modified instance of the builder.

Inherited from

QuantifierBuilder.hideEditor


hinted()

hinted(hint): SomeOfBuilder<T>

Adds the hint to the property name of the component.

Parameters

hint: ReactNode

the hint.

Returns

SomeOfBuilder<T>

the modified instance of the builder.

Inherited from

QuantifierBuilder.hinted


labeled()

labeled(...labels): SomeOfBuilder<T>

Sets the labels for predefined values.

Parameters

• ...labels: string[]

the labels.

Returns

SomeOfBuilder<T>

the modified instance of the builder.

Inherited from

QuantifierBuilder.labeled


named()

named(name): SomeOfBuilder<T>

Specifies the name of the component property.

Parameters

name: string

the property name.

Returns

SomeOfBuilder<T>

the modified instance of the builder.

Inherited from

QuantifierBuilder.named


setup()

setup(options): this

Modifies the component property metadata builder with custom options.

Parameters

options: Partial<Partial<Omit<Annotation, "key">> & Pick<Annotation, "editor"> & BuilderOptions>

the custom options.

Returns

this

the modified instance of the builder.

Inherited from

QuantifierBuilder.setup


validated()

validated(validator, errorMap): this

Modifies the component property metadata builder with validation properties.

Parameters

validator: RuleValidator<T>

the validation function.

errorMap: ErrorMap

the validation error settings.

Returns

this

the modified instance of the builder.

Inherited from

QuantifierBuilder.validated


withEditorProps()

withEditorProps(props): this

Sets custom properties for the component's property editor.

Parameters

props: any

the custom properties

Returns

this

the modified instance of the builder.

Inherited from

QuantifierBuilder.withEditorProps