@payloadcms/richtext-lexical 3.68.0-internal-debug.591ab42 → 3.68.0-internal-debug.e9b66ee
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 +2 -21
- package/dist/cell/rscEntry.js.map +1 -1
- package/dist/features/blocks/client/component/BlockContent.js +13 -48
- package/dist/features/blocks/client/component/BlockContent.js.map +1 -1
- package/dist/features/blocks/client/component/components/BlockCollapsible.js +1 -10
- package/dist/features/blocks/client/component/components/BlockCollapsible.js.map +1 -1
- package/dist/features/blocks/client/component/components/BlockEditButton.js +1 -7
- package/dist/features/blocks/client/component/components/BlockEditButton.js.map +1 -1
- package/dist/features/blocks/client/component/components/BlockRemoveButton.js +1 -7
- package/dist/features/blocks/client/component/components/BlockRemoveButton.js.map +1 -1
- package/dist/features/blocks/client/component/index.js +81 -247
- package/dist/features/blocks/client/component/index.js.map +1 -1
- package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.js +1 -9
- package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.js.map +1 -1
- package/dist/features/blocks/client/componentInline/components/InlineBlockEditButton.js +1 -7
- package/dist/features/blocks/client/componentInline/components/InlineBlockEditButton.js.map +1 -1
- package/dist/features/blocks/client/componentInline/components/InlineBlockLabel.js +1 -7
- package/dist/features/blocks/client/componentInline/components/InlineBlockLabel.js.map +1 -1
- package/dist/features/blocks/client/componentInline/components/InlineBlockRemoveButton.js +1 -7
- package/dist/features/blocks/client/componentInline/components/InlineBlockRemoveButton.js.map +1 -1
- package/dist/features/blocks/client/componentInline/index.js +68 -217
- package/dist/features/blocks/client/componentInline/index.js.map +1 -1
- package/dist/features/blocks/client/getBlockImageComponent.js +4 -15
- package/dist/features/blocks/client/getBlockImageComponent.js.map +1 -1
- package/dist/features/blocks/client/nodes/BlocksNode.js +1 -12
- package/dist/features/blocks/client/nodes/BlocksNode.js.map +1 -1
- package/dist/features/blocks/client/nodes/InlineBlocksNode.js +2 -12
- package/dist/features/blocks/client/nodes/InlineBlocksNode.js.map +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/Block.js +26 -127
- package/dist/features/blocks/premade/CodeBlock/Component/Block.js.map +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/Code.js +49 -65
- package/dist/features/blocks/premade/CodeBlock/Component/Code.js.map +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.js +3 -16
- package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.js.map +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.js +4 -25
- package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.js.map +1 -1
- package/dist/features/blocks/server/nodes/BlocksNode.js.map +1 -1
- package/dist/features/blocks/server/nodes/InlineBlocksNode.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/Component/index.js +2 -13
- package/dist/features/converters/lexicalToJSX/Component/index.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.js +1 -8
- package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/heading.js +1 -8
- package/dist/features/converters/lexicalToJSX/converter/converters/heading.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.js +1 -6
- package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.js +1 -6
- package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/link.js +10 -19
- package/dist/features/converters/lexicalToJSX/converter/converters/link.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/list.js +16 -63
- package/dist/features/converters/lexicalToJSX/converter/converters/list.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.js +4 -19
- package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/table.js +12 -45
- package/dist/features/converters/lexicalToJSX/converter/converters/table.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/text.js +11 -57
- package/dist/features/converters/lexicalToJSX/converter/converters/text.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/upload.js +7 -46
- package/dist/features/converters/lexicalToJSX/converter/converters/upload.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/index.js +5 -12
- package/dist/features/converters/lexicalToJSX/converter/index.js.map +1 -1
- package/dist/features/debug/jsxConverter/client/plugin/index.js +3 -16
- package/dist/features/debug/jsxConverter/client/plugin/index.js.map +1 -1
- package/dist/features/debug/testRecorder/client/plugin/index.js +38 -113
- package/dist/features/debug/testRecorder/client/plugin/index.js.map +1 -1
- package/dist/features/debug/treeView/client/plugin/index.js +1 -15
- package/dist/features/debug/treeView/client/plugin/index.js.map +1 -1
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js +79 -357
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js.map +1 -1
- package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js +7 -41
- package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js.map +1 -1
- package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js +9 -39
- package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js.map +1 -1
- package/dist/features/experimental_table/client/plugins/TablePlugin/index.js +28 -59
- package/dist/features/experimental_table/client/plugins/TablePlugin/index.js.map +1 -1
- package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js +0 -1
- package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js.map +1 -1
- package/dist/features/indent/client/IndentPlugin.js +1 -6
- package/dist/features/indent/client/IndentPlugin.js.map +1 -1
- package/dist/features/link/client/plugins/clickableLink/index.js +1 -7
- package/dist/features/link/client/plugins/clickableLink/index.js.map +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +59 -151
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/index.js +1 -9
- package/dist/features/link/client/plugins/floatingLinkEditor/index.js.map +1 -1
- package/dist/features/link/nodes/LinkNode.js.map +1 -1
- package/dist/features/lists/checklist/client/plugin/index.js +1 -7
- package/dist/features/lists/checklist/client/plugin/index.js.map +1 -1
- package/dist/features/lists/plugin/index.js +1 -7
- package/dist/features/lists/plugin/index.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js +3 -18
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js +2 -9
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js +3 -18
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js +2 -9
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
- package/dist/features/relationship/client/components/RelationshipComponent.js +31 -100
- package/dist/features/relationship/client/components/RelationshipComponent.js.map +1 -1
- package/dist/features/relationship/client/drawer/index.js +4 -21
- package/dist/features/relationship/client/drawer/index.js.map +1 -1
- package/dist/features/relationship/client/nodes/RelationshipNode.js +2 -12
- package/dist/features/relationship/client/nodes/RelationshipNode.js.map +1 -1
- package/dist/features/relationship/client/plugins/index.js +1 -8
- package/dist/features/relationship/client/plugins/index.js.map +1 -1
- package/dist/features/relationship/server/nodes/RelationshipNode.js.map +1 -1
- package/dist/features/textState/feature.client.js +5 -22
- package/dist/features/textState/feature.client.js.map +1 -1
- package/dist/features/toolbars/fixed/client/Toolbar/index.js +27 -123
- package/dist/features/toolbars/fixed/client/Toolbar/index.js.map +1 -1
- package/dist/features/toolbars/inline/client/Toolbar/index.js +18 -111
- package/dist/features/toolbars/inline/client/Toolbar/index.js.map +1 -1
- package/dist/features/toolbars/shared/ToolbarButton/index.js +4 -14
- package/dist/features/toolbars/shared/ToolbarButton/index.js.map +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js +56 -135
- package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/index.js +16 -70
- package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -1
- package/dist/features/upload/client/component/index.js +43 -167
- package/dist/features/upload/client/component/index.js.map +1 -1
- package/dist/features/upload/client/component/pending/index.js +3 -16
- package/dist/features/upload/client/component/pending/index.js.map +1 -1
- package/dist/features/upload/client/drawer/index.js +4 -21
- package/dist/features/upload/client/drawer/index.js.map +1 -1
- package/dist/features/upload/client/nodes/UploadNode.js +3 -17
- package/dist/features/upload/client/nodes/UploadNode.js.map +1 -1
- package/dist/features/upload/client/plugin/index.js +2 -9
- package/dist/features/upload/client/plugin/index.js.map +1 -1
- package/dist/features/upload/server/nodes/UploadNode.js.map +1 -1
- package/dist/field/Diff/converters/listitem/index.js +11 -54
- package/dist/field/Diff/converters/listitem/index.js.map +1 -1
- package/dist/field/Diff/converters/relationship/index.js +18 -60
- package/dist/field/Diff/converters/relationship/index.js.map +1 -1
- package/dist/field/Diff/converters/unknown/index.js +7 -42
- package/dist/field/Diff/converters/unknown/index.js.map +1 -1
- package/dist/field/Diff/converters/upload/index.js +21 -91
- package/dist/field/Diff/converters/upload/index.js.map +1 -1
- package/dist/field/Diff/index.js +4 -17
- package/dist/field/Diff/index.js.map +1 -1
- package/dist/field/Field.js +25 -124
- package/dist/field/Field.js.map +1 -1
- package/dist/field/RenderLexical/index.js +15 -47
- package/dist/field/RenderLexical/index.js.map +1 -1
- package/dist/field/index.js +5 -24
- package/dist/field/index.js.map +1 -1
- package/dist/field/rscEntry.js +1 -9
- package/dist/field/rscEntry.js.map +1 -1
- package/dist/lexical/EditorPlugin.js +2 -17
- package/dist/lexical/EditorPlugin.js.map +1 -1
- package/dist/lexical/LexicalEditor.js +69 -232
- package/dist/lexical/LexicalEditor.js.map +1 -1
- package/dist/lexical/LexicalProvider.js +13 -64
- package/dist/lexical/LexicalProvider.js.map +1 -1
- package/dist/lexical/config/client/EditorConfigProvider.js +2 -11
- package/dist/lexical/config/client/EditorConfigProvider.js.map +1 -1
- package/dist/lexical/plugins/InsertParagraphAtEnd/index.js +5 -28
- package/dist/lexical/plugins/InsertParagraphAtEnd/index.js.map +1 -1
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js +1 -14
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js.map +1 -1
- package/dist/lexical/plugins/SlashMenu/index.js +31 -98
- package/dist/lexical/plugins/SlashMenu/index.js.map +1 -1
- package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js +7 -27
- package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +7 -45
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
- package/dist/lexical/ui/ContentEditable.js +3 -18
- package/dist/lexical/ui/ContentEditable.js.map +1 -1
- package/dist/lexical/ui/icons/AI/index.js +10 -58
- package/dist/lexical/ui/icons/AI/index.js.map +1 -1
- package/dist/lexical/ui/icons/Add/index.js +4 -31
- package/dist/lexical/ui/icons/Add/index.js.map +1 -1
- package/dist/lexical/ui/icons/AlignCenter/index.js +5 -45
- package/dist/lexical/ui/icons/AlignCenter/index.js.map +1 -1
- package/dist/lexical/ui/icons/AlignJustify/index.js +5 -45
- package/dist/lexical/ui/icons/AlignJustify/index.js.map +1 -1
- package/dist/lexical/ui/icons/AlignLeft/index.js +5 -45
- package/dist/lexical/ui/icons/AlignLeft/index.js.map +1 -1
- package/dist/lexical/ui/icons/AlignRight/index.js +5 -45
- package/dist/lexical/ui/icons/AlignRight/index.js.map +1 -1
- package/dist/lexical/ui/icons/Block/index.js +5 -54
- package/dist/lexical/ui/icons/Block/index.js.map +1 -1
- package/dist/lexical/ui/icons/Blockquote/index.js +3 -24
- package/dist/lexical/ui/icons/Blockquote/index.js.map +1 -1
- package/dist/lexical/ui/icons/Bold/index.js +3 -24
- package/dist/lexical/ui/icons/Bold/index.js.map +1 -1
- package/dist/lexical/ui/icons/Checklist/index.js +4 -39
- package/dist/lexical/ui/icons/Checklist/index.js.map +1 -1
- package/dist/lexical/ui/icons/Code/index.js +4 -34
- package/dist/lexical/ui/icons/Code/index.js.map +1 -1
- package/dist/lexical/ui/icons/CodeBlock/index.js +3 -22
- package/dist/lexical/ui/icons/CodeBlock/index.js.map +1 -1
- package/dist/lexical/ui/icons/Collapse/index.js +3 -23
- package/dist/lexical/ui/icons/Collapse/index.js.map +1 -1
- package/dist/lexical/ui/icons/H1/index.js +3 -24
- package/dist/lexical/ui/icons/H1/index.js.map +1 -1
- package/dist/lexical/ui/icons/H2/index.js +3 -24
- package/dist/lexical/ui/icons/H2/index.js.map +1 -1
- package/dist/lexical/ui/icons/H3/index.js +3 -24
- package/dist/lexical/ui/icons/H3/index.js.map +1 -1
- package/dist/lexical/ui/icons/H4/index.js +3 -24
- package/dist/lexical/ui/icons/H4/index.js.map +1 -1
- package/dist/lexical/ui/icons/H5/index.js +3 -24
- package/dist/lexical/ui/icons/H5/index.js.map +1 -1
- package/dist/lexical/ui/icons/H6/index.js +3 -24
- package/dist/lexical/ui/icons/H6/index.js.map +1 -1
- package/dist/lexical/ui/icons/HorizontalRule/index.js +3 -27
- package/dist/lexical/ui/icons/HorizontalRule/index.js.map +1 -1
- package/dist/lexical/ui/icons/IndentDecrease/index.js +6 -53
- package/dist/lexical/ui/icons/IndentDecrease/index.js.map +1 -1
- package/dist/lexical/ui/icons/IndentIncrease/index.js +6 -53
- package/dist/lexical/ui/icons/IndentIncrease/index.js.map +1 -1
- package/dist/lexical/ui/icons/InlineBlocks/index.js +3 -26
- package/dist/lexical/ui/icons/InlineBlocks/index.js.map +1 -1
- package/dist/lexical/ui/icons/Italic/index.js +3 -24
- package/dist/lexical/ui/icons/Italic/index.js.map +1 -1
- package/dist/lexical/ui/icons/Link/index.js +3 -25
- package/dist/lexical/ui/icons/Link/index.js.map +1 -1
- package/dist/lexical/ui/icons/Meatballs/index.js +5 -39
- package/dist/lexical/ui/icons/Meatballs/index.js.map +1 -1
- package/dist/lexical/ui/icons/OrderedList/index.js +7 -61
- package/dist/lexical/ui/icons/OrderedList/index.js.map +1 -1
- package/dist/lexical/ui/icons/Relationship/index.js +10 -58
- package/dist/lexical/ui/icons/Relationship/index.js.map +1 -1
- package/dist/lexical/ui/icons/Strikethrough/index.js +4 -34
- package/dist/lexical/ui/icons/Strikethrough/index.js.map +1 -1
- package/dist/lexical/ui/icons/Subscript/index.js +3 -24
- package/dist/lexical/ui/icons/Subscript/index.js.map +1 -1
- package/dist/lexical/ui/icons/Superscript/index.js +3 -24
- package/dist/lexical/ui/icons/Superscript/index.js.map +1 -1
- package/dist/lexical/ui/icons/Table/index.js +3 -24
- package/dist/lexical/ui/icons/Table/index.js.map +1 -1
- package/dist/lexical/ui/icons/Text/index.js +3 -24
- package/dist/lexical/ui/icons/Text/index.js.map +1 -1
- package/dist/lexical/ui/icons/TextState/index.js +12 -18
- package/dist/lexical/ui/icons/TextState/index.js.map +1 -1
- package/dist/lexical/ui/icons/Underline/index.js +4 -34
- package/dist/lexical/ui/icons/Underline/index.js.map +1 -1
- package/dist/lexical/ui/icons/UnorderedList/index.js +8 -81
- package/dist/lexical/ui/icons/UnorderedList/index.js.map +1 -1
- package/dist/lexical/ui/icons/Upload/index.js +5 -48
- package/dist/lexical/ui/icons/Upload/index.js.map +1 -1
- package/dist/lexical/utils/point.js.map +1 -1
- package/dist/lexical/utils/rect.js.map +1 -1
- package/dist/utilities/fieldsDrawer/Drawer.js +16 -41
- package/dist/utilities/fieldsDrawer/Drawer.js.map +1 -1
- package/dist/utilities/fieldsDrawer/DrawerContent.js +10 -42
- package/dist/utilities/fieldsDrawer/DrawerContent.js.map +1 -1
- package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js +1 -9
- package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js.map +1 -1
- package/dist/utilities/fieldsDrawer/useLexicalListDrawer.js +3 -11
- package/dist/utilities/fieldsDrawer/useLexicalListDrawer.js.map +1 -1
- package/package.json +7 -7
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
|
|
3
2
|
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
|
|
4
3
|
import { useLexicalEditable } from '@lexical/react/useLexicalEditable';
|
|
5
4
|
import { $computeTableMapSkipCellCheck, $deleteTableColumnAtSelection, $deleteTableRowAtSelection, $getNodeTriplet, $getTableCellNodeFromLexicalNode, $getTableColumnIndexFromTableCellNode, $getTableNodeFromLexicalNodeOrThrow, $getTableRowIndexFromTableCellNode, $insertTableColumnAtSelection, $insertTableRowAtSelection, $isTableCellNode, $isTableSelection, $mergeCells, $unmergeCell, getTableElement, getTableObserverFromTableElement, TableCellHeaderStates, TableCellNode } from '@lexical/table';
|
|
@@ -307,312 +306,76 @@ function TableActionMenu({ cellMerge, contextRef, onClose, setIsMenuOpen, tableC
|
|
|
307
306
|
let mergeCellButton = null;
|
|
308
307
|
if (cellMerge) {
|
|
309
308
|
if (canMergeCells) {
|
|
310
|
-
mergeCellButton =
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
onClick: ()=>mergeTableCellsAtSelection(),
|
|
314
|
-
type: "button",
|
|
315
|
-
children: /*#__PURE__*/ _jsxDEV("span", {
|
|
316
|
-
className: "text",
|
|
317
|
-
children: "Merge cells"
|
|
318
|
-
}, void 0, false, {
|
|
319
|
-
fileName: "src/features/experimental_table/client/plugins/TableActionMenuPlugin/index.tsx",
|
|
320
|
-
lineNumber: 384,
|
|
321
|
-
columnNumber: 11
|
|
322
|
-
}, this)
|
|
323
|
-
}, void 0, false, {
|
|
324
|
-
fileName: "src/features/experimental_table/client/plugins/TableActionMenuPlugin/index.tsx",
|
|
325
|
-
lineNumber: 378,
|
|
326
|
-
columnNumber: 9
|
|
327
|
-
}, this);
|
|
309
|
+
mergeCellButton = <button className="item" data-test-id="table-merge-cells" onClick={()=>mergeTableCellsAtSelection()} type="button">
|
|
310
|
+
<span className="text">Merge cells</span>
|
|
311
|
+
</button>;
|
|
328
312
|
} else if (canUnmergeCell) {
|
|
329
|
-
mergeCellButton =
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
onClick: ()=>unmergeTableCellsAtSelection(),
|
|
333
|
-
type: "button",
|
|
334
|
-
children: /*#__PURE__*/ _jsxDEV("span", {
|
|
335
|
-
className: "text",
|
|
336
|
-
children: "Unmerge cells"
|
|
337
|
-
}, void 0, false, {
|
|
338
|
-
fileName: "src/features/experimental_table/client/plugins/TableActionMenuPlugin/index.tsx",
|
|
339
|
-
lineNumber: 395,
|
|
340
|
-
columnNumber: 11
|
|
341
|
-
}, this)
|
|
342
|
-
}, void 0, false, {
|
|
343
|
-
fileName: "src/features/experimental_table/client/plugins/TableActionMenuPlugin/index.tsx",
|
|
344
|
-
lineNumber: 389,
|
|
345
|
-
columnNumber: 9
|
|
346
|
-
}, this);
|
|
313
|
+
mergeCellButton = <button className="item" data-test-id="table-unmerge-cells" onClick={()=>unmergeTableCellsAtSelection()} type="button">
|
|
314
|
+
<span className="text">Unmerge cells</span>
|
|
315
|
+
</button>;
|
|
347
316
|
}
|
|
348
317
|
}
|
|
349
|
-
return
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
onClick: ()=>insertTableRowAtSelection(false),
|
|
411
|
-
type: "button",
|
|
412
|
-
children: /*#__PURE__*/ _jsxDEV("span", {
|
|
413
|
-
className: "text",
|
|
414
|
-
children: [
|
|
415
|
-
"Insert ",
|
|
416
|
-
selectionCounts.rows === 1 ? 'row' : `${selectionCounts.rows} rows`,
|
|
417
|
-
" above"
|
|
418
|
-
]
|
|
419
|
-
}, void 0, true, {
|
|
420
|
-
fileName: "src/features/experimental_table/client/plugins/TableActionMenuPlugin/index.tsx",
|
|
421
|
-
lineNumber: 439,
|
|
422
|
-
columnNumber: 9
|
|
423
|
-
}, this)
|
|
424
|
-
}, void 0, false, {
|
|
425
|
-
fileName: "src/features/experimental_table/client/plugins/TableActionMenuPlugin/index.tsx",
|
|
426
|
-
lineNumber: 433,
|
|
427
|
-
columnNumber: 7
|
|
428
|
-
}, this),
|
|
429
|
-
/*#__PURE__*/ _jsxDEV("button", {
|
|
430
|
-
className: "item",
|
|
431
|
-
"data-test-id": "table-insert-row-below",
|
|
432
|
-
onClick: ()=>insertTableRowAtSelection(true),
|
|
433
|
-
type: "button",
|
|
434
|
-
children: /*#__PURE__*/ _jsxDEV("span", {
|
|
435
|
-
className: "text",
|
|
436
|
-
children: [
|
|
437
|
-
"Insert ",
|
|
438
|
-
selectionCounts.rows === 1 ? 'row' : `${selectionCounts.rows} rows`,
|
|
439
|
-
" below"
|
|
440
|
-
]
|
|
441
|
-
}, void 0, true, {
|
|
442
|
-
fileName: "src/features/experimental_table/client/plugins/TableActionMenuPlugin/index.tsx",
|
|
443
|
-
lineNumber: 449,
|
|
444
|
-
columnNumber: 9
|
|
445
|
-
}, this)
|
|
446
|
-
}, void 0, false, {
|
|
447
|
-
fileName: "src/features/experimental_table/client/plugins/TableActionMenuPlugin/index.tsx",
|
|
448
|
-
lineNumber: 443,
|
|
449
|
-
columnNumber: 7
|
|
450
|
-
}, this),
|
|
451
|
-
/*#__PURE__*/ _jsxDEV("hr", {}, void 0, false, {
|
|
452
|
-
fileName: "src/features/experimental_table/client/plugins/TableActionMenuPlugin/index.tsx",
|
|
453
|
-
lineNumber: 453,
|
|
454
|
-
columnNumber: 7
|
|
455
|
-
}, this),
|
|
456
|
-
/*#__PURE__*/ _jsxDEV("button", {
|
|
457
|
-
className: "item",
|
|
458
|
-
"data-test-id": "table-insert-column-before",
|
|
459
|
-
onClick: ()=>insertTableColumnAtSelection(false),
|
|
460
|
-
type: "button",
|
|
461
|
-
children: /*#__PURE__*/ _jsxDEV("span", {
|
|
462
|
-
className: "text",
|
|
463
|
-
children: [
|
|
464
|
-
"Insert ",
|
|
465
|
-
selectionCounts.columns === 1 ? 'column' : `${selectionCounts.columns} columns`,
|
|
466
|
-
' ',
|
|
467
|
-
"left"
|
|
468
|
-
]
|
|
469
|
-
}, void 0, true, {
|
|
470
|
-
fileName: "src/features/experimental_table/client/plugins/TableActionMenuPlugin/index.tsx",
|
|
471
|
-
lineNumber: 460,
|
|
472
|
-
columnNumber: 9
|
|
473
|
-
}, this)
|
|
474
|
-
}, void 0, false, {
|
|
475
|
-
fileName: "src/features/experimental_table/client/plugins/TableActionMenuPlugin/index.tsx",
|
|
476
|
-
lineNumber: 454,
|
|
477
|
-
columnNumber: 7
|
|
478
|
-
}, this),
|
|
479
|
-
/*#__PURE__*/ _jsxDEV("button", {
|
|
480
|
-
className: "item",
|
|
481
|
-
"data-test-id": "table-insert-column-after",
|
|
482
|
-
onClick: ()=>insertTableColumnAtSelection(true),
|
|
483
|
-
type: "button",
|
|
484
|
-
children: /*#__PURE__*/ _jsxDEV("span", {
|
|
485
|
-
className: "text",
|
|
486
|
-
children: [
|
|
487
|
-
"Insert ",
|
|
488
|
-
selectionCounts.columns === 1 ? 'column' : `${selectionCounts.columns} columns`,
|
|
489
|
-
' ',
|
|
490
|
-
"right"
|
|
491
|
-
]
|
|
492
|
-
}, void 0, true, {
|
|
493
|
-
fileName: "src/features/experimental_table/client/plugins/TableActionMenuPlugin/index.tsx",
|
|
494
|
-
lineNumber: 471,
|
|
495
|
-
columnNumber: 9
|
|
496
|
-
}, this)
|
|
497
|
-
}, void 0, false, {
|
|
498
|
-
fileName: "src/features/experimental_table/client/plugins/TableActionMenuPlugin/index.tsx",
|
|
499
|
-
lineNumber: 465,
|
|
500
|
-
columnNumber: 7
|
|
501
|
-
}, this),
|
|
502
|
-
/*#__PURE__*/ _jsxDEV("hr", {}, void 0, false, {
|
|
503
|
-
fileName: "src/features/experimental_table/client/plugins/TableActionMenuPlugin/index.tsx",
|
|
504
|
-
lineNumber: 476,
|
|
505
|
-
columnNumber: 7
|
|
506
|
-
}, this),
|
|
507
|
-
/*#__PURE__*/ _jsxDEV("button", {
|
|
508
|
-
className: "item",
|
|
509
|
-
"data-test-id": "table-delete-columns",
|
|
510
|
-
onClick: ()=>deleteTableColumnAtSelection(),
|
|
511
|
-
type: "button",
|
|
512
|
-
children: /*#__PURE__*/ _jsxDEV("span", {
|
|
513
|
-
className: "text",
|
|
514
|
-
children: "Delete column"
|
|
515
|
-
}, void 0, false, {
|
|
516
|
-
fileName: "src/features/experimental_table/client/plugins/TableActionMenuPlugin/index.tsx",
|
|
517
|
-
lineNumber: 483,
|
|
518
|
-
columnNumber: 9
|
|
519
|
-
}, this)
|
|
520
|
-
}, void 0, false, {
|
|
521
|
-
fileName: "src/features/experimental_table/client/plugins/TableActionMenuPlugin/index.tsx",
|
|
522
|
-
lineNumber: 477,
|
|
523
|
-
columnNumber: 7
|
|
524
|
-
}, this),
|
|
525
|
-
/*#__PURE__*/ _jsxDEV("button", {
|
|
526
|
-
className: "item",
|
|
527
|
-
"data-test-id": "table-delete-rows",
|
|
528
|
-
onClick: ()=>deleteTableRowAtSelection(),
|
|
529
|
-
type: "button",
|
|
530
|
-
children: /*#__PURE__*/ _jsxDEV("span", {
|
|
531
|
-
className: "text",
|
|
532
|
-
children: "Delete row"
|
|
533
|
-
}, void 0, false, {
|
|
534
|
-
fileName: "src/features/experimental_table/client/plugins/TableActionMenuPlugin/index.tsx",
|
|
535
|
-
lineNumber: 491,
|
|
536
|
-
columnNumber: 9
|
|
537
|
-
}, this)
|
|
538
|
-
}, void 0, false, {
|
|
539
|
-
fileName: "src/features/experimental_table/client/plugins/TableActionMenuPlugin/index.tsx",
|
|
540
|
-
lineNumber: 485,
|
|
541
|
-
columnNumber: 7
|
|
542
|
-
}, this),
|
|
543
|
-
/*#__PURE__*/ _jsxDEV("button", {
|
|
544
|
-
className: "item",
|
|
545
|
-
"data-test-id": "table-delete",
|
|
546
|
-
onClick: ()=>deleteTableAtSelection(),
|
|
547
|
-
type: "button",
|
|
548
|
-
children: /*#__PURE__*/ _jsxDEV("span", {
|
|
549
|
-
className: "text",
|
|
550
|
-
children: "Delete table"
|
|
551
|
-
}, void 0, false, {
|
|
552
|
-
fileName: "src/features/experimental_table/client/plugins/TableActionMenuPlugin/index.tsx",
|
|
553
|
-
lineNumber: 499,
|
|
554
|
-
columnNumber: 9
|
|
555
|
-
}, this)
|
|
556
|
-
}, void 0, false, {
|
|
557
|
-
fileName: "src/features/experimental_table/client/plugins/TableActionMenuPlugin/index.tsx",
|
|
558
|
-
lineNumber: 493,
|
|
559
|
-
columnNumber: 7
|
|
560
|
-
}, this),
|
|
561
|
-
/*#__PURE__*/ _jsxDEV("hr", {}, void 0, false, {
|
|
562
|
-
fileName: "src/features/experimental_table/client/plugins/TableActionMenuPlugin/index.tsx",
|
|
563
|
-
lineNumber: 501,
|
|
564
|
-
columnNumber: 7
|
|
565
|
-
}, this),
|
|
566
|
-
/*#__PURE__*/ _jsxDEV("button", {
|
|
567
|
-
className: "item",
|
|
568
|
-
"data-test-id": "table-row-header",
|
|
569
|
-
onClick: ()=>toggleTableRowIsHeader(),
|
|
570
|
-
type: "button",
|
|
571
|
-
children: /*#__PURE__*/ _jsxDEV("span", {
|
|
572
|
-
className: "text",
|
|
573
|
-
children: [
|
|
574
|
-
(tableCellNode.__headerState & TableCellHeaderStates.ROW) === TableCellHeaderStates.ROW ? 'Remove' : 'Add',
|
|
575
|
-
' ',
|
|
576
|
-
"row header"
|
|
577
|
-
]
|
|
578
|
-
}, void 0, true, {
|
|
579
|
-
fileName: "src/features/experimental_table/client/plugins/TableActionMenuPlugin/index.tsx",
|
|
580
|
-
lineNumber: 508,
|
|
581
|
-
columnNumber: 9
|
|
582
|
-
}, this)
|
|
583
|
-
}, void 0, false, {
|
|
584
|
-
fileName: "src/features/experimental_table/client/plugins/TableActionMenuPlugin/index.tsx",
|
|
585
|
-
lineNumber: 502,
|
|
586
|
-
columnNumber: 7
|
|
587
|
-
}, this),
|
|
588
|
-
/*#__PURE__*/ _jsxDEV("button", {
|
|
589
|
-
className: "item",
|
|
590
|
-
"data-test-id": "table-column-header",
|
|
591
|
-
onClick: ()=>toggleTableColumnIsHeader(),
|
|
592
|
-
type: "button",
|
|
593
|
-
children: /*#__PURE__*/ _jsxDEV("span", {
|
|
594
|
-
className: "text",
|
|
595
|
-
children: [
|
|
596
|
-
(tableCellNode.__headerState & TableCellHeaderStates.COLUMN) === TableCellHeaderStates.COLUMN ? 'Remove' : 'Add',
|
|
597
|
-
' ',
|
|
598
|
-
"column header"
|
|
599
|
-
]
|
|
600
|
-
}, void 0, true, {
|
|
601
|
-
fileName: "src/features/experimental_table/client/plugins/TableActionMenuPlugin/index.tsx",
|
|
602
|
-
lineNumber: 521,
|
|
603
|
-
columnNumber: 9
|
|
604
|
-
}, this)
|
|
605
|
-
}, void 0, false, {
|
|
606
|
-
fileName: "src/features/experimental_table/client/plugins/TableActionMenuPlugin/index.tsx",
|
|
607
|
-
lineNumber: 515,
|
|
608
|
-
columnNumber: 7
|
|
609
|
-
}, this)
|
|
610
|
-
]
|
|
611
|
-
}, void 0, true, {
|
|
612
|
-
fileName: "src/features/experimental_table/client/plugins/TableActionMenuPlugin/index.tsx",
|
|
613
|
-
lineNumber: 403,
|
|
614
|
-
columnNumber: 5
|
|
615
|
-
}, this), document.body);
|
|
318
|
+
return createPortal(<div className="table-action-menu-dropdown" onClick={(e)=>{
|
|
319
|
+
e.stopPropagation();
|
|
320
|
+
}} ref={dropDownRef}>
|
|
321
|
+
{mergeCellButton ? <React.Fragment>
|
|
322
|
+
{mergeCellButton}
|
|
323
|
+
<hr/>
|
|
324
|
+
</React.Fragment> : null}
|
|
325
|
+
|
|
326
|
+
<button className="item" data-test-id="table-row-striping" onClick={()=>toggleRowStriping()} type="button">
|
|
327
|
+
<span className="text">Toggle Row Striping</span>
|
|
328
|
+
</button>
|
|
329
|
+
<button className="item" data-test-id="table-freeze-first-column" onClick={()=>toggleFirstColumnFreeze()} type="button">
|
|
330
|
+
<span className="text">Toggle First Column Freeze</span>
|
|
331
|
+
</button>
|
|
332
|
+
<button className="item" data-test-id="table-insert-row-above" onClick={()=>insertTableRowAtSelection(false)} type="button">
|
|
333
|
+
<span className="text">
|
|
334
|
+
Insert {selectionCounts.rows === 1 ? 'row' : `${selectionCounts.rows} rows`} above
|
|
335
|
+
</span>
|
|
336
|
+
</button>
|
|
337
|
+
<button className="item" data-test-id="table-insert-row-below" onClick={()=>insertTableRowAtSelection(true)} type="button">
|
|
338
|
+
<span className="text">
|
|
339
|
+
Insert {selectionCounts.rows === 1 ? 'row' : `${selectionCounts.rows} rows`} below
|
|
340
|
+
</span>
|
|
341
|
+
</button>
|
|
342
|
+
<hr/>
|
|
343
|
+
<button className="item" data-test-id="table-insert-column-before" onClick={()=>insertTableColumnAtSelection(false)} type="button">
|
|
344
|
+
<span className="text">
|
|
345
|
+
Insert {selectionCounts.columns === 1 ? 'column' : `${selectionCounts.columns} columns`}{' '}
|
|
346
|
+
left
|
|
347
|
+
</span>
|
|
348
|
+
</button>
|
|
349
|
+
<button className="item" data-test-id="table-insert-column-after" onClick={()=>insertTableColumnAtSelection(true)} type="button">
|
|
350
|
+
<span className="text">
|
|
351
|
+
Insert {selectionCounts.columns === 1 ? 'column' : `${selectionCounts.columns} columns`}{' '}
|
|
352
|
+
right
|
|
353
|
+
</span>
|
|
354
|
+
</button>
|
|
355
|
+
<hr/>
|
|
356
|
+
<button className="item" data-test-id="table-delete-columns" onClick={()=>deleteTableColumnAtSelection()} type="button">
|
|
357
|
+
<span className="text">Delete column</span>
|
|
358
|
+
</button>
|
|
359
|
+
<button className="item" data-test-id="table-delete-rows" onClick={()=>deleteTableRowAtSelection()} type="button">
|
|
360
|
+
<span className="text">Delete row</span>
|
|
361
|
+
</button>
|
|
362
|
+
<button className="item" data-test-id="table-delete" onClick={()=>deleteTableAtSelection()} type="button">
|
|
363
|
+
<span className="text">Delete table</span>
|
|
364
|
+
</button>
|
|
365
|
+
<hr/>
|
|
366
|
+
<button className="item" data-test-id="table-row-header" onClick={()=>toggleTableRowIsHeader()} type="button">
|
|
367
|
+
<span className="text">
|
|
368
|
+
{(tableCellNode.__headerState & TableCellHeaderStates.ROW) === TableCellHeaderStates.ROW ? 'Remove' : 'Add'}{' '}
|
|
369
|
+
row header
|
|
370
|
+
</span>
|
|
371
|
+
</button>
|
|
372
|
+
<button className="item" data-test-id="table-column-header" onClick={()=>toggleTableColumnIsHeader()} type="button">
|
|
373
|
+
<span className="text">
|
|
374
|
+
{(tableCellNode.__headerState & TableCellHeaderStates.COLUMN) === TableCellHeaderStates.COLUMN ? 'Remove' : 'Add'}{' '}
|
|
375
|
+
column header
|
|
376
|
+
</span>
|
|
377
|
+
</button>
|
|
378
|
+
</div>, document.body);
|
|
616
379
|
}
|
|
617
380
|
function TableCellActionMenuContainer({ anchorElem, cellMerge }) {
|
|
618
381
|
const [editor] = useLexicalComposerContext();
|
|
@@ -720,62 +483,21 @@ function TableCellActionMenuContainer({ anchorElem, cellMerge }) {
|
|
|
720
483
|
prevTableCellDOM,
|
|
721
484
|
tableCellNode
|
|
722
485
|
]);
|
|
723
|
-
return
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
ref: menuRootRef,
|
|
735
|
-
type: "button",
|
|
736
|
-
children: /*#__PURE__*/ _jsxDEV(MeatballsIcon, {}, void 0, false, {
|
|
737
|
-
fileName: "src/features/experimental_table/client/plugins/TableActionMenuPlugin/index.tsx",
|
|
738
|
-
lineNumber: 684,
|
|
739
|
-
columnNumber: 13
|
|
740
|
-
}, this)
|
|
741
|
-
}, void 0, false, {
|
|
742
|
-
fileName: "src/features/experimental_table/client/plugins/TableActionMenuPlugin/index.tsx",
|
|
743
|
-
lineNumber: 675,
|
|
744
|
-
columnNumber: 11
|
|
745
|
-
}, this),
|
|
746
|
-
isMenuOpen && /*#__PURE__*/ _jsxDEV(TableActionMenu, {
|
|
747
|
-
cellMerge: cellMerge,
|
|
748
|
-
contextRef: menuRootRef,
|
|
749
|
-
onClose: ()=>setIsMenuOpen(false),
|
|
750
|
-
setIsMenuOpen: setIsMenuOpen,
|
|
751
|
-
tableCellNode: tableCellNode
|
|
752
|
-
}, void 0, false, {
|
|
753
|
-
fileName: "src/features/experimental_table/client/plugins/TableActionMenuPlugin/index.tsx",
|
|
754
|
-
lineNumber: 687,
|
|
755
|
-
columnNumber: 13
|
|
756
|
-
}, this)
|
|
757
|
-
]
|
|
758
|
-
}, void 0, true, {
|
|
759
|
-
fileName: "src/features/experimental_table/client/plugins/TableActionMenuPlugin/index.tsx",
|
|
760
|
-
lineNumber: 674,
|
|
761
|
-
columnNumber: 9
|
|
762
|
-
}, this)
|
|
763
|
-
}, void 0, false, {
|
|
764
|
-
fileName: "src/features/experimental_table/client/plugins/TableActionMenuPlugin/index.tsx",
|
|
765
|
-
lineNumber: 672,
|
|
766
|
-
columnNumber: 5
|
|
767
|
-
}, this);
|
|
486
|
+
return <div className="table-cell-action-button-container" ref={menuButtonRef}>
|
|
487
|
+
{tableCellNode != null && <React.Fragment>
|
|
488
|
+
<button className="table-cell-action-button" onClick={(e)=>{
|
|
489
|
+
e.stopPropagation();
|
|
490
|
+
setIsMenuOpen(!isMenuOpen);
|
|
491
|
+
}} ref={menuRootRef} type="button">
|
|
492
|
+
<MeatballsIcon/>
|
|
493
|
+
</button>
|
|
494
|
+
{isMenuOpen && <TableActionMenu cellMerge={cellMerge} contextRef={menuRootRef} onClose={()=>setIsMenuOpen(false)} setIsMenuOpen={setIsMenuOpen} tableCellNode={tableCellNode}/>}
|
|
495
|
+
</React.Fragment>}
|
|
496
|
+
</div>;
|
|
768
497
|
}
|
|
769
498
|
export const TableActionMenuPlugin = ({ anchorElem })=>{
|
|
770
499
|
const isEditable = useLexicalEditable();
|
|
771
|
-
return
|
|
772
|
-
anchorElem: anchorElem ?? document.body,
|
|
773
|
-
cellMerge: true
|
|
774
|
-
}, void 0, false, {
|
|
775
|
-
fileName: "src/features/experimental_table/client/plugins/TableActionMenuPlugin/index.tsx",
|
|
776
|
-
lineNumber: 705,
|
|
777
|
-
columnNumber: 7
|
|
778
|
-
}, this) : null, anchorElem ?? document.body);
|
|
500
|
+
return createPortal(isEditable ? <TableCellActionMenuContainer anchorElem={anchorElem ?? document.body} cellMerge/> : null, anchorElem ?? document.body);
|
|
779
501
|
};
|
|
780
502
|
|
|
781
503
|
//# sourceMappingURL=index.js.map
|