au-widget-slider/au-widget-slider
Classes
AuWidgetSlider
A widget that is used to display multiple images together.
The following example illustrates how you can initialize a slider with proof images obtained from the Design Editor.
{
"widgets": [
{
"name": "preview",
"type": "slider",
"params": {
"style": {
"--au-widget-background": "#ffffff",
"--au-widget-height": "480px"
},
"direction": "tile",
"rows": 1,
"columns": 2,
"showImageIndex": false,
"lightbox": false,
"images": {
"{{ #each $['editor'].proofImageUrls as url }}": {
"url": "{{ url[0] }}"
}
}
}
}
]
}
Extends
Properties
params
params: any;
Compiled widget configuration.
Inherited from
Methods
backImage()
backImage(): void;
Navigates to the previous image.
Returns
void
checkInitDependenciesWidgets()
checkInitDependenciesWidgets(): string[];
Returns an array of widget names, due to which the current widget cannot receive parameters.
Returns
string[]
Inherited from
AuBaseWidget.checkInitDependenciesWidgets
nextImage()
nextImage(): void;
Navigates to the next image.
Returns
void
resetPreloaderState()
resetPreloaderState(): void;
Returns
void
Inherited from
AuBaseWidget.resetPreloaderState
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
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
References
widget
Renames and re-exports AuWidgetSlider