@aurigma/ui-framework
Version:
A platform which allows building print product personalization editors based on Aurigma's Customer's Canvas.
236 lines (148 loc) • 4.91 kB
Markdown
A widget that is used to group multiple widgets together.
For details, you can refer to the [Group widget](https://customerscanvas.com/dev/editors/ui-framework/widgets/group.html) topic.
```
{
"widgets": [
{
"name": "option-list",
"type": "group",
"params": {
"type": "noncollapsible",
"tabs": [
{
"widgets": [
{
"title": "Corner Type",
"name": "corners",
"type": "option",
"params": { ... }
},
{
"title": "Lamination",
"name": "lamination",
"type": "option",
"params": { ... }
}
]
}
]
}
}
]
}
```
↳ [AuBaseSelectorWidget](aubaseselectorwidget.md)
↳ **AuWidgetGroup**
* [IWidget](../interfaces/iwidget.md)
* [params](auwidgetgroup.md
* [scrollable](auwidgetgroup.md
* [selectedIndex](auwidgetgroup.md
* [selectedTitle](auwidgetgroup.md
* [showCustomScroll](auwidgetgroup.md
* [_](auwidgetgroup.md
* [_getStylesByType](auwidgetgroup.md
* [checkInitDependenciesWidgets](auwidgetgroup.md
* [clearSelection](auwidgetgroup.md
* [resetPreloaderState](auwidgetgroup.md
* [showPreloader](auwidgetgroup.md
* [showToast](auwidgetgroup.md
* [updateVisibleParams](auwidgetgroup.md
• **params**: *[AuWidgetGroupParam](../interfaces/auwidgetgroupparam.md)*
*Implementation of [IWidget](../interfaces/iwidget.md).[params](../interfaces/iwidget.md
*Overrides [AuBaseWidget](aubasewidget.md).[params](aubasewidget.md
Properties of the widget.
___
• **scrollable**: *boolean*
___
• **selectedIndex**: *number* = 0
The index of the selected item.
___
• **selectedTitle**: *string* = ""
The title of the selected item.
___
• **showCustomScroll**: *boolean* = true
• **get _**(): *any*
*Overrides [AuBaseSelectorWidget](aubaseselectorwidget.md).[_](aubaseselectorwidget.md
Returns the selected item.
**Returns:** *any*
▸ **_getStylesByType**(`type`: string): *"--au-widget-height: 100%;" | ""*
**Parameters:**
Name | Type |
------ | ------ |
`type` | string |
**Returns:** *"--au-widget-height: 100%;" | ""*
___
▸ **checkInitDependenciesWidgets**(): *string[]*
*Inherited from [AuBaseWidget](aubasewidget.md).[checkInitDependenciesWidgets](aubasewidget.md
Returns an array of widget names, due to which the current widget cannot receive parameters.
**Returns:** *string[]*
___
▸ **clearSelection**(): *void*
*Overrides [AuBaseSelectorWidget](aubaseselectorwidget.md).[clearSelection](aubaseselectorwidget.md
Sets the selected index to `-1`.
**Returns:** *void*
___
▸ **resetPreloaderState**(): *void*
*Inherited from [AuBaseWidget](aubasewidget.md).[resetPreloaderState](aubasewidget.md
**Returns:** *void*
___
▸ **showPreloader**(`isPreload`: boolean, `message`: string | string[], `timeout`: number): *void*
*Inherited from [AuBaseWidget](aubasewidget.md).[showPreloader](aubasewidget.md
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 &
`timeout` | number | 5 | - |
**Returns:** *void*
___
▸ **showToast**(`data?`: string, `duration?`: number): *void*
*Inherited from [AuBaseWidget](aubasewidget.md).[showToast](aubasewidget.md
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*
___
▸ **updateVisibleParams**(): *void*
**Returns:** *void*