@dotcms/react 0.0.1-beta.23 → 0.0.1-beta.25

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/README.md CHANGED
@@ -201,7 +201,7 @@ A custom hook that handles the communication with the Universal View Editor (UVE
201
201
  import { useEffect, useState } from 'react';
202
202
 
203
203
  import { getUVEState, sendMessageToEditor, createUVESubscription} from '@dotcms/uve';
204
- import { DotCMSUVEAction, UVEEventType} from '@dotcms/uve/types';
204
+ import { DotCMSUVEAction, UVEEventType} from '@dotcms/types';
205
205
 
206
206
  export const usePageAsset = (currentPageAsset) => {
207
207
  const [pageAsset, setPageAsset] = useState(null);
package/index.esm.js CHANGED
@@ -2,8 +2,8 @@ import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
2
2
  import { s as styleInject, a as anObject$6, f as functionCall, h as hasOwnProperty_1, o as objectIsPrototypeOf, b as functionName, d as defineBuiltIn$6, c as fails$3, t as toString$4, e as functionUncurryThis, r as requireObjectCoercible$1, g as toIntegerOrInfinity$1, i as iteratorDefine, j as internalState, k as createIterResultObject$2, w as wellKnownSymbol$4, l as descriptors, m as classofRaw$1, n as aCallable$2, p as functionBindNative, q as makeBuiltInExports, u as objectDefineProperty, v as getMethod$2, x as iterators, y as getBuiltIn$1, z as isCallable$2, A as classof$3, B as inspectSource$1, C as createPropertyDescriptor$2, D as isNullOrUndefined$1, E as tryToString$1, F as toObject$1, G as lengthOfArrayLike$1, H as global$3, I as arraySlice$2, _ as _export, J as setToStringTag$2, K as iteratorCreateConstructor, L as isObject$1, M as objectCreate, N as objectAssign } from './es.json.stringify.esm.js';
3
3
  import { useState, useEffect, createContext, useRef, useContext, createElement, forwardRef } from 'react';
4
4
  import { isInsideEditor, initEditor, updateNavigation, destroyEditor, postMessageToEditor, CLIENT_ACTIONS, DotCmsClient, NOTIFY_CLIENT, initInlineEditing } from '@dotcms/client';
5
+ import { UVEEventType } from '@dotcms/types';
5
6
  import { createUVESubscription } from '@dotcms/uve';
6
- import { UVEEventType } from '@dotcms/uve/types';
7
7
  import { Editor } from '@tinymce/tinymce-react';
8
8
 
9
9
  var isPure = false;
package/next.esm.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { createContext, useContext, useState, useEffect, useLayoutEffect, useRef, useMemo } from 'react';
3
3
  import { s as styleInject } from './es.json.stringify.esm.js';
4
+ import { UVE_MODE, UVEEventType } from '@dotcms/types';
4
5
  import { getUVEState, initUVE, createUVESubscription } from '@dotcms/uve';
5
6
  import { DEVELOPMENT_MODE, EMPTY_CONTAINER_STYLE_REACT, getDotContentletAttributes, CUSTOM_NO_COMPONENT, getContainersData, getContentletsInContainer, getDotContainerAttributes, getColumnPositionClasses, combineClasses } from '@dotcms/uve/internal';
6
- import { UVE_MODE, UVEEventType } from '@dotcms/uve/types';
7
7
  import { updateNavigation } from '@dotcms/client';
8
8
 
9
9
  /**
@@ -214,7 +214,7 @@ function FallbackComponent({
214
214
  *
215
215
  * Component to render when there is no component for the content type.
216
216
  *
217
- * @param {DotCMSContentlet} contentType - The content type that couldn't be rendered
217
+ * @param {DotCMSBasicContentlet} contentType - The content type that couldn't be rendered
218
218
  * @return {*}
219
219
  */
220
220
  function NoComponent({
package/package.json CHANGED
@@ -1,12 +1,15 @@
1
1
  {
2
2
  "name": "@dotcms/react",
3
- "version": "0.0.1-beta.23",
3
+ "version": "0.0.1-beta.25",
4
4
  "peerDependencies": {
5
5
  "react": ">=18",
6
6
  "react-dom": ">=18",
7
- "@dotcms/client": "0.0.1-beta.23",
8
- "@dotcms/uve": "0.0.1-beta.23",
9
- "@tinymce/tinymce-react": "^5.1.1"
7
+ "@dotcms/client": "0.0.1-beta.25",
8
+ "@dotcms/uve": "0.0.1-beta.25",
9
+ "@tinymce/tinymce-react": "^6.0.0"
10
+ },
11
+ "devDependencies": {
12
+ "@dotcms/types": "next"
10
13
  },
11
14
  "description": "Official React Components library to render a dotCMS page.",
12
15
  "repository": {
@@ -1,4 +1,4 @@
1
- import { DotCMSColumnContainer, DotCMSPageAsset, DotPageAssetLayoutColumn } from '@dotcms/uve/types';
1
+ import { DotCMSColumnContainer, DotCMSPageAsset, DotPageAssetLayoutColumn } from '@dotcms/types';
2
2
  export declare const MOCK_COLUMN: DotPageAssetLayoutColumn;
3
3
  export declare const MOCK_CONTAINER: DotCMSColumnContainer;
4
4
  export declare const MOCK_PAGE_ASSET: DotCMSPageAsset;
@@ -1,4 +1,4 @@
1
- import { DotPageAssetLayoutColumn } from '@dotcms/uve/types';
1
+ import { DotPageAssetLayoutColumn } from '@dotcms/types';
2
2
  /**
3
3
  * @internal
4
4
  *
@@ -1,4 +1,4 @@
1
- import { DotCMSColumnContainer } from '@dotcms/uve/types';
1
+ import { DotCMSColumnContainer } from '@dotcms/types';
2
2
  /**
3
3
  * @internal
4
4
  *
@@ -1,4 +1,4 @@
1
- import { DotContainerAttributes } from '@dotcms/uve/types';
1
+ import { DotContainerAttributes } from '@dotcms/types/internal';
2
2
  /**
3
3
  * @internal
4
4
  *
@@ -1,4 +1,4 @@
1
- import { DotCMSContentlet } from '@dotcms/uve/types';
1
+ import { DotCMSBasicContentlet } from '@dotcms/types';
2
2
  /**
3
3
  * @internal
4
4
  *
@@ -8,7 +8,7 @@ import { DotCMSContentlet } from '@dotcms/uve/types';
8
8
  * @property {string} container - The container identifier where the contentlet is placed
9
9
  */
10
10
  interface DotCMSContentletRendererProps {
11
- contentlet: DotCMSContentlet;
11
+ contentlet: DotCMSBasicContentlet;
12
12
  container: string;
13
13
  }
14
14
  /**
@@ -1,8 +1,10 @@
1
1
  /// <reference types="react" />
2
- import { DotCMSContentlet, DotCMSPageAsset, DotCMSPageRendererMode } from '@dotcms/uve/types';
3
- interface DotCMSLayoutBodyProps {
2
+ import { DotCMSBasicContentlet, DotCMSPageAsset, DotCMSPageRendererMode } from '@dotcms/types';
3
+ interface DotCMSLayoutBodyProps<TContentlet extends DotCMSBasicContentlet = DotCMSBasicContentlet> {
4
4
  page: DotCMSPageAsset;
5
- components: Record<string, React.ComponentType<DotCMSContentlet>>;
5
+ components: {
6
+ [key: string]: React.ComponentType<TContentlet> | React.ComponentType<any>;
7
+ };
6
8
  mode?: DotCMSPageRendererMode;
7
9
  }
8
10
  /**
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { UVE_MODE } from '@dotcms/uve/types';
2
+ import { UVE_MODE } from '@dotcms/types';
3
3
  /**
4
4
  * Props for the DotCMSShow component.
5
5
  *
@@ -1,22 +1,22 @@
1
1
  /// <reference types="react" />
2
- import { DotCMSContentlet } from '@dotcms/uve/types';
2
+ import { DotCMSBasicContentlet } from '@dotcms/types';
3
3
  /**
4
4
  * @internal
5
5
  *
6
6
  * Type definition for components that can be used as fallback when no matching component is found
7
7
  */
8
- export type NoComponentType = React.ComponentType<DotCMSContentlet>;
8
+ export type NoComponentType = React.ComponentType<DotCMSBasicContentlet>;
9
9
  /**
10
10
  * @internal
11
11
  *
12
12
  * Props for the FallbackComponent
13
13
  * @interface DotCMSFallbackComponentProps
14
- * @property {React.ComponentType<DotCMSContentlet>} [UserNoComponent] - Optional custom component to render when no matching component is found
15
- * @property {DotCMSContentlet} [contentlet] - The contentlet that couldn't be rendered
14
+ * @property {React.ComponentType<DotCMSBasicContentlet>} [UserNoComponent] - Optional custom component to render when no matching component is found
15
+ * @property {DotCMSBasicContentlet} [contentlet] - The contentlet that couldn't be rendered
16
16
  */
17
17
  interface DotCMSFallbackComponentProps {
18
- contentlet: DotCMSContentlet;
19
- UserNoComponent?: React.ComponentType<DotCMSContentlet>;
18
+ contentlet: DotCMSBasicContentlet;
19
+ UserNoComponent?: React.ComponentType<DotCMSBasicContentlet>;
20
20
  }
21
21
  /**
22
22
  * @internal
@@ -1,4 +1,4 @@
1
- import { DotPageAssetLayoutRow } from '@dotcms/uve/types';
1
+ import { DotPageAssetLayoutRow } from '@dotcms/types';
2
2
  /**
3
3
  * @internal
4
4
  *
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { DotCMSContentlet, DotCMSPageAsset, DotCMSPageRendererMode } from '@dotcms/uve/types';
2
+ import { DotCMSBasicContentlet, DotCMSPageAsset, DotCMSPageRendererMode } from '@dotcms/types';
3
3
  /**
4
4
  * @internal
5
5
  *
@@ -12,7 +12,7 @@ import { DotCMSContentlet, DotCMSPageAsset, DotCMSPageRendererMode } from '@dotc
12
12
  export interface DotCMSPageContextProps {
13
13
  pageAsset: DotCMSPageAsset;
14
14
  mode: DotCMSPageRendererMode;
15
- userComponents: Record<string, React.ComponentType<DotCMSContentlet>>;
15
+ userComponents: Record<string, React.ComponentType<DotCMSBasicContentlet>>;
16
16
  }
17
17
  /**
18
18
  * The `PageContext` is a React context that provides access to the DotCMS page context.
@@ -1,4 +1,4 @@
1
- import { UVE_MODE } from '@dotcms/uve/types';
1
+ import { UVE_MODE } from '@dotcms/types';
2
2
  /**
3
3
  * Custom hook to determine if the current UVE (Universal Visual Editor) mode
4
4
  * matches the specified mode. This hook is useful for conditionally rendering
@@ -1,4 +1,4 @@
1
- import { DotCMSEditablePage } from '@dotcms/uve/types';
1
+ import { DotCMSEditablePage } from '@dotcms/types';
2
2
  /**
3
3
  * Custom hook to manage the editable state of a DotCMS page.
4
4
  *