@atlaskit/editor-plugin-table 8.4.11 → 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 +17 -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 +4 -4
- 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
|
@@ -2,7 +2,7 @@ import { Component } from 'react';
|
|
|
2
2
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
3
3
|
import type { Selection } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
5
|
-
import type { RowStickyState } from '../../pm-plugins/sticky-headers';
|
|
5
|
+
import type { RowStickyState } from '../../pm-plugins/sticky-headers/types';
|
|
6
6
|
import type { PluginInjectionAPI } from '../../types';
|
|
7
7
|
import type { CellSelectionType } from './types';
|
|
8
8
|
export interface Props {
|
|
@@ -4,7 +4,7 @@ import type { GetEditorContainerWidth, GetEditorFeatureFlags } from '@atlaskit/e
|
|
|
4
4
|
import type { AriaLiveElementAttributes } from '@atlaskit/editor-plugin-accessibility-utils';
|
|
5
5
|
import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
|
|
6
6
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
7
|
-
import type { RowStickyState } from '../../pm-plugins/sticky-headers';
|
|
7
|
+
import type { RowStickyState } from '../../pm-plugins/sticky-headers/types';
|
|
8
8
|
import type { PluginConfig, PluginInjectionAPI, TableDirection } from '../../types';
|
|
9
9
|
interface Props {
|
|
10
10
|
editorView: EditorView;
|
|
@@ -33,7 +33,7 @@ export declare const ColumnControls: ({ editorView, tableActive, tableRef, hover
|
|
|
33
33
|
dependencies: [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
|
|
34
34
|
pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
|
|
35
35
|
sharedState: {
|
|
36
|
-
createAnalyticsEvent: import("
|
|
36
|
+
createAnalyticsEvent: import("packages/analytics/analytics-next/dist/types").CreateUIAnalyticsEvent | null;
|
|
37
37
|
attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
|
|
38
38
|
performanceTracking: import("@atlaskit/editor-common/types").PerformanceTracking | undefined;
|
|
39
39
|
};
|
|
@@ -46,7 +46,7 @@ export declare const ColumnControls: ({ editorView, tableActive, tableRef, hover
|
|
|
46
46
|
dependencies: [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
|
|
47
47
|
pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
|
|
48
48
|
sharedState: {
|
|
49
|
-
createAnalyticsEvent: import("
|
|
49
|
+
createAnalyticsEvent: import("packages/analytics/analytics-next/dist/types").CreateUIAnalyticsEvent | null;
|
|
50
50
|
attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
|
|
51
51
|
performanceTracking: import("@atlaskit/editor-common/types").PerformanceTracking | undefined;
|
|
52
52
|
};
|
|
@@ -4,7 +4,7 @@ import type { GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
|
|
|
4
4
|
import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
|
|
5
5
|
import type { Selection } from '@atlaskit/editor-prosemirror/state';
|
|
6
6
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
7
|
-
import type { RowStickyState } from '../../pm-plugins/sticky-headers';
|
|
7
|
+
import type { RowStickyState } from '../../pm-plugins/sticky-headers/types';
|
|
8
8
|
import type { CellHoverMeta, PluginInjectionAPI } from '../../types';
|
|
9
9
|
interface Props {
|
|
10
10
|
editorView: EditorView;
|
|
@@ -14,7 +14,7 @@ export declare const DragCornerControlsWithSelection: React.FC<import("react-int
|
|
|
14
14
|
dependencies: [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
|
|
15
15
|
pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
|
|
16
16
|
sharedState: {
|
|
17
|
-
createAnalyticsEvent: import("
|
|
17
|
+
createAnalyticsEvent: import("packages/analytics/analytics-next/dist/types").CreateUIAnalyticsEvent | null;
|
|
18
18
|
attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
|
|
19
19
|
performanceTracking: import("@atlaskit/editor-common/types").PerformanceTracking | undefined;
|
|
20
20
|
};
|
|
@@ -27,7 +27,7 @@ export declare const DragCornerControlsWithSelection: React.FC<import("react-int
|
|
|
27
27
|
dependencies: [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
|
|
28
28
|
pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
|
|
29
29
|
sharedState: {
|
|
30
|
-
createAnalyticsEvent: import("
|
|
30
|
+
createAnalyticsEvent: import("packages/analytics/analytics-next/dist/types").CreateUIAnalyticsEvent | null;
|
|
31
31
|
attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
|
|
32
32
|
performanceTracking: import("@atlaskit/editor-common/types").PerformanceTracking | undefined;
|
|
33
33
|
};
|
|
@@ -100,7 +100,7 @@ export declare const DragCornerControlsWithSelection: React.FC<import("react-int
|
|
|
100
100
|
dependencies: [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
|
|
101
101
|
pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
|
|
102
102
|
sharedState: {
|
|
103
|
-
createAnalyticsEvent: import("
|
|
103
|
+
createAnalyticsEvent: import("packages/analytics/analytics-next/dist/types").CreateUIAnalyticsEvent | null;
|
|
104
104
|
attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
|
|
105
105
|
performanceTracking: import("@atlaskit/editor-common/types").PerformanceTracking | undefined;
|
|
106
106
|
};
|
|
@@ -113,7 +113,7 @@ export declare const DragCornerControlsWithSelection: React.FC<import("react-int
|
|
|
113
113
|
dependencies: [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
|
|
114
114
|
pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
|
|
115
115
|
sharedState: {
|
|
116
|
-
createAnalyticsEvent: import("
|
|
116
|
+
createAnalyticsEvent: import("packages/analytics/analytics-next/dist/types").CreateUIAnalyticsEvent | null;
|
|
117
117
|
attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
|
|
118
118
|
performanceTracking: import("@atlaskit/editor-common/types").PerformanceTracking | undefined;
|
|
119
119
|
};
|
|
@@ -4,7 +4,7 @@ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
|
4
4
|
import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
|
|
5
5
|
import type { Selection } from '@atlaskit/editor-prosemirror/state';
|
|
6
6
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
7
|
-
import type { RowStickyState } from '../../pm-plugins/sticky-headers';
|
|
7
|
+
import type { RowStickyState } from '../../pm-plugins/sticky-headers/types';
|
|
8
8
|
import type { TablePlugin } from '../../tablePluginType';
|
|
9
9
|
import type { CellHoverMeta } from '../../types';
|
|
10
10
|
interface TableFloatingControlsProps {
|
|
@@ -43,7 +43,7 @@ export declare const TableFloatingControls: ({ editorView, tableRef, tableNode,
|
|
|
43
43
|
dependencies: [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
|
|
44
44
|
pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
|
|
45
45
|
sharedState: {
|
|
46
|
-
createAnalyticsEvent: import("
|
|
46
|
+
createAnalyticsEvent: import("packages/analytics/analytics-next/dist/types").CreateUIAnalyticsEvent | null;
|
|
47
47
|
attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
|
|
48
48
|
performanceTracking: import("@atlaskit/editor-common/types").PerformanceTracking | undefined;
|
|
49
49
|
};
|
|
@@ -56,7 +56,7 @@ export declare const TableFloatingControls: ({ editorView, tableRef, tableNode,
|
|
|
56
56
|
dependencies: [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
|
|
57
57
|
pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
|
|
58
58
|
sharedState: {
|
|
59
|
-
createAnalyticsEvent: import("
|
|
59
|
+
createAnalyticsEvent: import("packages/analytics/analytics-next/dist/types").CreateUIAnalyticsEvent | null;
|
|
60
60
|
attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
|
|
61
61
|
performanceTracking: import("@atlaskit/editor-common/types").PerformanceTracking | undefined;
|
|
62
62
|
};
|
|
@@ -8,7 +8,7 @@ import type { NodeWithPos } from '@atlaskit/editor-prosemirror/utils';
|
|
|
8
8
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
9
9
|
import { type Rect } from '@atlaskit/editor-tables/table-map';
|
|
10
10
|
import type { AlignmentOptions, InsertRowMethods, InsertRowOptions, PluginInjectionAPI, RowInsertPosition } from '../../types';
|
|
11
|
-
import type { ResizeStateWithAnalytics } from '../table-resizing/utils';
|
|
11
|
+
import type { ResizeStateWithAnalytics } from '../table-resizing/utils/types';
|
|
12
12
|
export declare const emptyMultipleCellsWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (inputMethod: INPUT_METHOD.CONTEXT_MENU | INPUT_METHOD.KEYBOARD | INPUT_METHOD.FLOATING_TB | INPUT_METHOD.TABLE_CONTEXT_MENU, targetCellPosition?: number) => Command;
|
|
13
13
|
export declare const mergeCellsWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | null | undefined) => (inputMethod: INPUT_METHOD.CONTEXT_MENU | INPUT_METHOD.FLOATING_TB) => Command;
|
|
14
14
|
export declare const splitCellWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (inputMethod: INPUT_METHOD.CONTEXT_MENU | INPUT_METHOD.FLOATING_TB) => Command;
|
|
@@ -3,7 +3,7 @@ import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
|
3
3
|
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import type { ContentNodeWithPos } from '@atlaskit/editor-prosemirror/utils';
|
|
5
5
|
import type { PluginInjectionAPI } from '../../types';
|
|
6
|
-
import type { ResizeState } from './utils';
|
|
6
|
+
import type { ResizeState } from './utils/types';
|
|
7
7
|
export declare const evenColumns: ({ resizeState, table, start, event, api, }: {
|
|
8
8
|
api: PluginInjectionAPI | undefined | null;
|
|
9
9
|
resizeState: ResizeState;
|
|
@@ -3,7 +3,7 @@ import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
|
3
3
|
import type { ContentNodeWithPos } from '@atlaskit/editor-prosemirror/utils';
|
|
4
4
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
5
5
|
import type { PluginInjectionAPI } from '../../types';
|
|
6
|
-
import type { ResizeState } from '../table-resizing/utils';
|
|
6
|
+
import type { ResizeState } from '../table-resizing/utils/types';
|
|
7
7
|
/**
|
|
8
8
|
* Given a new ResizeState object, create a transaction that replaces and updates the table node based on new state.
|
|
9
9
|
* @param resizeState
|
|
@@ -4,7 +4,8 @@ import type { ReadonlyTransaction, Transaction } from '@atlaskit/editor-prosemir
|
|
|
4
4
|
interface IsTableCollapsibleResult {
|
|
5
5
|
tableIsCollapsible: boolean;
|
|
6
6
|
range?: NodeRange;
|
|
7
|
-
findWrappingRes?:
|
|
7
|
+
findWrappingRes?: // Ignored via go/ees005
|
|
8
|
+
Array<{
|
|
8
9
|
type: NodeType;
|
|
9
10
|
attrs?: {
|
|
10
11
|
[key: string]: any;
|
|
@@ -2,7 +2,7 @@ import { jsx } from '@emotion/react';
|
|
|
2
2
|
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
3
3
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
4
4
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
5
|
-
import type { RowStickyState } from '../../pm-plugins/sticky-headers';
|
|
5
|
+
import type { RowStickyState } from '../../pm-plugins/sticky-headers/types';
|
|
6
6
|
export interface Props {
|
|
7
7
|
editorView: EditorView;
|
|
8
8
|
tableWrapper?: HTMLElement;
|
|
@@ -2,7 +2,7 @@ import { Component } from 'react';
|
|
|
2
2
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
3
3
|
import type { Selection } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
5
|
-
import type { RowStickyState } from '../../pm-plugins/sticky-headers';
|
|
5
|
+
import type { RowStickyState } from '../../pm-plugins/sticky-headers/types';
|
|
6
6
|
import type { PluginInjectionAPI } from '../../types';
|
|
7
7
|
import type { CellSelectionType } from './types';
|
|
8
8
|
export interface Props {
|
|
@@ -4,7 +4,7 @@ import type { GetEditorContainerWidth, GetEditorFeatureFlags } from '@atlaskit/e
|
|
|
4
4
|
import type { AriaLiveElementAttributes } from '@atlaskit/editor-plugin-accessibility-utils';
|
|
5
5
|
import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
|
|
6
6
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
7
|
-
import type { RowStickyState } from '../../pm-plugins/sticky-headers';
|
|
7
|
+
import type { RowStickyState } from '../../pm-plugins/sticky-headers/types';
|
|
8
8
|
import type { PluginConfig, PluginInjectionAPI, TableDirection } from '../../types';
|
|
9
9
|
interface Props {
|
|
10
10
|
editorView: EditorView;
|
|
@@ -34,7 +34,7 @@ export declare const ColumnControls: ({ editorView, tableActive, tableRef, hover
|
|
|
34
34
|
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
|
|
35
35
|
pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
|
|
36
36
|
sharedState: {
|
|
37
|
-
createAnalyticsEvent: import("
|
|
37
|
+
createAnalyticsEvent: import("packages/analytics/analytics-next/dist/types").CreateUIAnalyticsEvent | null;
|
|
38
38
|
attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
|
|
39
39
|
performanceTracking: import("@atlaskit/editor-common/types").PerformanceTracking | undefined;
|
|
40
40
|
};
|
|
@@ -51,7 +51,7 @@ export declare const ColumnControls: ({ editorView, tableActive, tableRef, hover
|
|
|
51
51
|
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
|
|
52
52
|
pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
|
|
53
53
|
sharedState: {
|
|
54
|
-
createAnalyticsEvent: import("
|
|
54
|
+
createAnalyticsEvent: import("packages/analytics/analytics-next/dist/types").CreateUIAnalyticsEvent | null;
|
|
55
55
|
attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
|
|
56
56
|
performanceTracking: import("@atlaskit/editor-common/types").PerformanceTracking | undefined;
|
|
57
57
|
};
|
|
@@ -4,7 +4,7 @@ import type { GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
|
|
|
4
4
|
import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
|
|
5
5
|
import type { Selection } from '@atlaskit/editor-prosemirror/state';
|
|
6
6
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
7
|
-
import type { RowStickyState } from '../../pm-plugins/sticky-headers';
|
|
7
|
+
import type { RowStickyState } from '../../pm-plugins/sticky-headers/types';
|
|
8
8
|
import type { CellHoverMeta, PluginInjectionAPI } from '../../types';
|
|
9
9
|
interface Props {
|
|
10
10
|
editorView: EditorView;
|
|
@@ -15,7 +15,7 @@ export declare const DragCornerControlsWithSelection: React.FC<import("react-int
|
|
|
15
15
|
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
|
|
16
16
|
pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
|
|
17
17
|
sharedState: {
|
|
18
|
-
createAnalyticsEvent: import("
|
|
18
|
+
createAnalyticsEvent: import("packages/analytics/analytics-next/dist/types").CreateUIAnalyticsEvent | null;
|
|
19
19
|
attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
|
|
20
20
|
performanceTracking: import("@atlaskit/editor-common/types").PerformanceTracking | undefined;
|
|
21
21
|
};
|
|
@@ -32,7 +32,7 @@ export declare const DragCornerControlsWithSelection: React.FC<import("react-int
|
|
|
32
32
|
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
|
|
33
33
|
pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
|
|
34
34
|
sharedState: {
|
|
35
|
-
createAnalyticsEvent: import("
|
|
35
|
+
createAnalyticsEvent: import("packages/analytics/analytics-next/dist/types").CreateUIAnalyticsEvent | null;
|
|
36
36
|
attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
|
|
37
37
|
performanceTracking: import("@atlaskit/editor-common/types").PerformanceTracking | undefined;
|
|
38
38
|
};
|
|
@@ -122,7 +122,7 @@ export declare const DragCornerControlsWithSelection: React.FC<import("react-int
|
|
|
122
122
|
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
|
|
123
123
|
pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
|
|
124
124
|
sharedState: {
|
|
125
|
-
createAnalyticsEvent: import("
|
|
125
|
+
createAnalyticsEvent: import("packages/analytics/analytics-next/dist/types").CreateUIAnalyticsEvent | null;
|
|
126
126
|
attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
|
|
127
127
|
performanceTracking: import("@atlaskit/editor-common/types").PerformanceTracking | undefined;
|
|
128
128
|
};
|
|
@@ -139,7 +139,7 @@ export declare const DragCornerControlsWithSelection: React.FC<import("react-int
|
|
|
139
139
|
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
|
|
140
140
|
pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
|
|
141
141
|
sharedState: {
|
|
142
|
-
createAnalyticsEvent: import("
|
|
142
|
+
createAnalyticsEvent: import("packages/analytics/analytics-next/dist/types").CreateUIAnalyticsEvent | null;
|
|
143
143
|
attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
|
|
144
144
|
performanceTracking: import("@atlaskit/editor-common/types").PerformanceTracking | undefined;
|
|
145
145
|
};
|
|
@@ -4,7 +4,7 @@ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
|
4
4
|
import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
|
|
5
5
|
import type { Selection } from '@atlaskit/editor-prosemirror/state';
|
|
6
6
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
7
|
-
import type { RowStickyState } from '../../pm-plugins/sticky-headers';
|
|
7
|
+
import type { RowStickyState } from '../../pm-plugins/sticky-headers/types';
|
|
8
8
|
import type { TablePlugin } from '../../tablePluginType';
|
|
9
9
|
import type { CellHoverMeta } from '../../types';
|
|
10
10
|
interface TableFloatingControlsProps {
|
|
@@ -44,7 +44,7 @@ export declare const TableFloatingControls: ({ editorView, tableRef, tableNode,
|
|
|
44
44
|
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
|
|
45
45
|
pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
|
|
46
46
|
sharedState: {
|
|
47
|
-
createAnalyticsEvent: import("
|
|
47
|
+
createAnalyticsEvent: import("packages/analytics/analytics-next/dist/types").CreateUIAnalyticsEvent | null;
|
|
48
48
|
attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
|
|
49
49
|
performanceTracking: import("@atlaskit/editor-common/types").PerformanceTracking | undefined;
|
|
50
50
|
};
|
|
@@ -61,7 +61,7 @@ export declare const TableFloatingControls: ({ editorView, tableRef, tableNode,
|
|
|
61
61
|
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
|
|
62
62
|
pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
|
|
63
63
|
sharedState: {
|
|
64
|
-
createAnalyticsEvent: import("
|
|
64
|
+
createAnalyticsEvent: import("packages/analytics/analytics-next/dist/types").CreateUIAnalyticsEvent | null;
|
|
65
65
|
attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
|
|
66
66
|
performanceTracking: import("@atlaskit/editor-common/types").PerformanceTracking | undefined;
|
|
67
67
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-table",
|
|
3
|
-
"version": "8.4.
|
|
3
|
+
"version": "8.4.13",
|
|
4
4
|
"description": "Table plugin for the @atlaskit/editor",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -30,16 +30,16 @@
|
|
|
30
30
|
"@atlaskit/adf-schema": "^46.1.0",
|
|
31
31
|
"@atlaskit/button": "^20.3.0",
|
|
32
32
|
"@atlaskit/custom-steps": "^0.9.0",
|
|
33
|
-
"@atlaskit/editor-common": "^
|
|
33
|
+
"@atlaskit/editor-common": "^97.2.0",
|
|
34
34
|
"@atlaskit/editor-palette": "1.6.3",
|
|
35
35
|
"@atlaskit/editor-plugin-accessibility-utils": "^1.2.0",
|
|
36
36
|
"@atlaskit/editor-plugin-analytics": "^1.10.0",
|
|
37
|
-
"@atlaskit/editor-plugin-batch-attribute-updates": "1.1.
|
|
37
|
+
"@atlaskit/editor-plugin-batch-attribute-updates": "1.1.9",
|
|
38
38
|
"@atlaskit/editor-plugin-content-insertion": "^1.11.0",
|
|
39
39
|
"@atlaskit/editor-plugin-editor-viewmode": "^2.1.0",
|
|
40
40
|
"@atlaskit/editor-plugin-guideline": "^1.2.0",
|
|
41
41
|
"@atlaskit/editor-plugin-selection": "^1.6.0",
|
|
42
|
-
"@atlaskit/editor-plugin-width": "^
|
|
42
|
+
"@atlaskit/editor-plugin-width": "^2.0.0",
|
|
43
43
|
"@atlaskit/editor-prosemirror": "6.2.1",
|
|
44
44
|
"@atlaskit/editor-shared-styles": "^3.2.0",
|
|
45
45
|
"@atlaskit/editor-tables": "^2.8.0",
|
|
@@ -5,7 +5,7 @@ import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
|
5
5
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
6
|
import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
|
|
7
7
|
|
|
8
|
-
import { getColumnsWidths } from '../pm-plugins/utils';
|
|
8
|
+
import { getColumnsWidths } from '../pm-plugins/utils/column-controls';
|
|
9
9
|
import type { DraggableSourceData } from '../types';
|
|
10
10
|
import { dropTargetExtendedWidth, dropTargetsZIndex } from '../ui/consts';
|
|
11
11
|
import { ColumnDropTarget } from '../ui/TableFloatingColumnControls/ColumnDropTargets/ColumnDropTarget';
|
|
@@ -74,6 +74,8 @@ export const ExternalDropTargets = ({
|
|
|
74
74
|
{colWidths?.map((width, index) => {
|
|
75
75
|
return (
|
|
76
76
|
<ColumnDropTarget
|
|
77
|
+
// Ignored via go/ees005
|
|
78
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
77
79
|
key={index}
|
|
78
80
|
index={index}
|
|
79
81
|
localId={currentNodeLocalId}
|
|
@@ -30,11 +30,15 @@ function delayUntilIdle(cb: Function) {
|
|
|
30
30
|
return window.requestAnimationFrame(() => cb());
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
+
// Ignored via go/ees005
|
|
34
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
33
35
|
const cssVariablePattern = /^VAR\(--.*\)$/;
|
|
34
36
|
|
|
35
37
|
export default class TableCell extends TableNodeView<HTMLElement> implements NodeView {
|
|
36
38
|
private delayHandle: number | undefined;
|
|
37
39
|
|
|
40
|
+
// Ignored via go/ees005
|
|
41
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
38
42
|
constructor(
|
|
39
43
|
node: PMNode,
|
|
40
44
|
view: EditorView,
|
|
@@ -30,41 +30,38 @@ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
|
30
30
|
import { token } from '@atlaskit/tokens';
|
|
31
31
|
|
|
32
32
|
import { autoSizeTable, clearHoverSelection } from '../pm-plugins/commands';
|
|
33
|
-
import { autoScrollerFactory } from '../pm-plugins/drag-and-drop/utils';
|
|
33
|
+
import { autoScrollerFactory } from '../pm-plugins/drag-and-drop/utils/autoscrollers';
|
|
34
34
|
import { getPluginState } from '../pm-plugins/plugin-factory';
|
|
35
|
-
import
|
|
36
|
-
import {
|
|
37
|
-
|
|
38
|
-
pluginKey as stickyHeadersPluginKey,
|
|
39
|
-
} from '../pm-plugins/sticky-headers';
|
|
35
|
+
import { pluginKey as stickyHeadersPluginKey } from '../pm-plugins/sticky-headers/plugin-key';
|
|
36
|
+
import type { RowStickyState, StickyPluginState } from '../pm-plugins/sticky-headers/types';
|
|
37
|
+
import { findStickyHeaderForTable } from '../pm-plugins/sticky-headers/util';
|
|
40
38
|
import { META_KEYS } from '../pm-plugins/table-analytics';
|
|
41
39
|
import {
|
|
42
|
-
COLUMN_MIN_WIDTH,
|
|
43
|
-
getLayoutSize,
|
|
44
|
-
getResizeState,
|
|
45
40
|
insertColgroupFromNode,
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
} from '../pm-plugins/table-resizing/utils';
|
|
49
|
-
import { hasTableBeenResized } from '../pm-plugins/table-resizing/utils/colgroup';
|
|
41
|
+
hasTableBeenResized,
|
|
42
|
+
} from '../pm-plugins/table-resizing/utils/colgroup';
|
|
50
43
|
import {
|
|
44
|
+
COLUMN_MIN_WIDTH,
|
|
51
45
|
TABLE_EDITOR_MARGIN,
|
|
52
46
|
TABLE_OFFSET_IN_COMMENT_EDITOR,
|
|
53
47
|
} from '../pm-plugins/table-resizing/utils/consts';
|
|
54
48
|
import { updateControls } from '../pm-plugins/table-resizing/utils/dom';
|
|
55
49
|
import {
|
|
50
|
+
getLayoutSize,
|
|
56
51
|
getScalingPercentForTableWithoutWidth,
|
|
57
52
|
getTableScalingPercent,
|
|
58
53
|
} from '../pm-plugins/table-resizing/utils/misc';
|
|
54
|
+
import { getResizeState, updateColgroup } from '../pm-plugins/table-resizing/utils/resize-state';
|
|
55
|
+
import { scaleTable } from '../pm-plugins/table-resizing/utils/scale-table';
|
|
59
56
|
import {
|
|
60
57
|
containsHeaderRow,
|
|
61
|
-
getAssistiveMessage,
|
|
62
58
|
isTableNested,
|
|
63
59
|
isTableNestedInMoreThanOneNode,
|
|
64
60
|
tablesHaveDifferentColumnWidths,
|
|
65
61
|
tablesHaveDifferentNoOfColumns,
|
|
66
62
|
tablesHaveDifferentNoOfRows,
|
|
67
|
-
} from '../pm-plugins/utils';
|
|
63
|
+
} from '../pm-plugins/utils/nodes';
|
|
64
|
+
import { getAssistiveMessage } from '../pm-plugins/utils/table';
|
|
68
65
|
import type { CellHoverMeta, PluginInjectionAPI } from '../types';
|
|
69
66
|
import { TableCssClassName as ClassName, ShadowEvent } from '../types';
|
|
70
67
|
import {
|
|
@@ -74,6 +71,8 @@ import {
|
|
|
74
71
|
withCellTracking,
|
|
75
72
|
} from '../ui/event-handlers';
|
|
76
73
|
import TableFloatingColumnControls from '../ui/TableFloatingColumnControls';
|
|
74
|
+
// Ignored via go/ees005
|
|
75
|
+
// eslint-disable-next-line import/no-named-as-default
|
|
77
76
|
import TableFloatingControls from '../ui/TableFloatingControls';
|
|
78
77
|
|
|
79
78
|
import { ExternalDropTargets } from './ExternalDropTargets';
|
|
@@ -144,6 +143,8 @@ interface TableState {
|
|
|
144
143
|
tableWrapperHeight?: number;
|
|
145
144
|
}
|
|
146
145
|
|
|
146
|
+
// Ignored via go/ees005
|
|
147
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
147
148
|
class TableComponent extends React.Component<ComponentProps, TableState> {
|
|
148
149
|
static displayName = 'TableComponent';
|
|
149
150
|
|
|
@@ -197,7 +198,7 @@ class TableComponent extends React.Component<ComponentProps, TableState> {
|
|
|
197
198
|
});
|
|
198
199
|
|
|
199
200
|
this.resizeObserver = new ResizeObserver((entries) => {
|
|
200
|
-
for (
|
|
201
|
+
for (const entry of entries) {
|
|
201
202
|
this.setState((prev) => {
|
|
202
203
|
return prev?.tableWrapperWidth === entry.contentRect?.width &&
|
|
203
204
|
prev?.tableWrapperHeight === entry.contentRect?.height
|
|
@@ -247,10 +248,16 @@ class TableComponent extends React.Component<ComponentProps, TableState> {
|
|
|
247
248
|
isTableScalingEnabled,
|
|
248
249
|
} = this.props;
|
|
249
250
|
|
|
251
|
+
// Ignored via go/ees005
|
|
252
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
250
253
|
this?.table?.addEventListener('mouseenter', this.handleMouseEnter);
|
|
251
254
|
|
|
255
|
+
// Ignored via go/ees005
|
|
256
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
252
257
|
this?.table?.addEventListener('mouseout', this.handleMouseOut);
|
|
253
258
|
|
|
259
|
+
// Ignored via go/ees005
|
|
260
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
254
261
|
this?.table?.addEventListener('mouseover', this.handleMouseOver);
|
|
255
262
|
|
|
256
263
|
const { tableWithFixedColumnWidthsOption = false } = getEditorFeatureFlags();
|
|
@@ -278,6 +285,8 @@ class TableComponent extends React.Component<ComponentProps, TableState> {
|
|
|
278
285
|
}
|
|
279
286
|
|
|
280
287
|
if (allowColumnResizing && this.wrapper && !isIE11) {
|
|
288
|
+
// Ignored via go/ees005
|
|
289
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
281
290
|
this.wrapper.addEventListener('scroll', this.handleScrollDebounced, {
|
|
282
291
|
passive: true,
|
|
283
292
|
});
|
|
@@ -302,6 +311,8 @@ class TableComponent extends React.Component<ComponentProps, TableState> {
|
|
|
302
311
|
* Instead we use the resize event to only trigger updates when necessary.
|
|
303
312
|
*/
|
|
304
313
|
if (!allowTableResizing) {
|
|
314
|
+
// Ignored via go/ees005
|
|
315
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
305
316
|
window.addEventListener('resize', this.handleWindowResizeDebounced);
|
|
306
317
|
}
|
|
307
318
|
this.handleTableResizingDebounced();
|
|
@@ -313,6 +324,8 @@ class TableComponent extends React.Component<ComponentProps, TableState> {
|
|
|
313
324
|
this.onStickyState(currentStickyState);
|
|
314
325
|
}
|
|
315
326
|
|
|
327
|
+
// Ignored via go/ees005
|
|
328
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
316
329
|
eventDispatcher.on((stickyHeadersPluginKey as any).key, this.onStickyState);
|
|
317
330
|
|
|
318
331
|
if (isOverflowAnalyticsEnabled) {
|
|
@@ -327,6 +340,8 @@ class TableComponent extends React.Component<ComponentProps, TableState> {
|
|
|
327
340
|
const { allowColumnResizing, allowTableResizing, eventDispatcher, isDragAndDropEnabled } =
|
|
328
341
|
this.props;
|
|
329
342
|
if (this.wrapper && !isIE11) {
|
|
343
|
+
// Ignored via go/ees005
|
|
344
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
330
345
|
this.wrapper.removeEventListener('scroll', this.handleScrollDebounced);
|
|
331
346
|
}
|
|
332
347
|
|
|
@@ -350,19 +365,29 @@ class TableComponent extends React.Component<ComponentProps, TableState> {
|
|
|
350
365
|
}
|
|
351
366
|
|
|
352
367
|
if (!allowTableResizing && allowColumnResizing) {
|
|
368
|
+
// Ignored via go/ees005
|
|
369
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
353
370
|
window.removeEventListener('resize', this.handleWindowResizeDebounced);
|
|
354
371
|
}
|
|
355
372
|
|
|
373
|
+
// Ignored via go/ees005
|
|
374
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
356
375
|
this?.table?.removeEventListener('mouseenter', this.handleMouseEnter);
|
|
357
376
|
|
|
377
|
+
// Ignored via go/ees005
|
|
378
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
358
379
|
this?.table?.removeEventListener('mouseout', this.handleMouseOut);
|
|
359
380
|
|
|
381
|
+
// Ignored via go/ees005
|
|
382
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
360
383
|
this?.table?.removeEventListener('mouseover', this.handleMouseOver);
|
|
361
384
|
|
|
362
385
|
if (this.overflowShadowsObserver) {
|
|
363
386
|
this.overflowShadowsObserver.dispose();
|
|
364
387
|
}
|
|
365
388
|
|
|
389
|
+
// Ignored via go/ees005
|
|
390
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
366
391
|
eventDispatcher.off((stickyHeadersPluginKey as any).key, this.onStickyState);
|
|
367
392
|
|
|
368
393
|
if (this.initialOverflowCaptureTimerId) {
|
|
@@ -520,16 +545,22 @@ class TableComponent extends React.Component<ComponentProps, TableState> {
|
|
|
520
545
|
) {
|
|
521
546
|
scalePercent = getTableScalingPercent(
|
|
522
547
|
tableNode,
|
|
548
|
+
// Ignored via go/ees005
|
|
549
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
523
550
|
this.table!,
|
|
524
551
|
shouldUseIncreasedScalingPercent,
|
|
525
552
|
);
|
|
526
553
|
} else {
|
|
554
|
+
// Ignored via go/ees005
|
|
555
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
527
556
|
scalePercent = getScalingPercentForTableWithoutWidth(tableNode, this.table!);
|
|
528
557
|
}
|
|
529
558
|
|
|
530
559
|
// Request animation frame required for Firefox
|
|
531
560
|
updateColgroup(
|
|
532
561
|
resizeState,
|
|
562
|
+
// Ignored via go/ees005
|
|
563
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
533
564
|
this.table!,
|
|
534
565
|
tableNode,
|
|
535
566
|
shouldScaleOnColgroupUpdate,
|
|
@@ -548,6 +579,8 @@ class TableComponent extends React.Component<ComponentProps, TableState> {
|
|
|
548
579
|
this.containerWidth = containerWidth;
|
|
549
580
|
}
|
|
550
581
|
|
|
582
|
+
// Ignored via go/ees005
|
|
583
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
551
584
|
componentDidUpdate(_: any, prevState: TableState) {
|
|
552
585
|
const {
|
|
553
586
|
view,
|
|
@@ -617,6 +650,8 @@ class TableComponent extends React.Component<ComponentProps, TableState> {
|
|
|
617
650
|
window.requestAnimationFrame(() => {
|
|
618
651
|
this.overflowShadowsObserver = new OverflowShadowsObserver(
|
|
619
652
|
this.updateShadowState,
|
|
653
|
+
// Ignored via go/ees005
|
|
654
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
620
655
|
this.table as HTMLElement,
|
|
621
656
|
this.wrapper as HTMLDivElement,
|
|
622
657
|
);
|
|
@@ -751,6 +786,8 @@ class TableComponent extends React.Component<ComponentProps, TableState> {
|
|
|
751
786
|
}
|
|
752
787
|
};
|
|
753
788
|
|
|
789
|
+
// Ignored via go/ees005
|
|
790
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
754
791
|
prevTableState: any = null;
|
|
755
792
|
|
|
756
793
|
render() {
|
|
@@ -871,9 +908,9 @@ class TableComponent extends React.Component<ComponentProps, TableState> {
|
|
|
871
908
|
const topShadowPadding = isDragAndDropEnabled ? 0 : shadowPadding;
|
|
872
909
|
const topOffset = fg('platform_editor_breakout_use_css')
|
|
873
910
|
? 0
|
|
874
|
-
: this.state.stickyHeader?.top ?? 0;
|
|
911
|
+
: (this.state.stickyHeader?.top ?? 0);
|
|
875
912
|
|
|
876
|
-
|
|
913
|
+
const topStickyShadowPosition =
|
|
877
914
|
this.state.stickyHeader && topOffset + this.state.stickyHeader.padding + topShadowPadding + 2;
|
|
878
915
|
|
|
879
916
|
const { tableWithFixedColumnWidthsOption = false } = getEditorFeatureFlags();
|
|
@@ -894,6 +931,8 @@ class TableComponent extends React.Component<ComponentProps, TableState> {
|
|
|
894
931
|
editorView={view}
|
|
895
932
|
getPos={getPos}
|
|
896
933
|
node={node}
|
|
934
|
+
// Ignored via go/ees005
|
|
935
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
897
936
|
tableRef={tableRef!}
|
|
898
937
|
containerWidth={containerWidth}
|
|
899
938
|
isNested={isNested}
|
|
@@ -1050,6 +1089,8 @@ class TableComponent extends React.Component<ComponentProps, TableState> {
|
|
|
1050
1089
|
// sync sticky header row to table scroll
|
|
1051
1090
|
const headers = this.table.querySelectorAll('tr[data-header-row]');
|
|
1052
1091
|
for (let i = 0; i < headers.length; i++) {
|
|
1092
|
+
// Ignored via go/ees005
|
|
1093
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
1053
1094
|
const header = headers[i] as HTMLElement;
|
|
1054
1095
|
|
|
1055
1096
|
header.scrollLeft = this.wrapper.scrollLeft;
|
|
@@ -1064,6 +1105,8 @@ class TableComponent extends React.Component<ComponentProps, TableState> {
|
|
|
1064
1105
|
|
|
1065
1106
|
private handleTableResizing = () => {
|
|
1066
1107
|
const { getNode, containerWidth, options, allowTableResizing } = this.props;
|
|
1108
|
+
// Ignored via go/ees005
|
|
1109
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
1067
1110
|
const prevNode = this.node!;
|
|
1068
1111
|
const node = getNode();
|
|
1069
1112
|
const prevAttrs = prevNode.attrs;
|
|
@@ -1179,6 +1222,8 @@ class TableComponent extends React.Component<ComponentProps, TableState> {
|
|
|
1179
1222
|
prevNode: this.node || node,
|
|
1180
1223
|
start: pos + 1,
|
|
1181
1224
|
containerWidth: width,
|
|
1225
|
+
// Ignored via go/ees005
|
|
1226
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
1182
1227
|
previousContainerWidth: this.containerWidth!.width || width,
|
|
1183
1228
|
...options,
|
|
1184
1229
|
},
|