Class AuWidgetFinishButton
A widget representing a button that finishes product personalization and places an order. For details, you can refer to the FinishButton widget topic.
{
"widgets": [
{
"name": "agree-checkbox",
"type": "checkbox",
"params": {
"prompt": "I approve the design.",
"value": false
}
},
{
"name": "finish-btn",
"type": "finish-button",
"params": {
"enabled": "{{$['agree-checkbox']._}}",
"onClick": [
"{{ #function cart.submit() }}"
]
}
}
]
}
Package: ui-framework
Properties
enabled
Declaration
enabled: boolean
Property Value
Type | Description |
---|---|
boolean |
params
Button properties.
Declaration
params: IFinishButtonConfig
Property Value
Type | Description |
---|---|
IFinishButtonConfig | Button properties. |
template
Declaration
static HTMLTemplateElement template
Property Value
Type | Description |
---|---|
HTMLTemplateElement |
visible
Declaration
visible: boolean
Property Value
Type | Description |
---|---|
boolean |
Methods
checkInitDependenciesWidgets()
Returns an array of widget names, due to which the current widget cannot receive parameters.
Declaration
function checkInitDependenciesWidgets()
Returns
Type | Description |
---|---|
string[] |
resetPreloaderState()
Declaration
function resetPreloaderState()
showPreloader(boolean, string | string[], number)
Shows a preloader.
"onClick": [
"{{#function main.showPreloader(true, 'Creating print files...')}}",
"{{#function $['editor'].getHiResImages(800,800)}}",
"{{#function main.showPreloader(false)}}"
]
Declaration
function showPreloader(isPreload: boolean, message: string | string[], timeout: number)
Parameters
Type | Name | Description |
---|---|---|
boolean | isPreload |
If |
string | string[] | message |
A text message that appears next to the preloader. |
number | timeout |
showToast(string, number)
Shows a toast.
return editor.loadUserInfo(data)
.catch(err => {
this.widget.showToast("Error: Invalid data");
console.log(err);
});
Declaration
function showToast(data?: string, duration?: number)
Parameters
Type | Name | Description |
---|---|---|
string | data |
A string message to display in the toast. |
number | duration |
Defines how long to show the toast for. |