au-widget-pim-design-selector/au-widget-pim-design-selector
Classes
AuPIMDesignSelector
Provides methods for saving and restoring widget data.
Extends
Implements
Constructors
Constructor
new AuPIMDesignSelector(): AuPIMDesignSelector;
Returns
Inherited from
AuBaseSelectorWidget.constructor
Properties
container
container: any;
currentPage
currentPage: number = 1;
displayedVariants
displayedVariants: ProductInformationDesign[] = [];
imageIsLoading
imageIsLoading: boolean = true;
ironSelectorElement
ironSelectorElement: IronSelectorElement;
pages
pages: number = 1;
params
params: IDesignSelectorConfig;
Properties of this widget.
Overrides
showPagination
showPagination: boolean = false;
value
value: ProductInformationDesign;
A gallery item.
variants
variants: ProductInformationDesign[] = [];
Accessors
_
Get Signature
get _(): ProductInformationDesign;
Returns the selected gallery item.
Returns
ProductInformationDesign
Overrides
sku
Get Signature
get sku(): string;
Returns
string
Methods
checkInitDependenciesWidgets()
checkInitDependenciesWidgets(): string[];
Returns an array of widget names, due to which the current widget cannot receive parameters.
Returns
string[]
Inherited from
AuBaseSelectorWidget.checkInitDependenciesWidgets
clearSelection()
clearSelection(): void;
Clears the selection.
Returns
void
Overrides
AuBaseSelectorWidget.clearSelection
exportWidgetData()
exportWidgetData(force): Promise<any>;
Parameters
| Parameter | Type |
|---|---|
force | boolean |
Returns
Promise<any>
Implementation of
IRestorableWidget.exportWidgetData
ready()
ready(): void;
Returns
void
resetPreloaderState()
resetPreloaderState(): void;
Returns
void
Inherited from
AuBaseSelectorWidget.resetPreloaderState
restoreWidgetFromData()
restoreWidgetFromData(widgetData, force): Promise<void>;
Parameters
| Parameter | Type |
|---|---|
widgetData | any |
force | boolean |
Returns
Promise<void>
Implementation of
IRestorableWidget.restoreWidgetFromData
showPreloader()
showPreloader(
isPreload,
message?,
timeout?): void;
Shows a preloader.
"onClick": [
"{{#function main.showPreloader(true, 'Creating print files...')}}",
"{{#function $['editor'].getHiResImages(800,800)}}",
"{{#function main.showPreloader(false)}}"
]
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
isPreload | boolean | undefined | If true, enables the preloader. |
message | string | string[] | ... | A text message that appears next to the preloader. |
timeout | number | 5 | - |
Returns
void
Inherited from
AuBaseSelectorWidget.showPreloader
showToast()
showToast(data?, duration?): void;
Shows a toast.
return editor.loadUserInfo(data)
.catch(err => {
this.widget.showToast("Error: Invalid data");
console.log(err);
});
Parameters
| Parameter | Type | Description |
|---|---|---|
data? | string | A string message to display in the toast. |
duration? | number | Defines how long to show the toast for. |
Returns
void
Inherited from
AuBaseSelectorWidget.showToast
References
widget
Renames and re-exports AuPIMDesignSelector