@payloadcms/richtext-lexical 3.89.0-internal.95c9cba → 3.90.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/exports/client/{Field-J6MIUIWP.js → Field-YZR46UCY.js} +1 -1
- package/dist/exports/client/{Field-J6MIUIWP.js.map → Field-YZR46UCY.js.map} +1 -1
- package/dist/exports/client/bundled.css +1 -1
- package/dist/exports/client/chunk-OSMEE5HW.js +2 -0
- package/dist/exports/client/chunk-OSMEE5HW.js.map +7 -0
- package/dist/exports/client/component-UBRNPIQ6.js +2 -0
- package/dist/exports/client/component-UBRNPIQ6.js.map +7 -0
- package/dist/exports/client/index.js +21 -21
- package/dist/exports/client/index.js.map +4 -4
- package/dist/features/converters/lexicalToHtml/async/converters/heading.js +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/heading.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/list.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/list.js +4 -3
- package/dist/features/converters/lexicalToHtml/async/converters/list.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/heading.js +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/heading.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/list.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/list.js +4 -3
- package/dist/features/converters/lexicalToHtml/sync/converters/list.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/Component/nodeTags.spec.js +114 -0
- package/dist/features/converters/lexicalToJSX/Component/nodeTags.spec.js.map +1 -0
- package/dist/features/converters/lexicalToJSX/converter/converters/heading.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/heading.js +2 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/heading.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/list.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/list.js +2 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/list.js.map +1 -1
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/computeSelectionCount.d.ts +8 -0
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/computeSelectionCount.d.ts.map +1 -0
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/computeSelectionCount.js +19 -0
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/computeSelectionCount.js.map +1 -0
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.d.ts.map +1 -1
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js +16 -43
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js.map +1 -1
- package/dist/features/heading/constants.d.ts +2 -0
- package/dist/features/heading/constants.d.ts.map +1 -0
- package/dist/features/heading/constants.js +2 -0
- package/dist/features/heading/constants.js.map +1 -0
- package/dist/features/heading/server/index.d.ts.map +1 -1
- package/dist/features/heading/server/index.js +8 -2
- package/dist/features/heading/server/index.js.map +1 -1
- package/dist/features/heading/server/validate.d.ts +6 -0
- package/dist/features/heading/server/validate.d.ts.map +1 -0
- package/dist/features/heading/server/validate.js +15 -0
- package/dist/features/heading/server/validate.js.map +1 -0
- package/dist/features/lists/checklist/server/index.d.ts.map +1 -1
- package/dist/features/lists/checklist/server/index.js +5 -2
- package/dist/features/lists/checklist/server/index.js.map +1 -1
- package/dist/features/lists/htmlConverter.d.ts.map +1 -1
- package/dist/features/lists/htmlConverter.js +6 -3
- package/dist/features/lists/htmlConverter.js.map +1 -1
- package/dist/features/lists/orderedList/server/index.d.ts.map +1 -1
- package/dist/features/lists/orderedList/server/index.js +5 -2
- package/dist/features/lists/orderedList/server/index.js.map +1 -1
- package/dist/features/lists/shared/constants.d.ts +2 -0
- package/dist/features/lists/shared/constants.d.ts.map +1 -0
- package/dist/features/lists/shared/constants.js +2 -0
- package/dist/features/lists/shared/constants.js.map +1 -0
- package/dist/features/lists/shared/validate.d.ts +5 -0
- package/dist/features/lists/shared/validate.d.ts.map +1 -0
- package/dist/features/lists/shared/validate.js +15 -0
- package/dist/features/lists/shared/validate.js.map +1 -0
- package/dist/features/lists/unorderedList/server/index.d.ts.map +1 -1
- package/dist/features/lists/unorderedList/server/index.js +5 -2
- package/dist/features/lists/unorderedList/server/index.js.map +1 -1
- package/dist/features/relationship/client/index.d.ts +2 -2
- package/dist/features/relationship/client/index.d.ts.map +1 -1
- package/dist/features/relationship/client/index.js.map +1 -1
- package/dist/features/relationship/client/plugins/index.d.ts +2 -2
- package/dist/features/relationship/client/plugins/index.d.ts.map +1 -1
- package/dist/features/relationship/client/plugins/index.js +27 -31
- package/dist/features/relationship/client/plugins/index.js.map +1 -1
- package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts +2 -4
- package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts.map +1 -1
- package/dist/features/relationship/client/utils/useEnabledRelationships.js +52 -50
- package/dist/features/relationship/client/utils/useEnabledRelationships.js.map +1 -1
- package/dist/features/relationship/server/graphQLPopulationPromise.d.ts +2 -2
- package/dist/features/relationship/server/graphQLPopulationPromise.d.ts.map +1 -1
- package/dist/features/relationship/server/graphQLPopulationPromise.js +2 -2
- package/dist/features/relationship/server/graphQLPopulationPromise.js.map +1 -1
- package/dist/features/relationship/server/index.d.ts +8 -1
- package/dist/features/relationship/server/index.d.ts.map +1 -1
- package/dist/features/relationship/server/index.js +28 -11
- package/dist/features/relationship/server/index.js.map +1 -1
- package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts +7 -0
- package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts.map +1 -0
- package/dist/features/relationship/shared/filterEnabledRelationshipCollections.js +23 -0
- package/dist/features/relationship/shared/filterEnabledRelationshipCollections.js.map +1 -0
- package/dist/features/toolbars/shared/useToolbarStates.d.ts.map +1 -1
- package/dist/features/toolbars/shared/useToolbarStates.js +3 -1
- package/dist/features/toolbars/shared/useToolbarStates.js.map +1 -1
- package/dist/features/upload/client/component/index.js +2 -1
- package/dist/features/upload/client/component/index.js.map +1 -1
- package/dist/features/upload/client/index.d.ts +3 -2
- package/dist/features/upload/client/index.d.ts.map +1 -1
- package/dist/features/upload/client/index.js.map +1 -1
- package/dist/features/upload/client/plugin/index.d.ts.map +1 -1
- package/dist/features/upload/client/plugin/index.js +47 -52
- package/dist/features/upload/client/plugin/index.js.map +1 -1
- package/dist/features/upload/server/graphQLPopulationPromise.d.ts +2 -2
- package/dist/features/upload/server/graphQLPopulationPromise.d.ts.map +1 -1
- package/dist/features/upload/server/graphQLPopulationPromise.js +1 -1
- package/dist/features/upload/server/graphQLPopulationPromise.js.map +1 -1
- package/dist/features/upload/server/index.d.ts +6 -2
- package/dist/features/upload/server/index.d.ts.map +1 -1
- package/dist/features/upload/server/index.js +21 -14
- package/dist/features/upload/server/index.js.map +1 -1
- package/dist/features/upload/server/validate.d.ts +2 -2
- package/dist/features/upload/server/validate.d.ts.map +1 -1
- package/dist/features/upload/server/validate.js +3 -0
- package/dist/features/upload/server/validate.js.map +1 -1
- package/dist/field/Diff/converters/listitem/index.d.ts.map +1 -1
- package/dist/field/Diff/converters/listitem/index.js +2 -1
- package/dist/field/Diff/converters/listitem/index.js.map +1 -1
- package/dist/field/Diff/index.d.ts.map +1 -1
- package/dist/field/Diff/index.js +1 -0
- package/dist/field/Diff/index.js.map +1 -1
- package/dist/field/RenderLexical/index.d.ts +3 -1
- package/dist/field/RenderLexical/index.d.ts.map +1 -1
- package/dist/field/RenderLexical/index.js +23 -23
- package/dist/field/RenderLexical/index.js.map +1 -1
- package/dist/field/bundled.css +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/lexical/LexicalEditor.js.map +1 -1
- package/dist/lexical-proxy/@lexical-react/ExtensionComponent.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/ExtensionComponent.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/ExtensionComponent.js +2 -0
- package/dist/lexical-proxy/@lexical-react/ExtensionComponent.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.js +2 -0
- package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/ReactExtension.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/ReactExtension.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/ReactExtension.js +2 -0
- package/dist/lexical-proxy/@lexical-react/ReactExtension.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.js +2 -0
- package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.js +2 -0
- package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/TreeViewExtension.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/TreeViewExtension.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/TreeViewExtension.js +2 -0
- package/dist/lexical-proxy/@lexical-react/TreeViewExtension.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/useExtensionComponent.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/useExtensionComponent.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/useExtensionComponent.js +2 -0
- package/dist/lexical-proxy/@lexical-react/useExtensionComponent.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.js +2 -0
- package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.js +2 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.js +2 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.js +2 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.js +2 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.js.map +1 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.d.ts +2 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.d.ts.map +1 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.js +2 -0
- package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.js.map +1 -0
- package/package.json +94 -24
- package/dist/exports/client/chunk-FWFDJAJ5.js +0 -2
- package/dist/exports/client/chunk-FWFDJAJ5.js.map +0 -7
- package/dist/exports/client/component-BAAVC34S.js +0 -2
- package/dist/exports/client/component-BAAVC34S.js.map +0 -7
- package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.d.ts +0 -2
- package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.d.ts.map +0 -1
- package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.js +0 -2
- package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useExtensionSignalValue.d.ts","sourceRoot":"","sources":["../../../src/lexical-proxy/@lexical-react/useExtensionSignalValue.ts"],"names":[],"mappings":"AAAA,cAAc,wCAAwC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useExtensionSignalValue.js","names":[],"sources":["../../../src/lexical-proxy/@lexical-react/useExtensionSignalValue.ts"],"sourcesContent":["export * from '@lexical/react/useExtensionSignalValue'\n"],"mappings":"AAAA,cAAc","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLexicalAriaLiveRegion.d.ts","sourceRoot":"","sources":["../../../src/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.ts"],"names":[],"mappings":"AAAA,cAAc,yCAAyC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLexicalAriaLiveRegion.js","names":[],"sources":["../../../src/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.ts"],"sourcesContent":["export * from '@lexical/react/useLexicalAriaLiveRegion'\n"],"mappings":"AAAA,cAAc","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLexicalFocusManagerRef.d.ts","sourceRoot":"","sources":["../../../src/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.ts"],"names":[],"mappings":"AAAA,cAAc,0CAA0C,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLexicalFocusManagerRef.js","names":[],"sources":["../../../src/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.ts"],"sourcesContent":["export * from '@lexical/react/useLexicalFocusManagerRef'\n"],"mappings":"AAAA,cAAc","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLexicalFocusTrapRef.d.ts","sourceRoot":"","sources":["../../../src/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.ts"],"names":[],"mappings":"AAAA,cAAc,uCAAuC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLexicalFocusTrapRef.js","names":[],"sources":["../../../src/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.ts"],"sourcesContent":["export * from '@lexical/react/useLexicalFocusTrapRef'\n"],"mappings":"AAAA,cAAc","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLexicalRovingTabIndexRef.d.ts","sourceRoot":"","sources":["../../../src/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.ts"],"names":[],"mappings":"AAAA,cAAc,4CAA4C,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLexicalRovingTabIndexRef.js","names":[],"sources":["../../../src/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.ts"],"sourcesContent":["export * from '@lexical/react/useLexicalRovingTabIndexRef'\n"],"mappings":"AAAA,cAAc","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLexicalSlotRef.d.ts","sourceRoot":"","sources":["../../../src/lexical-proxy/@lexical-react/useLexicalSlotRef.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLexicalSlotRef.js","names":[],"sources":["../../../src/lexical-proxy/@lexical-react/useLexicalSlotRef.ts"],"sourcesContent":["export * from '@lexical/react/useLexicalSlotRef'\n"],"mappings":"AAAA,cAAc","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@payloadcms/richtext-lexical",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.90.0",
|
|
4
4
|
"description": "The officially supported Lexical richtext adapter for Payload",
|
|
5
5
|
"homepage": "https://payloadcms.com",
|
|
6
6
|
"repository": {
|
|
@@ -183,11 +183,6 @@
|
|
|
183
183
|
"types": "./dist/lexical-proxy/@lexical-react/LexicalContentEditable.d.ts",
|
|
184
184
|
"default": "./dist/lexical-proxy/@lexical-react/LexicalContentEditable.js"
|
|
185
185
|
},
|
|
186
|
-
"./lexical/react/LexicalContextMenuPlugin": {
|
|
187
|
-
"import": "./dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.js",
|
|
188
|
-
"types": "./dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.d.ts",
|
|
189
|
-
"default": "./dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.js"
|
|
190
|
-
},
|
|
191
186
|
"./lexical/react/LexicalNodeContextMenuPlugin": {
|
|
192
187
|
"import": "./dist/lexical-proxy/@lexical-react/LexicalNodeContextMenuPlugin.js",
|
|
193
188
|
"types": "./dist/lexical-proxy/@lexical-react/LexicalNodeContextMenuPlugin.d.ts",
|
|
@@ -328,6 +323,81 @@
|
|
|
328
323
|
"types": "./dist/lexical-proxy/@lexical-react/useLexicalTextEntity.d.ts",
|
|
329
324
|
"default": "./dist/lexical-proxy/@lexical-react/useLexicalTextEntity.js"
|
|
330
325
|
},
|
|
326
|
+
"./lexical/react/ExtensionComponent": {
|
|
327
|
+
"import": "./dist/lexical-proxy/@lexical-react/ExtensionComponent.js",
|
|
328
|
+
"types": "./dist/lexical-proxy/@lexical-react/ExtensionComponent.d.ts",
|
|
329
|
+
"default": "./dist/lexical-proxy/@lexical-react/ExtensionComponent.js"
|
|
330
|
+
},
|
|
331
|
+
"./lexical/react/LexicalExtensionComposer": {
|
|
332
|
+
"import": "./dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.js",
|
|
333
|
+
"types": "./dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.d.ts",
|
|
334
|
+
"default": "./dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.js"
|
|
335
|
+
},
|
|
336
|
+
"./lexical/react/LexicalExtensionEditorComposer": {
|
|
337
|
+
"import": "./dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.js",
|
|
338
|
+
"types": "./dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.d.ts",
|
|
339
|
+
"default": "./dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.js"
|
|
340
|
+
},
|
|
341
|
+
"./lexical/react/LexicalSelectionAlwaysOnDisplay": {
|
|
342
|
+
"import": "./dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.js",
|
|
343
|
+
"types": "./dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.d.ts",
|
|
344
|
+
"default": "./dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.js"
|
|
345
|
+
},
|
|
346
|
+
"./lexical/react/ReactExtension": {
|
|
347
|
+
"import": "./dist/lexical-proxy/@lexical-react/ReactExtension.js",
|
|
348
|
+
"types": "./dist/lexical-proxy/@lexical-react/ReactExtension.d.ts",
|
|
349
|
+
"default": "./dist/lexical-proxy/@lexical-react/ReactExtension.js"
|
|
350
|
+
},
|
|
351
|
+
"./lexical/react/ReactPluginHostExtension": {
|
|
352
|
+
"import": "./dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.js",
|
|
353
|
+
"types": "./dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.d.ts",
|
|
354
|
+
"default": "./dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.js"
|
|
355
|
+
},
|
|
356
|
+
"./lexical/react/ReactProviderExtension": {
|
|
357
|
+
"import": "./dist/lexical-proxy/@lexical-react/ReactProviderExtension.js",
|
|
358
|
+
"types": "./dist/lexical-proxy/@lexical-react/ReactProviderExtension.d.ts",
|
|
359
|
+
"default": "./dist/lexical-proxy/@lexical-react/ReactProviderExtension.js"
|
|
360
|
+
},
|
|
361
|
+
"./lexical/react/TreeViewExtension": {
|
|
362
|
+
"import": "./dist/lexical-proxy/@lexical-react/TreeViewExtension.js",
|
|
363
|
+
"types": "./dist/lexical-proxy/@lexical-react/TreeViewExtension.d.ts",
|
|
364
|
+
"default": "./dist/lexical-proxy/@lexical-react/TreeViewExtension.js"
|
|
365
|
+
},
|
|
366
|
+
"./lexical/react/useExtensionComponent": {
|
|
367
|
+
"import": "./dist/lexical-proxy/@lexical-react/useExtensionComponent.js",
|
|
368
|
+
"types": "./dist/lexical-proxy/@lexical-react/useExtensionComponent.d.ts",
|
|
369
|
+
"default": "./dist/lexical-proxy/@lexical-react/useExtensionComponent.js"
|
|
370
|
+
},
|
|
371
|
+
"./lexical/react/useExtensionSignalValue": {
|
|
372
|
+
"import": "./dist/lexical-proxy/@lexical-react/useExtensionSignalValue.js",
|
|
373
|
+
"types": "./dist/lexical-proxy/@lexical-react/useExtensionSignalValue.d.ts",
|
|
374
|
+
"default": "./dist/lexical-proxy/@lexical-react/useExtensionSignalValue.js"
|
|
375
|
+
},
|
|
376
|
+
"./lexical/react/useLexicalAriaLiveRegion": {
|
|
377
|
+
"import": "./dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.js",
|
|
378
|
+
"types": "./dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.d.ts",
|
|
379
|
+
"default": "./dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.js"
|
|
380
|
+
},
|
|
381
|
+
"./lexical/react/useLexicalFocusManagerRef": {
|
|
382
|
+
"import": "./dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.js",
|
|
383
|
+
"types": "./dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.d.ts",
|
|
384
|
+
"default": "./dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.js"
|
|
385
|
+
},
|
|
386
|
+
"./lexical/react/useLexicalFocusTrapRef": {
|
|
387
|
+
"import": "./dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.js",
|
|
388
|
+
"types": "./dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.d.ts",
|
|
389
|
+
"default": "./dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.js"
|
|
390
|
+
},
|
|
391
|
+
"./lexical/react/useLexicalRovingTabIndexRef": {
|
|
392
|
+
"import": "./dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.js",
|
|
393
|
+
"types": "./dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.d.ts",
|
|
394
|
+
"default": "./dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.js"
|
|
395
|
+
},
|
|
396
|
+
"./lexical/react/useLexicalSlotRef": {
|
|
397
|
+
"import": "./dist/lexical-proxy/@lexical-react/useLexicalSlotRef.js",
|
|
398
|
+
"types": "./dist/lexical-proxy/@lexical-react/useLexicalSlotRef.d.ts",
|
|
399
|
+
"default": "./dist/lexical-proxy/@lexical-react/useLexicalSlotRef.js"
|
|
400
|
+
},
|
|
331
401
|
"./ast/mdx": {
|
|
332
402
|
"import": "./dist/exports/server/ast/mdx.js",
|
|
333
403
|
"types": "./dist/exports/server/ast/mdx.d.ts",
|
|
@@ -353,24 +423,24 @@
|
|
|
353
423
|
]
|
|
354
424
|
},
|
|
355
425
|
"dependencies": {
|
|
356
|
-
"@lexical/clipboard": "0.
|
|
357
|
-
"@lexical/headless": "0.
|
|
358
|
-
"@lexical/html": "0.
|
|
359
|
-
"@lexical/link": "0.
|
|
360
|
-
"@lexical/list": "0.
|
|
361
|
-
"@lexical/mark": "0.
|
|
362
|
-
"@lexical/react": "0.
|
|
363
|
-
"@lexical/rich-text": "0.
|
|
364
|
-
"@lexical/selection": "0.
|
|
365
|
-
"@lexical/table": "0.
|
|
366
|
-
"@lexical/utils": "0.
|
|
426
|
+
"@lexical/clipboard": "0.50.0",
|
|
427
|
+
"@lexical/headless": "0.50.0",
|
|
428
|
+
"@lexical/html": "0.50.0",
|
|
429
|
+
"@lexical/link": "0.50.0",
|
|
430
|
+
"@lexical/list": "0.50.0",
|
|
431
|
+
"@lexical/mark": "0.50.0",
|
|
432
|
+
"@lexical/react": "0.50.0",
|
|
433
|
+
"@lexical/rich-text": "0.50.0",
|
|
434
|
+
"@lexical/selection": "0.50.0",
|
|
435
|
+
"@lexical/table": "0.50.0",
|
|
436
|
+
"@lexical/utils": "0.50.0",
|
|
367
437
|
"acorn": "8.16.0",
|
|
368
438
|
"bson-objectid": "2.0.4",
|
|
369
439
|
"csstype": "3.1.3",
|
|
370
440
|
"dequal": "2.0.3",
|
|
371
441
|
"escape-html": "1.0.3",
|
|
372
442
|
"jsox": "1.2.121",
|
|
373
|
-
"lexical": "0.
|
|
443
|
+
"lexical": "0.50.0",
|
|
374
444
|
"mdast-util-from-markdown": "2.0.2",
|
|
375
445
|
"mdast-util-mdx-jsx": "3.1.3",
|
|
376
446
|
"micromark-extension-mdx-jsx": "3.0.1",
|
|
@@ -378,8 +448,8 @@
|
|
|
378
448
|
"react-error-boundary": "4.1.2",
|
|
379
449
|
"ts-essentials": "10.0.3",
|
|
380
450
|
"uuid": "13.0.2",
|
|
381
|
-
"@payloadcms/
|
|
382
|
-
"@payloadcms/
|
|
451
|
+
"@payloadcms/ui": "3.90.0",
|
|
452
|
+
"@payloadcms/translations": "3.90.0"
|
|
383
453
|
},
|
|
384
454
|
"devDependencies": {
|
|
385
455
|
"@babel/cli": "7.27.2",
|
|
@@ -387,7 +457,7 @@
|
|
|
387
457
|
"@babel/preset-env": "7.27.2",
|
|
388
458
|
"@babel/preset-react": "7.27.1",
|
|
389
459
|
"@babel/preset-typescript": "7.27.1",
|
|
390
|
-
"@lexical/eslint-plugin": "0.
|
|
460
|
+
"@lexical/eslint-plugin": "0.50.0",
|
|
391
461
|
"@types/escape-html": "1.0.4",
|
|
392
462
|
"@types/json-schema": "7.0.15",
|
|
393
463
|
"@types/node": "22.15.30",
|
|
@@ -398,7 +468,7 @@
|
|
|
398
468
|
"esbuild": "0.27.1",
|
|
399
469
|
"esbuild-sass-plugin": "3.3.1",
|
|
400
470
|
"swc-plugin-transform-remove-imports": "8.3.0",
|
|
401
|
-
"payload": "3.
|
|
471
|
+
"payload": "3.90.0",
|
|
402
472
|
"@payloadcms/eslint-config": "3.28.0"
|
|
403
473
|
},
|
|
404
474
|
"peerDependencies": {
|
|
@@ -406,8 +476,8 @@
|
|
|
406
476
|
"@faceless-ui/scroll-info": "2.0.0",
|
|
407
477
|
"react": "^19.0.1 || ^19.1.2 || ^19.2.1",
|
|
408
478
|
"react-dom": "^19.0.1 || ^19.1.2 || ^19.2.1",
|
|
409
|
-
"@payloadcms/next": "3.
|
|
410
|
-
"payload": "3.
|
|
479
|
+
"@payloadcms/next": "3.90.0",
|
|
480
|
+
"payload": "3.90.0"
|
|
411
481
|
},
|
|
412
482
|
"engines": {
|
|
413
483
|
"node": "^18.20.2 || >=20.9.0"
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{b as R}from"./chunk-BZZVLW4U.js";import{c as G}from"react/compiler-runtime";import{jsx as w}from"react/jsx-runtime";import{Drawer as J,EditDepthProvider as K,useModal as Q}from"@payloadcms/ui";import"react";import{jsx as E,jsxs as j}from"react/jsx-runtime";import{useLexicalEditable as T}from"@lexical/react/useLexicalEditable";import{Form as v,FormSubmit as N,RenderFields as W,useDocumentForm as $,useDocumentInfo as k,useEffectEvent as L,useServerFunctions as B,useTranslation as H}from"@payloadcms/ui";import{abortAndIgnore as A}from"@payloadcms/ui/shared";import{deepCopyObjectSimpleWithoutReactComponents as O}from"payload/shared";import{useCallback as U,useEffect as y,useRef as V,useState as q}from"react";import{v4 as z}from"uuid";var I=({data:f,featureKey:e,fieldMapOverride:p,handleDrawerSubmit:h,schemaFieldsPathOverride:o,schemaPath:D,schemaPathSuffix:u})=>{let{t:S}=H(),{id:n,collectionSlug:a,getDocPreferences:s,globalSlug:i}=k(),{fields:c}=$(),r=T(),t=V(new AbortController),[m,P]=q(!1),{fieldProps:{featureClientSchemaMap:_}}=R(),{getFormState:C}=B(),d=o??`${D}.lexical_internal_feature.${e}${u?`.${u}`:""}`,b=p??_[e]?.[d],M=L(async l=>{let{state:g}=await C({id:n,collectionSlug:a,data:f??{},docPermissions:{fields:!0},docPreferences:await s(),documentFormState:O(c,{excludeFiles:!0}),globalSlug:i,initialBlockData:f,operation:"update",readOnly:!r,renderAllFields:!0,schemaPath:d,signal:l.signal});P(g)});y(()=>{let l=new AbortController;return M(l),()=>{A(l)}},[d,n,f,C,a,r,i,s]);let x=U(async({formState:l})=>{A(t.current);let g=new AbortController;t.current=g;let{state:F}=await C({id:n,collectionSlug:a,docPermissions:{fields:!0},docPreferences:await s(),documentFormState:O(c,{excludeFiles:!0}),formState:l,globalSlug:i,initialBlockFormState:l,operation:"update",readOnly:!r,schemaPath:d,signal:g.signal});return F||l},[C,n,r,a,s,c,i,d]);return y(()=>()=>{A(t.current)},[]),m===!1?null:j(v,{beforeSubmit:[x],disableValidationOnSubmit:!0,fields:Array.isArray(b)?b:[],initialState:m,onChange:[x],onSubmit:h,uuid:z(),children:[E(W,{fields:Array.isArray(b)?b:[],forceRender:!0,parentIndexPath:"",parentPath:"",parentSchemaPath:d,permissions:!0,readOnly:!r}),E(N,{children:S("fields:saveChanges")})]})};var pe=f=>{let e=G(15),{className:p,data:h,drawerSlug:o,drawerTitle:D,featureKey:u,fieldMapOverride:S,handleDrawerSubmit:n,schemaFieldsPathOverride:a,schemaPath:s,schemaPathSuffix:i}=f,{closeModal:c}=Q(),r=D??"",t;e[0]!==c||e[1]!==o||e[2]!==n?(t=(P,_)=>{c(o),setTimeout(()=>{n(P,_)},1)},e[0]=c,e[1]=o,e[2]=n,e[3]=t):t=e[3];let m;return e[4]!==p||e[5]!==h||e[6]!==o||e[7]!==u||e[8]!==S||e[9]!==a||e[10]!==s||e[11]!==i||e[12]!==r||e[13]!==t?(m=w(K,{children:w(J,{className:p,slug:o,title:r,children:w(I,{data:h,featureKey:u,fieldMapOverride:S,handleDrawerSubmit:t,schemaFieldsPathOverride:a,schemaPath:s,schemaPathSuffix:i})})}),e[4]=p,e[5]=h,e[6]=o,e[7]=u,e[8]=S,e[9]=a,e[10]=s,e[11]=i,e[12]=r,e[13]=t,e[14]=m):m=e[14],m};import{createCommand as X}from"lexical";var Ce=X("INSERT_UPLOAD_WITH_DRAWER_COMMAND");export{pe as a,Ce as b};
|
|
2
|
-
//# sourceMappingURL=chunk-FWFDJAJ5.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/utilities/fieldsDrawer/Drawer.tsx", "../../../src/utilities/fieldsDrawer/DrawerContent.tsx", "../../../src/features/upload/client/drawer/commands.ts"],
|
|
4
|
-
"sourcesContent": ["'use client'\nimport type { ClientField, Data, FormState, JsonObject } from 'payload'\n\nimport { Drawer, EditDepthProvider, useModal } from '@payloadcms/ui'\nimport React from 'react'\n\nimport { DrawerContent } from './DrawerContent.js'\n\nexport type FieldsDrawerProps = {\n readonly className?: string\n readonly data?: Data\n readonly drawerSlug: string\n readonly drawerTitle?: string\n readonly featureKey: string\n readonly fieldMapOverride?: ClientField[]\n readonly handleDrawerSubmit: (fields: FormState, data: JsonObject) => void\n readonly schemaFieldsPathOverride?: string\n readonly schemaPath: string\n readonly schemaPathSuffix?: string\n}\n\n/**\n * This FieldsDrawer component can be used to easily create a Drawer that contains a form with fields within your feature.\n * The fields are taken directly from the schema map based on your `featureKey` and `schemaPathSuffix`. Thus, this can only\n * be used if you provide your field schema inside the `generateSchemaMap` prop of your feature.server.ts.\n */\nexport const FieldsDrawer: React.FC<FieldsDrawerProps> = ({\n className,\n data,\n drawerSlug,\n drawerTitle,\n featureKey,\n fieldMapOverride,\n handleDrawerSubmit,\n schemaFieldsPathOverride,\n schemaPath,\n schemaPathSuffix,\n}) => {\n const { closeModal } = useModal()\n // The Drawer only renders its children (and itself) if it's open. Thus, by extracting the main content\n // to DrawerContent, this should be faster\n return (\n <EditDepthProvider>\n <Drawer className={className} slug={drawerSlug} title={drawerTitle ?? ''}>\n <DrawerContent\n data={data}\n featureKey={featureKey}\n fieldMapOverride={fieldMapOverride}\n handleDrawerSubmit={(args, args2) => {\n // Simply close drawer - no need for useLexicalDrawer here as at this point,\n // we don't need to restore the cursor position. This is handled by the useEffect in useLexicalDrawer.\n closeModal(drawerSlug)\n\n // Actual drawer submit logic needs to be triggered after the drawer is closed.\n // That's because the lexical selection / cursor restore logic that is striggerer by\n // `useLexicalDrawer` neeeds to be triggered before any editor.update calls that may happen\n // in the `handleDrawerSubmit` function.\n setTimeout(() => {\n handleDrawerSubmit(args, args2)\n }, 1)\n }}\n schemaFieldsPathOverride={schemaFieldsPathOverride}\n schemaPath={schemaPath}\n schemaPathSuffix={schemaPathSuffix}\n />\n </Drawer>\n </EditDepthProvider>\n )\n}\n", "'use client'\nimport type { FormState } from 'payload'\n\nimport { useLexicalEditable } from '@lexical/react/useLexicalEditable'\nimport {\n Form,\n FormSubmit,\n RenderFields,\n useDocumentForm,\n useDocumentInfo,\n useEffectEvent,\n useServerFunctions,\n useTranslation,\n} from '@payloadcms/ui'\nimport { abortAndIgnore } from '@payloadcms/ui/shared'\nimport { deepCopyObjectSimpleWithoutReactComponents } from 'payload/shared'\nimport React, { useCallback, useEffect, useRef, useState } from 'react'\nimport { v4 as uuid } from 'uuid'\n\nimport type { FieldsDrawerProps } from './Drawer.js'\n\nimport { useEditorConfigContext } from '../../lexical/config/client/EditorConfigProvider.js'\n\nexport const DrawerContent: React.FC<Omit<FieldsDrawerProps, 'drawerSlug' | 'drawerTitle'>> = ({\n data,\n featureKey,\n fieldMapOverride,\n handleDrawerSubmit,\n schemaFieldsPathOverride,\n schemaPath,\n schemaPathSuffix,\n}) => {\n const { t } = useTranslation()\n const { id, collectionSlug, getDocPreferences, globalSlug } = useDocumentInfo()\n const { fields: parentDocumentFields } = useDocumentForm()\n const isEditable = useLexicalEditable()\n\n const onChangeAbortControllerRef = useRef(new AbortController())\n\n const [initialState, setInitialState] = useState<false | FormState | undefined>(false)\n\n const {\n fieldProps: { featureClientSchemaMap },\n } = useEditorConfigContext()\n\n const { getFormState } = useServerFunctions()\n\n const schemaFieldsPath =\n schemaFieldsPathOverride ??\n `${schemaPath}.lexical_internal_feature.${featureKey}${schemaPathSuffix ? `.${schemaPathSuffix}` : ''}`\n\n const fields: any = fieldMapOverride ?? featureClientSchemaMap[featureKey]?.[schemaFieldsPath] // Field Schema\n\n // Parent form state changes after autosave. Read its latest value when initializing without\n // reinitializing this drawer and discarding its unsaved form state after every parent update.\n const getInitialState = useEffectEvent(async (controller: AbortController) => {\n const { state } = await getFormState({\n id,\n collectionSlug,\n data: data ?? {},\n docPermissions: {\n fields: true,\n },\n docPreferences: await getDocPreferences(),\n documentFormState: deepCopyObjectSimpleWithoutReactComponents(parentDocumentFields, {\n excludeFiles: true,\n }),\n globalSlug,\n initialBlockData: data,\n operation: 'update',\n readOnly: !isEditable,\n renderAllFields: true,\n schemaPath: schemaFieldsPath,\n signal: controller.signal,\n })\n\n setInitialState(state)\n })\n\n useEffect(() => {\n const controller = new AbortController()\n\n void getInitialState(controller)\n\n return () => {\n abortAndIgnore(controller)\n }\n }, [\n schemaFieldsPath,\n id,\n data,\n getFormState,\n collectionSlug,\n isEditable,\n globalSlug,\n getDocPreferences,\n ])\n\n const onChange = useCallback(\n async ({ formState: prevFormState }: { formState: FormState }) => {\n abortAndIgnore(onChangeAbortControllerRef.current)\n\n const controller = new AbortController()\n onChangeAbortControllerRef.current = controller\n\n const { state } = await getFormState({\n id,\n collectionSlug,\n docPermissions: {\n fields: true,\n },\n docPreferences: await getDocPreferences(),\n documentFormState: deepCopyObjectSimpleWithoutReactComponents(parentDocumentFields, {\n excludeFiles: true,\n }),\n formState: prevFormState,\n globalSlug,\n initialBlockFormState: prevFormState,\n operation: 'update',\n readOnly: !isEditable,\n schemaPath: schemaFieldsPath,\n signal: controller.signal,\n })\n\n if (!state) {\n return prevFormState\n }\n\n return state\n },\n [\n getFormState,\n id,\n isEditable,\n collectionSlug,\n getDocPreferences,\n parentDocumentFields,\n globalSlug,\n schemaFieldsPath,\n ],\n )\n\n // cleanup effect\n useEffect(() => {\n return () => {\n abortAndIgnore(onChangeAbortControllerRef.current)\n }\n }, [])\n\n if (initialState === false) {\n return null\n }\n\n return (\n <Form\n beforeSubmit={[onChange]}\n disableValidationOnSubmit\n fields={Array.isArray(fields) ? fields : []}\n initialState={initialState}\n onChange={[onChange]}\n onSubmit={handleDrawerSubmit}\n uuid={uuid()}\n >\n <RenderFields\n fields={Array.isArray(fields) ? fields : []}\n forceRender\n parentIndexPath=\"\"\n parentPath=\"\" // See Blocks feature path for details as for why this is empty\n parentSchemaPath={schemaFieldsPath}\n permissions={true}\n readOnly={!isEditable}\n />\n <FormSubmit>{t('fields:saveChanges')}</FormSubmit>\n </Form>\n )\n}\n", "'use client'\nimport type { LexicalCommand } from 'lexical'\n\nimport { createCommand } from 'lexical'\n\nexport const INSERT_UPLOAD_WITH_DRAWER_COMMAND: LexicalCommand<{\n replace: { nodeKey: string } | false\n}> = createCommand('INSERT_UPLOAD_WITH_DRAWER_COMMAND')\n"],
|
|
5
|
-
"mappings": "wCAAA,OAAAA,KAAAC,MAAA,iEAGA,OAASC,UAAAA,EAAQC,qBAAAA,EAAmBC,YAAAA,MAAgB,iBACpD,MAAkB,0DCDlB,OAASC,sBAAAA,MAA0B,oCACnC,OACEC,QAAAA,EACAC,cAAAA,EACAC,gBAAAA,EACAC,mBAAAA,EACAC,mBAAAA,EACAC,kBAAAA,EACAC,sBAAAA,EACAC,kBAAAA,MACK,iBACP,OAASC,kBAAAA,MAAsB,wBAC/B,OAASC,8CAAAA,MAAkD,iBAC3D,OAAgBC,eAAAA,EAAaC,aAAAA,EAAWC,UAAAA,EAAQC,YAAAA,MAAgB,QAChE,OAASC,MAAMC,MAAY,OAMpB,IAAMC,EAAiFA,CAAC,CAC7FC,KAAAA,EACAC,WAAAA,EACAC,iBAAAA,EACAC,mBAAAA,EACAC,yBAAAA,EACAC,WAAAA,EACAC,iBAAAA,CAAgB,IACjB,CACC,GAAM,CAAEC,EAAAA,CAAC,EAAKC,EAAA,EACR,CAAEC,GAAAA,EAAIC,eAAAA,EAAgBC,kBAAAA,EAAmBC,WAAAA,CAAU,EAAKC,EAAA,EACxD,CAAEC,OAAQC,CAAoB,EAAKC,EAAA,EACnCC,EAAaC,EAAA,EAEbC,EAA6BC,EAAO,IAAIC,eAAA,EAExC,CAACC,EAAcC,CAAA,EAAmBC,EAAwC,EAAA,EAE1E,CACJC,WAAY,CAAEC,uBAAAA,CAAsB,CAAE,EACpCC,EAAA,EAEE,CAAEC,aAAAA,CAAY,EAAKC,EAAA,EAEnBC,EACJ1B,GACA,GAAGC,CAAA,6BAAuCJ,CAAA,GAAaK,EAAmB,IAAIA,CAAA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AA,CAAA,IAAAE,GAAAF,EAAA,CAAA,IAAAG,GAAAH,EAAA,CAAA,IAAAI,GAAAJ,EAAA,CAAA,IAAAM,GAAAN,EAAA,CAAA,IAAAO,GAAAP,EAAA,CAAA,IAAAS,GAAAT,EAAA,EAAA,IAAAU,GAAAV,EAAA,EAAA,IAAAW,GAAAX,EAAA,EAAA,IAAAc,GAAAd,EAAA,EAAA,IAAAe,GAlBNI,EAAAC,EAAAC,EAAA,CAAAC,SACEF,EAAAG,EAAA,CAAArB,UAAAA,EAAAsB,KAAoCpB,EAAAqB,MAAmBX,EAAeQ,SACpEF,EAAAM,EAAA,CAAAvB,KAAAA,EAAAG,WAAAA,EAAAC,iBAAAA,EAAAC,mBAIsBO,EAYpBN,yBAAAA,EAAAC,WAAAA,EAAAC,iBAAAA,CAAA,CAAA,iGAlBNQ,GEvCJ,OAASQ,iBAAAA,MAAqB,UAEvB,IAAMC,GAERD,EAAc,mCAAA",
|
|
6
|
-
"names": ["c", "_c", "Drawer", "EditDepthProvider", "useModal", "useLexicalEditable", "Form", "FormSubmit", "RenderFields", "useDocumentForm", "useDocumentInfo", "useEffectEvent", "useServerFunctions", "useTranslation", "abortAndIgnore", "deepCopyObjectSimpleWithoutReactComponents", "useCallback", "useEffect", "useRef", "useState", "v4", "uuid", "DrawerContent", "data", "featureKey", "fieldMapOverride", "handleDrawerSubmit", "schemaFieldsPathOverride", "schemaPath", "schemaPathSuffix", "t", "useTranslation", "id", "collectionSlug", "getDocPreferences", "globalSlug", "useDocumentInfo", "fields", "parentDocumentFields", "useDocumentForm", "isEditable", "useLexicalEditable", "onChangeAbortControllerRef", "useRef", "AbortController", "initialState", "setInitialState", "useState", "fieldProps", "featureClientSchemaMap", "useEditorConfigContext", "getFormState", "useServerFunctions", "schemaFieldsPath", "getInitialState", "useEffectEvent", "controller", "state", "docPermissions", "docPreferences", "documentFormState", "deepCopyObjectSimpleWithoutReactComponents", "excludeFiles", "initialBlockData", "operation", "readOnly", "renderAllFields", "signal", "useEffect", "abortAndIgnore", "onChange", "useCallback", "formState", "prevFormState", "current", "initialBlockFormState", "_jsxs", "Form", "beforeSubmit", "disableValidationOnSubmit", "Array", "isArray", "onSubmit", "uuid", "_jsx", "RenderFields", "forceRender", "parentIndexPath", "parentPath", "parentSchemaPath", "permissions", "FormSubmit", "FieldsDrawer", "t0", "$", "_c", "className", "data", "drawerSlug", "drawerTitle", "featureKey", "fieldMapOverride", "handleDrawerSubmit", "schemaFieldsPathOverride", "schemaPath", "schemaPathSuffix", "closeModal", "useModal", "t1", "t2", "args", "args2", "setTimeout", "t3", "_jsx", "EditDepthProvider", "children", "Drawer", "slug", "title", "DrawerContent", "createCommand", "INSERT_UPLOAD_WITH_DRAWER_COMMAND"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";import{a as $,b as S}from"./chunk-FWFDJAJ5.js";import{a as C}from"./chunk-INBEEENE.js";import{a as N}from"./chunk-F26IQ5RE.js";import{b as m}from"./chunk-BZZVLW4U.js";import{jsx as a,jsxs as n}from"react/jsx-runtime";import{useLexicalComposerContext as Y}from"@lexical/react/LexicalComposerContext.js";import{useLexicalEditable as Z}from"@lexical/react/useLexicalEditable";import{getTranslation as R}from"@payloadcms/translations";import{Button as p,formatDrawerSlug as ee,Thumbnail as te,useConfig as ae,useEditDepth as oe,usePayloadAPI as le,useTranslation as ie}from"@payloadcms/ui";import{$getNodeByKey as y}from"lexical";import{formatAdminURL as se,isImage as re}from"payload/shared";import{useCallback as h,useId as ne,useReducer as de,useRef as ce,useState as ue}from"react";var E={depth:0},Se=L=>{let{className:e,data:{fields:U,relationTo:f,value:d},format:P,nodeKey:l}=L;if(typeof d=="object")throw new Error("Upload value should be a string or number. The Lexical Upload component should not receive the populated value object.");let{config:{routes:{api:T},serverURL:F},getEntityConfig:j}=ae(),I=ce(null),{uuid:z}=m(),A=oe(),[i]=Y(),{editorConfig:B,fieldProps:{schemaPath:k}}=m(),c=Z(),{i18n:g,t:s}=ie(),[_,K]=de(r=>r+1,0),[o]=ue(()=>j({collectionSlug:f})),M=ne(),b=ee({slug:"lexical-upload-drawer-"+z+M,depth:A}),{toggleDrawer:O}=C(b,!0),{closeDocumentDrawer:w,DocumentDrawer:W,DocumentDrawerToggler:H}=N({id:d,collectionSlug:o.slug}),[{data:t},{setParams:D}]=le(se({apiRoute:T,path:`/${o.slug}/${d}`,serverURL:F}),{initialParams:E}),v=t?.thumbnailURL||t?.url,q=h(()=>{i.update(()=>{y(l)?.remove()})},[i,l]),G=h(r=>{D({...E,cacheBust:_}),K(),w()},[D,_,w]),x=B?.resolvedFeatureMap?.get("upload")?.sanitizedClientFeatureProps.collections?.[o.slug]?.hasExtraFields,J=h((r,V)=>{i.update(()=>{let u=y(l);if(u){let X={...u.getData(),fields:V};u.setData(X)}})},[i,l]),Q=v&&t?.width&&t?.height?t.width>t.height?"landscape":"portrait":"landscape";return n("div",{className:`${e}__contents ${e}__contents--${Q}`,"data-align":P||void 0,"data-filename":t?.filename,ref:I,children:[n("div",{className:`${e}__card`,children:[n("div",{className:`${e}__media`,children:[a(te,{collectionSlug:f,fileSrc:re(t?.mimeType)?v:null,height:t?.height,size:"none",width:t?.width}),c&&a("div",{className:`${e}__overlay ${e}__floater`,children:n("div",{className:`${e}__actions`,role:"toolbar",children:[x?a(p,{buttonStyle:"icon-label",className:`${e}__upload-drawer-toggler`,disabled:!c,el:"button",icon:"edit",onClick:O,round:!0,size:"medium",tooltip:s("fields:editRelationship")}):null,a(p,{buttonStyle:"icon-label",className:`${e}__swap-drawer-toggler`,disabled:!c,el:"button",icon:"swap",onClick:()=>{i.dispatchCommand(S,{replace:{nodeKey:l}})},round:!0,size:"medium",tooltip:s("fields:swapUpload")}),a(p,{buttonStyle:"icon-label",className:`${e}__removeButton`,disabled:!c,icon:"x",onClick:r=>{r.preventDefault(),q()},round:!0,size:"medium",tooltip:s("fields:removeUpload")})]})})]}),n("div",{className:`${e}__metaOverlay ${e}__floater`,children:[a(H,{className:`${e}__doc-drawer-toggler`,children:a("strong",{className:`${e}__filename`,children:t?.filename||s("general:untitled")})}),a("div",{className:`${e}__collectionLabel`,children:R(o.labels.singular,g)})]})]}),d?a(W,{onSave:G}):null,x?a($,{data:U,drawerSlug:b,drawerTitle:s("general:editLabel",{label:R(o.labels.singular,g)}),featureKey:"upload",handleDrawerSubmit:J,schemaPath:k,schemaPathSuffix:o.slug}):null]})};export{Se as UploadComponent};
|
|
2
|
-
//# sourceMappingURL=component-BAAVC34S.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/features/upload/client/component/index.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\nimport type { ClientCollectionConfig, Data, FormState, JsonObject } from 'payload'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { useLexicalEditable } from '@lexical/react/useLexicalEditable'\nimport { getTranslation } from '@payloadcms/translations'\nimport {\n Button,\n formatDrawerSlug,\n Thumbnail,\n useConfig,\n useEditDepth,\n usePayloadAPI,\n useTranslation,\n} from '@payloadcms/ui'\nimport { $getNodeByKey, type ElementFormatType } from 'lexical'\nimport { formatAdminURL, isImage } from 'payload/shared'\nimport React, { useCallback, useId, useReducer, useRef, useState } from 'react'\n\nimport type { BaseClientFeatureProps } from '../../../typesClient.js'\nimport type { UploadData } from '../../server/nodes/UploadNode.js'\nimport type { UploadFeaturePropsClient } from '../index.js'\nimport type { UploadNode } from '../nodes/UploadNode.js'\n\nimport { useEditorConfigContext } from '../../../../lexical/config/client/EditorConfigProvider.js'\nimport { FieldsDrawer } from '../../../../utilities/fieldsDrawer/Drawer.js'\nimport { useLexicalDocumentDrawer } from '../../../../utilities/fieldsDrawer/useLexicalDocumentDrawer.js'\nimport { useLexicalDrawer } from '../../../../utilities/fieldsDrawer/useLexicalDrawer.js'\nimport { INSERT_UPLOAD_WITH_DRAWER_COMMAND } from '../drawer/commands.js'\nimport './index.scss'\n\nconst initialParams = {\n depth: 0,\n}\n\nexport type ElementProps = {\n className: string\n data: UploadData\n format?: ElementFormatType\n nodeKey: string\n}\n\nexport const UploadComponent: React.FC<ElementProps> = (props) => {\n const {\n className: baseClass,\n data: { fields, relationTo, value },\n format,\n nodeKey,\n } = props\n\n if (typeof value === 'object') {\n throw new Error(\n 'Upload value should be a string or number. The Lexical Upload component should not receive the populated value object.',\n )\n }\n\n const {\n config: {\n routes: { api },\n serverURL,\n },\n getEntityConfig,\n } = useConfig()\n const uploadRef = useRef<HTMLDivElement | null>(null)\n const { uuid } = useEditorConfigContext()\n const editDepth = useEditDepth()\n const [editor] = useLexicalComposerContext()\n\n const {\n editorConfig,\n fieldProps: { schemaPath },\n } = useEditorConfigContext()\n const isEditable = useLexicalEditable()\n const { i18n, t } = useTranslation()\n const [cacheBust, dispatchCacheBust] = useReducer((state) => state + 1, 0)\n const [relatedCollection] = useState<ClientCollectionConfig>(() =>\n getEntityConfig({ collectionSlug: relationTo }),\n )\n\n const componentID = useId()\n\n const extraFieldsDrawerSlug = formatDrawerSlug({\n slug: `lexical-upload-drawer-` + uuid + componentID, // There can be multiple upload components, each with their own drawer, in one single editor => separate them by componentID\n depth: editDepth,\n })\n\n // Need to use hook to initialize useEffect that restores cursor position\n const { toggleDrawer } = useLexicalDrawer(extraFieldsDrawerSlug, true)\n\n const { closeDocumentDrawer, DocumentDrawer, DocumentDrawerToggler } = useLexicalDocumentDrawer({\n id: value,\n collectionSlug: relatedCollection.slug,\n })\n\n // Get the referenced document\n const [{ data }, { setParams }] = usePayloadAPI(\n formatAdminURL({ apiRoute: api, path: `/${relatedCollection.slug}/${value}`, serverURL }),\n { initialParams },\n )\n\n const thumbnailSRC = data?.thumbnailURL || data?.url\n\n const removeUpload = useCallback(() => {\n editor.update(() => {\n $getNodeByKey(nodeKey)?.remove()\n })\n }, [editor, nodeKey])\n\n const updateUpload = useCallback(\n (_data: Data) => {\n setParams({\n ...initialParams,\n cacheBust, // do this to get the usePayloadAPI to re-fetch the data even though the URL string hasn't changed\n })\n\n dispatchCacheBust()\n closeDocumentDrawer()\n },\n [setParams, cacheBust, closeDocumentDrawer],\n )\n\n const hasExtraFields = (\n editorConfig?.resolvedFeatureMap?.get('upload')\n ?.sanitizedClientFeatureProps as BaseClientFeatureProps<UploadFeaturePropsClient>\n ).collections?.[relatedCollection.slug]?.hasExtraFields\n\n const onExtraFieldsDrawerSubmit = useCallback(\n (_: FormState, data: JsonObject) => {\n // Update lexical node (with key nodeKey) with new data\n editor.update(() => {\n const uploadNode: null | UploadNode = $getNodeByKey(nodeKey)\n if (uploadNode) {\n const newData: UploadData = {\n ...uploadNode.getData(),\n fields: data,\n }\n uploadNode.setData(newData)\n }\n })\n },\n [editor, nodeKey],\n )\n\n const aspectRatio =\n thumbnailSRC && data?.width && data?.height\n ? data.width > data.height\n ? 'landscape'\n : 'portrait'\n : 'landscape'\n\n return (\n <div\n className={`${baseClass}__contents ${baseClass}__contents--${aspectRatio}`}\n data-align={format || undefined}\n data-filename={data?.filename}\n ref={uploadRef}\n >\n <div className={`${baseClass}__card`}>\n <div className={`${baseClass}__media`}>\n <Thumbnail\n collectionSlug={relationTo}\n fileSrc={isImage(data?.mimeType) ? thumbnailSRC : null}\n height={data?.height}\n size=\"none\"\n width={data?.width}\n />\n\n {isEditable && (\n <div className={`${baseClass}__overlay ${baseClass}__floater`}>\n <div className={`${baseClass}__actions`} role=\"toolbar\">\n {hasExtraFields ? (\n <Button\n buttonStyle=\"icon-label\"\n className={`${baseClass}__upload-drawer-toggler`}\n disabled={!isEditable}\n el=\"button\"\n icon=\"edit\"\n onClick={toggleDrawer}\n round\n size=\"medium\"\n tooltip={t('fields:editRelationship')}\n />\n ) : null}\n\n <Button\n buttonStyle=\"icon-label\"\n className={`${baseClass}__swap-drawer-toggler`}\n disabled={!isEditable}\n el=\"button\"\n icon=\"swap\"\n onClick={() => {\n editor.dispatchCommand(INSERT_UPLOAD_WITH_DRAWER_COMMAND, {\n replace: { nodeKey },\n })\n }}\n round\n size=\"medium\"\n tooltip={t('fields:swapUpload')}\n />\n\n <Button\n buttonStyle=\"icon-label\"\n className={`${baseClass}__removeButton`}\n disabled={!isEditable}\n icon=\"x\"\n onClick={(e) => {\n e.preventDefault()\n removeUpload()\n }}\n round\n size=\"medium\"\n tooltip={t('fields:removeUpload')}\n />\n </div>\n </div>\n )}\n </div>\n\n <div className={`${baseClass}__metaOverlay ${baseClass}__floater`}>\n <DocumentDrawerToggler className={`${baseClass}__doc-drawer-toggler`}>\n <strong className={`${baseClass}__filename`}>\n {data?.filename || t('general:untitled')}\n </strong>\n </DocumentDrawerToggler>\n <div className={`${baseClass}__collectionLabel`}>\n {getTranslation(relatedCollection.labels.singular, i18n)}\n </div>\n </div>\n </div>\n\n {value ? <DocumentDrawer onSave={updateUpload} /> : null}\n {hasExtraFields ? (\n <FieldsDrawer\n data={fields}\n drawerSlug={extraFieldsDrawerSlug}\n drawerTitle={t('general:editLabel', {\n label: getTranslation(relatedCollection.labels.singular, i18n),\n })}\n featureKey=\"upload\"\n handleDrawerSubmit={onExtraFieldsDrawerSubmit}\n schemaPath={schemaPath}\n schemaPathSuffix={relatedCollection.slug}\n />\n ) : null}\n </div>\n )\n}\n"],
|
|
5
|
-
"mappings": "sOAGA,OAASA,6BAAAA,MAAiC,2CAC1C,OAASC,sBAAAA,MAA0B,oCACnC,OAASC,kBAAAA,MAAsB,2BAC/B,OACEC,UAAAA,EACAC,oBAAAA,GACAC,aAAAA,GACAC,aAAAA,GACAC,gBAAAA,GACAC,iBAAAA,GACAC,kBAAAA,OACK,iBACP,OAASC,iBAAAA,MAA6C,UACtD,OAASC,kBAAAA,GAAgBC,WAAAA,OAAe,iBACxC,OAAgBC,eAAAA,EAAaC,SAAAA,GAAOC,cAAAA,GAAYC,UAAAA,GAAQC,YAAAA,OAAgB,QAcxE,IAAMC,EAAgB,CACpBC,MAAO,CACT,EASaC,GAA2CC,GAAA,CACtD,GAAM,CACJC,UAAWC,EACXC,KAAM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ACXC,mBAAoB1C,EACpB7C,WAAYA,EACZwF,iBAAkB9E,EAAkBO,OAEpC,IAAA,GAGV",
|
|
6
|
-
"names": ["useLexicalComposerContext", "useLexicalEditable", "getTranslation", "Button", "formatDrawerSlug", "Thumbnail", "useConfig", "useEditDepth", "usePayloadAPI", "useTranslation", "$getNodeByKey", "formatAdminURL", "isImage", "useCallback", "useId", "useReducer", "useRef", "useState", "initialParams", "depth", "UploadComponent", "props", "className", "baseClass", "data", "fields", "relationTo", "value", "format", "nodeKey", "Error", "config", "routes", "api", "serverURL", "getEntityConfig", "useConfig", "uploadRef", "useRef", "uuid", "useEditorConfigContext", "editDepth", "useEditDepth", "editor", "useLexicalComposerContext", "editorConfig", "fieldProps", "schemaPath", "isEditable", "useLexicalEditable", "i18n", "t", "useTranslation", "cacheBust", "dispatchCacheBust", "useReducer", "state", "relatedCollection", "useState", "collectionSlug", "componentID", "useId", "extraFieldsDrawerSlug", "formatDrawerSlug", "slug", "toggleDrawer", "useLexicalDrawer", "closeDocumentDrawer", "DocumentDrawer", "DocumentDrawerToggler", "useLexicalDocumentDrawer", "id", "setParams", "usePayloadAPI", "formatAdminURL", "apiRoute", "path", "thumbnailSRC", "thumbnailURL", "url", "removeUpload", "useCallback", "update", "$getNodeByKey", "remove", "updateUpload", "_data", "hasExtraFields", "resolvedFeatureMap", "get", "sanitizedClientFeatureProps", "collections", "onExtraFieldsDrawerSubmit", "_", "uploadNode", "newData", "getData", "setData", "aspectRatio", "width", "height", "_jsxs", "undefined", "filename", "ref", "_jsx", "Thumbnail", "fileSrc", "isImage", "mimeType", "size", "role", "Button", "buttonStyle", "disabled", "el", "icon", "onClick", "round", "tooltip", "dispatchCommand", "INSERT_UPLOAD_WITH_DRAWER_COMMAND", "replace", "e", "preventDefault", "getTranslation", "labels", "singular", "onSave", "FieldsDrawer", "drawerSlug", "drawerTitle", "label", "featureKey", "handleDrawerSubmit", "schemaPathSuffix"]
|
|
7
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LexicalContextMenuPlugin.d.ts","sourceRoot":"","sources":["../../../src/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.tsx"],"names":[],"mappings":"AAAA,cAAc,yCAAyC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LexicalContextMenuPlugin.js","names":[],"sources":["../../../src/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.tsx"],"sourcesContent":["export * from '@lexical/react/LexicalContextMenuPlugin'\n"],"mappings":"AAAA,cAAc","ignoreList":[]}
|