@payloadcms/richtext-lexical 3.0.0-beta.45 → 3.0.0-beta.47
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/field/features/blocks/component/BlockContent.d.ts.map +1 -1
- package/dist/field/features/blocks/component/BlockContent.js +12 -9
- package/dist/field/features/blocks/component/BlockContent.js.map +1 -1
- package/dist/field/features/blocks/component/index.d.ts +0 -1
- package/dist/field/features/blocks/component/index.d.ts.map +1 -1
- package/dist/field/features/blocks/component/index.js +3 -6
- package/dist/field/features/blocks/component/index.js.map +1 -1
- package/dist/field/features/blocks/feature.server.d.ts.map +1 -1
- package/dist/field/features/blocks/feature.server.js +11 -65
- package/dist/field/features/blocks/feature.server.js.map +1 -1
- package/dist/field/features/blocks/{populationPromise.d.ts → graphQLPopulationPromise.d.ts} +1 -1
- package/dist/field/features/blocks/graphQLPopulationPromise.d.ts.map +1 -0
- package/dist/field/features/blocks/{populationPromise.js → graphQLPopulationPromise.js} +6 -7
- package/dist/field/features/blocks/graphQLPopulationPromise.js.map +1 -0
- package/dist/field/features/link/drawer/baseFields.d.ts +2 -2
- package/dist/field/features/link/drawer/baseFields.d.ts.map +1 -1
- package/dist/field/features/link/drawer/baseFields.js.map +1 -1
- package/dist/field/features/link/feature.server.d.ts +3 -3
- package/dist/field/features/link/feature.server.d.ts.map +1 -1
- package/dist/field/features/link/feature.server.js +16 -15
- package/dist/field/features/link/feature.server.js.map +1 -1
- package/dist/field/features/link/{populationPromise.d.ts → graphQLPopulationPromise.d.ts} +1 -1
- package/dist/field/features/link/graphQLPopulationPromise.d.ts.map +1 -0
- package/dist/field/features/link/{populationPromise.js → graphQLPopulationPromise.js} +4 -4
- package/dist/field/features/link/graphQLPopulationPromise.js.map +1 -0
- package/dist/field/features/link/nodes/AutoLinkNode.js +2 -0
- package/dist/field/features/link/nodes/AutoLinkNode.js.map +1 -1
- package/dist/field/features/link/nodes/LinkNode.d.ts +7 -6
- package/dist/field/features/link/nodes/LinkNode.d.ts.map +1 -1
- package/dist/field/features/link/nodes/LinkNode.js +23 -5
- package/dist/field/features/link/nodes/LinkNode.js.map +1 -1
- package/dist/field/features/link/nodes/types.d.ts +2 -1
- package/dist/field/features/link/nodes/types.d.ts.map +1 -1
- package/dist/field/features/link/nodes/types.js.map +1 -1
- package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -1
- package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.js +1 -0
- package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
- package/dist/field/features/link/plugins/floatingLinkEditor/utilities.d.ts +2 -2
- package/dist/field/features/link/plugins/floatingLinkEditor/utilities.d.ts.map +1 -1
- package/dist/field/features/link/plugins/floatingLinkEditor/utilities.js.map +1 -1
- package/dist/field/features/link/plugins/link/index.js +2 -2
- package/dist/field/features/link/plugins/link/index.js.map +1 -1
- package/dist/field/features/link/validate.d.ts +2 -1
- package/dist/field/features/link/validate.d.ts.map +1 -1
- package/dist/field/features/link/validate.js +5 -9
- package/dist/field/features/link/validate.js.map +1 -1
- package/dist/field/features/relationship/feature.server.d.ts.map +1 -1
- package/dist/field/features/relationship/feature.server.js +35 -4
- package/dist/field/features/relationship/feature.server.js.map +1 -1
- package/dist/field/features/relationship/{populationPromise.d.ts → graphQLPopulationPromise.d.ts} +1 -1
- package/dist/field/features/relationship/graphQLPopulationPromise.d.ts.map +1 -0
- package/dist/field/features/relationship/{populationPromise.js → graphQLPopulationPromise.js} +3 -4
- package/dist/field/features/relationship/graphQLPopulationPromise.js.map +1 -0
- package/dist/field/features/types.d.ts +114 -31
- package/dist/field/features/types.d.ts.map +1 -1
- package/dist/field/features/types.js.map +1 -1
- package/dist/field/features/upload/drawer/index.d.ts.map +1 -1
- package/dist/field/features/upload/drawer/index.js +0 -1
- package/dist/field/features/upload/drawer/index.js.map +1 -1
- package/dist/field/features/upload/feature.server.d.ts.map +1 -1
- package/dist/field/features/upload/feature.server.js +50 -3
- package/dist/field/features/upload/feature.server.js.map +1 -1
- package/dist/field/features/upload/{populationPromise.d.ts → graphQLPopulationPromise.d.ts} +1 -1
- package/dist/field/features/upload/graphQLPopulationPromise.d.ts.map +1 -0
- package/dist/field/features/upload/graphQLPopulationPromise.js +52 -0
- package/dist/field/features/upload/graphQLPopulationPromise.js.map +1 -0
- package/dist/field/features/upload/nodes/UploadNode.d.ts +3 -2
- package/dist/field/features/upload/nodes/UploadNode.d.ts.map +1 -1
- package/dist/field/features/upload/nodes/UploadNode.js +11 -2
- package/dist/field/features/upload/nodes/UploadNode.js.map +1 -1
- package/dist/field/features/upload/plugin/index.d.ts +1 -1
- package/dist/field/features/upload/plugin/index.d.ts.map +1 -1
- package/dist/field/features/upload/plugin/index.js +1 -0
- package/dist/field/features/upload/plugin/index.js.map +1 -1
- package/dist/field/lexical/config/server/loader.d.ts.map +1 -1
- package/dist/field/lexical/config/server/loader.js.map +1 -1
- package/dist/field/lexical/config/server/sanitize.d.ts.map +1 -1
- package/dist/field/lexical/config/server/sanitize.js +11 -7
- package/dist/field/lexical/config/server/sanitize.js.map +1 -1
- package/dist/field/lexical/nodes/index.d.ts +1 -2
- package/dist/field/lexical/nodes/index.d.ts.map +1 -1
- package/dist/field/lexical/nodes/index.js.map +1 -1
- package/dist/field/lexical/utils/nodeFormat.d.ts +1 -2
- package/dist/field/lexical/utils/nodeFormat.d.ts.map +1 -1
- package/dist/field/lexical/utils/nodeFormat.js +1 -1
- package/dist/field/lexical/utils/nodeFormat.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +416 -119
- package/dist/index.js.map +1 -1
- package/dist/populateGraphQL/defaultValue.d.ts.map +1 -0
- package/dist/populateGraphQL/defaultValue.js.map +1 -0
- package/dist/populateGraphQL/populate.d.ts +17 -0
- package/dist/populateGraphQL/populate.d.ts.map +1 -0
- package/dist/{populate → populateGraphQL}/populate.js +6 -1
- package/dist/populateGraphQL/populate.js.map +1 -0
- package/dist/{populate → populateGraphQL}/populateLexicalPopulationPromises.d.ts +1 -1
- package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts.map +1 -0
- package/dist/{populate → populateGraphQL}/populateLexicalPopulationPromises.js +2 -1
- package/dist/populateGraphQL/populateLexicalPopulationPromises.js.map +1 -0
- package/dist/{populate/recurseNestedFields.d.ts → populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts} +2 -2
- package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts.map +1 -0
- package/dist/{populate/recurseNestedFields.js → populateGraphQL/recursivelyPopulateFieldsForGraphQL.js} +6 -3
- package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.js.map +1 -0
- package/dist/recurseNodeTree.d.ts +9 -0
- package/dist/recurseNodeTree.d.ts.map +1 -0
- package/dist/recurseNodeTree.js +27 -0
- package/dist/recurseNodeTree.js.map +1 -0
- package/package.json +9 -9
- package/dist/field/features/blocks/populationPromise.d.ts.map +0 -1
- package/dist/field/features/blocks/populationPromise.js.map +0 -1
- package/dist/field/features/link/populationPromise.d.ts.map +0 -1
- package/dist/field/features/link/populationPromise.js.map +0 -1
- package/dist/field/features/relationship/populationPromise.d.ts.map +0 -1
- package/dist/field/features/relationship/populationPromise.js.map +0 -1
- package/dist/field/features/upload/populationPromise.d.ts.map +0 -1
- package/dist/field/features/upload/populationPromise.js +0 -52
- package/dist/field/features/upload/populationPromise.js.map +0 -1
- package/dist/populate/defaultValue.d.ts.map +0 -1
- package/dist/populate/defaultValue.js.map +0 -1
- package/dist/populate/populate.d.ts +0 -22
- package/dist/populate/populate.d.ts.map +0 -1
- package/dist/populate/populate.js.map +0 -1
- package/dist/populate/populateLexicalPopulationPromises.d.ts.map +0 -1
- package/dist/populate/populateLexicalPopulationPromises.js.map +0 -1
- package/dist/populate/recurseNestedFields.d.ts.map +0 -1
- package/dist/populate/recurseNestedFields.js.map +0 -1
- /package/dist/{populate → populateGraphQL}/defaultValue.d.ts +0 -0
- /package/dist/{populate → populateGraphQL}/defaultValue.js +0 -0
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import type { JSONSchema4 } from 'json-schema'\nimport type { EditorConfig as LexicalEditorConfig } from 'lexical'\n\nimport { withMergedProps } from '@payloadcms/ui/elements/withMergedProps'\nimport { withNullableJSONSchemaType } from 'payload/utilities'\n\nimport type { FeatureProviderServer, ResolvedServerFeatureMap } from './field/features/types.js'\nimport type { SanitizedServerEditorConfig } from './field/lexical/config/types.js'\nimport type {\n AdapterProps,\n LexicalEditorProps,\n LexicalRichTextAdapter,\n LexicalRichTextAdapterProvider,\n} from './types.js'\n\nimport { RichTextCell } from './cell/index.js'\nimport { RichTextField } from './field/index.js'\nimport {\n defaultEditorConfig,\n defaultEditorFeatures,\n} from './field/lexical/config/server/default.js'\nimport { loadFeatures } from './field/lexical/config/server/loader.js'\nimport {\n sanitizeServerEditorConfig,\n sanitizeServerFeatures,\n} from './field/lexical/config/server/sanitize.js'\nimport { cloneDeep } from './field/lexical/utils/cloneDeep.js'\nimport { getGenerateComponentMap } from './generateComponentMap.js'\nimport { getGenerateSchemaMap } from './generateSchemaMap.js'\nimport { i18n } from './i18n.js'\nimport { populateLexicalPopulationPromises } from './populate/populateLexicalPopulationPromises.js'\nimport { richTextValidateHOC } from './validate/index.js'\n\nlet defaultSanitizedServerEditorConfig: SanitizedServerEditorConfig = null\n\nexport function lexicalEditor(props?: LexicalEditorProps): LexicalRichTextAdapterProvider {\n return async ({ config, isRoot }) => {\n let features: FeatureProviderServer<unknown, unknown>[] = []\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>[] = []\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>[])\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 i18n: featureI18n,\n /* hooks: {\n afterChange: finalSanitizedEditorConfig.features.hooks.afterChange,\n afterRead: finalSanitizedEditorConfig.features.hooks.afterRead,\n beforeChange: finalSanitizedEditorConfig.features.hooks.beforeChange,\n beforeDuplicate: finalSanitizedEditorConfig.features.hooks.beforeDuplicate,\n beforeValidate: finalSanitizedEditorConfig.features.hooks.beforeValidate,\n },*/\n /* // TODO: Figure out docWithLocales / originalSiblingDoc => node matching. Can't use indexes, as the order of nodes could technically change between hooks.\n hooks: {\n afterChange: [\n async ({ context, findMany, operation, overrideAccess, req, value }) => {\n await recurseNodesAsync({\n callback: async (node) => {\n const afterChangeHooks = finalSanitizedEditorConfig.features.hooks.afterChange\n if (afterChangeHooks?.has(node.type)) {\n for (const hook of afterChangeHooks.get(node.type)) {\n node = await hook({ context, findMany, node, operation, overrideAccess, req })\n }\n }\n },\n nodes: (value as SerializedEditorState)?.root?.children ?? [],\n })\n\n return value\n },\n ],\n afterRead: [\n async ({ context, findMany, operation, overrideAccess, req, value }) => {\n await recurseNodesAsync({\n callback: async (node) => {\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({ context, findMany, node, operation, overrideAccess, req })\n }\n }\n },\n nodes: (value as SerializedEditorState)?.root?.children ?? [],\n })\n\n return value\n },\n ],\n beforeChange: [\n async ({ context, findMany, operation, overrideAccess, req, value }) => {\n await recurseNodesAsync({\n callback: async (node) => {\n const beforeChangeHooks = finalSanitizedEditorConfig.features.hooks.beforeChange\n if (beforeChangeHooks?.has(node.type)) {\n for (const hook of beforeChangeHooks.get(node.type)) {\n node = await hook({ context, findMany, node, operation, overrideAccess, req })\n }\n }\n },\n nodes: (value as SerializedEditorState)?.root?.children ?? [],\n })\n\n return value\n },\n ],\n beforeDuplicate: [\n async ({ context, findMany, operation, overrideAccess, req, value }) => {\n await recurseNodesAsync({\n callback: async (node) => {\n const beforeDuplicateHooks = finalSanitizedEditorConfig.features.hooks.beforeDuplicate\n if (beforeDuplicateHooks?.has(node.type)) {\n for (const hook of beforeDuplicateHooks.get(node.type)) {\n node = await hook({ context, findMany, node, operation, overrideAccess, req })\n }\n }\n },\n nodes: (value as SerializedEditorState)?.root?.children ?? [],\n })\n\n return value\n },\n ],\n beforeValidate: [\n async ({ context, findMany, operation, overrideAccess, req, value }) => {\n await recurseNodesAsync({\n callback: async (node) => {\n const beforeValidateHooks = finalSanitizedEditorConfig.features.hooks.beforeValidate\n if (beforeValidateHooks?.has(node.type)) {\n for (const hook of beforeValidateHooks.get(node.type)) {\n /**\n * We cannot pass the originalNode here, as there is no way to map one node to a previous one, as a previous originalNode might be in a different position\n */ /*\n node = await hook({ context, findMany, node, operation, overrideAccess, req })\n }\n }\n },\n nodes: (value as SerializedEditorState)?.root?.children ?? [],\n })\n\n return value\n },\n ],\n },*/\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 populationPromises({\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?.populationPromises?.size) {\n populateLexicalPopulationPromises({\n context,\n currentDepth,\n depth,\n draft,\n editorPopulationPromises: finalSanitizedEditorConfig.features.populationPromises,\n field,\n fieldPromises,\n findMany,\n flattenLocales,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc,\n })\n }\n },\n validate: richTextValidateHOC({\n editorConfig: finalSanitizedEditorConfig,\n }),\n }\n }\n}\n\nexport { AlignFeature } from './field/features/align/feature.server.js'\nexport { BlockquoteFeature } from './field/features/blockquote/feature.server.js'\nexport { BlocksFeature, type BlocksFeatureProps } from './field/features/blocks/feature.server.js'\nexport {\n $createBlockNode,\n $isBlockNode,\n type BlockFields,\n BlockNode,\n type SerializedBlockNode,\n} from './field/features/blocks/nodes/BlocksNode.js'\n\nexport { LinebreakHTMLConverter } from './field/features/converters/html/converter/converters/linebreak.js'\nexport { ParagraphHTMLConverter } from './field/features/converters/html/converter/converters/paragraph.js'\nexport { TextHTMLConverter } from './field/features/converters/html/converter/converters/text.js'\n\nexport { defaultHTMLConverters } from './field/features/converters/html/converter/defaultConverters.js'\nexport {\n convertLexicalNodesToHTML,\n convertLexicalToHTML,\n} from './field/features/converters/html/converter/index.js'\nexport type { HTMLConverter } from './field/features/converters/html/converter/types.js'\nexport {\n HTMLConverterFeature,\n type HTMLConverterFeatureProps,\n} from './field/features/converters/html/feature.server.js'\nexport {\n consolidateHTMLConverters,\n lexicalHTML,\n} from './field/features/converters/html/field/index.js'\nexport { TestRecorderFeature } from './field/features/debug/testRecorder/feature.server.js'\nexport { TreeViewFeature } from './field/features/debug/treeView/feature.server.js'\nexport { BoldFeature } from './field/features/format/bold/feature.server.js'\nexport { InlineCodeFeature } from './field/features/format/inlineCode/feature.server.js'\n\nexport { ItalicFeature } from './field/features/format/italic/feature.server.js'\nexport { toolbarFormatGroupWithItems } from './field/features/format/shared/toolbarFormatGroup.js'\nexport { StrikethroughFeature } from './field/features/format/strikethrough/feature.server.js'\nexport { SubscriptFeature } from './field/features/format/subscript/feature.server.js'\nexport { SuperscriptFeature } from './field/features/format/superscript/feature.server.js'\nexport { UnderlineFeature } from './field/features/format/underline/feature.server.js'\nexport {\n HeadingFeature,\n type HeadingFeatureProps,\n} from './field/features/heading/feature.server.js'\nexport { HorizontalRuleFeature } from './field/features/horizontalRule/feature.server.js'\n\nexport { IndentFeature } from './field/features/indent/feature.server.js'\nexport { LinkFeature, type LinkFeatureServerProps } from './field/features/link/feature.server.js'\n\nexport {\n $createAutoLinkNode,\n $isAutoLinkNode,\n AutoLinkNode,\n} from './field/features/link/nodes/AutoLinkNode.js'\nexport {\n $createLinkNode,\n $isLinkNode,\n LinkNode,\n TOGGLE_LINK_COMMAND,\n} from './field/features/link/nodes/LinkNode.js'\nexport type {\n LinkFields,\n SerializedAutoLinkNode,\n SerializedLinkNode,\n} from './field/features/link/nodes/types.js'\nexport { ChecklistFeature } from './field/features/lists/checklist/feature.server.js'\nexport { OrderedListFeature } from './field/features/lists/orderedList/feature.server.js'\nexport { UnorderedListFeature } from './field/features/lists/unorderedList/feature.server.js'\nexport { LexicalPluginToLexicalFeature } from './field/features/migrations/lexicalPluginToLexical/feature.server.js'\nexport { SlateBlockquoteConverter } from './field/features/migrations/slateToLexical/converter/converters/blockquote/index.js'\nexport { SlateHeadingConverter } from './field/features/migrations/slateToLexical/converter/converters/heading/index.js'\nexport { SlateIndentConverter } from './field/features/migrations/slateToLexical/converter/converters/indent/index.js'\nexport { SlateLinkConverter } from './field/features/migrations/slateToLexical/converter/converters/link/index.js'\nexport { SlateListItemConverter } from './field/features/migrations/slateToLexical/converter/converters/listItem/index.js'\nexport { SlateOrderedListConverter } from './field/features/migrations/slateToLexical/converter/converters/orderedList/index.js'\nexport { SlateRelationshipConverter } from './field/features/migrations/slateToLexical/converter/converters/relationship/index.js'\nexport { SlateUnknownConverter } from './field/features/migrations/slateToLexical/converter/converters/unknown/index.js'\nexport { SlateUnorderedListConverter } from './field/features/migrations/slateToLexical/converter/converters/unorderedList/index.js'\nexport { SlateUploadConverter } from './field/features/migrations/slateToLexical/converter/converters/upload/index.js'\nexport { defaultSlateConverters } from './field/features/migrations/slateToLexical/converter/defaultConverters.js'\n\nexport {\n convertSlateNodesToLexical,\n convertSlateToLexical,\n} from './field/features/migrations/slateToLexical/converter/index.js'\nexport type {\n SlateNode,\n SlateNodeConverter,\n} from './field/features/migrations/slateToLexical/converter/types.js'\nexport { SlateToLexicalFeature } from './field/features/migrations/slateToLexical/feature.server.js'\n\nexport { ParagraphFeature } from './field/features/paragraph/feature.server.js'\nexport {\n RelationshipFeature,\n type RelationshipFeatureProps,\n} from './field/features/relationship/feature.server.js'\nexport {\n $createRelationshipNode,\n $isRelationshipNode,\n type RelationshipData,\n RelationshipNode,\n type SerializedRelationshipNode,\n} from './field/features/relationship/nodes/RelationshipNode.js'\nexport { toolbarAddDropdownGroupWithItems } from './field/features/shared/toolbar/addDropdownGroup.js'\nexport { toolbarFeatureButtonsGroupWithItems } from './field/features/shared/toolbar/featureButtonsGroup.js'\n\nexport { toolbarTextDropdownGroupWithItems } from './field/features/shared/toolbar/textDropdownGroup.js'\nexport { FixedToolbarFeature } from './field/features/toolbars/fixed/feature.server.js'\nexport { InlineToolbarFeature } from './field/features/toolbars/inline/feature.server.js'\n\nexport type { ToolbarGroup, ToolbarGroupItem } from './field/features/toolbars/types.js'\nexport { createNode } from './field/features/typeUtilities.js'\nexport type {\n ClientComponentProps,\n ClientFeature,\n ClientFeatureProviderMap,\n FeatureProviderClient,\n FeatureProviderProviderClient,\n FeatureProviderProviderServer,\n FeatureProviderServer,\n FieldNodeHook,\n FieldNodeHookArgs,\n NodeValidation,\n NodeWithHooks,\n PluginComponent,\n PluginComponentWithAnchor,\n PopulationPromise,\n ResolvedClientFeature,\n ResolvedClientFeatureMap,\n ResolvedServerFeature,\n ResolvedServerFeatureMap,\n SanitizedClientFeatures,\n SanitizedPlugin,\n SanitizedServerFeatures,\n ServerFeature,\n ServerFeatureProviderMap,\n} from './field/features/types.js'\n\nexport { UploadFeature } from './field/features/upload/feature.server.js'\n\nexport type { UploadFeatureProps } from './field/features/upload/feature.server.js'\nexport {\n $createUploadNode,\n $isUploadNode,\n type SerializedUploadNode,\n type UploadData,\n UploadNode,\n} from './field/features/upload/nodes/UploadNode.js'\n\nexport {\n type EditorConfigContextType,\n EditorConfigProvider,\n useEditorConfigContext,\n} from './field/lexical/config/client/EditorConfigProvider.js'\nexport {\n sanitizeClientEditorConfig,\n sanitizeClientFeatures,\n} from './field/lexical/config/client/sanitize.js'\nexport {\n defaultEditorConfig,\n defaultEditorFeatures,\n defaultEditorLexicalConfig,\n} from './field/lexical/config/server/default.js'\nexport {\n loadFeatures,\n sortFeaturesForOptimalLoading,\n} from './field/lexical/config/server/loader.js'\n\nexport {\n sanitizeServerEditorConfig,\n sanitizeServerFeatures,\n} from './field/lexical/config/server/sanitize.js'\nexport type {\n ClientEditorConfig,\n SanitizedClientEditorConfig,\n SanitizedServerEditorConfig,\n ServerEditorConfig,\n} from './field/lexical/config/types.js'\n\nexport { getEnabledNodes } from './field/lexical/nodes/index.js'\nexport { ENABLE_SLASH_MENU_COMMAND } from './field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js'\nexport type { AdapterProps }\n\nexport type {\n SlashMenuGroup,\n SlashMenuItem,\n} from './field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js'\nexport { CAN_USE_DOM } from './field/lexical/utils/canUseDOM.js'\nexport { cloneDeep } from './field/lexical/utils/cloneDeep.js'\nexport { getDOMRangeRect } from './field/lexical/utils/getDOMRangeRect.js'\nexport { getSelectedNode } from './field/lexical/utils/getSelectedNode.js'\nexport { isHTMLElement } from './field/lexical/utils/guard.js'\nexport { invariant } from './field/lexical/utils/invariant.js'\nexport { joinClasses } from './field/lexical/utils/joinClasses.js'\nexport { createBlockNode } from './field/lexical/utils/markdown/createBlockNode.js'\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 './field/lexical/utils/nodeFormat.js'\nexport { Point, isPoint } from './field/lexical/utils/point.js'\nexport { Rect } from './field/lexical/utils/rect.js'\nexport { setFloatingElemPosition } from './field/lexical/utils/setFloatingElemPosition.js'\nexport { setFloatingElemPositionForLinkEditor } from './field/lexical/utils/setFloatingElemPositionForLinkEditor.js'\nexport {\n addSwipeDownListener,\n addSwipeLeftListener,\n addSwipeRightListener,\n addSwipeUpListener,\n} from './field/lexical/utils/swipe.js'\nexport { sanitizeUrl, validateUrl } from './field/lexical/utils/url.js'\nexport { defaultRichTextValue } from './populate/defaultValue.js'\n\nexport type { LexicalEditorProps, LexicalRichTextAdapter } from './types.js'\n"],"names":["withMergedProps","withNullableJSONSchemaType","RichTextCell","RichTextField","defaultEditorConfig","defaultEditorFeatures","loadFeatures","sanitizeServerEditorConfig","sanitizeServerFeatures","cloneDeep","getGenerateComponentMap","getGenerateSchemaMap","i18n","populateLexicalPopulationPromises","richTextValidateHOC","defaultSanitizedServerEditorConfig","lexicalEditor","props","config","isRoot","features","resolvedFeatureMap","finalSanitizedEditorConfig","lexical","rootEditor","editor","rootEditorFeatures","defaultFeatures","rootFeatures","unSanitizedEditorConfig","featureI18n","lang","general","CellComponent","Component","toMergeIntoProps","admin","lexicalEditorConfig","FieldComponent","editorConfig","generateComponentMap","generateSchemaMap","outputSchema","collectionIDFieldTypes","field","interfaceNameDefinitions","isRequired","type","properties","root","additionalProperties","children","items","version","required","direction","oneOf","enum","format","indent","modifyOutputSchema","generatedTypes","modifyOutputSchemas","currentSchema","populationPromises","context","currentDepth","depth","draft","fieldPromises","findMany","flattenLocales","overrideAccess","req","showHiddenFields","siblingDoc","size","editorPopulationPromises","validate","AlignFeature","BlockquoteFeature","BlocksFeature","$createBlockNode","$isBlockNode","BlockNode","LinebreakHTMLConverter","ParagraphHTMLConverter","TextHTMLConverter","defaultHTMLConverters","convertLexicalNodesToHTML","convertLexicalToHTML","HTMLConverterFeature","consolidateHTMLConverters","lexicalHTML","TestRecorderFeature","TreeViewFeature","BoldFeature","InlineCodeFeature","ItalicFeature","toolbarFormatGroupWithItems","StrikethroughFeature","SubscriptFeature","SuperscriptFeature","UnderlineFeature","HeadingFeature","HorizontalRuleFeature","IndentFeature","LinkFeature","$createAutoLinkNode","$isAutoLinkNode","AutoLinkNode","$createLinkNode","$isLinkNode","LinkNode","TOGGLE_LINK_COMMAND","ChecklistFeature","OrderedListFeature","UnorderedListFeature","LexicalPluginToLexicalFeature","SlateBlockquoteConverter","SlateHeadingConverter","SlateIndentConverter","SlateLinkConverter","SlateListItemConverter","SlateOrderedListConverter","SlateRelationshipConverter","SlateUnknownConverter","SlateUnorderedListConverter","SlateUploadConverter","defaultSlateConverters","convertSlateNodesToLexical","convertSlateToLexical","SlateToLexicalFeature","ParagraphFeature","RelationshipFeature","$createRelationshipNode","$isRelationshipNode","RelationshipNode","toolbarAddDropdownGroupWithItems","toolbarFeatureButtonsGroupWithItems","toolbarTextDropdownGroupWithItems","FixedToolbarFeature","InlineToolbarFeature","createNode","UploadFeature","$createUploadNode","$isUploadNode","UploadNode","EditorConfigProvider","useEditorConfigContext","sanitizeClientEditorConfig","sanitizeClientFeatures","defaultEditorLexicalConfig","sortFeaturesForOptimalLoading","getEnabledNodes","ENABLE_SLASH_MENU_COMMAND","CAN_USE_DOM","getDOMRangeRect","getSelectedNode","isHTMLElement","invariant","joinClasses","createBlockNode","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","Point","isPoint","Rect","setFloatingElemPosition","setFloatingElemPositionForLinkEditor","addSwipeDownListener","addSwipeLeftListener","addSwipeRightListener","addSwipeUpListener","sanitizeUrl","validateUrl","defaultRichTextValue"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAGA,SAASA,eAAe,QAAQ,0CAAyC;AACzE,SAASC,0BAA0B,QAAQ,oBAAmB;AAW9D,SAASC,YAAY,QAAQ,kBAAiB;AAC9C,SAASC,aAAa,QAAQ,mBAAkB;AAChD,SACEC,mBAAmB,EACnBC,qBAAqB,QAChB,2CAA0C;AACjD,SAASC,YAAY,QAAQ,0CAAyC;AACtE,SACEC,0BAA0B,EAC1BC,sBAAsB,QACjB,4CAA2C;AAClD,SAASC,SAAS,QAAQ,qCAAoC;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Q,iCAAgC;AAChE,SAASC,yBAAyB,QAAQ,wEAAuE;AAOjH,SAASC,WAAW,QAAQ,qCAAoC;AAChE,SAASnJ,SAAS,QAAQ,qCAAoC;AAC9D,SAASoJ,eAAe,QAAQ,2CAA0C;AAC1E,SAASC,eAAe,QAAQ,2CAA0C;AAC1E,SAASC,aAAa,QAAQ,iCAAgC;AAC9D,SAASC,SAAS,QAAQ,qCAAoC;AAC9D,SAASC,WAAW,QAAQ,uCAAsC;AAClE,SAASC,eAAe,QAAQ,oDAAmD;AACnF,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,sCAAqC;AAC5C,SAASC,KAAK,EAAEC,OAAO,QAAQ,iCAAgC;AAC/D,SAASC,IAAI,QAAQ,gCAA+B;AACpD,SAASC,uBAAuB,QAAQ,mDAAkD;AAC1F,SAASC,oCAAoC,QAAQ,gEAA+D;AACpH,SACEC,oBAAoB,EACpBC,oBAAoB,EACpBC,qBAAqB,EACrBC,kBAAkB,QACb,iCAAgC;AACvC,SAASC,WAAW,EAAEC,WAAW,QAAQ,+BAA8B;AACvE,SAASC,oBAAoB,QAAQ,6BAA4B"}
|
|
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/elements/withMergedProps'\nimport {\n afterChangeTraverseFields,\n afterReadTraverseFields,\n beforeChangeTraverseFields,\n beforeValidateTraverseFields,\n withNullableJSONSchemaType,\n} from 'payload/utilities'\n\nimport type { FeatureProviderServer, ResolvedServerFeatureMap } from './field/features/types.js'\nimport type { SanitizedServerEditorConfig } from './field/lexical/config/types.js'\nimport type {\n AdapterProps,\n LexicalEditorProps,\n LexicalRichTextAdapter,\n LexicalRichTextAdapterProvider,\n} from './types.js'\n\nimport { RichTextCell } from './cell/index.js'\nimport { RichTextField } from './field/index.js'\nimport {\n defaultEditorConfig,\n defaultEditorFeatures,\n} from './field/lexical/config/server/default.js'\nimport { loadFeatures } from './field/lexical/config/server/loader.js'\nimport {\n sanitizeServerEditorConfig,\n sanitizeServerFeatures,\n} from './field/lexical/config/server/sanitize.js'\nimport { cloneDeep } from './field/lexical/utils/cloneDeep.js'\nimport { getGenerateComponentMap } from './generateComponentMap.js'\nimport { getGenerateSchemaMap } from './generateSchemaMap.js'\nimport { i18n } from './i18n.js'\nimport { populateLexicalPopulationPromises } from './populateGraphQL/populateLexicalPopulationPromises.js'\nimport { recurseNodeTree } from './recurseNodeTree.js'\nimport { richTextValidateHOC } from './validate/index.js'\n\nlet defaultSanitizedServerEditorConfig: SanitizedServerEditorConfig = null\n\nexport function lexicalEditor(props?: LexicalEditorProps): LexicalRichTextAdapterProvider {\n return async ({ config, isRoot }) => {\n let features: FeatureProviderServer<unknown, unknown>[] = []\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>[] = []\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>[])\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 = 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 './field/features/align/feature.server.js'\nexport { BlockquoteFeature } from './field/features/blockquote/feature.server.js'\nexport { BlocksFeature, type BlocksFeatureProps } from './field/features/blocks/feature.server.js'\nexport {\n $createBlockNode,\n $isBlockNode,\n type BlockFields,\n BlockNode,\n type SerializedBlockNode,\n} from './field/features/blocks/nodes/BlocksNode.js'\n\nexport { LinebreakHTMLConverter } from './field/features/converters/html/converter/converters/linebreak.js'\nexport { ParagraphHTMLConverter } from './field/features/converters/html/converter/converters/paragraph.js'\nexport { TextHTMLConverter } from './field/features/converters/html/converter/converters/text.js'\n\nexport { defaultHTMLConverters } from './field/features/converters/html/converter/defaultConverters.js'\nexport {\n convertLexicalNodesToHTML,\n convertLexicalToHTML,\n} from './field/features/converters/html/converter/index.js'\nexport type { HTMLConverter } from './field/features/converters/html/converter/types.js'\nexport {\n HTMLConverterFeature,\n type HTMLConverterFeatureProps,\n} from './field/features/converters/html/feature.server.js'\nexport {\n consolidateHTMLConverters,\n lexicalHTML,\n} from './field/features/converters/html/field/index.js'\nexport { TestRecorderFeature } from './field/features/debug/testRecorder/feature.server.js'\nexport { TreeViewFeature } from './field/features/debug/treeView/feature.server.js'\nexport { BoldFeature } from './field/features/format/bold/feature.server.js'\nexport { InlineCodeFeature } from './field/features/format/inlineCode/feature.server.js'\n\nexport { ItalicFeature } from './field/features/format/italic/feature.server.js'\nexport { toolbarFormatGroupWithItems } from './field/features/format/shared/toolbarFormatGroup.js'\nexport { StrikethroughFeature } from './field/features/format/strikethrough/feature.server.js'\nexport { SubscriptFeature } from './field/features/format/subscript/feature.server.js'\nexport { SuperscriptFeature } from './field/features/format/superscript/feature.server.js'\nexport { UnderlineFeature } from './field/features/format/underline/feature.server.js'\nexport {\n HeadingFeature,\n type HeadingFeatureProps,\n} from './field/features/heading/feature.server.js'\nexport { HorizontalRuleFeature } from './field/features/horizontalRule/feature.server.js'\n\nexport { IndentFeature } from './field/features/indent/feature.server.js'\nexport { LinkFeature, type LinkFeatureServerProps } from './field/features/link/feature.server.js'\n\nexport {\n $createAutoLinkNode,\n $isAutoLinkNode,\n AutoLinkNode,\n} from './field/features/link/nodes/AutoLinkNode.js'\nexport {\n $createLinkNode,\n $isLinkNode,\n LinkNode,\n TOGGLE_LINK_COMMAND,\n} from './field/features/link/nodes/LinkNode.js'\nexport type {\n LinkFields,\n SerializedAutoLinkNode,\n SerializedLinkNode,\n} from './field/features/link/nodes/types.js'\nexport { ChecklistFeature } from './field/features/lists/checklist/feature.server.js'\nexport { OrderedListFeature } from './field/features/lists/orderedList/feature.server.js'\nexport { UnorderedListFeature } from './field/features/lists/unorderedList/feature.server.js'\nexport { LexicalPluginToLexicalFeature } from './field/features/migrations/lexicalPluginToLexical/feature.server.js'\nexport { SlateBlockquoteConverter } from './field/features/migrations/slateToLexical/converter/converters/blockquote/index.js'\nexport { SlateHeadingConverter } from './field/features/migrations/slateToLexical/converter/converters/heading/index.js'\nexport { SlateIndentConverter } from './field/features/migrations/slateToLexical/converter/converters/indent/index.js'\nexport { SlateLinkConverter } from './field/features/migrations/slateToLexical/converter/converters/link/index.js'\nexport { SlateListItemConverter } from './field/features/migrations/slateToLexical/converter/converters/listItem/index.js'\nexport { SlateOrderedListConverter } from './field/features/migrations/slateToLexical/converter/converters/orderedList/index.js'\nexport { SlateRelationshipConverter } from './field/features/migrations/slateToLexical/converter/converters/relationship/index.js'\nexport { SlateUnknownConverter } from './field/features/migrations/slateToLexical/converter/converters/unknown/index.js'\nexport { SlateUnorderedListConverter } from './field/features/migrations/slateToLexical/converter/converters/unorderedList/index.js'\nexport { SlateUploadConverter } from './field/features/migrations/slateToLexical/converter/converters/upload/index.js'\nexport { defaultSlateConverters } from './field/features/migrations/slateToLexical/converter/defaultConverters.js'\n\nexport {\n convertSlateNodesToLexical,\n convertSlateToLexical,\n} from './field/features/migrations/slateToLexical/converter/index.js'\nexport type {\n SlateNode,\n SlateNodeConverter,\n} from './field/features/migrations/slateToLexical/converter/types.js'\nexport { SlateToLexicalFeature } from './field/features/migrations/slateToLexical/feature.server.js'\n\nexport { ParagraphFeature } from './field/features/paragraph/feature.server.js'\nexport {\n RelationshipFeature,\n type RelationshipFeatureProps,\n} from './field/features/relationship/feature.server.js'\nexport {\n $createRelationshipNode,\n $isRelationshipNode,\n type RelationshipData,\n RelationshipNode,\n type SerializedRelationshipNode,\n} from './field/features/relationship/nodes/RelationshipNode.js'\nexport { toolbarAddDropdownGroupWithItems } from './field/features/shared/toolbar/addDropdownGroup.js'\nexport { toolbarFeatureButtonsGroupWithItems } from './field/features/shared/toolbar/featureButtonsGroup.js'\n\nexport { toolbarTextDropdownGroupWithItems } from './field/features/shared/toolbar/textDropdownGroup.js'\nexport { FixedToolbarFeature } from './field/features/toolbars/fixed/feature.server.js'\nexport { InlineToolbarFeature } from './field/features/toolbars/inline/feature.server.js'\n\nexport type { ToolbarGroup, ToolbarGroupItem } from './field/features/toolbars/types.js'\nexport { createNode } from './field/features/typeUtilities.js'\nexport type {\n AfterChangeNodeHook,\n AfterChangeNodeHookArgs,\n AfterReadNodeHook,\n AfterReadNodeHookArgs,\n BaseNodeHookArgs,\n BeforeChangeNodeHook,\n BeforeChangeNodeHookArgs,\n BeforeValidateNodeHook,\n BeforeValidateNodeHookArgs,\n ClientComponentProps,\n ClientFeature,\n ClientFeatureProviderMap,\n FeatureProviderClient,\n FeatureProviderProviderClient,\n FeatureProviderProviderServer,\n FeatureProviderServer,\n NodeValidation,\n NodeWithHooks,\n PluginComponent,\n PluginComponentWithAnchor,\n PopulationPromise,\n ResolvedClientFeature,\n ResolvedClientFeatureMap,\n ResolvedServerFeature,\n ResolvedServerFeatureMap,\n SanitizedClientFeatures,\n SanitizedPlugin,\n SanitizedServerFeatures,\n ServerFeature,\n ServerFeatureProviderMap,\n} from './field/features/types.js'\n\nexport { UploadFeature } from './field/features/upload/feature.server.js'\n\nexport type { UploadFeatureProps } from './field/features/upload/feature.server.js'\nexport {\n $createUploadNode,\n $isUploadNode,\n type SerializedUploadNode,\n type UploadData,\n UploadNode,\n} from './field/features/upload/nodes/UploadNode.js'\n\nexport {\n type EditorConfigContextType,\n EditorConfigProvider,\n useEditorConfigContext,\n} from './field/lexical/config/client/EditorConfigProvider.js'\nexport {\n sanitizeClientEditorConfig,\n sanitizeClientFeatures,\n} from './field/lexical/config/client/sanitize.js'\nexport {\n defaultEditorConfig,\n defaultEditorFeatures,\n defaultEditorLexicalConfig,\n} from './field/lexical/config/server/default.js'\nexport {\n loadFeatures,\n sortFeaturesForOptimalLoading,\n} from './field/lexical/config/server/loader.js'\n\nexport {\n sanitizeServerEditorConfig,\n sanitizeServerFeatures,\n} from './field/lexical/config/server/sanitize.js'\nexport type {\n ClientEditorConfig,\n SanitizedClientEditorConfig,\n SanitizedServerEditorConfig,\n ServerEditorConfig,\n} from './field/lexical/config/types.js'\n\nexport { getEnabledNodes } from './field/lexical/nodes/index.js'\nexport { ENABLE_SLASH_MENU_COMMAND } from './field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js'\nexport type { AdapterProps }\n\nexport type {\n SlashMenuGroup,\n SlashMenuItem,\n} from './field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js'\nexport { CAN_USE_DOM } from './field/lexical/utils/canUseDOM.js'\nexport { cloneDeep } from './field/lexical/utils/cloneDeep.js'\nexport { getDOMRangeRect } from './field/lexical/utils/getDOMRangeRect.js'\nexport { getSelectedNode } from './field/lexical/utils/getSelectedNode.js'\nexport { isHTMLElement } from './field/lexical/utils/guard.js'\nexport { invariant } from './field/lexical/utils/invariant.js'\nexport { joinClasses } from './field/lexical/utils/joinClasses.js'\nexport { createBlockNode } from './field/lexical/utils/markdown/createBlockNode.js'\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 './field/lexical/utils/nodeFormat.js'\nexport { Point, isPoint } from './field/lexical/utils/point.js'\nexport { Rect } from './field/lexical/utils/rect.js'\nexport { setFloatingElemPosition } from './field/lexical/utils/setFloatingElemPosition.js'\nexport { setFloatingElemPositionForLinkEditor } from './field/lexical/utils/setFloatingElemPositionForLinkEditor.js'\nexport {\n addSwipeDownListener,\n addSwipeLeftListener,\n addSwipeRightListener,\n addSwipeUpListener,\n} from './field/lexical/utils/swipe.js'\nexport { sanitizeUrl, validateUrl } from './field/lexical/utils/url.js'\nexport { defaultRichTextValue } from './populateGraphQL/defaultValue.js'\n\nexport type { LexicalEditorProps, LexicalRichTextAdapter } from './types.js'\n"],"names":["withMergedProps","afterChangeTraverseFields","afterReadTraverseFields","beforeChangeTraverseFields","beforeValidateTraverseFields","withNullableJSONSchemaType","RichTextCell","RichTextField","defaultEditorConfig","defaultEditorFeatures","loadFeatures","sanitizeServerEditorConfig","sanitizeServerFeatures","cloneDeep","getGenerateComponentMap","getGenerateSchemaMap","i18n","populateLexicalPopulationPromises","recurseNodeTree","richTextValidateHOC","defaultSanitizedServerEditorConfig","lexicalEditor","props","config","isRoot","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","path","schemaPath","value","getSubFields","nodeIDMap","originalNodeIDMap","internal","richText","join","Object","keys","length","nodes","root","children","id","node","entries","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","version","required","direction","oneOf","enum","format","indent","modifyOutputSchema","generatedTypes","modifyOutputSchemas","currentSchema","validate","AlignFeature","BlockquoteFeature","BlocksFeature","$createBlockNode","$isBlockNode","BlockNode","LinebreakHTMLConverter","ParagraphHTMLConverter","TextHTMLConverter","defaultHTMLConverters","convertLexicalNodesToHTML","convertLexicalToHTML","HTMLConverterFeature","consolidateHTMLConverters","lexicalHTML","TestRecorderFeature","TreeViewFeature","BoldFeature","InlineCodeFeature","ItalicFeature","toolbarFormatGroupWithItems","StrikethroughFeature","SubscriptFeature","SuperscriptFeature","UnderlineFeature","HeadingFeature","HorizontalRuleFeature","IndentFeature","LinkFeature","$createAutoLinkNode","$isAutoLinkNode","AutoLinkNode","$createLinkNode","$isLinkNode","LinkNode","TOGGLE_LINK_COMMAND","ChecklistFeature","OrderedListFeature","UnorderedListFeature","LexicalPluginToLexicalFeature","SlateBlockquoteConverter","SlateHeadingConverter","SlateIndentConverter","SlateLinkConverter","SlateListItemConverter","SlateOrderedListConverter","SlateRelationshipConverter","SlateUnknownConverter","SlateUnorderedListConverter","SlateUploadConverter","defaultSlateConverters","convertSlateNodesToLexical","convertSlateToLexical","SlateToLexicalFeature","ParagraphFeature","RelationshipFeature","$createRelationshipNode","$isRelationshipNode","RelationshipNode","toolbarAddDropdownGroupWithItems","toolbarFeatureButtonsGroupWithItems","toolbarTextDropdownGroupWithItems","FixedToolbarFeature","InlineToolbarFeature","createNode","UploadFeature","$createUploadNode","$isUploadNode","UploadNode","EditorConfigProvider","useEditorConfigContext","sanitizeClientEditorConfig","sanitizeClientFeatures","defaultEditorLexicalConfig","sortFeaturesForOptimalLoading","getEnabledNodes","ENABLE_SLASH_MENU_COMMAND","CAN_USE_DOM","getDOMRangeRect","getSelectedNode","isHTMLElement","invariant","joinClasses","createBlockNode","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","Point","isPoint","Rect","setFloatingElemPosition","setFloatingElemPositionForLinkEditor","addSwipeDownListener","addSwipeLeftListener","addSwipeRightListener","addSwipeUpListener","sanitizeUrl","validateUrl","defaultRichTextValue"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAQ,wEAAuE;AAOjH,SAASC,WAAW,QAAQ,qCAAoC;AAChE,SAAStN,SAAS,QAAQ,qCAAoC;AAC9D,SAASuN,eAAe,QAAQ,2CAA0C;AAC1E,SAASC,eAAe,QAAQ,2CAA0C;AAC1E,SAASC,aAAa,QAAQ,iCAAgC;AAC9D,SAASC,SAAS,QAAQ,qCAAoC;AAC9D,SAASC,WAAW,QAAQ,uCAAsC;AAClE,SAASC,eAAe,QAAQ,oDAAmD;AACnF,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,sCAAqC;AAC5C,SAASC,KAAK,EAAEC,OAAO,QAAQ,iCAAgC;AAC/D,SAASC,IAAI,QAAQ,gCAA+B;AACpD,SAASC,uBAAuB,QAAQ,mDAAkD;AAC1F,SAASC,oCAAoC,QAAQ,gEAA+D;AACpH,SACEC,oBAAoB,EACpBC,oBAAoB,EACpBC,qBAAqB,EACrBC,kBAAkB,QACb,iCAAgC;AACvC,SAASC,WAAW,EAAEC,WAAW,QAAQ,+BAA8B;AACvE,SAASC,oBAAoB,QAAQ,oCAAmC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaultValue.d.ts","sourceRoot":"","sources":["../../src/populateGraphQL/defaultValue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAA+C,MAAM,SAAS,CAAA;AAEjG,eAAO,MAAM,oBAAoB,EAAE,qBA6BlC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/populateGraphQL/defaultValue.ts"],"sourcesContent":["import type { SerializedEditorState, SerializedParagraphNode, SerializedTextNode } from 'lexical'\n\nexport const defaultRichTextValue: SerializedEditorState = {\n root: {\n type: 'root',\n children: [\n {\n type: 'paragraph',\n children: [\n {\n type: 'text',\n detail: 0,\n format: 0,\n mode: 'normal',\n style: '',\n text: '',\n version: 1,\n } as SerializedTextNode,\n ],\n direction: null,\n format: '',\n indent: 0,\n textFormat: 0,\n version: 1,\n } as SerializedParagraphNode,\n ],\n direction: null,\n format: '',\n indent: 0,\n version: 1,\n },\n}\n"],"names":["defaultRichTextValue","root","type","children","detail","format","mode","style","text","version","direction","indent","textFormat"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAEA,OAAO,MAAMA,uBAA8C;IACzDC,MAAM;QACJC,MAAM;QACNC,UAAU;YACR;gBACED,MAAM;gBACNC,UAAU;oBACR;wBACED,MAAM;wBACNE,QAAQ;wBACRC,QAAQ;wBACRC,MAAM;wBACNC,OAAO;wBACPC,MAAM;wBACNC,SAAS;oBACX;iBACD;gBACDC,WAAW;gBACXL,QAAQ;gBACRM,QAAQ;gBACRC,YAAY;gBACZH,SAAS;YACX;SACD;QACDC,WAAW;QACXL,QAAQ;QACRM,QAAQ;QACRF,SAAS;IACX;AACF,EAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Collection, PayloadRequestWithData } from 'payload/types';
|
|
2
|
+
type Arguments = {
|
|
3
|
+
currentDepth?: number;
|
|
4
|
+
data: unknown;
|
|
5
|
+
depth: number;
|
|
6
|
+
draft: boolean;
|
|
7
|
+
key: number | string;
|
|
8
|
+
overrideAccess: boolean;
|
|
9
|
+
req: PayloadRequestWithData;
|
|
10
|
+
showHiddenFields: boolean;
|
|
11
|
+
};
|
|
12
|
+
export declare const populate: ({ id, collection, currentDepth, data, depth, draft, key, overrideAccess, req, showHiddenFields, }: Arguments & {
|
|
13
|
+
collection: Collection;
|
|
14
|
+
id: number | string;
|
|
15
|
+
}) => Promise<void>;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=populate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"populate.d.ts","sourceRoot":"","sources":["../../src/populateGraphQL/populate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAG,sBAAsB,EAAE,MAAM,eAAe,CAAA;AAIxE,KAAK,SAAS,GAAG;IACf,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,IAAI,EAAE,OAAO,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,OAAO,CAAA;IACd,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;IACpB,cAAc,EAAE,OAAO,CAAA;IACvB,GAAG,EAAE,sBAAsB,CAAA;IAC3B,gBAAgB,EAAE,OAAO,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,QAAQ,sGAWlB,SAAS,GAAG;IACb,UAAU,EAAE,UAAU,CAAA;IACtB,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;CACpB,KAAG,QAAQ,IAAI,CA6Bf,CAAA"}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { createDataloaderCacheKey } from 'payload/utilities';
|
|
2
2
|
export const populate = async ({ id, collection, currentDepth, data, depth, draft, key, overrideAccess, req, showHiddenFields })=>{
|
|
3
|
+
const shouldPopulate = depth && currentDepth <= depth;
|
|
4
|
+
// usually depth is checked within recursivelyPopulateFieldsForGraphQL. But since this populate function can be called outside of that (in rest afterRead node hooks) we need to check here too
|
|
5
|
+
if (!shouldPopulate) {
|
|
6
|
+
return;
|
|
7
|
+
}
|
|
3
8
|
const dataRef = data;
|
|
4
9
|
const doc = await req.payloadDataLoader.load(createDataloaderCacheKey({
|
|
5
10
|
collectionSlug: collection.config.slug,
|
|
@@ -9,7 +14,7 @@ export const populate = async ({ id, collection, currentDepth, data, depth, draf
|
|
|
9
14
|
draft,
|
|
10
15
|
fallbackLocale: req.fallbackLocale,
|
|
11
16
|
locale: req.locale,
|
|
12
|
-
overrideAccess
|
|
17
|
+
overrideAccess,
|
|
13
18
|
showHiddenFields,
|
|
14
19
|
transactionID: req.transactionID
|
|
15
20
|
}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/populateGraphQL/populate.ts"],"sourcesContent":["import type { Collection , PayloadRequestWithData } from 'payload/types'\n\nimport { createDataloaderCacheKey } from 'payload/utilities'\n\ntype Arguments = {\n currentDepth?: number\n data: unknown\n depth: number\n draft: boolean\n key: number | string\n overrideAccess: boolean\n req: PayloadRequestWithData\n showHiddenFields: boolean\n}\n\nexport const populate = async ({\n id,\n collection,\n currentDepth,\n data,\n depth,\n draft,\n key,\n overrideAccess,\n req,\n showHiddenFields,\n}: Arguments & {\n collection: Collection\n id: number | string\n}): Promise<void> => {\n const shouldPopulate = depth && currentDepth <= depth\n // usually depth is checked within recursivelyPopulateFieldsForGraphQL. But since this populate function can be called outside of that (in rest afterRead node hooks) we need to check here too\n if (!shouldPopulate) {\n return\n }\n\n const dataRef = data as Record<string, unknown>\n\n const doc = await req.payloadDataLoader.load(\n createDataloaderCacheKey({\n collectionSlug: collection.config.slug,\n currentDepth: currentDepth + 1,\n depth,\n docID: id as string,\n draft,\n fallbackLocale: req.fallbackLocale,\n locale: req.locale,\n overrideAccess,\n showHiddenFields,\n transactionID: req.transactionID,\n }),\n )\n\n if (doc) {\n dataRef[key] = doc\n } else {\n dataRef[key] = null\n }\n}\n"],"names":["createDataloaderCacheKey","populate","id","collection","currentDepth","data","depth","draft","key","overrideAccess","req","showHiddenFields","shouldPopulate","dataRef","doc","payloadDataLoader","load","collectionSlug","config","slug","docID","fallbackLocale","locale","transactionID"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAEA,SAASA,wBAAwB,QAAQ,oBAAmB;AAa5D,OAAO,MAAMC,WAAW,OAAO,EAC7BC,EAAE,EACFC,UAAU,EACVC,YAAY,EACZC,IAAI,EACJC,KAAK,EACLC,KAAK,EACLC,GAAG,EACHC,cAAc,EACdC,GAAG,EACHC,gBAAgB,EAIjB;IACC,MAAMC,iBAAiBN,SAASF,gBAAgBE;IAChD,+LAA+L;IAC/L,IAAI,CAACM,gBAAgB;QACnB;IACF;IAEA,MAAMC,UAAUR;IAEhB,MAAMS,MAAM,MAAMJ,IAAIK,iBAAiB,CAACC,IAAI,CAC1ChB,yBAAyB;QACvBiB,gBAAgBd,WAAWe,MAAM,CAACC,IAAI;QACtCf,cAAcA,eAAe;QAC7BE;QACAc,OAAOlB;QACPK;QACAc,gBAAgBX,IAAIW,cAAc;QAClCC,QAAQZ,IAAIY,MAAM;QAClBb;QACAE;QACAY,eAAeb,IAAIa,aAAa;IAClC;IAGF,IAAIT,KAAK;QACPD,OAAO,CAACL,IAAI,GAAGM;IACjB,OAAO;QACLD,OAAO,CAACL,IAAI,GAAG;IACjB;AACF,EAAC"}
|
|
@@ -2,7 +2,7 @@ import type { SerializedEditorState } from 'lexical';
|
|
|
2
2
|
import type { RichTextAdapter } from 'payload/types';
|
|
3
3
|
import type { PopulationPromise } from '../field/features/types.js';
|
|
4
4
|
import type { AdapterProps } from '../types.js';
|
|
5
|
-
export type Args = Parameters<RichTextAdapter<SerializedEditorState, AdapterProps>['
|
|
5
|
+
export type Args = Parameters<RichTextAdapter<SerializedEditorState, AdapterProps>['graphQLPopulationPromises']>[0] & {
|
|
6
6
|
editorPopulationPromises: Map<string, Array<PopulationPromise>>;
|
|
7
7
|
};
|
|
8
8
|
/**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"populateLexicalPopulationPromises.d.ts","sourceRoot":"","sources":["../../src/populateGraphQL/populateLexicalPopulationPromises.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAEpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAI/C,MAAM,MAAM,IAAI,GAAG,UAAU,CAC3B,eAAe,CAAC,qBAAqB,EAAE,YAAY,CAAC,CAAC,2BAA2B,CAAC,CAClF,CAAC,CAAC,CAAC,GAAG;IACL,wBAAwB,EAAE,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAA;CAChE,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,iCAAiC,8LAe3C,IAAI,SAiCN,CAAA"}
|
|
@@ -2,7 +2,8 @@ import { recurseNodes } from '../forEachNodeRecursively.js';
|
|
|
2
2
|
/**
|
|
3
3
|
* Appends all new populationPromises to the populationPromises prop
|
|
4
4
|
*/ export const populateLexicalPopulationPromises = ({ context, currentDepth, depth, draft, editorPopulationPromises, field, fieldPromises, findMany, flattenLocales, overrideAccess, populationPromises, req, showHiddenFields, siblingDoc })=>{
|
|
5
|
-
|
|
5
|
+
const shouldPopulate = depth && currentDepth <= depth;
|
|
6
|
+
if (!shouldPopulate) {
|
|
6
7
|
return;
|
|
7
8
|
}
|
|
8
9
|
recurseNodes({
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/populateGraphQL/populateLexicalPopulationPromises.ts"],"sourcesContent":["import type { SerializedEditorState } from 'lexical'\nimport type { RichTextAdapter } from 'payload/types'\n\nimport type { PopulationPromise } from '../field/features/types.js'\nimport type { AdapterProps } from '../types.js'\n\nimport { recurseNodes } from '../forEachNodeRecursively.js'\n\nexport type Args = Parameters<\n RichTextAdapter<SerializedEditorState, AdapterProps>['graphQLPopulationPromises']\n>[0] & {\n editorPopulationPromises: Map<string, Array<PopulationPromise>>\n}\n\n/**\n * Appends all new populationPromises to the populationPromises prop\n */\nexport const populateLexicalPopulationPromises = ({\n context,\n currentDepth,\n depth,\n draft,\n editorPopulationPromises,\n field,\n fieldPromises,\n findMany,\n flattenLocales,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc,\n}: Args) => {\n const shouldPopulate = depth && currentDepth <= depth\n\n if (!shouldPopulate) {\n return\n }\n\n recurseNodes({\n callback: (node) => {\n if (editorPopulationPromises?.has(node.type)) {\n for (const promise of editorPopulationPromises.get(node.type)) {\n promise({\n context,\n currentDepth,\n depth,\n draft,\n editorPopulationPromises,\n field,\n fieldPromises,\n findMany,\n flattenLocales,\n node,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc,\n })\n }\n }\n },\n nodes: (siblingDoc[field?.name] as SerializedEditorState)?.root?.children ?? [],\n })\n}\n"],"names":["recurseNodes","populateLexicalPopulationPromises","context","currentDepth","depth","draft","editorPopulationPromises","field","fieldPromises","findMany","flattenLocales","overrideAccess","populationPromises","req","showHiddenFields","siblingDoc","shouldPopulate","callback","node","has","type","promise","get","nodes","name","root","children"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAMA,SAASA,YAAY,QAAQ,+BAA8B;AAQ3D;;CAEC,GACD,OAAO,MAAMC,oCAAoC,CAAC,EAChDC,OAAO,EACPC,YAAY,EACZC,KAAK,EACLC,KAAK,EACLC,wBAAwB,EACxBC,KAAK,EACLC,aAAa,EACbC,QAAQ,EACRC,cAAc,EACdC,cAAc,EACdC,kBAAkB,EAClBC,GAAG,EACHC,gBAAgB,EAChBC,UAAU,EACL;IACL,MAAMC,iBAAiBZ,SAASD,gBAAgBC;IAEhD,IAAI,CAACY,gBAAgB;QACnB;IACF;IAEAhB,aAAa;QACXiB,UAAU,CAACC;YACT,IAAIZ,0BAA0Ba,IAAID,KAAKE,IAAI,GAAG;gBAC5C,KAAK,MAAMC,WAAWf,yBAAyBgB,GAAG,CAACJ,KAAKE,IAAI,EAAG;oBAC7DC,QAAQ;wBACNnB;wBACAC;wBACAC;wBACAC;wBACAC;wBACAC;wBACAC;wBACAC;wBACAC;wBACAQ;wBACAP;wBACAC;wBACAC;wBACAC;wBACAC;oBACF;gBACF;YACF;QACF;QACAQ,OAAO,AAACR,UAAU,CAACR,OAAOiB,KAAK,EAA4BC,MAAMC,YAAY,EAAE;IACjF;AACF,EAAC"}
|
|
@@ -24,6 +24,6 @@ type NestedRichTextFieldsArgs = {
|
|
|
24
24
|
showHiddenFields: boolean;
|
|
25
25
|
siblingDoc: Record<string, unknown>;
|
|
26
26
|
};
|
|
27
|
-
export declare const
|
|
27
|
+
export declare const recursivelyPopulateFieldsForGraphQL: ({ context, currentDepth, data, depth, draft, fieldPromises, fields, findMany, flattenLocales, overrideAccess, populationPromises, req, showHiddenFields, siblingDoc, }: NestedRichTextFieldsArgs) => void;
|
|
28
28
|
export {};
|
|
29
|
-
//# sourceMappingURL=
|
|
29
|
+
//# sourceMappingURL=recursivelyPopulateFieldsForGraphQL.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recursivelyPopulateFieldsForGraphQL.d.ts","sourceRoot":"","sources":["../../src/populateGraphQL/recursivelyPopulateFieldsForGraphQL.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAC7C,OAAO,KAAK,EAAE,KAAK,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAA;AAIlE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAEnE,KAAK,wBAAwB,GAAG;IAC9B,OAAO,EAAE,cAAc,CAAA;IACvB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,IAAI,EAAE,OAAO,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,OAAO,CAAA;IACd;;OAEG;IACH,wBAAwB,EAAE,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAA;IAC/D;;OAEG;IACH,aAAa,EAAE,OAAO,CAAC,IAAI,CAAC,EAAE,CAAA;IAC9B,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,QAAQ,EAAE,OAAO,CAAA;IACjB,cAAc,EAAE,OAAO,CAAA;IACvB,cAAc,EAAE,OAAO,CAAA;IACvB,kBAAkB,EAAE,OAAO,CAAC,IAAI,CAAC,EAAE,CAAA;IACnC,GAAG,EAAE,sBAAsB,CAAA;IAC3B,gBAAgB,EAAE,OAAO,CAAA;IACzB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACpC,CAAA;AAED,eAAO,MAAM,mCAAmC,2KAe7C,wBAAwB,KAAG,IAwB7B,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { afterReadTraverseFields } from 'payload/utilities';
|
|
2
|
-
export const
|
|
2
|
+
export const recursivelyPopulateFieldsForGraphQL = ({ context, currentDepth = 0, data, depth, draft, fieldPromises, fields, findMany, flattenLocales, overrideAccess = false, populationPromises, req, showHiddenFields, siblingDoc })=>{
|
|
3
3
|
afterReadTraverseFields({
|
|
4
4
|
collection: null,
|
|
5
5
|
context,
|
|
@@ -15,11 +15,14 @@ export const recurseNestedFields = ({ context, currentDepth = 0, data, depth, dr
|
|
|
15
15
|
global: null,
|
|
16
16
|
locale: req.locale,
|
|
17
17
|
overrideAccess,
|
|
18
|
+
path: [],
|
|
18
19
|
populationPromises,
|
|
19
20
|
req,
|
|
21
|
+
schemaPath: [],
|
|
20
22
|
showHiddenFields,
|
|
21
|
-
siblingDoc
|
|
23
|
+
siblingDoc,
|
|
24
|
+
triggerHooks: false
|
|
22
25
|
});
|
|
23
26
|
};
|
|
24
27
|
|
|
25
|
-
//# sourceMappingURL=
|
|
28
|
+
//# sourceMappingURL=recursivelyPopulateFieldsForGraphQL.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/populateGraphQL/recursivelyPopulateFieldsForGraphQL.ts"],"sourcesContent":["import type { RequestContext } from 'payload'\nimport type { Field, PayloadRequestWithData } from 'payload/types'\n\nimport { afterReadTraverseFields } from 'payload/utilities'\n\nimport type { PopulationPromise } from '../field/features/types.js'\n\ntype NestedRichTextFieldsArgs = {\n context: RequestContext\n currentDepth?: number\n data: unknown\n depth: number\n draft: boolean\n /**\n * This maps all the population promises to the node types\n */\n editorPopulationPromises: Map<string, Array<PopulationPromise>>\n /**\n * fieldPromises are used for things like field hooks. They should be awaited before awaiting populationPromises\n */\n fieldPromises: Promise<void>[]\n fields: Field[]\n findMany: boolean\n flattenLocales: boolean\n overrideAccess: boolean\n populationPromises: Promise<void>[]\n req: PayloadRequestWithData\n showHiddenFields: boolean\n siblingDoc: Record<string, unknown>\n}\n\nexport const recursivelyPopulateFieldsForGraphQL = ({\n context,\n currentDepth = 0,\n data,\n depth,\n draft,\n fieldPromises,\n fields,\n findMany,\n flattenLocales,\n overrideAccess = false,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc,\n}: NestedRichTextFieldsArgs): void => {\n afterReadTraverseFields({\n collection: null, // Pass from core? This is only needed for hooks, so we can leave this null for now\n context,\n currentDepth,\n depth,\n doc: data as any, // Looks like it's only needed for hooks and access control, so doesn't matter what we pass here right now\n draft,\n fallbackLocale: req.fallbackLocale,\n fieldPromises,\n fields,\n findMany,\n flattenLocales,\n global: null, // Pass from core? This is only needed for hooks, so we can leave this null for now\n locale: req.locale,\n overrideAccess,\n path: [],\n populationPromises, // This is not the same as populationPromises passed into this recurseNestedFields. These are just promises resolved at the very end.\n req,\n schemaPath: [],\n showHiddenFields,\n siblingDoc,\n triggerHooks: false,\n })\n}\n"],"names":["afterReadTraverseFields","recursivelyPopulateFieldsForGraphQL","context","currentDepth","data","depth","draft","fieldPromises","fields","findMany","flattenLocales","overrideAccess","populationPromises","req","showHiddenFields","siblingDoc","collection","doc","fallbackLocale","global","locale","path","schemaPath","triggerHooks"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAGA,SAASA,uBAAuB,QAAQ,oBAAmB;AA4B3D,OAAO,MAAMC,sCAAsC,CAAC,EAClDC,OAAO,EACPC,eAAe,CAAC,EAChBC,IAAI,EACJC,KAAK,EACLC,KAAK,EACLC,aAAa,EACbC,MAAM,EACNC,QAAQ,EACRC,cAAc,EACdC,iBAAiB,KAAK,EACtBC,kBAAkB,EAClBC,GAAG,EACHC,gBAAgB,EAChBC,UAAU,EACe;IACzBf,wBAAwB;QACtBgB,YAAY;QACZd;QACAC;QACAE;QACAY,KAAKb;QACLE;QACAY,gBAAgBL,IAAIK,cAAc;QAClCX;QACAC;QACAC;QACAC;QACAS,QAAQ;QACRC,QAAQP,IAAIO,MAAM;QAClBT;QACAU,MAAM,EAAE;QACRT;QACAC;QACAS,YAAY,EAAE;QACdR;QACAC;QACAQ,cAAc;IAChB;AACF,EAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { SerializedLexicalNode } from 'lexical';
|
|
2
|
+
export declare const recurseNodeTree: ({ flattenedNodes, nodeIDMap, nodes, }: {
|
|
3
|
+
flattenedNodes?: SerializedLexicalNode[];
|
|
4
|
+
nodeIDMap?: {
|
|
5
|
+
[key: string]: SerializedLexicalNode;
|
|
6
|
+
};
|
|
7
|
+
nodes: SerializedLexicalNode[];
|
|
8
|
+
}) => void;
|
|
9
|
+
//# sourceMappingURL=recurseNodeTree.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recurseNodeTree.d.ts","sourceRoot":"","sources":["../src/recurseNodeTree.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAGpD,eAAO,MAAM,eAAe,0CAIzB;IACD,cAAc,CAAC,EAAE,qBAAqB,EAAE,CAAA;IACxC,SAAS,CAAC,EAAE;QACV,CAAC,GAAG,EAAE,MAAM,GAAG,qBAAqB,CAAA;KACrC,CAAA;IACD,KAAK,EAAE,qBAAqB,EAAE,CAAA;CAC/B,KAAG,IA+BH,CAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// Initialize both flattenedNodes and nodeIDMap
|
|
2
|
+
export const recurseNodeTree = ({ flattenedNodes, nodeIDMap, nodes })=>{
|
|
3
|
+
if (!nodes?.length) {
|
|
4
|
+
return;
|
|
5
|
+
}
|
|
6
|
+
for (const node of nodes){
|
|
7
|
+
if (flattenedNodes) {
|
|
8
|
+
flattenedNodes.push(node);
|
|
9
|
+
}
|
|
10
|
+
if (nodeIDMap) {
|
|
11
|
+
if (node && 'id' in node && node.id) {
|
|
12
|
+
nodeIDMap[node.id] = node;
|
|
13
|
+
} else if ('fields' in node && typeof node.fields === 'object' && node.fields && 'id' in node.fields && node?.fields?.id) {
|
|
14
|
+
nodeIDMap[node.fields.id] = node;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
if ('children' in node && Array.isArray(node?.children) && node?.children?.length) {
|
|
18
|
+
recurseNodeTree({
|
|
19
|
+
flattenedNodes,
|
|
20
|
+
nodeIDMap,
|
|
21
|
+
nodes: node.children
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
//# sourceMappingURL=recurseNodeTree.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/recurseNodeTree.ts"],"sourcesContent":["import type { SerializedLexicalNode } from 'lexical'\n\n// Initialize both flattenedNodes and nodeIDMap\nexport const recurseNodeTree = ({\n flattenedNodes,\n nodeIDMap,\n nodes,\n}: {\n flattenedNodes?: SerializedLexicalNode[]\n nodeIDMap?: {\n [key: string]: SerializedLexicalNode\n }\n nodes: SerializedLexicalNode[]\n}): void => {\n if (!nodes?.length) {\n return\n }\n\n for (const node of nodes) {\n if (flattenedNodes) {\n flattenedNodes.push(node)\n }\n if (nodeIDMap) {\n if (node && 'id' in node && node.id) {\n nodeIDMap[node.id as string] = node\n } else if (\n 'fields' in node &&\n typeof node.fields === 'object' &&\n node.fields &&\n 'id' in node.fields &&\n node?.fields?.id\n ) {\n nodeIDMap[node.fields.id as string] = node\n }\n }\n\n if ('children' in node && Array.isArray(node?.children) && node?.children?.length) {\n recurseNodeTree({\n flattenedNodes,\n nodeIDMap,\n nodes: node.children as SerializedLexicalNode[],\n })\n }\n }\n}\n"],"names":["recurseNodeTree","flattenedNodes","nodeIDMap","nodes","length","node","push","id","fields","Array","isArray","children"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAEA,+CAA+C;AAC/C,OAAO,MAAMA,kBAAkB,CAAC,EAC9BC,cAAc,EACdC,SAAS,EACTC,KAAK,EAON;IACC,IAAI,CAACA,OAAOC,QAAQ;QAClB;IACF;IAEA,KAAK,MAAMC,QAAQF,MAAO;QACxB,IAAIF,gBAAgB;YAClBA,eAAeK,IAAI,CAACD;QACtB;QACA,IAAIH,WAAW;YACb,IAAIG,QAAQ,QAAQA,QAAQA,KAAKE,EAAE,EAAE;gBACnCL,SAAS,CAACG,KAAKE,EAAE,CAAW,GAAGF;YACjC,OAAO,IACL,YAAYA,QACZ,OAAOA,KAAKG,MAAM,KAAK,YACvBH,KAAKG,MAAM,IACX,QAAQH,KAAKG,MAAM,IACnBH,MAAMG,QAAQD,IACd;gBACAL,SAAS,CAACG,KAAKG,MAAM,CAACD,EAAE,CAAW,GAAGF;YACxC;QACF;QAEA,IAAI,cAAcA,QAAQI,MAAMC,OAAO,CAACL,MAAMM,aAAaN,MAAMM,UAAUP,QAAQ;YACjFJ,gBAAgB;gBACdC;gBACAC;gBACAC,OAAOE,KAAKM,QAAQ;YACtB;QACF;IACF;AACF,EAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@payloadcms/richtext-lexical",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.47",
|
|
4
4
|
"description": "The officially supported Lexical richtext adapter for Payload",
|
|
5
5
|
"homepage": "https://payloadcms.com",
|
|
6
6
|
"repository": {
|
|
@@ -58,11 +58,11 @@
|
|
|
58
58
|
"@types/node": "20.12.5",
|
|
59
59
|
"@types/react": "npm:types-react@19.0.0-beta.2",
|
|
60
60
|
"@types/react-dom": "npm:types-react-dom@19.0.0-beta.2",
|
|
61
|
-
"@payloadcms/translations": "3.0.0-beta.45",
|
|
62
|
-
"payload": "3.0.0-beta.45",
|
|
63
|
-
"@payloadcms/ui": "3.0.0-beta.45",
|
|
64
61
|
"@payloadcms/eslint-config": "1.1.1",
|
|
65
|
-
"@payloadcms/next": "3.0.0-beta.
|
|
62
|
+
"@payloadcms/next": "3.0.0-beta.47",
|
|
63
|
+
"@payloadcms/translations": "3.0.0-beta.47",
|
|
64
|
+
"@payloadcms/ui": "3.0.0-beta.47",
|
|
65
|
+
"payload": "3.0.0-beta.47"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
68
|
"@faceless-ui/modal": "3.0.0-beta.0",
|
|
@@ -79,10 +79,10 @@
|
|
|
79
79
|
"lexical": "0.16.0",
|
|
80
80
|
"react": "^19.0.0 || ^19.0.0-rc-f994737d14-20240522",
|
|
81
81
|
"react-dom": "^19.0.0 || ^19.0.0-rc-f994737d14-20240522",
|
|
82
|
-
"@payloadcms/
|
|
83
|
-
"@payloadcms/
|
|
84
|
-
"
|
|
85
|
-
"
|
|
82
|
+
"@payloadcms/next": "3.0.0-beta.47",
|
|
83
|
+
"@payloadcms/translations": "3.0.0-beta.47",
|
|
84
|
+
"@payloadcms/ui": "3.0.0-beta.47",
|
|
85
|
+
"payload": "3.0.0-beta.47"
|
|
86
86
|
},
|
|
87
87
|
"engines": {
|
|
88
88
|
"node": "^18.20.2 || >=20.9.0"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"populationPromise.d.ts","sourceRoot":"","sources":["../../../../src/field/features/blocks/populationPromise.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AACpD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAA;AAC7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAIhE,eAAO,MAAM,yBAAyB,UAC7B,kBAAkB,KACxB,kBAAkB,mBAAmB,CA8CvC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/field/features/blocks/populationPromise.ts"],"sourcesContent":["import type { PopulationPromise } from '../types.js'\nimport type { BlocksFeatureProps } from './feature.server.js'\nimport type { SerializedBlockNode } from './nodes/BlocksNode.js'\n\nimport { recurseNestedFields } from '../../../populate/recurseNestedFields.js'\n\nexport const blockPopulationPromiseHOC = (\n props: BlocksFeatureProps,\n): PopulationPromise<SerializedBlockNode> => {\n const blockPopulationPromise: PopulationPromise<SerializedBlockNode> = ({\n context,\n currentDepth,\n depth,\n draft,\n editorPopulationPromises,\n fieldPromises,\n findMany,\n flattenLocales,\n node,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc,\n }) => {\n const blockFieldData = node.fields\n\n // find block used in this node\n const block = props.blocks.find((block) => block.slug === blockFieldData.blockType)\n if (!block || !block?.fields?.length || !blockFieldData) {\n return\n }\n\n recurseNestedFields({\n context,\n currentDepth,\n data: blockFieldData,\n depth,\n editorPopulationPromises,\n fieldPromises,\n fields: block.fields,\n findMany,\n flattenLocales: false, // Disable localization handling which does not work properly yet. Once we fully support hooks, this can be enabled (pass through flattenLocales again)\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n // The afterReadPromise gets its data from looking for field.name inside the siblingDoc. Thus, here we cannot pass the whole document's siblingDoc, but only the siblingDoc (sibling fields) of the current field.\n draft,\n siblingDoc: blockFieldData,\n })\n }\n\n return blockPopulationPromise\n}\n"],"names":["recurseNestedFields","blockPopulationPromiseHOC","props","blockPopulationPromise","context","currentDepth","depth","draft","editorPopulationPromises","fieldPromises","findMany","flattenLocales","node","overrideAccess","populationPromises","req","showHiddenFields","siblingDoc","blockFieldData","fields","block","blocks","find","slug","blockType","length","data"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAIA,SAASA,mBAAmB,QAAQ,2CAA0C;AAE9E,OAAO,MAAMC,4BAA4B,CACvCC;IAEA,MAAMC,yBAAiE,CAAC,EACtEC,OAAO,EACPC,YAAY,EACZC,KAAK,EACLC,KAAK,EACLC,wBAAwB,EACxBC,aAAa,EACbC,QAAQ,EACRC,cAAc,EACdC,IAAI,EACJC,cAAc,EACdC,kBAAkB,EAClBC,GAAG,EACHC,gBAAgB,EAChBC,UAAU,EACX;QACC,MAAMC,iBAAiBN,KAAKO,MAAM;QAElC,+BAA+B;QAC/B,MAAMC,QAAQlB,MAAMmB,MAAM,CAACC,IAAI,CAAC,CAACF,QAAUA,MAAMG,IAAI,KAAKL,eAAeM,SAAS;QAClF,IAAI,CAACJ,SAAS,CAACA,OAAOD,QAAQM,UAAU,CAACP,gBAAgB;YACvD;QACF;QAEAlB,oBAAoB;YAClBI;YACAC;YACAqB,MAAMR;YACNZ;YACAE;YACAC;YACAU,QAAQC,MAAMD,MAAM;YACpBT;YACAC,gBAAgB;YAChBE;YACAC;YACAC;YACAC;YACA,kNAAkN;YAClNT;YACAU,YAAYC;QACd;IACF;IAEA,OAAOf;AACT,EAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"populationPromise.d.ts","sourceRoot":"","sources":["../../../../src/field/features/link/populationPromise.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AACpD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAA;AACjE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAI1D,eAAO,MAAM,wBAAwB,UAC5B,sBAAsB,KAC5B,kBAAkB,kBAAkB,CA2CtC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/field/features/link/populationPromise.ts"],"sourcesContent":["import type { PopulationPromise } from '../types.js'\nimport type { LinkFeatureServerProps } from './feature.server.js'\nimport type { SerializedLinkNode } from './nodes/types.js'\n\nimport { recurseNestedFields } from '../../../populate/recurseNestedFields.js'\n\nexport const linkPopulationPromiseHOC = (\n props: LinkFeatureServerProps,\n): PopulationPromise<SerializedLinkNode> => {\n return ({\n context,\n currentDepth,\n depth,\n draft,\n editorPopulationPromises,\n fieldPromises,\n findMany,\n flattenLocales,\n node,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n }) => {\n if (!props.fields?.length) {\n return\n }\n\n /**\n * Should populate all fields, including the doc field (for internal links), as it's treated like a normal field\n */\n if (Array.isArray(props.fields)) {\n recurseNestedFields({\n context,\n currentDepth,\n data: node.fields,\n depth,\n draft,\n editorPopulationPromises,\n fieldPromises,\n fields: props.fields,\n findMany,\n flattenLocales: false, // Disable localization handling which does not work properly yet. Once we fully support hooks, this can be enabled (pass through flattenLocales again)\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc: node.fields,\n })\n }\n }\n}\n"],"names":["recurseNestedFields","linkPopulationPromiseHOC","props","context","currentDepth","depth","draft","editorPopulationPromises","fieldPromises","findMany","flattenLocales","node","overrideAccess","populationPromises","req","showHiddenFields","fields","length","Array","isArray","data","siblingDoc"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAIA,SAASA,mBAAmB,QAAQ,2CAA0C;AAE9E,OAAO,MAAMC,2BAA2B,CACtCC;IAEA,OAAO,CAAC,EACNC,OAAO,EACPC,YAAY,EACZC,KAAK,EACLC,KAAK,EACLC,wBAAwB,EACxBC,aAAa,EACbC,QAAQ,EACRC,cAAc,EACdC,IAAI,EACJC,cAAc,EACdC,kBAAkB,EAClBC,GAAG,EACHC,gBAAgB,EACjB;QACC,IAAI,CAACb,MAAMc,MAAM,EAAEC,QAAQ;YACzB;QACF;QAEA;;KAEC,GACD,IAAIC,MAAMC,OAAO,CAACjB,MAAMc,MAAM,GAAG;YAC/BhB,oBAAoB;gBAClBG;gBACAC;gBACAgB,MAAMT,KAAKK,MAAM;gBACjBX;gBACAC;gBACAC;gBACAC;gBACAQ,QAAQd,MAAMc,MAAM;gBACpBP;gBACAC,gBAAgB;gBAChBE;gBACAC;gBACAC;gBACAC;gBACAM,YAAYV,KAAKK,MAAM;YACzB;QACF;IACF;AACF,EAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"populationPromise.d.ts","sourceRoot":"","sources":["../../../../src/field/features/relationship/populationPromise.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AACpD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAA;AACnE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAA;AAI7E,eAAO,MAAM,gCAAgC,UACpC,wBAAwB,KAC9B,kBAAkB,0BAA0B,CA0C9C,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/field/features/relationship/populationPromise.ts"],"sourcesContent":["import type { PopulationPromise } from '../types.js'\nimport type { RelationshipFeatureProps } from './feature.server.js'\nimport type { SerializedRelationshipNode } from './nodes/RelationshipNode.js'\n\nimport { populate } from '../../../populate/populate.js'\n\nexport const relationshipPopulationPromiseHOC = (\n props: RelationshipFeatureProps,\n): PopulationPromise<SerializedRelationshipNode> => {\n const relationshipPopulationPromise: PopulationPromise<SerializedRelationshipNode> = ({\n currentDepth,\n depth,\n draft,\n field,\n node,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n }) => {\n if (node?.value) {\n // @ts-expect-error\n const id = node?.value?.id || node?.value // for backwards-compatibility\n\n const collection = req.payload.collections[node?.relationTo]\n\n if (collection) {\n const populateDepth =\n props?.maxDepth !== undefined && props?.maxDepth < depth ? props?.maxDepth : depth\n\n populationPromises.push(\n populate({\n id,\n collection,\n currentDepth,\n data: node,\n depth: populateDepth,\n draft,\n field,\n key: 'value',\n overrideAccess,\n req,\n showHiddenFields,\n }),\n )\n }\n }\n }\n\n return relationshipPopulationPromise\n}\n"],"names":["populate","relationshipPopulationPromiseHOC","props","relationshipPopulationPromise","currentDepth","depth","draft","field","node","overrideAccess","populationPromises","req","showHiddenFields","value","id","collection","payload","collections","relationTo","populateDepth","maxDepth","undefined","push","data","key"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAIA,SAASA,QAAQ,QAAQ,gCAA+B;AAExD,OAAO,MAAMC,mCAAmC,CAC9CC;IAEA,MAAMC,gCAA+E,CAAC,EACpFC,YAAY,EACZC,KAAK,EACLC,KAAK,EACLC,KAAK,EACLC,IAAI,EACJC,cAAc,EACdC,kBAAkB,EAClBC,GAAG,EACHC,gBAAgB,EACjB;QACC,IAAIJ,MAAMK,OAAO;YACf,mBAAmB;YACnB,MAAMC,KAAKN,MAAMK,OAAOC,MAAMN,MAAMK,MAAM,8BAA8B;;YAExE,MAAME,aAAaJ,IAAIK,OAAO,CAACC,WAAW,CAACT,MAAMU,WAAW;YAE5D,IAAIH,YAAY;gBACd,MAAMI,gBACJjB,OAAOkB,aAAaC,aAAanB,OAAOkB,WAAWf,QAAQH,OAAOkB,WAAWf;gBAE/EK,mBAAmBY,IAAI,CACrBtB,SAAS;oBACPc;oBACAC;oBACAX;oBACAmB,MAAMf;oBACNH,OAAOc;oBACPb;oBACAC;oBACAiB,KAAK;oBACLf;oBACAE;oBACAC;gBACF;YAEJ;QACF;IACF;IAEA,OAAOT;AACT,EAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"populationPromise.d.ts","sourceRoot":"","sources":["../../../../src/field/features/upload/populationPromise.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AACpD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAA;AAC7D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAA;AAKjE,eAAO,MAAM,0BAA0B,WAC7B,kBAAkB,KACzB,kBAAkB,oBAAoB,CAmExC,CAAA"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { populate } from '../../../populate/populate.js';
|
|
2
|
-
import { recurseNestedFields } from '../../../populate/recurseNestedFields.js';
|
|
3
|
-
export const uploadPopulationPromiseHOC = (props)=>{
|
|
4
|
-
return ({ context, currentDepth, depth, draft, editorPopulationPromises, field, fieldPromises, findMany, flattenLocales, node, overrideAccess, populationPromises, req, showHiddenFields })=>{
|
|
5
|
-
if (node?.value) {
|
|
6
|
-
const collection = req.payload.collections[node?.relationTo];
|
|
7
|
-
if (collection) {
|
|
8
|
-
// @ts-expect-error
|
|
9
|
-
const id = node?.value?.id || node?.value // for backwards-compatibility
|
|
10
|
-
;
|
|
11
|
-
const populateDepth = props?.maxDepth !== undefined && props?.maxDepth < depth ? props?.maxDepth : depth;
|
|
12
|
-
populationPromises.push(populate({
|
|
13
|
-
id,
|
|
14
|
-
collection,
|
|
15
|
-
currentDepth,
|
|
16
|
-
data: node,
|
|
17
|
-
depth: populateDepth,
|
|
18
|
-
draft,
|
|
19
|
-
field,
|
|
20
|
-
key: 'value',
|
|
21
|
-
overrideAccess,
|
|
22
|
-
req,
|
|
23
|
-
showHiddenFields
|
|
24
|
-
}));
|
|
25
|
-
}
|
|
26
|
-
if (Array.isArray(props?.collections?.[node?.relationTo]?.fields)) {
|
|
27
|
-
if (!props?.collections?.[node?.relationTo]?.fields?.length) {
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
recurseNestedFields({
|
|
31
|
-
context,
|
|
32
|
-
currentDepth,
|
|
33
|
-
data: node.fields || {},
|
|
34
|
-
depth,
|
|
35
|
-
draft,
|
|
36
|
-
editorPopulationPromises,
|
|
37
|
-
fieldPromises,
|
|
38
|
-
fields: props?.collections?.[node?.relationTo]?.fields,
|
|
39
|
-
findMany,
|
|
40
|
-
flattenLocales: false,
|
|
41
|
-
overrideAccess,
|
|
42
|
-
populationPromises,
|
|
43
|
-
req,
|
|
44
|
-
showHiddenFields,
|
|
45
|
-
siblingDoc: node.fields || {}
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
//# sourceMappingURL=populationPromise.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/field/features/upload/populationPromise.ts"],"sourcesContent":["import type { PopulationPromise } from '../types.js'\nimport type { UploadFeatureProps } from './feature.server.js'\nimport type { SerializedUploadNode } from './nodes/UploadNode.js'\n\nimport { populate } from '../../../populate/populate.js'\nimport { recurseNestedFields } from '../../../populate/recurseNestedFields.js'\n\nexport const uploadPopulationPromiseHOC = (\n props?: UploadFeatureProps,\n): PopulationPromise<SerializedUploadNode> => {\n return ({\n context,\n currentDepth,\n depth,\n draft,\n editorPopulationPromises,\n field,\n fieldPromises,\n findMany,\n flattenLocales,\n node,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n }) => {\n if (node?.value) {\n const collection = req.payload.collections[node?.relationTo]\n\n if (collection) {\n // @ts-expect-error\n const id = node?.value?.id || node?.value // for backwards-compatibility\n\n const populateDepth =\n props?.maxDepth !== undefined && props?.maxDepth < depth ? props?.maxDepth : depth\n\n populationPromises.push(\n populate({\n id,\n collection,\n currentDepth,\n data: node,\n depth: populateDepth,\n draft,\n field,\n key: 'value',\n overrideAccess,\n req,\n showHiddenFields,\n }),\n )\n }\n if (Array.isArray(props?.collections?.[node?.relationTo]?.fields)) {\n if (!props?.collections?.[node?.relationTo]?.fields?.length) {\n return\n }\n recurseNestedFields({\n context,\n currentDepth,\n data: node.fields || {},\n depth,\n draft,\n editorPopulationPromises,\n fieldPromises,\n fields: props?.collections?.[node?.relationTo]?.fields,\n findMany,\n flattenLocales: false, // Disable localization handling which does not work properly yet. Once we fully support hooks, this can be enabled (pass through flattenLocales again)\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc: node.fields || {},\n })\n }\n }\n }\n}\n"],"names":["populate","recurseNestedFields","uploadPopulationPromiseHOC","props","context","currentDepth","depth","draft","editorPopulationPromises","field","fieldPromises","findMany","flattenLocales","node","overrideAccess","populationPromises","req","showHiddenFields","value","collection","payload","collections","relationTo","id","populateDepth","maxDepth","undefined","push","data","key","Array","isArray","fields","length","siblingDoc"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAIA,SAASA,QAAQ,QAAQ,gCAA+B;AACxD,SAASC,mBAAmB,QAAQ,2CAA0C;AAE9E,OAAO,MAAMC,6BAA6B,CACxCC;IAEA,OAAO,CAAC,EACNC,OAAO,EACPC,YAAY,EACZC,KAAK,EACLC,KAAK,EACLC,wBAAwB,EACxBC,KAAK,EACLC,aAAa,EACbC,QAAQ,EACRC,cAAc,EACdC,IAAI,EACJC,cAAc,EACdC,kBAAkB,EAClBC,GAAG,EACHC,gBAAgB,EACjB;QACC,IAAIJ,MAAMK,OAAO;YACf,MAAMC,aAAaH,IAAII,OAAO,CAACC,WAAW,CAACR,MAAMS,WAAW;YAE5D,IAAIH,YAAY;gBACd,mBAAmB;gBACnB,MAAMI,KAAKV,MAAMK,OAAOK,MAAMV,MAAMK,MAAM,8BAA8B;;gBAExE,MAAMM,gBACJrB,OAAOsB,aAAaC,aAAavB,OAAOsB,WAAWnB,QAAQH,OAAOsB,WAAWnB;gBAE/ES,mBAAmBY,IAAI,CACrB3B,SAAS;oBACPuB;oBACAJ;oBACAd;oBACAuB,MAAMf;oBACNP,OAAOkB;oBACPjB;oBACAE;oBACAoB,KAAK;oBACLf;oBACAE;oBACAC;gBACF;YAEJ;YACA,IAAIa,MAAMC,OAAO,CAAC5B,OAAOkB,aAAa,CAACR,MAAMS,WAAW,EAAEU,SAAS;gBACjE,IAAI,CAAC7B,OAAOkB,aAAa,CAACR,MAAMS,WAAW,EAAEU,QAAQC,QAAQ;oBAC3D;gBACF;gBACAhC,oBAAoB;oBAClBG;oBACAC;oBACAuB,MAAMf,KAAKmB,MAAM,IAAI,CAAC;oBACtB1B;oBACAC;oBACAC;oBACAE;oBACAsB,QAAQ7B,OAAOkB,aAAa,CAACR,MAAMS,WAAW,EAAEU;oBAChDrB;oBACAC,gBAAgB;oBAChBE;oBACAC;oBACAC;oBACAC;oBACAiB,YAAYrB,KAAKmB,MAAM,IAAI,CAAC;gBAC9B;YACF;QACF;IACF;AACF,EAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"defaultValue.d.ts","sourceRoot":"","sources":["../../src/populate/defaultValue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAA+C,MAAM,SAAS,CAAA;AAEjG,eAAO,MAAM,oBAAoB,EAAE,qBA6BlC,CAAA"}
|