@payloadcms/richtext-lexical 3.0.0-canary.b8dd0db → 3.0.0-canary.bb00d64
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.d.ts +12 -0
- package/dist/cell/rscEntry.d.ts.map +1 -0
- package/dist/cell/rscEntry.js +82 -0
- package/dist/cell/rscEntry.js.map +1 -0
- package/dist/exports/client/Field-LKCJPU2R.js +2 -0
- package/dist/exports/client/Field-LKCJPU2R.js.map +7 -0
- package/dist/exports/client/RelationshipComponent-IMM4CFBE.js +2 -0
- package/dist/exports/client/RelationshipComponent-IMM4CFBE.js.map +7 -0
- package/dist/exports/client/bundled.css +1 -1
- package/dist/exports/client/chunk-5PBXL4HT.js +2 -0
- package/dist/exports/client/chunk-5PBXL4HT.js.map +7 -0
- package/dist/exports/client/chunk-NNE6RSU5.js +2 -0
- package/dist/exports/client/chunk-NNE6RSU5.js.map +7 -0
- package/dist/exports/client/{chunk-LGUXX2QH.js → chunk-O4IOO4EU.js} +2 -2
- package/dist/exports/client/{chunk-LGUXX2QH.js.map → chunk-O4IOO4EU.js.map} +2 -2
- package/dist/exports/client/chunk-PDAZFJVO.js +2 -0
- package/dist/exports/client/chunk-PDAZFJVO.js.map +7 -0
- package/dist/exports/client/chunk-PSABE6CO.js +2 -0
- package/dist/exports/client/chunk-PSABE6CO.js.map +7 -0
- package/dist/exports/client/{chunk-V2LKLT2F.js → chunk-XCEM47RI.js} +3 -3
- package/dist/exports/client/{chunk-V2LKLT2F.js.map → chunk-XCEM47RI.js.map} +3 -3
- package/dist/exports/client/chunk-ZFVIUTHB.js +2 -0
- package/dist/exports/client/chunk-ZFVIUTHB.js.map +7 -0
- package/dist/exports/client/{chunk-OKMIHD2R.js → chunk-ZOYGBIAN.js} +2 -2
- package/dist/exports/client/{chunk-OKMIHD2R.js.map → chunk-ZOYGBIAN.js.map} +2 -2
- package/dist/exports/client/component-4OBXHYCD.js +2 -0
- package/dist/exports/client/component-4OBXHYCD.js.map +7 -0
- package/dist/exports/client/component-ANB7VZLA.js +2 -0
- package/dist/exports/client/component-ANB7VZLA.js.map +7 -0
- package/dist/exports/client/component-P25AKAUU.js +2 -0
- package/dist/exports/client/component-P25AKAUU.js.map +7 -0
- package/dist/exports/client/componentInline-N5LJ2LY2.js +2 -0
- package/dist/exports/client/componentInline-N5LJ2LY2.js.map +7 -0
- package/dist/exports/client/index.d.ts +3 -4
- package/dist/exports/client/index.d.ts.map +1 -1
- package/dist/exports/client/index.js +7 -7
- package/dist/exports/client/index.js.map +4 -4
- package/dist/exports/server/rsc.d.ts +3 -0
- package/dist/exports/server/rsc.d.ts.map +1 -0
- package/dist/exports/server/rsc.js +3 -0
- package/dist/exports/server/rsc.js.map +1 -0
- package/dist/features/align/client/index.d.ts +1 -4
- package/dist/features/align/client/index.d.ts.map +1 -1
- package/dist/features/blockquote/client/index.d.ts +1 -4
- package/dist/features/blockquote/client/index.d.ts.map +1 -1
- package/dist/features/blockquote/markdownTransformer.js.map +1 -1
- package/dist/features/blockquote/server/index.d.ts +1 -1
- package/dist/features/blockquote/server/index.d.ts.map +1 -1
- package/dist/features/blockquote/server/index.js +5 -1
- package/dist/features/blockquote/server/index.js.map +1 -1
- package/dist/features/blocks/client/component/BlockContent.d.ts +1 -0
- package/dist/features/blocks/client/component/BlockContent.d.ts.map +1 -1
- package/dist/features/blocks/client/component/BlockContent.js +28 -28
- package/dist/features/blocks/client/component/BlockContent.js.map +1 -1
- package/dist/features/blocks/client/component/index.d.ts +1 -1
- package/dist/features/blocks/client/component/index.d.ts.map +1 -1
- package/dist/features/blocks/client/component/index.js +94 -55
- package/dist/features/blocks/client/component/index.js.map +1 -1
- package/dist/features/blocks/client/componentInline/index.d.ts +1 -1
- package/dist/features/blocks/client/componentInline/index.d.ts.map +1 -1
- package/dist/features/blocks/client/componentInline/index.js +27 -29
- package/dist/features/blocks/client/componentInline/index.js.map +1 -1
- package/dist/features/blocks/client/index.d.ts +1 -4
- package/dist/features/blocks/client/index.d.ts.map +1 -1
- package/dist/features/blocks/client/index.js +35 -23
- package/dist/features/blocks/client/index.js.map +1 -1
- package/dist/features/blocks/client/nodes/BlocksNode.d.ts +2 -2
- package/dist/features/blocks/client/nodes/BlocksNode.d.ts.map +1 -1
- package/dist/features/blocks/client/nodes/BlocksNode.js.map +1 -1
- package/dist/features/blocks/client/plugin/index.d.ts +2 -2
- package/dist/features/blocks/client/plugin/index.d.ts.map +1 -1
- package/dist/features/blocks/client/plugin/index.js +96 -93
- package/dist/features/blocks/client/plugin/index.js.map +1 -1
- package/dist/features/blocks/server/index.d.ts.map +1 -1
- package/dist/features/blocks/server/index.js +41 -27
- package/dist/features/blocks/server/index.js.map +1 -1
- package/dist/features/blocks/server/nodes/BlocksNode.d.ts +11 -5
- package/dist/features/blocks/server/nodes/BlocksNode.d.ts.map +1 -1
- package/dist/features/blocks/server/nodes/BlocksNode.js.map +1 -1
- package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts +3 -3
- package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts.map +1 -1
- package/dist/features/blocks/server/nodes/InlineBlocksNode.js.map +1 -1
- package/dist/features/blocks/server/validate.d.ts.map +1 -1
- package/dist/features/blocks/server/validate.js +8 -5
- package/dist/features/blocks/server/validate.js.map +1 -1
- package/dist/features/converters/html/converter/converters/paragraph.d.ts.map +1 -1
- package/dist/features/converters/html/converter/converters/paragraph.js +4 -0
- package/dist/features/converters/html/converter/converters/paragraph.js.map +1 -1
- package/dist/features/converters/html/converter/converters/text.d.ts.map +1 -1
- package/dist/features/converters/html/converter/converters/text.js +2 -1
- package/dist/features/converters/html/converter/converters/text.js.map +1 -1
- package/dist/features/converters/html/converter/index.d.ts +11 -7
- package/dist/features/converters/html/converter/index.d.ts.map +1 -1
- package/dist/features/converters/html/converter/index.js +17 -1
- package/dist/features/converters/html/converter/index.js.map +1 -1
- package/dist/features/converters/html/converter/types.d.ts +3 -1
- package/dist/features/converters/html/converter/types.d.ts.map +1 -1
- package/dist/features/converters/html/converter/types.js.map +1 -1
- package/dist/features/converters/html/field/index.d.ts.map +1 -1
- package/dist/features/converters/html/field/index.js +7 -1
- package/dist/features/converters/html/field/index.js.map +1 -1
- package/dist/features/debug/testRecorder/client/index.d.ts +1 -4
- package/dist/features/debug/testRecorder/client/index.d.ts.map +1 -1
- package/dist/features/debug/testRecorder/client/plugin/index.js +180 -345
- package/dist/features/debug/testRecorder/client/plugin/index.js.map +1 -1
- package/dist/features/debug/treeView/client/index.d.ts +1 -4
- package/dist/features/debug/treeView/client/index.d.ts.map +1 -1
- package/dist/features/experimental_table/client/index.d.ts +1 -1
- package/dist/features/experimental_table/client/index.d.ts.map +1 -1
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.d.ts.map +1 -1
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js +250 -488
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js.map +1 -1
- package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.d.ts.map +1 -1
- package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js +39 -39
- package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js.map +1 -1
- package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.d.ts +1 -1
- package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.d.ts.map +1 -1
- package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js +60 -124
- package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js.map +1 -1
- package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts.map +1 -1
- package/dist/features/experimental_table/client/plugins/TablePlugin/index.js +52 -50
- package/dist/features/experimental_table/client/plugins/TablePlugin/index.js.map +1 -1
- package/dist/features/experimental_table/client/utils/debounce.js +4 -4
- package/dist/features/experimental_table/client/utils/debounce.js.map +1 -1
- package/dist/features/experimental_table/client/utils/useDebounce.js.map +1 -1
- package/dist/features/experimental_table/server/index.d.ts.map +1 -1
- package/dist/features/experimental_table/server/index.js +20 -4
- package/dist/features/experimental_table/server/index.js.map +1 -1
- package/dist/features/format/bold/feature.client.d.ts +1 -4
- package/dist/features/format/bold/feature.client.d.ts.map +1 -1
- package/dist/features/format/inlineCode/feature.client.d.ts +1 -4
- package/dist/features/format/inlineCode/feature.client.d.ts.map +1 -1
- package/dist/features/format/italic/feature.client.d.ts +1 -4
- package/dist/features/format/italic/feature.client.d.ts.map +1 -1
- package/dist/features/format/strikethrough/feature.client.d.ts +1 -4
- package/dist/features/format/strikethrough/feature.client.d.ts.map +1 -1
- package/dist/features/format/subscript/feature.client.d.ts +1 -4
- package/dist/features/format/subscript/feature.client.d.ts.map +1 -1
- package/dist/features/format/superscript/feature.client.d.ts +1 -4
- package/dist/features/format/superscript/feature.client.d.ts.map +1 -1
- package/dist/features/format/underline/feature.client.d.ts +1 -4
- package/dist/features/format/underline/feature.client.d.ts.map +1 -1
- package/dist/features/heading/client/index.d.ts +1 -4
- package/dist/features/heading/client/index.d.ts.map +1 -1
- package/dist/features/heading/server/index.d.ts.map +1 -1
- package/dist/features/heading/server/index.js +4 -0
- package/dist/features/heading/server/index.js.map +1 -1
- package/dist/features/horizontalRule/client/component/index.d.ts +1 -1
- package/dist/features/horizontalRule/client/component/index.d.ts.map +1 -1
- package/dist/features/horizontalRule/client/component/index.js +12 -9
- package/dist/features/horizontalRule/client/component/index.js.map +1 -1
- package/dist/features/horizontalRule/client/index.d.ts +1 -4
- package/dist/features/horizontalRule/client/index.d.ts.map +1 -1
- package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts +2 -2
- package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts.map +1 -1
- package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js +1 -1
- package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js.map +1 -1
- package/dist/features/indent/client/index.d.ts +1 -4
- package/dist/features/indent/client/index.d.ts.map +1 -1
- package/dist/features/indent/client/index.js +2 -1
- package/dist/features/indent/client/index.js.map +1 -1
- package/dist/features/link/client/index.d.ts +1 -13
- package/dist/features/link/client/index.d.ts.map +1 -1
- package/dist/features/link/client/index.js +2 -2
- package/dist/features/link/client/index.js.map +1 -1
- package/dist/features/link/client/plugins/autoLink/index.d.ts +1 -1
- package/dist/features/link/client/plugins/autoLink/index.d.ts.map +1 -1
- package/dist/features/link/client/plugins/autoLink/index.js +3 -1
- package/dist/features/link/client/plugins/autoLink/index.js.map +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +21 -20
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/index.d.ts.map +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/index.js +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/index.js.map +1 -1
- package/dist/features/link/nodes/AutoLinkNode.js +2 -2
- package/dist/features/link/nodes/AutoLinkNode.js.map +1 -1
- package/dist/features/link/nodes/LinkNode.d.ts.map +1 -1
- package/dist/features/link/nodes/LinkNode.js +12 -7
- package/dist/features/link/nodes/LinkNode.js.map +1 -1
- package/dist/features/link/nodes/types.d.ts +3 -3
- package/dist/features/link/nodes/types.d.ts.map +1 -1
- package/dist/features/link/nodes/types.js.map +1 -1
- package/dist/features/link/server/baseFields.d.ts +1 -1
- package/dist/features/link/server/baseFields.d.ts.map +1 -1
- package/dist/features/link/server/baseFields.js +15 -3
- package/dist/features/link/server/baseFields.js.map +1 -1
- package/dist/features/link/server/index.d.ts.map +1 -1
- package/dist/features/link/server/index.js +17 -4
- package/dist/features/link/server/index.js.map +1 -1
- package/dist/features/link/server/transformExtraFields.d.ts +1 -1
- package/dist/features/link/server/transformExtraFields.d.ts.map +1 -1
- package/dist/features/link/server/transformExtraFields.js.map +1 -1
- package/dist/features/link/server/validate.d.ts.map +1 -1
- package/dist/features/link/server/validate.js +8 -5
- package/dist/features/link/server/validate.js.map +1 -1
- package/dist/features/lists/checklist/client/index.d.ts +1 -4
- package/dist/features/lists/checklist/client/index.d.ts.map +1 -1
- package/dist/features/lists/htmlConverter.d.ts.map +1 -1
- package/dist/features/lists/htmlConverter.js +8 -0
- package/dist/features/lists/htmlConverter.js.map +1 -1
- package/dist/features/lists/orderedList/client/index.d.ts +1 -4
- package/dist/features/lists/orderedList/client/index.d.ts.map +1 -1
- package/dist/features/lists/shared/markdown.js.map +1 -1
- package/dist/features/lists/unorderedList/client/index.d.ts +1 -4
- package/dist/features/lists/unorderedList/client/index.d.ts.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/index.d.ts.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/converter/index.js +1 -0
- package/dist/features/migrations/lexicalPluginToLexical/converter/index.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/feature.client.d.ts +1 -4
- package/dist/features/migrations/lexicalPluginToLexical/feature.client.d.ts.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/link/converter.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/index.d.ts.map +1 -1
- package/dist/features/migrations/slateToLexical/converter/index.js +1 -0
- package/dist/features/migrations/slateToLexical/converter/index.js.map +1 -1
- package/dist/features/migrations/slateToLexical/feature.client.d.ts +1 -4
- package/dist/features/migrations/slateToLexical/feature.client.d.ts.map +1 -1
- package/dist/features/migrations/slateToLexical/feature.client.js +1 -3
- package/dist/features/migrations/slateToLexical/feature.client.js.map +1 -1
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts +1 -1
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts.map +1 -1
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
- package/dist/features/paragraph/client/index.d.ts +1 -4
- package/dist/features/paragraph/client/index.d.ts.map +1 -1
- package/dist/features/paragraph/server/index.d.ts +1 -1
- package/dist/features/paragraph/server/index.d.ts.map +1 -1
- package/dist/features/relationship/client/components/RelationshipComponent.d.ts.map +1 -1
- package/dist/features/relationship/client/components/RelationshipComponent.js +42 -29
- package/dist/features/relationship/client/components/RelationshipComponent.js.map +1 -1
- package/dist/features/relationship/client/drawer/index.d.ts.map +1 -1
- package/dist/features/relationship/client/drawer/index.js +27 -26
- package/dist/features/relationship/client/drawer/index.js.map +1 -1
- package/dist/features/relationship/client/index.d.ts +2 -17
- package/dist/features/relationship/client/index.d.ts.map +1 -1
- package/dist/features/relationship/client/nodes/RelationshipNode.d.ts +1 -1
- package/dist/features/relationship/client/nodes/RelationshipNode.d.ts.map +1 -1
- package/dist/features/relationship/client/nodes/RelationshipNode.js.map +1 -1
- package/dist/features/relationship/client/plugins/index.js +1 -1
- package/dist/features/relationship/client/plugins/index.js.map +1 -1
- package/dist/features/relationship/client/utils/EnabledRelationshipsCondition.js +1 -1
- package/dist/features/relationship/client/utils/EnabledRelationshipsCondition.js.map +1 -1
- package/dist/features/relationship/server/index.d.ts +1 -1
- package/dist/features/relationship/server/index.d.ts.map +1 -1
- package/dist/features/relationship/server/index.js +50 -40
- package/dist/features/relationship/server/index.js.map +1 -1
- package/dist/features/relationship/server/nodes/RelationshipNode.d.ts +8 -6
- package/dist/features/relationship/server/nodes/RelationshipNode.d.ts.map +1 -1
- package/dist/features/relationship/server/nodes/RelationshipNode.js.map +1 -1
- package/dist/features/toolbars/fixed/client/Toolbar/index.d.ts.map +1 -1
- package/dist/features/toolbars/fixed/client/Toolbar/index.js +93 -66
- package/dist/features/toolbars/fixed/client/Toolbar/index.js.map +1 -1
- package/dist/features/toolbars/fixed/client/index.d.ts +1 -4
- package/dist/features/toolbars/fixed/client/index.d.ts.map +1 -1
- package/dist/features/toolbars/inline/client/Toolbar/index.js +43 -46
- package/dist/features/toolbars/inline/client/Toolbar/index.js.map +1 -1
- package/dist/features/toolbars/inline/client/index.d.ts +1 -4
- package/dist/features/toolbars/inline/client/index.d.ts.map +1 -1
- package/dist/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -1
- package/dist/features/toolbars/shared/ToolbarButton/index.js +4 -1
- package/dist/features/toolbars/shared/ToolbarButton/index.js.map +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts +2 -2
- package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts.map +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js +12 -6
- package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts +4 -5
- package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/index.js +119 -116
- package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -1
- package/dist/features/toolbars/types.d.ts +23 -11
- package/dist/features/toolbars/types.d.ts.map +1 -1
- package/dist/features/toolbars/types.js.map +1 -1
- package/dist/features/typesClient.d.ts +10 -11
- package/dist/features/typesClient.d.ts.map +1 -1
- package/dist/features/typesClient.js.map +1 -1
- package/dist/features/typesServer.d.ts +17 -26
- package/dist/features/typesServer.d.ts.map +1 -1
- package/dist/features/typesServer.js.map +1 -1
- package/dist/features/upload/client/component/index.d.ts.map +1 -1
- package/dist/features/upload/client/component/index.js +69 -58
- package/dist/features/upload/client/component/index.js.map +1 -1
- package/dist/features/upload/client/drawer/index.d.ts.map +1 -1
- package/dist/features/upload/client/drawer/index.js +34 -32
- package/dist/features/upload/client/drawer/index.js.map +1 -1
- package/dist/features/upload/client/feature.client.d.ts +1 -4
- package/dist/features/upload/client/feature.client.d.ts.map +1 -1
- package/dist/features/upload/client/nodes/UploadNode.d.ts.map +1 -1
- package/dist/features/upload/client/nodes/UploadNode.js +1 -1
- package/dist/features/upload/client/nodes/UploadNode.js.map +1 -1
- package/dist/features/upload/client/plugin/index.js +1 -1
- package/dist/features/upload/client/plugin/index.js.map +1 -1
- package/dist/features/upload/server/feature.server.d.ts.map +1 -1
- package/dist/features/upload/server/feature.server.js +17 -8
- package/dist/features/upload/server/feature.server.js.map +1 -1
- package/dist/features/upload/server/nodes/UploadNode.d.ts +9 -7
- package/dist/features/upload/server/nodes/UploadNode.d.ts.map +1 -1
- package/dist/features/upload/server/nodes/UploadNode.js.map +1 -1
- package/dist/features/upload/server/validate.d.ts.map +1 -1
- package/dist/features/upload/server/validate.js +7 -4
- package/dist/features/upload/server/validate.js.map +1 -1
- package/dist/field/Field.d.ts.map +1 -1
- package/dist/field/Field.js +29 -44
- package/dist/field/Field.js.map +1 -1
- package/dist/field/bundled.css +1 -1
- package/dist/field/index.d.ts.map +1 -1
- package/dist/field/index.js +63 -73
- package/dist/field/index.js.map +1 -1
- package/dist/field/rscEntry.d.ts +9 -0
- package/dist/field/rscEntry.d.ts.map +1 -0
- package/dist/field/rscEntry.js +37 -0
- package/dist/field/rscEntry.js.map +1 -0
- package/dist/index.d.ts +4 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +94 -103
- package/dist/index.js.map +1 -1
- package/dist/lexical/EditorPlugin.d.ts.map +1 -1
- package/dist/lexical/EditorPlugin.js +2 -1
- package/dist/lexical/EditorPlugin.js.map +1 -1
- package/dist/lexical/LexicalEditor.d.ts +1 -1
- package/dist/lexical/LexicalEditor.d.ts.map +1 -1
- package/dist/lexical/LexicalEditor.js +10 -10
- package/dist/lexical/LexicalEditor.js.map +1 -1
- package/dist/lexical/LexicalProvider.d.ts +2 -2
- package/dist/lexical/LexicalProvider.d.ts.map +1 -1
- package/dist/lexical/LexicalProvider.js +9 -7
- package/dist/lexical/LexicalProvider.js.map +1 -1
- package/dist/lexical/config/client/EditorConfigProvider.d.ts +6 -5
- package/dist/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
- package/dist/lexical/config/client/EditorConfigProvider.js +13 -12
- package/dist/lexical/config/client/EditorConfigProvider.js.map +1 -1
- package/dist/lexical/config/client/loader.d.ts +1 -3
- package/dist/lexical/config/client/loader.d.ts.map +1 -1
- package/dist/lexical/config/client/loader.js +7 -19
- package/dist/lexical/config/client/loader.js.map +1 -1
- package/dist/lexical/config/client/sanitize.d.ts +1 -1
- package/dist/lexical/config/client/sanitize.d.ts.map +1 -1
- package/dist/lexical/config/client/sanitize.js +4 -4
- package/dist/lexical/config/client/sanitize.js.map +1 -1
- package/dist/lexical/config/server/loader.d.ts +2 -1
- package/dist/lexical/config/server/loader.d.ts.map +1 -1
- package/dist/lexical/config/server/loader.js +2 -0
- package/dist/lexical/config/server/loader.js.map +1 -1
- package/dist/lexical/config/server/sanitize.d.ts +1 -1
- package/dist/lexical/config/server/sanitize.d.ts.map +1 -1
- package/dist/lexical/config/server/sanitize.js +12 -11
- package/dist/lexical/config/server/sanitize.js.map +1 -1
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts +4 -4
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts.map +1 -1
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +82 -113
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.d.ts +2 -2
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.d.ts.map +1 -1
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js +2 -2
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js.map +1 -1
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts +3 -2
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts.map +1 -1
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js.map +1 -1
- package/dist/lexical/plugins/SlashMenu/index.d.ts.map +1 -1
- package/dist/lexical/plugins/SlashMenu/index.js +24 -30
- package/dist/lexical/plugins/SlashMenu/index.js.map +1 -1
- package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts.map +1 -1
- package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js +93 -130
- package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.d.ts +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.d.ts.map +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.js +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.js.map +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/getBoundingRectWithoutTransform.js +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/getBoundingRectWithoutTransform.js.map +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts.map +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +119 -137
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.d.ts.map +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js +16 -32
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js.map +1 -1
- package/dist/lexical/plugins/handles/utils/doesLineHeightAffectElement.d.ts.map +1 -1
- package/dist/lexical/plugins/handles/utils/doesLineHeightAffectElement.js +3 -1
- package/dist/lexical/plugins/handles/utils/doesLineHeightAffectElement.js.map +1 -1
- package/dist/lexical/plugins/handles/utils/getNodeCloseToPoint.d.ts.map +1 -1
- package/dist/lexical/plugins/handles/utils/getNodeCloseToPoint.js +3 -4
- package/dist/lexical/plugins/handles/utils/getNodeCloseToPoint.js.map +1 -1
- package/dist/lexical/plugins/handles/utils/setHandlePosition.d.ts.map +1 -1
- package/dist/lexical/plugins/handles/utils/setHandlePosition.js +4 -6
- package/dist/lexical/plugins/handles/utils/setHandlePosition.js.map +1 -1
- package/dist/lexical/theme/EditorTheme.d.ts.map +1 -1
- package/dist/lexical/theme/EditorTheme.js +1 -2
- package/dist/lexical/theme/EditorTheme.js.map +1 -1
- package/dist/lexical/ui/icons/Caret/index.svg +2 -2
- package/dist/lexical/utils/nodeFormat.d.ts +2 -2
- package/dist/lexical/utils/nodeFormat.d.ts.map +1 -1
- package/dist/lexical/utils/nodeFormat.js.map +1 -1
- package/dist/lexical/utils/rect.d.ts +4 -4
- package/dist/lexical/utils/rect.d.ts.map +1 -1
- package/dist/lexical/utils/rect.js.map +1 -1
- package/dist/lexical/utils/setFloatingElemPosition.d.ts +1 -1
- package/dist/lexical/utils/setFloatingElemPosition.d.ts.map +1 -1
- package/dist/lexical/utils/setFloatingElemPosition.js +1 -1
- package/dist/lexical/utils/setFloatingElemPosition.js.map +1 -1
- package/dist/lexical/utils/url.d.ts +5 -0
- package/dist/lexical/utils/url.d.ts.map +1 -1
- package/dist/lexical/utils/url.js +25 -5
- package/dist/lexical/utils/url.js.map +1 -1
- package/dist/populateGraphQL/populate.d.ts +3 -2
- package/dist/populateGraphQL/populate.d.ts.map +1 -1
- package/dist/populateGraphQL/populate.js +3 -1
- package/dist/populateGraphQL/populate.js.map +1 -1
- package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts +1 -1
- package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts.map +1 -1
- package/dist/populateGraphQL/populateLexicalPopulationPromises.js +5 -4
- package/dist/populateGraphQL/populateLexicalPopulationPromises.js.map +1 -1
- package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.js.map +1 -1
- package/dist/types.d.ts +20 -7
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/utilities/createClientFeature.d.ts +3 -5
- package/dist/utilities/createClientFeature.d.ts.map +1 -1
- package/dist/utilities/createClientFeature.js +1 -4
- package/dist/utilities/createClientFeature.js.map +1 -1
- package/dist/utilities/createServerFeature.d.ts +1 -0
- package/dist/utilities/createServerFeature.d.ts.map +1 -1
- package/dist/utilities/createServerFeature.js +2 -0
- package/dist/utilities/createServerFeature.js.map +1 -1
- package/dist/utilities/fieldsDrawer/Drawer.d.ts +1 -0
- package/dist/utilities/fieldsDrawer/Drawer.d.ts.map +1 -1
- package/dist/utilities/fieldsDrawer/Drawer.js +68 -27
- package/dist/utilities/fieldsDrawer/Drawer.js.map +1 -1
- package/dist/utilities/fieldsDrawer/DrawerContent.d.ts.map +1 -1
- package/dist/utilities/fieldsDrawer/DrawerContent.js +115 -139
- package/dist/utilities/fieldsDrawer/DrawerContent.js.map +1 -1
- package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts +13 -0
- package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts.map +1 -0
- package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js +129 -0
- package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js.map +1 -0
- package/dist/utilities/fieldsDrawer/useLexicalDrawer.d.ts +10 -0
- package/dist/utilities/fieldsDrawer/useLexicalDrawer.d.ts.map +1 -0
- package/dist/utilities/fieldsDrawer/useLexicalDrawer.js +136 -0
- package/dist/utilities/fieldsDrawer/useLexicalDrawer.js.map +1 -0
- package/dist/utilities/fieldsDrawer/useLexicalListDrawer.d.ts +16 -0
- package/dist/utilities/fieldsDrawer/useLexicalListDrawer.d.ts.map +1 -0
- package/dist/utilities/fieldsDrawer/useLexicalListDrawer.js +144 -0
- package/dist/utilities/fieldsDrawer/useLexicalListDrawer.js.map +1 -0
- package/dist/utilities/generateImportMap.d.ts.map +1 -1
- package/dist/utilities/generateImportMap.js +2 -3
- package/dist/utilities/generateImportMap.js.map +1 -1
- package/dist/utilities/generateSchemaMap.d.ts.map +1 -1
- package/dist/utilities/generateSchemaMap.js +13 -10
- package/dist/utilities/generateSchemaMap.js.map +1 -1
- package/dist/utilities/initLexicalFeatures.d.ts +18 -0
- package/dist/utilities/initLexicalFeatures.d.ts.map +1 -0
- package/dist/utilities/initLexicalFeatures.js +95 -0
- package/dist/utilities/initLexicalFeatures.js.map +1 -0
- package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.d.ts +1 -1
- package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.d.ts.map +1 -1
- package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js +1 -1
- package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js.map +1 -1
- package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.d.ts +1 -1
- package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.d.ts.map +1 -1
- package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js +5 -1
- package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js.map +1 -1
- package/dist/utilities/useLexicalFeature.d.ts.map +1 -1
- package/dist/utilities/useLexicalFeature.js +12 -4
- package/dist/utilities/useLexicalFeature.js.map +1 -1
- package/dist/validate/index.d.ts.map +1 -1
- package/dist/validate/index.js +2 -2
- package/dist/validate/index.js.map +1 -1
- package/dist/validate/validateNodes.d.ts +2 -2
- package/dist/validate/validateNodes.d.ts.map +1 -1
- package/dist/validate/validateNodes.js +4 -4
- package/dist/validate/validateNodes.js.map +1 -1
- package/package.json +51 -49
- package/dist/cell/index.d.ts +0 -9
- package/dist/cell/index.d.ts.map +0 -1
- package/dist/cell/index.js +0 -135
- package/dist/cell/index.js.map +0 -1
- package/dist/exports/client/Field-63NGLPJB.js +0 -2
- package/dist/exports/client/Field-63NGLPJB.js.map +0 -7
- package/dist/exports/client/RelationshipComponent-3QWBV4GT.js +0 -2
- package/dist/exports/client/RelationshipComponent-3QWBV4GT.js.map +0 -7
- package/dist/exports/client/chunk-G5DTIOPI.js +0 -2
- package/dist/exports/client/chunk-G5DTIOPI.js.map +0 -7
- package/dist/exports/client/chunk-NI6Z4GBD.js +0 -2
- package/dist/exports/client/chunk-NI6Z4GBD.js.map +0 -7
- package/dist/exports/client/chunk-TO2W7Q2G.js +0 -2
- package/dist/exports/client/chunk-TO2W7Q2G.js.map +0 -7
- package/dist/exports/client/component-3OFD6Q4Z.js +0 -2
- package/dist/exports/client/component-3OFD6Q4Z.js.map +0 -7
- package/dist/exports/client/component-LCAAX56T.js +0 -2
- package/dist/exports/client/component-LCAAX56T.js.map +0 -7
- package/dist/exports/client/component-LLWMZU6K.js +0 -2
- package/dist/exports/client/component-LLWMZU6K.js.map +0 -7
- package/dist/exports/client/componentInline-72VZAAHP.js +0 -2
- package/dist/exports/client/componentInline-72VZAAHP.js.map +0 -7
- package/dist/features/createClientComponent.d.ts +0 -7
- package/dist/features/createClientComponent.d.ts.map +0 -1
- package/dist/features/createClientComponent.js +0 -13
- package/dist/features/createClientComponent.js.map +0 -1
- package/dist/features/createFeaturePropComponent.d.ts +0 -6
- package/dist/features/createFeaturePropComponent.d.ts.map +0 -1
- package/dist/features/createFeaturePropComponent.js +0 -19
- package/dist/features/createFeaturePropComponent.js.map +0 -1
- package/dist/utilities/generateComponentMap.d.ts +0 -6
- package/dist/utilities/generateComponentMap.d.ts.map +0 -1
- package/dist/utilities/generateComponentMap.js +0 -99
- package/dist/utilities/generateComponentMap.js.map +0 -1
|
@@ -4,7 +4,7 @@ import { c as _c } from "react/compiler-runtime";
|
|
|
4
4
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
|
|
6
6
|
import { useLexicalEditable } from '@lexical/react/useLexicalEditable';
|
|
7
|
-
import { $deleteTableColumn__EXPERIMENTAL, $deleteTableRow__EXPERIMENTAL, $getNodeTriplet, $getTableCellNodeFromLexicalNode, $getTableColumnIndexFromTableCellNode, $getTableNodeFromLexicalNodeOrThrow, $getTableRowIndexFromTableCellNode, $insertTableColumn__EXPERIMENTAL, $insertTableRow__EXPERIMENTAL, $isTableCellNode, $isTableRowNode, $isTableSelection, $unmergeCell, TableCellHeaderStates, TableCellNode
|
|
7
|
+
import { $deleteTableColumn__EXPERIMENTAL, $deleteTableRow__EXPERIMENTAL, $getNodeTriplet, $getTableCellNodeFromLexicalNode, $getTableColumnIndexFromTableCellNode, $getTableNodeFromLexicalNodeOrThrow, $getTableRowIndexFromTableCellNode, $insertTableColumn__EXPERIMENTAL, $insertTableRow__EXPERIMENTAL, $isTableCellNode, $isTableRowNode, $isTableSelection, $unmergeCell, getTableObserverFromTableElement, TableCellHeaderStates, TableCellNode } from '@lexical/table';
|
|
8
8
|
import { useScrollInfo } from '@payloadcms/ui';
|
|
9
9
|
import { $createParagraphNode, $getRoot, $getSelection, $isElementNode, $isParagraphNode, $isRangeSelection, $isTextNode } from 'lexical';
|
|
10
10
|
import * as React from 'react';
|
|
@@ -18,43 +18,6 @@ function computeSelectionCount(selection) {
|
|
|
18
18
|
rows: selectionShape.toY - selectionShape.fromY + 1
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
|
-
// This is important when merging cells as there is no good way to re-merge weird shapes (a result
|
|
22
|
-
// of selecting merged cells and non-merged)
|
|
23
|
-
function isTableSelectionRectangular(selection) {
|
|
24
|
-
const nodes = selection.getNodes();
|
|
25
|
-
const currentRows = [];
|
|
26
|
-
let currentRow = null;
|
|
27
|
-
let expectedColumns = null;
|
|
28
|
-
let currentColumns = 0;
|
|
29
|
-
for (let i = 0; i < nodes.length; i++) {
|
|
30
|
-
const node = nodes[i];
|
|
31
|
-
if ($isTableCellNode(node)) {
|
|
32
|
-
const row = node.getParentOrThrow();
|
|
33
|
-
if ($isTableRowNode(row)) {
|
|
34
|
-
throw new Error('Expected CellNode to have a RowNode parent');
|
|
35
|
-
}
|
|
36
|
-
if (currentRow !== row) {
|
|
37
|
-
if (expectedColumns !== null && currentColumns !== expectedColumns) {
|
|
38
|
-
return false;
|
|
39
|
-
}
|
|
40
|
-
if (currentRow !== null) {
|
|
41
|
-
expectedColumns = currentColumns;
|
|
42
|
-
}
|
|
43
|
-
currentRow = row;
|
|
44
|
-
currentColumns = 0;
|
|
45
|
-
}
|
|
46
|
-
const colSpan = node.__colSpan;
|
|
47
|
-
for (let j = 0; j < colSpan; j++) {
|
|
48
|
-
if (currentRows[currentColumns + j] === undefined) {
|
|
49
|
-
currentRows[currentColumns + j] = 0;
|
|
50
|
-
}
|
|
51
|
-
currentRows[currentColumns + j] += node.__rowSpan;
|
|
52
|
-
}
|
|
53
|
-
currentColumns += colSpan;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
return (expectedColumns === null || currentColumns === expectedColumns) && currentRows.every(v => v === currentRows[0]);
|
|
57
|
-
}
|
|
58
21
|
function $canUnmerge() {
|
|
59
22
|
const selection = $getSelection();
|
|
60
23
|
if ($isRangeSelection(selection) && !selection.isCollapsed() || $isTableSelection(selection) && !selection.anchor.is(selection.focus) || !$isRangeSelection(selection) && !$isTableSelection(selection)) {
|
|
@@ -83,39 +46,28 @@ function $selectLastDescendant(node) {
|
|
|
83
46
|
lastDescendant.selectNext();
|
|
84
47
|
}
|
|
85
48
|
}
|
|
86
|
-
function TableActionMenu(
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
tableCellNode: _tableCellNode
|
|
94
|
-
} = t0;
|
|
49
|
+
function TableActionMenu({
|
|
50
|
+
cellMerge,
|
|
51
|
+
contextRef,
|
|
52
|
+
onClose,
|
|
53
|
+
setIsMenuOpen,
|
|
54
|
+
tableCellNode: _tableCellNode
|
|
55
|
+
}) {
|
|
95
56
|
const [editor] = useLexicalComposerContext();
|
|
96
57
|
const dropDownRef = useRef(null);
|
|
97
58
|
const [tableCellNode, updateTableCellNode] = useState(_tableCellNode);
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
rows: 1
|
|
103
|
-
};
|
|
104
|
-
$[0] = t1;
|
|
105
|
-
} else {
|
|
106
|
-
t1 = $[0];
|
|
107
|
-
}
|
|
108
|
-
const [selectionCounts, updateSelectionCounts] = useState(t1);
|
|
59
|
+
const [selectionCounts, updateSelectionCounts] = useState({
|
|
60
|
+
columns: 1,
|
|
61
|
+
rows: 1
|
|
62
|
+
});
|
|
109
63
|
const [canMergeCells, setCanMergeCells] = useState(false);
|
|
110
64
|
const [canUnmergeCell, setCanUnmergeCell] = useState(false);
|
|
111
65
|
const {
|
|
112
66
|
y
|
|
113
67
|
} = useScrollInfo();
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
t2 = () => editor.registerMutationListener(TableCellNode, nodeMutations => {
|
|
118
|
-
const nodeUpdated = nodeMutations.get(tableCellNode.getKey()) === "updated";
|
|
68
|
+
useEffect(() => {
|
|
69
|
+
return editor.registerMutationListener(TableCellNode, nodeMutations => {
|
|
70
|
+
const nodeUpdated = nodeMutations.get(tableCellNode.getKey()) === 'updated';
|
|
119
71
|
if (nodeUpdated) {
|
|
120
72
|
editor.getEditorState().read(() => {
|
|
121
73
|
updateTableCellNode(tableCellNode.getLatest());
|
|
@@ -124,39 +76,20 @@ function TableActionMenu(t0) {
|
|
|
124
76
|
}, {
|
|
125
77
|
skipInitialization: true
|
|
126
78
|
});
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
editor.getEditorState().read(() => {
|
|
142
|
-
const selection = $getSelection();
|
|
143
|
-
if ($isTableSelection(selection)) {
|
|
144
|
-
const currentSelectionCounts = computeSelectionCount(selection);
|
|
145
|
-
updateSelectionCounts(computeSelectionCount(selection));
|
|
146
|
-
setCanMergeCells(isTableSelectionRectangular(selection) && (currentSelectionCounts.columns > 1 || currentSelectionCounts.rows > 1));
|
|
147
|
-
}
|
|
148
|
-
setCanUnmergeCell($canUnmerge());
|
|
149
|
-
});
|
|
150
|
-
};
|
|
151
|
-
t5 = [editor];
|
|
152
|
-
$[5] = editor;
|
|
153
|
-
$[6] = t4;
|
|
154
|
-
$[7] = t5;
|
|
155
|
-
} else {
|
|
156
|
-
t4 = $[6];
|
|
157
|
-
t5 = $[7];
|
|
158
|
-
}
|
|
159
|
-
useEffect(t4, t5);
|
|
79
|
+
}, [editor, tableCellNode]);
|
|
80
|
+
useEffect(() => {
|
|
81
|
+
editor.getEditorState().read(() => {
|
|
82
|
+
const selection = $getSelection();
|
|
83
|
+
// Merge cells
|
|
84
|
+
if ($isTableSelection(selection)) {
|
|
85
|
+
const currentSelectionCounts = computeSelectionCount(selection);
|
|
86
|
+
updateSelectionCounts(computeSelectionCount(selection));
|
|
87
|
+
setCanMergeCells(currentSelectionCounts.columns > 1 || currentSelectionCounts.rows > 1);
|
|
88
|
+
}
|
|
89
|
+
// Unmerge cell
|
|
90
|
+
setCanUnmergeCell($canUnmerge());
|
|
91
|
+
});
|
|
92
|
+
}, [editor]);
|
|
160
93
|
useEffect(() => {
|
|
161
94
|
const menuButtonElement = contextRef.current;
|
|
162
95
|
const dropDownElement = dropDownRef.current;
|
|
@@ -164,488 +97,317 @@ function TableActionMenu(t0) {
|
|
|
164
97
|
if (menuButtonElement != null && dropDownElement != null && rootElement != null) {
|
|
165
98
|
const rootEleRect = rootElement.getBoundingClientRect();
|
|
166
99
|
const menuButtonRect = menuButtonElement.getBoundingClientRect();
|
|
167
|
-
dropDownElement.style.opacity =
|
|
100
|
+
dropDownElement.style.opacity = '1';
|
|
168
101
|
const dropDownElementRect = dropDownElement.getBoundingClientRect();
|
|
169
|
-
|
|
102
|
+
const margin = 5;
|
|
103
|
+
let leftPosition = menuButtonRect.right + margin;
|
|
170
104
|
if (leftPosition + dropDownElementRect.width > window.innerWidth || leftPosition + dropDownElementRect.width > rootEleRect.right) {
|
|
171
|
-
const position = menuButtonRect.left - dropDownElementRect.width -
|
|
172
|
-
leftPosition = (position < 0 ?
|
|
105
|
+
const position = menuButtonRect.left - dropDownElementRect.width - margin;
|
|
106
|
+
leftPosition = (position < 0 ? margin : position) + window.pageXOffset;
|
|
173
107
|
}
|
|
174
108
|
dropDownElement.style.left = `${leftPosition + window.pageXOffset}px`;
|
|
175
109
|
let topPosition = menuButtonRect.top;
|
|
176
110
|
if (topPosition + dropDownElementRect.height > window.innerHeight) {
|
|
177
111
|
const position_0 = menuButtonRect.bottom - dropDownElementRect.height;
|
|
178
|
-
topPosition = (position_0 < 0 ?
|
|
112
|
+
topPosition = (position_0 < 0 ? margin : position_0) + window.pageYOffset;
|
|
179
113
|
}
|
|
180
114
|
dropDownElement.style.top = `${topPosition}px`;
|
|
181
115
|
}
|
|
182
116
|
}, [contextRef, dropDownRef, editor, y]);
|
|
183
|
-
let t6;
|
|
184
|
-
if ($[8] !== setIsMenuOpen || $[9] !== contextRef) {
|
|
185
|
-
t6 = [setIsMenuOpen, contextRef];
|
|
186
|
-
$[8] = setIsMenuOpen;
|
|
187
|
-
$[9] = contextRef;
|
|
188
|
-
$[10] = t6;
|
|
189
|
-
} else {
|
|
190
|
-
t6 = $[10];
|
|
191
|
-
}
|
|
192
117
|
useEffect(() => {
|
|
193
|
-
|
|
118
|
+
function handleClickOutside(event) {
|
|
194
119
|
if (dropDownRef.current != null && contextRef.current != null && !dropDownRef.current.contains(event.target) && !contextRef.current.contains(event.target)) {
|
|
195
120
|
setIsMenuOpen(false);
|
|
196
121
|
}
|
|
197
|
-
}
|
|
198
|
-
window.addEventListener(
|
|
199
|
-
return () => window.removeEventListener(
|
|
200
|
-
},
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
if (!tableElement) {
|
|
209
|
-
throw new Error("Expected to find tableElement in DOM");
|
|
210
|
-
}
|
|
211
|
-
const tableSelection = getTableObserverFromTableElement(tableElement);
|
|
212
|
-
if (tableSelection !== null) {
|
|
213
|
-
tableSelection.clearHighlight();
|
|
214
|
-
}
|
|
215
|
-
tableNode.markDirty();
|
|
216
|
-
updateTableCellNode(tableCellNode.getLatest());
|
|
122
|
+
}
|
|
123
|
+
window.addEventListener('click', handleClickOutside);
|
|
124
|
+
return () => window.removeEventListener('click', handleClickOutside);
|
|
125
|
+
}, [setIsMenuOpen, contextRef]);
|
|
126
|
+
const clearTableSelection = useCallback(() => {
|
|
127
|
+
editor.update(() => {
|
|
128
|
+
if (tableCellNode.isAttached()) {
|
|
129
|
+
const tableNode = $getTableNodeFromLexicalNodeOrThrow(tableCellNode);
|
|
130
|
+
const tableElement = editor.getElementByKey(tableNode.getKey());
|
|
131
|
+
if (!tableElement) {
|
|
132
|
+
throw new Error('Expected to find tableElement in DOM');
|
|
217
133
|
}
|
|
218
|
-
const
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
const
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
const isEmpty_0 = $cellContainsEmptyParagraph(node);
|
|
255
|
-
if (!isEmpty_0) {
|
|
256
|
-
firstCell.append(...node.getChildren());
|
|
257
|
-
}
|
|
258
|
-
node.remove();
|
|
259
|
-
}
|
|
134
|
+
const tableObserver = getTableObserverFromTableElement(tableElement);
|
|
135
|
+
if (tableObserver !== null) {
|
|
136
|
+
tableObserver.clearHighlight();
|
|
137
|
+
}
|
|
138
|
+
tableNode.markDirty();
|
|
139
|
+
updateTableCellNode(tableCellNode.getLatest());
|
|
140
|
+
}
|
|
141
|
+
const rootNode = $getRoot();
|
|
142
|
+
rootNode.selectStart();
|
|
143
|
+
});
|
|
144
|
+
}, [editor, tableCellNode]);
|
|
145
|
+
const mergeTableCellsAtSelection = () => {
|
|
146
|
+
editor.update(() => {
|
|
147
|
+
const selection_0 = $getSelection();
|
|
148
|
+
if ($isTableSelection(selection_0)) {
|
|
149
|
+
const {
|
|
150
|
+
columns,
|
|
151
|
+
rows
|
|
152
|
+
} = computeSelectionCount(selection_0);
|
|
153
|
+
const nodes = selection_0.getNodes();
|
|
154
|
+
let firstCell = null;
|
|
155
|
+
for (let i = 0; i < nodes.length; i++) {
|
|
156
|
+
const node = nodes[i];
|
|
157
|
+
if ($isTableCellNode(node)) {
|
|
158
|
+
if (firstCell === null) {
|
|
159
|
+
node.setColSpan(columns).setRowSpan(rows);
|
|
160
|
+
firstCell = node;
|
|
161
|
+
const isEmpty = $cellContainsEmptyParagraph(node);
|
|
162
|
+
let firstChild;
|
|
163
|
+
if (isEmpty && $isParagraphNode(firstChild = node.getFirstChild())) {
|
|
164
|
+
firstChild.remove();
|
|
165
|
+
}
|
|
166
|
+
} else if ($isTableCellNode(firstCell)) {
|
|
167
|
+
const isEmpty_0 = $cellContainsEmptyParagraph(node);
|
|
168
|
+
if (!isEmpty_0) {
|
|
169
|
+
firstCell.append(...node.getChildren());
|
|
260
170
|
}
|
|
171
|
+
node.remove();
|
|
261
172
|
}
|
|
262
173
|
}
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
$selectLastDescendant(firstCell);
|
|
174
|
+
}
|
|
175
|
+
if (firstCell !== null) {
|
|
176
|
+
if (firstCell.getChildrenSize() === 0) {
|
|
177
|
+
firstCell.append($createParagraphNode());
|
|
268
178
|
}
|
|
269
|
-
|
|
179
|
+
$selectLastDescendant(firstCell);
|
|
270
180
|
}
|
|
271
|
-
});
|
|
272
|
-
};
|
|
273
|
-
$[14] = editor;
|
|
274
|
-
$[15] = onClose;
|
|
275
|
-
$[16] = t8;
|
|
276
|
-
} else {
|
|
277
|
-
t8 = $[16];
|
|
278
|
-
}
|
|
279
|
-
const mergeTableCellsAtSelection = t8;
|
|
280
|
-
let t9;
|
|
281
|
-
if ($[17] !== editor) {
|
|
282
|
-
t9 = () => {
|
|
283
|
-
editor.update(() => {
|
|
284
|
-
$unmergeCell();
|
|
285
|
-
});
|
|
286
|
-
};
|
|
287
|
-
$[17] = editor;
|
|
288
|
-
$[18] = t9;
|
|
289
|
-
} else {
|
|
290
|
-
t9 = $[18];
|
|
291
|
-
}
|
|
292
|
-
const unmergeTableCellsAtSelection = t9;
|
|
293
|
-
let t10;
|
|
294
|
-
if ($[19] !== editor || $[20] !== onClose) {
|
|
295
|
-
t10 = shouldInsertAfter => {
|
|
296
|
-
editor.update(() => {
|
|
297
|
-
$insertTableRow__EXPERIMENTAL(shouldInsertAfter);
|
|
298
181
|
onClose();
|
|
299
|
-
}
|
|
300
|
-
};
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
}
|
|
307
|
-
const insertTableRowAtSelection =
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
};
|
|
185
|
+
const unmergeTableCellsAtSelection = () => {
|
|
186
|
+
editor.update(() => {
|
|
187
|
+
$unmergeCell();
|
|
188
|
+
});
|
|
189
|
+
};
|
|
190
|
+
const insertTableRowAtSelection = useCallback(shouldInsertAfter => {
|
|
191
|
+
editor.update(() => {
|
|
192
|
+
$insertTableRow__EXPERIMENTAL(shouldInsertAfter);
|
|
193
|
+
onClose();
|
|
194
|
+
});
|
|
195
|
+
}, [editor, onClose]);
|
|
196
|
+
const insertTableColumnAtSelection = useCallback(shouldInsertAfter_0 => {
|
|
197
|
+
editor.update(() => {
|
|
198
|
+
for (let i_0 = 0; i_0 < selectionCounts.columns; i_0++) {
|
|
199
|
+
$insertTableColumn__EXPERIMENTAL(shouldInsertAfter_0);
|
|
200
|
+
}
|
|
201
|
+
onClose();
|
|
202
|
+
});
|
|
203
|
+
}, [editor, onClose, selectionCounts.columns]);
|
|
204
|
+
const deleteTableRowAtSelection = useCallback(() => {
|
|
205
|
+
editor.update(() => {
|
|
206
|
+
$deleteTableRow__EXPERIMENTAL();
|
|
207
|
+
onClose();
|
|
208
|
+
});
|
|
209
|
+
}, [editor, onClose]);
|
|
210
|
+
const deleteTableAtSelection = useCallback(() => {
|
|
211
|
+
editor.update(() => {
|
|
212
|
+
const tableNode_0 = $getTableNodeFromLexicalNodeOrThrow(tableCellNode);
|
|
213
|
+
tableNode_0.remove();
|
|
214
|
+
clearTableSelection();
|
|
215
|
+
onClose();
|
|
216
|
+
});
|
|
217
|
+
}, [editor, tableCellNode, clearTableSelection, onClose]);
|
|
218
|
+
const deleteTableColumnAtSelection = useCallback(() => {
|
|
219
|
+
editor.update(() => {
|
|
220
|
+
$deleteTableColumn__EXPERIMENTAL();
|
|
221
|
+
onClose();
|
|
222
|
+
});
|
|
223
|
+
}, [editor, onClose]);
|
|
224
|
+
const toggleTableRowIsHeader = useCallback(() => {
|
|
225
|
+
editor.update(() => {
|
|
226
|
+
const tableNode_1 = $getTableNodeFromLexicalNodeOrThrow(tableCellNode);
|
|
227
|
+
const tableRowIndex = $getTableRowIndexFromTableCellNode(tableCellNode);
|
|
228
|
+
const tableRows = tableNode_1.getChildren();
|
|
229
|
+
if (tableRowIndex >= tableRows.length || tableRowIndex < 0) {
|
|
230
|
+
throw new Error('Expected table cell to be inside of table row.');
|
|
231
|
+
}
|
|
232
|
+
const tableRow = tableRows[tableRowIndex];
|
|
233
|
+
if (!$isTableRowNode(tableRow)) {
|
|
234
|
+
throw new Error('Expected table row');
|
|
235
|
+
}
|
|
236
|
+
const newStyle = tableCellNode.getHeaderStyles() ^ TableCellHeaderStates.ROW;
|
|
237
|
+
tableRow.getChildren().forEach(tableCell => {
|
|
238
|
+
if (!$isTableCellNode(tableCell)) {
|
|
239
|
+
throw new Error('Expected table cell');
|
|
314
240
|
}
|
|
315
|
-
|
|
316
|
-
});
|
|
317
|
-
};
|
|
318
|
-
$[22] = editor;
|
|
319
|
-
$[23] = selectionCounts.columns;
|
|
320
|
-
$[24] = onClose;
|
|
321
|
-
$[25] = t11;
|
|
322
|
-
} else {
|
|
323
|
-
t11 = $[25];
|
|
324
|
-
}
|
|
325
|
-
const insertTableColumnAtSelection = t11;
|
|
326
|
-
let t12;
|
|
327
|
-
if ($[26] !== editor || $[27] !== onClose) {
|
|
328
|
-
t12 = () => {
|
|
329
|
-
editor.update(() => {
|
|
330
|
-
$deleteTableRow__EXPERIMENTAL();
|
|
331
|
-
onClose();
|
|
332
|
-
});
|
|
333
|
-
};
|
|
334
|
-
$[26] = editor;
|
|
335
|
-
$[27] = onClose;
|
|
336
|
-
$[28] = t12;
|
|
337
|
-
} else {
|
|
338
|
-
t12 = $[28];
|
|
339
|
-
}
|
|
340
|
-
const deleteTableRowAtSelection = t12;
|
|
341
|
-
let t13;
|
|
342
|
-
if ($[29] !== editor || $[30] !== tableCellNode || $[31] !== clearTableSelection || $[32] !== onClose) {
|
|
343
|
-
t13 = () => {
|
|
344
|
-
editor.update(() => {
|
|
345
|
-
const tableNode_0 = $getTableNodeFromLexicalNodeOrThrow(tableCellNode);
|
|
346
|
-
tableNode_0.remove();
|
|
347
|
-
clearTableSelection();
|
|
348
|
-
onClose();
|
|
241
|
+
tableCell.setHeaderStyles(newStyle, TableCellHeaderStates.ROW);
|
|
349
242
|
});
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
$[34] = editor;
|
|
369
|
-
$[35] = onClose;
|
|
370
|
-
$[36] = t14;
|
|
371
|
-
} else {
|
|
372
|
-
t14 = $[36];
|
|
373
|
-
}
|
|
374
|
-
const deleteTableColumnAtSelection = t14;
|
|
375
|
-
let t15;
|
|
376
|
-
if ($[37] !== editor || $[38] !== tableCellNode || $[39] !== clearTableSelection || $[40] !== onClose) {
|
|
377
|
-
t15 = () => {
|
|
378
|
-
editor.update(() => {
|
|
379
|
-
const tableNode_1 = $getTableNodeFromLexicalNodeOrThrow(tableCellNode);
|
|
380
|
-
const tableRowIndex = $getTableRowIndexFromTableCellNode(tableCellNode);
|
|
381
|
-
const tableRows = tableNode_1.getChildren();
|
|
382
|
-
if (tableRowIndex >= tableRows.length || tableRowIndex < 0) {
|
|
383
|
-
throw new Error("Expected table cell to be inside of table row.");
|
|
243
|
+
clearTableSelection();
|
|
244
|
+
onClose();
|
|
245
|
+
});
|
|
246
|
+
}, [editor, tableCellNode, clearTableSelection, onClose]);
|
|
247
|
+
const toggleTableColumnIsHeader = useCallback(() => {
|
|
248
|
+
editor.update(() => {
|
|
249
|
+
const tableNode_2 = $getTableNodeFromLexicalNodeOrThrow(tableCellNode);
|
|
250
|
+
const tableColumnIndex = $getTableColumnIndexFromTableCellNode(tableCellNode);
|
|
251
|
+
const tableRows_0 = tableNode_2.getChildren();
|
|
252
|
+
const maxRowsLength = Math.max(...tableRows_0.map(row => row.getChildren().length));
|
|
253
|
+
if (tableColumnIndex >= maxRowsLength || tableColumnIndex < 0) {
|
|
254
|
+
throw new Error('Expected table cell to be inside of table row.');
|
|
255
|
+
}
|
|
256
|
+
const newStyle_0 = tableCellNode.getHeaderStyles() ^ TableCellHeaderStates.COLUMN;
|
|
257
|
+
for (let r = 0; r < tableRows_0.length; r++) {
|
|
258
|
+
const tableRow_0 = tableRows_0[r];
|
|
259
|
+
if (!$isTableRowNode(tableRow_0)) {
|
|
260
|
+
throw new Error('Expected table row');
|
|
384
261
|
}
|
|
385
|
-
const
|
|
386
|
-
if (
|
|
387
|
-
|
|
262
|
+
const tableCells = tableRow_0.getChildren();
|
|
263
|
+
if (tableColumnIndex >= tableCells.length) {
|
|
264
|
+
continue;
|
|
388
265
|
}
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
}
|
|
393
|
-
tableCell.toggleHeaderStyle(TableCellHeaderStates.ROW);
|
|
394
|
-
});
|
|
395
|
-
clearTableSelection();
|
|
396
|
-
onClose();
|
|
397
|
-
});
|
|
398
|
-
};
|
|
399
|
-
$[37] = editor;
|
|
400
|
-
$[38] = tableCellNode;
|
|
401
|
-
$[39] = clearTableSelection;
|
|
402
|
-
$[40] = onClose;
|
|
403
|
-
$[41] = t15;
|
|
404
|
-
} else {
|
|
405
|
-
t15 = $[41];
|
|
406
|
-
}
|
|
407
|
-
const toggleTableRowIsHeader = t15;
|
|
408
|
-
let t16;
|
|
409
|
-
if ($[42] !== editor || $[43] !== tableCellNode || $[44] !== clearTableSelection || $[45] !== onClose) {
|
|
410
|
-
t16 = () => {
|
|
411
|
-
editor.update(() => {
|
|
412
|
-
const tableNode_2 = $getTableNodeFromLexicalNodeOrThrow(tableCellNode);
|
|
413
|
-
const tableColumnIndex = $getTableColumnIndexFromTableCellNode(tableCellNode);
|
|
414
|
-
const tableRows_0 = tableNode_2.getChildren();
|
|
415
|
-
const maxRowsLength = Math.max(...tableRows_0.map(row => row.getChildren().length));
|
|
416
|
-
if (tableColumnIndex >= maxRowsLength || tableColumnIndex < 0) {
|
|
417
|
-
throw new Error("Expected table cell to be inside of table row.");
|
|
266
|
+
const tableCell_0 = tableCells[tableColumnIndex];
|
|
267
|
+
if (!$isTableCellNode(tableCell_0)) {
|
|
268
|
+
throw new Error('Expected table cell');
|
|
418
269
|
}
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
}
|
|
432
|
-
tableCell_0.toggleHeaderStyle(TableCellHeaderStates.COLUMN);
|
|
270
|
+
tableCell_0.setHeaderStyles(newStyle_0, TableCellHeaderStates.COLUMN);
|
|
271
|
+
}
|
|
272
|
+
clearTableSelection();
|
|
273
|
+
onClose();
|
|
274
|
+
});
|
|
275
|
+
}, [editor, tableCellNode, clearTableSelection, onClose]);
|
|
276
|
+
const toggleRowStriping = useCallback(() => {
|
|
277
|
+
editor.update(() => {
|
|
278
|
+
if (tableCellNode.isAttached()) {
|
|
279
|
+
const tableNode_3 = $getTableNodeFromLexicalNodeOrThrow(tableCellNode);
|
|
280
|
+
if (tableNode_3) {
|
|
281
|
+
tableNode_3.setRowStriping(!tableNode_3.getRowStriping());
|
|
433
282
|
}
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
};
|
|
438
|
-
|
|
439
|
-
$[43] = tableCellNode;
|
|
440
|
-
$[44] = clearTableSelection;
|
|
441
|
-
$[45] = onClose;
|
|
442
|
-
$[46] = t16;
|
|
443
|
-
} else {
|
|
444
|
-
t16 = $[46];
|
|
445
|
-
}
|
|
446
|
-
const toggleTableColumnIsHeader = t16;
|
|
283
|
+
}
|
|
284
|
+
clearTableSelection();
|
|
285
|
+
onClose();
|
|
286
|
+
});
|
|
287
|
+
}, [editor, tableCellNode, clearTableSelection, onClose]);
|
|
447
288
|
let mergeCellButton = null;
|
|
448
289
|
if (cellMerge) {
|
|
449
290
|
if (canMergeCells) {
|
|
450
|
-
|
|
451
|
-
if ($[47] !== mergeTableCellsAtSelection) {
|
|
452
|
-
t17 = () => mergeTableCellsAtSelection();
|
|
453
|
-
$[47] = mergeTableCellsAtSelection;
|
|
454
|
-
$[48] = t17;
|
|
455
|
-
} else {
|
|
456
|
-
t17 = $[48];
|
|
457
|
-
}
|
|
458
|
-
mergeCellButton = _jsx("button", {
|
|
291
|
+
mergeCellButton = /*#__PURE__*/_jsx("button", {
|
|
459
292
|
className: "item",
|
|
460
293
|
"data-test-id": "table-merge-cells",
|
|
461
|
-
onClick:
|
|
294
|
+
onClick: () => mergeTableCellsAtSelection(),
|
|
462
295
|
type: "button",
|
|
463
296
|
children: "Merge cells"
|
|
464
297
|
});
|
|
465
|
-
} else {
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
t17 = $[50];
|
|
474
|
-
}
|
|
475
|
-
mergeCellButton = _jsx("button", {
|
|
476
|
-
className: "item",
|
|
477
|
-
"data-test-id": "table-unmerge-cells",
|
|
478
|
-
onClick: t17,
|
|
479
|
-
type: "button",
|
|
480
|
-
children: "Unmerge cells"
|
|
481
|
-
});
|
|
482
|
-
}
|
|
298
|
+
} else if (canUnmergeCell) {
|
|
299
|
+
mergeCellButton = /*#__PURE__*/_jsx("button", {
|
|
300
|
+
className: "item",
|
|
301
|
+
"data-test-id": "table-unmerge-cells",
|
|
302
|
+
onClick: () => unmergeTableCellsAtSelection(),
|
|
303
|
+
type: "button",
|
|
304
|
+
children: "Unmerge cells"
|
|
305
|
+
});
|
|
483
306
|
}
|
|
484
307
|
}
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
$[52] = t17;
|
|
490
|
-
} else {
|
|
491
|
-
t17 = $[52];
|
|
492
|
-
}
|
|
493
|
-
let t18;
|
|
494
|
-
if ($[53] !== insertTableRowAtSelection) {
|
|
495
|
-
t18 = () => insertTableRowAtSelection(true);
|
|
496
|
-
$[53] = insertTableRowAtSelection;
|
|
497
|
-
$[54] = t18;
|
|
498
|
-
} else {
|
|
499
|
-
t18 = $[54];
|
|
500
|
-
}
|
|
501
|
-
let t19;
|
|
502
|
-
if ($[55] !== insertTableColumnAtSelection) {
|
|
503
|
-
t19 = () => insertTableColumnAtSelection(false);
|
|
504
|
-
$[55] = insertTableColumnAtSelection;
|
|
505
|
-
$[56] = t19;
|
|
506
|
-
} else {
|
|
507
|
-
t19 = $[56];
|
|
508
|
-
}
|
|
509
|
-
let t20;
|
|
510
|
-
if ($[57] !== insertTableColumnAtSelection) {
|
|
511
|
-
t20 = () => insertTableColumnAtSelection(true);
|
|
512
|
-
$[57] = insertTableColumnAtSelection;
|
|
513
|
-
$[58] = t20;
|
|
514
|
-
} else {
|
|
515
|
-
t20 = $[58];
|
|
516
|
-
}
|
|
517
|
-
let t21;
|
|
518
|
-
if ($[59] !== deleteTableColumnAtSelection) {
|
|
519
|
-
t21 = () => deleteTableColumnAtSelection();
|
|
520
|
-
$[59] = deleteTableColumnAtSelection;
|
|
521
|
-
$[60] = t21;
|
|
522
|
-
} else {
|
|
523
|
-
t21 = $[60];
|
|
524
|
-
}
|
|
525
|
-
let t22;
|
|
526
|
-
if ($[61] !== deleteTableRowAtSelection) {
|
|
527
|
-
t22 = () => deleteTableRowAtSelection();
|
|
528
|
-
$[61] = deleteTableRowAtSelection;
|
|
529
|
-
$[62] = t22;
|
|
530
|
-
} else {
|
|
531
|
-
t22 = $[62];
|
|
532
|
-
}
|
|
533
|
-
let t23;
|
|
534
|
-
if ($[63] !== deleteTableAtSelection) {
|
|
535
|
-
t23 = () => deleteTableAtSelection();
|
|
536
|
-
$[63] = deleteTableAtSelection;
|
|
537
|
-
$[64] = t23;
|
|
538
|
-
} else {
|
|
539
|
-
t23 = $[64];
|
|
540
|
-
}
|
|
541
|
-
let t24;
|
|
542
|
-
if ($[65] !== toggleTableRowIsHeader) {
|
|
543
|
-
t24 = () => toggleTableRowIsHeader();
|
|
544
|
-
$[65] = toggleTableRowIsHeader;
|
|
545
|
-
$[66] = t24;
|
|
546
|
-
} else {
|
|
547
|
-
t24 = $[66];
|
|
548
|
-
}
|
|
549
|
-
let t25;
|
|
550
|
-
if ($[67] !== toggleTableColumnIsHeader) {
|
|
551
|
-
t25 = () => toggleTableColumnIsHeader();
|
|
552
|
-
$[67] = toggleTableColumnIsHeader;
|
|
553
|
-
$[68] = t25;
|
|
554
|
-
} else {
|
|
555
|
-
t25 = $[68];
|
|
556
|
-
}
|
|
557
|
-
return createPortal(_jsxs("div", {
|
|
308
|
+
return /*#__PURE__*/createPortal(
|
|
309
|
+
// eslint-disable-next-line jsx-a11y/no-static-element-interactions,jsx-a11y/click-events-have-key-events
|
|
310
|
+
/*#__PURE__*/
|
|
311
|
+
_jsxs("div", {
|
|
558
312
|
className: "table-action-menu-dropdown",
|
|
559
|
-
onClick:
|
|
313
|
+
onClick: e => {
|
|
314
|
+
e.stopPropagation();
|
|
315
|
+
},
|
|
560
316
|
ref: dropDownRef,
|
|
561
|
-
children: [mergeCellButton ? _jsxs(React.Fragment, {
|
|
562
|
-
children: [mergeCellButton, _jsx("hr", {})]
|
|
563
|
-
}) : null, _jsx("button", {
|
|
317
|
+
children: [mergeCellButton ? /*#__PURE__*/_jsxs(React.Fragment, {
|
|
318
|
+
children: [mergeCellButton, /*#__PURE__*/_jsx("hr", {})]
|
|
319
|
+
}) : null, /*#__PURE__*/_jsx("button", {
|
|
320
|
+
className: "item",
|
|
321
|
+
"data-test-id": "table-row-striping",
|
|
322
|
+
onClick: () => toggleRowStriping(),
|
|
323
|
+
type: "button",
|
|
324
|
+
children: /*#__PURE__*/_jsx("span", {
|
|
325
|
+
className: "text",
|
|
326
|
+
children: "Toggle Row Striping"
|
|
327
|
+
})
|
|
328
|
+
}), /*#__PURE__*/_jsx("button", {
|
|
564
329
|
className: "item",
|
|
565
330
|
"data-test-id": "table-insert-row-above",
|
|
566
|
-
onClick:
|
|
331
|
+
onClick: () => insertTableRowAtSelection(false),
|
|
567
332
|
type: "button",
|
|
568
|
-
children: _jsxs("span", {
|
|
333
|
+
children: /*#__PURE__*/_jsxs("span", {
|
|
569
334
|
className: "text",
|
|
570
|
-
children: ["Insert ", selectionCounts.rows === 1 ?
|
|
335
|
+
children: ["Insert ", selectionCounts.rows === 1 ? 'row' : `${selectionCounts.rows} rows`, " above"]
|
|
571
336
|
})
|
|
572
|
-
}), _jsx("button", {
|
|
337
|
+
}), /*#__PURE__*/_jsx("button", {
|
|
573
338
|
className: "item",
|
|
574
339
|
"data-test-id": "table-insert-row-below",
|
|
575
|
-
onClick:
|
|
340
|
+
onClick: () => insertTableRowAtSelection(true),
|
|
576
341
|
type: "button",
|
|
577
|
-
children: _jsxs("span", {
|
|
342
|
+
children: /*#__PURE__*/_jsxs("span", {
|
|
578
343
|
className: "text",
|
|
579
|
-
children: ["Insert ", selectionCounts.rows === 1 ?
|
|
344
|
+
children: ["Insert ", selectionCounts.rows === 1 ? 'row' : `${selectionCounts.rows} rows`, " below"]
|
|
580
345
|
})
|
|
581
|
-
}), _jsx("hr", {}), _jsx("button", {
|
|
346
|
+
}), /*#__PURE__*/_jsx("hr", {}), /*#__PURE__*/_jsx("button", {
|
|
582
347
|
className: "item",
|
|
583
348
|
"data-test-id": "table-insert-column-before",
|
|
584
|
-
onClick:
|
|
349
|
+
onClick: () => insertTableColumnAtSelection(false),
|
|
585
350
|
type: "button",
|
|
586
|
-
children: _jsxs("span", {
|
|
351
|
+
children: /*#__PURE__*/_jsxs("span", {
|
|
587
352
|
className: "text",
|
|
588
|
-
children: ["Insert ", selectionCounts.columns === 1 ?
|
|
353
|
+
children: ["Insert ", selectionCounts.columns === 1 ? 'column' : `${selectionCounts.columns} columns`, ' ', "left"]
|
|
589
354
|
})
|
|
590
|
-
}), _jsx("button", {
|
|
355
|
+
}), /*#__PURE__*/_jsx("button", {
|
|
591
356
|
className: "item",
|
|
592
357
|
"data-test-id": "table-insert-column-after",
|
|
593
|
-
onClick:
|
|
358
|
+
onClick: () => insertTableColumnAtSelection(true),
|
|
594
359
|
type: "button",
|
|
595
|
-
children: _jsxs("span", {
|
|
360
|
+
children: /*#__PURE__*/_jsxs("span", {
|
|
596
361
|
className: "text",
|
|
597
|
-
children: ["Insert ", selectionCounts.columns === 1 ?
|
|
362
|
+
children: ["Insert ", selectionCounts.columns === 1 ? 'column' : `${selectionCounts.columns} columns`, ' ', "right"]
|
|
598
363
|
})
|
|
599
|
-
}), _jsx("hr", {}), _jsx("button", {
|
|
364
|
+
}), /*#__PURE__*/_jsx("hr", {}), /*#__PURE__*/_jsx("button", {
|
|
600
365
|
className: "item",
|
|
601
366
|
"data-test-id": "table-delete-columns",
|
|
602
|
-
onClick:
|
|
367
|
+
onClick: () => deleteTableColumnAtSelection(),
|
|
603
368
|
type: "button",
|
|
604
|
-
children: _jsx("span", {
|
|
369
|
+
children: /*#__PURE__*/_jsx("span", {
|
|
605
370
|
className: "text",
|
|
606
371
|
children: "Delete column"
|
|
607
372
|
})
|
|
608
|
-
}), _jsx("button", {
|
|
373
|
+
}), /*#__PURE__*/_jsx("button", {
|
|
609
374
|
className: "item",
|
|
610
375
|
"data-test-id": "table-delete-rows",
|
|
611
|
-
onClick:
|
|
376
|
+
onClick: () => deleteTableRowAtSelection(),
|
|
612
377
|
type: "button",
|
|
613
|
-
children: _jsx("span", {
|
|
378
|
+
children: /*#__PURE__*/_jsx("span", {
|
|
614
379
|
className: "text",
|
|
615
380
|
children: "Delete row"
|
|
616
381
|
})
|
|
617
|
-
}), _jsx("button", {
|
|
382
|
+
}), /*#__PURE__*/_jsx("button", {
|
|
618
383
|
className: "item",
|
|
619
384
|
"data-test-id": "table-delete",
|
|
620
|
-
onClick:
|
|
385
|
+
onClick: () => deleteTableAtSelection(),
|
|
621
386
|
type: "button",
|
|
622
|
-
children: _jsx("span", {
|
|
387
|
+
children: /*#__PURE__*/_jsx("span", {
|
|
623
388
|
className: "text",
|
|
624
389
|
children: "Delete table"
|
|
625
390
|
})
|
|
626
|
-
}), _jsx("hr", {}), _jsx("button", {
|
|
391
|
+
}), /*#__PURE__*/_jsx("hr", {}), /*#__PURE__*/_jsx("button", {
|
|
627
392
|
className: "item",
|
|
628
|
-
onClick:
|
|
393
|
+
onClick: () => toggleTableRowIsHeader(),
|
|
629
394
|
type: "button",
|
|
630
|
-
children: _jsxs("span", {
|
|
395
|
+
children: /*#__PURE__*/_jsxs("span", {
|
|
631
396
|
className: "text",
|
|
632
|
-
children: [(tableCellNode.__headerState & TableCellHeaderStates.ROW) === TableCellHeaderStates.ROW ?
|
|
397
|
+
children: [(tableCellNode.__headerState & TableCellHeaderStates.ROW) === TableCellHeaderStates.ROW ? 'Remove' : 'Add', ' ', "row header"]
|
|
633
398
|
})
|
|
634
|
-
}), _jsx("button", {
|
|
399
|
+
}), /*#__PURE__*/_jsx("button", {
|
|
635
400
|
className: "item",
|
|
636
401
|
"data-test-id": "table-column-header",
|
|
637
|
-
onClick:
|
|
402
|
+
onClick: () => toggleTableColumnIsHeader(),
|
|
638
403
|
type: "button",
|
|
639
|
-
children: _jsxs("span", {
|
|
404
|
+
children: /*#__PURE__*/_jsxs("span", {
|
|
640
405
|
className: "text",
|
|
641
|
-
children: [(tableCellNode.__headerState & TableCellHeaderStates.COLUMN) === TableCellHeaderStates.COLUMN ?
|
|
406
|
+
children: [(tableCellNode.__headerState & TableCellHeaderStates.COLUMN) === TableCellHeaderStates.COLUMN ? 'Remove' : 'Add', ' ', "column header"]
|
|
642
407
|
})
|
|
643
408
|
})]
|
|
644
409
|
}), document.body);
|
|
645
410
|
}
|
|
646
|
-
function _temp(e) {
|
|
647
|
-
e.stopPropagation();
|
|
648
|
-
}
|
|
649
411
|
function TableCellActionMenuContainer({
|
|
650
412
|
anchorElem,
|
|
651
413
|
cellMerge
|