@payloadcms/richtext-lexical 3.0.0-beta.36 → 3.0.0-beta.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/field/features/align/feature.client.d.ts.map +1 -1
- package/dist/field/features/align/feature.client.js +12 -4
- package/dist/field/features/align/feature.client.js.map +1 -1
- package/dist/field/features/align/feature.server.d.ts.map +1 -1
- package/dist/field/features/align/feature.server.js +2 -0
- package/dist/field/features/align/feature.server.js.map +1 -1
- package/dist/field/features/align/i18n.d.ts +3 -0
- package/dist/field/features/align/i18n.d.ts.map +1 -0
- package/dist/field/features/align/i18n.js +196 -0
- package/dist/field/features/align/i18n.js.map +1 -0
- package/dist/field/features/blockquote/feature.client.d.ts.map +1 -1
- package/dist/field/features/blockquote/feature.client.js +22 -21
- package/dist/field/features/blockquote/feature.client.js.map +1 -1
- package/dist/field/features/blockquote/feature.server.d.ts.map +1 -1
- package/dist/field/features/blockquote/feature.server.js +2 -0
- package/dist/field/features/blockquote/feature.server.js.map +1 -1
- package/dist/field/features/blockquote/i18n.d.ts +3 -0
- package/dist/field/features/blockquote/i18n.d.ts.map +1 -0
- package/dist/field/features/blockquote/i18n.js +100 -0
- package/dist/field/features/blockquote/i18n.js.map +1 -0
- package/dist/field/features/blocks/feature.client.d.ts.map +1 -1
- package/dist/field/features/blocks/feature.client.js +3 -1
- package/dist/field/features/blocks/feature.client.js.map +1 -1
- package/dist/field/features/blocks/feature.server.d.ts.map +1 -1
- package/dist/field/features/blocks/feature.server.js +3 -1
- package/dist/field/features/blocks/feature.server.js.map +1 -1
- package/dist/field/features/blocks/i18n.d.ts +3 -0
- package/dist/field/features/blocks/i18n.d.ts.map +1 -0
- package/dist/field/features/blocks/i18n.js +100 -0
- package/dist/field/features/blocks/i18n.js.map +1 -0
- package/dist/field/features/blocks/populationPromise.js +1 -1
- package/dist/field/features/blocks/populationPromise.js.map +1 -1
- package/dist/field/features/converters/html/field/index.d.ts.map +1 -1
- package/dist/field/features/converters/html/field/index.js +30 -2
- package/dist/field/features/converters/html/field/index.js.map +1 -1
- package/dist/field/features/heading/feature.client.d.ts.map +1 -1
- package/dist/field/features/heading/feature.client.js +26 -21
- package/dist/field/features/heading/feature.client.js.map +1 -1
- package/dist/field/features/heading/feature.server.d.ts.map +1 -1
- package/dist/field/features/heading/feature.server.js +2 -0
- package/dist/field/features/heading/feature.server.js.map +1 -1
- package/dist/field/features/heading/i18n.d.ts +3 -0
- package/dist/field/features/heading/i18n.d.ts.map +1 -0
- package/dist/field/features/heading/i18n.js +100 -0
- package/dist/field/features/heading/i18n.js.map +1 -0
- package/dist/field/features/horizontalRule/feature.client.d.ts.map +1 -1
- package/dist/field/features/horizontalRule/feature.client.js +21 -20
- package/dist/field/features/horizontalRule/feature.client.js.map +1 -1
- package/dist/field/features/horizontalRule/feature.server.d.ts.map +1 -1
- package/dist/field/features/horizontalRule/feature.server.js +2 -0
- package/dist/field/features/horizontalRule/feature.server.js.map +1 -1
- package/dist/field/features/horizontalRule/i18n.d.ts +3 -0
- package/dist/field/features/horizontalRule/i18n.d.ts.map +1 -0
- package/dist/field/features/horizontalRule/i18n.js +100 -0
- package/dist/field/features/horizontalRule/i18n.js.map +1 -0
- package/dist/field/features/indent/feature.client.d.ts.map +1 -1
- package/dist/field/features/indent/feature.client.js +6 -2
- package/dist/field/features/indent/feature.client.js.map +1 -1
- package/dist/field/features/indent/feature.server.d.ts.map +1 -1
- package/dist/field/features/indent/feature.server.js +2 -0
- package/dist/field/features/indent/feature.server.js.map +1 -1
- package/dist/field/features/indent/i18n.d.ts +3 -0
- package/dist/field/features/indent/i18n.d.ts.map +1 -0
- package/dist/field/features/indent/i18n.js +132 -0
- package/dist/field/features/indent/i18n.js.map +1 -0
- package/dist/field/features/link/feature.client.d.ts.map +1 -1
- package/dist/field/features/link/feature.client.js +7 -1
- package/dist/field/features/link/feature.client.js.map +1 -1
- package/dist/field/features/link/feature.server.d.ts.map +1 -1
- package/dist/field/features/link/feature.server.js +11 -3
- package/dist/field/features/link/feature.server.js.map +1 -1
- package/dist/field/features/link/i18n.d.ts +3 -0
- package/dist/field/features/link/i18n.d.ts.map +1 -0
- package/dist/field/features/link/i18n.js +100 -0
- package/dist/field/features/link/i18n.js.map +1 -0
- package/dist/field/features/link/markdownTransformer.d.ts +6 -0
- package/dist/field/features/link/markdownTransformer.d.ts.map +1 -0
- package/dist/field/features/link/markdownTransformer.js +50 -0
- package/dist/field/features/link/markdownTransformer.js.map +1 -0
- package/dist/field/features/link/populationPromise.js +1 -1
- package/dist/field/features/link/populationPromise.js.map +1 -1
- package/dist/field/features/lists/checklist/feature.client.d.ts.map +1 -1
- package/dist/field/features/lists/checklist/feature.client.js +21 -20
- package/dist/field/features/lists/checklist/feature.client.js.map +1 -1
- package/dist/field/features/lists/checklist/feature.server.d.ts.map +1 -1
- package/dist/field/features/lists/checklist/feature.server.js +2 -0
- package/dist/field/features/lists/checklist/feature.server.js.map +1 -1
- package/dist/field/features/lists/checklist/i18n.d.ts +3 -0
- package/dist/field/features/lists/checklist/i18n.d.ts.map +1 -0
- package/dist/field/features/lists/checklist/i18n.js +100 -0
- package/dist/field/features/lists/checklist/i18n.js.map +1 -0
- package/dist/field/features/lists/orderedList/feature.client.d.ts.map +1 -1
- package/dist/field/features/lists/orderedList/feature.client.js +19 -18
- package/dist/field/features/lists/orderedList/feature.client.js.map +1 -1
- package/dist/field/features/lists/orderedList/feature.server.d.ts.map +1 -1
- package/dist/field/features/lists/orderedList/feature.server.js +3 -1
- package/dist/field/features/lists/orderedList/feature.server.js.map +1 -1
- package/dist/field/features/lists/orderedList/i18n.d.ts +3 -0
- package/dist/field/features/lists/orderedList/i18n.d.ts.map +1 -0
- package/dist/field/features/lists/orderedList/i18n.js +100 -0
- package/dist/field/features/lists/orderedList/i18n.js.map +1 -0
- package/dist/field/features/lists/shared/slashMenuListGroup.d.ts +3 -0
- package/dist/field/features/lists/shared/slashMenuListGroup.d.ts.map +1 -0
- package/dist/field/features/lists/shared/slashMenuListGroup.js +11 -0
- package/dist/field/features/lists/shared/slashMenuListGroup.js.map +1 -0
- package/dist/field/features/lists/unorderedList/feature.client.d.ts.map +1 -1
- package/dist/field/features/lists/unorderedList/feature.client.js +19 -18
- package/dist/field/features/lists/unorderedList/feature.client.js.map +1 -1
- package/dist/field/features/lists/unorderedList/feature.server.d.ts.map +1 -1
- package/dist/field/features/lists/unorderedList/feature.server.js +2 -0
- package/dist/field/features/lists/unorderedList/feature.server.js.map +1 -1
- package/dist/field/features/lists/unorderedList/i18n.d.ts +3 -0
- package/dist/field/features/lists/unorderedList/i18n.d.ts.map +1 -0
- package/dist/field/features/lists/unorderedList/i18n.js +100 -0
- package/dist/field/features/lists/unorderedList/i18n.js.map +1 -0
- package/dist/field/features/paragraph/feature.client.d.ts.map +1 -1
- package/dist/field/features/paragraph/feature.client.js +24 -23
- package/dist/field/features/paragraph/feature.client.js.map +1 -1
- package/dist/field/features/paragraph/feature.server.d.ts.map +1 -1
- package/dist/field/features/paragraph/feature.server.js +2 -0
- package/dist/field/features/paragraph/feature.server.js.map +1 -1
- package/dist/field/features/paragraph/i18n.d.ts +3 -0
- package/dist/field/features/paragraph/i18n.d.ts.map +1 -0
- package/dist/field/features/paragraph/i18n.js +132 -0
- package/dist/field/features/paragraph/i18n.js.map +1 -0
- package/dist/field/features/relationship/feature.client.d.ts.map +1 -1
- package/dist/field/features/relationship/feature.client.js +23 -22
- package/dist/field/features/relationship/feature.client.js.map +1 -1
- package/dist/field/features/relationship/feature.server.d.ts.map +1 -1
- package/dist/field/features/relationship/feature.server.js +2 -0
- package/dist/field/features/relationship/feature.server.js.map +1 -1
- package/dist/field/features/relationship/i18n.d.ts +3 -0
- package/dist/field/features/relationship/i18n.d.ts.map +1 -0
- package/dist/field/features/relationship/i18n.js +100 -0
- package/dist/field/features/relationship/i18n.js.map +1 -0
- package/dist/field/features/shared/slashMenu/basicGroup.d.ts +3 -0
- package/dist/field/features/shared/slashMenu/basicGroup.d.ts.map +1 -0
- package/dist/field/features/shared/slashMenu/basicGroup.js +11 -0
- package/dist/field/features/shared/slashMenu/basicGroup.js.map +1 -0
- package/dist/field/features/toolbars/types.d.ts +1 -1
- package/dist/field/features/toolbars/types.d.ts.map +1 -1
- package/dist/field/features/toolbars/types.js.map +1 -1
- package/dist/field/features/types.d.ts +21 -2
- package/dist/field/features/types.d.ts.map +1 -1
- package/dist/field/features/types.js.map +1 -1
- package/dist/field/features/upload/feature.client.d.ts.map +1 -1
- package/dist/field/features/upload/feature.client.js +26 -25
- package/dist/field/features/upload/feature.client.js.map +1 -1
- package/dist/field/features/upload/feature.server.d.ts.map +1 -1
- package/dist/field/features/upload/feature.server.js +3 -1
- package/dist/field/features/upload/feature.server.js.map +1 -1
- package/dist/field/features/upload/i18n.d.ts +3 -0
- package/dist/field/features/upload/i18n.d.ts.map +1 -0
- package/dist/field/features/upload/i18n.js +100 -0
- package/dist/field/features/upload/i18n.js.map +1 -0
- package/dist/field/features/upload/populationPromise.js +1 -1
- package/dist/field/features/upload/populationPromise.js.map +1 -1
- package/dist/field/lexical/LexicalEditor.d.ts.map +1 -1
- package/dist/field/lexical/LexicalEditor.js +3 -1
- package/dist/field/lexical/LexicalEditor.js.map +1 -1
- package/dist/field/lexical/config/server/sanitize.d.ts.map +1 -1
- package/dist/field/lexical/config/server/sanitize.js +11 -0
- package/dist/field/lexical/config/server/sanitize.js.map +1 -1
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts +2 -2
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts.map +1 -1
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js.map +1 -1
- package/dist/field/lexical/utils/url.d.ts.map +1 -1
- package/dist/field/lexical/utils/url.js +10 -2
- package/dist/field/lexical/utils/url.js.map +1 -1
- package/dist/i18n.d.ts +3 -0
- package/dist/i18n.d.ts.map +1 -0
- package/dist/i18n.js +164 -0
- package/dist/i18n.js.map +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -1
- package/package.json +12 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/field/features/link/feature.client.tsx"],"sourcesContent":["'use client'\n\nimport type { LexicalNode } from 'lexical'\n\nimport { $findMatchingParent } from '@lexical/utils'\nimport { $getSelection, $isRangeSelection } from 'lexical'\n\nimport type { ToolbarGroup } from '../toolbars/types.js'\nimport type { FeatureProviderProviderClient } from '../types.js'\nimport type { ExclusiveLinkCollectionsProps } from './feature.server.js'\nimport type { LinkFields } from './nodes/types.js'\n\nimport { LinkIcon } from '../../lexical/ui/icons/Link/index.js'\nimport { getSelectedNode } from '../../lexical/utils/getSelectedNode.js'\nimport { createClientComponent } from '../createClientComponent.js'\nimport { toolbarFeatureButtonsGroupWithItems } from '../shared/toolbar/featureButtonsGroup.js'\nimport { AutoLinkNode } from './nodes/AutoLinkNode.js'\nimport { $isLinkNode, LinkNode, TOGGLE_LINK_COMMAND } from './nodes/LinkNode.js'\nimport { AutoLinkPlugin } from './plugins/autoLink/index.js'\nimport { ClickableLinkPlugin } from './plugins/clickableLink/index.js'\nimport { TOGGLE_LINK_WITH_MODAL_COMMAND } from './plugins/floatingLinkEditor/LinkEditor/commands.js'\nimport { FloatingLinkEditorPlugin } from './plugins/floatingLinkEditor/index.js'\nimport { LinkPlugin } from './plugins/link/index.js'\n\nexport type ClientProps = ExclusiveLinkCollectionsProps\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarFeatureButtonsGroupWithItems([\n {\n ChildComponent: LinkIcon,\n isActive: ({ selection }) => {\n if ($isRangeSelection(selection)) {\n const selectedNode = getSelectedNode(selection)\n const linkParent = $findMatchingParent(selectedNode, $isLinkNode)\n return linkParent != null\n }\n return false\n },\n isEnabled: ({ selection }) => {\n return !!($isRangeSelection(selection) && $getSelection()?.getTextContent()?.length)\n },\n key: 'link',\n label:
|
|
1
|
+
{"version":3,"sources":["../../../../src/field/features/link/feature.client.tsx"],"sourcesContent":["'use client'\n\nimport type { LexicalNode } from 'lexical'\n\nimport { $findMatchingParent } from '@lexical/utils'\nimport { $getSelection, $isRangeSelection } from 'lexical'\n\nimport type { ToolbarGroup } from '../toolbars/types.js'\nimport type { FeatureProviderProviderClient } from '../types.js'\nimport type { ExclusiveLinkCollectionsProps } from './feature.server.js'\nimport type { LinkFields } from './nodes/types.js'\n\nimport { LinkIcon } from '../../lexical/ui/icons/Link/index.js'\nimport { getSelectedNode } from '../../lexical/utils/getSelectedNode.js'\nimport { createClientComponent } from '../createClientComponent.js'\nimport { toolbarFeatureButtonsGroupWithItems } from '../shared/toolbar/featureButtonsGroup.js'\nimport { LinkMarkdownTransformer } from './markdownTransformer.js'\nimport { AutoLinkNode } from './nodes/AutoLinkNode.js'\nimport { $isLinkNode, LinkNode, TOGGLE_LINK_COMMAND } from './nodes/LinkNode.js'\nimport { AutoLinkPlugin } from './plugins/autoLink/index.js'\nimport { ClickableLinkPlugin } from './plugins/clickableLink/index.js'\nimport { TOGGLE_LINK_WITH_MODAL_COMMAND } from './plugins/floatingLinkEditor/LinkEditor/commands.js'\nimport { FloatingLinkEditorPlugin } from './plugins/floatingLinkEditor/index.js'\nimport { LinkPlugin } from './plugins/link/index.js'\n\nexport type ClientProps = ExclusiveLinkCollectionsProps\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarFeatureButtonsGroupWithItems([\n {\n ChildComponent: LinkIcon,\n isActive: ({ selection }) => {\n if ($isRangeSelection(selection)) {\n const selectedNode = getSelectedNode(selection)\n const linkParent = $findMatchingParent(selectedNode, $isLinkNode)\n return linkParent != null\n }\n return false\n },\n isEnabled: ({ selection }) => {\n return !!($isRangeSelection(selection) && $getSelection()?.getTextContent()?.length)\n },\n key: 'link',\n label: ({ i18n }) => {\n return i18n.t('lexical:link:label')\n },\n onSelect: ({ editor, isActive }) => {\n if (!isActive) {\n let selectedText: string = null\n let selectedNodes: LexicalNode[] = []\n editor.getEditorState().read(() => {\n selectedText = $getSelection()?.getTextContent()\n // We need to selected nodes here before the drawer opens, as clicking around in the drawer may change the original selection\n selectedNodes = $getSelection()?.getNodes() ?? []\n })\n\n if (!selectedText?.length) {\n return\n }\n\n const linkFields: LinkFields = {\n doc: null,\n linkType: 'custom',\n newTab: false,\n url: 'https://',\n }\n\n editor.dispatchCommand(TOGGLE_LINK_WITH_MODAL_COMMAND, {\n fields: linkFields,\n selectedNodes,\n text: selectedText,\n })\n } else {\n // remove link\n editor.dispatchCommand(TOGGLE_LINK_COMMAND, null)\n }\n },\n order: 1,\n },\n ]),\n]\n\nconst LinkFeatureClient: FeatureProviderProviderClient<ClientProps> = (props) => {\n return {\n clientFeatureProps: props,\n feature: () => ({\n clientFeatureProps: props,\n markdownTransformers: [LinkMarkdownTransformer],\n nodes: [LinkNode, AutoLinkNode],\n plugins: [\n {\n Component: LinkPlugin,\n position: 'normal',\n },\n {\n Component: AutoLinkPlugin,\n position: 'normal',\n },\n {\n Component: ClickableLinkPlugin,\n position: 'normal',\n },\n {\n Component: FloatingLinkEditorPlugin,\n position: 'floatingAnchorElem',\n },\n ],\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n }),\n }\n}\n\nexport const LinkFeatureClientComponent = createClientComponent(LinkFeatureClient)\n"],"names":["$findMatchingParent","$getSelection","$isRangeSelection","LinkIcon","getSelectedNode","createClientComponent","toolbarFeatureButtonsGroupWithItems","LinkMarkdownTransformer","AutoLinkNode","$isLinkNode","LinkNode","TOGGLE_LINK_COMMAND","AutoLinkPlugin","ClickableLinkPlugin","TOGGLE_LINK_WITH_MODAL_COMMAND","FloatingLinkEditorPlugin","LinkPlugin","toolbarGroups","ChildComponent","isActive","selection","selectedNode","linkParent","isEnabled","getTextContent","length","key","label","i18n","t","onSelect","editor","selectedText","selectedNodes","getEditorState","read","getNodes","linkFields","doc","linkType","newTab","url","dispatchCommand","fields","text","order","LinkFeatureClient","props","clientFeatureProps","feature","markdownTransformers","nodes","plugins","Component","position","toolbarFixed","groups","toolbarInline","LinkFeatureClientComponent"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AAIA,SAASA,mBAAmB,QAAQ,iBAAgB;AACpD,SAASC,aAAa,EAAEC,iBAAiB,QAAQ,UAAS;AAO1D,SAASC,QAAQ,QAAQ,uCAAsC;AAC/D,SAASC,eAAe,QAAQ,yCAAwC;AACxE,SAASC,qBAAqB,QAAQ,8BAA6B;AACnE,SAASC,mCAAmC,QAAQ,2CAA0C;AAC9F,SAASC,uBAAuB,QAAQ,2BAA0B;AAClE,SAASC,YAAY,QAAQ,0BAAyB;AACtD,SAASC,WAAW,EAAEC,QAAQ,EAAEC,mBAAmB,QAAQ,sBAAqB;AAChF,SAASC,cAAc,QAAQ,8BAA6B;AAC5D,SAASC,mBAAmB,QAAQ,mCAAkC;AACtE,SAASC,8BAA8B,QAAQ,sDAAqD;AACpG,SAASC,wBAAwB,QAAQ,wCAAuC;AAChF,SAASC,UAAU,QAAQ,0BAAyB;AAIpD,MAAMC,gBAAgC;IACpCX,oCAAoC;QAClC;YACEY,gBAAgBf;YAChBgB,UAAU,CAAC,EAAEC,SAAS,EAAE;gBACtB,IAAIlB,kBAAkBkB,YAAY;oBAChC,MAAMC,eAAejB,gBAAgBgB;oBACrC,MAAME,aAAatB,oBAAoBqB,cAAcZ;oBACrD,OAAOa,cAAc;gBACvB;gBACA,OAAO;YACT;YACAC,WAAW,CAAC,EAAEH,SAAS,EAAE;gBACvB,OAAO,CAAC,CAAElB,CAAAA,kBAAkBkB,cAAcnB,iBAAiBuB,kBAAkBC,MAAK;YACpF;YACAC,KAAK;YACLC,OAAO,CAAC,EAAEC,IAAI,EAAE;gBACd,OAAOA,KAAKC,CAAC,CAAC;YAChB;YACAC,UAAU,CAAC,EAAEC,MAAM,EAAEZ,QAAQ,EAAE;gBAC7B,IAAI,CAACA,UAAU;oBACb,IAAIa,eAAuB;oBAC3B,IAAIC,gBAA+B,EAAE;oBACrCF,OAAOG,cAAc,GAAGC,IAAI,CAAC;wBAC3BH,eAAe/B,iBAAiBuB;wBAChC,6HAA6H;wBAC7HS,gBAAgBhC,iBAAiBmC,cAAc,EAAE;oBACnD;oBAEA,IAAI,CAACJ,cAAcP,QAAQ;wBACzB;oBACF;oBAEA,MAAMY,aAAyB;wBAC7BC,KAAK;wBACLC,UAAU;wBACVC,QAAQ;wBACRC,KAAK;oBACP;oBAEAV,OAAOW,eAAe,CAAC5B,gCAAgC;wBACrD6B,QAAQN;wBACRJ;wBACAW,MAAMZ;oBACR;gBACF,OAAO;oBACL,cAAc;oBACdD,OAAOW,eAAe,CAAC/B,qBAAqB;gBAC9C;YACF;YACAkC,OAAO;QACT;KACD;CACF;AAED,MAAMC,oBAAgE,CAACC;IACrE,OAAO;QACLC,oBAAoBD;QACpBE,SAAS,IAAO,CAAA;gBACdD,oBAAoBD;gBACpBG,sBAAsB;oBAAC3C;iBAAwB;gBAC/C4C,OAAO;oBAACzC;oBAAUF;iBAAa;gBAC/B4C,SAAS;oBACP;wBACEC,WAAWrC;wBACXsC,UAAU;oBACZ;oBACA;wBACED,WAAWzC;wBACX0C,UAAU;oBACZ;oBACA;wBACED,WAAWxC;wBACXyC,UAAU;oBACZ;oBACA;wBACED,WAAWtC;wBACXuC,UAAU;oBACZ;iBACD;gBACDC,cAAc;oBACZC,QAAQvC;gBACV;gBACAwC,eAAe;oBACbD,QAAQvC;gBACV;YACF,CAAA;IACF;AACF;AAEA,OAAO,MAAMyC,6BAA6BrD,sBAAsByC,mBAAkB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../../src/field/features/link/feature.server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAU,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAC7D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAM1C,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,aAAa,CAAA;AAChE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../../src/field/features/link/feature.server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAU,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAC7D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAM1C,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,aAAa,CAAA;AAChE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAatD,MAAM,MAAM,6BAA6B,GACrC;IACE;;;QAGI;IACJ,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAA;IAG9B,kBAAkB,CAAC,EAAE,KAAK,CAAA;CAC3B,GACD;IAEE,mBAAmB,CAAC,EAAE,KAAK,CAAA;IAE3B;;;QAGI;IACJ,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAA;CAC9B,CAAA;AAEL,MAAM,MAAM,sBAAsB,GAAG,6BAA6B,GAAG;IACnE;;;OAGG;IACH,MAAM,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE;QAAE,MAAM,EAAE,eAAe,CAAC;QAAC,aAAa,EAAE,KAAK,EAAE,CAAA;KAAE,KAAK,KAAK,EAAE,CAAC,GAAG,KAAK,EAAE,CAAA;IAC3F;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,6BAA6B,CAAC,sBAAsB,EAAE,WAAW,CAwI1F,CAAA"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { traverseFields } from '@payloadcms/
|
|
1
|
+
import { traverseFields } from '@payloadcms/ui/utilities/buildFieldSchemaMap/traverseFields';
|
|
2
2
|
import { sanitizeFields } from 'payload/config';
|
|
3
3
|
import { deepCopyObject } from 'payload/utilities';
|
|
4
4
|
import { convertLexicalNodesToHTML } from '../converters/html/converter/index.js';
|
|
5
5
|
import { createNode } from '../typeUtilities.js';
|
|
6
6
|
import { LinkFeatureClientComponent } from './feature.client.js';
|
|
7
|
+
import { i18n } from './i18n.js';
|
|
8
|
+
import { LinkMarkdownTransformer } from './markdownTransformer.js';
|
|
7
9
|
import { AutoLinkNode } from './nodes/AutoLinkNode.js';
|
|
8
10
|
import { LinkNode } from './nodes/LinkNode.js';
|
|
9
11
|
import { transformExtraFields } from './plugins/floatingLinkEditor/utilities.js';
|
|
@@ -47,6 +49,10 @@ export const LinkFeature = (props)=>{
|
|
|
47
49
|
});
|
|
48
50
|
return schemaMap;
|
|
49
51
|
},
|
|
52
|
+
i18n,
|
|
53
|
+
markdownTransformers: [
|
|
54
|
+
LinkMarkdownTransformer
|
|
55
|
+
],
|
|
50
56
|
nodes: [
|
|
51
57
|
createNode({
|
|
52
58
|
converters: {
|
|
@@ -62,11 +68,12 @@ export const LinkFeature = (props)=>{
|
|
|
62
68
|
payload
|
|
63
69
|
});
|
|
64
70
|
const rel = node.fields.newTab ? ' rel="noopener noreferrer"' : '';
|
|
71
|
+
const target = node.fields.newTab ? ' target="_blank"' : '';
|
|
65
72
|
let href = node.fields.url;
|
|
66
73
|
if (node.fields.linkType === 'internal') {
|
|
67
74
|
href = typeof node.fields.doc?.value === 'string' ? node.fields.doc?.value : node.fields.doc?.value?.id;
|
|
68
75
|
}
|
|
69
|
-
return `<a href="${href}"${rel}>${childrenText}</a>`;
|
|
76
|
+
return `<a href="${href}"${target}${rel}>${childrenText}</a>`;
|
|
70
77
|
},
|
|
71
78
|
nodeTypes: [
|
|
72
79
|
AutoLinkNode.getType()
|
|
@@ -102,8 +109,9 @@ export const LinkFeature = (props)=>{
|
|
|
102
109
|
payload
|
|
103
110
|
});
|
|
104
111
|
const rel = node.fields.newTab ? ' rel="noopener noreferrer"' : '';
|
|
112
|
+
const target = node.fields.newTab ? ' target="_blank"' : '';
|
|
105
113
|
const href = node.fields.linkType === 'custom' ? node.fields.url : node.fields.doc?.value;
|
|
106
|
-
return `<a href="${href}"${rel}>${childrenText}</a>`;
|
|
114
|
+
return `<a href="${href}"${target}${rel}>${childrenText}</a>`;
|
|
107
115
|
},
|
|
108
116
|
nodeTypes: [
|
|
109
117
|
LinkNode.getType()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/field/features/link/feature.server.ts"],"sourcesContent":["import type { Config, SanitizedConfig } from 'payload/config'\nimport type { Field } from 'payload/types'\n\nimport { traverseFields } from '@payloadcms/next/utilities'\nimport { sanitizeFields } from 'payload/config'\nimport { deepCopyObject } from 'payload/utilities'\n\nimport type { FeatureProviderProviderServer } from '../types.js'\nimport type { ClientProps } from './feature.client.js'\n\nimport { convertLexicalNodesToHTML } from '../converters/html/converter/index.js'\nimport { createNode } from '../typeUtilities.js'\nimport { LinkFeatureClientComponent } from './feature.client.js'\nimport { AutoLinkNode } from './nodes/AutoLinkNode.js'\nimport { LinkNode } from './nodes/LinkNode.js'\nimport { transformExtraFields } from './plugins/floatingLinkEditor/utilities.js'\nimport { linkPopulationPromiseHOC } from './populationPromise.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?: string[]\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?: string[]\n }\n\nexport type LinkFeatureServerProps = ExclusiveLinkCollectionsProps & {\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?: ((args: { config: SanitizedConfig; defaultFields: Field[] }) => Field[]) | 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}\n\nexport const LinkFeature: FeatureProviderProviderServer<LinkFeatureServerProps, ClientProps> = (\n props,\n) => {\n if (!props) {\n props = {}\n }\n return {\n feature: async ({ config: _config, isRoot }) => {\n const validRelationships = _config.collections.map((c) => c.slug) || []\n\n const _transformedFields = transformExtraFields(\n deepCopyObject(props.fields),\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 requireFieldLevelRichTextEditor: isRoot,\n validRelationships,\n })\n props.fields = sanitizedFields\n\n return {\n ClientComponent: LinkFeatureClientComponent,\n clientFeatureProps: {\n disabledCollections: props.disabledCollections,\n enabledCollections: props.enabledCollections,\n } as ExclusiveLinkCollectionsProps,\n generateSchemaMap: ({ config, i18n }) => {\n if (!sanitizedFields || !Array.isArray(sanitizedFields) || sanitizedFields.length === 0) {\n return null\n }\n\n const schemaMap = new Map<string, Field[]>()\n\n const validRelationships = config.collections.map((c) => c.slug) || []\n\n schemaMap.set('fields', sanitizedFields)\n\n traverseFields({\n config,\n fields: sanitizedFields,\n i18n,\n schemaMap,\n schemaPath: 'fields',\n validRelationships,\n })\n\n return schemaMap\n },\n nodes: [\n createNode({\n converters: {\n html: {\n converter: async ({ converters, node, parent, payload }) => {\n const childrenText = await convertLexicalNodesToHTML({\n converters,\n lexicalNodes: node.children,\n parent: {\n ...node,\n parent,\n },\n payload,\n })\n\n const rel: string = node.fields.newTab ? ' rel=\"noopener noreferrer\"' : ''\n\n let href: string = node.fields.url\n if (node.fields.linkType === 'internal') {\n href =\n typeof node.fields.doc?.value === 'string'\n ? node.fields.doc?.value\n : node.fields.doc?.value?.id\n }\n\n return `<a href=\"${href}\"${rel}>${childrenText}</a>`\n },\n nodeTypes: [AutoLinkNode.getType()],\n },\n },\n hooks: {\n afterRead: [\n ({ node }) => {\n return node\n },\n ],\n },\n node: AutoLinkNode,\n populationPromises: [linkPopulationPromiseHOC(props)],\n validations: [linkValidation(props)],\n }),\n createNode({\n converters: {\n html: {\n converter: async ({ converters, node, parent, payload }) => {\n const childrenText = await convertLexicalNodesToHTML({\n converters,\n lexicalNodes: node.children,\n parent: {\n ...node,\n parent,\n },\n payload,\n })\n\n const rel: string = node.fields.newTab ? ' rel=\"noopener noreferrer\"' : ''\n\n const href: string =\n node.fields.linkType === 'custom'\n ? node.fields.url\n : (node.fields.doc?.value as string)\n\n return `<a href=\"${href}\"${rel}>${childrenText}</a>`\n },\n nodeTypes: [LinkNode.getType()],\n },\n },\n node: LinkNode,\n populationPromises: [linkPopulationPromiseHOC(props)],\n validations: [linkValidation(props)],\n }),\n ],\n serverFeatureProps: props,\n }\n },\n key: 'link',\n serverFeatureProps: props,\n }\n}\n"],"names":["traverseFields","sanitizeFields","deepCopyObject","convertLexicalNodesToHTML","createNode","LinkFeatureClientComponent","AutoLinkNode","LinkNode","transformExtraFields","linkPopulationPromiseHOC","linkValidation","LinkFeature","props","feature","config","_config","isRoot","validRelationships","collections","map","c","slug","_transformedFields","fields","enabledCollections","disabledCollections","maxDepth","sanitizedFields","requireFieldLevelRichTextEditor","ClientComponent","clientFeatureProps","generateSchemaMap","i18n","Array","isArray","length","schemaMap","Map","set","schemaPath","nodes","converters","html","converter","node","parent","payload","childrenText","lexicalNodes","children","rel","newTab","href","url","linkType","doc","value","id","nodeTypes","getType","hooks","afterRead","populationPromises","validations","serverFeatureProps","key"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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O;oBACtC;oBACAR,WAAW;wBACTqC,YAAY;4BACVC,MAAM;gCACJC,WAAW,OAAO,EAAEF,UAAU,EAAEG,IAAI,EAAEC,MAAM,EAAEC,OAAO,EAAE;oCACrD,MAAMC,eAAe,MAAM5C,0BAA0B;wCACnDsC;wCACAO,cAAcJ,KAAKK,QAAQ;wCAC3BJ,QAAQ;4CACN,GAAGD,IAAI;4CACPC;wCACF;wCACAC;oCACF;oCAEA,MAAMI,MAAcN,KAAKrB,MAAM,CAAC4B,MAAM,GAAG,+BAA+B;oCAExE,MAAMC,OACJR,KAAKrB,MAAM,CAAC+B,QAAQ,KAAK,WACrBV,KAAKrB,MAAM,CAAC8B,GAAG,GACdT,KAAKrB,MAAM,CAACgC,GAAG,EAAEC;oCAExB,OAAO,CAAC,SAAS,EAAEJ,KAAK,CAAC,EAAEF,IAAI,CAAC,EAAEH,aAAa,IAAI,CAAC;gCACtD;gCACAW,WAAW;oCAACnD,SAASoD,OAAO;iCAAG;4BACjC;wBACF;wBACAf,MAAMrC;wBACNuD,oBAAoB;4BAACrD,yBAAyBG;yBAAO;wBACrDmD,aAAa;4BAACrD,eAAeE;yBAAO;oBACtC;iBACD;gBACDoD,oBAAoBpD;YACtB;QACF;QACAqD,KAAK;QACLD,oBAAoBpD;IACtB;AACF,EAAC"}
|
|
1
|
+
{"version":3,"sources":["../../../../src/field/features/link/feature.server.ts"],"sourcesContent":["import type { Config, SanitizedConfig } from 'payload/config'\nimport type { Field } from 'payload/types'\n\nimport { traverseFields } from '@payloadcms/ui/utilities/buildFieldSchemaMap/traverseFields'\nimport { sanitizeFields } from 'payload/config'\nimport { deepCopyObject } from 'payload/utilities'\n\nimport type { FeatureProviderProviderServer } from '../types.js'\nimport type { ClientProps } from './feature.client.js'\n\nimport { convertLexicalNodesToHTML } from '../converters/html/converter/index.js'\nimport { createNode } from '../typeUtilities.js'\nimport { LinkFeatureClientComponent } from './feature.client.js'\nimport { i18n } from './i18n.js'\nimport { LinkMarkdownTransformer } from './markdownTransformer.js'\nimport { AutoLinkNode } from './nodes/AutoLinkNode.js'\nimport { LinkNode } from './nodes/LinkNode.js'\nimport { transformExtraFields } from './plugins/floatingLinkEditor/utilities.js'\nimport { linkPopulationPromiseHOC } from './populationPromise.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?: string[]\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?: string[]\n }\n\nexport type LinkFeatureServerProps = ExclusiveLinkCollectionsProps & {\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?: ((args: { config: SanitizedConfig; defaultFields: Field[] }) => Field[]) | 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}\n\nexport const LinkFeature: FeatureProviderProviderServer<LinkFeatureServerProps, ClientProps> = (\n props,\n) => {\n if (!props) {\n props = {}\n }\n return {\n feature: async ({ config: _config, isRoot }) => {\n const validRelationships = _config.collections.map((c) => c.slug) || []\n\n const _transformedFields = transformExtraFields(\n deepCopyObject(props.fields),\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 requireFieldLevelRichTextEditor: isRoot,\n validRelationships,\n })\n props.fields = sanitizedFields\n\n return {\n ClientComponent: LinkFeatureClientComponent,\n clientFeatureProps: {\n disabledCollections: props.disabledCollections,\n enabledCollections: props.enabledCollections,\n } as ExclusiveLinkCollectionsProps,\n generateSchemaMap: ({ config, i18n }) => {\n if (!sanitizedFields || !Array.isArray(sanitizedFields) || sanitizedFields.length === 0) {\n return null\n }\n\n const schemaMap = new Map<string, Field[]>()\n\n const validRelationships = config.collections.map((c) => c.slug) || []\n\n schemaMap.set('fields', sanitizedFields)\n\n traverseFields({\n config,\n fields: sanitizedFields,\n i18n,\n schemaMap,\n schemaPath: 'fields',\n validRelationships,\n })\n\n return schemaMap\n },\n i18n,\n markdownTransformers: [LinkMarkdownTransformer],\n nodes: [\n createNode({\n converters: {\n html: {\n converter: async ({ converters, node, parent, payload }) => {\n const childrenText = await convertLexicalNodesToHTML({\n converters,\n lexicalNodes: node.children,\n parent: {\n ...node,\n parent,\n },\n payload,\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 === 'string'\n ? node.fields.doc?.value\n : node.fields.doc?.value?.id\n }\n\n return `<a href=\"${href}\"${target}${rel}>${childrenText}</a>`\n },\n nodeTypes: [AutoLinkNode.getType()],\n },\n },\n hooks: {\n afterRead: [\n ({ node }) => {\n return node\n },\n ],\n },\n node: AutoLinkNode,\n populationPromises: [linkPopulationPromiseHOC(props)],\n validations: [linkValidation(props)],\n }),\n createNode({\n converters: {\n html: {\n converter: async ({ converters, node, parent, payload }) => {\n const childrenText = await convertLexicalNodesToHTML({\n converters,\n lexicalNodes: node.children,\n parent: {\n ...node,\n parent,\n },\n payload,\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 ? 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 node: LinkNode,\n populationPromises: [linkPopulationPromiseHOC(props)],\n validations: [linkValidation(props)],\n }),\n ],\n serverFeatureProps: props,\n }\n },\n key: 'link',\n serverFeatureProps: props,\n }\n}\n"],"names":["traverseFields","sanitizeFields","deepCopyObject","convertLexicalNodesToHTML","createNode","LinkFeatureClientComponent","i18n","LinkMarkdownTransformer","AutoLinkNode","LinkNode","transformExtraFields","linkPopulationPromiseHOC","linkValidation","LinkFeature","props","feature","config","_config","isRoot","validRelationships","collections","map","c","slug","_transformedFields","fields","enabledCollections","disabledCollections","maxDepth","sanitizedFields","requireFieldLevelRichTextEditor","ClientComponent","clientFeatureProps","generateSchemaMap","Array","isArray","length","schemaMap","Map","set","schemaPath","markdownTransformers","nodes","converters","html","converter","node","parent","payload","childrenText","lexicalNodes","children","rel","newTab","target","href","url","linkType","doc","value","id","nodeTypes","getType","hooks","afterRead","populationPromises","validations","serverFeatureProps","key"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAGA,SAASA,cAAc,QAAQ,8DAA6D;AAC5F,SAASC,cAAc,QAAQ,iBAAgB;AAC/C,SAASC,cAAc,QAAQ,oBAAmB;AAKlD,SAASC,yBAAyB,QAAQ,wCAAuC;AACjF,SAASC,UAAU,QAAQ,sBAAqB;AAChD,SAASC,0BAA0B,QAAQ,sBAAqB;AAChE,SAASC,IAAI,QAAQ,YAAW;AAChC,SAASC,uBAAuB,QAAQ,2BAA0B;AAClE,SAASC,YAAY,QAAQ,0BAAyB;AACtD,SAASC,QAAQ,QAAQ,sBAAqB;AAC9C,SAASC,oBAAoB,QAAQ,4CAA2C;AAChF,SAASC,wBAAwB,QAAQ,yBAAwB;AACjE,SAASC,cAAc,QAA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G,+BAA+B;oCACxE,MAAMC,SAAiBR,KAAKrB,MAAM,CAAC4B,MAAM,GAAG,qBAAqB;oCAEjE,MAAME,OACJT,KAAKrB,MAAM,CAACgC,QAAQ,KAAK,WACrBX,KAAKrB,MAAM,CAAC+B,GAAG,GACdV,KAAKrB,MAAM,CAACiC,GAAG,EAAEC;oCAExB,OAAO,CAAC,SAAS,EAAEJ,KAAK,CAAC,EAAED,OAAO,EAAEF,IAAI,CAAC,EAAEH,aAAa,IAAI,CAAC;gCAC/D;gCACAY,WAAW;oCAACpD,SAASqD,OAAO;iCAAG;4BACjC;wBACF;wBACAhB,MAAMrC;wBACNwD,oBAAoB;4BAACtD,yBAAyBG;yBAAO;wBACrDoD,aAAa;4BAACtD,eAAeE;yBAAO;oBACtC;iBACD;gBACDqD,oBAAoBrD;YACtB;QACF;QACAsD,KAAK;QACLD,oBAAoBrD;IACtB;AACF,EAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../../../src/field/features/link/i18n.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAEhE,eAAO,MAAM,IAAI,EAAE,OAAO,CAAC,gBAAgB,CAiG1C,CAAA"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
export const i18n = {
|
|
2
|
+
ar: {
|
|
3
|
+
label: 'رابط'
|
|
4
|
+
},
|
|
5
|
+
az: {
|
|
6
|
+
label: 'Keçid'
|
|
7
|
+
},
|
|
8
|
+
bg: {
|
|
9
|
+
label: 'Връзка'
|
|
10
|
+
},
|
|
11
|
+
cs: {
|
|
12
|
+
label: 'Odkaz'
|
|
13
|
+
},
|
|
14
|
+
de: {
|
|
15
|
+
label: 'Verknüpfung'
|
|
16
|
+
},
|
|
17
|
+
en: {
|
|
18
|
+
label: 'Link'
|
|
19
|
+
},
|
|
20
|
+
es: {
|
|
21
|
+
label: 'Enlace'
|
|
22
|
+
},
|
|
23
|
+
fa: {
|
|
24
|
+
label: 'پیوند'
|
|
25
|
+
},
|
|
26
|
+
fr: {
|
|
27
|
+
label: 'Lien'
|
|
28
|
+
},
|
|
29
|
+
he: {
|
|
30
|
+
label: 'קישור'
|
|
31
|
+
},
|
|
32
|
+
hr: {
|
|
33
|
+
label: 'Poveznica'
|
|
34
|
+
},
|
|
35
|
+
hu: {
|
|
36
|
+
label: 'Hivatkozás'
|
|
37
|
+
},
|
|
38
|
+
it: {
|
|
39
|
+
label: 'Collegamento'
|
|
40
|
+
},
|
|
41
|
+
ja: {
|
|
42
|
+
label: 'リンク'
|
|
43
|
+
},
|
|
44
|
+
ko: {
|
|
45
|
+
label: '링크'
|
|
46
|
+
},
|
|
47
|
+
my: {
|
|
48
|
+
label: 'လင့်'
|
|
49
|
+
},
|
|
50
|
+
nb: {
|
|
51
|
+
label: 'Lenke'
|
|
52
|
+
},
|
|
53
|
+
nl: {
|
|
54
|
+
label: 'Link'
|
|
55
|
+
},
|
|
56
|
+
pl: {
|
|
57
|
+
label: 'Łącze'
|
|
58
|
+
},
|
|
59
|
+
pt: {
|
|
60
|
+
label: 'Ligação'
|
|
61
|
+
},
|
|
62
|
+
ro: {
|
|
63
|
+
label: 'Legătură'
|
|
64
|
+
},
|
|
65
|
+
rs: {
|
|
66
|
+
label: 'Veza'
|
|
67
|
+
},
|
|
68
|
+
'rs-latin': {
|
|
69
|
+
label: 'Veza'
|
|
70
|
+
},
|
|
71
|
+
ru: {
|
|
72
|
+
label: 'Ссылка'
|
|
73
|
+
},
|
|
74
|
+
sk: {
|
|
75
|
+
label: 'Odkaz'
|
|
76
|
+
},
|
|
77
|
+
sv: {
|
|
78
|
+
label: 'Länk'
|
|
79
|
+
},
|
|
80
|
+
th: {
|
|
81
|
+
label: 'ลิงค์'
|
|
82
|
+
},
|
|
83
|
+
tr: {
|
|
84
|
+
label: 'Bağlantı'
|
|
85
|
+
},
|
|
86
|
+
uk: {
|
|
87
|
+
label: 'Посилання'
|
|
88
|
+
},
|
|
89
|
+
vi: {
|
|
90
|
+
label: 'Liên kết'
|
|
91
|
+
},
|
|
92
|
+
zh: {
|
|
93
|
+
label: '链接'
|
|
94
|
+
},
|
|
95
|
+
'zh-TW': {
|
|
96
|
+
label: '連結'
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
//# sourceMappingURL=i18n.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/field/features/link/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"],"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"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAEA,OAAO,MAAMA,OAAkC;IAC7CC,IAAI;QACFC,OAAO;IACT;IACAC,IAAI;QACFD,OAAO;IACT;IACAE,IAAI;QACFF,OAAO;IACT;IACAG,IAAI;QACFH,OAAO;IACT;IACAI,IAAI;QACFJ,OAAO;IACT;IACAK,IAAI;QACFL,OAAO;IACT;IACAM,IAAI;QACFN,OAAO;IACT;IACAO,IAAI;QACFP,OAAO;IACT;IACAQ,IAAI;QACFR,OAAO;IACT;IACAS,IAAI;QACFT,OAAO;IACT;IACAU,IAAI;QACFV,OAAO;IACT;IACAW,IAAI;QACFX,OAAO;IACT;IACAY,IAAI;QACFZ,OAAO;IACT;IACAa,IAAI;QACFb,OAAO;IACT;IACAc,IAAI;QACFd,OAAO;IACT;IACAe,IAAI;QACFf,OAAO;IACT;IACAgB,IAAI;QACFhB,OAAO;IACT;IACAiB,IAAI;QACFjB,OAAO;IACT;IACAkB,IAAI;QACFlB,OAAO;IACT;IACAmB,IAAI;QACFnB,OAAO;IACT;IACAoB,IAAI;QACFpB,OAAO;IACT;IACAqB,IAAI;QACFrB,OAAO;IACT;IACA,YAAY;QACVA,OAAO;IACT;IACAsB,IAAI;QACFtB,OAAO;IACT;IACAuB,IAAI;QACFvB,OAAO;IACT;IACAwB,IAAI;QACFxB,OAAO;IACT;IACAyB,IAAI;QACFzB,OAAO;IACT;IACA0B,IAAI;QACF1B,OAAO;IACT;IACA2B,IAAI;QACF3B,OAAO;IACT;IACA4B,IAAI;QACF5B,OAAO;IACT;IACA6B,IAAI;QACF7B,OAAO;IACT;IACA,SAAS;QACPA,OAAO;IACT;AACF,EAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Code taken from https://github.com/facebook/lexical/blob/main/packages/lexical-markdown/src/MarkdownTransformers.ts#L357
|
|
3
|
+
*/
|
|
4
|
+
import type { TextMatchTransformer } from '@lexical/markdown';
|
|
5
|
+
export declare const LinkMarkdownTransformer: TextMatchTransformer;
|
|
6
|
+
//# sourceMappingURL=markdownTransformer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markdownTransformer.d.ts","sourceRoot":"","sources":["../../../../src/field/features/link/markdownTransformer.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AAO7D,eAAO,MAAM,uBAAuB,EAAE,oBAqCrC,CAAA"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Code taken from https://github.com/facebook/lexical/blob/main/packages/lexical-markdown/src/MarkdownTransformers.ts#L357
|
|
3
|
+
*/ // Order of text transformers matters:
|
|
4
|
+
//
|
|
5
|
+
// - code should go first as it prevents any transformations inside
|
|
6
|
+
import { $createTextNode, $isTextNode } from 'lexical';
|
|
7
|
+
import { $createLinkNode, $isLinkNode, LinkNode } from './nodes/LinkNode.js';
|
|
8
|
+
// - then longer tags match (e.g. ** or __ should go before * or _)
|
|
9
|
+
export const LinkMarkdownTransformer = {
|
|
10
|
+
type: 'text-match',
|
|
11
|
+
dependencies: [
|
|
12
|
+
LinkNode
|
|
13
|
+
],
|
|
14
|
+
export: (_node, exportChildren, exportFormat)=>{
|
|
15
|
+
if (!$isLinkNode(_node)) {
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
const node = _node;
|
|
19
|
+
const { url } = node.getFields();
|
|
20
|
+
const linkContent = `[${node.getTextContent()}](${url})`;
|
|
21
|
+
const firstChild = node.getFirstChild();
|
|
22
|
+
// Add text styles only if link has single text node inside. If it's more
|
|
23
|
+
// then one we ignore it as markdown does not support nested styles for links
|
|
24
|
+
if (node.getChildrenSize() === 1 && $isTextNode(firstChild)) {
|
|
25
|
+
return exportFormat(firstChild, linkContent);
|
|
26
|
+
} else {
|
|
27
|
+
return linkContent;
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
importRegExp: /\[([^[]+)\]\(([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?\)/,
|
|
31
|
+
regExp: /\[([^[]+)\]\(([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?\)$/,
|
|
32
|
+
replace: (textNode, match)=>{
|
|
33
|
+
const [, linkText, linkUrl] = match;
|
|
34
|
+
const linkNode = $createLinkNode({
|
|
35
|
+
fields: {
|
|
36
|
+
doc: null,
|
|
37
|
+
linkType: 'custom',
|
|
38
|
+
newTab: false,
|
|
39
|
+
url: linkUrl
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
const linkTextNode = $createTextNode(linkText);
|
|
43
|
+
linkTextNode.setFormat(textNode.getFormat());
|
|
44
|
+
linkNode.append(linkTextNode);
|
|
45
|
+
textNode.replace(linkNode);
|
|
46
|
+
},
|
|
47
|
+
trigger: ')'
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
//# sourceMappingURL=markdownTransformer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/field/features/link/markdownTransformer.ts"],"sourcesContent":["/**\n * Code taken from https://github.com/facebook/lexical/blob/main/packages/lexical-markdown/src/MarkdownTransformers.ts#L357\n */\n\n// Order of text transformers matters:\n//\n// - code should go first as it prevents any transformations inside\n\nimport type { TextMatchTransformer } from '@lexical/markdown'\n\nimport { $createTextNode, $isTextNode } from 'lexical'\n\nimport { $createLinkNode, $isLinkNode, LinkNode } from './nodes/LinkNode.js'\n\n// - then longer tags match (e.g. ** or __ should go before * or _)\nexport const LinkMarkdownTransformer: TextMatchTransformer = {\n type: 'text-match',\n dependencies: [LinkNode],\n export: (_node, exportChildren, exportFormat) => {\n if (!$isLinkNode(_node)) {\n return null\n }\n const node: LinkNode = _node\n const { url } = node.getFields()\n const linkContent = `[${node.getTextContent()}](${url})`\n const firstChild = node.getFirstChild()\n // Add text styles only if link has single text node inside. If it's more\n // then one we ignore it as markdown does not support nested styles for links\n if (node.getChildrenSize() === 1 && $isTextNode(firstChild)) {\n return exportFormat(firstChild, linkContent)\n } else {\n return linkContent\n }\n },\n importRegExp: /\\[([^[]+)\\]\\(([^()\\s]+)(?:\\s\"((?:[^\"]*\\\\\")*[^\"]*)\"\\s*)?\\)/,\n regExp: /\\[([^[]+)\\]\\(([^()\\s]+)(?:\\s\"((?:[^\"]*\\\\\")*[^\"]*)\"\\s*)?\\)$/,\n replace: (textNode, match) => {\n const [, linkText, linkUrl] = match\n const linkNode = $createLinkNode({\n fields: {\n doc: null,\n linkType: 'custom',\n newTab: false,\n url: linkUrl,\n },\n })\n const linkTextNode = $createTextNode(linkText)\n linkTextNode.setFormat(textNode.getFormat())\n linkNode.append(linkTextNode)\n textNode.replace(linkNode)\n },\n trigger: ')',\n}\n"],"names":["$createTextNode","$isTextNode","$createLinkNode","$isLinkNode","LinkNode","LinkMarkdownTransformer","type","dependencies","export","_node","exportChildren","exportFormat","node","url","getFields","linkContent","getTextContent","firstChild","getFirstChild","getChildrenSize","importRegExp","regExp","replace","textNode","match","linkText","linkUrl","linkNode","fields","doc","linkType","newTab","linkTextNode","setFormat","getFormat","append","trigger"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;;CAEC,GAED,sCAAsC;AACtC,EAAE;AACF,mEAAmE;AAInE,SAASA,eAAe,EAAEC,WAAW,QAAQ,UAAS;AAEtD,SAASC,eAAe,EAAEC,WAAW,EAAEC,QAAQ,QAAQ,sBAAqB;AAE5E,mEAAmE;AACnE,OAAO,MAAMC,0BAAgD;IAC3DC,MAAM;IACNC,cAAc;QAACH;KAAS;IACxBI,QAAQ,CAACC,OAAOC,gBAAgBC;QAC9B,IAAI,CAACR,YAAYM,QAAQ;YACvB,OAAO;QACT;QACA,MAAMG,OAAiBH;QACvB,MAAM,EAAEI,GAAG,EAAE,GAAGD,KAAKE,SAAS;QAC9B,MAAMC,cAAc,CAAC,CAAC,EAAEH,KAAKI,cAAc,GAAG,EAAE,EAAEH,IAAI,CAAC,CAAC;QACxD,MAAMI,aAAaL,KAAKM,aAAa;QACrC,yEAAyE;QACzE,6EAA6E;QAC7E,IAAIN,KAAKO,eAAe,OAAO,KAAKlB,YAAYgB,aAAa;YAC3D,OAAON,aAAaM,YAAYF;QAClC,OAAO;YACL,OAAOA;QACT;IACF;IACAK,cAAc;IACdC,QAAQ;IACRC,SAAS,CAACC,UAAUC;QAClB,MAAM,GAAGC,UAAUC,QAAQ,GAAGF;QAC9B,MAAMG,WAAWzB,gBAAgB;YAC/B0B,QAAQ;gBACNC,KAAK;gBACLC,UAAU;gBACVC,QAAQ;gBACRlB,KAAKa;YACP;QACF;QACA,MAAMM,eAAehC,gBAAgByB;QACrCO,aAAaC,SAAS,CAACV,SAASW,SAAS;QACzCP,SAASQ,MAAM,CAACH;QAChBT,SAASD,OAAO,CAACK;IACnB;IACAS,SAAS;AACX,EAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/field/features/link/populationPromise.ts"],"sourcesContent":["import type { PopulationPromise } from '../types.js'\nimport type { LinkFeatureServerProps } from './feature.server.js'\nimport type { SerializedLinkNode } from './nodes/types.js'\n\nimport { recurseNestedFields } from '../../../populate/recurseNestedFields.js'\n\nexport const linkPopulationPromiseHOC = (\n props: LinkFeatureServerProps,\n): PopulationPromise<SerializedLinkNode> => {\n return ({\n context,\n currentDepth,\n depth,\n draft,\n editorPopulationPromises,\n fieldPromises,\n findMany,\n flattenLocales,\n node,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n }) => {\n if (!props.fields?.length) {\n return\n }\n\n /**\n * Should populate all fields, including the doc field (for internal links), as it's treated like a normal field\n */\n if (Array.isArray(props.fields)) {\n recurseNestedFields({\n context,\n currentDepth,\n data: node.fields,\n depth,\n draft,\n editorPopulationPromises,\n fieldPromises,\n fields: props.fields,\n findMany,\n flattenLocales
|
|
1
|
+
{"version":3,"sources":["../../../../src/field/features/link/populationPromise.ts"],"sourcesContent":["import type { PopulationPromise } from '../types.js'\nimport type { LinkFeatureServerProps } from './feature.server.js'\nimport type { SerializedLinkNode } from './nodes/types.js'\n\nimport { recurseNestedFields } from '../../../populate/recurseNestedFields.js'\n\nexport const linkPopulationPromiseHOC = (\n props: LinkFeatureServerProps,\n): PopulationPromise<SerializedLinkNode> => {\n return ({\n context,\n currentDepth,\n depth,\n draft,\n editorPopulationPromises,\n fieldPromises,\n findMany,\n flattenLocales,\n node,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n }) => {\n if (!props.fields?.length) {\n return\n }\n\n /**\n * Should populate all fields, including the doc field (for internal links), as it's treated like a normal field\n */\n if (Array.isArray(props.fields)) {\n recurseNestedFields({\n context,\n currentDepth,\n data: node.fields,\n depth,\n draft,\n editorPopulationPromises,\n fieldPromises,\n fields: props.fields,\n findMany,\n flattenLocales: false, // Disable localization handling which does not work properly yet. Once we fully support hooks, this can be enabled (pass through flattenLocales again)\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc: node.fields,\n })\n }\n }\n}\n"],"names":["recurseNestedFields","linkPopulationPromiseHOC","props","context","currentDepth","depth","draft","editorPopulationPromises","fieldPromises","findMany","flattenLocales","node","overrideAccess","populationPromises","req","showHiddenFields","fields","length","Array","isArray","data","siblingDoc"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAIA,SAASA,mBAAmB,QAAQ,2CAA0C;AAE9E,OAAO,MAAMC,2BAA2B,CACtCC;IAEA,OAAO,CAAC,EACNC,OAAO,EACPC,YAAY,EACZC,KAAK,EACLC,KAAK,EACLC,wBAAwB,EACxBC,aAAa,EACbC,QAAQ,EACRC,cAAc,EACdC,IAAI,EACJC,cAAc,EACdC,kBAAkB,EAClBC,GAAG,EACHC,gBAAgB,EACjB;QACC,IAAI,CAACb,MAAMc,MAAM,EAAEC,QAAQ;YACzB;QACF;QAEA;;KAEC,GACD,IAAIC,MAAMC,OAAO,CAACjB,MAAMc,MAAM,GAAG;YAC/BhB,oBAAoB;gBAClBG;gBACAC;gBACAgB,MAAMT,KAAKK,MAAM;gBACjBX;gBACAC;gBACAC;gBACAC;gBACAQ,QAAQd,MAAMc,MAAM;gBACpBP;gBACAC,gBAAgB;gBAChBE;gBACAC;gBACAC;gBACAC;gBACAM,YAAYV,KAAKK,MAAM;YACzB;QACF;IACF;AACF,EAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/lists/checklist/feature.client.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/lists/checklist/feature.client.tsx"],"names":[],"mappings":";AA8GA,eAAO,MAAM,+BAA+B;;;EAAgD,CAAA"}
|
|
@@ -5,6 +5,7 @@ import { ChecklistIcon } from '../../../lexical/ui/icons/Checklist/index.js';
|
|
|
5
5
|
import { createClientComponent } from '../../createClientComponent.js';
|
|
6
6
|
import { toolbarTextDropdownGroupWithItems } from '../../shared/toolbar/textDropdownGroup.js';
|
|
7
7
|
import { LexicalListPlugin } from '../plugin/index.js';
|
|
8
|
+
import { slashMenuListGroupWithItems } from '../shared/slashMenuListGroup.js';
|
|
8
9
|
import { CHECK_LIST } from './markdownTransformers.js';
|
|
9
10
|
import { LexicalCheckListPlugin } from './plugin/index.js';
|
|
10
11
|
const toolbarGroups = [
|
|
@@ -33,7 +34,9 @@ const toolbarGroups = [
|
|
|
33
34
|
return true;
|
|
34
35
|
},
|
|
35
36
|
key: 'checklist',
|
|
36
|
-
label:
|
|
37
|
+
label: ({ i18n })=>{
|
|
38
|
+
return i18n.t('lexical:checklist:label');
|
|
39
|
+
},
|
|
37
40
|
onSelect: ({ editor })=>{
|
|
38
41
|
editor.dispatchCommand(INSERT_CHECK_LIST_COMMAND, undefined);
|
|
39
42
|
},
|
|
@@ -69,26 +72,24 @@ const ChecklistFeatureClient = (props)=>{
|
|
|
69
72
|
plugins,
|
|
70
73
|
slashMenu: {
|
|
71
74
|
groups: [
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
75
|
+
slashMenuListGroupWithItems([
|
|
76
|
+
{
|
|
77
|
+
Icon: ChecklistIcon,
|
|
78
|
+
key: 'checklist',
|
|
79
|
+
keywords: [
|
|
80
|
+
'check list',
|
|
81
|
+
'check',
|
|
82
|
+
'checklist',
|
|
83
|
+
'cl'
|
|
84
|
+
],
|
|
85
|
+
label: ({ i18n })=>{
|
|
86
|
+
return i18n.t('lexical:checklist:label');
|
|
87
|
+
},
|
|
88
|
+
onSelect: ({ editor })=>{
|
|
89
|
+
editor.dispatchCommand(INSERT_CHECK_LIST_COMMAND, undefined);
|
|
87
90
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
label: 'Lists'
|
|
91
|
-
}
|
|
91
|
+
}
|
|
92
|
+
])
|
|
92
93
|
]
|
|
93
94
|
},
|
|
94
95
|
toolbarFixed: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/field/features/lists/checklist/feature.client.tsx"],"sourcesContent":["'use client'\nimport { $isListNode, INSERT_CHECK_LIST_COMMAND, ListItemNode, ListNode } from '@lexical/list'\nimport { $isRangeSelection } from 'lexical'\n\nimport type { ToolbarGroup } from '../../toolbars/types.js'\nimport type { ClientFeature, FeatureProviderProviderClient } from '../../types.js'\n\nimport { ChecklistIcon } from '../../../lexical/ui/icons/Checklist/index.js'\nimport { createClientComponent } from '../../createClientComponent.js'\nimport { toolbarTextDropdownGroupWithItems } from '../../shared/toolbar/textDropdownGroup.js'\nimport { LexicalListPlugin } from '../plugin/index.js'\nimport { CHECK_LIST } from './markdownTransformers.js'\nimport { LexicalCheckListPlugin } from './plugin/index.js'\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarTextDropdownGroupWithItems([\n {\n ChildComponent: ChecklistIcon,\n isActive: ({ selection }) => {\n if (!$isRangeSelection(selection)) {\n return false\n }\n for (const node of selection.getNodes()) {\n if ($isListNode(node) && node.getListType() === 'check') {\n continue\n }\n\n const parent = node.getParent()\n\n if ($isListNode(parent) && parent.getListType() === 'check') {\n continue\n }\n\n const parentParent = parent?.getParent()\n // Example scenario: Node = textNode, parent = listItemNode, parentParent = listNode\n if ($isListNode(parentParent) && parentParent.getListType() === 'check') {\n continue\n }\n\n return false\n }\n return true\n },\n key: 'checklist',\n label:
|
|
1
|
+
{"version":3,"sources":["../../../../../src/field/features/lists/checklist/feature.client.tsx"],"sourcesContent":["'use client'\nimport { $isListNode, INSERT_CHECK_LIST_COMMAND, ListItemNode, ListNode } from '@lexical/list'\nimport { $isRangeSelection } from 'lexical'\n\nimport type { ToolbarGroup } from '../../toolbars/types.js'\nimport type { ClientFeature, FeatureProviderProviderClient } from '../../types.js'\n\nimport { ChecklistIcon } from '../../../lexical/ui/icons/Checklist/index.js'\nimport { createClientComponent } from '../../createClientComponent.js'\nimport { toolbarTextDropdownGroupWithItems } from '../../shared/toolbar/textDropdownGroup.js'\nimport { LexicalListPlugin } from '../plugin/index.js'\nimport { slashMenuListGroupWithItems } from '../shared/slashMenuListGroup.js'\nimport { CHECK_LIST } from './markdownTransformers.js'\nimport { LexicalCheckListPlugin } from './plugin/index.js'\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarTextDropdownGroupWithItems([\n {\n ChildComponent: ChecklistIcon,\n isActive: ({ selection }) => {\n if (!$isRangeSelection(selection)) {\n return false\n }\n for (const node of selection.getNodes()) {\n if ($isListNode(node) && node.getListType() === 'check') {\n continue\n }\n\n const parent = node.getParent()\n\n if ($isListNode(parent) && parent.getListType() === 'check') {\n continue\n }\n\n const parentParent = parent?.getParent()\n // Example scenario: Node = textNode, parent = listItemNode, parentParent = listNode\n if ($isListNode(parentParent) && parentParent.getListType() === 'check') {\n continue\n }\n\n return false\n }\n return true\n },\n key: 'checklist',\n label: ({ i18n }) => {\n return i18n.t('lexical:checklist:label')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_CHECK_LIST_COMMAND, undefined)\n },\n order: 12,\n },\n ]),\n]\n\nconst ChecklistFeatureClient: FeatureProviderProviderClient<undefined> = (props) => {\n return {\n clientFeatureProps: props,\n feature: ({ featureProviderMap }) => {\n const plugins: ClientFeature<undefined>['plugins'] = [\n {\n Component: LexicalCheckListPlugin,\n position: 'normal',\n },\n ]\n\n if (!featureProviderMap.has('unorderedList') && !featureProviderMap.has('orderedList')) {\n plugins.push({\n Component: LexicalListPlugin,\n position: 'normal',\n })\n }\n\n return {\n clientFeatureProps: props,\n markdownTransformers: [CHECK_LIST],\n nodes:\n featureProviderMap.has('unorderedList') || featureProviderMap.has('orderedList')\n ? []\n : [ListNode, ListItemNode],\n plugins,\n slashMenu: {\n groups: [\n slashMenuListGroupWithItems([\n {\n Icon: ChecklistIcon,\n key: 'checklist',\n keywords: ['check list', 'check', 'checklist', 'cl'],\n label: ({ i18n }) => {\n return i18n.t('lexical:checklist:label')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_CHECK_LIST_COMMAND, undefined)\n },\n },\n ]),\n ],\n },\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n }\n },\n }\n}\n\nexport const ChecklistFeatureClientComponent = createClientComponent(ChecklistFeatureClient)\n"],"names":["$isListNode","INSERT_CHECK_LIST_COMMAND","ListItemNode","ListNode","$isRangeSelection","ChecklistIcon","createClientComponent","toolbarTextDropdownGroupWithItems","LexicalListPlugin","slashMenuListGroupWithItems","CHECK_LIST","LexicalCheckListPlugin","toolbarGroups","ChildComponent","isActive","selection","node","getNodes","getListType","parent","getParent","parentParent","key","label","i18n","t","onSelect","editor","dispatchCommand","undefined","order","ChecklistFeatureClient","props","clientFeatureProps","feature","featureProviderMap","plugins","Component","position","has","push","markdownTransformers","nodes","slashMenu","groups","Icon","keywords","toolbarFixed","toolbarInline","ChecklistFeatureClientComponent"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AACA,SAASA,WAAW,EAAEC,yBAAyB,EAAEC,YAAY,EAAEC,QAAQ,QAAQ,gBAAe;AAC9F,SAASC,iBAAiB,QAAQ,UAAS;AAK3C,SAASC,aAAa,QAAQ,+CAA8C;AAC5E,SAASC,qBAAqB,QAAQ,iCAAgC;AACtE,SAASC,iCAAiC,QAAQ,4CAA2C;AAC7F,SAASC,iBAAiB,QAAQ,qBAAoB;AACtD,SAASC,2BAA2B,QAAQ,kCAAiC;AAC7E,SAASC,UAAU,QAAQ,4BAA2B;AACtD,SAASC,sBAAsB,QAAQ,oBAAmB;AAE1D,MAAMC,gBAAgC;IACpCL,kCAAkC;QAChC;YACEM,gBAAgBR;YAChBS,UAAU,CAAC,EAAEC,SAAS,EAAE;gBACtB,IAAI,CAACX,kBAAkBW,YAAY;oBACjC,OAAO;gBACT;gBACA,KAAK,MAAMC,QAAQD,UAAUE,QAAQ,GAAI;oBACvC,IAAIjB,YAAYgB,SAASA,KAAKE,WAAW,OAAO,SAAS;wBACvD;oBACF;oBAEA,MAAMC,SAASH,KAAKI,SAAS;oBAE7B,IAAIpB,YAAYmB,WAAWA,OAAOD,WAAW,OAAO,SAAS;wBAC3D;oBACF;oBAEA,MAAMG,eAAeF,QAAQC;oBAC7B,oFAAoF;oBACpF,IAAIpB,YAAYqB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AAkC3C,sBAAsByB,wBAAuB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/lists/checklist/feature.server.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/lists/checklist/feature.server.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,gBAAgB,CAAA;AAQnE,eAAO,MAAM,gBAAgB,EAAE,6BAA6B,CAAC,SAAS,EAAE,SAAS,CA8BhF,CAAA"}
|
|
@@ -2,12 +2,14 @@ import { ListItemNode, ListNode } from '@lexical/list';
|
|
|
2
2
|
import { createNode } from '../../typeUtilities.js';
|
|
3
3
|
import { ListHTMLConverter, ListItemHTMLConverter } from '../htmlConverter.js';
|
|
4
4
|
import { ChecklistFeatureClientComponent } from './feature.client.js';
|
|
5
|
+
import { i18n } from './i18n.js';
|
|
5
6
|
import { CHECK_LIST } from './markdownTransformers.js';
|
|
6
7
|
export const ChecklistFeature = (props)=>{
|
|
7
8
|
return {
|
|
8
9
|
feature: ({ featureProviderMap })=>{
|
|
9
10
|
return {
|
|
10
11
|
ClientComponent: ChecklistFeatureClientComponent,
|
|
12
|
+
i18n,
|
|
11
13
|
markdownTransformers: [
|
|
12
14
|
CHECK_LIST
|
|
13
15
|
],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/field/features/lists/checklist/feature.server.ts"],"sourcesContent":["import { ListItemNode, ListNode } from '@lexical/list'\n\nimport type { FeatureProviderProviderServer } from '../../types.js'\n\nimport { createNode } from '../../typeUtilities.js'\nimport { ListHTMLConverter, ListItemHTMLConverter } from '../htmlConverter.js'\nimport { ChecklistFeatureClientComponent } from './feature.client.js'\nimport { CHECK_LIST } from './markdownTransformers.js'\n\nexport const ChecklistFeature: FeatureProviderProviderServer<undefined, undefined> = (props) => {\n return {\n feature: ({ featureProviderMap }) => {\n return {\n ClientComponent: ChecklistFeatureClientComponent,\n markdownTransformers: [CHECK_LIST],\n nodes:\n featureProviderMap.has('unorderedList') || featureProviderMap.has('orderedList')\n ? []\n : [\n createNode({\n converters: {\n html: ListHTMLConverter,\n },\n node: ListNode,\n }),\n createNode({\n converters: {\n html: ListItemHTMLConverter,\n },\n node: ListItemNode,\n }),\n ],\n serverFeatureProps: props,\n }\n },\n key: 'checklist',\n serverFeatureProps: props,\n }\n}\n"],"names":["ListItemNode","ListNode","createNode","ListHTMLConverter","ListItemHTMLConverter","ChecklistFeatureClientComponent","CHECK_LIST","ChecklistFeature","props","feature","featureProviderMap","ClientComponent","markdownTransformers","nodes","has","converters","html","node","serverFeatureProps","key"],"rangeMappings":"
|
|
1
|
+
{"version":3,"sources":["../../../../../src/field/features/lists/checklist/feature.server.ts"],"sourcesContent":["import { ListItemNode, ListNode } from '@lexical/list'\n\nimport type { FeatureProviderProviderServer } from '../../types.js'\n\nimport { createNode } from '../../typeUtilities.js'\nimport { ListHTMLConverter, ListItemHTMLConverter } from '../htmlConverter.js'\nimport { ChecklistFeatureClientComponent } from './feature.client.js'\nimport { i18n } from './i18n.js'\nimport { CHECK_LIST } from './markdownTransformers.js'\n\nexport const ChecklistFeature: FeatureProviderProviderServer<undefined, undefined> = (props) => {\n return {\n feature: ({ featureProviderMap }) => {\n return {\n ClientComponent: ChecklistFeatureClientComponent,\n i18n,\n markdownTransformers: [CHECK_LIST],\n nodes:\n featureProviderMap.has('unorderedList') || featureProviderMap.has('orderedList')\n ? []\n : [\n createNode({\n converters: {\n html: ListHTMLConverter,\n },\n node: ListNode,\n }),\n createNode({\n converters: {\n html: ListItemHTMLConverter,\n },\n node: ListItemNode,\n }),\n ],\n serverFeatureProps: props,\n }\n },\n key: 'checklist',\n serverFeatureProps: props,\n }\n}\n"],"names":["ListItemNode","ListNode","createNode","ListHTMLConverter","ListItemHTMLConverter","ChecklistFeatureClientComponent","i18n","CHECK_LIST","ChecklistFeature","props","feature","featureProviderMap","ClientComponent","markdownTransformers","nodes","has","converters","html","node","serverFeatureProps","key"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,YAAY,EAAEC,QAAQ,QAAQ,gBAAe;AAItD,SAASC,UAAU,QAAQ,yBAAwB;AACnD,SAASC,iBAAiB,EAAEC,qBAAqB,QAAQ,sBAAqB;AAC9E,SAASC,+BAA+B,QAAQ,sBAAqB;AACrE,SAASC,IAAI,QAAQ,YAAW;AAChC,SAASC,UAAU,QAAQ,4BAA2B;AAEtD,OAAO,MAAMC,mBAAwE,CAACC;IACpF,OAAO;QACLC,SAAS,CAAC,EAAEC,kBAAkB,EAAE;YAC9B,OAAO;gBACLC,iBAAiBP;gBACjBC;gBACAO,sBAAsB;oBAACN;iBAAW;gBAClCO,OACEH,mBAAmBI,GAAG,CAAC,oBAAoBJ,mBAAmBI,GAAG,CAAC,iBAC9D,EAAE,GACF;oBACEb,WAAW;wBACTc,YAAY;4BACVC,MAAMd;wBACR;wBACAe,MAAMjB;oBACR;oBACAC,WAAW;wBACTc,YAAY;4BACVC,MAAMb;wBACR;wBACAc,MAAMlB;oBACR;iBACD;gBACPmB,oBAAoBV;YACtB;QACF;QACAW,KAAK;QACLD,oBAAoBV;IACtB;AACF,EAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/lists/checklist/i18n.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAEhE,eAAO,MAAM,IAAI,EAAE,OAAO,CAAC,gBAAgB,CAiG1C,CAAA"}
|