UNPKG

@aurigma/ui-framework

Version:

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

166 lines (100 loc) 4.5 kB
# Interface: IDesignEditorCommandDefinition Provides the `after` property to support a queue of commands. The following example illustrates how you can run the `setViewerSettings` command after `setPrintArea` completes. ``` { "widgets": [{ "type": "design-editor", "name": "editor", "params": { "inital": { ... }, "setViewerSettings": "{{vars.zoomSettings[$['flyer-size']._.title]}}", "setPrintArea": { "data": { "designFile": "{{$['flyer-gallery']._.name}}" }, "after": [ "setViewerSettings" ] } } }] } ``` ## Hierarchy * **IDesignEditorCommandDefinition** ↳ [IDesignEditorDefinitionModifyItems](idesigneditordefinitionmodifyitems.md) ↳ [ISetRemoteMockup](isetremotemockup.md) ↳ [IChangeDesignVariantCommandDefinition](ichangedesignvariantcommanddefinition.md) ↳ [IDesignEditorLoadUserInfoParams](idesigneditorloaduserinfoparams.md) ↳ [ISetSerializedProductConfig](isetserializedproductconfig.md) ↳ [ISwapSurfacesCommandDefinition](iswapsurfacescommanddefinition.md) ↳ [IUpdateItemsCommandDefinition](iupdateitemscommanddefinition.md) ↳ [IUpdateSurfacesCommandDefinition](iupdatesurfacescommanddefinition.md) ↳ [IDesignEditorDefinitionSetTheme](idesigneditordefinitionsettheme.md) ↳ [IDesignEditorDefinitionResizeItems](idesigneditordefinitionresizeitems.md) ↳ [IDesignEditorDefinitionTranslateItems](idesigneditordefinitiontranslateitems.md) ↳ [IDesignEditorDefinitionSetViewerSettings](idesigneditordefinitionsetviewersettings.md) ↳ [IDesignEditorDefinitionInitial](idesigneditordefinitioninitial.md) ↳ [IDesignEditorDefinitionChangeLayout](idesigneditordefinitionchangelayout.md) ↳ [IDesignEditorDefinitionSetBackground](idesigneditordefinitionsetbackground.md) ↳ [IDesignEditorDefinitionSetPrintArea](idesigneditordefinitionsetprintarea.md) ↳ [IDesignEditorDefinitionChangeMockup](idesigneditordefinitionchangemockup.md) ↳ [ISetSurfacesOptions](isetsurfacesoptions.md) ↳ [ISetBackgroundParam](isetbackgroundparam.md) ↳ [ICreateImageItem](icreateimageitem.md) ↳ [IDuplicateSurfacesCommandDefinition](iduplicatesurfacescommanddefinition.md) ## Index ### Properties * [after](idesigneditorcommanddefinition.md#optional-after) * [autoCompile](idesigneditorcommanddefinition.md#optional-autocompile) * [executeOnce](idesigneditorcommanddefinition.md#optional-executeonce) * [executeOnlyAfter](idesigneditorcommanddefinition.md#optional-executeonlyafter) * [lock](idesigneditorcommanddefinition.md#optional-lock) * [message](idesigneditorcommanddefinition.md#optional-message) * [onExecuted](idesigneditorcommanddefinition.md#optional-onexecuted) * [showPreloader](idesigneditorcommanddefinition.md#optional-showpreloader) * [timeout](idesigneditorcommanddefinition.md#optional-timeout) ## Properties ### `Optional` after**after**? : *string | string[]* The next commands to be executed after this command completes. ___ ### `Optional` autoCompile • **autoCompile**? : *boolean* If `false`, action will never execute automatically. ___ ### `Optional` executeOnce**executeOnce**? : *boolean* 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. ___ ### `Optional` executeOnlyAfter • **executeOnlyAfter**? : *string[]* 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. ___ ### `Optional` lock**lock**? : *string[]* Name of widgets that show preloader when command executed. ___ ### `Optional` message • **message**? : *string | string[]* The message for preloader. ___ ### `Optional` onExecuted**onExecuted**? : *Function | Function[]* Functions that executed after command ___ ### `Optional` showPreloader • **showPreloader**? : *boolean* If `true`, displays the preloader while executing this command. ___ ### `Optional` timeout**timeout**? : *number* The timeout for switching preloader messages.