Skip to main content

widget/AuBaseWidget

Classes

abstract AuBaseSelectorWidget

Declares methods used to retrieve the selected value in a widget and clear the selection.

Extends

Extended by

Constructors

Constructor
new AuBaseSelectorWidget(): AuBaseSelectorWidget;
Returns

AuBaseSelectorWidget

Inherited from

AuBaseWidget.constructor

Properties

params
params: any;

Compiled widget configuration.

Inherited from

AuBaseWidget.params

Accessors

_
Get Signature
get abstract _(): any;

Returns the selected value.

Returns

any

Methods

checkInitDependenciesWidgets()
checkInitDependenciesWidgets(): string[];

Returns an array of widget names, due to which the current widget cannot receive parameters.

Returns

string[]

Inherited from

AuBaseWidget.checkInitDependenciesWidgets

clearSelection()
abstract clearSelection(): any;

Clears the selection.

Returns

any

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
ParameterTypeDefault valueDescription
isPreloadbooleanundefinedIf true, enables the preloader.
messagestring | string[]...A text message that appears next to the preloader.
timeoutnumber5-
Returns

void

Inherited from

AuBaseWidget.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
ParameterTypeDescription
data?stringA string message to display in the toast.
duration?numberDefines how long to show the toast for.
Returns

void

Inherited from

AuBaseWidget.showToast


abstract AuBaseWidget

The base class for widgets.

Extends

  • any

Extended by

Implements

Constructors

Constructor
new AuBaseWidget(): AuBaseWidget;
Returns

AuBaseWidget

Overrides
AuTranslationMixin(AuElement).constructor;

Properties

params
params: any;

Compiled widget configuration.

Implementation of

IWidget.params

Methods

checkInitDependenciesWidgets()
checkInitDependenciesWidgets(): string[];

Returns an array of widget names, due to which the current widget cannot receive parameters.

Returns

string[]

resetPreloaderState()
resetPreloaderState(): void;
Returns

void

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
ParameterTypeDefault valueDescription
isPreloadbooleanundefinedIf true, enables the preloader.
messagestring | string[]...A text message that appears next to the preloader.
timeoutnumber5-
Returns

void

showToast()
showToast(data?, duration?): void;

Shows a toast.

return editor.loadUserInfo(data)
.catch(err => {
this.widget.showToast("Error: Invalid data");
console.log(err);
});
Parameters
ParameterTypeDescription
data?stringA string message to display in the toast.
duration?numberDefines how long to show the toast for.
Returns

void

Was this page helpful?