@payloadcms/richtext-lexical 3.0.0-beta.127 → 3.0.0-beta.129
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/LICENSE.md +1 -1
- package/dist/cell/rscEntry.d.ts +12 -0
- package/dist/cell/rscEntry.d.ts.map +1 -0
- package/dist/cell/rscEntry.js +82 -0
- package/dist/cell/rscEntry.js.map +1 -0
- package/dist/exports/client/Field-SHUAQNQD.js +2 -0
- package/dist/exports/client/Field-SHUAQNQD.js.map +7 -0
- package/dist/exports/client/RelationshipComponent-IMM4CFBE.js +2 -0
- package/dist/exports/client/RelationshipComponent-IMM4CFBE.js.map +7 -0
- package/dist/exports/client/bundled.css +1 -1
- package/dist/exports/client/{chunk-NEO76RJK.js → chunk-352SHIZR.js} +2 -2
- package/dist/exports/client/chunk-75T7MDBH.js +2 -0
- package/dist/exports/client/chunk-75T7MDBH.js.map +7 -0
- package/dist/exports/client/{chunk-XY4TCSM7.js → chunk-O4IOO4EU.js} +2 -2
- package/dist/exports/client/chunk-OOBB5GCO.js +2 -0
- package/dist/exports/client/chunk-OOBB5GCO.js.map +7 -0
- package/dist/exports/client/chunk-PDAZFJVO.js +2 -0
- package/dist/exports/client/chunk-PDAZFJVO.js.map +7 -0
- package/dist/exports/client/{chunk-32KXGBIQ.js → chunk-ZOYGBIAN.js} +2 -2
- package/dist/exports/client/component-EHTN2BHZ.js +2 -0
- package/dist/exports/client/component-EHTN2BHZ.js.map +7 -0
- package/dist/exports/client/component-YE2TDR5O.js +2 -0
- package/dist/exports/client/component-YE2TDR5O.js.map +7 -0
- package/dist/exports/client/componentInline-N5LJ2LY2.js +2 -0
- package/dist/exports/client/componentInline-N5LJ2LY2.js.map +7 -0
- package/dist/exports/client/index.d.ts +0 -1
- package/dist/exports/client/index.d.ts.map +1 -1
- package/dist/exports/client/index.js +8 -8
- package/dist/exports/client/index.js.map +4 -4
- package/dist/exports/server/rsc.d.ts +3 -0
- package/dist/exports/server/rsc.d.ts.map +1 -0
- package/dist/exports/server/rsc.js +3 -0
- package/dist/exports/server/rsc.js.map +1 -0
- package/dist/features/blocks/client/component/BlockContent.d.ts +1 -0
- package/dist/features/blocks/client/component/BlockContent.d.ts.map +1 -1
- package/dist/features/blocks/client/component/BlockContent.js +15 -15
- package/dist/features/blocks/client/component/BlockContent.js.map +1 -1
- package/dist/features/blocks/client/component/index.d.ts.map +1 -1
- package/dist/features/blocks/client/component/index.js +68 -52
- package/dist/features/blocks/client/component/index.js.map +1 -1
- package/dist/features/blocks/client/componentInline/index.d.ts.map +1 -1
- package/dist/features/blocks/client/componentInline/index.js +14 -19
- package/dist/features/blocks/client/componentInline/index.js.map +1 -1
- package/dist/features/blocks/client/index.d.ts.map +1 -1
- package/dist/features/blocks/client/index.js +26 -24
- package/dist/features/blocks/client/index.js.map +1 -1
- package/dist/features/blocks/client/plugin/index.d.ts.map +1 -1
- package/dist/features/blocks/client/plugin/index.js +83 -75
- package/dist/features/blocks/client/plugin/index.js.map +1 -1
- package/dist/features/blocks/server/index.d.ts.map +1 -1
- package/dist/features/blocks/server/index.js +20 -10
- package/dist/features/blocks/server/index.js.map +1 -1
- package/dist/features/blocks/server/validate.d.ts.map +1 -1
- package/dist/features/blocks/server/validate.js +8 -5
- package/dist/features/blocks/server/validate.js.map +1 -1
- package/dist/features/debug/testRecorder/client/plugin/index.js +25 -14
- package/dist/features/debug/testRecorder/client/plugin/index.js.map +1 -1
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js +19 -7
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js.map +1 -1
- package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js +16 -3
- package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js.map +1 -1
- package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.d.ts.map +1 -1
- package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js +58 -19
- package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js.map +1 -1
- package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts.map +1 -1
- package/dist/features/experimental_table/client/plugins/TablePlugin/index.js +38 -32
- package/dist/features/experimental_table/client/plugins/TablePlugin/index.js.map +1 -1
- package/dist/features/experimental_table/server/index.d.ts.map +1 -1
- package/dist/features/experimental_table/server/index.js +3 -1
- package/dist/features/experimental_table/server/index.js.map +1 -1
- package/dist/features/format/bold/feature.client.d.ts.map +1 -1
- package/dist/features/format/bold/feature.client.js +2 -1
- package/dist/features/format/bold/feature.client.js.map +1 -1
- package/dist/features/format/inlineCode/feature.client.d.ts.map +1 -1
- package/dist/features/format/inlineCode/feature.client.js +2 -1
- package/dist/features/format/inlineCode/feature.client.js.map +1 -1
- package/dist/features/format/italic/feature.client.d.ts.map +1 -1
- package/dist/features/format/italic/feature.client.js +2 -1
- package/dist/features/format/italic/feature.client.js.map +1 -1
- package/dist/features/format/strikethrough/feature.client.d.ts.map +1 -1
- package/dist/features/format/strikethrough/feature.client.js +2 -1
- package/dist/features/format/strikethrough/feature.client.js.map +1 -1
- package/dist/features/format/subscript/feature.client.d.ts.map +1 -1
- package/dist/features/format/subscript/feature.client.js +2 -1
- package/dist/features/format/subscript/feature.client.js.map +1 -1
- package/dist/features/format/superscript/feature.client.d.ts.map +1 -1
- package/dist/features/format/superscript/feature.client.js +2 -1
- package/dist/features/format/superscript/feature.client.js.map +1 -1
- package/dist/features/format/underline/feature.client.d.ts.map +1 -1
- package/dist/features/format/underline/feature.client.js +2 -1
- package/dist/features/format/underline/feature.client.js.map +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +52 -15
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/index.js +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/index.js.map +1 -1
- package/dist/features/link/server/i18n.d.ts.map +1 -1
- package/dist/features/link/server/i18n.js +64 -32
- package/dist/features/link/server/i18n.js.map +1 -1
- package/dist/features/link/server/index.d.ts.map +1 -1
- package/dist/features/link/server/index.js +3 -1
- package/dist/features/link/server/index.js.map +1 -1
- package/dist/features/link/server/validate.d.ts.map +1 -1
- package/dist/features/link/server/validate.js +8 -5
- package/dist/features/link/server/validate.js.map +1 -1
- package/dist/features/relationship/client/components/RelationshipComponent.d.ts.map +1 -1
- package/dist/features/relationship/client/components/RelationshipComponent.js +6 -4
- package/dist/features/relationship/client/components/RelationshipComponent.js.map +1 -1
- package/dist/features/toolbars/fixed/client/Toolbar/index.d.ts.map +1 -1
- package/dist/features/toolbars/fixed/client/Toolbar/index.js +77 -49
- package/dist/features/toolbars/fixed/client/Toolbar/index.js.map +1 -1
- package/dist/features/toolbars/inline/client/Toolbar/index.js +93 -52
- package/dist/features/toolbars/inline/client/Toolbar/index.js.map +1 -1
- package/dist/features/toolbars/shared/ToolbarButton/index.js +1 -1
- package/dist/features/toolbars/shared/ToolbarButton/index.js.map +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js +2 -2
- package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/index.js +25 -22
- package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -1
- package/dist/features/toolbars/types.d.ts +3 -1
- package/dist/features/toolbars/types.d.ts.map +1 -1
- package/dist/features/toolbars/types.js.map +1 -1
- package/dist/features/typesServer.d.ts +4 -17
- package/dist/features/typesServer.d.ts.map +1 -1
- package/dist/features/typesServer.js.map +1 -1
- package/dist/features/upload/client/component/index.d.ts.map +1 -1
- package/dist/features/upload/client/component/index.js +8 -4
- package/dist/features/upload/client/component/index.js.map +1 -1
- package/dist/features/upload/server/feature.server.d.ts.map +1 -1
- package/dist/features/upload/server/feature.server.js +3 -1
- package/dist/features/upload/server/feature.server.js.map +1 -1
- package/dist/features/upload/server/validate.d.ts.map +1 -1
- package/dist/features/upload/server/validate.js +7 -4
- package/dist/features/upload/server/validate.js.map +1 -1
- package/dist/field/Field.d.ts.map +1 -1
- package/dist/field/Field.js +27 -41
- package/dist/field/Field.js.map +1 -1
- package/dist/field/bundled.css +1 -1
- package/dist/field/index.d.ts.map +1 -1
- package/dist/field/index.js +26 -27
- package/dist/field/index.js.map +1 -1
- package/dist/field/rscEntry.d.ts +9 -0
- package/dist/field/rscEntry.d.ts.map +1 -0
- package/dist/field/rscEntry.js +37 -0
- package/dist/field/rscEntry.js.map +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -14
- package/dist/index.js.map +1 -1
- package/dist/lexical/LexicalProvider.d.ts +1 -1
- package/dist/lexical/LexicalProvider.d.ts.map +1 -1
- package/dist/lexical/LexicalProvider.js +2 -2
- package/dist/lexical/LexicalProvider.js.map +1 -1
- package/dist/lexical/config/client/EditorConfigProvider.d.ts +4 -3
- package/dist/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
- package/dist/lexical/config/client/EditorConfigProvider.js +5 -5
- package/dist/lexical/config/client/EditorConfigProvider.js.map +1 -1
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts +4 -4
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts.map +1 -1
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +14 -5
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.d.ts +2 -2
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.d.ts.map +1 -1
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js +5 -5
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js.map +1 -1
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts +3 -2
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts.map +1 -1
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js.map +1 -1
- package/dist/lexical/plugins/SlashMenu/index.d.ts.map +1 -1
- package/dist/lexical/plugins/SlashMenu/index.js +15 -24
- package/dist/lexical/plugins/SlashMenu/index.js.map +1 -1
- package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js +6 -4
- package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +6 -4
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
- package/dist/lexical/theme/EditorTheme.d.ts.map +1 -1
- package/dist/lexical/theme/EditorTheme.js +0 -2
- package/dist/lexical/theme/EditorTheme.js.map +1 -1
- package/dist/types.d.ts +15 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/utilities/fieldsDrawer/Drawer.d.ts +1 -0
- package/dist/utilities/fieldsDrawer/Drawer.d.ts.map +1 -1
- package/dist/utilities/fieldsDrawer/Drawer.js +25 -20
- package/dist/utilities/fieldsDrawer/Drawer.js.map +1 -1
- package/dist/utilities/fieldsDrawer/DrawerContent.d.ts.map +1 -1
- package/dist/utilities/fieldsDrawer/DrawerContent.js +99 -143
- package/dist/utilities/fieldsDrawer/DrawerContent.js.map +1 -1
- package/dist/utilities/fieldsDrawer/useLexicalDrawer.js +1 -1
- package/dist/utilities/fieldsDrawer/useLexicalDrawer.js.map +1 -1
- package/dist/utilities/generateImportMap.d.ts.map +1 -1
- package/dist/utilities/generateImportMap.js +2 -3
- package/dist/utilities/generateImportMap.js.map +1 -1
- package/dist/utilities/generateSchemaMap.d.ts.map +1 -1
- package/dist/utilities/generateSchemaMap.js +13 -10
- package/dist/utilities/generateSchemaMap.js.map +1 -1
- package/dist/utilities/initLexicalFeatures.d.ts +18 -0
- package/dist/utilities/initLexicalFeatures.d.ts.map +1 -0
- package/dist/utilities/initLexicalFeatures.js +95 -0
- package/dist/utilities/initLexicalFeatures.js.map +1 -0
- package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.d.ts.map +1 -1
- package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js +5 -1
- package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js.map +1 -1
- package/dist/utilities/useLexicalFeature.d.ts.map +1 -1
- package/dist/utilities/useLexicalFeature.js +12 -4
- package/dist/utilities/useLexicalFeature.js.map +1 -1
- package/dist/validate/index.d.ts.map +1 -1
- package/dist/validate/index.js +1 -1
- package/dist/validate/index.js.map +1 -1
- package/package.json +43 -35
- package/dist/cell/index.d.ts +0 -9
- package/dist/cell/index.d.ts.map +0 -1
- package/dist/cell/index.js +0 -120
- package/dist/cell/index.js.map +0 -1
- package/dist/exports/client/Field-Y47DV2NP.js +0 -2
- package/dist/exports/client/Field-Y47DV2NP.js.map +0 -7
- package/dist/exports/client/RelationshipComponent-LBWKOBGF.js +0 -2
- package/dist/exports/client/RelationshipComponent-LBWKOBGF.js.map +0 -7
- package/dist/exports/client/chunk-7SR2HYD6.js +0 -2
- package/dist/exports/client/chunk-7SR2HYD6.js.map +0 -7
- package/dist/exports/client/chunk-GD6LBQBJ.js +0 -2
- package/dist/exports/client/chunk-GD6LBQBJ.js.map +0 -7
- package/dist/exports/client/chunk-IIWHHN4J.js +0 -2
- package/dist/exports/client/chunk-IIWHHN4J.js.map +0 -7
- package/dist/exports/client/component-4TP4L5EV.js +0 -2
- package/dist/exports/client/component-4TP4L5EV.js.map +0 -7
- package/dist/exports/client/component-XMR5NN36.js +0 -2
- package/dist/exports/client/component-XMR5NN36.js.map +0 -7
- package/dist/exports/client/componentInline-NUDJIIQ4.js +0 -2
- package/dist/exports/client/componentInline-NUDJIIQ4.js.map +0 -7
- package/dist/utilities/generateComponentMap.d.ts +0 -6
- package/dist/utilities/generateComponentMap.d.ts.map +0 -1
- package/dist/utilities/generateComponentMap.js +0 -93
- package/dist/utilities/generateComponentMap.js.map +0 -1
- /package/dist/exports/client/{chunk-NEO76RJK.js.map → chunk-352SHIZR.js.map} +0 -0
- /package/dist/exports/client/{chunk-XY4TCSM7.js.map → chunk-O4IOO4EU.js.map} +0 -0
- /package/dist/exports/client/{chunk-32KXGBIQ.js.map → chunk-ZOYGBIAN.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","createPortal","LinkEditor","FloatingLinkEditorPlugin","props","anchorElem","document","body","_jsx"],"sources":["../../../../../../src/features/link/client/plugins/floatingLinkEditor/index.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\nimport { createPortal } from 'react-dom'\n\nimport type { PluginComponentWithAnchor } from '../../../../typesClient.js'\nimport type { ClientProps } from '../../index.js'\n\nimport './index.scss'\nimport { LinkEditor } from './LinkEditor/index.js'\n\nexport const FloatingLinkEditorPlugin: PluginComponentWithAnchor<ClientProps> = (props) => {\n const { anchorElem = document.body } = props\n\n return createPortal(<LinkEditor anchorElem={anchorElem} />, anchorElem)\n}\n"],"mappings":"AAAA;;;AACA,YAAYA,KAAA,MAAW;AACvB,SAASC,YAAY,QAAQ;AAM7B,SAASC,UAAU,QAAQ;AAE3B,OAAO,MAAMC,wBAAA,GAAoEC,KAAA;EAC/E,MAAM;IAAEC,UAAA,GAAaC,QAAA,CAASC;EAAI,CAAE,GAAGH,KAAA;EAEvC,oBAAOH,YAAA,
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","createPortal","LinkEditor","FloatingLinkEditorPlugin","props","anchorElem","document","body","_jsx"],"sources":["../../../../../../src/features/link/client/plugins/floatingLinkEditor/index.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\nimport { createPortal } from 'react-dom'\n\nimport type { PluginComponentWithAnchor } from '../../../../typesClient.js'\nimport type { ClientProps } from '../../index.js'\n\nimport './index.scss'\nimport { LinkEditor } from './LinkEditor/index.js'\n\nexport const FloatingLinkEditorPlugin: PluginComponentWithAnchor<ClientProps> = (props) => {\n const { anchorElem = document.body } = props\n\n return createPortal(<LinkEditor anchorElem={anchorElem} />, anchorElem)\n}\n"],"mappings":"AAAA;;;AACA,YAAYA,KAAA,MAAW;AACvB,SAASC,YAAY,QAAQ;AAM7B,SAASC,UAAU,QAAQ;AAE3B,OAAO,MAAMC,wBAAA,GAAoEC,KAAA;EAC/E,MAAM;IAAEC,UAAA,GAAaC,QAAA,CAASC;EAAI,CAAE,GAAGH,KAAA;EAEvC,oBAAOH,YAAA,cAAaO,IAAA,CAACN,UAAA;IAAWG,UAAA,EAAYA;MAAgBA,UAAA;AAC9D","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../../../src/features/link/server/i18n.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAEhE,eAAO,MAAM,IAAI,EAAE,OAAO,CAAC,gBAAgB,
|
|
1
|
+
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../../../src/features/link/server/i18n.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAEhE,eAAO,MAAM,IAAI,EAAE,OAAO,CAAC,gBAAgB,CAiI1C,CAAA"}
|
|
@@ -1,99 +1,131 @@
|
|
|
1
1
|
export const i18n = {
|
|
2
2
|
ar: {
|
|
3
|
-
label: 'رابط'
|
|
3
|
+
label: 'رابط',
|
|
4
|
+
loadingWithEllipsis: 'جار التحميل...'
|
|
4
5
|
},
|
|
5
6
|
az: {
|
|
6
|
-
label: 'Keçid'
|
|
7
|
+
label: 'Keçid',
|
|
8
|
+
loadingWithEllipsis: 'Yüklənir...'
|
|
7
9
|
},
|
|
8
10
|
bg: {
|
|
9
|
-
label: 'Връзка'
|
|
11
|
+
label: 'Връзка',
|
|
12
|
+
loadingWithEllipsis: 'Зарежда се...'
|
|
10
13
|
},
|
|
11
14
|
cs: {
|
|
12
|
-
label: 'Odkaz'
|
|
15
|
+
label: 'Odkaz',
|
|
16
|
+
loadingWithEllipsis: 'Načítání...'
|
|
13
17
|
},
|
|
14
18
|
de: {
|
|
15
|
-
label: 'Verknüpfung'
|
|
19
|
+
label: 'Verknüpfung',
|
|
20
|
+
loadingWithEllipsis: 'Laden...'
|
|
16
21
|
},
|
|
17
22
|
en: {
|
|
18
|
-
label: 'Link'
|
|
23
|
+
label: 'Link',
|
|
24
|
+
loadingWithEllipsis: 'Loading...'
|
|
19
25
|
},
|
|
20
26
|
es: {
|
|
21
|
-
label: 'Enlace'
|
|
27
|
+
label: 'Enlace',
|
|
28
|
+
loadingWithEllipsis: 'Cargando...'
|
|
22
29
|
},
|
|
23
30
|
fa: {
|
|
24
|
-
label: 'پیوند'
|
|
31
|
+
label: 'پیوند',
|
|
32
|
+
loadingWithEllipsis: 'در حال بارگذاری...'
|
|
25
33
|
},
|
|
26
34
|
fr: {
|
|
27
|
-
label: 'Lien'
|
|
35
|
+
label: 'Lien',
|
|
36
|
+
loadingWithEllipsis: 'Chargement...'
|
|
28
37
|
},
|
|
29
38
|
he: {
|
|
30
|
-
label: 'קישור'
|
|
39
|
+
label: 'קישור',
|
|
40
|
+
loadingWithEllipsis: 'טוען...'
|
|
31
41
|
},
|
|
32
42
|
hr: {
|
|
33
|
-
label: 'Poveznica'
|
|
43
|
+
label: 'Poveznica',
|
|
44
|
+
loadingWithEllipsis: 'Učitavanje...'
|
|
34
45
|
},
|
|
35
46
|
hu: {
|
|
36
|
-
label: 'Hivatkozás'
|
|
47
|
+
label: 'Hivatkozás',
|
|
48
|
+
loadingWithEllipsis: 'Betöltés...'
|
|
37
49
|
},
|
|
38
50
|
it: {
|
|
39
|
-
label: 'Collegamento'
|
|
51
|
+
label: 'Collegamento',
|
|
52
|
+
loadingWithEllipsis: 'Caricamento...'
|
|
40
53
|
},
|
|
41
54
|
ja: {
|
|
42
|
-
label: 'リンク'
|
|
55
|
+
label: 'リンク',
|
|
56
|
+
loadingWithEllipsis: '読み込み中...'
|
|
43
57
|
},
|
|
44
58
|
ko: {
|
|
45
|
-
label: '링크'
|
|
59
|
+
label: '링크',
|
|
60
|
+
loadingWithEllipsis: '로딩 중...'
|
|
46
61
|
},
|
|
47
62
|
my: {
|
|
48
|
-
label: 'လင့်'
|
|
63
|
+
label: 'လင့်',
|
|
64
|
+
loadingWithEllipsis: 'ဖွင့်နေသည်...'
|
|
49
65
|
},
|
|
50
66
|
nb: {
|
|
51
|
-
label: 'Lenke'
|
|
67
|
+
label: 'Lenke',
|
|
68
|
+
loadingWithEllipsis: 'Laster...'
|
|
52
69
|
},
|
|
53
70
|
nl: {
|
|
54
|
-
label: 'Link'
|
|
71
|
+
label: 'Link',
|
|
72
|
+
loadingWithEllipsis: 'Laden...'
|
|
55
73
|
},
|
|
56
74
|
pl: {
|
|
57
|
-
label: 'Łącze'
|
|
75
|
+
label: 'Łącze',
|
|
76
|
+
loadingWithEllipsis: 'Ładowanie...'
|
|
58
77
|
},
|
|
59
78
|
pt: {
|
|
60
|
-
label: 'Ligação'
|
|
79
|
+
label: 'Ligação',
|
|
80
|
+
loadingWithEllipsis: 'Carregando...'
|
|
61
81
|
},
|
|
62
82
|
ro: {
|
|
63
|
-
label: 'Legătură'
|
|
83
|
+
label: 'Legătură',
|
|
84
|
+
loadingWithEllipsis: 'Se încarcă...'
|
|
64
85
|
},
|
|
65
86
|
rs: {
|
|
66
|
-
label: 'Veza'
|
|
87
|
+
label: 'Veza',
|
|
88
|
+
loadingWithEllipsis: 'Учитавање...'
|
|
67
89
|
},
|
|
68
90
|
'rs-latin': {
|
|
69
|
-
label: 'Veza'
|
|
91
|
+
label: 'Veza',
|
|
92
|
+
loadingWithEllipsis: 'Učitavanje...'
|
|
70
93
|
},
|
|
71
94
|
ru: {
|
|
72
|
-
label: 'Ссылка'
|
|
95
|
+
label: 'Ссылка',
|
|
96
|
+
loadingWithEllipsis: 'Загрузка...'
|
|
73
97
|
},
|
|
74
98
|
sk: {
|
|
75
|
-
label: 'Odkaz'
|
|
99
|
+
label: 'Odkaz',
|
|
100
|
+
loadingWithEllipsis: 'Načítava sa...'
|
|
76
101
|
},
|
|
77
102
|
sv: {
|
|
78
|
-
label: 'Länk'
|
|
103
|
+
label: 'Länk',
|
|
104
|
+
loadingWithEllipsis: 'Laddar...'
|
|
79
105
|
},
|
|
80
106
|
th: {
|
|
81
|
-
label: 'ลิงค์'
|
|
107
|
+
label: 'ลิงค์',
|
|
108
|
+
loadingWithEllipsis: 'กำลังโหลด...'
|
|
82
109
|
},
|
|
83
110
|
tr: {
|
|
84
|
-
label: 'Bağlantı'
|
|
111
|
+
label: 'Bağlantı',
|
|
112
|
+
loadingWithEllipsis: 'Yükleniyor...'
|
|
85
113
|
},
|
|
86
114
|
uk: {
|
|
87
|
-
label: 'Посилання'
|
|
115
|
+
label: 'Посилання',
|
|
116
|
+
loadingWithEllipsis: 'Завантаження...'
|
|
88
117
|
},
|
|
89
118
|
vi: {
|
|
90
|
-
label: 'Liên kết'
|
|
119
|
+
label: 'Liên kết',
|
|
120
|
+
loadingWithEllipsis: 'Đang tải...'
|
|
91
121
|
},
|
|
92
122
|
zh: {
|
|
93
|
-
label: '链接'
|
|
123
|
+
label: '链接',
|
|
124
|
+
loadingWithEllipsis: '加载中...'
|
|
94
125
|
},
|
|
95
126
|
'zh-TW': {
|
|
96
|
-
label: '連結'
|
|
127
|
+
label: '連結',
|
|
128
|
+
loadingWithEllipsis: '載入中...'
|
|
97
129
|
}
|
|
98
130
|
};
|
|
99
131
|
//# sourceMappingURL=i18n.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n.js","names":["i18n","ar","label","az","bg","cs","de","en","es","fa","fr","he","hr","hu","it","ja","ko","my","nb","nl","pl","pt","ro","rs","ru","sk","sv","th","tr","uk","vi","zh"],"sources":["../../../../src/features/link/server/i18n.ts"],"sourcesContent":["import type { GenericLanguages } from '@payloadcms/translations'\n\nexport const i18n: Partial<GenericLanguages> = {\n ar: {\n label: 'رابط',\n },\n az: {\n label: 'Keçid',\n },\n bg: {\n label: 'Връзка',\n },\n cs: {\n label: 'Odkaz',\n },\n de: {\n label: 'Verknüpfung',\n },\n en: {\n label: 'Link',\n },\n es: {\n label: 'Enlace',\n },\n fa: {\n label: 'پیوند',\n },\n fr: {\n label: 'Lien',\n },\n he: {\n label: 'קישור',\n },\n hr: {\n label: 'Poveznica',\n },\n hu: {\n label: 'Hivatkozás',\n },\n it: {\n label: 'Collegamento',\n },\n ja: {\n label: 'リンク',\n },\n ko: {\n label: '링크',\n },\n my: {\n label: 'လင့်',\n },\n nb: {\n label: 'Lenke',\n },\n nl: {\n label: 'Link',\n },\n pl: {\n label: 'Łącze',\n },\n pt: {\n label: 'Ligação',\n },\n ro: {\n label: 'Legătură',\n },\n rs: {\n label: 'Veza',\n },\n 'rs-latin': {\n label: 'Veza',\n },\n ru: {\n label: 'Ссылка',\n },\n sk: {\n label: 'Odkaz',\n },\n sv: {\n label: 'Länk',\n },\n th: {\n label: 'ลิงค์',\n },\n tr: {\n label: 'Bağlantı',\n },\n uk: {\n label: 'Посилання',\n },\n vi: {\n label: 'Liên kết',\n },\n zh: {\n label: '链接',\n },\n 'zh-TW': {\n label: '連結',\n },\n}\n"],"mappings":"AAEA,OAAO,MAAMA,IAAA,GAAkC;EAC7CC,EAAA,EAAI;IACFC,KAAA,EAAO;
|
|
1
|
+
{"version":3,"file":"i18n.js","names":["i18n","ar","label","loadingWithEllipsis","az","bg","cs","de","en","es","fa","fr","he","hr","hu","it","ja","ko","my","nb","nl","pl","pt","ro","rs","ru","sk","sv","th","tr","uk","vi","zh"],"sources":["../../../../src/features/link/server/i18n.ts"],"sourcesContent":["import type { GenericLanguages } from '@payloadcms/translations'\n\nexport const i18n: Partial<GenericLanguages> = {\n ar: {\n label: 'رابط',\n loadingWithEllipsis: 'جار التحميل...',\n },\n az: {\n label: 'Keçid',\n loadingWithEllipsis: 'Yüklənir...',\n },\n bg: {\n label: 'Връзка',\n loadingWithEllipsis: 'Зарежда се...',\n },\n cs: {\n label: 'Odkaz',\n loadingWithEllipsis: 'Načítání...',\n },\n de: {\n label: 'Verknüpfung',\n loadingWithEllipsis: 'Laden...',\n },\n en: {\n label: 'Link',\n loadingWithEllipsis: 'Loading...',\n },\n es: {\n label: 'Enlace',\n loadingWithEllipsis: 'Cargando...',\n },\n fa: {\n label: 'پیوند',\n loadingWithEllipsis: 'در حال بارگذاری...',\n },\n fr: {\n label: 'Lien',\n loadingWithEllipsis: 'Chargement...',\n },\n he: {\n label: 'קישור',\n loadingWithEllipsis: 'טוען...',\n },\n hr: {\n label: 'Poveznica',\n loadingWithEllipsis: 'Učitavanje...',\n },\n hu: {\n label: 'Hivatkozás',\n loadingWithEllipsis: 'Betöltés...',\n },\n it: {\n label: 'Collegamento',\n loadingWithEllipsis: 'Caricamento...',\n },\n ja: {\n label: 'リンク',\n loadingWithEllipsis: '読み込み中...',\n },\n ko: {\n label: '링크',\n loadingWithEllipsis: '로딩 중...',\n },\n my: {\n label: 'လင့်',\n loadingWithEllipsis: 'ဖွင့်နေသည်...',\n },\n nb: {\n label: 'Lenke',\n loadingWithEllipsis: 'Laster...',\n },\n nl: {\n label: 'Link',\n loadingWithEllipsis: 'Laden...',\n },\n pl: {\n label: 'Łącze',\n loadingWithEllipsis: 'Ładowanie...',\n },\n pt: {\n label: 'Ligação',\n loadingWithEllipsis: 'Carregando...',\n },\n ro: {\n label: 'Legătură',\n loadingWithEllipsis: 'Se încarcă...',\n },\n rs: {\n label: 'Veza',\n loadingWithEllipsis: 'Учитавање...',\n },\n 'rs-latin': {\n label: 'Veza',\n loadingWithEllipsis: 'Učitavanje...',\n },\n ru: {\n label: 'Ссылка',\n loadingWithEllipsis: 'Загрузка...',\n },\n sk: {\n label: 'Odkaz',\n loadingWithEllipsis: 'Načítava sa...',\n },\n sv: {\n label: 'Länk',\n loadingWithEllipsis: 'Laddar...',\n },\n th: {\n label: 'ลิงค์',\n loadingWithEllipsis: 'กำลังโหลด...',\n },\n tr: {\n label: 'Bağlantı',\n loadingWithEllipsis: 'Yükleniyor...',\n },\n uk: {\n label: 'Посилання',\n loadingWithEllipsis: 'Завантаження...',\n },\n vi: {\n label: 'Liên kết',\n loadingWithEllipsis: 'Đang tải...',\n },\n zh: {\n label: '链接',\n loadingWithEllipsis: '加载中...',\n },\n 'zh-TW': {\n label: '連結',\n loadingWithEllipsis: '載入中...',\n },\n}\n"],"mappings":"AAEA,OAAO,MAAMA,IAAA,GAAkC;EAC7CC,EAAA,EAAI;IACFC,KAAA,EAAO;IACPC,mBAAA,EAAqB;EACvB;EACAC,EAAA,EAAI;IACFF,KAAA,EAAO;IACPC,mBAAA,EAAqB;EACvB;EACAE,EAAA,EAAI;IACFH,KAAA,EAAO;IACPC,mBAAA,EAAqB;EACvB;EACAG,EAAA,EAAI;IACFJ,KAAA,EAAO;IACPC,mBAAA,EAAqB;EACvB;EACAI,EAAA,EAAI;IACFL,KAAA,EAAO;IACPC,mBAAA,EAAqB;EACvB;EACAK,EAAA,EAAI;IACFN,KAAA,EAAO;IACPC,mBAAA,EAAqB;EACvB;EACAM,EAAA,EAAI;IACFP,KAAA,EAAO;IACPC,mBAAA,EAAqB;EACvB;EACAO,EAAA,EAAI;IACFR,KAAA,EAAO;IACPC,mBAAA,EAAqB;EACvB;EACAQ,EAAA,EAAI;IACFT,KAAA,EAAO;IACPC,mBAAA,EAAqB;EACvB;EACAS,EAAA,EAAI;IACFV,KAAA,EAAO;IACPC,mBAAA,EAAqB;EACvB;EACAU,EAAA,EAAI;IACFX,KAAA,EAAO;IACPC,mBAAA,EAAqB;EACvB;EACAW,EAAA,EAAI;IACFZ,KAAA,EAAO;IACPC,mB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B;EACA,SAAS;IACPD,KAAA,EAAO;IACPC,mBAAA,EAAqB;EACvB;AACF","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/link/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/link/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EAEd,KAAK,EACL,kBAAkB,EAElB,eAAe,EAChB,MAAM,SAAS,CAAA;AAmBhB,MAAM,MAAM,6BAA6B,GACrC;IACE;;;QAGI;IACJ,mBAAmB,CAAC,EAAE,cAAc,EAAE,CAAA;IAGtC,kBAAkB,CAAC,EAAE,KAAK,CAAA;CAC3B,GACD;IAEE,mBAAmB,CAAC,EAAE,KAAK,CAAA;IAE3B;;;QAGI;IACJ,kBAAkB,CAAC,EAAE,cAAc,EAAE,CAAA;CACtC,CAAA;AAEL,MAAM,MAAM,sBAAsB,GAAG;IACnC;;;OAGG;IACH,MAAM,CAAC,EACH,CAAC,CAAC,IAAI,EAAE;QACN,MAAM,EAAE,eAAe,CAAA;QACvB,aAAa,EAAE,kBAAkB,EAAE,CAAA;KACpC,KAAK,CAAC,KAAK,GAAG,kBAAkB,CAAC,EAAE,CAAC,GACrC,KAAK,EAAE,CAAA;IACX;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,GAAG,6BAA6B,CAAA;AAEjC,eAAO,MAAM,WAAW,6IAkKtB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["escapeHTML","sanitizeFields","deepCopyObject","createServerFeature","convertLexicalNodesToHTML","createNode","LinkMarkdownTransformer","AutoLinkNode","LinkNode","linkPopulationPromiseHOC","i18n","transformExtraFields","linkValidation","LinkFeature","feature","config","_config","isRoot","parentIsLocalized","props","validRelationships","collections","map","c","slug","_transformedFields","fields","enabledCollections","disabledCollections","maxDepth","sanitizedFields","requireFieldLevelRichTextEditor","sanitizedFieldsWithoutText","filter","field","name","ClientFeature","clientFeatureProps","generateSchemaMap","Array","isArray","length","schemaMap","Map","set","markdownTransformers","nodes","converters","html","converter","currentDepth","depth","draft","node","overrideAccess","parent","req","showHiddenFields","childrenText","lexicalNodes","children","rel","newTab","target","href","url","linkType","doc","value","String","id","nodeTypes","getType","validations","getSubFields","getSubFieldsData","graphQLPopulationPromises","sanitizedServerFeatureProps","key"],"sources":["../../../../src/features/link/server/index.ts"],"sourcesContent":["import type {\n CollectionSlug,\n Config,\n DefaultDocumentIDType,\n Field,\n FieldAffectingData,\n SanitizedConfig,\n} from 'payload'\n\nimport escapeHTML from 'escape-html'\nimport { sanitizeFields } from 'payload'\nimport { deepCopyObject } from 'payload/shared'\n\nimport type { ClientProps } from '../client/index.js'\n\nimport { createServerFeature } from '../../../utilities/createServerFeature.js'\nimport { convertLexicalNodesToHTML } from '../../converters/html/converter/index.js'\nimport { createNode } from '../../typeUtilities.js'\nimport { LinkMarkdownTransformer } from '../markdownTransformer.js'\nimport { AutoLinkNode } from '../nodes/AutoLinkNode.js'\nimport { LinkNode } from '../nodes/LinkNode.js'\nimport { linkPopulationPromiseHOC } from './graphQLPopulationPromise.js'\nimport { i18n } from './i18n.js'\nimport { transformExtraFields } from './transformExtraFields.js'\nimport { linkValidation } from './validate.js'\n\nexport type ExclusiveLinkCollectionsProps =\n | {\n /**\n * The collections that should be disabled for internal linking. Overrides the `enableRichTextLink` property in the collection config.\n * When this property is set, `enabledCollections` will not be available.\n **/\n disabledCollections?: CollectionSlug[]\n\n // Ensures that enabledCollections is not available when disabledCollections is set\n enabledCollections?: never\n }\n | {\n // Ensures that disabledCollections is not available when enabledCollections is set\n disabledCollections?: never\n\n /**\n * The collections that should be enabled for internal linking. Overrides the `enableRichTextLink` property in the collection config\n * When this property is set, `disabledCollections` will not be available.\n **/\n enabledCollections?: CollectionSlug[]\n }\n\nexport type LinkFeatureServerProps = {\n /**\n * A function or array defining additional fields for the link feature. These will be\n * displayed in the link editor drawer.\n */\n fields?:\n | ((args: {\n config: SanitizedConfig\n defaultFields: FieldAffectingData[]\n }) => (Field | FieldAffectingData)[])\n | Field[]\n /**\n * Sets a maximum population depth for the internal doc default field of link, regardless of the remaining depth when the field is reached.\n * This behaves exactly like the maxDepth properties of relationship and upload fields.\n *\n * {@link https://payloadcms.com/docs/getting-started/concepts#field-level-max-depth}\n */\n maxDepth?: number\n} & ExclusiveLinkCollectionsProps\n\nexport const LinkFeature = createServerFeature<\n LinkFeatureServerProps,\n LinkFeatureServerProps,\n ClientProps\n>({\n feature: async ({ config: _config, isRoot, parentIsLocalized, props }) => {\n if (!props) {\n props = {}\n }\n const validRelationships = _config.collections.map((c) => c.slug) || []\n\n const _transformedFields = transformExtraFields(\n props.fields ? deepCopyObject(props.fields) : null,\n _config,\n props.enabledCollections,\n props.disabledCollections,\n props.maxDepth,\n )\n\n const sanitizedFields = await sanitizeFields({\n config: _config as unknown as Config,\n fields: _transformedFields,\n parentIsLocalized,\n requireFieldLevelRichTextEditor: isRoot,\n validRelationships,\n })\n props.fields = sanitizedFields\n\n // the text field is not included in the node data.\n // Thus, for tasks like validation, we do not want to pass it a text field in the schema which will never have data.\n // Otherwise, it will cause a validation error (field is required).\n const sanitizedFieldsWithoutText = deepCopyObject(sanitizedFields).filter(\n (field) => !('name' in field) || field.name !== 'text',\n )\n\n return {\n ClientFeature: '@payloadcms/richtext-lexical/client#LinkFeatureClient',\n clientFeatureProps: {\n disabledCollections: props.disabledCollections,\n enabledCollections: props.enabledCollections,\n } as ExclusiveLinkCollectionsProps,\n generateSchemaMap: () => {\n if (!sanitizedFields || !Array.isArray(sanitizedFields) || sanitizedFields.length === 0) {\n return null\n }\n\n const schemaMap = new Map<string, Field[]>()\n schemaMap.set('fields', sanitizedFields)\n\n return schemaMap\n },\n i18n,\n markdownTransformers: [LinkMarkdownTransformer],\n nodes: [\n createNode({\n converters: {\n html: {\n converter: async ({\n converters,\n currentDepth,\n depth,\n draft,\n node,\n overrideAccess,\n parent,\n req,\n showHiddenFields,\n }) => {\n const childrenText = await convertLexicalNodesToHTML({\n converters,\n currentDepth,\n depth,\n draft,\n lexicalNodes: node.children,\n overrideAccess,\n parent: {\n ...node,\n parent,\n },\n req,\n showHiddenFields,\n })\n\n const rel: string = node.fields.newTab ? ' rel=\"noopener noreferrer\"' : ''\n const target: string = node.fields.newTab ? ' target=\"_blank\"' : ''\n\n let href: string = node.fields.url\n if (node.fields.linkType === 'internal') {\n href =\n typeof node.fields.doc?.value !== 'object'\n ? String(node.fields.doc?.value)\n : String(node.fields.doc?.value?.id)\n }\n\n return `<a href=\"${href}\"${target}${rel}>${childrenText}</a>`\n },\n nodeTypes: [AutoLinkNode.getType()],\n },\n },\n node: AutoLinkNode,\n // Since AutoLinkNodes are just internal links, they need no hooks or graphQL population promises\n validations: [linkValidation(props, sanitizedFieldsWithoutText)],\n }),\n createNode({\n converters: {\n html: {\n converter: async ({\n converters,\n currentDepth,\n depth,\n draft,\n node,\n overrideAccess,\n parent,\n req,\n showHiddenFields,\n }) => {\n const childrenText = await convertLexicalNodesToHTML({\n converters,\n currentDepth,\n depth,\n draft,\n lexicalNodes: node.children,\n overrideAccess,\n parent: {\n ...node,\n parent,\n },\n req,\n showHiddenFields,\n })\n\n const rel: string = node.fields.newTab ? ' rel=\"noopener noreferrer\"' : ''\n const target: string = node.fields.newTab ? ' target=\"_blank\"' : ''\n\n const href: string =\n node.fields.linkType === 'custom'\n ? escapeHTML(node.fields.url)\n : (node.fields.doc?.value as string)\n\n return `<a href=\"${href}\"${target}${rel}>${childrenText}</a>`\n },\n nodeTypes: [LinkNode.getType()],\n },\n },\n getSubFields: () => {\n return sanitizedFieldsWithoutText\n },\n getSubFieldsData: ({ node }) => {\n return node?.fields\n },\n graphQLPopulationPromises: [linkPopulationPromiseHOC(props)],\n node: LinkNode,\n validations: [linkValidation(props, sanitizedFie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,IAAA,CAAK3B,MAAM,CAACyC,GAAG,EAAEC,KAAA;cAExB,OAAO,YAAYJ,IAAA,IAAQD,MAAA,GAASF,GAAA,IAAOH,YAAA,MAAkB;YAC/D;YACAa,SAAA,EAAW,CAAC/D,QAAA,CAASgE,OAAO;UAC9B;QACF;QACAE,YAAA,EAAcA,CAAA;UACZ,OAAO1C,0BAAA;QACT;QACA2C,gBAAA,EAAkBA,CAAC;UAAEtB;QAAI,CAAE;UACzB,OAAOA,IAAA,EAAM3B,MAAA;QACf;QACAkD,yBAAA,EAA2B,CAACnE,wBAAA,CAAyBU,KAAA,EAAO;QAC5DkC,IAAA,EAAM7C,QAAA;QACNiE,WAAA,EAAa,CAAC7D,cAAA,CAAeO,KAAA,EAAOa,0BAAA;MACtC,GACD;MACD6C,2BAAA,EAA6B1D;IAC/B;EACF;EACA2D,GAAA,EAAK;AACP","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.js","names":["escapeHTML","sanitizeFields","deepCopyObject","createServerFeature","convertLexicalNodesToHTML","createNode","LinkMarkdownTransformer","AutoLinkNode","LinkNode","linkPopulationPromiseHOC","i18n","transformExtraFields","linkValidation","LinkFeature","feature","config","_config","isRoot","parentIsLocalized","props","validRelationships","collections","map","c","slug","_transformedFields","fields","enabledCollections","disabledCollections","maxDepth","sanitizedFields","requireFieldLevelRichTextEditor","sanitizedFieldsWithoutText","filter","field","name","ClientFeature","clientFeatureProps","generateSchemaMap","Array","isArray","length","schemaMap","Map","set","markdownTransformers","nodes","converters","html","converter","currentDepth","depth","draft","node","overrideAccess","parent","req","showHiddenFields","childrenText","lexicalNodes","children","rel","newTab","target","href","url","linkType","doc","value","String","id","nodeTypes","getType","validations","getSubFields","getSubFieldsData","graphQLPopulationPromises","sanitizedServerFeatureProps","key"],"sources":["../../../../src/features/link/server/index.ts"],"sourcesContent":["import type {\n CollectionSlug,\n Config,\n Field,\n FieldAffectingData,\n FieldSchemaMap,\n SanitizedConfig,\n} from 'payload'\n\nimport escapeHTML from 'escape-html'\nimport { sanitizeFields } from 'payload'\nimport { deepCopyObject } from 'payload/shared'\n\nimport type { ClientProps } from '../client/index.js'\n\nimport { createServerFeature } from '../../../utilities/createServerFeature.js'\nimport { convertLexicalNodesToHTML } from '../../converters/html/converter/index.js'\nimport { createNode } from '../../typeUtilities.js'\nimport { LinkMarkdownTransformer } from '../markdownTransformer.js'\nimport { AutoLinkNode } from '../nodes/AutoLinkNode.js'\nimport { LinkNode } from '../nodes/LinkNode.js'\nimport { linkPopulationPromiseHOC } from './graphQLPopulationPromise.js'\nimport { i18n } from './i18n.js'\nimport { transformExtraFields } from './transformExtraFields.js'\nimport { linkValidation } from './validate.js'\n\nexport type ExclusiveLinkCollectionsProps =\n | {\n /**\n * The collections that should be disabled for internal linking. Overrides the `enableRichTextLink` property in the collection config.\n * When this property is set, `enabledCollections` will not be available.\n **/\n disabledCollections?: CollectionSlug[]\n\n // Ensures that enabledCollections is not available when disabledCollections is set\n enabledCollections?: never\n }\n | {\n // Ensures that disabledCollections is not available when enabledCollections is set\n disabledCollections?: never\n\n /**\n * The collections that should be enabled for internal linking. Overrides the `enableRichTextLink` property in the collection config\n * When this property is set, `disabledCollections` will not be available.\n **/\n enabledCollections?: CollectionSlug[]\n }\n\nexport type LinkFeatureServerProps = {\n /**\n * A function or array defining additional fields for the link feature. These will be\n * displayed in the link editor drawer.\n */\n fields?:\n | ((args: {\n config: SanitizedConfig\n defaultFields: FieldAffectingData[]\n }) => (Field | FieldAffectingData)[])\n | Field[]\n /**\n * Sets a maximum population depth for the internal doc default field of link, regardless of the remaining depth when the field is reached.\n * This behaves exactly like the maxDepth properties of relationship and upload fields.\n *\n * {@link https://payloadcms.com/docs/getting-started/concepts#field-level-max-depth}\n */\n maxDepth?: number\n} & ExclusiveLinkCollectionsProps\n\nexport const LinkFeature = createServerFeature<\n LinkFeatureServerProps,\n LinkFeatureServerProps,\n ClientProps\n>({\n feature: async ({ config: _config, isRoot, parentIsLocalized, props }) => {\n if (!props) {\n props = {}\n }\n const validRelationships = _config.collections.map((c) => c.slug) || []\n\n const _transformedFields = transformExtraFields(\n props.fields ? deepCopyObject(props.fields) : null,\n _config,\n props.enabledCollections,\n props.disabledCollections,\n props.maxDepth,\n )\n\n const sanitizedFields = await sanitizeFields({\n config: _config as unknown as Config,\n fields: _transformedFields,\n parentIsLocalized,\n requireFieldLevelRichTextEditor: isRoot,\n validRelationships,\n })\n props.fields = sanitizedFields\n\n // the text field is not included in the node data.\n // Thus, for tasks like validation, we do not want to pass it a text field in the schema which will never have data.\n // Otherwise, it will cause a validation error (field is required).\n const sanitizedFieldsWithoutText = deepCopyObject(sanitizedFields).filter(\n (field) => !('name' in field) || field.name !== 'text',\n )\n\n return {\n ClientFeature: '@payloadcms/richtext-lexical/client#LinkFeatureClient',\n clientFeatureProps: {\n disabledCollections: props.disabledCollections,\n enabledCollections: props.enabledCollections,\n } as ExclusiveLinkCollectionsProps,\n generateSchemaMap: () => {\n if (!sanitizedFields || !Array.isArray(sanitizedFields) || sanitizedFields.length === 0) {\n return null\n }\n\n const schemaMap: FieldSchemaMap = new Map()\n schemaMap.set('fields', {\n fields: sanitizedFields,\n })\n\n return schemaMap\n },\n i18n,\n markdownTransformers: [LinkMarkdownTransformer],\n nodes: [\n createNode({\n converters: {\n html: {\n converter: async ({\n converters,\n currentDepth,\n depth,\n draft,\n node,\n overrideAccess,\n parent,\n req,\n showHiddenFields,\n }) => {\n const childrenText = await convertLexicalNodesToHTML({\n converters,\n currentDepth,\n depth,\n draft,\n lexicalNodes: node.children,\n overrideAccess,\n parent: {\n ...node,\n parent,\n },\n req,\n showHiddenFields,\n })\n\n const rel: string = node.fields.newTab ? ' rel=\"noopener noreferrer\"' : ''\n const target: string = node.fields.newTab ? ' target=\"_blank\"' : ''\n\n let href: string = node.fields.url\n if (node.fields.linkType === 'internal') {\n href =\n typeof node.fields.doc?.value !== 'object'\n ? String(node.fields.doc?.value)\n : String(node.fields.doc?.value?.id)\n }\n\n return `<a href=\"${href}\"${target}${rel}>${childrenText}</a>`\n },\n nodeTypes: [AutoLinkNode.getType()],\n },\n },\n node: AutoLinkNode,\n // Since AutoLinkNodes are just internal links, they need no hooks or graphQL population promises\n validations: [linkValidation(props, sanitizedFieldsWithoutText)],\n }),\n createNode({\n converters: {\n html: {\n converter: async ({\n converters,\n currentDepth,\n depth,\n draft,\n node,\n overrideAccess,\n parent,\n req,\n showHiddenFields,\n }) => {\n const childrenText = await convertLexicalNodesToHTML({\n converters,\n currentDepth,\n depth,\n draft,\n lexicalNodes: node.children,\n overrideAccess,\n parent: {\n ...node,\n parent,\n },\n req,\n showHiddenFields,\n })\n\n const rel: string = node.fields.newTab ? ' rel=\"noopener noreferrer\"' : ''\n const target: string = node.fields.newTab ? ' target=\"_blank\"' : ''\n\n const href: string =\n node.fields.linkType === 'custom'\n ? escapeHTML(node.fields.url)\n : (node.fields.doc?.value as string)\n\n return `<a href=\"${href}\"${target}${rel}>${childrenText}</a>`\n },\n nodeTypes: [LinkNode.getType()],\n },\n },\n getSubFields: () => {\n return sanitizedFieldsWithoutText\n },\n getSubFieldsData: ({ node }) => {\n return node?.fields\n },\n graphQLPopulationPromises: [linkPopulationPromiseHOC(props)],\n node: LinkNode,\n validations: [linkValidation(props, sanitizedFieldsWithoutText)],\n }),\n ],\n sanitizedServerFeatureProps: props,\n }\n },\n key: 'link',\n})\n"],"mappings":"AASA,OAAOA,UAAA,MAAgB;AACvB,SAASC,cAAc,QAAQ;AAC/B,SAASC,cAAc,QAAQ;AAI/B,SAASC,mBAAmB,QAAQ;AACpC,SAASC,yBAAyB,QAAQ;AAC1C,SAASC,UAAU,QAAQ;AAC3B,SAASC,uBAAuB,QAAQ;AACxC,SAASC,YAAY,QAAQ;AAC7B,SAASC,QAAQ,QAAQ;AACzB,SAASC,wBAAwB,QAAQ;AACzC,SAASC,IAAI,QAAQ;AACrB,SAASC,oBAAoB,QAAQ;AACrC,SAASC,cAAc,QAAQ;AA4C/B,OAAO,MAAMC,WAAA,GAA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AAC7D,cAAA,CAAeO,KAAA,EAAOa,0BAAA;MACtC,GACD;MACD6C,2BAAA,EAA6B1D;IAC/B;EACF;EACA2D,GAAA,EAAK;AACP","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../../src/features/link/server/validate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAIpC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,KAAK,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AACnF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAA;AAExD,eAAO,MAAM,cAAc,UAClB,sBAAsB,8BACD,KAAK,EAAE,KAClC,cAAc,CAAC,sBAAsB,GAAG,kBAAkB,
|
|
1
|
+
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../../src/features/link/server/validate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAIpC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,KAAK,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AACnF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAA;AAExD,eAAO,MAAM,cAAc,UAClB,sBAAsB,8BACD,KAAK,EAAE,KAClC,cAAc,CAAC,sBAAsB,GAAG,kBAAkB,CAsC5D,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { fieldSchemasToFormState } from '@payloadcms/ui/forms/fieldSchemasToFormState';
|
|
2
2
|
export const linkValidation = (props, sanitizedFieldsWithoutText) => {
|
|
3
3
|
return async ({
|
|
4
4
|
node,
|
|
@@ -13,17 +13,20 @@ export const linkValidation = (props, sanitizedFieldsWithoutText) => {
|
|
|
13
13
|
}
|
|
14
14
|
}) => {
|
|
15
15
|
/**
|
|
16
|
-
* Run
|
|
16
|
+
* Run fieldSchemasToFormState as that properly validates link fields and link sub-fields
|
|
17
17
|
*/
|
|
18
|
-
const result = await
|
|
18
|
+
const result = await fieldSchemasToFormState({
|
|
19
19
|
id,
|
|
20
20
|
collectionSlug,
|
|
21
21
|
data: node.fields,
|
|
22
|
-
|
|
22
|
+
fields: sanitizedFieldsWithoutText,
|
|
23
|
+
fieldSchemaMap: undefined,
|
|
23
24
|
operation: operation === 'create' || operation === 'update' ? operation : 'update',
|
|
25
|
+
permissions: {},
|
|
24
26
|
preferences,
|
|
27
|
+
renderAllFields: false,
|
|
25
28
|
req,
|
|
26
|
-
|
|
29
|
+
schemaPath: ''
|
|
27
30
|
});
|
|
28
31
|
let errorPaths = [];
|
|
29
32
|
for (const fieldKey in result) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.js","names":["
|
|
1
|
+
{"version":3,"file":"validate.js","names":["fieldSchemasToFormState","linkValidation","props","sanitizedFieldsWithoutText","node","validation","options","id","collectionSlug","operation","preferences","req","result","data","fields","fieldSchemaMap","undefined","permissions","renderAllFields","schemaPath","errorPaths","fieldKey","concat","length","join"],"sources":["../../../../src/features/link/server/validate.ts"],"sourcesContent":["import type { Field } from 'payload'\n\nimport { fieldSchemasToFormState } from '@payloadcms/ui/forms/fieldSchemasToFormState'\n\nimport type { NodeValidation } from '../../typesServer.js'\nimport type { SerializedAutoLinkNode, SerializedLinkNode } from '../nodes/types.js'\nimport type { LinkFeatureServerProps } from './index.js'\n\nexport const linkValidation = (\n props: LinkFeatureServerProps,\n sanitizedFieldsWithoutText: Field[],\n): NodeValidation<SerializedAutoLinkNode | SerializedLinkNode> => {\n return async ({\n node,\n validation: {\n options: { id, collectionSlug, operation, preferences, req },\n },\n }) => {\n /**\n * Run fieldSchemasToFormState as that properly validates link fields and link sub-fields\n */\n\n const result = await fieldSchemasToFormState({\n id,\n collectionSlug,\n data: node.fields,\n fields: sanitizedFieldsWithoutText, // Sanitized in feature.server.ts\n fieldSchemaMap: undefined,\n operation: operation === 'create' || operation === 'update' ? operation : 'update',\n permissions: {},\n preferences,\n renderAllFields: false,\n req,\n schemaPath: '',\n })\n\n let errorPaths: string[] = []\n for (const fieldKey in result) {\n if (result[fieldKey].errorPaths) {\n errorPaths = errorPaths.concat(result[fieldKey].errorPaths)\n }\n }\n\n if (errorPaths.length) {\n return 'The following fields are invalid: ' + errorPaths.join(', ')\n }\n\n return true\n }\n}\n"],"mappings":"AAEA,SAASA,uBAAuB,QAAQ;AAMxC,OAAO,MAAMC,cAAA,GAAiBA,CAC5BC,KAAA,EACAC,0BAAA;EAEA,OAAO,OAAO;IACZC,IAAI;IACJC,UAAA,EAAY;MACVC,OAAA,EAAS;QAAEC,EAAE;QAAEC,cAAc;QAAEC,SAAS;QAAEC,WAAW;QAAEC;MAAG;IAAE;EAC7D,CACF;IACC;;;IAIA,MAAMC,MAAA,GAAS,MAAMZ,uBAAA,CAAwB;MAC3CO,EAAA;MACAC,cAAA;MACAK,IAAA,EAAMT,IAAA,CAAKU,MAAM;MACjBA,MAAA,EAAQX,0BAAA;MACRY,cAAA,EAAgBC,SAAA;MAChBP,SAAA,EAAWA,SAAA,KAAc,YAAYA,SAAA,KAAc,WAAWA,SAAA,GAAY;MAC1EQ,WAAA,EAAa,CAAC;MACdP,WAAA;MACAQ,eAAA,EAAiB;MACjBP,GAAA;MACAQ,UAAA,EAAY;IACd;IAEA,IAAIC,UAAA,GAAuB,EAAE;IAC7B,KAAK,MAAMC,QAAA,IAAYT,MAAA,EAAQ;MAC7B,IAAIA,MAAM,CAACS,QAAA,CAAS,CAACD,UAAU,EAAE;QAC/BA,UAAA,GAAaA,UAAA,CAAWE,MAAM,CAACV,MAAM,CAACS,QAAA,CAAS,CAACD,UAAU;MAC5D;IACF;IAEA,IAAIA,UAAA,CAAWG,MAAM,EAAE;MACrB,OAAO,uCAAuCH,UAAA,CAAWI,IAAI,CAAC;IAChE;IAEA,OAAO;EACT;AACF","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RelationshipComponent.d.ts","sourceRoot":"","sources":["../../../../../src/features/relationship/client/components/RelationshipComponent.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAgBhD,OAAO,KAA+D,MAAM,OAAO,CAAA;AAEnF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAA;AAM9E,OAAO,cAAc,CAAA;AAQrB,KAAK,KAAK,GAAG;IACX,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,EAAE,gBAAgB,CAAA;IACtB,MAAM,CAAC,EAAE,iBAAiB,CAAA;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA;
|
|
1
|
+
{"version":3,"file":"RelationshipComponent.d.ts","sourceRoot":"","sources":["../../../../../src/features/relationship/client/components/RelationshipComponent.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAgBhD,OAAO,KAA+D,MAAM,OAAO,CAAA;AAEnF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAA;AAM9E,OAAO,cAAc,CAAA;AAQrB,KAAK,KAAK,GAAG;IACX,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,EAAE,gBAAgB,CAAA;IACtB,MAAM,CAAC,EAAE,iBAAiB,CAAA;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA;AA6KD,eAAO,MAAM,qBAAqB,UAAW,KAAK,KAAG,KAAK,CAAC,SAE1D,CAAA"}
|
|
@@ -31,7 +31,9 @@ const Component = props => {
|
|
|
31
31
|
const [editor] = useLexicalComposerContext();
|
|
32
32
|
const [isSelected, setSelected, clearSelection] = useLexicalNodeSelection(nodeKey);
|
|
33
33
|
const {
|
|
34
|
-
|
|
34
|
+
fieldProps: {
|
|
35
|
+
readOnly
|
|
36
|
+
}
|
|
35
37
|
} = useEditorConfigContext();
|
|
36
38
|
const {
|
|
37
39
|
config: {
|
|
@@ -121,7 +123,7 @@ const Component = props => {
|
|
|
121
123
|
children: [/*#__PURE__*/_jsx("p", {
|
|
122
124
|
className: `${baseClass}__label`,
|
|
123
125
|
children: t('fields:labelRelationship', {
|
|
124
|
-
label: getTranslation(relatedCollection.labels
|
|
126
|
+
label: relatedCollection.labels?.singular ? getTranslation(relatedCollection.labels?.singular, i18n) : relatedCollection.slug
|
|
125
127
|
})
|
|
126
128
|
}), /*#__PURE__*/_jsx(DocumentDrawerToggler, {
|
|
127
129
|
className: `${baseClass}__doc-drawer-toggler`,
|
|
@@ -135,7 +137,7 @@ const Component = props => {
|
|
|
135
137
|
children: [/*#__PURE__*/_jsx(Button, {
|
|
136
138
|
buttonStyle: "icon-label",
|
|
137
139
|
className: `${baseClass}__swapButton`,
|
|
138
|
-
disabled:
|
|
140
|
+
disabled: readOnly,
|
|
139
141
|
el: "button",
|
|
140
142
|
icon: "swap",
|
|
141
143
|
onClick: () => {
|
|
@@ -152,7 +154,7 @@ const Component = props => {
|
|
|
152
154
|
}), /*#__PURE__*/_jsx(Button, {
|
|
153
155
|
buttonStyle: "icon-label",
|
|
154
156
|
className: `${baseClass}__removeButton`,
|
|
155
|
-
disabled:
|
|
157
|
+
disabled: readOnly,
|
|
156
158
|
icon: "x",
|
|
157
159
|
onClick: e => {
|
|
158
160
|
e.preventDefault();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RelationshipComponent.js","names":["useLexicalComposerContext","useLexicalNodeSelection","mergeRegister","getTranslation","Button","useConfig","usePayloadAPI","useTranslation","$getNodeByKey","$getSelection","$isNodeSelection","CLICK_COMMAND","COMMAND_PRIORITY_LOW","KEY_BACKSPACE_COMMAND","KEY_DELETE_COMMAND","React","useCallback","useEffect","useReducer","useRef","useState","useEditorConfigContext","useLexicalDocumentDrawer","INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND","$isRelationshipNode","baseClass","initialParams","depth","Component","props","data","relationTo","value","nodeKey","Error","relationshipElemRef","editor","isSelected","setSelected","clearSelection","field","config","collections","routes","api","serverURL","relatedCollection","setRelatedCollection","find","coll","slug","i18n","t","cacheBust","dispatchCacheBust","state","setParams","closeDocumentDrawer","DocumentDrawer","DocumentDrawerToggler","id","collectionSlug","removeRelationship","update","remove","updateRelationship","doc","$onDelete","payload","deleteSelection","event","preventDefault","getNodes","forEach","node","onClick","target","current","contains","shiftKey","registerCommand","_jsxs","className","filter","Boolean","join","contentEditable","ref","_jsx","label","labels","singular","admin","useAsTitle","isEditable","buttonStyle","disabled","readOnly","el","icon","dispatchCommand","replace","round","tooltip","e","onSave","RelationshipComponent"],"sources":["../../../../../src/features/relationship/client/components/RelationshipComponent.tsx"],"sourcesContent":["'use client'\nimport type { ElementFormatType } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { useLexicalNodeSelection } from '@lexical/react/useLexicalNodeSelection.js'\nimport { mergeRegister } from '@lexical/utils'\nimport { getTranslation } from '@payloadcms/translations'\nimport { Button, useConfig, usePayloadAPI, useTranslation } from '@payloadcms/ui'\nimport {\n $getNodeByKey,\n $getSelection,\n $isNodeSelection,\n CLICK_COMMAND,\n COMMAND_PRIORITY_LOW,\n KEY_BACKSPACE_COMMAND,\n KEY_DELETE_COMMAND,\n} from 'lexical'\nimport React, { useCallback, useEffect, useReducer, useRef, useState } from 'react'\n\nimport type { RelationshipData } from '../../server/nodes/RelationshipNode.js'\n\nimport { useEditorConfigContext } from '../../../../lexical/config/client/EditorConfigProvider.js'\nimport { useLexicalDocumentDrawer } from '../../../../utilities/fieldsDrawer/useLexicalDocumentDrawer.js'\nimport { INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND } from '../drawer/commands.js'\nimport { $isRelationshipNode } from '../nodes/RelationshipNode.js'\nimport './index.scss'\n\nconst baseClass = 'lexical-relationship'\n\nconst initialParams = {\n depth: 0,\n}\n\ntype Props = {\n className?: string\n data: RelationshipData\n format?: ElementFormatType\n nodeKey?: string\n}\n\nconst Component: React.FC<Props> = (props) => {\n const {\n data: { relationTo, value },\n nodeKey,\n } = props\n\n if (typeof value === 'object') {\n throw new Error(\n 'Relationship value should be a string or number. The Lexical Relationship component should not receive the populated value object.',\n )\n }\n\n const relationshipElemRef = useRef<HTMLDivElement | null>(null)\n\n const [editor] = useLexicalComposerContext()\n const [isSelected, setSelected, clearSelection] = useLexicalNodeSelection(nodeKey!)\n const { field } = useEditorConfigContext()\n const {\n config: {\n collections,\n routes: { api },\n serverURL,\n },\n } = useConfig()\n\n const [relatedCollection, setRelatedCollection] = useState(\n () => collections.find((coll) => coll.slug === relationTo)!,\n )\n\n const { i18n, t } = useTranslation()\n const [cacheBust, dispatchCacheBust] = useReducer((state) => state + 1, 0)\n const [{ data }, { setParams }] = usePayloadAPI(\n `${serverURL}${api}/${relatedCollection.slug}/${value}`,\n { initialParams },\n )\n\n const { closeDocumentDrawer, DocumentDrawer, DocumentDrawerToggler } = useLexicalDocumentDrawer({\n id: value,\n collectionSlug: relatedCollection.slug,\n })\n\n const removeRelationship = useCallback(() => {\n editor.update(() => {\n $getNodeByKey(nodeKey!)?.remove()\n })\n }, [editor, nodeKey])\n\n const updateRelationship = React.useCallback(\n ({ doc }) => {\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 closeDocumentDrawer()\n dispatchCacheBust()\n },\n [cacheBust, setParams, closeDocumentDrawer],\n )\n\n const $onDelete = useCallback(\n (payload: KeyboardEvent) => {\n const deleteSelection = $getSelection()\n if (isSelected && $isNodeSelection(deleteSelection)) {\n const event: KeyboardEvent = payload\n event.preventDefault()\n editor.update(() => {\n deleteSelection.getNodes().forEach((node) => {\n if ($isRelationshipNode(node)) {\n node.remove()\n }\n })\n })\n }\n return false\n },\n [editor, isSelected],\n )\n const onClick = useCallback(\n (payload: MouseEvent) => {\n const event = payload\n // Check if relationshipElemRef.target or anything WITHIN relationshipElemRef.target was clicked\n if (\n event.target === relationshipElemRef.current ||\n relationshipElemRef.current?.contains(event.target as Node)\n ) {\n if (event.shiftKey) {\n setSelected(!isSelected)\n } else {\n if (!isSelected) {\n clearSelection()\n setSelected(true)\n }\n }\n return true\n }\n\n return false\n },\n [isSelected, setSelected, clearSelection],\n )\n\n useEffect(() => {\n return mergeRegister(\n editor.registerCommand<MouseEvent>(CLICK_COMMAND, onClick, COMMAND_PRIORITY_LOW),\n\n editor.registerCommand(KEY_DELETE_COMMAND, $onDelete, COMMAND_PRIORITY_LOW),\n editor.registerCommand(KEY_BACKSPACE_COMMAND, $onDelete, COMMAND_PRIORITY_LOW),\n )\n }, [clearSelection, editor, isSelected, nodeKey, $onDelete, setSelected, onClick])\n\n return (\n <div\n className={[baseClass, isSelected && `${baseClass}--selected`].filter(Boolean).join(' ')}\n contentEditable={false}\n ref={relationshipElemRef}\n >\n <div className={`${baseClass}__wrap`}>\n <p className={`${baseClass}__label`}>\n {t('fields:labelRelationship', {\n label: getTranslation(relatedCollection.labels.singular, i18n),\n })}\n </p>\n <DocumentDrawerToggler className={`${baseClass}__doc-drawer-toggler`}>\n <p className={`${baseClass}__title`}>\n {data ? data[relatedCollection?.admin?.useAsTitle || 'id'] : value}\n </p>\n </DocumentDrawerToggler>\n </div>\n {editor.isEditable() && (\n <div className={`${baseClass}__actions`}>\n <Button\n buttonStyle=\"icon-label\"\n className={`${baseClass}__swapButton`}\n disabled={field?.admin?.readOnly}\n el=\"button\"\n icon=\"swap\"\n onClick={() => {\n if (nodeKey) {\n editor.dispatchCommand(INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND, {\n replace: { nodeKey },\n })\n }\n }}\n round\n tooltip={t('fields:swapRelationship')}\n />\n <Button\n buttonStyle=\"icon-label\"\n className={`${baseClass}__removeButton`}\n disabled={field?.admin?.readOnly}\n icon=\"x\"\n onClick={(e) => {\n e.preventDefault()\n removeRelationship()\n }}\n round\n tooltip={t('fields:removeRelationship')}\n />\n </div>\n )}\n\n {!!value && <DocumentDrawer onSave={updateRelationship} />}\n </div>\n )\n}\n\nexport const RelationshipComponent = (props: Props): React.ReactNode => {\n return <Component {...props} />\n}\n"],"mappings":"AAAA;;;AAGA,SAASA,yBAAyB,QAAQ;AAC1C,SAASC,uBAAuB,QAAQ;AACxC,SAASC,aAAa,QAAQ;AAC9B,SAASC,cAAc,QAAQ;AAC/B,SAASC,MAAM,EAAEC,SAAS,EAAEC,aAAa,EAAEC,cAAc,QAAQ;AACjE,SACEC,aAAa,EACbC,aAAa,EACbC,gBAAgB,EAChBC,aAAa,EACbC,oBAAoB,EACpBC,qBAAqB,EACrBC,kBAAkB,QACb;AACP,OAAOC,KAAA,IAASC,WAAW,EAAEC,SAAS,EAAEC,UAAU,EAAEC,MAAM,EAAEC,QAAQ,QAAQ;AAI5E,SAASC,sBAAsB,QAAQ;AACvC,SAASC,wBAAwB,QAAQ;AACzC,SAASC,uCAAuC,QAAQ;AACxD,SAASC,mBAAmB,QAAQ;AAGpC,MAAMC,SAAA,GAAY;AAElB,MAAMC,aAAA,GAAgB;EACpBC,KAAA,EAAO;AACT;AASA,MAAMC,SAAA,GAA8BC,KAAA;EAClC,MAAM;IACJC,IAAA,EAAM;MAAEC,UAAU;MAAEC;IAAK,CAAE;IAC3BC;EAAO,CACR,GAAGJ,KAAA;EAEJ,IAAI,OAAOG,KAAA,KAAU,UAAU;IAC7B,MAAM,IAAIE,KAAA,CACR;EAEJ;EAEA,MAAMC,mBAAA,GAAsBhB,MAAA,CAA8B;EAE1D,MAAM,CAACiB,MAAA,CAAO,GAAGpC,yBAAA;EACjB,MAAM,CAACqC,UAAA,EAAYC,WAAA,EAAaC,cAAA,CAAe,GAAGtC,uBAAA,CAAwBgC,OAAA;EAC1E,MAAM;IAAEO;EAAK,CAAE,GAAGnB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B;QACvCuE,QAAA,EAAUxD,KAAA,EAAOoD,KAAA,EAAOK,QAAA;QACxBE,IAAA,EAAK;QACLxB,OAAA,EAAU6B,CAAA;UACRA,CAAA,CAAEjC,cAAc;UAChBT,kBAAA;QACF;QACAwC,KAAK;QACLC,OAAA,EAASnD,CAAA,CAAE;;QAKhB,CAAC,CAACpB,KAAA,iBAASwD,IAAA,CAAC9B,cAAA;MAAe+C,MAAA,EAAQxC;;;AAG1C;AAEA,OAAO,MAAMyC,qBAAA,GAAyB7E,KAAA;EACpC,oBAAO2D,IAAA,CAAC5D,SAAA;IAAW,GAAGC;;AACxB","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"RelationshipComponent.js","names":["useLexicalComposerContext","useLexicalNodeSelection","mergeRegister","getTranslation","Button","useConfig","usePayloadAPI","useTranslation","$getNodeByKey","$getSelection","$isNodeSelection","CLICK_COMMAND","COMMAND_PRIORITY_LOW","KEY_BACKSPACE_COMMAND","KEY_DELETE_COMMAND","React","useCallback","useEffect","useReducer","useRef","useState","useEditorConfigContext","useLexicalDocumentDrawer","INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND","$isRelationshipNode","baseClass","initialParams","depth","Component","props","data","relationTo","value","nodeKey","Error","relationshipElemRef","editor","isSelected","setSelected","clearSelection","fieldProps","readOnly","config","collections","routes","api","serverURL","relatedCollection","setRelatedCollection","find","coll","slug","i18n","t","cacheBust","dispatchCacheBust","state","setParams","closeDocumentDrawer","DocumentDrawer","DocumentDrawerToggler","id","collectionSlug","removeRelationship","update","remove","updateRelationship","doc","$onDelete","payload","deleteSelection","event","preventDefault","getNodes","forEach","node","onClick","target","current","contains","shiftKey","registerCommand","_jsxs","className","filter","Boolean","join","contentEditable","ref","_jsx","label","labels","singular","admin","useAsTitle","isEditable","buttonStyle","disabled","el","icon","dispatchCommand","replace","round","tooltip","e","onSave","RelationshipComponent"],"sources":["../../../../../src/features/relationship/client/components/RelationshipComponent.tsx"],"sourcesContent":["'use client'\nimport type { ElementFormatType } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { useLexicalNodeSelection } from '@lexical/react/useLexicalNodeSelection.js'\nimport { mergeRegister } from '@lexical/utils'\nimport { getTranslation } from '@payloadcms/translations'\nimport { Button, useConfig, usePayloadAPI, useTranslation } from '@payloadcms/ui'\nimport {\n $getNodeByKey,\n $getSelection,\n $isNodeSelection,\n CLICK_COMMAND,\n COMMAND_PRIORITY_LOW,\n KEY_BACKSPACE_COMMAND,\n KEY_DELETE_COMMAND,\n} from 'lexical'\nimport React, { useCallback, useEffect, useReducer, useRef, useState } from 'react'\n\nimport type { RelationshipData } from '../../server/nodes/RelationshipNode.js'\n\nimport { useEditorConfigContext } from '../../../../lexical/config/client/EditorConfigProvider.js'\nimport { useLexicalDocumentDrawer } from '../../../../utilities/fieldsDrawer/useLexicalDocumentDrawer.js'\nimport { INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND } from '../drawer/commands.js'\nimport { $isRelationshipNode } from '../nodes/RelationshipNode.js'\nimport './index.scss'\n\nconst baseClass = 'lexical-relationship'\n\nconst initialParams = {\n depth: 0,\n}\n\ntype Props = {\n className?: string\n data: RelationshipData\n format?: ElementFormatType\n nodeKey?: string\n}\n\nconst Component: React.FC<Props> = (props) => {\n const {\n data: { relationTo, value },\n nodeKey,\n } = props\n\n if (typeof value === 'object') {\n throw new Error(\n 'Relationship value should be a string or number. The Lexical Relationship component should not receive the populated value object.',\n )\n }\n\n const relationshipElemRef = useRef<HTMLDivElement | null>(null)\n\n const [editor] = useLexicalComposerContext()\n const [isSelected, setSelected, clearSelection] = useLexicalNodeSelection(nodeKey!)\n const {\n fieldProps: { readOnly },\n } = useEditorConfigContext()\n const {\n config: {\n collections,\n routes: { api },\n serverURL,\n },\n } = useConfig()\n\n const [relatedCollection, setRelatedCollection] = useState(\n () => collections.find((coll) => coll.slug === relationTo)!,\n )\n\n const { i18n, t } = useTranslation()\n const [cacheBust, dispatchCacheBust] = useReducer((state) => state + 1, 0)\n const [{ data }, { setParams }] = usePayloadAPI(\n `${serverURL}${api}/${relatedCollection.slug}/${value}`,\n { initialParams },\n )\n\n const { closeDocumentDrawer, DocumentDrawer, DocumentDrawerToggler } = useLexicalDocumentDrawer({\n id: value,\n collectionSlug: relatedCollection.slug,\n })\n\n const removeRelationship = useCallback(() => {\n editor.update(() => {\n $getNodeByKey(nodeKey!)?.remove()\n })\n }, [editor, nodeKey])\n\n const updateRelationship = React.useCallback(\n ({ doc }) => {\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 closeDocumentDrawer()\n dispatchCacheBust()\n },\n [cacheBust, setParams, closeDocumentDrawer],\n )\n\n const $onDelete = useCallback(\n (payload: KeyboardEvent) => {\n const deleteSelection = $getSelection()\n if (isSelected && $isNodeSelection(deleteSelection)) {\n const event: KeyboardEvent = payload\n event.preventDefault()\n editor.update(() => {\n deleteSelection.getNodes().forEach((node) => {\n if ($isRelationshipNode(node)) {\n node.remove()\n }\n })\n })\n }\n return false\n },\n [editor, isSelected],\n )\n const onClick = useCallback(\n (payload: MouseEvent) => {\n const event = payload\n // Check if relationshipElemRef.target or anything WITHIN relationshipElemRef.target was clicked\n if (\n event.target === relationshipElemRef.current ||\n relationshipElemRef.current?.contains(event.target as Node)\n ) {\n if (event.shiftKey) {\n setSelected(!isSelected)\n } else {\n if (!isSelected) {\n clearSelection()\n setSelected(true)\n }\n }\n return true\n }\n\n return false\n },\n [isSelected, setSelected, clearSelection],\n )\n\n useEffect(() => {\n return mergeRegister(\n editor.registerCommand<MouseEvent>(CLICK_COMMAND, onClick, COMMAND_PRIORITY_LOW),\n\n editor.registerCommand(KEY_DELETE_COMMAND, $onDelete, COMMAND_PRIORITY_LOW),\n editor.registerCommand(KEY_BACKSPACE_COMMAND, $onDelete, COMMAND_PRIORITY_LOW),\n )\n }, [clearSelection, editor, isSelected, nodeKey, $onDelete, setSelected, onClick])\n\n return (\n <div\n className={[baseClass, isSelected && `${baseClass}--selected`].filter(Boolean).join(' ')}\n contentEditable={false}\n ref={relationshipElemRef}\n >\n <div className={`${baseClass}__wrap`}>\n <p className={`${baseClass}__label`}>\n {t('fields:labelRelationship', {\n label: relatedCollection.labels?.singular\n ? getTranslation(relatedCollection.labels?.singular, i18n)\n : relatedCollection.slug,\n })}\n </p>\n <DocumentDrawerToggler className={`${baseClass}__doc-drawer-toggler`}>\n <p className={`${baseClass}__title`}>\n {data ? data[relatedCollection?.admin?.useAsTitle || 'id'] : value}\n </p>\n </DocumentDrawerToggler>\n </div>\n {editor.isEditable() && (\n <div className={`${baseClass}__actions`}>\n <Button\n buttonStyle=\"icon-label\"\n className={`${baseClass}__swapButton`}\n disabled={readOnly}\n el=\"button\"\n icon=\"swap\"\n onClick={() => {\n if (nodeKey) {\n editor.dispatchCommand(INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND, {\n replace: { nodeKey },\n })\n }\n }}\n round\n tooltip={t('fields:swapRelationship')}\n />\n <Button\n buttonStyle=\"icon-label\"\n className={`${baseClass}__removeButton`}\n disabled={readOnly}\n icon=\"x\"\n onClick={(e) => {\n e.preventDefault()\n removeRelationship()\n }}\n round\n tooltip={t('fields:removeRelationship')}\n />\n </div>\n )}\n\n {!!value && <DocumentDrawer onSave={updateRelationship} />}\n </div>\n )\n}\n\nexport const RelationshipComponent = (props: Props): React.ReactNode => {\n return <Component {...props} />\n}\n"],"mappings":"AAAA;;;AAGA,SAASA,yBAAyB,QAAQ;AAC1C,SAASC,uBAAuB,QAAQ;AACxC,SAASC,aAAa,QAAQ;AAC9B,SAASC,cAAc,QAAQ;AAC/B,SAASC,MAAM,EAAEC,SAAS,EAAEC,aAAa,EAAEC,cAAc,QAAQ;AACjE,SACEC,aAAa,EACbC,aAAa,EACbC,gBAAgB,EAChBC,aAAa,EACbC,oBAAoB,EACpBC,qBAAqB,EACrBC,kBAAkB,QACb;AACP,OAAOC,KAAA,IAASC,WAAW,EAAEC,SAAS,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uB,SAAA,EAAW,GAAG1D,SAAA,sBAA+B;kBAClE,aAAAgE,IAAA,CAAC;UAAEN,SAAA,EAAW,GAAG1D,SAAA,SAAkB;oBAChCK,IAAA,GAAOA,IAAI,CAACiB,iBAAA,EAAmB8C,KAAA,EAAOC,UAAA,IAAc,KAAK,GAAG9D;;;QAIlEI,MAAA,CAAO2D,UAAU,mBAChBb,KAAA,CAAC;MAAIC,SAAA,EAAW,GAAG1D,SAAA,WAAoB;8BACrCgE,IAAA,CAACrF,MAAA;QACC4F,WAAA,EAAY;QACZb,SAAA,EAAW,GAAG1D,SAAA,cAAuB;QACrCwE,QAAA,EAAUxD,QAAA;QACVyD,EAAA,EAAG;QACHC,IAAA,EAAK;QACLvB,OAAA,EAASA,CAAA;UACP,IAAI3C,OAAA,EAAS;YACXG,MAAA,CAAOgE,eAAe,CAAC7E,uCAAA,EAAyC;cAC9D8E,OAAA,EAAS;gBAAEpE;cAAQ;YACrB;UACF;QACF;QACAqE,KAAK;QACLC,OAAA,EAASlD,CAAA,CAAE;uBAEboC,IAAA,CAACrF,MAAA;QACC4F,WAAA,EAAY;QACZb,SAAA,EAAW,GAAG1D,SAAA,gBAAyB;QACvCwE,QAAA,EAAUxD,QAAA;QACV0D,IAAA,EAAK;QACLvB,OAAA,EAAU4B,CAAA;UACRA,CAAA,CAAEhC,cAAc;UAChBT,kBAAA;QACF;QACAuC,KAAK;QACLC,OAAA,EAASlD,CAAA,CAAE;;QAKhB,CAAC,CAACrB,KAAA,iBAASyD,IAAA,CAAC9B,cAAA;MAAe8C,MAAA,EAAQvC;;;AAG1C;AAEA,OAAO,MAAMwC,qBAAA,GAAyB7E,KAAA;EACpC,oBAAO4D,IAAA,CAAC7D,SAAA;IAAW,GAAGC;;AACxB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/features/toolbars/fixed/client/Toolbar/index.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAA;AAE3E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAA;AAKrE,OAAO,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/features/toolbars/fixed/client/Toolbar/index.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAA;AAE3E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAA;AAKrE,OAAO,cAAc,CAAA;AAiPrB,eAAO,MAAM,kBAAkB,EAAE,yBAAyB,CAAC,wBAAwB,CAqClF,CAAA"}
|