@uva-glass/component-library 3.55.1 → 3.55.3
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/Accordion-BpnBHYIx.js +69 -0
- package/dist/Accordion-BpnBHYIx.js.map +1 -0
- package/dist/AccordionCard-BXy-plB7.js +43 -0
- package/dist/AccordionCard-BXy-plB7.js.map +1 -0
- package/dist/ActionList-O9w1hqNg.js +95 -0
- package/dist/ActionList-O9w1hqNg.js.map +1 -0
- package/dist/AddCatalogueLinkForm-Cy6fPNvN.js +117 -0
- package/dist/AddCatalogueLinkForm-Cy6fPNvN.js.map +1 -0
- package/dist/AppStatusBar-Bca0KFDR.js +20 -0
- package/dist/AppStatusBar-Bca0KFDR.js.map +1 -0
- package/dist/Attention-Bq5UU9I8.js +13 -0
- package/dist/Attention-Bq5UU9I8.js.map +1 -0
- package/dist/Backdrop-D8AHeuBn.js +10 -0
- package/dist/Backdrop-D8AHeuBn.js.map +1 -0
- package/dist/Button.module-DJlNwQUj.js +16 -0
- package/dist/Button.module-DJlNwQUj.js.map +1 -0
- package/dist/ButtonGroup-DR80lTLz.js +21 -0
- package/dist/ButtonGroup-DR80lTLz.js.map +1 -0
- package/dist/Card-DMFyuTmy.js +32 -0
- package/dist/Card-DMFyuTmy.js.map +1 -0
- package/dist/Checkbox-D6-b_4dC.js +12 -0
- package/dist/Checkbox-D6-b_4dC.js.map +1 -0
- package/dist/CheckboxButtonBar-CalU0IYK.js +79 -0
- package/dist/CheckboxButtonBar-CalU0IYK.js.map +1 -0
- package/dist/Chip-DJHvFToV.js +22 -0
- package/dist/Chip-DJHvFToV.js.map +1 -0
- package/dist/ClipboardButton-geHjMl2J.js +43 -0
- package/dist/ClipboardButton-geHjMl2J.js.map +1 -0
- package/dist/Column-BwKEOOuL.js +84 -0
- package/dist/Column-BwKEOOuL.js.map +1 -0
- package/dist/Container-BLjtYDqq.js +31 -0
- package/dist/Container-BLjtYDqq.js.map +1 -0
- package/dist/ControlsButton-zemVxTlg.js +64 -0
- package/dist/ControlsButton-zemVxTlg.js.map +1 -0
- package/dist/CopyableText-DkyhZ6wk.js +57 -0
- package/dist/CopyableText-DkyhZ6wk.js.map +1 -0
- package/dist/Drawer-Ggofac6y.js +77 -0
- package/dist/Drawer-Ggofac6y.js.map +1 -0
- package/dist/EmptyStateDataDisplay-D0QiI8nE.js +46 -0
- package/dist/EmptyStateDataDisplay-D0QiI8nE.js.map +1 -0
- package/dist/ExpandableInfoPanel-CnBVVNlJ.js +58 -0
- package/dist/ExpandableInfoPanel-CnBVVNlJ.js.map +1 -0
- package/dist/FeedbackBar-ByKp32HE.js +43 -0
- package/dist/FeedbackBar-ByKp32HE.js.map +1 -0
- package/dist/FeedbackBox-Bu7uB9DP.js +29 -0
- package/dist/FeedbackBox-Bu7uB9DP.js.map +1 -0
- package/dist/FieldHint-D0HtbTnt.js +16 -0
- package/dist/FieldHint-D0HtbTnt.js.map +1 -0
- package/dist/Fieldset-CoNu_Owa.js +23 -0
- package/dist/Fieldset-CoNu_Owa.js.map +1 -0
- package/dist/Flyout-DEpzfZOC.js +18 -0
- package/dist/Flyout-DEpzfZOC.js.map +1 -0
- package/dist/FormField-BZSoQdp9.js +21 -0
- package/dist/FormField-BZSoQdp9.js.map +1 -0
- package/dist/HorizontalList-C22DaDz-.js +20 -0
- package/dist/HorizontalList-C22DaDz-.js.map +1 -0
- package/dist/IconButton-CWCMH9uf.js +24 -0
- package/dist/IconButton-CWCMH9uf.js.map +1 -0
- package/dist/InfoBanner-DyznQLGr.js +13 -0
- package/dist/InfoBanner-DyznQLGr.js.map +1 -0
- package/dist/InfoMessage-I-VlwxVc.js +19 -0
- package/dist/InfoMessage-I-VlwxVc.js.map +1 -0
- package/dist/Input-Bn-arMaC.js +25 -0
- package/dist/Input-Bn-arMaC.js.map +1 -0
- package/dist/InputField-BWAy19w9.js +51 -0
- package/dist/InputField-BWAy19w9.js.map +1 -0
- package/dist/Label-o0BcWTUS.js +21 -0
- package/dist/Label-o0BcWTUS.js.map +1 -0
- package/dist/Lexical.prod-DIglXatJ.js +5246 -0
- package/dist/Lexical.prod-DIglXatJ.js.map +1 -0
- package/dist/LexicalClipboard.prod-Bnzu0sh_.js +248 -0
- package/dist/LexicalClipboard.prod-Bnzu0sh_.js.map +1 -0
- package/dist/LexicalComposerContext.prod-Ca-YN_fj.js +22 -0
- package/dist/LexicalComposerContext.prod-Ca-YN_fj.js.map +1 -0
- package/dist/LexicalExtension.prod-COPHoPpX.js +886 -0
- package/dist/LexicalExtension.prod-COPHoPpX.js.map +1 -0
- package/dist/LexicalLink.prod-Bf9JUdMv.js +683 -0
- package/dist/LexicalLink.prod-Bf9JUdMv.js.map +1 -0
- package/dist/LexicalList.prod-DRz8vsM9.js +766 -0
- package/dist/LexicalList.prod-DRz8vsM9.js.map +1 -0
- package/dist/LexicalTable.prod-D16GW-aZ.js +2003 -0
- package/dist/LexicalTable.prod-D16GW-aZ.js.map +1 -0
- package/dist/LexicalUtils.prod-BBTLliac.js +360 -0
- package/dist/LexicalUtils.prod-BBTLliac.js.map +1 -0
- package/dist/LinkContextMenu-m_CGQEiX.js +101 -0
- package/dist/LinkContextMenu-m_CGQEiX.js.map +1 -0
- package/dist/MenuLink-Cm1yZO_5.js +21 -0
- package/dist/MenuLink-Cm1yZO_5.js.map +1 -0
- package/dist/MetaDataBar-C4QO9oBV.js +23 -0
- package/dist/MetaDataBar-C4QO9oBV.js.map +1 -0
- package/dist/MetaDataList-CAR1HTYs.js +24 -0
- package/dist/MetaDataList-CAR1HTYs.js.map +1 -0
- package/dist/ModalDialog-HUkDdAJ-.js +114 -0
- package/dist/ModalDialog-HUkDdAJ-.js.map +1 -0
- package/dist/MultiSelectBox-Cuh_o-A1.js +189 -0
- package/dist/MultiSelectBox-Cuh_o-A1.js.map +1 -0
- package/dist/MultiSelectItem-BF5xRjz5.js +36 -0
- package/dist/MultiSelectItem-BF5xRjz5.js.map +1 -0
- package/dist/Notification-CIhsHuF0.js +68 -0
- package/dist/Notification-CIhsHuF0.js.map +1 -0
- package/dist/OverlayCloseButton-rttFbAM_.js +22 -0
- package/dist/OverlayCloseButton-rttFbAM_.js.map +1 -0
- package/dist/OverlayStepBar-CjaoYdsh.js +45 -0
- package/dist/OverlayStepBar-CjaoYdsh.js.map +1 -0
- package/dist/PageOverlay-D_wG2oie.js +108 -0
- package/dist/PageOverlay-D_wG2oie.js.map +1 -0
- package/dist/PasteHandlerPlugin-DjD1wryY.js +235 -0
- package/dist/PasteHandlerPlugin-DjD1wryY.js.map +1 -0
- package/dist/Periods-BYETtB6R.js +40 -0
- package/dist/Periods-BYETtB6R.js.map +1 -0
- package/dist/ProgrammeCard-76gG7ksx.js +27 -0
- package/dist/ProgrammeCard-76gG7ksx.js.map +1 -0
- package/dist/RadioButton-Bto2p5B9.js +35 -0
- package/dist/RadioButton-Bto2p5B9.js.map +1 -0
- package/dist/RadioGroup-JeTjVp5B.js +50 -0
- package/dist/RadioGroup-JeTjVp5B.js.map +1 -0
- package/dist/Repeater-BhkTEUai.js +22 -0
- package/dist/Repeater-BhkTEUai.js.map +1 -0
- package/dist/RteEditor.module-Jk80F1FA.js +42 -0
- package/dist/RteEditor.module-Jk80F1FA.js.map +1 -0
- package/dist/SearchField.module-BgxjHaPG.js +19 -0
- package/dist/SearchField.module-BgxjHaPG.js.map +1 -0
- package/dist/SectionNotification-CQqwPTqP.js +14 -0
- package/dist/SectionNotification-CQqwPTqP.js.map +1 -0
- package/dist/SelectListbox.module-HaPs1CLD.js +30 -0
- package/dist/SelectListbox.module-HaPs1CLD.js.map +1 -0
- package/dist/Slider-BlLyrET9.js +102 -0
- package/dist/Slider-BlLyrET9.js.map +1 -0
- package/dist/Sortable.module-BTUOSbOU.js +27 -0
- package/dist/Sortable.module-BTUOSbOU.js.map +1 -0
- package/dist/SortableProvider-Dc7hwkb5.js +147 -0
- package/dist/SortableProvider-Dc7hwkb5.js.map +1 -0
- package/dist/Spinner-D8tWqg9j.js +31 -0
- package/dist/Spinner-D8tWqg9j.js.map +1 -0
- package/dist/StatusBage-DQDOF5-U.js +13 -0
- package/dist/StatusBage-DQDOF5-U.js.map +1 -0
- package/dist/StatusPill-DM7n3I4W.js +30 -0
- package/dist/StatusPill-DM7n3I4W.js.map +1 -0
- package/dist/TableCellContextMenu-D0IMQr3E.js +119 -0
- package/dist/TableCellContextMenu-D0IMQr3E.js.map +1 -0
- package/dist/TableCellResizerPlugin-CgYsYsuY.js +208 -0
- package/dist/TableCellResizerPlugin-CgYsYsuY.js.map +1 -0
- package/dist/TextArea-DqKIpOfT.js +68 -0
- package/dist/TextArea-DqKIpOfT.js.map +1 -0
- package/dist/ToggleSwitch-C7z7JVtx.js +51 -0
- package/dist/ToggleSwitch-C7z7JVtx.js.map +1 -0
- package/dist/Tooltip-BzB3jznk.js +80 -0
- package/dist/Tooltip-BzB3jznk.js.map +1 -0
- package/dist/VarIndicator-C-GueOZD.js +50 -0
- package/dist/VarIndicator-C-GueOZD.js.map +1 -0
- package/dist/WeekSelector.module-BLPrVYgn.js +18 -0
- package/dist/WeekSelector.module-BLPrVYgn.js.map +1 -0
- package/dist/__mocks__/svgrMock.js +12 -9
- package/dist/__mocks__/svgrMock.js.map +1 -1
- package/dist/assets/Accordion.css +1 -1
- package/dist/assets/AccordionCard.css +1 -1
- package/dist/assets/ActionList.css +1 -1
- package/dist/assets/AddCatalogueLinkForm.css +1 -1
- package/dist/assets/AppStatusBar.css +1 -1
- package/dist/assets/Attention.css +1 -1
- package/dist/assets/Backdrop.css +1 -1
- package/dist/assets/Backdrop2.css +1 -1
- package/dist/assets/Button.css +1 -1
- package/dist/assets/ButtonGroup.css +1 -1
- package/dist/assets/Card.css +1 -1
- package/dist/assets/Checkbox.css +1 -1
- package/dist/assets/CheckboxButtonBar.css +1 -1
- package/dist/assets/Chip.css +1 -1
- package/dist/assets/ClipboardButton.css +1 -1
- package/dist/assets/Column.css +1 -1
- package/dist/assets/Container.css +1 -1
- package/dist/assets/ControlsButton.css +1 -1
- package/dist/assets/CopyableText.css +1 -1
- package/dist/assets/Drawer.css +1 -1
- package/dist/assets/EmptyStateDataDisplay.css +1 -1
- package/dist/assets/ExpandableInfoPanel.css +1 -1
- package/dist/assets/FeedbackBar.css +1 -1
- package/dist/assets/FeedbackBox.css +1 -1
- package/dist/assets/Fieldset.css +1 -1
- package/dist/assets/Flyout.css +1 -1
- package/dist/assets/FormField.css +1 -1
- package/dist/assets/GridRow.css +1 -1
- package/dist/assets/HorizontalList.css +1 -1
- package/dist/assets/Icon.css +1 -1
- package/dist/assets/IconButton.css +1 -1
- package/dist/assets/InfoBanner.css +1 -1
- package/dist/assets/InfoMessage.css +1 -1
- package/dist/assets/Input.css +1 -1
- package/dist/assets/InputField.css +1 -1
- package/dist/assets/Label.css +1 -1
- package/dist/assets/LinkContextMenu.css +1 -1
- package/dist/assets/MenuLink.css +1 -1
- package/dist/assets/MenuLink2.css +1 -1
- package/dist/assets/MetaDataBar.css +1 -1
- package/dist/assets/MetaDataList.css +1 -1
- package/dist/assets/ModalDialog.css +1 -1
- package/dist/assets/MultiSelectBox.css +1 -1
- package/dist/assets/MultiSelectItem.css +1 -1
- package/dist/assets/Notification.css +1 -1
- package/dist/assets/OverlayCloseButton.css +1 -1
- package/dist/assets/OverlayStepBar.css +1 -1
- package/dist/assets/PageOverlay.css +1 -1
- package/dist/assets/Periods.css +1 -1
- package/dist/assets/ProgrammeCard.css +1 -1
- package/dist/assets/RadioButton.css +1 -1
- package/dist/assets/RadioButton2.css +1 -1
- package/dist/assets/RadioGroup.css +1 -1
- package/dist/assets/RteEditor.css +1 -1
- package/dist/assets/SearchField.css +1 -1
- package/dist/assets/SectionNotification.css +1 -1
- package/dist/assets/SelectListbox.css +1 -1
- package/dist/assets/Slider.css +1 -1
- package/dist/assets/Sortable.css +1 -1
- package/dist/assets/Spinner.css +1 -1
- package/dist/assets/StatusBage.css +1 -1
- package/dist/assets/StatusPill.css +1 -1
- package/dist/assets/TableCellContextMenu.css +1 -1
- package/dist/assets/TextArea.css +1 -1
- package/dist/assets/ToggleSwitch.css +1 -1
- package/dist/assets/Tooltip.css +1 -1
- package/dist/assets/VarIndicator.css +1 -1
- package/dist/assets/WeekSelector.css +1 -1
- package/dist/assets/components.css +1 -0
- package/dist/chunk-DeC0fbbY.js +23 -0
- package/dist/chunk-SZQXB3JV-D0XG4Tlp.js +8448 -0
- package/dist/chunk-SZQXB3JV-D0XG4Tlp.js.map +1 -0
- package/dist/client-UU-mS47K.js +18953 -0
- package/dist/client-UU-mS47K.js.map +1 -0
- package/dist/clsx-BD2qMUU1.js +18 -0
- package/dist/clsx-BD2qMUU1.js.map +1 -0
- package/dist/components/Accordion/Accordion.js +2 -94
- package/dist/components/Accordion/Accordion.stories.js +30 -32
- package/dist/components/Accordion/Accordion.stories.js.map +1 -1
- package/dist/components/Accordion/Accordion.test.js +49 -27
- package/dist/components/Accordion/Accordion.test.js.map +1 -1
- package/dist/components/Accordion/index.js +2 -5
- package/dist/components/AccordionCard/AccordionCard.js +2 -58
- package/dist/components/AccordionCard/AccordionCard.stories.js +31 -32
- package/dist/components/AccordionCard/AccordionCard.stories.js.map +1 -1
- package/dist/components/AccordionCard/AccordionCard.test.js +54 -31
- package/dist/components/AccordionCard/AccordionCard.test.js.map +1 -1
- package/dist/components/AccordionCard/index.js +2 -5
- package/dist/components/ActionList/ActionList.js +2 -83
- package/dist/components/ActionList/ActionList.stories.js +49 -38
- package/dist/components/ActionList/ActionList.stories.js.map +1 -1
- package/dist/components/ActionList/ActionList.test.js +97 -57
- package/dist/components/ActionList/ActionList.test.js.map +1 -1
- package/dist/components/ActionList/index.js +2 -5
- package/dist/components/AppStatusBar/AppStatusBar.js +2 -13
- package/dist/components/AppStatusBar/AppStatusBar.stories.js +25 -26
- package/dist/components/AppStatusBar/AppStatusBar.stories.js.map +1 -1
- package/dist/components/AppStatusBar/AppStatusBar.test.js +17 -8
- package/dist/components/AppStatusBar/AppStatusBar.test.js.map +1 -1
- package/dist/components/AppStatusBar/index.js +2 -5
- package/dist/components/Attention/Attention.js +2 -12
- package/dist/components/Attention/Attention.stories.js +18 -16
- package/dist/components/Attention/Attention.stories.js.map +1 -1
- package/dist/components/Attention/Attention.test.js +14 -8
- package/dist/components/Attention/Attention.test.js.map +1 -1
- package/dist/components/Attention/index.js +2 -5
- package/dist/components/Backdrop/Backdrop.js +2 -8
- package/dist/components/Backdrop/Backdrop.stories.js +32 -28
- package/dist/components/Backdrop/Backdrop.stories.js.map +1 -1
- package/dist/components/Backdrop/Backdrop.test.js +13 -7
- package/dist/components/Backdrop/Backdrop.test.js.map +1 -1
- package/dist/components/Backdrop/index.js +2 -5
- package/dist/components/ButtonGroup/ButtonGroup.js +2 -26
- package/dist/components/ButtonGroup/ButtonGroup.stories.js +29 -39
- package/dist/components/ButtonGroup/ButtonGroup.stories.js.map +1 -1
- package/dist/components/ButtonGroup/index.js +2 -5
- package/dist/components/Buttons/Button.js +16 -22
- package/dist/components/Buttons/Button.js.map +1 -1
- package/dist/components/Buttons/Button.stories.js +43 -56
- package/dist/components/Buttons/Button.stories.js.map +1 -1
- package/dist/components/Buttons/Button.test.js +60 -33
- package/dist/components/Buttons/Button.test.js.map +1 -1
- package/dist/components/Buttons/LinkButton.js +14 -11
- package/dist/components/Buttons/LinkButton.js.map +1 -1
- package/dist/components/Buttons/LinkButton.stories.js +41 -57
- package/dist/components/Buttons/LinkButton.stories.js.map +1 -1
- package/dist/components/Buttons/LinkButton.test.js +71 -65
- package/dist/components/Buttons/LinkButton.test.js.map +1 -1
- package/dist/components/Buttons/MenuButton.js +18 -15
- package/dist/components/Buttons/MenuButton.js.map +1 -1
- package/dist/components/Buttons/MenuButton.stories.js +45 -61
- package/dist/components/Buttons/MenuButton.stories.js.map +1 -1
- package/dist/components/Buttons/MenuButton.test.js +70 -64
- package/dist/components/Buttons/MenuButton.test.js.map +1 -1
- package/dist/components/Buttons/index.js +4 -9
- package/dist/components/Card/Card.js +2 -39
- package/dist/components/Card/Card.stories.js +42 -49
- package/dist/components/Card/Card.stories.js.map +1 -1
- package/dist/components/Card/Card.test.js +14 -8
- package/dist/components/Card/Card.test.js.map +1 -1
- package/dist/components/Card/index.js +2 -5
- package/dist/components/Checkbox/Checkbox.js +2 -9
- package/dist/components/Checkbox/Checkbox.stories.js +44 -41
- package/dist/components/Checkbox/Checkbox.stories.js.map +1 -1
- package/dist/components/Checkbox/Checkbox.test.js +21 -15
- package/dist/components/Checkbox/Checkbox.test.js.map +1 -1
- package/dist/components/Checkbox/index.js +2 -5
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.js +2 -114
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.js +277 -310
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.js.map +1 -1
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.test.js +71 -85
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.test.js.map +1 -1
- package/dist/components/CheckboxButtonBar/index.js +2 -5
- package/dist/components/CheckboxTree/CheckboxTree.js +3 -172
- package/dist/components/CheckboxTree/CheckboxTree.stories.js +89 -139
- package/dist/components/CheckboxTree/CheckboxTree.stories.js.map +1 -1
- package/dist/components/CheckboxTree/index.js +3 -5
- package/dist/components/Chip/Chip.js +2 -14
- package/dist/components/Chip/Chip.stories.js +24 -28
- package/dist/components/Chip/Chip.stories.js.map +1 -1
- package/dist/components/Chip/index.js +2 -5
- package/dist/components/ControlsButton/ControlsButton.js +2 -82
- package/dist/components/ControlsButton/ControlsButton.stories.js +98 -122
- package/dist/components/ControlsButton/ControlsButton.stories.js.map +1 -1
- package/dist/components/ControlsButton/index.js +2 -5
- package/dist/components/CopyableText/CopyableText.js +2 -64
- package/dist/components/CopyableText/CopyableText.stories.js +36 -35
- package/dist/components/CopyableText/CopyableText.stories.js.map +1 -1
- package/dist/components/CopyableText/index.js +2 -5
- package/dist/components/Drawer/Drawer.js +2 -62
- package/dist/components/Drawer/Drawer.stories.js +49 -68
- package/dist/components/Drawer/Drawer.stories.js.map +1 -1
- package/dist/components/Drawer/index.js +2 -5
- package/dist/components/EmptyStateDataDisplay/EmptyStateDataDisplay.js +2 -50
- package/dist/components/EmptyStateDataDisplay/EmptyStateDataDisplay.stories.js +17 -18
- package/dist/components/EmptyStateDataDisplay/EmptyStateDataDisplay.stories.js.map +1 -1
- package/dist/components/EmptyStateDataDisplay/index.js +2 -5
- package/dist/components/ExpandableInfoPanel/ExpandableInfoPanel.js +2 -57
- package/dist/components/ExpandableInfoPanel/ExpandableInfoPanel.stories.js +57 -50
- package/dist/components/ExpandableInfoPanel/ExpandableInfoPanel.stories.js.map +1 -1
- package/dist/components/ExpandableInfoPanel/index.js +2 -5
- package/dist/components/FeedbackBar/FeedbackBar.js +2 -30
- package/dist/components/FeedbackBar/FeedbackBar.stories.js +30 -33
- package/dist/components/FeedbackBar/FeedbackBar.stories.js.map +1 -1
- package/dist/components/FeedbackBar/FeedbackBar.test.js +18 -12
- package/dist/components/FeedbackBar/FeedbackBar.test.js.map +1 -1
- package/dist/components/FeedbackBar/index.js +2 -5
- package/dist/components/FeedbackBox/FeedbackBox.js +2 -31
- package/dist/components/FeedbackBox/FeedbackBox.stories.js +30 -34
- package/dist/components/FeedbackBox/FeedbackBox.stories.js.map +1 -1
- package/dist/components/FeedbackBox/index.js +2 -5
- package/dist/components/FieldHint/FieldHint.js +2 -15
- package/dist/components/FieldHint/FieldHint.stories.js +27 -35
- package/dist/components/FieldHint/FieldHint.stories.js.map +1 -1
- package/dist/components/FieldHint/index.js +2 -5
- package/dist/components/Fieldset/Fieldset.js +2 -32
- package/dist/components/Fieldset/Fieldset.stories.js +40 -46
- package/dist/components/Fieldset/Fieldset.stories.js.map +1 -1
- package/dist/components/Fieldset/index.js +2 -5
- package/dist/components/FormField/FormField.js +2 -23
- package/dist/components/FormField/FormField.stories.js +40 -45
- package/dist/components/FormField/FormField.stories.js.map +1 -1
- package/dist/components/FormField/index.js +2 -5
- package/dist/components/FormInput/FormInput.js +3 -79
- package/dist/components/FormInput/FormInput.stories.js +60 -40
- package/dist/components/FormInput/FormInput.stories.js.map +1 -1
- package/dist/components/FormInput/index.js +3 -5
- package/dist/components/GridRow/Column/Column.js +2 -7
- package/dist/components/GridRow/Column/index.js +2 -5
- package/dist/components/GridRow/GridRow.js +27 -38
- package/dist/components/GridRow/GridRow.js.map +1 -1
- package/dist/components/GridRow/GridRow.stories.js +198 -95
- package/dist/components/GridRow/GridRow.stories.js.map +1 -1
- package/dist/components/GridRow/index.js +2 -5
- package/dist/components/HorizontalList/HorizontalList.js +2 -13
- package/dist/components/HorizontalList/HorizontalList.stories.js +44 -46
- package/dist/components/HorizontalList/HorizontalList.stories.js.map +1 -1
- package/dist/components/HorizontalList/index.js +2 -5
- package/dist/components/Icon/Icon.js +16 -9
- package/dist/components/Icon/Icon.js.map +1 -1
- package/dist/components/Icon/Icon.stories.js +47 -50
- package/dist/components/Icon/Icon.stories.js.map +1 -1
- package/dist/components/Icon/icons/index.js +2 -672
- package/dist/components/Icon/index.js +2 -5
- package/dist/components/IconButton/IconButton.js +2 -28
- package/dist/components/IconButton/IconButton.stories.js +55 -58
- package/dist/components/IconButton/IconButton.stories.js.map +1 -1
- package/dist/components/IconButton/index.js +2 -5
- package/dist/components/InfoBanner/InfoBanner.js +2 -12
- package/dist/components/InfoBanner/InfoBanner.stories.js +18 -22
- package/dist/components/InfoBanner/InfoBanner.stories.js.map +1 -1
- package/dist/components/InfoBanner/index.js +2 -5
- package/dist/components/InfoMessage/InfoMessage.js +2 -23
- package/dist/components/InfoMessage/InfoMessage.stories.js +21 -26
- package/dist/components/InfoMessage/InfoMessage.stories.js.map +1 -1
- package/dist/components/InfoMessage/index.js +2 -5
- package/dist/components/Input/Input.js +2 -28
- package/dist/components/Input/Input.stories.js +31 -50
- package/dist/components/Input/Input.stories.js.map +1 -1
- package/dist/components/Input/index.js +2 -5
- package/dist/components/InputField/InputField.js +2 -70
- package/dist/components/InputField/InputField.stories.js +81 -109
- package/dist/components/InputField/InputField.stories.js.map +1 -1
- package/dist/components/InputField/index.js +2 -5
- package/dist/components/Label/Label.js +2 -24
- package/dist/components/Label/Label.stories.js +26 -37
- package/dist/components/Label/Label.stories.js.map +1 -1
- package/dist/components/Label/Label.test.js +35 -20
- package/dist/components/Label/Label.test.js.map +1 -1
- package/dist/components/Label/index.js +2 -5
- package/dist/components/MenuLink/MenuLink.js +2 -25
- package/dist/components/MenuLink/MenuLink.stories.js +64 -27
- package/dist/components/MenuLink/MenuLink.stories.js.map +1 -1
- package/dist/components/MenuLink/index.js +2 -5
- package/dist/components/MetaDataBar/MetaDataBar.js +2 -13
- package/dist/components/MetaDataBar/MetaDataBar.stories.js +20 -20
- package/dist/components/MetaDataBar/MetaDataBar.stories.js.map +1 -1
- package/dist/components/MetaDataBar/MetaDataBar.test.js +26 -16
- package/dist/components/MetaDataBar/MetaDataBar.test.js.map +1 -1
- package/dist/components/MetaDataBar/index.js +2 -5
- package/dist/components/MetaDataList/MetaDataList.js +2 -14
- package/dist/components/MetaDataList/MetaDataList.stories.js +21 -23
- package/dist/components/MetaDataList/MetaDataList.stories.js.map +1 -1
- package/dist/components/MetaDataList/index.js +2 -5
- package/dist/components/ModalDialog/ModalDialog.js +2 -130
- package/dist/components/ModalDialog/ModalDialog.stories.js +80 -93
- package/dist/components/ModalDialog/ModalDialog.stories.js.map +1 -1
- package/dist/components/ModalDialog/index.js +2 -5
- package/dist/components/MultiSelect/MultiSelect.js +3 -8
- package/dist/components/MultiSelect/MultiSelect.stories.js +83 -93
- package/dist/components/MultiSelect/MultiSelect.stories.js.map +1 -1
- package/dist/components/MultiSelect/components/MultiSelectHeader.js +3 -34
- package/dist/components/MultiSelect/components/MultiSelectItem.js +2 -9
- package/dist/components/MultiSelect/index.js +3 -5
- package/dist/components/MultiSelectBox/MultiSelectBox.js +2 -207
- package/dist/components/MultiSelectBox/MultiSelectBox.stories.js +101 -70
- package/dist/components/MultiSelectBox/MultiSelectBox.stories.js.map +1 -1
- package/dist/components/MultiSelectBox/MultiSelectBox.test.js +54 -29
- package/dist/components/MultiSelectBox/MultiSelectBox.test.js.map +1 -1
- package/dist/components/MultiSelectBox/index.js +2 -5
- package/dist/components/Notification/Notification.js +2 -58
- package/dist/components/Notification/Notification.stories.js +43 -40
- package/dist/components/Notification/Notification.stories.js.map +1 -1
- package/dist/components/Notification/Notification.test.js +24 -10
- package/dist/components/Notification/Notification.test.js.map +1 -1
- package/dist/components/Notification/index.js +2 -5
- package/dist/components/OverlayCloseButton/OverlayCloseButton.js +2 -25
- package/dist/components/OverlayCloseButton/OverlayCloseButton.stories.js +30 -29
- package/dist/components/OverlayCloseButton/OverlayCloseButton.stories.js.map +1 -1
- package/dist/components/OverlayCloseButton/index.js +2 -5
- package/dist/components/OverlayStepBar/OverlayStepBar.js +2 -57
- package/dist/components/OverlayStepBar/OverlayStepBar.stories.js +44 -49
- package/dist/components/OverlayStepBar/OverlayStepBar.stories.js.map +1 -1
- package/dist/components/OverlayStepBar/index.js +2 -5
- package/dist/components/PageOverlay/PageOverlay.js +2 -114
- package/dist/components/PageOverlay/PageOverlay.stories.js +155 -163
- package/dist/components/PageOverlay/PageOverlay.stories.js.map +1 -1
- package/dist/components/PageOverlay/index.js +2 -5
- package/dist/components/PeriodSelector/PeriodSelector.js +3 -96
- package/dist/components/PeriodSelector/PeriodSelector.stories.js +27 -24
- package/dist/components/PeriodSelector/PeriodSelector.stories.js.map +1 -1
- package/dist/components/PeriodSelector/index.js +3 -5
- package/dist/components/Periods/Periods.js +2 -46
- package/dist/components/Periods/Periods.stories.js +53 -60
- package/dist/components/Periods/Periods.stories.js.map +1 -1
- package/dist/components/Periods/index.js +2 -5
- package/dist/components/ProgrammeCard/ProgrammeCard.js +2 -29
- package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +71 -80
- package/dist/components/ProgrammeCard/ProgrammeCard.stories.js.map +1 -1
- package/dist/components/ProgrammeCard/index.js +2 -5
- package/dist/components/RadioButton/RadioButton.js +2 -26
- package/dist/components/RadioButton/RadioButton.stories.js +30 -40
- package/dist/components/RadioButton/RadioButton.stories.js.map +1 -1
- package/dist/components/RadioButton/index.js +2 -5
- package/dist/components/RadioGroup/RadioGroup.js +2 -52
- package/dist/components/RadioGroup/RadioGroup.stories.js +39 -46
- package/dist/components/RadioGroup/RadioGroup.stories.js.map +1 -1
- package/dist/components/RadioGroup/Radiogroup.test.js +46 -22
- package/dist/components/RadioGroup/Radiogroup.test.js.map +1 -1
- package/dist/components/RadioGroup/index.js +2 -5
- package/dist/components/RadioTabSelector/RadioTabSelector.js +3 -94
- package/dist/components/RadioTabSelector/RadioTabSelector.stories.js +76 -74
- package/dist/components/RadioTabSelector/RadioTabSelector.stories.js.map +1 -1
- package/dist/components/RadioTabSelector/index.js +3 -5
- package/dist/components/Repeater/Repeater.js +2 -19
- package/dist/components/Repeater/Repeater.stories.js +32 -42
- package/dist/components/Repeater/Repeater.stories.js.map +1 -1
- package/dist/components/Repeater/index.js +2 -5
- package/dist/components/RteEditor/EditorHeader/EditorHeader.js +3 -43
- package/dist/components/RteEditor/EditorHeader/index.js +3 -5
- package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +45 -47
- package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/BlockFormatPlugin/index.js +2 -5
- package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/AddCatalogueLinkForm/AddCatalogueLinkForm.js +2 -108
- package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/AddCatalogueLinkForm/index.js +2 -5
- package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/CourseCataloguePlugin.js +150 -194
- package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/CourseCataloguePlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/index.js +2 -5
- package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +3 -81
- package/dist/components/RteEditor/Plugins/HistoryPlugin/index.js +3 -5
- package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +3 -38
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js +2 -95
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +3 -217
- package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +2 -12
- package/dist/components/RteEditor/Plugins/LinkPlugin/index.js +3 -5
- package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +75 -83
- package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/ListPlugin/index.js +2 -5
- package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +2 -31
- package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/index.js +2 -5
- package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/TableCellResizerPlugin.js +2 -14
- package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/index.js +2 -5
- package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +3 -36
- package/dist/components/RteEditor/Plugins/TablePlugin/TableCellContextMenu/TableCellContextMenu.js +2 -133
- package/dist/components/RteEditor/Plugins/TablePlugin/TableCellContextMenu/index.js +2 -5
- package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +3 -42
- package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +69 -92
- package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js.map +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/index.js +4 -7
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +3 -90
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/index.js +3 -5
- package/dist/components/RteEditor/Plugins/index.js +7 -21
- package/dist/components/RteEditor/Providers/LanguageProvider.js +22 -17
- package/dist/components/RteEditor/Providers/LanguageProvider.js.map +1 -1
- package/dist/components/RteEditor/RteEditor.js +3 -871
- package/dist/components/RteEditor/RteEditor.stories.js +160 -207
- package/dist/components/RteEditor/RteEditor.stories.js.map +1 -1
- package/dist/components/RteEditor/UvaTheme/UvaTheme.js +41 -40
- package/dist/components/RteEditor/UvaTheme/UvaTheme.js.map +1 -1
- package/dist/components/RteEditor/UvaTheme/index.js +2 -5
- package/dist/components/RteEditor/helpers.js +33 -40
- package/dist/components/RteEditor/helpers.js.map +1 -1
- package/dist/components/RteEditor/hooks/components/Flyout.js +2 -11
- package/dist/components/RteEditor/hooks/useFlyout.js +35 -23
- package/dist/components/RteEditor/hooks/useFlyout.js.map +1 -1
- package/dist/components/RteEditor/hooks/useTranslation.js +9 -8
- package/dist/components/RteEditor/hooks/useTranslation.js.map +1 -1
- package/dist/components/RteEditor/index.js +3 -6
- package/dist/components/RteEditor/mockCatalogueSearchData.js +484 -484
- package/dist/components/RteEditor/mockCatalogueSearchData.js.map +1 -1
- package/dist/components/RteEditor/mockRteContent.js +6 -100
- package/dist/components/RteEditor/mockRteContent.js.map +1 -1
- package/dist/components/RteEditor/nodes/CourseCatalogueNode/CourseCatalogueNode.js +98 -122
- package/dist/components/RteEditor/nodes/CourseCatalogueNode/CourseCatalogueNode.js.map +1 -1
- package/dist/components/RteEditor/nodes/CourseCatalogueNode/index.js +2 -11
- package/dist/components/RteEditor/nodes/TableWrapperNode/TableWrapperNode.js +58 -72
- package/dist/components/RteEditor/nodes/TableWrapperNode/TableWrapperNode.js.map +1 -1
- package/dist/components/RteEditor/nodes/TableWrapperNode/index.js +2 -10
- package/dist/components/RteEditor/nodes/index.js +3 -18
- package/dist/components/RteEditor/translations.js +216 -215
- package/dist/components/RteEditor/translations.js.map +1 -1
- package/dist/components/SearchField/SearchField.js +104 -105
- package/dist/components/SearchField/SearchField.js.map +1 -1
- package/dist/components/SearchField/SearcheField.stories.js +89 -118
- package/dist/components/SearchField/SearcheField.stories.js.map +1 -1
- package/dist/components/SearchField/components/ResultOptionBox.js +19 -12
- package/dist/components/SearchField/components/ResultOptionBox.js.map +1 -1
- package/dist/components/SearchField/components/ResultsOption.js +50 -55
- package/dist/components/SearchField/components/ResultsOption.js.map +1 -1
- package/dist/components/SearchField/index.js +2 -5
- package/dist/components/SearchField/mockData.js +136 -135
- package/dist/components/SearchField/mockData.js.map +1 -1
- package/dist/components/SectionNotification/SectionNotification.js +2 -18
- package/dist/components/SectionNotification/SectionNotification.stories.js +21 -24
- package/dist/components/SectionNotification/SectionNotification.stories.js.map +1 -1
- package/dist/components/SectionNotification/index.js +2 -5
- package/dist/components/SelectListbox/SelectListBox.stories.js +3415 -248
- package/dist/components/SelectListbox/SelectListBox.stories.js.map +1 -1
- package/dist/components/SelectListbox/SelectListbox.js +45 -56
- package/dist/components/SelectListbox/SelectListbox.js.map +1 -1
- package/dist/components/SelectListbox/SelectProvider.js +42 -43
- package/dist/components/SelectListbox/SelectProvider.js.map +1 -1
- package/dist/components/SelectListbox/components/SelectButton.js +63 -77
- package/dist/components/SelectListbox/components/SelectButton.js.map +1 -1
- package/dist/components/SelectListbox/components/SelectContainer.js +22 -21
- package/dist/components/SelectListbox/components/SelectContainer.js.map +1 -1
- package/dist/components/SelectListbox/components/SelectOption.js +69 -66
- package/dist/components/SelectListbox/components/SelectOption.js.map +1 -1
- package/dist/components/SelectListbox/components/SelectOptionBox.js +28 -30
- package/dist/components/SelectListbox/components/SelectOptionBox.js.map +1 -1
- package/dist/components/SelectListbox/index.js +2 -5
- package/dist/components/Slider/Slider.js +2 -113
- package/dist/components/Slider/Slider.stories.js +59 -38
- package/dist/components/Slider/Slider.stories.js.map +1 -1
- package/dist/components/Slider/index.js +2 -5
- package/dist/components/Sortable/Sortable.js +25 -41
- package/dist/components/Sortable/Sortable.js.map +1 -1
- package/dist/components/Sortable/Sortable.stories.js +79 -59
- package/dist/components/Sortable/Sortable.stories.js.map +1 -1
- package/dist/components/Sortable/SortableProvider.js +2 -10
- package/dist/components/Sortable/actions.js +24 -32
- package/dist/components/Sortable/actions.js.map +1 -1
- package/dist/components/Sortable/components/SortableContainer.js +2 -9
- package/dist/components/Sortable/components/SortableHandle.js +13 -9
- package/dist/components/Sortable/components/SortableHandle.js.map +1 -1
- package/dist/components/Sortable/components/SortableItem.js +103 -113
- package/dist/components/Sortable/components/SortableItem.js.map +1 -1
- package/dist/components/Sortable/constants.js +6 -14
- package/dist/components/Sortable/constants.js.map +1 -1
- package/dist/components/Sortable/index.js +1 -4
- package/dist/components/Sortable/sortableReducer.js +76 -90
- package/dist/components/Sortable/sortableReducer.js.map +1 -1
- package/dist/components/Spinner/Spinner.js +2 -22
- package/dist/components/Spinner/Spinner.stories.js +21 -26
- package/dist/components/Spinner/Spinner.stories.js.map +1 -1
- package/dist/components/Spinner/index.js +2 -5
- package/dist/components/StatusBadge/StatusBadge.stories.js +18 -21
- package/dist/components/StatusBadge/StatusBadge.stories.js.map +1 -1
- package/dist/components/StatusBadge/StatusBadge.test.js +19 -10
- package/dist/components/StatusBadge/StatusBadge.test.js.map +1 -1
- package/dist/components/StatusBadge/StatusBage.js +2 -10
- package/dist/components/StatusBadge/index.js +2 -5
- package/dist/components/StatusPill/StatusPill.js +2 -35
- package/dist/components/StatusPill/StatusPill.stories.js +20 -20
- package/dist/components/StatusPill/StatusPill.stories.js.map +1 -1
- package/dist/components/StatusPill/index.js +2 -5
- package/dist/components/TextArea/TextArea.js +2 -65
- package/dist/components/TextArea/TextArea.stories.js +30 -31
- package/dist/components/TextArea/TextArea.stories.js.map +1 -1
- package/dist/components/TextArea/TextArea.test.js +38 -22
- package/dist/components/TextArea/TextArea.test.js.map +1 -1
- package/dist/components/TextArea/index.js +2 -5
- package/dist/components/ToggleSwitch/ToggleSwitch.js +2 -66
- package/dist/components/ToggleSwitch/ToggleSwitch.stories.js +20 -26
- package/dist/components/ToggleSwitch/ToggleSwitch.stories.js.map +1 -1
- package/dist/components/ToggleSwitch/index.js +2 -5
- package/dist/components/Tooltip/Tooltip.js +2 -75
- package/dist/components/Tooltip/Tooltip.stories.js +27 -32
- package/dist/components/Tooltip/Tooltip.stories.js.map +1 -1
- package/dist/components/Tooltip/index.js +2 -5
- package/dist/components/VarIndicator/VarIndicator.js +2 -62
- package/dist/components/VarIndicator/VarIndicator.stories.js +31 -30
- package/dist/components/VarIndicator/VarIndicator.stories.js.map +1 -1
- package/dist/components/VarIndicator/VarIndicator.test.js +72 -54
- package/dist/components/VarIndicator/VarIndicator.test.js.map +1 -1
- package/dist/components/VarIndicator/index.js +2 -5
- package/dist/components/WeekSelector/WeekSelector.js +89 -97
- package/dist/components/WeekSelector/WeekSelector.js.map +1 -1
- package/dist/components/WeekSelector/WeekSelector.stories.js +146 -191
- package/dist/components/WeekSelector/WeekSelector.stories.js.map +1 -1
- package/dist/components/WeekSelector/components/WeekSelectorButton.js +20 -22
- package/dist/components/WeekSelector/components/WeekSelectorButton.js.map +1 -1
- package/dist/components/WeekSelector/components/WeekSelectorOption.js +72 -85
- package/dist/components/WeekSelector/components/WeekSelectorOption.js.map +1 -1
- package/dist/components/WeekSelector/components/WeekSelectorOptionContainer.js +30 -17
- package/dist/components/WeekSelector/components/WeekSelectorOptionContainer.js.map +1 -1
- package/dist/components/WeekSelector/index.js +2 -5
- package/dist/components/WeekSelector/mockdata.js +470 -469
- package/dist/components/WeekSelector/mockdata.js.map +1 -1
- package/dist/components/hooks/useDebounce.js +17 -16
- package/dist/components/hooks/useDebounce.js.map +1 -1
- package/dist/components/hooks/useOnClickOutside.js +15 -14
- package/dist/components/hooks/useOnClickOutside.js.map +1 -1
- package/dist/components/hooks/usePositionedFloaters.js +66 -71
- package/dist/components/hooks/usePositionedFloaters.js.map +1 -1
- package/dist/components/hooks/useResponsive.js +36 -32
- package/dist/components/hooks/useResponsive.js.map +1 -1
- package/dist/components/index.js +64 -139
- package/dist/components-C4MCdrDH.js +1995 -0
- package/dist/components-C4MCdrDH.js.map +1 -0
- package/dist/dist-2TKCXdYZ.js +2005 -0
- package/dist/dist-2TKCXdYZ.js.map +1 -0
- package/dist/esm-UNe_gmRA.js +2781 -0
- package/dist/esm-UNe_gmRA.js.map +1 -0
- package/dist/helpers-BBSxTGRl.js +34 -0
- package/dist/helpers-BBSxTGRl.js.map +1 -0
- package/dist/icons-TRhI-4V6.js +2681 -0
- package/dist/icons-TRhI-4V6.js.map +1 -0
- package/dist/index.js +64 -139
- package/dist/lib-6BbFZdI7.js +5595 -0
- package/dist/lib-6BbFZdI7.js.map +1 -0
- package/dist/react-18-CRbkdI-3.js +43 -0
- package/dist/react-18-CRbkdI-3.js.map +1 -0
- package/dist/react.esm-CzIhAqlo.js +3297 -0
- package/dist/react.esm-CzIhAqlo.js.map +1 -0
- package/dist/setupTests.js +1226 -36
- package/dist/setupTests.js.map +1 -1
- package/dist/storyComponents/ClipboardButton/ClipboardButton.js +2 -45
- package/dist/storyComponents/ClipboardButton/index.js +2 -5
- package/dist/storyComponents/Container/Container.js +2 -40
- package/dist/storyComponents/Container/index.js +2 -5
- package/dist/storybook__react.d.js +6939 -7524
- package/dist/storybook__react.d.js.map +1 -1
- package/dist/test-DQruvi8i.js +19466 -0
- package/dist/test-DQruvi8i.js.map +1 -0
- package/dist/test-utils-BSs0eZfL.js +21 -0
- package/dist/test-utils-BSs0eZfL.js.map +1 -0
- package/dist/types/UserInterface.js +0 -2
- package/dist/vite-env.d.js +0 -2
- package/package.json +27 -27
- package/dist/Button.module-S1-6tV9o.js +0 -16
- package/dist/Button.module-S1-6tV9o.js.map +0 -1
- package/dist/Column-BL3dsYxn.js +0 -101
- package/dist/Column-BL3dsYxn.js.map +0 -1
- package/dist/Lexical.prod-o6Eq_uLx.js +0 -5202
- package/dist/Lexical.prod-o6Eq_uLx.js.map +0 -1
- package/dist/LexicalClipboard.prod-CnUrf2_p.js +0 -265
- package/dist/LexicalClipboard.prod-CnUrf2_p.js.map +0 -1
- package/dist/LexicalComposerContext.prod-DOyoZx0P.js +0 -22
- package/dist/LexicalComposerContext.prod-DOyoZx0P.js.map +0 -1
- package/dist/LexicalExtension.prod-CanXuzFO.js +0 -551
- package/dist/LexicalExtension.prod-CanXuzFO.js.map +0 -1
- package/dist/LexicalLink.prod-DAVbKER8.js +0 -561
- package/dist/LexicalLink.prod-DAVbKER8.js.map +0 -1
- package/dist/LexicalList.prod-C6cknPBV.js +0 -632
- package/dist/LexicalList.prod-C6cknPBV.js.map +0 -1
- package/dist/LexicalSelection.prod-B8GGrzJ3.js +0 -116
- package/dist/LexicalSelection.prod-B8GGrzJ3.js.map +0 -1
- package/dist/LexicalTable.prod-upbwOtcE.js +0 -1892
- package/dist/LexicalTable.prod-upbwOtcE.js.map +0 -1
- package/dist/LexicalUtils.prod-CF7x-KWm.js +0 -134
- package/dist/LexicalUtils.prod-CF7x-KWm.js.map +0 -1
- package/dist/MultiSelectItem-BzBmsKof.js +0 -24
- package/dist/MultiSelectItem-BzBmsKof.js.map +0 -1
- package/dist/RteEditor.module-CoTOIw5i.js +0 -41
- package/dist/RteEditor.module-CoTOIw5i.js.map +0 -1
- package/dist/SearchField.module-CMUEgX7d.js +0 -17
- package/dist/SearchField.module-CMUEgX7d.js.map +0 -1
- package/dist/SelectListbox.module-CXqMuXRB.js +0 -29
- package/dist/SelectListbox.module-CXqMuXRB.js.map +0 -1
- package/dist/Sortable.module-DCVXxKnw.js +0 -26
- package/dist/Sortable.module-DCVXxKnw.js.map +0 -1
- package/dist/SortableProvider-BbwlEPIr.js +0 -160
- package/dist/SortableProvider-BbwlEPIr.js.map +0 -1
- package/dist/TableCellResizerPlugin-qMtSAoKT.js +0 -248
- package/dist/TableCellResizerPlugin-qMtSAoKT.js.map +0 -1
- package/dist/TablePlugin-BRZcXq73.js +0 -308
- package/dist/TablePlugin-BRZcXq73.js.map +0 -1
- package/dist/WeekSelector.module-Clco7jTs.js +0 -17
- package/dist/WeekSelector.module-Clco7jTs.js.map +0 -1
- package/dist/_commonjsHelpers-DaMA6jEr.js +0 -9
- package/dist/_commonjsHelpers-DaMA6jEr.js.map +0 -1
- package/dist/assets/CheckboxTree.css +0 -1
- package/dist/assets/EditorHeader.css +0 -1
- package/dist/assets/FormInput.css +0 -1
- package/dist/assets/PeriodSelector.css +0 -1
- package/dist/assets/RadioTabSelector.css +0 -1
- package/dist/assets/TablePlugin.css +0 -1
- package/dist/chunk-OPOZOKLO-nJkI9rUN.js +0 -4508
- package/dist/chunk-OPOZOKLO-nJkI9rUN.js.map +0 -1
- package/dist/client-D5eE1v54.js +0 -27222
- package/dist/client-D5eE1v54.js.map +0 -1
- package/dist/clsx-OuTLNxxd.js +0 -17
- package/dist/clsx-OuTLNxxd.js.map +0 -1
- package/dist/components/Accordion/Accordion.js.map +0 -1
- package/dist/components/Accordion/index.js.map +0 -1
- package/dist/components/AccordionCard/AccordionCard.js.map +0 -1
- package/dist/components/AccordionCard/index.js.map +0 -1
- package/dist/components/ActionList/ActionList.js.map +0 -1
- package/dist/components/ActionList/index.js.map +0 -1
- package/dist/components/AppStatusBar/AppStatusBar.js.map +0 -1
- package/dist/components/AppStatusBar/index.js.map +0 -1
- package/dist/components/Attention/Attention.js.map +0 -1
- package/dist/components/Attention/index.js.map +0 -1
- package/dist/components/Backdrop/Backdrop.js.map +0 -1
- package/dist/components/Backdrop/index.js.map +0 -1
- package/dist/components/ButtonGroup/ButtonGroup.js.map +0 -1
- package/dist/components/ButtonGroup/index.js.map +0 -1
- package/dist/components/Buttons/index.js.map +0 -1
- package/dist/components/Card/Card.js.map +0 -1
- package/dist/components/Card/index.js.map +0 -1
- package/dist/components/Checkbox/Checkbox.js.map +0 -1
- package/dist/components/Checkbox/index.js.map +0 -1
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.js.map +0 -1
- package/dist/components/CheckboxButtonBar/index.js.map +0 -1
- package/dist/components/CheckboxTree/CheckboxTree.js.map +0 -1
- package/dist/components/CheckboxTree/index.js.map +0 -1
- package/dist/components/Chip/Chip.js.map +0 -1
- package/dist/components/Chip/index.js.map +0 -1
- package/dist/components/ControlsButton/ControlsButton.js.map +0 -1
- package/dist/components/ControlsButton/index.js.map +0 -1
- package/dist/components/CopyableText/CopyableText.js.map +0 -1
- package/dist/components/CopyableText/index.js.map +0 -1
- package/dist/components/Drawer/Drawer.js.map +0 -1
- package/dist/components/Drawer/index.js.map +0 -1
- package/dist/components/EmptyStateDataDisplay/EmptyStateDataDisplay.js.map +0 -1
- package/dist/components/EmptyStateDataDisplay/index.js.map +0 -1
- package/dist/components/ExpandableInfoPanel/ExpandableInfoPanel.js.map +0 -1
- package/dist/components/ExpandableInfoPanel/index.js.map +0 -1
- package/dist/components/FeedbackBar/FeedbackBar.js.map +0 -1
- package/dist/components/FeedbackBar/index.js.map +0 -1
- package/dist/components/FeedbackBox/FeedbackBox.js.map +0 -1
- package/dist/components/FeedbackBox/index.js.map +0 -1
- package/dist/components/FieldHint/FieldHint.js.map +0 -1
- package/dist/components/FieldHint/index.js.map +0 -1
- package/dist/components/Fieldset/Fieldset.js.map +0 -1
- package/dist/components/Fieldset/index.js.map +0 -1
- package/dist/components/FormField/FormField.js.map +0 -1
- package/dist/components/FormField/index.js.map +0 -1
- package/dist/components/FormInput/FormInput.js.map +0 -1
- package/dist/components/FormInput/index.js.map +0 -1
- package/dist/components/GridRow/Column/Column.js.map +0 -1
- package/dist/components/GridRow/Column/index.js.map +0 -1
- package/dist/components/GridRow/index.js.map +0 -1
- package/dist/components/HorizontalList/HorizontalList.js.map +0 -1
- package/dist/components/HorizontalList/index.js.map +0 -1
- package/dist/components/Icon/icons/index.js.map +0 -1
- package/dist/components/Icon/index.js.map +0 -1
- package/dist/components/IconButton/IconButton.js.map +0 -1
- package/dist/components/IconButton/index.js.map +0 -1
- package/dist/components/InfoBanner/InfoBanner.js.map +0 -1
- package/dist/components/InfoBanner/index.js.map +0 -1
- package/dist/components/InfoMessage/InfoMessage.js.map +0 -1
- package/dist/components/InfoMessage/index.js.map +0 -1
- package/dist/components/Input/Input.js.map +0 -1
- package/dist/components/Input/index.js.map +0 -1
- package/dist/components/InputField/InputField.js.map +0 -1
- package/dist/components/InputField/index.js.map +0 -1
- package/dist/components/Label/Label.js.map +0 -1
- package/dist/components/Label/index.js.map +0 -1
- package/dist/components/MenuLink/MenuLink.js.map +0 -1
- package/dist/components/MenuLink/index.js.map +0 -1
- package/dist/components/MetaDataBar/MetaDataBar.js.map +0 -1
- package/dist/components/MetaDataBar/index.js.map +0 -1
- package/dist/components/MetaDataList/MetaDataList.js.map +0 -1
- package/dist/components/MetaDataList/index.js.map +0 -1
- package/dist/components/ModalDialog/ModalDialog.js.map +0 -1
- package/dist/components/ModalDialog/index.js.map +0 -1
- package/dist/components/MultiSelect/MultiSelect.js.map +0 -1
- package/dist/components/MultiSelect/components/MultiSelectHeader.js.map +0 -1
- package/dist/components/MultiSelect/components/MultiSelectItem.js.map +0 -1
- package/dist/components/MultiSelect/index.js.map +0 -1
- package/dist/components/MultiSelectBox/MultiSelectBox.js.map +0 -1
- package/dist/components/MultiSelectBox/index.js.map +0 -1
- package/dist/components/Notification/Notification.js.map +0 -1
- package/dist/components/Notification/index.js.map +0 -1
- package/dist/components/OverlayCloseButton/OverlayCloseButton.js.map +0 -1
- package/dist/components/OverlayCloseButton/index.js.map +0 -1
- package/dist/components/OverlayStepBar/OverlayStepBar.js.map +0 -1
- package/dist/components/OverlayStepBar/index.js.map +0 -1
- package/dist/components/PageOverlay/PageOverlay.js.map +0 -1
- package/dist/components/PageOverlay/index.js.map +0 -1
- package/dist/components/PeriodSelector/PeriodSelector.js.map +0 -1
- package/dist/components/PeriodSelector/index.js.map +0 -1
- package/dist/components/Periods/Periods.js.map +0 -1
- package/dist/components/Periods/index.js.map +0 -1
- package/dist/components/ProgrammeCard/ProgrammeCard.js.map +0 -1
- package/dist/components/ProgrammeCard/index.js.map +0 -1
- package/dist/components/RadioButton/RadioButton.js.map +0 -1
- package/dist/components/RadioButton/index.js.map +0 -1
- package/dist/components/RadioGroup/RadioGroup.js.map +0 -1
- package/dist/components/RadioGroup/index.js.map +0 -1
- package/dist/components/RadioTabSelector/RadioTabSelector.js.map +0 -1
- package/dist/components/RadioTabSelector/index.js.map +0 -1
- package/dist/components/Repeater/Repeater.js.map +0 -1
- package/dist/components/Repeater/index.js.map +0 -1
- package/dist/components/RteEditor/EditorHeader/EditorHeader.js.map +0 -1
- package/dist/components/RteEditor/EditorHeader/index.js.map +0 -1
- package/dist/components/RteEditor/Plugins/BlockFormatPlugin/index.js.map +0 -1
- package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/AddCatalogueLinkForm/AddCatalogueLinkForm.js.map +0 -1
- package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/AddCatalogueLinkForm/index.js.map +0 -1
- package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/index.js.map +0 -1
- package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js.map +0 -1
- package/dist/components/RteEditor/Plugins/HistoryPlugin/index.js.map +0 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js.map +0 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js.map +0 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js.map +0 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js.map +0 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/index.js.map +0 -1
- package/dist/components/RteEditor/Plugins/ListPlugin/index.js.map +0 -1
- package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js.map +0 -1
- package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/index.js.map +0 -1
- package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/TableCellResizerPlugin.js.map +0 -1
- package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/index.js.map +0 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js.map +0 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/TableCellContextMenu/TableCellContextMenu.js.map +0 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/TableCellContextMenu/index.js.map +0 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js.map +0 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/index.js.map +0 -1
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js.map +0 -1
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/index.js.map +0 -1
- package/dist/components/RteEditor/Plugins/index.js.map +0 -1
- package/dist/components/RteEditor/RteEditor.js.map +0 -1
- package/dist/components/RteEditor/UvaTheme/index.js.map +0 -1
- package/dist/components/RteEditor/hooks/components/Flyout.js.map +0 -1
- package/dist/components/RteEditor/index.js.map +0 -1
- package/dist/components/RteEditor/nodes/CourseCatalogueNode/index.js.map +0 -1
- package/dist/components/RteEditor/nodes/TableWrapperNode/index.js.map +0 -1
- package/dist/components/RteEditor/nodes/index.js.map +0 -1
- package/dist/components/SearchField/index.js.map +0 -1
- package/dist/components/SectionNotification/SectionNotification.js.map +0 -1
- package/dist/components/SectionNotification/index.js.map +0 -1
- package/dist/components/SelectListbox/index.js.map +0 -1
- package/dist/components/Slider/Slider.js.map +0 -1
- package/dist/components/Slider/index.js.map +0 -1
- package/dist/components/Sortable/SortableProvider.js.map +0 -1
- package/dist/components/Sortable/components/SortableContainer.js.map +0 -1
- package/dist/components/Sortable/index.js.map +0 -1
- package/dist/components/Spinner/Spinner.js.map +0 -1
- package/dist/components/Spinner/index.js.map +0 -1
- package/dist/components/StatusBadge/StatusBage.js.map +0 -1
- package/dist/components/StatusBadge/index.js.map +0 -1
- package/dist/components/StatusPill/StatusPill.js.map +0 -1
- package/dist/components/StatusPill/index.js.map +0 -1
- package/dist/components/TextArea/TextArea.js.map +0 -1
- package/dist/components/TextArea/index.js.map +0 -1
- package/dist/components/ToggleSwitch/ToggleSwitch.js.map +0 -1
- package/dist/components/ToggleSwitch/index.js.map +0 -1
- package/dist/components/Tooltip/Tooltip.js.map +0 -1
- package/dist/components/Tooltip/index.js.map +0 -1
- package/dist/components/VarIndicator/VarIndicator.js.map +0 -1
- package/dist/components/VarIndicator/index.js.map +0 -1
- package/dist/components/WeekSelector/index.js.map +0 -1
- package/dist/components/index.js.map +0 -1
- package/dist/index-B_q_4aBT.js +0 -24946
- package/dist/index-B_q_4aBT.js.map +0 -1
- package/dist/index-CULNJwuI.js +0 -2355
- package/dist/index-CULNJwuI.js.map +0 -1
- package/dist/index-D6WVIfcJ.js +0 -6039
- package/dist/index-D6WVIfcJ.js.map +0 -1
- package/dist/index-YdDr6J97.js +0 -3099
- package/dist/index-YdDr6J97.js.map +0 -1
- package/dist/index-yEhaxKq-.js +0 -238
- package/dist/index-yEhaxKq-.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/react-18-CxCoNkIN.js +0 -41
- package/dist/react-18-CxCoNkIN.js.map +0 -1
- package/dist/react.esm-C68fQMAi.js +0 -4237
- package/dist/react.esm-C68fQMAi.js.map +0 -1
- package/dist/storyComponents/ClipboardButton/ClipboardButton.js.map +0 -1
- package/dist/storyComponents/ClipboardButton/index.js.map +0 -1
- package/dist/storyComponents/Container/Container.js.map +0 -1
- package/dist/storyComponents/Container/index.js.map +0 -1
- package/dist/test-utils-BcpWLsLH.js +0 -56
- package/dist/test-utils-BcpWLsLH.js.map +0 -1
- package/dist/types/UserInterface.js.map +0 -1
- package/dist/vite-env.d.js.map +0 -1
|
@@ -0,0 +1,2003 @@
|
|
|
1
|
+
import { $t as e, A as t, An as n, At as r, Bn as i, Bt as a, Cn as o, Dn as s, Et as c, H as l, Hn as u, In as d, It as f, Jt as p, Ln as m, Mn as h, Nn as g, Nt as _, O as v, Ot as y, Q as b, Rt as x, S, St as C, Un as ee, Vn as te, Vt as w, Wn as T, Wt as ne, Y as re, Yt as ie, Zt as ae, _ as oe, _n as se, a as ce, an as le, at as ue, b as de, d as fe, dn as E, fn as pe, g as me, ht as he, i as ge, in as _e, it as D, k as ve, kn as ye, ln as be, mn as xe, mt as Se, nt as O, o as Ce, ot as we, p as k, q as A, r as j, rn as Te, rt as Ee, s as De, tt as Oe, un as ke, vn as Ae, vt as je, wn as M, wt as Me, yn as Ne, zt as Pe } from "./Lexical.prod-DIglXatJ.js";
|
|
2
|
+
import { d as Fe, i as Ie, l as Le, o as Re, r as ze, u as Be } from "./LexicalUtils.prod-BBTLliac.js";
|
|
3
|
+
import { a as Ve, o as He, r as Ue } from "./LexicalExtension.prod-COPHoPpX.js";
|
|
4
|
+
import { r as We, t as Ge } from "./LexicalClipboard.prod-Bnzu0sh_.js";
|
|
5
|
+
//#region node_modules/@lexical/table/LexicalTable.prod.mjs
|
|
6
|
+
var Ke = /^(\d+(?:\.\d+)?)px$/, N = {
|
|
7
|
+
BOTH: 3,
|
|
8
|
+
COLUMN: 2,
|
|
9
|
+
NO_STATUS: 0,
|
|
10
|
+
ROW: 1
|
|
11
|
+
}, P = class e extends Ce {
|
|
12
|
+
__colSpan;
|
|
13
|
+
__rowSpan;
|
|
14
|
+
__headerState;
|
|
15
|
+
__width;
|
|
16
|
+
__backgroundColor;
|
|
17
|
+
__verticalAlign;
|
|
18
|
+
static getType() {
|
|
19
|
+
return "tablecell";
|
|
20
|
+
}
|
|
21
|
+
static clone(t) {
|
|
22
|
+
return new e(t.__headerState, t.__colSpan, t.__width, t.__key);
|
|
23
|
+
}
|
|
24
|
+
afterCloneFrom(e) {
|
|
25
|
+
super.afterCloneFrom(e), this.__rowSpan = e.__rowSpan, this.__backgroundColor = e.__backgroundColor, this.__verticalAlign = e.__verticalAlign, this.__colSpan = e.__colSpan, this.__headerState = e.__headerState, this.__width = e.__width;
|
|
26
|
+
}
|
|
27
|
+
static importDOM() {
|
|
28
|
+
return {
|
|
29
|
+
td: (e) => ({
|
|
30
|
+
conversion: Je,
|
|
31
|
+
priority: 0
|
|
32
|
+
}),
|
|
33
|
+
th: (e) => ({
|
|
34
|
+
conversion: Je,
|
|
35
|
+
priority: 0
|
|
36
|
+
})
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
static importJSON(e) {
|
|
40
|
+
return F().updateFromJSON(e);
|
|
41
|
+
}
|
|
42
|
+
updateFromJSON(e) {
|
|
43
|
+
return super.updateFromJSON(e).setHeaderStyles(e.headerState).setColSpan(e.colSpan || 1).setRowSpan(e.rowSpan || 1).setWidth(e.width || void 0).setBackgroundColor(e.backgroundColor || null).setVerticalAlign(e.verticalAlign || void 0);
|
|
44
|
+
}
|
|
45
|
+
constructor(e = N.NO_STATUS, t = 1, n, r) {
|
|
46
|
+
super(r), this.__colSpan = t, this.__rowSpan = 1, this.__headerState = e, this.__width = n, this.__backgroundColor = null, this.__verticalAlign = void 0;
|
|
47
|
+
}
|
|
48
|
+
createDOM(e) {
|
|
49
|
+
let t = document.createElement(this.getTag());
|
|
50
|
+
return this.__width && (t.style.width = `${this.__width}px`), this.__colSpan > 1 && (t.colSpan = this.__colSpan), this.__rowSpan > 1 && (t.rowSpan = this.__rowSpan), this.__backgroundColor !== null && (t.style.backgroundColor = this.__backgroundColor), qe(this.__verticalAlign) && (t.style.verticalAlign = this.__verticalAlign), w(t, e.theme.tableCell, this.hasHeader() && e.theme.tableCellHeader), t;
|
|
51
|
+
}
|
|
52
|
+
exportDOM(e) {
|
|
53
|
+
let t = super.exportDOM(e);
|
|
54
|
+
if (ue(t.element)) {
|
|
55
|
+
let e = t.element;
|
|
56
|
+
e.setAttribute("data-temporary-table-cell-lexical-key", this.getKey()), e.style.border = "1px solid black", this.__colSpan > 1 && (e.colSpan = this.__colSpan), this.__rowSpan > 1 && (e.rowSpan = this.__rowSpan), e.style.width = `${this.getWidth() || 75}px`, e.style.verticalAlign = this.getVerticalAlign() || "top", e.style.textAlign = "start", this.__backgroundColor === null && this.hasHeader() && (e.style.backgroundColor = "#f2f3f5");
|
|
57
|
+
}
|
|
58
|
+
return t;
|
|
59
|
+
}
|
|
60
|
+
exportJSON() {
|
|
61
|
+
return {
|
|
62
|
+
...super.exportJSON(),
|
|
63
|
+
...qe(this.__verticalAlign) && { verticalAlign: this.__verticalAlign },
|
|
64
|
+
backgroundColor: this.getBackgroundColor(),
|
|
65
|
+
colSpan: this.__colSpan,
|
|
66
|
+
headerState: this.__headerState,
|
|
67
|
+
rowSpan: this.__rowSpan,
|
|
68
|
+
width: this.getWidth()
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
getColSpan() {
|
|
72
|
+
return this.getLatest().__colSpan;
|
|
73
|
+
}
|
|
74
|
+
setColSpan(e) {
|
|
75
|
+
let t = this.getWritable();
|
|
76
|
+
return t.__colSpan = e, t;
|
|
77
|
+
}
|
|
78
|
+
getRowSpan() {
|
|
79
|
+
return this.getLatest().__rowSpan;
|
|
80
|
+
}
|
|
81
|
+
setRowSpan(e) {
|
|
82
|
+
let t = this.getWritable();
|
|
83
|
+
return t.__rowSpan = e, t;
|
|
84
|
+
}
|
|
85
|
+
getTag() {
|
|
86
|
+
return this.hasHeader() ? "th" : "td";
|
|
87
|
+
}
|
|
88
|
+
setHeaderStyles(e, t = N.BOTH) {
|
|
89
|
+
let n = this.getWritable();
|
|
90
|
+
return n.__headerState = e & t | n.__headerState & ~t, n;
|
|
91
|
+
}
|
|
92
|
+
getHeaderStyles() {
|
|
93
|
+
return this.getLatest().__headerState;
|
|
94
|
+
}
|
|
95
|
+
setWidth(e) {
|
|
96
|
+
let t = this.getWritable();
|
|
97
|
+
return t.__width = e, t;
|
|
98
|
+
}
|
|
99
|
+
getWidth() {
|
|
100
|
+
return this.getLatest().__width;
|
|
101
|
+
}
|
|
102
|
+
getBackgroundColor() {
|
|
103
|
+
return this.getLatest().__backgroundColor;
|
|
104
|
+
}
|
|
105
|
+
setBackgroundColor(e) {
|
|
106
|
+
let t = this.getWritable();
|
|
107
|
+
return t.__backgroundColor = e, t;
|
|
108
|
+
}
|
|
109
|
+
getVerticalAlign() {
|
|
110
|
+
return this.getLatest().__verticalAlign;
|
|
111
|
+
}
|
|
112
|
+
setVerticalAlign(e) {
|
|
113
|
+
let t = this.getWritable();
|
|
114
|
+
return t.__verticalAlign = e || void 0, t;
|
|
115
|
+
}
|
|
116
|
+
toggleHeaderStyle(e) {
|
|
117
|
+
let t = this.getWritable();
|
|
118
|
+
return (t.__headerState & e) === e ? t.__headerState -= e : t.__headerState += e, t;
|
|
119
|
+
}
|
|
120
|
+
hasHeaderState(e) {
|
|
121
|
+
return (this.getHeaderStyles() & e) === e;
|
|
122
|
+
}
|
|
123
|
+
hasHeader() {
|
|
124
|
+
return this.getLatest().__headerState !== N.NO_STATUS;
|
|
125
|
+
}
|
|
126
|
+
updateDOM(e) {
|
|
127
|
+
return e.__headerState !== this.__headerState || e.__width !== this.__width || e.__colSpan !== this.__colSpan || e.__rowSpan !== this.__rowSpan || e.__backgroundColor !== this.__backgroundColor || e.__verticalAlign !== this.__verticalAlign;
|
|
128
|
+
}
|
|
129
|
+
isShadowRoot() {
|
|
130
|
+
return !0;
|
|
131
|
+
}
|
|
132
|
+
collapseAtStart() {
|
|
133
|
+
return !0;
|
|
134
|
+
}
|
|
135
|
+
canBeEmpty() {
|
|
136
|
+
return !1;
|
|
137
|
+
}
|
|
138
|
+
canIndent() {
|
|
139
|
+
return !1;
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
function qe(e) {
|
|
143
|
+
return e === "middle" || e === "bottom";
|
|
144
|
+
}
|
|
145
|
+
function Je(e) {
|
|
146
|
+
let t = e, n = e.nodeName.toLowerCase(), r;
|
|
147
|
+
Ke.test(t.style.width) && (r = parseFloat(t.style.width));
|
|
148
|
+
let a = N.NO_STATUS;
|
|
149
|
+
n === "th" && (a = t.getAttribute("scope") === "col" ? N.COLUMN : N.ROW);
|
|
150
|
+
let o = F(a, t.colSpan, r);
|
|
151
|
+
o.__rowSpan = t.rowSpan;
|
|
152
|
+
let s = t.style.backgroundColor;
|
|
153
|
+
s !== "" && (o.__backgroundColor = s);
|
|
154
|
+
let c = t.style.verticalAlign;
|
|
155
|
+
qe(c) && (o.__verticalAlign = c);
|
|
156
|
+
let l = t.style, u = (l && l.textDecoration || "").split(" "), f = l.fontWeight === "700" || l.fontWeight === "bold", p = u.includes("line-through"), m = l.fontStyle === "italic", h = u.includes("underline");
|
|
157
|
+
return {
|
|
158
|
+
after: (e) => {
|
|
159
|
+
let t = [], n = null, r = () => {
|
|
160
|
+
if (n) {
|
|
161
|
+
let e = n.getFirstChild();
|
|
162
|
+
_(e) && n.getChildrenSize() === 1 && e.remove();
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
for (let a of e) d(a) || i(a) || _(a) ? (i(a) && (f && a.toggleFormat("bold"), p && a.toggleFormat("strikethrough"), m && a.toggleFormat("italic"), h && a.toggleFormat("underline")), n ? n.append(a) : (n = C().append(a), t.push(n))) : (t.push(a), r(), n = null);
|
|
166
|
+
return r(), t.length === 0 && t.push(C()), t;
|
|
167
|
+
},
|
|
168
|
+
node: o
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
function F(e = N.NO_STATUS, t = 1, n) {
|
|
172
|
+
return _e(new P(e, t, n));
|
|
173
|
+
}
|
|
174
|
+
function I(e) {
|
|
175
|
+
return e instanceof P;
|
|
176
|
+
}
|
|
177
|
+
var Ye = pe("INSERT_TABLE_COMMAND");
|
|
178
|
+
function L(e, ...t) {
|
|
179
|
+
let n = new URL("https://lexical.dev/docs/error"), r = new URLSearchParams();
|
|
180
|
+
r.append("code", e);
|
|
181
|
+
for (let e of t) r.append("v", e);
|
|
182
|
+
throw n.search = r.toString(), Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
|
|
183
|
+
}
|
|
184
|
+
var Xe = class e extends Ce {
|
|
185
|
+
__height;
|
|
186
|
+
static getType() {
|
|
187
|
+
return "tablerow";
|
|
188
|
+
}
|
|
189
|
+
static clone(t) {
|
|
190
|
+
return new e(t.__height, t.__key);
|
|
191
|
+
}
|
|
192
|
+
afterCloneFrom(e) {
|
|
193
|
+
super.afterCloneFrom(e), this.__height = e.__height;
|
|
194
|
+
}
|
|
195
|
+
static importDOM() {
|
|
196
|
+
return { tr: (e) => ({
|
|
197
|
+
conversion: Ze,
|
|
198
|
+
priority: 0
|
|
199
|
+
}) };
|
|
200
|
+
}
|
|
201
|
+
static importJSON(e) {
|
|
202
|
+
return R().updateFromJSON(e);
|
|
203
|
+
}
|
|
204
|
+
updateFromJSON(e) {
|
|
205
|
+
return super.updateFromJSON(e).setHeight(e.height);
|
|
206
|
+
}
|
|
207
|
+
constructor(e, t) {
|
|
208
|
+
super(t), this.__height = e;
|
|
209
|
+
}
|
|
210
|
+
exportJSON() {
|
|
211
|
+
let e = this.getHeight();
|
|
212
|
+
return {
|
|
213
|
+
...super.exportJSON(),
|
|
214
|
+
...e === void 0 ? void 0 : { height: e }
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
createDOM(e) {
|
|
218
|
+
let t = document.createElement("tr");
|
|
219
|
+
return this.__height && (t.style.height = `${this.__height}px`), w(t, e.theme.tableRow), t;
|
|
220
|
+
}
|
|
221
|
+
extractWithChild(e, t, n) {
|
|
222
|
+
return n === "html";
|
|
223
|
+
}
|
|
224
|
+
isShadowRoot() {
|
|
225
|
+
return !0;
|
|
226
|
+
}
|
|
227
|
+
setHeight(e) {
|
|
228
|
+
let t = this.getWritable();
|
|
229
|
+
return t.__height = e, t;
|
|
230
|
+
}
|
|
231
|
+
getHeight() {
|
|
232
|
+
return this.getLatest().__height;
|
|
233
|
+
}
|
|
234
|
+
updateDOM(e) {
|
|
235
|
+
return e.__height !== this.__height;
|
|
236
|
+
}
|
|
237
|
+
canBeEmpty() {
|
|
238
|
+
return !1;
|
|
239
|
+
}
|
|
240
|
+
canIndent() {
|
|
241
|
+
return !1;
|
|
242
|
+
}
|
|
243
|
+
};
|
|
244
|
+
function Ze(e) {
|
|
245
|
+
let t = e, n;
|
|
246
|
+
return Ke.test(t.style.height) && (n = parseFloat(t.style.height)), {
|
|
247
|
+
after: (e) => ze(e, I),
|
|
248
|
+
node: R(n)
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
function R(e) {
|
|
252
|
+
return _e(new Xe(e));
|
|
253
|
+
}
|
|
254
|
+
function z(e) {
|
|
255
|
+
return e instanceof Xe;
|
|
256
|
+
}
|
|
257
|
+
var Qe = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, $e = Qe && "documentMode" in document ? document.documentMode : null, et = Qe && /^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent);
|
|
258
|
+
function tt(e, t, n = !0) {
|
|
259
|
+
let r = un();
|
|
260
|
+
for (let i = 0; i < e; i++) {
|
|
261
|
+
let e = R();
|
|
262
|
+
for (let r = 0; r < t; r++) {
|
|
263
|
+
let t = N.NO_STATUS;
|
|
264
|
+
typeof n == "object" ? (i === 0 && n.rows && (t |= N.ROW), r === 0 && n.columns && (t |= N.COLUMN)) : n && (i === 0 && (t |= N.ROW), r === 0 && (t |= N.COLUMN));
|
|
265
|
+
let a = F(t), o = C();
|
|
266
|
+
o.append(Ne()), a.append(o), e.append(a);
|
|
267
|
+
}
|
|
268
|
+
r.append(e);
|
|
269
|
+
}
|
|
270
|
+
return r;
|
|
271
|
+
}
|
|
272
|
+
function nt(e) {
|
|
273
|
+
let t = v(e, (e) => I(e));
|
|
274
|
+
return I(t) ? t : null;
|
|
275
|
+
}
|
|
276
|
+
function rt(e) {
|
|
277
|
+
let t = v(e, (e) => z(e));
|
|
278
|
+
if (z(t)) return t;
|
|
279
|
+
throw Error("Expected table cell to be inside of table row.");
|
|
280
|
+
}
|
|
281
|
+
function it(e) {
|
|
282
|
+
let t = v(e, (e) => $(e));
|
|
283
|
+
if ($(t)) return t;
|
|
284
|
+
throw Error("Expected table cell to be inside of table.");
|
|
285
|
+
}
|
|
286
|
+
function at(e) {
|
|
287
|
+
let t = rt(e);
|
|
288
|
+
return it(t).getChildren().findIndex((e) => e.is(t));
|
|
289
|
+
}
|
|
290
|
+
function ot(e) {
|
|
291
|
+
return rt(e).getChildren().findIndex((t) => t.is(e));
|
|
292
|
+
}
|
|
293
|
+
Qe && "InputEvent" in window && !$e && new window.InputEvent("input");
|
|
294
|
+
var st = (e, t) => e === N.BOTH || e === t ? t : N.NO_STATUS;
|
|
295
|
+
function ct(e = !0) {
|
|
296
|
+
let t = j();
|
|
297
|
+
g(t) || U(t) || L(188);
|
|
298
|
+
let n = t.anchor.getNode(), r = t.focus.getNode(), [i] = H(n), [a, , o] = H(r), [, s, c] = B(o, a, i), { startRow: l } = c, { startRow: u } = s;
|
|
299
|
+
return e ? lt(l + i.__rowSpan > u + a.__rowSpan ? i : a, !0) : lt(u < l ? a : i, !1);
|
|
300
|
+
}
|
|
301
|
+
function lt(e, t = !0) {
|
|
302
|
+
let [, , n] = H(e), [r, i] = B(n, e, e), a = r[0].length, { startRow: o } = i, s = null;
|
|
303
|
+
if (t) {
|
|
304
|
+
let t = o + e.__rowSpan - 1, i = r[t], c = R();
|
|
305
|
+
for (let e = 0; e < a; e++) {
|
|
306
|
+
let { cell: n, startRow: r } = i[e];
|
|
307
|
+
if (r + n.__rowSpan - 1 <= t) {
|
|
308
|
+
let t = i[e].cell.__headerState, n = st(t, N.COLUMN);
|
|
309
|
+
c.append(F(n).append(C()));
|
|
310
|
+
} else n.setRowSpan(n.__rowSpan + 1);
|
|
311
|
+
}
|
|
312
|
+
let l = n.getChildAtIndex(t);
|
|
313
|
+
z(l) || L(256), l.insertAfter(c), s = c;
|
|
314
|
+
} else {
|
|
315
|
+
let e = o, t = r[e], i = R();
|
|
316
|
+
for (let n = 0; n < a; n++) {
|
|
317
|
+
let { cell: r, startRow: a } = t[n];
|
|
318
|
+
if (a === e) {
|
|
319
|
+
let e = t[n].cell.__headerState, r = st(e, N.COLUMN);
|
|
320
|
+
i.append(F(r).append(C()));
|
|
321
|
+
} else r.setRowSpan(r.__rowSpan + 1);
|
|
322
|
+
}
|
|
323
|
+
let c = n.getChildAtIndex(e);
|
|
324
|
+
z(c) || L(257), c.insertBefore(i), s = i;
|
|
325
|
+
}
|
|
326
|
+
return s;
|
|
327
|
+
}
|
|
328
|
+
function ut(e = !0) {
|
|
329
|
+
let t = j();
|
|
330
|
+
g(t) || U(t) || L(188);
|
|
331
|
+
let n = t.anchor.getNode(), r = t.focus.getNode(), [i] = H(n), [a, , o] = H(r), [, s, c] = B(o, a, i), { startColumn: l } = c, { startColumn: u } = s;
|
|
332
|
+
return e ? dt(l + i.__colSpan > u + a.__colSpan ? i : a, !0) : dt(u < l ? a : i, !1);
|
|
333
|
+
}
|
|
334
|
+
function dt(e, t = !0, n = !0) {
|
|
335
|
+
let [, , r] = H(e), [i, a] = B(r, e, e), o = i.length, { startColumn: s } = a, c = t ? s + e.__colSpan - 1 : s - 1, l = r.getFirstChild();
|
|
336
|
+
z(l) || L(120);
|
|
337
|
+
let u = null;
|
|
338
|
+
function d(e = N.NO_STATUS) {
|
|
339
|
+
let t = F(e).append(C());
|
|
340
|
+
return u === null && (u = t), t;
|
|
341
|
+
}
|
|
342
|
+
let f = l;
|
|
343
|
+
e: for (let e = 0; e < o; e++) {
|
|
344
|
+
if (e !== 0) {
|
|
345
|
+
let e = f.getNextSibling();
|
|
346
|
+
z(e) || L(121), f = e;
|
|
347
|
+
}
|
|
348
|
+
let t = i[e], n = t[c < 0 ? 0 : c].cell.__headerState, r = st(n, N.ROW);
|
|
349
|
+
if (c < 0) {
|
|
350
|
+
mt(f, d(r));
|
|
351
|
+
continue;
|
|
352
|
+
}
|
|
353
|
+
let { cell: a, startColumn: o, startRow: s } = t[c];
|
|
354
|
+
if (o + a.__colSpan - 1 <= c) {
|
|
355
|
+
let n = a, i = s, o = c;
|
|
356
|
+
for (; i !== e && n.__rowSpan > 1;) {
|
|
357
|
+
if (o -= a.__colSpan, !(o >= 0)) {
|
|
358
|
+
f.append(d(r));
|
|
359
|
+
continue e;
|
|
360
|
+
}
|
|
361
|
+
{
|
|
362
|
+
let { cell: e, startRow: r } = t[o];
|
|
363
|
+
n = e, i = r;
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
n.insertAfter(d(r));
|
|
367
|
+
} else a.setColSpan(a.__colSpan + 1);
|
|
368
|
+
}
|
|
369
|
+
u !== null && n && pt(u);
|
|
370
|
+
let p = r.getColWidths();
|
|
371
|
+
if (p) {
|
|
372
|
+
let e = [...p], t = c < 0 ? 0 : c, n = e[t];
|
|
373
|
+
e.splice(t, 0, n), r.setColWidths(e);
|
|
374
|
+
}
|
|
375
|
+
return u;
|
|
376
|
+
}
|
|
377
|
+
function ft() {
|
|
378
|
+
let e = j();
|
|
379
|
+
g(e) || U(e) || L(188);
|
|
380
|
+
let t = e.anchor.getNode(), n = e.focus.getNode(), [r, , i] = H(t), [a] = H(n), [o, s, c] = B(i, r, a), { startColumn: l } = s, { startRow: u, startColumn: d } = c, f = Math.min(l, d), p = Math.max(l + r.__colSpan - 1, d + a.__colSpan - 1), m = p - f + 1;
|
|
381
|
+
if (o[0].length === p - f + 1) return i.selectPrevious(), void i.remove();
|
|
382
|
+
let h = o.length;
|
|
383
|
+
for (let e = 0; e < h; e++) for (let t = f; t <= p; t++) {
|
|
384
|
+
let { cell: n, startColumn: r } = o[e][t];
|
|
385
|
+
if (r < f) {
|
|
386
|
+
if (t === f) {
|
|
387
|
+
let e = f - r;
|
|
388
|
+
n.setColSpan(n.__colSpan - Math.min(m, n.__colSpan - e));
|
|
389
|
+
}
|
|
390
|
+
} else if (r + n.__colSpan - 1 > p) {
|
|
391
|
+
if (t === p) {
|
|
392
|
+
let e = p - r + 1;
|
|
393
|
+
n.setColSpan(n.__colSpan - e);
|
|
394
|
+
}
|
|
395
|
+
} else n.remove();
|
|
396
|
+
}
|
|
397
|
+
let _ = o[u], v = l > d ? _[l + r.__colSpan] : _[d + a.__colSpan];
|
|
398
|
+
if (v !== void 0) {
|
|
399
|
+
let { cell: e } = v;
|
|
400
|
+
pt(e);
|
|
401
|
+
} else {
|
|
402
|
+
let { cell: e } = d < l ? _[d - 1] : _[l - 1];
|
|
403
|
+
pt(e);
|
|
404
|
+
}
|
|
405
|
+
let y = i.getColWidths();
|
|
406
|
+
if (y) {
|
|
407
|
+
let e = [...y];
|
|
408
|
+
e.splice(f, m), i.setColWidths(e);
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
function pt(e) {
|
|
412
|
+
let t = e.getFirstDescendant();
|
|
413
|
+
t == null ? e.selectStart() : t.getParentOrThrow().selectStart();
|
|
414
|
+
}
|
|
415
|
+
function mt(e, t) {
|
|
416
|
+
let n = e.getFirstChild();
|
|
417
|
+
n === null ? e.append(t) : n.insertBefore(t);
|
|
418
|
+
}
|
|
419
|
+
function ht(e) {
|
|
420
|
+
if (e.length === 0) return null;
|
|
421
|
+
let [t] = V(it(e[0]), null, null), n = Infinity, r = -Infinity, i = Infinity, a = -Infinity, o = /* @__PURE__ */ new Set();
|
|
422
|
+
for (let s of t) for (let t of s) {
|
|
423
|
+
if (!t || !t.cell) continue;
|
|
424
|
+
let s = t.cell.getKey();
|
|
425
|
+
if (!o.has(s) && e.some((e) => e.is(t.cell))) {
|
|
426
|
+
o.add(s);
|
|
427
|
+
let e = t.startRow, c = t.startColumn, l = t.cell.__rowSpan || 1, u = t.cell.__colSpan || 1;
|
|
428
|
+
n = Math.min(n, e), r = Math.max(r, e + l - 1), i = Math.min(i, c), a = Math.max(a, c + u - 1);
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
if (n === Infinity || i === Infinity) return null;
|
|
432
|
+
let s = r - n + 1, c = a - i + 1, l = t[n][i];
|
|
433
|
+
if (!l.cell) return null;
|
|
434
|
+
let u = l.cell;
|
|
435
|
+
u.setColSpan(c), u.setRowSpan(s);
|
|
436
|
+
let d = new Set([u.getKey()]);
|
|
437
|
+
for (let e = n; e <= r; e++) for (let n = i; n <= a; n++) {
|
|
438
|
+
let r = t[e][n];
|
|
439
|
+
if (!r.cell) continue;
|
|
440
|
+
let i = r.cell, a = i.getKey();
|
|
441
|
+
d.has(a) || (d.add(a), gt(i) || u.append(...i.getChildren()), i.remove());
|
|
442
|
+
}
|
|
443
|
+
return u.getChildrenSize() === 0 && u.append(C()), u;
|
|
444
|
+
}
|
|
445
|
+
function gt(e) {
|
|
446
|
+
if (e.getChildrenSize() !== 1) return !1;
|
|
447
|
+
let t = e.getFirstChildOrThrow();
|
|
448
|
+
return !(!r(t) || !t.isEmpty());
|
|
449
|
+
}
|
|
450
|
+
function _t(e) {
|
|
451
|
+
let [t, n, r] = H(e), i = t.__colSpan, a = t.__rowSpan;
|
|
452
|
+
if (i === 1 && a === 1) return;
|
|
453
|
+
let [o, s] = B(r, t, t), { startColumn: c, startRow: l } = s, u = t.__headerState & N.COLUMN, d = Array.from({ length: i }, (e, t) => {
|
|
454
|
+
let n = u;
|
|
455
|
+
for (let e = 0; n !== 0 && e < o.length; e++) n &= o[e][t + c].cell.__headerState;
|
|
456
|
+
return n;
|
|
457
|
+
}), f = t.__headerState & N.ROW, p = Array.from({ length: a }, (e, t) => {
|
|
458
|
+
let n = f;
|
|
459
|
+
for (let e = 0; n !== 0 && e < o[0].length; e++) n &= o[t + l][e].cell.__headerState;
|
|
460
|
+
return n;
|
|
461
|
+
});
|
|
462
|
+
if (i > 1) {
|
|
463
|
+
for (let e = 1; e < i; e++) t.insertAfter(F(d[e] | p[0]).append(C()));
|
|
464
|
+
t.setColSpan(1);
|
|
465
|
+
}
|
|
466
|
+
if (a > 1) {
|
|
467
|
+
let e;
|
|
468
|
+
for (let t = 1; t < a; t++) {
|
|
469
|
+
let r = l + t, a = o[r];
|
|
470
|
+
e = (e || n).getNextSibling(), z(e) || L(125);
|
|
471
|
+
let s = null;
|
|
472
|
+
for (let e = 0; e < c; e++) {
|
|
473
|
+
let t = a[e], n = t.cell;
|
|
474
|
+
t.startRow === r && (s = n), n.__colSpan > 1 && (e += n.__colSpan - 1);
|
|
475
|
+
}
|
|
476
|
+
if (s === null) for (let n = i - 1; n >= 0; n--) mt(e, F(d[n] | p[t]).append(C()));
|
|
477
|
+
else for (let e = i - 1; e >= 0; e--) s.insertAfter(F(d[e] | p[t]).append(C()));
|
|
478
|
+
}
|
|
479
|
+
t.setRowSpan(1);
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
function B(e, t, n) {
|
|
483
|
+
let [r, i, a] = V(e, t, n);
|
|
484
|
+
return i === null && L(207), a === null && L(208), [
|
|
485
|
+
r,
|
|
486
|
+
i,
|
|
487
|
+
a
|
|
488
|
+
];
|
|
489
|
+
}
|
|
490
|
+
function V(e, t, n) {
|
|
491
|
+
let r = [], i = null, a = null;
|
|
492
|
+
function o(e) {
|
|
493
|
+
let t = r[e];
|
|
494
|
+
return t === void 0 && (r[e] = t = []), t;
|
|
495
|
+
}
|
|
496
|
+
let s = e.getChildren();
|
|
497
|
+
for (let e = 0; e < s.length; e++) {
|
|
498
|
+
let r = s[e];
|
|
499
|
+
z(r) || L(209);
|
|
500
|
+
let c = o(e);
|
|
501
|
+
for (let l = r.getFirstChild(), u = 0; l != null; l = l.getNextSibling()) {
|
|
502
|
+
for (I(l) || L(147); c[u] !== void 0;) u++;
|
|
503
|
+
let r = {
|
|
504
|
+
cell: l,
|
|
505
|
+
startColumn: u,
|
|
506
|
+
startRow: e
|
|
507
|
+
}, { __rowSpan: d, __colSpan: f } = l;
|
|
508
|
+
for (let t = 0; t < d && !(e + t >= s.length); t++) {
|
|
509
|
+
let n = o(e + t);
|
|
510
|
+
for (let e = 0; e < f; e++) n[u + e] = r;
|
|
511
|
+
}
|
|
512
|
+
t !== null && i === null && t.is(l) && (i = r), n !== null && a === null && n.is(l) && (a = r);
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
return [
|
|
516
|
+
r,
|
|
517
|
+
i,
|
|
518
|
+
a
|
|
519
|
+
];
|
|
520
|
+
}
|
|
521
|
+
function H(e) {
|
|
522
|
+
let t;
|
|
523
|
+
if (e instanceof P) t = e;
|
|
524
|
+
else if ("__type" in e) {
|
|
525
|
+
let n = v(e, I);
|
|
526
|
+
I(n) || L(148), t = n;
|
|
527
|
+
} else {
|
|
528
|
+
let n = v(e.getNode(), I);
|
|
529
|
+
I(n) || L(148), t = n;
|
|
530
|
+
}
|
|
531
|
+
let n = t.getParent();
|
|
532
|
+
z(n) || L(149);
|
|
533
|
+
let r = n.getParent();
|
|
534
|
+
return $(r) || L(210), [
|
|
535
|
+
t,
|
|
536
|
+
n,
|
|
537
|
+
r
|
|
538
|
+
];
|
|
539
|
+
}
|
|
540
|
+
function vt(e, t, n) {
|
|
541
|
+
let r, i = Math.min(t.startColumn, n.startColumn), a = Math.min(t.startRow, n.startRow), o = Math.max(t.startColumn + t.cell.__colSpan - 1, n.startColumn + n.cell.__colSpan - 1), s = Math.max(t.startRow + t.cell.__rowSpan - 1, n.startRow + n.cell.__rowSpan - 1);
|
|
542
|
+
do {
|
|
543
|
+
r = !1;
|
|
544
|
+
for (let t = 0; t < e.length; t++) for (let n = 0; n < e[0].length; n++) {
|
|
545
|
+
let c = e[t][n];
|
|
546
|
+
if (!c) continue;
|
|
547
|
+
let l = c.startColumn + c.cell.__colSpan - 1, u = c.startRow + c.cell.__rowSpan - 1, d = c.startColumn <= o && l >= i, f = c.startRow <= s && u >= a;
|
|
548
|
+
if (d && f) {
|
|
549
|
+
let e = Math.min(i, c.startColumn), t = Math.max(o, l), n = Math.min(a, c.startRow), d = Math.max(s, u);
|
|
550
|
+
e === i && t === o && n === a && d === s || (i = e, o = t, a = n, s = d, r = !0);
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
} while (r);
|
|
554
|
+
return {
|
|
555
|
+
maxColumn: o,
|
|
556
|
+
maxRow: s,
|
|
557
|
+
minColumn: i,
|
|
558
|
+
minRow: a
|
|
559
|
+
};
|
|
560
|
+
}
|
|
561
|
+
function yt(e) {
|
|
562
|
+
let [t, , n] = H(e), r = n.getChildren(), i = r.length, a = r[0].getChildren().length, o = Array(i);
|
|
563
|
+
for (let e = 0; e < i; e++) o[e] = Array(a);
|
|
564
|
+
for (let e = 0; e < i; e++) {
|
|
565
|
+
let n = r[e].getChildren(), i = 0;
|
|
566
|
+
for (let r = 0; r < n.length; r++) {
|
|
567
|
+
for (; o[e][i];) i++;
|
|
568
|
+
let a = n[r], s = a.__rowSpan || 1, c = a.__colSpan || 1;
|
|
569
|
+
for (let t = 0; t < s; t++) for (let n = 0; n < c; n++) o[e + t][i + n] = a;
|
|
570
|
+
if (t === a) return {
|
|
571
|
+
colSpan: c,
|
|
572
|
+
columnIndex: i,
|
|
573
|
+
rowIndex: e,
|
|
574
|
+
rowSpan: s
|
|
575
|
+
};
|
|
576
|
+
i += c;
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
return null;
|
|
580
|
+
}
|
|
581
|
+
function bt(e) {
|
|
582
|
+
let [[t, n, r, i], [a, o, s, c]] = ["anchor", "focus"].map((t) => {
|
|
583
|
+
let n = e[t].getNode(), r = v(n, I);
|
|
584
|
+
I(r) || L(238, t, n.getKey(), n.getType());
|
|
585
|
+
let i = r.getParent();
|
|
586
|
+
z(i) || L(239, t);
|
|
587
|
+
let a = i.getParent();
|
|
588
|
+
return $(a) || L(240, t), [
|
|
589
|
+
n,
|
|
590
|
+
r,
|
|
591
|
+
i,
|
|
592
|
+
a
|
|
593
|
+
];
|
|
594
|
+
});
|
|
595
|
+
return i.is(c) || L(241), {
|
|
596
|
+
anchorCell: n,
|
|
597
|
+
anchorNode: t,
|
|
598
|
+
anchorRow: r,
|
|
599
|
+
anchorTable: i,
|
|
600
|
+
focusCell: o,
|
|
601
|
+
focusNode: a,
|
|
602
|
+
focusRow: s,
|
|
603
|
+
focusTable: c
|
|
604
|
+
};
|
|
605
|
+
}
|
|
606
|
+
var xt = class e {
|
|
607
|
+
tableKey;
|
|
608
|
+
anchor;
|
|
609
|
+
focus;
|
|
610
|
+
_cachedNodes;
|
|
611
|
+
dirty;
|
|
612
|
+
constructor(e, t, n) {
|
|
613
|
+
this.anchor = t, this.focus = n, t._selection = this, n._selection = this, this._cachedNodes = null, this.dirty = !1, this.tableKey = e;
|
|
614
|
+
}
|
|
615
|
+
getStartEndPoints() {
|
|
616
|
+
return [this.anchor, this.focus];
|
|
617
|
+
}
|
|
618
|
+
isValid() {
|
|
619
|
+
if (this.tableKey === "root" || this.anchor.key === "root" || this.anchor.type !== "element" || this.focus.key === "root" || this.focus.type !== "element") return !1;
|
|
620
|
+
let e = D(this.tableKey), t = D(this.anchor.key), n = D(this.focus.key);
|
|
621
|
+
return e !== null && t !== null && n !== null;
|
|
622
|
+
}
|
|
623
|
+
isBackward() {
|
|
624
|
+
return this.focus.isBefore(this.anchor);
|
|
625
|
+
}
|
|
626
|
+
getCachedNodes() {
|
|
627
|
+
return this._cachedNodes;
|
|
628
|
+
}
|
|
629
|
+
setCachedNodes(e) {
|
|
630
|
+
this._cachedNodes = e;
|
|
631
|
+
}
|
|
632
|
+
is(e) {
|
|
633
|
+
return U(e) && this.tableKey === e.tableKey && this.anchor.is(e.anchor) && this.focus.is(e.focus);
|
|
634
|
+
}
|
|
635
|
+
set(e, t, n) {
|
|
636
|
+
this.dirty = this.dirty || e !== this.tableKey || t !== this.anchor.key || n !== this.focus.key, this.tableKey = e, this.anchor.key = t, this.focus.key = n, this._cachedNodes = null;
|
|
637
|
+
}
|
|
638
|
+
clone() {
|
|
639
|
+
return new e(this.tableKey, Te(this.anchor.key, this.anchor.offset, this.anchor.type), Te(this.focus.key, this.focus.offset, this.focus.type));
|
|
640
|
+
}
|
|
641
|
+
isCollapsed() {
|
|
642
|
+
return !1;
|
|
643
|
+
}
|
|
644
|
+
extract() {
|
|
645
|
+
return this.getNodes();
|
|
646
|
+
}
|
|
647
|
+
insertRawText(e) {}
|
|
648
|
+
insertText() {}
|
|
649
|
+
hasFormat(e) {
|
|
650
|
+
let t = 0;
|
|
651
|
+
this.getNodes().filter(I).forEach((e) => {
|
|
652
|
+
let n = e.getFirstChild();
|
|
653
|
+
r(n) && (t |= n.getTextFormat());
|
|
654
|
+
});
|
|
655
|
+
let n = te[e];
|
|
656
|
+
return (t & n) !== 0;
|
|
657
|
+
}
|
|
658
|
+
insertNodes(e) {
|
|
659
|
+
let t = this.focus.getNode();
|
|
660
|
+
O(t) || L(151), me(t.select(0, t.getChildrenSize())).insertNodes(e);
|
|
661
|
+
}
|
|
662
|
+
getShape() {
|
|
663
|
+
let { anchorCell: e, focusCell: t } = bt(this), n = yt(e);
|
|
664
|
+
n === null && L(153);
|
|
665
|
+
let r = yt(t);
|
|
666
|
+
r === null && L(155);
|
|
667
|
+
let i = Math.min(n.columnIndex, r.columnIndex), a = Math.max(n.columnIndex + n.colSpan - 1, r.columnIndex + r.colSpan - 1), o = Math.min(n.rowIndex, r.rowIndex), s = Math.max(n.rowIndex + n.rowSpan - 1, r.rowIndex + r.rowSpan - 1);
|
|
668
|
+
return {
|
|
669
|
+
fromX: Math.min(i, a),
|
|
670
|
+
fromY: Math.min(o, s),
|
|
671
|
+
toX: Math.max(i, a),
|
|
672
|
+
toY: Math.max(o, s)
|
|
673
|
+
};
|
|
674
|
+
}
|
|
675
|
+
getNodes() {
|
|
676
|
+
if (!this.isValid()) return [];
|
|
677
|
+
let e = this._cachedNodes;
|
|
678
|
+
if (e !== null) return e;
|
|
679
|
+
let { anchorTable: t, anchorCell: n, focusCell: r } = bt(this), i = r.getParents()[1];
|
|
680
|
+
if (i !== t) {
|
|
681
|
+
if (t.isParentOf(r)) {
|
|
682
|
+
let e = i.getParent();
|
|
683
|
+
e ?? L(159), this.set(this.tableKey, r.getKey(), e.getKey());
|
|
684
|
+
} else {
|
|
685
|
+
let e = t.getParent();
|
|
686
|
+
e ?? L(158), this.set(this.tableKey, e.getKey(), r.getKey());
|
|
687
|
+
}
|
|
688
|
+
return this.getNodes();
|
|
689
|
+
}
|
|
690
|
+
let [a, o, s] = B(t, n, r), { minColumn: c, maxColumn: l, minRow: u, maxRow: d } = vt(a, o, s), f = new Map([[t.getKey(), t]]), p = null;
|
|
691
|
+
for (let e = u; e <= d; e++) for (let t = c; t <= l; t++) {
|
|
692
|
+
let { cell: n } = a[e][t], r = n.getParent();
|
|
693
|
+
z(r) || L(160), r !== p && (f.set(r.getKey(), r), p = r), f.has(n.getKey()) || wt(n, (e) => {
|
|
694
|
+
f.set(e.getKey(), e);
|
|
695
|
+
});
|
|
696
|
+
}
|
|
697
|
+
let m = Array.from(f.values());
|
|
698
|
+
return ne() || (this._cachedNodes = m), m;
|
|
699
|
+
}
|
|
700
|
+
getTextContent() {
|
|
701
|
+
let e = this.getNodes().filter((e) => I(e)), t = "";
|
|
702
|
+
for (let n = 0; n < e.length; n++) {
|
|
703
|
+
let r = e[n], i = r.__parent, a = (e[n + 1] || {}).__parent;
|
|
704
|
+
t += r.getTextContent() + (a === i ? " " : "\n");
|
|
705
|
+
}
|
|
706
|
+
return t;
|
|
707
|
+
}
|
|
708
|
+
};
|
|
709
|
+
function U(e) {
|
|
710
|
+
return e instanceof xt;
|
|
711
|
+
}
|
|
712
|
+
function St() {
|
|
713
|
+
return new xt("root", Te("root", 0, "element"), Te("root", 0, "element"));
|
|
714
|
+
}
|
|
715
|
+
function Ct(e, t, n) {
|
|
716
|
+
e.getKey(), t.getKey(), n.getKey();
|
|
717
|
+
let r = j(), i = U(r) ? r.clone() : St();
|
|
718
|
+
return i.set(e.getKey(), t.getKey(), n.getKey()), i;
|
|
719
|
+
}
|
|
720
|
+
function wt(e, t) {
|
|
721
|
+
let n = [[e]];
|
|
722
|
+
for (let e = n.at(-1); e !== void 0 && n.length > 0; e = n.at(-1)) {
|
|
723
|
+
let r = e.pop();
|
|
724
|
+
r === void 0 ? n.pop() : !1 !== t(r) && O(r) && n.push(r.getChildren());
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
function Tt(e, t = T()) {
|
|
728
|
+
let n = D(e);
|
|
729
|
+
$(n) || L(231, e);
|
|
730
|
+
let r = K(n, t.getElementByKey(e));
|
|
731
|
+
return r === null && L(232, e), {
|
|
732
|
+
tableElement: r,
|
|
733
|
+
tableNode: n
|
|
734
|
+
};
|
|
735
|
+
}
|
|
736
|
+
var Et = class {
|
|
737
|
+
observers;
|
|
738
|
+
nextFocus;
|
|
739
|
+
shouldCheckSelectionForTable;
|
|
740
|
+
constructor() {
|
|
741
|
+
this.observers = /* @__PURE__ */ new Map(), this.nextFocus = null, this.shouldCheckSelectionForTable = null;
|
|
742
|
+
}
|
|
743
|
+
setNextFocus(e) {
|
|
744
|
+
this.nextFocus = e;
|
|
745
|
+
}
|
|
746
|
+
getAndClearNextFocus() {
|
|
747
|
+
let { nextFocus: e } = this;
|
|
748
|
+
return e !== null && (this.nextFocus = null), e;
|
|
749
|
+
}
|
|
750
|
+
setShouldCheckSelectionForTable(e) {
|
|
751
|
+
this.shouldCheckSelectionForTable = e;
|
|
752
|
+
}
|
|
753
|
+
getAndClearShouldCheckSelectionForTable() {
|
|
754
|
+
let { shouldCheckSelectionForTable: e } = this;
|
|
755
|
+
return e ? (this.shouldCheckSelectionForTable = null, e) : null;
|
|
756
|
+
}
|
|
757
|
+
}, Dt = class {
|
|
758
|
+
focusX;
|
|
759
|
+
focusY;
|
|
760
|
+
listenersToRemove;
|
|
761
|
+
table;
|
|
762
|
+
isHighlightingCells;
|
|
763
|
+
anchorX;
|
|
764
|
+
anchorY;
|
|
765
|
+
tableNodeKey;
|
|
766
|
+
anchorCell;
|
|
767
|
+
focusCell;
|
|
768
|
+
anchorCellNodeKey;
|
|
769
|
+
focusCellNodeKey;
|
|
770
|
+
editor;
|
|
771
|
+
tableSelection;
|
|
772
|
+
hasHijackedSelectionStyles;
|
|
773
|
+
isSelecting;
|
|
774
|
+
pointerType;
|
|
775
|
+
abortController;
|
|
776
|
+
listenerOptions;
|
|
777
|
+
constructor(e, t) {
|
|
778
|
+
this.isHighlightingCells = !1, this.anchorX = -1, this.anchorY = -1, this.focusX = -1, this.focusY = -1, this.listenersToRemove = /* @__PURE__ */ new Set(), this.tableNodeKey = t, this.editor = e, this.table = {
|
|
779
|
+
columns: 0,
|
|
780
|
+
domRows: [],
|
|
781
|
+
rows: 0
|
|
782
|
+
}, this.tableSelection = null, this.anchorCellNodeKey = null, this.focusCellNodeKey = null, this.anchorCell = null, this.focusCell = null, this.hasHijackedSelectionStyles = !1, this.isSelecting = !1, this.pointerType = null, this.abortController = new AbortController(), this.listenerOptions = { signal: this.abortController.signal }, this.trackTable();
|
|
783
|
+
}
|
|
784
|
+
getTable() {
|
|
785
|
+
return this.table;
|
|
786
|
+
}
|
|
787
|
+
removeListeners() {
|
|
788
|
+
this.abortController.abort("removeListeners"), Array.from(this.listenersToRemove).forEach((e) => e()), this.listenersToRemove.clear();
|
|
789
|
+
}
|
|
790
|
+
$lookup() {
|
|
791
|
+
return Tt(this.tableNodeKey, this.editor);
|
|
792
|
+
}
|
|
793
|
+
trackTable() {
|
|
794
|
+
let e = new MutationObserver((e) => {
|
|
795
|
+
this.editor.getEditorState().read(() => {
|
|
796
|
+
let t = !1;
|
|
797
|
+
for (let n = 0; n < e.length; n++) {
|
|
798
|
+
let r = e[n].target.nodeName;
|
|
799
|
+
if (r === "TABLE" || r === "TBODY" || r === "THEAD" || r === "TR") {
|
|
800
|
+
t = !0;
|
|
801
|
+
break;
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
if (!t) return;
|
|
805
|
+
let { tableNode: n, tableElement: r } = this.$lookup();
|
|
806
|
+
this.table = q(n, r);
|
|
807
|
+
}, { editor: this.editor });
|
|
808
|
+
});
|
|
809
|
+
this.editor.getEditorState().read(() => {
|
|
810
|
+
let { tableNode: t, tableElement: n } = this.$lookup();
|
|
811
|
+
this.table = q(t, n), e.observe(n, {
|
|
812
|
+
attributes: !0,
|
|
813
|
+
childList: !0,
|
|
814
|
+
subtree: !0
|
|
815
|
+
});
|
|
816
|
+
}, { editor: this.editor });
|
|
817
|
+
}
|
|
818
|
+
$clearHighlight(e = !0) {
|
|
819
|
+
let t = this.editor;
|
|
820
|
+
this.isHighlightingCells = !1, this.anchorX = -1, this.anchorY = -1, this.focusX = -1, this.focusY = -1, this.tableSelection = null, this.anchorCellNodeKey = null, this.focusCellNodeKey = null, this.anchorCell = null, this.focusCell = null, this.hasHijackedSelectionStyles = !1, this.$enableHighlightStyle();
|
|
821
|
+
let { tableNode: n, tableElement: r } = this.$lookup();
|
|
822
|
+
Bt(t, q(n, r), null), e && j() !== null && (k(null), t.dispatchCommand(M, void 0));
|
|
823
|
+
}
|
|
824
|
+
$enableHighlightStyle() {
|
|
825
|
+
let e = this.editor, { tableElement: t } = this.$lookup();
|
|
826
|
+
E(t, e._config.theme.tableSelection), t.classList.remove("disable-selection"), this.hasHijackedSelectionStyles = !1;
|
|
827
|
+
}
|
|
828
|
+
$disableHighlightStyle() {
|
|
829
|
+
let { tableElement: e } = this.$lookup();
|
|
830
|
+
w(e, this.editor._config.theme.tableSelection), this.hasHijackedSelectionStyles = !0;
|
|
831
|
+
}
|
|
832
|
+
$updateTableTableSelection(e) {
|
|
833
|
+
if (e !== null) {
|
|
834
|
+
e.tableKey !== this.tableNodeKey && L(233, e.tableKey, this.tableNodeKey);
|
|
835
|
+
let t = this.editor;
|
|
836
|
+
this.tableSelection = e, this.isHighlightingCells = !0, this.$disableHighlightStyle(), this.updateDOMSelection(), Bt(t, this.table, this.tableSelection);
|
|
837
|
+
} else this.$clearHighlight();
|
|
838
|
+
}
|
|
839
|
+
updateDOMSelection() {
|
|
840
|
+
if (this.anchorCell !== null && this.focusCell !== null) {
|
|
841
|
+
let e = S(this.editor._window);
|
|
842
|
+
e && e.rangeCount > 0 && e.removeAllRanges();
|
|
843
|
+
}
|
|
844
|
+
}
|
|
845
|
+
$setFocusCellForSelection(e, t = !1) {
|
|
846
|
+
let n = this.editor, { tableNode: r } = this.$lookup(), i = e.x, a = e.y;
|
|
847
|
+
if (this.focusCell = e, !this.isHighlightingCells && (t || this.anchorX !== i || this.anchorY !== a || this.tableSelection != null && this.anchorCellNodeKey != null) && (this.isHighlightingCells = !0, this.$disableHighlightStyle()), this.focusX !== -1 && this.focusY !== -1 && i === this.focusX && a === this.focusY) return !1;
|
|
848
|
+
if (this.focusX = i, this.focusY = a, this.isHighlightingCells) {
|
|
849
|
+
let o = tn(r, e.elem);
|
|
850
|
+
if (this.tableSelection != null && this.anchorCellNodeKey != null) {
|
|
851
|
+
let e = o;
|
|
852
|
+
if (e === null && t && (e = r.getCellNodeFromCords(i, a, this.table)), e !== null) {
|
|
853
|
+
let t = this.$getAnchorTableCellOrThrow();
|
|
854
|
+
return this.focusCellNodeKey = e.getKey(), this.tableSelection = Ct(r, t, e), k(this.tableSelection), n.dispatchCommand(M, void 0), Bt(n, this.table, this.tableSelection), !0;
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
}
|
|
858
|
+
return !1;
|
|
859
|
+
}
|
|
860
|
+
$getAnchorTableCell() {
|
|
861
|
+
return this.anchorCellNodeKey ? D(this.anchorCellNodeKey) : null;
|
|
862
|
+
}
|
|
863
|
+
$getAnchorTableCellOrThrow() {
|
|
864
|
+
let e = this.$getAnchorTableCell();
|
|
865
|
+
return e === null && L(234), e;
|
|
866
|
+
}
|
|
867
|
+
$getFocusTableCell() {
|
|
868
|
+
return this.focusCellNodeKey ? D(this.focusCellNodeKey) : null;
|
|
869
|
+
}
|
|
870
|
+
$getFocusTableCellOrThrow() {
|
|
871
|
+
let e = this.$getFocusTableCell();
|
|
872
|
+
return e === null && L(235), e;
|
|
873
|
+
}
|
|
874
|
+
$setAnchorCellForSelection(e) {
|
|
875
|
+
this.isHighlightingCells = !1, this.anchorCell = e, this.anchorX = e.x, this.anchorY = e.y, this.focusX = -1, this.focusY = -1, this.focusCell = null, this.focusCellNodeKey = null;
|
|
876
|
+
let { tableNode: t } = this.$lookup(), n = tn(t, e.elem);
|
|
877
|
+
if (n !== null) {
|
|
878
|
+
let e = n.getKey();
|
|
879
|
+
this.tableSelection == null ? this.tableSelection = Ct(t, n, n) : (this.tableSelection = this.tableSelection.clone(), this.tableSelection.set(t.getKey(), e, e)), this.anchorCellNodeKey = e;
|
|
880
|
+
}
|
|
881
|
+
}
|
|
882
|
+
$formatCells(e) {
|
|
883
|
+
let t = j();
|
|
884
|
+
U(t) || L(236);
|
|
885
|
+
let n = y(), i = n.anchor, a = n.focus, o = t.getNodes().filter(I);
|
|
886
|
+
o.length > 0 || L(237);
|
|
887
|
+
let s = o[0].getFirstChild(), c = r(s) ? s.getFormatFlags(e, null) : null;
|
|
888
|
+
o.forEach((t) => {
|
|
889
|
+
i.set(t.getKey(), 0, "element"), a.set(t.getKey(), t.getChildrenSize(), "element"), n.formatText(e, c);
|
|
890
|
+
}), k(t), this.editor.dispatchCommand(M, void 0);
|
|
891
|
+
}
|
|
892
|
+
$clearText() {
|
|
893
|
+
let { editor: e } = this, t = D(this.tableNodeKey);
|
|
894
|
+
if (!$(t)) throw Error("Expected TableNode.");
|
|
895
|
+
let n = j();
|
|
896
|
+
U(n) || L(253);
|
|
897
|
+
let r = n.getNodes().filter(I), i = t.getFirstChild(), a = t.getLastChild();
|
|
898
|
+
if (r.length > 0 && i !== null && a !== null && z(i) && z(a) && r[0] === i.getFirstChild() && r[r.length - 1] === a.getLastChild()) {
|
|
899
|
+
t.selectPrevious();
|
|
900
|
+
let n = t.getParent();
|
|
901
|
+
t.remove(), l(n) && n.isEmpty() && e.dispatchCommand(Pe, void 0);
|
|
902
|
+
return;
|
|
903
|
+
}
|
|
904
|
+
r.forEach((e) => {
|
|
905
|
+
if (O(e)) {
|
|
906
|
+
let t = C(), n = Ne();
|
|
907
|
+
t.append(n), e.append(t), e.getChildren().forEach((e) => {
|
|
908
|
+
e !== t && e.remove();
|
|
909
|
+
});
|
|
910
|
+
}
|
|
911
|
+
}), Bt(e, this.table, null), k(null), e.dispatchCommand(M, void 0);
|
|
912
|
+
}
|
|
913
|
+
}, W = "__lexicalTableSelection";
|
|
914
|
+
function G(e) {
|
|
915
|
+
return ue(e) && e.nodeName === "TABLE";
|
|
916
|
+
}
|
|
917
|
+
function K(e, t) {
|
|
918
|
+
if (!t) return t;
|
|
919
|
+
let n = G(t) ? t : e.getDOMSlot(t).element;
|
|
920
|
+
return n.nodeName !== "TABLE" && L(245, t.nodeName), n;
|
|
921
|
+
}
|
|
922
|
+
function Ot(e) {
|
|
923
|
+
return e._window;
|
|
924
|
+
}
|
|
925
|
+
function kt(e, t) {
|
|
926
|
+
for (let n = t, r = null; n !== null; n = n.getParent()) {
|
|
927
|
+
if (e.is(n)) return r;
|
|
928
|
+
I(n) && (r = n);
|
|
929
|
+
}
|
|
930
|
+
return null;
|
|
931
|
+
}
|
|
932
|
+
var At = [
|
|
933
|
+
[h, "down"],
|
|
934
|
+
[f, "up"],
|
|
935
|
+
[he, "backward"],
|
|
936
|
+
[ye, "forward"]
|
|
937
|
+
], jt = [
|
|
938
|
+
se,
|
|
939
|
+
m,
|
|
940
|
+
s
|
|
941
|
+
], Mt = [re, Oe];
|
|
942
|
+
function Nt(e, t) {
|
|
943
|
+
let n = e.getRootElement(), r = e._window;
|
|
944
|
+
if (!n || !r) return () => {};
|
|
945
|
+
let i = (r) => {
|
|
946
|
+
let i = r.target;
|
|
947
|
+
if (r.button !== 0 || !de(i) || !n.contains(i)) return;
|
|
948
|
+
let a = function(e) {
|
|
949
|
+
let t = Rt(e);
|
|
950
|
+
if (t === null) return null;
|
|
951
|
+
let n = t.elem;
|
|
952
|
+
for (; n != null;) {
|
|
953
|
+
if (n.nodeName === "TABLE" && W in n && n[W]) return {
|
|
954
|
+
cellElement: t,
|
|
955
|
+
tableElement: n,
|
|
956
|
+
tableObserver: n[W]
|
|
957
|
+
};
|
|
958
|
+
n = n.parentNode;
|
|
959
|
+
}
|
|
960
|
+
return null;
|
|
961
|
+
}(i);
|
|
962
|
+
e.update(() => {
|
|
963
|
+
if (U(j())) {
|
|
964
|
+
for (let [e] of t.observers.values()) e.$clearHighlight(!1);
|
|
965
|
+
k(null), e.dispatchCommand(M, void 0);
|
|
966
|
+
}
|
|
967
|
+
if (!a) return;
|
|
968
|
+
let { tableObserver: n, tableElement: i, cellElement: o } = a;
|
|
969
|
+
(function(e, t, n, r, i, a) {
|
|
970
|
+
let o = e._window;
|
|
971
|
+
if (!o) return;
|
|
972
|
+
let s = (t) => {
|
|
973
|
+
if (i.isSelecting) return;
|
|
974
|
+
i.isSelecting = !0, t !== null && i.anchorCell === null && e.update(() => {
|
|
975
|
+
i.$setAnchorCellForSelection(t);
|
|
976
|
+
});
|
|
977
|
+
let n = () => {
|
|
978
|
+
i.isSelecting = !1, o.removeEventListener("pointerup", n), o.removeEventListener("pointermove", s);
|
|
979
|
+
}, s = (t) => {
|
|
980
|
+
if (!((e) => !(1 & ~e.buttons))(t) && i.isSelecting) return i.isSelecting = !1, o.removeEventListener("pointerup", n), void o.removeEventListener("pointermove", s);
|
|
981
|
+
if (!de(t.target)) return;
|
|
982
|
+
let c = null, l = !(et || r.contains(t.target));
|
|
983
|
+
if (l) c = zt(r, t.target);
|
|
984
|
+
else for (let e of document.elementsFromPoint(t.clientX, t.clientY)) if (c = zt(r, e), c) break;
|
|
985
|
+
if (c) {
|
|
986
|
+
let t = c;
|
|
987
|
+
i.anchorCell === null && e.update(() => {
|
|
988
|
+
i.$setAnchorCellForSelection(t);
|
|
989
|
+
}), i.focusCell !== null && c.elem === i.focusCell.elem || (a.setNextFocus({
|
|
990
|
+
focusCell: c,
|
|
991
|
+
override: l,
|
|
992
|
+
tableKey: i.tableNodeKey
|
|
993
|
+
}), e.dispatchCommand(M, void 0));
|
|
994
|
+
}
|
|
995
|
+
};
|
|
996
|
+
o.addEventListener("pointerup", n, i.listenerOptions), o.addEventListener("pointermove", s, i.listenerOptions);
|
|
997
|
+
};
|
|
998
|
+
i.pointerType = t.pointerType;
|
|
999
|
+
let c = b(i.tableNodeKey), l = Me();
|
|
1000
|
+
if (et && t.shiftKey && J(l, c) && (g(l) || U(l))) {
|
|
1001
|
+
let e = l.anchor.getNode(), r = kt(c, l.anchor.getNode());
|
|
1002
|
+
r ? (i.$setAnchorCellForSelection(Z(i, r)), i.$setFocusCellForSelection(n), X(t)) : (c.isBefore(e) ? c.selectStart() : c.selectEnd()).anchor.set(l.anchor.key, l.anchor.offset, l.anchor.type);
|
|
1003
|
+
} else t.pointerType !== "touch" && i.$setAnchorCellForSelection(n);
|
|
1004
|
+
s(n);
|
|
1005
|
+
})(e, r, o, i, n, t);
|
|
1006
|
+
});
|
|
1007
|
+
};
|
|
1008
|
+
return r.addEventListener("pointerdown", i), () => {
|
|
1009
|
+
r.removeEventListener("pointerdown", i);
|
|
1010
|
+
};
|
|
1011
|
+
}
|
|
1012
|
+
function Pt(e, t, n, r, i) {
|
|
1013
|
+
let a = n.getRootElement(), o = Ot(n);
|
|
1014
|
+
a !== null && o !== null || L(246);
|
|
1015
|
+
let s = new Dt(n, e.getKey()), c = K(e, t);
|
|
1016
|
+
(function(e, t) {
|
|
1017
|
+
Lt(e) !== null && L(205), e[W] = t;
|
|
1018
|
+
})(c, s), s.listenersToRemove.add(() => function(e, t) {
|
|
1019
|
+
Lt(e) === t && delete e[W];
|
|
1020
|
+
}(c, s));
|
|
1021
|
+
let l = (e) => {
|
|
1022
|
+
e.detail >= 3 && de(e.target) && Rt(e.target) !== null && e.preventDefault();
|
|
1023
|
+
};
|
|
1024
|
+
c.addEventListener("mousedown", l, s.listenerOptions), s.listenersToRemove.add(() => {
|
|
1025
|
+
c.removeEventListener("mousedown", l);
|
|
1026
|
+
});
|
|
1027
|
+
for (let [t, r] of At) s.listenersToRemove.add(n.registerCommand(t, (t) => Qt(n, t, r, e, s, i), 3));
|
|
1028
|
+
s.listenersToRemove.add(n.registerCommand(ce, (t) => {
|
|
1029
|
+
let n = j();
|
|
1030
|
+
if (U(n)) {
|
|
1031
|
+
let r = kt(e, n.focus.getNode());
|
|
1032
|
+
if (r !== null) return X(t), r.selectEnd(), !0;
|
|
1033
|
+
}
|
|
1034
|
+
return !1;
|
|
1035
|
+
}, 3));
|
|
1036
|
+
let d = (t) => () => {
|
|
1037
|
+
let n = j();
|
|
1038
|
+
if (!J(n, e)) return !1;
|
|
1039
|
+
if (U(n)) return s.$clearText(), !0;
|
|
1040
|
+
if (g(n)) {
|
|
1041
|
+
if (!I(kt(e, n.anchor.getNode()))) return !1;
|
|
1042
|
+
let r = n.anchor.getNode(), i = n.focus.getNode(), a = e.isParentOf(r), o = e.isParentOf(i);
|
|
1043
|
+
if (a && !o || o && !a) return s.$clearText(), !0;
|
|
1044
|
+
let c = v(n.anchor.getNode(), (e) => O(e)), l = c && v(c, (e) => O(e) && I(e.getParent()));
|
|
1045
|
+
if (!O(l) || !O(c)) return !1;
|
|
1046
|
+
if (t === m && l.getPreviousSibling() === null) return !0;
|
|
1047
|
+
}
|
|
1048
|
+
return !1;
|
|
1049
|
+
};
|
|
1050
|
+
for (let e of jt) s.listenersToRemove.add(n.registerCommand(e, d(e), 3));
|
|
1051
|
+
let f = (t) => {
|
|
1052
|
+
let n = j();
|
|
1053
|
+
if (!U(n) && !g(n)) return !1;
|
|
1054
|
+
let r = e.isParentOf(n.anchor.getNode());
|
|
1055
|
+
if (r !== e.isParentOf(n.focus.getNode())) {
|
|
1056
|
+
let t = r ? "anchor" : "focus", i = r ? "focus" : "anchor", { key: a, offset: o, type: s } = n[i];
|
|
1057
|
+
return e[n[t].isBefore(n[i]) ? "selectPrevious" : "selectNext"]()[i].set(a, o, s), !1;
|
|
1058
|
+
}
|
|
1059
|
+
return !!J(n, e) && !!U(n) && (t && (t.preventDefault(), t.stopPropagation()), s.$clearText(), !0);
|
|
1060
|
+
};
|
|
1061
|
+
for (let e of Mt) s.listenersToRemove.add(n.registerCommand(e, f, 3));
|
|
1062
|
+
return s.listenersToRemove.add(n.registerCommand(ae, (e) => {
|
|
1063
|
+
let t = j();
|
|
1064
|
+
if (t) {
|
|
1065
|
+
if (!U(t) && !g(t)) return !1;
|
|
1066
|
+
Ge(n, Re(e, ClipboardEvent) ? e : null, We(t));
|
|
1067
|
+
let r = f(e);
|
|
1068
|
+
return g(t) ? (t.removeText(), !0) : r;
|
|
1069
|
+
}
|
|
1070
|
+
return !1;
|
|
1071
|
+
}, 3)), s.listenersToRemove.add(n.registerCommand(be, (t) => {
|
|
1072
|
+
let n = j();
|
|
1073
|
+
return J(n, e) ? U(n) ? (s.$formatCells(t), !0) : (g(n) && I(v(n.anchor.getNode(), (e) => I(e))), !1) : !1;
|
|
1074
|
+
}, 3)), s.listenersToRemove.add(n.registerCommand(u, (t) => {
|
|
1075
|
+
let n = j();
|
|
1076
|
+
if (!U(n) || !J(n, e)) return !1;
|
|
1077
|
+
let r = n.anchor.getNode(), i = n.focus.getNode();
|
|
1078
|
+
if (!I(r) || !I(i)) return !1;
|
|
1079
|
+
if (function(e, t) {
|
|
1080
|
+
if (U(e)) {
|
|
1081
|
+
let n = e.anchor.getNode(), r = e.focus.getNode();
|
|
1082
|
+
if (t && n && r) {
|
|
1083
|
+
let [e] = B(t, n, r);
|
|
1084
|
+
return n.getKey() === e[0][0].cell.getKey() && r.getKey() === e[e.length - 1].at(-1).cell.getKey();
|
|
1085
|
+
}
|
|
1086
|
+
}
|
|
1087
|
+
return !1;
|
|
1088
|
+
}(n, e)) return e.setFormat(t), !0;
|
|
1089
|
+
let [a, o, s] = B(e, r, i), c = Math.max(o.startRow + o.cell.__rowSpan - 1, s.startRow + s.cell.__rowSpan - 1), l = Math.max(o.startColumn + o.cell.__colSpan - 1, s.startColumn + s.cell.__colSpan - 1), u = Math.min(o.startRow, s.startRow), d = Math.min(o.startColumn, s.startColumn), f = /* @__PURE__ */ new Set();
|
|
1090
|
+
for (let e = u; e <= c; e++) for (let n = d; n <= l; n++) {
|
|
1091
|
+
let r = a[e][n].cell;
|
|
1092
|
+
if (f.has(r)) continue;
|
|
1093
|
+
f.add(r), r.setFormat(t);
|
|
1094
|
+
let i = r.getChildren();
|
|
1095
|
+
for (let e = 0; e < i.length; e++) {
|
|
1096
|
+
let n = i[e];
|
|
1097
|
+
O(n) && !n.isInline() && n.setFormat(t);
|
|
1098
|
+
}
|
|
1099
|
+
}
|
|
1100
|
+
return !0;
|
|
1101
|
+
}, 3)), s.listenersToRemove.add(n.registerCommand(p, (t) => {
|
|
1102
|
+
let r = j();
|
|
1103
|
+
if (!J(r, e)) return !1;
|
|
1104
|
+
if (U(r)) return s.$clearHighlight(), !1;
|
|
1105
|
+
if (g(r)) {
|
|
1106
|
+
if (!I(v(r.anchor.getNode(), (e) => I(e)))) return !1;
|
|
1107
|
+
if (typeof t == "string") {
|
|
1108
|
+
let i = en(n, r, e);
|
|
1109
|
+
if (i) return $t(i, e, [Ne(t)]), !0;
|
|
1110
|
+
}
|
|
1111
|
+
}
|
|
1112
|
+
return !1;
|
|
1113
|
+
}, 3)), r && s.listenersToRemove.add(n.registerCommand(oe, (t) => {
|
|
1114
|
+
let n = j();
|
|
1115
|
+
if (!g(n) || !n.isCollapsed() || !J(n, e)) return !1;
|
|
1116
|
+
let r = Xt(n.anchor.getNode());
|
|
1117
|
+
return !(r === null || !e.is(Y(r))) && (X(t), function(e, t) {
|
|
1118
|
+
let n = t === "next" ? "getNextSibling" : "getPreviousSibling", r = t === "next" ? "getFirstChild" : "getLastChild", i = e[n]();
|
|
1119
|
+
if (O(i)) return i.selectEnd();
|
|
1120
|
+
let a = v(e, z);
|
|
1121
|
+
a === null && L(247);
|
|
1122
|
+
for (let e = a[n](); z(e); e = e[n]()) {
|
|
1123
|
+
let t = e[r]();
|
|
1124
|
+
if (O(t)) return t.selectEnd();
|
|
1125
|
+
}
|
|
1126
|
+
let o = v(a, $);
|
|
1127
|
+
o === null && L(248), t === "next" ? o.selectNext() : o.selectPrevious();
|
|
1128
|
+
}(r, t.shiftKey ? "previous" : "next"), !0);
|
|
1129
|
+
}, 3)), s.listenersToRemove.add(n.registerCommand(ve, (t) => e.isSelected(), 3)), s.listenersToRemove.add(n.registerCommand(Pe, () => {
|
|
1130
|
+
let t = j();
|
|
1131
|
+
if (!g(t) || !t.isCollapsed() || !J(t, e)) return !1;
|
|
1132
|
+
let r = en(n, t, e);
|
|
1133
|
+
return !!r && ($t(r, e), !0);
|
|
1134
|
+
}, 3)), s;
|
|
1135
|
+
}
|
|
1136
|
+
function Ft(t, n) {
|
|
1137
|
+
let r = j(), i = Me(), a = t.getAndClearNextFocus();
|
|
1138
|
+
if (a !== null) {
|
|
1139
|
+
let { tableKey: e, focusCell: n } = a, i = t.observers.get(e);
|
|
1140
|
+
i || L(335, e);
|
|
1141
|
+
let [o] = i;
|
|
1142
|
+
if (U(r) && r.tableKey === o.tableNodeKey) return (n.x !== o.focusX || n.y !== o.focusY) && (o.$setFocusCellForSelection(n), !0);
|
|
1143
|
+
if (o.anchorCell !== null && o.anchorCellNodeKey !== null && n.elem !== o.anchorCell.elem && o.tableSelection !== null) return o.$setFocusCellForSelection(n, !0), !0;
|
|
1144
|
+
}
|
|
1145
|
+
let o = t.getAndClearShouldCheckSelectionForTable();
|
|
1146
|
+
if (o && g(i) && g(r) && r.isCollapsed()) {
|
|
1147
|
+
let e = b(o), t = r.anchor.getNode(), n = e.getFirstChild(), i = Xt(t);
|
|
1148
|
+
if (i !== null && z(n)) {
|
|
1149
|
+
let t = n.getFirstChild();
|
|
1150
|
+
if (I(t) && e.is(v(i, (n) => n.is(e) || n.is(t)))) return t.selectStart(), !0;
|
|
1151
|
+
}
|
|
1152
|
+
}
|
|
1153
|
+
U(r) && function(t, n) {
|
|
1154
|
+
let r = Ot(t), i = Me();
|
|
1155
|
+
if (!n.is(i)) return;
|
|
1156
|
+
let a = b(n.tableKey), o = S(r);
|
|
1157
|
+
if (o && o.anchorNode && o.focusNode) {
|
|
1158
|
+
let r = A(o.focusNode), i = r && !a.isParentOf(r), s = A(o.anchorNode), c = s && a.isParentOf(s);
|
|
1159
|
+
if (i && c && o.rangeCount > 0) {
|
|
1160
|
+
let r = e(o, t);
|
|
1161
|
+
r && (r.anchor.set(a.getKey(), n.isBackward() ? a.getChildrenSize() : 0, "element"), o.removeAllRanges(), k(r));
|
|
1162
|
+
}
|
|
1163
|
+
}
|
|
1164
|
+
}(n, r), g(r) && function(e, t) {
|
|
1165
|
+
let n = Me(), { anchor: r, focus: i } = e, a = r.getNode(), o = i.getNode(), s = Xt(a), c = Xt(o), l = s ? Y(s) : null, u = c ? Y(c) : null, d = e.isBackward(), f = s && c && l && u && l.is(u), p = u && (!l || l.isParentOf(u)), m = l && (!u || u.isParentOf(l));
|
|
1166
|
+
if (p) {
|
|
1167
|
+
let t = e.clone(), [n] = B(u, c, c), r = n[0][0].cell, i = n[n.length - 1].at(-1).cell;
|
|
1168
|
+
t.focus.set(d ? r.getKey() : i.getKey(), d ? 0 : i.getChildrenSize(), "element"), k(t);
|
|
1169
|
+
} else if (m) {
|
|
1170
|
+
let t = e.clone(), [n] = B(l, s, s), r = n[0][0].cell, i = n[n.length - 1].at(-1).cell;
|
|
1171
|
+
t.anchor.set(d ? i.getKey() : r.getKey(), d ? i.getChildrenSize() : 0, "element"), k(t);
|
|
1172
|
+
} else if (f) {
|
|
1173
|
+
let r = t.observers.get(l.getKey());
|
|
1174
|
+
r || L(335, l.getKey());
|
|
1175
|
+
let [i] = r;
|
|
1176
|
+
if (s.is(c) || (i.$setAnchorCellForSelection(Z(i, s)), i.$setFocusCellForSelection(Z(i, c), !0)), i.pointerType === "touch" && i.isSelecting && e.isCollapsed() && g(n) && n.isCollapsed()) {
|
|
1177
|
+
let e = Xt(n.anchor.getNode());
|
|
1178
|
+
e && !e.is(c) && (i.$setAnchorCellForSelection(Z(i, e)), i.$setFocusCellForSelection(Z(i, c), !0), i.pointerType = null);
|
|
1179
|
+
}
|
|
1180
|
+
}
|
|
1181
|
+
}(r, t);
|
|
1182
|
+
let s = t.observers.entries().map(([e, [t]]) => ({
|
|
1183
|
+
tableNode: b(e),
|
|
1184
|
+
tableObserver: t
|
|
1185
|
+
})).toArray();
|
|
1186
|
+
for (let { tableNode: e, tableObserver: t } of s) It(n, e, t);
|
|
1187
|
+
return !1;
|
|
1188
|
+
}
|
|
1189
|
+
function It(e, t, n) {
|
|
1190
|
+
let r = j(), i = Me();
|
|
1191
|
+
r && !r.is(i) && (U(r) || U(i)) && n.tableSelection && !n.tableSelection.is(i) && (U(r) && r.tableKey === n.tableNodeKey ? n.$updateTableTableSelection(r) : !U(r) && U(i) && i.tableKey === n.tableNodeKey && n.$updateTableTableSelection(null)), n.hasHijackedSelectionStyles && !t.isSelected() ? function(e, t) {
|
|
1192
|
+
t.$enableHighlightStyle(), Vt(t.table, (t) => {
|
|
1193
|
+
let n = t.elem;
|
|
1194
|
+
t.highlighted = !1, Yt(e, t), n.getAttribute("style") || n.removeAttribute("style");
|
|
1195
|
+
});
|
|
1196
|
+
}(e, n) : !n.hasHijackedSelectionStyles && t.isSelected() && function(e, t) {
|
|
1197
|
+
t.$disableHighlightStyle(), Vt(t.table, (t) => {
|
|
1198
|
+
t.highlighted = !0, Jt(e, t);
|
|
1199
|
+
});
|
|
1200
|
+
}(e, n);
|
|
1201
|
+
}
|
|
1202
|
+
function Lt(e) {
|
|
1203
|
+
return e[W] || null;
|
|
1204
|
+
}
|
|
1205
|
+
function Rt(e) {
|
|
1206
|
+
let t = e;
|
|
1207
|
+
for (; t != null;) {
|
|
1208
|
+
let e = t.nodeName;
|
|
1209
|
+
if (e === "TD" || e === "TH") {
|
|
1210
|
+
let e = t._cell;
|
|
1211
|
+
return e === void 0 ? null : e;
|
|
1212
|
+
}
|
|
1213
|
+
t = t.parentNode;
|
|
1214
|
+
}
|
|
1215
|
+
return null;
|
|
1216
|
+
}
|
|
1217
|
+
function zt(e, t) {
|
|
1218
|
+
if (!e.contains(t)) return null;
|
|
1219
|
+
let n = null;
|
|
1220
|
+
for (let r = t; r != null; r = r.parentNode) {
|
|
1221
|
+
if (r === e) return n;
|
|
1222
|
+
let t = r.nodeName;
|
|
1223
|
+
t !== "TD" && t !== "TH" || (n = r._cell || null);
|
|
1224
|
+
}
|
|
1225
|
+
return null;
|
|
1226
|
+
}
|
|
1227
|
+
function q(e, t) {
|
|
1228
|
+
let n = [], r = {
|
|
1229
|
+
columns: 0,
|
|
1230
|
+
domRows: n,
|
|
1231
|
+
rows: 0
|
|
1232
|
+
}, i = K(e, t).querySelector("tr"), a = 0, o = 0;
|
|
1233
|
+
for (n.length = 0; i != null;) {
|
|
1234
|
+
let e = i.nodeName;
|
|
1235
|
+
if (e === "TD" || e === "TH") {
|
|
1236
|
+
let e = {
|
|
1237
|
+
elem: i,
|
|
1238
|
+
hasBackgroundColor: i.style.backgroundColor !== "",
|
|
1239
|
+
highlighted: !1,
|
|
1240
|
+
x: a,
|
|
1241
|
+
y: o
|
|
1242
|
+
};
|
|
1243
|
+
i._cell = e;
|
|
1244
|
+
let t = n[o];
|
|
1245
|
+
t === void 0 && (t = n[o] = []), t[a] = e;
|
|
1246
|
+
} else {
|
|
1247
|
+
let e = i.firstChild;
|
|
1248
|
+
if (e != null) {
|
|
1249
|
+
i = e;
|
|
1250
|
+
continue;
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
let t = i.nextSibling;
|
|
1254
|
+
if (t != null) {
|
|
1255
|
+
a++, i = t;
|
|
1256
|
+
continue;
|
|
1257
|
+
}
|
|
1258
|
+
let r = i.parentNode;
|
|
1259
|
+
if (r != null) {
|
|
1260
|
+
let e = r.nextSibling;
|
|
1261
|
+
if (e == null) break;
|
|
1262
|
+
o++, a = 0, i = e;
|
|
1263
|
+
}
|
|
1264
|
+
}
|
|
1265
|
+
return r.columns = a + 1, r.rows = o + 1, r;
|
|
1266
|
+
}
|
|
1267
|
+
function Bt(e, t, n) {
|
|
1268
|
+
let r = new Set(n ? n.getNodes() : []);
|
|
1269
|
+
Vt(t, (t, n) => {
|
|
1270
|
+
let i = t.elem;
|
|
1271
|
+
r.has(n) ? (t.highlighted = !0, Jt(e, t)) : (t.highlighted = !1, Yt(e, t), i.getAttribute("style") || i.removeAttribute("style"));
|
|
1272
|
+
});
|
|
1273
|
+
}
|
|
1274
|
+
function Vt(e, t) {
|
|
1275
|
+
let { domRows: n } = e;
|
|
1276
|
+
for (let e = 0; e < n.length; e++) {
|
|
1277
|
+
let r = n[e];
|
|
1278
|
+
if (r) for (let n = 0; n < r.length; n++) {
|
|
1279
|
+
let i = r[n];
|
|
1280
|
+
if (!i) continue;
|
|
1281
|
+
let a = A(i.elem);
|
|
1282
|
+
a !== null && t(i, a, {
|
|
1283
|
+
x: n,
|
|
1284
|
+
y: e
|
|
1285
|
+
});
|
|
1286
|
+
}
|
|
1287
|
+
}
|
|
1288
|
+
}
|
|
1289
|
+
var Ht = (e, t, n, r, i) => {
|
|
1290
|
+
let a = i === "forward";
|
|
1291
|
+
switch (i) {
|
|
1292
|
+
case "backward":
|
|
1293
|
+
case "forward": return n === (a ? e.table.columns - 1 : 0) ? r === (a ? e.table.rows - 1 : 0) ? a ? t.selectNext() : t.selectPrevious() : qt(t.getCellNodeFromCordsOrThrow(a ? 0 : e.table.columns - 1, r + (a ? 1 : -1), e.table), a) : qt(t.getCellNodeFromCordsOrThrow(n + (a ? 1 : -1), r, e.table), a), !0;
|
|
1294
|
+
case "up": return r === 0 ? t.selectPrevious() : qt(t.getCellNodeFromCordsOrThrow(n, r - 1, e.table), !1), !0;
|
|
1295
|
+
case "down": return r === e.table.rows - 1 ? t.selectNext() : qt(t.getCellNodeFromCordsOrThrow(n, r + 1, e.table), !0), !0;
|
|
1296
|
+
default: return !1;
|
|
1297
|
+
}
|
|
1298
|
+
};
|
|
1299
|
+
function Ut(e, t) {
|
|
1300
|
+
let n, r;
|
|
1301
|
+
if (t.startColumn === e.minColumn) n = "minColumn";
|
|
1302
|
+
else {
|
|
1303
|
+
if (t.startColumn + t.cell.__colSpan - 1 !== e.maxColumn) return null;
|
|
1304
|
+
n = "maxColumn";
|
|
1305
|
+
}
|
|
1306
|
+
if (t.startRow === e.minRow) r = "minRow";
|
|
1307
|
+
else {
|
|
1308
|
+
if (t.startRow + t.cell.__rowSpan - 1 !== e.maxRow) return null;
|
|
1309
|
+
r = "maxRow";
|
|
1310
|
+
}
|
|
1311
|
+
return [n, r];
|
|
1312
|
+
}
|
|
1313
|
+
function Wt([e, t]) {
|
|
1314
|
+
return [e === "minColumn" ? "maxColumn" : "minColumn", t === "minRow" ? "maxRow" : "minRow"];
|
|
1315
|
+
}
|
|
1316
|
+
function Gt(e, t, [n, r]) {
|
|
1317
|
+
let i = t[r], a = e[i];
|
|
1318
|
+
a === void 0 && L(250, r, String(i));
|
|
1319
|
+
let o = t[n], s = a[o];
|
|
1320
|
+
return s === void 0 && L(250, n, String(o)), s;
|
|
1321
|
+
}
|
|
1322
|
+
function Kt(e, t, n, r, i) {
|
|
1323
|
+
let a = vt(t, n, r), { topSpan: o, leftSpan: s, bottomSpan: c, rightSpan: l } = function(e, t) {
|
|
1324
|
+
let { minColumn: n, maxColumn: r, minRow: i, maxRow: a } = t, o = 1, s = 1, c = 1, l = 1, u = e[i], d = e[a];
|
|
1325
|
+
for (let e = n; e <= r; e++) o = Math.max(o, u[e].cell.__rowSpan), l = Math.max(l, d[e].cell.__rowSpan);
|
|
1326
|
+
for (let t = i; t <= a; t++) s = Math.max(s, e[t][n].cell.__colSpan), c = Math.max(c, e[t][r].cell.__colSpan);
|
|
1327
|
+
return {
|
|
1328
|
+
bottomSpan: l,
|
|
1329
|
+
leftSpan: s,
|
|
1330
|
+
rightSpan: c,
|
|
1331
|
+
topSpan: o
|
|
1332
|
+
};
|
|
1333
|
+
}(t, a), [u, d] = Wt(function(e, t) {
|
|
1334
|
+
let n = Ut(e, t);
|
|
1335
|
+
return n === null && L(249, t.cell.getKey()), n;
|
|
1336
|
+
}(a, n)), f = a[u], p = a[d];
|
|
1337
|
+
i === "forward" ? f += u === "maxColumn" ? 1 : s : i === "backward" ? f -= u === "minColumn" ? 1 : l : i === "down" ? p += d === "maxRow" ? 1 : o : i === "up" && (p -= d === "minRow" ? 1 : c);
|
|
1338
|
+
let m = t[p];
|
|
1339
|
+
if (m === void 0) return !1;
|
|
1340
|
+
let h = m[f];
|
|
1341
|
+
if (h === void 0) return !1;
|
|
1342
|
+
let [g, _] = function(e, t, n) {
|
|
1343
|
+
let r = vt(e, t, n), i = Ut(r, t);
|
|
1344
|
+
if (i) return [Gt(e, r, i), Gt(e, r, Wt(i))];
|
|
1345
|
+
let a = Ut(r, n);
|
|
1346
|
+
if (a) return [Gt(e, r, Wt(a)), Gt(e, r, a)];
|
|
1347
|
+
let o = ["minColumn", "minRow"];
|
|
1348
|
+
return [Gt(e, r, o), Gt(e, r, Wt(o))];
|
|
1349
|
+
}(t, n, h), v = Z(e, g.cell), y = Z(e, _.cell);
|
|
1350
|
+
return e.$setAnchorCellForSelection(v), e.$setFocusCellForSelection(y, !0), !0;
|
|
1351
|
+
}
|
|
1352
|
+
function J(e, t) {
|
|
1353
|
+
if (g(e) || U(e)) {
|
|
1354
|
+
let n = t.isParentOf(e.anchor.getNode()), r = t.isParentOf(e.focus.getNode());
|
|
1355
|
+
return n && r;
|
|
1356
|
+
}
|
|
1357
|
+
return !1;
|
|
1358
|
+
}
|
|
1359
|
+
function qt(e, t) {
|
|
1360
|
+
t ? e.selectStart() : e.selectEnd();
|
|
1361
|
+
}
|
|
1362
|
+
function Jt(e, t) {
|
|
1363
|
+
let n = t.elem, r = e._config.theme;
|
|
1364
|
+
I(A(n)) || L(131), w(n, r.tableCellSelected);
|
|
1365
|
+
}
|
|
1366
|
+
function Yt(e, t) {
|
|
1367
|
+
let n = t.elem;
|
|
1368
|
+
I(A(n)) || L(131);
|
|
1369
|
+
let r = e._config.theme;
|
|
1370
|
+
E(n, r.tableCellSelected);
|
|
1371
|
+
}
|
|
1372
|
+
function Xt(e) {
|
|
1373
|
+
let t = v(e, I);
|
|
1374
|
+
return I(t) ? t : null;
|
|
1375
|
+
}
|
|
1376
|
+
function Y(e) {
|
|
1377
|
+
let t = v(e, $);
|
|
1378
|
+
return $(t) ? t : null;
|
|
1379
|
+
}
|
|
1380
|
+
function Zt(e, t, r, i, o, s, l) {
|
|
1381
|
+
let u = De(r.focus, o ? "previous" : "next");
|
|
1382
|
+
if (c(u)) return !1;
|
|
1383
|
+
let d = u;
|
|
1384
|
+
for (let e of n(u).iterNodeCarets("shadowRoot")) {
|
|
1385
|
+
if (!le(e) || !O(e.origin)) return !1;
|
|
1386
|
+
d = e;
|
|
1387
|
+
}
|
|
1388
|
+
let f = d.getParentAtCaret();
|
|
1389
|
+
if (!I(f)) return !1;
|
|
1390
|
+
let p = f, m = function(e) {
|
|
1391
|
+
for (let t of n(e).iterNodeCarets("root")) {
|
|
1392
|
+
let { origin: n } = t;
|
|
1393
|
+
if (I(n)) {
|
|
1394
|
+
if (x(t)) return Ae(n, e.direction);
|
|
1395
|
+
} else if (!z(n)) break;
|
|
1396
|
+
}
|
|
1397
|
+
return null;
|
|
1398
|
+
}(a(p, d.direction)), h = v(p, $);
|
|
1399
|
+
if (!h || !h.is(s)) return !1;
|
|
1400
|
+
let g = e.getElementByKey(p.getKey()), _ = Rt(g);
|
|
1401
|
+
if (!g || !_) return !1;
|
|
1402
|
+
if (l.table = cn(e, h), m) if (i === "extend") {
|
|
1403
|
+
let t = Rt(e.getElementByKey(m.origin.getKey()));
|
|
1404
|
+
if (!t) return !1;
|
|
1405
|
+
l.$setAnchorCellForSelection(_), l.$setFocusCellForSelection(t, !0);
|
|
1406
|
+
} else {
|
|
1407
|
+
let e = fe(m);
|
|
1408
|
+
Ee(r.anchor, e), Ee(r.focus, e);
|
|
1409
|
+
}
|
|
1410
|
+
else if (i === "extend") l.$setAnchorCellForSelection(_), l.$setFocusCellForSelection(_, !0);
|
|
1411
|
+
else {
|
|
1412
|
+
let e = function(e) {
|
|
1413
|
+
let t = ke(e);
|
|
1414
|
+
return x(t) ? fe(t) : e;
|
|
1415
|
+
}(a(h, u.direction));
|
|
1416
|
+
Ee(r.anchor, e), Ee(r.focus, e);
|
|
1417
|
+
}
|
|
1418
|
+
return X(t), !0;
|
|
1419
|
+
}
|
|
1420
|
+
function Qt(e, t, n, r, a, o) {
|
|
1421
|
+
if ((n === "up" || n === "down") && function(e) {
|
|
1422
|
+
let t = e.getRootElement();
|
|
1423
|
+
return t ? t.hasAttribute("aria-controls") && t.getAttribute("aria-controls") === "typeahead-menu" : !1;
|
|
1424
|
+
}(e)) return !1;
|
|
1425
|
+
let s = j();
|
|
1426
|
+
if (!J(s, r)) {
|
|
1427
|
+
if (g(s)) {
|
|
1428
|
+
if (n === "backward") {
|
|
1429
|
+
if (s.focus.offset > 0) return !1;
|
|
1430
|
+
let e = function(e) {
|
|
1431
|
+
for (let t = e, n = e; n !== null; t = n, n = n.getParent()) if (O(n)) {
|
|
1432
|
+
if (n !== t && n.getFirstChild() !== t) return null;
|
|
1433
|
+
if (!n.isInline()) return n;
|
|
1434
|
+
}
|
|
1435
|
+
return null;
|
|
1436
|
+
}(s.focus.getNode());
|
|
1437
|
+
if (!e) return !1;
|
|
1438
|
+
let n = e.getPreviousSibling();
|
|
1439
|
+
return !!$(n) && (X(t), t.shiftKey ? s.focus.set(n.getParentOrThrow().getKey(), n.getIndexWithinParent(), "element") : n.selectEnd(), !0);
|
|
1440
|
+
}
|
|
1441
|
+
if (t.shiftKey && (n === "up" || n === "down")) {
|
|
1442
|
+
let e = s.focus.getNode();
|
|
1443
|
+
if (!s.isCollapsed() && (n === "up" && !s.isBackward() || n === "down" && s.isBackward())) {
|
|
1444
|
+
let a = v(e, (e) => $(e));
|
|
1445
|
+
if (I(a) && (a = v(a, $)), a !== r || !a) return !1;
|
|
1446
|
+
let o = n === "down" ? a.getNextSibling() : a.getPreviousSibling();
|
|
1447
|
+
if (!o) return !1;
|
|
1448
|
+
let c = 0;
|
|
1449
|
+
n === "up" && O(o) && (c = o.getChildrenSize());
|
|
1450
|
+
let l = o;
|
|
1451
|
+
n === "up" && O(o) && (l = o.getLastChild() || o, c = i(l) ? l.getTextContentSize() : 0);
|
|
1452
|
+
let u = s.clone();
|
|
1453
|
+
return u.focus.set(l.getKey(), c, i(l) ? "text" : "element"), k(u), X(t), !0;
|
|
1454
|
+
}
|
|
1455
|
+
if (Se(e)) {
|
|
1456
|
+
let e = n === "up" ? s.getNodes()[s.getNodes().length - 1] : s.getNodes()[0];
|
|
1457
|
+
if (e && kt(r, e) !== null) {
|
|
1458
|
+
let e = r.getFirstDescendant(), t = r.getLastDescendant();
|
|
1459
|
+
if (!e || !t) return !1;
|
|
1460
|
+
let [n] = H(e), [i] = H(t), o = r.getCordsFromCellNode(n, a.table), s = r.getCordsFromCellNode(i, a.table), c = r.getDOMCellFromCordsOrThrow(o.x, o.y, a.table), l = r.getDOMCellFromCordsOrThrow(s.x, s.y, a.table);
|
|
1461
|
+
return a.$setAnchorCellForSelection(c), a.$setFocusCellForSelection(l, !0), !0;
|
|
1462
|
+
}
|
|
1463
|
+
return !1;
|
|
1464
|
+
}
|
|
1465
|
+
{
|
|
1466
|
+
let r = v(e, (e) => O(e) && !e.isInline());
|
|
1467
|
+
if (I(r) && (r = v(r, $)), !r) return !1;
|
|
1468
|
+
let i = n === "down" ? r.getNextSibling() : r.getPreviousSibling();
|
|
1469
|
+
if ($(i) && a.tableNodeKey === i.getKey()) {
|
|
1470
|
+
let e = i.getFirstDescendant(), r = i.getLastDescendant();
|
|
1471
|
+
if (!e || !r) return !1;
|
|
1472
|
+
let [a] = H(e), [o] = H(r), c = s.clone();
|
|
1473
|
+
return c.focus.set((n === "up" ? a : o).getKey(), n === "up" ? 0 : o.getChildrenSize(), "element"), X(t), k(c), !0;
|
|
1474
|
+
}
|
|
1475
|
+
}
|
|
1476
|
+
}
|
|
1477
|
+
}
|
|
1478
|
+
return n === "down" && on(e) && o.setShouldCheckSelectionForTable(r.getKey()), !1;
|
|
1479
|
+
}
|
|
1480
|
+
if (g(s)) {
|
|
1481
|
+
if (n === "backward" || n === "forward") return Zt(e, t, s, t.shiftKey ? "extend" : "move", n === "backward", r, a);
|
|
1482
|
+
if (s.isCollapsed()) {
|
|
1483
|
+
let { anchor: i, focus: c } = s, l = v(i.getNode(), I), u = v(c.getNode(), I);
|
|
1484
|
+
if (!I(l) || !l.is(u)) return !1;
|
|
1485
|
+
let d = Y(l);
|
|
1486
|
+
if (d !== r && d != null) {
|
|
1487
|
+
let r = K(d, e.getElementByKey(d.getKey()));
|
|
1488
|
+
if (r != null) return a.table = q(d, r), Qt(e, t, n, d, a, o);
|
|
1489
|
+
}
|
|
1490
|
+
let f = e.getElementByKey(l.__key), p = e.getElementByKey(i.key);
|
|
1491
|
+
if (p == null || f == null) return !1;
|
|
1492
|
+
let m;
|
|
1493
|
+
if (i.type === "element") m = p.getBoundingClientRect();
|
|
1494
|
+
else {
|
|
1495
|
+
let t = S(Ot(e));
|
|
1496
|
+
if (t === null || t.rangeCount === 0) return !1;
|
|
1497
|
+
m = t.getRangeAt(0).getBoundingClientRect();
|
|
1498
|
+
}
|
|
1499
|
+
let h = n === "up" ? l.getFirstChild() : l.getLastChild();
|
|
1500
|
+
if (h == null) return !1;
|
|
1501
|
+
let g = e.getElementByKey(h.__key);
|
|
1502
|
+
if (g == null) return !1;
|
|
1503
|
+
let _ = g.getBoundingClientRect();
|
|
1504
|
+
if (n === "up" ? _.top > m.top - m.height : m.bottom + m.height > _.bottom) {
|
|
1505
|
+
X(t);
|
|
1506
|
+
let e = r.getCordsFromCellNode(l, a.table);
|
|
1507
|
+
if (!t.shiftKey) return Ht(a, r, e.x, e.y, n);
|
|
1508
|
+
{
|
|
1509
|
+
let t = r.getDOMCellFromCordsOrThrow(e.x, e.y, a.table);
|
|
1510
|
+
a.$setAnchorCellForSelection(t), a.$setFocusCellForSelection(t, !0);
|
|
1511
|
+
}
|
|
1512
|
+
return !0;
|
|
1513
|
+
}
|
|
1514
|
+
}
|
|
1515
|
+
} else if (U(s)) {
|
|
1516
|
+
let { anchor: i, focus: o } = s, c = v(i.getNode(), I), l = v(o.getNode(), I), [u] = s.getNodes();
|
|
1517
|
+
$(u) || L(251);
|
|
1518
|
+
let d = K(u, e.getElementByKey(u.getKey()));
|
|
1519
|
+
if (!I(c) || !I(l) || !$(u) || d == null) return !1;
|
|
1520
|
+
a.$updateTableTableSelection(s);
|
|
1521
|
+
let f = q(u, d), p = r.getCordsFromCellNode(c, f), m = r.getDOMCellFromCordsOrThrow(p.x, p.y, f);
|
|
1522
|
+
if (a.$setAnchorCellForSelection(m), X(t), t.shiftKey) {
|
|
1523
|
+
let [e, t, i] = B(r, c, l);
|
|
1524
|
+
return Kt(a, e, t, i, n);
|
|
1525
|
+
}
|
|
1526
|
+
return l.selectEnd(), !0;
|
|
1527
|
+
}
|
|
1528
|
+
return !1;
|
|
1529
|
+
}
|
|
1530
|
+
function X(e) {
|
|
1531
|
+
e.preventDefault(), e.stopImmediatePropagation(), e.stopPropagation();
|
|
1532
|
+
}
|
|
1533
|
+
function $t(e, t, n) {
|
|
1534
|
+
let r = C();
|
|
1535
|
+
e === "first" ? t.insertBefore(r) : t.insertAfter(r), r.append(...n || []), r.selectEnd();
|
|
1536
|
+
}
|
|
1537
|
+
function en(e, t, n) {
|
|
1538
|
+
let r = n.getParent();
|
|
1539
|
+
if (!r) return;
|
|
1540
|
+
let i = S(Ot(e));
|
|
1541
|
+
if (!i) return;
|
|
1542
|
+
let a = i.anchorNode, o = e.getElementByKey(r.getKey()), s = K(n, e.getElementByKey(n.getKey()));
|
|
1543
|
+
if (!a || !o || !s || !o.contains(a) || s.contains(a)) return;
|
|
1544
|
+
let c = v(t.anchor.getNode(), (e) => I(e));
|
|
1545
|
+
if (!c) return;
|
|
1546
|
+
let l = v(c, (e) => $(e));
|
|
1547
|
+
if (!$(l) || !l.is(n)) return;
|
|
1548
|
+
let [u, d] = B(n, c, c), f = u[0][0], p = u[u.length - 1][u[0].length - 1], { startRow: m, startColumn: h } = d, g = m === f.startRow && h === f.startColumn, _ = m === p.startRow && h === p.startColumn;
|
|
1549
|
+
return g ? "first" : _ ? "last" : void 0;
|
|
1550
|
+
}
|
|
1551
|
+
function Z(e, t) {
|
|
1552
|
+
let { tableNode: n } = e.$lookup(), r = n.getCordsFromCellNode(t, e.table);
|
|
1553
|
+
return n.getDOMCellFromCordsOrThrow(r.x, r.y, e.table);
|
|
1554
|
+
}
|
|
1555
|
+
function tn(e, t, n) {
|
|
1556
|
+
return kt(e, A(t, n));
|
|
1557
|
+
}
|
|
1558
|
+
function nn(e, t, n) {
|
|
1559
|
+
let r = e.querySelector("colgroup");
|
|
1560
|
+
if (!r) return;
|
|
1561
|
+
let i = [];
|
|
1562
|
+
for (let e = 0; e < t; e++) {
|
|
1563
|
+
let t = document.createElement("col"), r = n && n[e];
|
|
1564
|
+
r && (t.style.width = `${r}px`), i.push(t);
|
|
1565
|
+
}
|
|
1566
|
+
r.replaceChildren(...i);
|
|
1567
|
+
}
|
|
1568
|
+
function rn(e, t, n) {
|
|
1569
|
+
if (!t.theme.tableAlignment) return;
|
|
1570
|
+
let r = [], i = [];
|
|
1571
|
+
for (let e of ["center", "right"]) {
|
|
1572
|
+
let a = t.theme.tableAlignment[e];
|
|
1573
|
+
a && (e === n ? i : r).push(a);
|
|
1574
|
+
}
|
|
1575
|
+
E(e, ...r), w(e, ...i);
|
|
1576
|
+
}
|
|
1577
|
+
var an = /* @__PURE__ */ new WeakSet();
|
|
1578
|
+
function on(e = T()) {
|
|
1579
|
+
return an.has(e);
|
|
1580
|
+
}
|
|
1581
|
+
function sn(e, t) {
|
|
1582
|
+
t ? an.add(e) : an.delete(e);
|
|
1583
|
+
}
|
|
1584
|
+
var Q = class e extends Ce {
|
|
1585
|
+
__rowStriping;
|
|
1586
|
+
__frozenColumnCount;
|
|
1587
|
+
__frozenRowCount;
|
|
1588
|
+
__colWidths;
|
|
1589
|
+
static getType() {
|
|
1590
|
+
return "table";
|
|
1591
|
+
}
|
|
1592
|
+
getColWidths() {
|
|
1593
|
+
return this.getLatest().__colWidths;
|
|
1594
|
+
}
|
|
1595
|
+
setColWidths(e) {
|
|
1596
|
+
let t = this.getWritable();
|
|
1597
|
+
return t.__colWidths = e, t;
|
|
1598
|
+
}
|
|
1599
|
+
static clone(t) {
|
|
1600
|
+
return new e(t.__key);
|
|
1601
|
+
}
|
|
1602
|
+
afterCloneFrom(e) {
|
|
1603
|
+
super.afterCloneFrom(e), this.__colWidths = e.__colWidths, this.__rowStriping = e.__rowStriping, this.__frozenColumnCount = e.__frozenColumnCount, this.__frozenRowCount = e.__frozenRowCount;
|
|
1604
|
+
}
|
|
1605
|
+
static importDOM() {
|
|
1606
|
+
return { table: (e) => ({
|
|
1607
|
+
conversion: ln,
|
|
1608
|
+
priority: 1
|
|
1609
|
+
}) };
|
|
1610
|
+
}
|
|
1611
|
+
static importJSON(e) {
|
|
1612
|
+
return un().updateFromJSON(e);
|
|
1613
|
+
}
|
|
1614
|
+
updateFromJSON(e) {
|
|
1615
|
+
return super.updateFromJSON(e).setRowStriping(e.rowStriping || !1).setFrozenColumns(e.frozenColumnCount || 0).setFrozenRows(e.frozenRowCount || 0).setColWidths(e.colWidths);
|
|
1616
|
+
}
|
|
1617
|
+
constructor(e) {
|
|
1618
|
+
super(e), this.__rowStriping = !1, this.__frozenColumnCount = 0, this.__frozenRowCount = 0, this.__colWidths = void 0;
|
|
1619
|
+
}
|
|
1620
|
+
exportJSON() {
|
|
1621
|
+
return {
|
|
1622
|
+
...super.exportJSON(),
|
|
1623
|
+
colWidths: this.getColWidths(),
|
|
1624
|
+
frozenColumnCount: this.__frozenColumnCount ? this.__frozenColumnCount : void 0,
|
|
1625
|
+
frozenRowCount: this.__frozenRowCount ? this.__frozenRowCount : void 0,
|
|
1626
|
+
rowStriping: this.__rowStriping ? this.__rowStriping : void 0
|
|
1627
|
+
};
|
|
1628
|
+
}
|
|
1629
|
+
extractWithChild(e, t, n) {
|
|
1630
|
+
return n === "html";
|
|
1631
|
+
}
|
|
1632
|
+
getDOMSlot(e) {
|
|
1633
|
+
let t = G(e) ? e : e.querySelector("table");
|
|
1634
|
+
return G(t) || L(229), super.getDOMSlot(e).withElement(t).withAfter(t.querySelector("colgroup"));
|
|
1635
|
+
}
|
|
1636
|
+
createDOM(e, t) {
|
|
1637
|
+
let n = document.createElement("table");
|
|
1638
|
+
this.__style && (n.style.cssText = this.__style);
|
|
1639
|
+
let r = document.createElement("colgroup");
|
|
1640
|
+
if (n.appendChild(r), ge(r), w(n, e.theme.table), this.updateTableElement(null, n, e), on(t)) {
|
|
1641
|
+
let t = document.createElement("div"), r = e.theme.tableScrollableWrapper;
|
|
1642
|
+
return r ? w(t, r) : t.style.cssText = "overflow-x: auto;", t.appendChild(n), this.updateTableWrapper(null, t, n, e), t;
|
|
1643
|
+
}
|
|
1644
|
+
return n;
|
|
1645
|
+
}
|
|
1646
|
+
updateTableWrapper(e, t, n, r) {
|
|
1647
|
+
this.__frozenColumnCount !== (e ? e.__frozenColumnCount : 0) && function(e, t, n, r) {
|
|
1648
|
+
r > 0 ? (w(e, n.theme.tableFrozenColumn), t.setAttribute("data-lexical-frozen-column", "true")) : (E(e, n.theme.tableFrozenColumn), t.removeAttribute("data-lexical-frozen-column"));
|
|
1649
|
+
}(t, n, r, this.__frozenColumnCount), this.__frozenRowCount !== (e ? e.__frozenRowCount : 0) && function(e, t, n, r) {
|
|
1650
|
+
r > 0 ? (w(e, n.theme.tableFrozenRow), t.setAttribute("data-lexical-frozen-row", "true")) : (E(e, n.theme.tableFrozenRow), t.removeAttribute("data-lexical-frozen-row"));
|
|
1651
|
+
}(t, n, r, this.__frozenRowCount);
|
|
1652
|
+
}
|
|
1653
|
+
updateTableElement(e, t, n) {
|
|
1654
|
+
this.__style !== (e ? e.__style : "") && (t.style.cssText = this.__style), this.__rowStriping !== (!!e && e.__rowStriping) && function(e, t, n) {
|
|
1655
|
+
n ? (w(e, t.theme.tableRowStriping), e.setAttribute("data-lexical-row-striping", "true")) : (E(e, t.theme.tableRowStriping), e.removeAttribute("data-lexical-row-striping"));
|
|
1656
|
+
}(t, n, this.__rowStriping);
|
|
1657
|
+
let r = e ? e.getColumnCount() : 0, i = e ? e.__colWidths : void 0;
|
|
1658
|
+
this.getColumnCount() === r && this.getColWidths() === i || nn(t, this.getColumnCount(), this.getColWidths()), rn(t, n, this.getFormatType());
|
|
1659
|
+
}
|
|
1660
|
+
updateDOM(e, t, n) {
|
|
1661
|
+
let r = this.getDOMSlot(t).element;
|
|
1662
|
+
return t === r === on() || (ue(i = t) && i.nodeName === "DIV" && this.updateTableWrapper(e, t, r, n), this.updateTableElement(e, r, n), !1);
|
|
1663
|
+
var i;
|
|
1664
|
+
}
|
|
1665
|
+
scaleDOMColWidths(e, t) {
|
|
1666
|
+
let n = this.getColWidths();
|
|
1667
|
+
n && nn(this.getDOMSlot(e).element, this.getColumnCount(), n.map((e) => e * t));
|
|
1668
|
+
}
|
|
1669
|
+
exportDOM(e) {
|
|
1670
|
+
let t = super.exportDOM(e), { element: n } = t;
|
|
1671
|
+
return {
|
|
1672
|
+
after: (n) => {
|
|
1673
|
+
if (t.after && (n = t.after(n)), !G(n) && ue(n) && (n = n.querySelector("table")), !G(n)) return null;
|
|
1674
|
+
rn(n, e._config, this.getFormatType());
|
|
1675
|
+
let [r] = V(this, null, null), i = /* @__PURE__ */ new Map();
|
|
1676
|
+
for (let e of r) for (let t of e) {
|
|
1677
|
+
let e = t.cell.getKey();
|
|
1678
|
+
i.has(e) || i.set(e, {
|
|
1679
|
+
colSpan: t.cell.getColSpan(),
|
|
1680
|
+
startColumn: t.startColumn
|
|
1681
|
+
});
|
|
1682
|
+
}
|
|
1683
|
+
let a = /* @__PURE__ */ new Set();
|
|
1684
|
+
for (let e of n.querySelectorAll(":scope > tr > [data-temporary-table-cell-lexical-key]")) {
|
|
1685
|
+
let t = e.getAttribute("data-temporary-table-cell-lexical-key");
|
|
1686
|
+
if (t) {
|
|
1687
|
+
let n = i.get(t);
|
|
1688
|
+
if (e.removeAttribute("data-temporary-table-cell-lexical-key"), n) {
|
|
1689
|
+
i.delete(t);
|
|
1690
|
+
for (let e = 0; e < n.colSpan; e++) a.add(e + n.startColumn);
|
|
1691
|
+
}
|
|
1692
|
+
}
|
|
1693
|
+
}
|
|
1694
|
+
let o = n.querySelector(":scope > colgroup");
|
|
1695
|
+
if (o) {
|
|
1696
|
+
let e = Array.from(n.querySelectorAll(":scope > colgroup > col")).filter((e, t) => a.has(t));
|
|
1697
|
+
o.replaceChildren(...e);
|
|
1698
|
+
}
|
|
1699
|
+
let s = n.querySelectorAll(":scope > tr");
|
|
1700
|
+
if (s.length > 0) {
|
|
1701
|
+
let e = document.createElement("tbody");
|
|
1702
|
+
for (let t of s) e.appendChild(t);
|
|
1703
|
+
n.append(e);
|
|
1704
|
+
}
|
|
1705
|
+
return n;
|
|
1706
|
+
},
|
|
1707
|
+
element: !G(n) && ue(n) ? n.querySelector("table") : n
|
|
1708
|
+
};
|
|
1709
|
+
}
|
|
1710
|
+
canBeEmpty() {
|
|
1711
|
+
return !1;
|
|
1712
|
+
}
|
|
1713
|
+
isShadowRoot() {
|
|
1714
|
+
return !0;
|
|
1715
|
+
}
|
|
1716
|
+
getCordsFromCellNode(e, t) {
|
|
1717
|
+
let { rows: n, domRows: r } = t;
|
|
1718
|
+
for (let t = 0; t < n; t++) {
|
|
1719
|
+
let n = r[t];
|
|
1720
|
+
if (n != null) for (let r = 0; r < n.length; r++) {
|
|
1721
|
+
let i = n[r];
|
|
1722
|
+
if (i == null) continue;
|
|
1723
|
+
let { elem: a } = i, o = tn(this, a);
|
|
1724
|
+
if (o !== null && e.is(o)) return {
|
|
1725
|
+
x: r,
|
|
1726
|
+
y: t
|
|
1727
|
+
};
|
|
1728
|
+
}
|
|
1729
|
+
}
|
|
1730
|
+
throw Error("Cell not found in table.");
|
|
1731
|
+
}
|
|
1732
|
+
getDOMCellFromCords(e, t, n) {
|
|
1733
|
+
let { domRows: r } = n, i = r[t];
|
|
1734
|
+
return i == null ? null : i[e < i.length ? e : i.length - 1] ?? null;
|
|
1735
|
+
}
|
|
1736
|
+
getDOMCellFromCordsOrThrow(e, t, n) {
|
|
1737
|
+
let r = this.getDOMCellFromCords(e, t, n);
|
|
1738
|
+
if (!r) throw Error("Cell not found at cords.");
|
|
1739
|
+
return r;
|
|
1740
|
+
}
|
|
1741
|
+
getCellNodeFromCords(e, t, n) {
|
|
1742
|
+
let r = this.getDOMCellFromCords(e, t, n);
|
|
1743
|
+
if (r == null) return null;
|
|
1744
|
+
let i = A(r.elem);
|
|
1745
|
+
return I(i) ? i : null;
|
|
1746
|
+
}
|
|
1747
|
+
getCellNodeFromCordsOrThrow(e, t, n) {
|
|
1748
|
+
let r = this.getCellNodeFromCords(e, t, n);
|
|
1749
|
+
if (!r) throw Error("Node at cords not TableCellNode.");
|
|
1750
|
+
return r;
|
|
1751
|
+
}
|
|
1752
|
+
getRowStriping() {
|
|
1753
|
+
return !!this.getLatest().__rowStriping;
|
|
1754
|
+
}
|
|
1755
|
+
setRowStriping(e) {
|
|
1756
|
+
let t = this.getWritable();
|
|
1757
|
+
return t.__rowStriping = e, t;
|
|
1758
|
+
}
|
|
1759
|
+
setFrozenColumns(e) {
|
|
1760
|
+
let t = this.getWritable();
|
|
1761
|
+
return t.__frozenColumnCount = e, t;
|
|
1762
|
+
}
|
|
1763
|
+
getFrozenColumns() {
|
|
1764
|
+
return this.getLatest().__frozenColumnCount;
|
|
1765
|
+
}
|
|
1766
|
+
setFrozenRows(e) {
|
|
1767
|
+
let t = this.getWritable();
|
|
1768
|
+
return t.__frozenRowCount = e, t;
|
|
1769
|
+
}
|
|
1770
|
+
getFrozenRows() {
|
|
1771
|
+
return this.getLatest().__frozenRowCount;
|
|
1772
|
+
}
|
|
1773
|
+
canSelectBefore() {
|
|
1774
|
+
return !0;
|
|
1775
|
+
}
|
|
1776
|
+
canIndent() {
|
|
1777
|
+
return !1;
|
|
1778
|
+
}
|
|
1779
|
+
getColumnCount() {
|
|
1780
|
+
let e = this.getFirstChild();
|
|
1781
|
+
if (!e) return 0;
|
|
1782
|
+
let t = 0;
|
|
1783
|
+
return e.getChildren().forEach((e) => {
|
|
1784
|
+
I(e) && (t += e.getColSpan());
|
|
1785
|
+
}), t;
|
|
1786
|
+
}
|
|
1787
|
+
};
|
|
1788
|
+
function cn(e, t) {
|
|
1789
|
+
let n = e.getElementByKey(t.getKey());
|
|
1790
|
+
return n === null && L(230), q(t, n);
|
|
1791
|
+
}
|
|
1792
|
+
function ln(e) {
|
|
1793
|
+
let t = un();
|
|
1794
|
+
e.hasAttribute("data-lexical-row-striping") && t.setRowStriping(!0), e.hasAttribute("data-lexical-frozen-column") && t.setFrozenColumns(1), e.hasAttribute("data-lexical-frozen-row") && t.setFrozenRows(1);
|
|
1795
|
+
let n = e.querySelector(":scope > colgroup");
|
|
1796
|
+
if (n) {
|
|
1797
|
+
let e = [];
|
|
1798
|
+
for (let t of n.querySelectorAll(":scope > col")) {
|
|
1799
|
+
let n = t.style.width || "";
|
|
1800
|
+
if (!Ke.test(n) && (n = t.getAttribute("width") || "", !/^\d+$/.test(n))) {
|
|
1801
|
+
e = void 0;
|
|
1802
|
+
break;
|
|
1803
|
+
}
|
|
1804
|
+
e.push(parseFloat(n));
|
|
1805
|
+
}
|
|
1806
|
+
e && t.setColWidths(e);
|
|
1807
|
+
}
|
|
1808
|
+
return {
|
|
1809
|
+
after: (e) => ze(e, z),
|
|
1810
|
+
node: t
|
|
1811
|
+
};
|
|
1812
|
+
}
|
|
1813
|
+
function un() {
|
|
1814
|
+
return _e(new Q());
|
|
1815
|
+
}
|
|
1816
|
+
function $(e) {
|
|
1817
|
+
return e instanceof Q;
|
|
1818
|
+
}
|
|
1819
|
+
function dn(e) {
|
|
1820
|
+
z(e.getParent()) ? e.isEmpty() && e.append(C()) : e.remove();
|
|
1821
|
+
}
|
|
1822
|
+
function fn(e) {
|
|
1823
|
+
$(e.getParent()) ? Ie(e, I) : e.remove();
|
|
1824
|
+
}
|
|
1825
|
+
function pn(e) {
|
|
1826
|
+
Ie(e, z);
|
|
1827
|
+
let [t] = V(e, null, null), n = t.reduce((e, t) => Math.max(e, t.length), 0), r = e.getChildren();
|
|
1828
|
+
for (let e = 0; e < t.length; ++e) {
|
|
1829
|
+
let i = r[e];
|
|
1830
|
+
if (!i) continue;
|
|
1831
|
+
z(i) || L(254, i.constructor.name, i.getType());
|
|
1832
|
+
let a = t[e].reduce((e, t) => t ? 1 + e : e, 0);
|
|
1833
|
+
if (a !== n) for (let e = a; e < n; ++e) {
|
|
1834
|
+
let e = F();
|
|
1835
|
+
e.append(C()), i.append(e);
|
|
1836
|
+
}
|
|
1837
|
+
}
|
|
1838
|
+
let i = e.getColWidths(), a = e.getColumnCount();
|
|
1839
|
+
if (i && i.length !== a) {
|
|
1840
|
+
let t;
|
|
1841
|
+
if (a < i.length) t = i.slice(0, a);
|
|
1842
|
+
else if (i.length > 0) {
|
|
1843
|
+
let e = i[i.length - 1];
|
|
1844
|
+
t = [...i, ...Array(a - i.length).fill(e)];
|
|
1845
|
+
}
|
|
1846
|
+
e.setColWidths(t);
|
|
1847
|
+
}
|
|
1848
|
+
}
|
|
1849
|
+
function mn(e) {
|
|
1850
|
+
if (e.detail < 3 || !de(e.target)) return !1;
|
|
1851
|
+
let t = A(e.target);
|
|
1852
|
+
if (t === null) return !1;
|
|
1853
|
+
let n = v(t, (e) => O(e) && !e.isInline());
|
|
1854
|
+
return n === null ? !1 : !!I(n.getParent()) && (n.select(0), !0);
|
|
1855
|
+
}
|
|
1856
|
+
function hn() {
|
|
1857
|
+
let e = j();
|
|
1858
|
+
if (!g(e)) return !1;
|
|
1859
|
+
let t = Y(e.anchor.getNode());
|
|
1860
|
+
if (t === null) return !1;
|
|
1861
|
+
let n = ee();
|
|
1862
|
+
if (!n.is(t.getParent()) || n.getChildrenSize() !== 1) return !1;
|
|
1863
|
+
let [r] = V(t, null, null);
|
|
1864
|
+
if (r.length === 0 || r[0].length === 0) return !1;
|
|
1865
|
+
let i = r[0][0];
|
|
1866
|
+
if (!i || !i.cell) return !1;
|
|
1867
|
+
let a = r[r.length - 1], o = a[a.length - 1];
|
|
1868
|
+
return !o || !o.cell ? !1 : (k(Ct(t, i.cell, o.cell)), !0);
|
|
1869
|
+
}
|
|
1870
|
+
function gn(e) {
|
|
1871
|
+
return e.registerNodeTransform(P, (e) => {
|
|
1872
|
+
if (e.getColSpan() > 1 || e.getRowSpan() > 1) {
|
|
1873
|
+
let [, , t] = H(e), [n] = B(t, e, e), r = n.length, i = n[0].length, a = t.getFirstChild();
|
|
1874
|
+
z(a) || L(175);
|
|
1875
|
+
let o = [];
|
|
1876
|
+
for (let e = 0; e < r; e++) {
|
|
1877
|
+
e !== 0 && (a = a.getNextSibling(), z(a) || L(175));
|
|
1878
|
+
let t = null;
|
|
1879
|
+
for (let r = 0; r < i; r++) {
|
|
1880
|
+
let i = n[e][r], s = i.cell;
|
|
1881
|
+
if (i.startRow === e && i.startColumn === r) t = s, o.push(s);
|
|
1882
|
+
else if (s.getColSpan() > 1 || s.getRowSpan() > 1) {
|
|
1883
|
+
I(s) || L(176);
|
|
1884
|
+
let e = F(s.__headerState);
|
|
1885
|
+
t === null ? Le(a, e) : t.insertAfter(e);
|
|
1886
|
+
}
|
|
1887
|
+
}
|
|
1888
|
+
}
|
|
1889
|
+
for (let e of o) e.setColSpan(1), e.setRowSpan(1);
|
|
1890
|
+
}
|
|
1891
|
+
});
|
|
1892
|
+
}
|
|
1893
|
+
function _n(e, t = !0) {
|
|
1894
|
+
let n = new Et(), r = (r, i, a) => {
|
|
1895
|
+
let o = K(r, a), s = Pt(r, o, e, t, n);
|
|
1896
|
+
n.observers.set(i, [s, o]);
|
|
1897
|
+
};
|
|
1898
|
+
return o(Nt(e, n), e.registerCommand(M, () => Ft(n, e), 3), e.registerMutationListener(Q, (t) => {
|
|
1899
|
+
e.getEditorState().read(() => {
|
|
1900
|
+
for (let [e, i] of t) {
|
|
1901
|
+
let t = n.observers.get(e);
|
|
1902
|
+
if (i === "created" || i === "updated") {
|
|
1903
|
+
let { tableNode: i, tableElement: a } = Tt(e);
|
|
1904
|
+
t === void 0 ? r(i, e, a) : a !== t[1] && (t[0].removeListeners(), n.observers.delete(e), r(i, e, a));
|
|
1905
|
+
} else i === "destroyed" && t !== void 0 && (t[0].removeListeners(), n.observers.delete(e));
|
|
1906
|
+
}
|
|
1907
|
+
}, { editor: e });
|
|
1908
|
+
}, { skipInitialization: !1 }), () => {
|
|
1909
|
+
for (let [, [e]] of n.observers) e.removeListeners();
|
|
1910
|
+
});
|
|
1911
|
+
}
|
|
1912
|
+
function vn(e, t) {
|
|
1913
|
+
e.hasNodes([Q]) || L(255);
|
|
1914
|
+
let { hasNestedTables: n = Ue(!1) } = t ?? {};
|
|
1915
|
+
return o(e.registerCommand(Ye, (e) => function({ rows: e, columns: t, includeHeaders: n }, r) {
|
|
1916
|
+
let a = j() || Me();
|
|
1917
|
+
if (!a || !g(a) || !r && Y(a.anchor.getNode())) return !1;
|
|
1918
|
+
let o = tt(Number(e), Number(t), n);
|
|
1919
|
+
Be(o);
|
|
1920
|
+
let s = o.getFirstDescendant();
|
|
1921
|
+
return i(s) && s.select(), !0;
|
|
1922
|
+
}(e, n.peek()), 0), e.registerCommand(ie, (t, r) => e === r && function(e, t) {
|
|
1923
|
+
let { nodes: n, selection: r } = e;
|
|
1924
|
+
if (!n.some((e) => $(e) || Fe(e).some((e) => $(e.node)))) return !1;
|
|
1925
|
+
let a = U(r), o = g(r);
|
|
1926
|
+
return o && v(r.anchor.getNode(), (e) => I(e)) !== null && v(r.focus.getNode(), (e) => I(e)) !== null || a ? n.length === 1 && $(n[0]) ? function(e, t) {
|
|
1927
|
+
let n = t.getStartEndPoints(), r = U(t);
|
|
1928
|
+
if (n === null) return !1;
|
|
1929
|
+
let [a, o] = n, [s, c, l] = H(a), u = v(o.getNode(), (e) => I(e));
|
|
1930
|
+
if (!(I(s) && I(u) && z(c) && $(l))) return !1;
|
|
1931
|
+
let [d, f, p] = B(l, s, u), [m] = V(e, null, null), h = d.length, g = h > 0 ? d[0].length : 0, _ = f.startRow, y = f.startColumn, b = m.length, x = b > 0 ? m[0].length : 0;
|
|
1932
|
+
if (r) {
|
|
1933
|
+
let e = vt(d, f, p), t = e.maxRow - e.minRow + 1, n = e.maxColumn - e.minColumn + 1;
|
|
1934
|
+
_ = e.minRow, y = e.minColumn, b = Math.min(b, t), x = Math.min(x, n);
|
|
1935
|
+
}
|
|
1936
|
+
let S = !1, ee = Math.min(h, _ + b) - 1, te = Math.min(g, y + x) - 1, w = /* @__PURE__ */ new Set();
|
|
1937
|
+
for (let e = _; e <= ee; e++) for (let t = y; t <= te; t++) {
|
|
1938
|
+
let n = d[e][t];
|
|
1939
|
+
w.has(n.cell.getKey()) || n.cell.__rowSpan === 1 && n.cell.__colSpan === 1 || (_t(n.cell), w.add(n.cell.getKey()), S = !0);
|
|
1940
|
+
}
|
|
1941
|
+
let [T] = V(l.getWritable(), null, null), ne = b - h + _;
|
|
1942
|
+
for (let e = 0; e < ne; e++) lt(T[h - 1][0].cell);
|
|
1943
|
+
let re = x - g + y;
|
|
1944
|
+
for (let e = 0; e < re; e++) dt(T[0][g - 1].cell, !0, !1);
|
|
1945
|
+
[T] = V(l.getWritable(), null, null);
|
|
1946
|
+
for (let e = _; e < _ + b; e++) for (let t = y; t < y + x; t++) {
|
|
1947
|
+
let n = e - _, r = t - y, a = m[n][r];
|
|
1948
|
+
if (a.startRow !== n || a.startColumn !== r) continue;
|
|
1949
|
+
let o = a.cell;
|
|
1950
|
+
if (o.__rowSpan !== 1 || o.__colSpan !== 1) {
|
|
1951
|
+
let n = [], r = Math.min(e + o.__rowSpan, _ + b) - 1, i = Math.min(t + o.__colSpan, y + x) - 1;
|
|
1952
|
+
for (let a = e; a <= r; a++) for (let e = t; e <= i; e++) {
|
|
1953
|
+
let t = T[a][e];
|
|
1954
|
+
n.push(t.cell);
|
|
1955
|
+
}
|
|
1956
|
+
ht(n), S = !0;
|
|
1957
|
+
}
|
|
1958
|
+
let { cell: s } = T[e][t], c = o.getBackgroundColor();
|
|
1959
|
+
c != null && s.setBackgroundColor(c);
|
|
1960
|
+
let l = s.getChildren();
|
|
1961
|
+
o.getChildren().forEach((e) => {
|
|
1962
|
+
i(e) && C().append(e), s.append(e);
|
|
1963
|
+
}), l.forEach((e) => e.remove());
|
|
1964
|
+
}
|
|
1965
|
+
if (r && S) {
|
|
1966
|
+
let [e] = V(l.getWritable(), null, null);
|
|
1967
|
+
e[f.startRow][f.startColumn].cell.selectEnd();
|
|
1968
|
+
}
|
|
1969
|
+
return !0;
|
|
1970
|
+
}(n[0], r) : !(o && t.peek() && !function(e) {
|
|
1971
|
+
return !!(U(e) && !e.focus.getNode().is(e.anchor.getNode()) || g(e) && I(e.anchor.getNode()) && !e.anchor.getNode().is(e.focus.getNode()));
|
|
1972
|
+
}(r)) : !1;
|
|
1973
|
+
}(t, n), 0), e.registerCommand(je, hn, 1), e.registerCommand(xe, mn, 0), e.registerNodeTransform(Q, pn), e.registerNodeTransform(Xe, fn), e.registerNodeTransform(P, dn));
|
|
1974
|
+
}
|
|
1975
|
+
t({
|
|
1976
|
+
build: (e, t, n) => He(t),
|
|
1977
|
+
config: we({
|
|
1978
|
+
hasCellBackgroundColor: !0,
|
|
1979
|
+
hasCellMerge: !0,
|
|
1980
|
+
hasHorizontalScroll: !0,
|
|
1981
|
+
hasNestedTables: !1,
|
|
1982
|
+
hasTabHandler: !0
|
|
1983
|
+
}),
|
|
1984
|
+
name: "@lexical/table/Table",
|
|
1985
|
+
nodes: () => [
|
|
1986
|
+
Q,
|
|
1987
|
+
Xe,
|
|
1988
|
+
P
|
|
1989
|
+
],
|
|
1990
|
+
register(e, t, n) {
|
|
1991
|
+
let r = n.getOutput();
|
|
1992
|
+
return o(Ve(() => {
|
|
1993
|
+
let t = r.hasHorizontalScroll.value;
|
|
1994
|
+
on(e) !== t && (sn(e, t), e.registerNodeTransform(Q, () => {})());
|
|
1995
|
+
}), vn(e, r), Ve(() => _n(e, r.hasTabHandler.value)), Ve(() => r.hasCellMerge.value ? void 0 : gn(e)), Ve(() => r.hasCellBackgroundColor.value ? void 0 : e.registerNodeTransform(P, (e) => {
|
|
1996
|
+
e.getBackgroundColor() !== null && e.setBackgroundColor(null);
|
|
1997
|
+
})));
|
|
1998
|
+
}
|
|
1999
|
+
});
|
|
2000
|
+
//#endregion
|
|
2001
|
+
export { V as C, Y as S, K as T, gn as _, tt as a, Rt as b, _n as c, ot as d, rt as f, at as g, ft as h, Xe as i, Q as l, on as m, vn as n, P as o, nt as p, R as r, F as s, I as t, z as u, ut as v, sn as w, ct as x, it as y };
|
|
2002
|
+
|
|
2003
|
+
//# sourceMappingURL=LexicalTable.prod-D16GW-aZ.js.map
|