@dotcms/uve 1.4.0-next.1 → 1.4.0-next.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.cjs.js CHANGED
@@ -623,6 +623,7 @@ function registerStyleEditorSchemas(schemas) {
623
623
  });
624
624
  }
625
625
 
626
+ exports.createContentlet = _public.createContentlet;
626
627
  exports.createUVESubscription = _public.createUVESubscription;
627
628
  exports.editContentlet = _public.editContentlet;
628
629
  exports.enableBlockEditorInline = _public.enableBlockEditorInline;
package/index.esm.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { g as getUVEState, s as sendMessageToUVE } from './public.esm.js';
2
- export { c as createUVESubscription, e as editContentlet, a as enableBlockEditorInline, i as initInlineEditing, b as initUVE, r as reorderMenu, u as updateNavigation } from './public.esm.js';
2
+ export { c as createContentlet, a as createUVESubscription, e as editContentlet, b as enableBlockEditorInline, i as initInlineEditing, d as initUVE, r as reorderMenu, u as updateNavigation } from './public.esm.js';
3
3
  import { UVE_MODE, DotCMSUVEAction } from '@dotcms/types';
4
4
  import '@dotcms/types/internal';
5
5
 
package/internal.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- export { C as CUSTOM_NO_COMPONENT, D as DEVELOPMENT_MODE, E as EMPTY_CONTAINER_STYLE_ANGULAR, d as EMPTY_CONTAINER_STYLE_REACT, f as END_CLASS, P as PRODUCTION_MODE, S as START_CLASS, _ as __UVE_EVENTS__, h as __UVE_EVENT_ERROR_FALLBACK__, j as combineClasses, k as computeScrollIsInBottom, c as createUVESubscription, l as findDotCMSElement, m as findDotCMSVTLData, n as getClosestDotCMSContainerData, o as getColumnPositionClasses, p as getContainersData, q as getContentletsInContainer, t as getDotCMSContainerData, v as getDotCMSContentletsBound, w as getDotCMSPageBounds, x as getDotContainerAttributes, y as getDotContentletAttributes, g as getUVEState, z as isValidBlocks, A as setBounds } from './public.esm.js';
1
+ export { C as CUSTOM_NO_COMPONENT, D as DEVELOPMENT_MODE, E as EMPTY_CONTAINER_STYLE_ANGULAR, f as EMPTY_CONTAINER_STYLE_REACT, h as END_CLASS, P as PRODUCTION_MODE, S as START_CLASS, _ as __UVE_EVENTS__, j as __UVE_EVENT_ERROR_FALLBACK__, k as combineClasses, l as computeScrollIsInBottom, a as createUVESubscription, m as findDotCMSElement, n as findDotCMSVTLData, o as getClosestDotCMSContainerData, p as getColumnPositionClasses, q as getContainersData, t as getContentletsInContainer, v as getDotCMSContainerData, w as getDotCMSContentletsBound, x as getDotCMSPageBounds, y as getDotContainerAttributes, z as getDotContentletAttributes, g as getUVEState, A as isValidBlocks, B as setBounds } from './public.esm.js';
2
2
  import '@dotcms/types';
3
3
  import '@dotcms/types/internal';
4
4
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dotcms/uve",
3
- "version": "1.4.0-next.1",
3
+ "version": "1.4.0-next.2",
4
4
  "description": "Official JavaScript library for interacting with Universal Visual Editor (UVE)",
5
5
  "repository": {
6
6
  "type": "git",
package/public.cjs.js CHANGED
@@ -1066,6 +1066,29 @@ function enableBlockEditorInline(contentlet, fieldName) {
1066
1066
  };
1067
1067
  initInlineEditing('BLOCK_EDITOR', data);
1068
1068
  }
1069
+ /**
1070
+ * Opens the contentlet creation panel for the given content type without adding it to the page.
1071
+ *
1072
+ * This function is intended for use cases where you want to create a contentlet in the system
1073
+ * (e.g., for widgets that auto-pull content) without dropping it onto the current page layout.
1074
+ *
1075
+ * @export
1076
+ * @param {string} contentType - The content type variable or structure inode to create a contentlet for.
1077
+ *
1078
+ * @example
1079
+ * ```js
1080
+ * // Opens the creation panel for the 'Event' content type
1081
+ * createContentlet('Event');
1082
+ * ```
1083
+ */
1084
+ function createContentlet(contentType) {
1085
+ sendMessageToUVE({
1086
+ action: types.DotCMSUVEAction.CREATE_CONTENTLET,
1087
+ payload: {
1088
+ contentType
1089
+ }
1090
+ });
1091
+ }
1069
1092
  /**
1070
1093
  * Initializes the Universal Visual Editor (UVE) with required handlers and event listeners.
1071
1094
  *
@@ -1119,6 +1142,7 @@ exports.__UVE_EVENTS__ = __UVE_EVENTS__;
1119
1142
  exports.__UVE_EVENT_ERROR_FALLBACK__ = __UVE_EVENT_ERROR_FALLBACK__;
1120
1143
  exports.combineClasses = combineClasses;
1121
1144
  exports.computeScrollIsInBottom = computeScrollIsInBottom;
1145
+ exports.createContentlet = createContentlet;
1122
1146
  exports.createUVESubscription = createUVESubscription;
1123
1147
  exports.editContentlet = editContentlet;
1124
1148
  exports.enableBlockEditorInline = enableBlockEditorInline;
package/public.esm.js CHANGED
@@ -1064,6 +1064,29 @@ function enableBlockEditorInline(contentlet, fieldName) {
1064
1064
  };
1065
1065
  initInlineEditing('BLOCK_EDITOR', data);
1066
1066
  }
1067
+ /**
1068
+ * Opens the contentlet creation panel for the given content type without adding it to the page.
1069
+ *
1070
+ * This function is intended for use cases where you want to create a contentlet in the system
1071
+ * (e.g., for widgets that auto-pull content) without dropping it onto the current page layout.
1072
+ *
1073
+ * @export
1074
+ * @param {string} contentType - The content type variable or structure inode to create a contentlet for.
1075
+ *
1076
+ * @example
1077
+ * ```js
1078
+ * // Opens the creation panel for the 'Event' content type
1079
+ * createContentlet('Event');
1080
+ * ```
1081
+ */
1082
+ function createContentlet(contentType) {
1083
+ sendMessageToUVE({
1084
+ action: DotCMSUVEAction.CREATE_CONTENTLET,
1085
+ payload: {
1086
+ contentType
1087
+ }
1088
+ });
1089
+ }
1067
1090
  /**
1068
1091
  * Initializes the Universal Visual Editor (UVE) with required handlers and event listeners.
1069
1092
  *
@@ -1106,4 +1129,4 @@ function initUVE(config = {}) {
1106
1129
  };
1107
1130
  }
1108
1131
 
1109
- export { setBounds as A, CUSTOM_NO_COMPONENT as C, DEVELOPMENT_MODE as D, EMPTY_CONTAINER_STYLE_ANGULAR as E, PRODUCTION_MODE as P, START_CLASS as S, __UVE_EVENTS__ as _, enableBlockEditorInline as a, initUVE as b, createUVESubscription as c, EMPTY_CONTAINER_STYLE_REACT as d, editContentlet as e, END_CLASS as f, getUVEState as g, __UVE_EVENT_ERROR_FALLBACK__ as h, initInlineEditing as i, combineClasses as j, computeScrollIsInBottom as k, findDotCMSElement as l, findDotCMSVTLData as m, getClosestDotCMSContainerData as n, getColumnPositionClasses as o, getContainersData as p, getContentletsInContainer as q, reorderMenu as r, sendMessageToUVE as s, getDotCMSContainerData as t, updateNavigation as u, getDotCMSContentletsBound as v, getDotCMSPageBounds as w, getDotContainerAttributes as x, getDotContentletAttributes as y, isValidBlocks as z };
1132
+ export { isValidBlocks as A, setBounds as B, CUSTOM_NO_COMPONENT as C, DEVELOPMENT_MODE as D, EMPTY_CONTAINER_STYLE_ANGULAR as E, PRODUCTION_MODE as P, START_CLASS as S, __UVE_EVENTS__ as _, createUVESubscription as a, enableBlockEditorInline as b, createContentlet as c, initUVE as d, editContentlet as e, EMPTY_CONTAINER_STYLE_REACT as f, getUVEState as g, END_CLASS as h, initInlineEditing as i, __UVE_EVENT_ERROR_FALLBACK__ as j, combineClasses as k, computeScrollIsInBottom as l, findDotCMSElement as m, findDotCMSVTLData as n, getClosestDotCMSContainerData as o, getColumnPositionClasses as p, getContainersData as q, reorderMenu as r, sendMessageToUVE as s, getContentletsInContainer as t, updateNavigation as u, getDotCMSContainerData as v, getDotCMSContentletsBound as w, getDotCMSPageBounds as x, getDotContainerAttributes as y, getDotContentletAttributes as z };
@@ -60,6 +60,22 @@ export declare function initInlineEditing(type: DotCMSInlineEditingType, data?:
60
60
  * @return {*} {void}
61
61
  */
62
62
  export declare function enableBlockEditorInline<T extends DotCMSBasicContentlet>(contentlet: T extends DotCMSBasicContentlet ? T : never, fieldName: keyof T): void;
63
+ /**
64
+ * Opens the contentlet creation panel for the given content type without adding it to the page.
65
+ *
66
+ * This function is intended for use cases where you want to create a contentlet in the system
67
+ * (e.g., for widgets that auto-pull content) without dropping it onto the current page layout.
68
+ *
69
+ * @export
70
+ * @param {string} contentType - The content type variable or structure inode to create a contentlet for.
71
+ *
72
+ * @example
73
+ * ```js
74
+ * // Opens the creation panel for the 'Event' content type
75
+ * createContentlet('Event');
76
+ * ```
77
+ */
78
+ export declare function createContentlet(contentType: string): void;
63
79
  /**
64
80
  * Initializes the Universal Visual Editor (UVE) with required handlers and event listeners.
65
81
  *