@dotcms/types
Version:
📦 [@dotcms/types on npm](https://www.npmjs.com/package/@dotcms/types) 🛠️ [View source on GitHub](https://github.com/dotCMS/core/tree/main/core-web/libs/sdk/types)
127 lines (124 loc) • 3.62 kB
JavaScript
'use strict';
/**
* 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
*/
exports.UVE_MODE = void 0;
(function (UVE_MODE) {
UVE_MODE["EDIT"] = "EDIT_MODE";
UVE_MODE["PREVIEW"] = "PREVIEW_MODE";
UVE_MODE["LIVE"] = "LIVE";
UVE_MODE["UNKNOWN"] = "UNKNOWN";
})(exports.UVE_MODE || (exports.UVE_MODE = {}));
/**
* Actions send to the dotcms editor
*
* @export
* @enum {number}
*/
exports.DotCMSUVEAction = void 0;
(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";
})(exports.DotCMSUVEAction || (exports.DotCMSUVEAction = {}));
/**
* Available events in the Universal Visual Editor
* @enum {string}
*/
exports.UVEEventType = void 0;
(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";
})(exports.UVEEventType || (exports.UVEEventType = {}));
exports.DEVELOPMENT_MODE = DEVELOPMENT_MODE;
exports.PRODUCTION_MODE = PRODUCTION_MODE;