Interface IDesignEditorDefinitionSetTheme
Provides properties to define a product theme. For details, you can refer to the SetTheme command.
{
"type": "design-editor",
"name": "editor",
"params": {
"initial": { ... },
"setTheme": {
"primary": "{{ "#f00" }}",
"secondary": "{{ "#0f0" }}"
}
}
}
Package: ui-framework
Properties
after
The next commands to be executed after this command completes.
Declaration
after?: string | string[]
Property Value
| Type | Description |
|---|---|
| string | string[] | The next commands to be executed after this command completes. |
autoCompile
If false, action will never execute automatically.
Declaration
autoCompile?: boolean
Property Value
| Type | Description |
|---|---|
| boolean | If |
executeOnce
If true, this command will be executed only once.
You can use it for initial command.
For example, we need to change surface depending on the option value.
We write for initial and for updateSurfaces the same productDefinition with $['option]._
And set executeOnce = true for initial. And initial will be executed only once.
Declaration
executeOnce?: boolean
Property Value
| Type | Description |
|---|---|
| boolean | If |
executeOnlyAfter
Current command will be executed in a next update only after all commands executed in this param.
The same example from executeOnce param.
We need to execute updateSurface on all next updates, exclude the first one.
And we set executeOnlyAfter = ['initial'] for updateSurface command.
Declaration
executeOnlyAfter?: string[]
Property Value
| Type | Description |
|---|---|
| string[] | Current command will be executed in a next update only after all commands executed in this param.
The same example from |
lock
Name of widgets that show preloader when command executed.
Declaration
lock?: string[]
Property Value
| Type | Description |
|---|---|
| string[] | Name of widgets that show preloader when command executed. |
message
The message for preloader.
Declaration
message?: string | string[]
Property Value
| Type | Description |
|---|---|
| string | string[] | The message for preloader. |
onExecuted
Functions that executed after command
Declaration
onExecuted?: Function | Function[]
Property Value
| Type | Description |
|---|---|
| Function | Function[] | Functions that executed after command |
showPreloader
If true, displays the preloader while executing this command.
Declaration
showPreloader?: boolean
Property Value
| Type | Description |
|---|---|
| boolean | If |
theme
Typically, it is a theme name as a string, but you can also pass a structure describing an "ad-hoc" theme.
Declaration
theme: string | IProductThemeConfig
Property Value
| Type | Description |
|---|---|
| string | IProductThemeConfig | Typically, it is a theme name as a string, but you can also pass a structure describing an "ad-hoc" theme. |
timeout
The timeout for switching preloader messages.
Declaration
timeout?: number
Property Value
| Type | Description |
|---|---|
| number | The timeout for switching preloader messages. |