UNPKG

@dotcms/types

Version:

## Overview

124 lines (122 loc) 3.51 kB
/** * Development mode * * @internal */ const DEVELOPMENT_MODE = 'development'; /** * Production mode * * @internal */ const PRODUCTION_MODE = 'production'; /** * Possible modes of UVE (Universal Visual Editor) * @enum {string} * * @property {string} LIVE - Shows published and future content * @property {string} PREVIEW - Shows published and working content * @property {string} EDIT - Enables content editing functionality in UVE * @property {string} UNKNOWN - Error state, UVE should not remain in this mode */ var UVE_MODE; (function (UVE_MODE) { UVE_MODE["EDIT"] = "EDIT_MODE"; UVE_MODE["PREVIEW"] = "PREVIEW_MODE"; UVE_MODE["LIVE"] = "LIVE"; UVE_MODE["UNKNOWN"] = "UNKNOWN"; })(UVE_MODE || (UVE_MODE = {})); /** * Actions send to the dotcms editor * * @export * @enum {number} */ var DotCMSUVEAction; (function (DotCMSUVEAction) { /** * Tell the dotcms editor that page change */ DotCMSUVEAction["NAVIGATION_UPDATE"] = "set-url"; /** * Send the element position of the rows, columnsm containers and contentlets */ DotCMSUVEAction["SET_BOUNDS"] = "set-bounds"; /** * Send the information of the hovered contentlet */ DotCMSUVEAction["SET_CONTENTLET"] = "set-contentlet"; /** * Tell the editor that the page is being scrolled */ DotCMSUVEAction["IFRAME_SCROLL"] = "scroll"; /** * Tell the editor that the page has stopped scrolling */ DotCMSUVEAction["IFRAME_SCROLL_END"] = "scroll-end"; /** * Ping the editor to see if the page is inside the editor */ DotCMSUVEAction["PING_EDITOR"] = "ping-editor"; /** * Tell the editor to init the inline editing editor. */ DotCMSUVEAction["INIT_INLINE_EDITING"] = "init-inline-editing"; /** * Tell the editor to open the Copy-contentlet dialog * To copy a content and then edit it inline. */ DotCMSUVEAction["COPY_CONTENTLET_INLINE_EDITING"] = "copy-contentlet-inline-editing"; /** * Tell the editor to save inline edited contentlet */ DotCMSUVEAction["UPDATE_CONTENTLET_INLINE_EDITING"] = "update-contentlet-inline-editing"; /** * Tell the editor to trigger a menu reorder */ DotCMSUVEAction["REORDER_MENU"] = "reorder-menu"; /** * Tell the editor to send the page info to iframe */ DotCMSUVEAction["GET_PAGE_DATA"] = "get-page-data"; /** * Tell the editor an user send a graphql query */ DotCMSUVEAction["CLIENT_READY"] = "client-ready"; /** * Tell the editor to edit a contentlet */ DotCMSUVEAction["EDIT_CONTENTLET"] = "edit-contentlet"; /** * Tell the editor to do nothing */ DotCMSUVEAction["NOOP"] = "noop"; })(DotCMSUVEAction || (DotCMSUVEAction = {})); /** * Available events in the Universal Visual Editor * @enum {string} */ var UVEEventType; (function (UVEEventType) { /** * Triggered when page data changes from the editor */ UVEEventType["CONTENT_CHANGES"] = "changes"; /** * Triggered when the page needs to be reloaded */ UVEEventType["PAGE_RELOAD"] = "page-reload"; /** * Triggered when the editor requests container bounds */ UVEEventType["REQUEST_BOUNDS"] = "request-bounds"; /** * Triggered when scroll action is needed inside the iframe */ UVEEventType["IFRAME_SCROLL"] = "iframe-scroll"; /** * Triggered when a contentlet is hovered */ UVEEventType["CONTENTLET_HOVERED"] = "contentlet-hovered"; })(UVEEventType || (UVEEventType = {})); export { DEVELOPMENT_MODE, DotCMSUVEAction, PRODUCTION_MODE, UVEEventType, UVE_MODE };