@payloadcms/richtext-lexical 3.68.0-internal-debug.185cc5f → 3.68.0-internal-debug.dafc24d
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/cell/rscEntry.js +13 -5
- package/dist/cell/rscEntry.js.map +1 -1
- package/dist/features/blocks/client/component/BlockContent.js +29 -9
- package/dist/features/blocks/client/component/BlockContent.js.map +1 -1
- package/dist/features/blocks/client/component/components/BlockCollapsible.js +7 -3
- package/dist/features/blocks/client/component/components/BlockCollapsible.js.map +1 -1
- package/dist/features/blocks/client/component/components/BlockEditButton.js +6 -2
- package/dist/features/blocks/client/component/components/BlockEditButton.js.map +1 -1
- package/dist/features/blocks/client/component/components/BlockRemoveButton.js +6 -2
- package/dist/features/blocks/client/component/components/BlockRemoveButton.js.map +1 -1
- package/dist/features/blocks/client/component/index.js +123 -43
- package/dist/features/blocks/client/component/index.js.map +1 -1
- package/dist/features/blocks/client/component/index.scss +188 -0
- package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.js +7 -3
- package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.js.map +1 -1
- package/dist/features/blocks/client/componentInline/components/InlineBlockEditButton.js +6 -2
- package/dist/features/blocks/client/componentInline/components/InlineBlockEditButton.js.map +1 -1
- package/dist/features/blocks/client/componentInline/components/InlineBlockLabel.js +6 -2
- package/dist/features/blocks/client/componentInline/components/InlineBlockLabel.js.map +1 -1
- package/dist/features/blocks/client/componentInline/components/InlineBlockRemoveButton.js +6 -2
- package/dist/features/blocks/client/componentInline/components/InlineBlockRemoveButton.js.map +1 -1
- package/dist/features/blocks/client/componentInline/index.js +117 -37
- package/dist/features/blocks/client/componentInline/index.js.map +1 -1
- package/dist/features/blocks/client/componentInline/index.scss +90 -0
- package/dist/features/blocks/client/getBlockImageComponent.js +7 -3
- package/dist/features/blocks/client/getBlockImageComponent.js.map +1 -1
- package/dist/features/blocks/client/nodes/BlocksNode.js +7 -3
- package/dist/features/blocks/client/nodes/BlocksNode.js.map +1 -1
- package/dist/features/blocks/client/nodes/InlineBlocksNode.js +7 -3
- package/dist/features/blocks/client/nodes/InlineBlocksNode.js.map +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/Block.js +87 -27
- package/dist/features/blocks/premade/CodeBlock/Component/Block.js.map +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/Code.js +7 -3
- package/dist/features/blocks/premade/CodeBlock/Component/Code.js.map +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.js +12 -4
- package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.js.map +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.scss +6 -0
- package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.js +18 -6
- package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.js.map +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.scss +29 -0
- package/dist/features/blocks/premade/CodeBlock/Component/index.scss +97 -0
- package/dist/features/converters/lexicalToJSX/Component/index.js +9 -5
- package/dist/features/converters/lexicalToJSX/Component/index.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.js +7 -3
- package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/heading.js +7 -3
- package/dist/features/converters/lexicalToJSX/converter/converters/heading.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.js +6 -2
- package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.js +6 -2
- package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/link.js +13 -5
- package/dist/features/converters/lexicalToJSX/converter/converters/link.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/list.js +38 -14
- package/dist/features/converters/lexicalToJSX/converter/converters/list.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.js +18 -6
- package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/table.js +31 -11
- package/dist/features/converters/lexicalToJSX/converter/converters/table.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/text.js +43 -15
- package/dist/features/converters/lexicalToJSX/converter/converters/text.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/upload.js +31 -11
- package/dist/features/converters/lexicalToJSX/converter/converters/upload.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/index.js +8 -4
- package/dist/features/converters/lexicalToJSX/converter/index.js.map +1 -1
- package/dist/features/debug/jsxConverter/client/plugin/index.js +13 -5
- package/dist/features/debug/jsxConverter/client/plugin/index.js.map +1 -1
- package/dist/features/debug/jsxConverter/client/plugin/style.scss +12 -0
- package/dist/features/debug/testRecorder/client/plugin/index.js +61 -21
- package/dist/features/debug/testRecorder/client/plugin/index.js.map +1 -1
- package/dist/features/debug/testRecorder/client/plugin/index.scss +53 -0
- package/dist/features/debug/treeView/client/plugin/index.js +7 -3
- package/dist/features/debug/treeView/client/plugin/index.js.map +1 -1
- package/dist/features/debug/treeView/client/plugin/index.scss +80 -0
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js +224 -72
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js.map +1 -1
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.scss +87 -0
- package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js +31 -11
- package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js.map +1 -1
- package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.scss +11 -0
- package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js +21 -9
- package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js.map +1 -1
- package/dist/features/experimental_table/client/plugins/TablePlugin/index.js +25 -9
- package/dist/features/experimental_table/client/plugins/TablePlugin/index.js.map +1 -1
- package/dist/features/experimental_table/client/plugins/TablePlugin/index.scss +233 -0
- package/dist/features/horizontalRule/client/plugin/index.scss +23 -0
- package/dist/features/indent/client/IndentPlugin.js +6 -2
- package/dist/features/indent/client/IndentPlugin.js.map +1 -1
- package/dist/features/link/client/plugins/clickableLink/index.js +6 -2
- package/dist/features/link/client/plugins/clickableLink/index.js.map +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +76 -24
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/index.js +7 -3
- package/dist/features/link/client/plugins/floatingLinkEditor/index.js.map +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/index.scss +92 -0
- package/dist/features/lists/checklist/client/plugin/index.js +6 -2
- package/dist/features/lists/checklist/client/plugin/index.js.map +1 -1
- package/dist/features/lists/plugin/index.js +6 -2
- package/dist/features/lists/plugin/index.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js +13 -5
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js +7 -3
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.scss +16 -0
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js +13 -5
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js +7 -3
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.scss +16 -0
- package/dist/features/relationship/client/components/RelationshipComponent.js +55 -19
- package/dist/features/relationship/client/components/RelationshipComponent.js.map +1 -1
- package/dist/features/relationship/client/components/index.scss +95 -0
- package/dist/features/relationship/client/drawer/index.js +18 -6
- package/dist/features/relationship/client/drawer/index.js.map +1 -1
- package/dist/features/relationship/client/nodes/RelationshipNode.js +7 -3
- package/dist/features/relationship/client/nodes/RelationshipNode.js.map +1 -1
- package/dist/features/relationship/client/plugins/index.js +7 -3
- package/dist/features/relationship/client/plugins/index.js.map +1 -1
- package/dist/features/textState/feature.client.js +18 -6
- package/dist/features/textState/feature.client.js.map +1 -1
- package/dist/features/toolbars/fixed/client/Toolbar/index.js +71 -23
- package/dist/features/toolbars/fixed/client/Toolbar/index.js.map +1 -1
- package/dist/features/toolbars/fixed/client/Toolbar/index.scss +113 -0
- package/dist/features/toolbars/inline/client/Toolbar/index.js +71 -23
- package/dist/features/toolbars/inline/client/Toolbar/index.js.map +1 -1
- package/dist/features/toolbars/inline/client/Toolbar/index.scss +58 -0
- package/dist/features/toolbars/shared/ToolbarButton/index.js +7 -3
- package/dist/features/toolbars/shared/ToolbarButton/index.js.map +1 -1
- package/dist/features/toolbars/shared/ToolbarButton/index.scss +46 -0
- package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js +60 -20
- package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/index.js +36 -12
- package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/index.scss +129 -0
- package/dist/features/upload/client/component/index.js +91 -31
- package/dist/features/upload/client/component/index.js.map +1 -1
- package/dist/features/upload/client/component/index.scss +191 -0
- package/dist/features/upload/client/component/pending/index.js +13 -5
- package/dist/features/upload/client/component/pending/index.js.map +1 -1
- package/dist/features/upload/client/drawer/index.js +18 -6
- package/dist/features/upload/client/drawer/index.js.map +1 -1
- package/dist/features/upload/client/nodes/UploadNode.js +12 -4
- package/dist/features/upload/client/nodes/UploadNode.js.map +1 -1
- package/dist/features/upload/client/plugin/index.js +7 -3
- package/dist/features/upload/client/plugin/index.js.map +1 -1
- package/dist/field/Diff/converters/listitem/index.js +36 -12
- package/dist/field/Diff/converters/listitem/index.js.map +1 -1
- package/dist/field/Diff/converters/listitem/index.scss +47 -0
- package/dist/field/Diff/converters/relationship/index.js +36 -12
- package/dist/field/Diff/converters/relationship/index.js.map +1 -1
- package/dist/field/Diff/converters/relationship/index.scss +73 -0
- package/dist/field/Diff/converters/unknown/index.js +30 -10
- package/dist/field/Diff/converters/unknown/index.js.map +1 -1
- package/dist/field/Diff/converters/unknown/index.scss +40 -0
- package/dist/field/Diff/converters/upload/index.js +59 -19
- package/dist/field/Diff/converters/upload/index.js.map +1 -1
- package/dist/field/Diff/converters/upload/index.scss +115 -0
- package/dist/field/Diff/index.js +7 -3
- package/dist/field/Diff/index.js.map +1 -1
- package/dist/field/Diff/index.scss +102 -0
- package/dist/field/Field.js +79 -27
- package/dist/field/Field.js.map +1 -1
- package/dist/field/RenderLexical/index.js +36 -12
- package/dist/field/RenderLexical/index.js.map +1 -1
- package/dist/field/index.js +19 -7
- package/dist/field/index.js.map +1 -1
- package/dist/field/index.scss +41 -0
- package/dist/field/rscEntry.js +7 -3
- package/dist/field/rscEntry.js.map +1 -1
- package/dist/lexical/EditorPlugin.js +13 -5
- package/dist/lexical/EditorPlugin.js.map +1 -1
- package/dist/lexical/LexicalEditor.js +162 -50
- package/dist/lexical/LexicalEditor.js.map +1 -1
- package/dist/lexical/LexicalEditor.scss +54 -0
- package/dist/lexical/LexicalProvider.js +49 -17
- package/dist/lexical/LexicalProvider.js.map +1 -1
- package/dist/lexical/config/client/EditorConfigProvider.js +7 -3
- package/dist/lexical/config/client/EditorConfigProvider.js.map +1 -1
- package/dist/lexical/plugins/DecoratorPlugin/index.scss +13 -0
- package/dist/lexical/plugins/InsertParagraphAtEnd/index.js +19 -7
- package/dist/lexical/plugins/InsertParagraphAtEnd/index.js.map +1 -1
- package/dist/lexical/plugins/InsertParagraphAtEnd/index.scss +54 -0
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js +7 -3
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js.map +1 -1
- package/dist/lexical/plugins/SlashMenu/index.js +48 -16
- package/dist/lexical/plugins/SlashMenu/index.js.map +1 -1
- package/dist/lexical/plugins/SlashMenu/index.scss +68 -0
- package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js +19 -7
- package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
- package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.scss +35 -0
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +31 -11
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.scss +80 -0
- package/dist/lexical/theme/EditorTheme.scss +357 -0
- package/dist/lexical/ui/ContentEditable.js +13 -5
- package/dist/lexical/ui/ContentEditable.js.map +1 -1
- package/dist/lexical/ui/ContentEditable.scss +105 -0
- package/dist/lexical/ui/icons/AI/index.js +37 -13
- package/dist/lexical/ui/icons/AI/index.js.map +1 -1
- package/dist/lexical/ui/icons/Add/index.js +19 -7
- package/dist/lexical/ui/icons/Add/index.js.map +1 -1
- package/dist/lexical/ui/icons/AlignCenter/index.js +25 -9
- package/dist/lexical/ui/icons/AlignCenter/index.js.map +1 -1
- package/dist/lexical/ui/icons/AlignJustify/index.js +25 -9
- package/dist/lexical/ui/icons/AlignJustify/index.js.map +1 -1
- package/dist/lexical/ui/icons/AlignLeft/index.js +25 -9
- package/dist/lexical/ui/icons/AlignLeft/index.js.map +1 -1
- package/dist/lexical/ui/icons/AlignRight/index.js +25 -9
- package/dist/lexical/ui/icons/AlignRight/index.js.map +1 -1
- package/dist/lexical/ui/icons/Block/index.js +25 -9
- package/dist/lexical/ui/icons/Block/index.js.map +1 -1
- package/dist/lexical/ui/icons/Blockquote/index.js +13 -5
- package/dist/lexical/ui/icons/Blockquote/index.js.map +1 -1
- package/dist/lexical/ui/icons/Bold/index.js +13 -5
- package/dist/lexical/ui/icons/Bold/index.js.map +1 -1
- package/dist/lexical/ui/icons/Checklist/index.js +19 -7
- package/dist/lexical/ui/icons/Checklist/index.js.map +1 -1
- package/dist/lexical/ui/icons/Code/index.js +19 -7
- package/dist/lexical/ui/icons/Code/index.js.map +1 -1
- package/dist/lexical/ui/icons/CodeBlock/index.js +13 -5
- package/dist/lexical/ui/icons/CodeBlock/index.js.map +1 -1
- package/dist/lexical/ui/icons/Collapse/index.js +13 -5
- package/dist/lexical/ui/icons/Collapse/index.js.map +1 -1
- package/dist/lexical/ui/icons/H1/index.js +13 -5
- package/dist/lexical/ui/icons/H1/index.js.map +1 -1
- package/dist/lexical/ui/icons/H2/index.js +13 -5
- package/dist/lexical/ui/icons/H2/index.js.map +1 -1
- package/dist/lexical/ui/icons/H3/index.js +13 -5
- package/dist/lexical/ui/icons/H3/index.js.map +1 -1
- package/dist/lexical/ui/icons/H4/index.js +13 -5
- package/dist/lexical/ui/icons/H4/index.js.map +1 -1
- package/dist/lexical/ui/icons/H5/index.js +13 -5
- package/dist/lexical/ui/icons/H5/index.js.map +1 -1
- package/dist/lexical/ui/icons/H6/index.js +13 -5
- package/dist/lexical/ui/icons/H6/index.js.map +1 -1
- package/dist/lexical/ui/icons/HorizontalRule/index.js +13 -5
- package/dist/lexical/ui/icons/HorizontalRule/index.js.map +1 -1
- package/dist/lexical/ui/icons/IndentDecrease/index.js +31 -11
- package/dist/lexical/ui/icons/IndentDecrease/index.js.map +1 -1
- package/dist/lexical/ui/icons/IndentIncrease/index.js +31 -11
- package/dist/lexical/ui/icons/IndentIncrease/index.js.map +1 -1
- package/dist/lexical/ui/icons/InlineBlocks/index.js +13 -5
- package/dist/lexical/ui/icons/InlineBlocks/index.js.map +1 -1
- package/dist/lexical/ui/icons/Italic/index.js +13 -5
- package/dist/lexical/ui/icons/Italic/index.js.map +1 -1
- package/dist/lexical/ui/icons/Link/index.js +13 -5
- package/dist/lexical/ui/icons/Link/index.js.map +1 -1
- package/dist/lexical/ui/icons/Meatballs/index.js +25 -9
- package/dist/lexical/ui/icons/Meatballs/index.js.map +1 -1
- package/dist/lexical/ui/icons/OrderedList/index.js +37 -13
- package/dist/lexical/ui/icons/OrderedList/index.js.map +1 -1
- package/dist/lexical/ui/icons/Relationship/index.js +37 -13
- package/dist/lexical/ui/icons/Relationship/index.js.map +1 -1
- package/dist/lexical/ui/icons/Strikethrough/index.js +19 -7
- package/dist/lexical/ui/icons/Strikethrough/index.js.map +1 -1
- package/dist/lexical/ui/icons/Subscript/index.js +13 -5
- package/dist/lexical/ui/icons/Subscript/index.js.map +1 -1
- package/dist/lexical/ui/icons/Superscript/index.js +13 -5
- package/dist/lexical/ui/icons/Superscript/index.js.map +1 -1
- package/dist/lexical/ui/icons/Table/index.js +13 -5
- package/dist/lexical/ui/icons/Table/index.js.map +1 -1
- package/dist/lexical/ui/icons/Text/index.js +13 -5
- package/dist/lexical/ui/icons/Text/index.js.map +1 -1
- package/dist/lexical/ui/icons/TextState/index.js +7 -3
- package/dist/lexical/ui/icons/TextState/index.js.map +1 -1
- package/dist/lexical/ui/icons/Underline/index.js +19 -7
- package/dist/lexical/ui/icons/Underline/index.js.map +1 -1
- package/dist/lexical/ui/icons/UnorderedList/index.js +43 -15
- package/dist/lexical/ui/icons/UnorderedList/index.js.map +1 -1
- package/dist/lexical/ui/icons/Upload/index.js +25 -9
- package/dist/lexical/ui/icons/Upload/index.js.map +1 -1
- package/dist/utilities/fieldsDrawer/Drawer.js +19 -7
- package/dist/utilities/fieldsDrawer/Drawer.js.map +1 -1
- package/dist/utilities/fieldsDrawer/DrawerContent.js +19 -7
- package/dist/utilities/fieldsDrawer/DrawerContent.js.map +1 -1
- package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js +7 -3
- package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js.map +1 -1
- package/dist/utilities/fieldsDrawer/useLexicalListDrawer.js +7 -3
- package/dist/utilities/fieldsDrawer/useLexicalListDrawer.js.map +1 -1
- package/package.json +9 -8
|
@@ -1,21 +1,29 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
2
|
+
import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
|
|
3
3
|
import React from 'react';
|
|
4
4
|
export const TableIcon = ()=>{
|
|
5
|
-
return /*#__PURE__*/
|
|
5
|
+
return /*#__PURE__*/ _jsxDEV("svg", {
|
|
6
6
|
className: "icon",
|
|
7
7
|
fill: "none",
|
|
8
8
|
height: "20",
|
|
9
9
|
viewBox: "0 0 20 20",
|
|
10
10
|
width: "20",
|
|
11
11
|
xmlns: "http://www.w3.org/2000/svg",
|
|
12
|
-
children: /*#__PURE__*/
|
|
12
|
+
children: /*#__PURE__*/ _jsxDEV("path", {
|
|
13
13
|
clipRule: "evenodd",
|
|
14
14
|
d: "M5.33333 4.5C4.8731 4.5 4.5 4.8731 4.5 5.33333V7.5H9.5V4.5H5.33333ZM5.33333 3.5C4.32081 3.5 3.5 4.32081 3.5 5.33333V14.6667C3.5 15.6792 4.32081 16.5 5.33333 16.5H14.6667C15.6792 16.5 16.5 15.6792 16.5 14.6667V5.33333C16.5 4.32081 15.6792 3.5 14.6667 3.5H5.33333ZM10.5 4.5V7.5H15.5V5.33333C15.5 4.8731 15.1269 4.5 14.6667 4.5H10.5ZM15.5 8.5H10.5V11.5H15.5V8.5ZM15.5 12.5H10.5V15.5H14.6667C15.1269 15.5 15.5 15.1269 15.5 14.6667V12.5ZM9.5 15.5V12.5H4.5V14.6667C4.5 15.1269 4.8731 15.5 5.33333 15.5H9.5ZM4.5 11.5H9.5V8.5H4.5V11.5Z",
|
|
15
15
|
fill: "currentColor",
|
|
16
16
|
fillRule: "evenodd"
|
|
17
|
-
}
|
|
18
|
-
|
|
17
|
+
}, void 0, false, {
|
|
18
|
+
fileName: "src/lexical/ui/icons/Table/index.tsx",
|
|
19
|
+
lineNumber: 14,
|
|
20
|
+
columnNumber: 7
|
|
21
|
+
}, this)
|
|
22
|
+
}, void 0, false, {
|
|
23
|
+
fileName: "src/lexical/ui/icons/Table/index.tsx",
|
|
24
|
+
lineNumber: 6,
|
|
25
|
+
columnNumber: 5
|
|
26
|
+
}, this);
|
|
19
27
|
};
|
|
20
28
|
|
|
21
29
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/lexical/ui/icons/Table/index.tsx"],"sourcesContent":["'use client'\nimport React from 'react'\n\nexport const TableIcon: React.FC = () => {\n return (\n <svg\n className=\"icon\"\n fill=\"none\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n clipRule=\"evenodd\"\n d=\"M5.33333 4.5C4.8731 4.5 4.5 4.8731 4.5 5.33333V7.5H9.5V4.5H5.33333ZM5.33333 3.5C4.32081 3.5 3.5 4.32081 3.5 5.33333V14.6667C3.5 15.6792 4.32081 16.5 5.33333 16.5H14.6667C15.6792 16.5 16.5 15.6792 16.5 14.6667V5.33333C16.5 4.32081 15.6792 3.5 14.6667 3.5H5.33333ZM10.5 4.5V7.5H15.5V5.33333C15.5 4.8731 15.1269 4.5 14.6667 4.5H10.5ZM15.5 8.5H10.5V11.5H15.5V8.5ZM15.5 12.5H10.5V15.5H14.6667C15.1269 15.5 15.5 15.1269 15.5 14.6667V12.5ZM9.5 15.5V12.5H4.5V14.6667C4.5 15.1269 4.8731 15.5 5.33333 15.5H9.5ZM4.5 11.5H9.5V8.5H4.5V11.5Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n )\n}\n"],"names":["React","TableIcon","svg","className","fill","height","viewBox","width","xmlns","path","clipRule","d","fillRule"],"mappings":"AAAA;;AACA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,YAAsB;IACjC,qBACE,
|
|
1
|
+
{"version":3,"sources":["../../../../../src/lexical/ui/icons/Table/index.tsx"],"sourcesContent":["'use client'\nimport React from 'react'\n\nexport const TableIcon: React.FC = () => {\n return (\n <svg\n className=\"icon\"\n fill=\"none\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n clipRule=\"evenodd\"\n d=\"M5.33333 4.5C4.8731 4.5 4.5 4.8731 4.5 5.33333V7.5H9.5V4.5H5.33333ZM5.33333 3.5C4.32081 3.5 3.5 4.32081 3.5 5.33333V14.6667C3.5 15.6792 4.32081 16.5 5.33333 16.5H14.6667C15.6792 16.5 16.5 15.6792 16.5 14.6667V5.33333C16.5 4.32081 15.6792 3.5 14.6667 3.5H5.33333ZM10.5 4.5V7.5H15.5V5.33333C15.5 4.8731 15.1269 4.5 14.6667 4.5H10.5ZM15.5 8.5H10.5V11.5H15.5V8.5ZM15.5 12.5H10.5V15.5H14.6667C15.1269 15.5 15.5 15.1269 15.5 14.6667V12.5ZM9.5 15.5V12.5H4.5V14.6667C4.5 15.1269 4.8731 15.5 5.33333 15.5H9.5ZM4.5 11.5H9.5V8.5H4.5V11.5Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n )\n}\n"],"names":["React","TableIcon","svg","className","fill","height","viewBox","width","xmlns","path","clipRule","d","fillRule"],"mappings":"AAAA;;AACA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,YAAsB;IACjC,qBACE,QAACC;QACCC,WAAU;QACVC,MAAK;QACLC,QAAO;QACPC,SAAQ;QACRC,OAAM;QACNC,OAAM;kBAEN,cAAA,QAACC;YACCC,UAAS;YACTC,GAAE;YACFP,MAAK;YACLQ,UAAS;;;;;;;;;;;AAIjB,EAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
2
|
+
import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
|
|
3
3
|
import React from 'react';
|
|
4
|
-
export const TextIcon = ()=>/*#__PURE__*/
|
|
4
|
+
export const TextIcon = ()=>/*#__PURE__*/ _jsxDEV("svg", {
|
|
5
5
|
"aria-hidden": "true",
|
|
6
6
|
className: "icon",
|
|
7
7
|
fill: "currentColor",
|
|
@@ -10,10 +10,18 @@ export const TextIcon = ()=>/*#__PURE__*/ _jsx("svg", {
|
|
|
10
10
|
viewBox: "0 0 20 20",
|
|
11
11
|
width: "20",
|
|
12
12
|
xmlns: "http://www.w3.org/2000/svg",
|
|
13
|
-
children: /*#__PURE__*/
|
|
13
|
+
children: /*#__PURE__*/ _jsxDEV("path", {
|
|
14
14
|
d: "M11.708 14.5H7.79785V13.9414H8.01367C9.00391 13.9414 9.15625 13.9033 9.15625 13.6113V6.70508H8.07715C6.82031 6.70508 6.73145 7.08594 6.28711 8.67285H5.80469L5.91895 6.12109H13.5869L13.7012 8.67285H13.2188C12.7744 7.08594 12.6855 6.70508 11.4287 6.70508H10.3496V13.6113C10.3496 13.9033 10.502 13.9414 11.4922 13.9414H11.708V14.5Z",
|
|
15
15
|
fill: "currentColor"
|
|
16
|
-
}
|
|
17
|
-
|
|
16
|
+
}, void 0, false, {
|
|
17
|
+
fileName: "src/lexical/ui/icons/Text/index.tsx",
|
|
18
|
+
lineNumber: 15,
|
|
19
|
+
columnNumber: 5
|
|
20
|
+
}, this)
|
|
21
|
+
}, void 0, false, {
|
|
22
|
+
fileName: "src/lexical/ui/icons/Text/index.tsx",
|
|
23
|
+
lineNumber: 5,
|
|
24
|
+
columnNumber: 3
|
|
25
|
+
}, this);
|
|
18
26
|
|
|
19
27
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/lexical/ui/icons/Text/index.tsx"],"sourcesContent":["'use client'\nimport React from 'react'\n\nexport const TextIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"currentColor\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M11.708 14.5H7.79785V13.9414H8.01367C9.00391 13.9414 9.15625 13.9033 9.15625 13.6113V6.70508H8.07715C6.82031 6.70508 6.73145 7.08594 6.28711 8.67285H5.80469L5.91895 6.12109H13.5869L13.7012 8.67285H13.2188C12.7744 7.08594 12.6855 6.70508 11.4287 6.70508H10.3496V13.6113C10.3496 13.9033 10.502 13.9414 11.4922 13.9414H11.708V14.5Z\"\n fill=\"currentColor\"\n />\n </svg>\n)\n"],"names":["React","TextIcon","svg","aria-hidden","className","fill","focusable","height","viewBox","width","xmlns","path","d"],"mappings":"AAAA;;AACA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,WAAqB,kBAChC,
|
|
1
|
+
{"version":3,"sources":["../../../../../src/lexical/ui/icons/Text/index.tsx"],"sourcesContent":["'use client'\nimport React from 'react'\n\nexport const TextIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"currentColor\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M11.708 14.5H7.79785V13.9414H8.01367C9.00391 13.9414 9.15625 13.9033 9.15625 13.6113V6.70508H8.07715C6.82031 6.70508 6.73145 7.08594 6.28711 8.67285H5.80469L5.91895 6.12109H13.5869L13.7012 8.67285H13.2188C12.7744 7.08594 12.6855 6.70508 11.4287 6.70508H10.3496V13.6113C10.3496 13.9033 10.502 13.9414 11.4922 13.9414H11.708V14.5Z\"\n fill=\"currentColor\"\n />\n </svg>\n)\n"],"names":["React","TextIcon","svg","aria-hidden","className","fill","focusable","height","viewBox","width","xmlns","path","d"],"mappings":"AAAA;;AACA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,WAAqB,kBAChC,QAACC;QACCC,eAAY;QACZC,WAAU;QACVC,MAAK;QACLC,WAAU;QACVC,QAAO;QACPC,SAAQ;QACRC,OAAM;QACNC,OAAM;kBAEN,cAAA,QAACC;YACCC,GAAE;YACFP,MAAK;;;;;;;;;;aAGV"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
|
|
2
2
|
function kebabToCamelCase(str) {
|
|
3
3
|
return str.replace(/-([a-z])/g, (_, letter)=>letter.toUpperCase());
|
|
4
4
|
}
|
|
@@ -7,7 +7,7 @@ export const TextStateIcon = ({ css })=>{
|
|
|
7
7
|
kebabToCamelCase(key),
|
|
8
8
|
value
|
|
9
9
|
])) : {};
|
|
10
|
-
return /*#__PURE__*/
|
|
10
|
+
return /*#__PURE__*/ _jsxDEV("span", {
|
|
11
11
|
style: {
|
|
12
12
|
...convertedCss,
|
|
13
13
|
alignItems: 'center',
|
|
@@ -19,7 +19,11 @@ export const TextStateIcon = ({ css })=>{
|
|
|
19
19
|
width: '20px'
|
|
20
20
|
},
|
|
21
21
|
children: "A"
|
|
22
|
-
}
|
|
22
|
+
}, void 0, false, {
|
|
23
|
+
fileName: "src/lexical/ui/icons/TextState/index.tsx",
|
|
24
|
+
lineNumber: 15,
|
|
25
|
+
columnNumber: 5
|
|
26
|
+
}, this);
|
|
23
27
|
};
|
|
24
28
|
|
|
25
29
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/lexical/ui/icons/TextState/index.tsx"],"sourcesContent":["import type { StyleObject } from '../../../../features/textState/feature.server.js'\n\nfunction kebabToCamelCase(str: string): string {\n return str.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase())\n}\n\nexport const TextStateIcon: React.FC<{\n css?: StyleObject\n}> = ({ css }) => {\n const convertedCss = css\n ? Object.fromEntries(Object.entries(css).map(([key, value]) => [kebabToCamelCase(key), value]))\n : {}\n\n return (\n <span\n style={{\n ...convertedCss,\n alignItems: 'center',\n borderRadius: '4px',\n display: 'flex',\n fontSize: '16px',\n height: '20px',\n justifyContent: 'center',\n width: '20px',\n }}\n >\n A\n </span>\n )\n}\n"],"names":["kebabToCamelCase","str","replace","_","letter","toUpperCase","TextStateIcon","css","convertedCss","Object","fromEntries","entries","map","key","value","span","style","alignItems","borderRadius","display","fontSize","height","justifyContent","width"],"mappings":";AAEA,SAASA,iBAAiBC,GAAW;IACnC,OAAOA,IAAIC,OAAO,CAAC,aAAa,CAACC,GAAGC,SAAWA,OAAOC,WAAW;AACnE;AAEA,OAAO,MAAMC,gBAER,CAAC,EAAEC,GAAG,EAAE;IACX,MAAMC,eAAeD,MACjBE,OAAOC,WAAW,CAACD,OAAOE,OAAO,CAACJ,KAAKK,GAAG,CAAC,CAAC,CAACC,KAAKC,MAAM,GAAK;YAACd,iBAAiBa;YAAMC;SAAM,KAC3F,CAAC;IAEL,qBACE,
|
|
1
|
+
{"version":3,"sources":["../../../../../src/lexical/ui/icons/TextState/index.tsx"],"sourcesContent":["import type { StyleObject } from '../../../../features/textState/feature.server.js'\n\nfunction kebabToCamelCase(str: string): string {\n return str.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase())\n}\n\nexport const TextStateIcon: React.FC<{\n css?: StyleObject\n}> = ({ css }) => {\n const convertedCss = css\n ? Object.fromEntries(Object.entries(css).map(([key, value]) => [kebabToCamelCase(key), value]))\n : {}\n\n return (\n <span\n style={{\n ...convertedCss,\n alignItems: 'center',\n borderRadius: '4px',\n display: 'flex',\n fontSize: '16px',\n height: '20px',\n justifyContent: 'center',\n width: '20px',\n }}\n >\n A\n </span>\n )\n}\n"],"names":["kebabToCamelCase","str","replace","_","letter","toUpperCase","TextStateIcon","css","convertedCss","Object","fromEntries","entries","map","key","value","span","style","alignItems","borderRadius","display","fontSize","height","justifyContent","width"],"mappings":";AAEA,SAASA,iBAAiBC,GAAW;IACnC,OAAOA,IAAIC,OAAO,CAAC,aAAa,CAACC,GAAGC,SAAWA,OAAOC,WAAW;AACnE;AAEA,OAAO,MAAMC,gBAER,CAAC,EAAEC,GAAG,EAAE;IACX,MAAMC,eAAeD,MACjBE,OAAOC,WAAW,CAACD,OAAOE,OAAO,CAACJ,KAAKK,GAAG,CAAC,CAAC,CAACC,KAAKC,MAAM,GAAK;YAACd,iBAAiBa;YAAMC;SAAM,KAC3F,CAAC;IAEL,qBACE,QAACC;QACCC,OAAO;YACL,GAAGR,YAAY;YACfS,YAAY;YACZC,cAAc;YACdC,SAAS;YACTC,UAAU;YACVC,QAAQ;YACRC,gBAAgB;YAChBC,OAAO;QACT;kBACD;;;;;;AAIL,EAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
2
|
+
import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
|
|
3
3
|
import React from 'react';
|
|
4
|
-
export const UnderlineIcon = ()=>/*#__PURE__*/
|
|
4
|
+
export const UnderlineIcon = ()=>/*#__PURE__*/ _jsxDEV("svg", {
|
|
5
5
|
"aria-hidden": "true",
|
|
6
6
|
className: "icon",
|
|
7
7
|
fill: "currentColor",
|
|
@@ -11,15 +11,27 @@ export const UnderlineIcon = ()=>/*#__PURE__*/ _jsxs("svg", {
|
|
|
11
11
|
width: "20",
|
|
12
12
|
xmlns: "http://www.w3.org/2000/svg",
|
|
13
13
|
children: [
|
|
14
|
-
/*#__PURE__*/
|
|
14
|
+
/*#__PURE__*/ _jsxDEV("path", {
|
|
15
15
|
d: "M13.9656 11.256C13.9656 13.791 12.5096 15.156 10.0006 15.156C7.50461 15.156 6.03561 13.791 6.03561 11.23V5.718H7.76461V11.243C7.76461 12.868 8.50561 13.778 10.0006 13.778C11.4956 13.778 12.2496 12.868 12.2496 11.243V5.718H13.9656V11.256Z",
|
|
16
16
|
fill: "currentColor"
|
|
17
|
-
}
|
|
18
|
-
|
|
17
|
+
}, void 0, false, {
|
|
18
|
+
fileName: "src/lexical/ui/icons/Underline/index.tsx",
|
|
19
|
+
lineNumber: 15,
|
|
20
|
+
columnNumber: 5
|
|
21
|
+
}, this),
|
|
22
|
+
/*#__PURE__*/ _jsxDEV("path", {
|
|
19
23
|
d: "M5.09961 16.3H14.9016V16.95H5.09961V16.3Z",
|
|
20
24
|
fill: "currentColor"
|
|
21
|
-
}
|
|
25
|
+
}, void 0, false, {
|
|
26
|
+
fileName: "src/lexical/ui/icons/Underline/index.tsx",
|
|
27
|
+
lineNumber: 19,
|
|
28
|
+
columnNumber: 5
|
|
29
|
+
}, this)
|
|
22
30
|
]
|
|
23
|
-
}
|
|
31
|
+
}, void 0, true, {
|
|
32
|
+
fileName: "src/lexical/ui/icons/Underline/index.tsx",
|
|
33
|
+
lineNumber: 5,
|
|
34
|
+
columnNumber: 3
|
|
35
|
+
}, this);
|
|
24
36
|
|
|
25
37
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/lexical/ui/icons/Underline/index.tsx"],"sourcesContent":["'use client'\nimport React from 'react'\n\nexport const UnderlineIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"currentColor\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M13.9656 11.256C13.9656 13.791 12.5096 15.156 10.0006 15.156C7.50461 15.156 6.03561 13.791 6.03561 11.23V5.718H7.76461V11.243C7.76461 12.868 8.50561 13.778 10.0006 13.778C11.4956 13.778 12.2496 12.868 12.2496 11.243V5.718H13.9656V11.256Z\"\n fill=\"currentColor\"\n />\n <path d=\"M5.09961 16.3H14.9016V16.95H5.09961V16.3Z\" fill=\"currentColor\" />\n </svg>\n)\n"],"names":["React","UnderlineIcon","svg","aria-hidden","className","fill","focusable","height","viewBox","width","xmlns","path","d"],"mappings":"AAAA;;AACA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,gBAA0B,kBACrC,
|
|
1
|
+
{"version":3,"sources":["../../../../../src/lexical/ui/icons/Underline/index.tsx"],"sourcesContent":["'use client'\nimport React from 'react'\n\nexport const UnderlineIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"currentColor\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M13.9656 11.256C13.9656 13.791 12.5096 15.156 10.0006 15.156C7.50461 15.156 6.03561 13.791 6.03561 11.23V5.718H7.76461V11.243C7.76461 12.868 8.50561 13.778 10.0006 13.778C11.4956 13.778 12.2496 12.868 12.2496 11.243V5.718H13.9656V11.256Z\"\n fill=\"currentColor\"\n />\n <path d=\"M5.09961 16.3H14.9016V16.95H5.09961V16.3Z\" fill=\"currentColor\" />\n </svg>\n)\n"],"names":["React","UnderlineIcon","svg","aria-hidden","className","fill","focusable","height","viewBox","width","xmlns","path","d"],"mappings":"AAAA;;AACA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,gBAA0B,kBACrC,QAACC;QACCC,eAAY;QACZC,WAAU;QACVC,MAAK;QACLC,WAAU;QACVC,QAAO;QACPC,SAAQ;QACRC,OAAM;QACNC,OAAM;;0BAEN,QAACC;gBACCC,GAAE;gBACFP,MAAK;;;;;;0BAEP,QAACM;gBAAKC,GAAE;gBAA4CP,MAAK;;;;;;;;;;;aAE5D"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
2
|
+
import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
|
|
3
3
|
import React from 'react';
|
|
4
|
-
export const UnorderedListIcon = ()=>/*#__PURE__*/
|
|
4
|
+
export const UnorderedListIcon = ()=>/*#__PURE__*/ _jsxDEV("svg", {
|
|
5
5
|
"aria-hidden": "true",
|
|
6
6
|
className: "icon",
|
|
7
7
|
fill: "none",
|
|
@@ -11,46 +11,74 @@ export const UnorderedListIcon = ()=>/*#__PURE__*/ _jsxs("svg", {
|
|
|
11
11
|
width: "20",
|
|
12
12
|
xmlns: "http://www.w3.org/2000/svg",
|
|
13
13
|
children: [
|
|
14
|
-
/*#__PURE__*/
|
|
14
|
+
/*#__PURE__*/ _jsxDEV("circle", {
|
|
15
15
|
cx: "4",
|
|
16
16
|
cy: "5",
|
|
17
17
|
fill: "currentColor",
|
|
18
18
|
r: "1.15",
|
|
19
19
|
stroke: "currentColor",
|
|
20
20
|
strokeWidth: "0.3"
|
|
21
|
-
}
|
|
22
|
-
|
|
21
|
+
}, void 0, false, {
|
|
22
|
+
fileName: "src/lexical/ui/icons/UnorderedList/index.tsx",
|
|
23
|
+
lineNumber: 15,
|
|
24
|
+
columnNumber: 5
|
|
25
|
+
}, this),
|
|
26
|
+
/*#__PURE__*/ _jsxDEV("circle", {
|
|
23
27
|
cx: "4",
|
|
24
28
|
cy: "10",
|
|
25
29
|
fill: "currentColor",
|
|
26
30
|
r: "1.15",
|
|
27
31
|
stroke: "currentColor",
|
|
28
32
|
strokeWidth: "0.3"
|
|
29
|
-
}
|
|
30
|
-
|
|
33
|
+
}, void 0, false, {
|
|
34
|
+
fileName: "src/lexical/ui/icons/UnorderedList/index.tsx",
|
|
35
|
+
lineNumber: 16,
|
|
36
|
+
columnNumber: 5
|
|
37
|
+
}, this),
|
|
38
|
+
/*#__PURE__*/ _jsxDEV("circle", {
|
|
31
39
|
cx: "4",
|
|
32
40
|
cy: "15",
|
|
33
41
|
fill: "currentColor",
|
|
34
42
|
r: "1.15",
|
|
35
43
|
stroke: "currentColor",
|
|
36
44
|
strokeWidth: "0.3"
|
|
37
|
-
}
|
|
38
|
-
|
|
45
|
+
}, void 0, false, {
|
|
46
|
+
fileName: "src/lexical/ui/icons/UnorderedList/index.tsx",
|
|
47
|
+
lineNumber: 17,
|
|
48
|
+
columnNumber: 5
|
|
49
|
+
}, this),
|
|
50
|
+
/*#__PURE__*/ _jsxDEV("path", {
|
|
39
51
|
d: "M17 5H7",
|
|
40
52
|
stroke: "currentColor",
|
|
41
53
|
strokeWidth: "1.5"
|
|
42
|
-
}
|
|
43
|
-
|
|
54
|
+
}, void 0, false, {
|
|
55
|
+
fileName: "src/lexical/ui/icons/UnorderedList/index.tsx",
|
|
56
|
+
lineNumber: 18,
|
|
57
|
+
columnNumber: 5
|
|
58
|
+
}, this),
|
|
59
|
+
/*#__PURE__*/ _jsxDEV("path", {
|
|
44
60
|
d: "M17 10H7",
|
|
45
61
|
stroke: "currentColor",
|
|
46
62
|
strokeWidth: "1.5"
|
|
47
|
-
}
|
|
48
|
-
|
|
63
|
+
}, void 0, false, {
|
|
64
|
+
fileName: "src/lexical/ui/icons/UnorderedList/index.tsx",
|
|
65
|
+
lineNumber: 19,
|
|
66
|
+
columnNumber: 5
|
|
67
|
+
}, this),
|
|
68
|
+
/*#__PURE__*/ _jsxDEV("path", {
|
|
49
69
|
d: "M17 15H7",
|
|
50
70
|
stroke: "currentColor",
|
|
51
71
|
strokeWidth: "1.5"
|
|
52
|
-
}
|
|
72
|
+
}, void 0, false, {
|
|
73
|
+
fileName: "src/lexical/ui/icons/UnorderedList/index.tsx",
|
|
74
|
+
lineNumber: 20,
|
|
75
|
+
columnNumber: 5
|
|
76
|
+
}, this)
|
|
53
77
|
]
|
|
54
|
-
}
|
|
78
|
+
}, void 0, true, {
|
|
79
|
+
fileName: "src/lexical/ui/icons/UnorderedList/index.tsx",
|
|
80
|
+
lineNumber: 5,
|
|
81
|
+
columnNumber: 3
|
|
82
|
+
}, this);
|
|
55
83
|
|
|
56
84
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/lexical/ui/icons/UnorderedList/index.tsx"],"sourcesContent":["'use client'\nimport React from 'react'\n\nexport const UnorderedListIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle cx=\"4\" cy=\"5\" fill=\"currentColor\" r=\"1.15\" stroke=\"currentColor\" strokeWidth=\"0.3\" />\n <circle cx=\"4\" cy=\"10\" fill=\"currentColor\" r=\"1.15\" stroke=\"currentColor\" strokeWidth=\"0.3\" />\n <circle cx=\"4\" cy=\"15\" fill=\"currentColor\" r=\"1.15\" stroke=\"currentColor\" strokeWidth=\"0.3\" />\n <path d=\"M17 5H7\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M17 10H7\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M17 15H7\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n </svg>\n)\n"],"names":["React","UnorderedListIcon","svg","aria-hidden","className","fill","focusable","height","viewBox","width","xmlns","circle","cx","cy","r","stroke","strokeWidth","path","d"],"mappings":"AAAA;;AACA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,oBAA8B,kBACzC,
|
|
1
|
+
{"version":3,"sources":["../../../../../src/lexical/ui/icons/UnorderedList/index.tsx"],"sourcesContent":["'use client'\nimport React from 'react'\n\nexport const UnorderedListIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle cx=\"4\" cy=\"5\" fill=\"currentColor\" r=\"1.15\" stroke=\"currentColor\" strokeWidth=\"0.3\" />\n <circle cx=\"4\" cy=\"10\" fill=\"currentColor\" r=\"1.15\" stroke=\"currentColor\" strokeWidth=\"0.3\" />\n <circle cx=\"4\" cy=\"15\" fill=\"currentColor\" r=\"1.15\" stroke=\"currentColor\" strokeWidth=\"0.3\" />\n <path d=\"M17 5H7\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M17 10H7\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M17 15H7\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n </svg>\n)\n"],"names":["React","UnorderedListIcon","svg","aria-hidden","className","fill","focusable","height","viewBox","width","xmlns","circle","cx","cy","r","stroke","strokeWidth","path","d"],"mappings":"AAAA;;AACA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,oBAA8B,kBACzC,QAACC;QACCC,eAAY;QACZC,WAAU;QACVC,MAAK;QACLC,WAAU;QACVC,QAAO;QACPC,SAAQ;QACRC,OAAM;QACNC,OAAM;;0BAEN,QAACC;gBAAOC,IAAG;gBAAIC,IAAG;gBAAIR,MAAK;gBAAeS,GAAE;gBAAOC,QAAO;gBAAeC,aAAY;;;;;;0BACrF,QAACL;gBAAOC,IAAG;gBAAIC,IAAG;gBAAKR,MAAK;gBAAeS,GAAE;gBAAOC,QAAO;gBAAeC,aAAY;;;;;;0BACtF,QAACL;gBAAOC,IAAG;gBAAIC,IAAG;gBAAKR,MAAK;gBAAeS,GAAE;gBAAOC,QAAO;gBAAeC,aAAY;;;;;;0BACtF,QAACC;gBAAKC,GAAE;gBAAUH,QAAO;gBAAeC,aAAY;;;;;;0BACpD,QAACC;gBAAKC,GAAE;gBAAWH,QAAO;gBAAeC,aAAY;;;;;;0BACrD,QAACC;gBAAKC,GAAE;gBAAWH,QAAO;gBAAeC,aAAY;;;;;;;;;;;aAExD"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
2
|
+
import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
|
|
3
3
|
import React from 'react';
|
|
4
|
-
export const UploadIcon = ()=>/*#__PURE__*/
|
|
4
|
+
export const UploadIcon = ()=>/*#__PURE__*/ _jsxDEV("svg", {
|
|
5
5
|
"aria-hidden": "true",
|
|
6
6
|
className: "icon",
|
|
7
7
|
fill: "none",
|
|
@@ -11,25 +11,41 @@ export const UploadIcon = ()=>/*#__PURE__*/ _jsxs("svg", {
|
|
|
11
11
|
width: "20",
|
|
12
12
|
xmlns: "http://www.w3.org/2000/svg",
|
|
13
13
|
children: [
|
|
14
|
-
/*#__PURE__*/
|
|
14
|
+
/*#__PURE__*/ _jsxDEV("path", {
|
|
15
15
|
d: "M14.6667 4H5.33333C4.59695 4 4 4.59695 4 5.33333V14.6667C4 15.403 4.59695 16 5.33333 16H14.6667C15.403 16 16 15.403 16 14.6667V5.33333C16 4.59695 15.403 4 14.6667 4Z",
|
|
16
16
|
stroke: "currentColor",
|
|
17
17
|
strokeLinecap: "round",
|
|
18
18
|
strokeLinejoin: "round"
|
|
19
|
-
}
|
|
20
|
-
|
|
19
|
+
}, void 0, false, {
|
|
20
|
+
fileName: "src/lexical/ui/icons/Upload/index.tsx",
|
|
21
|
+
lineNumber: 15,
|
|
22
|
+
columnNumber: 5
|
|
23
|
+
}, this),
|
|
24
|
+
/*#__PURE__*/ _jsxDEV("path", {
|
|
21
25
|
d: "M7.99984 9.33366C8.73622 9.33366 9.33317 8.73671 9.33317 8.00033C9.33317 7.26395 8.73622 6.66699 7.99984 6.66699C7.26346 6.66699 6.6665 7.26395 6.6665 8.00033C6.6665 8.73671 7.26346 9.33366 7.99984 9.33366Z",
|
|
22
26
|
stroke: "currentColor",
|
|
23
27
|
strokeLinecap: "round",
|
|
24
28
|
strokeLinejoin: "round"
|
|
25
|
-
}
|
|
26
|
-
|
|
29
|
+
}, void 0, false, {
|
|
30
|
+
fileName: "src/lexical/ui/icons/Upload/index.tsx",
|
|
31
|
+
lineNumber: 21,
|
|
32
|
+
columnNumber: 5
|
|
33
|
+
}, this),
|
|
34
|
+
/*#__PURE__*/ _jsxDEV("path", {
|
|
27
35
|
d: "M16 11.9995L13.9427 9.94214C13.6926 9.69218 13.3536 9.55176 13 9.55176C12.6464 9.55176 12.3074 9.69218 12.0573 9.94214L6 15.9995",
|
|
28
36
|
stroke: "currentColor",
|
|
29
37
|
strokeLinecap: "round",
|
|
30
38
|
strokeLinejoin: "round"
|
|
31
|
-
}
|
|
39
|
+
}, void 0, false, {
|
|
40
|
+
fileName: "src/lexical/ui/icons/Upload/index.tsx",
|
|
41
|
+
lineNumber: 27,
|
|
42
|
+
columnNumber: 5
|
|
43
|
+
}, this)
|
|
32
44
|
]
|
|
33
|
-
}
|
|
45
|
+
}, void 0, true, {
|
|
46
|
+
fileName: "src/lexical/ui/icons/Upload/index.tsx",
|
|
47
|
+
lineNumber: 5,
|
|
48
|
+
columnNumber: 3
|
|
49
|
+
}, this);
|
|
34
50
|
|
|
35
51
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/lexical/ui/icons/Upload/index.tsx"],"sourcesContent":["'use client'\nimport React from 'react'\n\nexport const UploadIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M14.6667 4H5.33333C4.59695 4 4 4.59695 4 5.33333V14.6667C4 15.403 4.59695 16 5.33333 16H14.6667C15.403 16 16 15.403 16 14.6667V5.33333C16 4.59695 15.403 4 14.6667 4Z\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n <path\n d=\"M7.99984 9.33366C8.73622 9.33366 9.33317 8.73671 9.33317 8.00033C9.33317 7.26395 8.73622 6.66699 7.99984 6.66699C7.26346 6.66699 6.6665 7.26395 6.6665 8.00033C6.6665 8.73671 7.26346 9.33366 7.99984 9.33366Z\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n <path\n d=\"M16 11.9995L13.9427 9.94214C13.6926 9.69218 13.3536 9.55176 13 9.55176C12.6464 9.55176 12.3074 9.69218 12.0573 9.94214L6 15.9995\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n)\n"],"names":["React","UploadIcon","svg","aria-hidden","className","fill","focusable","height","viewBox","width","xmlns","path","d","stroke","strokeLinecap","strokeLinejoin"],"mappings":"AAAA;;AACA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,aAAuB,kBAClC,
|
|
1
|
+
{"version":3,"sources":["../../../../../src/lexical/ui/icons/Upload/index.tsx"],"sourcesContent":["'use client'\nimport React from 'react'\n\nexport const UploadIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M14.6667 4H5.33333C4.59695 4 4 4.59695 4 5.33333V14.6667C4 15.403 4.59695 16 5.33333 16H14.6667C15.403 16 16 15.403 16 14.6667V5.33333C16 4.59695 15.403 4 14.6667 4Z\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n <path\n d=\"M7.99984 9.33366C8.73622 9.33366 9.33317 8.73671 9.33317 8.00033C9.33317 7.26395 8.73622 6.66699 7.99984 6.66699C7.26346 6.66699 6.6665 7.26395 6.6665 8.00033C6.6665 8.73671 7.26346 9.33366 7.99984 9.33366Z\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n <path\n d=\"M16 11.9995L13.9427 9.94214C13.6926 9.69218 13.3536 9.55176 13 9.55176C12.6464 9.55176 12.3074 9.69218 12.0573 9.94214L6 15.9995\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n)\n"],"names":["React","UploadIcon","svg","aria-hidden","className","fill","focusable","height","viewBox","width","xmlns","path","d","stroke","strokeLinecap","strokeLinejoin"],"mappings":"AAAA;;AACA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,aAAuB,kBAClC,QAACC;QACCC,eAAY;QACZC,WAAU;QACVC,MAAK;QACLC,WAAU;QACVC,QAAO;QACPC,SAAQ;QACRC,OAAM;QACNC,OAAM;;0BAEN,QAACC;gBACCC,GAAE;gBACFC,QAAO;gBACPC,eAAc;gBACdC,gBAAe;;;;;;0BAEjB,QAACJ;gBACCC,GAAE;gBACFC,QAAO;gBACPC,eAAc;gBACdC,gBAAe;;;;;;0BAEjB,QAACJ;gBACCC,GAAE;gBACFC,QAAO;gBACPC,eAAc;gBACdC,gBAAe;;;;;;;;;;;aAGpB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
2
|
+
import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
|
|
3
3
|
import { Drawer, EditDepthProvider, useModal } from '@payloadcms/ui';
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { DrawerContent } from './DrawerContent.js';
|
|
@@ -11,12 +11,12 @@ import { DrawerContent } from './DrawerContent.js';
|
|
|
11
11
|
const { closeModal } = useModal();
|
|
12
12
|
// The Drawer only renders its children (and itself) if it's open. Thus, by extracting the main content
|
|
13
13
|
// to DrawerContent, this should be faster
|
|
14
|
-
return /*#__PURE__*/
|
|
15
|
-
children: /*#__PURE__*/
|
|
14
|
+
return /*#__PURE__*/ _jsxDEV(EditDepthProvider, {
|
|
15
|
+
children: /*#__PURE__*/ _jsxDEV(Drawer, {
|
|
16
16
|
className: className,
|
|
17
17
|
slug: drawerSlug,
|
|
18
18
|
title: drawerTitle ?? '',
|
|
19
|
-
children: /*#__PURE__*/
|
|
19
|
+
children: /*#__PURE__*/ _jsxDEV(DrawerContent, {
|
|
20
20
|
data: data,
|
|
21
21
|
featureKey: featureKey,
|
|
22
22
|
fieldMapOverride: fieldMapOverride,
|
|
@@ -35,9 +35,21 @@ import { DrawerContent } from './DrawerContent.js';
|
|
|
35
35
|
schemaFieldsPathOverride: schemaFieldsPathOverride,
|
|
36
36
|
schemaPath: schemaPath,
|
|
37
37
|
schemaPathSuffix: schemaPathSuffix
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
}, void 0, false, {
|
|
39
|
+
fileName: "src/utilities/fieldsDrawer/Drawer.tsx",
|
|
40
|
+
lineNumber: 45,
|
|
41
|
+
columnNumber: 9
|
|
42
|
+
}, this)
|
|
43
|
+
}, void 0, false, {
|
|
44
|
+
fileName: "src/utilities/fieldsDrawer/Drawer.tsx",
|
|
45
|
+
lineNumber: 44,
|
|
46
|
+
columnNumber: 7
|
|
47
|
+
}, this)
|
|
48
|
+
}, void 0, false, {
|
|
49
|
+
fileName: "src/utilities/fieldsDrawer/Drawer.tsx",
|
|
50
|
+
lineNumber: 43,
|
|
51
|
+
columnNumber: 5
|
|
52
|
+
}, this);
|
|
41
53
|
};
|
|
42
54
|
|
|
43
55
|
//# sourceMappingURL=Drawer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/utilities/fieldsDrawer/Drawer.tsx"],"sourcesContent":["'use client'\nimport type { ClientField, Data, FormState, JsonObject } from 'payload'\n\nimport { Drawer, EditDepthProvider, useModal } from '@payloadcms/ui'\nimport React from 'react'\n\nimport { DrawerContent } from './DrawerContent.js'\n\nexport type FieldsDrawerProps = {\n readonly className?: string\n readonly data?: Data\n readonly drawerSlug: string\n readonly drawerTitle?: string\n readonly featureKey: string\n readonly fieldMapOverride?: ClientField[]\n readonly handleDrawerSubmit: (fields: FormState, data: JsonObject) => void\n readonly schemaFieldsPathOverride?: string\n readonly schemaPath: string\n readonly schemaPathSuffix?: string\n}\n\n/**\n * This FieldsDrawer component can be used to easily create a Drawer that contains a form with fields within your feature.\n * The fields are taken directly from the schema map based on your `featureKey` and `schemaPathSuffix`. Thus, this can only\n * be used if you provide your field schema inside the `generateSchemaMap` prop of your feature.server.ts.\n */\nexport const FieldsDrawer: React.FC<FieldsDrawerProps> = ({\n className,\n data,\n drawerSlug,\n drawerTitle,\n featureKey,\n fieldMapOverride,\n handleDrawerSubmit,\n schemaFieldsPathOverride,\n schemaPath,\n schemaPathSuffix,\n}) => {\n const { closeModal } = useModal()\n // The Drawer only renders its children (and itself) if it's open. Thus, by extracting the main content\n // to DrawerContent, this should be faster\n return (\n <EditDepthProvider>\n <Drawer className={className} slug={drawerSlug} title={drawerTitle ?? ''}>\n <DrawerContent\n data={data}\n featureKey={featureKey}\n fieldMapOverride={fieldMapOverride}\n handleDrawerSubmit={(args, args2) => {\n // Simply close drawer - no need for useLexicalDrawer here as at this point,\n // we don't need to restore the cursor position. This is handled by the useEffect in useLexicalDrawer.\n closeModal(drawerSlug)\n\n // Actual drawer submit logic needs to be triggered after the drawer is closed.\n // That's because the lexical selection / cursor restore logic that is striggerer by\n // `useLexicalDrawer` neeeds to be triggered before any editor.update calls that may happen\n // in the `handleDrawerSubmit` function.\n setTimeout(() => {\n handleDrawerSubmit(args, args2)\n }, 1)\n }}\n schemaFieldsPathOverride={schemaFieldsPathOverride}\n schemaPath={schemaPath}\n schemaPathSuffix={schemaPathSuffix}\n />\n </Drawer>\n </EditDepthProvider>\n )\n}\n"],"names":["Drawer","EditDepthProvider","useModal","React","DrawerContent","FieldsDrawer","className","data","drawerSlug","drawerTitle","featureKey","fieldMapOverride","handleDrawerSubmit","schemaFieldsPathOverride","schemaPath","schemaPathSuffix","closeModal","slug","title","args","args2","setTimeout"],"mappings":"AAAA;;AAGA,SAASA,MAAM,EAAEC,iBAAiB,EAAEC,QAAQ,QAAQ,iBAAgB;AACpE,OAAOC,WAAW,QAAO;AAEzB,SAASC,aAAa,QAAQ,qBAAoB;AAelD;;;;CAIC,GACD,OAAO,MAAMC,eAA4C,CAAC,EACxDC,SAAS,EACTC,IAAI,EACJC,UAAU,EACVC,WAAW,EACXC,UAAU,EACVC,gBAAgB,EAChBC,kBAAkB,EAClBC,wBAAwB,EACxBC,UAAU,EACVC,gBAAgB,EACjB;IACC,MAAM,EAAEC,UAAU,EAAE,GAAGd;IACvB,uGAAuG;IACvG,0CAA0C;IAC1C,qBACE,
|
|
1
|
+
{"version":3,"sources":["../../../src/utilities/fieldsDrawer/Drawer.tsx"],"sourcesContent":["'use client'\nimport type { ClientField, Data, FormState, JsonObject } from 'payload'\n\nimport { Drawer, EditDepthProvider, useModal } from '@payloadcms/ui'\nimport React from 'react'\n\nimport { DrawerContent } from './DrawerContent.js'\n\nexport type FieldsDrawerProps = {\n readonly className?: string\n readonly data?: Data\n readonly drawerSlug: string\n readonly drawerTitle?: string\n readonly featureKey: string\n readonly fieldMapOverride?: ClientField[]\n readonly handleDrawerSubmit: (fields: FormState, data: JsonObject) => void\n readonly schemaFieldsPathOverride?: string\n readonly schemaPath: string\n readonly schemaPathSuffix?: string\n}\n\n/**\n * This FieldsDrawer component can be used to easily create a Drawer that contains a form with fields within your feature.\n * The fields are taken directly from the schema map based on your `featureKey` and `schemaPathSuffix`. Thus, this can only\n * be used if you provide your field schema inside the `generateSchemaMap` prop of your feature.server.ts.\n */\nexport const FieldsDrawer: React.FC<FieldsDrawerProps> = ({\n className,\n data,\n drawerSlug,\n drawerTitle,\n featureKey,\n fieldMapOverride,\n handleDrawerSubmit,\n schemaFieldsPathOverride,\n schemaPath,\n schemaPathSuffix,\n}) => {\n const { closeModal } = useModal()\n // The Drawer only renders its children (and itself) if it's open. Thus, by extracting the main content\n // to DrawerContent, this should be faster\n return (\n <EditDepthProvider>\n <Drawer className={className} slug={drawerSlug} title={drawerTitle ?? ''}>\n <DrawerContent\n data={data}\n featureKey={featureKey}\n fieldMapOverride={fieldMapOverride}\n handleDrawerSubmit={(args, args2) => {\n // Simply close drawer - no need for useLexicalDrawer here as at this point,\n // we don't need to restore the cursor position. This is handled by the useEffect in useLexicalDrawer.\n closeModal(drawerSlug)\n\n // Actual drawer submit logic needs to be triggered after the drawer is closed.\n // That's because the lexical selection / cursor restore logic that is striggerer by\n // `useLexicalDrawer` neeeds to be triggered before any editor.update calls that may happen\n // in the `handleDrawerSubmit` function.\n setTimeout(() => {\n handleDrawerSubmit(args, args2)\n }, 1)\n }}\n schemaFieldsPathOverride={schemaFieldsPathOverride}\n schemaPath={schemaPath}\n schemaPathSuffix={schemaPathSuffix}\n />\n </Drawer>\n </EditDepthProvider>\n )\n}\n"],"names":["Drawer","EditDepthProvider","useModal","React","DrawerContent","FieldsDrawer","className","data","drawerSlug","drawerTitle","featureKey","fieldMapOverride","handleDrawerSubmit","schemaFieldsPathOverride","schemaPath","schemaPathSuffix","closeModal","slug","title","args","args2","setTimeout"],"mappings":"AAAA;;AAGA,SAASA,MAAM,EAAEC,iBAAiB,EAAEC,QAAQ,QAAQ,iBAAgB;AACpE,OAAOC,WAAW,QAAO;AAEzB,SAASC,aAAa,QAAQ,qBAAoB;AAelD;;;;CAIC,GACD,OAAO,MAAMC,eAA4C,CAAC,EACxDC,SAAS,EACTC,IAAI,EACJC,UAAU,EACVC,WAAW,EACXC,UAAU,EACVC,gBAAgB,EAChBC,kBAAkB,EAClBC,wBAAwB,EACxBC,UAAU,EACVC,gBAAgB,EACjB;IACC,MAAM,EAAEC,UAAU,EAAE,GAAGd;IACvB,uGAAuG;IACvG,0CAA0C;IAC1C,qBACE,QAACD;kBACC,cAAA,QAACD;YAAOM,WAAWA;YAAWW,MAAMT;YAAYU,OAAOT,eAAe;sBACpE,cAAA,QAACL;gBACCG,MAAMA;gBACNG,YAAYA;gBACZC,kBAAkBA;gBAClBC,oBAAoB,CAACO,MAAMC;oBACzB,4EAA4E;oBAC5E,sGAAsG;oBACtGJ,WAAWR;oBAEX,+EAA+E;oBAC/E,oFAAoF;oBACpF,2FAA2F;oBAC3F,wCAAwC;oBACxCa,WAAW;wBACTT,mBAAmBO,MAAMC;oBAC3B,GAAG;gBACL;gBACAP,0BAA0BA;gBAC1BC,YAAYA;gBACZC,kBAAkBA;;;;;;;;;;;;;;;;AAK5B,EAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
2
|
+
import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
|
|
3
3
|
import { useLexicalEditable } from '@lexical/react/useLexicalEditable';
|
|
4
4
|
import { Form, FormSubmit, RenderFields, useDocumentForm, useDocumentInfo, useServerFunctions, useTranslation } from '@payloadcms/ui';
|
|
5
5
|
import { abortAndIgnore } from '@payloadcms/ui/shared';
|
|
@@ -99,7 +99,7 @@ export const DrawerContent = ({ data, featureKey, fieldMapOverride, handleDrawer
|
|
|
99
99
|
if (initialState === false) {
|
|
100
100
|
return null;
|
|
101
101
|
}
|
|
102
|
-
return /*#__PURE__*/
|
|
102
|
+
return /*#__PURE__*/ _jsxDEV(Form, {
|
|
103
103
|
beforeSubmit: [
|
|
104
104
|
onChange
|
|
105
105
|
],
|
|
@@ -112,7 +112,7 @@ export const DrawerContent = ({ data, featureKey, fieldMapOverride, handleDrawer
|
|
|
112
112
|
onSubmit: handleDrawerSubmit,
|
|
113
113
|
uuid: uuid(),
|
|
114
114
|
children: [
|
|
115
|
-
/*#__PURE__*/
|
|
115
|
+
/*#__PURE__*/ _jsxDEV(RenderFields, {
|
|
116
116
|
fields: Array.isArray(fields) ? fields : [],
|
|
117
117
|
forceRender: true,
|
|
118
118
|
parentIndexPath: "",
|
|
@@ -121,12 +121,24 @@ export const DrawerContent = ({ data, featureKey, fieldMapOverride, handleDrawer
|
|
|
121
121
|
parentSchemaPath: schemaFieldsPath,
|
|
122
122
|
permissions: true,
|
|
123
123
|
readOnly: !isEditable
|
|
124
|
-
}
|
|
125
|
-
|
|
124
|
+
}, void 0, false, {
|
|
125
|
+
fileName: "src/utilities/fieldsDrawer/DrawerContent.tsx",
|
|
126
|
+
lineNumber: 158,
|
|
127
|
+
columnNumber: 7
|
|
128
|
+
}, this),
|
|
129
|
+
/*#__PURE__*/ _jsxDEV(FormSubmit, {
|
|
126
130
|
children: t('fields:saveChanges')
|
|
127
|
-
}
|
|
131
|
+
}, void 0, false, {
|
|
132
|
+
fileName: "src/utilities/fieldsDrawer/DrawerContent.tsx",
|
|
133
|
+
lineNumber: 167,
|
|
134
|
+
columnNumber: 7
|
|
135
|
+
}, this)
|
|
128
136
|
]
|
|
129
|
-
}
|
|
137
|
+
}, void 0, true, {
|
|
138
|
+
fileName: "src/utilities/fieldsDrawer/DrawerContent.tsx",
|
|
139
|
+
lineNumber: 149,
|
|
140
|
+
columnNumber: 5
|
|
141
|
+
}, this);
|
|
130
142
|
};
|
|
131
143
|
|
|
132
144
|
//# sourceMappingURL=DrawerContent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/utilities/fieldsDrawer/DrawerContent.tsx"],"sourcesContent":["'use client'\nimport type { FormState } from 'payload'\n\nimport { useLexicalEditable } from '@lexical/react/useLexicalEditable'\nimport {\n Form,\n FormSubmit,\n RenderFields,\n useDocumentForm,\n useDocumentInfo,\n useServerFunctions,\n useTranslation,\n} from '@payloadcms/ui'\nimport { abortAndIgnore } from '@payloadcms/ui/shared'\nimport { deepCopyObjectSimpleWithoutReactComponents } from 'payload/shared'\nimport React, { useCallback, useEffect, useRef, useState } from 'react'\nimport { v4 as uuid } from 'uuid'\n\nimport type { FieldsDrawerProps } from './Drawer.js'\n\nimport { useEditorConfigContext } from '../../lexical/config/client/EditorConfigProvider.js'\n\nexport const DrawerContent: React.FC<Omit<FieldsDrawerProps, 'drawerSlug' | 'drawerTitle'>> = ({\n data,\n featureKey,\n fieldMapOverride,\n handleDrawerSubmit,\n schemaFieldsPathOverride,\n schemaPath,\n schemaPathSuffix,\n}) => {\n const { t } = useTranslation()\n const { id, collectionSlug, getDocPreferences, globalSlug } = useDocumentInfo()\n const { fields: parentDocumentFields } = useDocumentForm()\n const isEditable = useLexicalEditable()\n\n const onChangeAbortControllerRef = useRef(new AbortController())\n\n const [initialState, setInitialState] = useState<false | FormState | undefined>(false)\n\n const {\n fieldProps: { featureClientSchemaMap },\n } = useEditorConfigContext()\n\n const { getFormState } = useServerFunctions()\n\n const schemaFieldsPath =\n schemaFieldsPathOverride ??\n `${schemaPath}.lexical_internal_feature.${featureKey}${schemaPathSuffix ? `.${schemaPathSuffix}` : ''}`\n\n const fields: any = fieldMapOverride ?? featureClientSchemaMap[featureKey]?.[schemaFieldsPath] // Field Schema\n\n useEffect(() => {\n const controller = new AbortController()\n\n const awaitInitialState = async () => {\n const { state } = await getFormState({\n id,\n collectionSlug,\n data: data ?? {},\n docPermissions: {\n fields: true,\n },\n docPreferences: await getDocPreferences(),\n documentFormState: deepCopyObjectSimpleWithoutReactComponents(parentDocumentFields),\n globalSlug,\n initialBlockData: data,\n operation: 'update',\n readOnly: !isEditable,\n renderAllFields: true,\n schemaPath: schemaFieldsPath,\n signal: controller.signal,\n })\n\n setInitialState(state)\n }\n\n void awaitInitialState()\n\n return () => {\n abortAndIgnore(controller)\n }\n }, [\n schemaFieldsPath,\n id,\n data,\n getFormState,\n collectionSlug,\n isEditable,\n globalSlug,\n getDocPreferences,\n parentDocumentFields,\n ])\n\n const onChange = useCallback(\n async ({ formState: prevFormState }: { formState: FormState }) => {\n abortAndIgnore(onChangeAbortControllerRef.current)\n\n const controller = new AbortController()\n onChangeAbortControllerRef.current = controller\n\n const { state } = await getFormState({\n id,\n collectionSlug,\n docPermissions: {\n fields: true,\n },\n docPreferences: await getDocPreferences(),\n documentFormState: deepCopyObjectSimpleWithoutReactComponents(parentDocumentFields),\n formState: prevFormState,\n globalSlug,\n initialBlockFormState: prevFormState,\n operation: 'update',\n readOnly: !isEditable,\n schemaPath: schemaFieldsPath,\n signal: controller.signal,\n })\n\n if (!state) {\n return prevFormState\n }\n\n return state\n },\n [\n getFormState,\n id,\n isEditable,\n collectionSlug,\n getDocPreferences,\n parentDocumentFields,\n globalSlug,\n schemaFieldsPath,\n ],\n )\n\n // cleanup effect\n useEffect(() => {\n return () => {\n abortAndIgnore(onChangeAbortControllerRef.current)\n }\n }, [])\n\n if (initialState === false) {\n return null\n }\n\n return (\n <Form\n beforeSubmit={[onChange]}\n disableValidationOnSubmit\n fields={Array.isArray(fields) ? fields : []}\n initialState={initialState}\n onChange={[onChange]}\n onSubmit={handleDrawerSubmit}\n uuid={uuid()}\n >\n <RenderFields\n fields={Array.isArray(fields) ? fields : []}\n forceRender\n parentIndexPath=\"\"\n parentPath=\"\" // See Blocks feature path for details as for why this is empty\n parentSchemaPath={schemaFieldsPath}\n permissions={true}\n readOnly={!isEditable}\n />\n <FormSubmit>{t('fields:saveChanges')}</FormSubmit>\n </Form>\n )\n}\n"],"names":["useLexicalEditable","Form","FormSubmit","RenderFields","useDocumentForm","useDocumentInfo","useServerFunctions","useTranslation","abortAndIgnore","deepCopyObjectSimpleWithoutReactComponents","React","useCallback","useEffect","useRef","useState","v4","uuid","useEditorConfigContext","DrawerContent","data","featureKey","fieldMapOverride","handleDrawerSubmit","schemaFieldsPathOverride","schemaPath","schemaPathSuffix","t","id","collectionSlug","getDocPreferences","globalSlug","fields","parentDocumentFields","isEditable","onChangeAbortControllerRef","AbortController","initialState","setInitialState","fieldProps","featureClientSchemaMap","getFormState","schemaFieldsPath","controller","awaitInitialState","state","docPermissions","docPreferences","documentFormState","initialBlockData","operation","readOnly","renderAllFields","signal","onChange","formState","prevFormState","current","initialBlockFormState","beforeSubmit","disableValidationOnSubmit","Array","isArray","onSubmit","forceRender","parentIndexPath","parentPath","parentSchemaPath","permissions"],"mappings":"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
|
|
1
|
+
{"version":3,"sources":["../../../src/utilities/fieldsDrawer/DrawerContent.tsx"],"sourcesContent":["'use client'\nimport type { FormState } from 'payload'\n\nimport { useLexicalEditable } from '@lexical/react/useLexicalEditable'\nimport {\n Form,\n FormSubmit,\n RenderFields,\n useDocumentForm,\n useDocumentInfo,\n useServerFunctions,\n useTranslation,\n} from '@payloadcms/ui'\nimport { abortAndIgnore } from '@payloadcms/ui/shared'\nimport { deepCopyObjectSimpleWithoutReactComponents } from 'payload/shared'\nimport React, { useCallback, useEffect, useRef, useState } from 'react'\nimport { v4 as uuid } from 'uuid'\n\nimport type { FieldsDrawerProps } from './Drawer.js'\n\nimport { useEditorConfigContext } from '../../lexical/config/client/EditorConfigProvider.js'\n\nexport const DrawerContent: React.FC<Omit<FieldsDrawerProps, 'drawerSlug' | 'drawerTitle'>> = ({\n data,\n featureKey,\n fieldMapOverride,\n handleDrawerSubmit,\n schemaFieldsPathOverride,\n schemaPath,\n schemaPathSuffix,\n}) => {\n const { t } = useTranslation()\n const { id, collectionSlug, getDocPreferences, globalSlug } = useDocumentInfo()\n const { fields: parentDocumentFields } = useDocumentForm()\n const isEditable = useLexicalEditable()\n\n const onChangeAbortControllerRef = useRef(new AbortController())\n\n const [initialState, setInitialState] = useState<false | FormState | undefined>(false)\n\n const {\n fieldProps: { featureClientSchemaMap },\n } = useEditorConfigContext()\n\n const { getFormState } = useServerFunctions()\n\n const schemaFieldsPath =\n schemaFieldsPathOverride ??\n `${schemaPath}.lexical_internal_feature.${featureKey}${schemaPathSuffix ? `.${schemaPathSuffix}` : ''}`\n\n const fields: any = fieldMapOverride ?? featureClientSchemaMap[featureKey]?.[schemaFieldsPath] // Field Schema\n\n useEffect(() => {\n const controller = new AbortController()\n\n const awaitInitialState = async () => {\n const { state } = await getFormState({\n id,\n collectionSlug,\n data: data ?? {},\n docPermissions: {\n fields: true,\n },\n docPreferences: await getDocPreferences(),\n documentFormState: deepCopyObjectSimpleWithoutReactComponents(parentDocumentFields),\n globalSlug,\n initialBlockData: data,\n operation: 'update',\n readOnly: !isEditable,\n renderAllFields: true,\n schemaPath: schemaFieldsPath,\n signal: controller.signal,\n })\n\n setInitialState(state)\n }\n\n void awaitInitialState()\n\n return () => {\n abortAndIgnore(controller)\n }\n }, [\n schemaFieldsPath,\n id,\n data,\n getFormState,\n collectionSlug,\n isEditable,\n globalSlug,\n getDocPreferences,\n parentDocumentFields,\n ])\n\n const onChange = useCallback(\n async ({ formState: prevFormState }: { formState: FormState }) => {\n abortAndIgnore(onChangeAbortControllerRef.current)\n\n const controller = new AbortController()\n onChangeAbortControllerRef.current = controller\n\n const { state } = await getFormState({\n id,\n collectionSlug,\n docPermissions: {\n fields: true,\n },\n docPreferences: await getDocPreferences(),\n documentFormState: deepCopyObjectSimpleWithoutReactComponents(parentDocumentFields),\n formState: prevFormState,\n globalSlug,\n initialBlockFormState: prevFormState,\n operation: 'update',\n readOnly: !isEditable,\n schemaPath: schemaFieldsPath,\n signal: controller.signal,\n })\n\n if (!state) {\n return prevFormState\n }\n\n return state\n },\n [\n getFormState,\n id,\n isEditable,\n collectionSlug,\n getDocPreferences,\n parentDocumentFields,\n globalSlug,\n schemaFieldsPath,\n ],\n )\n\n // cleanup effect\n useEffect(() => {\n return () => {\n abortAndIgnore(onChangeAbortControllerRef.current)\n }\n }, [])\n\n if (initialState === false) {\n return null\n }\n\n return (\n <Form\n beforeSubmit={[onChange]}\n disableValidationOnSubmit\n fields={Array.isArray(fields) ? fields : []}\n initialState={initialState}\n onChange={[onChange]}\n onSubmit={handleDrawerSubmit}\n uuid={uuid()}\n >\n <RenderFields\n fields={Array.isArray(fields) ? fields : []}\n forceRender\n parentIndexPath=\"\"\n parentPath=\"\" // See Blocks feature path for details as for why this is empty\n parentSchemaPath={schemaFieldsPath}\n permissions={true}\n readOnly={!isEditable}\n />\n <FormSubmit>{t('fields:saveChanges')}</FormSubmit>\n </Form>\n )\n}\n"],"names":["useLexicalEditable","Form","FormSubmit","RenderFields","useDocumentForm","useDocumentInfo","useServerFunctions","useTranslation","abortAndIgnore","deepCopyObjectSimpleWithoutReactComponents","React","useCallback","useEffect","useRef","useState","v4","uuid","useEditorConfigContext","DrawerContent","data","featureKey","fieldMapOverride","handleDrawerSubmit","schemaFieldsPathOverride","schemaPath","schemaPathSuffix","t","id","collectionSlug","getDocPreferences","globalSlug","fields","parentDocumentFields","isEditable","onChangeAbortControllerRef","AbortController","initialState","setInitialState","fieldProps","featureClientSchemaMap","getFormState","schemaFieldsPath","controller","awaitInitialState","state","docPermissions","docPreferences","documentFormState","initialBlockData","operation","readOnly","renderAllFields","signal","onChange","formState","prevFormState","current","initialBlockFormState","beforeSubmit","disableValidationOnSubmit","Array","isArray","onSubmit","forceRender","parentIndexPath","parentPath","parentSchemaPath","permissions"],"mappings":"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"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
2
|
+
import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
|
|
3
3
|
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
|
|
4
4
|
import { useDocumentDrawer, useModal } from '@payloadcms/ui';
|
|
5
5
|
import { $getPreviousSelection, $getSelection, $setSelection } from 'lexical';
|
|
@@ -64,10 +64,14 @@ import { useCallback, useEffect, useState } from 'react';
|
|
|
64
64
|
closeDocumentDrawer,
|
|
65
65
|
DocumentDrawer,
|
|
66
66
|
documentDrawerSlug,
|
|
67
|
-
DocumentDrawerToggler: (props)=>/*#__PURE__*/
|
|
67
|
+
DocumentDrawerToggler: (props)=>/*#__PURE__*/ _jsxDEV(DocumentDrawerToggler, {
|
|
68
68
|
...props,
|
|
69
69
|
onClick: storeSelection
|
|
70
|
-
}
|
|
70
|
+
}, void 0, false, {
|
|
71
|
+
fileName: "src/utilities/fieldsDrawer/useLexicalDocumentDrawer.tsx",
|
|
72
|
+
lineNumber: 79,
|
|
73
|
+
columnNumber: 39
|
|
74
|
+
}, this)
|
|
71
75
|
};
|
|
72
76
|
};
|
|
73
77
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/utilities/fieldsDrawer/useLexicalDocumentDrawer.tsx"],"sourcesContent":["'use client'\nimport type { UseDocumentDrawer } from '@payloadcms/ui'\nimport type { BaseSelection } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'\nimport { useDocumentDrawer, useModal } from '@payloadcms/ui'\nimport { $getPreviousSelection, $getSelection, $setSelection } from 'lexical'\nimport { useCallback, useEffect, useState } from 'react'\n\n/**\n *\n * Wrapper around useDocumentDrawer that restores and saves selection state (cursor position) when opening and closing the drawer.\n * By default, the lexical cursor position may be lost when opening a drawer and clicking somewhere on that drawer.\n */\nexport const useLexicalDocumentDrawer = (\n args: Parameters<UseDocumentDrawer>[0],\n): {\n closeDocumentDrawer: () => void\n DocumentDrawer: ReturnType<UseDocumentDrawer>[0]\n documentDrawerSlug: string\n DocumentDrawerToggler: ReturnType<UseDocumentDrawer>[1]\n} => {\n const [editor] = useLexicalComposerContext()\n const [selectionState, setSelectionState] = useState<BaseSelection | null>(null)\n const [wasOpen, setWasOpen] = useState<boolean>(false)\n\n const [\n DocumentDrawer,\n DocumentDrawerToggler,\n { closeDrawer: closeDrawer, drawerSlug: documentDrawerSlug },\n ] = useDocumentDrawer(args)\n const { modalState } = useModal()\n\n const storeSelection = useCallback(() => {\n editor.read(() => {\n const selection = $getSelection() ?? $getPreviousSelection()\n setSelectionState(selection)\n })\n setWasOpen(true)\n }, [editor])\n\n const restoreSelection = useCallback(() => {\n if (selectionState) {\n editor.update(\n () => {\n $setSelection(selectionState.clone())\n },\n { discrete: true, skipTransforms: true },\n )\n }\n }, [editor, selectionState])\n\n const closeDocumentDrawer = () => {\n //restoreSelection() // Should already be stored by the useEffect below\n closeDrawer()\n }\n\n // We need to handle drawer closing via a useEffect, as toggleDrawer / closeDrawer will not be triggered if the drawer\n // is closed by clicking outside of the drawer. This useEffect will handle everything.\n useEffect(() => {\n if (!wasOpen) {\n return\n }\n\n const thisModalState = modalState[documentDrawerSlug]\n // Exists in modalState (thus has opened at least once before) and is closed\n if (thisModalState && !thisModalState?.isOpen) {\n setWasOpen(false)\n setTimeout(() => {\n restoreSelection()\n }, 1)\n }\n }, [modalState, documentDrawerSlug, restoreSelection, wasOpen])\n\n return {\n closeDocumentDrawer,\n DocumentDrawer,\n documentDrawerSlug,\n DocumentDrawerToggler: (props) => <DocumentDrawerToggler {...props} onClick={storeSelection} />,\n }\n}\n"],"names":["useLexicalComposerContext","useDocumentDrawer","useModal","$getPreviousSelection","$getSelection","$setSelection","useCallback","useEffect","useState","useLexicalDocumentDrawer","args","editor","selectionState","setSelectionState","wasOpen","setWasOpen","DocumentDrawer","DocumentDrawerToggler","closeDrawer","drawerSlug","documentDrawerSlug","modalState","storeSelection","read","selection","restoreSelection","update","clone","discrete","skipTransforms","closeDocumentDrawer","thisModalState","isOpen","setTimeout","props","onClick"],"mappings":"AAAA;;AAIA,SAASA,yBAAyB,QAAQ,wCAAuC;AACjF,SAASC,iBAAiB,EAAEC,QAAQ,QAAQ,iBAAgB;AAC5D,SAASC,qBAAqB,EAAEC,aAAa,EAAEC,aAAa,QAAQ,UAAS;AAC7E,SAASC,WAAW,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,QAAO;AAExD;;;;CAIC,GACD,OAAO,MAAMC,2BAA2B,CACtCC;IAOA,MAAM,CAACC,OAAO,GAAGX;IACjB,MAAM,CAACY,gBAAgBC,kBAAkB,GAAGL,SAA+B;IAC3E,MAAM,CAACM,SAASC,WAAW,GAAGP,SAAkB;IAEhD,MAAM,CACJQ,gBACAC,uBACA,EAAEC,aAAaA,WAAW,EAAEC,YAAYC,kBAAkB,EAAE,CAC7D,GAAGnB,kBAAkBS;IACtB,MAAM,EAAEW,UAAU,EAAE,GAAGnB;IAEvB,MAAMoB,iBAAiBhB,YAAY;QACjCK,OAAOY,IAAI,CAAC;YACV,MAAMC,YAAYpB,mBAAmBD;YACrCU,kBAAkBW;QACpB;QACAT,WAAW;IACb,GAAG;QAACJ;KAAO;IAEX,MAAMc,mBAAmBnB,YAAY;QACnC,IAAIM,gBAAgB;YAClBD,OAAOe,MAAM,CACX;gBACErB,cAAcO,eAAee,KAAK;YACpC,GACA;gBAAEC,UAAU;gBAAMC,gBAAgB;YAAK;QAE3C;IACF,GAAG;QAAClB;QAAQC;KAAe;IAE3B,MAAMkB,sBAAsB;QAC1B,uEAAuE;QACvEZ;IACF;IAEA,sHAAsH;IACtH,sFAAsF;IACtFX,UAAU;QACR,IAAI,CAACO,SAAS;YACZ;QACF;QAEA,MAAMiB,iBAAiBV,UAAU,CAACD,mBAAmB;QACrD,4EAA4E;QAC5E,IAAIW,kBAAkB,CAACA,gBAAgBC,QAAQ;YAC7CjB,WAAW;YACXkB,WAAW;gBACTR;YACF,GAAG;QACL;IACF,GAAG;QAACJ;QAAYD;QAAoBK;QAAkBX;KAAQ;IAE9D,OAAO;QACLgB;QACAd;QACAI;QACAH,uBAAuB,CAACiB,sBAAU,
|
|
1
|
+
{"version":3,"sources":["../../../src/utilities/fieldsDrawer/useLexicalDocumentDrawer.tsx"],"sourcesContent":["'use client'\nimport type { UseDocumentDrawer } from '@payloadcms/ui'\nimport type { BaseSelection } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'\nimport { useDocumentDrawer, useModal } from '@payloadcms/ui'\nimport { $getPreviousSelection, $getSelection, $setSelection } from 'lexical'\nimport { useCallback, useEffect, useState } from 'react'\n\n/**\n *\n * Wrapper around useDocumentDrawer that restores and saves selection state (cursor position) when opening and closing the drawer.\n * By default, the lexical cursor position may be lost when opening a drawer and clicking somewhere on that drawer.\n */\nexport const useLexicalDocumentDrawer = (\n args: Parameters<UseDocumentDrawer>[0],\n): {\n closeDocumentDrawer: () => void\n DocumentDrawer: ReturnType<UseDocumentDrawer>[0]\n documentDrawerSlug: string\n DocumentDrawerToggler: ReturnType<UseDocumentDrawer>[1]\n} => {\n const [editor] = useLexicalComposerContext()\n const [selectionState, setSelectionState] = useState<BaseSelection | null>(null)\n const [wasOpen, setWasOpen] = useState<boolean>(false)\n\n const [\n DocumentDrawer,\n DocumentDrawerToggler,\n { closeDrawer: closeDrawer, drawerSlug: documentDrawerSlug },\n ] = useDocumentDrawer(args)\n const { modalState } = useModal()\n\n const storeSelection = useCallback(() => {\n editor.read(() => {\n const selection = $getSelection() ?? $getPreviousSelection()\n setSelectionState(selection)\n })\n setWasOpen(true)\n }, [editor])\n\n const restoreSelection = useCallback(() => {\n if (selectionState) {\n editor.update(\n () => {\n $setSelection(selectionState.clone())\n },\n { discrete: true, skipTransforms: true },\n )\n }\n }, [editor, selectionState])\n\n const closeDocumentDrawer = () => {\n //restoreSelection() // Should already be stored by the useEffect below\n closeDrawer()\n }\n\n // We need to handle drawer closing via a useEffect, as toggleDrawer / closeDrawer will not be triggered if the drawer\n // is closed by clicking outside of the drawer. This useEffect will handle everything.\n useEffect(() => {\n if (!wasOpen) {\n return\n }\n\n const thisModalState = modalState[documentDrawerSlug]\n // Exists in modalState (thus has opened at least once before) and is closed\n if (thisModalState && !thisModalState?.isOpen) {\n setWasOpen(false)\n setTimeout(() => {\n restoreSelection()\n }, 1)\n }\n }, [modalState, documentDrawerSlug, restoreSelection, wasOpen])\n\n return {\n closeDocumentDrawer,\n DocumentDrawer,\n documentDrawerSlug,\n DocumentDrawerToggler: (props) => <DocumentDrawerToggler {...props} onClick={storeSelection} />,\n }\n}\n"],"names":["useLexicalComposerContext","useDocumentDrawer","useModal","$getPreviousSelection","$getSelection","$setSelection","useCallback","useEffect","useState","useLexicalDocumentDrawer","args","editor","selectionState","setSelectionState","wasOpen","setWasOpen","DocumentDrawer","DocumentDrawerToggler","closeDrawer","drawerSlug","documentDrawerSlug","modalState","storeSelection","read","selection","restoreSelection","update","clone","discrete","skipTransforms","closeDocumentDrawer","thisModalState","isOpen","setTimeout","props","onClick"],"mappings":"AAAA;;AAIA,SAASA,yBAAyB,QAAQ,wCAAuC;AACjF,SAASC,iBAAiB,EAAEC,QAAQ,QAAQ,iBAAgB;AAC5D,SAASC,qBAAqB,EAAEC,aAAa,EAAEC,aAAa,QAAQ,UAAS;AAC7E,SAASC,WAAW,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,QAAO;AAExD;;;;CAIC,GACD,OAAO,MAAMC,2BAA2B,CACtCC;IAOA,MAAM,CAACC,OAAO,GAAGX;IACjB,MAAM,CAACY,gBAAgBC,kBAAkB,GAAGL,SAA+B;IAC3E,MAAM,CAACM,SAASC,WAAW,GAAGP,SAAkB;IAEhD,MAAM,CACJQ,gBACAC,uBACA,EAAEC,aAAaA,WAAW,EAAEC,YAAYC,kBAAkB,EAAE,CAC7D,GAAGnB,kBAAkBS;IACtB,MAAM,EAAEW,UAAU,EAAE,GAAGnB;IAEvB,MAAMoB,iBAAiBhB,YAAY;QACjCK,OAAOY,IAAI,CAAC;YACV,MAAMC,YAAYpB,mBAAmBD;YACrCU,kBAAkBW;QACpB;QACAT,WAAW;IACb,GAAG;QAACJ;KAAO;IAEX,MAAMc,mBAAmBnB,YAAY;QACnC,IAAIM,gBAAgB;YAClBD,OAAOe,MAAM,CACX;gBACErB,cAAcO,eAAee,KAAK;YACpC,GACA;gBAAEC,UAAU;gBAAMC,gBAAgB;YAAK;QAE3C;IACF,GAAG;QAAClB;QAAQC;KAAe;IAE3B,MAAMkB,sBAAsB;QAC1B,uEAAuE;QACvEZ;IACF;IAEA,sHAAsH;IACtH,sFAAsF;IACtFX,UAAU;QACR,IAAI,CAACO,SAAS;YACZ;QACF;QAEA,MAAMiB,iBAAiBV,UAAU,CAACD,mBAAmB;QACrD,4EAA4E;QAC5E,IAAIW,kBAAkB,CAACA,gBAAgBC,QAAQ;YAC7CjB,WAAW;YACXkB,WAAW;gBACTR;YACF,GAAG;QACL;IACF,GAAG;QAACJ;QAAYD;QAAoBK;QAAkBX;KAAQ;IAE9D,OAAO;QACLgB;QACAd;QACAI;QACAH,uBAAuB,CAACiB,sBAAU,QAACjB;gBAAuB,GAAGiB,KAAK;gBAAEC,SAASb;;;;;;IAC/E;AACF,EAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
2
|
+
import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
|
|
3
3
|
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
|
|
4
4
|
import { useListDrawer, useModal } from '@payloadcms/ui';
|
|
5
5
|
import { $getNodeByKey, $getPreviousSelection, $getRoot, $getSelection, $isRangeSelection, $setSelection } from 'lexical';
|
|
@@ -71,12 +71,16 @@ import { useCallback, useEffect, useState } from 'react';
|
|
|
71
71
|
isListDrawerOpen: isDrawerOpen,
|
|
72
72
|
ListDrawer: BaseListDrawer,
|
|
73
73
|
listDrawerSlug,
|
|
74
|
-
ListDrawerToggler: (props)=>/*#__PURE__*/
|
|
74
|
+
ListDrawerToggler: (props)=>/*#__PURE__*/ _jsxDEV(BaseListDrawerToggler, {
|
|
75
75
|
...props,
|
|
76
76
|
onClick: ()=>{
|
|
77
77
|
$storeSelection();
|
|
78
78
|
}
|
|
79
|
-
}
|
|
79
|
+
}, void 0, false, {
|
|
80
|
+
fileName: "src/utilities/fieldsDrawer/useLexicalListDrawer.tsx",
|
|
81
|
+
lineNumber: 103,
|
|
82
|
+
columnNumber: 7
|
|
83
|
+
}, this),
|
|
80
84
|
openListDrawer: ()=>{
|
|
81
85
|
$storeSelection();
|
|
82
86
|
baseOpenDrawer();
|