UNPKG

@aurigma/ui-framework

Version:

A platform which allows building print product personalization editors based on Aurigma's Customer's Canvas.

52 lines (34 loc) 1.35 kB
# Class: UpdateSurfacesCommand A command that replaces product pages. Here, we replace the first page of the loaded product with the third page of a state file. ``` { "type": "design-editor", "name": "editor", "params": { "initial": { ... }, "updateSurfaces": [{ "definition": "{{ $['options']._.props.id }}", "surfaces": [0], "newProductSurfaces": [2], "replaceAll": true }] } } ``` ## Hierarchy * [DesignEditorWidgetCommand](designeditorwidgetcommand.md) ↳ **UpdateSurfacesCommand** ## Index ### Methods * [execute](updatesurfacescommand.md#execute) ## Methods ### execute ▸ **execute**(`params`: [IUpdateSurfacesCommandDefinition](../interfaces/iupdatesurfacescommanddefinition.md)[] | [IUpdateSurfacesCommandDefinition](../interfaces/iupdatesurfacescommanddefinition.md)): *Promise‹void›* *Overrides [DesignEditorWidgetCommand](designeditorwidgetcommand.md).[execute](designeditorwidgetcommand.md#abstract-execute)* Executes this command. **Parameters:** Name | Type | Description | ------ | ------ | ------ | `params` | [IUpdateSurfacesCommandDefinition](../interfaces/iupdatesurfacescommanddefinition.md)[] | [IUpdateSurfacesCommandDefinition](../interfaces/iupdatesurfacescommanddefinition.md) | Parameters for the command. | **Returns:** *Promise‹void›*