UI Framework ReferenceAuWizard

Class: AuWizard

Implements a multistep editor.

Hierarchy

  • any

    AuWizard

Implements

Index

Properties

Methods

Properties

driver

driver: IDriver

Implementation of IEditorElement.driver

Defined in src/main/au-wizard/au-wizard.ts:91

A reference to an e-commerce driver.


editorState

editorState: string = ""

Defined in src/main/au-wizard/au-wizard.ts:79

An editor state calculated in createEditorSnapshot.


varManager

varManager: IVariableManager = new VariableManager(this)

Defined in src/main/au-wizard/au-wizard.ts:73

An object for managing variables.

Methods

addCustomPropertyInScope

addCustomPropertyInScope(name: string, property: any): void

Defined in src/main/au-wizard/au-wizard.ts:317

Adds a custom property to the compilation scope.

Parameters:

Name Type Description
name string The property name.
property any A value of the property.

Returns:void


appendVars

appendVars(varsDictionary: kvObject‹string, any›): void

Defined in src/main/au-wizard/au-wizard.ts:687

Deprecated, use varManager.append() instead. Appends values to the current vars object.

Parameters:

Name Type Description
varsDictionary kvObject‹string, any› An object, which will be merged with the current vars.

Returns:void


createEditorSnapshot

createEditorSnapshot(force: boolean): Promise‹string›

Defined in src/main/au-wizard/au-wizard.ts:263

Creates an editor snapshot, which can be used to restore the editor state.

Parameters:

Name Type Default Description
force boolean false If true, then this method also saves the product by using the Customer's Canvas IFrame API.

Returns:Promise‹string›

A compressed Base64 string, which can be passed to restoreEditor.


getJsonProcessor

getJsonProcessor(): JsonProcessor

Defined in src/main/au-wizard/au-wizard.ts:150

Returns an instance of the JsonProcessor.

Returns:JsonProcessor


nextStep

nextStep(): void

Defined in src/main/au-wizard/au-wizard.ts:700

Activates the next step in the editor.

Returns:void


prevStep

prevStep(): void

Defined in src/main/au-wizard/au-wizard.ts:707

Activates the previous step in the editor.

Returns:void


restoreEditor

restoreEditor(snapshot: string): Promise‹void›

Defined in src/main/au-wizard/au-wizard.ts:284

Restores the editor state.

Parameters:

Name Type Description
snapshot string A compressed Base64 string representing the editor snapshot. You can obtain this string in createEditorSnapshot.

Returns:Promise‹void›


showModal

showModal(name: string, isAutoStart: boolean): void

Defined in src/main/au-wizard/au-wizard.ts:739

Shows a modal window by its name.

Parameters:

Name Type Default Description
name string - The name of the modal window.
isAutoStart boolean false If true, shows the modal window after initializing the editor.

Returns:void


showPreloader

showPreloader(isPreload: boolean, message: string): void

Defined in src/main/au-wizard/au-wizard.ts:640

Shows and hides a preloader.

Under the hood, this method uses a counter to manage the preloader. If counter > 0, then it shows the preloader, otherwise, it hides the preloader. The default value of the counter is 0.

"onClick": [
  "{{#function main.showPreloader(true, 'Creating print files...')}}",
  "{{#function $['editor'].getHiResImages(800,800)}}",
  "{{#function main.showPreloader(false)}}"
]

Parameters:

Name Type Description
isPreload boolean If true, increments the counter. If false, decrements the counter.
message string A text message that appears next to the preloader icon.

Returns:void


switchToStep

switchToStep(index: number): void

Defined in src/main/au-wizard/au-wizard.ts:715

Activates a step by its index.

Parameters:

Name Type Description
index number The zero-based index of the required step.

Returns:void