@payloadcms/richtext-lexical 3.0.0-beta.55 → 3.0.0-beta.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/exports/client/bundled.css +1 -1
- package/dist/exports/client/chunk-OAQL5GDK.js +2 -0
- package/dist/exports/client/chunk-OAQL5GDK.js.map +7 -0
- package/dist/exports/client/component-V5QZ7EVZ.js +2 -0
- package/dist/exports/client/component-V5QZ7EVZ.js.map +7 -0
- package/dist/exports/client/{component-PEFMKIXI.js → component-YNZTTMBY.js} +2 -2
- package/dist/exports/client/component-YNZTTMBY.js.map +7 -0
- package/dist/exports/client/index.d.ts +1 -0
- package/dist/exports/client/index.d.ts.map +1 -1
- package/dist/exports/client/index.js +7 -7
- package/dist/exports/client/index.js.map +4 -4
- package/dist/features/blocks/component/index.js +1 -1
- package/dist/features/blocks/component/index.js.map +1 -1
- package/dist/features/blocks/feature.server.d.ts.map +1 -1
- package/dist/features/blocks/feature.server.js +1 -11
- package/dist/features/blocks/feature.server.js.map +1 -1
- package/dist/features/heading/feature.server.d.ts +5 -1
- package/dist/features/heading/feature.server.d.ts.map +1 -1
- package/dist/features/heading/feature.server.js.map +1 -1
- package/dist/features/link/feature.server.d.ts.map +1 -1
- package/dist/features/link/feature.server.js +1 -11
- package/dist/features/link/feature.server.js.map +1 -1
- package/dist/features/link/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -1
- package/dist/features/link/plugins/floatingLinkEditor/LinkEditor/index.js +9 -5
- package/dist/features/link/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.d.ts.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.d.ts.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js.map +1 -1
- package/dist/features/upload/component/index.d.ts.map +1 -1
- package/dist/features/upload/component/index.js +34 -11
- package/dist/features/upload/component/index.js.map +1 -1
- package/dist/features/upload/feature.server.d.ts.map +1 -1
- package/dist/features/upload/feature.server.js +1 -11
- package/dist/features/upload/feature.server.js.map +1 -1
- package/dist/field/index.js +8 -8
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/nodeTypes.d.ts +11 -7
- package/dist/nodeTypes.d.ts.map +1 -1
- package/dist/nodeTypes.js.map +1 -1
- package/dist/utilities/fieldsDrawer/Drawer.d.ts +18 -0
- package/dist/utilities/fieldsDrawer/Drawer.d.ts.map +1 -0
- package/dist/utilities/fieldsDrawer/Drawer.js +26 -0
- package/dist/utilities/fieldsDrawer/Drawer.js.map +1 -0
- package/dist/utilities/fieldsDrawer/DrawerContent.d.ts +4 -0
- package/dist/utilities/fieldsDrawer/DrawerContent.d.ts.map +1 -0
- package/dist/{features/link/drawer/index.js → utilities/fieldsDrawer/DrawerContent.js} +38 -40
- package/dist/utilities/fieldsDrawer/DrawerContent.js.map +1 -0
- package/dist/utilities/generateSchemaMap.d.ts.map +1 -1
- package/dist/utilities/generateSchemaMap.js +9 -0
- package/dist/utilities/generateSchemaMap.js.map +1 -1
- package/dist/utilities/migrateSlateToLexical/index.js +2 -2
- package/dist/utilities/migrateSlateToLexical/index.js.map +1 -1
- package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.d.ts +9 -0
- package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.d.ts.map +1 -0
- package/dist/utilities/migrateSlateToLexical/{recurse.js → migrateDocumentFieldsRecursively.js} +7 -7
- package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js.map +1 -0
- package/dist/utilities/upgradeLexicalData/index.d.ts +11 -0
- package/dist/utilities/upgradeLexicalData/index.d.ts.map +1 -0
- package/dist/utilities/upgradeLexicalData/index.js +101 -0
- package/dist/utilities/upgradeLexicalData/index.js.map +1 -0
- package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.d.ts +9 -0
- package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.d.ts.map +1 -0
- package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js +74 -0
- package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js.map +1 -0
- package/package.json +9 -9
- package/dist/exports/client/chunk-5RJS5YZT.js +0 -2
- package/dist/exports/client/chunk-5RJS5YZT.js.map +0 -7
- package/dist/exports/client/component-F6V63OLD.js +0 -2
- package/dist/exports/client/component-F6V63OLD.js.map +0 -7
- package/dist/exports/client/component-PEFMKIXI.js.map +0 -7
- package/dist/features/link/drawer/index.d.ts +0 -5
- package/dist/features/link/drawer/index.d.ts.map +0 -1
- package/dist/features/link/drawer/index.js.map +0 -1
- package/dist/features/link/drawer/types.d.ts +0 -10
- package/dist/features/link/drawer/types.d.ts.map +0 -1
- package/dist/features/link/drawer/types.js +0 -3
- package/dist/features/link/drawer/types.js.map +0 -1
- package/dist/features/upload/component/ExtraFieldsDrawer/index.d.ts +0 -12
- package/dist/features/upload/component/ExtraFieldsDrawer/index.d.ts.map +0 -1
- package/dist/features/upload/component/ExtraFieldsDrawer/index.js +0 -123
- package/dist/features/upload/component/ExtraFieldsDrawer/index.js.map +0 -1
- package/dist/utilities/migrateSlateToLexical/recurse.d.ts +0 -9
- package/dist/utilities/migrateSlateToLexical/recurse.d.ts.map +0 -1
- package/dist/utilities/migrateSlateToLexical/recurse.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -72,5 +72,7 @@ export { defaultRichTextValue } from './populateGraphQL/defaultValue.js';
|
|
|
72
72
|
export type { LexicalEditorProps, LexicalRichTextAdapter } from './types.js';
|
|
73
73
|
export { createServerFeature } from './utilities/createServerFeature.js';
|
|
74
74
|
export { migrateSlateToLexical } from './utilities/migrateSlateToLexical/index.js';
|
|
75
|
+
export { upgradeLexicalData } from './utilities/upgradeLexicalData/index.js';
|
|
75
76
|
export * from './nodeTypes.js';
|
|
77
|
+
export type { FieldsDrawerProps } from './utilities/fieldsDrawer/Drawer.js';
|
|
76
78
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EACV,YAAY,EACZ,kBAAkB,EAElB,8BAA8B,EAC/B,MAAM,YAAY,CAAA;AAuBnB,wBAAgB,aAAa,CAAC,KAAK,CAAC,EAAE,kBAAkB,GAAG,8BAA8B,CAuvBxF;AAED,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAA;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAA;AAC3E,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,qCAAqC,CAAA;AAC5F,OAAO,EAAE,KAAK,WAAW,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAA;AAEnF,OAAO,EAAE,sBAAsB,EAAE,MAAM,8DAA8D,CAAA;AACrG,OAAO,EAAE,sBAAsB,EAAE,MAAM,8DAA8D,CAAA;AACrG,OAAO,EAAE,iBAAiB,EAAE,MAAM,yDAAyD,CAAA;AAE3F,OAAO,EAAE,qBAAqB,EAAE,MAAM,2DAA2D,CAAA;AACjG,OAAO,EACL,yBAAyB,EACzB,oBAAoB,GACrB,MAAM,+CAA+C,CAAA;AACtD,YAAY,EAAE,aAAa,EAAE,MAAM,+CAA+C,CAAA;AAClF,OAAO,EACL,oBAAoB,EACpB,KAAK,yBAAyB,GAC/B,MAAM,8CAA8C,CAAA;AACrD,OAAO,EAAE,yBAAyB,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAA;AAClG,OAAO,EAAE,mBAAmB,EAAE,MAAM,iDAAiD,CAAA;AACrF,OAAO,EAAE,eAAe,EAAE,MAAM,6CA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EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAA;AAE5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAA;AACxE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAA;AAClF,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAA;AAE5E,cAAc,gBAAgB,CAAA;AAE9B,YAAY,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -687,6 +687,7 @@ export { sanitizeUrl, validateUrl } from './lexical/utils/url.js';
|
|
|
687
687
|
export { defaultRichTextValue } from './populateGraphQL/defaultValue.js';
|
|
688
688
|
export { createServerFeature } from './utilities/createServerFeature.js';
|
|
689
689
|
export { migrateSlateToLexical } from './utilities/migrateSlateToLexical/index.js';
|
|
690
|
+
export { upgradeLexicalData } from './utilities/upgradeLexicalData/index.js';
|
|
690
691
|
export * from './nodeTypes.js';
|
|
691
692
|
|
|
692
693
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import type { JSONSchema4 } from 'json-schema'\nimport type {\n EditorConfig as LexicalEditorConfig,\n SerializedEditorState,\n SerializedLexicalNode,\n} from 'lexical'\n\nimport { withMergedProps } from '@payloadcms/ui/shared'\nimport { fileURLToPath } from 'node:url'\nimport path from 'path'\nimport {\n afterChangeTraverseFields,\n afterReadTraverseFields,\n beforeChangeTraverseFields,\n beforeValidateTraverseFields,\n getDependencies,\n withNullableJSONSchemaType,\n} from 'payload'\n\nimport type { FeatureProviderServer, ResolvedServerFeatureMap } from './features/typesServer.js'\nimport type { SanitizedServerEditorConfig } from './lexical/config/types.js'\nimport type {\n AdapterProps,\n LexicalEditorProps,\n LexicalRichTextAdapter,\n LexicalRichTextAdapterProvider,\n} from './types.js'\n\n// eslint-disable-next-line payload/no-imports-from-exports-dir\nimport { RichTextCell, RichTextField } from './exports/client/index.js'\nimport { i18n } from './i18n.js'\nimport { defaultEditorConfig, defaultEditorFeatures } from './lexical/config/server/default.js'\nimport { loadFeatures } from './lexical/config/server/loader.js'\nimport {\n sanitizeServerEditorConfig,\n sanitizeServerFeatures,\n} from './lexical/config/server/sanitize.js'\nimport { cloneDeep } from './lexical/utils/cloneDeep.js'\nimport { populateLexicalPopulationPromises } from './populateGraphQL/populateLexicalPopulationPromises.js'\nimport { getGenerateComponentMap } from './utilities/generateComponentMap.js'\nimport { getGenerateSchemaMap } from './utilities/generateSchemaMap.js'\nimport { recurseNodeTree } from './utilities/recurseNodeTree.js'\nimport { richTextValidateHOC } from './validate/index.js'\n\nlet defaultSanitizedServerEditorConfig: SanitizedServerEditorConfig = null\n\nconst filename = fileURLToPath(import.meta.url)\nconst dirname = path.dirname(filename)\n\nexport function lexicalEditor(props?: LexicalEditorProps): LexicalRichTextAdapterProvider {\n return async ({ config, isRoot }) => {\n if (process.env.NODE_ENV !== 'production') {\n const resolvedDependencies = await getDependencies(dirname, [\n 'lexical',\n '@lexical/headless',\n '@lexical/link',\n '@lexical/list',\n '@lexical/mark',\n '@lexical/markdown',\n '@lexical/react',\n '@lexical/rich-text',\n '@lexical/selection',\n '@lexical/utils',\n ])\n\n // Go through each resolved dependency. If any dependency has a mismatching version, throw an error\n const foundVersions: {\n [version: string]: string\n } = {}\n for (const [_pkg, { version }] of resolvedDependencies.resolved) {\n if (!Object.keys(foundVersions).includes(version)) {\n foundVersions[version] = _pkg\n }\n }\n if (Object.keys(foundVersions).length > 1) {\n const formattedVersionsWithPackageNameString = Object.entries(foundVersions)\n .map(([version, pkg]) => `${pkg}@${version}`)\n .join(', ')\n\n throw new Error(\n `Mismatching lexical dependency versions found: ${formattedVersionsWithPackageNameString}. All lexical and @lexical/* packages must have the same version. This is an error with your set-up, caused by you, not a bug in payload. Please go to your package.json and ensure all lexical and @lexical/* packages have the same version.`,\n )\n }\n }\n\n let features: FeatureProviderServer<any, any, any>[] = []\n let resolvedFeatureMap: ResolvedServerFeatureMap\n\n let finalSanitizedEditorConfig: SanitizedServerEditorConfig // For server only\n if (!props || (!props.features && !props.lexical)) {\n if (!defaultSanitizedServerEditorConfig) {\n defaultSanitizedServerEditorConfig = await sanitizeServerEditorConfig(\n defaultEditorConfig,\n config,\n )\n features = cloneDeep(defaultEditorFeatures)\n }\n\n finalSanitizedEditorConfig = cloneDeep(defaultSanitizedServerEditorConfig)\n\n resolvedFeatureMap = finalSanitizedEditorConfig.resolvedFeatureMap\n } else {\n const rootEditor = config.editor\n let rootEditorFeatures: FeatureProviderServer<unknown, unknown, unknown>[] = []\n if (typeof rootEditor === 'object' && 'features' in rootEditor) {\n rootEditorFeatures = (rootEditor as LexicalRichTextAdapter).features\n }\n\n features =\n props.features && typeof props.features === 'function'\n ? props.features({\n defaultFeatures: cloneDeep(defaultEditorFeatures),\n rootFeatures: rootEditorFeatures,\n })\n : (props.features as FeatureProviderServer<unknown, unknown, unknown>[])\n if (!features) {\n features = cloneDeep(defaultEditorFeatures)\n }\n\n const lexical: LexicalEditorConfig = props.lexical\n\n resolvedFeatureMap = await loadFeatures({\n config,\n isRoot,\n unSanitizedEditorConfig: {\n features,\n lexical: lexical ? lexical : defaultEditorConfig.lexical,\n },\n })\n\n finalSanitizedEditorConfig = {\n features: sanitizeServerFeatures(resolvedFeatureMap),\n lexical: lexical ? lexical : defaultEditorConfig.lexical,\n resolvedFeatureMap,\n }\n }\n\n const featureI18n = finalSanitizedEditorConfig.features.i18n\n for (const lang in i18n) {\n if (!featureI18n[lang]) {\n featureI18n[lang] = {\n lexical: {},\n }\n }\n\n featureI18n[lang].lexical.general = i18n[lang]\n }\n\n return {\n CellComponent: withMergedProps({\n Component: RichTextCell,\n toMergeIntoProps: {\n admin: props?.admin,\n lexicalEditorConfig: finalSanitizedEditorConfig.lexical,\n },\n }),\n FieldComponent: withMergedProps({\n Component: RichTextField,\n toMergeIntoProps: {\n admin: props?.admin,\n lexicalEditorConfig: finalSanitizedEditorConfig.lexical,\n },\n }),\n editorConfig: finalSanitizedEditorConfig,\n features,\n generateComponentMap: getGenerateComponentMap({\n resolvedFeatureMap,\n }),\n generateSchemaMap: getGenerateSchemaMap({\n resolvedFeatureMap,\n }),\n graphQLPopulationPromises({\n context,\n currentDepth,\n depth,\n draft,\n field,\n fieldPromises,\n findMany,\n flattenLocales,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc,\n }) {\n // check if there are any features with nodes which have populationPromises for this field\n if (finalSanitizedEditorConfig?.features?.graphQLPopulationPromises?.size) {\n populateLexicalPopulationPromises({\n context,\n currentDepth: currentDepth ?? 0,\n depth,\n draft,\n editorPopulationPromises: finalSanitizedEditorConfig.features.graphQLPopulationPromises,\n field,\n fieldPromises,\n findMany,\n flattenLocales,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc,\n })\n }\n },\n hooks: {\n afterChange: [\n async ({\n collection,\n context: _context,\n global,\n operation,\n path,\n req,\n schemaPath,\n value,\n }) => {\n if (\n !finalSanitizedEditorConfig.features.hooks.afterChange.size &&\n !finalSanitizedEditorConfig.features.getSubFields.size\n ) {\n return value\n }\n const context: any = _context\n const nodeIDMap: {\n [key: string]: SerializedLexicalNode\n } = {}\n\n /**\n * Get the originalNodeIDMap from the beforeValidate hook, which is always run before this hook.\n */\n const originalNodeIDMap: {\n [key: string]: SerializedLexicalNode\n } = context?.internal?.richText?.[path.join('.')]?.originalNodeIDMap\n\n if (!originalNodeIDMap || !Object.keys(originalNodeIDMap).length || !value) {\n return value\n }\n\n recurseNodeTree({\n nodeIDMap,\n nodes: (value as SerializedEditorState)?.root?.children ?? [],\n })\n\n // eslint-disable-next-line prefer-const\n for (let [id, node] of Object.entries(nodeIDMap)) {\n const afterChangeHooks = finalSanitizedEditorConfig.features.hooks.afterChange\n if (afterChangeHooks?.has(node.type)) {\n for (const hook of afterChangeHooks.get(node.type)) {\n if (!originalNodeIDMap[id]) {\n console.warn(\n '(afterChange) No original node found for node with id',\n id,\n 'node:',\n node,\n 'path',\n path.join('.'),\n )\n continue\n }\n node = await hook({\n context,\n node,\n operation,\n originalNode: originalNodeIDMap[id],\n parentRichTextFieldPath: path,\n parentRichTextFieldSchemaPath: schemaPath,\n req,\n })\n }\n }\n const subFieldFn = finalSanitizedEditorConfig.features.getSubFields.get(node.type)\n const subFieldDataFn = finalSanitizedEditorConfig.features.getSubFieldsData.get(\n node.type,\n )\n\n if (subFieldFn) {\n const subFields = subFieldFn({ node, req })\n const data = subFieldDataFn({ node, req }) ?? {}\n const originalData = subFieldDataFn({ node: originalNodeIDMap[id], req }) ?? {}\n\n if (subFields?.length) {\n await afterChangeTraverseFields({\n collection,\n context,\n data: originalData,\n doc: data,\n fields: subFields,\n global,\n operation,\n path,\n previousDoc: data,\n previousSiblingDoc: { ...data },\n req,\n schemaPath,\n siblingData: originalData || {},\n siblingDoc: { ...data },\n })\n }\n }\n }\n return value\n },\n ],\n afterRead: [\n /**\n * afterRead hooks do not receive the originalNode. Thus, they can run on all nodes, not just nodes with an ID.\n */\n async ({\n collection,\n context: context,\n currentDepth,\n depth,\n draft,\n fallbackLocale,\n fieldPromises,\n findMany,\n flattenLocales,\n global,\n locale,\n overrideAccess,\n path,\n populationPromises,\n req,\n schemaPath,\n showHiddenFields,\n triggerAccessControl,\n triggerHooks,\n value,\n }) => {\n if (\n !finalSanitizedEditorConfig.features.hooks.afterRead.size &&\n !finalSanitizedEditorConfig.features.getSubFields.size\n ) {\n return value\n }\n const flattenedNodes: SerializedLexicalNode[] = []\n\n recurseNodeTree({\n flattenedNodes,\n nodes: (value as SerializedEditorState)?.root?.children ?? [],\n })\n\n for (let node of flattenedNodes) {\n const afterReadHooks = finalSanitizedEditorConfig.features.hooks.afterRead\n if (afterReadHooks?.has(node.type)) {\n for (const hook of afterReadHooks.get(node.type)) {\n node = await hook({\n context,\n currentDepth,\n depth,\n draft,\n fallbackLocale,\n fieldPromises,\n findMany,\n flattenLocales,\n locale,\n node,\n overrideAccess,\n parentRichTextFieldPath: path,\n parentRichTextFieldSchemaPath: schemaPath,\n populationPromises,\n req,\n showHiddenFields,\n triggerAccessControl,\n triggerHooks,\n })\n }\n }\n const subFieldFn = finalSanitizedEditorConfig.features.getSubFields.get(node.type)\n const subFieldDataFn = finalSanitizedEditorConfig.features.getSubFieldsData.get(\n node.type,\n )\n\n if (subFieldFn) {\n const subFields = subFieldFn({ node, req })\n const data = subFieldDataFn({ node, req }) ?? {}\n\n if (subFields?.length) {\n afterReadTraverseFields({\n collection,\n context,\n currentDepth,\n depth,\n doc: data,\n draft,\n fallbackLocale,\n fieldPromises,\n fields: subFields,\n findMany,\n flattenLocales,\n global,\n locale,\n overrideAccess,\n path,\n populationPromises,\n req,\n schemaPath,\n showHiddenFields,\n siblingDoc: data,\n triggerAccessControl,\n triggerHooks,\n })\n }\n }\n }\n\n return value\n },\n ],\n beforeChange: [\n async ({\n collection,\n context: _context,\n duplicate,\n errors,\n field,\n global,\n mergeLocaleActions,\n operation,\n path,\n req,\n schemaPath,\n siblingData,\n siblingDocWithLocales,\n skipValidation,\n value,\n }) => {\n if (\n !finalSanitizedEditorConfig.features.hooks.beforeChange.size &&\n !finalSanitizedEditorConfig.features.getSubFields.size\n ) {\n return value\n }\n\n const context: any = _context\n const nodeIDMap: {\n [key: string]: SerializedLexicalNode\n } = {}\n\n /**\n * Get the originalNodeIDMap from the beforeValidate hook, which is always run before this hook.\n */\n const originalNodeIDMap: {\n [key: string]: SerializedLexicalNode\n } = context?.internal?.richText?.[path.join('.')]?.originalNodeIDMap\n\n if (!originalNodeIDMap || !Object.keys(originalNodeIDMap).length || !value) {\n return value\n }\n\n const originalNodeWithLocalesIDMap: {\n [key: string]: SerializedLexicalNode\n } = {}\n\n recurseNodeTree({\n nodeIDMap,\n nodes: (value as SerializedEditorState)?.root?.children ?? [],\n })\n\n if (siblingDocWithLocales?.[field.name]) {\n recurseNodeTree({\n nodeIDMap: originalNodeWithLocalesIDMap,\n nodes:\n (siblingDocWithLocales[field.name] as SerializedEditorState)?.root?.children ??\n [],\n })\n }\n\n // eslint-disable-next-line prefer-const\n for (let [id, node] of Object.entries(nodeIDMap)) {\n const beforeChangeHooks = finalSanitizedEditorConfig.features.hooks.beforeChange\n if (beforeChangeHooks?.has(node.type)) {\n for (const hook of beforeChangeHooks.get(node.type)) {\n if (!originalNodeIDMap[id]) {\n console.warn(\n '(beforeChange) No original node found for node with id',\n id,\n 'node:',\n node,\n 'path',\n path.join('.'),\n )\n continue\n }\n node = await hook({\n context,\n duplicate,\n errors,\n mergeLocaleActions,\n node,\n operation,\n originalNode: originalNodeIDMap[id],\n originalNodeWithLocales: originalNodeWithLocalesIDMap[id],\n parentRichTextFieldPath: path,\n parentRichTextFieldSchemaPath: schemaPath,\n req,\n skipValidation,\n })\n }\n }\n\n const subFieldFn = finalSanitizedEditorConfig.features.getSubFields.get(node.type)\n const subFieldDataFn = finalSanitizedEditorConfig.features.getSubFieldsData.get(\n node.type,\n )\n\n if (subFieldFn) {\n const subFields = subFieldFn({ node, req })\n const data = subFieldDataFn({ node, req }) ?? {}\n const originalData = subFieldDataFn({ node: originalNodeIDMap[id], req }) ?? {}\n const originalDataWithLocales =\n subFieldDataFn({\n node: originalNodeWithLocalesIDMap[id],\n req,\n }) ?? {}\n\n if (subFields?.length) {\n await beforeChangeTraverseFields({\n id,\n collection,\n context,\n data,\n doc: originalData,\n docWithLocales: originalDataWithLocales ?? {},\n duplicate,\n errors,\n fields: subFields,\n global,\n mergeLocaleActions,\n operation,\n path,\n req,\n schemaPath,\n siblingData: data,\n siblingDoc: originalData,\n siblingDocWithLocales: originalDataWithLocales ?? {},\n skipValidation,\n })\n }\n }\n }\n\n /**\n * within the beforeChange hook, id's may be re-generated.\n * Example:\n * 1. Seed data contains IDs for block feature blocks.\n * 2. Those are used in beforeValidate\n * 3. in beforeChange, those IDs are regenerated, because you cannot provide IDs during document creation. See baseIDField beforeChange hook for reasoning\n * 4. Thus, in order for all post-beforeChange hooks to receive the correct ID, we need to update the originalNodeIDMap with the new ID's, by regenerating the nodeIDMap.\n * The reason this is not generated for every hook, is to save on performance. We know we only really have to generate it in beforeValidate, which is the first hook,\n * and in beforeChange, which is where modifications to the provided IDs can occur.\n */\n const newOriginalNodeIDMap: {\n [key: string]: SerializedLexicalNode\n } = {}\n\n const previousValue = siblingData[field.name]\n\n recurseNodeTree({\n nodeIDMap: newOriginalNodeIDMap,\n nodes: (previousValue as SerializedEditorState)?.root?.children ?? [],\n })\n\n if (!context.internal) {\n // Add to context, for other hooks to use\n context.internal = {}\n }\n if (!context.internal.richText) {\n context.internal.richText = {}\n }\n context.internal.richText[path.join('.')] = {\n originalNodeIDMap: newOriginalNodeIDMap,\n }\n\n return value\n },\n ],\n beforeValidate: [\n async ({\n collection,\n context,\n global,\n operation,\n overrideAccess,\n path,\n previousValue,\n req,\n schemaPath,\n value,\n }) => {\n // return value if there are NO hooks\n if (\n !finalSanitizedEditorConfig.features.hooks.beforeValidate.size &&\n !finalSanitizedEditorConfig.features.hooks.afterChange.size &&\n !finalSanitizedEditorConfig.features.hooks.beforeChange.size &&\n !finalSanitizedEditorConfig.features.getSubFields.size\n ) {\n return value\n }\n\n /**\n * beforeValidate is the first field hook which runs. This is where we can create the node map, which can then be used in the other hooks.\n *\n */\n\n /**\n * flattenedNodes contains all nodes in the editor, in the order they appear in the editor. They will be used for the following hooks:\n * - afterRead\n *\n * The other hooks require nodes to have IDs, which is why those are ran only from the nodeIDMap. They require IDs because they have both doc/siblingDoc and data/siblingData, and\n * thus require a reliable way to match new node data to old node data. Given that node positions can change in between hooks, this is only reliably possible for nodes which are saved with\n * an ID.\n */\n //const flattenedNodes: SerializedLexicalNode[] = []\n\n /**\n * Only nodes with id's (so, nodes with hooks added to them) will be added to the nodeIDMap. They will be used for the following hooks:\n * - afterChange\n * - beforeChange\n * - beforeValidate\n * - beforeDuplicate\n *\n * Other hooks are handled by the flattenedNodes. All nodes in the nodeIDMap are part of flattenedNodes.\n */\n\n const originalNodeIDMap: {\n [key: string]: SerializedLexicalNode\n } = {}\n\n recurseNodeTree({\n nodeIDMap: originalNodeIDMap,\n nodes: (previousValue as SerializedEditorState)?.root?.children ?? [],\n })\n\n if (!context.internal) {\n // Add to context, for other hooks to use\n context.internal = {}\n }\n if (!(context as any).internal.richText) {\n ;(context as any).internal.richText = {}\n }\n ;(context as any).internal.richText[path.join('.')] = {\n originalNodeIDMap,\n }\n\n /**\n * Now that the maps for all hooks are set up, we can run the validate hook\n */\n if (!finalSanitizedEditorConfig.features.hooks.beforeValidate.size) {\n return value\n }\n const nodeIDMap: {\n [key: string]: SerializedLexicalNode\n } = {}\n recurseNodeTree({\n //flattenedNodes,\n nodeIDMap,\n nodes: (value as SerializedEditorState)?.root?.children ?? [],\n })\n\n // eslint-disable-next-line prefer-const\n for (let [id, node] of Object.entries(nodeIDMap)) {\n const beforeValidateHooks = finalSanitizedEditorConfig.features.hooks.beforeValidate\n if (beforeValidateHooks?.has(node.type)) {\n for (const hook of beforeValidateHooks.get(node.type)) {\n if (!originalNodeIDMap[id]) {\n console.warn(\n '(beforeValidate) No original node found for node with id',\n id,\n 'node:',\n node,\n 'path',\n path.join('.'),\n )\n continue\n }\n node = await hook({\n context,\n node,\n operation,\n originalNode: originalNodeIDMap[id],\n overrideAccess,\n parentRichTextFieldPath: path,\n parentRichTextFieldSchemaPath: schemaPath,\n req,\n })\n }\n }\n const subFieldFn = finalSanitizedEditorConfig.features.getSubFields.get(node.type)\n const subFieldDataFn = finalSanitizedEditorConfig.features.getSubFieldsData.get(\n node.type,\n )\n\n if (subFieldFn) {\n const subFields = subFieldFn({ node, req })\n const data = subFieldDataFn({ node, req }) ?? {}\n const originalData = subFieldDataFn({ node: originalNodeIDMap[id], req }) ?? {}\n\n if (subFields?.length) {\n await beforeValidateTraverseFields({\n id,\n collection,\n context,\n data,\n doc: originalData,\n fields: subFields,\n global,\n operation,\n overrideAccess,\n path,\n req,\n schemaPath,\n siblingData: data,\n siblingDoc: originalData,\n })\n }\n }\n }\n\n return value\n },\n ],\n },\n i18n: featureI18n,\n outputSchema: ({\n collectionIDFieldTypes,\n config,\n field,\n interfaceNameDefinitions,\n isRequired,\n }) => {\n let outputSchema: JSONSchema4 = {\n // This schema matches the SerializedEditorState type so far, that it's possible to cast SerializedEditorState to this schema without any errors.\n // In the future, we should\n // 1) allow recursive children\n // 2) Pass in all the different types for every node added to the editorconfig. This can be done with refs in the schema.\n type: withNullableJSONSchemaType('object', isRequired),\n properties: {\n root: {\n type: 'object',\n additionalProperties: false,\n properties: {\n type: {\n type: 'string',\n },\n children: {\n type: 'array',\n items: {\n type: 'object',\n additionalProperties: true,\n properties: {\n type: {\n type: 'string',\n },\n version: {\n type: 'integer',\n },\n },\n required: ['type', 'version'],\n },\n },\n direction: {\n oneOf: [\n {\n enum: ['ltr', 'rtl'],\n },\n {\n type: 'null',\n },\n ],\n },\n format: {\n type: 'string',\n enum: ['left', 'start', 'center', 'right', 'end', 'justify', ''], // ElementFormatType, since the root node is an element\n },\n indent: {\n type: 'integer',\n },\n version: {\n type: 'integer',\n },\n },\n required: ['children', 'direction', 'format', 'indent', 'type', 'version'],\n },\n },\n required: ['root'],\n }\n for (const modifyOutputSchema of finalSanitizedEditorConfig.features.generatedTypes\n .modifyOutputSchemas) {\n outputSchema = modifyOutputSchema({\n collectionIDFieldTypes,\n config,\n currentSchema: outputSchema,\n field,\n interfaceNameDefinitions,\n isRequired,\n })\n }\n\n return outputSchema\n },\n validate: richTextValidateHOC({\n editorConfig: finalSanitizedEditorConfig,\n }),\n }\n }\n}\n\nexport { AlignFeature } from './features/align/feature.server.js'\nexport { BlockquoteFeature } from './features/blockquote/feature.server.js'\nexport { BlocksFeature, type BlocksFeatureProps } from './features/blocks/feature.server.js'\nexport { type BlockFields, BlockNode } from './features/blocks/nodes/BlocksNode.js'\n\nexport { LinebreakHTMLConverter } from './features/converters/html/converter/converters/linebreak.js'\nexport { ParagraphHTMLConverter } from './features/converters/html/converter/converters/paragraph.js'\nexport { TextHTMLConverter } from './features/converters/html/converter/converters/text.js'\n\nexport { defaultHTMLConverters } from './features/converters/html/converter/defaultConverters.js'\nexport {\n convertLexicalNodesToHTML,\n convertLexicalToHTML,\n} from './features/converters/html/converter/index.js'\nexport type { HTMLConverter } from './features/converters/html/converter/types.js'\nexport {\n HTMLConverterFeature,\n type HTMLConverterFeatureProps,\n} from './features/converters/html/feature.server.js'\nexport { consolidateHTMLConverters, lexicalHTML } from './features/converters/html/field/index.js'\nexport { TestRecorderFeature } from './features/debug/testRecorder/feature.server.js'\nexport { TreeViewFeature } from './features/debug/treeView/feature.server.js'\nexport { BoldFeature } from './features/format/bold/feature.server.js'\nexport { InlineCodeFeature } from './features/format/inlineCode/feature.server.js'\n\nexport { ItalicFeature } from './features/format/italic/feature.server.js'\nexport { StrikethroughFeature } from './features/format/strikethrough/feature.server.js'\nexport { SubscriptFeature } from './features/format/subscript/feature.server.js'\nexport { SuperscriptFeature } from './features/format/superscript/feature.server.js'\nexport { UnderlineFeature } from './features/format/underline/feature.server.js'\nexport { HeadingFeature, type HeadingFeatureProps } from './features/heading/feature.server.js'\nexport { HorizontalRuleFeature } from './features/horizontalRule/feature.server.js'\n\nexport { IndentFeature } from './features/indent/feature.server.js'\nexport { LinkFeature, type LinkFeatureServerProps } from './features/link/feature.server.js'\n\nexport { AutoLinkNode } from './features/link/nodes/AutoLinkNode.js'\nexport { LinkNode } from './features/link/nodes/LinkNode.js'\nexport type { LinkFields } from './features/link/nodes/types.js'\nexport { ChecklistFeature } from './features/lists/checklist/feature.server.js'\nexport { OrderedListFeature } from './features/lists/orderedList/feature.server.js'\nexport { UnorderedListFeature } from './features/lists/unorderedList/feature.server.js'\nexport { LexicalPluginToLexicalFeature } from './features/migrations/lexicalPluginToLexical/feature.server.js'\nexport { SlateBlockquoteConverter } from './features/migrations/slateToLexical/converter/converters/blockquote/index.js'\nexport { SlateHeadingConverter } from './features/migrations/slateToLexical/converter/converters/heading/index.js'\nexport { SlateIndentConverter } from './features/migrations/slateToLexical/converter/converters/indent/index.js'\nexport { SlateLinkConverter } from './features/migrations/slateToLexical/converter/converters/link/index.js'\nexport { SlateListItemConverter } from './features/migrations/slateToLexical/converter/converters/listItem/index.js'\nexport { SlateOrderedListConverter } from './features/migrations/slateToLexical/converter/converters/orderedList/index.js'\nexport { SlateRelationshipConverter } from './features/migrations/slateToLexical/converter/converters/relationship/index.js'\nexport { SlateUnknownConverter } from './features/migrations/slateToLexical/converter/converters/unknown/index.js'\nexport { SlateUnorderedListConverter } from './features/migrations/slateToLexical/converter/converters/unorderedList/index.js'\nexport { SlateUploadConverter } from './features/migrations/slateToLexical/converter/converters/upload/index.js'\nexport { defaultSlateConverters } from './features/migrations/slateToLexical/converter/defaultConverters.js'\n\nexport {\n convertSlateNodesToLexical,\n convertSlateToLexical,\n} from './features/migrations/slateToLexical/converter/index.js'\nexport type {\n SlateNode,\n SlateNodeConverter,\n} from './features/migrations/slateToLexical/converter/types.js'\nexport { SlateToLexicalFeature } from './features/migrations/slateToLexical/feature.server.js'\n\nexport { ParagraphFeature } from './features/paragraph/feature.server.js'\nexport {\n RelationshipFeature,\n type RelationshipFeatureProps,\n} from './features/relationship/feature.server.js'\nexport {\n type RelationshipData,\n RelationshipNode,\n} from './features/relationship/nodes/RelationshipNode.js'\n\nexport { FixedToolbarFeature } from './features/toolbars/fixed/feature.server.js'\nexport { InlineToolbarFeature } from './features/toolbars/inline/feature.server.js'\n\nexport type { ToolbarGroup, ToolbarGroupItem } from './features/toolbars/types.js'\nexport { createNode } from './features/typeUtilities.js' // Only useful in feature.server.ts\nexport type {\n ClientComponentProps,\n ClientFeature,\n ClientFeatureProviderMap,\n FeatureProviderClient,\n FeatureProviderProviderClient,\n PluginComponent,\n PluginComponentWithAnchor,\n ResolvedClientFeature,\n ResolvedClientFeatureMap,\n SanitizedClientFeatures,\n SanitizedPlugin,\n} from './features/typesClient.js'\n\nexport type {\n AfterChangeNodeHook,\n AfterChangeNodeHookArgs,\n AfterReadNodeHook,\n AfterReadNodeHookArgs,\n BaseNodeHookArgs,\n BeforeChangeNodeHook,\n BeforeChangeNodeHookArgs,\n BeforeValidateNodeHook,\n BeforeValidateNodeHookArgs,\n FeatureProviderProviderServer,\n FeatureProviderServer,\n NodeValidation,\n NodeWithHooks,\n PopulationPromise,\n ResolvedServerFeature,\n ResolvedServerFeatureMap,\n SanitizedServerFeatures,\n ServerFeature,\n ServerFeatureProviderMap,\n} from './features/typesServer.js'\n\nexport { UploadFeature } from './features/upload/feature.server.js'\n\nexport type { UploadFeatureProps } from './features/upload/feature.server.js'\nexport { type UploadData, UploadNode } from './features/upload/nodes/UploadNode.js'\n\nexport type { EditorConfigContextType } from './lexical/config/client/EditorConfigProvider.js'\nexport {\n defaultEditorConfig,\n defaultEditorFeatures,\n defaultEditorLexicalConfig,\n} from './lexical/config/server/default.js'\n\nexport { loadFeatures, sortFeaturesForOptimalLoading } from './lexical/config/server/loader.js'\nexport {\n sanitizeServerEditorConfig,\n sanitizeServerFeatures,\n} from './lexical/config/server/sanitize.js'\n\nexport type {\n ClientEditorConfig,\n SanitizedClientEditorConfig,\n SanitizedServerEditorConfig,\n ServerEditorConfig,\n} from './lexical/config/types.js'\nexport { getEnabledNodes } from './lexical/nodes/index.js'\nexport type { AdapterProps }\n\nexport type {\n SlashMenuGroup,\n SlashMenuItem,\n} from './lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js'\n\nexport {\n DETAIL_TYPE_TO_DETAIL,\n DOUBLE_LINE_BREAK,\n ELEMENT_FORMAT_TO_TYPE,\n ELEMENT_TYPE_TO_FORMAT,\n IS_ALL_FORMATTING,\n LTR_REGEX,\n NON_BREAKING_SPACE,\n NodeFormat,\n RTL_REGEX,\n TEXT_MODE_TO_TYPE,\n TEXT_TYPE_TO_FORMAT,\n TEXT_TYPE_TO_MODE,\n} from './lexical/utils/nodeFormat.js'\nexport { sanitizeUrl, validateUrl } from './lexical/utils/url.js'\n\nexport { defaultRichTextValue } from './populateGraphQL/defaultValue.js'\n\nexport type { LexicalEditorProps, LexicalRichTextAdapter } from './types.js'\n\nexport { createServerFeature } from './utilities/createServerFeature.js'\nexport { migrateSlateToLexical } from './utilities/migrateSlateToLexical/index.js'\n\nexport * from './nodeTypes.js'\n"],"names":["withMergedProps","fileURLToPath","path","afterChangeTraverseFields","afterReadTraverseFields","beforeChangeTraverseFields","beforeValidateTraverseFields","getDependencies","withNullableJSONSchemaType","RichTextCell","RichTextField","i18n","defaultEditorConfig","defaultEditorFeatures","loadFeatures","sanitizeServerEditorConfig","sanitizeServerFeatures","cloneDeep","populateLexicalPopulationPromises","getGenerateComponentMap","getGenerateSchemaMap","recurseNodeTree","richTextValidateHOC","defaultSanitizedServerEditorConfig","filename","url","dirname","lexicalEditor","props","config","isRoot","process","env","NODE_ENV","resolvedDependencies","foundVersions","_pkg","version","resolved","Object","keys","includes","length","formattedVersionsWithPackageNameString","entries","map","pkg","join","Error","features","resolvedFeatureMap","finalSanitizedEditorConfig","lexical","rootEditor","editor","rootEditorFeatures","defaultFeatures","rootFeatures","unSanitizedEditorConfig","featureI18n","lang","general","CellComponent","Component","toMergeIntoProps","admin","lexicalEditorConfig","FieldComponent","editorConfig","generateComponentMap","generateSchemaMap","graphQLPopulationPromises","context","currentDepth","depth","draft","field","fieldPromises","findMany","flattenLocales","overrideAccess","populationPromises","req","showHiddenFields","siblingDoc","size","editorPopulationPromises","hooks","afterChange","collection","_context","global","operation","schemaPath","value","getSubFields","nodeIDMap","originalNodeIDMap","internal","richText","nodes","root","children","id","node","afterChangeHooks","has","type","hook","get","console","warn","originalNode","parentRichTextFieldPath","parentRichTextFieldSchemaPath","subFieldFn","subFieldDataFn","getSubFieldsData","subFields","data","originalData","doc","fields","previousDoc","previousSiblingDoc","siblingData","afterRead","fallbackLocale","locale","triggerAccessControl","triggerHooks","flattenedNodes","afterReadHooks","beforeChange","duplicate","errors","mergeLocaleActions","siblingDocWithLocales","skipValidation","originalNodeWithLocalesIDMap","name","beforeChangeHooks","originalNodeWithLocales","originalDataWithLocales","docWithLocales","newOriginalNodeIDMap","previousValue","beforeValidate","beforeValidateHooks","outputSchema","collectionIDFieldTypes","interfaceNameDefinitions","isRequired","properties","additionalProperties","items","required","direction","oneOf","enum","format","indent","modifyOutputSchema","generatedTypes","modifyOutputSchemas","currentSchema","validate","AlignFeature","BlockquoteFeature","BlocksFeature","BlockNode","LinebreakHTMLConverter","ParagraphHTMLConverter","TextHTMLConverter","defaultHTMLConverters","convertLexicalNodesToHTML","convertLexicalToHTML","HTMLConverterFeature","consolidateHTMLConverters","lexicalHTML","TestRecorderFeature","TreeViewFeature","BoldFeature","InlineCodeFeature","ItalicFeature","StrikethroughFeature","SubscriptFeature","SuperscriptFeature","UnderlineFeature","HeadingFeature","HorizontalRuleFeature","IndentFeature","LinkFeature","AutoLinkNode","LinkNode","ChecklistFeature","OrderedListFeature","UnorderedListFeature","LexicalPluginToLexicalFeature","SlateBlockquoteConverter","SlateHeadingConverter","SlateIndentConverter","SlateLinkConverter","SlateListItemConverter","SlateOrderedListConverter","SlateRelationshipConverter","SlateUnknownConverter","SlateUnorderedListConverter","SlateUploadConverter","defaultSlateConverters","convertSlateNodesToLexical","convertSlateToLexical","SlateToLexicalFeature","ParagraphFeature","RelationshipFeature","RelationshipNode","FixedToolbarFeature","InlineToolbarFeature","createNode","UploadFeature","UploadNode","defaultEditorLexicalConfig","sortFeaturesForOptimalLoading","getEnabledNodes","DETAIL_TYPE_TO_DETAIL","DOUBLE_LINE_BREAK","ELEMENT_FORMAT_TO_TYPE","ELEMENT_TYPE_TO_FORMAT","IS_ALL_FORMATTING","LTR_REGEX","NON_BREAKING_SPACE","NodeFormat","RTL_REGEX","TEXT_MODE_TO_TYPE","TEXT_TYPE_TO_FORMAT","TEXT_TYPE_TO_MODE","sanitizeUrl","validateUrl","defaultRichTextValue","createServerFeature","migrateSlateToLexical"],"mappings":"AAOA,SAASA,eAAe,QAAQ,wBAAuB;AACvD,SAASC,aAAa,QAAQ,WAAU;AACxC,OAAOC,UA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e,QAAQ,2BAA0B;AAQ1D,SACEC,qBAAqB,EACrBC,iBAAiB,EACjBC,sBAAsB,EACtBC,sBAAsB,EACtBC,iBAAiB,EACjBC,SAAS,EACTC,kBAAkB,EAClBC,UAAU,EACVC,SAAS,EACTC,iBAAiB,EACjBC,mBAAmB,EACnBC,iBAAiB,QACZ,gCAA+B;AACtC,SAASC,WAAW,EAAEC,WAAW,QAAQ,yBAAwB;AAEjE,SAASC,oBAAoB,QAAQ,oCAAmC;AAIxE,SAASC,mBAAmB,QAAQ,qCAAoC;AACxE,SAASC,qBAAqB,QAAQ,6CAA4C;AAElF,cAAc,iBAAgB"}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import type { JSONSchema4 } from 'json-schema'\nimport type {\n EditorConfig as LexicalEditorConfig,\n SerializedEditorState,\n SerializedLexicalNode,\n} from 'lexical'\n\nimport { withMergedProps } from '@payloadcms/ui/shared'\nimport { fileURLToPath } from 'node:url'\nimport path from 'path'\nimport {\n afterChangeTraverseFields,\n afterReadTraverseFields,\n beforeChangeTraverseFields,\n beforeValidateTraverseFields,\n getDependencies,\n withNullableJSONSchemaType,\n} from 'payload'\n\nimport type { FeatureProviderServer, ResolvedServerFeatureMap } from './features/typesServer.js'\nimport type { SanitizedServerEditorConfig } from './lexical/config/types.js'\nimport type {\n AdapterProps,\n LexicalEditorProps,\n LexicalRichTextAdapter,\n LexicalRichTextAdapterProvider,\n} from './types.js'\n\n// eslint-disable-next-line payload/no-imports-from-exports-dir\nimport { RichTextCell, RichTextField } from './exports/client/index.js'\nimport { i18n } from './i18n.js'\nimport { defaultEditorConfig, defaultEditorFeatures } from './lexical/config/server/default.js'\nimport { loadFeatures } from './lexical/config/server/loader.js'\nimport {\n sanitizeServerEditorConfig,\n sanitizeServerFeatures,\n} from './lexical/config/server/sanitize.js'\nimport { cloneDeep } from './lexical/utils/cloneDeep.js'\nimport { populateLexicalPopulationPromises } from './populateGraphQL/populateLexicalPopulationPromises.js'\nimport { getGenerateComponentMap } from './utilities/generateComponentMap.js'\nimport { getGenerateSchemaMap } from './utilities/generateSchemaMap.js'\nimport { recurseNodeTree } from './utilities/recurseNodeTree.js'\nimport { richTextValidateHOC } from './validate/index.js'\n\nlet defaultSanitizedServerEditorConfig: SanitizedServerEditorConfig = null\n\nconst filename = fileURLToPath(import.meta.url)\nconst dirname = path.dirname(filename)\n\nexport function lexicalEditor(props?: LexicalEditorProps): LexicalRichTextAdapterProvider {\n return async ({ config, isRoot }) => {\n if (process.env.NODE_ENV !== 'production') {\n const resolvedDependencies = await getDependencies(dirname, [\n 'lexical',\n '@lexical/headless',\n '@lexical/link',\n '@lexical/list',\n '@lexical/mark',\n '@lexical/markdown',\n '@lexical/react',\n '@lexical/rich-text',\n '@lexical/selection',\n '@lexical/utils',\n ])\n\n // Go through each resolved dependency. If any dependency has a mismatching version, throw an error\n const foundVersions: {\n [version: string]: string\n } = {}\n for (const [_pkg, { version }] of resolvedDependencies.resolved) {\n if (!Object.keys(foundVersions).includes(version)) {\n foundVersions[version] = _pkg\n }\n }\n if (Object.keys(foundVersions).length > 1) {\n const formattedVersionsWithPackageNameString = Object.entries(foundVersions)\n .map(([version, pkg]) => `${pkg}@${version}`)\n .join(', ')\n\n throw new Error(\n `Mismatching lexical dependency versions found: ${formattedVersionsWithPackageNameString}. All lexical and @lexical/* packages must have the same version. This is an error with your set-up, caused by you, not a bug in payload. Please go to your package.json and ensure all lexical and @lexical/* packages have the same version.`,\n )\n }\n }\n\n let features: FeatureProviderServer<any, any, any>[] = []\n let resolvedFeatureMap: ResolvedServerFeatureMap\n\n let finalSanitizedEditorConfig: SanitizedServerEditorConfig // For server only\n if (!props || (!props.features && !props.lexical)) {\n if (!defaultSanitizedServerEditorConfig) {\n defaultSanitizedServerEditorConfig = await sanitizeServerEditorConfig(\n defaultEditorConfig,\n config,\n )\n features = cloneDeep(defaultEditorFeatures)\n }\n\n finalSanitizedEditorConfig = cloneDeep(defaultSanitizedServerEditorConfig)\n\n resolvedFeatureMap = finalSanitizedEditorConfig.resolvedFeatureMap\n } else {\n const rootEditor = config.editor\n let rootEditorFeatures: FeatureProviderServer<unknown, unknown, unknown>[] = []\n if (typeof rootEditor === 'object' && 'features' in rootEditor) {\n rootEditorFeatures = (rootEditor as LexicalRichTextAdapter).features\n }\n\n features =\n props.features && typeof props.features === 'function'\n ? props.features({\n defaultFeatures: cloneDeep(defaultEditorFeatures),\n rootFeatures: rootEditorFeatures,\n })\n : (props.features as FeatureProviderServer<unknown, unknown, unknown>[])\n if (!features) {\n features = cloneDeep(defaultEditorFeatures)\n }\n\n const lexical: LexicalEditorConfig = props.lexical\n\n resolvedFeatureMap = await loadFeatures({\n config,\n isRoot,\n unSanitizedEditorConfig: {\n features,\n lexical: lexical ? lexical : defaultEditorConfig.lexical,\n },\n })\n\n finalSanitizedEditorConfig = {\n features: sanitizeServerFeatures(resolvedFeatureMap),\n lexical: lexical ? lexical : defaultEditorConfig.lexical,\n resolvedFeatureMap,\n }\n }\n\n const featureI18n = finalSanitizedEditorConfig.features.i18n\n for (const lang in i18n) {\n if (!featureI18n[lang]) {\n featureI18n[lang] = {\n lexical: {},\n }\n }\n\n featureI18n[lang].lexical.general = i18n[lang]\n }\n\n return {\n CellComponent: withMergedProps({\n Component: RichTextCell,\n toMergeIntoProps: {\n admin: props?.admin,\n lexicalEditorConfig: finalSanitizedEditorConfig.lexical,\n },\n }),\n FieldComponent: withMergedProps({\n Component: RichTextField,\n toMergeIntoProps: {\n admin: props?.admin,\n lexicalEditorConfig: finalSanitizedEditorConfig.lexical,\n },\n }),\n editorConfig: finalSanitizedEditorConfig,\n features,\n generateComponentMap: getGenerateComponentMap({\n resolvedFeatureMap,\n }),\n generateSchemaMap: getGenerateSchemaMap({\n resolvedFeatureMap,\n }),\n graphQLPopulationPromises({\n context,\n currentDepth,\n depth,\n draft,\n field,\n fieldPromises,\n findMany,\n flattenLocales,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc,\n }) {\n // check if there are any features with nodes which have populationPromises for this field\n if (finalSanitizedEditorConfig?.features?.graphQLPopulationPromises?.size) {\n populateLexicalPopulationPromises({\n context,\n currentDepth: currentDepth ?? 0,\n depth,\n draft,\n editorPopulationPromises: finalSanitizedEditorConfig.features.graphQLPopulationPromises,\n field,\n fieldPromises,\n findMany,\n flattenLocales,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc,\n })\n }\n },\n hooks: {\n afterChange: [\n async ({\n collection,\n context: _context,\n global,\n operation,\n path,\n req,\n schemaPath,\n value,\n }) => {\n if (\n !finalSanitizedEditorConfig.features.hooks.afterChange.size &&\n !finalSanitizedEditorConfig.features.getSubFields.size\n ) {\n return value\n }\n const context: any = _context\n const nodeIDMap: {\n [key: string]: SerializedLexicalNode\n } = {}\n\n /**\n * Get the originalNodeIDMap from the beforeValidate hook, which is always run before this hook.\n */\n const originalNodeIDMap: {\n [key: string]: SerializedLexicalNode\n } = context?.internal?.richText?.[path.join('.')]?.originalNodeIDMap\n\n if (!originalNodeIDMap || !Object.keys(originalNodeIDMap).length || !value) {\n return value\n }\n\n recurseNodeTree({\n nodeIDMap,\n nodes: (value as SerializedEditorState)?.root?.children ?? [],\n })\n\n // eslint-disable-next-line prefer-const\n for (let [id, node] of Object.entries(nodeIDMap)) {\n const afterChangeHooks = finalSanitizedEditorConfig.features.hooks.afterChange\n if (afterChangeHooks?.has(node.type)) {\n for (const hook of afterChangeHooks.get(node.type)) {\n if (!originalNodeIDMap[id]) {\n console.warn(\n '(afterChange) No original node found for node with id',\n id,\n 'node:',\n node,\n 'path',\n path.join('.'),\n )\n continue\n }\n node = await hook({\n context,\n node,\n operation,\n originalNode: originalNodeIDMap[id],\n parentRichTextFieldPath: path,\n parentRichTextFieldSchemaPath: schemaPath,\n req,\n })\n }\n }\n const subFieldFn = finalSanitizedEditorConfig.features.getSubFields.get(node.type)\n const subFieldDataFn = finalSanitizedEditorConfig.features.getSubFieldsData.get(\n node.type,\n )\n\n if (subFieldFn) {\n const subFields = subFieldFn({ node, req })\n const data = subFieldDataFn({ node, req }) ?? {}\n const originalData = subFieldDataFn({ node: originalNodeIDMap[id], req }) ?? {}\n\n if (subFields?.length) {\n await afterChangeTraverseFields({\n collection,\n context,\n data: originalData,\n doc: data,\n fields: subFields,\n global,\n operation,\n path,\n previousDoc: data,\n previousSiblingDoc: { ...data },\n req,\n schemaPath,\n siblingData: originalData || {},\n siblingDoc: { ...data },\n })\n }\n }\n }\n return value\n },\n ],\n afterRead: [\n /**\n * afterRead hooks do not receive the originalNode. Thus, they can run on all nodes, not just nodes with an ID.\n */\n async ({\n collection,\n context: context,\n currentDepth,\n depth,\n draft,\n fallbackLocale,\n fieldPromises,\n findMany,\n flattenLocales,\n global,\n locale,\n overrideAccess,\n path,\n populationPromises,\n req,\n schemaPath,\n showHiddenFields,\n triggerAccessControl,\n triggerHooks,\n value,\n }) => {\n if (\n !finalSanitizedEditorConfig.features.hooks.afterRead.size &&\n !finalSanitizedEditorConfig.features.getSubFields.size\n ) {\n return value\n }\n const flattenedNodes: SerializedLexicalNode[] = []\n\n recurseNodeTree({\n flattenedNodes,\n nodes: (value as SerializedEditorState)?.root?.children ?? [],\n })\n\n for (let node of flattenedNodes) {\n const afterReadHooks = finalSanitizedEditorConfig.features.hooks.afterRead\n if (afterReadHooks?.has(node.type)) {\n for (const hook of afterReadHooks.get(node.type)) {\n node = await hook({\n context,\n currentDepth,\n depth,\n draft,\n fallbackLocale,\n fieldPromises,\n findMany,\n flattenLocales,\n locale,\n node,\n overrideAccess,\n parentRichTextFieldPath: path,\n parentRichTextFieldSchemaPath: schemaPath,\n populationPromises,\n req,\n showHiddenFields,\n triggerAccessControl,\n triggerHooks,\n })\n }\n }\n const subFieldFn = finalSanitizedEditorConfig.features.getSubFields.get(node.type)\n const subFieldDataFn = finalSanitizedEditorConfig.features.getSubFieldsData.get(\n node.type,\n )\n\n if (subFieldFn) {\n const subFields = subFieldFn({ node, req })\n const data = subFieldDataFn({ node, req }) ?? {}\n\n if (subFields?.length) {\n afterReadTraverseFields({\n collection,\n context,\n currentDepth,\n depth,\n doc: data,\n draft,\n fallbackLocale,\n fieldPromises,\n fields: subFields,\n findMany,\n flattenLocales,\n global,\n locale,\n overrideAccess,\n path,\n populationPromises,\n req,\n schemaPath,\n showHiddenFields,\n siblingDoc: data,\n triggerAccessControl,\n triggerHooks,\n })\n }\n }\n }\n\n return value\n },\n ],\n beforeChange: [\n async ({\n collection,\n context: _context,\n duplicate,\n errors,\n field,\n global,\n mergeLocaleActions,\n operation,\n path,\n req,\n schemaPath,\n siblingData,\n siblingDocWithLocales,\n skipValidation,\n value,\n }) => {\n if (\n !finalSanitizedEditorConfig.features.hooks.beforeChange.size &&\n !finalSanitizedEditorConfig.features.getSubFields.size\n ) {\n return value\n }\n\n const context: any = _context\n const nodeIDMap: {\n [key: string]: SerializedLexicalNode\n } = {}\n\n /**\n * Get the originalNodeIDMap from the beforeValidate hook, which is always run before this hook.\n */\n const originalNodeIDMap: {\n [key: string]: SerializedLexicalNode\n } = context?.internal?.richText?.[path.join('.')]?.originalNodeIDMap\n\n if (!originalNodeIDMap || !Object.keys(originalNodeIDMap).length || !value) {\n return value\n }\n\n const originalNodeWithLocalesIDMap: {\n [key: string]: SerializedLexicalNode\n } = {}\n\n recurseNodeTree({\n nodeIDMap,\n nodes: (value as SerializedEditorState)?.root?.children ?? [],\n })\n\n if (siblingDocWithLocales?.[field.name]) {\n recurseNodeTree({\n nodeIDMap: originalNodeWithLocalesIDMap,\n nodes:\n (siblingDocWithLocales[field.name] as SerializedEditorState)?.root?.children ??\n [],\n })\n }\n\n // eslint-disable-next-line prefer-const\n for (let [id, node] of Object.entries(nodeIDMap)) {\n const beforeChangeHooks = finalSanitizedEditorConfig.features.hooks.beforeChange\n if (beforeChangeHooks?.has(node.type)) {\n for (const hook of beforeChangeHooks.get(node.type)) {\n if (!originalNodeIDMap[id]) {\n console.warn(\n '(beforeChange) No original node found for node with id',\n id,\n 'node:',\n node,\n 'path',\n path.join('.'),\n )\n continue\n }\n node = await hook({\n context,\n duplicate,\n errors,\n mergeLocaleActions,\n node,\n operation,\n originalNode: originalNodeIDMap[id],\n originalNodeWithLocales: originalNodeWithLocalesIDMap[id],\n parentRichTextFieldPath: path,\n parentRichTextFieldSchemaPath: schemaPath,\n req,\n skipValidation,\n })\n }\n }\n\n const subFieldFn = finalSanitizedEditorConfig.features.getSubFields.get(node.type)\n const subFieldDataFn = finalSanitizedEditorConfig.features.getSubFieldsData.get(\n node.type,\n )\n\n if (subFieldFn) {\n const subFields = subFieldFn({ node, req })\n const data = subFieldDataFn({ node, req }) ?? {}\n const originalData = subFieldDataFn({ node: originalNodeIDMap[id], req }) ?? {}\n const originalDataWithLocales =\n subFieldDataFn({\n node: originalNodeWithLocalesIDMap[id],\n req,\n }) ?? {}\n\n if (subFields?.length) {\n await beforeChangeTraverseFields({\n id,\n collection,\n context,\n data,\n doc: originalData,\n docWithLocales: originalDataWithLocales ?? {},\n duplicate,\n errors,\n fields: subFields,\n global,\n mergeLocaleActions,\n operation,\n path,\n req,\n schemaPath,\n siblingData: data,\n siblingDoc: originalData,\n siblingDocWithLocales: originalDataWithLocales ?? {},\n skipValidation,\n })\n }\n }\n }\n\n /**\n * within the beforeChange hook, id's may be re-generated.\n * Example:\n * 1. Seed data contains IDs for block feature blocks.\n * 2. Those are used in beforeValidate\n * 3. in beforeChange, those IDs are regenerated, because you cannot provide IDs during document creation. See baseIDField beforeChange hook for reasoning\n * 4. Thus, in order for all post-beforeChange hooks to receive the correct ID, we need to update the originalNodeIDMap with the new ID's, by regenerating the nodeIDMap.\n * The reason this is not generated for every hook, is to save on performance. We know we only really have to generate it in beforeValidate, which is the first hook,\n * and in beforeChange, which is where modifications to the provided IDs can occur.\n */\n const newOriginalNodeIDMap: {\n [key: string]: SerializedLexicalNode\n } = {}\n\n const previousValue = siblingData[field.name]\n\n recurseNodeTree({\n nodeIDMap: newOriginalNodeIDMap,\n nodes: (previousValue as SerializedEditorState)?.root?.children ?? [],\n })\n\n if (!context.internal) {\n // Add to context, for other hooks to use\n context.internal = {}\n }\n if (!context.internal.richText) {\n context.internal.richText = {}\n }\n context.internal.richText[path.join('.')] = {\n originalNodeIDMap: newOriginalNodeIDMap,\n }\n\n return value\n },\n ],\n beforeValidate: [\n async ({\n collection,\n context,\n global,\n operation,\n overrideAccess,\n path,\n previousValue,\n req,\n schemaPath,\n value,\n }) => {\n // return value if there are NO hooks\n if (\n !finalSanitizedEditorConfig.features.hooks.beforeValidate.size &&\n !finalSanitizedEditorConfig.features.hooks.afterChange.size &&\n !finalSanitizedEditorConfig.features.hooks.beforeChange.size &&\n !finalSanitizedEditorConfig.features.getSubFields.size\n ) {\n return value\n }\n\n /**\n * beforeValidate is the first field hook which runs. This is where we can create the node map, which can then be used in the other hooks.\n *\n */\n\n /**\n * flattenedNodes contains all nodes in the editor, in the order they appear in the editor. They will be used for the following hooks:\n * - afterRead\n *\n * The other hooks require nodes to have IDs, which is why those are ran only from the nodeIDMap. They require IDs because they have both doc/siblingDoc and data/siblingData, and\n * thus require a reliable way to match new node data to old node data. Given that node positions can change in between hooks, this is only reliably possible for nodes which are saved with\n * an ID.\n */\n //const flattenedNodes: SerializedLexicalNode[] = []\n\n /**\n * Only nodes with id's (so, nodes with hooks added to them) will be added to the nodeIDMap. They will be used for the following hooks:\n * - afterChange\n * - beforeChange\n * - beforeValidate\n * - beforeDuplicate\n *\n * Other hooks are handled by the flattenedNodes. All nodes in the nodeIDMap are part of flattenedNodes.\n */\n\n const originalNodeIDMap: {\n [key: string]: SerializedLexicalNode\n } = {}\n\n recurseNodeTree({\n nodeIDMap: originalNodeIDMap,\n nodes: (previousValue as SerializedEditorState)?.root?.children ?? [],\n })\n\n if (!context.internal) {\n // Add to context, for other hooks to use\n context.internal = {}\n }\n if (!(context as any).internal.richText) {\n ;(context as any).internal.richText = {}\n }\n ;(context as any).internal.richText[path.join('.')] = {\n originalNodeIDMap,\n }\n\n /**\n * Now that the maps for all hooks are set up, we can run the validate hook\n */\n if (!finalSanitizedEditorConfig.features.hooks.beforeValidate.size) {\n return value\n }\n const nodeIDMap: {\n [key: string]: SerializedLexicalNode\n } = {}\n recurseNodeTree({\n //flattenedNodes,\n nodeIDMap,\n nodes: (value as SerializedEditorState)?.root?.children ?? [],\n })\n\n // eslint-disable-next-line prefer-const\n for (let [id, node] of Object.entries(nodeIDMap)) {\n const beforeValidateHooks = finalSanitizedEditorConfig.features.hooks.beforeValidate\n if (beforeValidateHooks?.has(node.type)) {\n for (const hook of beforeValidateHooks.get(node.type)) {\n if (!originalNodeIDMap[id]) {\n console.warn(\n '(beforeValidate) No original node found for node with id',\n id,\n 'node:',\n node,\n 'path',\n path.join('.'),\n )\n continue\n }\n node = await hook({\n context,\n node,\n operation,\n originalNode: originalNodeIDMap[id],\n overrideAccess,\n parentRichTextFieldPath: path,\n parentRichTextFieldSchemaPath: schemaPath,\n req,\n })\n }\n }\n const subFieldFn = finalSanitizedEditorConfig.features.getSubFields.get(node.type)\n const subFieldDataFn = finalSanitizedEditorConfig.features.getSubFieldsData.get(\n node.type,\n )\n\n if (subFieldFn) {\n const subFields = subFieldFn({ node, req })\n const data = subFieldDataFn({ node, req }) ?? {}\n const originalData = subFieldDataFn({ node: originalNodeIDMap[id], req }) ?? {}\n\n if (subFields?.length) {\n await beforeValidateTraverseFields({\n id,\n collection,\n context,\n data,\n doc: originalData,\n fields: subFields,\n global,\n operation,\n overrideAccess,\n path,\n req,\n schemaPath,\n siblingData: data,\n siblingDoc: originalData,\n })\n }\n }\n }\n\n return value\n },\n ],\n },\n i18n: featureI18n,\n outputSchema: ({\n collectionIDFieldTypes,\n config,\n field,\n interfaceNameDefinitions,\n isRequired,\n }) => {\n let outputSchema: JSONSchema4 = {\n // This schema matches the SerializedEditorState type so far, that it's possible to cast SerializedEditorState to this schema without any errors.\n // In the future, we should\n // 1) allow recursive children\n // 2) Pass in all the different types for every node added to the editorconfig. This can be done with refs in the schema.\n type: withNullableJSONSchemaType('object', isRequired),\n properties: {\n root: {\n type: 'object',\n additionalProperties: false,\n properties: {\n type: {\n type: 'string',\n },\n children: {\n type: 'array',\n items: {\n type: 'object',\n additionalProperties: true,\n properties: {\n type: {\n type: 'string',\n },\n version: {\n type: 'integer',\n },\n },\n required: ['type', 'version'],\n },\n },\n direction: {\n oneOf: [\n {\n enum: ['ltr', 'rtl'],\n },\n {\n type: 'null',\n },\n ],\n },\n format: {\n type: 'string',\n enum: ['left', 'start', 'center', 'right', 'end', 'justify', ''], // ElementFormatType, since the root node is an element\n },\n indent: {\n type: 'integer',\n },\n version: {\n type: 'integer',\n },\n },\n required: ['children', 'direction', 'format', 'indent', 'type', 'version'],\n },\n },\n required: ['root'],\n }\n for (const modifyOutputSchema of finalSanitizedEditorConfig.features.generatedTypes\n .modifyOutputSchemas) {\n outputSchema = modifyOutputSchema({\n collectionIDFieldTypes,\n config,\n currentSchema: outputSchema,\n field,\n interfaceNameDefinitions,\n isRequired,\n })\n }\n\n return outputSchema\n },\n validate: richTextValidateHOC({\n editorConfig: finalSanitizedEditorConfig,\n }),\n }\n }\n}\n\nexport { AlignFeature } from './features/align/feature.server.js'\nexport { BlockquoteFeature } from './features/blockquote/feature.server.js'\nexport { BlocksFeature, type BlocksFeatureProps } from './features/blocks/feature.server.js'\nexport { type BlockFields, BlockNode } from './features/blocks/nodes/BlocksNode.js'\n\nexport { LinebreakHTMLConverter } from './features/converters/html/converter/converters/linebreak.js'\nexport { ParagraphHTMLConverter } from './features/converters/html/converter/converters/paragraph.js'\nexport { TextHTMLConverter } from './features/converters/html/converter/converters/text.js'\n\nexport { defaultHTMLConverters } from './features/converters/html/converter/defaultConverters.js'\nexport {\n convertLexicalNodesToHTML,\n convertLexicalToHTML,\n} from './features/converters/html/converter/index.js'\nexport type { HTMLConverter } from './features/converters/html/converter/types.js'\nexport {\n HTMLConverterFeature,\n type HTMLConverterFeatureProps,\n} from './features/converters/html/feature.server.js'\nexport { consolidateHTMLConverters, lexicalHTML } from './features/converters/html/field/index.js'\nexport { TestRecorderFeature } from './features/debug/testRecorder/feature.server.js'\nexport { TreeViewFeature } from './features/debug/treeView/feature.server.js'\nexport { BoldFeature } from './features/format/bold/feature.server.js'\nexport { InlineCodeFeature } from './features/format/inlineCode/feature.server.js'\n\nexport { ItalicFeature } from './features/format/italic/feature.server.js'\nexport { StrikethroughFeature } from './features/format/strikethrough/feature.server.js'\nexport { SubscriptFeature } from './features/format/subscript/feature.server.js'\nexport { SuperscriptFeature } from './features/format/superscript/feature.server.js'\nexport { UnderlineFeature } from './features/format/underline/feature.server.js'\nexport { HeadingFeature, type HeadingFeatureProps } from './features/heading/feature.server.js'\nexport { HorizontalRuleFeature } from './features/horizontalRule/feature.server.js'\n\nexport { IndentFeature } from './features/indent/feature.server.js'\nexport { LinkFeature, type LinkFeatureServerProps } from './features/link/feature.server.js'\n\nexport { AutoLinkNode } from './features/link/nodes/AutoLinkNode.js'\nexport { LinkNode } from './features/link/nodes/LinkNode.js'\nexport type { LinkFields } from './features/link/nodes/types.js'\nexport { ChecklistFeature } from './features/lists/checklist/feature.server.js'\nexport { OrderedListFeature } from './features/lists/orderedList/feature.server.js'\nexport { UnorderedListFeature } from './features/lists/unorderedList/feature.server.js'\nexport { LexicalPluginToLexicalFeature } from './features/migrations/lexicalPluginToLexical/feature.server.js'\nexport { SlateBlockquoteConverter } from './features/migrations/slateToLexical/converter/converters/blockquote/index.js'\nexport { SlateHeadingConverter } from './features/migrations/slateToLexical/converter/converters/heading/index.js'\nexport { SlateIndentConverter } from './features/migrations/slateToLexical/converter/converters/indent/index.js'\nexport { SlateLinkConverter } from './features/migrations/slateToLexical/converter/converters/link/index.js'\nexport { SlateListItemConverter } from './features/migrations/slateToLexical/converter/converters/listItem/index.js'\nexport { SlateOrderedListConverter } from './features/migrations/slateToLexical/converter/converters/orderedList/index.js'\nexport { SlateRelationshipConverter } from './features/migrations/slateToLexical/converter/converters/relationship/index.js'\nexport { SlateUnknownConverter } from './features/migrations/slateToLexical/converter/converters/unknown/index.js'\nexport { SlateUnorderedListConverter } from './features/migrations/slateToLexical/converter/converters/unorderedList/index.js'\nexport { SlateUploadConverter } from './features/migrations/slateToLexical/converter/converters/upload/index.js'\nexport { defaultSlateConverters } from './features/migrations/slateToLexical/converter/defaultConverters.js'\n\nexport {\n convertSlateNodesToLexical,\n convertSlateToLexical,\n} from './features/migrations/slateToLexical/converter/index.js'\nexport type {\n SlateNode,\n SlateNodeConverter,\n} from './features/migrations/slateToLexical/converter/types.js'\nexport { SlateToLexicalFeature } from './features/migrations/slateToLexical/feature.server.js'\n\nexport { ParagraphFeature } from './features/paragraph/feature.server.js'\nexport {\n RelationshipFeature,\n type RelationshipFeatureProps,\n} from './features/relationship/feature.server.js'\nexport {\n type RelationshipData,\n RelationshipNode,\n} from './features/relationship/nodes/RelationshipNode.js'\n\nexport { FixedToolbarFeature } from './features/toolbars/fixed/feature.server.js'\nexport { InlineToolbarFeature } from './features/toolbars/inline/feature.server.js'\n\nexport type { ToolbarGroup, ToolbarGroupItem } from './features/toolbars/types.js'\nexport { createNode } from './features/typeUtilities.js' // Only useful in feature.server.ts\nexport type {\n ClientComponentProps,\n ClientFeature,\n ClientFeatureProviderMap,\n FeatureProviderClient,\n FeatureProviderProviderClient,\n PluginComponent,\n PluginComponentWithAnchor,\n ResolvedClientFeature,\n ResolvedClientFeatureMap,\n SanitizedClientFeatures,\n SanitizedPlugin,\n} from './features/typesClient.js'\n\nexport type {\n AfterChangeNodeHook,\n AfterChangeNodeHookArgs,\n AfterReadNodeHook,\n AfterReadNodeHookArgs,\n BaseNodeHookArgs,\n BeforeChangeNodeHook,\n BeforeChangeNodeHookArgs,\n BeforeValidateNodeHook,\n BeforeValidateNodeHookArgs,\n FeatureProviderProviderServer,\n FeatureProviderServer,\n NodeValidation,\n NodeWithHooks,\n PopulationPromise,\n ResolvedServerFeature,\n ResolvedServerFeatureMap,\n SanitizedServerFeatures,\n ServerFeature,\n ServerFeatureProviderMap,\n} from './features/typesServer.js'\n\nexport { UploadFeature } from './features/upload/feature.server.js'\n\nexport type { UploadFeatureProps } from './features/upload/feature.server.js'\nexport { type UploadData, UploadNode } from './features/upload/nodes/UploadNode.js'\n\nexport type { EditorConfigContextType } from './lexical/config/client/EditorConfigProvider.js'\nexport {\n defaultEditorConfig,\n defaultEditorFeatures,\n defaultEditorLexicalConfig,\n} from './lexical/config/server/default.js'\n\nexport { loadFeatures, sortFeaturesForOptimalLoading } from './lexical/config/server/loader.js'\nexport {\n sanitizeServerEditorConfig,\n sanitizeServerFeatures,\n} from './lexical/config/server/sanitize.js'\n\nexport type {\n ClientEditorConfig,\n SanitizedClientEditorConfig,\n SanitizedServerEditorConfig,\n ServerEditorConfig,\n} from './lexical/config/types.js'\nexport { getEnabledNodes } from './lexical/nodes/index.js'\nexport type { AdapterProps }\n\nexport type {\n SlashMenuGroup,\n SlashMenuItem,\n} from './lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js'\n\nexport {\n DETAIL_TYPE_TO_DETAIL,\n DOUBLE_LINE_BREAK,\n ELEMENT_FORMAT_TO_TYPE,\n ELEMENT_TYPE_TO_FORMAT,\n IS_ALL_FORMATTING,\n LTR_REGEX,\n NON_BREAKING_SPACE,\n NodeFormat,\n RTL_REGEX,\n TEXT_MODE_TO_TYPE,\n TEXT_TYPE_TO_FORMAT,\n TEXT_TYPE_TO_MODE,\n} from './lexical/utils/nodeFormat.js'\nexport { sanitizeUrl, validateUrl } from './lexical/utils/url.js'\n\nexport { defaultRichTextValue } from './populateGraphQL/defaultValue.js'\n\nexport type { LexicalEditorProps, LexicalRichTextAdapter } from './types.js'\n\nexport { createServerFeature } from './utilities/createServerFeature.js'\nexport { migrateSlateToLexical } from './utilities/migrateSlateToLexical/index.js'\nexport { upgradeLexicalData } from './utilities/upgradeLexicalData/index.js'\n\nexport * from './nodeTypes.js'\n\nexport type { FieldsDrawerProps } from './utilities/fieldsDrawer/Drawer.js'\n"],"names":["withMergedProps","fileURLToPath","path","afterChangeTraverseFields","afterReadTraverseFields","beforeChangeTraverseFields","beforeValidateTraverseFields","getDependencies","withNullableJSONSchemaType","RichTextCell","RichTextField","i18n","defaultEditorConfig","defaultEditorFeatures","loadFeatures","sanitizeServerEditorConfig","sanitizeServerFeatures","cloneDeep","populateLexicalPopulationPromises","getGenerateComponentMap","getGenerateSchemaMap","recurseNodeTree","richTextValidateHOC","defaultSanitizedServerEditorConfig","filename","url","dirname","lexicalEditor","props","config","isRoot","process","env","NODE_ENV","resolvedDependencies","foundVersions","_pkg","version","resolved","Object","keys","includes","length","formattedVersionsWithPackageNameString","entries","map","pkg","join","Error","features","resolvedFeatureMap","finalSanitizedEditorConfig","lexical","rootEditor","editor","rootEditorFeatures","defaultFeatures","rootFeatures","unSanitizedEditorConfig","featureI18n","lang","general","CellComponent","Component","toMergeIntoProps","admin","lexicalEditorConfig","FieldComponent","editorConfig","generateComponentMap","generateSchemaMap","graphQLPopulationPromises","context","currentDepth","depth","draft","field","fieldPromises","findMany","flattenLocales","overrideAccess","populationPromises","req","showHiddenFields","siblingDoc","size","editorPopulationPromises","hooks","afterChange","collection","_context","global","operation","schemaPath","value","getSubFields","nodeIDMap","originalNodeIDMap","internal","richText","nodes","root","children","id","node","afterChangeHooks","has","type","hook","get","console","warn","originalNode","parentRichTextFieldPath","parentRichTextFieldSchemaPath","subFieldFn","subFieldDataFn","getSubFieldsData","subFields","data","originalData","doc","fields","previousDoc","previousSiblingDoc","siblingData","afterRead","fallbackLocale","locale","triggerAccessControl","triggerHooks","flattenedNodes","afterReadHooks","beforeChange","duplicate","errors","mergeLocaleActions","siblingDocWithLocales","skipValidation","originalNodeWithLocalesIDMap","name","beforeChangeHooks","originalNodeWithLocales","originalDataWithLocales","docWithLocales","newOriginalNodeIDMap","previousValue","beforeValidate","beforeValidateHooks","outputSchema","collectionIDFieldTypes","interfaceNameDefinitions","isRequired","properties","additionalProperties","items","required","direction","oneOf","enum","format","indent","modifyOutputSchema","generatedTypes","modifyOutputSchemas","currentSchema","validate","AlignFeature","BlockquoteFeature","BlocksFeature","BlockNode","LinebreakHTMLConverter","ParagraphHTMLConverter","TextHTMLConverter","defaultHTMLConverters","convertLexicalNodesToHTML","convertLexicalToHTML","HTMLConverterFeature","consolidateHTMLConverters","lexicalHTML","TestRecorderFeature","TreeViewFeature","BoldFeature","InlineCodeFeature","ItalicFeature","StrikethroughFeature","SubscriptFeature","SuperscriptFeature","UnderlineFeature","HeadingFeature","HorizontalRuleFeature","IndentFeature","LinkFeature","AutoLinkNode","LinkNode","ChecklistFeature","OrderedListFeature","UnorderedListFeature","LexicalPluginToLexicalFeature","SlateBlockquoteConverter","SlateHeadingConverter","SlateIndentConverter","SlateLinkConverter","SlateListItemConverter","SlateOrderedListConverter","SlateRelationshipConverter","SlateUnknownConverter","SlateUnorderedListConverter","SlateUploadConverter","defaultSlateConverters","convertSlateNodesToLexical","convertSlateToLexical","SlateToLexicalFeature","ParagraphFeature","RelationshipFeature","RelationshipNode","FixedToolbarFeature","InlineToolbarFeature","createNode","UploadFeature","UploadNode","defaultEditorLexicalConfig","sortFeaturesForOptimalLoading","getEnabledNodes","DETAIL_TYPE_TO_DETAIL","DOUBLE_LINE_BREAK","ELEMENT_FORMAT_TO_TYPE","ELEMENT_TYPE_TO_FORMAT","IS_ALL_FORMATTING","LTR_REGEX","NON_BREAKING_SPACE","NodeFormat","RTL_REGEX","TEXT_MODE_TO_TYPE","TEXT_TYPE_TO_FORMAT","TEXT_TYPE_TO_MODE","sanitizeUrl","validateUrl","defaultRichTextValue","createServerFeature","migrateSlateToLexical","upgradeLexicalData"],"mappings":"AAOA,SAASA,eAAe,QAAQ,wBAAuB;AACvD,SAASC,aAAa,QAAQ,WAAU;AACxC,OAAOC,UAAU,OAAM;AACvB,SACEC,yBAAyB,EACzBC,uBAAuB,EACvBC,0BAA0B,EAC1BC,4BAA4B,EAC5BC,eAAe,EACfC,0BAA0B,QACrB,UAAS;AAWhB,+DAA+D;AAC/D,SAASC,YAAY,EAAEC,aAAa,QAAQ,4B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,mBAAmB,EACnBC,iBAAiB,QACZ,gCAA+B;AACtC,SAASC,WAAW,EAAEC,WAAW,QAAQ,yBAAwB;AAEjE,SAASC,oBAAoB,QAAQ,oCAAmC;AAIxE,SAASC,mBAAmB,QAAQ,qCAAoC;AACxE,SAASC,qBAAqB,QAAQ,6CAA4C;AAClF,SAASC,kBAAkB,QAAQ,0CAAyC;AAE5E,cAAc,iBAAgB"}
|
package/dist/nodeTypes.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import type { SerializedEditorState, SerializedElementNode, SerializedLexicalNode, Spread, TextModeType } from 'lexical';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
import type { SerializedQuoteNode } from './features/blockquote/feature.server.js';
|
|
3
|
+
import type { SerializedBlockNode } from './features/blocks/nodes/BlocksNode.js';
|
|
4
|
+
import type { SerializedHeadingNode } from './features/heading/feature.server.js';
|
|
5
|
+
import type { SerializedHorizontalRuleNode } from './features/horizontalRule/nodes/HorizontalRuleNode.js';
|
|
6
|
+
import type { SerializedAutoLinkNode, SerializedLinkNode } from './features/link/nodes/types.js';
|
|
7
|
+
import type { SerializedListItemNode, SerializedListNode } from './features/lists/plugin/index.js';
|
|
8
|
+
import type { SerializedRelationshipNode } from './features/relationship/nodes/RelationshipNode.js';
|
|
9
|
+
import type { SerializedUploadNode } from './features/upload/nodes/UploadNode.js';
|
|
10
|
+
export { SerializedAutoLinkNode, SerializedBlockNode, SerializedHeadingNode, SerializedHorizontalRuleNode, SerializedLinkNode, SerializedListItemNode, SerializedListNode, SerializedQuoteNode, SerializedRelationshipNode, SerializedUploadNode, };
|
|
9
11
|
export type SerializedParagraphNode<T extends SerializedLexicalNode = SerializedLexicalNode> = Spread<{
|
|
10
12
|
textFormat: number;
|
|
11
13
|
type: 'paragraph';
|
|
@@ -24,4 +26,6 @@ type RecursiveNodes<T extends SerializedLexicalNode, Depth extends number = 4> =
|
|
|
24
26
|
} & T;
|
|
25
27
|
type DecrementDepth<N extends number> = [0, 0, 1, 2, 3, 4][N];
|
|
26
28
|
export type TypedEditorState<T extends SerializedLexicalNode = SerializedLexicalNode> = SerializedEditorState<RecursiveNodes<T>>;
|
|
29
|
+
export type DefaultNodeTypes = SerializedAutoLinkNode | SerializedBlockNode | SerializedHeadingNode | SerializedHorizontalRuleNode | SerializedLinkNode | SerializedListItemNode | SerializedListNode | SerializedParagraphNode | SerializedQuoteNode | SerializedRelationshipNode | SerializedTextNode | SerializedUploadNode;
|
|
30
|
+
export type DefaultTypedEditorState<T extends SerializedLexicalNode = SerializedLexicalNode> = TypedEditorState<DefaultNodeTypes | T>;
|
|
27
31
|
//# sourceMappingURL=nodeTypes.d.ts.map
|
package/dist/nodeTypes.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nodeTypes.d.ts","sourceRoot":"","sources":["../src/nodeTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,MAAM,EACN,YAAY,EACb,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"nodeTypes.d.ts","sourceRoot":"","sources":["../src/nodeTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,MAAM,EACN,YAAY,EACb,MAAM,SAAS,CAAA;AAEhB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAA;AAClF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAA;AAChF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAA;AACjF,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,uDAAuD,CAAA;AACzG,OAAO,KAAK,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAA;AACh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,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,qBAAqB,GAAG,qBAAqB,IAClF,qBAAqB,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAA;AAE1C,MAAM,MAAM,gBAAgB,GACxB,sBAAsB,GACtB,mBAAmB,GACnB,qBAAqB,GACrB,4BAA4B,GAC5B,kBAAkB,GAClB,sBAAsB,GACtB,kBAAkB,GAClB,uBAAuB,GACvB,mBAAmB,GACnB,0BAA0B,GAC1B,kBAAkB,GAClB,oBAAoB,CAAA;AAExB,MAAM,MAAM,uBAAuB,CAAC,CAAC,SAAS,qBAAqB,GAAG,qBAAqB,IACzF,gBAAgB,CAAC,gBAAgB,GAAG,CAAC,CAAC,CAAA"}
|
package/dist/nodeTypes.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/nodeTypes.ts"],"sourcesContent":["import type {\n SerializedEditorState,\n SerializedElementNode,\n SerializedLexicalNode,\n Spread,\n TextModeType,\n} from 'lexical'\
|
|
1
|
+
{"version":3,"sources":["../src/nodeTypes.ts"],"sourcesContent":["import type {\n SerializedEditorState,\n SerializedElementNode,\n SerializedLexicalNode,\n Spread,\n TextModeType,\n} from 'lexical'\n\nimport type { SerializedQuoteNode } from './features/blockquote/feature.server.js'\nimport type { SerializedBlockNode } from './features/blocks/nodes/BlocksNode.js'\nimport type { SerializedHeadingNode } from './features/heading/feature.server.js'\nimport type { SerializedHorizontalRuleNode } from './features/horizontalRule/nodes/HorizontalRuleNode.js'\nimport type { SerializedAutoLinkNode, SerializedLinkNode } from './features/link/nodes/types.js'\nimport type { SerializedListItemNode, SerializedListNode } from './features/lists/plugin/index.js'\nimport type { SerializedRelationshipNode } from './features/relationship/nodes/RelationshipNode.js'\nimport type { SerializedUploadNode } from './features/upload/nodes/UploadNode.js'\n\nexport {\n SerializedAutoLinkNode,\n SerializedBlockNode,\n SerializedHeadingNode,\n SerializedHorizontalRuleNode,\n SerializedLinkNode,\n SerializedListItemNode,\n SerializedListNode,\n SerializedQuoteNode,\n SerializedRelationshipNode,\n SerializedUploadNode,\n}\n\nexport type SerializedParagraphNode<T extends SerializedLexicalNode = SerializedLexicalNode> =\n Spread<\n {\n textFormat: number\n type: 'paragraph'\n },\n SerializedElementNode<T>\n >\nexport type SerializedTextNode = Spread<\n {\n children?: never // required so that our typed editor state doesn't automatically add children\n detail: number\n format: number\n mode: TextModeType\n style: string\n text: string\n type: 'text'\n },\n SerializedLexicalNode\n>\n\ntype RecursiveNodes<T extends SerializedLexicalNode, Depth extends number = 4> = Depth extends 0\n ? T\n : { children?: RecursiveNodes<T, DecrementDepth<Depth>>[] } & T\n\ntype DecrementDepth<N extends number> = [0, 0, 1, 2, 3, 4][N]\n\nexport type TypedEditorState<T extends SerializedLexicalNode = SerializedLexicalNode> =\n SerializedEditorState<RecursiveNodes<T>>\n\nexport type DefaultNodeTypes =\n | SerializedAutoLinkNode\n | SerializedBlockNode\n | SerializedHeadingNode\n | SerializedHorizontalRuleNode\n | SerializedLinkNode\n | SerializedListItemNode\n | SerializedListNode\n | SerializedParagraphNode\n | SerializedQuoteNode\n | SerializedRelationshipNode\n | SerializedTextNode\n | SerializedUploadNode\n\nexport type DefaultTypedEditorState<T extends SerializedLexicalNode = SerializedLexicalNode> =\n TypedEditorState<DefaultNodeTypes | T>\n"],"names":[],"mappings":"AA0EA,WACwC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { FormState } from 'payload';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export type FieldsDrawerProps = {
|
|
4
|
+
className?: string;
|
|
5
|
+
data: any;
|
|
6
|
+
drawerSlug: string;
|
|
7
|
+
drawerTitle?: string;
|
|
8
|
+
featureKey: string;
|
|
9
|
+
handleDrawerSubmit: (fields: FormState, data: Record<string, unknown>) => void;
|
|
10
|
+
schemaPathSuffix?: string;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* This FieldsDrawer component can be used to easily create a Drawer that contains a form with fields within your feature.
|
|
14
|
+
* The fields are taken directly from the schema map based on your `featureKey` and `schemaPathSuffix`. Thus, this can only
|
|
15
|
+
* be used if you provide your field schema inside the `generateSchemaMap` prop of your feature.server.ts.
|
|
16
|
+
*/
|
|
17
|
+
export declare const FieldsDrawer: React.FC<FieldsDrawerProps>;
|
|
18
|
+
//# sourceMappingURL=Drawer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../../src/utilities/fieldsDrawer/Drawer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAGxC,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,MAAM,MAAM,iBAAiB,GAAG;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,EAAE,GAAG,CAAA;IACT,UAAU,EAAE,MAAM,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,UAAU,EAAE,MAAM,CAAA;IAClB,kBAAkB,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAA;IAC9E,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAqBpD,CAAA"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Drawer } from '@payloadcms/ui';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { DrawerContent } from './DrawerContent.js';
|
|
6
|
+
/**
|
|
7
|
+
* This FieldsDrawer component can be used to easily create a Drawer that contains a form with fields within your feature.
|
|
8
|
+
* The fields are taken directly from the schema map based on your `featureKey` and `schemaPathSuffix`. Thus, this can only
|
|
9
|
+
* be used if you provide your field schema inside the `generateSchemaMap` prop of your feature.server.ts.
|
|
10
|
+
*/ export const FieldsDrawer = ({ className, data, drawerSlug, drawerTitle, featureKey, handleDrawerSubmit, schemaPathSuffix })=>{
|
|
11
|
+
// The Drawer only renders its children (and itself) if it's open. Thus, by extracting the main content
|
|
12
|
+
// to DrawerContent, this should be faster
|
|
13
|
+
return /*#__PURE__*/ _jsx(Drawer, {
|
|
14
|
+
className: className,
|
|
15
|
+
slug: drawerSlug,
|
|
16
|
+
title: drawerTitle ?? '',
|
|
17
|
+
children: /*#__PURE__*/ _jsx(DrawerContent, {
|
|
18
|
+
data: data,
|
|
19
|
+
featureKey: featureKey,
|
|
20
|
+
handleDrawerSubmit: handleDrawerSubmit,
|
|
21
|
+
schemaPathSuffix: schemaPathSuffix
|
|
22
|
+
})
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
//# sourceMappingURL=Drawer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/utilities/fieldsDrawer/Drawer.tsx"],"sourcesContent":["'use client'\nimport type { FormState } from 'payload'\n\nimport { Drawer } from '@payloadcms/ui'\nimport React from 'react'\n\nimport { DrawerContent } from './DrawerContent.js'\n\nexport type FieldsDrawerProps = {\n className?: string\n data: any\n drawerSlug: string\n drawerTitle?: string\n featureKey: string\n handleDrawerSubmit: (fields: FormState, data: Record<string, unknown>) => void\n schemaPathSuffix?: string\n}\n\n/**\n * This FieldsDrawer component can be used to easily create a Drawer that contains a form with fields within your feature.\n * The fields are taken directly from the schema map based on your `featureKey` and `schemaPathSuffix`. Thus, this can only\n * be used if you provide your field schema inside the `generateSchemaMap` prop of your feature.server.ts.\n */\nexport const FieldsDrawer: React.FC<FieldsDrawerProps> = ({\n className,\n data,\n drawerSlug,\n drawerTitle,\n featureKey,\n handleDrawerSubmit,\n schemaPathSuffix,\n}) => {\n // The Drawer only renders its children (and itself) if it's open. Thus, by extracting the main content\n // to DrawerContent, this should be faster\n return (\n <Drawer className={className} slug={drawerSlug} title={drawerTitle ?? ''}>\n <DrawerContent\n data={data}\n featureKey={featureKey}\n handleDrawerSubmit={handleDrawerSubmit}\n schemaPathSuffix={schemaPathSuffix}\n />\n </Drawer>\n )\n}\n"],"names":["Drawer","React","DrawerContent","FieldsDrawer","className","data","drawerSlug","drawerTitle","featureKey","handleDrawerSubmit","schemaPathSuffix","slug","title"],"mappings":"AAAA;;AAGA,SAASA,MAAM,QAAQ,iBAAgB;AACvC,OAAOC,WAAW,QAAO;AAEzB,SAASC,aAAa,QAAQ,qBAAoB;AAYlD;;;;CAIC,GACD,OAAO,MAAMC,eAA4C,CAAC,EACxDC,SAAS,EACTC,IAAI,EACJC,UAAU,EACVC,WAAW,EACXC,UAAU,EACVC,kBAAkB,EAClBC,gBAAgB,EACjB;IACC,uGAAuG;IACvG,0CAA0C;IAC1C,qBACE,KAACV;QAAOI,WAAWA;QAAWO,MAAML;QAAYM,OAAOL,eAAe;kBACpE,cAAA,KAACL;YACCG,MAAMA;YACNG,YAAYA;YACZC,oBAAoBA;YACpBC,kBAAkBA;;;AAI1B,EAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DrawerContent.d.ts","sourceRoot":"","sources":["../../../src/utilities/fieldsDrawer/DrawerContent.tsx"],"names":[],"mappings":"AAcA,OAAO,KAA2C,MAAM,OAAO,CAAA;AAG/D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAIpD,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,iBAAiB,EAAE,YAAY,GAAG,aAAa,CAAC,CAmFzF,CAAA"}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
+
import { Form, FormSubmit, RenderFields, useConfig, useDocumentInfo, useFieldProps, useTranslation } from '@payloadcms/ui';
|
|
3
4
|
import { getFormState } from '@payloadcms/ui/shared';
|
|
4
5
|
import React, { useCallback, useEffect, useState } from 'react';
|
|
5
6
|
import { v4 as uuid } from 'uuid';
|
|
6
|
-
import { useEditorConfigContext } from '
|
|
7
|
-
const
|
|
8
|
-
export const LinkDrawer = ({ drawerSlug, handleModalSubmit, stateData })=>{
|
|
7
|
+
import { useEditorConfigContext } from '../../lexical/config/client/EditorConfigProvider.js';
|
|
8
|
+
export const DrawerContent = ({ data, featureKey, handleDrawerSubmit, schemaPathSuffix })=>{
|
|
9
9
|
const { t } = useTranslation();
|
|
10
10
|
const { id } = useDocumentInfo();
|
|
11
11
|
const { schemaPath } = useFieldProps();
|
|
12
12
|
const config = useConfig();
|
|
13
13
|
const [initialState, setInitialState] = useState(false);
|
|
14
14
|
const { field: { richTextComponentMap } } = useEditorConfigContext();
|
|
15
|
-
const componentMapRenderedFieldsPath = `feature.
|
|
16
|
-
const schemaFieldsPath = `${schemaPath}.feature
|
|
15
|
+
const componentMapRenderedFieldsPath = `feature.${featureKey}.fields${schemaPathSuffix ? `.${schemaPathSuffix}` : ''}`;
|
|
16
|
+
const schemaFieldsPath = `${schemaPath}.feature.${featureKey}${schemaPathSuffix ? `.${schemaPathSuffix}` : ''}`;
|
|
17
17
|
const fieldMap = richTextComponentMap.get(componentMapRenderedFieldsPath) // Field Schema
|
|
18
18
|
;
|
|
19
19
|
useEffect(()=>{
|
|
@@ -22,7 +22,7 @@ export const LinkDrawer = ({ drawerSlug, handleModalSubmit, stateData })=>{
|
|
|
22
22
|
apiRoute: config.routes.api,
|
|
23
23
|
body: {
|
|
24
24
|
id,
|
|
25
|
-
data
|
|
25
|
+
data,
|
|
26
26
|
operation: 'update',
|
|
27
27
|
schemaPath: schemaFieldsPath
|
|
28
28
|
},
|
|
@@ -31,7 +31,7 @@ export const LinkDrawer = ({ drawerSlug, handleModalSubmit, stateData })=>{
|
|
|
31
31
|
;
|
|
32
32
|
setInitialState(state);
|
|
33
33
|
};
|
|
34
|
-
if (
|
|
34
|
+
if (data) {
|
|
35
35
|
void awaitInitialState();
|
|
36
36
|
}
|
|
37
37
|
}, [
|
|
@@ -39,7 +39,7 @@ export const LinkDrawer = ({ drawerSlug, handleModalSubmit, stateData })=>{
|
|
|
39
39
|
config.serverURL,
|
|
40
40
|
schemaFieldsPath,
|
|
41
41
|
id,
|
|
42
|
-
|
|
42
|
+
data
|
|
43
43
|
]);
|
|
44
44
|
const onChange = useCallback(async ({ formState: prevFormState })=>{
|
|
45
45
|
return await getFormState({
|
|
@@ -58,37 +58,35 @@ export const LinkDrawer = ({ drawerSlug, handleModalSubmit, stateData })=>{
|
|
|
58
58
|
schemaFieldsPath,
|
|
59
59
|
id
|
|
60
60
|
]);
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
onChange
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
]
|
|
90
|
-
})
|
|
61
|
+
if (initialState === false) {
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
return /*#__PURE__*/ _jsxs(Form, {
|
|
65
|
+
beforeSubmit: [
|
|
66
|
+
onChange
|
|
67
|
+
],
|
|
68
|
+
disableValidationOnSubmit: true,
|
|
69
|
+
fields: Array.isArray(fieldMap) ? fieldMap : [],
|
|
70
|
+
initialState: initialState,
|
|
71
|
+
onChange: [
|
|
72
|
+
onChange
|
|
73
|
+
],
|
|
74
|
+
onSubmit: handleDrawerSubmit,
|
|
75
|
+
uuid: uuid(),
|
|
76
|
+
children: [
|
|
77
|
+
/*#__PURE__*/ _jsx(RenderFields, {
|
|
78
|
+
fieldMap: Array.isArray(fieldMap) ? fieldMap : [],
|
|
79
|
+
forceRender: true,
|
|
80
|
+
path: "" // See Blocks feature path for details as for why this is empty
|
|
81
|
+
,
|
|
82
|
+
readOnly: false,
|
|
83
|
+
schemaPath: schemaFieldsPath
|
|
84
|
+
}),
|
|
85
|
+
/*#__PURE__*/ _jsx(FormSubmit, {
|
|
86
|
+
children: t('fields:saveChanges')
|
|
87
|
+
})
|
|
88
|
+
]
|
|
91
89
|
});
|
|
92
90
|
};
|
|
93
91
|
|
|
94
|
-
//# sourceMappingURL=
|
|
92
|
+
//# sourceMappingURL=DrawerContent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/utilities/fieldsDrawer/DrawerContent.tsx"],"sourcesContent":["'use client'\nimport type { FormProps } from '@payloadcms/ui'\nimport type { FormState } from 'payload'\n\nimport {\n Form,\n FormSubmit,\n RenderFields,\n useConfig,\n useDocumentInfo,\n useFieldProps,\n useTranslation,\n} from '@payloadcms/ui'\nimport { getFormState } from '@payloadcms/ui/shared'\nimport React, { useCallback, useEffect, useState } from 'react'\nimport { v4 as uuid } from 'uuid'\n\nimport type { FieldsDrawerProps } from './Drawer.js'\n\nimport { useEditorConfigContext } from '../../lexical/config/client/EditorConfigProvider.js'\n\nexport const DrawerContent: React.FC<Omit<FieldsDrawerProps, 'drawerSlug' | 'drawerTitle'>> = ({\n data,\n featureKey,\n handleDrawerSubmit,\n schemaPathSuffix,\n}) => {\n const { t } = useTranslation()\n const { id } = useDocumentInfo()\n const { schemaPath } = useFieldProps()\n const config = useConfig()\n const [initialState, setInitialState] = useState<FormState | false>(false)\n const {\n field: { richTextComponentMap },\n } = useEditorConfigContext()\n\n const componentMapRenderedFieldsPath = `feature.${featureKey}.fields${schemaPathSuffix ? `.${schemaPathSuffix}` : ''}`\n const schemaFieldsPath = `${schemaPath}.feature.${featureKey}${schemaPathSuffix ? `.${schemaPathSuffix}` : ''}`\n\n const fieldMap = richTextComponentMap.get(componentMapRenderedFieldsPath) // Field Schema\n\n useEffect(() => {\n const awaitInitialState = async () => {\n const state = await getFormState({\n apiRoute: config.routes.api,\n body: {\n id,\n data,\n operation: 'update',\n schemaPath: schemaFieldsPath,\n },\n serverURL: config.serverURL,\n }) // Form State\n\n setInitialState(state)\n }\n\n if (data) {\n void awaitInitialState()\n }\n }, [config.routes.api, config.serverURL, schemaFieldsPath, id, data])\n\n const onChange: FormProps['onChange'][0] = useCallback(\n async ({ formState: prevFormState }) => {\n return await getFormState({\n apiRoute: config.routes.api,\n body: {\n id,\n formState: prevFormState,\n operation: 'update',\n schemaPath: schemaFieldsPath,\n },\n serverURL: config.serverURL,\n })\n },\n\n [config.routes.api, config.serverURL, schemaFieldsPath, id],\n )\n\n if (initialState === false) {\n return null\n }\n\n return (\n <Form\n beforeSubmit={[onChange]}\n disableValidationOnSubmit\n fields={Array.isArray(fieldMap) ? fieldMap : []}\n initialState={initialState}\n onChange={[onChange]}\n onSubmit={handleDrawerSubmit}\n uuid={uuid()}\n >\n <RenderFields\n fieldMap={Array.isArray(fieldMap) ? fieldMap : []}\n forceRender\n path=\"\" // See Blocks feature path for details as for why this is empty\n readOnly={false}\n schemaPath={schemaFieldsPath}\n />\n\n <FormSubmit>{t('fields:saveChanges')}</FormSubmit>\n </Form>\n )\n}\n"],"names":["Form","FormSubmit","RenderFields","useConfig","useDocumentInfo","useFieldProps","useTranslation","getFormState","React","useCallback","useEffect","useState","v4","uuid","useEditorConfigContext","DrawerContent","data","featureKey","handleDrawerSubmit","schemaPathSuffix","t","id","schemaPath","config","initialState","setInitialState","field","richTextComponentMap","componentMapRenderedFieldsPath","schemaFieldsPath","fieldMap","get","awaitInitialState","state","apiRoute","routes","api","body","operation","serverURL","onChange","formState","prevFormState","beforeSubmit","disableValidationOnSubmit","fields","Array","isArray","onSubmit","forceRender","path","readOnly"],"mappings":"AAAA;;AAIA,SACEA,IAAI,EACJC,UAAU,E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,GAAG;QAAEb,OAAOgB,SAAS;QAAEV;QAAkBR;QAAIL;KAAK;IAEpE,MAAMwB,WAAqC/B,YACzC,OAAO,EAAEgC,WAAWC,aAAa,EAAE;QACjC,OAAO,MAAMnC,aAAa;YACxB2B,UAAUX,OAAOY,MAAM,CAACC,GAAG;YAC3BC,MAAM;gBACJhB;gBACAoB,WAAWC;gBACXJ,WAAW;gBACXhB,YAAYO;YACd;YACAU,WAAWhB,OAAOgB,SAAS;QAC7B;IACF,GAEA;QAAChB,OAAOY,MAAM,CAACC,GAAG;QAAEb,OAAOgB,SAAS;QAAEV;QAAkBR;KAAG;IAG7D,IAAIG,iBAAiB,OAAO;QAC1B,OAAO;IACT;IAEA,qBACE,MAACxB;QACC2C,cAAc;YAACH;SAAS;QACxBI,yBAAyB;QACzBC,QAAQC,MAAMC,OAAO,CAACjB,YAAYA,WAAW,EAAE;QAC/CN,cAAcA;QACdgB,UAAU;YAACA;SAAS;QACpBQ,UAAU9B;QACVL,MAAMA;;0BAEN,KAACX;gBACC4B,UAAUgB,MAAMC,OAAO,CAACjB,YAAYA,WAAW,EAAE;gBACjDmB,WAAW;gBACXC,MAAK,GAAG,+DAA+D;;gBACvEC,UAAU;gBACV7B,YAAYO;;0BAGd,KAAC5B;0BAAYmB,EAAE;;;;AAGrB,EAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateSchemaMap.d.ts","sourceRoot":"","sources":["../../src/utilities/generateSchemaMap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"generateSchemaMap.d.ts","sourceRoot":"","sources":["../../src/utilities/generateSchemaMap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAI9C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA;AAE1E,eAAO,MAAM,oBAAoB,SACxB;IAAE,kBAAkB,EAAE,wBAAwB,CAAA;CAAE,KAAG,eAAe,CAAC,mBAAmB,CAkC5F,CAAA"}
|