Skip to main content

Class: Component

Defined in: component.d.ts:21

Component consists of a series of actions. The action are sorted by their step and then executed by builder.

Constructors​

Constructor​

new Component(): Component;

Returns​

Component

Properties​

PropertyTypeDescriptionDefined in
actionsreadonly Action[]Actions of this component. Don't modify this array directly, use Component.addAction.component.d.ts:25

Methods​

addAction()​

addAction(step, callback): void;

Defined in: component.d.ts:32

Adds a new action to the component.

Parameters​

ParameterTypeDescription
stepStepThe step during which this action will be executed.
callback(context) => voidThe callback function to be executed for this action.

Returns​

void


getComponentType()​

getComponentType(): string;

Defined in: component.d.ts:92

Gets the type of the component.

Returns​

string

The type of the component, or null if not set.

Description​

The component type is a string that can be used to identify the type of component that this component belongs to. It is not used by the builder, but can be used by other components.


getCustomData()​

getCustomData(key): any;

Defined in: component.d.ts:41

Gets the custom data associated with the given key.

Parameters​

ParameterTypeDescription
keystringThe key of the custom data.

Returns​

any

The custom data associated with the given key, or null if not found.

Description​

Custom data is a key-value pair that can be used to store additional information about the component. It is not used by the builder, but can be used by other components.


getIdentifier()​

getIdentifier(): string;

Defined in: component.d.ts:76

Gets the identifier of the component.

Returns​

string

The identifier of the component, or null if not set.

Description​

The identifier is a unique string that can be used to identify the component. It is not used by the builder, but can be used by other components to identify the component.


getMetadata()​

getMetadata(key): string;

Defined in: component.d.ts:59

Gets the metadata associated with the given key.

Parameters​

ParameterTypeDescription
keystringThe key of the metadata.

Returns​

string

The metadata associated with the given key, or null if not found.

Description​

Metadata is a string key-value pair that can be used to store additional information about the component. It is not used by the builder, but can be used by other components.


provisionAfter()​

Call Signature​

provisionAfter(provisioner): void;

Defined in: component.d.ts:106

Provisions all document groups associated with this component after the given provisioner.

Parameters​
ParameterTypeDescription
provisionerProvisionerThe provisioner to run after.
Returns​

void

Call Signature​

provisionAfter(component): void;

Defined in: component.d.ts:118

Provisions all document groups associated with this component after all the document groups associated with the given component.

Parameters​
ParameterTypeDescription
componentComponentThe component to run after.
Returns​

void


provisionBefore()​

Call Signature​

provisionBefore(provisioner): void;

Defined in: component.d.ts:112

Provisions all document groups associated with this component before the given provisioner.

Parameters​
ParameterTypeDescription
provisionerProvisionerThe provisioner to run before.
Returns​

void

Call Signature​

provisionBefore(component): void;

Defined in: component.d.ts:124

Provisions all document groups associated with this component before all the document groups associated with the given component.

Parameters​
ParameterTypeDescription
componentComponentThe component to run before.
Returns​

void


setComponentType()​

setComponentType(componentType): void;

Defined in: component.d.ts:100

Sets the component type of the component.

Parameters​

ParameterTypeDescription
componentTypestringThe component type to set for the component.

Returns​

void

Description​

The component type is a string that can be used to identify the type of component that this component belongs to. It is not used by the builder, but can be used by other components.


setCustomData()​

setCustomData(key, value): void;

Defined in: component.d.ts:50

Sets the custom data associated with the given key.

Parameters​

ParameterTypeDescription
keystringThe key of the custom data.
valueanyThe value to set for the custom data.

Returns​

void

Description​

Custom data is a key-value pair that can be used to store additional information about the component. It is not used by the builder, but can be used by other components.


setIdentifier()​

setIdentifier(identifier): void;

Defined in: component.d.ts:84

Sets the identifier of the component.

Parameters​

ParameterTypeDescription
identifierstringThe identifier to set for the component.

Returns​

void

Description​

The identifier is a unique string that can be used to identify the component. It is not used by the builder, but can be used by other components to identify the component.


setMetadata()​

setMetadata(key, value): void;

Defined in: component.d.ts:68

Sets the metadata associated with the given key.

Parameters​

ParameterTypeDescription
keystringThe key of the metadata.
valuestringThe value to set for the metadata.

Returns​

void

Description​

Metadata is a string key-value pair that can be used to store additional information about the component. It is not used by the builder, but can be used by other components.