Skip to main content

Class: ColorOptionGlobalPropertyHandle

A color option property handle represents a property that can affect the option of steps across multiple transactions. This class is a specialization of the OptionGlobalPropertyHandle which includes functionality for setting custom color values when a custom color variant is selected.

Extends​

Constructors​

Constructor​

new ColorOptionGlobalPropertyHandle(owner, property, optionResource): ColorOptionGlobalPropertyHandle

Parameters​

owner​

GlobalPropertyStateOwner

property​

GlobalPropertyConfigurationAspect

optionResource​

OptionResource | undefined

Returns​

ColorOptionGlobalPropertyHandle

Overrides​

OptionGlobalPropertyHandle.constructor

Methods​

applyGlobalState()​

applyGlobalState(targetExperiences?): Promise<void>

Applies the global state to all shared steps, if the state is set.

Parameters​

targetExperiences?​

WorkflowExperience[]

Optionally filter the workflow experiences it should be applied to.

Returns​

Promise<void>

Overrides​

OptionGlobalPropertyHandle.applyGlobalState


getAllVariants()​

getAllVariants(): Promise<Variant[]>

Returns​

Promise<Variant[]>

A list of all variants for this step, including disabled ones.

Inherited from​

OptionGlobalPropertyHandle.getAllVariants


getAvailableVariants()​

getAvailableVariants(): Promise<Variant[]>

Returns​

Promise<Variant[]>

A list of valid variants for this step. Does not include disabled variants.

Inherited from​

OptionGlobalPropertyHandle.getAvailableVariants


getCurrentVariant()​

getCurrentVariant(): Variant | undefined

Gets the currently selected variant, or undefined if no variant is selected.

Returns​

Variant | undefined

Inherited from​

OptionGlobalPropertyHandle.getCurrentVariant


getCustomColor()​

getCustomColor(): string

Gets the custom color used by the global state.

Returns​

string


getDescription()​

getDescription(): string

Returns​

string

A human-friendly description.

Inherited from​

OptionGlobalPropertyHandle.getDescription


getName()​

getName(): string

Returns​

string

The name of the global property. This is the key used to store the property in the state.

Inherited from​

OptionGlobalPropertyHandle.getName


getRawProperty()​

getRawProperty(): GlobalPropertyConfigurationAspect

Returns​

GlobalPropertyConfigurationAspect

The underlying property data object.

Inherited from​

OptionGlobalPropertyHandle.getRawProperty


getTitle()​

getTitle(): string

Returns​

string

A human-friendly title.

Inherited from​

OptionGlobalPropertyHandle.getTitle


getType()​

getType(): AspectType

Returns​

AspectType

The type of the global property. Use this to determine how to render the property.

Inherited from​

OptionGlobalPropertyHandle.getType


initDefaultVariant()​

initDefaultVariant(): Promise<void>

If the option has a default variant, select it.

Returns​

Promise<void>

Inherited from​

OptionGlobalPropertyHandle.initDefaultVariant


isMandatory()​

isMandatory(): boolean

Returns​

boolean

Whether this aspect has been marked as required to be completed before the user can continue.

Inherited from​

OptionGlobalPropertyHandle.isMandatory


isMandatoryFulfilled()​

isMandatoryFulfilled(): boolean

Returns​

boolean

Whether this aspect has been marked as completed for mandatory checks. Note that this function always returns true if the aspect has not been marked as mandatory.

Inherited from​

OptionGlobalPropertyHandle.isMandatoryFulfilled


isSilent()​

isSilent(): boolean

Returns​

boolean

Whether this aspect has been marked as silent and therefore should not be displayed to the user.

Inherited from​

OptionGlobalPropertyHandle.isSilent


selectVariant()​

selectVariant(variant, channel?): Promise<void>

Select a given variant on the option for all shared steps.

Parameters​

variant​

Variant

The variant to select.

channel?​

number

Returns​

Promise<void>

Overrides​

OptionGlobalPropertyHandle.selectVariant


setCustomColor()​

setCustomColor(color): Promise<void>

Sets a custom color on the global state.

Parameters​

color​

string

Returns​

Promise<void>