Skip to main content

au-widget-option/AuAbsrtactOption

Classes​

AuAbstractOption​

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

Extends​

Extended by​

Constructors​

Constructor​
new AuAbstractOption(): AuAbstractOption;
Returns​

AuAbstractOption

Inherited from​

AuBaseSelectorWidget.constructor

Properties​

_definitionPromise​
_definitionPromise: Promise<any>;
_firstTimeInit​
_firstTimeInit: boolean = true;
_onChange​
_onChange: Function;
element​
element: AuOptionBase;

An option obtained from the e-commerce driver.

order​
order: IOrder;

An order obtained from the e-commerce driver.

params​
params: any;

Compiled widget configuration.

Inherited from​

AuBaseSelectorWidget.params

placeholderText​
placeholderText: string;

Accessors​

_​
Get Signature​
get _(): any;

Returns the selected value.

Returns​

any

Overrides​

AuBaseSelectorWidget._

selected​
Get Signature​
get selected(): any;

Returns the selected value.

Returns​

any

Methods​

_manageEmptyValuesText()​
_manageEmptyValuesText(applyEmptyValues): void;
Parameters​
ParameterType
applyEmptyValuesboolean
Returns​

void

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;

Sets the value of the option to null.

Returns​

void

Overrides​

AuBaseSelectorWidget.clearSelection

resetPreloaderState()​
resetPreloaderState(): void;
Returns​

void

Inherited from​

AuBaseSelectorWidget.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​

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

void

Inherited from​

AuBaseSelectorWidget.showToast

Interfaces​

IWidgetOptionValue​

Provides a property to handle an option selection.

Extends​

  • unknown

Properties​

onSelect​
onSelect: Function;

A single function that will be executed when the user selects a value.

References​

default​

Renames and re-exports AuAbstractOption

Was this page helpful?