Class AuDesignEditor
The base class for the AuWidgetDesignEditor widget.
Package: ui-framework
Properties
params
Compiled widget configuration.
Declaration
params: any
Property Value
| Type | Description |
|---|---|
| any | Compiled widget configuration. |
Methods
checkInitDependenciesWidgets()
Returns an array of widget names, due to which the current widget cannot receive parameters.
Declaration
function checkInitDependenciesWidgets()
Returns
| Type | Description |
|---|---|
| string[] |
colorToHex(Color)
Declaration
function colorToHex(color: Color)
Parameters
| Type | Name | Description |
|---|---|---|
| Color | color |
Returns
| Type | Description |
|---|---|
| Promise<string> |
getDesignEditorItemModel(BaseTextItem | PlaceholderItem | ShapeItem)
Declaration
function getDesignEditorItemModel(item: BaseTextItem | PlaceholderItem | ShapeItem)
Parameters
| Type | Name | Description |
|---|---|---|
| BaseTextItem | PlaceholderItem | ShapeItem | item |
Returns
| Type | Description |
|---|---|
| Promise<DesignEditorItemChanges> |
getEditor()
Returns a promise with an instance of the DesignEditor.
Declaration
function getEditor()
Returns
| Type | Description |
|---|---|
| Promise<Editor> |
getProduct()
Returns a promise with the product opened in the DesignEditor.
Declaration
function getProduct()
Returns
| Type | Description |
|---|---|
| Promise<Product> |
resetPreloaderState()
Declaration
function resetPreloaderState()
showPreloader(boolean, string | string[], number)
Shows a preloader.
"onClick": [
"{{#function main.showPreloader(true, 'Creating print files...')}}",
"{{#function $['editor'].getHiResImages(800,800)}}",
"{{#function main.showPreloader(false)}}"
]
Declaration
function showPreloader(isPreload: boolean, message: string | string[], timeout: number)
Parameters
| Type | Name | Description |
|---|---|---|
| boolean | isPreload |
If |
| string | string[] | message |
A text message that appears next to the preloader. |
| number | timeout |
showToast(string, number)
Shows a toast.
return editor.loadUserInfo(data)
.catch(err => {
this.widget.showToast("Error: Invalid data");
console.log(err);
});
Declaration
function showToast(data?: string, duration?: number)
Parameters
| Type | Name | Description |
|---|---|---|
| string | data |
A string message to display in the toast. |
| number | duration |
Defines how long to show the toast for. |