@atlaskit/editor-plugin-table 8.4.12 → 8.4.13
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/CHANGELOG.md +11 -0
- package/dist/cjs/nodeviews/ExternalDropTargets.js +6 -3
- package/dist/cjs/nodeviews/TableCell.js +5 -0
- package/dist/cjs/nodeviews/TableComponent.js +92 -29
- package/dist/cjs/nodeviews/TableComponentWithSharedState.js +7 -1
- package/dist/cjs/nodeviews/TableContainer.js +16 -6
- package/dist/cjs/nodeviews/TableNodeViewBase.js +4 -0
- package/dist/cjs/nodeviews/TableResizer.js +44 -15
- package/dist/cjs/nodeviews/TableRow.js +45 -1
- package/dist/cjs/nodeviews/TableStickyScrollbar.js +21 -2
- package/dist/cjs/nodeviews/lazy-node-views.js +16 -4
- package/dist/cjs/nodeviews/table.js +53 -18
- package/dist/cjs/pm-plugins/commands/clear.js +6 -0
- package/dist/cjs/pm-plugins/commands/column-resize.js +26 -17
- package/dist/cjs/pm-plugins/commands/commands-with-analytics.js +39 -26
- package/dist/cjs/pm-plugins/commands/go-to-next-cell.js +2 -0
- package/dist/cjs/pm-plugins/commands/hover.js +17 -13
- package/dist/cjs/pm-plugins/commands/insert.js +27 -10
- package/dist/cjs/pm-plugins/commands/misc.js +29 -9
- package/dist/cjs/pm-plugins/commands/selection.js +4 -0
- package/dist/cjs/pm-plugins/commands/sort.js +10 -1
- package/dist/cjs/pm-plugins/commands/toggle.js +2 -0
- package/dist/cjs/pm-plugins/decorations/plugin.js +9 -4
- package/dist/cjs/pm-plugins/decorations/utils/column-resizing.js +4 -1
- package/dist/cjs/pm-plugins/drag-and-drop/commands-with-analytics.js +19 -10
- package/dist/cjs/pm-plugins/drag-and-drop/commands.js +16 -7
- package/dist/cjs/pm-plugins/drag-and-drop/plugin.js +21 -8
- package/dist/cjs/pm-plugins/handlers.js +2 -2
- package/dist/cjs/pm-plugins/keymap.js +103 -24
- package/dist/cjs/pm-plugins/main.js +22 -11
- package/dist/cjs/pm-plugins/table-resizing/commands.js +7 -6
- package/dist/cjs/pm-plugins/table-resizing/event-handlers.js +39 -20
- package/dist/cjs/pm-plugins/table-resizing/plugin.js +4 -2
- package/dist/cjs/pm-plugins/table-resizing/utils/colgroup.js +19 -1
- package/dist/cjs/pm-plugins/table-resizing/utils/column-state.js +6 -1
- package/dist/cjs/pm-plugins/table-resizing/utils/content-width.js +17 -0
- package/dist/cjs/pm-plugins/table-resizing/utils/dom.js +4 -0
- package/dist/cjs/pm-plugins/table-resizing/utils/misc.js +2 -0
- package/dist/cjs/pm-plugins/table-resizing/utils/resize-column.js +8 -1
- package/dist/cjs/pm-plugins/table-resizing/utils/resize-logic.js +10 -2
- package/dist/cjs/pm-plugins/table-resizing/utils/resize-state.js +6 -3
- package/dist/cjs/pm-plugins/table-resizing/utils/scale-table.js +4 -4
- package/dist/cjs/pm-plugins/table-selection-keymap.js +12 -0
- package/dist/cjs/pm-plugins/table-width.js +9 -4
- package/dist/cjs/pm-plugins/transforms/column-width.js +8 -5
- package/dist/cjs/pm-plugins/transforms/delete-columns.js +2 -0
- package/dist/cjs/pm-plugins/transforms/fix-tables.js +24 -8
- package/dist/cjs/pm-plugins/transforms/merge.js +7 -0
- package/dist/cjs/pm-plugins/transforms/replace-table.js +6 -3
- package/dist/cjs/pm-plugins/transforms/split.js +6 -1
- package/dist/cjs/pm-plugins/utils/alignment.js +4 -1
- package/dist/cjs/pm-plugins/utils/analytics.js +3 -3
- package/dist/cjs/pm-plugins/utils/column-controls.js +4 -0
- package/dist/cjs/pm-plugins/utils/create.js +2 -2
- package/dist/cjs/pm-plugins/utils/decoration.js +24 -6
- package/dist/cjs/pm-plugins/utils/dom.js +4 -0
- package/dist/cjs/pm-plugins/utils/drag-menu.js +19 -7
- package/dist/cjs/pm-plugins/utils/nodes.js +3 -0
- package/dist/cjs/pm-plugins/utils/paste.js +4 -1
- package/dist/cjs/pm-plugins/utils/row-controls.js +4 -1
- package/dist/cjs/tablePlugin.js +24 -18
- package/dist/cjs/ui/ColumnResizeWidget/index.js +2 -0
- package/dist/cjs/ui/DragHandle/HandleIconComponent.js +5 -3
- package/dist/cjs/ui/DragHandle/index.js +14 -7
- package/dist/cjs/ui/FloatingAlignmentButtons/FloatingAlignmentButtons.js +8 -1
- package/dist/cjs/ui/FloatingContextualButton/FixedButton.js +4 -0
- package/dist/cjs/ui/FloatingContextualButton/index.js +7 -1
- package/dist/cjs/ui/FloatingContextualMenu/ContextualMenu.js +32 -15
- package/dist/cjs/ui/FloatingContextualMenu/index.js +19 -4
- package/dist/cjs/ui/FloatingDeleteButton/index.js +27 -5
- package/dist/cjs/ui/FloatingDragMenu/DragMenu.js +19 -7
- package/dist/cjs/ui/FloatingDragMenu/DropdownMenu.js +15 -2
- package/dist/cjs/ui/FloatingDragMenu/index.js +4 -1
- package/dist/cjs/ui/FloatingInsertButton/InsertButton.js +4 -0
- package/dist/cjs/ui/FloatingInsertButton/getPopupOptions.js +6 -0
- package/dist/cjs/ui/FloatingInsertButton/index.js +27 -3
- package/dist/cjs/ui/TableFloatingColumnControls/ColumnControls/index.js +30 -8
- package/dist/cjs/ui/TableFloatingColumnControls/ColumnDropTargets/index.js +4 -1
- package/dist/cjs/ui/TableFloatingColumnControls/index.js +9 -5
- package/dist/cjs/ui/TableFloatingControls/CornerControls/ClassicCornerControls.js +2 -0
- package/dist/cjs/ui/TableFloatingControls/FloatingControlsWithSelection.js +4 -4
- package/dist/cjs/ui/TableFloatingControls/NumberColumn/index.js +8 -2
- package/dist/cjs/ui/TableFloatingControls/RowControls/ClassicControls.js +9 -5
- package/dist/cjs/ui/TableFloatingControls/RowControls/DragControls.js +68 -41
- package/dist/cjs/ui/TableFloatingControls/index.js +19 -8
- package/dist/cjs/ui/common-styles.js +1 -1
- package/dist/cjs/ui/event-handlers.js +59 -32
- package/dist/cjs/ui/icons/SortingIconWrapper.js +2 -0
- package/dist/cjs/ui/toolbar.js +42 -16
- package/dist/es2019/nodeviews/ExternalDropTargets.js +5 -2
- package/dist/es2019/nodeviews/TableCell.js +5 -0
- package/dist/es2019/nodeviews/TableComponent.js +77 -13
- package/dist/es2019/nodeviews/TableComponentWithSharedState.js +8 -1
- package/dist/es2019/nodeviews/TableContainer.js +14 -4
- package/dist/es2019/nodeviews/TableNodeViewBase.js +4 -0
- package/dist/es2019/nodeviews/TableResizer.js +33 -4
- package/dist/es2019/nodeviews/TableRow.js +45 -1
- package/dist/es2019/nodeviews/TableStickyScrollbar.js +20 -2
- package/dist/es2019/nodeviews/lazy-node-views.js +16 -4
- package/dist/es2019/nodeviews/table.js +47 -12
- package/dist/es2019/pm-plugins/commands/clear.js +6 -0
- package/dist/es2019/pm-plugins/commands/column-resize.js +16 -7
- package/dist/es2019/pm-plugins/commands/commands-with-analytics.js +28 -9
- package/dist/es2019/pm-plugins/commands/delete.js +4 -1
- package/dist/es2019/pm-plugins/commands/go-to-next-cell.js +2 -0
- package/dist/es2019/pm-plugins/commands/hover.js +5 -1
- package/dist/es2019/pm-plugins/commands/insert.js +26 -6
- package/dist/es2019/pm-plugins/commands/misc.js +25 -5
- package/dist/es2019/pm-plugins/commands/selection.js +4 -0
- package/dist/es2019/pm-plugins/commands/sort.js +10 -1
- package/dist/es2019/pm-plugins/commands/toggle.js +2 -0
- package/dist/es2019/pm-plugins/decorations/plugin.js +7 -2
- package/dist/es2019/pm-plugins/decorations/utils/column-resizing.js +4 -1
- package/dist/es2019/pm-plugins/drag-and-drop/commands-with-analytics.js +14 -5
- package/dist/es2019/pm-plugins/drag-and-drop/commands.js +17 -5
- package/dist/es2019/pm-plugins/drag-and-drop/plugin.js +21 -5
- package/dist/es2019/pm-plugins/handlers.js +1 -1
- package/dist/es2019/pm-plugins/keymap.js +104 -24
- package/dist/es2019/pm-plugins/main.js +16 -5
- package/dist/es2019/pm-plugins/table-resizing/commands.js +3 -2
- package/dist/es2019/pm-plugins/table-resizing/event-handlers.js +25 -6
- package/dist/es2019/pm-plugins/table-resizing/plugin.js +4 -1
- package/dist/es2019/pm-plugins/table-resizing/utils/colgroup.js +23 -2
- package/dist/es2019/pm-plugins/table-resizing/utils/column-state.js +6 -1
- package/dist/es2019/pm-plugins/table-resizing/utils/content-width.js +17 -0
- package/dist/es2019/pm-plugins/table-resizing/utils/dom.js +4 -0
- package/dist/es2019/pm-plugins/table-resizing/utils/misc.js +2 -0
- package/dist/es2019/pm-plugins/table-resizing/utils/resize-column.js +12 -2
- package/dist/es2019/pm-plugins/table-resizing/utils/resize-logic.js +10 -2
- package/dist/es2019/pm-plugins/table-resizing/utils/resize-state.js +9 -3
- package/dist/es2019/pm-plugins/table-resizing/utils/scale-table.js +18 -6
- package/dist/es2019/pm-plugins/table-selection-keymap.js +12 -0
- package/dist/es2019/pm-plugins/table-width.js +7 -2
- package/dist/es2019/pm-plugins/transforms/column-width.js +12 -5
- package/dist/es2019/pm-plugins/transforms/delete-columns.js +6 -1
- package/dist/es2019/pm-plugins/transforms/fix-tables.js +20 -4
- package/dist/es2019/pm-plugins/transforms/merge.js +7 -0
- package/dist/es2019/pm-plugins/transforms/replace-table.js +5 -2
- package/dist/es2019/pm-plugins/transforms/split.js +6 -1
- package/dist/es2019/pm-plugins/utils/alignment.js +4 -1
- package/dist/es2019/pm-plugins/utils/analytics.js +2 -2
- package/dist/es2019/pm-plugins/utils/column-controls.js +4 -0
- package/dist/es2019/pm-plugins/utils/create.js +1 -1
- package/dist/es2019/pm-plugins/utils/decoration.js +24 -6
- package/dist/es2019/pm-plugins/utils/dom.js +4 -0
- package/dist/es2019/pm-plugins/utils/drag-menu.js +19 -4
- package/dist/es2019/pm-plugins/utils/nodes.js +3 -0
- package/dist/es2019/pm-plugins/utils/paste.js +8 -2
- package/dist/es2019/pm-plugins/utils/row-controls.js +4 -1
- package/dist/es2019/pm-plugins/utils/snapping.js +4 -1
- package/dist/es2019/tablePlugin.js +13 -4
- package/dist/es2019/ui/ColumnResizeWidget/index.js +2 -0
- package/dist/es2019/ui/DragHandle/HandleIconComponent.js +3 -1
- package/dist/es2019/ui/DragHandle/index.js +10 -3
- package/dist/es2019/ui/FloatingAlignmentButtons/FloatingAlignmentButtons.js +8 -1
- package/dist/es2019/ui/FloatingContextualButton/FixedButton.js +4 -0
- package/dist/es2019/ui/FloatingContextualButton/index.js +7 -1
- package/dist/es2019/ui/FloatingContextualMenu/ContextualMenu.js +23 -6
- package/dist/es2019/ui/FloatingContextualMenu/index.js +19 -4
- package/dist/es2019/ui/FloatingDeleteButton/index.js +23 -1
- package/dist/es2019/ui/FloatingDragMenu/DragMenu.js +15 -3
- package/dist/es2019/ui/FloatingDragMenu/DropdownMenu.js +15 -2
- package/dist/es2019/ui/FloatingDragMenu/index.js +4 -1
- package/dist/es2019/ui/FloatingInsertButton/InsertButton.js +4 -0
- package/dist/es2019/ui/FloatingInsertButton/getPopupOptions.js +6 -0
- package/dist/es2019/ui/FloatingInsertButton/index.js +26 -2
- package/dist/es2019/ui/TableFloatingColumnControls/ColumnControls/index.js +28 -6
- package/dist/es2019/ui/TableFloatingColumnControls/ColumnDropTargets/index.js +4 -1
- package/dist/es2019/ui/TableFloatingColumnControls/index.js +7 -2
- package/dist/es2019/ui/TableFloatingControls/CornerControls/ClassicCornerControls.js +2 -0
- package/dist/es2019/ui/TableFloatingControls/FloatingControlsWithSelection.js +2 -2
- package/dist/es2019/ui/TableFloatingControls/NumberColumn/index.js +7 -1
- package/dist/es2019/ui/TableFloatingControls/RowControls/ClassicControls.js +7 -2
- package/dist/es2019/ui/TableFloatingControls/RowControls/DragControls.js +32 -6
- package/dist/es2019/ui/TableFloatingControls/index.js +14 -3
- package/dist/es2019/ui/common-styles.js +7 -0
- package/dist/es2019/ui/event-handlers.js +35 -5
- package/dist/es2019/ui/icons/SortingIconWrapper.js +2 -0
- package/dist/es2019/ui/toolbar.js +58 -14
- package/dist/esm/nodeviews/ExternalDropTargets.js +5 -2
- package/dist/esm/nodeviews/TableCell.js +5 -0
- package/dist/esm/nodeviews/TableComponent.js +75 -11
- package/dist/esm/nodeviews/TableComponentWithSharedState.js +8 -1
- package/dist/esm/nodeviews/TableContainer.js +14 -4
- package/dist/esm/nodeviews/TableNodeViewBase.js +4 -0
- package/dist/esm/nodeviews/TableResizer.js +33 -4
- package/dist/esm/nodeviews/TableRow.js +45 -1
- package/dist/esm/nodeviews/TableStickyScrollbar.js +21 -2
- package/dist/esm/nodeviews/lazy-node-views.js +16 -4
- package/dist/esm/nodeviews/table.js +47 -12
- package/dist/esm/pm-plugins/commands/clear.js +6 -0
- package/dist/esm/pm-plugins/commands/column-resize.js +16 -7
- package/dist/esm/pm-plugins/commands/commands-with-analytics.js +20 -7
- package/dist/esm/pm-plugins/commands/go-to-next-cell.js +2 -0
- package/dist/esm/pm-plugins/commands/hover.js +5 -1
- package/dist/esm/pm-plugins/commands/insert.js +22 -5
- package/dist/esm/pm-plugins/commands/misc.js +25 -5
- package/dist/esm/pm-plugins/commands/selection.js +4 -0
- package/dist/esm/pm-plugins/commands/sort.js +10 -1
- package/dist/esm/pm-plugins/commands/toggle.js +2 -0
- package/dist/esm/pm-plugins/decorations/plugin.js +7 -2
- package/dist/esm/pm-plugins/decorations/utils/column-resizing.js +4 -1
- package/dist/esm/pm-plugins/drag-and-drop/commands-with-analytics.js +14 -5
- package/dist/esm/pm-plugins/drag-and-drop/commands.js +13 -4
- package/dist/esm/pm-plugins/drag-and-drop/plugin.js +17 -4
- package/dist/esm/pm-plugins/handlers.js +1 -1
- package/dist/esm/pm-plugins/keymap.js +104 -24
- package/dist/esm/pm-plugins/main.js +16 -5
- package/dist/esm/pm-plugins/table-resizing/commands.js +3 -2
- package/dist/esm/pm-plugins/table-resizing/event-handlers.js +25 -6
- package/dist/esm/pm-plugins/table-resizing/plugin.js +4 -1
- package/dist/esm/pm-plugins/table-resizing/utils/colgroup.js +19 -1
- package/dist/esm/pm-plugins/table-resizing/utils/column-state.js +6 -1
- package/dist/esm/pm-plugins/table-resizing/utils/content-width.js +17 -0
- package/dist/esm/pm-plugins/table-resizing/utils/dom.js +4 -0
- package/dist/esm/pm-plugins/table-resizing/utils/misc.js +2 -0
- package/dist/esm/pm-plugins/table-resizing/utils/resize-column.js +8 -1
- package/dist/esm/pm-plugins/table-resizing/utils/resize-logic.js +10 -2
- package/dist/esm/pm-plugins/table-resizing/utils/resize-state.js +5 -2
- package/dist/esm/pm-plugins/table-resizing/utils/scale-table.js +2 -2
- package/dist/esm/pm-plugins/table-selection-keymap.js +12 -0
- package/dist/esm/pm-plugins/table-width.js +7 -2
- package/dist/esm/pm-plugins/transforms/column-width.js +6 -4
- package/dist/esm/pm-plugins/transforms/delete-columns.js +2 -0
- package/dist/esm/pm-plugins/transforms/fix-tables.js +20 -4
- package/dist/esm/pm-plugins/transforms/merge.js +7 -0
- package/dist/esm/pm-plugins/transforms/replace-table.js +5 -2
- package/dist/esm/pm-plugins/transforms/split.js +6 -1
- package/dist/esm/pm-plugins/utils/alignment.js +4 -1
- package/dist/esm/pm-plugins/utils/analytics.js +2 -2
- package/dist/esm/pm-plugins/utils/column-controls.js +4 -0
- package/dist/esm/pm-plugins/utils/create.js +1 -1
- package/dist/esm/pm-plugins/utils/decoration.js +24 -6
- package/dist/esm/pm-plugins/utils/dom.js +4 -0
- package/dist/esm/pm-plugins/utils/drag-menu.js +15 -3
- package/dist/esm/pm-plugins/utils/nodes.js +3 -0
- package/dist/esm/pm-plugins/utils/paste.js +4 -1
- package/dist/esm/pm-plugins/utils/row-controls.js +4 -1
- package/dist/esm/tablePlugin.js +11 -4
- package/dist/esm/ui/ColumnResizeWidget/index.js +2 -0
- package/dist/esm/ui/DragHandle/HandleIconComponent.js +3 -1
- package/dist/esm/ui/DragHandle/index.js +10 -3
- package/dist/esm/ui/FloatingAlignmentButtons/FloatingAlignmentButtons.js +8 -1
- package/dist/esm/ui/FloatingContextualButton/FixedButton.js +4 -0
- package/dist/esm/ui/FloatingContextualButton/index.js +7 -1
- package/dist/esm/ui/FloatingContextualMenu/ContextualMenu.js +23 -6
- package/dist/esm/ui/FloatingContextualMenu/index.js +19 -4
- package/dist/esm/ui/FloatingDeleteButton/index.js +23 -1
- package/dist/esm/ui/FloatingDragMenu/DragMenu.js +15 -3
- package/dist/esm/ui/FloatingDragMenu/DropdownMenu.js +15 -2
- package/dist/esm/ui/FloatingDragMenu/index.js +4 -1
- package/dist/esm/ui/FloatingInsertButton/InsertButton.js +4 -0
- package/dist/esm/ui/FloatingInsertButton/getPopupOptions.js +6 -0
- package/dist/esm/ui/FloatingInsertButton/index.js +26 -2
- package/dist/esm/ui/TableFloatingColumnControls/ColumnControls/index.js +28 -6
- package/dist/esm/ui/TableFloatingColumnControls/ColumnDropTargets/index.js +4 -1
- package/dist/esm/ui/TableFloatingColumnControls/index.js +6 -2
- package/dist/esm/ui/TableFloatingControls/CornerControls/ClassicCornerControls.js +2 -0
- package/dist/esm/ui/TableFloatingControls/FloatingControlsWithSelection.js +2 -2
- package/dist/esm/ui/TableFloatingControls/NumberColumn/index.js +7 -1
- package/dist/esm/ui/TableFloatingControls/RowControls/ClassicControls.js +6 -2
- package/dist/esm/ui/TableFloatingControls/RowControls/DragControls.js +65 -38
- package/dist/esm/ui/TableFloatingControls/index.js +14 -3
- package/dist/esm/ui/common-styles.js +1 -1
- package/dist/esm/ui/event-handlers.js +31 -4
- package/dist/esm/ui/icons/SortingIconWrapper.js +2 -0
- package/dist/esm/ui/toolbar.js +34 -8
- package/dist/types/pm-plugins/commands/commands-with-analytics.d.ts +1 -1
- package/dist/types/pm-plugins/table-resizing/commands.d.ts +1 -1
- package/dist/types/pm-plugins/transforms/column-width.d.ts +1 -1
- package/dist/types/pm-plugins/utils/collapse.d.ts +2 -1
- package/dist/types/ui/FloatingContextualButton/FixedButton.d.ts +1 -1
- package/dist/types/ui/FloatingContextualButton/index.d.ts +1 -1
- package/dist/types/ui/FloatingDeleteButton/index.d.ts +1 -1
- package/dist/types/ui/FloatingDragMenu/index.d.ts +1 -1
- package/dist/types/ui/TableFloatingColumnControls/ColumnControls/index.d.ts +2 -2
- package/dist/types/ui/TableFloatingColumnControls/index.d.ts +1 -1
- package/dist/types/ui/TableFloatingControls/CornerControls/DragCornerControls.d.ts +4 -4
- package/dist/types/ui/TableFloatingControls/index.d.ts +3 -3
- package/dist/types-ts4.5/pm-plugins/commands/commands-with-analytics.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/table-resizing/commands.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/transforms/column-width.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/utils/collapse.d.ts +2 -1
- package/dist/types-ts4.5/ui/FloatingContextualButton/FixedButton.d.ts +1 -1
- package/dist/types-ts4.5/ui/FloatingContextualButton/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/FloatingDeleteButton/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/FloatingDragMenu/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/TableFloatingColumnControls/ColumnControls/index.d.ts +2 -2
- package/dist/types-ts4.5/ui/TableFloatingColumnControls/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/TableFloatingControls/CornerControls/DragCornerControls.d.ts +4 -4
- package/dist/types-ts4.5/ui/TableFloatingControls/index.d.ts +3 -3
- package/package.json +3 -3
- package/src/nodeviews/ExternalDropTargets.tsx +3 -1
- package/src/nodeviews/TableCell.ts +4 -0
- package/src/nodeviews/TableComponent.tsx +63 -18
- package/src/nodeviews/TableComponentWithSharedState.tsx +4 -0
- package/src/nodeviews/TableContainer.tsx +7 -1
- package/src/nodeviews/TableNodeViewBase.ts +4 -0
- package/src/nodeviews/TableResizer.tsx +27 -4
- package/src/nodeviews/TableRow.ts +41 -1
- package/src/nodeviews/TableStickyScrollbar.ts +14 -0
- package/src/nodeviews/__mocks__/OverflowShadowsObserver.ts +2 -0
- package/src/nodeviews/__mocks__/OverridableMock.ts +6 -0
- package/src/nodeviews/lazy-node-views.ts +8 -0
- package/src/nodeviews/table.tsx +30 -4
- package/src/pm-plugins/commands/clear.ts +6 -0
- package/src/pm-plugins/commands/column-resize.ts +12 -9
- package/src/pm-plugins/commands/commands-with-analytics.ts +21 -4
- package/src/pm-plugins/commands/delete.ts +2 -0
- package/src/pm-plugins/commands/go-to-next-cell.ts +2 -0
- package/src/pm-plugins/commands/hover.ts +7 -5
- package/src/pm-plugins/commands/insert.ts +15 -1
- package/src/pm-plugins/commands/misc.ts +24 -3
- package/src/pm-plugins/commands/selection.ts +4 -0
- package/src/pm-plugins/commands/sort.ts +9 -1
- package/src/pm-plugins/commands/toggle.ts +2 -0
- package/src/pm-plugins/decorations/plugin.ts +5 -1
- package/src/pm-plugins/decorations/utils/column-resizing.ts +2 -0
- package/src/pm-plugins/drag-and-drop/commands-with-analytics.ts +8 -2
- package/src/pm-plugins/drag-and-drop/commands.ts +9 -1
- package/src/pm-plugins/drag-and-drop/plugin.ts +17 -2
- package/src/pm-plugins/handlers.ts +1 -1
- package/src/pm-plugins/keymap.ts +54 -0
- package/src/pm-plugins/main.ts +12 -5
- package/src/pm-plugins/table-resizing/commands.ts +4 -3
- package/src/pm-plugins/table-resizing/event-handlers.ts +24 -10
- package/src/pm-plugins/table-resizing/plugin.ts +3 -1
- package/src/pm-plugins/table-resizing/utils/colgroup.ts +17 -1
- package/src/pm-plugins/table-resizing/utils/column-state.ts +4 -0
- package/src/pm-plugins/table-resizing/utils/content-width.ts +14 -0
- package/src/pm-plugins/table-resizing/utils/dom.ts +4 -0
- package/src/pm-plugins/table-resizing/utils/misc.ts +2 -0
- package/src/pm-plugins/table-resizing/utils/resize-column.ts +9 -1
- package/src/pm-plugins/table-resizing/utils/resize-logic.ts +6 -0
- package/src/pm-plugins/table-resizing/utils/resize-state.ts +5 -1
- package/src/pm-plugins/table-resizing/utils/scale-table.ts +10 -2
- package/src/pm-plugins/table-selection-keymap.ts +8 -0
- package/src/pm-plugins/table-width.ts +5 -1
- package/src/pm-plugins/transforms/column-width.ts +9 -7
- package/src/pm-plugins/transforms/delete-columns.ts +4 -0
- package/src/pm-plugins/transforms/fix-tables.ts +13 -6
- package/src/pm-plugins/transforms/merge.ts +6 -0
- package/src/pm-plugins/transforms/replace-table.ts +3 -1
- package/src/pm-plugins/transforms/split.ts +4 -0
- package/src/pm-plugins/utils/alignment.ts +2 -0
- package/src/pm-plugins/utils/analytics.ts +2 -2
- package/src/pm-plugins/utils/collapse.ts +3 -4
- package/src/pm-plugins/utils/column-controls.ts +4 -0
- package/src/pm-plugins/utils/create.ts +1 -1
- package/src/pm-plugins/utils/decoration.ts +12 -0
- package/src/pm-plugins/utils/dom.ts +4 -0
- package/src/pm-plugins/utils/drag-menu.ts +12 -1
- package/src/pm-plugins/utils/nodes.ts +2 -0
- package/src/pm-plugins/utils/paste.ts +4 -0
- package/src/pm-plugins/utils/row-controls.ts +2 -0
- package/src/pm-plugins/utils/snapping.ts +2 -0
- package/src/tablePlugin.tsx +13 -15
- package/src/tablePluginType.ts +10 -0
- package/src/ui/ColumnResizeWidget/index.tsx +2 -0
- package/src/ui/DragHandle/HandleIconComponent.tsx +3 -1
- package/src/ui/DragHandle/index.tsx +11 -2
- package/src/ui/FloatingAlignmentButtons/FloatingAlignmentButtons.tsx +6 -0
- package/src/ui/FloatingContextualButton/FixedButton.tsx +5 -1
- package/src/ui/FloatingContextualButton/index.tsx +8 -2
- package/src/ui/FloatingContextualMenu/ContextualMenu.tsx +17 -7
- package/src/ui/FloatingContextualMenu/index.tsx +11 -1
- package/src/ui/FloatingDeleteButton/index.tsx +23 -4
- package/src/ui/FloatingDragMenu/DragMenu.tsx +13 -6
- package/src/ui/FloatingDragMenu/DropdownMenu.tsx +10 -0
- package/src/ui/FloatingDragMenu/index.tsx +3 -1
- package/src/ui/FloatingInsertButton/InsertButton.tsx +4 -0
- package/src/ui/FloatingInsertButton/getPopupOptions.ts +4 -0
- package/src/ui/FloatingInsertButton/index.tsx +21 -1
- package/src/ui/TableFloatingColumnControls/ColumnControls/index.tsx +19 -2
- package/src/ui/TableFloatingColumnControls/ColumnDropTargets/index.tsx +2 -0
- package/src/ui/TableFloatingColumnControls/index.tsx +8 -4
- package/src/ui/TableFloatingControls/CornerControls/ClassicCornerControls.tsx +2 -0
- package/src/ui/TableFloatingControls/FloatingControlsWithSelection.tsx +2 -2
- package/src/ui/TableFloatingControls/NumberColumn/index.tsx +7 -1
- package/src/ui/TableFloatingControls/RowControls/ClassicControls.tsx +11 -3
- package/src/ui/TableFloatingControls/RowControls/DragControls.tsx +20 -1
- package/src/ui/TableFloatingControls/index.tsx +13 -4
- package/src/ui/common-styles.ts +7 -0
- package/src/ui/event-handlers.ts +28 -3
- package/src/ui/icons/SortingIconWrapper.tsx +2 -0
- package/src/ui/toolbar.tsx +43 -11
- package/tsconfig.json +0 -1
|
@@ -25,7 +25,8 @@ var _utils2 = require("@atlaskit/editor-tables/utils");
|
|
|
25
25
|
var _commands = require("../../pm-plugins/commands");
|
|
26
26
|
var _commandsWithAnalytics = require("../../pm-plugins/commands/commands-with-analytics");
|
|
27
27
|
var _pluginFactory = require("../../pm-plugins/plugin-factory");
|
|
28
|
-
var
|
|
28
|
+
var _columnControls = require("../../pm-plugins/utils/column-controls");
|
|
29
|
+
var _rowControls = require("../../pm-plugins/utils/row-controls");
|
|
29
30
|
var _types = require("../../types");
|
|
30
31
|
var _consts = require("../consts");
|
|
31
32
|
var _DeleteButton = _interopRequireDefault(require("./DeleteButton"));
|
|
@@ -47,6 +48,9 @@ function getSelectionType(selection) {
|
|
|
47
48
|
}
|
|
48
49
|
return;
|
|
49
50
|
}
|
|
51
|
+
|
|
52
|
+
// Ignored via go/ees005
|
|
53
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
50
54
|
var FloatingDeleteButton = /*#__PURE__*/function (_Component) {
|
|
51
55
|
function FloatingDeleteButton(props) {
|
|
52
56
|
var _this;
|
|
@@ -57,6 +61,8 @@ var FloatingDeleteButton = /*#__PURE__*/function (_Component) {
|
|
|
57
61
|
var tableWrapper = (0, _utils.closestElement)(_this.props.tableRef, ".".concat(_types.TableCssClassName.TABLE_NODE_WRAPPER));
|
|
58
62
|
if (tableWrapper) {
|
|
59
63
|
_this.wrapper = tableWrapper;
|
|
64
|
+
// Ignored via go/ees005
|
|
65
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
60
66
|
_this.wrapper.addEventListener('scroll', _this.onWrapperScrolled);
|
|
61
67
|
_this.setState({
|
|
62
68
|
scrollLeft: tableWrapper.scrollLeft
|
|
@@ -64,6 +70,8 @@ var FloatingDeleteButton = /*#__PURE__*/function (_Component) {
|
|
|
64
70
|
} else {
|
|
65
71
|
if (_this.wrapper) {
|
|
66
72
|
// unsubscribe if we previously had one and it just went away
|
|
73
|
+
// Ignored via go/ees005
|
|
74
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
67
75
|
_this.wrapper.removeEventListener('scroll', _this.onWrapperScrolled);
|
|
68
76
|
|
|
69
77
|
// and reset scroll position
|
|
@@ -75,6 +83,8 @@ var FloatingDeleteButton = /*#__PURE__*/function (_Component) {
|
|
|
75
83
|
}
|
|
76
84
|
});
|
|
77
85
|
(0, _defineProperty2.default)(_this, "onWrapperScrolled", function (e) {
|
|
86
|
+
// Ignored via go/ees005
|
|
87
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
78
88
|
var wrapper = e.target;
|
|
79
89
|
_this.setState({
|
|
80
90
|
scrollLeft: wrapper.scrollLeft
|
|
@@ -87,10 +97,14 @@ var FloatingDeleteButton = /*#__PURE__*/function (_Component) {
|
|
|
87
97
|
switch (_this.state.selectionType) {
|
|
88
98
|
case 'row':
|
|
89
99
|
{
|
|
100
|
+
// Ignored via go/ees005
|
|
101
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
90
102
|
return (0, _commands.hoverRows)(_this.state.indexes, true)(state, dispatch, _this.props.editorView);
|
|
91
103
|
}
|
|
92
104
|
case 'column':
|
|
93
105
|
{
|
|
106
|
+
// Ignored via go/ees005
|
|
107
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
94
108
|
return (0, _commands.hoverColumns)(_this.state.indexes, true)(state, dispatch, _this.props.editorView);
|
|
95
109
|
}
|
|
96
110
|
}
|
|
@@ -165,6 +179,8 @@ var FloatingDeleteButton = /*#__PURE__*/function (_Component) {
|
|
|
165
179
|
key: "componentWillUnmount",
|
|
166
180
|
value: function componentWillUnmount() {
|
|
167
181
|
if (this.wrapper) {
|
|
182
|
+
// Ignored via go/ees005
|
|
183
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
168
184
|
this.wrapper.removeEventListener('scroll', this.onWrapperScrolled);
|
|
169
185
|
}
|
|
170
186
|
}
|
|
@@ -196,6 +212,8 @@ var FloatingDeleteButton = /*#__PURE__*/function (_Component) {
|
|
|
196
212
|
if (this.state.position === 'sticky' && mountTo) {
|
|
197
213
|
var headerRow = tableRef.querySelector('tr.sticky');
|
|
198
214
|
if (headerRow) {
|
|
215
|
+
// Ignored via go/ees005
|
|
216
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
199
217
|
var rect = headerRow.getBoundingClientRect();
|
|
200
218
|
var calculatePosition = popupOpts.onPositionCalculated || function (pos) {
|
|
201
219
|
return pos;
|
|
@@ -227,6 +245,8 @@ var FloatingDeleteButton = /*#__PURE__*/function (_Component) {
|
|
|
227
245
|
scrollableElement: this.wrapper || undefined,
|
|
228
246
|
forcePlacement: true,
|
|
229
247
|
allowOutOfBounds: true
|
|
248
|
+
// Ignored via go/ees005
|
|
249
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
230
250
|
}, popupOpts), button);
|
|
231
251
|
}
|
|
232
252
|
}], [{
|
|
@@ -253,10 +273,12 @@ var FloatingDeleteButton = /*#__PURE__*/function (_Component) {
|
|
|
253
273
|
case 'column':
|
|
254
274
|
{
|
|
255
275
|
// Calculate the button position and indexes for columns
|
|
256
|
-
var columnsWidths = (0,
|
|
257
|
-
var deleteBtnParams = (0,
|
|
276
|
+
var columnsWidths = (0, _columnControls.getColumnsWidths)(nextProps.editorView);
|
|
277
|
+
var deleteBtnParams = (0, _columnControls.getColumnDeleteButtonParams)(columnsWidths, nextProps.editorView.state.selection);
|
|
258
278
|
if (deleteBtnParams) {
|
|
259
279
|
return _objectSpread(_objectSpread({}, deleteBtnParams), {}, {
|
|
280
|
+
// Ignored via go/ees005
|
|
281
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
260
282
|
top: inStickyMode ? nextProps.stickyHeaders.top : 0,
|
|
261
283
|
position: inStickyMode ? 'sticky' : undefined,
|
|
262
284
|
selectionType: selectionType
|
|
@@ -268,9 +290,9 @@ var FloatingDeleteButton = /*#__PURE__*/function (_Component) {
|
|
|
268
290
|
{
|
|
269
291
|
// Calculate the button position and indexes for rows
|
|
270
292
|
if (nextProps.tableRef) {
|
|
271
|
-
var rowHeights = (0,
|
|
293
|
+
var rowHeights = (0, _rowControls.getRowHeights)(nextProps.tableRef);
|
|
272
294
|
var offsetTop = inStickyMode ? -rowHeights[0] : 0;
|
|
273
|
-
var _deleteBtnParams = (0,
|
|
295
|
+
var _deleteBtnParams = (0, _rowControls.getRowDeleteButtonParams)(rowHeights, nextProps.editorView.state.selection, shouldStickyButton ? stickyTop : offsetTop);
|
|
274
296
|
if (_deleteBtnParams) {
|
|
275
297
|
return _objectSpread(_objectSpread({}, _deleteBtnParams), {}, {
|
|
276
298
|
position: shouldStickyButton ? 'sticky' : undefined,
|
|
@@ -31,8 +31,9 @@ var _commandsWithAnalytics = require("../../pm-plugins/commands/commands-with-an
|
|
|
31
31
|
var _commands2 = require("../../pm-plugins/drag-and-drop/commands");
|
|
32
32
|
var _pluginFactory = require("../../pm-plugins/drag-and-drop/plugin-factory");
|
|
33
33
|
var _pluginFactory2 = require("../../pm-plugins/plugin-factory");
|
|
34
|
-
var _utils3 = require("../../pm-plugins/utils");
|
|
35
34
|
var _dragMenu = require("../../pm-plugins/utils/drag-menu");
|
|
35
|
+
var _nodes = require("../../pm-plugins/utils/nodes");
|
|
36
|
+
var _selection = require("../../pm-plugins/utils/selection");
|
|
36
37
|
var _types = require("../../types");
|
|
37
38
|
var _consts = require("../consts");
|
|
38
39
|
var _DropdownMenu = require("./DropdownMenu");
|
|
@@ -226,7 +227,10 @@ var DragMenu = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
226
227
|
setIsSubmenuOpen = _useState2[1];
|
|
227
228
|
var _getPluginState = (0, _pluginFactory.getPluginState)(state),
|
|
228
229
|
isKeyboardModeActive = _getPluginState.isKeyboardModeActive;
|
|
229
|
-
var selectionRect = (0, _utils2.isSelectionType)(selection, 'cell') ?
|
|
230
|
+
var selectionRect = (0, _utils2.isSelectionType)(selection, 'cell') ?
|
|
231
|
+
// Ignored via go/ees005
|
|
232
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
233
|
+
(0, _utils2.getSelectionRect)(selection) : (0, _utils2.findCellRectClosestToPos)(selection.$from);
|
|
230
234
|
var hasMergedCellsInTable = (_tableMap$hasMergedCe = tableMap === null || tableMap === void 0 ? void 0 : tableMap.hasMergedCells()) !== null && _tableMap$hasMergedCe !== void 0 ? _tableMap$hasMergedCe : false;
|
|
231
235
|
var allowBackgroundColor = (_pluginConfig$allowBa = pluginConfig === null || pluginConfig === void 0 ? void 0 : pluginConfig.allowBackgroundColor) !== null && _pluginConfig$allowBa !== void 0 ? _pluginConfig$allowBa : false;
|
|
232
236
|
var dragMenuConfig = (0, _dragMenu.getDragMenuConfig)(direction, getEditorContainerWidth, hasMergedCellsInTable, editorView, api, tableMap, index, targetCellPosition, selectionRect, editorAnalyticsAPI, pluginConfig === null || pluginConfig === void 0 ? void 0 : pluginConfig.isHeaderRowRequired, isTableScalingEnabled, isTableFixedColumnWidthsOptionEnabled, shouldUseIncreasedScalingPercent, ariaNotifyPlugin, isCommentEditor);
|
|
@@ -234,7 +238,10 @@ var DragMenu = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
234
238
|
menuItems = _convertToDropdownIte.menuItems,
|
|
235
239
|
menuCallback = _convertToDropdownIte.menuCallback;
|
|
236
240
|
var handleSubMenuRef = function handleSubMenuRef(ref) {
|
|
237
|
-
var parent = (0, _utils.closestElement)(
|
|
241
|
+
var parent = (0, _utils.closestElement)(
|
|
242
|
+
// Ignored via go/ees005
|
|
243
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
244
|
+
editorView.dom, '.fabric-editor-popup-scroll-parent');
|
|
238
245
|
if (!(parent && ref)) {
|
|
239
246
|
return;
|
|
240
247
|
}
|
|
@@ -301,6 +308,8 @@ var DragMenu = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
301
308
|
bubbles: true
|
|
302
309
|
});
|
|
303
310
|
setIsSubmenuOpen(false);
|
|
311
|
+
// Ignored via go/ees005
|
|
312
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
304
313
|
target === null || target === void 0 || target.focus();
|
|
305
314
|
target === null || target === void 0 || target.dispatchEvent(keyboardEvent);
|
|
306
315
|
},
|
|
@@ -343,7 +352,7 @@ var DragMenu = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
343
352
|
}, (0, _react2.jsx)(_toggle.default, {
|
|
344
353
|
id: "toggle-header-column",
|
|
345
354
|
onChange: toggleHeaderColumn,
|
|
346
|
-
isChecked: (0,
|
|
355
|
+
isChecked: (0, _nodes.checkIfHeaderColumnEnabled)(selection)
|
|
347
356
|
}))
|
|
348
357
|
} : {
|
|
349
358
|
key: 'header_row',
|
|
@@ -358,7 +367,7 @@ var DragMenu = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
358
367
|
}, (0, _react2.jsx)(_toggle.default, {
|
|
359
368
|
id: "toggle-header-row",
|
|
360
369
|
onChange: toggleHeaderRow,
|
|
361
|
-
isChecked: (0,
|
|
370
|
+
isChecked: (0, _nodes.checkIfHeaderRowEnabled)(selection)
|
|
362
371
|
}))
|
|
363
372
|
};
|
|
364
373
|
};
|
|
@@ -376,7 +385,7 @@ var DragMenu = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
376
385
|
}, (0, _react2.jsx)(_toggle.default, {
|
|
377
386
|
id: "toggle-row-numbers",
|
|
378
387
|
onChange: toggleRowNumbers,
|
|
379
|
-
isChecked: (0,
|
|
388
|
+
isChecked: (0, _nodes.checkIfNumberColumnEnabled)(selection)
|
|
380
389
|
}))
|
|
381
390
|
};
|
|
382
391
|
};
|
|
@@ -451,8 +460,11 @@ var DragMenu = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
451
460
|
if (!((_item$value$name = item.value.name) !== null && _item$value$name !== void 0 && _item$value$name.startsWith('delete'))) {
|
|
452
461
|
return;
|
|
453
462
|
}
|
|
454
|
-
(item.value.name === 'delete_column' ? (0, _commands.hoverColumns)((0,
|
|
463
|
+
(item.value.name === 'delete_column' ? (0, _commands.hoverColumns)((0, _selection.getSelectedColumnIndexes)(selectionRect), true) : (0, _commands.hoverRows)((0, _selection.getSelectedRowIndexes)(selectionRect), true))(state, dispatch);
|
|
455
464
|
};
|
|
465
|
+
|
|
466
|
+
// Ignored via go/ees005
|
|
467
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
456
468
|
var handleItemMouseLeave = function handleItemMouseLeave(_ref4) {
|
|
457
469
|
var item = _ref4.item;
|
|
458
470
|
if (item.value.name === 'background' && isSubmenuOpen) {
|
|
@@ -21,6 +21,8 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
21
21
|
|
|
22
22
|
var DropListWithOutsideClickTargetRef = function DropListWithOutsideClickTargetRef(props) {
|
|
23
23
|
var setOutsideClickTargetRef = _react.default.useContext(_uiReact.OutsideClickTargetRefContext);
|
|
24
|
+
// Ignored via go/ees005
|
|
25
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
24
26
|
return /*#__PURE__*/_react.default.createElement(_ui.DropList, (0, _extends2.default)({
|
|
25
27
|
onDroplistRef: setOutsideClickTargetRef
|
|
26
28
|
}, props));
|
|
@@ -85,7 +87,10 @@ var DropdownMenu = exports.DropdownMenu = function DropdownMenu(_ref) {
|
|
|
85
87
|
}, items.map(function (group, index) {
|
|
86
88
|
return /*#__PURE__*/_react.default.createElement(_menu.Section, {
|
|
87
89
|
hasSeparator: (section === null || section === void 0 ? void 0 : section.hasSeparator) && index > 0,
|
|
88
|
-
title: section === null || section === void 0 ? void 0 : section.title
|
|
90
|
+
title: section === null || section === void 0 ? void 0 : section.title
|
|
91
|
+
// Ignored via go/ees005
|
|
92
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
93
|
+
,
|
|
89
94
|
key: index
|
|
90
95
|
}, group.items.map(function (item) {
|
|
91
96
|
var _item$key;
|
|
@@ -108,7 +113,10 @@ var DropdownMenu = exports.DropdownMenu = function DropdownMenu(_ref) {
|
|
|
108
113
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
109
114
|
className: "drag-dropdown-menu-popup-ref",
|
|
110
115
|
ref: handleRef
|
|
111
|
-
}), /*#__PURE__*/_react.default.createElement(_ui.Popup
|
|
116
|
+
}), /*#__PURE__*/_react.default.createElement(_ui.Popup
|
|
117
|
+
// Ignored via go/ees005
|
|
118
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
119
|
+
, {
|
|
112
120
|
target: targetRefDiv,
|
|
113
121
|
mountTo: mountPoint,
|
|
114
122
|
boundariesElement: boundariesElement,
|
|
@@ -140,6 +148,9 @@ var DropdownMenu = exports.DropdownMenu = function DropdownMenu(_ref) {
|
|
|
140
148
|
// the correct menu item is sent in onItemActivated callback
|
|
141
149
|
var keys = ['row_numbers', 'header_row', 'header_column'];
|
|
142
150
|
var doubleItemCount = 0;
|
|
151
|
+
|
|
152
|
+
// Ignored via go/ees005
|
|
153
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
143
154
|
var firstIndex = results.findIndex(function (value) {
|
|
144
155
|
return keys.includes(value.key);
|
|
145
156
|
});
|
|
@@ -150,6 +161,8 @@ var DropdownMenu = exports.DropdownMenu = function DropdownMenu(_ref) {
|
|
|
150
161
|
return;
|
|
151
162
|
}
|
|
152
163
|
for (var i = firstIndex; i < results.length; i += 1) {
|
|
164
|
+
// Ignored via go/ees005
|
|
165
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
153
166
|
if (keys.includes(results[i].key)) {
|
|
154
167
|
doubleItemCount += 1;
|
|
155
168
|
}
|
|
@@ -46,7 +46,10 @@ var FloatingDragMenu = function FloatingDragMenu(_ref) {
|
|
|
46
46
|
var shouldUseIncreasedScalingPercent = isTableScalingEnabled && (tableWithFixedColumnWidthsOption || isCommentEditor);
|
|
47
47
|
return /*#__PURE__*/_react.default.createElement(_ui.Popup, {
|
|
48
48
|
alignX: direction === 'row' ? 'right' : undefined,
|
|
49
|
-
alignY: direction === 'row' ? 'start' : undefined
|
|
49
|
+
alignY: direction === 'row' ? 'start' : undefined
|
|
50
|
+
// Ignored via go/ees005
|
|
51
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
52
|
+
,
|
|
50
53
|
target: targetHandleRef,
|
|
51
54
|
mountTo: mountPoint,
|
|
52
55
|
boundariesElement: boundariesElement,
|
|
@@ -49,7 +49,11 @@ var getInsertLineWidth = function getInsertLineWidth(tableRef, isDragAndDropEnab
|
|
|
49
49
|
var DRAG_LINE_OFFSET = isChromelessEditor ? 14 : 6;
|
|
50
50
|
var parentElement = tableRef.parentElement,
|
|
51
51
|
offsetWidth = tableRef.offsetWidth;
|
|
52
|
+
// Ignored via go/ees005
|
|
53
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
52
54
|
var parentOffsetWidth = parentElement.offsetWidth;
|
|
55
|
+
// Ignored via go/ees005
|
|
56
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
53
57
|
var _ref = parentElement,
|
|
54
58
|
scrollLeft = _ref.scrollLeft;
|
|
55
59
|
var diff = offsetWidth - parentOffsetWidth;
|
|
@@ -39,6 +39,9 @@ function getRowOptions(index, isDragAndDropEnabled) {
|
|
|
39
39
|
}
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
|
+
|
|
43
|
+
// Ignored via go/ees005
|
|
44
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
42
45
|
function getColumnOptions(index, tableContainer, hasNumberedColumns, isDragAndDropEnabled) {
|
|
43
46
|
var options = {
|
|
44
47
|
alignX: 'end',
|
|
@@ -79,6 +82,9 @@ function getColumnOptions(index, tableContainer, hasNumberedColumns, isDragAndDr
|
|
|
79
82
|
}
|
|
80
83
|
return options;
|
|
81
84
|
}
|
|
85
|
+
|
|
86
|
+
// Ignored via go/ees005
|
|
87
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
82
88
|
function getPopupOptions(direction, index, hasNumberedColumns, isDragAndDropEnabled, tableContainer) {
|
|
83
89
|
switch (direction) {
|
|
84
90
|
case 'column':
|
|
@@ -24,7 +24,7 @@ var _cellSelection = require("@atlaskit/editor-tables/cell-selection");
|
|
|
24
24
|
var _tableMap = require("@atlaskit/editor-tables/table-map");
|
|
25
25
|
var _utils3 = require("@atlaskit/editor-tables/utils");
|
|
26
26
|
var _commandsWithAnalytics = require("../../pm-plugins/commands/commands-with-analytics");
|
|
27
|
-
var
|
|
27
|
+
var _nodes = require("../../pm-plugins/utils/nodes");
|
|
28
28
|
var _types = require("../../types");
|
|
29
29
|
var _getPopupOptions = _interopRequireDefault(require("./getPopupOptions"));
|
|
30
30
|
var _InsertButton = _interopRequireWildcard(require("./InsertButton"));
|
|
@@ -32,6 +32,8 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
32
32
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
33
33
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
34
34
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
35
|
+
// Ignored via go/ees005
|
|
36
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components, @typescript-eslint/no-explicit-any
|
|
35
37
|
var FloatingInsertButton = exports.FloatingInsertButton = /*#__PURE__*/function (_React$Component) {
|
|
36
38
|
function FloatingInsertButton(props) {
|
|
37
39
|
var _this;
|
|
@@ -106,6 +108,8 @@ var FloatingInsertButton = exports.FloatingInsertButton = /*#__PURE__*/function
|
|
|
106
108
|
selection: editorView.state.selection.toJSON(),
|
|
107
109
|
position: pos,
|
|
108
110
|
docSize: editorView.state.doc.nodeSize,
|
|
111
|
+
// Ignored via go/ees005
|
|
112
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
109
113
|
error: error === null || error === void 0 ? void 0 : error.toString()
|
|
110
114
|
}
|
|
111
115
|
};
|
|
@@ -121,8 +125,11 @@ var FloatingInsertButton = exports.FloatingInsertButton = /*#__PURE__*/function
|
|
|
121
125
|
}
|
|
122
126
|
var tableContainerWrapper = (0, _utils.closestElement)(targetCellRef, ".".concat(_types.TableCssClassName.TABLE_CONTAINER));
|
|
123
127
|
var tableWrapper = (0, _utils.closestElement)(targetCellRef, ".".concat(_types.TableCssClassName.TABLE_NODE_WRAPPER));
|
|
128
|
+
|
|
129
|
+
// Ignored via go/ees005
|
|
130
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
124
131
|
var index = type === 'column' ? insertColumnButtonIndex : insertRowButtonIndex;
|
|
125
|
-
var hasNumberedColumns = (0,
|
|
132
|
+
var hasNumberedColumns = (0, _nodes.checkIfNumberColumnEnabled)(editorView.state.selection);
|
|
126
133
|
|
|
127
134
|
// ED-19336: Fixed the 'add column button' not visible issue when sticky header is enabled
|
|
128
135
|
// By setting the Popup z-index higher than the sticky header z-index ( common-styles.ts tr.sticky)
|
|
@@ -132,10 +139,15 @@ var FloatingInsertButton = exports.FloatingInsertButton = /*#__PURE__*/function
|
|
|
132
139
|
return /*#__PURE__*/_react.default.createElement(_ui.Popup, (0, _extends2.default)({
|
|
133
140
|
target: targetCellRef,
|
|
134
141
|
mountTo: tableContainerWrapper || mountPoint,
|
|
135
|
-
boundariesElement: tableContainerWrapper || boundariesElement
|
|
142
|
+
boundariesElement: tableContainerWrapper || boundariesElement
|
|
143
|
+
// Ignored via go/ees005
|
|
144
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
145
|
+
,
|
|
136
146
|
scrollableElement: tableWrapper,
|
|
137
147
|
forcePlacement: true,
|
|
138
148
|
allowOutOfBounds: true
|
|
149
|
+
// Ignored via go/ees005
|
|
150
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
139
151
|
}, (0, _getPopupOptions.default)(type, index, hasNumberedColumns, !!isDragAndDropEnabled, tableContainerWrapper), {
|
|
140
152
|
zIndex: zIndex
|
|
141
153
|
}), isDragAndDropEnabled ? /*#__PURE__*/_react.default.createElement(_InsertButton.DragAndDropInsertButton, {
|
|
@@ -157,18 +169,30 @@ var FloatingInsertButton = exports.FloatingInsertButton = /*#__PURE__*/function
|
|
|
157
169
|
var _this$props2 = this.props,
|
|
158
170
|
insertColumnButtonIndex = _this$props2.insertColumnButtonIndex,
|
|
159
171
|
insertRowButtonIndex = _this$props2.insertRowButtonIndex;
|
|
172
|
+
// Ignored via go/ees005
|
|
173
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
160
174
|
var tableMap = _tableMap.TableMap.get(tableNode);
|
|
161
175
|
if (type === 'column') {
|
|
176
|
+
// Ignored via go/ees005
|
|
177
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
162
178
|
var columnIndex = insertColumnButtonIndex === 0 ? 0 : insertColumnButtonIndex - 1;
|
|
163
179
|
if (columnIndex > tableMap.width - 1) {
|
|
164
180
|
return null;
|
|
165
181
|
}
|
|
182
|
+
|
|
183
|
+
// Ignored via go/ees005
|
|
184
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
166
185
|
return tableMap.positionAt(0, columnIndex, tableNode);
|
|
167
186
|
} else {
|
|
187
|
+
// Ignored via go/ees005
|
|
188
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
168
189
|
var rowIndex = insertRowButtonIndex === 0 ? 0 : insertRowButtonIndex - 1;
|
|
169
190
|
if (rowIndex > tableMap.height - 1) {
|
|
170
191
|
return null;
|
|
171
192
|
}
|
|
193
|
+
|
|
194
|
+
// Ignored via go/ees005
|
|
195
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
172
196
|
return tableMap.positionAt(rowIndex, 0, tableNode);
|
|
173
197
|
}
|
|
174
198
|
}
|
|
@@ -14,7 +14,8 @@ var _utils = require("@atlaskit/editor-tables/utils");
|
|
|
14
14
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
15
|
var _commands = require("../../../pm-plugins/commands");
|
|
16
16
|
var _commands2 = require("../../../pm-plugins/drag-and-drop/commands");
|
|
17
|
-
var
|
|
17
|
+
var _rowControls = require("../../../pm-plugins/utils/row-controls");
|
|
18
|
+
var _selection = require("../../../pm-plugins/utils/selection");
|
|
18
19
|
var _types = require("../../../types");
|
|
19
20
|
var _DragHandle = require("../../DragHandle");
|
|
20
21
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
@@ -27,7 +28,7 @@ var getSelectedColumns = function getSelectedColumns(selection) {
|
|
|
27
28
|
if (!rect) {
|
|
28
29
|
return [];
|
|
29
30
|
}
|
|
30
|
-
return (0,
|
|
31
|
+
return (0, _selection.getSelectedColumnIndexes)(rect);
|
|
31
32
|
}
|
|
32
33
|
return [];
|
|
33
34
|
};
|
|
@@ -60,7 +61,7 @@ var ColumnControls = exports.ColumnControls = function ColumnControls(_ref) {
|
|
|
60
61
|
);
|
|
61
62
|
}).join(' ')) !== null && _colWidths$map$join !== void 0 ? _colWidths$map$join : '0px';
|
|
62
63
|
// TODO: reusing getRowsParams here because it's generic enough to work for columns -> rename
|
|
63
|
-
var columnParams = (0,
|
|
64
|
+
var columnParams = (0, _rowControls.getRowsParams)(colWidths !== null && colWidths !== void 0 ? colWidths : []);
|
|
64
65
|
var colIndex = hoveredCell === null || hoveredCell === void 0 ? void 0 : hoveredCell.colIndex;
|
|
65
66
|
var selectedColIndexes = getSelectedColumns((selectionState === null || selectionState === void 0 ? void 0 : selectionState.selection) || editorView.state.selection);
|
|
66
67
|
var firstRow = tableRef.querySelector('tr');
|
|
@@ -70,17 +71,27 @@ var ColumnControls = exports.ColumnControls = function ColumnControls(_ref) {
|
|
|
70
71
|
var handleClick = (0, _react.useCallback)(function (event) {
|
|
71
72
|
var state = editorView.state,
|
|
72
73
|
dispatch = editorView.dispatch;
|
|
73
|
-
var isClickOutsideSelectedCols =
|
|
74
|
+
var isClickOutsideSelectedCols =
|
|
75
|
+
// Ignored via go/ees005
|
|
76
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
77
|
+
selectedColIndexes.length >= 1 && !selectedColIndexes.includes(colIndex);
|
|
74
78
|
if (!selectedColIndexes || selectedColIndexes.length === 0 || isClickOutsideSelectedCols) {
|
|
79
|
+
// Ignored via go/ees005
|
|
80
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
75
81
|
(0, _commands.selectColumn)(colIndex, event.shiftKey)(state, dispatch);
|
|
76
82
|
}
|
|
77
|
-
if (selectedColIndexes.length > 1 &&
|
|
83
|
+
if (selectedColIndexes.length > 1 &&
|
|
84
|
+
// Ignored via go/ees005
|
|
85
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
86
|
+
selectedColIndexes.includes(colIndex) && !event.shiftKey) {
|
|
78
87
|
(0, _commands.selectColumns)(selectedColIndexes)(state, dispatch);
|
|
79
88
|
}
|
|
80
89
|
}, [colIndex, selectedColIndexes, editorView]);
|
|
81
90
|
var handleMouseOver = (0, _react.useCallback)(function () {
|
|
82
91
|
var state = editorView.state,
|
|
83
92
|
dispatch = editorView.dispatch;
|
|
93
|
+
// Ignored via go/ees005
|
|
94
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
84
95
|
(0, _commands.hoverColumns)([colIndex])(state, dispatch);
|
|
85
96
|
}, [colIndex, editorView]);
|
|
86
97
|
var handleMouseMove = (0, _react.useCallback)(function (e) {
|
|
@@ -119,13 +130,18 @@ var ColumnControls = exports.ColumnControls = function ColumnControls(_ref) {
|
|
|
119
130
|
(0, _commands2.toggleDragMenu)(undefined, 'column', colIndex, trigger)(state, dispatch);
|
|
120
131
|
}, [editorView, colIndex]);
|
|
121
132
|
var colIndexes = (0, _react.useMemo)(function () {
|
|
133
|
+
// Ignored via go/ees005
|
|
134
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
122
135
|
return [colIndex];
|
|
123
136
|
}, [colIndex]);
|
|
124
137
|
if (stickyTop && columnControlsRef.current) {
|
|
125
138
|
var _getScrollOffset;
|
|
126
139
|
columnControlsRef.current.scrollLeft = (_getScrollOffset = getScrollOffset === null || getScrollOffset === void 0 ? void 0 : getScrollOffset()) !== null && _getScrollOffset !== void 0 ? _getScrollOffset : 0;
|
|
127
140
|
}
|
|
128
|
-
var generateHandleByType = function generateHandleByType(type, appearance, gridColumn, indexes
|
|
141
|
+
var generateHandleByType = function generateHandleByType(type, appearance, gridColumn, indexes
|
|
142
|
+
// Ignored via go/ees005
|
|
143
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
144
|
+
) {
|
|
129
145
|
var _rowHeights$reduce, _colWidths$reduce;
|
|
130
146
|
var isHover = type === 'hover';
|
|
131
147
|
var isPlaceholder = appearance === 'placeholder';
|
|
@@ -192,7 +208,10 @@ var ColumnControls = exports.ColumnControls = function ColumnControls(_ref) {
|
|
|
192
208
|
// always position placeholder in first column to avoid overflow issues
|
|
193
209
|
selectedAppearance === 'placeholder' ? '1 / span 1' : "".concat(selectedColIndexes[0] + 1, " / span ").concat(selectedColIndexes.length), selectedColIndexes));
|
|
194
210
|
if (hoveredCell && isTableHovered && colIndex !== undefined && !selectedColIndexes.includes(colIndex)) {
|
|
195
|
-
handles.push(
|
|
211
|
+
handles.push(
|
|
212
|
+
// Ignored via go/ees005
|
|
213
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
214
|
+
generateHandleByType('hover', 'default', "".concat(colIndex + 1, " / span 1"), colIndexes));
|
|
196
215
|
}
|
|
197
216
|
return handles;
|
|
198
217
|
};
|
|
@@ -232,7 +251,10 @@ var ColumnControls = exports.ColumnControls = function ColumnControls(_ref) {
|
|
|
232
251
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
233
252
|
,
|
|
234
253
|
className: _types.TableCssClassName.DRAG_COLUMN_FLOATING_INSERT_DOT_WRAPPER,
|
|
235
|
-
contentEditable: false
|
|
254
|
+
contentEditable: false
|
|
255
|
+
// Ignored via go/ees005
|
|
256
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
257
|
+
,
|
|
236
258
|
key: index
|
|
237
259
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
238
260
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
@@ -36,7 +36,10 @@ var ColumnDropTargets = exports.ColumnDropTargets = function ColumnDropTargets(_
|
|
|
36
36
|
className: _types.TableCssClassName.DRAG_COLUMN_CONTROLS_INNER,
|
|
37
37
|
"data-testid": "table-floating-column-controls-drop-targets"
|
|
38
38
|
}, colWidths === null || colWidths === void 0 ? void 0 : colWidths.map(function (width, index) {
|
|
39
|
-
return /*#__PURE__*/_react.default.createElement(_ColumnDropTarget.ColumnDropTarget
|
|
39
|
+
return /*#__PURE__*/_react.default.createElement(_ColumnDropTarget.ColumnDropTarget
|
|
40
|
+
// Ignored via go/ees005
|
|
41
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
42
|
+
, {
|
|
40
43
|
key: index,
|
|
41
44
|
index: index,
|
|
42
45
|
localId: localId,
|
|
@@ -11,7 +11,9 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
11
11
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
12
|
var _adapter = require("@atlaskit/pragmatic-drag-and-drop/element/adapter");
|
|
13
13
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
14
|
-
var
|
|
14
|
+
var _columnControls = require("../../pm-plugins/utils/column-controls");
|
|
15
|
+
var _nodes = require("../../pm-plugins/utils/nodes");
|
|
16
|
+
var _rowControls = require("../../pm-plugins/utils/row-controls");
|
|
15
17
|
var _types = require("../../types");
|
|
16
18
|
var _ColumnControls = require("./ColumnControls");
|
|
17
19
|
var _ColumnDropTargets = require("./ColumnDropTargets");
|
|
@@ -42,7 +44,7 @@ var TableFloatingColumnControls = function TableFloatingColumnControls(_ref) {
|
|
|
42
44
|
var containerRef = (0, _react.useRef)(null);
|
|
43
45
|
var node = getNode();
|
|
44
46
|
var currentNodeLocalId = node === null || node === void 0 ? void 0 : node.attrs.localId;
|
|
45
|
-
var hasHeaderColumn = (0,
|
|
47
|
+
var hasHeaderColumn = (0, _nodes.containsHeaderColumn)(node);
|
|
46
48
|
var stickyTop = stickyHeader && stickyHeader.sticky && hasHeaderRow ? stickyHeader.top : undefined;
|
|
47
49
|
(0, _react.useEffect)(function () {
|
|
48
50
|
return (0, _adapter.monitorForElements)({
|
|
@@ -65,19 +67,21 @@ var TableFloatingColumnControls = function TableFloatingColumnControls(_ref) {
|
|
|
65
67
|
var rowHeights = (0, _react.useMemo)(function () {
|
|
66
68
|
// NOTE: we don't care so much as to what tableHeight is, we only care that it changed and is a sane value.
|
|
67
69
|
if (tableRef && !!tableWrapperHeight) {
|
|
68
|
-
return (0,
|
|
70
|
+
return (0, _rowControls.getRowHeights)(tableRef);
|
|
69
71
|
}
|
|
70
72
|
return [0];
|
|
71
73
|
}, [tableRef, tableWrapperHeight]);
|
|
72
74
|
if (!tableRef || !tableActive || isResizing) {
|
|
73
75
|
return null;
|
|
74
76
|
}
|
|
75
|
-
var colWidths = (0,
|
|
77
|
+
var colWidths = (0, _columnControls.getColumnsWidths)(editorView);
|
|
76
78
|
if (stickyTop) {
|
|
77
79
|
var _rowHeights$, _containerRef$current;
|
|
78
80
|
var columnControlTopOffsetFromParent = '-12px';
|
|
79
81
|
var headerRowHeight = hasHeaderRow && stickyTop !== undefined ? (_rowHeights$ = rowHeights === null || rowHeights === void 0 ? void 0 : rowHeights[0]) !== null && _rowHeights$ !== void 0 ? _rowHeights$ : 0 : 0;
|
|
80
|
-
containerRef === null || containerRef === void 0 || (_containerRef$current = containerRef.current) === null || _containerRef$current === void 0 || _containerRef$current.style.setProperty('top', (0, _platformFeatureFlags.fg)('platform_editor_breakout_use_css') ? columnControlTopOffsetFromParent :
|
|
82
|
+
containerRef === null || containerRef === void 0 || (_containerRef$current = containerRef.current) === null || _containerRef$current === void 0 || _containerRef$current.style.setProperty('top', (0, _platformFeatureFlags.fg)('platform_editor_breakout_use_css') ? columnControlTopOffsetFromParent : // Ignored via go/ees005
|
|
83
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
84
|
+
"".concat(stickyTop - headerRowHeight + 33, "px") // 33px is padding and margin applied on tr.sticky
|
|
81
85
|
);
|
|
82
86
|
} else {
|
|
83
87
|
var _containerRef$current2;
|
|
@@ -25,6 +25,8 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
25
25
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
26
26
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
27
27
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
28
|
+
// Ignored via go/ees005
|
|
29
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components, @typescript-eslint/no-explicit-any
|
|
28
30
|
var CornerControlComponent = /*#__PURE__*/function (_Component) {
|
|
29
31
|
function CornerControlComponent() {
|
|
30
32
|
var _this;
|
|
@@ -7,8 +7,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.FloatingControlsWithSelection = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
10
|
-
var
|
|
11
|
-
var
|
|
10
|
+
var _ClassicCornerControls = require("./CornerControls/ClassicCornerControls");
|
|
11
|
+
var _ClassicControls = require("./RowControls/ClassicControls");
|
|
12
12
|
var FloatingControlsWithSelection = exports.FloatingControlsWithSelection = function FloatingControlsWithSelection(_ref) {
|
|
13
13
|
var editorView = _ref.editorView,
|
|
14
14
|
tableRef = _ref.tableRef,
|
|
@@ -24,7 +24,7 @@ var FloatingControlsWithSelection = exports.FloatingControlsWithSelection = func
|
|
|
24
24
|
api = _ref.api;
|
|
25
25
|
var _useSharedPluginState = (0, _hooks.useSharedPluginState)(api, ['selection']),
|
|
26
26
|
selectionState = _useSharedPluginState.selectionState;
|
|
27
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(
|
|
27
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_ClassicCornerControls.CornerControls, {
|
|
28
28
|
editorView: editorView,
|
|
29
29
|
tableRef: tableRef,
|
|
30
30
|
isInDanger: isInDanger,
|
|
@@ -33,7 +33,7 @@ var FloatingControlsWithSelection = exports.FloatingControlsWithSelection = func
|
|
|
33
33
|
isHeaderColumnEnabled: isHeaderColumnEnabled,
|
|
34
34
|
hoveredRows: hoveredRows,
|
|
35
35
|
stickyTop: tableActive ? stickyTop : undefined
|
|
36
|
-
}), /*#__PURE__*/_react.default.createElement(
|
|
36
|
+
}), /*#__PURE__*/_react.default.createElement(_ClassicControls.RowControls, {
|
|
37
37
|
selection: selectionState === null || selectionState === void 0 ? void 0 : selectionState.selection,
|
|
38
38
|
editorView: editorView,
|
|
39
39
|
tableRef: tableRef,
|
|
@@ -18,13 +18,15 @@ var _state = require("@atlaskit/editor-prosemirror/state");
|
|
|
18
18
|
var _utils = require("@atlaskit/editor-tables/utils");
|
|
19
19
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
20
20
|
var _commands = require("../../../pm-plugins/commands");
|
|
21
|
-
var
|
|
21
|
+
var _rowControls = require("../../../pm-plugins/utils/row-controls");
|
|
22
22
|
var _types = require("../../../types");
|
|
23
23
|
var _consts = require("../../consts");
|
|
24
24
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
25
25
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
26
26
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
27
27
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
28
|
+
// Ignored via go/ees005
|
|
29
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components, @typescript-eslint/no-explicit-any
|
|
28
30
|
var NumberColumn = exports.default = /*#__PURE__*/function (_Component) {
|
|
29
31
|
function NumberColumn() {
|
|
30
32
|
var _this;
|
|
@@ -107,7 +109,7 @@ var NumberColumn = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
107
109
|
isDragAndDropEnabled = _this$props5.isDragAndDropEnabled,
|
|
108
110
|
tableActive = _this$props5.tableActive,
|
|
109
111
|
updateCellHoverLocation = _this$props5.updateCellHoverLocation;
|
|
110
|
-
var rowHeights = (0,
|
|
112
|
+
var rowHeights = (0, _rowControls.getRowHeights)(tableRef);
|
|
111
113
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
112
114
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
113
115
|
className: _types.TableCssClassName.NUMBERED_COLUMN,
|
|
@@ -124,6 +126,8 @@ var NumberColumn = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
124
126
|
/*#__PURE__*/
|
|
125
127
|
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
126
128
|
_react.default.createElement("div", {
|
|
129
|
+
// Ignored via go/ees005
|
|
130
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
127
131
|
key: "wrapper-".concat(index)
|
|
128
132
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
129
133
|
,
|
|
@@ -141,6 +145,8 @@ var NumberColumn = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
141
145
|
/*#__PURE__*/
|
|
142
146
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
143
147
|
_react.default.createElement("div", {
|
|
148
|
+
// Ignored via go/ees005
|
|
149
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
144
150
|
key: "wrapper-".concat(index)
|
|
145
151
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
146
152
|
,
|