UNPKG

@aurigma/design-editor-iframe

Version:

Using this module you can embed Design Editor (a part of Customer's Canvas) to your page through the IFrame API.

129 lines 4.74 kB
/** * Events enumeration. * @internal */ export var GlobalEvents; (function (GlobalEvents) { /** * Fires when the editor is opened in a modal window. */ GlobalEvents[GlobalEvents["ModalOpen"] = 0] = "ModalOpen"; /** * Fires when the editor is closed in a modal window. */ GlobalEvents[GlobalEvents["ModalClose"] = 1] = "ModalClose"; /** * Fires when the editor is switched to the full screen mode. */ GlobalEvents[GlobalEvents["FullScreen"] = 2] = "FullScreen"; /** * Fires when the editor is switched to the full window mode. */ GlobalEvents[GlobalEvents["FullWindow"] = 3] = "FullWindow"; /** * Fires when the editor is switched to the original size mode. */ GlobalEvents[GlobalEvents["OriginalSize"] = 4] = "OriginalSize"; /** * Fires when the Image Manager opens. */ GlobalEvents[GlobalEvents["AssetManagerOpened"] = 5] = "AssetManagerOpened"; /** * Fires when the Image Manager closes. */ GlobalEvents[GlobalEvents["AssetManagerClosed"] = 6] = "AssetManagerClosed"; /** * Fires when a user reverts a product in the editor. */ GlobalEvents[GlobalEvents["RevertProduct"] = 7] = "RevertProduct"; /** * Fires when a user changes visibility of the Object Inspector. */ GlobalEvents[GlobalEvents["ObjectInspectorVisibilityChange"] = 8] = "ObjectInspectorVisibilityChange"; /** * Fires when a user switches surfaces. */ GlobalEvents[GlobalEvents["OnSurfaceChanged"] = 9] = "OnSurfaceChanged"; /** * Fires when the Redo button gets enabled in the editor. */ GlobalEvents[GlobalEvents["CanRedoChanged"] = 10] = "CanRedoChanged"; /** * Fires when the Undo button gets enabled in the editor. */ GlobalEvents[GlobalEvents["CanUndoChanged"] = 11] = "CanUndoChanged"; /** * Fires when a user resizes images. */ GlobalEvents[GlobalEvents["OnImageDpiChanged"] = 12] = "OnImageDpiChanged"; /** * Fires when a dialog box opens. * <i>Deprecated. Instead, you can subscribe to {@link GlobalEvents.UIElementStateChange} with the `TextPopup` argument.</i> * * @deprecated Instead, subscribe to `UIElementStateChange` with the `TextPopup` argument. */ GlobalEvents[GlobalEvents["PopupOpen"] = 13] = "PopupOpen"; /** * Fires when the size of a print area changes, for example, after using {@link Surface.setPrintAreas|`setPrintAreas()`}. */ GlobalEvents[GlobalEvents["PrintAreaBoundsChanged"] = 14] = "PrintAreaBoundsChanged"; /** * Fires when a user clicks the Undo button. */ GlobalEvents[GlobalEvents["UndoProduct"] = 15] = "UndoProduct"; /** * Fires when a user clicks the Redo button. */ GlobalEvents[GlobalEvents["RedoProduct"] = 16] = "RedoProduct"; /** * Fires when a UI element is opened or closed in the editor. The current implementation only supports the `TextPopup`, `BottomToolbar.Zoom`, and `BottomToolbar.Settings` controls. */ GlobalEvents[GlobalEvents["UIElementStateChange"] = 17] = "UIElementStateChange"; /** * Fires when custom button is clicked. */ GlobalEvents[GlobalEvents["CustomButtonClicked"] = 18] = "CustomButtonClicked"; })(GlobalEvents || (GlobalEvents = {})); /** * Arguments of the `UIElementStateChange` event. * @example You can pass these arguments as follows: * ``` json * { * "element": "BottomToolbar.Zoom", * "isOpen": true * } * ``` * @public */ var UIElementStateChangeEventArgs = /** @class */ (function () { /** * @param element - UI element that opens or closes. The current implementation only supports the `TextPopup`, `BottomToolbar.Zoom`, and `BottomToolbar.Settings` controls. * @param isOpen - If `true`, the element has been opened. If `false`, the element has been closed. */ function UIElementStateChangeEventArgs(element, isOpen) { this.element = element; this.isOpen = isOpen; } return UIElementStateChangeEventArgs; }()); export { UIElementStateChangeEventArgs }; /** * Screen modes enumeration. * @public */ export var WindowMode; (function (WindowMode) { /** * Full screen mode. */ WindowMode[WindowMode["FullScreen"] = 0] = "FullScreen"; /** * Full window mode. */ WindowMode[WindowMode["FullWindow"] = 1] = "FullWindow"; /** * Original size mode. */ WindowMode[WindowMode["OriginalSize"] = 2] = "OriginalSize"; })(WindowMode || (WindowMode = {})); //# sourceMappingURL=GlobalEvents.js.map