UI Framework ReferenceAuWidgetDesignAtoms

Class: AuWidgetDesignAtoms

Hierarchy

AuBaseWidget

AuWidgetDesignAtoms

Implements

Index

Properties

Accessors

Methods

Properties

params

params: IDesignAtomsWidgetConfig

Overrides AuBaseWidget.params

Defined in src/widgets/au-widget-design-atoms/au-widget-design-atoms.ts:176


paramsRaw

paramsRaw: any

Inherited from AuBaseWidget.paramsRaw

Defined in src/widgets/widget/AuBaseWidget.ts:53

Uncompiled widget configuration.

Accessors

currentSurface

get currentSurface(): Surface‹›

Defined in src/widgets/au-widget-design-atoms/au-widget-design-atoms.ts:169

Returns:Surface‹›


hiResUrls

get hiResUrls(): string[]

Defined in src/widgets/au-widget-design-atoms/au-widget-design-atoms.ts:251

Returns:string[]


productModel

get productModel(): Product‹›

Defined in src/widgets/au-widget-design-atoms/au-widget-design-atoms.ts:48

Returns:Product‹›

set productModel(product: Product): void

Defined in src/widgets/au-widget-design-atoms/au-widget-design-atoms.ts:52

Parameters:

Name Type
product Product

Returns:void


proofImageUrls

get proofImageUrls(): string[]

Defined in src/widgets/au-widget-design-atoms/au-widget-design-atoms.ts:255

Returns:string[]


selectedItems

get selectedItems(): Item‹›[]

Defined in src/widgets/au-widget-design-atoms/au-widget-design-atoms.ts:74

Returns:Item‹›[]


viewer

get viewer(): Viewer‹›

Defined in src/widgets/au-widget-design-atoms/au-widget-design-atoms.ts:65

Returns:Viewer‹›

set viewer(viewer: Viewer): void

Defined in src/widgets/au-widget-design-atoms/au-widget-design-atoms.ts:69

Parameters:

Name Type
viewer Viewer

Returns:void

Methods

addCustomStyles

addCustomStyles(params: any): void

Inherited from AuBaseWidget.addCustomStyles

Defined in src/widgets/widget/AuBaseWidget.ts:352

Applies new styles to a widget.

Parameters:

Name Type
params any

Returns:void


compile

compile(additionalParam: any): Promise‹any›

Inherited from AuBaseWidget.compile

Defined in src/widgets/widget/AuBaseWidget.ts:185

Compiles the widget config.

"steps": [{
  "name": "card-size",
  "title": "Step 1. Card Options",
  "description": "Choose a card size.",
  "toolPanel": {
    "name": "options"
  },
  "onActivate": [
    "{{#function $['logo'].compile() }}"
  ]
},
...

Parameters:

Name Type Default Description
additionalParam any Parameters for widget config compilation.

Returns:Promise‹any›

The compiled widget configuration.


emitChange

emitChange(data: any, forceRecompile: boolean): void

Inherited from AuBaseWidget.emitChange

Defined in src/widgets/widget/AuBaseWidget.ts:161

Sends a message about the widget state changes.

"steps": [{
  "name": "card-size",
  "title": "Step 1. Card Options",
  "description": "Choose a card size.",
  "toolPanel": {
    "name": "options"
  },
  "onActivate": [
    "{{#function $['options'].emitChange()}}"
  ]
},
...

Parameters:

Name Type Default Description
data any Data for updating the widget.
forceRecompile boolean false If true, runs widget recompilation to apply the updated parameters.

Returns:void


getHiResImages

getHiResImages(): Promise‹string[]›

Defined in src/widgets/au-widget-design-atoms/au-widget-design-atoms.ts:259

Returns:Promise‹string[]›


getProofImages

getProofImages(): Promise‹string[]›

Defined in src/widgets/au-widget-design-atoms/au-widget-design-atoms.ts:265

Returns:Promise‹string[]›


getSerializedProduct

getSerializedProduct(): string

Defined in src/widgets/au-widget-design-atoms/au-widget-design-atoms.ts:205

Returns:string


resizeSelectedImages

resizeSelectedImages(resizeMode: ResizeMode, targetSize?: SizeF): void

Defined in src/widgets/au-widget-design-atoms/au-widget-design-atoms.ts:108

Parameters:

Name Type
resizeMode ResizeMode
targetSize? SizeF

Returns:void


rotateCanvas

rotateCanvas(angle: number): void

Defined in src/widgets/au-widget-design-atoms/au-widget-design-atoms.ts:78

Parameters:

Name Type Default
angle number 90

Returns:void


rotateSelectedItems

rotateSelectedItems(angle: number): void

Defined in src/widgets/au-widget-design-atoms/au-widget-design-atoms.ts:83

Parameters:

Name Type Default
angle number 90

Returns:void


showPreloader

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

Inherited from AuBaseWidget.showPreloader

Defined in src/widgets/widget/AuBaseWidget.ts:250

Shows a preloader.

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

Parameters:

Name Type Default Description
isPreload boolean - If true, enables the preloader.
message string undefined A text message that appears next to the preloader.

Returns:void


showToast

showToast(data?: string, duration?: number): void

Inherited from AuBaseWidget.showToast

Defined in src/widgets/widget/AuBaseWidget.ts:514

Shows a toast.

return editor.loadUserInfo(data)
    .catch(err => {
        this.widget.showToast("Error: Invalid data");
        console.log(err);
    });

Parameters:

Name Type Description
data? string A string message to display in the toast.
duration? number Defines how long to show the toast for.

Returns:void