Skip to main content

Class: FileUploadGlobalPropertyHandle

A file upload global property allows for setting a frame image against all shared steps.

Extends​

Constructors​

Constructor​

new FileUploadGlobalPropertyHandle(owner, property): FileUploadGlobalPropertyHandle

Parameters​

owner​

GlobalPropertyStateOwner

property​

GlobalPropertyConfigurationAspect

Returns​

FileUploadGlobalPropertyHandle

Overrides​

GlobalPropertyHandle.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​

GlobalPropertyHandle.applyGlobalState


canUseAdvancedImageManipulation()​

canUseAdvancedImageManipulation(): Promise<boolean>

Returns​

Promise<boolean>


changeColors()​

changeColors(newFills): Promise<void>

Parameters​

newFills​

{[key: string]: ColorDefinition; }

Returns​

Promise<void>


getAvailableColors()​

getAvailableColors(): ColorOption[]

Returns​

ColorOption[]


getBackgroundRemovedImage()​

getBackgroundRemovedImage(): Promise<Asset | undefined>

Retrieves the version of the image selection that has the background removed, if one exists.

Returns​

Promise<Asset | undefined>

A promise that resolves with an Asset object if one is assigned to the state, otherwise undefined.


getCurrentColors()​

getCurrentColors(): {[key: string]: ColorDefinition; } | undefined

Returns​

{[key: string]: ColorDefinition; } | undefined


getDescription()​

getDescription(): string

Returns​

string

A human-friendly description.

Inherited from​

GlobalPropertyHandle.getDescription


getImage()​

getImage(): Promise<Asset | undefined>

Retrieves the current image selection, if one exists.

Returns​

Promise<Asset | undefined>

A promise that resolves with an Asset object if one is assigned to the state, otherwise undefined.


getImageWithColors()​

getImageWithColors(): Promise<string | undefined>

Returns​

Promise<string | undefined>


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​

GlobalPropertyHandle.getName


getOriginalColors()​

getOriginalColors(): Promise<{[key: string]: ColorDefinition; } | undefined>

Returns​

Promise<{[key: string]: ColorDefinition; } | undefined>


getOriginalImage()​

getOriginalImage(): Promise<Asset | undefined>

Retrieves the original, unmodified image selection, if one exists.

Returns​

Promise<Asset | undefined>

A promise that resolves with an Asset object if one is assigned to the state, otherwise undefined.


getRawProperty()​

getRawProperty(): GlobalPropertyConfigurationAspect

Returns​

GlobalPropertyConfigurationAspect

The underlying property data object.

Inherited from​

GlobalPropertyHandle.getRawProperty


getTitle()​

getTitle(): string

Returns​

string

A human-friendly title.

Inherited from​

GlobalPropertyHandle.getTitle


getType()​

getType(): AspectType

Returns​

AspectType

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

Inherited from​

GlobalPropertyHandle.getType


getUseOriginalImage()​

getUseOriginalImage(): boolean

Returns​

boolean


hasImage()​

hasImage(): boolean

Returns true if the state has an image assigned, otherwise false.

Returns​

boolean


initialize()​

initialize(): Promise<FileUploadGlobalPropertyHandle>

Returns​

Promise<FileUploadGlobalPropertyHandle>


isColorPickerEnabled()​

isColorPickerEnabled(): boolean

Returns​

boolean


isMandatory()​

isMandatory(): boolean

Returns​

boolean

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

Inherited from​

GlobalPropertyHandle.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​

GlobalPropertyHandle.isMandatoryFulfilled


isPmsPickerEnabled()​

isPmsPickerEnabled(): boolean

Returns​

boolean


isSilent()​

isSilent(): boolean

Returns​

boolean

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

Inherited from​

GlobalPropertyHandle.isSilent


removeBackgroundFromImage()​

removeBackgroundFromImage(applyNewAsset?): Promise<Asset>

Removes the background from an image, stores it in the state, and returns the new asset.

Parameters​

applyNewAsset?​

boolean = true

Optionally applies the new asset to all shared steps. Default: true.

Returns​

Promise<Asset>

A promise that resolves with the newly generated Asset.


selectImage()​

selectImage(asset): Promise<void>

Select an image to be used for all shared steps.

Parameters​

asset​

Asset

The asset to use.

Returns​

Promise<void>

A promise resolving when all affected steps have been updated.


setUseOriginalImage()​

setUseOriginalImage(value): Promise<void>

Parameters​

value​

boolean

Returns​

Promise<void>


vectorizeImage()​

vectorizeImage(applyNewAsset?): Promise<Asset>

Vectorizes the current image selection, stores it in the state, and returns the new asset. Note: This is a more expensive operation than raster background removal, so should only be used when necessary (e.g., for large images or when the user needs a transparent background for printing).

Parameters​

applyNewAsset?​

boolean = true

Optionally applies the new asset to all shared steps. Default: true.

Returns​

Promise<Asset>

A promise that resolves with the newly generated Asset.