Class: TextStepHandle
A StepHandle allows for managing the state of a specific step in a workflow. This class abstracts away the complexities of dealing with a step directly and allows for using high level concepts instead of dealing with the underlying data structures.
Extends
Implements
CustomColorSupport
Constructors
Constructor
new TextStepHandle(
manager,step,tags):TextStepHandle
Parameters
manager
step
tags
string[]
Returns
TextStepHandle
Overrides
Methods
clearDefaultTextIfNecessary()
clearDefaultTextIfNecessary():
TextChangeResult|undefined
Inform the step that now is the time to clear default text if it should do so. Returns a text change rwsult if a clear occurred.
Returns
TextChangeResult | undefined
executeAnimations()
executeAnimations(
immediate?):void
Fires any configured animations on the 3D preview for this step. This includes camera & model animations. If the preview is unavailable this function will do nothing.
Parameters
immediate?
boolean
Returns
void
Inherited from
getAlignment()
getAlignment():
string|undefined
Returns
string | undefined
getAllVariants()
getAllVariants():
Promise<Variant[]>
Returns
Promise<Variant[]>
A list of all variants for this step, including disabled ones.
Inherited from
getAvailableFillColors()
getAvailableFillColors():
Promise<ColorOption[]>
Returns
Promise<ColorOption[]>
A list of colors that can be used to fill the text.
getAvailableFillImages()
getAvailableFillImages():
Promise<TextFillImage[]>
Returns
Promise<TextFillImage[]>
getAvailableStrokeColors()
getAvailableStrokeColors():
Promise<ColorOption[]>
Returns
Promise<ColorOption[]>
A list of colors that can be used for the text's outline.
getAvailableVariants()
getAvailableVariants():
Promise<Variant[]>
Returns
Promise<Variant[]>
A list of valid variants for this step. Does not include disabled variants.
Inherited from
StepHandle.getAvailableVariants
getCharacterLimit()
getCharacterLimit():
number|undefined
Return the maximum characters allowed for this step, or undefined if there is no limit.
Returns
number | undefined
getCharactersRemaining()
getCharactersRemaining():
number|undefined
Return the remaining amount of characters that the user is allowed to add, or undefined if there is no limit.
Returns
number | undefined
getCurrentVariant()
getCurrentVariant():
Variant|undefined
Gets the currently selected variant, or undefined if no variant is selected.
Returns
Variant | undefined
Inherited from
getCustomColor()
getCustomColor():
string
Get the custom color that is currently set on the step.
Returns
string
Implementation of
CustomColorSupport.getCustomColor
getFillColor()
getFillColor():
string
Gets the color currently applied to the element.
Returns
string
getFillImage()
getFillImage():
TextFillImage|undefined
Returns
TextFillImage | undefined
getGlobalPropertyAspects()
getGlobalPropertyAspects(
configurationId):string[]
Retrieves the identifiers of all of the configured aspects for the specified Global Property Configuration.
Parameters
configurationId
string
The ID of the Global Property Configuration. You can usually find this with bundle.getGlobalPropertyConfiguration()?.id
Returns
string[]
An array of strings matching the keys of all the Global Property Aspects in the Configuration that this step is configured to use.
Inherited from
StepHandle.getGlobalPropertyAspects
getHelpText()
getHelpText():
string|undefined
Returns
string | undefined
A message that can accompany the step name in UI components. Used to describe the purpose of the step in more detail.
Inherited from
getId()
getId():
string
Returns
string
A unique identifier for this step within the workflow.
Inherited from
getMandatory()
getMandatory():
boolean
Returns
boolean
True if the step is required to be filled by the customer. False otherwise.
Inherited from
getName()
getName():
string
Returns
string
The name of the step
Inherited from
getOverrideGlobalPropertyConfiguration()
getOverrideGlobalPropertyConfiguration(
type):boolean
Parameters
type
The AspectType to fetch the value for.
Returns
boolean
A boolean indicating whether this step should override Global Properties. Only relevant when the Workflow Experience is associated with a Bundle that is using Global Properties, and when this step is associated with one or more Global Property Aspects.
Inherited from
StepHandle.getOverrideGlobalPropertyConfiguration
getRaw()
getRaw():
Step<TextStepData>
Returns
The underlying data for this step. Favor using the step handle methods instead of this.
Inherited from
getRegions()
getRegions():
Region[]
Returns
Region[]
getStrokeColor()
getStrokeColor():
string
Returns
string
getTags()
getTags():
string[]
Returns
string[]
Returns all of the tags that are present on this step.
Inherited from
getText()
getText():
string
Gets the text currently applied to the elements of this step.
Returns
string
getType()
getType():
StepType
Returns
The type of the step handle.
Inherited from
hasColorPicker()
hasColorPicker():
boolean|undefined
Returns
boolean | undefined
hasTag()
hasTag(
tag):boolean
Parameters
tag
string
The tag to check for.
Returns
boolean
True if the step has the specified tag, false otherwise.
Inherited from
isReplaceable()
isReplaceable():
boolean|undefined
Returns
boolean | undefined
isVariantCategoriesEnabled()
isVariantCategoriesEnabled():
boolean
Returns
boolean
newLinesSupported()
newLinesSupported():
boolean
Returns
boolean
True if the step allows new lines in the text input.
selectVariant()
selectVariant(
variant):Promise<void>
Allows for select a font from the available fonts configured on this steps base option.
Parameters
variant
The font variant to use.
Returns
Promise<void>
Overrides
setAlignment()
setAlignment(
alignment):void
Parameters
alignment
"center" | "left" | "right"
Returns
void
setCustomColor()
setCustomColor(
color):void
Allows for setting a custom color when the custom variant is selected. Will throw when a non-custom variant is selected.
Parameters
color
string
Returns
void
Implementation of
CustomColorSupport.setCustomColor
setFillColor()
setFillColor(
fill):Promise<void>
Changes the fill of text related to this step to the new fill value.
Parameters
fill
A new fill value to use.
Returns
Promise<void>
setFillImage()
setFillImage(
fillImage):Promise<void>
Parameters
fillImage
TextFillImage
Returns
Promise<void>
setFullTextCustomization()
setFullTextCustomization(
shouldCustomizeAll):TextChangeResult
When true & the step has replaceable text configured the user will be abled to edit the entire text string including the non-replaceable text.
Parameters
shouldCustomizeAll
boolean
When true the user can configure the entire text string.
Returns
setOverrideGlobalPropertyConfiguration()
setOverrideGlobalPropertyConfiguration(
type,value):void
Sets whether or not this step should override Global Properties. Only relevant when the Workflow Experience is associated with a Bundle that is using Global Properties, and when this step is associated with one or more Global Property Aspects.
Parameters
type
The AspectType to override.
value
boolean
Returns
void
Inherited from
StepHandle.setOverrideGlobalPropertyConfiguration
setStrokeColor()
setStrokeColor(
stroke):Promise<void>
Changes the stroke of text related to this step to the new stroke value.
Parameters
stroke
ColorOption | undefined
A new stroke value to use.
Returns
Promise<void>
setText()
setText(
userInput):TextChangeResult
Changes the text value of text related to this step to a new value.
Parameters
userInput
string
Input from the user.