au-widget-help/au-widget-help
Classes
AuWidgetHelp
A widget that is used to display webpages and modal windows.
In the following example, we define a modal window to be displayed in the help widget.
{
"modals": [
{
"name": "faq",
"header": "F.A.Q.",
"showOnStartup": true,
"externalContent": {
"url": "https://example.com/pages/faq"
}
}
],
"widgets": [
{
"name": "help",
"type": "help",
"title": "help",
"params": {
"steps": {
"0": {
"type": "modal",
"content": "faq"
},
"1": {
"type": "page",
"content": "http://customerscanvas.com"
}
}
}
}
]
}
Constructors
Constructor
new AuWidgetHelp(): AuWidgetHelp;
Returns
Inherited from
AuBaseInvisibleWidget.constructor;
Properties
params
params: IAuWidgetHelpParams;
Properties of the widget.
Overrides
AuBaseInvisibleWidget.params;
Accessors
template
Get Signature
get static template(): any;
Returns
any
Inherited from
AuBaseInvisibleWidget.template;
Methods
checkInitDependenciesWidgets()
checkInitDependenciesWidgets(): string[];
Returns an array of widget names, due to which the current widget cannot receive parameters.
Returns
string[]
Inherited from
AuBaseInvisibleWidget.checkInitDependenciesWidgets;
resetPreloaderState()
resetPreloaderState(): void;
Returns
void
Inherited from
AuBaseInvisibleWidget.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
AuBaseInvisibleWidget.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
AuBaseInvisibleWidget.showToast;
References
widget
Renames and re-exports AuWidgetHelp