From ad574c9815400d4afabfe5e7d03d5b46bcb89989 Mon Sep 17 00:00:00 2001 From: Kevin Davila <56242609+kevindaviladev@users.noreply.github.com> Date: Wed, 23 Apr 2025 01:11:04 -0500 Subject: [PATCH 01/15] WIP - Project created and configured. Pending define main export --- core-web/.verdaccio/config.yml | 28 + core-web/libs/sdk/types/.eslintrc.json | 25 + core-web/libs/sdk/types/README.md | 11 + core-web/libs/sdk/types/jest.config.ts | 11 + core-web/libs/sdk/types/package.json | 27 + core-web/libs/sdk/types/project.json | 51 + core-web/libs/sdk/types/src/__internal__.ts | 6 + core-web/libs/sdk/types/src/components.ts | 1 + core-web/libs/sdk/types/src/editor.ts | 1 + core-web/libs/sdk/types/src/events.ts | 1 + core-web/libs/sdk/types/src/index.ts | 1 + .../block-editor-renderer/internal.ts | 47 + .../block-editor-renderer/public.ts | 41 + .../libs/sdk/types/src/lib/editor/internal.ts | 129 ++ .../libs/sdk/types/src/lib/editor/public.ts | 253 ++++ .../libs/sdk/types/src/lib/events/internal.ts | 34 + .../libs/sdk/types/src/lib/events/public.ts | 19 + .../libs/sdk/types/src/lib/page/public.ts | 443 ++++++ core-web/libs/sdk/types/src/page.ts | 1 + core-web/libs/sdk/types/tsconfig.json | 22 + core-web/libs/sdk/types/tsconfig.lib.json | 10 + core-web/libs/sdk/types/tsconfig.spec.json | 9 + core-web/nx.json | 7 +- core-web/package.json | 2 + core-web/project.json | 12 +- core-web/tsconfig.base.json | 1 + core-web/yarn.lock | 1221 ++++++++++++++++- 27 files changed, 2347 insertions(+), 67 deletions(-) create mode 100644 core-web/.verdaccio/config.yml create mode 100644 core-web/libs/sdk/types/.eslintrc.json create mode 100644 core-web/libs/sdk/types/README.md create mode 100644 core-web/libs/sdk/types/jest.config.ts create mode 100644 core-web/libs/sdk/types/package.json create mode 100644 core-web/libs/sdk/types/project.json create mode 100644 core-web/libs/sdk/types/src/__internal__.ts create mode 100644 core-web/libs/sdk/types/src/components.ts create mode 100644 core-web/libs/sdk/types/src/editor.ts create mode 100644 core-web/libs/sdk/types/src/events.ts create mode 100644 core-web/libs/sdk/types/src/index.ts create mode 100644 core-web/libs/sdk/types/src/lib/components/block-editor-renderer/internal.ts create mode 100644 core-web/libs/sdk/types/src/lib/components/block-editor-renderer/public.ts create mode 100644 core-web/libs/sdk/types/src/lib/editor/internal.ts create mode 100644 core-web/libs/sdk/types/src/lib/editor/public.ts create mode 100644 core-web/libs/sdk/types/src/lib/events/internal.ts create mode 100644 core-web/libs/sdk/types/src/lib/events/public.ts create mode 100644 core-web/libs/sdk/types/src/lib/page/public.ts create mode 100644 core-web/libs/sdk/types/src/page.ts create mode 100644 core-web/libs/sdk/types/tsconfig.json create mode 100644 core-web/libs/sdk/types/tsconfig.lib.json create mode 100644 core-web/libs/sdk/types/tsconfig.spec.json diff --git a/core-web/.verdaccio/config.yml b/core-web/.verdaccio/config.yml new file mode 100644 index 000000000000..820b37ce0779 --- /dev/null +++ b/core-web/.verdaccio/config.yml @@ -0,0 +1,28 @@ +# path to a directory with all packages +storage: ../tmp/local-registry/storage + +# a list of other known repositories we can talk to +uplinks: + npmjs: + url: https://dotcms-npm.b-cdn.net/ + maxage: 60m + +packages: + '**': + # give all users (including non-authenticated users) full access + # because it is a local registry + access: $all + publish: $all + unpublish: $all + + # if package is not available locally, proxy requests to npm registry + proxy: npmjs + +# log settings +logs: + type: stdout + format: pretty + level: warn + +publish: + allow_offline: true # set offline to true to allow publish offline diff --git a/core-web/libs/sdk/types/.eslintrc.json b/core-web/libs/sdk/types/.eslintrc.json new file mode 100644 index 000000000000..4cfe38bd218c --- /dev/null +++ b/core-web/libs/sdk/types/.eslintrc.json @@ -0,0 +1,25 @@ +{ + "extends": ["../../../.eslintrc.base.json"], + "ignorePatterns": ["!**/*"], + "overrides": [ + { + "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], + "rules": {} + }, + { + "files": ["*.ts", "*.tsx"], + "rules": {} + }, + { + "files": ["*.js", "*.jsx"], + "rules": {} + }, + { + "files": ["*.json"], + "parser": "jsonc-eslint-parser", + "rules": { + "@nx/dependency-checks": "error" + } + } + ] +} diff --git a/core-web/libs/sdk/types/README.md b/core-web/libs/sdk/types/README.md new file mode 100644 index 000000000000..d7bfd55557af --- /dev/null +++ b/core-web/libs/sdk/types/README.md @@ -0,0 +1,11 @@ +# types + +This library was generated with [Nx](https://nx.dev). + +## Building + +Run `nx build types` to build the library. + +## Running unit tests + +Run `nx test types` to execute the unit tests via [Jest](https://jestjs.io). diff --git a/core-web/libs/sdk/types/jest.config.ts b/core-web/libs/sdk/types/jest.config.ts new file mode 100644 index 000000000000..170637190ce1 --- /dev/null +++ b/core-web/libs/sdk/types/jest.config.ts @@ -0,0 +1,11 @@ +/* eslint-disable */ +export default { + displayName: '@dotcms/types', + preset: '../../../jest.preset.js', + testEnvironment: 'node', + transform: { + '^.+\\.[tj]s$': ['ts-jest', { tsconfig: '/tsconfig.spec.json' }] + }, + moduleFileExtensions: ['ts', 'js', 'html'], + coverageDirectory: '../../../coverage/libs/sdk/types' +}; diff --git a/core-web/libs/sdk/types/package.json b/core-web/libs/sdk/types/package.json new file mode 100644 index 000000000000..b9c10ad114eb --- /dev/null +++ b/core-web/libs/sdk/types/package.json @@ -0,0 +1,27 @@ +{ + "name": "@dotcms/types", + "version": "0.0.1", + "dependencies": {}, + "type": "commonjs", + "main": "./src/index.js", + "typings": "./src/index.d.ts", + "exports": { + "./package.json": "./package.json", + "./types/editor": "./src/editor.ts", + "./types/events": "./src/events.ts", + "./types/page": "./src/page.ts", + "./types/components": "./src/components.ts", + "./types/__internal__": "./src/__internal__.ts" + }, + "typesVersions": { + "*": { + ".": ["./src/index.d.ts"], + "types": ["./src/types.d.ts"], + "editor": ["./src/editor.d.ts"], + "events": ["./src/events.d.ts"], + "page": ["./src/page.d.ts"], + "components": ["./src/components.d.ts"], + "__internal__": ["./src/__internal__.d.ts"] + } + } +} diff --git a/core-web/libs/sdk/types/project.json b/core-web/libs/sdk/types/project.json new file mode 100644 index 000000000000..5f14f92997bf --- /dev/null +++ b/core-web/libs/sdk/types/project.json @@ -0,0 +1,51 @@ +{ + "name": "sdk-types", + "$schema": "../../../node_modules/nx/schemas/project-schema.json", + "sourceRoot": "libs/sdk/types/src", + "projectType": "library", + "release": { + "version": { + "generatorOptions": { + "packageRoot": "dist/{projectRoot}", + "currentVersionResolver": "git-tag" + } + } + }, + "tags": [], + "targets": { + "build": { + "executor": "@nx/rollup:rollup", + "outputs": ["{options.outputPath}"], + "options": { + "outputPath": "dist/libs/sdk/types", + "main": "libs/sdk/types/src/index.ts", + "additionalEntryPoints": [ + "libs/sdk/types/src/editor.ts", + "libs/sdk/types/src/events.ts", + "libs/sdk/types/src/page.ts", + "libs/sdk/types/src/components.ts", + "libs/sdk/types/src/__internal__.ts" + ], + "generateExportsField": true, + "tsConfig": "libs/sdk/types/tsconfig.lib.json", + "project": "libs/sdk/types/package.json", + "compiler": "babel", + "format": ["esm", "cjs"], + "extractCss": false, + "assets": [{ "input": "libs/sdk/types", "output": ".", "glob": "*.md" }] + } + }, + "nx-release-publish": { + "options": { + "packageRoot": "dist/{projectRoot}" + } + }, + "test": { + "executor": "@nx/jest:jest", + "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], + "options": { + "jestConfig": "libs/sdk/types/jest.config.ts" + } + } + } +} diff --git a/core-web/libs/sdk/types/src/__internal__.ts b/core-web/libs/sdk/types/src/__internal__.ts new file mode 100644 index 000000000000..dbfc0dd76216 --- /dev/null +++ b/core-web/libs/sdk/types/src/__internal__.ts @@ -0,0 +1,6 @@ +// Block Editor Renderer +export * from './lib/components/block-editor-renderer/internal'; +// Events +export * from './lib/events/internal'; +// Editor +export * from './lib/editor/internal'; diff --git a/core-web/libs/sdk/types/src/components.ts b/core-web/libs/sdk/types/src/components.ts new file mode 100644 index 000000000000..02446b5d81f7 --- /dev/null +++ b/core-web/libs/sdk/types/src/components.ts @@ -0,0 +1 @@ +export * from './lib/components/block-editor-renderer/public'; diff --git a/core-web/libs/sdk/types/src/editor.ts b/core-web/libs/sdk/types/src/editor.ts new file mode 100644 index 000000000000..d0cb79727d0d --- /dev/null +++ b/core-web/libs/sdk/types/src/editor.ts @@ -0,0 +1 @@ +export * from './lib/editor/public'; diff --git a/core-web/libs/sdk/types/src/events.ts b/core-web/libs/sdk/types/src/events.ts new file mode 100644 index 000000000000..2bb96dc49dff --- /dev/null +++ b/core-web/libs/sdk/types/src/events.ts @@ -0,0 +1 @@ +export * from './lib/events/public'; diff --git a/core-web/libs/sdk/types/src/index.ts b/core-web/libs/sdk/types/src/index.ts new file mode 100644 index 000000000000..cb0ff5c3b541 --- /dev/null +++ b/core-web/libs/sdk/types/src/index.ts @@ -0,0 +1 @@ +export {}; diff --git a/core-web/libs/sdk/types/src/lib/components/block-editor-renderer/internal.ts b/core-web/libs/sdk/types/src/lib/components/block-editor-renderer/internal.ts new file mode 100644 index 000000000000..6eb792fa8349 --- /dev/null +++ b/core-web/libs/sdk/types/src/lib/components/block-editor-renderer/internal.ts @@ -0,0 +1,47 @@ +/** + * Enum representing the different types of blocks available in the Block Editor + * + * @export + * @enum {string} + */ +export enum Blocks { + /** Represents a paragraph block */ + PARAGRAPH = 'paragraph', + /** Represents a heading block */ + HEADING = 'heading', + /** Represents a text block */ + TEXT = 'text', + /** Represents a bullet/unordered list block */ + BULLET_LIST = 'bulletList', + /** Represents an ordered/numbered list block */ + ORDERED_LIST = 'orderedList', + /** Represents a list item within a list block */ + LIST_ITEM = 'listItem', + /** Represents a blockquote block */ + BLOCK_QUOTE = 'blockquote', + /** Represents a code block */ + CODE_BLOCK = 'codeBlock', + /** Represents a hard break (line break) */ + HARDBREAK = 'hardBreak', + /** Represents a horizontal rule/divider */ + HORIZONTAL_RULE = 'horizontalRule', + /** Represents a DotCMS image block */ + DOT_IMAGE = 'dotImage', + /** Represents a DotCMS video block */ + DOT_VIDEO = 'dotVideo', + /** Represents a table block */ + TABLE = 'table', + /** Represents a DotCMS content block */ + DOT_CONTENT = 'dotContent' +} + +/** + * Represents the validation state of a Block Editor instance + * + * @interface BlockEditorState + * @property {boolean} isValid - Whether the blocks structure is valid + * @property {string | null} error - Error message if blocks are invalid, null otherwise + */ +export interface BlockEditorState { + error: string | null; +} diff --git a/core-web/libs/sdk/types/src/lib/components/block-editor-renderer/public.ts b/core-web/libs/sdk/types/src/lib/components/block-editor-renderer/public.ts new file mode 100644 index 000000000000..e945dd233fbe --- /dev/null +++ b/core-web/libs/sdk/types/src/lib/components/block-editor-renderer/public.ts @@ -0,0 +1,41 @@ +/** + * Represents a Mark used by text content in the Block Editor + * + * @export + * @interface Mark + */ +export interface Mark { + type: string; + attrs: Record; +} + +/** + * Represents a Content Node used by the Block Editor + * + * @export + * @interface ContentNode + */ +export interface ContentNode { + /** The type of content node */ + type: string; + /** Child content nodes */ + content?: ContentNode[]; + /** Optional attributes for the node */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any + attrs?: Record; + /** Optional marks applied to text content */ + marks?: Mark[]; + /** Optional text content */ + text?: string; +} + +/** + * Represents a Block in the Block Editor + * + * @export + * @interface Block + */ +export interface Block { + content?: ContentNode[]; + type: string; +} diff --git a/core-web/libs/sdk/types/src/lib/editor/internal.ts b/core-web/libs/sdk/types/src/lib/editor/internal.ts new file mode 100644 index 000000000000..ccc77fc8fd9b --- /dev/null +++ b/core-web/libs/sdk/types/src/lib/editor/internal.ts @@ -0,0 +1,129 @@ +import { DotCMSUVEAction } from './public'; + +/** + * @description Custom client parameters for fetching data. + */ +export type DotCMSCustomerParams = { + depth: string; +}; + +/** + * Configuration for reordering a menu. + */ +export interface DotCMSReorderMenuConfig { + /** + * The starting level of the menu to be reordered. + */ + startLevel: number; + + /** + * The depth of the menu levels to be reordered. + */ + depth: number; +} + +declare global { + interface Window { + dotCMSUVE: DotCMSUVE; + } +} + +/** + * Post message props + * + * @export + * @template T + * @interface DotCMSUVEMessage + */ +export type DotCMSUVEMessage = { + action: DotCMSUVEAction; + payload?: T; +}; + +// eslint-disable-next-line @typescript-eslint/no-explicit-any +type DotCMSUVEFunction = (...args: any[]) => void; + +export interface DotCMSUVE { + editContentlet: DotCMSUVEFunction; + initInlineEditing: DotCMSUVEFunction; + reorderMenu: DotCMSUVEFunction; + lastScrollYPosition: number; +} + +/** + * Main fields of a Contentlet (Inherited from the Content Type). + */ +export interface ContentTypeMainFields { + hostName: string; + modDate: string; + publishDate: string; + title: string; + baseType: string; + inode: string; + archived: boolean; + ownerName: string; + host: string; + working: boolean; + locked: boolean; + stInode: string; + contentType: string; + live: boolean; + owner: string; + identifier: string; + publishUserName: string; + publishUser: string; + languageId: number; + creationDate: string; + url: string; + titleImage: string; + modUserName: string; + hasLiveVersion: boolean; + folder: string; + hasTitleImage: boolean; + sortOrder: number; + modUser: string; + __icon__: string; + contentTypeIcon: string; + variant: string; +} + +/** + * Bound information for a contentlet. + * + * @interface ContentletBound + * Bound information for a contentlet. + * + * @interface DotCMSContentletBound + * @property {number} x - The x-coordinate of the contentlet. + * @property {number} y - The y-coordinate of the contentlet. + * @property {number} width - The width of the contentlet. + * @property {number} height - The height of the contentlet. + * @property {string} payload - The payload data of the contentlet in JSON format. + */ +export interface DotCMSContentletBound { + x: number; + y: number; + width: number; + height: number; + payload: string; +} + +/** + * Bound information for a container. + * + * @interface DotCMSContainerBound + * @property {number} x - The x-coordinate of the container. + * @property {number} y - The y-coordinate of the container. + * @property {number} width - The width of the container. + * @property {number} height - The height of the container. + * @property {string} payload - The payload data of the container in JSON format. + * @property {DotCMSContentletBound[]} contentlets - An array of contentlets within the container. + */ +export interface DotCMSContainerBound { + x: number; + y: number; + width: number; + height: number; + payload: string; + contentlets: DotCMSContentletBound[]; +} diff --git a/core-web/libs/sdk/types/src/lib/editor/public.ts b/core-web/libs/sdk/types/src/lib/editor/public.ts new file mode 100644 index 000000000000..15a70e95ecdd --- /dev/null +++ b/core-web/libs/sdk/types/src/lib/editor/public.ts @@ -0,0 +1,253 @@ +import { ContentTypeMainFields, DotCMSContainerBound } from './internal'; + +/** + * Development mode + * + * @internal + */ +export const DEVELOPMENT_MODE = 'development'; + +/** + * Production mode + * + * @internal + */ +export const PRODUCTION_MODE = 'production'; + +/** + * Represents the state of the Universal Visual Editor (UVE) + * @interface + * @property {UVE_MODE} mode - The current mode of operation for UVE (EDIT, PREVIEW, LIVE, or UNKNOWN) + * @property {string | null} persona - The selected persona for content personalization + * @property {string | null} variantName - The name of the current content variant + * @property {string | null} experimentId - The identifier for the current A/B testing experiment + * @property {string | null} publishDate - The scheduled publish date for content + * @property {string | null} languageId - The identifier for the current language selection + */ +export interface UVEState { + mode: UVE_MODE; + persona: string | null; + variantName: string | null; + experimentId: string | null; + publishDate: string | null; + languageId: string | null; +} + +/** + * The mode of the page renderer component + * @enum {string} + */ +export type DotCMSPageRendererMode = typeof PRODUCTION_MODE | typeof DEVELOPMENT_MODE; + +/** + * 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 + */ +export enum UVE_MODE { + EDIT = 'EDIT_MODE', + PREVIEW = 'PREVIEW_MODE', + LIVE = 'LIVE', + UNKNOWN = 'UNKNOWN' +} + +/** + * Callback function for UVE events + * @callback UVEEventHandler + * @param {unknown} eventData - The event data + */ +export type UVEEventHandler = (eventData?: unknown) => void; + +/** + * Unsubscribe function for UVE events + * @callback UVEUnsubscribeFunction + */ +export type UVEUnsubscribeFunction = () => void; + +/** + * UVE event subscription type + * @typedef {Object} UVEEventSubscription + * @property {UVEUnsubscribeFunction} unsubscribe - The unsubscribe function for the UVE event + * @property {string} event - The event name + */ +export type UVEEventSubscription = { + unsubscribe: UVEUnsubscribeFunction; + event: string; +}; + +/** + * UVE event type + * @typedef {function} UVEEventSubscriber + */ +export type UVEEventSubscriber = (callback: UVEEventHandler) => UVEEventSubscription; + +//TODO: Recheck this after changes +/** + * Configuration type for DotCMS Editor + * @typedef {Object} DotCMSEditoConfig + * @property {Object} [params] - Parameters for Page API configuration + * @property {number} [params.depth] - The depth level for fetching page data + * @property {string} [query] - GraphQL query string for data fetching + */ +export type DotCMSEditorConfig = { params: { depth: number } } | { query: string }; + +/** + * Actions send to the dotcms editor + * + * @export + * @enum {number} + */ +export enum DotCMSUVEAction { + /** + * Tell the dotcms editor that page change + */ + NAVIGATION_UPDATE = 'set-url', + /** + * Send the element position of the rows, columnsm containers and contentlets + */ + SET_BOUNDS = 'set-bounds', + /** + * Send the information of the hovered contentlet + */ + SET_CONTENTLET = 'set-contentlet', + /** + * Tell the editor that the page is being scrolled + */ + IFRAME_SCROLL = 'scroll', + /** + * Tell the editor that the page has stopped scrolling + */ + IFRAME_SCROLL_END = 'scroll-end', + /** + * Ping the editor to see if the page is inside the editor + */ + PING_EDITOR = 'ping-editor', + /** + * Tell the editor to init the inline editing editor. + */ + INIT_INLINE_EDITING = 'init-inline-editing', + /** + * Tell the editor to open the Copy-contentlet dialog + * To copy a content and then edit it inline. + */ + COPY_CONTENTLET_INLINE_EDITING = 'copy-contentlet-inline-editing', + /** + * Tell the editor to save inline edited contentlet + */ + UPDATE_CONTENTLET_INLINE_EDITING = 'update-contentlet-inline-editing', + /** + * Tell the editor to trigger a menu reorder + */ + REORDER_MENU = 'reorder-menu', + /** + * Tell the editor to send the page info to iframe + */ + GET_PAGE_DATA = 'get-page-data', + /** + * Tell the editor an user send a graphql query + */ + CLIENT_READY = 'client-ready', + /** + * Tell the editor to edit a contentlet + */ + EDIT_CONTENTLET = 'edit-contentlet', + /** + * Tell the editor to do nothing + */ + NOOP = 'noop' +} + +/** + * The contentlet has the main fields and the custom fields of the content type. + * + * @template T - The custom fields of the content type. + */ +export type Contentlet = T & ContentTypeMainFields; + +/** + * Available events in the Universal Visual Editor + * @enum {string} + */ +export enum UVEEventType { + /** + * Triggered when page data changes from the editor + */ + CONTENT_CHANGES = 'changes', + + /** + * Triggered when the page needs to be reloaded + */ + PAGE_RELOAD = 'page-reload', + + /** + * Triggered when the editor requests container bounds + */ + REQUEST_BOUNDS = 'request-bounds', + + /** + * Triggered when scroll action is needed inside the iframe + */ + IFRAME_SCROLL = 'iframe-scroll', + + /** + * Triggered when a contentlet is hovered + */ + CONTENTLET_HOVERED = 'contentlet-hovered' +} + +/** + * Type definitions for each event's payload + */ +export type UVEEventPayloadMap = { + [UVEEventType.CONTENT_CHANGES]: unknown; + [UVEEventType.PAGE_RELOAD]: undefined; + [UVEEventType.REQUEST_BOUNDS]: DotCMSContainerBound[]; + [UVEEventType.IFRAME_SCROLL]: 'up' | 'down'; + // TODO: Add type here + [UVEEventType.CONTENTLET_HOVERED]: unknown; +}; + +/** + * + * Interface representing the data needed for container editing + * @interface EditableContainerData + */ +export interface EditableContainerData { + uuid: string; + identifier: string; + acceptTypes: string; + maxContentlets: number; + variantId?: string; +} + +/** + * + * Interface representing the data attributes of a DotCMS container. + * @interface DotContainerAttributes + */ +export interface DotContainerAttributes { + 'data-dot-object': string; + 'data-dot-accept-types': string; + 'data-dot-identifier': string; + 'data-max-contentlets': string; + 'data-dot-uuid': string; +} + +/** + * + * Interface representing the data attributes of a DotCMS contentlet. + * @interface DotContentletAttributes + */ +export interface DotContentletAttributes { + 'data-dot-identifier': string; + 'data-dot-basetype': string; + 'data-dot-title': string; + 'data-dot-inode': string; + 'data-dot-type': string; + 'data-dot-container': string; + 'data-dot-on-number-of-pages': string; +} diff --git a/core-web/libs/sdk/types/src/lib/events/internal.ts b/core-web/libs/sdk/types/src/lib/events/internal.ts new file mode 100644 index 000000000000..ae382b5b9a0f --- /dev/null +++ b/core-web/libs/sdk/types/src/lib/events/internal.ts @@ -0,0 +1,34 @@ +/** + * Actions received from the dotcms editor + * + * @export + * @enum {number} + */ +export enum __DOTCMS_UVE_EVENT__ { + /** + * Request to page to reload + */ + UVE_RELOAD_PAGE = 'uve-reload-page', + /** + * Request the bounds for the elements + */ + UVE_REQUEST_BOUNDS = 'uve-request-bounds', + /** + * Received pong from the editor + */ + UVE_EDITOR_PONG = 'uve-editor-pong', + /** + * Received scroll event trigger from the editor + */ + UVE_SCROLL_INSIDE_IFRAME = 'uve-scroll-inside-iframe', + /** + * TODO: + * Set the page data - This is used to catch the "changes" event. + * We must to re-check the name late. + */ + UVE_SET_PAGE_DATA = 'uve-set-page-data', + /** + * Copy contentlet inline editing success + */ + UVE_COPY_CONTENTLET_INLINE_EDITING_SUCCESS = 'uve-copy-contentlet-inline-editing-success' +} diff --git a/core-web/libs/sdk/types/src/lib/events/public.ts b/core-web/libs/sdk/types/src/lib/events/public.ts new file mode 100644 index 000000000000..5bbd001ddeb4 --- /dev/null +++ b/core-web/libs/sdk/types/src/lib/events/public.ts @@ -0,0 +1,19 @@ +export type DotCMSInlineEditingType = 'BLOCK_EDITOR' | 'WYSIWYG'; + +/** + * Interface representing the data needed for inline editing in DotCMS + * + * @interface DotCMSInlineEditorData + * @property {string} inode - The inode identifier of the content being edited + * @property {number} language - The language ID of the content + * @property {string} contentType - The content type identifier + * @property {string} fieldName - The name of the field being edited + * @property {Record} content - The content data as key-value pairs + */ +export interface DotCMSInlineEditingPayload { + inode: string; + language: number; + contentType: string; + fieldName: string; + content: Record; +} diff --git a/core-web/libs/sdk/types/src/lib/page/public.ts b/core-web/libs/sdk/types/src/lib/page/public.ts new file mode 100644 index 000000000000..28a2c357b708 --- /dev/null +++ b/core-web/libs/sdk/types/src/lib/page/public.ts @@ -0,0 +1,443 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ + +export interface DotCMSPageAsset { + canCreateTemplate?: boolean; + containers: { + [key: string]: DotCMSPageAssetContainer; + }; + layout: DotCMSLayout; + page: DotCMSPage; + site: DotCMSSite; + template: DotCMSTemplate; + viewAs?: DotCMSViewAs; + vanityUrl?: DotCMSVanityUrl; + params?: Record; +} + +export interface DotPageAssetLayoutRow { + identifier: number; + value?: string; + id?: string; + columns: DotPageAssetLayoutColumn[]; + styleClass?: string; +} + +export interface DotCMSVanityUrl { + pattern: string; + vanityUrlId: string; + url: string; + siteId: string; + languageId: number; + forwardTo: string; + response: number; + order: number; + temporaryRedirect: boolean; + permanentRedirect: boolean; + forward: boolean; +} + +export interface DotPageAssetLayoutColumn { + preview: boolean; + containers: DotCMSColumnContainer[]; + widthPercent: number; + width: number; + leftOffset: number; + left: number; + styleClass?: string; +} + +export interface DotCMSColumnContainer { + identifier: string; + uuid: string; + historyUUIDs: string[]; +} + +export interface DotCMSPageAssetContainer { + container: DotCMSContainer; + containerStructures: DotCMSContainerStructure[]; + contentlets: { + [key: string]: DotCMSContentlet[]; + }; +} + +export interface DotCMSContainer { + identifier: string; + uuid: string; + iDate: number; + type: string; + owner?: string; + inode: string; + source: string; + title: string; + friendlyName: string; + modDate: number; + modUser: string; + sortOrder: number; + showOnMenu: boolean; + code?: string; + maxContentlets: number; + useDiv: boolean; + sortContentletsBy?: string; + preLoop: string; + postLoop: string; + staticify: boolean; + luceneQuery?: string; + notes: string; + languageId?: number; + path?: string; + live: boolean; + locked: boolean; + working: boolean; + deleted: boolean; + name: string; + archived: boolean; + permissionId: string; + versionId: string; + versionType: string; + permissionType: string; + categoryId: string; + idate: number; + new: boolean; + acceptTypes: string; + contentlets: DotCMSContentlet[]; + parentPermissionable: DotCMSSiteParentPermissionable; +} + +export interface DotCMSContentlet { + archived: boolean; + baseType: string; + deleted?: boolean; + binary?: string; + binaryContentAsset?: string; + binaryVersion?: string; + contentType: string; + file?: string; + folder: string; + hasLiveVersion?: boolean; + hasTitleImage: boolean; + host: string; + hostName: string; + identifier: string; + inode: string; + image?: any; + languageId: number; + language?: string; + live: boolean; + locked: boolean; + mimeType?: string; + modDate: string; + modUser: string; + modUserName: string; + owner: string; + sortOrder: number; + stInode: string; + title: string; + titleImage: string; + text?: string; + url: string; + working: boolean; + body?: string; + contentTypeIcon?: string; + variant?: string; + __icon__?: string; + [key: string]: any; // This is a catch-all for any other custom properties that might be on the contentlet. +} + +export interface DotcmsNavigationItem { + code?: any; + folder: string; + children?: DotcmsNavigationItem[]; + host: string; + languageId: number; + href: string; + title: string; + type: string; + hash: number; + target: string; + order: number; +} + +interface DotCMSTemplate { + iDate: number; + type: string; + owner: string; + inode: string; + identifier: string; + source: string; + title: string; + friendlyName: string; + modDate: number; + modUser: string; + sortOrder: number; + showOnMenu: boolean; + image: string; + drawed: boolean; + drawedBody: string; + theme: string; + anonymous: boolean; + template: boolean; + name: string; + live: boolean; + archived: boolean; + locked: boolean; + working: boolean; + permissionId: string; + versionId: string; + versionType: string; + deleted: boolean; + permissionType: string; + categoryId: string; + idate: number; + new: boolean; + canEdit: boolean; +} + +interface DotCMSPage { + template: string; + modDate: number; + metadata: string; + cachettl: string; + pageURI: string; + title: string; + type: string; + showOnMenu: string; + httpsRequired: boolean; + inode: string; + disabledWYSIWYG: any[]; + seokeywords: string; + host: string; + lastReview: number; + working: boolean; + locked: boolean; + stInode: string; + friendlyName: string; + live: boolean; + owner: string; + identifier: string; + nullProperties: any[]; + friendlyname: string; + pagemetadata: string; + languageId: number; + url: string; + seodescription: string; + modUserName: string; + folder: string; + deleted: boolean; + sortOrder: number; + modUser: string; + pageUrl: string; + workingInode: string; + shortyWorking: string; + canEdit: boolean; + canRead: boolean; + canLock: boolean; + lockedOn: number; + lockedBy: string; + lockedByName: string; + liveInode: string; + shortyLive: string; +} + +interface DotCMSViewAs { + language: { + id: number; + languageCode: string; + countryCode: string; + language: string; + country: string; + }; + mode: string; +} + +interface DotCMSLayout { + pageWidth: string; + width: string; + layout: string; + title: string; + header: boolean; + footer: boolean; + body: DotPageAssetLayoutBody; + sidebar: DotPageAssetLayoutSidebar; +} + +interface DotCMSContainerStructure { + id: string; + structureId: string; + containerInode: string; + containerId: string; + code: string; + contentTypeVar: string; +} + +interface DotPageAssetLayoutSidebar { + preview: boolean; + containers: DotCMSContainer[]; + location: string; + widthPercent: number; + width: string; +} + +interface DotPageAssetLayoutBody { + rows: DotPageAssetLayoutRow[]; +} + +interface DotCMSSite { + lowIndexPriority: boolean; + name: string; + default: boolean; + aliases: string; + parent: boolean; + tagStorage: string; + systemHost: boolean; + inode: string; + versionType: string; + structureInode: string; + hostname: string; + hostThumbnail?: any; + owner: string; + permissionId: string; + permissionType: string; + type: string; + identifier: string; + modDate: number; + host: string; + live: boolean; + indexPolicy: string; + categoryId: string; + actionId?: any; + new: boolean; + archived: boolean; + locked: boolean; + disabledWysiwyg: any[]; + modUser: string; + working: boolean; + titleImage: { + present: boolean; + }; + folder: string; + htmlpage: boolean; + fileAsset: boolean; + vanityUrl: boolean; + keyValue: boolean; + structure?: DotCMSSiteStructure; + title: string; + languageId: number; + indexPolicyDependencies: string; + contentTypeId: string; + versionId: string; + lastReview: number; + nextReview?: any; + reviewInterval?: any; + sortOrder: number; + contentType: DotCMSSiteContentType; +} + +interface DotCMSSiteContentType { + owner?: any; + parentPermissionable: DotCMSSiteParentPermissionable; + permissionId: string; + permissionType: string; +} + +export interface DotCMSSiteParentPermissionable { + Inode: string; + Identifier: string; + permissionByIdentifier: boolean; + type: string; + owner?: any; + identifier: string; + permissionId: string; + parentPermissionable?: any; + permissionType: string; + inode: string; + childrenPermissionable?: any; + variantId?: string; +} + +interface DotCMSSiteStructure { + iDate: number; + type: string; + owner?: any; + inode: string; + identifier: string; + name: string; + description: string; + defaultStructure: boolean; + reviewInterval?: any; + reviewerRole?: any; + pagedetail?: any; + structureType: number; + fixed: boolean; + system: boolean; + velocityVarName: string; + urlMapPattern?: any; + host: string; + folder: string; + publishDateVar?: any; + expireDateVar?: any; + modDate: number; + fields: DotCMSSiteField[]; + widget: boolean; + detailPage?: any; + fieldsBySortOrder: DotCMSSiteField[]; + form: boolean; + htmlpageAsset: boolean; + content: boolean; + fileAsset: boolean; + persona: boolean; + permissionId: string; + permissionType: string; + live: boolean; + categoryId: string; + idate: number; + new: boolean; + archived: boolean; + locked: boolean; + modUser: string; + working: boolean; + title: string; + versionId: string; + versionType: string; +} + +interface DotCMSSiteField { + iDate: number; + type: string; + owner?: any; + inode: string; + identifier: string; + structureInode: string; + fieldName: string; + fieldType: string; + fieldRelationType?: any; + fieldContentlet: string; + required: boolean; + velocityVarName: string; + sortOrder: number; + values?: any; + regexCheck?: any; + hint?: any; + defaultValue?: any; + indexed: boolean; + listed: boolean; + fixed: boolean; + readOnly: boolean; + searchable: boolean; + unique: boolean; + modDate: number; + dataType: string; + live: boolean; + categoryId: string; + idate: number; + new: boolean; + archived: boolean; + locked: boolean; + modUser: string; + working: boolean; + permissionId: string; + parentPermissionable?: any; + permissionType: string; + title: string; + versionId: string; + versionType: string; +} diff --git a/core-web/libs/sdk/types/src/page.ts b/core-web/libs/sdk/types/src/page.ts new file mode 100644 index 000000000000..a4d64ab251a5 --- /dev/null +++ b/core-web/libs/sdk/types/src/page.ts @@ -0,0 +1 @@ +export * from './lib/page/public'; diff --git a/core-web/libs/sdk/types/tsconfig.json b/core-web/libs/sdk/types/tsconfig.json new file mode 100644 index 000000000000..03d08bcc4e3c --- /dev/null +++ b/core-web/libs/sdk/types/tsconfig.json @@ -0,0 +1,22 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "module": "commonjs", + "forceConsistentCasingInFileNames": true, + "strict": true, + "noImplicitOverride": true, + "noPropertyAccessFromIndexSignature": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true + }, + "files": [], + "include": [], + "references": [ + { + "path": "./tsconfig.lib.json" + }, + { + "path": "./tsconfig.spec.json" + } + ] +} diff --git a/core-web/libs/sdk/types/tsconfig.lib.json b/core-web/libs/sdk/types/tsconfig.lib.json new file mode 100644 index 000000000000..163d90724090 --- /dev/null +++ b/core-web/libs/sdk/types/tsconfig.lib.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../../dist/out-tsc", + "declaration": true, + "types": ["node"] + }, + "include": ["src/**/*.ts"], + "exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"] +} diff --git a/core-web/libs/sdk/types/tsconfig.spec.json b/core-web/libs/sdk/types/tsconfig.spec.json new file mode 100644 index 000000000000..9350d0a4fa76 --- /dev/null +++ b/core-web/libs/sdk/types/tsconfig.spec.json @@ -0,0 +1,9 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../../dist/out-tsc", + "module": "commonjs", + "types": ["jest", "node"] + }, + "include": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts", "src/**/*.d.ts"] +} diff --git a/core-web/nx.json b/core-web/nx.json index 431d70f4900a..303ba4925295 100644 --- a/core-web/nx.json +++ b/core-web/nx.json @@ -176,5 +176,10 @@ } ], "defaultBase": "main", - "ignorePatterns": ["**/node_modules"] + "ignorePatterns": ["**/node_modules"], + "release": { + "version": { + "preVersionCommand": "yarn nx run-many -t build" + } + } } diff --git a/core-web/package.json b/core-web/package.json index 810efccc59a4..1bc6e99d1fa8 100644 --- a/core-web/package.json +++ b/core-web/package.json @@ -238,6 +238,7 @@ "jest": "29.7.0", "jest-cli": "29.7.0", "jest-environment-jsdom": "29.7.0", + "jest-environment-node": "^29.7.0", "jest-fetch-mock": "^3.0.3", "jest-html-reporters": "^3.1.5", "jest-junit": "^16.0.0", @@ -276,6 +277,7 @@ "tslint-angular": "^3.0.3", "typedoc": "^0.25.4", "typescript": "5.4.5", + "verdaccio": "^5.0.4", "vite": "~5.0.0", "vite-plugin-dts": "~3.8.1", "vitest": "^1.3.1", diff --git a/core-web/project.json b/core-web/project.json index 242afde0e8aa..847ef8c583f2 100644 --- a/core-web/project.json +++ b/core-web/project.json @@ -1,4 +1,14 @@ { "name": "core-web", - "$schema": "node_modules/nx/schemas/project-schema.json" + "$schema": "node_modules/nx/schemas/project-schema.json", + "targets": { + "local-registry": { + "executor": "@nx/js:verdaccio", + "options": { + "port": 4873, + "config": ".verdaccio/config.yml", + "storage": "tmp/local-registry/storage" + } + } + } } diff --git a/core-web/tsconfig.base.json b/core-web/tsconfig.base.json index 2404ce5a96ac..4981f1d893d1 100644 --- a/core-web/tsconfig.base.json +++ b/core-web/tsconfig.base.json @@ -58,6 +58,7 @@ ], "@dotcms/react": ["libs/sdk/react/src/index.ts"], "@dotcms/template-builder": ["libs/template-builder/src/index.ts"], + "@dotcms/types": ["libs/sdk/types/src/index.ts"], "@dotcms/ui": ["libs/ui/src/index.ts"], "@dotcms/utils": ["libs/utils/src"], "@dotcms/utils-testing": ["libs/utils-testing/src/index.ts"], diff --git a/core-web/yarn.lock b/core-web/yarn.lock index 799f06879e35..cddd876974f6 100644 --- a/core-web/yarn.lock +++ b/core-web/yarn.lock @@ -1953,6 +1953,30 @@ date-fns "^1.27.2" figures "^1.7.0" +"@cypress/request@3.0.6": + version "3.0.6" + resolved "https://registry.npmjs.org/@cypress/request/-/request-3.0.6.tgz#f5580add6acee0e183b4d4e07eff4f31327ae12b" + integrity sha512-fi0eVdCOtKu5Ed6+E8mYxUF6ZTFJDZvHogCBelM0xVXmrDEkyM22gRArQzq1YcHPm1V47Vf/iAD+WgVdUlJCGg== + dependencies: + aws-sign2 "~0.7.0" + aws4 "^1.8.0" + caseless "~0.12.0" + combined-stream "~1.0.6" + extend "~3.0.2" + forever-agent "~0.6.1" + form-data "~4.0.0" + http-signature "~1.4.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.19" + performance-now "^2.1.0" + qs "6.13.0" + safe-buffer "^5.1.2" + tough-cookie "^5.0.0" + tunnel-agent "^0.6.0" + uuid "^8.3.2" + "@cypress/request@^2.88.5": version "2.88.12" resolved "https://registry.yarnpkg.com/@cypress/request/-/request-2.88.12.tgz#ba4911431738494a85e93fb04498cb38bc55d590" @@ -6908,6 +6932,199 @@ resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406" integrity sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ== +"@verdaccio/auth@8.0.0-next-8.1": + version "8.0.0-next-8.1" + resolved "https://registry.npmjs.org/@verdaccio/auth/-/auth-8.0.0-next-8.1.tgz#0d0f1f1cc1271989de4ea36fb5439053e791e26f" + integrity sha512-sPmHdnYuRSMgABCsTJEfz8tb/smONsWVg0g4KK2QycyYZ/A+RwZLV1JLiQb4wzu9zvS0HSloqWqkWlyNHW3mtw== + dependencies: + "@verdaccio/config" "8.0.0-next-8.1" + "@verdaccio/core" "8.0.0-next-8.1" + "@verdaccio/loaders" "8.0.0-next-8.1" + "@verdaccio/logger" "8.0.0-next-8.1" + "@verdaccio/signature" "8.0.0-next-8.0" + "@verdaccio/utils" "7.0.1-next-8.1" + debug "4.3.7" + lodash "4.17.21" + verdaccio-htpasswd "13.0.0-next-8.1" + +"@verdaccio/commons-api@10.2.0": + version "10.2.0" + resolved "https://registry.npmjs.org/@verdaccio/commons-api/-/commons-api-10.2.0.tgz#3b684c31749837b0574375bb2e10644ecea9fcca" + integrity sha512-F/YZANu4DmpcEV0jronzI7v2fGVWkQ5Mwi+bVmV+ACJ+EzR0c9Jbhtbe5QyLUuzR97t8R5E/Xe53O0cc2LukdQ== + dependencies: + http-errors "2.0.0" + http-status-codes "2.2.0" + +"@verdaccio/config@8.0.0-next-8.1": + version "8.0.0-next-8.1" + resolved "https://registry.npmjs.org/@verdaccio/config/-/config-8.0.0-next-8.1.tgz#2ad84eb1d81516c3c9206b01e6f412be7c51611e" + integrity sha512-goDVOH4e8xMUxjHybJpi5HwIecVFqzJ9jeNFrRUgtUUn0PtFuNMHgxOeqDKRVboZhc5HK90yed8URK/1O6VsUw== + dependencies: + "@verdaccio/core" "8.0.0-next-8.1" + "@verdaccio/utils" "7.0.1-next-8.1" + debug "4.3.7" + js-yaml "4.1.0" + lodash "4.17.21" + minimatch "7.4.6" + +"@verdaccio/core@8.0.0-next-8.1": + version "8.0.0-next-8.1" + resolved "https://registry.npmjs.org/@verdaccio/core/-/core-8.0.0-next-8.1.tgz#ec6f4efe15c3ddfe9730b8bd5d8d159f30979ff5" + integrity sha512-kQRCB2wgXEh8H88G51eQgAFK9IxmnBtkQ8sY5FbmB6PbBkyHrbGcCp+2mtRqqo36j0W1VAlfM3XzoknMy6qQnw== + dependencies: + ajv "8.17.1" + core-js "3.37.1" + http-errors "2.0.0" + http-status-codes "2.3.0" + process-warning "1.0.0" + semver "7.6.3" + +"@verdaccio/file-locking@10.3.1": + version "10.3.1" + resolved "https://registry.npmjs.org/@verdaccio/file-locking/-/file-locking-10.3.1.tgz#cfc2436e0715954e0965f97dfcd87381d116f749" + integrity sha512-oqYLfv3Yg3mAgw9qhASBpjD50osj2AX4IwbkUtyuhhKGyoFU9eZdrbeW6tpnqUnj6yBMtAPm2eGD4BwQuX400g== + dependencies: + lockfile "1.0.4" + +"@verdaccio/file-locking@13.0.0-next-8.0": + version "13.0.0-next-8.0" + resolved "https://registry.npmjs.org/@verdaccio/file-locking/-/file-locking-13.0.0-next-8.0.tgz#87c393c211915ca9fef4fefb9dc48643c89fbe4b" + integrity sha512-28XRwpKiE3Z6KsnwE7o8dEM+zGWOT+Vef7RVJyUlG176JVDbGGip3HfCmFioE1a9BklLyGEFTu6D69BzfbRkzA== + dependencies: + lockfile "1.0.4" + +"@verdaccio/loaders@8.0.0-next-8.1": + version "8.0.0-next-8.1" + resolved "https://registry.npmjs.org/@verdaccio/loaders/-/loaders-8.0.0-next-8.1.tgz#bc9ff23ecaf3fbbae99ae405ee1521a4a53d0dc9" + integrity sha512-mqGCUBs862g8mICZwX8CG92p1EZ1Un0DJ2DB7+iVu2TYaEeKoHoIdafabVdiYrbOjLcAOOBrMKE1Wnn14eLxpA== + dependencies: + "@verdaccio/logger" "8.0.0-next-8.1" + debug "4.3.7" + lodash "4.17.21" + +"@verdaccio/local-storage-legacy@11.0.2": + version "11.0.2" + resolved "https://registry.npmjs.org/@verdaccio/local-storage-legacy/-/local-storage-legacy-11.0.2.tgz#facfec7f355892c8248fd69a16d735c0ec26a44e" + integrity sha512-7AXG7qlcVFmF+Nue2oKaraprGRtaBvrQIOvc/E89+7hAe399V01KnZI6E/ET56u7U9fq0MSlp92HBcdotlpUXg== + dependencies: + "@verdaccio/commons-api" "10.2.0" + "@verdaccio/file-locking" "10.3.1" + "@verdaccio/streams" "10.2.1" + async "3.2.4" + debug "4.3.4" + lodash "4.17.21" + lowdb "1.0.0" + mkdirp "1.0.4" + +"@verdaccio/logger-7@8.0.0-next-8.1": + version "8.0.0-next-8.1" + resolved "https://registry.npmjs.org/@verdaccio/logger-7/-/logger-7-8.0.0-next-8.1.tgz#1f6d5a88657e12cd5b3dcb8980eb940c7ef38ef5" + integrity sha512-V+/B1Wnct3IZ90q6HkI1a3dqbS0ds7s/5WPrS5cmBeLEw78/OGgF76XkhI2+lett7Un1CjVow7mcebOWcZ/Sqw== + dependencies: + "@verdaccio/logger-commons" "8.0.0-next-8.1" + pino "7.11.0" + +"@verdaccio/logger-commons@8.0.0-next-8.1": + version "8.0.0-next-8.1" + resolved "https://registry.npmjs.org/@verdaccio/logger-commons/-/logger-commons-8.0.0-next-8.1.tgz#d134170e5951e6b26a742dc546c81db449dc6117" + integrity sha512-jCge//RT4uaK7MarhpzcJeJ5Uvtu/DbJ1wvJQyGiFe+9AvxDGm3EUFXvawLFZ0lzYhmLt1nvm7kevcc3vOm2ZQ== + dependencies: + "@verdaccio/core" "8.0.0-next-8.1" + "@verdaccio/logger-prettify" "8.0.0-next-8.0" + colorette "2.0.20" + debug "4.3.7" + +"@verdaccio/logger-prettify@8.0.0-next-8.0": + version "8.0.0-next-8.0" + resolved "https://registry.npmjs.org/@verdaccio/logger-prettify/-/logger-prettify-8.0.0-next-8.0.tgz#d728ffac1a94d4a2c9be61eb8acabb722ee75dbf" + integrity sha512-7mAFHZF2NPTubrOXYp2+fbMjRW5MMWXMeS3LcpupMAn5uPp6jkKEM8NC4IVJEevC5Ph4vPVZqpoPDpgXHEaV3Q== + dependencies: + colorette "2.0.20" + dayjs "1.11.13" + lodash "4.17.21" + pino-abstract-transport "1.1.0" + sonic-boom "3.8.0" + +"@verdaccio/logger@8.0.0-next-8.1": + version "8.0.0-next-8.1" + resolved "https://registry.npmjs.org/@verdaccio/logger/-/logger-8.0.0-next-8.1.tgz#ee7ce72070f096e0d6862828334def06d2bfa7f6" + integrity sha512-w5kR0/umQkfH2F4PK5Fz9T6z3xz+twewawKLPTUfAgrVAOiWxcikGhhcHWhSGiJ0lPqIa+T0VYuLWMeVeDirGw== + dependencies: + "@verdaccio/logger-commons" "8.0.0-next-8.1" + pino "8.17.2" + +"@verdaccio/middleware@8.0.0-next-8.1": + version "8.0.0-next-8.1" + resolved "https://registry.npmjs.org/@verdaccio/middleware/-/middleware-8.0.0-next-8.1.tgz#ec2fbb39de3b053ce37c9da2d07ef1873b7ed6f4" + integrity sha512-GpAdJYky1WmOERpxPoCkVSwTTJIsVAjqf2a2uQNvi7R3UZhs059JKhWcZjJMVCGV0uz9xgQvtb3DEuYGHqyaOg== + dependencies: + "@verdaccio/config" "8.0.0-next-8.1" + "@verdaccio/core" "8.0.0-next-8.1" + "@verdaccio/url" "13.0.0-next-8.1" + "@verdaccio/utils" "7.0.1-next-8.1" + debug "4.3.7" + express "4.21.0" + express-rate-limit "5.5.1" + lodash "4.17.21" + lru-cache "7.18.3" + mime "2.6.0" + +"@verdaccio/search-indexer@8.0.0-next-8.0": + version "8.0.0-next-8.0" + resolved "https://registry.npmjs.org/@verdaccio/search-indexer/-/search-indexer-8.0.0-next-8.0.tgz#a0250fe776ebfe86d32e7f78c68f1c8e94010a08" + integrity sha512-VS9axVt8XAueiPceVCgaj9nlvYj5s/T4MkAILSf2rVZeFFOMUyxU3mddUCajSHzL+YpqCuzLLL9865sRRzOJ9w== + +"@verdaccio/signature@8.0.0-next-8.0": + version "8.0.0-next-8.0" + resolved "https://registry.npmjs.org/@verdaccio/signature/-/signature-8.0.0-next-8.0.tgz#66983d04c45ad98865671aeb5b3b5f0cb60d570d" + integrity sha512-klcc2UlCvQxXDV65Qewo2rZOfv7S1y8NekS/8uurSaCTjU35T+fz+Pbqz1S9XK9oQlMp4vCQ7w3iMPWQbvphEQ== + dependencies: + debug "4.3.7" + jsonwebtoken "9.0.2" + +"@verdaccio/streams@10.2.1": + version "10.2.1" + resolved "https://registry.npmjs.org/@verdaccio/streams/-/streams-10.2.1.tgz#9443d24d4f17672b8f8c8e147690557918ed2bcb" + integrity sha512-OojIG/f7UYKxC4dYX8x5ax8QhRx1b8OYUAMz82rUottCuzrssX/4nn5QE7Ank0DUSX3C9l/HPthc4d9uKRJqJQ== + +"@verdaccio/tarball@13.0.0-next-8.1": + version "13.0.0-next-8.1" + resolved "https://registry.npmjs.org/@verdaccio/tarball/-/tarball-13.0.0-next-8.1.tgz#c693787a5fd4387ea380ebc2c3d915acdb17e454" + integrity sha512-58uimU2Bqt9+s+9ixy7wK/nPCqbOXhhhr/MQjl+otIlsUhSeATndhFzEctz/W+4MhUDg0tUnE9HC2yeNHHAo1Q== + dependencies: + "@verdaccio/core" "8.0.0-next-8.1" + "@verdaccio/url" "13.0.0-next-8.1" + "@verdaccio/utils" "7.0.1-next-8.1" + debug "4.3.7" + gunzip-maybe "^1.4.2" + lodash "4.17.21" + tar-stream "^3.1.7" + +"@verdaccio/ui-theme@8.0.0-next-8.1": + version "8.0.0-next-8.1" + resolved "https://registry.npmjs.org/@verdaccio/ui-theme/-/ui-theme-8.0.0-next-8.1.tgz#045f01e59a804faf254157ad666e77e933d92bb0" + integrity sha512-9PxV8+jE2Tr+iy9DQW/bzny4YqOlW0mCZ9ct6jhcUW4GdfzU//gY2fBN/DDtQVmfbTy8smuj4Enyv5f0wCsnYg== + +"@verdaccio/url@13.0.0-next-8.1": + version "13.0.0-next-8.1" + resolved "https://registry.npmjs.org/@verdaccio/url/-/url-13.0.0-next-8.1.tgz#97894f18e2f162dfef7246d99adc2cddd6220d54" + integrity sha512-h6pkJf+YtogImKgOrmPP9UVG3p3gtb67gqkQU0bZnK+SEKQt6Rkek/QvtJ8MbmciagYS18bDhpI8DxqLHjDfZQ== + dependencies: + "@verdaccio/core" "8.0.0-next-8.1" + debug "4.3.7" + lodash "4.17.21" + validator "13.12.0" + +"@verdaccio/utils@7.0.1-next-8.1": + version "7.0.1-next-8.1" + resolved "https://registry.npmjs.org/@verdaccio/utils/-/utils-7.0.1-next-8.1.tgz#21916f932652e445750be66ebec0ba89aff015c1" + integrity sha512-cyJdRrVa+8CS7UuIQb3K3IJFjMe64v38tYiBnohSmhRbX7dX9IT3jWbjrwkqWh4KeS1CS6BYENrGG1evJ2ggrQ== + dependencies: + "@verdaccio/core" "8.0.0-next-8.1" + lodash "4.17.21" + minimatch "7.4.6" + semver "7.6.3" + "@vitejs/plugin-basic-ssl@1.1.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@vitejs/plugin-basic-ssl/-/plugin-basic-ssl-1.1.0.tgz#8b840305a6b48e8764803435ec0c716fa27d3802" @@ -7214,7 +7431,7 @@ dependencies: argparse "^2.0.1" -JSONStream@^1.3.4, JSONStream@^1.3.5: +JSONStream@1.3.5, JSONStream@^1.3.4, JSONStream@^1.3.5: version "1.3.5" resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" integrity sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ== @@ -7237,6 +7454,13 @@ abbrev@^2.0.0: resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-2.0.0.tgz#cf59829b8b4f03f89dda2771cb7f3653828c89bf" integrity sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ== +abort-controller@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392" + integrity sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg== + dependencies: + event-target-shim "^5.0.0" + accepts@^1.3.5, accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.8: version "1.3.8" resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" @@ -7580,7 +7804,7 @@ apache-crypt@^1.1.2: dependencies: unix-crypt-td-js "^1.1.4" -apache-md5@^1.0.6: +apache-md5@1.1.8, apache-md5@^1.0.6: version "1.1.8" resolved "https://registry.yarnpkg.com/apache-md5/-/apache-md5-1.1.8.tgz#ea79c6feb03abfed42b2830dde06f75df5e3bbd9" integrity sha512-FCAJojipPn0bXjuEpjOOOMN8FZDkxfWWp4JGN9mifU2IhxvKyXZYqpzPHdnTSUpmPDy+tsslB6Z1g+Vg6nVbYA== @@ -7853,6 +8077,16 @@ ast-types@^0.16.1: dependencies: tslib "^2.0.1" +async@3.2.4: + version "3.2.4" + resolved "https://registry.npmjs.org/async/-/async-3.2.4.tgz#2d22e00f8cddeb5fde5dd33522b56d1cf569a81c" + integrity sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ== + +async@3.2.6: + version "3.2.6" + resolved "https://registry.npmjs.org/async/-/async-3.2.6.tgz#1b0728e14929d51b85b449b7f06e27c1145e38ce" + integrity sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA== + async@^2.6.4: version "2.6.4" resolved "https://registry.yarnpkg.com/async/-/async-2.6.4.tgz#706b7ff6084664cd7eae713f6f965433b5504221" @@ -7880,6 +8114,11 @@ atoa@1.0.0: resolved "https://registry.yarnpkg.com/atoa/-/atoa-1.0.0.tgz#0cc0e91a480e738f923ebc103676471779b34a49" integrity sha512-VVE1H6cc4ai+ZXo/CRWoJiHXrA1qfA31DPnx6D20+kSI547hQN5Greh51LQ1baMRMfxO5K5M4ImMtZbZt2DODQ== +atomic-sleep@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/atomic-sleep/-/atomic-sleep-1.0.0.tgz#eb85b77a601fc932cfe432c5acd364a9e2c9075b" + integrity sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ== + autoprefixer@10.4.20: version "10.4.20" resolved "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.20.tgz#5caec14d43976ef42e32dcb4bd62878e96be5b3b" @@ -7961,6 +8200,11 @@ axobject-query@^3.2.1: resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-3.2.4.tgz#6dfba930294ea14d7d2fc68b9d007211baedb94c" integrity sha512-aPTElBrbifBU1krmZxGZOlBkslORe7Ll7+BDnI50Wy4LgOt69luMgevkDfTq1O/ZgprooPCtWpjCwKSZw/iZ4A== +b4a@^1.6.4: + version "1.6.7" + resolved "https://registry.npmjs.org/b4a/-/b4a-1.6.7.tgz#a99587d4ebbfbd5a6e3b21bdb5d5fa385767abe4" + integrity sha512-OnAYlL5b7LEkALw87fUVafQw5rVR9RjwGd4KUwNQ6DrrNmaVaUCgLipfVlzrPQ4tWOR9P0IXGNOx50jYCCdSJg== + babel-core@^7.0.0-bridge.0: version "7.0.0-bridge.0" resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-7.0.0-bridge.0.tgz#95a492ddd90f9b4e9a4a1da14eb335b87b634ece" @@ -8103,6 +8347,11 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== +bare-events@^2.2.0: + version "2.5.4" + resolved "https://registry.npmjs.org/bare-events/-/bare-events-2.5.4.tgz#16143d435e1ed9eafd1ab85f12b89b3357a41745" + integrity sha512-+gFfDkR8pj4/TrWCGUGWmJIkBwuxPS5F+a5yWjOHQt2hHvNZd5YLzadjmDUtFmMM4y429bnKLa8bYBMHcYdnQA== + base64-js@1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.1.tgz#58ece8cb75dd07e71ed08c736abc5fac4dbf8df1" @@ -8137,7 +8386,7 @@ bcrypt-pbkdf@^1.0.0: dependencies: tweetnacl "^0.14.3" -bcryptjs@^2.4.3: +bcryptjs@2.4.3, bcryptjs@^2.4.3: version "2.4.3" resolved "https://registry.yarnpkg.com/bcryptjs/-/bcryptjs-2.4.3.tgz#9ab5627b93e60621ff7cdac5da9733027df1d0cb" integrity sha512-V/Hy/X9Vt7f3BbPJEi8BdVFMByHi+jNXrYkW3huaybV/kQ0KJg0Y6PkEMbn+zeT+i+SiKZ/HMqJGIIt4LZDqNQ== @@ -8238,6 +8487,24 @@ body-parser@1.20.2, body-parser@^1.19.0: type-is "~1.6.18" unpipe "1.0.0" +body-parser@1.20.3: + version "1.20.3" + resolved "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz#1953431221c6fb5cd63c4b36d53fab0928e548c6" + integrity sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g== + dependencies: + bytes "3.1.2" + content-type "~1.0.5" + debug "2.6.9" + depd "2.0.0" + destroy "1.2.0" + http-errors "2.0.0" + iconv-lite "0.4.24" + on-finished "2.4.1" + qs "6.13.0" + raw-body "2.5.2" + type-is "~1.6.18" + unpipe "1.0.0" + bonjour-service@^1.2.1: version "1.2.1" resolved "https://registry.npmjs.org/bonjour-service/-/bonjour-service-1.2.1.tgz#eb41b3085183df3321da1264719fbada12478d02" @@ -8306,6 +8573,13 @@ browser-assert@^1.2.1: resolved "https://registry.yarnpkg.com/browser-assert/-/browser-assert-1.2.1.tgz#9aaa5a2a8c74685c2ae05bfe46efd606f068c200" integrity sha512-nfulgvOR6S4gt9UKCeGJOuSGBPGiFT6oQ/2UBnvTY/5aQ1PnksW72fhZkM30DzoRRv2WpwZf1vHHEr3mtuXIWQ== +browserify-zlib@^0.1.4: + version "0.1.4" + resolved "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.1.4.tgz#bb35f8a519f600e0fa6b8485241c979d0141fb2d" + integrity sha512-19OEpq7vWgsH6WkvkBJQDFvJS1uPcbFOQ4v9CU839dO+ZZXUZO6XpE6hNCqvlIIj+4fZvRiJ6DsAQ382GwiyTQ== + dependencies: + pako "~0.2.0" + browserslist@^4.0.0, browserslist@^4.20.3, browserslist@^4.21.10, browserslist@^4.21.4, browserslist@^4.21.5, browserslist@^4.22.1, browserslist@^4.23.0, browserslist@^4.23.1, browserslist@^4.23.3: version "4.23.3" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.23.3.tgz#debb029d3c93ebc97ffbc8d9cbb03403e227c800" @@ -8357,6 +8631,11 @@ buffer-crc32@~0.2.3: resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" integrity sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ== +buffer-equal-constant-time@1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819" + integrity sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA== + buffer-from@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" @@ -8370,6 +8649,14 @@ buffer@^5.2.1, buffer@^5.5.0: base64-js "^1.3.1" ieee754 "^1.1.13" +buffer@^6.0.3: + version "6.0.3" + resolved "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" + integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.2.1" + builtin-modules@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" @@ -8494,6 +8781,14 @@ cachedir@^2.3.0: resolved "https://registry.yarnpkg.com/cachedir/-/cachedir-2.4.0.tgz#7fef9cf7367233d7c88068fe6e34ed0d355a610d" integrity sha512-9EtFOZR8g22CL7BWjJ9BUx1+A/djkofnyW3aOXZORNW2kxoUpx2h+uN2cOqwPmFhnpVmxg+KW2OjOSgChTEvsQ== +call-bind-apply-helpers@^1.0.1, call-bind-apply-helpers@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz#4b5428c222be985d79c3d82657479dbe0b59b2d6" + integrity sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ== + dependencies: + es-errors "^1.3.0" + function-bind "^1.1.2" + call-bind@^1.0.2, call-bind@^1.0.5, call-bind@^1.0.6, call-bind@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9" @@ -8872,6 +9167,13 @@ client-only@0.0.1: resolved "https://registry.yarnpkg.com/client-only/-/client-only-0.0.1.tgz#38bba5d403c41ab150bff64a95c85013cf73bca1" integrity sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA== +clipanion@4.0.0-rc.4: + version "4.0.0-rc.4" + resolved "https://registry.npmjs.org/clipanion/-/clipanion-4.0.0-rc.4.tgz#7191a940e47ef197e5f18c9cbbe419278b5f5903" + integrity sha512-CXkMQxU6s9GklO/1f714dkKBMu1lopS1WFF0B8o4AxPykR1hpozxSiUZ5ZUeBjfPgCWqbcNOtZVFhB8Lkfp1+Q== + dependencies: + typanion "^3.8.0" + clipboard@^2.0.11: version "2.0.11" resolved "https://registry.yarnpkg.com/clipboard/-/clipboard-2.0.11.tgz#62180360b97dd668b6b3a84ec226975762a70be5" @@ -9020,16 +9322,16 @@ colord@^2.9.1, colord@^2.9.3: resolved "https://registry.yarnpkg.com/colord/-/colord-2.9.3.tgz#4f8ce919de456f1d5c1c368c307fe20f3e59fb43" integrity sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw== +colorette@2.0.20, colorette@^2.0.10, colorette@^2.0.20: + version "2.0.20" + resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.20.tgz#9eb793e6833067f7235902fcd3b09917a000a95a" + integrity sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w== + colorette@^1.1.0: version "1.4.0" resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.4.0.tgz#5190fbb87276259a86ad700bff2c6d6faa3fca40" integrity sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g== -colorette@^2.0.10, colorette@^2.0.20: - version "2.0.20" - resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.20.tgz#9eb793e6833067f7235902fcd3b09917a000a95a" - integrity sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w== - colors@1.4.0, colors@^1.1.2: version "1.4.0" resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" @@ -9113,13 +9415,26 @@ commondir@^1.0.1: resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" integrity sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg== -compressible@~2.0.16: +compressible@~2.0.16, compressible@~2.0.18: version "2.0.18" resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.18.tgz#af53cca6b070d4c3c0750fbd77286a6d7cc46fba" integrity sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg== dependencies: mime-db ">= 1.43.0 < 2" +compression@1.7.5: + version "1.7.5" + resolved "https://registry.npmjs.org/compression/-/compression-1.7.5.tgz#fdd256c0a642e39e314c478f6c2cd654edd74c93" + integrity sha512-bQJ0YRck5ak3LgtnpKkiabX5pNF7tMUh1BSy2ZBOTh0Dim0BUu6aPPwByIns6/A5Prh8PufSPerMDUklpzes2Q== + dependencies: + bytes "3.1.2" + compressible "~2.0.18" + debug "2.6.9" + negotiator "~0.6.4" + on-headers "~1.0.2" + safe-buffer "5.2.1" + vary "~1.1.2" + compression@^1.7.4: version "1.7.4" resolved "https://registry.yarnpkg.com/compression/-/compression-1.7.4.tgz#95523eff170ca57c29a0ca41e6fe131f41e5bb8f" @@ -9265,6 +9580,11 @@ cookie@0.6.0: resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.6.0.tgz#2798b04b071b0ecbff0dbb62a505a8efa4e19051" integrity sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw== +cookie@0.7.1: + version "0.7.1" + resolved "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz#2f73c42142d5d5cf71310a74fc4ae61670e5dbc9" + integrity sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w== + cookie@~0.4.1: version "0.4.2" resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.2.tgz#0e41f24de5ecf317947c82fc789e06a884824432" @@ -9333,7 +9653,7 @@ core-js@3.36.1: resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.36.1.tgz#c97a7160ebd00b2de19e62f4bbd3406ab720e578" integrity sha512-BTvUrwxVBezj5SZ3f10ImnX2oRByMxql3EimVqMysepbC9EeMUOpLwdy6Eoili2x6E4kf+ZUB5k/+Jv55alPfA== -core-js@^3.0.0: +core-js@3.37.1, core-js@^3.0.0: version "3.37.1" resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.37.1.tgz#d21751ddb756518ac5a00e4d66499df981a62db9" integrity sha512-Xn6qmxrQZyB0FFY8E3bgRXei3lWDJHhvI+u0q9TKIYM49G8pAr0FgnnrFRAmsbptZL1yxRADVXn+x5AGsbBfyw== @@ -9348,7 +9668,7 @@ core-util-is@~1.0.0: resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== -cors@latest, cors@~2.8.5: +cors@2.8.5, cors@latest, cors@~2.8.5: version "2.8.5" resolved "https://registry.yarnpkg.com/cors/-/cors-2.8.5.tgz#eac11da51592dd86b9f06f6e7ac293b3df875d29" integrity sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g== @@ -10243,6 +10563,11 @@ date-format@^4.0.14: resolved "https://registry.yarnpkg.com/date-format/-/date-format-4.0.14.tgz#7a8e584434fb169a521c8b7aa481f355810d9400" integrity sha512-39BOQLs9ZjKh0/patS9nrT8wc3ioX3/eA/zgbKNopnF2wCqJEoxywwwElATYvRsXdnOxA/OQeQoFZ3rFjVajhg== +dayjs@1.11.13: + version "1.11.13" + resolved "https://registry.npmjs.org/dayjs/-/dayjs-1.11.13.tgz#92430b0139055c3ebb60150aa13e860a4b5a366c" + integrity sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg== + dayjs@^1.11.7, dayjs@^1.9.3: version "1.11.12" resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.12.tgz#5245226cc7f40a15bf52e0b99fd2a04669ccac1d" @@ -10286,6 +10611,20 @@ debug@4.3.2: dependencies: ms "2.1.2" +debug@4.3.4: + version "4.3.4" + resolved "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + +debug@4.3.7: + version "4.3.7" + resolved "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz#87945b4151a011d76d95a198d7111c865c360a52" + integrity sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ== + dependencies: + ms "^2.1.3" + debug@^3.1.0, debug@^3.2.7: version "3.2.7" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" @@ -10293,6 +10632,13 @@ debug@^3.1.0, debug@^3.2.7: dependencies: ms "^2.1.1" +debug@^4.3.7: + version "4.4.0" + resolved "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz#2b3f2aea2ffeb776477460267377dc8710faba8a" + integrity sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA== + dependencies: + ms "^2.1.3" + debuglog@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492" @@ -10825,6 +11171,15 @@ dragula@^3.7.3: contra "1.9.4" crossvent "1.5.5" +dunder-proto@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz#d7ae667e1dc83482f8b70fd0f6eefc50da30f58a" + integrity sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A== + dependencies: + call-bind-apply-helpers "^1.0.1" + es-errors "^1.3.0" + gopd "^1.2.0" + duplexer3@^0.1.4: version "0.1.5" resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.5.tgz#0b5e4d7bad5de8901ea4440624c8e1d20099217e" @@ -10835,7 +11190,7 @@ duplexer@^0.1.1, duplexer@^0.1.2, duplexer@~0.1.1: resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.2.tgz#3abe43aef3835f8ae077d136ddce0f276b0400e6" integrity sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg== -duplexify@^3.4.2, duplexify@^3.6.0: +duplexify@^3.4.2, duplexify@^3.5.0, duplexify@^3.6.0: version "3.7.1" resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.7.1.tgz#2a4df5317f6ccfd91f86d6fd25d8d8a103b88309" integrity sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g== @@ -10845,6 +11200,16 @@ duplexify@^3.4.2, duplexify@^3.6.0: readable-stream "^2.0.0" stream-shift "^1.0.0" +duplexify@^4.1.2: + version "4.1.3" + resolved "https://registry.npmjs.org/duplexify/-/duplexify-4.1.3.tgz#a07e1c0d0a2c001158563d32592ba58bddb0236f" + integrity sha512-M3BmBhwJRZsSx38lZyhE53Csddgzl5R7xGJNk7CVddZD6CcmwMCH8J+7AprIrQKH7TonKxaCjcv27Qmf+sQ+oA== + dependencies: + end-of-stream "^1.4.1" + inherits "^2.0.3" + readable-stream "^3.1.1" + stream-shift "^1.0.2" + eastasianwidth@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb" @@ -10858,6 +11223,13 @@ ecc-jsbn@~0.1.1: jsbn "~0.1.0" safer-buffer "^2.1.0" +ecdsa-sig-formatter@1.0.11: + version "1.0.11" + resolved "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz#ae0f0fa2d85045ef14a817daa3ce9acd0489e5bf" + integrity sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ== + dependencies: + safe-buffer "^5.0.1" + editor@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/editor/-/editor-1.0.0.tgz#60c7f87bd62bcc6a894fa8ccd6afb7823a24f742" @@ -10945,6 +11317,11 @@ encodeurl@^1.0.2, encodeurl@~1.0.2: resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w== +encodeurl@~2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz#7b8ea898077d7e409d3ac45474ea38eaf0857a58" + integrity sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg== + encoding@^0.1.11, encoding@^0.1.13: version "0.1.13" resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.13.tgz#56574afdd791f54a8e9b2785c0582a2d26210fa9" @@ -11017,6 +11394,11 @@ env-paths@^2.2.0, env-paths@^2.2.1: resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2" integrity sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A== +envinfo@7.14.0: + version "7.14.0" + resolved "https://registry.npmjs.org/envinfo/-/envinfo-7.14.0.tgz#26dac5db54418f2a4c1159153a0b2ae980838aae" + integrity sha512-CO40UI41xDQzhLB1hWyqUKgFhs250pNcGbyGKe1l/e4FSaI/+YE4IMG76GDt0In67WLPACIITC+sOi08x4wIvg== + envinfo@^7.7.3: version "7.13.0" resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.13.0.tgz#81fbb81e5da35d74e814941aeab7c325a606fb31" @@ -11120,6 +11502,11 @@ es-define-property@^1.0.0: dependencies: get-intrinsic "^1.2.4" +es-define-property@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz#983eb2f9a6724e9303f61addf011c72e09e0b0fa" + integrity sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g== + es-errors@^1.2.1, es-errors@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" @@ -11172,6 +11559,13 @@ es-object-atoms@^1.0.0: dependencies: es-errors "^1.3.0" +es-object-atoms@^1.1.1: + version "1.1.1" + resolved "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz#1c4f2c4837327597ce69d2ca190a7fdd172338c1" + integrity sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA== + dependencies: + es-errors "^1.3.0" + es-set-tostringtag@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz#8bb60f0a440c2e4281962428438d58545af39777" @@ -11181,6 +11575,16 @@ es-set-tostringtag@^2.0.3: has-tostringtag "^1.0.2" hasown "^2.0.1" +es-set-tostringtag@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz#f31dbbe0c183b00a6d26eb6325c810c0fd18bd4d" + integrity sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA== + dependencies: + es-errors "^1.3.0" + get-intrinsic "^1.2.6" + has-tostringtag "^1.0.2" + hasown "^2.0.2" + es-shim-unscopables@^1.0.0, es-shim-unscopables@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz#1f6942e71ecc7835ed1c8a83006d8771a63a3763" @@ -11664,6 +12068,11 @@ event-stream@4.0.1: stream-combiner "^0.2.2" through "^2.3.8" +event-target-shim@^5.0.0: + version "5.0.1" + resolved "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" + integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== + eventemitter2@^6.4.2: version "6.4.9" resolved "https://registry.yarnpkg.com/eventemitter2/-/eventemitter2-6.4.9.tgz#41f2750781b4230ed58827bc119d293471ecb125" @@ -11679,7 +12088,7 @@ eventemitter3@^5.0.1: resolved "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz#53f5ffd0a492ac800721bb42c66b841de96423c4" integrity sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA== -events@^3.2.0: +events@^3.2.0, events@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== @@ -11782,6 +12191,85 @@ exponential-backoff@^3.1.1: resolved "https://registry.yarnpkg.com/exponential-backoff/-/exponential-backoff-3.1.1.tgz#64ac7526fe341ab18a39016cd22c787d01e00bf6" integrity sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw== +express-rate-limit@5.5.1: + version "5.5.1" + resolved "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-5.5.1.tgz#110c23f6a65dfa96ab468eda95e71697bc6987a2" + integrity sha512-MTjE2eIbHv5DyfuFz4zLYWxpqVhEhkTiwFGuB74Q9CSou2WHO52nlE5y3Zlg6SIsiYUIPj6ifFxnkPz6O3sIUg== + +express@4.21.0: + version "4.21.0" + resolved "https://registry.npmjs.org/express/-/express-4.21.0.tgz#d57cb706d49623d4ac27833f1cbc466b668eb915" + integrity sha512-VqcNGcj/Id5ZT1LZ/cfihi3ttTn+NJmkli2eZADigjq29qTlWi/hAQ43t/VLPq8+UX06FCEx3ByOYet6ZFblng== + dependencies: + accepts "~1.3.8" + array-flatten "1.1.1" + body-parser "1.20.3" + content-disposition "0.5.4" + content-type "~1.0.4" + cookie "0.6.0" + cookie-signature "1.0.6" + debug "2.6.9" + depd "2.0.0" + encodeurl "~2.0.0" + escape-html "~1.0.3" + etag "~1.8.1" + finalhandler "1.3.1" + fresh "0.5.2" + http-errors "2.0.0" + merge-descriptors "1.0.3" + methods "~1.1.2" + on-finished "2.4.1" + parseurl "~1.3.3" + path-to-regexp "0.1.10" + proxy-addr "~2.0.7" + qs "6.13.0" + range-parser "~1.2.1" + safe-buffer "5.2.1" + send "0.19.0" + serve-static "1.16.2" + setprototypeof "1.2.0" + statuses "2.0.1" + type-is "~1.6.18" + utils-merge "1.0.1" + vary "~1.1.2" + +express@4.21.1: + version "4.21.1" + resolved "https://registry.npmjs.org/express/-/express-4.21.1.tgz#9dae5dda832f16b4eec941a4e44aa89ec481b281" + integrity sha512-YSFlK1Ee0/GC8QaO91tHcDxJiE/X4FbpAyQWkxAvG6AXCuR65YzK8ua6D9hvi/TzUfZMpc+BwuM1IPw8fmQBiQ== + dependencies: + accepts "~1.3.8" + array-flatten "1.1.1" + body-parser "1.20.3" + content-disposition "0.5.4" + content-type "~1.0.4" + cookie "0.7.1" + cookie-signature "1.0.6" + debug "2.6.9" + depd "2.0.0" + encodeurl "~2.0.0" + escape-html "~1.0.3" + etag "~1.8.1" + finalhandler "1.3.1" + fresh "0.5.2" + http-errors "2.0.0" + merge-descriptors "1.0.3" + methods "~1.1.2" + on-finished "2.4.1" + parseurl "~1.3.3" + path-to-regexp "0.1.10" + proxy-addr "~2.0.7" + qs "6.13.0" + range-parser "~1.2.1" + safe-buffer "5.2.1" + send "0.19.0" + serve-static "1.16.2" + setprototypeof "1.2.0" + statuses "2.0.1" + type-is "~1.6.18" + utils-merge "1.0.1" + vary "~1.1.2" + express@^4.17.3, express@^4.19.2: version "4.19.2" resolved "https://registry.yarnpkg.com/express/-/express-4.19.2.tgz#e25437827a3aa7f2a827bc8171bbbb664a356465" @@ -11896,6 +12384,11 @@ fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== +fast-fifo@^1.2.0, fast-fifo@^1.3.2: + version "1.3.2" + resolved "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz#286e31de96eb96d38a97899815740ba2a4f3640c" + integrity sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ== + fast-glob@3.2.7: version "3.2.7" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.7.tgz#fd6cb7a2d7e9aa7a7846111e85a196d6b2f766a1" @@ -11928,6 +12421,16 @@ fast-levenshtein@^2.0.6: resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== +fast-redact@^3.0.0, fast-redact@^3.1.1: + version "3.5.0" + resolved "https://registry.npmjs.org/fast-redact/-/fast-redact-3.5.0.tgz#e9ea02f7e57d0cd8438180083e93077e496285e4" + integrity sha512-dwsoQlS7h9hMeYUq1W++23NDcBLV4KqONnITDV9DjfS3q1SgDGVrBdvvTLUotWtPSD7asWDV9/CmsZPy8Hf70A== + +fast-safe-stringify@2.1.1: + version "2.1.1" + resolved "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz#c406a83b6e70d9e35ce3b30a81141df30aeba884" + integrity sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA== + fast-uri@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-3.0.1.tgz#cddd2eecfc83a71c1be2cc2ef2061331be8a7134" @@ -12118,6 +12621,19 @@ finalhandler@1.2.0: statuses "2.0.1" unpipe "~1.0.0" +finalhandler@1.3.1: + version "1.3.1" + resolved "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz#0c575f1d1d324ddd1da35ad7ece3df7d19088019" + integrity sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ== + dependencies: + debug "2.6.9" + encodeurl "~2.0.0" + escape-html "~1.0.3" + on-finished "2.4.1" + parseurl "~1.3.3" + statuses "2.0.1" + unpipe "~1.0.0" + find-cache-dir@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-2.1.0.tgz#8d0f94cd13fe43c6c7c261a0d86115ca918c05f7" @@ -12322,6 +12838,16 @@ form-data@~2.3.2: combined-stream "^1.0.6" mime-types "^2.1.12" +form-data@~4.0.0: + version "4.0.2" + resolved "https://registry.npmjs.org/form-data/-/form-data-4.0.2.tgz#35cabbdd30c3ce73deb2c42d3c8d3ed9ca51794c" + integrity sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + es-set-tostringtag "^2.1.0" + mime-types "^2.1.12" + forwarded@0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811" @@ -12580,11 +13106,35 @@ get-intrinsic@^1.1.3, get-intrinsic@^1.2.1, get-intrinsic@^1.2.2, get-intrinsic@ has-symbols "^1.0.3" hasown "^2.0.0" +get-intrinsic@^1.2.6: + version "1.3.0" + resolved "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz#743f0e3b6964a93a5491ed1bffaae054d7f98d01" + integrity sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ== + dependencies: + call-bind-apply-helpers "^1.0.2" + es-define-property "^1.0.1" + es-errors "^1.3.0" + es-object-atoms "^1.1.1" + function-bind "^1.1.2" + get-proto "^1.0.1" + gopd "^1.2.0" + has-symbols "^1.1.0" + hasown "^2.0.2" + math-intrinsics "^1.1.0" + get-package-type@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== +get-proto@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz#150b3f2743869ef3e851ec0c49d15b1d14d00ee1" + integrity sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g== + dependencies: + dunder-proto "^1.0.1" + es-object-atoms "^1.0.0" + get-stream@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" @@ -12700,6 +13250,17 @@ glob@^10.2.2, glob@^10.3.10, glob@^10.3.7, glob@^10.4.1: package-json-from-dist "^1.0.0" path-scurry "^1.11.1" +glob@^6.0.1: + version "6.0.4" + resolved "https://registry.npmjs.org/glob/-/glob-6.0.4.tgz#0f08860f6a155127b2fadd4f9ce24b1aab6e4d22" + integrity sha512-MKZeRNyYZAVVVG1oZeLaWie1uweH40m9AZwIwxyPbTSX4hHrVYSzLg0Ro5Z5R7XKkIX+Cc6oD1rqeDJnwsB8/A== + dependencies: + inflight "^1.0.4" + inherits "2" + minimatch "2 || 3" + once "^1.3.0" + path-is-absolute "^1.0.0" + glob@^7.0.3, glob@^7.0.6, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, glob@^7.1.7, glob@^7.2.3: version "7.2.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" @@ -12864,6 +13425,11 @@ gopd@^1.0.1: dependencies: get-intrinsic "^1.1.3" +gopd@^1.2.0: + version "1.2.0" + resolved "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz#89f56b8217bdbc8802bd299df6d7f1081d7e51a1" + integrity sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg== + got@^11.8.5: version "11.8.6" resolved "https://registry.npmjs.org/got/-/got-11.8.6.tgz#276e827ead8772eddbcfc97170590b841823233a" @@ -12898,7 +13464,7 @@ got@^6.7.1: unzip-response "^2.0.1" url-parse-lax "^1.0.0" -graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.10, graceful-fs@^4.2.11, graceful-fs@^4.2.2, graceful-fs@^4.2.4, graceful-fs@^4.2.6, graceful-fs@^4.2.9: +graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.3, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.10, graceful-fs@^4.2.11, graceful-fs@^4.2.2, graceful-fs@^4.2.4, graceful-fs@^4.2.6, graceful-fs@^4.2.9: version "4.2.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== @@ -12913,6 +13479,18 @@ gridstack@^8.1.1: resolved "https://registry.yarnpkg.com/gridstack/-/gridstack-8.4.0.tgz#7af49159f9dc144c89a2c56246e1710406f75fcf" integrity sha512-qLJuJrBy9bbG3hI+h2cEhiuZ51J3MyEMmv5AXg7MCFiBeG8A4HyIUytueqtD/oZcA3Pccq2Xoj7GrwpmKOS3ig== +gunzip-maybe@^1.4.2: + version "1.4.2" + resolved "https://registry.npmjs.org/gunzip-maybe/-/gunzip-maybe-1.4.2.tgz#b913564ae3be0eda6f3de36464837a9cd94b98ac" + integrity sha512-4haO1M4mLO91PW57BMsDFf75UmwoRX0GkdD+Faw+Lr+r/OZrOCS0pIBwOL1xCKQqnQzbNFGgK2V2CpBUPeFNTw== + dependencies: + browserify-zlib "^0.1.4" + is-deflate "^1.0.0" + is-gzip "^1.0.0" + peek-stream "^1.1.0" + pumpify "^1.3.3" + through2 "^2.0.3" + gzip-size@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-6.0.0.tgz#065367fd50c239c0671cbcbad5be3e2eeb10e462" @@ -12930,7 +13508,7 @@ handle-thing@^2.0.0: resolved "https://registry.yarnpkg.com/handle-thing/-/handle-thing-2.0.1.tgz#857f79ce359580c340d43081cc648970d0bb234e" integrity sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg== -handlebars@^4.7.8: +handlebars@4.7.8, handlebars@^4.7.8: version "4.7.8" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.8.tgz#41c42c18b1be2365439188c77c6afae71c0cd9e9" integrity sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ== @@ -13008,6 +13586,11 @@ has-symbols@^1.0.2, has-symbols@^1.0.3: resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== +has-symbols@^1.1.0: + version "1.1.0" + resolved "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz#fc9c6a783a084951d0b971fe1018de813707a338" + integrity sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ== + has-tostringtag@^1.0.0, has-tostringtag@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz#2cdc42d40bef2e5b4eeab7c01a73c54ce7ab5abc" @@ -13312,6 +13895,25 @@ http-signature@~1.3.6: jsprim "^2.0.2" sshpk "^1.14.1" +http-signature@~1.4.0: + version "1.4.0" + resolved "https://registry.npmjs.org/http-signature/-/http-signature-1.4.0.tgz#dee5a9ba2bf49416abc544abd6d967f6a94c8c3f" + integrity sha512-G5akfn7eKbpDN+8nPS/cb57YeA1jLTVxjpCj7tmm3QKPdyDy7T+qSC40e9ptydSWvkwjSXw1VbkpyEm39ukeAg== + dependencies: + assert-plus "^1.0.0" + jsprim "^2.0.2" + sshpk "^1.18.0" + +http-status-codes@2.2.0: + version "2.2.0" + resolved "https://registry.npmjs.org/http-status-codes/-/http-status-codes-2.2.0.tgz#bb2efe63d941dfc2be18e15f703da525169622be" + integrity sha512-feERVo9iWxvnejp3SEfm/+oNG517npqL2/PIA8ORjyOZjGC7TwCRQsZylciLS64i6pJ0wRYz3rkXLRwbtFa8Ng== + +http-status-codes@2.3.0: + version "2.3.0" + resolved "https://registry.npmjs.org/http-status-codes/-/http-status-codes-2.3.0.tgz#987fefb28c69f92a43aecc77feec2866349a8bfc" + integrity sha512-RJ8XvFvpPM/Dmc5SV+dC4y5PCeOhT3x1Hq0NU3rjGeg5a/CqlhZ7uudknPwZFz4aeAXDcbAyaeP7GAo9lvngtA== + http2-wrapper@^1.0.0-beta.5.2: version "1.0.3" resolved "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.3.tgz#b8f55e0c1f25d4ebd08b3b0c2c079f9590800b3d" @@ -13320,6 +13922,14 @@ http2-wrapper@^1.0.0-beta.5.2: quick-lru "^5.1.1" resolve-alpn "^1.0.0" +https-proxy-agent@5.0.1, https-proxy-agent@^5.0.0, https-proxy-agent@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" + integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA== + dependencies: + agent-base "6" + debug "4" + https-proxy-agent@7.0.5, https-proxy-agent@^7.0.1: version "7.0.5" resolved "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz#9e8b5013873299e11fab6fd548405da2d6c602b2" @@ -13344,14 +13954,6 @@ https-proxy-agent@^4.0.0: agent-base "5" debug "4" -https-proxy-agent@^5.0.0, https-proxy-agent@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" - integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA== - dependencies: - agent-base "6" - debug "4" - human-signals@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3" @@ -13770,6 +14372,11 @@ is-date-object@^1.0.1, is-date-object@^1.0.5: dependencies: has-tostringtag "^1.0.0" +is-deflate@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/is-deflate/-/is-deflate-1.0.0.tgz#c862901c3c161fb09dac7cdc7e784f80e98f2f14" + integrity sha512-YDoFpuZWu1VRXlsnlYMzKyVRITXj7Ej/V9gXQ2/pAe7X1J7M/RNOqaIYi6qUn+B7nGyB9pDXrv02dsB58d2ZAQ== + is-docker@^2.0.0, is-docker@^2.1.1: version "2.2.1" resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" @@ -13840,6 +14447,11 @@ is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: dependencies: is-extglob "^2.1.1" +is-gzip@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/is-gzip/-/is-gzip-1.0.0.tgz#6ca8b07b99c77998025900e555ced8ed80879a83" + integrity sha512-rcfALRIb1YewtnksfRIHGcIY93QnK8BIQ/2c9yDYcG/Y6+vRoJuTWBmmSEbyLLYtXm7q35pHOHbZFQBaLrhlWQ== + is-inside-container@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz#e81fba699662eb31dbdaf26766a61d4814717ea4" @@ -14741,6 +15353,13 @@ js-tokens@^9.0.1: resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-9.0.1.tgz#2ec43964658435296f6761b34e10671c2d9527f4" integrity sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ== +js-yaml@4.1.0, js-yaml@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== + dependencies: + argparse "^2.0.1" + js-yaml@^3.10.0, js-yaml@^3.13.1: version "3.14.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" @@ -14749,13 +15368,6 @@ js-yaml@^3.10.0, js-yaml@^3.13.1: argparse "^1.0.7" esprima "^4.0.0" -js-yaml@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" - integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== - dependencies: - argparse "^2.0.1" - jsbn@1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-1.1.0.tgz#b01307cb29b618a1ed26ec79e911f803c4da0040" @@ -14971,6 +15583,22 @@ jsonparse@^1.2.0, jsonparse@^1.3.1: resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" integrity sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg== +jsonwebtoken@9.0.2: + version "9.0.2" + resolved "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz#65ff91f4abef1784697d40952bb1998c504caaf3" + integrity sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ== + dependencies: + jws "^3.2.2" + lodash.includes "^4.3.0" + lodash.isboolean "^3.0.3" + lodash.isinteger "^4.0.4" + lodash.isnumber "^3.0.3" + lodash.isplainobject "^4.0.6" + lodash.isstring "^4.0.1" + lodash.once "^4.0.0" + ms "^2.1.1" + semver "^7.5.4" + jsprim@^1.2.2: version "1.4.2" resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.2.tgz#712c65533a15c878ba59e9ed5f0e26d5b77c5feb" @@ -15016,6 +15644,23 @@ jszip@^3.1.3: readable-stream "~2.3.6" setimmediate "^1.0.5" +jwa@^1.4.1: + version "1.4.1" + resolved "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz#743c32985cb9e98655530d53641b66c8645b039a" + integrity sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA== + dependencies: + buffer-equal-constant-time "1.0.1" + ecdsa-sig-formatter "1.0.11" + safe-buffer "^5.0.1" + +jws@^3.2.2: + version "3.2.2" + resolved "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz#001099f3639468c9414000e99995fa52fb478304" + integrity sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA== + dependencies: + jwa "^1.4.1" + safe-buffer "^5.0.1" + karma-chrome-launcher@^3.1.0: version "3.2.0" resolved "https://registry.yarnpkg.com/karma-chrome-launcher/-/karma-chrome-launcher-3.2.0.tgz#eb9c95024f2d6dfbb3748d3415ac9b381906b9a9" @@ -15146,16 +15791,16 @@ kind-of@^6.0.2: resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== +kleur@4.1.5, kleur@^4.0.3: + version "4.1.5" + resolved "https://registry.yarnpkg.com/kleur/-/kleur-4.1.5.tgz#95106101795f7050c6c650f350c683febddb1780" + integrity sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ== + kleur@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== -kleur@^4.0.3: - version "4.1.5" - resolved "https://registry.yarnpkg.com/kleur/-/kleur-4.1.5.tgz#95106101795f7050c6c650f350c683febddb1780" - integrity sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ== - klona@^2.0.4, klona@^2.0.5: version "2.0.6" resolved "https://registry.yarnpkg.com/klona/-/klona-2.0.6.tgz#85bffbf819c03b2f53270412420a4555ef882e22" @@ -15648,7 +16293,7 @@ lock-verify@^2.0.2, lock-verify@^2.1.0, lock-verify@^2.2.2: npm-package-arg "^6.1.0" semver "^5.4.1" -lockfile@^1.0.4: +lockfile@1.0.4, lockfile@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/lockfile/-/lockfile-1.0.4.tgz#07f819d25ae48f87e538e6578b6964a4981a5609" integrity sha512-cvbTwETRfsFh4nHsL1eGWapU1XFi5Ot9E85sWAwia7Y7EgB7vfqcZhTKZ+l7hCGxSPoushMv5GKhT5PdLv03WA== @@ -15703,11 +16348,41 @@ lodash.get@^4.4.2: resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" integrity sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ== +lodash.includes@^4.3.0: + version "4.3.0" + resolved "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz#60bb98a87cb923c68ca1e51325483314849f553f" + integrity sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w== + +lodash.isboolean@^3.0.3: + version "3.0.3" + resolved "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz#6c2e171db2a257cd96802fd43b01b20d5f5870f6" + integrity sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg== + lodash.isequal@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0" integrity sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ== +lodash.isinteger@^4.0.4: + version "4.0.4" + resolved "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz#619c0af3d03f8b04c31f5882840b77b11cd68343" + integrity sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA== + +lodash.isnumber@^3.0.3: + version "3.0.3" + resolved "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz#3ce76810c5928d03352301ac287317f11c0b1ffc" + integrity sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw== + +lodash.isplainobject@^4.0.6: + version "4.0.6" + resolved "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb" + integrity sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA== + +lodash.isstring@^4.0.1: + version "4.0.1" + resolved "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz#d527dfb5456eca7cc9bb95d5daeaf88ba54a5451" + integrity sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw== + lodash.memoize@4.x, lodash.memoize@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" @@ -15718,7 +16393,7 @@ lodash.merge@^4.6.2: resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== -lodash.once@^4.1.1: +lodash.once@^4.0.0, lodash.once@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/lodash.once/-/lodash.once-4.1.1.tgz#0dd3971213c7c56df880977d504c88fb471a97ac" integrity sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg== @@ -15743,7 +16418,7 @@ lodash.without@~4.4.0: resolved "https://registry.yarnpkg.com/lodash.without/-/lodash.without-4.4.0.tgz#3cd4574a00b67bae373a94b748772640507b7aac" integrity sha512-M3MefBwfDhgKgINVuBJCO1YR3+gf6s9HNJsIiZ/Ru77Ws6uTb9eBuvrkpzO+9iLoAaRodGuq7tyrPCx+74QYGQ== -lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@~4.17.15: +lodash@4, lodash@4.17.21, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@~4.17.15: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -15823,6 +16498,17 @@ loupe@^2.3.6, loupe@^2.3.7: dependencies: get-func-name "^2.0.1" +lowdb@1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/lowdb/-/lowdb-1.0.0.tgz#5243be6b22786ccce30e50c9a33eac36b20c8064" + integrity sha512-2+x8esE/Wb9SQ1F9IHaYWfsC9FIecLOPrK4g17FGEayjUWH172H6nwicRovGvSE2CPZouc2MCIqCI7h9d+GftQ== + dependencies: + graceful-fs "^4.1.3" + is-promise "^2.1.0" + lodash "4" + pify "^3.0.0" + steno "^0.4.1" + lower-case@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-2.0.2.tgz#6fa237c63dbdc4a82ca0fd882e4722dc5e634e28" @@ -15840,6 +16526,11 @@ lowercase-keys@^2.0.0: resolved "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479" integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA== +lru-cache@7.18.3: + version "7.18.3" + resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz#f793896e0fd0e954a59dfdd82f0773808df6aa89" + integrity sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA== + lru-cache@^10.0.1, lru-cache@^10.2.0: version "10.4.3" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.4.3.tgz#410fc8a17b70e598013df257c2446b7f3383f119" @@ -16028,6 +16719,11 @@ marked@^4.3.0: resolved "https://registry.yarnpkg.com/marked/-/marked-4.3.0.tgz#796362821b019f734054582038b116481b456cf3" integrity sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A== +math-intrinsics@^1.1.0: + version "1.1.0" + resolved "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz#a0dd74be81e2aa5c2f27e65ce283605ee4e2b7f9" + integrity sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g== + md5@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/md5/-/md5-2.3.0.tgz#c3da9a6aae3a30b46b7b0c349b87b110dc3bda4f" @@ -16121,6 +16817,11 @@ merge-descriptors@1.0.1: resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" integrity sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w== +merge-descriptors@1.0.3: + version "1.0.3" + resolved "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz#d80319a65f3c7935351e5cfdac8f9318504dbed5" + integrity sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ== + merge-stream@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" @@ -16386,12 +17087,12 @@ mime@1.6.0, mime@^1.4.1, mime@^1.6.0: resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== -mime@^2.5.2: +mime@2.6.0, mime@^2.5.2: version "2.6.0" resolved "https://registry.yarnpkg.com/mime/-/mime-2.6.0.tgz#a2a682a95cd4d0cb1d6257e28f83da7e35800367" integrity sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg== -mime@^3.0.0: +mime@3.0.0, mime@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/mime/-/mime-3.0.0.tgz#b374550dca3a0c18443b0c950a6a58f1931cf7a7" integrity sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A== @@ -16466,6 +17167,20 @@ minimalistic-assert@^1.0.0: resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== +"minimatch@2 || 3", minimatch@^3.0.2, minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== + dependencies: + brace-expansion "^1.1.7" + +minimatch@7.4.6: + version "7.4.6" + resolved "https://registry.npmjs.org/minimatch/-/minimatch-7.4.6.tgz#845d6f254d8f4a5e4fd6baf44d5f10c8448365fb" + integrity sha512-sBz8G/YjVniEz6lKPNpKxXwazJe4c19fEfV2GDMX6AjFz+MX9uDWIZW8XreVhkFW3fkIdTv/gxWr/Kks5FFAVw== + dependencies: + brace-expansion "^2.0.1" + minimatch@9.0.3: version "9.0.3" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.3.tgz#a6e00c3de44c3a542bfaae70abfc22420a6da825" @@ -16473,13 +17188,6 @@ minimatch@9.0.3: dependencies: brace-expansion "^2.0.1" -minimatch@^3.0.2, minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" - integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== - dependencies: - brace-expansion "^1.1.7" - minimatch@^5.0.1: version "5.1.6" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96" @@ -16606,18 +17314,18 @@ mkdirp-classic@^0.5.2: resolved "https://registry.yarnpkg.com/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz#fa10c9115cc6d8865be221ba47ee9bed78601113" integrity sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A== -mkdirp@^0.5.1, mkdirp@^0.5.3, mkdirp@^0.5.4, mkdirp@^0.5.5, mkdirp@^0.5.6, mkdirp@~0.5.0: +mkdirp@1.0.4, mkdirp@^1.0.3, mkdirp@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" + integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== + +mkdirp@^0.5.1, mkdirp@^0.5.3, mkdirp@^0.5.4, mkdirp@^0.5.5, mkdirp@^0.5.6, mkdirp@~0.5.0, mkdirp@~0.5.1: version "0.5.6" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== dependencies: minimist "^1.2.6" -mkdirp@^1.0.3, mkdirp@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" - integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== - mkdirp@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-3.0.1.tgz#e44e4c5607fb279c168241713cc6e0fea9adcb50" @@ -16706,7 +17414,7 @@ ms@2.1.2: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -ms@2.1.3, ms@^2.0.0, ms@^2.1.1: +ms@2.1.3, ms@^2.0.0, ms@^2.1.1, ms@^2.1.3: version "2.1.3" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== @@ -16755,6 +17463,15 @@ mute-stream@~0.0.4: resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== +mv@2.1.1: + version "2.1.1" + resolved "https://registry.npmjs.org/mv/-/mv-2.1.1.tgz#ae6ce0d6f6d5e0a4f7d893798d03c1ea9559b6a2" + integrity sha512-at/ZndSy3xEGJ8i0ygALh8ru9qy7gWW1cmkaqBN29JmMlIvM//MEO9y1sk/avxuwnPcfhkejkLsuPxH81BrkSg== + dependencies: + mkdirp "~0.5.1" + ncp "~2.0.0" + rimraf "~2.4.0" + nan@^2.17.0: version "2.20.0" resolved "https://registry.yarnpkg.com/nan/-/nan-2.20.0.tgz#08c5ea813dd54ed16e5bd6505bf42af4f7838ca3" @@ -16770,6 +17487,11 @@ natural-compare@^1.4.0: resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== +ncp@~2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz#195a21d6c46e361d2fb1281ba38b91e9df7bdbb3" + integrity sha512-zIdGUrPRFTUELUvr3Gmc7KZ2Sw/h1PiVM0Af/oHB6zgnV1ikqSfRk+TOufi79aHYCW3NiOXmr1BP5nWbzojLaA== + needle@^3.1.0: version "3.3.1" resolved "https://registry.yarnpkg.com/needle/-/needle-3.3.1.tgz#63f75aec580c2e77e209f3f324e2cdf3d29bd049" @@ -16783,6 +17505,11 @@ negotiator@0.6.3, negotiator@^0.6.3: resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== +negotiator@~0.6.4: + version "0.6.4" + resolved "https://registry.npmjs.org/negotiator/-/negotiator-0.6.4.tgz#777948e2452651c570b712dd01c23e262713fff7" + integrity sha512-myRT3DiWPHqho5PrJaIRyaMv2kgYf0mUVgBNOYMuCH5Ki1yEiQaf/ZJuQ62nvpc44wL5WDbTX7yGJi1Neevw8w== + neo-async@^2.5.0, neo-async@^2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" @@ -16926,6 +17653,13 @@ node-fetch@^2.6.1, node-fetch@^2.6.12, node-fetch@^2.6.7: dependencies: whatwg-url "^5.0.0" +node-fetch@cjs: + version "2.6.7" + resolved "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" + integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== + dependencies: + whatwg-url "^5.0.0" + node-forge@^1: version "1.3.1" resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-1.3.1.tgz#be8da2af243b2417d5f646a770663a92b7e9ded3" @@ -17597,6 +18331,16 @@ ohash@^1.1.3: resolved "https://registry.yarnpkg.com/ohash/-/ohash-1.1.3.tgz#f12c3c50bfe7271ce3fd1097d42568122ccdcf07" integrity sha512-zuHHiGTYTA1sYJ/wZN+t5HKZaH23i4yI1HMwbuXm24Nid7Dv0KcuRlKoNKS9UNfAVSBlnGLcuQrnOKWOZoEGaw== +on-exit-leak-free@^0.2.0: + version "0.2.0" + resolved "https://registry.npmjs.org/on-exit-leak-free/-/on-exit-leak-free-0.2.0.tgz#b39c9e3bf7690d890f4861558b0d7b90a442d209" + integrity sha512-dqaz3u44QbRXQooZLTUKU41ZrzYrcvLISVgbrzbyCMxpmSLJvZ3ZamIJIZ29P6OhZIkNIQKosdeM6t1LYbA9hg== + +on-exit-leak-free@^2.1.0: + version "2.1.2" + resolved "https://registry.npmjs.org/on-exit-leak-free/-/on-exit-leak-free-2.1.2.tgz#fed195c9ebddb7d9e4c3842f93f281ac8dadd3b8" + integrity sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA== + on-finished@2.4.1, on-finished@^2.3.0, on-finished@^2.4.1: version "2.4.1" resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f" @@ -17969,7 +18713,7 @@ pacote@^9.1.0, pacote@^9.5.12, pacote@^9.5.3: unique-filename "^1.1.1" which "^1.3.1" -pako@^0.2.5: +pako@^0.2.5, pako@~0.2.0: version "0.2.9" resolved "https://registry.yarnpkg.com/pako/-/pako-0.2.9.tgz#f3f7522f4ef782348da8161bad9ecfd51bf83a75" integrity sha512-NUcwaKxUxWrZLpDG+z/xZaCgQITkA/Dv4V/T6bw7VON6l1Xz/VnrBqrYjZQ12TamKHzITTfOEIYUj48y2KXImA== @@ -18130,6 +18874,11 @@ path-scurry@^1.11.1: lru-cache "^10.2.0" minipass "^5.0.0 || ^6.0.2 || ^7.0.0" +path-to-regexp@0.1.10: + version "0.1.10" + resolved "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.10.tgz#67e9108c5c0551b9e5326064387de4763c4d5f8b" + integrity sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w== + path-to-regexp@0.1.7: version "0.1.7" resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" @@ -18195,6 +18944,15 @@ peek-readable@^5.1.3: resolved "https://registry.npmjs.org/peek-readable/-/peek-readable-5.3.1.tgz#9cc2c275cceda9f3d07a988f4f664c2080387dff" integrity sha512-GVlENSDW6KHaXcd9zkZltB7tCLosKB/4Hg0fqBJkAoBgYG2Tn1xtMgXtSUuMU9AK/gCm/tTdT8mgAeF4YNeeqw== +peek-stream@^1.1.0: + version "1.1.3" + resolved "https://registry.npmjs.org/peek-stream/-/peek-stream-1.1.3.tgz#3b35d84b7ccbbd262fff31dc10da56856ead6d67" + integrity sha512-FhJ+YbOSBb9/rIl2ZeE/QHEsWn7PqNYt8ARAY3kIgNGOk13g9FGyIY6JIl/xB/3TFRVoTv5as0l11weORrTekA== + dependencies: + buffer-from "^1.0.0" + duplexify "^3.5.0" + through2 "^2.0.3" + pend@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" @@ -18262,6 +19020,66 @@ pinkie@^2.0.0: resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" integrity sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg== +pino-abstract-transport@1.1.0, pino-abstract-transport@v1.1.0: + version "1.1.0" + resolved "https://registry.npmjs.org/pino-abstract-transport/-/pino-abstract-transport-1.1.0.tgz#083d98f966262164504afb989bccd05f665937a8" + integrity sha512-lsleG3/2a/JIWUtf9Q5gUNErBqwIu1tUKTT3dUzaf5DySw9ra1wcqKjJjLX1VTY64Wk1eEOYsVGSaGfCK85ekA== + dependencies: + readable-stream "^4.0.0" + split2 "^4.0.0" + +pino-abstract-transport@v0.5.0: + version "0.5.0" + resolved "https://registry.npmjs.org/pino-abstract-transport/-/pino-abstract-transport-0.5.0.tgz#4b54348d8f73713bfd14e3dc44228739aa13d9c0" + integrity sha512-+KAgmVeqXYbTtU2FScx1XS3kNyfZ5TrXY07V96QnUSFqo2gAqlvmaxH67Lj7SWazqsMabf+58ctdTcBgnOLUOQ== + dependencies: + duplexify "^4.1.2" + split2 "^4.0.0" + +pino-std-serializers@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/pino-std-serializers/-/pino-std-serializers-4.0.0.tgz#1791ccd2539c091ae49ce9993205e2cd5dbba1e2" + integrity sha512-cK0pekc1Kjy5w9V2/n+8MkZwusa6EyyxfeQCB799CQRhRt/CqYKiWs5adeu8Shve2ZNffvfC/7J64A2PJo1W/Q== + +pino-std-serializers@^6.0.0: + version "6.2.2" + resolved "https://registry.npmjs.org/pino-std-serializers/-/pino-std-serializers-6.2.2.tgz#d9a9b5f2b9a402486a5fc4db0a737570a860aab3" + integrity sha512-cHjPPsE+vhj/tnhCy/wiMh3M3z3h/j15zHQX+S9GkTBgqJuTuJzYJ4gUyACLhDaJ7kk9ba9iRDmbH2tJU03OiA== + +pino@7.11.0: + version "7.11.0" + resolved "https://registry.npmjs.org/pino/-/pino-7.11.0.tgz#0f0ea5c4683dc91388081d44bff10c83125066f6" + integrity sha512-dMACeu63HtRLmCG8VKdy4cShCPKaYDR4youZqoSWLxl5Gu99HUw8bw75thbPv9Nip+H+QYX8o3ZJbTdVZZ2TVg== + dependencies: + atomic-sleep "^1.0.0" + fast-redact "^3.0.0" + on-exit-leak-free "^0.2.0" + pino-abstract-transport v0.5.0 + pino-std-serializers "^4.0.0" + process-warning "^1.0.0" + quick-format-unescaped "^4.0.3" + real-require "^0.1.0" + safe-stable-stringify "^2.1.0" + sonic-boom "^2.2.1" + thread-stream "^0.15.1" + +pino@8.17.2: + version "8.17.2" + resolved "https://registry.npmjs.org/pino/-/pino-8.17.2.tgz#0ed20175623a69d31664a1e8a5f85476272224be" + integrity sha512-LA6qKgeDMLr2ux2y/YiUt47EfgQ+S9LznBWOJdN3q1dx2sv0ziDLUBeVpyVv17TEcGCBuWf0zNtg3M5m1NhhWQ== + dependencies: + atomic-sleep "^1.0.0" + fast-redact "^3.1.1" + on-exit-leak-free "^2.1.0" + pino-abstract-transport v1.1.0 + pino-std-serializers "^6.0.0" + process-warning "^3.0.0" + quick-format-unescaped "^4.0.3" + real-require "^0.2.0" + safe-stable-stringify "^2.3.1" + sonic-boom "^3.7.0" + thread-stream "^2.0.0" + pirates@^4.0.4, pirates@^4.0.6: version "4.0.6" resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.6.tgz#3018ae32ecfcff6c29ba2267cbf21166ac1f36b9" @@ -18320,6 +19138,11 @@ pkg-types@^1.2.1: mlly "^1.7.2" pathe "^1.1.2" +pkginfo@0.4.1: + version "0.4.1" + resolved "https://registry.npmjs.org/pkginfo/-/pkginfo-0.4.1.tgz#b5418ef0439de5425fc4995042dced14fb2a84ff" + integrity sha512-8xCNE/aT/EXKenuMDZ+xTVwkT8gsoHN2z/Q29l80u0ppGEXVvsKRzNMbtKhg8LS8k1tJLAHHylf6p4VFmP6XUQ== + png-js@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/png-js/-/png-js-1.0.0.tgz#e5484f1e8156996e383aceebb3789fd75df1874d" @@ -19206,6 +20029,16 @@ process-nextick-args@~2.0.0: resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== +process-warning@1.0.0, process-warning@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/process-warning/-/process-warning-1.0.0.tgz#980a0b25dc38cd6034181be4b7726d89066b4616" + integrity sha512-du4wfLyj4yCZq1VupnVSZmRsPJsNuxoDQFdCFHLaYiEbFBD7QE0a+I4D7hOxrVnh78QE/YipFAj9lXHiXocV+Q== + +process-warning@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/process-warning/-/process-warning-3.0.0.tgz#96e5b88884187a1dce6f5c3166d611132058710b" + integrity sha512-mqn0kFRl0EoqhnL0GQ0veqFHyIN1yig9RHh/InzORTUiZHFRAur+aMtRkELNwGs9aNwKS6tg/An4NYBPGwvtzQ== + process@^0.11.10: version "0.11.10" resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" @@ -19586,7 +20419,7 @@ qs@6.11.0: dependencies: side-channel "^1.0.4" -qs@^6.12.3, qs@^6.4.0: +qs@6.13.0, qs@^6.12.3, qs@^6.4.0: version "6.13.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.13.0.tgz#6ca3bd58439f7e245655798997787b0d88a51906" integrity sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg== @@ -19630,6 +20463,11 @@ queue-microtask@^1.2.2: resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== +quick-format-unescaped@^4.0.3: + version "4.0.4" + resolved "https://registry.npmjs.org/quick-format-unescaped/-/quick-format-unescaped-4.0.4.tgz#93ef6dd8d3453cbc7970dd614fad4c5954d6b5a7" + integrity sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg== + quick-lru@^5.1.1: version "5.1.1" resolved "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz#366493e6b3e42a3a6885e2e99d18f80fb7a8c932" @@ -19822,6 +20660,17 @@ readable-stream@^3.0.6, readable-stream@^3.1.1, readable-stream@^3.4.0, readable string_decoder "^1.1.1" util-deprecate "^1.0.1" +readable-stream@^4.0.0: + version "4.7.0" + resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-4.7.0.tgz#cedbd8a1146c13dfff8dab14068028d58c15ac91" + integrity sha512-oIGGmcpTLwPga8Bn6/Z75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg== + dependencies: + abort-controller "^3.0.0" + buffer "^6.0.3" + events "^3.3.0" + process "^0.11.10" + string_decoder "^1.3.0" + readable-stream@~1.1.10: version "1.1.14" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" @@ -19856,6 +20705,16 @@ readdirp@~3.6.0: dependencies: picomatch "^2.2.1" +real-require@^0.1.0: + version "0.1.0" + resolved "https://registry.npmjs.org/real-require/-/real-require-0.1.0.tgz#736ac214caa20632847b7ca8c1056a0767df9381" + integrity sha512-r/H9MzAWtrv8aSVjPCMFpDMl5q66GqtmmRkRjpHTsp4zBAa+snZyiQNlMONiUmEJcsnaw0wCauJ2GWODr/aFkg== + +real-require@^0.2.0: + version "0.2.0" + resolved "https://registry.npmjs.org/real-require/-/real-require-0.2.0.tgz#209632dea1810be2ae063a6ac084fee7e33fba78" + integrity sha512-57frrGM/OCTLqLOAh0mhVA9VBMHd+9U7Zb2THMGdBUoZVOtGbJzjxsYGDJ3A9AYYCP4hn6y1TVbaOfzWtm5GFg== + recast@^0.23.3, recast@^0.23.5: version "0.23.9" resolved "https://registry.yarnpkg.com/recast/-/recast-0.23.9.tgz#587c5d3a77c2cfcb0c18ccce6da4361528c2587b" @@ -20239,6 +21098,13 @@ rimraf@^5.0.5: dependencies: glob "^10.3.7" +rimraf@~2.4.0: + version "2.4.5" + resolved "https://registry.npmjs.org/rimraf/-/rimraf-2.4.5.tgz#ee710ce5d93a8fdb856fb5ea8ff0e2d75934b2da" + integrity sha512-J5xnxTyqaiw06JjMftq7L9ouA448dw/E7dKghkP9WpKNuwmARNNg+Gk8/u5ryb9N/Yo2+z3MCwuqFK/+qPOPfQ== + dependencies: + glob "^6.0.1" + rimraf@~2.6.2: version "2.6.3" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" @@ -20491,6 +21357,11 @@ safe-regex-test@^1.0.3: es-errors "^1.3.0" is-regex "^1.1.4" +safe-stable-stringify@^2.1.0, safe-stable-stringify@^2.3.1: + version "2.5.0" + resolved "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.5.0.tgz#4ca2f8e385f2831c432a719b108a3bf7af42a1dd" + integrity sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA== + "safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" @@ -20688,6 +21559,25 @@ send@0.18.0, send@latest: range-parser "~1.2.1" statuses "2.0.1" +send@0.19.0: + version "0.19.0" + resolved "https://registry.npmjs.org/send/-/send-0.19.0.tgz#bbc5a388c8ea6c048967049dbeac0e4a3f09d7f8" + integrity sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw== + dependencies: + debug "2.6.9" + depd "2.0.0" + destroy "1.2.0" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + fresh "0.5.2" + http-errors "2.0.0" + mime "1.6.0" + ms "2.1.3" + on-finished "2.4.1" + range-parser "~1.2.1" + statuses "2.0.1" + serialize-javascript@^6.0.0, serialize-javascript@^6.0.1, serialize-javascript@^6.0.2: version "6.0.2" resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.2.tgz#defa1e055c83bf6d59ea805d8da862254eb6a6c2" @@ -20718,6 +21608,16 @@ serve-static@1.15.0: parseurl "~1.3.3" send "0.18.0" +serve-static@1.16.2: + version "1.16.2" + resolved "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz#b6a5343da47f6bdd2673848bf45754941e803296" + integrity sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw== + dependencies: + encodeurl "~2.0.0" + escape-html "~1.0.3" + parseurl "~1.3.3" + send "0.19.0" + set-blocking@^2.0.0, set-blocking@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" @@ -21008,6 +21908,27 @@ socks@~2.3.2: ip "1.1.5" smart-buffer "^4.1.0" +sonic-boom@3.8.0: + version "3.8.0" + resolved "https://registry.npmjs.org/sonic-boom/-/sonic-boom-3.8.0.tgz#e442c5c23165df897d77c3c14ef3ca40dec66a66" + integrity sha512-ybz6OYOUjoQQCQ/i4LU8kaToD8ACtYP+Cj5qd2AO36bwbdewxWJ3ArmJ2cr6AvxlL2o0PqnCcPGUgkILbfkaCA== + dependencies: + atomic-sleep "^1.0.0" + +sonic-boom@^2.2.1: + version "2.8.0" + resolved "https://registry.npmjs.org/sonic-boom/-/sonic-boom-2.8.0.tgz#c1def62a77425090e6ad7516aad8eb402e047611" + integrity sha512-kuonw1YOYYNOve5iHdSahXPOK49GqwA+LZhI6Wz/l0rP57iKyXXIHaRagOBHAPmGwJC6od2Z9zgvZ5loSgMlVg== + dependencies: + atomic-sleep "^1.0.0" + +sonic-boom@^3.7.0: + version "3.8.1" + resolved "https://registry.npmjs.org/sonic-boom/-/sonic-boom-3.8.1.tgz#d5ba8c4e26d6176c9a1d14d549d9ff579a163422" + integrity sha512-y4Z8LCDBuum+PBP3lSV7RHrXscqksve/bi0as7mhwVnBW+/wUqKT/2Kb7um8yqcFy0duYbbPxzt89Zy2nOCaxg== + dependencies: + atomic-sleep "^1.0.0" + sort-keys-length@^1.0.0: version "1.0.1" resolved "https://registry.npmjs.org/sort-keys-length/-/sort-keys-length-1.0.1.tgz#9cb6f4f4e9e48155a6aa0671edd336ff1479a188" @@ -21163,6 +22084,11 @@ split-on-first@^1.0.0: resolved "https://registry.yarnpkg.com/split-on-first/-/split-on-first-1.1.0.tgz#f610afeee3b12bce1d0c30425e76398b78249a5f" integrity sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw== +split2@^4.0.0: + version "4.2.0" + resolved "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz#c9c5920904d148bab0b9f67145f245a86aadbfa4" + integrity sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg== + split@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/split/-/split-1.0.1.tgz#605bd9be303aa59fb35f9229fbea0ddec9ea07d9" @@ -21180,7 +22106,7 @@ sprintf-js@~1.0.2: resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== -sshpk@^1.14.1, sshpk@^1.7.0: +sshpk@^1.14.1, sshpk@^1.18.0, sshpk@^1.7.0: version "1.18.0" resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.18.0.tgz#1663e55cddf4d688b86a46b77f0d5fe363aba028" integrity sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ== @@ -21241,6 +22167,13 @@ std-env@^3.5.0: resolved "https://registry.npmjs.org/std-env/-/std-env-3.8.0.tgz#b56ffc1baf1a29dcc80a3bdf11d7fca7c315e7d5" integrity sha512-Bc3YwwCB+OzldMxOXJIIvC6cPRWr/LxOp48CdQTOkPyk/t4JWWJbrilwBd7RJzKV8QW7tJkcgAmeuLLJugl5/w== +steno@^0.4.1: + version "0.4.4" + resolved "https://registry.npmjs.org/steno/-/steno-0.4.4.tgz#071105bdfc286e6615c0403c27e9d7b5dcb855cb" + integrity sha512-EEHMVYHNXFHfGtgjNITnka0aHhiAlo93F7z2/Pwd+g0teG9CnM3JIINM7hVVB5/rhw9voufD7Wukwgtw2uqh6w== + dependencies: + graceful-fs "^4.1.3" + stop-iteration-iterator@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/stop-iteration-iterator/-/stop-iteration-iterator-1.0.0.tgz#6a60be0b4ee757d1ed5254858ec66b10c49285e4" @@ -21306,7 +22239,7 @@ stream-iterate@^1.1.0: readable-stream "^2.1.5" stream-shift "^1.0.0" -stream-shift@^1.0.0: +stream-shift@^1.0.0, stream-shift@^1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.3.tgz#85b8fab4d71010fc3ba8772e8046cc49b8a3864b" integrity sha512-76ORR0DO1o1hlKwTbi/DM3EXWGf3ZJYO8cXX5RJwnul2DEg2oyoZyjLNoQM8WsvZiFKCRfC1O0J7iCvie3RZmQ== @@ -21325,6 +22258,16 @@ streamsearch@^1.1.0: resolved "https://registry.yarnpkg.com/streamsearch/-/streamsearch-1.1.0.tgz#404dd1e2247ca94af554e841a8ef0eaa238da764" integrity sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg== +streamx@^2.15.0: + version "2.22.0" + resolved "https://registry.npmjs.org/streamx/-/streamx-2.22.0.tgz#cd7b5e57c95aaef0ff9b2aef7905afa62ec6e4a7" + integrity sha512-sLh1evHOzBy/iWRiR6d1zRcLao4gGZr3C1kzNz4fopCOKJb6xD9ub8Mpi9Mr1R6id5o43S+d93fI48UC5uM9aw== + dependencies: + fast-fifo "^1.3.2" + text-decoder "^1.1.0" + optionalDependencies: + bare-events "^2.2.0" + strict-uri-encode@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546" @@ -21348,7 +22291,7 @@ string-length@^4.0.1: char-regex "^1.0.2" strip-ansi "^6.0.0" -"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: +"string-width-cjs@npm:string-width@^4.2.0": version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -21366,6 +22309,15 @@ string-width@^1.0.1: is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" +"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + string-width@^2.0.0, string-width@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" @@ -21447,7 +22399,7 @@ string.prototype.trimstart@^1.0.8: define-properties "^1.2.1" es-object-atoms "^1.0.0" -string_decoder@^1.1.1: +string_decoder@^1.1.1, string_decoder@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== @@ -21471,7 +22423,7 @@ stringify-package@^1.0.0, stringify-package@^1.0.1: resolved "https://registry.yarnpkg.com/stringify-package/-/stringify-package-1.0.1.tgz#e5aa3643e7f74d0f28628b72f3dad5cecfc3ba85" integrity sha512-sa4DUQsYciMP1xhKWGuFM04fB0LG/9DlluZoSVywUMRNvzid6XucHK0/90xGxRoHrAaROrcHK1aPKaijCtSrhg== -"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: +"strip-ansi-cjs@npm:strip-ansi@^6.0.1": version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -21499,6 +22451,13 @@ strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: dependencies: ansi-regex "^4.1.0" +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + strip-ansi@^7.0.1, strip-ansi@^7.1.0: version "7.1.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" @@ -21766,6 +22725,15 @@ tar-stream@^2.1.4, tar-stream@~2.2.0: inherits "^2.0.3" readable-stream "^3.1.1" +tar-stream@^3.1.7: + version "3.1.7" + resolved "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.7.tgz#24b3fb5eabada19fe7338ed6d26e5f7c482e792b" + integrity sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ== + dependencies: + b4a "^1.6.4" + fast-fifo "^1.2.0" + streamx "^2.15.0" + tar@^4.4.10, tar@^4.4.12, tar@^4.4.19: version "4.4.19" resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.19.tgz#2e4d7263df26f2b914dee10c825ab132123742f3" @@ -21874,6 +22842,13 @@ test@^0.6.0: dependencies: ansi-font "0.0.2" +text-decoder@^1.1.0: + version "1.2.3" + resolved "https://registry.npmjs.org/text-decoder/-/text-decoder-1.2.3.tgz#b19da364d981b2326d5f43099c310cc80d770c65" + integrity sha512-3/o9z3X0X0fTupwsYvR03pJ/DjWuqqrfwBgTQzdWDiQSm9KitAyz/9WqsT2JQW7KV2m+bC2ol/zqpW37NHxLaA== + dependencies: + b4a "^1.6.4" + text-table@^0.2.0, text-table@~0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" @@ -21884,12 +22859,26 @@ thingies@^1.20.0: resolved "https://registry.npmjs.org/thingies/-/thingies-1.21.0.tgz#e80fbe58fd6fdaaab8fad9b67bd0a5c943c445c1" integrity sha512-hsqsJsFMsV+aD4s3CWKk85ep/3I9XzYV/IXaSouJMYIoDlgyi11cBhsqYe9/geRfB0YIikBQg6raRaM+nIMP9g== +thread-stream@^0.15.1: + version "0.15.2" + resolved "https://registry.npmjs.org/thread-stream/-/thread-stream-0.15.2.tgz#fb95ad87d2f1e28f07116eb23d85aba3bc0425f4" + integrity sha512-UkEhKIg2pD+fjkHQKyJO3yoIvAP3N6RlNFt2dUhcS1FGvCD1cQa1M/PGknCLFIyZdtJOWQjejp7bdNqmN7zwdA== + dependencies: + real-require "^0.1.0" + +thread-stream@^2.0.0: + version "2.7.0" + resolved "https://registry.npmjs.org/thread-stream/-/thread-stream-2.7.0.tgz#d8a8e1b3fd538a6cca8ce69dbe5d3d097b601e11" + integrity sha512-qQiRWsU/wvNolI6tbbCKd9iKaTnCXsTwVxhhKM6nctPdujTyztjlbUkUTUymidWcMnZ5pWR0ej4a0tjsW021vw== + dependencies: + real-require "^0.2.0" + throttleit@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/throttleit/-/throttleit-1.0.1.tgz#304ec51631c3b770c65c6c6f76938b384000f4d5" integrity sha512-vDZpf9Chs9mAdfY046mcPt8fg5QSZr37hEH4TXYBnDF+izxgrbRGUAAaBvIk/fJm9aOFCGFd1EsNg5AZCbnQCQ== -through2@^2.0.0: +through2@^2.0.0, through2@^2.0.3: version "2.0.5" resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== @@ -21969,6 +22958,18 @@ tippy.js@^6.3.7: dependencies: "@popperjs/core" "^2.9.0" +tldts-core@^6.1.86: + version "6.1.86" + resolved "https://registry.npmjs.org/tldts-core/-/tldts-core-6.1.86.tgz#a93e6ed9d505cb54c542ce43feb14c73913265d8" + integrity sha512-Je6p7pkk+KMzMv2XXKmAE3McmolOQFdxkKw0R8EYNr7sELW46JqnNeTX8ybPiQgvg1ymCoF8LXs5fzFaZvJPTA== + +tldts@^6.1.32: + version "6.1.86" + resolved "https://registry.npmjs.org/tldts/-/tldts-6.1.86.tgz#087e0555b31b9725ee48ca7e77edc56115cd82f7" + integrity sha512-WMi/OQ2axVTf/ykqCQgXiIct+mSQDFdH2fkwhPwgEwvJ1kSzZRiinb0zF2Xb8u4+OqPChmyI6MEu4EezNJz+FQ== + dependencies: + tldts-core "^6.1.86" + tmp@0.0.30: version "0.0.30" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.30.tgz#72419d4a8be7d6ce75148fd8b324e593a711c2ed" @@ -22033,6 +23034,13 @@ tough-cookie@^4.1.2, tough-cookie@^4.1.3: universalify "^0.2.0" url-parse "^1.5.3" +tough-cookie@^5.0.0: + version "5.1.2" + resolved "https://registry.npmjs.org/tough-cookie/-/tough-cookie-5.1.2.tgz#66d774b4a1d9e12dc75089725af3ac75ec31bed7" + integrity sha512-FVDYdxtnj0G6Qm/DhNPSb8Ju59ULcup3tuJxkFb5K8Bv2pUXILbf0xZWU8PX8Ov19OXljbUyveOFwRMwkXzO+A== + dependencies: + tldts "^6.1.32" + tough-cookie@~2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" @@ -22293,6 +23301,11 @@ tweetnacl@^0.14.3, tweetnacl@~0.14.0: resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" integrity sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA== +typanion@^3.8.0: + version "3.14.0" + resolved "https://registry.npmjs.org/typanion/-/typanion-3.14.0.tgz#a766a91810ce8258033975733e836c43a2929b94" + integrity sha512-ZW/lVMRabETuYCd9O9ZvMhAh8GslSqaUjxmK/JLPCh6l73CvLBiuXswj/+7LdnWOgYsQ130FqLzFz5aGT4I3Ug== + type-check@^0.4.0, type-check@~0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" @@ -22636,7 +23649,7 @@ universalify@^2.0.0: resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.1.tgz#168efc2180964e6386d061e094df61afe239b18d" integrity sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw== -unix-crypt-td-js@^1.1.4: +unix-crypt-td-js@1.1.4, unix-crypt-td-js@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/unix-crypt-td-js/-/unix-crypt-td-js-1.1.4.tgz#4912dfad1c8aeb7d20fa0a39e4c31918c1d5d5dd" integrity sha512-8rMeVYWSIyccIJscb9NdCfZKSRBKYTeVnwmiRYT2ulE3qd1RaDQ0xQDP+rI3ccIWbhu/zuo5cgN8z73belNZgw== @@ -22835,7 +23848,7 @@ validate-npm-package-name@^5.0.0: resolved "https://registry.yarnpkg.com/validate-npm-package-name/-/validate-npm-package-name-5.0.1.tgz#a316573e9b49f3ccd90dbb6eb52b3f06c6d604e8" integrity sha512-OljLrQ9SQdOUqTaQxqL5dEfZWrXExyyWsozYlAWFawPVNuD83igl7uJD2RTkNMbniIYgt8l81eCJGIdQF7avLQ== -validator@^13.7.0: +validator@13.12.0, validator@^13.7.0: version "13.12.0" resolved "https://registry.npmjs.org/validator/-/validator-13.12.0.tgz#7d78e76ba85504da3fee4fd1922b385914d4b35f" integrity sha512-c1Q0mCiPlgdTVVVIJIrBuxNicYE+t/7oKeI9MWLj3fh/uq2Pxh/3eeWbVZ4OcGW1TUf53At0njHw5SMdA3tmMg== @@ -22845,6 +23858,75 @@ vary@^1, vary@^1.1.2, vary@~1.1.2: resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg== +verdaccio-audit@13.0.0-next-8.1: + version "13.0.0-next-8.1" + resolved "https://registry.npmjs.org/verdaccio-audit/-/verdaccio-audit-13.0.0-next-8.1.tgz#ec6cf7e70cbc0becdf64ffa793079b9034279292" + integrity sha512-EEfUeC1kHuErtwF9FC670W+EXHhcl+iuigONkcprwRfkPxmdBs+Hx36745hgAMZ9SCqedNECaycnGF3tZ3VYfw== + dependencies: + "@verdaccio/config" "8.0.0-next-8.1" + "@verdaccio/core" "8.0.0-next-8.1" + express "4.21.0" + https-proxy-agent "5.0.1" + node-fetch cjs + +verdaccio-htpasswd@13.0.0-next-8.1: + version "13.0.0-next-8.1" + resolved "https://registry.npmjs.org/verdaccio-htpasswd/-/verdaccio-htpasswd-13.0.0-next-8.1.tgz#50ccbbf6d3abbcb4075d36c6c0b212b2bc80c529" + integrity sha512-BfvmO+ZdbwfttOwrdTPD6Bccr1ZfZ9Tk/9wpXamxdWB/XPWlk3FtyGsvqCmxsInRLPhQ/FSk9c3zRCGvICTFYg== + dependencies: + "@verdaccio/core" "8.0.0-next-8.1" + "@verdaccio/file-locking" "13.0.0-next-8.0" + apache-md5 "1.1.8" + bcryptjs "2.4.3" + core-js "3.37.1" + debug "4.3.7" + http-errors "2.0.0" + unix-crypt-td-js "1.1.4" + +verdaccio@^5.0.4: + version "5.33.0" + resolved "https://registry.npmjs.org/verdaccio/-/verdaccio-5.33.0.tgz#340fbcb52a0ee63daed629d87399d390101e229a" + integrity sha512-mZWTt/k3KyprhS9IriUEHfKSV4lqB9P1aTVhw5GcNgu4533GSsJRwlBwrFijnoBbWDVarjZoIf+t8wq0iv+5jg== + dependencies: + "@cypress/request" "3.0.6" + "@verdaccio/auth" "8.0.0-next-8.1" + "@verdaccio/config" "8.0.0-next-8.1" + "@verdaccio/core" "8.0.0-next-8.1" + "@verdaccio/local-storage-legacy" "11.0.2" + "@verdaccio/logger-7" "8.0.0-next-8.1" + "@verdaccio/middleware" "8.0.0-next-8.1" + "@verdaccio/search-indexer" "8.0.0-next-8.0" + "@verdaccio/signature" "8.0.0-next-8.0" + "@verdaccio/streams" "10.2.1" + "@verdaccio/tarball" "13.0.0-next-8.1" + "@verdaccio/ui-theme" "8.0.0-next-8.1" + "@verdaccio/url" "13.0.0-next-8.1" + "@verdaccio/utils" "7.0.1-next-8.1" + JSONStream "1.3.5" + async "3.2.6" + clipanion "4.0.0-rc.4" + compression "1.7.5" + cors "2.8.5" + debug "^4.3.7" + envinfo "7.14.0" + express "4.21.1" + express-rate-limit "5.5.1" + fast-safe-stringify "2.1.1" + handlebars "4.7.8" + js-yaml "4.1.0" + jsonwebtoken "9.0.2" + kleur "4.1.5" + lodash "4.17.21" + lru-cache "7.18.3" + mime "3.0.0" + mkdirp "1.0.4" + mv "2.1.1" + pkginfo "0.4.1" + semver "7.6.3" + validator "13.12.0" + verdaccio-audit "13.0.0-next-8.1" + verdaccio-htpasswd "13.0.0-next-8.1" + verror@1.10.0: version "1.10.0" resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" @@ -23486,7 +24568,7 @@ worker-farm@^1.6.0, worker-farm@^1.7.0: dependencies: errno "~0.1.7" -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -23521,6 +24603,15 @@ wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" From 6da4f6cd215609861336e885bfee42207ac03d7d Mon Sep 17 00:00:00 2001 From: Kevin Davila <56242609+kevindaviladev@users.noreply.github.com> Date: Fri, 25 Apr 2025 15:19:57 -0500 Subject: [PATCH 02/15] Finished migration to use @dotcms/types in all libraries --- .../blocks/contentlet.component.ts | 2 +- .../blocks/image.component.ts | 2 +- .../blocks/table.component.ts | 2 +- .../blocks/text.component.ts | 2 +- .../blocks/video.components.ts | 2 +- ...ms-block-editor-renderer.component.spec.ts | 4 +- .../dotcms-block-editor-renderer.component.ts | 5 +- .../dotcms-block-editor-item.component.ts | 4 +- .../item/dotcms-block-editor-item.spec.ts | 4 +- .../dotcms-editable-text.component.ts | 2 +- .../column/column.component.spec.ts | 4 +- .../components/column/column.component.ts | 2 +- .../container/container.component.spec.ts | 2 +- .../container/container.component.ts | 12 +- .../contentlet/contentlet.component.spec.ts | 2 +- .../contentlet/contentlet.component.ts | 2 +- .../fallback-component.component.ts | 2 +- .../fallback-component.spec.ts | 2 +- .../components/row/row.component.spec.ts | 4 +- .../components/row/row.component.ts | 2 +- .../dotcms-layout-body.component.spec.ts | 8 +- .../dotcms-layout-body.component.ts | 2 +- .../dotcms-show-when.directive.spec.ts | 2 +- .../dotcms-show-when.directive.ts | 2 +- .../libs/sdk/angular/next/models/index.ts | 2 +- .../angular/next/store/dotcms.store.spec.ts | 2 +- .../sdk/angular/next/store/dotcms.store.ts | 2 +- .../sdk/angular/next/utils/testing.utils.ts | 2 +- core-web/libs/sdk/angular/package.json | 1 + .../dotcms-layout/dotcms-layout.component.ts | 2 +- core-web/libs/sdk/client/package.json | 9 +- core-web/libs/sdk/client/project.json | 5 +- .../sdk/client/src/lib/client/models/types.ts | 610 ------------------ .../client/src/lib/client/page/page-api.ts | 3 +- core-web/libs/sdk/client/src/types.ts | 3 - core-web/libs/sdk/react/README.md | 2 +- core-web/libs/sdk/react/package.json | 3 +- .../deprecated/hooks/useDotcmsEditor.spec.ts | 4 +- .../lib/deprecated/hooks/useDotcmsEditor.ts | 2 +- .../components/DotCMSLayoutBody.test.tsx | 2 +- .../__test__/components/DotCMSShow.test.tsx | 2 +- .../components/FallbackComponent.test.tsx | 2 +- .../lib/next/__test__/components/Row.test.tsx | 2 +- .../__test__/hook/useDotCMSShowWhen.test.tsx | 2 +- .../hook/useEditableDotCMSPage.test.tsx | 2 +- .../next/__test__/hook/useIsDevMode.test.tsx | 2 +- .../sdk/react/src/lib/next/__test__/mock.ts | 6 +- .../src/lib/next/components/Column/Column.tsx | 2 +- .../next/components/Container/Container.tsx | 2 +- .../Container/ContainerFallbacks.tsx | 2 +- .../next/components/Contentlet/Contentlet.tsx | 2 +- .../DotCMSLayoutBody/DotCMSLayoutBody.tsx | 2 +- .../next/components/DotCMSShow/DotCMSShow.tsx | 2 +- .../FallbackComponent/FallbackComponent.tsx | 2 +- .../react/src/lib/next/components/Row/Row.tsx | 2 +- .../lib/next/contexts/DotCMSPageContext.tsx | 2 +- .../src/lib/next/hooks/useDotCMSShowWhen.ts | 2 +- .../lib/next/hooks/useEditableDotCMSPage.ts | 2 +- .../react/src/lib/next/hooks/useIsDevMode.ts | 2 +- core-web/libs/sdk/types/package.json | 13 +- core-web/libs/sdk/types/project.json | 8 +- core-web/libs/sdk/types/src/components.ts | 1 - core-web/libs/sdk/types/src/editor.ts | 1 - core-web/libs/sdk/types/src/events.ts | 1 - core-web/libs/sdk/types/src/index.ts | 5 +- .../src/{__internal__.ts => internal.ts} | 0 .../libs/sdk/types/src/lib/editor/public.ts | 16 +- .../libs/sdk/types/src/lib/page/public.ts | 124 ++++ core-web/libs/sdk/uve/package.json | 7 +- core-web/libs/sdk/uve/project.json | 5 +- core-web/libs/sdk/uve/src/internal.ts | 6 - .../libs/sdk/uve/src/internal/constants.ts | 4 +- core-web/libs/sdk/uve/src/internal/events.ts | 5 +- .../libs/sdk/uve/src/lib/core/core.spec.ts | 6 +- .../libs/sdk/uve/src/lib/core/core.utils.ts | 9 +- core-web/libs/sdk/uve/src/lib/dom/dom.spec.ts | 3 +- .../libs/sdk/uve/src/lib/dom/dom.utils.ts | 11 +- .../libs/sdk/uve/src/lib/editor/internal.ts | 4 +- .../sdk/uve/src/lib/editor/public.spec.ts | 4 +- .../libs/sdk/uve/src/lib/editor/public.ts | 12 +- .../types/block-editor-renderer/internal.ts | 47 -- .../lib/types/block-editor-renderer/public.ts | 41 -- .../sdk/uve/src/lib/types/editor/internal.ts | 129 ---- .../sdk/uve/src/lib/types/editor/public.ts | 292 --------- .../sdk/uve/src/lib/types/events/internal.ts | 34 - .../sdk/uve/src/lib/types/events/public.ts | 19 - .../libs/sdk/uve/src/lib/types/page/public.ts | 513 --------------- .../libs/sdk/uve/src/script/sdk-editor.ts | 3 +- core-web/libs/sdk/uve/src/script/utils.ts | 3 +- core-web/libs/sdk/uve/src/types.ts | 4 - core-web/tsconfig.base.json | 1 + dotCMS/src/main/webapp/ext/uve/dot-uve.js | 2 +- 92 files changed, 271 insertions(+), 1835 deletions(-) delete mode 100644 core-web/libs/sdk/client/src/lib/client/models/types.ts delete mode 100644 core-web/libs/sdk/client/src/types.ts delete mode 100644 core-web/libs/sdk/types/src/components.ts delete mode 100644 core-web/libs/sdk/types/src/editor.ts delete mode 100644 core-web/libs/sdk/types/src/events.ts rename core-web/libs/sdk/types/src/{__internal__.ts => internal.ts} (100%) delete mode 100644 core-web/libs/sdk/uve/src/lib/types/block-editor-renderer/internal.ts delete mode 100644 core-web/libs/sdk/uve/src/lib/types/block-editor-renderer/public.ts delete mode 100644 core-web/libs/sdk/uve/src/lib/types/editor/internal.ts delete mode 100644 core-web/libs/sdk/uve/src/lib/types/editor/public.ts delete mode 100644 core-web/libs/sdk/uve/src/lib/types/events/internal.ts delete mode 100644 core-web/libs/sdk/uve/src/lib/types/events/public.ts delete mode 100644 core-web/libs/sdk/uve/src/lib/types/page/public.ts delete mode 100644 core-web/libs/sdk/uve/src/types.ts diff --git a/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/blocks/contentlet.component.ts b/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/blocks/contentlet.component.ts index 2ff21d86dbc1..13cbef9dcd0d 100644 --- a/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/blocks/contentlet.component.ts +++ b/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/blocks/contentlet.component.ts @@ -1,7 +1,7 @@ import { AsyncPipe, NgComponentOutlet } from '@angular/common'; import { ChangeDetectionStrategy, Component, computed, Input } from '@angular/core'; -import { Contentlet, ContentNode } from '@dotcms/uve/types'; +import { Contentlet, ContentNode } from '@dotcms/types'; import { DynamicComponentEntity } from '../../../models'; import { CustomRenderer } from '../dotcms-block-editor-renderer.component'; diff --git a/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/blocks/image.component.ts b/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/blocks/image.component.ts index e115624ed391..86d18068132d 100644 --- a/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/blocks/image.component.ts +++ b/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/blocks/image.component.ts @@ -1,6 +1,6 @@ import { ChangeDetectionStrategy, Component, computed, Input } from '@angular/core'; -import { ContentNode } from '@dotcms/uve/types'; +import { ContentNode } from '@dotcms/types'; @Component({ selector: 'dotcms-block-editor-renderer-image', diff --git a/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/blocks/table.component.ts b/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/blocks/table.component.ts index 28a4206e5a99..1fe6c967acf5 100644 --- a/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/blocks/table.component.ts +++ b/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/blocks/table.component.ts @@ -1,7 +1,7 @@ import { NgComponentOutlet } from '@angular/common'; import { Component, Input } from '@angular/core'; -import { ContentNode } from '@dotcms/uve/types'; +import { ContentNode } from '@dotcms/types'; import { DotCMSBlockEditorItemComponent } from '../item/dotcms-block-editor-item.component'; @Component({ diff --git a/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/blocks/text.component.ts b/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/blocks/text.component.ts index 19b689a613b1..3175ef1de212 100644 --- a/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/blocks/text.component.ts +++ b/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/blocks/text.component.ts @@ -1,6 +1,6 @@ import { ChangeDetectionStrategy, Component, computed, Input } from '@angular/core'; -import { Mark } from '@dotcms/uve/types'; +import { Mark } from '@dotcms/types'; @Component({ selector: 'dotcms-block-editor-renderer-paragraph', diff --git a/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/blocks/video.components.ts b/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/blocks/video.components.ts index 26745ca63ca9..2bec43d64802 100644 --- a/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/blocks/video.components.ts +++ b/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/blocks/video.components.ts @@ -1,6 +1,6 @@ import { ChangeDetectionStrategy, Component, computed, Input } from '@angular/core'; -import { ContentNode } from '@dotcms/uve/types'; +import { ContentNode } from '@dotcms/types'; @Component({ selector: 'dotcms-block-editor-renderer-video', diff --git a/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/dotcms-block-editor-renderer.component.spec.ts b/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/dotcms-block-editor-renderer.component.spec.ts index 21e787139720..27478c23b9c8 100644 --- a/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/dotcms-block-editor-renderer.component.spec.ts +++ b/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/dotcms-block-editor-renderer.component.spec.ts @@ -1,8 +1,8 @@ import { createComponentFactory, Spectator } from '@ngneat/spectator/jest'; +import { Block, UVE_MODE } from '@dotcms/types'; +import { BlockEditorState } from '@dotcms/types/internal'; import { getUVEState } from '@dotcms/uve'; -import { BlockEditorState } from '@dotcms/uve/internal'; -import { Block, UVE_MODE } from '@dotcms/uve/types'; import { DotCMSBlockEditorRendererComponent } from './dotcms-block-editor-renderer.component'; import { DotCMSBlockEditorItemComponent } from './item/dotcms-block-editor-item.component'; diff --git a/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/dotcms-block-editor-renderer.component.ts b/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/dotcms-block-editor-renderer.component.ts index 60beb89e37d9..764d343e4f7e 100644 --- a/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/dotcms-block-editor-renderer.component.ts +++ b/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/dotcms-block-editor-renderer.component.ts @@ -1,8 +1,9 @@ import { Component, Input, signal } from '@angular/core'; +import { UVE_MODE, Block } from '@dotcms/types'; +import { BlockEditorState } from '@dotcms/types/internal'; import { getUVEState } from '@dotcms/uve'; -import { BlockEditorState, isValidBlocks } from '@dotcms/uve/internal'; -import { UVE_MODE, Block } from '@dotcms/uve/types'; +import { isValidBlocks } from '@dotcms/uve/internal'; import { DotCMSBlockEditorItemComponent } from './item/dotcms-block-editor-item.component'; diff --git a/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/item/dotcms-block-editor-item.component.ts b/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/item/dotcms-block-editor-item.component.ts index b75b111e1d23..b30dd609d22f 100644 --- a/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/item/dotcms-block-editor-item.component.ts +++ b/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/item/dotcms-block-editor-item.component.ts @@ -1,8 +1,8 @@ import { AsyncPipe, NgComponentOutlet, NgTemplateOutlet } from '@angular/common'; import { Component, Input } from '@angular/core'; -import { Blocks } from '@dotcms/uve/internal'; -import { ContentNode } from '@dotcms/uve/types'; +import { ContentNode } from '@dotcms/types'; +import { Blocks } from '@dotcms/types/internal'; import { DotCodeBlock, DotBlockQuote } from '../blocks/code.component'; import { DotContentletBlock } from '../blocks/contentlet.component'; diff --git a/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/item/dotcms-block-editor-item.spec.ts b/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/item/dotcms-block-editor-item.spec.ts index cc2992f0ebdd..1ca1c2a36774 100644 --- a/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/item/dotcms-block-editor-item.spec.ts +++ b/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/item/dotcms-block-editor-item.spec.ts @@ -3,8 +3,8 @@ import { createComponentFactory, Spectator } from '@ngneat/spectator/jest'; import { Component, Input } from '@angular/core'; import { fakeAsync, tick } from '@angular/core/testing'; -import { Blocks } from '@dotcms/uve/internal'; -import { ContentNode } from '@dotcms/uve/types'; +import { ContentNode } from '@dotcms/types'; +import { Blocks } from '@dotcms/types/internal'; import { DotCMSBlockEditorItemComponent } from './dotcms-block-editor-item.component'; diff --git a/core-web/libs/sdk/angular/next/components/dotcms-editable-text/dotcms-editable-text.component.ts b/core-web/libs/sdk/angular/next/components/dotcms-editable-text/dotcms-editable-text.component.ts index 21e7fb751298..11a356400745 100644 --- a/core-web/libs/sdk/angular/next/components/dotcms-editable-text/dotcms-editable-text.component.ts +++ b/core-web/libs/sdk/angular/next/components/dotcms-editable-text/dotcms-editable-text.component.ts @@ -22,7 +22,7 @@ import { NOTIFY_CLIENT, postMessageToEditor } from '@dotcms/client'; -import { DotCMSContentlet } from '@dotcms/uve/types'; +import { DotCMSContentlet } from '@dotcms/types'; import { TINYMCE_CONFIG, DOT_EDITABLE_TEXT_FORMAT, DOT_EDITABLE_TEXT_MODE } from './utils'; diff --git a/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/column/column.component.spec.ts b/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/column/column.component.spec.ts index e1c102984dba..b6f8c4286c22 100644 --- a/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/column/column.component.spec.ts +++ b/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/column/column.component.spec.ts @@ -2,6 +2,8 @@ import { expect } from '@jest/globals'; import { Spectator, byTestId, createComponentFactory } from '@ngneat/spectator/jest'; import { MockComponent } from 'ng-mocks'; +import { DotCMSColumnContainer } from '@dotcms/types'; + import { ColumnComponent } from './column.component'; import { ContainerComponent } from '../container/container.component'; @@ -39,7 +41,7 @@ describe('ColumnComponent', () => { const mockContainers = [ { identifier: 'test-container-1' }, { identifier: 'test-container-2' } - ]; + ] as unknown as DotCMSColumnContainer[]; spectator.setInput({ column: { diff --git a/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/column/column.component.ts b/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/column/column.component.ts index 49aee6f4353c..f3858560323b 100644 --- a/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/column/column.component.ts +++ b/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/column/column.component.ts @@ -1,7 +1,7 @@ import { ChangeDetectionStrategy, Component, HostBinding, Input, OnChanges } from '@angular/core'; +import { DotPageAssetLayoutColumn } from '@dotcms/types'; import { combineClasses, getColumnPositionClasses } from '@dotcms/uve/internal'; -import { DotPageAssetLayoutColumn } from '@dotcms/uve/types'; import { ContainerComponent } from '../container/container.component'; /** diff --git a/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/container/container.component.spec.ts b/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/container/container.component.spec.ts index f7dcc3dce84e..24b81a4755bf 100644 --- a/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/container/container.component.spec.ts +++ b/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/container/container.component.spec.ts @@ -1,7 +1,7 @@ import { expect, describe, it, beforeEach, jest } from '@jest/globals'; import { Spectator, createComponentFactory } from '@ngneat/spectator/jest'; -import { DotCMSContentlet, EditableContainerData } from '@dotcms/uve/types'; +import { DotCMSContentlet, EditableContainerData } from '@dotcms/types'; import { ContainerComponent } from './container.component'; diff --git a/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/container/container.component.ts b/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/container/container.component.ts index e473ad999d3b..4a27f1ffb899 100644 --- a/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/container/container.component.ts +++ b/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/container/container.component.ts @@ -9,17 +9,17 @@ import { signal } from '@angular/core'; -import { - getContainersData, - getContentletsInContainer, - getDotContainerAttributes -} from '@dotcms/uve/internal'; import { DotCMSColumnContainer, DotCMSContentlet, DotContainerAttributes, EditableContainerData -} from '@dotcms/uve/types'; +} from '@dotcms/types'; +import { + getContainersData, + getContentletsInContainer, + getDotContainerAttributes +} from '@dotcms/uve/internal'; import { ContainerNotFoundComponent } from './components/container-not-found/container-not-found.component'; import { EmptyContainerComponent } from './components/empty-container/empty-container.component'; diff --git a/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/contentlet/contentlet.component.spec.ts b/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/contentlet/contentlet.component.spec.ts index ac943b0c8a65..1033a176314c 100644 --- a/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/contentlet/contentlet.component.spec.ts +++ b/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/contentlet/contentlet.component.spec.ts @@ -3,8 +3,8 @@ import { createComponentFactory, Spectator } from '@ngneat/spectator/jest'; import { Component, ElementRef, Input, Type } from '@angular/core'; +import { DotCMSContentlet } from '@dotcms/types'; import { CUSTOM_NO_COMPONENT } from '@dotcms/uve/internal'; -import { DotCMSContentlet } from '@dotcms/uve/types'; import { ContentletComponent } from './contentlet.component'; diff --git a/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/contentlet/contentlet.component.ts b/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/contentlet/contentlet.component.ts index aa7ff2a24708..852f6c5b0e14 100644 --- a/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/contentlet/contentlet.component.ts +++ b/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/contentlet/contentlet.component.ts @@ -12,8 +12,8 @@ import { ViewChild } from '@angular/core'; +import { DotCMSContentlet, DotContentletAttributes } from '@dotcms/types'; import { CUSTOM_NO_COMPONENT, getDotContentletAttributes } from '@dotcms/uve/internal'; -import { DotCMSContentlet, DotContentletAttributes } from '@dotcms/uve/types'; import { DynamicComponentEntity } from '../../../../models'; import { DotCMSStore } from '../../../../store/dotcms.store'; diff --git a/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/fallback-component/fallback-component.component.ts b/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/fallback-component/fallback-component.component.ts index 9f904a31a75f..bdcad830f4cc 100644 --- a/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/fallback-component/fallback-component.component.ts +++ b/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/fallback-component/fallback-component.component.ts @@ -1,7 +1,7 @@ import { AsyncPipe, NgComponentOutlet } from '@angular/common'; import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; -import { DotCMSContentlet } from '@dotcms/uve/types'; +import { DotCMSContentlet } from '@dotcms/types'; import { DynamicComponentEntity } from '../../../../models'; diff --git a/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/fallback-component/fallback-component.spec.ts b/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/fallback-component/fallback-component.spec.ts index 53607eeb421b..e5c47ac2f64c 100644 --- a/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/fallback-component/fallback-component.spec.ts +++ b/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/fallback-component/fallback-component.spec.ts @@ -3,7 +3,7 @@ import { createComponentFactory, Spectator } from '@ngneat/spectator/jest'; import { Component, Input } from '@angular/core'; -import { DotCMSContentlet } from '@dotcms/uve/types'; +import { DotCMSContentlet } from '@dotcms/types'; import { FallbackComponent } from './fallback-component.component'; diff --git a/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/row/row.component.spec.ts b/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/row/row.component.spec.ts index 3571c65aeb6e..efe1abe51470 100644 --- a/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/row/row.component.spec.ts +++ b/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/row/row.component.spec.ts @@ -1,6 +1,8 @@ import { expect } from '@jest/globals'; import { Spectator, byTestId, createComponentFactory } from '@ngneat/spectator/jest'; +import { DotPageAssetLayoutColumn } from '@dotcms/types'; + import { RowComponent } from './row.component'; describe('RowComponent', () => { @@ -33,7 +35,7 @@ describe('RowComponent', () => { const mockColumns = [ { containers: [], leftOffset: 0, width: 12 }, { containers: [], leftOffset: 0, width: 12 } - ]; + ] as unknown as DotPageAssetLayoutColumn[]; spectator.setInput({ row: { diff --git a/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/row/row.component.ts b/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/row/row.component.ts index 45bc6e25e37b..022e1b7e69c8 100644 --- a/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/row/row.component.ts +++ b/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/row/row.component.ts @@ -1,7 +1,7 @@ import { ChangeDetectionStrategy, Component, Input, OnChanges, signal } from '@angular/core'; +import { DotPageAssetLayoutRow } from '@dotcms/types'; import { combineClasses } from '@dotcms/uve/internal'; -import { DotPageAssetLayoutRow } from '@dotcms/uve/types'; import { ColumnComponent } from '../column/column.component'; diff --git a/core-web/libs/sdk/angular/next/components/dotcms-layout-body/dotcms-layout-body.component.spec.ts b/core-web/libs/sdk/angular/next/components/dotcms-layout-body/dotcms-layout-body.component.spec.ts index c1be8afbab3d..3797aad18b56 100644 --- a/core-web/libs/sdk/angular/next/components/dotcms-layout-body/dotcms-layout-body.component.spec.ts +++ b/core-web/libs/sdk/angular/next/components/dotcms-layout-body/dotcms-layout-body.component.spec.ts @@ -1,8 +1,8 @@ import { expect } from '@jest/globals'; import { Spectator, byTestId, createRoutingFactory } from '@ngneat/spectator/jest'; +import { UVE_MODE } from '@dotcms/types'; import * as uve from '@dotcms/uve'; -import { UVE_MODE } from '@dotcms/uve/types'; import { RowComponent } from './components/row/row.component'; import { DotCMSLayoutBodyComponent } from './dotcms-layout-body.component'; @@ -61,7 +61,7 @@ describe('DotCMSLayoutBodyComponent', () => { it('should show page error message if page is not found and is on development mode', () => { getUVEStateMock.mockReturnValue(undefined); - spectator.setInput({ page: null, mode: 'development' }); + spectator.setInput({ page: undefined, mode: 'development' }); spectator.detectChanges(); expect(spectator.query(byTestId('error-message'))).toBeTruthy(); @@ -73,7 +73,7 @@ describe('DotCMSLayoutBodyComponent', () => { languageId: 'en' }); - spectator.setInput({ page: null, mode: 'production' }); + spectator.setInput({ page: undefined, mode: 'production' }); spectator.detectChanges(); expect(spectator.query(byTestId('error-message'))).toBeFalsy(); @@ -97,7 +97,7 @@ describe('DotCMSLayoutBodyComponent', () => { }); spectator.setInput({ - page: null, + page: undefined, mode: 'production' }); spectator.detectChanges(); diff --git a/core-web/libs/sdk/angular/next/components/dotcms-layout-body/dotcms-layout-body.component.ts b/core-web/libs/sdk/angular/next/components/dotcms-layout-body/dotcms-layout-body.component.ts index dc78ea107649..17bc9fb38251 100644 --- a/core-web/libs/sdk/angular/next/components/dotcms-layout-body/dotcms-layout-body.component.ts +++ b/core-web/libs/sdk/angular/next/components/dotcms-layout-body/dotcms-layout-body.component.ts @@ -7,7 +7,7 @@ import { signal } from '@angular/core'; -import { DotCMSPageAsset, DotCMSPageRendererMode, DotPageAssetLayoutRow } from '@dotcms/uve/types'; +import { DotCMSPageAsset, DotCMSPageRendererMode, DotPageAssetLayoutRow } from '@dotcms/types'; import { PageErrorMessageComponent } from './components/page-error-message/page-error-message.component'; import { RowComponent } from './components/row/row.component'; diff --git a/core-web/libs/sdk/angular/next/directives/dotcms-show-when/dotcms-show-when.directive.spec.ts b/core-web/libs/sdk/angular/next/directives/dotcms-show-when/dotcms-show-when.directive.spec.ts index 5f98454054db..0ed265862505 100644 --- a/core-web/libs/sdk/angular/next/directives/dotcms-show-when/dotcms-show-when.directive.spec.ts +++ b/core-web/libs/sdk/angular/next/directives/dotcms-show-when/dotcms-show-when.directive.spec.ts @@ -1,8 +1,8 @@ import { describe, it, expect } from '@jest/globals'; import { byTestId, createDirectiveFactory } from '@ngneat/spectator/jest'; +import { UVE_MODE, UVEState } from '@dotcms/types'; import { getUVEState } from '@dotcms/uve'; -import { UVE_MODE, UVEState } from '@dotcms/uve/types'; import { DotCMSShowWhenDirective } from './dotcms-show-when.directive'; diff --git a/core-web/libs/sdk/angular/next/directives/dotcms-show-when/dotcms-show-when.directive.ts b/core-web/libs/sdk/angular/next/directives/dotcms-show-when/dotcms-show-when.directive.ts index 0aa481788dcc..b9babacb4921 100644 --- a/core-web/libs/sdk/angular/next/directives/dotcms-show-when/dotcms-show-when.directive.ts +++ b/core-web/libs/sdk/angular/next/directives/dotcms-show-when/dotcms-show-when.directive.ts @@ -1,7 +1,7 @@ import { Directive, Input, ViewContainerRef, TemplateRef, inject } from '@angular/core'; +import { UVE_MODE, UVEState } from '@dotcms/types'; import { getUVEState } from '@dotcms/uve'; -import { UVE_MODE, UVEState } from '@dotcms/uve/types'; /** * Directive to show a template when the UVE is in a specific mode. diff --git a/core-web/libs/sdk/angular/next/models/index.ts b/core-web/libs/sdk/angular/next/models/index.ts index b4f1cc09d7eb..5f94bda4ad14 100644 --- a/core-web/libs/sdk/angular/next/models/index.ts +++ b/core-web/libs/sdk/angular/next/models/index.ts @@ -2,7 +2,7 @@ import { Type } from '@angular/core'; -import { DotCMSPageAsset, DotCMSPageRendererMode } from '@dotcms/uve/types'; +import { DotCMSPageAsset, DotCMSPageRendererMode } from '@dotcms/types'; /** * Represents a dynamic component entity. diff --git a/core-web/libs/sdk/angular/next/store/dotcms.store.spec.ts b/core-web/libs/sdk/angular/next/store/dotcms.store.spec.ts index 765008ef4e62..eac756f5fe2a 100644 --- a/core-web/libs/sdk/angular/next/store/dotcms.store.spec.ts +++ b/core-web/libs/sdk/angular/next/store/dotcms.store.spec.ts @@ -7,9 +7,9 @@ jest.mock('@dotcms/uve', () => ({ getUVEState: jest.fn() })); +import { DotCMSPageAsset, UVE_MODE } from '@dotcms/types'; import { getUVEState } from '@dotcms/uve'; import { DEVELOPMENT_MODE, PRODUCTION_MODE } from '@dotcms/uve/internal'; -import { DotCMSPageAsset, UVE_MODE } from '@dotcms/uve/types'; import { DotCMSStore, EMPTY_DOTCMS_PAGE_STORE } from './dotcms.store'; diff --git a/core-web/libs/sdk/angular/next/store/dotcms.store.ts b/core-web/libs/sdk/angular/next/store/dotcms.store.ts index 4599bafbe717..172898a1190d 100644 --- a/core-web/libs/sdk/angular/next/store/dotcms.store.ts +++ b/core-web/libs/sdk/angular/next/store/dotcms.store.ts @@ -1,8 +1,8 @@ import { computed, Injectable, signal } from '@angular/core'; +import { DotCMSPageAsset, UVE_MODE } from '@dotcms/types'; import { getUVEState } from '@dotcms/uve'; import { DEVELOPMENT_MODE, PRODUCTION_MODE } from '@dotcms/uve/internal'; -import { DotCMSPageAsset, UVE_MODE } from '@dotcms/uve/types'; import { DotCMSPageStore } from '../models'; diff --git a/core-web/libs/sdk/angular/next/utils/testing.utils.ts b/core-web/libs/sdk/angular/next/utils/testing.utils.ts index 548e73d2852b..061ae66271d5 100644 --- a/core-web/libs/sdk/angular/next/utils/testing.utils.ts +++ b/core-web/libs/sdk/angular/next/utils/testing.utils.ts @@ -1,4 +1,4 @@ -import { DotCMSPageAsset, DotCMSContentlet } from '@dotcms/uve/types'; +import { DotCMSPageAsset, DotCMSContentlet } from '@dotcms/types'; export const PageResponseMock: DotCMSPageAsset = { canCreateTemplate: true, diff --git a/core-web/libs/sdk/angular/package.json b/core-web/libs/sdk/angular/package.json index 796656f3c9f1..c33f988bf99c 100644 --- a/core-web/libs/sdk/angular/package.json +++ b/core-web/libs/sdk/angular/package.json @@ -7,6 +7,7 @@ "@angular/router": ">=17.0.0", "@dotcms/client": "next", "@dotcms/uve": "next", + "@dotcms/types": "next", "@tinymce/tinymce-angular": "^8.0.0", "rxjs": ">=7.0.0" }, diff --git a/core-web/libs/sdk/angular/src/lib/deprecated/layout/dotcms-layout/dotcms-layout.component.ts b/core-web/libs/sdk/angular/src/lib/deprecated/layout/dotcms-layout/dotcms-layout.component.ts index c8d037c48774..fad55ee15a77 100644 --- a/core-web/libs/sdk/angular/src/lib/deprecated/layout/dotcms-layout/dotcms-layout.component.ts +++ b/core-web/libs/sdk/angular/src/lib/deprecated/layout/dotcms-layout/dotcms-layout.component.ts @@ -19,8 +19,8 @@ import { postMessageToEditor, updateNavigation } from '@dotcms/client'; +import { UVEEventSubscription, UVEEventType } from '@dotcms/types'; import { createUVESubscription } from '@dotcms/uve'; -import { UVEEventSubscription, UVEEventType } from '@dotcms/uve/types'; import { DotCMSPageComponent } from '../../models'; import { DotCMSPageAsset } from '../../models/dotcms.model'; diff --git a/core-web/libs/sdk/client/package.json b/core-web/libs/sdk/client/package.json index dadc39fa66b4..4295c22f4780 100644 --- a/core-web/libs/sdk/client/package.json +++ b/core-web/libs/sdk/client/package.json @@ -19,14 +19,12 @@ "exports": { "./package.json": "./package.json", ".": "./src/index.ts", - "./next": "./src/next.ts", - "./types": "./src/types.ts" + "./next": "./src/next.ts" }, "typesVersions": { "*": { ".": ["./src/index.d.ts"], - "next": ["./src/next.d.ts"], - "types": ["./src/types.d.ts"] + "next": ["./src/next.d.ts"] } }, "author": "dotcms ", @@ -34,5 +32,8 @@ "bugs": { "url": "https://github.com/dotCMS/core/issues" }, + "peerDependencies": { + "@dotcms/types": "next" + }, "homepage": "https://github.com/dotCMS/core/tree/main/core-web/libs/sdk/client/README.md" } diff --git a/core-web/libs/sdk/client/project.json b/core-web/libs/sdk/client/project.json index 263c3647a541..46eb2c152e9b 100644 --- a/core-web/libs/sdk/client/project.json +++ b/core-web/libs/sdk/client/project.json @@ -10,10 +10,7 @@ "options": { "format": ["esm", "cjs"], "compiler": "tsc", - "additionalEntryPoints": [ - "libs/sdk/client/src/next.ts", - "libs/sdk/client/src/types.ts" - ], + "additionalEntryPoints": ["libs/sdk/client/src/next.ts"], "generateExportsField": true, "outputPath": "dist/libs/sdk/client", "assets": [{ "input": "libs/sdk/client", "output": ".", "glob": "*.md" }], diff --git a/core-web/libs/sdk/client/src/lib/client/models/types.ts b/core-web/libs/sdk/client/src/lib/client/models/types.ts deleted file mode 100644 index ec61bc233119..000000000000 --- a/core-web/libs/sdk/client/src/lib/client/models/types.ts +++ /dev/null @@ -1,610 +0,0 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ - -import { Contentlet } from '../content/shared/types'; - -/** - * Represents a DotCMS page asset with its associated data and configurations - * - * @template T - Type parameter for URL content mapping, defaults to unknown - * @interface DotCMSPageAsset - * - * @example - * // Using DotCMSPageAsset without urlContentMap type - * - * const basicPageAsset: DotCMSPageAsset = { - * canCreateTemplate: true, - * containers: {}, - * layout: {...}, - * page: {...}, - * site: {...}, - * template: {...}, - * ... - * }; - * - * @example - * // Using DotCMSPageAsset with urlContentMap type - * interface SomeContentlet { - * urlContentMap: { - * slug: string; - * category: string; - * } - * } - * - * const pageWithUrlMap: DotCMSPageAsset<{ urlContentMap: SomeContentlet }> = { - * containers: {}, - * layout: {...}, - * page: {...}, - * site: {...}, - * template: {...}, - * // This is the contentlet SomeContentlet type - * urlContentMap: { - * slug: "/blog/post-1", - * category: "blog" - * } - * }; - */ -export interface DotCMSPageAsset { - /** Whether a template can be created for this page */ - canCreateTemplate?: boolean; - /** Map of containers on the page indexed by container ID */ - containers: { - [key: string]: DotCMSPageAssetContainer; - }; - /** Layout configuration for the page */ - layout: DotCMSLayout; - /** Page metadata and properties */ - page: DotCMSPage; - /** Site information */ - site: DotCMSSite; - /** Template configuration */ - template: DotCMSTemplate; - /** View configuration */ - viewAs?: DotCMSViewAs; - /** Vanity URL configuration if applicable */ - vanityUrl?: DotCMSVanityUrl; - /** Content mapping for the page URL */ - urlContentMap?: T extends { urlContentMap: infer U } ? Contentlet : Contentlet; - /** The parameters used to fetch the page */ - params?: Record; -} - -export interface DotPageAssetLayoutRow { - identifier: number; - value?: string; - id?: string; - columns: DotPageAssetLayoutColumn[]; - styleClass?: string; -} - -export interface DotCMSVanityUrl { - pattern: string; - vanityUrlId: string; - url: string; - siteId: string; - languageId: number; - forwardTo: string; - response: number; - order: number; - temporaryRedirect: boolean; - permanentRedirect: boolean; - forward: boolean; -} - -export interface DotPageAssetLayoutColumn { - preview: boolean; - containers: DotCMSColumnContainer[]; - widthPercent: number; - width: number; - leftOffset: number; - left: number; - styleClass?: string; -} - -export interface DotCMSColumnContainer { - identifier: string; - uuid: string; - historyUUIDs: string[]; -} - -export interface DotCMSPageAssetContainer { - container: DotCMSContainer; - containerStructures: DotCMSContainerStructure[]; - contentlets: { - [key: string]: DotCMSContentlet[]; - }; -} - -export interface DotCMSContainer { - identifier: string; - uuid: string; - iDate: number; - type: string; - owner?: string; - inode: string; - source: string; - title: string; - friendlyName: string; - modDate: number; - modUser: string; - sortOrder: number; - showOnMenu: boolean; - code?: string; - maxContentlets: number; - useDiv: boolean; - sortContentletsBy?: string; - preLoop: string; - postLoop: string; - staticify: boolean; - luceneQuery?: string; - notes: string; - languageId?: number; - path?: string; - live: boolean; - locked: boolean; - working: boolean; - deleted: boolean; - name: string; - archived: boolean; - permissionId: string; - versionId: string; - versionType: string; - permissionType: string; - categoryId: string; - idate: number; - new: boolean; - acceptTypes: string; - contentlets: DotCMSContentlet[]; - parentPermissionable: DotCMSSiteParentPermissionable; -} - -export interface DotCMSContentlet { - archived: boolean; - baseType: string; - deleted?: boolean; - binary?: string; - binaryContentAsset?: string; - binaryVersion?: string; - contentType: string; - file?: string; - folder: string; - hasLiveVersion?: boolean; - hasTitleImage: boolean; - host: string; - hostName: string; - identifier: string; - inode: string; - image?: any; - languageId: number; - language?: string; - live: boolean; - locked: boolean; - mimeType?: string; - modDate: string; - modUser: string; - modUserName: string; - owner: string; - sortOrder: number; - stInode: string; - title: string; - titleImage: string; - text?: string; - url: string; - working: boolean; - body?: string; - contentTypeIcon?: string; - variant?: string; - __icon__?: string; - [key: string]: any; // This is a catch-all for any other custom properties that might be on the contentlet. -} - -export interface DotcmsNavigationItem { - code?: any; - folder: string; - children?: DotcmsNavigationItem[]; - host: string; - languageId: number; - href: string; - title: string; - type: string; - hash: number; - target: string; - order: number; -} - -interface DotCMSTemplate { - iDate: number; - type: string; - owner: string; - inode: string; - identifier: string; - source: string; - title: string; - friendlyName: string; - modDate: number; - modUser: string; - sortOrder: number; - showOnMenu: boolean; - image: string; - drawed: boolean; - drawedBody: string; - theme: string; - anonymous: boolean; - template: boolean; - name: string; - live: boolean; - archived: boolean; - locked: boolean; - working: boolean; - permissionId: string; - versionId: string; - versionType: string; - deleted: boolean; - permissionType: string; - categoryId: string; - idate: number; - new: boolean; - canEdit: boolean; -} - -interface DotCMSPage { - template: string; - modDate: number; - metadata: string; - cachettl: string; - pageURI: string; - title: string; - type: string; - showOnMenu: string; - httpsRequired: boolean; - inode: string; - disabledWYSIWYG: any[]; - seokeywords: string; - host: string; - lastReview: number; - working: boolean; - locked: boolean; - stInode: string; - friendlyName: string; - live: boolean; - owner: string; - identifier: string; - nullProperties: any[]; - friendlyname: string; - pagemetadata: string; - languageId: number; - url: string; - seodescription: string; - modUserName: string; - folder: string; - deleted: boolean; - sortOrder: number; - modUser: string; - pageUrl: string; - workingInode: string; - shortyWorking: string; - canEdit: boolean; - canRead: boolean; - canLock: boolean; - lockedOn: number; - lockedBy: string; - lockedByName: string; - liveInode: string; - shortyLive: string; -} - -interface DotCMSViewAs { - language: { - id: number; - languageCode: string; - countryCode: string; - language: string; - country: string; - }; - mode: string; -} - -interface DotCMSLayout { - pageWidth: string; - width: string; - layout: string; - title: string; - header: boolean; - footer: boolean; - body: DotPageAssetLayoutBody; - sidebar: DotPageAssetLayoutSidebar; -} - -interface DotCMSContainerStructure { - id: string; - structureId: string; - containerInode: string; - containerId: string; - code: string; - contentTypeVar: string; -} - -interface DotPageAssetLayoutSidebar { - preview: boolean; - containers: DotCMSContainer[]; - location: string; - widthPercent: number; - width: string; -} - -interface DotPageAssetLayoutBody { - rows: DotPageAssetLayoutRow[]; -} - -interface DotCMSSite { - lowIndexPriority: boolean; - name: string; - default: boolean; - aliases: string; - parent: boolean; - tagStorage: string; - systemHost: boolean; - inode: string; - versionType: string; - structureInode: string; - hostname: string; - hostThumbnail?: any; - owner: string; - permissionId: string; - permissionType: string; - type: string; - identifier: string; - modDate: number; - host: string; - live: boolean; - indexPolicy: string; - categoryId: string; - actionId?: any; - new: boolean; - archived: boolean; - locked: boolean; - disabledWysiwyg: any[]; - modUser: string; - working: boolean; - titleImage: { - present: boolean; - }; - folder: string; - htmlpage: boolean; - fileAsset: boolean; - vanityUrl: boolean; - keyValue: boolean; - structure?: DotCMSSiteStructure; - title: string; - languageId: number; - indexPolicyDependencies: string; - contentTypeId: string; - versionId: string; - lastReview: number; - nextReview?: any; - reviewInterval?: any; - sortOrder: number; - contentType: DotCMSSiteContentType; -} - -interface DotCMSSiteContentType { - owner?: any; - parentPermissionable: DotCMSSiteParentPermissionable; - permissionId: string; - permissionType: string; -} - -export interface DotCMSSiteParentPermissionable { - Inode: string; - Identifier: string; - permissionByIdentifier: boolean; - type: string; - owner?: any; - identifier: string; - permissionId: string; - parentPermissionable?: any; - permissionType: string; - inode: string; - childrenPermissionable?: any; - variantId?: string; -} - -interface DotCMSSiteStructure { - iDate: number; - type: string; - owner?: any; - inode: string; - identifier: string; - name: string; - description: string; - defaultStructure: boolean; - reviewInterval?: any; - reviewerRole?: any; - pagedetail?: any; - structureType: number; - fixed: boolean; - system: boolean; - velocityVarName: string; - urlMapPattern?: any; - host: string; - folder: string; - publishDateVar?: any; - expireDateVar?: any; - modDate: number; - fields: DotCMSSiteField[]; - widget: boolean; - detailPage?: any; - fieldsBySortOrder: DotCMSSiteField[]; - form: boolean; - htmlpageAsset: boolean; - content: boolean; - fileAsset: boolean; - persona: boolean; - permissionId: string; - permissionType: string; - live: boolean; - categoryId: string; - idate: number; - new: boolean; - archived: boolean; - locked: boolean; - modUser: string; - working: boolean; - title: string; - versionId: string; - versionType: string; -} - -interface DotCMSSiteField { - iDate: number; - type: string; - owner?: any; - inode: string; - identifier: string; - structureInode: string; - fieldName: string; - fieldType: string; - fieldRelationType?: any; - fieldContentlet: string; - required: boolean; - velocityVarName: string; - sortOrder: number; - values?: any; - regexCheck?: any; - hint?: any; - defaultValue?: any; - indexed: boolean; - listed: boolean; - fixed: boolean; - readOnly: boolean; - searchable: boolean; - unique: boolean; - modDate: number; - dataType: string; - live: boolean; - categoryId: string; - idate: number; - new: boolean; - archived: boolean; - locked: boolean; - modUser: string; - working: boolean; - permissionId: string; - parentPermissionable?: any; - permissionType: string; - title: string; - versionId: string; - versionType: string; -} - -/* GraphQL Page Types */ - -/** - * Represents a basic page structure returned from GraphQL queries - */ -export interface DotCMSBasicGraphQLPage { - publishDate: string; - type: string; - httpsRequired: boolean; - inode: string; - path: string; - identifier: string; - hasTitleImage: boolean; - sortOrder: number; - extension: string; - canRead: boolean; - pageURI: string; - canEdit: boolean; - archived: boolean; - friendlyName: string; - workingInode: string; - url: string; - hasLiveVersion: boolean; - deleted: boolean; - pageUrl: string; - shortyWorking: string; - mimeType: string; - locked: boolean; - stInode: string; - contentType: string; - creationDate: string; - liveInode: string; - name: string; - shortyLive: string; - modDate: string; - title: string; - baseType: string; - working: boolean; - canLock: boolean; - live: boolean; - isContentlet: boolean; - statusIcons: string; - - // Language information - conLanguage: { - id: number; - language: string; - languageCode: string; - }; - - // Template information - template: { - drawed: boolean; - }; - - // Container information - containers: { - path?: string; - identifier: string; - maxContentlets?: number; - containerStructures?: { - contentTypeVar: string; - }[]; - containerContentlets?: { - uuid: string; - contentlets: DotCMSContentlet[]; - }[]; - }; - - layout: DotCMSLayout; - viewAs: DotCMSViewAs; -} - -export interface DotCMSPageGraphQLContainer { - path: string; - identifier: string; - maxContentlets?: number; - containerStructures: DotCMSContainerStructure[]; - containerContentlets: DotCMSPageContainerContentlets[]; -} - -export interface DotCMSPageContainerContentlets { - uuid: string; - contentlets: DotCMSContentlet[]; -} - -export interface DotCMSGraphQLError { - message: string; - locations: { - line: number; - column: number; - }[]; - extensions: { - classification: string; - }; -} - -/** - * Represents the complete response from a GraphQL page query - * - * @template TContent - The type of the content data - * @template TNav - The type of the navigation data - */ -export interface DotCMSGraphQLPageResponse> { - page: DotCMSBasicGraphQLPage; - content?: TContent; - errors?: DotCMSGraphQLError; - graphql: { - query: string; - variables: Record; - }; -} diff --git a/core-web/libs/sdk/client/src/lib/client/page/page-api.ts b/core-web/libs/sdk/client/src/lib/client/page/page-api.ts index e2f4ddbd32c5..3aaf93499a9f 100644 --- a/core-web/libs/sdk/client/src/lib/client/page/page-api.ts +++ b/core-web/libs/sdk/client/src/lib/client/page/page-api.ts @@ -1,9 +1,10 @@ +import { DotCMSPageAsset, DotCMSGraphQLPageResponse } from '@dotcms/types'; + import { buildPageQuery, buildQuery, fetchGraphQL, mapResponseData } from './utils'; import { graphqlToPageEntity } from '../../utils'; import { DotCMSClientConfig, RequestOptions } from '../client'; import { ErrorMessages } from '../models'; -import { DotCMSGraphQLPageResponse, DotCMSPageAsset } from '../models/types'; /** * The parameters for the Page API. diff --git a/core-web/libs/sdk/client/src/types.ts b/core-web/libs/sdk/client/src/types.ts deleted file mode 100644 index 6dc7ca337c3c..000000000000 --- a/core-web/libs/sdk/client/src/types.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { DotCMSPageAsset, DotCMSGraphQLPageResponse } from './lib/client/models/types'; - -export { Contentlet } from './lib/client/content/shared/types'; diff --git a/core-web/libs/sdk/react/README.md b/core-web/libs/sdk/react/README.md index 9d42f6fc03fe..c914f58e733d 100644 --- a/core-web/libs/sdk/react/README.md +++ b/core-web/libs/sdk/react/README.md @@ -201,7 +201,7 @@ A custom hook that handles the communication with the Universal View Editor (UVE import { useEffect, useState } from 'react'; import { getUVEState, sendMessageToEditor, createUVESubscription} from '@dotcms/uve'; -import { DotCMSUVEAction, UVEEventType} from '@dotcms/uve/types'; +import { DotCMSUVEAction, UVEEventType} from '@dotcms/types'; export const usePageAsset = (currentPageAsset) => { const [pageAsset, setPageAsset] = useState(null); diff --git a/core-web/libs/sdk/react/package.json b/core-web/libs/sdk/react/package.json index 52d4e937fe61..418e580854c1 100644 --- a/core-web/libs/sdk/react/package.json +++ b/core-web/libs/sdk/react/package.json @@ -6,7 +6,8 @@ "react-dom": ">=18", "@dotcms/client": "next", "@dotcms/uve": "next", - "@tinymce/tinymce-react": "^5.1.1" + "@tinymce/tinymce-react": "^5.1.1", + "@dotcms/types": "next" }, "description": "Official React Components library to render a dotCMS page.", "repository": { diff --git a/core-web/libs/sdk/react/src/lib/deprecated/hooks/useDotcmsEditor.spec.ts b/core-web/libs/sdk/react/src/lib/deprecated/hooks/useDotcmsEditor.spec.ts index 47770b0cc6cd..54f2fc05d293 100644 --- a/core-web/libs/sdk/react/src/lib/deprecated/hooks/useDotcmsEditor.spec.ts +++ b/core-web/libs/sdk/react/src/lib/deprecated/hooks/useDotcmsEditor.spec.ts @@ -1,8 +1,8 @@ import { renderHook } from '@testing-library/react-hooks'; import * as sdkClient from '@dotcms/client'; +import { UVE_MODE, UVEState, UVEEventSubscription } from '@dotcms/types'; import * as sdkUVE from '@dotcms/uve'; -import { UVE_MODE, UVEState, UVESubscription } from '@dotcms/uve/types'; import { useDotcmsEditor } from './useDotcmsEditor'; @@ -36,7 +36,7 @@ jest.mock('@dotcms/uve', () => ({ describe('useDotcmsEditor', () => { let isInsideEditorSpy: jest.SpyInstance; let getUVEStateSpy: jest.SpyInstance; - let createUVESubscriptionSpy: jest.SpyInstance; + let createUVESubscriptionSpy: jest.SpyInstance; let initEditorSpy: jest.SpyInstance; let destroyEditorSpy: jest.SpyInstance; diff --git a/core-web/libs/sdk/react/src/lib/deprecated/hooks/useDotcmsEditor.ts b/core-web/libs/sdk/react/src/lib/deprecated/hooks/useDotcmsEditor.ts index 1803e1a3c324..b3832766d810 100644 --- a/core-web/libs/sdk/react/src/lib/deprecated/hooks/useDotcmsEditor.ts +++ b/core-web/libs/sdk/react/src/lib/deprecated/hooks/useDotcmsEditor.ts @@ -8,8 +8,8 @@ import { postMessageToEditor, updateNavigation } from '@dotcms/client'; +import { UVEEventType } from '@dotcms/types'; import { createUVESubscription } from '@dotcms/uve'; -import { UVEEventType } from '@dotcms/uve/types'; import { DotcmsPageProps } from '../components/DotcmsLayout/DotcmsLayout'; import { DotCMSPageContext } from '../models'; diff --git a/core-web/libs/sdk/react/src/lib/next/__test__/components/DotCMSLayoutBody.test.tsx b/core-web/libs/sdk/react/src/lib/next/__test__/components/DotCMSLayoutBody.test.tsx index 2979d5c6c132..75a914f27d4c 100644 --- a/core-web/libs/sdk/react/src/lib/next/__test__/components/DotCMSLayoutBody.test.tsx +++ b/core-web/libs/sdk/react/src/lib/next/__test__/components/DotCMSLayoutBody.test.tsx @@ -2,8 +2,8 @@ import '@testing-library/jest-dom'; import { render, screen } from '@testing-library/react'; +import { UVE_MODE } from '@dotcms/types'; import * as dotcmsUVE from '@dotcms/uve'; -import { UVE_MODE } from '@dotcms/uve/types'; import { DotCMSLayoutBody } from '../../components/DotCMSLayoutBody/DotCMSLayoutBody'; import { MOCK_PAGE_ASSET } from '../mock'; diff --git a/core-web/libs/sdk/react/src/lib/next/__test__/components/DotCMSShow.test.tsx b/core-web/libs/sdk/react/src/lib/next/__test__/components/DotCMSShow.test.tsx index 5dfc97d7ee57..893c03ea1b54 100644 --- a/core-web/libs/sdk/react/src/lib/next/__test__/components/DotCMSShow.test.tsx +++ b/core-web/libs/sdk/react/src/lib/next/__test__/components/DotCMSShow.test.tsx @@ -1,8 +1,8 @@ import '@testing-library/jest-dom'; import { render, screen } from '@testing-library/react'; +import { UVE_MODE } from '@dotcms/types'; import * as dotcmsUVE from '@dotcms/uve'; -import { UVE_MODE } from '@dotcms/uve/types'; import { DotCMSShow } from '../../components/DotCMSShow/DotCMSShow'; diff --git a/core-web/libs/sdk/react/src/lib/next/__test__/components/FallbackComponent.test.tsx b/core-web/libs/sdk/react/src/lib/next/__test__/components/FallbackComponent.test.tsx index 9f47b575fb9e..93c4a54fdb67 100644 --- a/core-web/libs/sdk/react/src/lib/next/__test__/components/FallbackComponent.test.tsx +++ b/core-web/libs/sdk/react/src/lib/next/__test__/components/FallbackComponent.test.tsx @@ -3,7 +3,7 @@ import '@testing-library/jest-dom'; import { render, screen } from '@testing-library/react'; import React from 'react'; -import { DotCMSContentlet } from '@dotcms/uve/types'; +import { DotCMSContentlet } from '@dotcms/types'; import { FallbackComponent } from '../../components/FallbackComponent/FallbackComponent'; import * as useIsDevModeHook from '../../hooks/useIsDevMode'; diff --git a/core-web/libs/sdk/react/src/lib/next/__test__/components/Row.test.tsx b/core-web/libs/sdk/react/src/lib/next/__test__/components/Row.test.tsx index bdcaeb0c7938..162e0e6edd9c 100644 --- a/core-web/libs/sdk/react/src/lib/next/__test__/components/Row.test.tsx +++ b/core-web/libs/sdk/react/src/lib/next/__test__/components/Row.test.tsx @@ -1,7 +1,7 @@ import '@testing-library/jest-dom'; import { render, screen } from '@testing-library/react'; -import { DotPageAssetLayoutRow } from '@dotcms/uve/types'; +import { DotPageAssetLayoutRow } from '@dotcms/types'; import { Row } from '../../components/Row/Row'; import { MOCK_COLUMN } from '../mock'; diff --git a/core-web/libs/sdk/react/src/lib/next/__test__/hook/useDotCMSShowWhen.test.tsx b/core-web/libs/sdk/react/src/lib/next/__test__/hook/useDotCMSShowWhen.test.tsx index 04e89ac22881..8c2d5c620f8e 100644 --- a/core-web/libs/sdk/react/src/lib/next/__test__/hook/useDotCMSShowWhen.test.tsx +++ b/core-web/libs/sdk/react/src/lib/next/__test__/hook/useDotCMSShowWhen.test.tsx @@ -1,7 +1,7 @@ import { renderHook } from '@testing-library/react-hooks'; +import { UVE_MODE } from '@dotcms/types'; import { getUVEState } from '@dotcms/uve'; -import { UVE_MODE } from '@dotcms/uve/types'; import { useDotCMSShowWhen } from '../../hooks/useDotCMSShowWhen'; diff --git a/core-web/libs/sdk/react/src/lib/next/__test__/hook/useEditableDotCMSPage.test.tsx b/core-web/libs/sdk/react/src/lib/next/__test__/hook/useEditableDotCMSPage.test.tsx index d5ac1f0cf3cc..2bf841ba043c 100644 --- a/core-web/libs/sdk/react/src/lib/next/__test__/hook/useEditableDotCMSPage.test.tsx +++ b/core-web/libs/sdk/react/src/lib/next/__test__/hook/useEditableDotCMSPage.test.tsx @@ -1,8 +1,8 @@ import { renderHook, act } from '@testing-library/react-hooks'; import { updateNavigation } from '@dotcms/client'; +import { DotCMSEditablePage, UVEEventType } from '@dotcms/types'; import { getUVEState, initUVE, createUVESubscription } from '@dotcms/uve'; -import { DotCMSEditablePage, UVEEventType } from '@dotcms/uve/types'; import { useEditableDotCMSPage } from '../../hooks/useEditableDotCMSPage'; diff --git a/core-web/libs/sdk/react/src/lib/next/__test__/hook/useIsDevMode.test.tsx b/core-web/libs/sdk/react/src/lib/next/__test__/hook/useIsDevMode.test.tsx index a44a96d1e237..b4562a22d75f 100644 --- a/core-web/libs/sdk/react/src/lib/next/__test__/hook/useIsDevMode.test.tsx +++ b/core-web/libs/sdk/react/src/lib/next/__test__/hook/useIsDevMode.test.tsx @@ -1,8 +1,8 @@ import { renderHook } from '@testing-library/react'; +import { UVE_MODE } from '@dotcms/types'; import { getUVEState } from '@dotcms/uve'; import { DEVELOPMENT_MODE, PRODUCTION_MODE } from '@dotcms/uve/internal'; -import { UVE_MODE } from '@dotcms/uve/types'; import { DotCMSPageContext } from '../../contexts/DotCMSPageContext'; import { useIsDevMode } from '../../hooks/useIsDevMode'; diff --git a/core-web/libs/sdk/react/src/lib/next/__test__/mock.ts b/core-web/libs/sdk/react/src/lib/next/__test__/mock.ts index 9ecd91c20047..cf3150ba6f19 100644 --- a/core-web/libs/sdk/react/src/lib/next/__test__/mock.ts +++ b/core-web/libs/sdk/react/src/lib/next/__test__/mock.ts @@ -1,8 +1,4 @@ -import { - DotCMSColumnContainer, - DotCMSPageAsset, - DotPageAssetLayoutColumn -} from '@dotcms/uve/types'; +import { DotCMSColumnContainer, DotCMSPageAsset, DotPageAssetLayoutColumn } from '@dotcms/types'; export const MOCK_COLUMN: DotPageAssetLayoutColumn = { left: 0, diff --git a/core-web/libs/sdk/react/src/lib/next/components/Column/Column.tsx b/core-web/libs/sdk/react/src/lib/next/components/Column/Column.tsx index b69649dbe0ba..7f6d28265d24 100644 --- a/core-web/libs/sdk/react/src/lib/next/components/Column/Column.tsx +++ b/core-web/libs/sdk/react/src/lib/next/components/Column/Column.tsx @@ -1,5 +1,5 @@ +import { DotPageAssetLayoutColumn } from '@dotcms/types'; import { combineClasses, getColumnPositionClasses } from '@dotcms/uve/internal'; -import { DotPageAssetLayoutColumn } from '@dotcms/uve/types'; import styles from './Column.module.css'; diff --git a/core-web/libs/sdk/react/src/lib/next/components/Container/Container.tsx b/core-web/libs/sdk/react/src/lib/next/components/Container/Container.tsx index c370164dc5e6..1ce7ca5d4f98 100644 --- a/core-web/libs/sdk/react/src/lib/next/components/Container/Container.tsx +++ b/core-web/libs/sdk/react/src/lib/next/components/Container/Container.tsx @@ -1,11 +1,11 @@ import { useContext, useMemo } from 'react'; +import { DotCMSColumnContainer, DotCMSContentlet } from '@dotcms/types'; import { getContainersData, getDotContainerAttributes, getContentletsInContainer } from '@dotcms/uve/internal'; -import { DotCMSColumnContainer, DotCMSContentlet } from '@dotcms/uve/types'; import { ContainerNotFound, EmptyContainer } from './ContainerFallbacks'; diff --git a/core-web/libs/sdk/react/src/lib/next/components/Container/ContainerFallbacks.tsx b/core-web/libs/sdk/react/src/lib/next/components/Container/ContainerFallbacks.tsx index 3de70c7be85a..6260e047280a 100644 --- a/core-web/libs/sdk/react/src/lib/next/components/Container/ContainerFallbacks.tsx +++ b/core-web/libs/sdk/react/src/lib/next/components/Container/ContainerFallbacks.tsx @@ -1,7 +1,7 @@ import { useEffect } from 'react'; +import { DotContainerAttributes } from '@dotcms/types'; import { EMPTY_CONTAINER_STYLE_REACT } from '@dotcms/uve/internal'; -import { DotContainerAttributes } from '@dotcms/uve/types'; import { useIsDevMode } from '../../hooks/useIsDevMode'; diff --git a/core-web/libs/sdk/react/src/lib/next/components/Contentlet/Contentlet.tsx b/core-web/libs/sdk/react/src/lib/next/components/Contentlet/Contentlet.tsx index 11aa00f7054e..c97131636a7e 100644 --- a/core-web/libs/sdk/react/src/lib/next/components/Contentlet/Contentlet.tsx +++ b/core-web/libs/sdk/react/src/lib/next/components/Contentlet/Contentlet.tsx @@ -1,7 +1,7 @@ import { useContext, useRef, useMemo } from 'react'; +import { DotCMSContentlet } from '@dotcms/types'; import { CUSTOM_NO_COMPONENT, getDotContentletAttributes } from '@dotcms/uve/internal'; -import { DotCMSContentlet } from '@dotcms/uve/types'; import { DotCMSPageContext } from '../../contexts/DotCMSPageContext'; import { useCheckVisibleContent } from '../../hooks/useCheckVisibleContent'; diff --git a/core-web/libs/sdk/react/src/lib/next/components/DotCMSLayoutBody/DotCMSLayoutBody.tsx b/core-web/libs/sdk/react/src/lib/next/components/DotCMSLayoutBody/DotCMSLayoutBody.tsx index 2ac6dc168e32..42469cd6adb4 100644 --- a/core-web/libs/sdk/react/src/lib/next/components/DotCMSLayoutBody/DotCMSLayoutBody.tsx +++ b/core-web/libs/sdk/react/src/lib/next/components/DotCMSLayoutBody/DotCMSLayoutBody.tsx @@ -1,4 +1,4 @@ -import { DotCMSContentlet, DotCMSPageAsset, DotCMSPageRendererMode } from '@dotcms/uve/types'; +import { DotCMSContentlet, DotCMSPageAsset, DotCMSPageRendererMode } from '@dotcms/types'; import { ErrorMessage } from './components/ErrorMessage'; diff --git a/core-web/libs/sdk/react/src/lib/next/components/DotCMSShow/DotCMSShow.tsx b/core-web/libs/sdk/react/src/lib/next/components/DotCMSShow/DotCMSShow.tsx index 964f02b2ee31..04e69a745bf7 100644 --- a/core-web/libs/sdk/react/src/lib/next/components/DotCMSShow/DotCMSShow.tsx +++ b/core-web/libs/sdk/react/src/lib/next/components/DotCMSShow/DotCMSShow.tsx @@ -1,4 +1,4 @@ -import { UVE_MODE } from '@dotcms/uve/types'; +import { UVE_MODE } from '@dotcms/types'; import { useDotCMSShowWhen } from '../../hooks/useDotCMSShowWhen'; diff --git a/core-web/libs/sdk/react/src/lib/next/components/FallbackComponent/FallbackComponent.tsx b/core-web/libs/sdk/react/src/lib/next/components/FallbackComponent/FallbackComponent.tsx index e47aa43c9626..21ddf5898ba3 100644 --- a/core-web/libs/sdk/react/src/lib/next/components/FallbackComponent/FallbackComponent.tsx +++ b/core-web/libs/sdk/react/src/lib/next/components/FallbackComponent/FallbackComponent.tsx @@ -1,4 +1,4 @@ -import { DotCMSContentlet } from '@dotcms/uve/types'; +import { DotCMSContentlet } from '@dotcms/types'; import { useIsDevMode } from '../../hooks/useIsDevMode'; diff --git a/core-web/libs/sdk/react/src/lib/next/components/Row/Row.tsx b/core-web/libs/sdk/react/src/lib/next/components/Row/Row.tsx index 34583d0fbee4..263373516eac 100644 --- a/core-web/libs/sdk/react/src/lib/next/components/Row/Row.tsx +++ b/core-web/libs/sdk/react/src/lib/next/components/Row/Row.tsx @@ -1,5 +1,5 @@ +import { DotPageAssetLayoutRow } from '@dotcms/types'; import { combineClasses } from '@dotcms/uve/internal'; -import { DotPageAssetLayoutRow } from '@dotcms/uve/types'; import styles from './Row.module.css'; diff --git a/core-web/libs/sdk/react/src/lib/next/contexts/DotCMSPageContext.tsx b/core-web/libs/sdk/react/src/lib/next/contexts/DotCMSPageContext.tsx index 06e6f8d147e3..c5ee39d8637b 100644 --- a/core-web/libs/sdk/react/src/lib/next/contexts/DotCMSPageContext.tsx +++ b/core-web/libs/sdk/react/src/lib/next/contexts/DotCMSPageContext.tsx @@ -1,6 +1,6 @@ import { createContext } from 'react'; -import { DotCMSContentlet, DotCMSPageAsset, DotCMSPageRendererMode } from '@dotcms/uve/types'; +import { DotCMSContentlet, DotCMSPageAsset, DotCMSPageRendererMode } from '@dotcms/types'; /** * @internal diff --git a/core-web/libs/sdk/react/src/lib/next/hooks/useDotCMSShowWhen.ts b/core-web/libs/sdk/react/src/lib/next/hooks/useDotCMSShowWhen.ts index 18f6790d7d1b..15fe89ea07b6 100644 --- a/core-web/libs/sdk/react/src/lib/next/hooks/useDotCMSShowWhen.ts +++ b/core-web/libs/sdk/react/src/lib/next/hooks/useDotCMSShowWhen.ts @@ -1,7 +1,7 @@ import { useEffect, useState } from 'react'; +import { UVE_MODE } from '@dotcms/types'; import { getUVEState } from '@dotcms/uve'; -import { UVE_MODE } from '@dotcms/uve/types'; /** * Custom hook to determine if the current UVE (Universal Visual Editor) mode diff --git a/core-web/libs/sdk/react/src/lib/next/hooks/useEditableDotCMSPage.ts b/core-web/libs/sdk/react/src/lib/next/hooks/useEditableDotCMSPage.ts index 8648c8115591..c2cd3ae90295 100644 --- a/core-web/libs/sdk/react/src/lib/next/hooks/useEditableDotCMSPage.ts +++ b/core-web/libs/sdk/react/src/lib/next/hooks/useEditableDotCMSPage.ts @@ -1,8 +1,8 @@ import { useState, useEffect } from 'react'; import { updateNavigation } from '@dotcms/client'; +import { DotCMSEditablePage, UVEEventType } from '@dotcms/types'; import { getUVEState, initUVE, createUVESubscription } from '@dotcms/uve'; -import { DotCMSEditablePage, UVEEventType } from '@dotcms/uve/types'; /** * Custom hook to manage the editable state of a DotCMS page. diff --git a/core-web/libs/sdk/react/src/lib/next/hooks/useIsDevMode.ts b/core-web/libs/sdk/react/src/lib/next/hooks/useIsDevMode.ts index 56b6f96f97cf..1d410f4eb5a3 100644 --- a/core-web/libs/sdk/react/src/lib/next/hooks/useIsDevMode.ts +++ b/core-web/libs/sdk/react/src/lib/next/hooks/useIsDevMode.ts @@ -1,8 +1,8 @@ import { useContext, useEffect, useState } from 'react'; +import { UVE_MODE } from '@dotcms/types'; import { getUVEState } from '@dotcms/uve'; import { DEVELOPMENT_MODE } from '@dotcms/uve/internal'; -import { UVE_MODE } from '@dotcms/uve/types'; import { DotCMSPageContext } from '../contexts/DotCMSPageContext'; diff --git a/core-web/libs/sdk/types/package.json b/core-web/libs/sdk/types/package.json index b9c10ad114eb..999444b294f7 100644 --- a/core-web/libs/sdk/types/package.json +++ b/core-web/libs/sdk/types/package.json @@ -7,21 +7,12 @@ "typings": "./src/index.d.ts", "exports": { "./package.json": "./package.json", - "./types/editor": "./src/editor.ts", - "./types/events": "./src/events.ts", - "./types/page": "./src/page.ts", - "./types/components": "./src/components.ts", - "./types/__internal__": "./src/__internal__.ts" + "./types/__internal__": "./src/internal.ts" }, "typesVersions": { "*": { ".": ["./src/index.d.ts"], - "types": ["./src/types.d.ts"], - "editor": ["./src/editor.d.ts"], - "events": ["./src/events.d.ts"], - "page": ["./src/page.d.ts"], - "components": ["./src/components.d.ts"], - "__internal__": ["./src/__internal__.d.ts"] + "__internal__": ["./src/internal.d.ts"] } } } diff --git a/core-web/libs/sdk/types/project.json b/core-web/libs/sdk/types/project.json index 5f14f92997bf..f8530a900457 100644 --- a/core-web/libs/sdk/types/project.json +++ b/core-web/libs/sdk/types/project.json @@ -19,13 +19,7 @@ "options": { "outputPath": "dist/libs/sdk/types", "main": "libs/sdk/types/src/index.ts", - "additionalEntryPoints": [ - "libs/sdk/types/src/editor.ts", - "libs/sdk/types/src/events.ts", - "libs/sdk/types/src/page.ts", - "libs/sdk/types/src/components.ts", - "libs/sdk/types/src/__internal__.ts" - ], + "additionalEntryPoints": ["libs/sdk/types/src/internal.ts"], "generateExportsField": true, "tsConfig": "libs/sdk/types/tsconfig.lib.json", "project": "libs/sdk/types/package.json", diff --git a/core-web/libs/sdk/types/src/components.ts b/core-web/libs/sdk/types/src/components.ts deleted file mode 100644 index 02446b5d81f7..000000000000 --- a/core-web/libs/sdk/types/src/components.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './lib/components/block-editor-renderer/public'; diff --git a/core-web/libs/sdk/types/src/editor.ts b/core-web/libs/sdk/types/src/editor.ts deleted file mode 100644 index d0cb79727d0d..000000000000 --- a/core-web/libs/sdk/types/src/editor.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './lib/editor/public'; diff --git a/core-web/libs/sdk/types/src/events.ts b/core-web/libs/sdk/types/src/events.ts deleted file mode 100644 index 2bb96dc49dff..000000000000 --- a/core-web/libs/sdk/types/src/events.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './lib/events/public'; diff --git a/core-web/libs/sdk/types/src/index.ts b/core-web/libs/sdk/types/src/index.ts index cb0ff5c3b541..1dae54ff275a 100644 --- a/core-web/libs/sdk/types/src/index.ts +++ b/core-web/libs/sdk/types/src/index.ts @@ -1 +1,4 @@ -export {}; +export * from './lib/components/block-editor-renderer/public'; +export * from './lib/editor/public'; +export * from './lib/events/public'; +export * from './lib/page/public'; diff --git a/core-web/libs/sdk/types/src/__internal__.ts b/core-web/libs/sdk/types/src/internal.ts similarity index 100% rename from core-web/libs/sdk/types/src/__internal__.ts rename to core-web/libs/sdk/types/src/internal.ts diff --git a/core-web/libs/sdk/types/src/lib/editor/public.ts b/core-web/libs/sdk/types/src/lib/editor/public.ts index 15a70e95ecdd..c5076f8cc75c 100644 --- a/core-web/libs/sdk/types/src/lib/editor/public.ts +++ b/core-web/libs/sdk/types/src/lib/editor/public.ts @@ -1,5 +1,7 @@ import { ContentTypeMainFields, DotCMSContainerBound } from './internal'; +import { DotCMSEditablePage } from '../page/public'; + /** * Development mode * @@ -203,7 +205,7 @@ export enum UVEEventType { * Type definitions for each event's payload */ export type UVEEventPayloadMap = { - [UVEEventType.CONTENT_CHANGES]: unknown; + [UVEEventType.CONTENT_CHANGES]: DotCMSEditablePage; [UVEEventType.PAGE_RELOAD]: undefined; [UVEEventType.REQUEST_BOUNDS]: DotCMSContainerBound[]; [UVEEventType.IFRAME_SCROLL]: 'up' | 'down'; @@ -251,3 +253,15 @@ export interface DotContentletAttributes { 'data-dot-container': string; 'data-dot-on-number-of-pages': string; } + +/** + * Configuration for the UVE + * @interface DotCMSUVEConfig + */ +export interface DotCMSUVEConfig { + graphql?: { + query: string; + variables: Record; + }; + params?: Record; +} diff --git a/core-web/libs/sdk/types/src/lib/page/public.ts b/core-web/libs/sdk/types/src/lib/page/public.ts index 28a2c357b708..7152f961c7d2 100644 --- a/core-web/libs/sdk/types/src/lib/page/public.ts +++ b/core-web/libs/sdk/types/src/lib/page/public.ts @@ -441,3 +441,127 @@ interface DotCMSSiteField { versionId: string; versionType: string; } + +/* GraphQL Page Types */ + +/** + * Represents a basic page structure returned from GraphQL queries + */ +export interface DotCMSBasicGraphQLPage { + publishDate: string; + type: string; + httpsRequired: boolean; + inode: string; + path: string; + identifier: string; + hasTitleImage: boolean; + sortOrder: number; + extension: string; + canRead: boolean; + pageURI: string; + canEdit: boolean; + archived: boolean; + friendlyName: string; + workingInode: string; + url: string; + hasLiveVersion: boolean; + deleted: boolean; + pageUrl: string; + shortyWorking: string; + mimeType: string; + locked: boolean; + stInode: string; + contentType: string; + creationDate: string; + liveInode: string; + name: string; + shortyLive: string; + modDate: string; + title: string; + baseType: string; + working: boolean; + canLock: boolean; + live: boolean; + isContentlet: boolean; + statusIcons: string; + + // Language information + conLanguage: { + id: number; + language: string; + languageCode: string; + }; + + // Template information + template: { + drawed: boolean; + }; + + // Container information + containers: { + path?: string; + identifier: string; + maxContentlets?: number; + containerStructures?: { + contentTypeVar: string; + }[]; + containerContentlets?: { + uuid: string; + contentlets: DotCMSContentlet[]; + }[]; + }; + + layout: DotCMSLayout; + viewAs: DotCMSViewAs; +} + +export interface DotCMSPageGraphQLContainer { + path: string; + identifier: string; + maxContentlets?: number; + containerStructures: DotCMSContainerStructure[]; + containerContentlets: DotCMSPageContainerContentlets[]; +} + +export interface DotCMSPageContainerContentlets { + uuid: string; + contentlets: DotCMSContentlet[]; +} + +/** + * Represents a GraphQL error + * @interface DotCMSGraphQLError + */ +export interface DotCMSGraphQLError { + message: string; + locations: { + line: number; + column: number; + }[]; + extensions: { + classification: string; + }; +} + +/** + * Represents the complete response from a GraphQL page query + * + * @template TContent - The type of the content data + * @template TNav - The type of the navigation data + */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +export interface DotCMSGraphQLPageResponse> { + page: DotCMSBasicGraphQLPage; + content?: TContent; + errors?: DotCMSGraphQLError; + graphql: { + query: string; + variables: Record; + }; +} + +/** + * Payload for initializing the UVE + * @interface DotCMSEditablePage + */ +export type DotCMSEditablePage = DotCMSGraphQLPageResponse | DotCMSPageAsset; diff --git a/core-web/libs/sdk/uve/package.json b/core-web/libs/sdk/uve/package.json index cba188b51ded..4206696a8ca3 100644 --- a/core-web/libs/sdk/uve/package.json +++ b/core-web/libs/sdk/uve/package.json @@ -16,13 +16,11 @@ "exports": { "./package.json": "./package.json", ".": "./src/index.ts", - "./types": "./src/types.ts", "./internal": "./src/internal.ts" }, "typesVersions": { "*": { ".": ["./src/index.d.ts"], - "types": ["./src/types.d.ts"], "internal": ["./src/internal.d.ts"] } }, @@ -31,5 +29,8 @@ "bugs": { "url": "https://github.com/dotCMS/core/issues" }, - "homepage": "https://github.com/dotCMS/core/tree/main/core-web/libs/sdk/uve/README.md" + "homepage": "https://github.com/dotCMS/core/tree/main/core-web/libs/sdk/uve/README.md", + "peerDependencies": { + "@dotcms/types": "next" + } } diff --git a/core-web/libs/sdk/uve/project.json b/core-web/libs/sdk/uve/project.json index 285a9a4f9225..b1c4818251cf 100644 --- a/core-web/libs/sdk/uve/project.json +++ b/core-web/libs/sdk/uve/project.json @@ -25,10 +25,7 @@ "outputs": ["{options.outputPath}"], "options": { "main": "libs/sdk/uve/src/index.ts", - "additionalEntryPoints": [ - "libs/sdk/uve/src/types.ts", - "libs/sdk/uve/src/internal.ts" - ], + "additionalEntryPoints": ["libs/sdk/uve/src/internal.ts"], "generateExportsField": true, "outputPath": "dist/libs/sdk/uve", "tsConfig": "libs/sdk/uve/tsconfig.lib.json", diff --git a/core-web/libs/sdk/uve/src/internal.ts b/core-web/libs/sdk/uve/src/internal.ts index cb1369e53ec3..1b744b976cdd 100644 --- a/core-web/libs/sdk/uve/src/internal.ts +++ b/core-web/libs/sdk/uve/src/internal.ts @@ -1,9 +1,3 @@ export * from './internal/index'; - -export * from './lib/types/editor/internal'; -export * from './lib/types/events/internal'; - export * from './lib/dom/dom.utils'; export * from './lib/editor/internal'; - -export * from './lib/types/block-editor-renderer/internal'; diff --git a/core-web/libs/sdk/uve/src/internal/constants.ts b/core-web/libs/sdk/uve/src/internal/constants.ts index 036e9c9e9a2e..e06ead6129da 100644 --- a/core-web/libs/sdk/uve/src/internal/constants.ts +++ b/core-web/libs/sdk/uve/src/internal/constants.ts @@ -1,3 +1,5 @@ +import { UVEEventHandler, UVEEventSubscriber, UVEEventType } from '@dotcms/types'; + import { onContentChanges, onContentletHovered, @@ -6,8 +8,6 @@ import { onRequestBounds } from './events'; -import { UVEEventHandler, UVEEventSubscriber, UVEEventType } from '../lib/types/editor/public'; - /** * Events that can be subscribed to in the UVE * diff --git a/core-web/libs/sdk/uve/src/internal/events.ts b/core-web/libs/sdk/uve/src/internal/events.ts index b81e7287d427..4e497a7ffe42 100644 --- a/core-web/libs/sdk/uve/src/internal/events.ts +++ b/core-web/libs/sdk/uve/src/internal/events.ts @@ -1,11 +1,12 @@ -import { __DOTCMS_UVE_EVENT__ } from '../internal'; +import { UVEEventHandler, UVEEventType } from '@dotcms/types'; +import { __DOTCMS_UVE_EVENT__ } from '@dotcms/types/internal'; + import { findDotCMSElement, findDotCMSVTLData, getClosestDotCMSContainerData, getDotCMSPageBounds } from '../lib/dom/dom.utils'; -import { UVEEventHandler, UVEEventType } from '../types'; /** * Subscribes to content changes in the UVE editor diff --git a/core-web/libs/sdk/uve/src/lib/core/core.spec.ts b/core-web/libs/sdk/uve/src/lib/core/core.spec.ts index 86e10c288140..653c6a9fb945 100644 --- a/core-web/libs/sdk/uve/src/lib/core/core.spec.ts +++ b/core-web/libs/sdk/uve/src/lib/core/core.spec.ts @@ -1,9 +1,9 @@ import { describe, it, expect, beforeAll, beforeEach, afterEach } from '@jest/globals'; -import { getUVEState, createUVESubscription } from './core.utils'; +import { UVE_MODE, UVEEventType } from '@dotcms/types'; +import { __DOTCMS_UVE_EVENT__ } from '@dotcms/types/internal'; -import { UVE_MODE, UVEEventType } from '../types/editor/public'; -import { __DOTCMS_UVE_EVENT__ } from '../types/events/internal'; +import { getUVEState, createUVESubscription } from './core.utils'; describe('getUVEStatus', () => { beforeAll(() => { diff --git a/core-web/libs/sdk/uve/src/lib/core/core.utils.ts b/core-web/libs/sdk/uve/src/lib/core/core.utils.ts index 521d074a86b6..8de5f5519575 100644 --- a/core-web/libs/sdk/uve/src/lib/core/core.utils.ts +++ b/core-web/libs/sdk/uve/src/lib/core/core.utils.ts @@ -1,12 +1,13 @@ -import { __UVE_EVENTS__, __UVE_EVENT_ERROR_FALLBACK__ } from '../../internal/constants'; import { UVE_MODE, - UVEEventHandler, UVEState, UVEEventSubscription, UVEEventType, - UVEEventPayloadMap -} from '../types/editor/public'; + UVEEventPayloadMap, + UVEEventHandler +} from '@dotcms/types'; + +import { __UVE_EVENTS__, __UVE_EVENT_ERROR_FALLBACK__ } from '../../internal/constants'; /** * Gets the current state of the Universal Visual Editor (UVE). diff --git a/core-web/libs/sdk/uve/src/lib/dom/dom.spec.ts b/core-web/libs/sdk/uve/src/lib/dom/dom.spec.ts index 0e33191d799a..9c0506983273 100644 --- a/core-web/libs/sdk/uve/src/lib/dom/dom.spec.ts +++ b/core-web/libs/sdk/uve/src/lib/dom/dom.spec.ts @@ -1,4 +1,6 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ +import { DotCMSContentlet } from '@dotcms/types'; + import { getDotCMSContentletsBound, computeScrollIsInBottom, @@ -10,7 +12,6 @@ import { getColumnPositionClasses } from './dom.utils'; -import { DotCMSContentlet } from '../types/page/public'; describe('getDotCMSContentletsBound', () => { const createContentlet = ({ x, diff --git a/core-web/libs/sdk/uve/src/lib/dom/dom.utils.ts b/core-web/libs/sdk/uve/src/lib/dom/dom.utils.ts index 78ea6aa3d895..6035c6893be9 100644 --- a/core-web/libs/sdk/uve/src/lib/dom/dom.utils.ts +++ b/core-web/libs/sdk/uve/src/lib/dom/dom.utils.ts @@ -1,16 +1,15 @@ -import { END_CLASS, START_CLASS } from '../../internal/constants'; -import { DotCMSContainerBound, DotCMSContentletBound } from '../types/editor/internal'; import { DotContainerAttributes, DotContentletAttributes, - EditableContainerData -} from '../types/editor/public'; -import { + EditableContainerData, DotCMSColumnContainer, DotCMSContentlet, DotCMSPageAsset, DotPageAssetLayoutColumn -} from '../types/page/public'; +} from '@dotcms/types'; +import { DotCMSContainerBound, DotCMSContentletBound } from '@dotcms/types/internal'; + +import { END_CLASS, START_CLASS } from '../../internal/constants'; /** * Calculates the bounding information for each page element within the given containers. diff --git a/core-web/libs/sdk/uve/src/lib/editor/internal.ts b/core-web/libs/sdk/uve/src/lib/editor/internal.ts index 8eceb9329090..911f1a29955c 100644 --- a/core-web/libs/sdk/uve/src/lib/editor/internal.ts +++ b/core-web/libs/sdk/uve/src/lib/editor/internal.ts @@ -1,5 +1,5 @@ -import { BlockEditorState, DotCMSContainerBound } from '@dotcms/uve/internal'; -import { DotCMSUVEAction, Block } from '@dotcms/uve/types'; +import { DotCMSUVEAction, Block } from '@dotcms/types'; +import { BlockEditorState, DotCMSContainerBound } from '@dotcms/types/internal'; import { sendMessageToUVE } from './public'; diff --git a/core-web/libs/sdk/uve/src/lib/editor/public.spec.ts b/core-web/libs/sdk/uve/src/lib/editor/public.spec.ts index 5e4c54053cd1..f0dc478066d2 100644 --- a/core-web/libs/sdk/uve/src/lib/editor/public.spec.ts +++ b/core-web/libs/sdk/uve/src/lib/editor/public.spec.ts @@ -1,9 +1,9 @@ -import { DotCMSReorderMenuConfig } from '@dotcms/uve/internal'; +import { Contentlet, DotCMSUVEAction } from '@dotcms/types'; +import { DotCMSReorderMenuConfig } from '@dotcms/types/internal'; import { sendMessageToUVE, editContentlet, reorderMenu, initUVE } from './public'; import * as utils from '../../script/utils'; -import { Contentlet, DotCMSUVEAction } from '../types/editor/public'; describe('UVE Public Functions', () => { let postMessageSpy: jest.SpyInstance; diff --git a/core-web/libs/sdk/uve/src/lib/editor/public.ts b/core-web/libs/sdk/uve/src/lib/editor/public.ts index ee60521b6ad2..3008c860aca2 100644 --- a/core-web/libs/sdk/uve/src/lib/editor/public.ts +++ b/core-web/libs/sdk/uve/src/lib/editor/public.ts @@ -1,3 +1,12 @@ +import { + Contentlet, + DotCMSUVEAction, + DotCMSUVEConfig, + DotCMSInlineEditingPayload, + DotCMSInlineEditingType +} from '@dotcms/types'; // '../types/editor/public'; +import { DotCMSReorderMenuConfig, DotCMSUVEMessage } from '@dotcms/types/internal'; //'../types/editor/internal'; + import { addClassToEmptyContentlets, listenBlockEditorInlineEvent, @@ -5,9 +14,6 @@ import { scrollHandler, setClientIsReady } from '../../script/utils'; -import { DotCMSReorderMenuConfig, DotCMSUVEMessage } from '../types/editor/internal'; -import { Contentlet, DotCMSUVEAction, DotCMSUVEConfig } from '../types/editor/public'; -import { DotCMSInlineEditingPayload, DotCMSInlineEditingType } from '../types/events/public'; /** * Post message to dotcms page editor diff --git a/core-web/libs/sdk/uve/src/lib/types/block-editor-renderer/internal.ts b/core-web/libs/sdk/uve/src/lib/types/block-editor-renderer/internal.ts deleted file mode 100644 index 6eb792fa8349..000000000000 --- a/core-web/libs/sdk/uve/src/lib/types/block-editor-renderer/internal.ts +++ /dev/null @@ -1,47 +0,0 @@ -/** - * Enum representing the different types of blocks available in the Block Editor - * - * @export - * @enum {string} - */ -export enum Blocks { - /** Represents a paragraph block */ - PARAGRAPH = 'paragraph', - /** Represents a heading block */ - HEADING = 'heading', - /** Represents a text block */ - TEXT = 'text', - /** Represents a bullet/unordered list block */ - BULLET_LIST = 'bulletList', - /** Represents an ordered/numbered list block */ - ORDERED_LIST = 'orderedList', - /** Represents a list item within a list block */ - LIST_ITEM = 'listItem', - /** Represents a blockquote block */ - BLOCK_QUOTE = 'blockquote', - /** Represents a code block */ - CODE_BLOCK = 'codeBlock', - /** Represents a hard break (line break) */ - HARDBREAK = 'hardBreak', - /** Represents a horizontal rule/divider */ - HORIZONTAL_RULE = 'horizontalRule', - /** Represents a DotCMS image block */ - DOT_IMAGE = 'dotImage', - /** Represents a DotCMS video block */ - DOT_VIDEO = 'dotVideo', - /** Represents a table block */ - TABLE = 'table', - /** Represents a DotCMS content block */ - DOT_CONTENT = 'dotContent' -} - -/** - * Represents the validation state of a Block Editor instance - * - * @interface BlockEditorState - * @property {boolean} isValid - Whether the blocks structure is valid - * @property {string | null} error - Error message if blocks are invalid, null otherwise - */ -export interface BlockEditorState { - error: string | null; -} diff --git a/core-web/libs/sdk/uve/src/lib/types/block-editor-renderer/public.ts b/core-web/libs/sdk/uve/src/lib/types/block-editor-renderer/public.ts deleted file mode 100644 index e945dd233fbe..000000000000 --- a/core-web/libs/sdk/uve/src/lib/types/block-editor-renderer/public.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Represents a Mark used by text content in the Block Editor - * - * @export - * @interface Mark - */ -export interface Mark { - type: string; - attrs: Record; -} - -/** - * Represents a Content Node used by the Block Editor - * - * @export - * @interface ContentNode - */ -export interface ContentNode { - /** The type of content node */ - type: string; - /** Child content nodes */ - content?: ContentNode[]; - /** Optional attributes for the node */ - // eslint-disable-next-line @typescript-eslint/no-explicit-any - attrs?: Record; - /** Optional marks applied to text content */ - marks?: Mark[]; - /** Optional text content */ - text?: string; -} - -/** - * Represents a Block in the Block Editor - * - * @export - * @interface Block - */ -export interface Block { - content?: ContentNode[]; - type: string; -} diff --git a/core-web/libs/sdk/uve/src/lib/types/editor/internal.ts b/core-web/libs/sdk/uve/src/lib/types/editor/internal.ts deleted file mode 100644 index ccc77fc8fd9b..000000000000 --- a/core-web/libs/sdk/uve/src/lib/types/editor/internal.ts +++ /dev/null @@ -1,129 +0,0 @@ -import { DotCMSUVEAction } from './public'; - -/** - * @description Custom client parameters for fetching data. - */ -export type DotCMSCustomerParams = { - depth: string; -}; - -/** - * Configuration for reordering a menu. - */ -export interface DotCMSReorderMenuConfig { - /** - * The starting level of the menu to be reordered. - */ - startLevel: number; - - /** - * The depth of the menu levels to be reordered. - */ - depth: number; -} - -declare global { - interface Window { - dotCMSUVE: DotCMSUVE; - } -} - -/** - * Post message props - * - * @export - * @template T - * @interface DotCMSUVEMessage - */ -export type DotCMSUVEMessage = { - action: DotCMSUVEAction; - payload?: T; -}; - -// eslint-disable-next-line @typescript-eslint/no-explicit-any -type DotCMSUVEFunction = (...args: any[]) => void; - -export interface DotCMSUVE { - editContentlet: DotCMSUVEFunction; - initInlineEditing: DotCMSUVEFunction; - reorderMenu: DotCMSUVEFunction; - lastScrollYPosition: number; -} - -/** - * Main fields of a Contentlet (Inherited from the Content Type). - */ -export interface ContentTypeMainFields { - hostName: string; - modDate: string; - publishDate: string; - title: string; - baseType: string; - inode: string; - archived: boolean; - ownerName: string; - host: string; - working: boolean; - locked: boolean; - stInode: string; - contentType: string; - live: boolean; - owner: string; - identifier: string; - publishUserName: string; - publishUser: string; - languageId: number; - creationDate: string; - url: string; - titleImage: string; - modUserName: string; - hasLiveVersion: boolean; - folder: string; - hasTitleImage: boolean; - sortOrder: number; - modUser: string; - __icon__: string; - contentTypeIcon: string; - variant: string; -} - -/** - * Bound information for a contentlet. - * - * @interface ContentletBound - * Bound information for a contentlet. - * - * @interface DotCMSContentletBound - * @property {number} x - The x-coordinate of the contentlet. - * @property {number} y - The y-coordinate of the contentlet. - * @property {number} width - The width of the contentlet. - * @property {number} height - The height of the contentlet. - * @property {string} payload - The payload data of the contentlet in JSON format. - */ -export interface DotCMSContentletBound { - x: number; - y: number; - width: number; - height: number; - payload: string; -} - -/** - * Bound information for a container. - * - * @interface DotCMSContainerBound - * @property {number} x - The x-coordinate of the container. - * @property {number} y - The y-coordinate of the container. - * @property {number} width - The width of the container. - * @property {number} height - The height of the container. - * @property {string} payload - The payload data of the container in JSON format. - * @property {DotCMSContentletBound[]} contentlets - An array of contentlets within the container. - */ -export interface DotCMSContainerBound { - x: number; - y: number; - width: number; - height: number; - payload: string; - contentlets: DotCMSContentletBound[]; -} diff --git a/core-web/libs/sdk/uve/src/lib/types/editor/public.ts b/core-web/libs/sdk/uve/src/lib/types/editor/public.ts deleted file mode 100644 index a9480335d4ff..000000000000 --- a/core-web/libs/sdk/uve/src/lib/types/editor/public.ts +++ /dev/null @@ -1,292 +0,0 @@ -import { ContentTypeMainFields, DotCMSContainerBound } from './internal'; - -import { DEVELOPMENT_MODE, PRODUCTION_MODE } from '../../../internal'; -import { DotCMSBasicGraphQLPage, DotCMSPageAsset } from '../page/public'; - -/** - * Represents the state of the Universal Visual Editor (UVE) - * @interface - * @property {UVE_MODE} mode - The current mode of operation for UVE (EDIT, PREVIEW, LIVE, or UNKNOWN) - * @property {string | null} persona - The selected persona for content personalization - * @property {string | null} variantName - The name of the current content variant - * @property {string | null} experimentId - The identifier for the current A/B testing experiment - * @property {string | null} publishDate - The scheduled publish date for content - * @property {string | null} languageId - The identifier for the current language selection - */ -export interface UVEState { - mode: UVE_MODE; - persona: string | null; - variantName: string | null; - experimentId: string | null; - publishDate: string | null; - languageId: string | null; -} - -/** - * The mode of the page renderer component - * @enum {string} - */ -export type DotCMSPageRendererMode = typeof PRODUCTION_MODE | typeof DEVELOPMENT_MODE; - -/** - * 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 - */ -export enum UVE_MODE { - EDIT = 'EDIT_MODE', - PREVIEW = 'PREVIEW_MODE', - LIVE = 'LIVE', - UNKNOWN = 'UNKNOWN' -} - -/** - * Callback function for UVE events - * @callback UVEEventHandler - * @param {unknown} eventData - The event data - */ -export type UVEEventHandler = (eventData?: unknown) => void; - -/** - * Unsubscribe function for UVE events - * @callback UVEUnsubscribeFunction - */ -export type UVEUnsubscribeFunction = () => void; - -/** - * UVE event subscription type - * @typedef {Object} UVEEventSubscription - * @property {UVEUnsubscribeFunction} unsubscribe - The unsubscribe function for the UVE event - * @property {string} event - The event name - */ -export type UVEEventSubscription = { - unsubscribe: UVEUnsubscribeFunction; - event: string; -}; - -/** - * UVE event type - * @typedef {function} UVEEventSubscriber - */ -export type UVEEventSubscriber = (callback: UVEEventHandler) => UVEEventSubscription; - -//TODO: Recheck this after changes -/** - * Configuration type for DotCMS Editor - * @typedef {Object} DotCMSEditoConfig - * @property {Object} [params] - Parameters for Page API configuration - * @property {number} [params.depth] - The depth level for fetching page data - * @property {string} [query] - GraphQL query string for data fetching - */ -export type DotCMSEditorConfig = { params: { depth: number } } | { query: string }; - -/** - * Actions send to the dotcms editor - * - * @export - * @enum {number} - */ -export enum DotCMSUVEAction { - /** - * Tell the dotcms editor that page change - */ - NAVIGATION_UPDATE = 'set-url', - /** - * Send the element position of the rows, columnsm containers and contentlets - */ - SET_BOUNDS = 'set-bounds', - /** - * Send the information of the hovered contentlet - */ - SET_CONTENTLET = 'set-contentlet', - /** - * Tell the editor that the page is being scrolled - */ - IFRAME_SCROLL = 'scroll', - /** - * Tell the editor that the page has stopped scrolling - */ - IFRAME_SCROLL_END = 'scroll-end', - /** - * Ping the editor to see if the page is inside the editor - */ - PING_EDITOR = 'ping-editor', - /** - * Tell the editor to init the inline editing editor. - */ - INIT_INLINE_EDITING = 'init-inline-editing', - /** - * Tell the editor to open the Copy-contentlet dialog - * To copy a content and then edit it inline. - */ - COPY_CONTENTLET_INLINE_EDITING = 'copy-contentlet-inline-editing', - /** - * Tell the editor to save inline edited contentlet - */ - UPDATE_CONTENTLET_INLINE_EDITING = 'update-contentlet-inline-editing', - /** - * Tell the editor to trigger a menu reorder - */ - REORDER_MENU = 'reorder-menu', - /** - * Tell the editor to send the page info to iframe - */ - GET_PAGE_DATA = 'get-page-data', - /** - * Tell the editor an user send a graphql query - */ - CLIENT_READY = 'client-ready', - /** - * Tell the editor to edit a contentlet - */ - EDIT_CONTENTLET = 'edit-contentlet', - /** - * Tell the editor to do nothing - */ - NOOP = 'noop' -} - -/** - * The contentlet has the main fields and the custom fields of the content type. - * - * @template T - The custom fields of the content type. - */ -export type Contentlet = T & ContentTypeMainFields; - -/** - * Available events in the Universal Visual Editor - * @enum {string} - */ -export enum UVEEventType { - /** - * Triggered when page data changes from the editor - */ - CONTENT_CHANGES = 'changes', - - /** - * Triggered when the page needs to be reloaded - */ - PAGE_RELOAD = 'page-reload', - - /** - * Triggered when the editor requests container bounds - */ - REQUEST_BOUNDS = 'request-bounds', - - /** - * Triggered when scroll action is needed inside the iframe - */ - IFRAME_SCROLL = 'iframe-scroll', - - /** - * Triggered when a contentlet is hovered - */ - CONTENTLET_HOVERED = 'contentlet-hovered' -} - -/** - * Type definitions for each event's payload - */ -export type UVEEventPayloadMap = { - [UVEEventType.CONTENT_CHANGES]: DotCMSEditablePage; - [UVEEventType.PAGE_RELOAD]: undefined; - [UVEEventType.REQUEST_BOUNDS]: DotCMSContainerBound[]; - [UVEEventType.IFRAME_SCROLL]: 'up' | 'down'; - // TODO: Add type here - [UVEEventType.CONTENTLET_HOVERED]: unknown; -}; - -/** - * - * Interface representing the data needed for container editing - * @interface EditableContainerData - */ -export interface EditableContainerData { - uuid: string; - identifier: string; - acceptTypes: string; - maxContentlets: number; - variantId?: string; -} - -/** - * - * Interface representing the data attributes of a DotCMS container. - * @interface DotContainerAttributes - */ -export interface DotContainerAttributes { - 'data-dot-object': string; - 'data-dot-accept-types': string; - 'data-dot-identifier': string; - 'data-max-contentlets': string; - 'data-dot-uuid': string; -} - -/** - * - * Interface representing the data attributes of a DotCMS contentlet. - * @interface DotContentletAttributes - */ -export interface DotContentletAttributes { - 'data-dot-identifier': string; - 'data-dot-basetype': string; - 'data-dot-title': string; - 'data-dot-inode': string; - 'data-dot-type': string; - 'data-dot-container': string; - 'data-dot-on-number-of-pages': string; -} - -/** - * Represents a GraphQL error - * @interface DotCMSGraphQLError - */ -export interface DotCMSGraphQLError { - message: string; - locations: { - line: number; - column: number; - }[]; - extensions: { - classification: string; - }; -} - -/** - * Represents the complete response from a GraphQL page query - * - * @template TContent - The type of the content data - * @template TNav - The type of the navigation data - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -export interface DotCMSGraphQLPageResponse> { - page: DotCMSBasicGraphQLPage; - content?: TContent; - errors?: DotCMSGraphQLError; - graphql: { - query: string; - variables: Record; - }; -} - -/** - * Payload for initializing the UVE - * @interface DotCMSEditablePage - */ -export type DotCMSEditablePage = DotCMSGraphQLPageResponse | DotCMSPageAsset; - -/** - * Configuration for the UVE - * @interface DotCMSUVEConfig - */ -export interface DotCMSUVEConfig { - graphql?: { - query: string; - variables: Record; - }; - params?: Record; -} diff --git a/core-web/libs/sdk/uve/src/lib/types/events/internal.ts b/core-web/libs/sdk/uve/src/lib/types/events/internal.ts deleted file mode 100644 index ae382b5b9a0f..000000000000 --- a/core-web/libs/sdk/uve/src/lib/types/events/internal.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Actions received from the dotcms editor - * - * @export - * @enum {number} - */ -export enum __DOTCMS_UVE_EVENT__ { - /** - * Request to page to reload - */ - UVE_RELOAD_PAGE = 'uve-reload-page', - /** - * Request the bounds for the elements - */ - UVE_REQUEST_BOUNDS = 'uve-request-bounds', - /** - * Received pong from the editor - */ - UVE_EDITOR_PONG = 'uve-editor-pong', - /** - * Received scroll event trigger from the editor - */ - UVE_SCROLL_INSIDE_IFRAME = 'uve-scroll-inside-iframe', - /** - * TODO: - * Set the page data - This is used to catch the "changes" event. - * We must to re-check the name late. - */ - UVE_SET_PAGE_DATA = 'uve-set-page-data', - /** - * Copy contentlet inline editing success - */ - UVE_COPY_CONTENTLET_INLINE_EDITING_SUCCESS = 'uve-copy-contentlet-inline-editing-success' -} diff --git a/core-web/libs/sdk/uve/src/lib/types/events/public.ts b/core-web/libs/sdk/uve/src/lib/types/events/public.ts deleted file mode 100644 index 5bbd001ddeb4..000000000000 --- a/core-web/libs/sdk/uve/src/lib/types/events/public.ts +++ /dev/null @@ -1,19 +0,0 @@ -export type DotCMSInlineEditingType = 'BLOCK_EDITOR' | 'WYSIWYG'; - -/** - * Interface representing the data needed for inline editing in DotCMS - * - * @interface DotCMSInlineEditorData - * @property {string} inode - The inode identifier of the content being edited - * @property {number} language - The language ID of the content - * @property {string} contentType - The content type identifier - * @property {string} fieldName - The name of the field being edited - * @property {Record} content - The content data as key-value pairs - */ -export interface DotCMSInlineEditingPayload { - inode: string; - language: number; - contentType: string; - fieldName: string; - content: Record; -} diff --git a/core-web/libs/sdk/uve/src/lib/types/page/public.ts b/core-web/libs/sdk/uve/src/lib/types/page/public.ts deleted file mode 100644 index 1674900b9d6b..000000000000 --- a/core-web/libs/sdk/uve/src/lib/types/page/public.ts +++ /dev/null @@ -1,513 +0,0 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ - -export interface DotCMSPageAsset { - canCreateTemplate?: boolean; - containers: { - [key: string]: DotCMSPageAssetContainer; - }; - layout: DotCMSLayout; - page: DotCMSPage; - site: DotCMSSite; - template: DotCMSTemplate; - viewAs?: DotCMSViewAs; - vanityUrl?: DotCMSVanityUrl; - params?: Record; -} - -export interface DotPageAssetLayoutRow { - identifier: number; - value?: string; - id?: string; - columns: DotPageAssetLayoutColumn[]; - styleClass?: string; -} - -export interface DotCMSVanityUrl { - pattern: string; - vanityUrlId: string; - url: string; - siteId: string; - languageId: number; - forwardTo: string; - response: number; - order: number; - temporaryRedirect: boolean; - permanentRedirect: boolean; - forward: boolean; -} - -export interface DotPageAssetLayoutColumn { - preview: boolean; - containers: DotCMSColumnContainer[]; - widthPercent: number; - width: number; - leftOffset: number; - left: number; - styleClass?: string; -} - -export interface DotCMSColumnContainer { - identifier: string; - uuid: string; - historyUUIDs: string[]; -} - -export interface DotCMSPageAssetContainer { - container: DotCMSContainer; - containerStructures: DotCMSContainerStructure[]; - contentlets: { - [key: string]: DotCMSContentlet[]; - }; -} - -export interface DotCMSContainer { - identifier: string; - uuid: string; - iDate: number; - type: string; - owner?: string; - inode: string; - source: string; - title: string; - friendlyName: string; - modDate: number; - modUser: string; - sortOrder: number; - showOnMenu: boolean; - code?: string; - maxContentlets: number; - useDiv: boolean; - sortContentletsBy?: string; - preLoop: string; - postLoop: string; - staticify: boolean; - luceneQuery?: string; - notes: string; - languageId?: number; - path?: string; - live: boolean; - locked: boolean; - working: boolean; - deleted: boolean; - name: string; - archived: boolean; - permissionId: string; - versionId: string; - versionType: string; - permissionType: string; - categoryId: string; - idate: number; - new: boolean; - acceptTypes: string; - contentlets: DotCMSContentlet[]; - parentPermissionable: DotCMSSiteParentPermissionable; -} - -export interface DotCMSContentlet { - archived: boolean; - baseType: string; - deleted?: boolean; - binary?: string; - binaryContentAsset?: string; - binaryVersion?: string; - contentType: string; - file?: string; - folder: string; - hasLiveVersion?: boolean; - hasTitleImage: boolean; - host: string; - hostName: string; - identifier: string; - inode: string; - image?: any; - languageId: number; - language?: string; - live: boolean; - locked: boolean; - mimeType?: string; - modDate: string; - modUser: string; - modUserName: string; - owner: string; - sortOrder: number; - stInode: string; - title: string; - titleImage: string; - text?: string; - url: string; - working: boolean; - body?: string; - contentTypeIcon?: string; - variant?: string; - __icon__?: string; - [key: string]: any; // This is a catch-all for any other custom properties that might be on the contentlet. -} - -export interface DotcmsNavigationItem { - code?: any; - folder: string; - children?: DotcmsNavigationItem[]; - host: string; - languageId: number; - href: string; - title: string; - type: string; - hash: number; - target: string; - order: number; -} - -interface DotCMSTemplate { - iDate: number; - type: string; - owner: string; - inode: string; - identifier: string; - source: string; - title: string; - friendlyName: string; - modDate: number; - modUser: string; - sortOrder: number; - showOnMenu: boolean; - image: string; - drawed: boolean; - drawedBody: string; - theme: string; - anonymous: boolean; - template: boolean; - name: string; - live: boolean; - archived: boolean; - locked: boolean; - working: boolean; - permissionId: string; - versionId: string; - versionType: string; - deleted: boolean; - permissionType: string; - categoryId: string; - idate: number; - new: boolean; - canEdit: boolean; -} - -interface DotCMSPage { - template: string; - modDate: number; - metadata: string; - cachettl: string; - pageURI: string; - title: string; - type: string; - showOnMenu: string; - httpsRequired: boolean; - inode: string; - disabledWYSIWYG: any[]; - seokeywords: string; - host: string; - lastReview: number; - working: boolean; - locked: boolean; - stInode: string; - friendlyName: string; - live: boolean; - owner: string; - identifier: string; - nullProperties: any[]; - friendlyname: string; - pagemetadata: string; - languageId: number; - url: string; - seodescription: string; - modUserName: string; - folder: string; - deleted: boolean; - sortOrder: number; - modUser: string; - pageUrl: string; - workingInode: string; - shortyWorking: string; - canEdit: boolean; - canRead: boolean; - canLock: boolean; - lockedOn: number; - lockedBy: string; - lockedByName: string; - liveInode: string; - shortyLive: string; -} - -interface DotCMSViewAs { - language: { - id: number; - languageCode: string; - countryCode: string; - language: string; - country: string; - }; - mode: string; -} - -interface DotCMSLayout { - pageWidth: string; - width: string; - layout: string; - title: string; - header: boolean; - footer: boolean; - body: DotPageAssetLayoutBody; - sidebar: DotPageAssetLayoutSidebar; -} - -interface DotCMSContainerStructure { - id: string; - structureId: string; - containerInode: string; - containerId: string; - code: string; - contentTypeVar: string; -} - -interface DotPageAssetLayoutSidebar { - preview: boolean; - containers: DotCMSContainer[]; - location: string; - widthPercent: number; - width: string; -} - -interface DotPageAssetLayoutBody { - rows: DotPageAssetLayoutRow[]; -} - -interface DotCMSSite { - lowIndexPriority: boolean; - name: string; - default: boolean; - aliases: string; - parent: boolean; - tagStorage: string; - systemHost: boolean; - inode: string; - versionType: string; - structureInode: string; - hostname: string; - hostThumbnail?: any; - owner: string; - permissionId: string; - permissionType: string; - type: string; - identifier: string; - modDate: number; - host: string; - live: boolean; - indexPolicy: string; - categoryId: string; - actionId?: any; - new: boolean; - archived: boolean; - locked: boolean; - disabledWysiwyg: any[]; - modUser: string; - working: boolean; - titleImage: { - present: boolean; - }; - folder: string; - htmlpage: boolean; - fileAsset: boolean; - vanityUrl: boolean; - keyValue: boolean; - structure?: DotCMSSiteStructure; - title: string; - languageId: number; - indexPolicyDependencies: string; - contentTypeId: string; - versionId: string; - lastReview: number; - nextReview?: any; - reviewInterval?: any; - sortOrder: number; - contentType: DotCMSSiteContentType; -} - -interface DotCMSSiteContentType { - owner?: any; - parentPermissionable: DotCMSSiteParentPermissionable; - permissionId: string; - permissionType: string; -} - -export interface DotCMSSiteParentPermissionable { - Inode: string; - Identifier: string; - permissionByIdentifier: boolean; - type: string; - owner?: any; - identifier: string; - permissionId: string; - parentPermissionable?: any; - permissionType: string; - inode: string; - childrenPermissionable?: any; - variantId?: string; -} - -interface DotCMSSiteStructure { - iDate: number; - type: string; - owner?: any; - inode: string; - identifier: string; - name: string; - description: string; - defaultStructure: boolean; - reviewInterval?: any; - reviewerRole?: any; - pagedetail?: any; - structureType: number; - fixed: boolean; - system: boolean; - velocityVarName: string; - urlMapPattern?: any; - host: string; - folder: string; - publishDateVar?: any; - expireDateVar?: any; - modDate: number; - fields: DotCMSSiteField[]; - widget: boolean; - detailPage?: any; - fieldsBySortOrder: DotCMSSiteField[]; - form: boolean; - htmlpageAsset: boolean; - content: boolean; - fileAsset: boolean; - persona: boolean; - permissionId: string; - permissionType: string; - live: boolean; - categoryId: string; - idate: number; - new: boolean; - archived: boolean; - locked: boolean; - modUser: string; - working: boolean; - title: string; - versionId: string; - versionType: string; -} - -interface DotCMSSiteField { - iDate: number; - type: string; - owner?: any; - inode: string; - identifier: string; - structureInode: string; - fieldName: string; - fieldType: string; - fieldRelationType?: any; - fieldContentlet: string; - required: boolean; - velocityVarName: string; - sortOrder: number; - values?: any; - regexCheck?: any; - hint?: any; - defaultValue?: any; - indexed: boolean; - listed: boolean; - fixed: boolean; - readOnly: boolean; - searchable: boolean; - unique: boolean; - modDate: number; - dataType: string; - live: boolean; - categoryId: string; - idate: number; - new: boolean; - archived: boolean; - locked: boolean; - modUser: string; - working: boolean; - permissionId: string; - parentPermissionable?: any; - permissionType: string; - title: string; - versionId: string; - versionType: string; -} - -/** - * Represents a basic page structure returned from GraphQL queries - */ -export interface DotCMSBasicGraphQLPage { - publishDate: string; - type: string; - httpsRequired: boolean; - inode: string; - path: string; - identifier: string; - hasTitleImage: boolean; - sortOrder: number; - extension: string; - canRead: boolean; - pageURI: string; - canEdit: boolean; - archived: boolean; - friendlyName: string; - workingInode: string; - url: string; - hasLiveVersion: boolean; - deleted: boolean; - pageUrl: string; - shortyWorking: string; - mimeType: string; - locked: boolean; - stInode: string; - contentType: string; - creationDate: string; - liveInode: string; - name: string; - shortyLive: string; - modDate: string; - title: string; - baseType: string; - working: boolean; - canLock: boolean; - live: boolean; - isContentlet: boolean; - statusIcons: string; - // Language information - conLanguage: { - id: number; - language: string; - languageCode: string; - }; - - // Template information - template: { - drawed: boolean; - }; - - // Container information - containers: { - path?: string; - identifier: string; - maxContentlets?: number; - containerStructures?: { - contentTypeVar: string; - }[]; - containerContentlets?: { - uuid: string; - contentlets: DotCMSContentlet[]; - }[]; - }; - - layout: DotCMSLayout; - viewAs: DotCMSViewAs; -} diff --git a/core-web/libs/sdk/uve/src/script/sdk-editor.ts b/core-web/libs/sdk/uve/src/script/sdk-editor.ts index e7e2d540e86c..9fbf5ec4c6ba 100644 --- a/core-web/libs/sdk/uve/src/script/sdk-editor.ts +++ b/core-web/libs/sdk/uve/src/script/sdk-editor.ts @@ -1,3 +1,5 @@ +import { UVE_MODE } from '@dotcms/types'; + import { addClassToEmptyContentlets, listenBlockEditorInlineEvent, @@ -8,7 +10,6 @@ import { import { createUVESubscription, getUVEState } from '../lib/core/core.utils'; import { editContentlet, reorderMenu } from '../lib/editor/public'; -import { UVE_MODE } from '../lib/types/editor/public'; declare global { interface Window { diff --git a/core-web/libs/sdk/uve/src/script/utils.ts b/core-web/libs/sdk/uve/src/script/utils.ts index d5670b9730f6..3df3ab5297be 100644 --- a/core-web/libs/sdk/uve/src/script/utils.ts +++ b/core-web/libs/sdk/uve/src/script/utils.ts @@ -1,9 +1,10 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ +import { DotCMSUVEAction, DotCMSUVEConfig, UVEEventType } from '@dotcms/types'; + import { createUVESubscription } from '../lib/core/core.utils'; import { computeScrollIsInBottom } from '../lib/dom/dom.utils'; import { setBounds } from '../lib/editor/internal'; import { initInlineEditing, sendMessageToUVE } from '../lib/editor/public'; -import { DotCMSUVEAction, DotCMSUVEConfig, UVEEventType } from '../lib/types/editor/public'; /** * Sets up scroll event handlers for the window to notify the editor about scroll events. diff --git a/core-web/libs/sdk/uve/src/types.ts b/core-web/libs/sdk/uve/src/types.ts deleted file mode 100644 index 0227fd57a118..000000000000 --- a/core-web/libs/sdk/uve/src/types.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * from './lib/types/editor/public'; -export * from './lib/types/events/public'; -export * from './lib/types/block-editor-renderer/public'; -export * from './lib/types/page/public'; diff --git a/core-web/tsconfig.base.json b/core-web/tsconfig.base.json index 4981f1d893d1..b98b77d637ac 100644 --- a/core-web/tsconfig.base.json +++ b/core-web/tsconfig.base.json @@ -59,6 +59,7 @@ "@dotcms/react": ["libs/sdk/react/src/index.ts"], "@dotcms/template-builder": ["libs/template-builder/src/index.ts"], "@dotcms/types": ["libs/sdk/types/src/index.ts"], + "@dotcms/types/internal": ["libs/sdk/types/src/internal.ts"], "@dotcms/ui": ["libs/ui/src/index.ts"], "@dotcms/utils": ["libs/utils/src"], "@dotcms/utils-testing": ["libs/utils-testing/src/index.ts"], diff --git a/dotCMS/src/main/webapp/ext/uve/dot-uve.js b/dotCMS/src/main/webapp/ext/uve/dot-uve.js index e07abb7a18a3..d91bbe14a262 100644 --- a/dotCMS/src/main/webapp/ext/uve/dot-uve.js +++ b/dotCMS/src/main/webapp/ext/uve/dot-uve.js @@ -1,3 +1,3 @@ (function(){ -function y(t){return t.map(e=>{let n=e.getBoundingClientRect(),o=Array.from(e.querySelectorAll('[data-dot-object="contentlet"]'));return{x:n.x,y:n.y,width:n.width,height:n.height,payload:JSON.stringify({container:L(e)}),contentlets:F(n,o)}})}function F(t,e){return e.map(n=>{let o=n.getBoundingClientRect();return{x:0,y:o.y-t.y,width:o.width,height:o.height,payload:JSON.stringify({container:n.dataset?.dotContainer?JSON.parse(n.dataset?.dotContainer):u(n),contentlet:{identifier:n.dataset?.dotIdentifier,title:n.dataset?.dotTitle,inode:n.dataset?.dotInode,contentType:n.dataset?.dotType}})}})}function L(t){return{acceptTypes:t.dataset?.dotAcceptTypes||"",identifier:t.dataset?.dotIdentifier||"",maxContentlets:t.dataset?.maxContentlets||"",uuid:t.dataset?.dotUuid||""}}function u(t){let e=t.closest('[data-dot-object="container"]');return e?L(e):(console.warn("No container found for the contentlet"),null)}function p(t){return t?t?.dataset?.dotObject==="contentlet"||t?.dataset?.dotObject==="container"&&t.children.length===0?t:p(t?.parentElement):null}function N(t){let e=t.querySelectorAll('[data-dot-object="vtl-file"]');return e.length?Array.from(e).map(n=>({inode:n.dataset?.dotInode,name:n.dataset?.dotUrl})):null}function v(){let t=document.documentElement.scrollHeight,e=window.innerHeight;return window.scrollY+e>=t}var l=(r=>(r.EDIT="EDIT_MODE",r.PREVIEW="PREVIEW_MODE",r.LIVE="LIVE",r.UNKNOWN="UNKNOWN",r))(l||{});function i(t){window.parent.postMessage(t,"*")}function _(t){i({action:"edit-contentlet",payload:t})}function O(t){let{startLevel:e=1,depth:n=2}=t||{};i({action:"reorder-menu",payload:{startLevel:e,depth:n}})}function I(t,e){i({action:"init-inline-editing",payload:{type:t,data:e}})}function M(t){i({action:"set-bounds",payload:t})}function x(t){let e=n=>{n.data.name==="uve-set-page-data"&&t(n.data.payload)};return window.addEventListener("message",e),{unsubscribe:()=>{window.removeEventListener("message",e)},event:"changes"}}function U(t){let e=n=>{n.data.name==="uve-reload-page"&&t()};return window.addEventListener("message",e),{unsubscribe:()=>{window.removeEventListener("message",e)},event:"page-reload"}}function A(t){let e=n=>{if(n.data.name==="uve-request-bounds"){let o=Array.from(document.querySelectorAll('[data-dot-object="container"]')),r=y(o);t(r)}};return window.addEventListener("message",e),{unsubscribe:()=>{window.removeEventListener("message",e)},event:"request-bounds"}}function P(t){let e=n=>{if(n.data.name==="uve-scroll-inside-iframe"){let o=n.data.direction;t(o)}};return window.addEventListener("message",e),{unsubscribe:()=>{window.removeEventListener("message",e)},event:"iframe-scroll"}}function w(t){let e=n=>{let o=p(n.target);if(!o)return;let{x:r,y:a,width:d,height:E}=o.getBoundingClientRect(),h=o.dataset?.dotObject==="container",H={identifier:"TEMP_EMPTY_CONTENTLET",title:"TEMP_EMPTY_CONTENTLET",contentType:"TEMP_EMPTY_CONTENTLET_TYPE",inode:"TEMPY_EMPTY_CONTENTLET_INODE",widgetTitle:"TEMP_EMPTY_CONTENTLET",baseType:"TEMP_EMPTY_CONTENTLET",onNumberOfPages:1},B={identifier:o.dataset?.dotIdentifier,title:o.dataset?.dotTitle,inode:o.dataset?.dotInode,contentType:o.dataset?.dotType,baseType:o.dataset?.dotBasetype,widgetTitle:o.dataset?.dotWidgetTitle,onNumberOfPages:o.dataset?.dotOnNumberOfPages},G=N(o),k={container:o.dataset?.dotContainer?JSON.parse(o.dataset?.dotContainer):u(o),contentlet:h?H:B,vtlFiles:G};t({x:r,y:a,width:d,height:E,payload:k})};return document.addEventListener("pointermove",e),{unsubscribe:()=>{document.removeEventListener("pointermove",e)},event:"contentlet-hovered"}}var V={changes:t=>x(t),"page-reload":t=>U(t),"request-bounds":t=>A(t),"iframe-scroll":t=>P(t),"contentlet-hovered":t=>w(t)},S=t=>({unsubscribe:()=>{},event:t});function D(){if(typeof window>"u"||window.parent===window||!window.location)return;let t=new URL(window.location.href),e=Object.values(l),n=t.searchParams.get("mode")??"EDIT_MODE",o=t.searchParams.get("language_id"),r=t.searchParams.get("personaId"),a=t.searchParams.get("variantName"),d=t.searchParams.get("experimentId"),E=t.searchParams.get("publishDate");return e.includes(n)||(n="EDIT_MODE"),{mode:n,languageId:o,persona:r,variantName:a,experimentId:d,publishDate:E}}function s(t,e){if(!D())return console.warn("UVE Subscription: Not running inside UVE"),S(t);let n=V[t];return n?n(e):(console.error(`UVE Subscription: Event ${t} not found`),S(t))}function m(){let t=()=>{i({action:"scroll"})},e=()=>{i({action:"scroll-end"})};return window.addEventListener("scroll",t),window.addEventListener("scrollend",e),{destroyScrollHandler:()=>{window.removeEventListener("scroll",t),window.removeEventListener("scrollend",e)}}}function C(){document.querySelectorAll('[data-dot-object="contentlet"]').forEach(e=>{e.clientHeight||e.classList.add("empty-contentlet")})}function T(){let t=s("page-reload",()=>{window.location.reload()}),e=s("request-bounds",r=>{M(r)}),n=s("iframe-scroll",r=>{if(window.scrollY===0&&r==="up"||v()&&r==="down")return;let a=r==="up"?-120:120;window.scrollBy({left:0,top:a,behavior:"smooth"})}),o=s("contentlet-hovered",r=>{i({action:"set-contentlet",payload:r})});return{subscriptions:[t,e,n,o]}}function f(t){i({action:"client-ready",payload:t})}function g(){return document.readyState==="complete"?(c(),{destroyListenBlockEditorInlineEvent:()=>{window.removeEventListener("load",()=>c())}}):(window.addEventListener("load",()=>c()),{destroyListenBlockEditorInlineEvent:()=>{window.removeEventListener("load",()=>c())}})}var c=()=>{let t=document.querySelectorAll("[data-block-editor-content]");t.length&&t.forEach(e=>{let{inode:n,language:o="1",contentType:r,fieldName:a,blockEditorContent:d}=e.dataset,E=JSON.parse(d||"");if(!n||!o||!r||!a){console.error("Missing data attributes for block editor inline editing."),console.warn("inode, language, contentType and fieldName are required.");return}e.classList.add("dotcms__inline-edit-field"),e.addEventListener("click",()=>{I("BLOCK_EDITOR",{inode:n,content:E,language:parseInt(o),fieldName:a,contentType:r})})})};var Y={createSubscription:s,editContentlet:_,reorderMenu:O};window.dotUVE=Y;var $=D();$?.mode==="EDIT_MODE"&&(T(),m(),C(),f(),g()); +var l=(r=>(r.EDIT="EDIT_MODE",r.PREVIEW="PREVIEW_MODE",r.LIVE="LIVE",r.UNKNOWN="UNKNOWN",r))(l||{});function N(t){return t.map(e=>{let n=e.getBoundingClientRect(),o=Array.from(e.querySelectorAll('[data-dot-object="contentlet"]'));return{x:n.x,y:n.y,width:n.width,height:n.height,payload:JSON.stringify({container:y(e)}),contentlets:F(n,o)}})}function F(t,e){return e.map(n=>{let o=n.getBoundingClientRect();return{x:0,y:o.y-t.y,width:o.width,height:o.height,payload:JSON.stringify({container:n.dataset?.dotContainer?JSON.parse(n.dataset?.dotContainer):u(n),contentlet:{identifier:n.dataset?.dotIdentifier,title:n.dataset?.dotTitle,inode:n.dataset?.dotInode,contentType:n.dataset?.dotType}})}})}function y(t){return{acceptTypes:t.dataset?.dotAcceptTypes||"",identifier:t.dataset?.dotIdentifier||"",maxContentlets:t.dataset?.maxContentlets||"",uuid:t.dataset?.dotUuid||""}}function u(t){let e=t.closest('[data-dot-object="container"]');return e?y(e):(console.warn("No container found for the contentlet"),null)}function p(t){return t?t?.dataset?.dotObject==="contentlet"||t?.dataset?.dotObject==="container"&&t.children.length===0?t:p(t?.parentElement):null}function v(t){let e=t.querySelectorAll('[data-dot-object="vtl-file"]');return e.length?Array.from(e).map(n=>({inode:n.dataset?.dotInode,name:n.dataset?.dotUrl})):null}function L(){let t=document.documentElement.scrollHeight,e=window.innerHeight;return window.scrollY+e>=t}function _(t){let e=n=>{n.data.name==="uve-set-page-data"&&t(n.data.payload)};return window.addEventListener("message",e),{unsubscribe:()=>{window.removeEventListener("message",e)},event:"changes"}}function O(t){let e=n=>{n.data.name==="uve-reload-page"&&t()};return window.addEventListener("message",e),{unsubscribe:()=>{window.removeEventListener("message",e)},event:"page-reload"}}function I(t){let e=n=>{if(n.data.name==="uve-request-bounds"){let o=Array.from(document.querySelectorAll('[data-dot-object="container"]')),r=N(o);t(r)}};return window.addEventListener("message",e),{unsubscribe:()=>{window.removeEventListener("message",e)},event:"request-bounds"}}function M(t){let e=n=>{if(n.data.name==="uve-scroll-inside-iframe"){let o=n.data.direction;t(o)}};return window.addEventListener("message",e),{unsubscribe:()=>{window.removeEventListener("message",e)},event:"iframe-scroll"}}function R(t){let e=n=>{let o=p(n.target);if(!o)return;let{x:r,y:a,width:d,height:E}=o.getBoundingClientRect(),h=o.dataset?.dotObject==="container",H={identifier:"TEMP_EMPTY_CONTENTLET",title:"TEMP_EMPTY_CONTENTLET",contentType:"TEMP_EMPTY_CONTENTLET_TYPE",inode:"TEMPY_EMPTY_CONTENTLET_INODE",widgetTitle:"TEMP_EMPTY_CONTENTLET",baseType:"TEMP_EMPTY_CONTENTLET",onNumberOfPages:1},B={identifier:o.dataset?.dotIdentifier,title:o.dataset?.dotTitle,inode:o.dataset?.dotInode,contentType:o.dataset?.dotType,baseType:o.dataset?.dotBasetype,widgetTitle:o.dataset?.dotWidgetTitle,onNumberOfPages:o.dataset?.dotOnNumberOfPages},k=v(o),G={container:o.dataset?.dotContainer?JSON.parse(o.dataset?.dotContainer):u(o),contentlet:h?H:B,vtlFiles:k};t({x:r,y:a,width:d,height:E,payload:G})};return document.addEventListener("pointermove",e),{unsubscribe:()=>{document.removeEventListener("pointermove",e)},event:"contentlet-hovered"}}var U={changes:t=>_(t),"page-reload":t=>O(t),"request-bounds":t=>I(t),"iframe-scroll":t=>M(t),"contentlet-hovered":t=>R(t)},m=t=>({unsubscribe:()=>{},event:t});function T(){if(typeof window>"u"||window.parent===window||!window.location)return;let t=new URL(window.location.href),e=Object.values(l),n=t.searchParams.get("mode")??"EDIT_MODE",o=t.searchParams.get("language_id"),r=t.searchParams.get("personaId"),a=t.searchParams.get("variantName"),d=t.searchParams.get("experimentId"),E=t.searchParams.get("publishDate");return e.includes(n)||(n="EDIT_MODE"),{mode:n,languageId:o,persona:r,variantName:a,experimentId:d,publishDate:E}}function s(t,e){if(!T())return console.warn("UVE Subscription: Not running inside UVE"),m(t);let n=U[t];return n?n(e):(console.error(`UVE Subscription: Event ${t} not found`),m(t))}function i(t){window.parent.postMessage(t,"*")}function A(t){i({action:"edit-contentlet",payload:t})}function V(t){let{startLevel:e=1,depth:n=2}=t||{};i({action:"reorder-menu",payload:{startLevel:e,depth:n}})}function w(t,e){i({action:"init-inline-editing",payload:{type:t,data:e}})}function P(t){i({action:"set-bounds",payload:t})}function C(){let t=()=>{i({action:"scroll"})},e=()=>{i({action:"scroll-end"})};return window.addEventListener("scroll",t),window.addEventListener("scrollend",e),{destroyScrollHandler:()=>{window.removeEventListener("scroll",t),window.removeEventListener("scrollend",e)}}}function f(){document.querySelectorAll('[data-dot-object="contentlet"]').forEach(e=>{e.clientHeight||e.classList.add("empty-contentlet")})}function g(){let t=s("page-reload",()=>{window.location.reload()}),e=s("request-bounds",r=>{P(r)}),n=s("iframe-scroll",r=>{if(window.scrollY===0&&r==="up"||L()&&r==="down")return;let a=r==="up"?-120:120;window.scrollBy({left:0,top:a,behavior:"smooth"})}),o=s("contentlet-hovered",r=>{i({action:"set-contentlet",payload:r})});return{subscriptions:[t,e,n,o]}}function S(t){i({action:"client-ready",payload:t})}function D(){return document.readyState==="complete"?(c(),{destroyListenBlockEditorInlineEvent:()=>{window.removeEventListener("load",()=>c())}}):(window.addEventListener("load",()=>c()),{destroyListenBlockEditorInlineEvent:()=>{window.removeEventListener("load",()=>c())}})}var c=()=>{let t=document.querySelectorAll("[data-block-editor-content]");t.length&&t.forEach(e=>{let{inode:n,language:o="1",contentType:r,fieldName:a,blockEditorContent:d}=e.dataset,E=JSON.parse(d||"");if(!n||!o||!r||!a){console.error("Missing data attributes for block editor inline editing."),console.warn("inode, language, contentType and fieldName are required.");return}e.classList.add("dotcms__inline-edit-field"),e.addEventListener("click",()=>{w("BLOCK_EDITOR",{inode:n,content:E,language:parseInt(o),fieldName:a,contentType:r})})})};var Y={createSubscription:s,editContentlet:A,reorderMenu:V};window.dotUVE=Y;var $=T();$?.mode==="EDIT_MODE"&&(g(),C(),f(),S(),D()); })(); From 9b78a48f721e1cc3c33f810c74b1fe9453fa2f17 Mon Sep 17 00:00:00 2001 From: Kevin Davila <56242609+kevindaviladev@users.noreply.github.com> Date: Fri, 25 Apr 2025 15:35:25 -0500 Subject: [PATCH 03/15] Fix import on old types path --- core-web/libs/edit-content/src/lib/utils/functions.util.ts | 2 +- .../src/lib/dot-ema-shell/dot-ema-shell.component.spec.ts | 2 +- .../portlet/src/lib/dot-ema-shell/dot-ema-shell.component.ts | 2 +- .../dot-editor-mode-selector.component.spec.ts | 2 +- .../dot-editor-mode-selector.component.ts | 2 +- .../dot-uve-toolbar/dot-uve-toolbar.component.spec.ts | 2 +- .../components/dot-uve-toolbar/dot-uve-toolbar.component.ts | 2 +- .../src/lib/edit-ema-editor/edit-ema-editor.component.spec.ts | 2 +- .../src/lib/edit-ema-editor/edit-ema-editor.component.ts | 2 +- .../portlet/src/lib/services/dot-page-api.service.spec.ts | 2 +- .../edit-ema/portlet/src/lib/services/dot-page-api.service.ts | 2 +- .../edit-ema/portlet/src/lib/store/dot-uve.store.spec.ts | 2 +- .../portlets/edit-ema/portlet/src/lib/store/dot-uve.store.ts | 2 +- .../lib/store/features/editor/toolbar/withUVEToolbar.spec.ts | 2 +- .../src/lib/store/features/editor/toolbar/withUVEToolbar.ts | 2 +- .../portlet/src/lib/store/features/editor/withEditor.spec.ts | 2 +- .../portlet/src/lib/store/features/editor/withEditor.ts | 2 +- .../edit-ema/portlet/src/lib/store/features/track/models.ts | 2 +- .../portlet/src/lib/store/features/track/withTrack.spec.ts | 2 +- .../libs/portlets/edit-ema/portlet/src/lib/utils/utils.spec.ts | 2 +- 20 files changed, 20 insertions(+), 20 deletions(-) diff --git a/core-web/libs/edit-content/src/lib/utils/functions.util.ts b/core-web/libs/edit-content/src/lib/utils/functions.util.ts index 02c530cea1f0..c5c2c3a9f740 100644 --- a/core-web/libs/edit-content/src/lib/utils/functions.util.ts +++ b/core-web/libs/edit-content/src/lib/utils/functions.util.ts @@ -8,7 +8,7 @@ import { DotLanguage, UI_STORAGE_KEY } from '@dotcms/dotcms-models'; -import { UVE_MODE } from '@dotcms/uve/types'; +import { UVE_MODE } from '@dotcms/types'; import { CALENDAR_FIELD_TYPES, diff --git a/core-web/libs/portlets/edit-ema/portlet/src/lib/dot-ema-shell/dot-ema-shell.component.spec.ts b/core-web/libs/portlets/edit-ema/portlet/src/lib/dot-ema-shell/dot-ema-shell.component.spec.ts index 2399d67eb709..ea580a57fa26 100644 --- a/core-web/libs/portlets/edit-ema/portlet/src/lib/dot-ema-shell/dot-ema-shell.component.spec.ts +++ b/core-web/libs/portlets/edit-ema/portlet/src/lib/dot-ema-shell/dot-ema-shell.component.spec.ts @@ -32,6 +32,7 @@ import { SiteService } from '@dotcms/dotcms-js'; import { DotPageToolsSeoComponent } from '@dotcms/portlets/dot-ema/ui'; +import { UVE_MODE } from '@dotcms/types'; import { DotNotLicenseComponent } from '@dotcms/ui'; import { WINDOW } from '@dotcms/utils'; import { @@ -41,7 +42,6 @@ import { DotcmsEventsServiceMock, SiteServiceMock } from '@dotcms/utils-testing'; -import { UVE_MODE } from '@dotcms/uve/types'; import { EditEmaNavigationBarComponent } from './components/edit-ema-navigation-bar/edit-ema-navigation-bar.component'; import { DotEmaShellComponent } from './dot-ema-shell.component'; diff --git a/core-web/libs/portlets/edit-ema/portlet/src/lib/dot-ema-shell/dot-ema-shell.component.ts b/core-web/libs/portlets/edit-ema/portlet/src/lib/dot-ema-shell/dot-ema-shell.component.ts index b3d9211f5a81..2192dc6cceb9 100644 --- a/core-web/libs/portlets/edit-ema/portlet/src/lib/dot-ema-shell/dot-ema-shell.component.ts +++ b/core-web/libs/portlets/edit-ema/portlet/src/lib/dot-ema-shell/dot-ema-shell.component.ts @@ -23,9 +23,9 @@ import { } from '@dotcms/data-access'; import { SiteService } from '@dotcms/dotcms-js'; import { DotPageToolsSeoComponent } from '@dotcms/portlets/dot-ema/ui'; +import { UVE_MODE } from '@dotcms/types'; import { DotInfoPageComponent, DotNotLicenseComponent } from '@dotcms/ui'; import { WINDOW } from '@dotcms/utils'; -import { UVE_MODE } from '@dotcms/uve/types'; import { EditEmaNavigationBarComponent } from './components/edit-ema-navigation-bar/edit-ema-navigation-bar.component'; diff --git a/core-web/libs/portlets/edit-ema/portlet/src/lib/edit-ema-editor/components/dot-uve-toolbar/components/dot-editor-mode-selector/dot-editor-mode-selector.component.spec.ts b/core-web/libs/portlets/edit-ema/portlet/src/lib/edit-ema-editor/components/dot-uve-toolbar/components/dot-editor-mode-selector/dot-editor-mode-selector.component.spec.ts index 10accda8aca1..f37b825a574b 100644 --- a/core-web/libs/portlets/edit-ema/portlet/src/lib/edit-ema-editor/components/dot-uve-toolbar/components/dot-editor-mode-selector/dot-editor-mode-selector.component.spec.ts +++ b/core-web/libs/portlets/edit-ema/portlet/src/lib/edit-ema-editor/components/dot-uve-toolbar/components/dot-editor-mode-selector/dot-editor-mode-selector.component.spec.ts @@ -3,7 +3,7 @@ import { createComponentFactory, Spectator } from '@ngneat/spectator/jest'; import { signal } from '@angular/core'; import { DotAnalyticsTrackerService, DotMessageService } from '@dotcms/data-access'; -import { UVE_MODE } from '@dotcms/uve/types'; +import { UVE_MODE } from '@dotcms/types'; import { DotEditorModeSelectorComponent } from './dot-editor-mode-selector.component'; diff --git a/core-web/libs/portlets/edit-ema/portlet/src/lib/edit-ema-editor/components/dot-uve-toolbar/components/dot-editor-mode-selector/dot-editor-mode-selector.component.ts b/core-web/libs/portlets/edit-ema/portlet/src/lib/edit-ema-editor/components/dot-uve-toolbar/components/dot-editor-mode-selector/dot-editor-mode-selector.component.ts index fe76dc7412d6..e51554b28320 100644 --- a/core-web/libs/portlets/edit-ema/portlet/src/lib/edit-ema-editor/components/dot-uve-toolbar/components/dot-editor-mode-selector/dot-editor-mode-selector.component.ts +++ b/core-web/libs/portlets/edit-ema/portlet/src/lib/edit-ema-editor/components/dot-uve-toolbar/components/dot-editor-mode-selector/dot-editor-mode-selector.component.ts @@ -13,8 +13,8 @@ import { MenuModule } from 'primeng/menu'; import { TooltipModule } from 'primeng/tooltip'; import { DotAnalyticsTrackerService } from '@dotcms/data-access'; +import { UVE_MODE } from '@dotcms/types'; import { DotMessagePipe } from '@dotcms/ui'; -import { UVE_MODE } from '@dotcms/uve/types'; import { UVEStore } from '../../../../../store/dot-uve.store'; diff --git a/core-web/libs/portlets/edit-ema/portlet/src/lib/edit-ema-editor/components/dot-uve-toolbar/dot-uve-toolbar.component.spec.ts b/core-web/libs/portlets/edit-ema/portlet/src/lib/edit-ema-editor/components/dot-uve-toolbar/dot-uve-toolbar.component.spec.ts index 5186bef1b87b..32eff7e2be5b 100644 --- a/core-web/libs/portlets/edit-ema/portlet/src/lib/edit-ema-editor/components/dot-uve-toolbar/dot-uve-toolbar.component.spec.ts +++ b/core-web/libs/portlets/edit-ema/portlet/src/lib/edit-ema-editor/components/dot-uve-toolbar/dot-uve-toolbar.component.spec.ts @@ -20,6 +20,7 @@ import { DotWorkflowsActionsService } from '@dotcms/data-access'; import { LoginService } from '@dotcms/dotcms-js'; +import { UVE_MODE } from '@dotcms/types'; import { DotExperimentsServiceMock, DotLanguagesServiceMock, @@ -27,7 +28,6 @@ import { getRunningExperimentMock, mockDotDevices } from '@dotcms/utils-testing'; -import { UVE_MODE } from '@dotcms/uve/types'; import { DotEditorModeSelectorComponent } from './components/dot-editor-mode-selector/dot-editor-mode-selector.component'; import { DotEmaBookmarksComponent } from './components/dot-ema-bookmarks/dot-ema-bookmarks.component'; diff --git a/core-web/libs/portlets/edit-ema/portlet/src/lib/edit-ema-editor/components/dot-uve-toolbar/dot-uve-toolbar.component.ts b/core-web/libs/portlets/edit-ema/portlet/src/lib/edit-ema-editor/components/dot-uve-toolbar/dot-uve-toolbar.component.ts index e97c99710b0e..202cc8d7be03 100644 --- a/core-web/libs/portlets/edit-ema/portlet/src/lib/edit-ema-editor/components/dot-uve-toolbar/dot-uve-toolbar.component.ts +++ b/core-web/libs/portlets/edit-ema/portlet/src/lib/edit-ema-editor/components/dot-uve-toolbar/dot-uve-toolbar.component.ts @@ -38,8 +38,8 @@ import { DotDeviceListItem, DotCMSContentlet } from '@dotcms/dotcms-models'; +import { UVE_MODE } from '@dotcms/types'; import { DotMessagePipe } from '@dotcms/ui'; -import { UVE_MODE } from '@dotcms/uve/types'; import { DotEditorModeSelectorComponent } from './components/dot-editor-mode-selector/dot-editor-mode-selector.component'; import { DotEmaBookmarksComponent } from './components/dot-ema-bookmarks/dot-ema-bookmarks.component'; diff --git a/core-web/libs/portlets/edit-ema/portlet/src/lib/edit-ema-editor/edit-ema-editor.component.spec.ts b/core-web/libs/portlets/edit-ema/portlet/src/lib/edit-ema-editor/edit-ema-editor.component.spec.ts index 0f298c3ef7ce..000e3f8b1a49 100644 --- a/core-web/libs/portlets/edit-ema/portlet/src/lib/edit-ema-editor/edit-ema-editor.component.spec.ts +++ b/core-web/libs/portlets/edit-ema/portlet/src/lib/edit-ema-editor/edit-ema-editor.component.spec.ts @@ -60,6 +60,7 @@ import { } from '@dotcms/dotcms-js'; import { DotCMSContentlet, DEFAULT_VARIANT_ID, DotCMSTempFile } from '@dotcms/dotcms-models'; import { DotResultsSeoToolComponent } from '@dotcms/portlets/dot-ema/ui'; +import { UVE_MODE } from '@dotcms/types'; import { DotCopyContentModalService, ModelCopyContentResponse, SafeUrlPipe } from '@dotcms/ui'; import { WINDOW } from '@dotcms/utils'; import { @@ -79,7 +80,6 @@ import { DotPersonalizeServiceMock, MockDotHttpErrorManagerService } from '@dotcms/utils-testing'; -import { UVE_MODE } from '@dotcms/uve/types'; import { DotUvePageVersionNotFoundComponent } from './components/dot-uve-page-version-not-found/dot-uve-page-version-not-found.component'; import { DotEmaRunningExperimentComponent } from './components/dot-uve-toolbar/components/dot-ema-running-experiment/dot-ema-running-experiment.component'; diff --git a/core-web/libs/portlets/edit-ema/portlet/src/lib/edit-ema-editor/edit-ema-editor.component.ts b/core-web/libs/portlets/edit-ema/portlet/src/lib/edit-ema-editor/edit-ema-editor.component.ts index 5523780a7cb2..8b7f286574fe 100644 --- a/core-web/libs/portlets/edit-ema/portlet/src/lib/edit-ema-editor/edit-ema-editor.component.ts +++ b/core-web/libs/portlets/edit-ema/portlet/src/lib/edit-ema-editor/edit-ema-editor.component.ts @@ -46,9 +46,9 @@ import { SeoMetaTags } from '@dotcms/dotcms-models'; import { DotResultsSeoToolComponent } from '@dotcms/portlets/dot-ema/ui'; +import { __DOTCMS_UVE_EVENT__ } from '@dotcms/types/internal'; import { SafeUrlPipe, DotSpinnerModule, DotCopyContentModalService } from '@dotcms/ui'; import { isEqual, WINDOW } from '@dotcms/utils'; -import { __DOTCMS_UVE_EVENT__ } from '@dotcms/uve/internal'; import { DotUvePageVersionNotFoundComponent } from './components/dot-uve-page-version-not-found/dot-uve-page-version-not-found.component'; import { DotUveToolbarComponent } from './components/dot-uve-toolbar/dot-uve-toolbar.component'; diff --git a/core-web/libs/portlets/edit-ema/portlet/src/lib/services/dot-page-api.service.spec.ts b/core-web/libs/portlets/edit-ema/portlet/src/lib/services/dot-page-api.service.spec.ts index 043e7c547593..118b527b4179 100644 --- a/core-web/libs/portlets/edit-ema/portlet/src/lib/services/dot-page-api.service.spec.ts +++ b/core-web/libs/portlets/edit-ema/portlet/src/lib/services/dot-page-api.service.spec.ts @@ -1,6 +1,6 @@ import { createHttpFactory, HttpMethod, SpectatorHttp } from '@ngneat/spectator'; -import { UVE_MODE } from '@dotcms/uve/types'; +import { UVE_MODE } from '@dotcms/types'; import { DotPageApiService } from './dot-page-api.service'; diff --git a/core-web/libs/portlets/edit-ema/portlet/src/lib/services/dot-page-api.service.ts b/core-web/libs/portlets/edit-ema/portlet/src/lib/services/dot-page-api.service.ts index 80b01c04bb7b..2bc18b59488c 100644 --- a/core-web/libs/portlets/edit-ema/portlet/src/lib/services/dot-page-api.service.ts +++ b/core-web/libs/portlets/edit-ema/portlet/src/lib/services/dot-page-api.service.ts @@ -17,7 +17,7 @@ import { DotTemplate, VanityUrl } from '@dotcms/dotcms-models'; -import { UVE_MODE } from '@dotcms/uve/types'; +import { UVE_MODE } from '@dotcms/types'; import { PERSONA_KEY } from '../shared/consts'; import { DotPage, DotPageAssetParams, SavePagePayload } from '../shared/models'; diff --git a/core-web/libs/portlets/edit-ema/portlet/src/lib/store/dot-uve.store.spec.ts b/core-web/libs/portlets/edit-ema/portlet/src/lib/store/dot-uve.store.spec.ts index 167225eaf897..561934bc9f74 100644 --- a/core-web/libs/portlets/edit-ema/portlet/src/lib/store/dot-uve.store.spec.ts +++ b/core-web/libs/portlets/edit-ema/portlet/src/lib/store/dot-uve.store.spec.ts @@ -22,6 +22,7 @@ import { DotWorkflowsActionsService } from '@dotcms/data-access'; import { LoginService } from '@dotcms/dotcms-js'; +import { UVE_MODE } from '@dotcms/types'; import { MockDotMessageService, getRunningExperimentMock, @@ -31,7 +32,6 @@ import { CurrentUserDataMock, mockLanguageArray } from '@dotcms/utils-testing'; -import { UVE_MODE } from '@dotcms/uve/types'; import { UVEStore } from './dot-uve.store'; import { Orientation } from './models'; diff --git a/core-web/libs/portlets/edit-ema/portlet/src/lib/store/dot-uve.store.ts b/core-web/libs/portlets/edit-ema/portlet/src/lib/store/dot-uve.store.ts index 58f793888802..ec2b34efec88 100644 --- a/core-web/libs/portlets/edit-ema/portlet/src/lib/store/dot-uve.store.ts +++ b/core-web/libs/portlets/edit-ema/portlet/src/lib/store/dot-uve.store.ts @@ -2,7 +2,7 @@ import { patchState, signalStore, withComputed, withMethods, withState } from '@ import { computed, untracked } from '@angular/core'; -import { UVE_MODE } from '@dotcms/uve/types'; +import { UVE_MODE } from '@dotcms/types'; import { withSave } from './features/editor/save/withSave'; import { withEditor } from './features/editor/withEditor'; diff --git a/core-web/libs/portlets/edit-ema/portlet/src/lib/store/features/editor/toolbar/withUVEToolbar.spec.ts b/core-web/libs/portlets/edit-ema/portlet/src/lib/store/features/editor/toolbar/withUVEToolbar.spec.ts index 079ad951b4a2..a05169c937f3 100644 --- a/core-web/libs/portlets/edit-ema/portlet/src/lib/store/features/editor/toolbar/withUVEToolbar.spec.ts +++ b/core-web/libs/portlets/edit-ema/portlet/src/lib/store/features/editor/toolbar/withUVEToolbar.spec.ts @@ -6,8 +6,8 @@ import { of } from 'rxjs'; import { ActivatedRoute, Router } from '@angular/router'; import { DEFAULT_VARIANT_ID, DEFAULT_VARIANT_NAME } from '@dotcms/dotcms-models'; +import { UVE_MODE } from '@dotcms/types'; import { getRunningExperimentMock, mockDotDevices } from '@dotcms/utils-testing'; -import { UVE_MODE } from '@dotcms/uve/types'; import { withUVEToolbar } from './withUVEToolbar'; diff --git a/core-web/libs/portlets/edit-ema/portlet/src/lib/store/features/editor/toolbar/withUVEToolbar.ts b/core-web/libs/portlets/edit-ema/portlet/src/lib/store/features/editor/toolbar/withUVEToolbar.ts index 37893ec557b1..884a6efbd5a2 100644 --- a/core-web/libs/portlets/edit-ema/portlet/src/lib/store/features/editor/toolbar/withUVEToolbar.ts +++ b/core-web/libs/portlets/edit-ema/portlet/src/lib/store/features/editor/toolbar/withUVEToolbar.ts @@ -15,7 +15,7 @@ import { DotExperimentStatus, SeoMetaTagsResult } from '@dotcms/dotcms-models'; -import { UVE_MODE } from '@dotcms/uve/types'; +import { UVE_MODE } from '@dotcms/types'; import { DEFAULT_DEVICE, DEFAULT_PERSONA } from '../../../../shared/consts'; import { UVE_STATUS } from '../../../../shared/enums'; diff --git a/core-web/libs/portlets/edit-ema/portlet/src/lib/store/features/editor/withEditor.spec.ts b/core-web/libs/portlets/edit-ema/portlet/src/lib/store/features/editor/withEditor.spec.ts index 5af67752dee5..1626d4304c53 100644 --- a/core-web/libs/portlets/edit-ema/portlet/src/lib/store/features/editor/withEditor.spec.ts +++ b/core-web/libs/portlets/edit-ema/portlet/src/lib/store/features/editor/withEditor.spec.ts @@ -6,8 +6,8 @@ import { of } from 'rxjs'; import { ActivatedRoute, Router } from '@angular/router'; import { DEFAULT_VARIANT_ID, DotDeviceListItem } from '@dotcms/dotcms-models'; +import { UVE_MODE } from '@dotcms/types'; import { mockDotDevices, seoOGTagsMock } from '@dotcms/utils-testing'; -import { UVE_MODE } from '@dotcms/uve/types'; import { withEditor } from './withEditor'; diff --git a/core-web/libs/portlets/edit-ema/portlet/src/lib/store/features/editor/withEditor.ts b/core-web/libs/portlets/edit-ema/portlet/src/lib/store/features/editor/withEditor.ts index fcedd61ff7c7..0ad4462d8605 100644 --- a/core-web/libs/portlets/edit-ema/portlet/src/lib/store/features/editor/withEditor.ts +++ b/core-web/libs/portlets/edit-ema/portlet/src/lib/store/features/editor/withEditor.ts @@ -10,7 +10,7 @@ import { import { computed, untracked } from '@angular/core'; import { DotTreeNode, SeoMetaTags } from '@dotcms/dotcms-models'; -import { UVE_MODE } from '@dotcms/uve/types'; +import { UVE_MODE } from '@dotcms/types'; import { EditorProps, diff --git a/core-web/libs/portlets/edit-ema/portlet/src/lib/store/features/track/models.ts b/core-web/libs/portlets/edit-ema/portlet/src/lib/store/features/track/models.ts index b57d1ba5ca68..6d1fdc53d8e1 100644 --- a/core-web/libs/portlets/edit-ema/portlet/src/lib/store/features/track/models.ts +++ b/core-web/libs/portlets/edit-ema/portlet/src/lib/store/features/track/models.ts @@ -1,4 +1,4 @@ -import { UVE_MODE } from '@dotcms/uve/types'; +import { UVE_MODE } from '@dotcms/types'; export interface AnalyticsUVEModeChange { toMode: UVE_MODE; diff --git a/core-web/libs/portlets/edit-ema/portlet/src/lib/store/features/track/withTrack.spec.ts b/core-web/libs/portlets/edit-ema/portlet/src/lib/store/features/track/withTrack.spec.ts index a306853ceee0..e44e089075ca 100644 --- a/core-web/libs/portlets/edit-ema/portlet/src/lib/store/features/track/withTrack.spec.ts +++ b/core-web/libs/portlets/edit-ema/portlet/src/lib/store/features/track/withTrack.spec.ts @@ -6,7 +6,7 @@ import { provideHttpClientTesting } from '@angular/common/http/testing'; import { DotAnalyticsTrackerService } from '@dotcms/data-access'; import { EVENT_TYPES } from '@dotcms/dotcms-models'; -import { UVE_MODE } from '@dotcms/uve/types'; +import { UVE_MODE } from '@dotcms/types'; import { withTrack } from './withTrack'; diff --git a/core-web/libs/portlets/edit-ema/portlet/src/lib/utils/utils.spec.ts b/core-web/libs/portlets/edit-ema/portlet/src/lib/utils/utils.spec.ts index 1ac41b832985..7e26b2bb6e74 100644 --- a/core-web/libs/portlets/edit-ema/portlet/src/lib/utils/utils.spec.ts +++ b/core-web/libs/portlets/edit-ema/portlet/src/lib/utils/utils.spec.ts @@ -2,7 +2,7 @@ import { Params } from '@angular/router'; import { CurrentUser } from '@dotcms/dotcms-js'; import { DotDevice, DotExperiment, DotExperimentStatus } from '@dotcms/dotcms-models'; -import { UVE_MODE } from '@dotcms/uve/types'; +import { UVE_MODE } from '@dotcms/types'; import { deleteContentletFromContainer, From 69ea1249f418573693d4f351b1eaf2ce49a8b3e1 Mon Sep 17 00:00:00 2001 From: Kevin Davila <56242609+kevindaviladev@users.noreply.github.com> Date: Fri, 25 Apr 2025 18:25:47 -0500 Subject: [PATCH 04/15] Fixed type import on experiments-shell --- .../dot-experiments-shell.component.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core-web/libs/portlets/dot-experiments/portlet/src/lib/dot-experiments-shell/dot-experiments-shell.component.spec.ts b/core-web/libs/portlets/dot-experiments/portlet/src/lib/dot-experiments-shell/dot-experiments-shell.component.spec.ts index ccc70399caa6..12226e6415b4 100644 --- a/core-web/libs/portlets/dot-experiments/portlet/src/lib/dot-experiments-shell/dot-experiments-shell.component.spec.ts +++ b/core-web/libs/portlets/dot-experiments/portlet/src/lib/dot-experiments-shell/dot-experiments-shell.component.spec.ts @@ -6,7 +6,7 @@ import { ActivatedRoute, Router } from '@angular/router'; import { MessageService } from 'primeng/api'; import { Toast } from 'primeng/toast'; -import { UVE_MODE } from '@dotcms/uve/types'; +import { UVE_MODE } from '@dotcms/types'; import { DotExperimentsShellComponent } from './dot-experiments-shell.component'; import { DotExperimentsStore } from './store/dot-experiments.store'; From 7a4a8f6161cd2b062a254eab4b2f2076e0b3986e Mon Sep 17 00:00:00 2001 From: Kevin Davila <56242609+kevindaviladev@users.noreply.github.com> Date: Mon, 28 Apr 2025 11:28:52 -0500 Subject: [PATCH 05/15] Added urlContentMap to PageAsset interface --- core-web/libs/sdk/types/src/lib/page/public.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core-web/libs/sdk/types/src/lib/page/public.ts b/core-web/libs/sdk/types/src/lib/page/public.ts index 7152f961c7d2..4534e0fb6e9e 100644 --- a/core-web/libs/sdk/types/src/lib/page/public.ts +++ b/core-web/libs/sdk/types/src/lib/page/public.ts @@ -1,6 +1,8 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -export interface DotCMSPageAsset { +export interface DotCMSPageAsset< + T extends { urlContentMap: unknown } = { urlContentMap: unknown } +> { canCreateTemplate?: boolean; containers: { [key: string]: DotCMSPageAssetContainer; @@ -11,6 +13,8 @@ export interface DotCMSPageAsset { template: DotCMSTemplate; viewAs?: DotCMSViewAs; vanityUrl?: DotCMSVanityUrl; + /** Content mapping for the page URL */ + urlContentMap?: T extends { urlContentMap: infer U } ? U : T; params?: Record; } From 55c549149311aec3f4b8e6cccb93f78a14587f70 Mon Sep 17 00:00:00 2001 From: Kevin Davila <56242609+kevindaviladev@users.noreply.github.com> Date: Mon, 28 Apr 2025 12:24:59 -0500 Subject: [PATCH 06/15] Updated README from @dotcms/types --- core-web/libs/sdk/types/README.md | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/core-web/libs/sdk/types/README.md b/core-web/libs/sdk/types/README.md index d7bfd55557af..7afe26395f72 100644 --- a/core-web/libs/sdk/types/README.md +++ b/core-web/libs/sdk/types/README.md @@ -1,11 +1,29 @@ -# types +# @dotcms/types -This library was generated with [Nx](https://nx.dev). +## Overview -## Building +This library contains shared TypeScript types and interfaces used across the dotCMS SDK libraries and the Universal Visual Editor. It serves as a central repository for type definitions to ensure consistency and type safety across the ecosystem. -Run `nx build types` to build the library. +## Purpose -## Running unit tests +- Establish a single source of truth for common types +- Maintain consistency across SDK libraries +- Support the Universal Visual Editor with necessary type definitions +- Reduce duplication and prevent drift between related interfaces -Run `nx test types` to execute the unit tests via [Jest](https://jestjs.io). +## Usage + +Import types directly from this library: + +```typescript +import { Block, Contentlet } from '@dotcms/types'; +``` + +## Universal Visual Editor + +Types in this library provide the foundation for the Universal Visual Editor, including: + +- Component definitions +- Editor configuration schemas +- Content type mappings +- UI element specifications \ No newline at end of file From 6acbce6e98719dd306b202a4f35f61c2c85f321f Mon Sep 17 00:00:00 2001 From: Kevin Davila <56242609+kevindaviladev@users.noreply.github.com> Date: Mon, 28 Apr 2025 18:00:10 -0500 Subject: [PATCH 07/15] WIP - made lib works in example --- core-web/libs/sdk/client/package.json | 6 +- core-web/libs/sdk/react/package.json | 4 +- .../next/components/Container/Container.tsx | 4 +- .../Container/ContainerFallbacks.tsx | 2 +- .../next/components/Contentlet/Contentlet.tsx | 6 +- .../DotCMSLayoutBody/DotCMSLayoutBody.tsx | 4 +- .../FallbackComponent/FallbackComponent.tsx | 16 ++--- .../lib/next/contexts/DotCMSPageContext.tsx | 4 +- core-web/libs/sdk/types/package.json | 16 +++-- core-web/libs/sdk/types/project.json | 3 +- .../libs/sdk/types/src/lib/editor/internal.ts | 65 ++++++++----------- .../libs/sdk/types/src/lib/editor/public.ts | 46 ++----------- .../libs/sdk/types/src/lib/page/public.ts | 19 ++++-- core-web/libs/sdk/types/src/page.ts | 1 - core-web/libs/sdk/uve/package.json | 8 +-- .../libs/sdk/uve/src/lib/dom/dom.utils.ts | 19 +++--- examples/next-test-app | 1 + 17 files changed, 95 insertions(+), 129 deletions(-) delete mode 100644 core-web/libs/sdk/types/src/page.ts create mode 160000 examples/next-test-app diff --git a/core-web/libs/sdk/client/package.json b/core-web/libs/sdk/client/package.json index 4295c22f4780..5d84e07cfc23 100644 --- a/core-web/libs/sdk/client/package.json +++ b/core-web/libs/sdk/client/package.json @@ -6,6 +6,9 @@ "type": "git", "url": "git+https://github.com/dotCMS/core.git#main" }, + "dependencies": { + "@dotcms/types": "0.0.1" + }, "scripts": { "build": "nx run sdk-client:build:js; cd ../../../../dotCMS/src/main/webapp/html/js/editor-js; rm -rf src package.json *.esm.d.ts" }, @@ -32,8 +35,5 @@ "bugs": { "url": "https://github.com/dotCMS/core/issues" }, - "peerDependencies": { - "@dotcms/types": "next" - }, "homepage": "https://github.com/dotCMS/core/tree/main/core-web/libs/sdk/client/README.md" } diff --git a/core-web/libs/sdk/react/package.json b/core-web/libs/sdk/react/package.json index 418e580854c1..6bb3b56caa47 100644 --- a/core-web/libs/sdk/react/package.json +++ b/core-web/libs/sdk/react/package.json @@ -6,8 +6,8 @@ "react-dom": ">=18", "@dotcms/client": "next", "@dotcms/uve": "next", - "@tinymce/tinymce-react": "^5.1.1", - "@dotcms/types": "next" + "@dotcms/types": "0.0.1", + "@tinymce/tinymce-react": "^5.1.1" }, "description": "Official React Components library to render a dotCMS page.", "repository": { diff --git a/core-web/libs/sdk/react/src/lib/next/components/Container/Container.tsx b/core-web/libs/sdk/react/src/lib/next/components/Container/Container.tsx index 1ce7ca5d4f98..2e786bdc7f75 100644 --- a/core-web/libs/sdk/react/src/lib/next/components/Container/Container.tsx +++ b/core-web/libs/sdk/react/src/lib/next/components/Container/Container.tsx @@ -1,6 +1,6 @@ import { useContext, useMemo } from 'react'; -import { DotCMSColumnContainer, DotCMSContentlet } from '@dotcms/types'; +import { DotCMSBasicContentlet, DotCMSColumnContainer } from '@dotcms/types'; import { getContainersData, getDotContainerAttributes, @@ -67,7 +67,7 @@ export function Container({ container }: DotCMSContainerRendererProps) { return (
- {contentlets.map((contentlet: DotCMSContentlet) => ( + {contentlets.map((contentlet: DotCMSBasicContentlet) => ( >; + components: Record>; mode?: DotCMSPageRendererMode; } diff --git a/core-web/libs/sdk/react/src/lib/next/components/FallbackComponent/FallbackComponent.tsx b/core-web/libs/sdk/react/src/lib/next/components/FallbackComponent/FallbackComponent.tsx index 21ddf5898ba3..7e5b270ebc77 100644 --- a/core-web/libs/sdk/react/src/lib/next/components/FallbackComponent/FallbackComponent.tsx +++ b/core-web/libs/sdk/react/src/lib/next/components/FallbackComponent/FallbackComponent.tsx @@ -1,4 +1,4 @@ -import { DotCMSContentlet } from '@dotcms/types'; +import { DotCMSBasicContentlet } from '@dotcms/types'; import { useIsDevMode } from '../../hooks/useIsDevMode'; @@ -7,19 +7,19 @@ import { useIsDevMode } from '../../hooks/useIsDevMode'; * * Type definition for components that can be used as fallback when no matching component is found */ -export type NoComponentType = React.ComponentType; +export type NoComponentType = React.ComponentType; /** * @internal * * Props for the FallbackComponent * @interface DotCMSFallbackComponentProps - * @property {React.ComponentType} [UserNoComponent] - Optional custom component to render when no matching component is found - * @property {DotCMSContentlet} [contentlet] - The contentlet that couldn't be rendered + * @property {React.ComponentType} [UserNoComponent] - Optional custom component to render when no matching component is found + * @property {DotCMSBasicContentlet} [contentlet] - The contentlet that couldn't be rendered */ interface DotCMSFallbackComponentProps { - contentlet: DotCMSContentlet; - UserNoComponent?: React.ComponentType; + contentlet: DotCMSBasicContentlet; + UserNoComponent?: React.ComponentType; } /** @@ -58,10 +58,10 @@ export function FallbackComponent({ UserNoComponent, contentlet }: DotCMSFallbac * * Component to render when there is no component for the content type. * - * @param {DotCMSContentlet} contentType - The content type that couldn't be rendered + * @param {DotCMSBasicContentlet} contentType - The content type that couldn't be rendered * @return {*} */ -function NoComponent({ contentType }: DotCMSContentlet) { +function NoComponent({ contentType }: DotCMSBasicContentlet) { return (
No Component for {contentType}. diff --git a/core-web/libs/sdk/react/src/lib/next/contexts/DotCMSPageContext.tsx b/core-web/libs/sdk/react/src/lib/next/contexts/DotCMSPageContext.tsx index c5ee39d8637b..b2e2e01eda89 100644 --- a/core-web/libs/sdk/react/src/lib/next/contexts/DotCMSPageContext.tsx +++ b/core-web/libs/sdk/react/src/lib/next/contexts/DotCMSPageContext.tsx @@ -1,6 +1,6 @@ import { createContext } from 'react'; -import { DotCMSContentlet, DotCMSPageAsset, DotCMSPageRendererMode } from '@dotcms/types'; +import { DotCMSBasicContentlet, DotCMSPageAsset, DotCMSPageRendererMode } from '@dotcms/types'; /** * @internal @@ -14,7 +14,7 @@ import { DotCMSContentlet, DotCMSPageAsset, DotCMSPageRendererMode } from '@dotc export interface DotCMSPageContextProps { pageAsset: DotCMSPageAsset; mode: DotCMSPageRendererMode; - userComponents: Record>; + userComponents: Record>; } /** diff --git a/core-web/libs/sdk/types/package.json b/core-web/libs/sdk/types/package.json index 999444b294f7..5ade4bc98eff 100644 --- a/core-web/libs/sdk/types/package.json +++ b/core-web/libs/sdk/types/package.json @@ -1,18 +1,22 @@ { "name": "@dotcms/types", "version": "0.0.1", - "dependencies": {}, - "type": "commonjs", - "main": "./src/index.js", - "typings": "./src/index.d.ts", + "keywords": [ + "dotCMS", + "CMS", + "Content Management", + "UVE", + "Universal Visual Editor" + ], "exports": { "./package.json": "./package.json", - "./types/__internal__": "./src/internal.ts" + ".": "./src/index.ts", + "./internal": "./src/internal.ts" }, "typesVersions": { "*": { ".": ["./src/index.d.ts"], - "__internal__": ["./src/internal.d.ts"] + "internal": ["./src/internal.d.ts"] } } } diff --git a/core-web/libs/sdk/types/project.json b/core-web/libs/sdk/types/project.json index f8530a900457..d8ab1b3d9ae1 100644 --- a/core-web/libs/sdk/types/project.json +++ b/core-web/libs/sdk/types/project.json @@ -17,12 +17,13 @@ "executor": "@nx/rollup:rollup", "outputs": ["{options.outputPath}"], "options": { - "outputPath": "dist/libs/sdk/types", "main": "libs/sdk/types/src/index.ts", "additionalEntryPoints": ["libs/sdk/types/src/internal.ts"], "generateExportsField": true, + "outputPath": "dist/libs/sdk/types", "tsConfig": "libs/sdk/types/tsconfig.lib.json", "project": "libs/sdk/types/package.json", + "entryFile": "libs/sdk/types/src/index.ts", "compiler": "babel", "format": ["esm", "cjs"], "extractCss": false, diff --git a/core-web/libs/sdk/types/src/lib/editor/internal.ts b/core-web/libs/sdk/types/src/lib/editor/internal.ts index ccc77fc8fd9b..95fb7f7f02ec 100644 --- a/core-web/libs/sdk/types/src/lib/editor/internal.ts +++ b/core-web/libs/sdk/types/src/lib/editor/internal.ts @@ -50,43 +50,6 @@ export interface DotCMSUVE { lastScrollYPosition: number; } -/** - * Main fields of a Contentlet (Inherited from the Content Type). - */ -export interface ContentTypeMainFields { - hostName: string; - modDate: string; - publishDate: string; - title: string; - baseType: string; - inode: string; - archived: boolean; - ownerName: string; - host: string; - working: boolean; - locked: boolean; - stInode: string; - contentType: string; - live: boolean; - owner: string; - identifier: string; - publishUserName: string; - publishUser: string; - languageId: number; - creationDate: string; - url: string; - titleImage: string; - modUserName: string; - hasLiveVersion: boolean; - folder: string; - hasTitleImage: boolean; - sortOrder: number; - modUser: string; - __icon__: string; - contentTypeIcon: string; - variant: string; -} - /** * Bound information for a contentlet. * @@ -127,3 +90,31 @@ export interface DotCMSContainerBound { payload: string; contentlets: DotCMSContentletBound[]; } + +/** + * + * Interface representing the data attributes of a DotCMS container. + * @interface DotContainerAttributes + */ +export interface DotContainerAttributes { + 'data-dot-object': string; + 'data-dot-accept-types': string; + 'data-dot-identifier': string; + 'data-max-contentlets': string; + 'data-dot-uuid': string; +} + +/** + * + * Interface representing the data attributes of a DotCMS contentlet. + * @interface DotContentletAttributes + */ +export interface DotContentletAttributes { + 'data-dot-identifier': string; + 'data-dot-basetype': string; + 'data-dot-title': string; + 'data-dot-inode': string; + 'data-dot-type': string; + 'data-dot-container': string; + 'data-dot-on-number-of-pages': string; +} diff --git a/core-web/libs/sdk/types/src/lib/editor/public.ts b/core-web/libs/sdk/types/src/lib/editor/public.ts index c5076f8cc75c..c91320a5406f 100644 --- a/core-web/libs/sdk/types/src/lib/editor/public.ts +++ b/core-web/libs/sdk/types/src/lib/editor/public.ts @@ -1,6 +1,6 @@ -import { ContentTypeMainFields, DotCMSContainerBound } from './internal'; +import { DotCMSContainerBound } from './internal'; -import { DotCMSEditablePage } from '../page/public'; +import { DotCMSBasicContentlet, DotCMSEditablePage } from '../page/public'; /** * Development mode @@ -62,7 +62,7 @@ export enum UVE_MODE { * @callback UVEEventHandler * @param {unknown} eventData - The event data */ -export type UVEEventHandler = (eventData?: unknown) => void; +export type UVEEventHandler = (eventData?: T) => void; /** * Unsubscribe function for UVE events @@ -87,16 +87,6 @@ export type UVEEventSubscription = { */ export type UVEEventSubscriber = (callback: UVEEventHandler) => UVEEventSubscription; -//TODO: Recheck this after changes -/** - * Configuration type for DotCMS Editor - * @typedef {Object} DotCMSEditoConfig - * @property {Object} [params] - Parameters for Page API configuration - * @property {number} [params.depth] - The depth level for fetching page data - * @property {string} [query] - GraphQL query string for data fetching - */ -export type DotCMSEditorConfig = { params: { depth: number } } | { query: string }; - /** * Actions send to the dotcms editor * @@ -168,7 +158,7 @@ export enum DotCMSUVEAction { * * @template T - The custom fields of the content type. */ -export type Contentlet = T & ContentTypeMainFields; +export type Contentlet = T & DotCMSBasicContentlet; /** * Available events in the Universal Visual Editor @@ -226,34 +216,6 @@ export interface EditableContainerData { variantId?: string; } -/** - * - * Interface representing the data attributes of a DotCMS container. - * @interface DotContainerAttributes - */ -export interface DotContainerAttributes { - 'data-dot-object': string; - 'data-dot-accept-types': string; - 'data-dot-identifier': string; - 'data-max-contentlets': string; - 'data-dot-uuid': string; -} - -/** - * - * Interface representing the data attributes of a DotCMS contentlet. - * @interface DotContentletAttributes - */ -export interface DotContentletAttributes { - 'data-dot-identifier': string; - 'data-dot-basetype': string; - 'data-dot-title': string; - 'data-dot-inode': string; - 'data-dot-type': string; - 'data-dot-container': string; - 'data-dot-on-number-of-pages': string; -} - /** * Configuration for the UVE * @interface DotCMSUVEConfig diff --git a/core-web/libs/sdk/types/src/lib/page/public.ts b/core-web/libs/sdk/types/src/lib/page/public.ts index 4534e0fb6e9e..00ae9edb12e0 100644 --- a/core-web/libs/sdk/types/src/lib/page/public.ts +++ b/core-web/libs/sdk/types/src/lib/page/public.ts @@ -60,7 +60,7 @@ export interface DotCMSPageAssetContainer { container: DotCMSContainer; containerStructures: DotCMSContainerStructure[]; contentlets: { - [key: string]: DotCMSContentlet[]; + [key: string]: DotCMSBasicContentlet[]; }; } @@ -103,11 +103,11 @@ export interface DotCMSContainer { idate: number; new: boolean; acceptTypes: string; - contentlets: DotCMSContentlet[]; + contentlets: DotCMSBasicContentlet[]; parentPermissionable: DotCMSSiteParentPermissionable; } -export interface DotCMSContentlet { +export interface DotCMSBasicContentlet { archived: boolean; baseType: string; deleted?: boolean; @@ -143,8 +143,9 @@ export interface DotCMSContentlet { body?: string; contentTypeIcon?: string; variant?: string; + widgetTitle?: string; + onNumberOfPages?: string; __icon__?: string; - [key: string]: any; // This is a catch-all for any other custom properties that might be on the contentlet. } export interface DotcmsNavigationItem { @@ -377,6 +378,7 @@ interface DotCMSSiteStructure { urlMapPattern?: any; host: string; folder: string; + publishDate: string; publishDateVar?: any; expireDateVar?: any; modDate: number; @@ -511,12 +513,15 @@ export interface DotCMSBasicGraphQLPage { }[]; containerContentlets?: { uuid: string; - contentlets: DotCMSContentlet[]; + contentlets: DotCMSBasicContentlet[]; }[]; - }; + }[]; layout: DotCMSLayout; viewAs: DotCMSViewAs; + urlContentMap: Record; + site: DotCMSSite; + _map: Record; } export interface DotCMSPageGraphQLContainer { @@ -529,7 +534,7 @@ export interface DotCMSPageGraphQLContainer { export interface DotCMSPageContainerContentlets { uuid: string; - contentlets: DotCMSContentlet[]; + contentlets: DotCMSBasicContentlet[]; } /** diff --git a/core-web/libs/sdk/types/src/page.ts b/core-web/libs/sdk/types/src/page.ts deleted file mode 100644 index a4d64ab251a5..000000000000 --- a/core-web/libs/sdk/types/src/page.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './lib/page/public'; diff --git a/core-web/libs/sdk/uve/package.json b/core-web/libs/sdk/uve/package.json index 4206696a8ca3..94232f28f557 100644 --- a/core-web/libs/sdk/uve/package.json +++ b/core-web/libs/sdk/uve/package.json @@ -6,6 +6,9 @@ "type": "git", "url": "git+https://github.com/dotCMS/core.git#main" }, + "dependencies": { + "@dotcms/types": "0.0.1" + }, "keywords": [ "dotCMS", "CMS", @@ -29,8 +32,5 @@ "bugs": { "url": "https://github.com/dotCMS/core/issues" }, - "homepage": "https://github.com/dotCMS/core/tree/main/core-web/libs/sdk/uve/README.md", - "peerDependencies": { - "@dotcms/types": "next" - } + "homepage": "https://github.com/dotCMS/core/tree/main/core-web/libs/sdk/uve/README.md" } diff --git a/core-web/libs/sdk/uve/src/lib/dom/dom.utils.ts b/core-web/libs/sdk/uve/src/lib/dom/dom.utils.ts index 6035c6893be9..4299376d30a4 100644 --- a/core-web/libs/sdk/uve/src/lib/dom/dom.utils.ts +++ b/core-web/libs/sdk/uve/src/lib/dom/dom.utils.ts @@ -1,13 +1,16 @@ import { - DotContainerAttributes, - DotContentletAttributes, EditableContainerData, DotCMSColumnContainer, - DotCMSContentlet, + DotCMSBasicContentlet, DotCMSPageAsset, DotPageAssetLayoutColumn } from '@dotcms/types'; -import { DotCMSContainerBound, DotCMSContentletBound } from '@dotcms/types/internal'; +import { + DotCMSContainerBound, + DotCMSContentletBound, + DotContainerAttributes, + DotContentletAttributes +} from '@dotcms/types/internal'; import { END_CLASS, START_CLASS } from '../../internal/constants'; @@ -256,12 +259,12 @@ export const getColumnPositionClasses = (column: DotPageAssetLayoutColumn) => { * * * Helper function that returns an object containing the dotCMS data attributes. - * @param {DotCMSContentlet} contentlet - The contentlet to get the attributes for + * @param {DotCMSBasicContentlet} contentlet - The contentlet to get the attributes for * @param {string} container - The container to get the attributes for * @returns {DotContentletAttributes} The dotCMS data attributes */ export function getDotContentletAttributes( - contentlet: DotCMSContentlet, + contentlet: DotCMSBasicContentlet, container: string ): DotContentletAttributes { return { @@ -271,7 +274,7 @@ export function getDotContentletAttributes( 'data-dot-inode': contentlet?.inode, 'data-dot-type': contentlet?.contentType, 'data-dot-container': container, - 'data-dot-on-number-of-pages': contentlet?.['onNumberOfPages'] + 'data-dot-on-number-of-pages': contentlet?.['onNumberOfPages'] || '1' }; } @@ -328,7 +331,7 @@ export const getContainersData = ( * * @param {DotCMSPageAsset} dotCMSPageAsset - The page asset containing all containers data * @param {DotCMSColumnContainer} columContainer - The container reference from the layout - * @returns {DotCMSContentlet[]} Array of contentlets in the container + * @returns {DotCMSBasicContentlet[]} Array of contentlets in the container * * @example * const contentlets = getContentletsInContainer(pageAsset, containerRef); diff --git a/examples/next-test-app b/examples/next-test-app new file mode 160000 index 000000000000..773d7258680f --- /dev/null +++ b/examples/next-test-app @@ -0,0 +1 @@ +Subproject commit 773d7258680fc48b094d3ab1dca1f3896bb91fe0 From 096c843f5da0bd201515683c96f72d602f808886 Mon Sep 17 00:00:00 2001 From: Kevin Davila <56242609+kevindaviladev@users.noreply.github.com> Date: Mon, 28 Apr 2025 18:37:11 -0500 Subject: [PATCH 08/15] Angular lib working --- .../dotcms-editable-text.component.ts | 2 +- .../components/container/container.component.ts | 10 +++------- .../components/contentlet/contentlet.component.ts | 7 ++++--- .../fallback-component.component.ts | 4 ++-- .../dot-editable-text.component.ts | 15 +++++++-------- core-web/libs/sdk/types/src/lib/page/public.ts | 4 ++-- 6 files changed, 19 insertions(+), 23 deletions(-) diff --git a/core-web/libs/sdk/angular/next/components/dotcms-editable-text/dotcms-editable-text.component.ts b/core-web/libs/sdk/angular/next/components/dotcms-editable-text/dotcms-editable-text.component.ts index d2d4b1c323ce..e88e31d6a35b 100644 --- a/core-web/libs/sdk/angular/next/components/dotcms-editable-text/dotcms-editable-text.component.ts +++ b/core-web/libs/sdk/angular/next/components/dotcms-editable-text/dotcms-editable-text.component.ts @@ -192,7 +192,7 @@ export class DotCMSEditableTextComponent implements OnInit, OnChanges { * @memberof DotCMSEditableTextComponent */ onMouseDown({ event }: EventObj) { - if (this.onNumberOfPages <= 1 || this.editorComponent.editor.hasFocus()) { + if (Number(this.onNumberOfPages) <= 1 || this.editorComponent.editor.hasFocus()) { return; } diff --git a/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/container/container.component.ts b/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/container/container.component.ts index 4a27f1ffb899..f446d9a2243a 100644 --- a/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/container/container.component.ts +++ b/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/container/container.component.ts @@ -9,12 +9,8 @@ import { signal } from '@angular/core'; -import { - DotCMSColumnContainer, - DotCMSContentlet, - DotContainerAttributes, - EditableContainerData -} from '@dotcms/types'; +import { DotCMSBasicContentlet, DotCMSColumnContainer, EditableContainerData } from '@dotcms/types'; +import { DotContainerAttributes } from '@dotcms/types/internal'; import { getContainersData, getContentletsInContainer, @@ -61,7 +57,7 @@ export class ContainerComponent implements OnChanges { #dotCMSStore = inject(DotCMSStore); $containerData = signal(null); - $contentlets = signal([]); + $contentlets = signal([]); $isEmpty = computed(() => this.$contentlets().length === 0); $dotAttributes = computed(() => { const containerData = this.$containerData(); diff --git a/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/contentlet/contentlet.component.ts b/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/contentlet/contentlet.component.ts index 852f6c5b0e14..55ef316e01d2 100644 --- a/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/contentlet/contentlet.component.ts +++ b/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/contentlet/contentlet.component.ts @@ -12,7 +12,8 @@ import { ViewChild } from '@angular/core'; -import { DotCMSContentlet, DotContentletAttributes } from '@dotcms/types'; +import { DotCMSBasicContentlet } from '@dotcms/types'; +import { DotContentletAttributes } from '@dotcms/types/internal'; import { CUSTOM_NO_COMPONENT, getDotContentletAttributes } from '@dotcms/uve/internal'; import { DynamicComponentEntity } from '../../../../models'; @@ -47,14 +48,14 @@ import { FallbackComponent } from '../fallback-component/fallback-component.comp changeDetection: ChangeDetectionStrategy.OnPush }) export class ContentletComponent implements OnChanges { - @Input({ required: true }) contentlet!: DotCMSContentlet; + @Input({ required: true }) contentlet!: DotCMSBasicContentlet; @Input({ required: true }) container!: string; @ViewChild('contentletRef') contentletRef!: ElementRef; @HostBinding('attr.data-dot-object') dotObject = 'contentlet'; #dotCMSStore = inject(DotCMSStore); - $contentlet = signal(null); + $contentlet = signal(null); $UserComponent = signal(null); $UserNoComponent = signal(null); $isDevMode = this.#dotCMSStore.$isDevMode; diff --git a/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/fallback-component/fallback-component.component.ts b/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/fallback-component/fallback-component.component.ts index bdcad830f4cc..935aced588ed 100644 --- a/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/fallback-component/fallback-component.component.ts +++ b/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/fallback-component/fallback-component.component.ts @@ -1,7 +1,7 @@ import { AsyncPipe, NgComponentOutlet } from '@angular/common'; import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; -import { DotCMSContentlet } from '@dotcms/types'; +import { DotCMSBasicContentlet } from '@dotcms/types'; import { DynamicComponentEntity } from '../../../../models'; @@ -28,5 +28,5 @@ import { DynamicComponentEntity } from '../../../../models'; }) export class FallbackComponent { @Input() UserNoComponent: DynamicComponentEntity | null = null; - @Input() contentlet!: DotCMSContentlet; + @Input() contentlet!: DotCMSBasicContentlet; } diff --git a/core-web/libs/sdk/angular/src/lib/deprecated/components/dot-editable-text/dot-editable-text.component.ts b/core-web/libs/sdk/angular/src/lib/deprecated/components/dot-editable-text/dot-editable-text.component.ts index ed42ea68af90..300560369f0c 100644 --- a/core-web/libs/sdk/angular/src/lib/deprecated/components/dot-editable-text/dot-editable-text.component.ts +++ b/core-web/libs/sdk/angular/src/lib/deprecated/components/dot-editable-text/dot-editable-text.component.ts @@ -22,11 +22,10 @@ import { NOTIFY_CLIENT, postMessageToEditor } from '@dotcms/client'; +import { DotCMSBasicContentlet } from '@dotcms/types'; import { TINYMCE_CONFIG, DOT_EDITABLE_TEXT_FORMAT, DOT_EDITABLE_TEXT_MODE } from './utils'; -import { DotCMSContentlet } from '../../models'; - /** * @deprecated This component is deprecated and will be removed in future versions. * Please use the new Rich Text Editor component from the main SDK. @@ -73,18 +72,18 @@ export class DotEditableTextComponent implements OnInit, OnChanges { */ @Input() format: DOT_EDITABLE_TEXT_FORMAT = 'text'; /** - * Represents the `contentlet` that can be inline edited + * Represents the field name of the `contentlet` that can be edited * - * @type {DotCMSContentlet} * @memberof DotEditableTextComponent */ - @Input() contentlet!: DotCMSContentlet; + @Input() fieldName = ''; /** - * Represents the field name of the `contentlet` that can be edited + * Represents the `contentlet` that can be inline edited * + * @type {DotCMSContentlet} * @memberof DotEditableTextComponent */ - @Input() fieldName = ''; + @Input() contentlet!: DotCMSBasicContentlet; /** * Represents the content of the `contentlet` that can be edited @@ -188,7 +187,7 @@ export class DotEditableTextComponent implements OnInit, OnChanges { * @memberof DotEditableTextComponent */ onMouseDown({ event }: EventObj) { - if (this.onNumberOfPages <= 1 || this.editorComponent.editor.hasFocus()) { + if (Number(this.onNumberOfPages) <= 1 || this.editorComponent.editor.hasFocus()) { return; } diff --git a/core-web/libs/sdk/types/src/lib/page/public.ts b/core-web/libs/sdk/types/src/lib/page/public.ts index 372be4a9c8eb..3fb2c7b2fe44 100644 --- a/core-web/libs/sdk/types/src/lib/page/public.ts +++ b/core-web/libs/sdk/types/src/lib/page/public.ts @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ export interface DotCMSPageAsset< - T extends { urlContentMap: unknown } = { urlContentMap: unknown } + T extends { urlContentMap?: unknown } = { urlContentMap?: unknown } > { canCreateTemplate?: boolean; containers: { @@ -144,7 +144,7 @@ export interface DotCMSBasicContentlet { contentTypeIcon?: string; variant?: string; widgetTitle?: string; - onNumberOfPages?: number; + onNumberOfPages?: string; __icon__?: string; [key: string]: any; } From c17905343809db541b327e265579658c85568724 Mon Sep 17 00:00:00 2001 From: Kevin Davila <56242609+kevindaviladev@users.noreply.github.com> Date: Mon, 28 Apr 2025 21:03:36 -0500 Subject: [PATCH 09/15] Changed some interfaces names and feedback addressed --- .../blocks/contentlet.component.ts | 4 +- .../blocks/image.component.ts | 4 +- .../blocks/table.component.ts | 4 +- .../blocks/text.component.ts | 4 +- .../blocks/video.components.ts | 4 +- ...ms-block-editor-renderer.component.spec.ts | 6 +- .../dotcms-block-editor-renderer.component.ts | 4 +- .../dotcms-block-editor-item.component.ts | 8 +- .../item/dotcms-block-editor-item.spec.ts | 74 +++++----- .../src/lib/client/page/page-api.spec.ts | 7 +- .../src/lib/utils/graphql/transforms.spec.ts | 10 +- .../src/lib/utils/graphql/transforms.ts | 84 +++++------ .../block-editor-renderer/internal.ts | 2 +- .../block-editor-renderer/public.ts | 16 +-- .../libs/sdk/types/src/lib/editor/internal.ts | 9 +- .../libs/sdk/types/src/lib/page/public.ts | 132 ++++++++++++++++-- core-web/libs/sdk/uve/src/lib/dom/dom.spec.ts | 4 +- .../libs/sdk/uve/src/lib/editor/internal.ts | 4 +- 18 files changed, 243 insertions(+), 137 deletions(-) diff --git a/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/blocks/contentlet.component.ts b/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/blocks/contentlet.component.ts index 13cbef9dcd0d..782d16b42097 100644 --- a/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/blocks/contentlet.component.ts +++ b/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/blocks/contentlet.component.ts @@ -1,7 +1,7 @@ import { AsyncPipe, NgComponentOutlet } from '@angular/common'; import { ChangeDetectionStrategy, Component, computed, Input } from '@angular/core'; -import { Contentlet, ContentNode } from '@dotcms/types'; +import { Contentlet, BlockEditorNode } from '@dotcms/types'; import { DynamicComponentEntity } from '../../../models'; import { CustomRenderer } from '../dotcms-block-editor-renderer.component'; @@ -31,7 +31,7 @@ export class DotDefaultContentBlock { }) export class DotContentletBlock { @Input() customRenderers: CustomRenderer | undefined; - @Input() attrs: ContentNode['attrs']; + @Input() attrs: BlockEditorNode['attrs']; contentComponent: DynamicComponentEntity | undefined; diff --git a/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/blocks/image.component.ts b/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/blocks/image.component.ts index 86d18068132d..f16e0e6df414 100644 --- a/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/blocks/image.component.ts +++ b/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/blocks/image.component.ts @@ -1,6 +1,6 @@ import { ChangeDetectionStrategy, Component, computed, Input } from '@angular/core'; -import { ContentNode } from '@dotcms/types'; +import { BlockEditorNode } from '@dotcms/types'; @Component({ selector: 'dotcms-block-editor-renderer-image', @@ -11,7 +11,7 @@ import { ContentNode } from '@dotcms/types'; changeDetection: ChangeDetectionStrategy.OnPush }) export class DotImageBlock { - @Input() attrs!: ContentNode['attrs']; + @Input() attrs!: BlockEditorNode['attrs']; protected readonly $srcURL = computed(() => this.attrs?.['src']); } diff --git a/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/blocks/table.component.ts b/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/blocks/table.component.ts index 1fe6c967acf5..ebaafe032265 100644 --- a/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/blocks/table.component.ts +++ b/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/blocks/table.component.ts @@ -1,7 +1,7 @@ import { NgComponentOutlet } from '@angular/common'; import { Component, Input } from '@angular/core'; -import { ContentNode } from '@dotcms/types'; +import { BlockEditorNode } from '@dotcms/types'; import { DotCMSBlockEditorItemComponent } from '../item/dotcms-block-editor-item.component'; @Component({ @@ -48,6 +48,6 @@ import { DotCMSBlockEditorItemComponent } from '../item/dotcms-block-editor-item ` }) export class DotTableBlock { - @Input() content: ContentNode[] | undefined; + @Input() content: BlockEditorNode[] | undefined; blockEditorItem = DotCMSBlockEditorItemComponent; } diff --git a/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/blocks/text.component.ts b/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/blocks/text.component.ts index 3175ef1de212..da6ead3f07fa 100644 --- a/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/blocks/text.component.ts +++ b/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/blocks/text.component.ts @@ -1,6 +1,6 @@ import { ChangeDetectionStrategy, Component, computed, Input } from '@angular/core'; -import { Mark } from '@dotcms/types'; +import { BlockEditorMark } from '@dotcms/types'; @Component({ selector: 'dotcms-block-editor-renderer-paragraph', @@ -63,7 +63,7 @@ export class DotHeadingBlock { } interface TextBlockProps { - marks?: Mark[]; + marks?: BlockEditorMark[]; text?: string; } diff --git a/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/blocks/video.components.ts b/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/blocks/video.components.ts index 2bec43d64802..09a01b7c3e0f 100644 --- a/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/blocks/video.components.ts +++ b/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/blocks/video.components.ts @@ -1,6 +1,6 @@ import { ChangeDetectionStrategy, Component, computed, Input } from '@angular/core'; -import { ContentNode } from '@dotcms/types'; +import { BlockEditorNode } from '@dotcms/types'; @Component({ selector: 'dotcms-block-editor-renderer-video', @@ -22,7 +22,7 @@ import { ContentNode } from '@dotcms/types'; ` }) export class DotVideoBlock { - @Input() attrs!: ContentNode['attrs']; + @Input() attrs!: BlockEditorNode['attrs']; protected readonly $srcURL = computed(() => this.attrs?.['src']); diff --git a/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/dotcms-block-editor-renderer.component.spec.ts b/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/dotcms-block-editor-renderer.component.spec.ts index 27478c23b9c8..821ed4051418 100644 --- a/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/dotcms-block-editor-renderer.component.spec.ts +++ b/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/dotcms-block-editor-renderer.component.spec.ts @@ -1,6 +1,6 @@ import { createComponentFactory, Spectator } from '@ngneat/spectator/jest'; -import { Block, UVE_MODE } from '@dotcms/types'; +import { BlockEditorContent, UVE_MODE } from '@dotcms/types'; import { BlockEditorState } from '@dotcms/types/internal'; import { getUVEState } from '@dotcms/uve'; @@ -26,7 +26,7 @@ describe('DotCMSBlockEditorRendererComponent', () => { let spectator: Spectator; let component: DotCMSBlockEditorRendererComponent; - const mockValidBlock: Block = { + const mockValidBlock: BlockEditorContent = { type: 'doc', content: [ { @@ -44,7 +44,7 @@ describe('DotCMSBlockEditorRendererComponent', () => { ] }; - const mockInvalidBlock: Block = { + const mockInvalidBlock: BlockEditorContent = { type: 'invalid', content: [] }; diff --git a/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/dotcms-block-editor-renderer.component.ts b/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/dotcms-block-editor-renderer.component.ts index 764d343e4f7e..40d7e0292a49 100644 --- a/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/dotcms-block-editor-renderer.component.ts +++ b/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/dotcms-block-editor-renderer.component.ts @@ -1,6 +1,6 @@ import { Component, Input, signal } from '@angular/core'; -import { UVE_MODE, Block } from '@dotcms/types'; +import { UVE_MODE, BlockEditorContent } from '@dotcms/types'; import { BlockEditorState } from '@dotcms/types/internal'; import { getUVEState } from '@dotcms/uve'; import { isValidBlocks } from '@dotcms/uve/internal'; @@ -41,7 +41,7 @@ export type CustomRenderer = Record; imports: [DotCMSBlockEditorItemComponent] }) export class DotCMSBlockEditorRendererComponent { - @Input() blocks!: Block; + @Input() blocks!: BlockEditorContent; @Input() customRenderers: CustomRenderer | undefined; $blockEditorState = signal({ error: null }); diff --git a/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/item/dotcms-block-editor-item.component.ts b/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/item/dotcms-block-editor-item.component.ts index b30dd609d22f..62d7ec4af22b 100644 --- a/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/item/dotcms-block-editor-item.component.ts +++ b/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/item/dotcms-block-editor-item.component.ts @@ -1,8 +1,8 @@ import { AsyncPipe, NgComponentOutlet, NgTemplateOutlet } from '@angular/common'; import { Component, Input } from '@angular/core'; -import { ContentNode } from '@dotcms/types'; -import { Blocks } from '@dotcms/types/internal'; +import { BlockEditorNode } from '@dotcms/types'; +import { BlockEditorDefaultBlocks } from '@dotcms/types/internal'; import { DotCodeBlock, DotBlockQuote } from '../blocks/code.component'; import { DotContentletBlock } from '../blocks/contentlet.component'; @@ -37,8 +37,8 @@ import { CustomRenderer } from '../dotcms-block-editor-renderer.component'; ] }) export class DotCMSBlockEditorItemComponent { - @Input() content: ContentNode[] | undefined; + @Input() content: BlockEditorNode[] | undefined; @Input() customRenderers: CustomRenderer | undefined; - BLOCKS = Blocks; + BLOCKS = BlockEditorDefaultBlocks; } diff --git a/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/item/dotcms-block-editor-item.spec.ts b/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/item/dotcms-block-editor-item.spec.ts index 1ca1c2a36774..8e7c46fb6442 100644 --- a/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/item/dotcms-block-editor-item.spec.ts +++ b/core-web/libs/sdk/angular/next/components/dotcms-block-editor-renderer/item/dotcms-block-editor-item.spec.ts @@ -3,8 +3,8 @@ import { createComponentFactory, Spectator } from '@ngneat/spectator/jest'; import { Component, Input } from '@angular/core'; import { fakeAsync, tick } from '@angular/core/testing'; -import { ContentNode } from '@dotcms/types'; -import { Blocks } from '@dotcms/types/internal'; +import { BlockEditorNode } from '@dotcms/types'; +import { BlockEditorDefaultBlocks } from '@dotcms/types/internal'; import { DotCMSBlockEditorItemComponent } from './dotcms-block-editor-item.component'; @@ -22,7 +22,7 @@ import { DotVideoBlock } from '../blocks/video.components'; template: '
Custom Component
' }) export class DotCMSBlockEditorRendererCustomComponent { - @Input() content: ContentNode[] = []; + @Input() content: BlockEditorNode[] = []; } describe('DotCMSBlockEditorRendererBlockComponent', () => { @@ -39,9 +39,9 @@ describe('DotCMSBlockEditorRendererBlockComponent', () => { describe('Block Rendering', () => { describe('Paragraph Block', () => { beforeEach(() => { - const content: ContentNode[] = [ + const content: BlockEditorNode[] = [ { - type: Blocks.PARAGRAPH, + type: BlockEditorDefaultBlocks.PARAGRAPH, attrs: { style: 'color: red' }, content: [] } @@ -57,9 +57,9 @@ describe('DotCMSBlockEditorRendererBlockComponent', () => { describe('Text Block', () => { beforeEach(() => { - const content: ContentNode[] = [ + const content: BlockEditorNode[] = [ { - type: Blocks.TEXT, + type: BlockEditorDefaultBlocks.TEXT, text: 'Sample text', marks: [{ type: 'bold', attrs: {} }], content: [] @@ -82,9 +82,9 @@ describe('DotCMSBlockEditorRendererBlockComponent', () => { describe('Heading Block', () => { beforeEach(() => { - const content: ContentNode[] = [ + const content: BlockEditorNode[] = [ { - type: Blocks.HEADING, + type: BlockEditorDefaultBlocks.HEADING, attrs: { level: '2', style: 'font-size: 24px' }, content: [] } @@ -105,9 +105,9 @@ describe('DotCMSBlockEditorRendererBlockComponent', () => { describe('List Blocks', () => { it('should render bullet list', () => { - const content: ContentNode[] = [ + const content: BlockEditorNode[] = [ { - type: Blocks.BULLET_LIST, + type: BlockEditorDefaultBlocks.BULLET_LIST, content: [] } ]; @@ -118,9 +118,9 @@ describe('DotCMSBlockEditorRendererBlockComponent', () => { }); it('should render ordered list', () => { - const content: ContentNode[] = [ + const content: BlockEditorNode[] = [ { - type: Blocks.ORDERED_LIST, + type: BlockEditorDefaultBlocks.ORDERED_LIST, content: [] } ]; @@ -131,9 +131,9 @@ describe('DotCMSBlockEditorRendererBlockComponent', () => { }); it('should render list item', () => { - const content: ContentNode[] = [ + const content: BlockEditorNode[] = [ { - type: Blocks.LIST_ITEM, + type: BlockEditorDefaultBlocks.LIST_ITEM, content: [] } ]; @@ -146,9 +146,9 @@ describe('DotCMSBlockEditorRendererBlockComponent', () => { describe('Media Blocks', () => { it('should render image component', () => { - const content: ContentNode[] = [ + const content: BlockEditorNode[] = [ { - type: Blocks.DOT_IMAGE, + type: BlockEditorDefaultBlocks.DOT_IMAGE, attrs: { src: 'image.jpg' }, content: [] } @@ -160,9 +160,9 @@ describe('DotCMSBlockEditorRendererBlockComponent', () => { }); it('should render video component', () => { - const content: ContentNode[] = [ + const content: BlockEditorNode[] = [ { - type: Blocks.DOT_VIDEO, + type: BlockEditorDefaultBlocks.DOT_VIDEO, attrs: { src: 'video.mp4' }, content: [] } @@ -176,9 +176,9 @@ describe('DotCMSBlockEditorRendererBlockComponent', () => { describe('Other Blocks', () => { it('should render blockquote', () => { - const content: ContentNode[] = [ + const content: BlockEditorNode[] = [ { - type: Blocks.BLOCK_QUOTE, + type: BlockEditorDefaultBlocks.BLOCK_QUOTE, content: [] } ]; @@ -189,9 +189,9 @@ describe('DotCMSBlockEditorRendererBlockComponent', () => { }); it('should render code block', () => { - const content: ContentNode[] = [ + const content: BlockEditorNode[] = [ { - type: Blocks.CODE_BLOCK, + type: BlockEditorDefaultBlocks.CODE_BLOCK, content: [] } ]; @@ -202,9 +202,9 @@ describe('DotCMSBlockEditorRendererBlockComponent', () => { }); it('should render table', () => { - const content: ContentNode[] = [ + const content: BlockEditorNode[] = [ { - type: Blocks.TABLE, + type: BlockEditorDefaultBlocks.TABLE, content: [] } ]; @@ -215,9 +215,9 @@ describe('DotCMSBlockEditorRendererBlockComponent', () => { }); it('should render contentlet', () => { - const content: ContentNode[] = [ + const content: BlockEditorNode[] = [ { - type: Blocks.DOT_CONTENT, + type: BlockEditorDefaultBlocks.DOT_CONTENT, attrs: { identifier: '123' }, content: [] } @@ -231,9 +231,9 @@ describe('DotCMSBlockEditorRendererBlockComponent', () => { describe('HTML Elements', () => { it('should render horizontal rule', () => { - const content: ContentNode[] = [ + const content: BlockEditorNode[] = [ { - type: Blocks.HORIZONTAL_RULE, + type: BlockEditorDefaultBlocks.HORIZONTAL_RULE, content: [] } ]; @@ -244,9 +244,9 @@ describe('DotCMSBlockEditorRendererBlockComponent', () => { }); it('should render line break', () => { - const content: ContentNode[] = [ + const content: BlockEditorNode[] = [ { - type: Blocks.HARDBREAK, + type: BlockEditorDefaultBlocks.HARDBREAK, content: [] } ]; @@ -260,12 +260,14 @@ describe('DotCMSBlockEditorRendererBlockComponent', () => { describe('Custom Renderers', () => { it('should use custom renderer when provided', fakeAsync(() => { const customRenderers = { - [Blocks.PARAGRAPH]: Promise.resolve(DotCMSBlockEditorRendererCustomComponent) + [BlockEditorDefaultBlocks.PARAGRAPH]: Promise.resolve( + DotCMSBlockEditorRendererCustomComponent + ) }; - const content: ContentNode[] = [ + const content: BlockEditorNode[] = [ { - type: Blocks.PARAGRAPH, + type: BlockEditorDefaultBlocks.PARAGRAPH, content: [] } ]; @@ -285,9 +287,9 @@ describe('DotCMSBlockEditorRendererBlockComponent', () => { })); it('should render unknown block type message', () => { - const content: ContentNode[] = [ + const content: BlockEditorNode[] = [ { - type: 'UNKNOWN_TYPE' as unknown as Blocks, + type: 'UNKNOWN_TYPE' as unknown as BlockEditorDefaultBlocks, content: [] } ]; diff --git a/core-web/libs/sdk/client/src/lib/client/page/page-api.spec.ts b/core-web/libs/sdk/client/src/lib/client/page/page-api.spec.ts index 66a98edbcd10..3630d2e94197 100644 --- a/core-web/libs/sdk/client/src/lib/client/page/page-api.spec.ts +++ b/core-web/libs/sdk/client/src/lib/client/page/page-api.spec.ts @@ -1,4 +1,6 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ +import { DotCMSGraphQLPageResponse } from '@dotcms/types'; + import { GraphQLPageOptions, PageClient } from './page-api'; import * as utils from './utils'; @@ -198,9 +200,10 @@ describe('PageClient', () => { baseURL: 'https://demo.dotcms.com' }); - // const pageResponse = graphqlToPageEntity(mockGraphQLResponse | ); expect(result).toEqual({ - page: graphqlToPageEntity(mockGraphQLResponse.data), + page: graphqlToPageEntity( + mockGraphQLResponse.data as unknown as DotCMSGraphQLPageResponse + ), content: { content: mockGraphQLResponse.data.testContent }, graphql: { query: expect.any(String), diff --git a/core-web/libs/sdk/client/src/lib/utils/graphql/transforms.spec.ts b/core-web/libs/sdk/client/src/lib/utils/graphql/transforms.spec.ts index 71148d5e5589..998d2915e07e 100644 --- a/core-web/libs/sdk/client/src/lib/utils/graphql/transforms.spec.ts +++ b/core-web/libs/sdk/client/src/lib/utils/graphql/transforms.spec.ts @@ -1,3 +1,5 @@ +import { DotCMSGraphQLPageResponse } from '@dotcms/types'; + import { graphqlToPageEntity } from './transforms'; const GRAPHQL_RESPONSE_MOCK = { @@ -145,7 +147,9 @@ const MOCK_PAGE_ENTITY = { describe('GraphQL Parser', () => { it('should return the correct page entity', () => { - const pageEntity = graphqlToPageEntity(GRAPHQL_RESPONSE_MOCK); + const pageEntity = graphqlToPageEntity( + GRAPHQL_RESPONSE_MOCK as unknown as DotCMSGraphQLPageResponse + ); expect(pageEntity).toEqual(MOCK_PAGE_ENTITY); }); @@ -221,7 +225,9 @@ describe('GraphQL Parser', () => { } }; - const pageEntity = graphqlToPageEntity(graphqlResponse); + const pageEntity = graphqlToPageEntity( + graphqlResponse as unknown as DotCMSGraphQLPageResponse + ); expect(pageEntity.page).toEqual(expectedResult.page); expect(pageEntity.urlContentMap).toEqual(expectedResult.urlContentMap); diff --git a/core-web/libs/sdk/client/src/lib/utils/graphql/transforms.ts b/core-web/libs/sdk/client/src/lib/utils/graphql/transforms.ts index 2c9843c06ea5..eda13df224da 100644 --- a/core-web/libs/sdk/client/src/lib/utils/graphql/transforms.ts +++ b/core-web/libs/sdk/client/src/lib/utils/graphql/transforms.ts @@ -1,15 +1,11 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -/** - * Represents the response from a GraphQL query for a page. - * - * @interface GraphQLPageResponse - * @property {Record} page - The main page data. - * @property {unknown} [key: string] - Additional properties that may be included in the response. - */ -interface GraphQLPageResponse { - page: Record; - [key: string]: unknown; -} + +import { + DotCMSBasicContentlet, + DotCMSGraphQLPageResponse, + DotCMSPageContainerContentlets, + DotCMSPageGraphQLContainer +} from '@dotcms/types'; /** * Transforms a GraphQL Page response to a Page Entity. @@ -22,7 +18,7 @@ interface GraphQLPageResponse { * const pageEntity = graphqlToPageEntity(graphQLPageResponse); * ``` */ -export const graphqlToPageEntity = (graphQLPageResponse: GraphQLPageResponse) => { +export const graphqlToPageEntity = (graphQLPageResponse: DotCMSGraphQLPageResponse) => { const { page } = graphQLPageResponse; // If there is no page, return null @@ -59,24 +55,28 @@ export const graphqlToPageEntity = (graphQLPageResponse: GraphQLPageResponse) => * @param {Array>} [containers=[]] - The containers array from the GraphQL response. * @returns {Record} The parsed containers. */ -const parseContainers = (containers: Record[] = []) => { - return containers.reduce((acc: Record, container: Record) => { - const { path, identifier, containerStructures, containerContentlets, ...rest } = container; +const parseContainers = (containers: DotCMSPageGraphQLContainer[] = []) => { + return containers.reduce( + (acc: Record, container: DotCMSPageGraphQLContainer) => { + const { path, identifier, containerStructures, containerContentlets, ...rest } = + container; - const key = (path || identifier) as string; + const key = (path || identifier) as string; - acc[key] = { - containerStructures, - container: { - path, - identifier, - ...rest - }, - contentlets: parseContentletsToUuidMap(containerContentlets as []) - }; + acc[key] = { + containerStructures, + container: { + path, + identifier, + ...rest + }, + contentlets: parseContentletsToUuidMap(containerContentlets as []) + }; - return acc; - }, {}); + return acc; + }, + {} + ); }; /** @@ -85,21 +85,21 @@ const parseContainers = (containers: Record[] = []) => { * @param {Array>} containerContentlets - The contentlets array from the GraphQL response. * @returns {Record>>} The parsed contentlets mapped by UUID. */ -const parseContentletsToUuidMap = (containerContentlets: Record[] = []) => { - return containerContentlets.reduce((acc, containerContentlet) => { - const { uuid, contentlets } = containerContentlet as { - uuid: string; - contentlets: Record[]; - }; +const parseContentletsToUuidMap = (containerContentlets: DotCMSPageContainerContentlets[] = []) => { + return containerContentlets.reduce( + (acc, containerContentlet) => { + const { uuid, contentlets } = containerContentlet; - // TODO: This is a temporary solution, we need to find a better way to handle this. - acc[uuid] = contentlets.map(({ _map = {}, ...rest }) => { - return { - ...(_map as Record), - ...rest - }; - }); + // TODO: This is a temporary solution, we need to find a better way to handle this. + acc[uuid] = contentlets.map(({ _map = {}, ...rest }) => { + return { + ...(_map as Record), + ...rest + }; + }); - return acc; - }, {}); + return acc; + }, + {} as Record + ); }; diff --git a/core-web/libs/sdk/types/src/lib/components/block-editor-renderer/internal.ts b/core-web/libs/sdk/types/src/lib/components/block-editor-renderer/internal.ts index 6eb792fa8349..79bccb11330b 100644 --- a/core-web/libs/sdk/types/src/lib/components/block-editor-renderer/internal.ts +++ b/core-web/libs/sdk/types/src/lib/components/block-editor-renderer/internal.ts @@ -4,7 +4,7 @@ * @export * @enum {string} */ -export enum Blocks { +export enum BlockEditorDefaultBlocks { /** Represents a paragraph block */ PARAGRAPH = 'paragraph', /** Represents a heading block */ diff --git a/core-web/libs/sdk/types/src/lib/components/block-editor-renderer/public.ts b/core-web/libs/sdk/types/src/lib/components/block-editor-renderer/public.ts index e945dd233fbe..2a9719165ea8 100644 --- a/core-web/libs/sdk/types/src/lib/components/block-editor-renderer/public.ts +++ b/core-web/libs/sdk/types/src/lib/components/block-editor-renderer/public.ts @@ -4,7 +4,7 @@ * @export * @interface Mark */ -export interface Mark { +export interface BlockEditorMark { type: string; attrs: Record; } @@ -13,18 +13,18 @@ export interface Mark { * Represents a Content Node used by the Block Editor * * @export - * @interface ContentNode + * @interface BlockEditorNode */ -export interface ContentNode { +export interface BlockEditorNode { /** The type of content node */ type: string; /** Child content nodes */ - content?: ContentNode[]; + content?: BlockEditorNode[]; /** Optional attributes for the node */ // eslint-disable-next-line @typescript-eslint/no-explicit-any attrs?: Record; /** Optional marks applied to text content */ - marks?: Mark[]; + marks?: BlockEditorMark[]; /** Optional text content */ text?: string; } @@ -33,9 +33,9 @@ export interface ContentNode { * Represents a Block in the Block Editor * * @export - * @interface Block + * @interface BlockEditorContent */ -export interface Block { - content?: ContentNode[]; +export interface BlockEditorContent { + content?: BlockEditorNode[]; type: string; } diff --git a/core-web/libs/sdk/types/src/lib/editor/internal.ts b/core-web/libs/sdk/types/src/lib/editor/internal.ts index 95fb7f7f02ec..e9e132144dc1 100644 --- a/core-web/libs/sdk/types/src/lib/editor/internal.ts +++ b/core-web/libs/sdk/types/src/lib/editor/internal.ts @@ -1,12 +1,5 @@ import { DotCMSUVEAction } from './public'; -/** - * @description Custom client parameters for fetching data. - */ -export type DotCMSCustomerParams = { - depth: string; -}; - /** * Configuration for reordering a menu. */ @@ -61,7 +54,7 @@ export interface DotCMSUVE { * @property {number} y - The y-coordinate of the contentlet. * @property {number} width - The width of the contentlet. * @property {number} height - The height of the contentlet. - * @property {string} payload - The payload data of the contentlet in JSON format. + * @property {string} payload - The payload data of the contentlet in stringified JSON format. */ export interface DotCMSContentletBound { x: number; diff --git a/core-web/libs/sdk/types/src/lib/page/public.ts b/core-web/libs/sdk/types/src/lib/page/public.ts index 3fb2c7b2fe44..81f68e449573 100644 --- a/core-web/libs/sdk/types/src/lib/page/public.ts +++ b/core-web/libs/sdk/types/src/lib/page/public.ts @@ -1,5 +1,20 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ - +/** + * Represents a DotCMS page asset with its associated components and metadata + * + * @template T - Type parameter extending an object with optional urlContentMap property + * @interface DotCMSPageAsset + * @property {boolean} [canCreateTemplate] - Indicates whether the current user has permissions to create a template from this page + * @property {Object.} containers - Collection of containers present on the page, keyed by container identifier + * @property {DotCMSLayout} layout - Defines the structural layout of the page including rows, columns and their configurations + * @property {DotCMSPage} page - Contains core page information such as title, URL, metadata and other page-specific properties + * @property {DotCMSSite} site - Information about the site this page belongs to, including host name and identifier + * @property {DotCMSTemplate} template - The template applied to this page, defining its base structure and design + * @property {DotCMSViewAs} [viewAs] - Configuration for how the page should be rendered in different view modes (preview, edit, live) + * @property {DotCMSVanityUrl} [vanityUrl] - Custom URL routing configuration for this page if applicable + * @property {T['urlContentMap']} [urlContentMap] - Mapping of URL parameters to content, useful for dynamic pages + * @property {Record} [params] - Additional parameters and metadata associated with the page + */ export interface DotCMSPageAsset< T extends { urlContentMap?: unknown } = { urlContentMap?: unknown } > { @@ -13,11 +28,20 @@ export interface DotCMSPageAsset< template: DotCMSTemplate; viewAs?: DotCMSViewAs; vanityUrl?: DotCMSVanityUrl; - /** Content mapping for the page URL */ urlContentMap?: T extends { urlContentMap: infer U } ? U : T; params?: Record; } +/** + * Represents a row in a page layout asset + * + * @interface DotPageAssetLayoutRow + * @property {number} identifier - Unique numeric identifier for the row + * @property {string} [value] - Optional value associated with the row + * @property {string} [id] - Optional string identifier for the row + * @property {DotPageAssetLayoutColumn[]} columns - Array of columns contained within this row + * @property {string} [styleClass] - Optional CSS class name(s) to apply to the row + */ export interface DotPageAssetLayoutRow { identifier: number; value?: string; @@ -26,6 +50,22 @@ export interface DotPageAssetLayoutRow { styleClass?: string; } +/** + * Represents a vanity URL configuration for URL redirection and forwarding + * + * @interface DotCMSVanityUrl + * @property {string} pattern - The URL pattern to match for this vanity URL rule + * @property {string} vanityUrlId - Unique identifier for this vanity URL + * @property {string} url - The actual URL that will be matched + * @property {string} siteId - The ID of the site this vanity URL belongs to + * @property {number} languageId - The language ID this vanity URL applies to + * @property {string} forwardTo - The destination URL to forward/redirect to + * @property {number} response - The HTTP response code to use + * @property {number} order - The priority order of this vanity URL rule + * @property {boolean} temporaryRedirect - Whether this is a temporary (302) redirect + * @property {boolean} permanentRedirect - Whether this is a permanent (301) redirect + * @property {boolean} forward - Whether to forward the request internally + */ export interface DotCMSVanityUrl { pattern: string; vanityUrlId: string; @@ -40,6 +80,18 @@ export interface DotCMSVanityUrl { forward: boolean; } +/** + * Represents a column in a page layout asset + * + * @interface DotPageAssetLayoutColumn + * @property {boolean} preview - Whether the column is in preview mode + * @property {DotCMSColumnContainer[]} containers - Array of containers within this column + * @property {number} widthPercent - Width of the column as a percentage + * @property {number} width - Width of the column in pixels/units + * @property {number} leftOffset - Left offset position of the column + * @property {number} left - Left position of the column + * @property {string} [styleClass] - Optional CSS class name(s) to apply to the column + */ export interface DotPageAssetLayoutColumn { preview: boolean; containers: DotCMSColumnContainer[]; @@ -50,12 +102,28 @@ export interface DotPageAssetLayoutColumn { styleClass?: string; } +/** + * Represents a container within a column in a page layout + * + * @interface DotCMSColumnContainer + * @property {string} identifier - Unique identifier for the container + * @property {string} uuid - UUID of the current container instance + * @property {string[]} historyUUIDs - Array of historical UUIDs for this container's previous versions + */ export interface DotCMSColumnContainer { identifier: string; uuid: string; historyUUIDs: string[]; } +/** + * Represents a container asset within a page, including its structure and content + * + * @interface DotCMSPageAssetContainer + * @property {DotCMSContainer} container - The container configuration and metadata + * @property {DotCMSContainerStructure[]} containerStructures - Array of content type structures allowed in this container + * @property {Object.} contentlets - Map of content entries in the container, keyed by UUID + */ export interface DotCMSPageAssetContainer { container: DotCMSContainer; containerStructures: DotCMSContainerStructure[]; @@ -64,6 +132,51 @@ export interface DotCMSPageAssetContainer { }; } +/** + * Represents a container in DotCMS that can hold content and has various configuration options + * + * @interface DotCMSContainer + * @property {string} identifier - Unique identifier for the container + * @property {string} uuid - UUID of the container instance + * @property {number} iDate - Initial creation date timestamp + * @property {string} type - Type of the container + * @property {string} [owner] - Owner of the container + * @property {string} inode - Unique inode identifier + * @property {string} source - Source of the container + * @property {string} title - Title of the container + * @property {string} friendlyName - User-friendly name of the container + * @property {number} modDate - Last modification date timestamp + * @property {string} modUser - User who last modified the container + * @property {number} sortOrder - Sort order position + * @property {boolean} showOnMenu - Whether to show in navigation menus + * @property {string} [code] - Optional container template code + * @property {number} maxContentlets - Maximum number of content items allowed + * @property {boolean} useDiv - Whether to wrap content in div elements + * @property {string} [sortContentletsBy] - Field to sort contentlets by + * @property {string} preLoop - Code to execute before content loop + * @property {string} postLoop - Code to execute after content loop + * @property {boolean} staticify - Whether to make container static + * @property {string} [luceneQuery] - Optional Lucene query for filtering content + * @property {string} notes - Additional notes about the container + * @property {number} [languageId] - Language identifier + * @property {string} [path] - Container path + * @property {boolean} live - Whether container is live + * @property {boolean} locked - Whether container is locked + * @property {boolean} working - Whether container is in working state + * @property {boolean} deleted - Whether container is deleted + * @property {string} name - Name of the container + * @property {boolean} archived - Whether container is archived + * @property {string} permissionId - Permission identifier + * @property {string} versionId - Version identifier + * @property {string} versionType - Type of version + * @property {string} permissionType - Type of permission + * @property {string} categoryId - Category identifier + * @property {number} idate - Creation date timestamp + * @property {boolean} new - Whether container is new + * @property {string} acceptTypes - Content types accepted by container + * @property {DotCMSBasicContentlet[]} contentlets - Array of content items + * @property {DotCMSSiteParentPermissionable} parentPermissionable - Parent permission configuration + */ export interface DotCMSContainer { identifier: string; uuid: string; @@ -150,7 +263,7 @@ export interface DotCMSBasicContentlet { } export interface DotcmsNavigationItem { - code?: any; + code?: string; folder: string; children?: DotcmsNavigationItem[]; host: string; @@ -505,18 +618,7 @@ export interface DotCMSBasicGraphQLPage { }; // Container information - containers: { - path?: string; - identifier: string; - maxContentlets?: number; - containerStructures?: { - contentTypeVar: string; - }[]; - containerContentlets?: { - uuid: string; - contentlets: DotCMSBasicContentlet[]; - }[]; - }[]; + containers: DotCMSPageGraphQLContainer[]; layout: DotCMSLayout; viewAs: DotCMSViewAs; diff --git a/core-web/libs/sdk/uve/src/lib/dom/dom.spec.ts b/core-web/libs/sdk/uve/src/lib/dom/dom.spec.ts index 9c0506983273..6f4eadda8667 100644 --- a/core-web/libs/sdk/uve/src/lib/dom/dom.spec.ts +++ b/core-web/libs/sdk/uve/src/lib/dom/dom.spec.ts @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import { DotCMSContentlet } from '@dotcms/types'; +import { DotCMSBasicContentlet } from '@dotcms/types'; import { getDotCMSContentletsBound, @@ -256,7 +256,7 @@ describe('getDotContentletAttributes', () => { inode: 'test-inode', contentType: 'test-type', onNumberOfPages: '5' - } as unknown as DotCMSContentlet; + } as unknown as DotCMSBasicContentlet; const container = 'test-container'; const result = getDotContentletAttributes(contentlet, container); diff --git a/core-web/libs/sdk/uve/src/lib/editor/internal.ts b/core-web/libs/sdk/uve/src/lib/editor/internal.ts index 911f1a29955c..76c648efcabf 100644 --- a/core-web/libs/sdk/uve/src/lib/editor/internal.ts +++ b/core-web/libs/sdk/uve/src/lib/editor/internal.ts @@ -1,4 +1,4 @@ -import { DotCMSUVEAction, Block } from '@dotcms/types'; +import { DotCMSUVEAction, BlockEditorContent } from '@dotcms/types'; import { BlockEditorState, DotCMSContainerBound } from '@dotcms/types/internal'; import { sendMessageToUVE } from './public'; @@ -29,7 +29,7 @@ export function setBounds(bounds: DotCMSContainerBound[]): void { * @property {boolean} BlockEditorState.isValid - Whether the blocks structure is valid * @property {string | null} BlockEditorState.error - Error message if invalid, null if valid */ -export const isValidBlocks = (blocks: Block): BlockEditorState => { +export const isValidBlocks = (blocks: BlockEditorContent): BlockEditorState => { if (!blocks) { return { error: `Error: Blocks object is not defined` From e816aa12b97be48a2b815217ad2526f0c0788f70 Mon Sep 17 00:00:00 2001 From: Kevin Davila <56242609+kevindaviladev@users.noreply.github.com> Date: Mon, 28 Apr 2025 21:13:12 -0500 Subject: [PATCH 10/15] Fix issue on build dotcms-ui --- .../edit-ema/portlet/src/lib/services/dot-page-api.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core-web/libs/portlets/edit-ema/portlet/src/lib/services/dot-page-api.service.ts b/core-web/libs/portlets/edit-ema/portlet/src/lib/services/dot-page-api.service.ts index 2bc18b59488c..7c9e19d6aff5 100644 --- a/core-web/libs/portlets/edit-ema/portlet/src/lib/services/dot-page-api.service.ts +++ b/core-web/libs/portlets/edit-ema/portlet/src/lib/services/dot-page-api.service.ts @@ -17,7 +17,7 @@ import { DotTemplate, VanityUrl } from '@dotcms/dotcms-models'; -import { UVE_MODE } from '@dotcms/types'; +import { DotCMSGraphQLPageResponse, UVE_MODE } from '@dotcms/types'; import { PERSONA_KEY } from '../shared/consts'; import { DotPage, DotPageAssetParams, SavePagePayload } from '../shared/models'; @@ -199,7 +199,7 @@ export class DotPageApiService { return this.http.post<{ data }>('/api/v1/graphql', { query, variables }, { headers }).pipe( pluck('data'), map(({ page, ...content }) => { - const pageEntity = graphqlToPageEntity({ page }); + const pageEntity = graphqlToPageEntity({ page } as DotCMSGraphQLPageResponse); return { page: pageEntity, From 30f722c9d38de759cdd996ddf4f9418c9c2bdb7d Mon Sep 17 00:00:00 2001 From: Kevin Davila <56242609+kevindaviladev@users.noreply.github.com> Date: Tue, 29 Apr 2025 01:25:32 -0500 Subject: [PATCH 11/15] Fixed tests on sdk-angular --- .../dotcms-editable-text.component.spec.ts | 4 ++-- .../components/container/container.component.spec.ts | 6 +++--- core-web/libs/sdk/angular/next/utils/testing.utils.ts | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/core-web/libs/sdk/angular/next/components/dotcms-editable-text/dotcms-editable-text.component.spec.ts b/core-web/libs/sdk/angular/next/components/dotcms-editable-text/dotcms-editable-text.component.spec.ts index a06f772e6322..ae0058f2e3c7 100644 --- a/core-web/libs/sdk/angular/next/components/dotcms-editable-text/dotcms-editable-text.component.spec.ts +++ b/core-web/libs/sdk/angular/next/components/dotcms-editable-text/dotcms-editable-text.component.spec.ts @@ -6,9 +6,9 @@ import { Editor } from 'tinymce'; import { DebugElement, ElementRef, Renderer2, SecurityContext } from '@angular/core'; import { By, DomSanitizer } from '@angular/platform-browser'; +import { DotCMSUVEAction, UVE_MODE } from '@dotcms/types'; +import { __DOTCMS_UVE_EVENT__ } from '@dotcms/types/internal'; import * as dotCMSUVE from '@dotcms/uve'; -import { __DOTCMS_UVE_EVENT__ } from '@dotcms/uve/internal'; -import { DotCMSUVEAction, UVE_MODE } from '@dotcms/uve/types'; import { DotCMSEditableTextComponent } from './dotcms-editable-text.component'; import { TINYMCE_CONFIG } from './utils'; diff --git a/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/container/container.component.spec.ts b/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/container/container.component.spec.ts index 24b81a4755bf..5a465e851fb5 100644 --- a/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/container/container.component.spec.ts +++ b/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/container/container.component.spec.ts @@ -1,7 +1,7 @@ import { expect, describe, it, beforeEach, jest } from '@jest/globals'; import { Spectator, createComponentFactory } from '@ngneat/spectator/jest'; -import { DotCMSContentlet, EditableContainerData } from '@dotcms/types'; +import { DotCMSBasicContentlet, EditableContainerData } from '@dotcms/types'; import { ContainerComponent } from './container.component'; @@ -70,8 +70,8 @@ describe('ContainerComponent', () => { // Set container data with contentlets spectator.component.$containerData.set({} as EditableContainerData); spectator.component.$contentlets.set([ - { identifier: 'content-1' } as DotCMSContentlet, - { identifier: 'content-2' } as DotCMSContentlet + { identifier: 'content-1' } as DotCMSBasicContentlet, + { identifier: 'content-2' } as DotCMSBasicContentlet ]); spectator.detectChanges(); diff --git a/core-web/libs/sdk/angular/next/utils/testing.utils.ts b/core-web/libs/sdk/angular/next/utils/testing.utils.ts index 061ae66271d5..c1e86f5a7d0a 100644 --- a/core-web/libs/sdk/angular/next/utils/testing.utils.ts +++ b/core-web/libs/sdk/angular/next/utils/testing.utils.ts @@ -1,4 +1,4 @@ -import { DotCMSPageAsset, DotCMSContentlet } from '@dotcms/types'; +import { DotCMSPageAsset, DotCMSBasicContentlet } from '@dotcms/types'; export const PageResponseMock: DotCMSPageAsset = { canCreateTemplate: true, @@ -69,7 +69,7 @@ export const PageResponseMock: DotCMSPageAsset = { hasTitleImage: true, sortOrder: 0, modUser: 'dotcms.org.1', - onNumberOfPages: 3 + onNumberOfPages: '3' } ] }, @@ -189,7 +189,7 @@ export const PageResponseMock: DotCMSPageAsset = { hasTitleImage: true, sortOrder: 0, modUser: 'dotcms.org.1', - onNumberOfPages: 1 + onNumberOfPages: '1' } ] }, @@ -638,7 +638,7 @@ export const PageResponseOneRowMock: DotCMSPageAsset = { } }; -export const dotcmsContentletMock: DotCMSContentlet = { +export const dotcmsContentletMock: DotCMSBasicContentlet = { archived: false, baseType: '', contentType: '', From 23c400c6b3174aeca1d8e6b469ccbbe2604e00f4 Mon Sep 17 00:00:00 2001 From: Kevin Davila <56242609+kevindaviladev@users.noreply.github.com> Date: Tue, 29 Apr 2025 02:20:35 -0500 Subject: [PATCH 12/15] Fixed references on test in sdk-angular --- .../contentlet/contentlet.component.spec.ts | 8 ++++---- .../fallback-component/fallback-component.spec.ts | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/contentlet/contentlet.component.spec.ts b/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/contentlet/contentlet.component.spec.ts index 1033a176314c..ab1f742995f2 100644 --- a/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/contentlet/contentlet.component.spec.ts +++ b/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/contentlet/contentlet.component.spec.ts @@ -3,7 +3,7 @@ import { createComponentFactory, Spectator } from '@ngneat/spectator/jest'; import { Component, ElementRef, Input, Type } from '@angular/core'; -import { DotCMSContentlet } from '@dotcms/types'; +import { DotCMSBasicContentlet } from '@dotcms/types'; import { CUSTOM_NO_COMPONENT } from '@dotcms/uve/internal'; import { ContentletComponent } from './contentlet.component'; @@ -17,7 +17,7 @@ import { FallbackComponent } from '../fallback-component/fallback-component.comp template: '
Mock Component
' }) class MockComponent { - @Input() contentlet: DotCMSContentlet | undefined; + @Input() contentlet: DotCMSBasicContentlet | undefined; } describe('ContentletComponent', () => { @@ -25,13 +25,13 @@ describe('ContentletComponent', () => { let component: ContentletComponent; let dotcmsStore: jest.Mocked; - const mockContentlet: DotCMSContentlet = { + const mockContentlet: DotCMSBasicContentlet = { identifier: 'test-contentlet-id', inode: 'test-inode', contentType: 'test-content-type', title: 'Test Contentlet', baseType: 'test-basetype' - } as DotCMSContentlet; + } as DotCMSBasicContentlet; // Create proper DynamicComponentEntity objects (Promise>) const mockComponentsStore = { diff --git a/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/fallback-component/fallback-component.spec.ts b/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/fallback-component/fallback-component.spec.ts index e5c47ac2f64c..e431aa3d9825 100644 --- a/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/fallback-component/fallback-component.spec.ts +++ b/core-web/libs/sdk/angular/next/components/dotcms-layout-body/components/fallback-component/fallback-component.spec.ts @@ -3,7 +3,7 @@ import { createComponentFactory, Spectator } from '@ngneat/spectator/jest'; import { Component, Input } from '@angular/core'; -import { DotCMSContentlet } from '@dotcms/types'; +import { DotCMSBasicContentlet } from '@dotcms/types'; import { FallbackComponent } from './fallback-component.component'; @@ -15,7 +15,7 @@ import { DynamicComponentEntity } from '../../../../models'; template: '
Mock Component: {{contentlet?.contentType}}
' }) class MockComponent { - @Input() contentlet!: DotCMSContentlet; + @Input() contentlet!: DotCMSBasicContentlet; } describe('FallbackComponent', () => { @@ -32,7 +32,7 @@ describe('FallbackComponent', () => { props: { contentlet: { contentType: '' // Initialize with an empty contentType - } as DotCMSContentlet, + } as DotCMSBasicContentlet, UserNoComponent: null as DynamicComponentEntity | null } }); @@ -69,7 +69,7 @@ describe('FallbackComponent', () => { titleImage: '', url: '/test', working: true - } as DotCMSContentlet; + } as DotCMSBasicContentlet; component.UserNoComponent = null; @@ -90,7 +90,7 @@ describe('FallbackComponent', () => { contentType: 'testContentType', identifier: 'test-id', title: 'Test Title' - } as DotCMSContentlet; + } as DotCMSBasicContentlet; spectator.detectChanges(); @@ -107,7 +107,7 @@ describe('FallbackComponent', () => { contentType: 'testContentType', title: 'Test Title', identifier: 'test-id' - } as DotCMSContentlet; + } as DotCMSBasicContentlet; const mockComponentPromise = Promise.resolve(MockComponent) as DynamicComponentEntity; component.UserNoComponent = mockComponentPromise; From 4c55287cc7112e0e2a4b86bb31f35683eca15736 Mon Sep 17 00:00:00 2001 From: Kevin Davila <56242609+kevindaviladev@users.noreply.github.com> Date: Wed, 30 Apr 2025 15:46:43 -0500 Subject: [PATCH 13/15] Improved types and test on external project --- core-web/libs/sdk/angular/package.json | 4 +- core-web/libs/sdk/client/package.json | 4 +- .../client/src/lib/client/page/page-api.ts | 20 +- core-web/libs/sdk/react/package.json | 4 +- .../DotCMSLayoutBody/DotCMSLayoutBody.tsx | 7 +- core-web/libs/sdk/types/package.json | 2 +- .../libs/sdk/types/src/lib/page/public.ts | 543 +++++++++++++++++- core-web/libs/sdk/uve/package.json | 4 +- 8 files changed, 555 insertions(+), 33 deletions(-) diff --git a/core-web/libs/sdk/angular/package.json b/core-web/libs/sdk/angular/package.json index e4197aa4f82d..b5ccee7418fc 100644 --- a/core-web/libs/sdk/angular/package.json +++ b/core-web/libs/sdk/angular/package.json @@ -7,10 +7,12 @@ "@angular/router": ">=17.0.0", "@dotcms/client": "next", "@dotcms/uve": "next", - "@dotcms/types": "next", "@tinymce/tinymce-angular": "^8.0.0", "rxjs": ">=7.0.0" }, + "devDependencies": { + "@dotcms/types": "next" + }, "description": "Official Angular Components library to render a dotCMS page.", "repository": { "type": "git", diff --git a/core-web/libs/sdk/client/package.json b/core-web/libs/sdk/client/package.json index 5d84e07cfc23..9d6661530aa7 100644 --- a/core-web/libs/sdk/client/package.json +++ b/core-web/libs/sdk/client/package.json @@ -6,8 +6,8 @@ "type": "git", "url": "git+https://github.com/dotCMS/core.git#main" }, - "dependencies": { - "@dotcms/types": "0.0.1" + "devDependencies": { + "@dotcms/types": "next" }, "scripts": { "build": "nx run sdk-client:build:js; cd ../../../../dotCMS/src/main/webapp/html/js/editor-js; rm -rf src package.json *.esm.d.ts" diff --git a/core-web/libs/sdk/client/src/lib/client/page/page-api.ts b/core-web/libs/sdk/client/src/lib/client/page/page-api.ts index 3aaf93499a9f..26b509e35259 100644 --- a/core-web/libs/sdk/client/src/lib/client/page/page-api.ts +++ b/core-web/libs/sdk/client/src/lib/client/page/page-api.ts @@ -193,21 +193,27 @@ export class PageClient { * }); *``` */ - get(url: string, options?: PageRequestParams): Promise; - get(url: string, options?: GraphQLPageOptions): Promise; - get( + get( + url: string, + options?: PageRequestParams + ): Promise; + get( + url: string, + options?: GraphQLPageOptions + ): Promise; + get( url: string, options?: PageRequestParams | GraphQLPageOptions - ): Promise { + ): Promise { if (!options) { - return this.#getPageFromAPI(url); + return this.#getPageFromAPI(url) as Promise; } if (this.#isGraphQLRequest(options)) { - return this.#getPageFromGraphQL(url, options); + return this.#getPageFromGraphQL(url, options) as Promise; } - return this.#getPageFromAPI(url, options); + return this.#getPageFromAPI(url, options) as Promise; } /** diff --git a/core-web/libs/sdk/react/package.json b/core-web/libs/sdk/react/package.json index 6bb3b56caa47..9ef2f948c0f1 100644 --- a/core-web/libs/sdk/react/package.json +++ b/core-web/libs/sdk/react/package.json @@ -6,9 +6,11 @@ "react-dom": ">=18", "@dotcms/client": "next", "@dotcms/uve": "next", - "@dotcms/types": "0.0.1", "@tinymce/tinymce-react": "^5.1.1" }, + "devDependencies": { + "@dotcms/types": "next" + }, "description": "Official React Components library to render a dotCMS page.", "repository": { "type": "git", diff --git a/core-web/libs/sdk/react/src/lib/next/components/DotCMSLayoutBody/DotCMSLayoutBody.tsx b/core-web/libs/sdk/react/src/lib/next/components/DotCMSLayoutBody/DotCMSLayoutBody.tsx index 0fba8664512a..30fb5a7723a1 100644 --- a/core-web/libs/sdk/react/src/lib/next/components/DotCMSLayoutBody/DotCMSLayoutBody.tsx +++ b/core-web/libs/sdk/react/src/lib/next/components/DotCMSLayoutBody/DotCMSLayoutBody.tsx @@ -5,9 +5,12 @@ import { ErrorMessage } from './components/ErrorMessage'; import { DotCMSPageContext } from '../../contexts/DotCMSPageContext'; import { Row } from '../Row/Row'; -interface DotCMSLayoutBodyProps { +interface DotCMSLayoutBodyProps { page: DotCMSPageAsset; - components: Record>; + components: { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + [key: string]: React.ComponentType | React.ComponentType; + }; mode?: DotCMSPageRendererMode; } diff --git a/core-web/libs/sdk/types/package.json b/core-web/libs/sdk/types/package.json index 5ade4bc98eff..05fe345e0fd3 100644 --- a/core-web/libs/sdk/types/package.json +++ b/core-web/libs/sdk/types/package.json @@ -1,6 +1,6 @@ { "name": "@dotcms/types", - "version": "0.0.1", + "version": "0.0.1-beta.2", "keywords": [ "dotCMS", "CMS", diff --git a/core-web/libs/sdk/types/src/lib/page/public.ts b/core-web/libs/sdk/types/src/lib/page/public.ts index 81f68e449573..031e38f8ead2 100644 --- a/core-web/libs/sdk/types/src/lib/page/public.ts +++ b/core-web/libs/sdk/types/src/lib/page/public.ts @@ -1,23 +1,21 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ + /** - * Represents a DotCMS page asset with its associated components and metadata + * Represents a DotCMS page asset that contains all the components and configuration needed to render a page * - * @template T - Type parameter extending an object with optional urlContentMap property * @interface DotCMSPageAsset - * @property {boolean} [canCreateTemplate] - Indicates whether the current user has permissions to create a template from this page - * @property {Object.} containers - Collection of containers present on the page, keyed by container identifier - * @property {DotCMSLayout} layout - Defines the structural layout of the page including rows, columns and their configurations - * @property {DotCMSPage} page - Contains core page information such as title, URL, metadata and other page-specific properties - * @property {DotCMSSite} site - Information about the site this page belongs to, including host name and identifier - * @property {DotCMSTemplate} template - The template applied to this page, defining its base structure and design - * @property {DotCMSViewAs} [viewAs] - Configuration for how the page should be rendered in different view modes (preview, edit, live) - * @property {DotCMSVanityUrl} [vanityUrl] - Custom URL routing configuration for this page if applicable - * @property {T['urlContentMap']} [urlContentMap] - Mapping of URL parameters to content, useful for dynamic pages - * @property {Record} [params] - Additional parameters and metadata associated with the page + * @property {boolean} [canCreateTemplate] - Whether the current user has permission to create templates + * @property {Object.} containers - Map of container identifiers to their container objects + * @property {DotCMSLayout} layout - The layout configuration for this page + * @property {DotCMSPage} page - The page metadata and configuration + * @property {DotCMSSite} site - The site this page belongs to + * @property {DotCMSTemplate} template - The template used to render this page + * @property {DotCMSViewAs} [viewAs] - Optional view configuration for preview/editing modes + * @property {DotCMSVanityUrl} [vanityUrl] - Optional vanity URL configuration for this page + * @property {DotCMSURLContentMap} [urlContentMap] - Optional URL to content mapping configuration + * @property {Record} [params] - Optional parameters used when requesting the page */ -export interface DotCMSPageAsset< - T extends { urlContentMap?: unknown } = { urlContentMap?: unknown } -> { +export interface DotCMSPageAsset { canCreateTemplate?: boolean; containers: { [key: string]: DotCMSPageAssetContainer; @@ -28,10 +26,23 @@ export interface DotCMSPageAsset< template: DotCMSTemplate; viewAs?: DotCMSViewAs; vanityUrl?: DotCMSVanityUrl; - urlContentMap?: T extends { urlContentMap: infer U } ? U : T; + urlContentMap?: DotCMSURLContentMap; params?: Record; } +/** + * Represents a URL to content mapping configuration that extends the basic contentlet + * + * @interface DotCMSURLContentMap + * @extends {DotCMSBasicContentlet} + * @property {string} URL_MAP_FOR_CONTENT - The content identifier that this URL maps to + * @property {string} urlMap - The URL pattern/mapping configuration + */ +export interface DotCMSURLContentMap extends DotCMSBasicContentlet { + URL_MAP_FOR_CONTENT: string; + urlMap: string; +} + /** * Represents a row in a page layout asset * @@ -132,6 +143,51 @@ export interface DotCMSPageAssetContainer { }; } +/** + * Represents a container in DotCMS that can hold content and has various configuration options + * + * @interface DotCMSContainer + * @property {string} identifier - Unique identifier for the container + * @property {string} uuid - UUID of the container instance + * @property {number} iDate - Initial creation date timestamp + * @property {string} type - Type of the container + * @property {string} [owner] - Owner of the container + * @property {string} inode - Unique inode identifier + * @property {string} source - Source of the container + * @property {string} title - Title of the container + * @property {string} friendlyName - User-friendly name of the container + * @property {number} modDate - Last modification date timestamp + * @property {string} modUser - User who last modified the container + * @property {number} sortOrder - Sort order position + * @property {boolean} showOnMenu - Whether to show in navigation menus + * @property {string} [code] - Optional container template code + * @property {number} maxContentlets - Maximum number of content items allowed + * @property {boolean} useDiv - Whether to wrap content in div elements + * @property {string} [sortContentletsBy] - Field to sort contentlets by + * @property {string} preLoop - Code to execute before content loop + * @property {string} postLoop - Code to execute after content loop + * @property {boolean} staticify - Whether to make container static + * @property {string} [luceneQuery] - Optional Lucene query for filtering content + * @property {string} notes - Additional notes about the container + * @property {number} [languageId] - Language identifier + * @property {string} [path] - Container path + * @property {boolean} live - Whether container is live + * @property {boolean} locked - Whether container is locked + * @property {boolean} working - Whether container is in working state + * @property {boolean} deleted - Whether container is deleted + * @property {string} name - Name of the container + * @property {boolean} archived - Whether container is archived + * @property {string} permissionId - Permission identifier + * @property {string} versionId - Version identifier + * @property {string} versionType - Type of version + * @property {string} permissionType - Type of permission + * @property {string} categoryId - Category identifier + * @property {number} idate - Creation date timestamp + * @property {boolean} new - Whether container is new + * @property {string} acceptTypes - Content types accepted by container + * @property {DotCMSBasicContentlet[]} contentlets - Array of content items + * @property {DotCMSSiteParentPermissionable} parentPermissionable - Parent permission configuration + */ /** * Represents a container in DotCMS that can hold content and has various configuration options * @@ -220,6 +276,50 @@ export interface DotCMSContainer { parentPermissionable: DotCMSSiteParentPermissionable; } +/** + * Represents a basic contentlet in dotCMS with common properties shared across content types + * + * @interface DotCMSBasicContentlet + * @property {boolean} archived - Whether the contentlet is archived + * @property {string} baseType - The base content type + * @property {boolean} [deleted] - Whether the contentlet is deleted + * @property {string} [binary] - Binary content identifier + * @property {string} [binaryContentAsset] - Binary content asset identifier + * @property {string} [binaryVersion] - Version of binary content + * @property {string} contentType - The specific content type + * @property {string} [file] - Associated file path + * @property {string} folder - Folder path containing the contentlet + * @property {boolean} [hasLiveVersion] - Whether a live version exists + * @property {boolean} hasTitleImage - Whether the contentlet has a title image + * @property {string} host - Host identifier + * @property {string} hostName - Host name + * @property {string} identifier - Unique identifier + * @property {string} inode - Internal node identifier + * @property {any} [image] - Associated image + * @property {number} languageId - Language identifier + * @property {string} [language] - Language name/code + * @property {boolean} live - Whether contentlet is live + * @property {boolean} locked - Whether contentlet is locked + * @property {string} [mimeType] - MIME type for binary content + * @property {string} modDate - Last modification date + * @property {string} modUser - User who last modified + * @property {string} modUserName - Display name of user who last modified + * @property {string} owner - Owner of the contentlet + * @property {number} sortOrder - Sort order position + * @property {string} stInode - Structure inode + * @property {string} title - Title of the contentlet + * @property {string} titleImage - Title image path/identifier + * @property {string} [text] - Text content + * @property {string} url - URL for the contentlet + * @property {boolean} working - Whether contentlet is in working version + * @property {string} [body] - Body content + * @property {string} [contentTypeIcon] - Icon for the content type + * @property {string} [variant] - Content variant identifier + * @property {string} [widgetTitle] - Title for widget type content + * @property {string} [onNumberOfPages] - Number of pages setting + * @property {string} [__icon__] - Icon identifier + * @property {any} [key: string] - Additional dynamic properties + */ export interface DotCMSBasicContentlet { archived: boolean; baseType: string; @@ -262,6 +362,22 @@ export interface DotCMSBasicContentlet { [key: string]: any; } +/** + * Represents a navigation item in the DotCMS navigation structure + * + * @interface DotcmsNavigationItem + * @property {string} [code] - Optional unique code identifier for the navigation item + * @property {string} folder - The folder path where this navigation item is located + * @property {DotcmsNavigationItem[]} [children] - Optional array of child navigation items + * @property {string} host - The host/site this navigation item belongs to + * @property {number} languageId - The language ID for this navigation item + * @property {string} href - The URL/link that this navigation item points to + * @property {string} title - The display title of the navigation item + * @property {string} type - The type of navigation item + * @property {number} hash - Hash value for the navigation item + * @property {string} target - The target attribute for the link (e.g. "_blank", "_self") + * @property {number} order - The sort order position of this item in the navigation + */ export interface DotcmsNavigationItem { code?: string; folder: string; @@ -276,6 +392,43 @@ export interface DotcmsNavigationItem { order: number; } +/** + * Represents a template in DotCMS that defines the layout and structure of pages + * + * @interface DotCMSTemplate + * @property {number} iDate - Initial creation date timestamp + * @property {string} type - Type of the template + * @property {string} owner - Owner of the template + * @property {string} inode - Unique inode identifier + * @property {string} identifier - Unique identifier for the template + * @property {string} source - Source of the template + * @property {string} title - Title of the template + * @property {string} friendlyName - User-friendly name of the template + * @property {number} modDate - Last modification date timestamp + * @property {string} modUser - User who last modified the template + * @property {number} sortOrder - Sort order position + * @property {boolean} showOnMenu - Whether to show in navigation menus + * @property {string} image - Image associated with the template + * @property {boolean} drawed - Whether template was drawn in template designer + * @property {string} drawedBody - Template body from designer + * @property {string} theme - Theme applied to the template + * @property {boolean} anonymous - Whether template is accessible anonymously + * @property {boolean} template - Whether this is a template + * @property {string} name - Name of the template + * @property {boolean} live - Whether template is live + * @property {boolean} archived - Whether template is archived + * @property {boolean} locked - Whether template is locked + * @property {boolean} working - Whether template is in working state + * @property {string} permissionId - Permission identifier + * @property {string} versionId - Version identifier + * @property {string} versionType - Type of version + * @property {boolean} deleted - Whether template is deleted + * @property {string} permissionType - Type of permission + * @property {string} categoryId - Category identifier + * @property {number} idate - Creation date timestamp + * @property {boolean} new - Whether template is new + * @property {boolean} canEdit - Whether current user can edit template + */ interface DotCMSTemplate { iDate: number; type: string; @@ -311,6 +464,54 @@ interface DotCMSTemplate { canEdit: boolean; } +/** + * Represents a page in DotCMS with its metadata, permissions and configuration + * + * @interface DotCMSPage + * @property {string} template - Template identifier used by this page + * @property {number} modDate - Last modification date timestamp + * @property {string} metadata - Page metadata + * @property {string} cachettl - Cache time to live configuration + * @property {string} pageURI - URI path of the page + * @property {string} title - Page title + * @property {string} type - Type of page + * @property {string} showOnMenu - Menu display configuration + * @property {boolean} httpsRequired - Whether HTTPS is required + * @property {string} inode - Unique inode identifier + * @property {any[]} disabledWYSIWYG - Disabled WYSIWYG editors + * @property {string} seokeywords - SEO keywords + * @property {string} host - Host identifier + * @property {number} lastReview - Last review date timestamp + * @property {boolean} working - Whether page is in working state + * @property {boolean} locked - Whether page is locked + * @property {string} stInode - Structure inode identifier + * @property {string} friendlyName - User-friendly name + * @property {boolean} live - Whether page is live + * @property {string} owner - Page owner + * @property {string} identifier - Unique identifier + * @property {any[]} nullProperties - Properties with null values + * @property {string} friendlyname - Alternative friendly name + * @property {string} pagemetadata - Additional page metadata + * @property {number} languageId - Language identifier + * @property {string} url - Page URL + * @property {string} seodescription - SEO description + * @property {string} modUserName - Name of user who last modified + * @property {string} folder - Folder path + * @property {boolean} deleted - Whether page is deleted + * @property {number} sortOrder - Sort order position + * @property {string} modUser - User who last modified + * @property {string} pageUrl - Full page URL + * @property {string} workingInode - Working version inode + * @property {string} shortyWorking - Short working version ID + * @property {boolean} canEdit - Whether current user can edit + * @property {boolean} canRead - Whether current user can read + * @property {boolean} canLock - Whether current user can lock + * @property {number} lockedOn - Lock timestamp + * @property {string} lockedBy - User who locked the page + * @property {string} lockedByName - Name of user who locked + * @property {string} liveInode - Live version inode + * @property {string} shortyLive - Short live version ID + */ interface DotCMSPage { template: string; modDate: number; @@ -357,6 +558,43 @@ interface DotCMSPage { shortyLive: string; } +/** + * Represents view configuration settings for preview/editing modes + * + * @interface DotCMSViewAs + * @property {Object} language - Language configuration + * @property {number} language.id - Language identifier + * @property {string} language.languageCode - ISO language code + * @property {string} language.countryCode - ISO country code + * @property {string} language.language - Language name + * @property {string} language.country - Country name + * @property {string} mode - View mode (e.g. PREVIEW_MODE, EDIT_MODE, LIVE) + */ +/** + * Represents view configuration settings for preview/editing modes + * + * @interface DotCMSViewAs + * @property {Object} language - Language configuration for the view + * @property {number} language.id - Unique identifier for the language + * @property {string} language.languageCode - ISO 639-1 language code (e.g. 'en', 'es') + * @property {string} language.countryCode - ISO 3166-1 country code (e.g. 'US', 'ES') + * @property {string} language.language - Full name of the language (e.g. 'English', 'Spanish') + * @property {string} language.country - Full name of the country (e.g. 'United States', 'Spain') + * @property {string} mode - View mode for the page ('PREVIEW_MODE' | 'EDIT_MODE' | 'LIVE') + */ + +/** + * Represents view configuration settings for preview/editing modes + * + * @interface DotCMSViewAs + * @property {Object} language - Language configuration for the view + * @property {number} language.id - Unique identifier for the language + * @property {string} language.languageCode - ISO 639-1 language code (e.g. 'en', 'es') + * @property {string} language.countryCode - ISO 3166-1 country code (e.g. 'US', 'ES') + * @property {string} language.language - Full name of the language (e.g. 'English', 'Spanish') + * @property {string} language.country - Full name of the country (e.g. 'United States', 'Spain') + * @property {string} mode - View mode for the page ('PREVIEW_MODE' | 'EDIT_MODE' | 'LIVE') + */ interface DotCMSViewAs { language: { id: number; @@ -368,6 +606,19 @@ interface DotCMSViewAs { mode: string; } +/** + * Represents the layout configuration for a DotCMS page + * + * @interface DotCMSLayout + * @property {string} pageWidth - The overall width of the page + * @property {string} width - The width of the main content area + * @property {string} layout - The layout template/configuration identifier + * @property {string} title - The title of the layout + * @property {boolean} header - Whether the layout includes a header section + * @property {boolean} footer - Whether the layout includes a footer section + * @property {DotPageAssetLayoutBody} body - The main content body configuration + * @property {DotPageAssetLayoutSidebar} sidebar - The sidebar configuration + */ interface DotCMSLayout { pageWidth: string; width: string; @@ -379,6 +630,17 @@ interface DotCMSLayout { sidebar: DotPageAssetLayoutSidebar; } +/** + * Represents the structure configuration for a DotCMS container + * + * @interface DotCMSContainerStructure + * @property {string} id - Unique identifier for the container structure + * @property {string} structureId - ID of the content structure/type + * @property {string} containerInode - Inode of the container + * @property {string} containerId - ID of the container + * @property {string} code - Template code for rendering the structure + * @property {string} contentTypeVar - Variable name of the content type + */ interface DotCMSContainerStructure { id: string; structureId: string; @@ -388,6 +650,16 @@ interface DotCMSContainerStructure { contentTypeVar: string; } +/** + * Represents the sidebar configuration for a DotCMS page layout + * + * @interface DotPageAssetLayoutSidebar + * @property {boolean} preview - Whether the sidebar is in preview mode + * @property {DotCMSContainer[]} containers - Array of containers placed in the sidebar + * @property {string} location - Position/location of the sidebar + * @property {number} widthPercent - Width of the sidebar as a percentage + * @property {string} width - Width of the sidebar (CSS value) + */ interface DotPageAssetLayoutSidebar { preview: boolean; containers: DotCMSContainer[]; @@ -396,10 +668,68 @@ interface DotPageAssetLayoutSidebar { width: string; } +/** + * Represents the body section of a DotCMS page layout + * + * @interface DotPageAssetLayoutBody + * @property {DotPageAssetLayoutRow[]} rows - Array of layout rows that make up the body content + */ interface DotPageAssetLayoutBody { rows: DotPageAssetLayoutRow[]; } +/** + * Represents a DotCMS site/host with its configuration and metadata + * + * @interface DotCMSSite + * @property {boolean} lowIndexPriority - Whether this site has low priority for indexing + * @property {string} name - Name of the site + * @property {boolean} default - Whether this is the default site + * @property {string} aliases - Comma-separated list of domain aliases + * @property {boolean} parent - Whether this site is a parent site + * @property {string} tagStorage - Location for storing tags + * @property {boolean} systemHost - Whether this is a system host + * @property {string} inode - Unique inode identifier + * @property {string} versionType - Type of version + * @property {string} structureInode - Structure inode reference + * @property {string} hostname - Primary hostname + * @property {any} [hostThumbnail] - Optional thumbnail image + * @property {string} owner - Owner of the site + * @property {string} permissionId - Permission identifier + * @property {string} permissionType - Type of permission + * @property {string} type - Type of site + * @property {string} identifier - Unique identifier + * @property {number} modDate - Last modification date timestamp + * @property {string} host - Host identifier + * @property {boolean} live - Whether site is live + * @property {string} indexPolicy - Indexing policy configuration + * @property {string} categoryId - Category identifier + * @property {any} [actionId] - Optional action identifier + * @property {boolean} new - Whether site is new + * @property {boolean} archived - Whether site is archived + * @property {boolean} locked - Whether site is locked + * @property {any[]} disabledWysiwyg - Array of disabled WYSIWYG editors + * @property {string} modUser - User who last modified the site + * @property {boolean} working - Whether site is in working state + * @property {Object} titleImage - Title image configuration + * @property {boolean} titleImage.present - Whether title image exists + * @property {string} folder - Folder path + * @property {boolean} htmlpage - Whether site contains HTML pages + * @property {boolean} fileAsset - Whether site contains file assets + * @property {boolean} vanityUrl - Whether site uses vanity URLs + * @property {boolean} keyValue - Whether site uses key-value pairs + * @property {DotCMSSiteStructure} [structure] - Optional site structure configuration + * @property {string} title - Title of the site + * @property {number} languageId - Language identifier + * @property {string} indexPolicyDependencies - Index policy for dependencies + * @property {string} contentTypeId - Content type identifier + * @property {string} versionId - Version identifier + * @property {number} lastReview - Last review timestamp + * @property {any} [nextReview] - Optional next review date + * @property {any} [reviewInterval] - Optional review interval + * @property {number} sortOrder - Sort order position + * @property {DotCMSSiteContentType} contentType - Content type configuration + */ interface DotCMSSite { lowIndexPriority: boolean; name: string; @@ -451,6 +781,15 @@ interface DotCMSSite { contentType: DotCMSSiteContentType; } +/** + * Represents a content type configuration for a DotCMS site + * + * @interface DotCMSSiteContentType + * @property {any} [owner] - Optional owner of the content type + * @property {DotCMSSiteParentPermissionable} parentPermissionable - Parent permission configuration + * @property {string} permissionId - Permission identifier + * @property {string} permissionType - Type of permission + */ interface DotCMSSiteContentType { owner?: any; parentPermissionable: DotCMSSiteParentPermissionable; @@ -458,6 +797,23 @@ interface DotCMSSiteContentType { permissionType: string; } +/** + * Represents parent permissionable configuration for a DotCMS site + * + * @interface DotCMSSiteParentPermissionable + * @property {string} Inode - The inode identifier (legacy casing) + * @property {string} Identifier - The identifier (legacy casing) + * @property {boolean} permissionByIdentifier - Whether permissions are managed by identifier + * @property {string} type - The type of the permissionable + * @property {any} [owner] - Optional owner of the permissionable + * @property {string} identifier - The identifier (modern casing) + * @property {string} permissionId - Permission identifier + * @property {any} [parentPermissionable] - Optional parent permissionable reference + * @property {string} permissionType - Type of permission + * @property {string} inode - The inode identifier (modern casing) + * @property {any} [childrenPermissionable] - Optional children permissionable references + * @property {string} [variantId] - Optional variant identifier + */ export interface DotCMSSiteParentPermissionable { Inode: string; Identifier: string; @@ -473,6 +829,55 @@ export interface DotCMSSiteParentPermissionable { variantId?: string; } +/** + * Represents a content structure/type definition in DotCMS + * + * @interface DotCMSSiteStructure + * @property {number} iDate - Initial creation date timestamp + * @property {string} type - Type of the structure + * @property {any} [owner] - Optional owner of the structure + * @property {string} inode - Unique inode identifier + * @property {string} identifier - Unique identifier + * @property {string} name - Name of the structure + * @property {string} description - Description of the structure + * @property {boolean} defaultStructure - Whether this is a default structure + * @property {any} [reviewInterval] - Optional review interval configuration + * @property {any} [reviewerRole] - Optional reviewer role configuration + * @property {any} [pagedetail] - Optional page detail configuration + * @property {number} structureType - Type identifier for the structure + * @property {boolean} fixed - Whether structure is fixed/immutable + * @property {boolean} system - Whether this is a system structure + * @property {string} velocityVarName - Velocity variable name + * @property {any} [urlMapPattern] - Optional URL mapping pattern + * @property {string} host - Host identifier + * @property {string} folder - Folder path + * @property {string} publishDate - Publication date + * @property {any} [publishDateVar] - Optional publish date variable + * @property {any} [expireDateVar] - Optional expiration date variable + * @property {number} modDate - Last modification date timestamp + * @property {DotCMSSiteField[]} fields - Array of field definitions + * @property {boolean} widget - Whether structure is a widget + * @property {any} [detailPage] - Optional detail page configuration + * @property {DotCMSSiteField[]} fieldsBySortOrder - Fields sorted by order + * @property {boolean} form - Whether structure is a form + * @property {boolean} htmlpageAsset - Whether structure is an HTML page asset + * @property {boolean} content - Whether structure is content + * @property {boolean} fileAsset - Whether structure is a file asset + * @property {boolean} persona - Whether structure is a persona + * @property {string} permissionId - Permission identifier + * @property {string} permissionType - Type of permission + * @property {boolean} live - Whether structure is live + * @property {string} categoryId - Category identifier + * @property {number} idate - Creation date timestamp + * @property {boolean} new - Whether structure is new + * @property {boolean} archived - Whether structure is archived + * @property {boolean} locked - Whether structure is locked + * @property {string} modUser - User who last modified + * @property {boolean} working - Whether structure is in working state + * @property {string} title - Title of the structure + * @property {string} versionId - Version identifier + * @property {string} versionType - Type of version + */ interface DotCMSSiteStructure { iDate: number; type: string; @@ -520,6 +925,50 @@ interface DotCMSSiteStructure { versionType: string; } +/** + * Represents a field in a DotCMS site structure/content type + * + * @interface DotCMSSiteField + * @property {number} iDate - Initial creation date timestamp + * @property {string} type - Type of the field + * @property {any} [owner] - Owner of the field + * @property {string} inode - Unique inode identifier + * @property {string} identifier - Unique identifier + * @property {string} structureInode - Inode of the parent structure/content type + * @property {string} fieldName - Name of the field + * @property {string} fieldType - Type of field (text, textarea, etc) + * @property {any} [fieldRelationType] - Type of relationship if field is relational + * @property {string} fieldContentlet - Contentlet field mapping + * @property {boolean} required - Whether field is required + * @property {string} velocityVarName - Velocity variable name + * @property {number} sortOrder - Sort order position + * @property {any} [values] - Possible field values + * @property {any} [regexCheck] - Regular expression validation + * @property {any} [hint] - Help text/hint + * @property {any} [defaultValue] - Default value + * @property {boolean} indexed - Whether field is indexed + * @property {boolean} listed - Whether field appears in listings + * @property {boolean} fixed - Whether field is fixed/immutable + * @property {boolean} readOnly - Whether field is read-only + * @property {boolean} searchable - Whether field is searchable + * @property {boolean} unique - Whether field must be unique + * @property {number} modDate - Last modification date timestamp + * @property {string} dataType - Data type of the field + * @property {boolean} live - Whether field is live + * @property {string} categoryId - Category identifier + * @property {number} idate - Creation date timestamp + * @property {boolean} new - Whether field is new + * @property {boolean} archived - Whether field is archived + * @property {boolean} locked - Whether field is locked + * @property {string} modUser - User who last modified + * @property {boolean} working - Whether field is in working state + * @property {string} permissionId - Permission identifier + * @property {any} [parentPermissionable] - Parent permission configuration + * @property {string} permissionType - Type of permission + * @property {string} title - Title of the field + * @property {string} versionId - Version identifier + * @property {string} versionType - Type of version + */ interface DotCMSSiteField { iDate: number; type: string; @@ -565,7 +1014,57 @@ interface DotCMSSiteField { /* GraphQL Page Types */ /** - * Represents a basic page structure returned from GraphQL queries + * Represents a basic page object returned from GraphQL queries + * + * @interface DotCMSBasicGraphQLPage + * @property {string} publishDate - The date the page was published + * @property {string} type - The type of the page + * @property {boolean} httpsRequired - Whether HTTPS is required to access the page + * @property {string} inode - Unique inode identifier + * @property {string} path - The path/URL of the page + * @property {string} identifier - Unique identifier for the page + * @property {boolean} hasTitleImage - Whether the page has a title image + * @property {number} sortOrder - Sort order position + * @property {string} extension - File extension + * @property {boolean} canRead - Whether current user can read the page + * @property {string} pageURI - URI of the page + * @property {boolean} canEdit - Whether current user can edit the page + * @property {boolean} archived - Whether page is archived + * @property {string} friendlyName - User-friendly name + * @property {string} workingInode - Working version inode + * @property {string} url - URL of the page + * @property {boolean} hasLiveVersion - Whether page has a live version + * @property {boolean} deleted - Whether page is deleted + * @property {string} pageUrl - URL of the page + * @property {string} shortyWorking - Short identifier for working version + * @property {string} mimeType - MIME type of the page + * @property {boolean} locked - Whether page is locked + * @property {string} stInode - Structure inode + * @property {string} contentType - Content type + * @property {string} creationDate - Date page was created + * @property {string} liveInode - Live version inode + * @property {string} name - Name of the page + * @property {string} shortyLive - Short identifier for live version + * @property {string} modDate - Last modification date + * @property {string} title - Title of the page + * @property {string} baseType - Base content type + * @property {boolean} working - Whether page is in working state + * @property {boolean} canLock - Whether current user can lock the page + * @property {boolean} live - Whether page is live + * @property {boolean} isContentlet - Whether page is a contentlet + * @property {string} statusIcons - Status icons + * @property {Object} conLanguage - Language information + * @property {number} conLanguage.id - Language ID + * @property {string} conLanguage.language - Language name + * @property {string} conLanguage.languageCode - Language code + * @property {Object} template - Template information + * @property {boolean} template.drawed - Whether template is drawn + * @property {DotCMSPageGraphQLContainer[]} containers - Array of containers on the page + * @property {DotCMSLayout} layout - Layout configuration + * @property {DotCMSViewAs} viewAs - View configuration + * @property {Record} urlContentMap - URL to content mapping + * @property {DotCMSSite} site - Site information + * @property {Record} _map - Additional mapping data */ export interface DotCMSBasicGraphQLPage { publishDate: string; @@ -627,6 +1126,16 @@ export interface DotCMSBasicGraphQLPage { _map: Record; } +/** + * Represents a container in a GraphQL page response + * + * @interface DotCMSPageGraphQLContainer + * @property {string} path - The path/location of the container in the page + * @property {string} identifier - Unique identifier for the container + * @property {number} [maxContentlets] - Optional maximum number of content items allowed in container + * @property {DotCMSContainerStructure[]} containerStructures - Array of content type structures allowed in container + * @property {DotCMSPageContainerContentlets[]} containerContentlets - Array of content items in container + */ export interface DotCMSPageGraphQLContainer { path: string; identifier: string; diff --git a/core-web/libs/sdk/uve/package.json b/core-web/libs/sdk/uve/package.json index 94232f28f557..045594649a27 100644 --- a/core-web/libs/sdk/uve/package.json +++ b/core-web/libs/sdk/uve/package.json @@ -6,8 +6,8 @@ "type": "git", "url": "git+https://github.com/dotCMS/core.git#main" }, - "dependencies": { - "@dotcms/types": "0.0.1" + "devDependencies": { + "@dotcms/types": "next" }, "keywords": [ "dotCMS", From 840b9e125533c6d64873afc8cd0181854cb8b079 Mon Sep 17 00:00:00 2001 From: Kevin Davila <56242609+kevindaviladev@users.noreply.github.com> Date: Wed, 30 Apr 2025 15:55:58 -0500 Subject: [PATCH 14/15] Removed reference to new types library from angular component --- .../dot-editable-text/dot-editable-text.component.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core-web/libs/sdk/angular/src/lib/deprecated/components/dot-editable-text/dot-editable-text.component.ts b/core-web/libs/sdk/angular/src/lib/deprecated/components/dot-editable-text/dot-editable-text.component.ts index 300560369f0c..f4155b870322 100644 --- a/core-web/libs/sdk/angular/src/lib/deprecated/components/dot-editable-text/dot-editable-text.component.ts +++ b/core-web/libs/sdk/angular/src/lib/deprecated/components/dot-editable-text/dot-editable-text.component.ts @@ -22,10 +22,12 @@ import { NOTIFY_CLIENT, postMessageToEditor } from '@dotcms/client'; -import { DotCMSBasicContentlet } from '@dotcms/types'; + import { TINYMCE_CONFIG, DOT_EDITABLE_TEXT_FORMAT, DOT_EDITABLE_TEXT_MODE } from './utils'; +import { DotCMSContentlet } from '../../models'; + /** * @deprecated This component is deprecated and will be removed in future versions. * Please use the new Rich Text Editor component from the main SDK. @@ -83,7 +85,7 @@ export class DotEditableTextComponent implements OnInit, OnChanges { * @type {DotCMSContentlet} * @memberof DotEditableTextComponent */ - @Input() contentlet!: DotCMSBasicContentlet; + @Input() contentlet!: DotCMSContentlet; /** * Represents the content of the `contentlet` that can be edited From aa09d8e2f48ec412d8215fb8621ae00fab45b610 Mon Sep 17 00:00:00 2001 From: Kevin Davila <56242609+kevindaviladev@users.noreply.github.com> Date: Wed, 30 Apr 2025 15:56:17 -0500 Subject: [PATCH 15/15] Fix lint issue --- .../components/dot-editable-text/dot-editable-text.component.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/core-web/libs/sdk/angular/src/lib/deprecated/components/dot-editable-text/dot-editable-text.component.ts b/core-web/libs/sdk/angular/src/lib/deprecated/components/dot-editable-text/dot-editable-text.component.ts index f4155b870322..16244c08647c 100644 --- a/core-web/libs/sdk/angular/src/lib/deprecated/components/dot-editable-text/dot-editable-text.component.ts +++ b/core-web/libs/sdk/angular/src/lib/deprecated/components/dot-editable-text/dot-editable-text.component.ts @@ -23,7 +23,6 @@ import { postMessageToEditor } from '@dotcms/client'; - import { TINYMCE_CONFIG, DOT_EDITABLE_TEXT_FORMAT, DOT_EDITABLE_TEXT_MODE } from './utils'; import { DotCMSContentlet } from '../../models';