@aurigma/ui-framework
Version:
A platform which allows building print product personalization editors based on Aurigma's Customer's Canvas.
208 lines (120 loc) • 4.38 kB
Markdown
# Class: AuWidgetPimOptions
## Hierarchy
↳ [AuBaseSelectorWidget](aubaseselectorwidget.md)
↳ **AuWidgetPimOptions**
## Implements
* [IWidget](../interfaces/iwidget.md)
## Index
### Properties
* [isLoading](auwidgetpimoptions.md#isloading)
* [options](auwidgetpimoptions.md#options)
* [params](auwidgetpimoptions.md#params)
### Accessors
* [_](auwidgetpimoptions.md#_)
* [summary](auwidgetpimoptions.md#summary)
### Methods
* [checkInitDependenciesWidgets](auwidgetpimoptions.md#checkinitdependencieswidgets)
* [checkOptionsLoading](auwidgetpimoptions.md#checkoptionsloading)
* [clearSelection](auwidgetpimoptions.md#clearselection)
* [resetPreloaderState](auwidgetpimoptions.md#resetpreloaderstate)
* [showPreloader](auwidgetpimoptions.md#showpreloader)
* [showToast](auwidgetpimoptions.md#showtoast)
* [updateParams](auwidgetpimoptions.md#updateparams)
* [updateParamsAsync](auwidgetpimoptions.md#updateparamsasync)
## Properties
### isLoading
• **isLoading**: *boolean* = false
___
### options
• **options**: *any[]* = []
___
### params
• **params**: *any*
*Implementation of [IWidget](../interfaces/iwidget.md).[params](../interfaces/iwidget.md#optional-params)*
*Inherited from [AuBaseWidget](aubasewidget.md).[params](aubasewidget.md#params)*
Compiled widget configuration.
## Accessors
### _
• **get _**(): *Record‹string, number | number[]› | []*
*Overrides [AuBaseSelectorWidget](aubaseselectorwidget.md).[_](aubaseselectorwidget.md#_)*
Returns the selected item.
**Returns:** *Record‹string, number | number[]› | []*
___
### summary
• **get summary**(): *any*
**Returns:** *any*
## Methods
### checkInitDependenciesWidgets
▸ **checkInitDependenciesWidgets**(): *string[]*
*Inherited from [AuBaseWidget](aubasewidget.md).[checkInitDependenciesWidgets](aubasewidget.md#checkinitdependencieswidgets)*
Returns an array of widget names, due to which the current widget cannot receive parameters.
**Returns:** *string[]*
___
### checkOptionsLoading
▸ **checkOptionsLoading**(): *void*
**Returns:** *void*
___
### clearSelection
▸ **clearSelection**(): *void*
*Overrides [AuBaseSelectorWidget](aubaseselectorwidget.md).[clearSelection](aubaseselectorwidget.md#abstract-clearselection)*
**Returns:** *void*
___
### resetPreloaderState
▸ **resetPreloaderState**(): *void*
*Inherited from [AuBaseWidget](aubasewidget.md).[resetPreloaderState](aubasewidget.md#resetpreloaderstate)*
**Returns:** *void*
___
### showPreloader
▸ **showPreloader**(`isPreload`: boolean, `message`: string | string[], `timeout`: number): *void*
*Inherited from [AuBaseWidget](aubasewidget.md).[showPreloader](aubasewidget.md#showpreloader)*
Shows a preloader.
```
"onClick": [
"{{#function main.showPreloader(true, 'Creating print files...')}}",
"{{#function $['editor'].getHiResImages(800,800)}}",
"{{#function main.showPreloader(false)}}"
]
```
**Parameters:**
Name | Type | Default | Description |
------ | ------ | ------ | ------ |
`isPreload` | boolean | - | If `true`, enables the preloader. |
`message` | string | string[] | [""] | A text message that appears next to the preloader. |
`timeout` | number | 5 | - |
**Returns:** *void*
___
### showToast
▸ **showToast**(`data?`: string, `duration?`: number): *void*
*Inherited from [AuBaseWidget](aubasewidget.md).[showToast](aubasewidget.md#showtoast)*
Shows a toast.
```
return editor.loadUserInfo(data)
.catch(err => {
this.widget.showToast("Error: Invalid data");
console.log(err);
});
```
**Parameters:**
Name | Type | Description |
------ | ------ | ------ |
`data?` | string | A string message to display in the toast. |
`duration?` | number | Defines how long to show the toast for. |
**Returns:** *void*
___
### updateParams
▸ **updateParams**(`params`: [IOptionsConfig](../interfaces/ioptionsconfig.md)): *void*
*Overrides void*
**Parameters:**
Name | Type |
------ | ------ |
`params` | [IOptionsConfig](../interfaces/ioptionsconfig.md) |
**Returns:** *void*
___
### updateParamsAsync
▸ **updateParamsAsync**(`params`: [IOptionsConfig](../interfaces/ioptionsconfig.md)): *Promise‹void›*
*Overrides void*
**Parameters:**
Name | Type |
------ | ------ |
`params` | [IOptionsConfig](../interfaces/ioptionsconfig.md) |
**Returns:** *Promise‹void›*