@atlaskit/editor-plugin-table 38.0.5 → 38.0.6
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 +6 -0
- package/dist/cjs/nodeviews/ExternalDropTargets.js +2 -2
- package/dist/cjs/nodeviews/TableCell.js +5 -4
- package/dist/cjs/nodeviews/TableComponent.js +6 -6
- package/dist/cjs/nodeviews/TableComponentWithSharedState.js +2 -2
- package/dist/cjs/nodeviews/TableContainer.js +12 -11
- package/dist/cjs/nodeviews/TableResizer.js +27 -26
- package/dist/cjs/nodeviews/TableRow.js +4 -4
- package/dist/cjs/nodeviews/TableRowNativeStickyWithFallback.js +13 -12
- package/dist/cjs/nodeviews/TableSSRReactContextsProvider.js +2 -2
- package/dist/cjs/nodeviews/TableStickyScrollbar.js +2 -2
- package/dist/cjs/nodeviews/table.js +4 -4
- package/dist/cjs/nodeviews/toDOM.js +6 -6
- package/dist/cjs/pm-plugins/analytics/plugin-factory.js +2 -2
- package/dist/cjs/pm-plugins/analytics/plugin.js +5 -4
- package/dist/cjs/pm-plugins/commands/clear.js +5 -3
- package/dist/cjs/pm-plugins/commands/column-resize.js +18 -16
- package/dist/cjs/pm-plugins/commands/commands-with-analytics.js +118 -116
- package/dist/cjs/pm-plugins/commands/go-to-next-cell.js +5 -4
- package/dist/cjs/pm-plugins/commands/hover.js +5 -3
- package/dist/cjs/pm-plugins/commands/insert.js +21 -17
- package/dist/cjs/pm-plugins/commands/misc.js +45 -34
- package/dist/cjs/pm-plugins/commands/referentiality.js +2 -2
- package/dist/cjs/pm-plugins/commands/selection.js +25 -22
- package/dist/cjs/pm-plugins/commands/sort.js +14 -11
- package/dist/cjs/pm-plugins/commands/split-cell.js +2 -1
- package/dist/cjs/pm-plugins/commands/toggle.js +6 -5
- package/dist/cjs/pm-plugins/decorations/plugin.js +2 -2
- package/dist/cjs/pm-plugins/drag-and-drop/commands-with-analytics.js +33 -31
- package/dist/cjs/pm-plugins/drag-and-drop/commands.js +6 -3
- package/dist/cjs/pm-plugins/drag-and-drop/plugin-factory.js +2 -2
- package/dist/cjs/pm-plugins/drag-and-drop/plugin.js +16 -14
- package/dist/cjs/pm-plugins/handlers.js +10 -10
- package/dist/cjs/pm-plugins/keymap.js +11 -11
- package/dist/cjs/pm-plugins/main.js +24 -22
- package/dist/cjs/pm-plugins/plugin-factory.js +2 -2
- package/dist/cjs/pm-plugins/sticky-headers/plugin-state.js +2 -2
- package/dist/cjs/pm-plugins/table-analytics.js +6 -5
- package/dist/cjs/pm-plugins/table-anchor-names/plugin.js +2 -2
- package/dist/cjs/pm-plugins/table-resizing/commands.js +2 -2
- package/dist/cjs/pm-plugins/table-resizing/event-handlers.js +20 -19
- package/dist/cjs/pm-plugins/table-resizing/plugin-factory.js +2 -2
- package/dist/cjs/pm-plugins/table-resizing/utils/colgroup.js +17 -16
- package/dist/cjs/pm-plugins/table-resizing/utils/column-state.js +3 -3
- package/dist/cjs/pm-plugins/table-resizing/utils/dom.js +5 -4
- package/dist/cjs/pm-plugins/table-resizing/utils/misc.js +9 -9
- package/dist/cjs/pm-plugins/table-resizing/utils/resize-state.js +8 -8
- package/dist/cjs/pm-plugins/table-resizing/utils/scale-table.js +8 -8
- package/dist/cjs/pm-plugins/table-width-in-comment-fix.js +2 -2
- package/dist/cjs/pm-plugins/table-width.js +8 -8
- package/dist/cjs/pm-plugins/transforms/column-width.js +7 -7
- package/dist/cjs/pm-plugins/transforms/content-mode.js +4 -4
- package/dist/cjs/pm-plugins/transforms/delete-columns.js +4 -4
- package/dist/cjs/pm-plugins/transforms/fix-tables.js +5 -5
- package/dist/cjs/pm-plugins/transforms/merge.js +3 -2
- package/dist/cjs/pm-plugins/transforms/replace-table.js +7 -6
- package/dist/cjs/pm-plugins/utils/analytics.js +19 -17
- package/dist/cjs/pm-plugins/utils/column-controls.js +11 -10
- package/dist/cjs/pm-plugins/utils/create.js +2 -2
- package/dist/cjs/pm-plugins/utils/decoration.js +6 -4
- package/dist/cjs/pm-plugins/utils/dom.js +4 -3
- package/dist/cjs/pm-plugins/utils/drag-menu.js +12 -12
- package/dist/cjs/pm-plugins/utils/guidelines.js +3 -3
- package/dist/cjs/pm-plugins/utils/merged-cells.js +5 -4
- package/dist/cjs/pm-plugins/utils/nodes.js +8 -8
- package/dist/cjs/pm-plugins/utils/paste.js +10 -10
- package/dist/cjs/pm-plugins/utils/row-controls.js +2 -1
- package/dist/cjs/pm-plugins/utils/selection.js +4 -3
- package/dist/cjs/pm-plugins/utils/snapping.js +12 -12
- package/dist/cjs/pm-plugins/utils/table.js +5 -5
- package/dist/cjs/pm-plugins/utils/tableMode/apply-measured-width-to-all-tables.js +10 -9
- package/dist/cjs/pm-plugins/utils/tableMode/apply-measured-width-to-selected-table.js +5 -4
- package/dist/cjs/pm-plugins/utils/tableMode/smart-adjust/distribute-column-widths.js +8 -8
- package/dist/cjs/pm-plugins/view-mode-sort/utils.js +2 -1
- package/dist/cjs/tablePlugin.js +27 -26
- package/dist/cjs/ui/ColumnResizeWidget/index.js +2 -2
- package/dist/cjs/ui/ContentComponent.js +9 -9
- package/dist/cjs/ui/DragHandle/index.js +5 -4
- package/dist/cjs/ui/FloatingAlignmentButtons/FloatingAlignmentButtons.js +4 -3
- package/dist/cjs/ui/FloatingContextualButton/index.js +12 -12
- package/dist/cjs/ui/FloatingContextualMenu/CellMenuPopup.js +5 -4
- package/dist/cjs/ui/FloatingContextualMenu/ContextualMenu.js +69 -63
- package/dist/cjs/ui/FloatingContextualMenu/index.js +11 -9
- package/dist/cjs/ui/FloatingDeleteButton/index.js +17 -16
- package/dist/cjs/ui/FloatingDragMenu/DragMenu.js +61 -54
- package/dist/cjs/ui/FloatingDragMenu/DropdownMenu.js +14 -10
- package/dist/cjs/ui/FloatingDragMenu/index.js +4 -4
- package/dist/cjs/ui/FloatingInsertButton/InsertButton.js +9 -9
- package/dist/cjs/ui/FloatingInsertButton/getPopupOptions.js +2 -2
- package/dist/cjs/ui/FloatingInsertButton/index.js +17 -17
- package/dist/cjs/ui/FloatingTableMenu/index.js +8 -6
- package/dist/cjs/ui/FloatingToolbarLabel/FloatingToolbarLabel.js +2 -2
- package/dist/cjs/ui/SizeSelector/index.js +2 -2
- package/dist/cjs/ui/TableFloatingColumnControls/ColumnControls/index.js +18 -17
- package/dist/cjs/ui/TableFloatingControls/NumberColumn/index.js +2 -2
- package/dist/cjs/ui/TableFloatingControls/RowControls/DragControls.js +13 -12
- package/dist/cjs/ui/TableFullWidthLabel/index.js +2 -2
- package/dist/cjs/ui/TableMenu/cell/getCellMenuComponents.js +15 -15
- package/dist/cjs/ui/TableMenu/cell/items/MergeCellsItem.js +8 -7
- package/dist/cjs/ui/TableMenu/cell/items/SplitCellItem.js +8 -7
- package/dist/cjs/ui/TableMenu/cell/items/VerticalAlignDropdownItem.js +4 -4
- package/dist/cjs/ui/TableMenu/cell/items/VerticalAlignNestedMenu.js +6 -5
- package/dist/cjs/ui/TableMenu/column/getColumnMenuComponents.js +7 -7
- package/dist/cjs/ui/TableMenu/column/items/AddColumnLeftItem.js +14 -12
- package/dist/cjs/ui/TableMenu/column/items/AddColumnRightItem.js +12 -10
- package/dist/cjs/ui/TableMenu/column/items/ColumnBackgroundSection.js +4 -4
- package/dist/cjs/ui/TableMenu/column/items/ColumnToggleSection.js +4 -4
- package/dist/cjs/ui/TableMenu/column/items/DeleteColumnItem.js +12 -10
- package/dist/cjs/ui/TableMenu/column/items/DistributeColumnsItem.js +10 -9
- package/dist/cjs/ui/TableMenu/column/items/HeaderColumnToggleItem.js +6 -6
- package/dist/cjs/ui/TableMenu/column/items/MoveColumnLeftItem.js +9 -9
- package/dist/cjs/ui/TableMenu/column/items/MoveColumnRightItem.js +9 -9
- package/dist/cjs/ui/TableMenu/column/items/SortDecreasingItem.js +17 -15
- package/dist/cjs/ui/TableMenu/column/items/SortIncreasingItem.js +17 -15
- package/dist/cjs/ui/TableMenu/row/getRowMenuComponents.js +9 -9
- package/dist/cjs/ui/TableMenu/row/items/AddRowAboveItem.js +12 -10
- package/dist/cjs/ui/TableMenu/row/items/AddRowBelowItem.js +10 -8
- package/dist/cjs/ui/TableMenu/row/items/DeleteRowItem.js +12 -10
- package/dist/cjs/ui/TableMenu/row/items/HeaderRowToggleItem.js +6 -6
- package/dist/cjs/ui/TableMenu/row/items/MoveRowDownItem.js +9 -9
- package/dist/cjs/ui/TableMenu/row/items/MoveRowUpItem.js +9 -9
- package/dist/cjs/ui/TableMenu/row/items/NumberedRowsToggleItem.js +6 -6
- package/dist/cjs/ui/TableMenu/shared/TableMenu.js +6 -6
- package/dist/cjs/ui/TableMenu/shared/items/BackgroundColorItem.js +20 -14
- package/dist/cjs/ui/TableMenu/shared/items/ClearCellsItem.js +10 -8
- package/dist/cjs/ui/TableMenu/shared/selection.js +4 -2
- package/dist/cjs/ui/common-styles.js +34 -30
- package/dist/cjs/ui/consts.js +8 -8
- package/dist/cjs/ui/event-handlers.js +47 -43
- package/dist/cjs/ui/global-styles.js +2 -2
- package/dist/cjs/ui/hooks/useInternalTablePluginStateSelector.js +1 -1
- package/dist/cjs/ui/icons/SortingIconWrapper.js +4 -4
- package/dist/cjs/ui/quick-insert/TableQuickInsertMenuItem.js +5 -5
- package/dist/cjs/ui/quick-insert/getTableQuickInsertComponents.js +3 -3
- package/dist/cjs/ui/quick-insert/insertTableFromQuickInsert.js +5 -5
- package/dist/cjs/ui/rounded-table-styles.js +8 -8
- package/dist/cjs/ui/toolbar.js +80 -72
- package/dist/cjs/ui/ui-styles.js +14 -14
- package/dist/es2019/nodeviews/ExternalDropTargets.js +1 -1
- package/dist/es2019/nodeviews/TableCell.js +2 -1
- package/dist/es2019/nodeviews/TableComponent.js +2 -2
- package/dist/es2019/nodeviews/TableComponentWithSharedState.js +1 -1
- package/dist/es2019/nodeviews/TableContainer.js +4 -3
- package/dist/es2019/nodeviews/TableResizer.js +10 -9
- package/dist/es2019/nodeviews/TableRow.js +1 -1
- package/dist/es2019/nodeviews/TableRowNativeStickyWithFallback.js +4 -3
- package/dist/es2019/nodeviews/TableSSRReactContextsProvider.js +1 -1
- package/dist/es2019/nodeviews/TableStickyScrollbar.js +1 -1
- package/dist/es2019/nodeviews/table.js +2 -2
- package/dist/es2019/nodeviews/toDOM.js +2 -2
- package/dist/es2019/pm-plugins/analytics/plugin-factory.js +1 -1
- package/dist/es2019/pm-plugins/analytics/plugin.js +2 -1
- package/dist/es2019/pm-plugins/commands/clear.js +3 -1
- package/dist/es2019/pm-plugins/commands/column-resize.js +6 -4
- package/dist/es2019/pm-plugins/commands/commands-with-analytics.js +5 -3
- package/dist/es2019/pm-plugins/commands/go-to-next-cell.js +3 -2
- package/dist/es2019/pm-plugins/commands/hover.js +3 -1
- package/dist/es2019/pm-plugins/commands/insert.js +7 -3
- package/dist/es2019/pm-plugins/commands/misc.js +13 -2
- package/dist/es2019/pm-plugins/commands/referentiality.js +1 -1
- package/dist/es2019/pm-plugins/commands/selection.js +6 -3
- package/dist/es2019/pm-plugins/commands/sort.js +6 -3
- package/dist/es2019/pm-plugins/commands/split-cell.js +2 -1
- package/dist/es2019/pm-plugins/commands/toggle.js +3 -2
- package/dist/es2019/pm-plugins/decorations/plugin.js +1 -1
- package/dist/es2019/pm-plugins/drag-and-drop/commands-with-analytics.js +5 -3
- package/dist/es2019/pm-plugins/drag-and-drop/commands.js +4 -1
- package/dist/es2019/pm-plugins/drag-and-drop/plugin-factory.js +1 -1
- package/dist/es2019/pm-plugins/drag-and-drop/plugin.js +5 -3
- package/dist/es2019/pm-plugins/handlers.js +2 -2
- package/dist/es2019/pm-plugins/keymap.js +2 -2
- package/dist/es2019/pm-plugins/main.js +7 -5
- package/dist/es2019/pm-plugins/plugin-factory.js +1 -1
- package/dist/es2019/pm-plugins/sticky-headers/plugin-state.js +1 -1
- package/dist/es2019/pm-plugins/table-analytics.js +2 -1
- package/dist/es2019/pm-plugins/table-anchor-names/plugin.js +1 -1
- package/dist/es2019/pm-plugins/table-resizing/commands.js +1 -1
- package/dist/es2019/pm-plugins/table-resizing/event-handlers.js +5 -4
- package/dist/es2019/pm-plugins/table-resizing/plugin-factory.js +1 -1
- package/dist/es2019/pm-plugins/table-resizing/utils/colgroup.js +4 -3
- package/dist/es2019/pm-plugins/table-resizing/utils/column-state.js +1 -1
- package/dist/es2019/pm-plugins/table-resizing/utils/dom.js +3 -2
- package/dist/es2019/pm-plugins/table-resizing/utils/misc.js +2 -2
- package/dist/es2019/pm-plugins/table-resizing/utils/resize-state.js +2 -2
- package/dist/es2019/pm-plugins/table-resizing/utils/scale-table.js +3 -3
- package/dist/es2019/pm-plugins/table-width-in-comment-fix.js +1 -1
- package/dist/es2019/pm-plugins/table-width.js +2 -2
- package/dist/es2019/pm-plugins/transforms/column-width.js +1 -1
- package/dist/es2019/pm-plugins/transforms/content-mode.js +2 -2
- package/dist/es2019/pm-plugins/transforms/delete-columns.js +2 -2
- package/dist/es2019/pm-plugins/transforms/fix-tables.js +2 -2
- package/dist/es2019/pm-plugins/transforms/merge.js +2 -1
- package/dist/es2019/pm-plugins/transforms/replace-table.js +2 -1
- package/dist/es2019/pm-plugins/utils/analytics.js +4 -2
- package/dist/es2019/pm-plugins/utils/column-controls.js +3 -2
- package/dist/es2019/pm-plugins/utils/create.js +1 -1
- package/dist/es2019/pm-plugins/utils/decoration.js +3 -1
- package/dist/es2019/pm-plugins/utils/dom.js +2 -1
- package/dist/es2019/pm-plugins/utils/drag-menu.js +2 -2
- package/dist/es2019/pm-plugins/utils/guidelines.js +1 -1
- package/dist/es2019/pm-plugins/utils/merged-cells.js +2 -1
- package/dist/es2019/pm-plugins/utils/nodes.js +1 -1
- package/dist/es2019/pm-plugins/utils/paste.js +2 -2
- package/dist/es2019/pm-plugins/utils/row-controls.js +2 -1
- package/dist/es2019/pm-plugins/utils/selection.js +2 -1
- package/dist/es2019/pm-plugins/utils/snapping.js +2 -2
- package/dist/es2019/pm-plugins/utils/table.js +1 -1
- package/dist/es2019/pm-plugins/utils/tableMode/apply-measured-width-to-all-tables.js +3 -2
- package/dist/es2019/pm-plugins/utils/tableMode/apply-measured-width-to-selected-table.js +2 -1
- package/dist/es2019/pm-plugins/utils/tableMode/smart-adjust/distribute-column-widths.js +2 -2
- package/dist/es2019/pm-plugins/view-mode-sort/utils.js +2 -1
- package/dist/es2019/tablePlugin.js +6 -5
- package/dist/es2019/ui/ColumnResizeWidget/index.js +1 -1
- package/dist/es2019/ui/ContentComponent.js +4 -4
- package/dist/es2019/ui/DragHandle/index.js +3 -2
- package/dist/es2019/ui/FloatingAlignmentButtons/FloatingAlignmentButtons.js +2 -1
- package/dist/es2019/ui/FloatingContextualButton/index.js +6 -6
- package/dist/es2019/ui/FloatingContextualMenu/CellMenuPopup.js +4 -3
- package/dist/es2019/ui/FloatingContextualMenu/ContextualMenu.js +17 -11
- package/dist/es2019/ui/FloatingContextualMenu/index.js +6 -4
- package/dist/es2019/ui/FloatingDeleteButton/index.js +7 -6
- package/dist/es2019/ui/FloatingDragMenu/DragMenu.js +17 -10
- package/dist/es2019/ui/FloatingDragMenu/DropdownMenu.js +8 -4
- package/dist/es2019/ui/FloatingDragMenu/index.js +2 -2
- package/dist/es2019/ui/FloatingInsertButton/InsertButton.js +4 -4
- package/dist/es2019/ui/FloatingInsertButton/getPopupOptions.js +1 -1
- package/dist/es2019/ui/FloatingInsertButton/index.js +3 -3
- package/dist/es2019/ui/FloatingTableMenu/index.js +5 -4
- package/dist/es2019/ui/FloatingToolbarLabel/FloatingToolbarLabel.js +1 -1
- package/dist/es2019/ui/SizeSelector/index.js +1 -1
- package/dist/es2019/ui/TableFloatingColumnControls/ColumnControls/index.js +7 -6
- package/dist/es2019/ui/TableFloatingControls/NumberColumn/index.js +1 -1
- package/dist/es2019/ui/TableFloatingControls/RowControls/DragControls.js +5 -4
- package/dist/es2019/ui/TableFullWidthLabel/index.js +1 -1
- package/dist/es2019/ui/TableMenu/cell/getCellMenuComponents.js +2 -2
- package/dist/es2019/ui/TableMenu/cell/items/MergeCellsItem.js +4 -3
- package/dist/es2019/ui/TableMenu/cell/items/SplitCellItem.js +4 -3
- package/dist/es2019/ui/TableMenu/cell/items/VerticalAlignDropdownItem.js +2 -2
- package/dist/es2019/ui/TableMenu/cell/items/VerticalAlignNestedMenu.js +3 -2
- package/dist/es2019/ui/TableMenu/column/getColumnMenuComponents.js +1 -1
- package/dist/es2019/ui/TableMenu/column/items/AddColumnLeftItem.js +7 -5
- package/dist/es2019/ui/TableMenu/column/items/AddColumnRightItem.js +6 -4
- package/dist/es2019/ui/TableMenu/column/items/ColumnBackgroundSection.js +2 -2
- package/dist/es2019/ui/TableMenu/column/items/ColumnToggleSection.js +2 -2
- package/dist/es2019/ui/TableMenu/column/items/DeleteColumnItem.js +6 -4
- package/dist/es2019/ui/TableMenu/column/items/DistributeColumnsItem.js +5 -4
- package/dist/es2019/ui/TableMenu/column/items/HeaderColumnToggleItem.js +3 -3
- package/dist/es2019/ui/TableMenu/column/items/MoveColumnLeftItem.js +4 -4
- package/dist/es2019/ui/TableMenu/column/items/MoveColumnRightItem.js +4 -4
- package/dist/es2019/ui/TableMenu/column/items/SortDecreasingItem.js +7 -5
- package/dist/es2019/ui/TableMenu/column/items/SortIncreasingItem.js +7 -5
- package/dist/es2019/ui/TableMenu/row/getRowMenuComponents.js +1 -1
- package/dist/es2019/ui/TableMenu/row/items/AddRowAboveItem.js +6 -4
- package/dist/es2019/ui/TableMenu/row/items/AddRowBelowItem.js +5 -3
- package/dist/es2019/ui/TableMenu/row/items/DeleteRowItem.js +6 -4
- package/dist/es2019/ui/TableMenu/row/items/HeaderRowToggleItem.js +3 -3
- package/dist/es2019/ui/TableMenu/row/items/MoveRowDownItem.js +4 -4
- package/dist/es2019/ui/TableMenu/row/items/MoveRowUpItem.js +4 -4
- package/dist/es2019/ui/TableMenu/row/items/NumberedRowsToggleItem.js +3 -3
- package/dist/es2019/ui/TableMenu/shared/TableMenu.js +3 -3
- package/dist/es2019/ui/TableMenu/shared/items/BackgroundColorItem.js +10 -5
- package/dist/es2019/ui/TableMenu/shared/items/ClearCellsItem.js +5 -3
- package/dist/es2019/ui/TableMenu/shared/selection.js +3 -1
- package/dist/es2019/ui/common-styles.js +8 -4
- package/dist/es2019/ui/consts.js +2 -2
- package/dist/es2019/ui/event-handlers.js +7 -3
- package/dist/es2019/ui/global-styles.js +1 -1
- package/dist/es2019/ui/hooks/useInternalTablePluginStateSelector.js +1 -1
- package/dist/es2019/ui/icons/SortingIconWrapper.js +2 -2
- package/dist/es2019/ui/quick-insert/TableQuickInsertMenuItem.js +1 -1
- package/dist/es2019/ui/quick-insert/getTableQuickInsertComponents.js +1 -1
- package/dist/es2019/ui/quick-insert/insertTableFromQuickInsert.js +1 -1
- package/dist/es2019/ui/rounded-table-styles.js +2 -2
- package/dist/es2019/ui/toolbar.js +20 -10
- package/dist/es2019/ui/ui-styles.js +2 -2
- package/dist/esm/nodeviews/ExternalDropTargets.js +1 -1
- package/dist/esm/nodeviews/TableCell.js +2 -1
- package/dist/esm/nodeviews/TableComponent.js +2 -2
- package/dist/esm/nodeviews/TableComponentWithSharedState.js +1 -1
- package/dist/esm/nodeviews/TableContainer.js +4 -3
- package/dist/esm/nodeviews/TableResizer.js +10 -9
- package/dist/esm/nodeviews/TableRow.js +1 -1
- package/dist/esm/nodeviews/TableRowNativeStickyWithFallback.js +4 -3
- package/dist/esm/nodeviews/TableSSRReactContextsProvider.js +1 -1
- package/dist/esm/nodeviews/TableStickyScrollbar.js +1 -1
- package/dist/esm/nodeviews/table.js +2 -2
- package/dist/esm/nodeviews/toDOM.js +2 -2
- package/dist/esm/pm-plugins/analytics/plugin-factory.js +1 -1
- package/dist/esm/pm-plugins/analytics/plugin.js +2 -1
- package/dist/esm/pm-plugins/commands/clear.js +3 -1
- package/dist/esm/pm-plugins/commands/column-resize.js +6 -4
- package/dist/esm/pm-plugins/commands/commands-with-analytics.js +5 -3
- package/dist/esm/pm-plugins/commands/go-to-next-cell.js +3 -2
- package/dist/esm/pm-plugins/commands/hover.js +3 -1
- package/dist/esm/pm-plugins/commands/insert.js +7 -3
- package/dist/esm/pm-plugins/commands/misc.js +13 -2
- package/dist/esm/pm-plugins/commands/referentiality.js +1 -1
- package/dist/esm/pm-plugins/commands/selection.js +6 -3
- package/dist/esm/pm-plugins/commands/sort.js +6 -3
- package/dist/esm/pm-plugins/commands/split-cell.js +2 -1
- package/dist/esm/pm-plugins/commands/toggle.js +3 -2
- package/dist/esm/pm-plugins/decorations/plugin.js +1 -1
- package/dist/esm/pm-plugins/drag-and-drop/commands-with-analytics.js +5 -3
- package/dist/esm/pm-plugins/drag-and-drop/commands.js +4 -1
- package/dist/esm/pm-plugins/drag-and-drop/plugin-factory.js +1 -1
- package/dist/esm/pm-plugins/drag-and-drop/plugin.js +5 -3
- package/dist/esm/pm-plugins/handlers.js +2 -2
- package/dist/esm/pm-plugins/keymap.js +2 -2
- package/dist/esm/pm-plugins/main.js +7 -5
- package/dist/esm/pm-plugins/plugin-factory.js +1 -1
- package/dist/esm/pm-plugins/sticky-headers/plugin-state.js +1 -1
- package/dist/esm/pm-plugins/table-analytics.js +2 -1
- package/dist/esm/pm-plugins/table-anchor-names/plugin.js +1 -1
- package/dist/esm/pm-plugins/table-resizing/commands.js +1 -1
- package/dist/esm/pm-plugins/table-resizing/event-handlers.js +5 -4
- package/dist/esm/pm-plugins/table-resizing/plugin-factory.js +1 -1
- package/dist/esm/pm-plugins/table-resizing/utils/colgroup.js +4 -3
- package/dist/esm/pm-plugins/table-resizing/utils/column-state.js +1 -1
- package/dist/esm/pm-plugins/table-resizing/utils/dom.js +3 -2
- package/dist/esm/pm-plugins/table-resizing/utils/misc.js +2 -2
- package/dist/esm/pm-plugins/table-resizing/utils/resize-state.js +2 -2
- package/dist/esm/pm-plugins/table-resizing/utils/scale-table.js +3 -3
- package/dist/esm/pm-plugins/table-width-in-comment-fix.js +1 -1
- package/dist/esm/pm-plugins/table-width.js +2 -2
- package/dist/esm/pm-plugins/transforms/column-width.js +1 -1
- package/dist/esm/pm-plugins/transforms/content-mode.js +2 -2
- package/dist/esm/pm-plugins/transforms/delete-columns.js +2 -2
- package/dist/esm/pm-plugins/transforms/fix-tables.js +2 -2
- package/dist/esm/pm-plugins/transforms/merge.js +2 -1
- package/dist/esm/pm-plugins/transforms/replace-table.js +2 -1
- package/dist/esm/pm-plugins/utils/analytics.js +4 -2
- package/dist/esm/pm-plugins/utils/column-controls.js +3 -2
- package/dist/esm/pm-plugins/utils/create.js +1 -1
- package/dist/esm/pm-plugins/utils/decoration.js +3 -1
- package/dist/esm/pm-plugins/utils/dom.js +2 -1
- package/dist/esm/pm-plugins/utils/drag-menu.js +2 -2
- package/dist/esm/pm-plugins/utils/guidelines.js +1 -1
- package/dist/esm/pm-plugins/utils/merged-cells.js +2 -1
- package/dist/esm/pm-plugins/utils/nodes.js +1 -1
- package/dist/esm/pm-plugins/utils/paste.js +2 -2
- package/dist/esm/pm-plugins/utils/row-controls.js +2 -1
- package/dist/esm/pm-plugins/utils/selection.js +2 -1
- package/dist/esm/pm-plugins/utils/snapping.js +2 -2
- package/dist/esm/pm-plugins/utils/table.js +1 -1
- package/dist/esm/pm-plugins/utils/tableMode/apply-measured-width-to-all-tables.js +3 -2
- package/dist/esm/pm-plugins/utils/tableMode/apply-measured-width-to-selected-table.js +2 -1
- package/dist/esm/pm-plugins/utils/tableMode/smart-adjust/distribute-column-widths.js +2 -2
- package/dist/esm/pm-plugins/view-mode-sort/utils.js +2 -1
- package/dist/esm/tablePlugin.js +6 -5
- package/dist/esm/ui/ColumnResizeWidget/index.js +1 -1
- package/dist/esm/ui/ContentComponent.js +4 -4
- package/dist/esm/ui/DragHandle/index.js +3 -2
- package/dist/esm/ui/FloatingAlignmentButtons/FloatingAlignmentButtons.js +2 -1
- package/dist/esm/ui/FloatingContextualButton/index.js +6 -6
- package/dist/esm/ui/FloatingContextualMenu/CellMenuPopup.js +4 -3
- package/dist/esm/ui/FloatingContextualMenu/ContextualMenu.js +17 -11
- package/dist/esm/ui/FloatingContextualMenu/index.js +6 -4
- package/dist/esm/ui/FloatingDeleteButton/index.js +7 -6
- package/dist/esm/ui/FloatingDragMenu/DragMenu.js +17 -10
- package/dist/esm/ui/FloatingDragMenu/DropdownMenu.js +8 -4
- package/dist/esm/ui/FloatingDragMenu/index.js +2 -2
- package/dist/esm/ui/FloatingInsertButton/InsertButton.js +4 -4
- package/dist/esm/ui/FloatingInsertButton/getPopupOptions.js +1 -1
- package/dist/esm/ui/FloatingInsertButton/index.js +3 -3
- package/dist/esm/ui/FloatingTableMenu/index.js +5 -4
- package/dist/esm/ui/FloatingToolbarLabel/FloatingToolbarLabel.js +1 -1
- package/dist/esm/ui/SizeSelector/index.js +1 -1
- package/dist/esm/ui/TableFloatingColumnControls/ColumnControls/index.js +7 -6
- package/dist/esm/ui/TableFloatingControls/NumberColumn/index.js +1 -1
- package/dist/esm/ui/TableFloatingControls/RowControls/DragControls.js +5 -4
- package/dist/esm/ui/TableFullWidthLabel/index.js +1 -1
- package/dist/esm/ui/TableMenu/cell/getCellMenuComponents.js +2 -2
- package/dist/esm/ui/TableMenu/cell/items/MergeCellsItem.js +4 -3
- package/dist/esm/ui/TableMenu/cell/items/SplitCellItem.js +4 -3
- package/dist/esm/ui/TableMenu/cell/items/VerticalAlignDropdownItem.js +2 -2
- package/dist/esm/ui/TableMenu/cell/items/VerticalAlignNestedMenu.js +3 -2
- package/dist/esm/ui/TableMenu/column/getColumnMenuComponents.js +1 -1
- package/dist/esm/ui/TableMenu/column/items/AddColumnLeftItem.js +7 -5
- package/dist/esm/ui/TableMenu/column/items/AddColumnRightItem.js +6 -4
- package/dist/esm/ui/TableMenu/column/items/ColumnBackgroundSection.js +2 -2
- package/dist/esm/ui/TableMenu/column/items/ColumnToggleSection.js +2 -2
- package/dist/esm/ui/TableMenu/column/items/DeleteColumnItem.js +6 -4
- package/dist/esm/ui/TableMenu/column/items/DistributeColumnsItem.js +5 -4
- package/dist/esm/ui/TableMenu/column/items/HeaderColumnToggleItem.js +3 -3
- package/dist/esm/ui/TableMenu/column/items/MoveColumnLeftItem.js +4 -4
- package/dist/esm/ui/TableMenu/column/items/MoveColumnRightItem.js +4 -4
- package/dist/esm/ui/TableMenu/column/items/SortDecreasingItem.js +7 -5
- package/dist/esm/ui/TableMenu/column/items/SortIncreasingItem.js +7 -5
- package/dist/esm/ui/TableMenu/row/getRowMenuComponents.js +1 -1
- package/dist/esm/ui/TableMenu/row/items/AddRowAboveItem.js +6 -4
- package/dist/esm/ui/TableMenu/row/items/AddRowBelowItem.js +5 -3
- package/dist/esm/ui/TableMenu/row/items/DeleteRowItem.js +6 -4
- package/dist/esm/ui/TableMenu/row/items/HeaderRowToggleItem.js +3 -3
- package/dist/esm/ui/TableMenu/row/items/MoveRowDownItem.js +4 -4
- package/dist/esm/ui/TableMenu/row/items/MoveRowUpItem.js +4 -4
- package/dist/esm/ui/TableMenu/row/items/NumberedRowsToggleItem.js +3 -3
- package/dist/esm/ui/TableMenu/shared/TableMenu.js +3 -3
- package/dist/esm/ui/TableMenu/shared/items/BackgroundColorItem.js +10 -5
- package/dist/esm/ui/TableMenu/shared/items/ClearCellsItem.js +5 -3
- package/dist/esm/ui/TableMenu/shared/selection.js +3 -1
- package/dist/esm/ui/common-styles.js +8 -4
- package/dist/esm/ui/consts.js +2 -2
- package/dist/esm/ui/event-handlers.js +7 -3
- package/dist/esm/ui/global-styles.js +1 -1
- package/dist/esm/ui/hooks/useInternalTablePluginStateSelector.js +1 -1
- package/dist/esm/ui/icons/SortingIconWrapper.js +2 -2
- package/dist/esm/ui/quick-insert/TableQuickInsertMenuItem.js +1 -1
- package/dist/esm/ui/quick-insert/getTableQuickInsertComponents.js +1 -1
- package/dist/esm/ui/quick-insert/insertTableFromQuickInsert.js +1 -1
- package/dist/esm/ui/rounded-table-styles.js +2 -2
- package/dist/esm/ui/toolbar.js +20 -10
- package/dist/esm/ui/ui-styles.js +2 -2
- package/dist/types/nodeviews/TableCell.d.ts +1 -1
- package/dist/types/nodeviews/TableComponent.d.ts +4 -3
- package/dist/types/nodeviews/TableComponentWithSharedState.d.ts +3 -2
- package/dist/types/nodeviews/TableContainer.d.ts +1 -1
- package/dist/types/nodeviews/TableResizer.d.ts +2 -2
- package/dist/types/nodeviews/table-node-views.d.ts +4 -3
- package/dist/types/nodeviews/table.d.ts +5 -3
- package/dist/types/nodeviews/toDOM.d.ts +1 -1
- package/dist/types/nodeviews/types.d.ts +4 -3
- package/dist/types/pm-plugins/analytics/commands.d.ts +1 -1
- package/dist/types/pm-plugins/analytics/plugin-factory.d.ts +1 -1
- package/dist/types/pm-plugins/analytics/plugin.d.ts +1 -1
- package/dist/types/pm-plugins/commands/active-table-menu.d.ts +1 -1
- package/dist/types/pm-plugins/commands/clear.d.ts +1 -1
- package/dist/types/pm-plugins/commands/collapse.d.ts +1 -1
- package/dist/types/pm-plugins/commands/column-resize.d.ts +4 -3
- package/dist/types/pm-plugins/commands/commands-with-analytics.d.ts +8 -5
- package/dist/types/pm-plugins/commands/delete.d.ts +2 -2
- package/dist/types/pm-plugins/commands/display-mode.d.ts +1 -1
- package/dist/types/pm-plugins/commands/go-to-next-cell.d.ts +2 -2
- package/dist/types/pm-plugins/commands/hover.d.ts +1 -1
- package/dist/types/pm-plugins/commands/insert.d.ts +5 -3
- package/dist/types/pm-plugins/commands/misc.d.ts +3 -2
- package/dist/types/pm-plugins/commands/referentiality.d.ts +1 -1
- package/dist/types/pm-plugins/commands/selection.d.ts +3 -2
- package/dist/types/pm-plugins/commands/sort.d.ts +2 -2
- package/dist/types/pm-plugins/commands/split-cell.d.ts +1 -1
- package/dist/types/pm-plugins/commands/toggle.d.ts +1 -1
- package/dist/types/pm-plugins/decorations/utils/column-resizing.d.ts +1 -1
- package/dist/types/pm-plugins/drag-and-drop/commands-with-analytics.d.ts +5 -4
- package/dist/types/pm-plugins/drag-and-drop/commands.d.ts +1 -1
- package/dist/types/pm-plugins/drag-and-drop/plugin-factory.d.ts +1 -1
- package/dist/types/pm-plugins/drag-and-drop/plugin.d.ts +2 -2
- package/dist/types/pm-plugins/drag-and-drop/utils/autoscrollers.d.ts +1 -1
- package/dist/types/pm-plugins/drag-and-drop/utils/getDragBehaviour.d.ts +1 -1
- package/dist/types/pm-plugins/keymap.d.ts +3 -3
- package/dist/types/pm-plugins/main.d.ts +5 -3
- package/dist/types/pm-plugins/plugin-factory.d.ts +1 -1
- package/dist/types/pm-plugins/sticky-headers/commands.d.ts +1 -1
- package/dist/types/pm-plugins/sticky-headers/plugin-state.d.ts +1 -1
- package/dist/types/pm-plugins/table-analytics.d.ts +1 -1
- package/dist/types/pm-plugins/table-resizing/commands.d.ts +1 -1
- package/dist/types/pm-plugins/table-resizing/event-handlers.d.ts +4 -3
- package/dist/types/pm-plugins/table-resizing/plugin-factory.d.ts +1 -1
- package/dist/types/pm-plugins/table-resizing/plugin.d.ts +4 -3
- package/dist/types/pm-plugins/table-resizing/utils/misc.d.ts +1 -1
- package/dist/types/pm-plugins/table-resizing/utils/resize-state.d.ts +2 -2
- package/dist/types/pm-plugins/table-width.d.ts +1 -1
- package/dist/types/pm-plugins/transforms/delete-columns.d.ts +1 -1
- package/dist/types/pm-plugins/transforms/delete-rows.d.ts +1 -1
- package/dist/types/pm-plugins/transforms/replace-table.d.ts +2 -1
- package/dist/types/pm-plugins/utils/analytics.d.ts +4 -2
- package/dist/types/pm-plugins/utils/decoration.d.ts +1 -1
- package/dist/types/pm-plugins/utils/drag-menu.d.ts +7 -4
- package/dist/types/pm-plugins/utils/guidelines.d.ts +1 -1
- package/dist/types/pm-plugins/utils/merged-cells.d.ts +1 -1
- package/dist/types/pm-plugins/utils/selection.d.ts +1 -1
- package/dist/types/pm-plugins/utils/snapping.d.ts +1 -1
- package/dist/types/pm-plugins/view-mode-sort/index.d.ts +2 -2
- package/dist/types/tablePluginType.d.ts +22 -17
- package/dist/types/types/index.d.ts +4 -4
- package/dist/types/ui/ContentComponent.d.ts +4 -2
- package/dist/types/ui/FloatingAlignmentButtons/FloatingAlignmentButtons.d.ts +2 -1
- package/dist/types/ui/FloatingContextualButton/index.d.ts +1 -1
- package/dist/types/ui/FloatingContextualMenu/ContextualMenu.d.ts +4 -3
- package/dist/types/ui/FloatingContextualMenu/index.d.ts +3 -2
- package/dist/types/ui/FloatingDeleteButton/getPopUpOptions.d.ts +1 -1
- package/dist/types/ui/FloatingDeleteButton/index.d.ts +1 -1
- package/dist/types/ui/FloatingDragMenu/DragMenu.d.ts +4 -3
- package/dist/types/ui/FloatingDragMenu/DropdownMenu.d.ts +1 -1
- package/dist/types/ui/FloatingDragMenu/index.d.ts +4 -3
- package/dist/types/ui/FloatingInsertButton/getPopupOptions.d.ts +1 -1
- package/dist/types/ui/FloatingInsertButton/index.d.ts +4 -2
- package/dist/types/ui/SizeSelector/index.d.ts +2 -2
- package/dist/types/ui/TableFloatingColumnControls/index.d.ts +2 -2
- package/dist/types/ui/TableFloatingControls/index.d.ts +2 -2
- package/dist/types/ui/TableMenu/cell/getCellMenuComponents.d.ts +1 -1
- package/dist/types/ui/TableMenu/cell/keys.d.ts +1 -1
- package/dist/types/ui/TableMenu/column/getColumnMenuComponents.d.ts +1 -1
- package/dist/types/ui/TableMenu/column/keys.d.ts +1 -1
- package/dist/types/ui/TableMenu/row/getRowMenuComponents.d.ts +1 -1
- package/dist/types/ui/TableMenu/row/keys.d.ts +1 -1
- package/dist/types/ui/TableMenu/shared/TableMenu.d.ts +1 -1
- package/dist/types/ui/TableMenu/shared/TableMenuContext.d.ts +1 -1
- package/dist/types/ui/TableMenu/shared/getSharedItems.d.ts +1 -1
- package/dist/types/ui/TableMenu/shared/getTableMenuComponents.d.ts +1 -1
- package/dist/types/ui/TableMenu/shared/keys.d.ts +1 -1
- package/dist/types/ui/TableMenu/shared/selection.d.ts +1 -1
- package/dist/types/ui/common-styles.d.ts +1 -1
- package/dist/types/ui/event-handlers.d.ts +2 -2
- package/dist/types/ui/global-styles.d.ts +1 -1
- package/dist/types/ui/hooks/useInternalTablePluginStateSelector.d.ts +1 -1
- package/dist/types/ui/icons/SortingIconWrapper.d.ts +2 -2
- package/dist/types/ui/quick-insert/TableQuickInsertMenuItem.d.ts +1 -1
- package/dist/types/ui/quick-insert/getTableQuickInsertComponents.d.ts +1 -1
- package/dist/types/ui/quick-insert/insertTableFromQuickInsert.d.ts +3 -2
- package/dist/types/ui/toolbar.d.ts +5 -3
- package/package.json +3 -3
|
@@ -9,15 +9,19 @@ exports.handleTripleClick = handleTripleClick;
|
|
|
9
9
|
exports.withCellTracking = exports.whenTableInFocus = exports.isTableInFocus = void 0;
|
|
10
10
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
11
|
var _rafSchd = _interopRequireDefault(require("raf-schd"));
|
|
12
|
-
var
|
|
12
|
+
var _enums = require("@atlaskit/editor-common/analytics/types/enums");
|
|
13
|
+
var _tableEvents = require("@atlaskit/editor-common/analytics/types/table-events");
|
|
13
14
|
var _browser = require("@atlaskit/editor-common/browser");
|
|
14
15
|
var _nesting = require("@atlaskit/editor-common/nesting");
|
|
15
16
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
17
|
+
var _dom = require("@atlaskit/editor-common/utils/dom");
|
|
16
18
|
var _state5 = require("@atlaskit/editor-prosemirror/state");
|
|
17
19
|
var _utils2 = require("@atlaskit/editor-prosemirror/utils");
|
|
18
20
|
var _cellSelection = require("@atlaskit/editor-tables/cell-selection");
|
|
19
21
|
var _tableMap = require("@atlaskit/editor-tables/table-map");
|
|
20
22
|
var _utils3 = require("@atlaskit/editor-tables/utils");
|
|
23
|
+
var _getSelectionRect = require("@atlaskit/editor-tables/utils/get-selection-rect");
|
|
24
|
+
var _removeTable = require("@atlaskit/editor-tables/utils/remove-table");
|
|
21
25
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
22
26
|
var _commands = require("../pm-plugins/commands");
|
|
23
27
|
var _pluginFactory = require("../pm-plugins/drag-and-drop/plugin-factory");
|
|
@@ -25,9 +29,9 @@ var _pluginFactory2 = require("../pm-plugins/plugin-factory");
|
|
|
25
29
|
var _pluginFactory3 = require("../pm-plugins/table-resizing/plugin-factory");
|
|
26
30
|
var _deleteColumns = require("../pm-plugins/transforms/delete-columns");
|
|
27
31
|
var _deleteRows = require("../pm-plugins/transforms/delete-rows");
|
|
28
|
-
var
|
|
32
|
+
var _analytics = require("../pm-plugins/utils/analytics");
|
|
29
33
|
var _columnControls = require("../pm-plugins/utils/column-controls");
|
|
30
|
-
var
|
|
34
|
+
var _dom2 = require("../pm-plugins/utils/dom");
|
|
31
35
|
var _getAllowAddColumnCustomStep = require("../pm-plugins/utils/get-allow-add-column-custom-step");
|
|
32
36
|
var _rowControls = require("../pm-plugins/utils/row-controls");
|
|
33
37
|
var _types = require("../types");
|
|
@@ -79,10 +83,10 @@ var handleClick = exports.handleClick = function handleClick(view, event) {
|
|
|
79
83
|
|
|
80
84
|
// Ignored via go/ees005
|
|
81
85
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
82
|
-
if (event instanceof MouseEvent && (0,
|
|
86
|
+
if (event instanceof MouseEvent && (0, _dom2.isColumnControlsDecorations)(element)) {
|
|
83
87
|
// Ignored via go/ees005
|
|
84
88
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
85
|
-
var _getColumnOrRowIndex = (0,
|
|
89
|
+
var _getColumnOrRowIndex = (0, _dom2.getColumnOrRowIndex)(element),
|
|
86
90
|
_getColumnOrRowIndex2 = (0, _slicedToArray2.default)(_getColumnOrRowIndex, 1),
|
|
87
91
|
startIndex = _getColumnOrRowIndex2[0];
|
|
88
92
|
var state = view.state,
|
|
@@ -103,14 +107,14 @@ var handleClick = exports.handleClick = function handleClick(view, event) {
|
|
|
103
107
|
/** Getting the offset of current item clicked */
|
|
104
108
|
// Ignored via go/ees005
|
|
105
109
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
106
|
-
var colElement = (0,
|
|
110
|
+
var colElement = (0, _dom.closestElement)(element, 'td') ||
|
|
107
111
|
// Ignored via go/ees005
|
|
108
112
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
109
|
-
(0,
|
|
113
|
+
(0, _dom.closestElement)(element, 'th');
|
|
110
114
|
var colIndex = colElement && colElement.cellIndex;
|
|
111
115
|
// Ignored via go/ees005
|
|
112
116
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
113
|
-
var rowElement = (0,
|
|
117
|
+
var rowElement = (0, _dom.closestElement)(element, 'tr');
|
|
114
118
|
var rowIndex = rowElement && rowElement.rowIndex;
|
|
115
119
|
var cellIndex = map.width * rowIndex + colIndex;
|
|
116
120
|
var dispatch = view.dispatch,
|
|
@@ -142,16 +146,16 @@ var handleMouseOver = exports.handleMouseOver = function handleMouseOver(view, m
|
|
|
142
146
|
insertColumnButtonIndex = _getPluginState.insertColumnButtonIndex,
|
|
143
147
|
insertRowButtonIndex = _getPluginState.insertRowButtonIndex,
|
|
144
148
|
isTableHovered = _getPluginState.isTableHovered;
|
|
145
|
-
if ((0,
|
|
146
|
-
var _getColumnOrRowIndex3 = (0,
|
|
149
|
+
if ((0, _dom2.isInsertRowButton)(target)) {
|
|
150
|
+
var _getColumnOrRowIndex3 = (0, _dom2.getColumnOrRowIndex)(target),
|
|
147
151
|
_getColumnOrRowIndex4 = (0, _slicedToArray2.default)(_getColumnOrRowIndex3, 2),
|
|
148
152
|
startIndex = _getColumnOrRowIndex4[0],
|
|
149
153
|
endIndex = _getColumnOrRowIndex4[1];
|
|
150
|
-
var positionRow = (0,
|
|
154
|
+
var positionRow = (0, _dom2.getMousePositionVerticalRelativeByElement)(mouseEvent) === 'bottom' ? endIndex : startIndex;
|
|
151
155
|
return (0, _commands.showInsertRowButton)(positionRow)(state, dispatch);
|
|
152
156
|
}
|
|
153
|
-
if ((0,
|
|
154
|
-
var _getColumnOrRowIndex5 = (0,
|
|
157
|
+
if ((0, _dom2.isColumnControlsDecorations)(target)) {
|
|
158
|
+
var _getColumnOrRowIndex5 = (0, _dom2.getColumnOrRowIndex)(target),
|
|
155
159
|
_getColumnOrRowIndex6 = (0, _slicedToArray2.default)(_getColumnOrRowIndex5, 1),
|
|
156
160
|
_startIndex = _getColumnOrRowIndex6[0];
|
|
157
161
|
var _state = view.state,
|
|
@@ -161,17 +165,17 @@ var handleMouseOver = exports.handleMouseOver = function handleMouseOver(view, m
|
|
|
161
165
|
var isNestedTable = (0, _nesting.getParentOfTypeCount)(state.schema.nodes.table)(state.selection.$from) > 1;
|
|
162
166
|
if (isNestedTable) {
|
|
163
167
|
// if the table is nested inside a table, we only call hideInsertColumnOrRowButton if the table nearest to the mouse target is NOT the parent table
|
|
164
|
-
var nearestTable = (0,
|
|
168
|
+
var nearestTable = (0, _dom.closestElement)(target, 'table');
|
|
165
169
|
var nestedTable = (0, _utils2.findParentNodeOfTypeClosestToPos)(state.doc.resolve(state.selection.from), [state.schema.nodes.table]);
|
|
166
170
|
var parentTable = (0, _utils2.findParentNodeOfTypeClosestToPos)(state.doc.resolve((nestedTable === null || nestedTable === void 0 ? void 0 : nestedTable.pos) || 0), [state.schema.nodes.table]);
|
|
167
|
-
if ((nearestTable === null || nearestTable === void 0 ? void 0 : nearestTable.dataset.tableLocalId) !== (parentTable === null || parentTable === void 0 ? void 0 : parentTable.node.attrs.localId) && ((0,
|
|
171
|
+
if ((nearestTable === null || nearestTable === void 0 ? void 0 : nearestTable.dataset.tableLocalId) !== (parentTable === null || parentTable === void 0 ? void 0 : parentTable.node.attrs.localId) && ((0, _dom2.isCell)(target) || (0, _dom2.isCornerButton)(target)) && (typeof insertColumnButtonIndex === 'number' || typeof insertRowButtonIndex === 'number')) {
|
|
168
172
|
return (0, _commands.hideInsertColumnOrRowButton)()(state, dispatch);
|
|
169
173
|
}
|
|
170
|
-
} else if (((0,
|
|
174
|
+
} else if (((0, _dom2.isCell)(target) || (0, _dom2.isCornerButton)(target)) && (typeof insertColumnButtonIndex === 'number' || typeof insertRowButtonIndex === 'number')) {
|
|
171
175
|
return (0, _commands.hideInsertColumnOrRowButton)()(state, dispatch);
|
|
172
176
|
}
|
|
173
|
-
if ((0,
|
|
174
|
-
var _getColumnOrRowIndex7 = (0,
|
|
177
|
+
if ((0, _dom2.isResizeHandleDecoration)(target)) {
|
|
178
|
+
var _getColumnOrRowIndex7 = (0, _dom2.getColumnOrRowIndex)(target),
|
|
175
179
|
_getColumnOrRowIndex8 = (0, _slicedToArray2.default)(_getColumnOrRowIndex7, 2),
|
|
176
180
|
_startIndex2 = _getColumnOrRowIndex8[0],
|
|
177
181
|
_endIndex = _getColumnOrRowIndex8[1];
|
|
@@ -209,7 +213,7 @@ var handleMouseUp = exports.handleMouseUp = function handleMouseUp(view, mouseEv
|
|
|
209
213
|
};
|
|
210
214
|
var resetDragHandleSelectedIntentOnMouseDown = function resetDragHandleSelectedIntentOnMouseDown(event, api) {
|
|
211
215
|
var _api$userIntent;
|
|
212
|
-
if ((0,
|
|
216
|
+
if ((0, _dom2.isTableDragHandleButton)(event.target)) {
|
|
213
217
|
return;
|
|
214
218
|
}
|
|
215
219
|
if ((api === null || api === void 0 || (_api$userIntent = api.userIntent) === null || _api$userIntent === void 0 || (_api$userIntent = _api$userIntent.sharedState.currentState()) === null || _api$userIntent === void 0 ? void 0 : _api$userIntent.currentUserIntent) === 'dragHandleSelected') {
|
|
@@ -221,7 +225,7 @@ var resetDragHandleSelectedIntentOnMouseDown = function resetDragHandleSelectedI
|
|
|
221
225
|
// Ignore any `mousedown` `event` from control and numbered column buttons
|
|
222
226
|
// PM end up changing selection during shift selection if not prevented
|
|
223
227
|
var handleMouseDown = exports.handleMouseDown = function handleMouseDown(_view, event, api) {
|
|
224
|
-
var isControl = !!(event.target && event.target instanceof HTMLElement && ((0,
|
|
228
|
+
var isControl = !!(event.target && event.target instanceof HTMLElement && ((0, _dom2.isTableContainerOrWrapper)(event.target) || (0, _dom2.isColumnControlsDecorations)(event.target) || (0, _dom2.isRowControlsButton)(event.target) || (0, _dom2.isDragCornerButton)(event.target)));
|
|
225
229
|
if (isControl) {
|
|
226
230
|
event.preventDefault();
|
|
227
231
|
}
|
|
@@ -235,7 +239,7 @@ var handleMouseOut = exports.handleMouseOut = function handleMouseOut(view, mous
|
|
|
235
239
|
return false;
|
|
236
240
|
}
|
|
237
241
|
var target = mouseEvent.target;
|
|
238
|
-
if ((0,
|
|
242
|
+
if ((0, _dom2.isColumnControlsDecorations)(target)) {
|
|
239
243
|
var state = view.state,
|
|
240
244
|
dispatch = view.dispatch;
|
|
241
245
|
return (0, _commands.clearHoverSelection)()(state, dispatch);
|
|
@@ -243,7 +247,7 @@ var handleMouseOut = exports.handleMouseOut = function handleMouseOut(view, mous
|
|
|
243
247
|
var relatedTarget = mouseEvent.relatedTarget;
|
|
244
248
|
// In case the user is moving between cell at the same column
|
|
245
249
|
// we don't need to hide the resize handle decoration
|
|
246
|
-
if ((0,
|
|
250
|
+
if ((0, _dom2.isResizeHandleDecoration)(target) && !(0, _dom2.isResizeHandleDecoration)(relatedTarget)) {
|
|
247
251
|
var _state2 = view.state,
|
|
248
252
|
_dispatch3 = view.dispatch;
|
|
249
253
|
var _getPluginState3 = (0, _pluginFactory2.getPluginState)(_state2),
|
|
@@ -289,7 +293,7 @@ var handleMouseLeave = exports.handleMouseLeave = function handleMouseLeave(view
|
|
|
289
293
|
return false;
|
|
290
294
|
}
|
|
291
295
|
var target = event.target;
|
|
292
|
-
if ((0,
|
|
296
|
+
if ((0, _dom2.isTableControlsButton)(target)) {
|
|
293
297
|
return true;
|
|
294
298
|
}
|
|
295
299
|
if ((typeof insertColumnButtonIndex !== 'undefined' || typeof insertRowButtonIndex !== 'undefined') && (0, _commands.hideInsertColumnOrRowButton)()(state, dispatch)) {
|
|
@@ -319,38 +323,38 @@ var handleMouseMoveDebounce = function handleMouseMoveDebounce(nodeViewPortalPro
|
|
|
319
323
|
}
|
|
320
324
|
}
|
|
321
325
|
}
|
|
322
|
-
if ((0,
|
|
326
|
+
if ((0, _dom2.isColumnControlsDecorations)(element) || (0, _dom2.isDragColumnFloatingInsertDot)(element)) {
|
|
323
327
|
var state = view.state,
|
|
324
328
|
dispatch = view.dispatch;
|
|
325
329
|
var _getPluginState6 = (0, _pluginFactory2.getPluginState)(state),
|
|
326
330
|
insertColumnButtonIndex = _getPluginState6.insertColumnButtonIndex;
|
|
327
|
-
var indexSourceElement = isTableMenuUpdatesEnabled ? (0,
|
|
328
|
-
var _getColumnOrRowIndex9 = (0,
|
|
331
|
+
var indexSourceElement = isTableMenuUpdatesEnabled ? (0, _dom2.getIndexAttributeSourceElement)(element) : element;
|
|
332
|
+
var _getColumnOrRowIndex9 = (0, _dom2.getColumnOrRowIndex)(indexSourceElement),
|
|
329
333
|
_getColumnOrRowIndex0 = (0, _slicedToArray2.default)(_getColumnOrRowIndex9, 2),
|
|
330
334
|
startIndex = _getColumnOrRowIndex0[0],
|
|
331
335
|
endIndex = _getColumnOrRowIndex0[1];
|
|
332
|
-
var positionColumn = (0,
|
|
336
|
+
var positionColumn = (0, _dom2.getMousePositionHorizontalRelativeByElement)(event, offsetX, undefined) === 'right' ? endIndex : startIndex;
|
|
333
337
|
if (positionColumn !== insertColumnButtonIndex) {
|
|
334
338
|
return (0, _commands.showInsertColumnButton)(positionColumn)(state, dispatch);
|
|
335
339
|
}
|
|
336
340
|
}
|
|
337
|
-
if ((0,
|
|
341
|
+
if ((0, _dom2.isRowControlsButton)(element) || (0, _dom2.isDragRowFloatingInsertDot)(element)) {
|
|
338
342
|
var _state3 = view.state,
|
|
339
343
|
_dispatch4 = view.dispatch;
|
|
340
344
|
var _getPluginState7 = (0, _pluginFactory2.getPluginState)(_state3),
|
|
341
345
|
insertRowButtonIndex = _getPluginState7.insertRowButtonIndex;
|
|
342
|
-
var _indexSourceElement = isTableMenuUpdatesEnabled ? (0,
|
|
343
|
-
var _getColumnOrRowIndex1 = (0,
|
|
346
|
+
var _indexSourceElement = isTableMenuUpdatesEnabled ? (0, _dom2.getIndexAttributeSourceElement)(element) : element;
|
|
347
|
+
var _getColumnOrRowIndex1 = (0, _dom2.getColumnOrRowIndex)(_indexSourceElement),
|
|
344
348
|
_getColumnOrRowIndex10 = (0, _slicedToArray2.default)(_getColumnOrRowIndex1, 2),
|
|
345
349
|
_startIndex3 = _getColumnOrRowIndex10[0],
|
|
346
350
|
_endIndex2 = _getColumnOrRowIndex10[1];
|
|
347
|
-
var positionRow = (0,
|
|
351
|
+
var positionRow = (0, _dom2.getMousePositionVerticalRelativeByElement)(event) === 'bottom' ? _endIndex2 : _startIndex3;
|
|
348
352
|
if (positionRow !== insertRowButtonIndex) {
|
|
349
353
|
return (0, _commands.showInsertRowButton)(positionRow)(_state3, _dispatch4);
|
|
350
354
|
}
|
|
351
355
|
}
|
|
352
|
-
if (!(0,
|
|
353
|
-
var _positionColumn = (0,
|
|
356
|
+
if (!(0, _dom2.isResizeHandleDecoration)(element) && (0, _dom2.isCell)(element)) {
|
|
357
|
+
var _positionColumn = (0, _dom2.getMousePositionHorizontalRelativeByElement)(event, offsetX, _types.RESIZE_HANDLE_AREA_DECORATION_GAP);
|
|
354
358
|
if (_positionColumn !== null) {
|
|
355
359
|
var _state4 = view.state,
|
|
356
360
|
_dispatch5 = view.dispatch;
|
|
@@ -358,13 +362,13 @@ var handleMouseMoveDebounce = function handleMouseMoveDebounce(nodeViewPortalPro
|
|
|
358
362
|
resizeHandleColumnIndex = _getPluginState8.resizeHandleColumnIndex,
|
|
359
363
|
resizeHandleRowIndex = _getPluginState8.resizeHandleRowIndex;
|
|
360
364
|
var isKeyboardResize = (0, _pluginFactory2.getPluginState)(_state4).isKeyboardResize;
|
|
361
|
-
var _tableCell = (0,
|
|
365
|
+
var _tableCell = (0, _dom.closestElement)(element, 'td, th');
|
|
362
366
|
var cellStartPosition = view.posAtDOM(_tableCell, 0);
|
|
363
367
|
var rect = (0, _utils3.findCellRectClosestToPos)(_state4.doc.resolve(cellStartPosition));
|
|
364
368
|
if (rect) {
|
|
365
369
|
var columnEndIndexTarget = _positionColumn === 'left' ? rect.left : rect.right;
|
|
366
370
|
var rowIndexTarget = rect.top;
|
|
367
|
-
if ((columnEndIndexTarget !== resizeHandleColumnIndex || rowIndexTarget !== resizeHandleRowIndex || !(0,
|
|
371
|
+
if ((columnEndIndexTarget !== resizeHandleColumnIndex || rowIndexTarget !== resizeHandleRowIndex || !(0, _dom2.hasResizeHandler)({
|
|
368
372
|
target: element,
|
|
369
373
|
columnEndIndexTarget: columnEndIndexTarget
|
|
370
374
|
})) && !isKeyboardResize // if initiated by keyboard don't need to react on hover for other resize sliders
|
|
@@ -422,9 +426,9 @@ var handleCut = exports.handleCut = function handleCut(oldTr, oldState, newState
|
|
|
422
426
|
var cellSelection = new _cellSelection.CellSelection($anchorCell, $headCell);
|
|
423
427
|
tr.setSelection(cellSelection);
|
|
424
428
|
if (tr.selection instanceof _cellSelection.CellSelection) {
|
|
425
|
-
var rect = (0,
|
|
429
|
+
var rect = (0, _getSelectionRect.getSelectionRect)(cellSelection);
|
|
426
430
|
if (rect) {
|
|
427
|
-
var _getSelectedCellInfo = (0,
|
|
431
|
+
var _getSelectedCellInfo = (0, _analytics.getSelectedCellInfo)(tr.selection),
|
|
428
432
|
verticalCells = _getSelectedCellInfo.verticalCells,
|
|
429
433
|
horizontalCells = _getSelectedCellInfo.horizontalCells,
|
|
430
434
|
totalCells = _getSelectedCellInfo.totalCells,
|
|
@@ -433,8 +437,8 @@ var handleCut = exports.handleCut = function handleCut(oldTr, oldState, newState
|
|
|
433
437
|
|
|
434
438
|
// Reassigning to make it more obvious and consistent
|
|
435
439
|
editorAnalyticsAPI === null || editorAnalyticsAPI === void 0 || editorAnalyticsAPI.attachAnalyticsEvent({
|
|
436
|
-
action:
|
|
437
|
-
actionSubject:
|
|
440
|
+
action: _tableEvents.TABLE_ACTION.CUT,
|
|
441
|
+
actionSubject: _enums.ACTION_SUBJECT.TABLE,
|
|
438
442
|
actionSubjectId: null,
|
|
439
443
|
attributes: {
|
|
440
444
|
verticalCells: verticalCells,
|
|
@@ -443,14 +447,14 @@ var handleCut = exports.handleCut = function handleCut(oldTr, oldState, newState
|
|
|
443
447
|
totalRowCount: totalRowCount,
|
|
444
448
|
totalColumnCount: totalColumnCount
|
|
445
449
|
},
|
|
446
|
-
eventType:
|
|
450
|
+
eventType: _enums.EVENT_TYPE.TRACK
|
|
447
451
|
})(tr);
|
|
448
452
|
|
|
449
453
|
// Need this check again since we are overriding the tr in previous statement
|
|
450
454
|
if (tr.selection instanceof _cellSelection.CellSelection) {
|
|
451
455
|
var isTableSelected = tr.selection.isRowSelection() && tr.selection.isColSelection();
|
|
452
456
|
if (isTableSelected) {
|
|
453
|
-
tr = (0,
|
|
457
|
+
tr = (0, _removeTable.removeTable)(tr);
|
|
454
458
|
} else if (tr.selection.isRowSelection()) {
|
|
455
459
|
var _getPluginState9 = (0, _pluginFactory2.getPluginState)(newState),
|
|
456
460
|
isHeaderRowRequired = _getPluginState9.pluginConfig.isHeaderRowRequired;
|
|
@@ -500,7 +504,7 @@ var trackCellLocation = function trackCellLocation(view, mouseEvent) {
|
|
|
500
504
|
|
|
501
505
|
// Ignored via go/ees005
|
|
502
506
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
503
|
-
var tableElement = (0,
|
|
507
|
+
var tableElement = (0, _dom.closestElement)(target, 'table');
|
|
504
508
|
|
|
505
509
|
// hover will only trigger if target localId is the same with selected localId
|
|
506
510
|
if (tableElement !== null && tableElement !== void 0 && (_tableElement$dataset = tableElement.dataset) !== null && _tableElement$dataset !== void 0 && _tableElement$dataset.tableLocalId && tableElement.dataset.tableLocalId !== (tableNode === null || tableNode === void 0 ? void 0 : tableNode.attrs.localId)) {
|
|
@@ -512,7 +516,7 @@ var trackCellLocation = function trackCellLocation(view, mouseEvent) {
|
|
|
512
516
|
var htmlColIndex = maybeTableCell.cellIndex;
|
|
513
517
|
// Ignored via go/ees005
|
|
514
518
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
515
|
-
var rowElement = (0,
|
|
519
|
+
var rowElement = (0, _dom.closestElement)(target, 'tr');
|
|
516
520
|
var htmlRowIndex = rowElement && rowElement.rowIndex;
|
|
517
521
|
var rowIndex = maybeTableCell.rowSpan > 1 && mouseEvent instanceof MouseEvent && isTableMenuUpdatesEnabled ? (_getRowIndexByMousePo = (0, _rowControls.getRowIndexByMousePosition)(tableRef, mouseEvent, {
|
|
518
522
|
startIndex: htmlRowIndex,
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.GlobalStylesWrapper = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
|
-
var
|
|
8
|
+
var _useSharedPluginStateWithSelector = require("@atlaskit/editor-common/useSharedPluginStateWithSelector");
|
|
9
9
|
var _commonStyles = require("./common-styles");
|
|
10
10
|
/**
|
|
11
11
|
* @jsxRuntime classic
|
|
@@ -16,7 +16,7 @@ var _commonStyles = require("./common-styles");
|
|
|
16
16
|
var GlobalStylesWrapper = exports.GlobalStylesWrapper = function GlobalStylesWrapper(_ref) {
|
|
17
17
|
var featureFlags = _ref.featureFlags,
|
|
18
18
|
api = _ref.api;
|
|
19
|
-
var _useSharedPluginState = (0,
|
|
19
|
+
var _useSharedPluginState = (0, _useSharedPluginStateWithSelector.useSharedPluginStateWithSelector)(api, ['editorViewMode'], function (states) {
|
|
20
20
|
var _states$editorViewMod;
|
|
21
21
|
return {
|
|
22
22
|
mode: (_states$editorViewMod = states.editorViewModeState) === null || _states$editorViewMod === void 0 ? void 0 : _states$editorViewMod.mode
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.useInternalTablePluginStateSelector = void 0;
|
|
7
|
-
var _useSharedPluginStateSelector = require("@atlaskit/editor-common/
|
|
7
|
+
var _useSharedPluginStateSelector = require("@atlaskit/editor-common/useSharedPluginStateSelector");
|
|
8
8
|
/**
|
|
9
9
|
* **This hook is only for internal use and should not be used outside of the table plugin.**
|
|
10
10
|
*
|
|
@@ -6,10 +6,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.SortingIconWrapper = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var
|
|
10
|
-
var
|
|
9
|
+
var _SortingIcon = _interopRequireDefault(require("@atlaskit/editor-common/table/SortingIcon"));
|
|
10
|
+
var _useSharedPluginStateWithSelector = require("@atlaskit/editor-common/useSharedPluginStateWithSelector");
|
|
11
11
|
var SortingIconWrapper = exports.SortingIconWrapper = function SortingIconWrapper(props) {
|
|
12
|
-
var _useSharedPluginState = (0,
|
|
12
|
+
var _useSharedPluginState = (0, _useSharedPluginStateWithSelector.useSharedPluginStateWithSelector)(props.api, ['editorViewMode'], function (states) {
|
|
13
13
|
var _states$editorViewMod;
|
|
14
14
|
return {
|
|
15
15
|
mode: (_states$editorViewMod = states.editorViewModeState) === null || _states$editorViewMod === void 0 ? void 0 : _states$editorViewMod.mode
|
|
@@ -21,5 +21,5 @@ var SortingIconWrapper = exports.SortingIconWrapper = function SortingIconWrappe
|
|
|
21
21
|
}
|
|
22
22
|
// Ignored via go/ees005
|
|
23
23
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
24
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
24
|
+
return /*#__PURE__*/_react.default.createElement(_SortingIcon.default, props);
|
|
25
25
|
};
|
|
@@ -9,9 +9,9 @@ exports.TableQuickInsertMenuItem = void 0;
|
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _reactIntl = require("react-intl");
|
|
11
11
|
var _keymaps = require("@atlaskit/editor-common/keymaps");
|
|
12
|
-
var
|
|
12
|
+
var _insertBlock = require("@atlaskit/editor-common/messages/insert-block");
|
|
13
13
|
var _menuItem = require("@atlaskit/editor-common/quick-insert/menu-item");
|
|
14
|
-
var
|
|
14
|
+
var _messages = require("@atlaskit/editor-common/quick-insert/messages");
|
|
15
15
|
var _grid = _interopRequireDefault(require("@atlaskit/icon/core/grid"));
|
|
16
16
|
var _insertTableFromQuickInsert = require("./insertTableFromQuickInsert");
|
|
17
17
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
@@ -26,7 +26,7 @@ var TableQuickInsertMenuItem = exports.TableQuickInsertMenuItem = function Table
|
|
|
26
26
|
return previewImageUrls ? {
|
|
27
27
|
image: previewImageUrls,
|
|
28
28
|
attribution: {
|
|
29
|
-
name: formatMessage(
|
|
29
|
+
name: formatMessage(_messages.messages.previewAttributionAtlassian)
|
|
30
30
|
}
|
|
31
31
|
} : undefined;
|
|
32
32
|
}, [formatMessage, previewImageUrls]);
|
|
@@ -44,13 +44,13 @@ var TableQuickInsertMenuItem = exports.TableQuickInsertMenuItem = function Table
|
|
|
44
44
|
});
|
|
45
45
|
}, [api, isTableSelectorEnabled, options]);
|
|
46
46
|
return /*#__PURE__*/_react.default.createElement(_menuItem.QuickInsertMenuItem, {
|
|
47
|
-
description: formatMessage(
|
|
47
|
+
description: formatMessage(_insertBlock.toolbarInsertBlockMessages.tableDescription),
|
|
48
48
|
iconBefore: /*#__PURE__*/_react.default.createElement(_grid.default, {
|
|
49
49
|
label: ""
|
|
50
50
|
}),
|
|
51
51
|
onSelect: onSelect,
|
|
52
52
|
preview: preview,
|
|
53
53
|
shortcut: (0, _keymaps.tooltip)(_keymaps.toggleTable),
|
|
54
|
-
title: formatMessage(
|
|
54
|
+
title: formatMessage(_insertBlock.toolbarInsertBlockMessages.table)
|
|
55
55
|
});
|
|
56
56
|
};
|
|
@@ -8,7 +8,7 @@ exports.getTableQuickInsertComponents = void 0;
|
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
|
10
10
|
var _keymaps = require("@atlaskit/editor-common/keymaps");
|
|
11
|
-
var
|
|
11
|
+
var _insertBlock = require("@atlaskit/editor-common/messages/insert-block");
|
|
12
12
|
var _createQuickInsertMatcher = require("@atlaskit/editor-common/quick-insert/create-quick-insert-matcher");
|
|
13
13
|
var _keys = require("@atlaskit/editor-common/quick-insert/keys");
|
|
14
14
|
var _rank = require("@atlaskit/editor-common/quick-insert/rank");
|
|
@@ -30,10 +30,10 @@ var getTableQuickInsertComponents = exports.getTableQuickInsertComponents = func
|
|
|
30
30
|
match: (0, _createQuickInsertMatcher.createQuickInsertMatcher)(function (_ref2) {
|
|
31
31
|
var formatMessage = _ref2.formatMessage;
|
|
32
32
|
return {
|
|
33
|
-
description: formatMessage(
|
|
33
|
+
description: formatMessage(_insertBlock.toolbarInsertBlockMessages.tableDescription),
|
|
34
34
|
keywords: ['cell', 'table'],
|
|
35
35
|
shortcut: (0, _keymaps.tooltip)(_keymaps.toggleTable),
|
|
36
|
-
title: formatMessage(
|
|
36
|
+
title: formatMessage(_insertBlock.toolbarInsertBlockMessages.table)
|
|
37
37
|
};
|
|
38
38
|
}),
|
|
39
39
|
component: function component() {
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.insertTableFromQuickInsert = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
-
var
|
|
9
|
+
var _enums = require("@atlaskit/editor-common/analytics/types/enums");
|
|
10
10
|
var _nesting = require("@atlaskit/editor-common/nesting");
|
|
11
11
|
var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
12
12
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
@@ -56,16 +56,16 @@ var insertTableFromQuickInsert = exports.insertTableFromQuickInsert = function i
|
|
|
56
56
|
tr = insert(tableNode);
|
|
57
57
|
}
|
|
58
58
|
api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 || _api$analytics.actions.attachAnalyticsEvent({
|
|
59
|
-
action:
|
|
60
|
-
actionSubject:
|
|
61
|
-
actionSubjectId:
|
|
59
|
+
action: _enums.ACTION.INSERTED,
|
|
60
|
+
actionSubject: _enums.ACTION_SUBJECT.DOCUMENT,
|
|
61
|
+
actionSubjectId: _enums.ACTION_SUBJECT_ID.TABLE,
|
|
62
62
|
attributes: _objectSpread({
|
|
63
63
|
inputMethod: inputMethod,
|
|
64
64
|
localId: tableNode.attrs.localId
|
|
65
65
|
}, (0, _expValEquals.expValEquals)('platform_editor_nest_table_in_panel', 'isEnabled', true) ? {
|
|
66
66
|
parentNode: (_tr$selection$$from$n = tr.selection.$from.node(-1)) === null || _tr$selection$$from$n === void 0 ? void 0 : _tr$selection$$from$n.type.name
|
|
67
67
|
} : {}),
|
|
68
|
-
eventType:
|
|
68
|
+
eventType: _enums.EVENT_TYPE.TRACK
|
|
69
69
|
})(tr);
|
|
70
70
|
return tr;
|
|
71
71
|
};
|
|
@@ -7,8 +7,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.roundedTableOverrides = void 0;
|
|
8
8
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
9
|
var _react = require("@emotion/react");
|
|
10
|
-
var
|
|
11
|
-
var
|
|
10
|
+
var _table = require("@atlaskit/editor-common/styles/table");
|
|
11
|
+
var _constants = require("@atlaskit/editor-shared-styles/constants");
|
|
12
12
|
var _consts = require("@atlaskit/editor-shared-styles/consts");
|
|
13
13
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
14
14
|
var _types = require("../types");
|
|
@@ -36,13 +36,13 @@ var roundedTableCellCornerInteractionOverlayStyles = function roundedTableCellCo
|
|
|
36
36
|
return (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n\t.", " > table {\n\t\t> tbody > tr > td[data-reaches-top][data-reaches-left],\n\t\t> tbody > tr > th[data-reaches-top][data-reaches-left] {\n\t\t\t&::after,\n\t\t\t&::before,\n\t\t\t&.", "::after,\n\t\t\t\t&.", ".", "::after {\n\t\t\t\tborder-top-left-radius: ", ";\n\t\t\t}\n\t\t}\n\n\t\t> tbody > tr > td[data-reaches-top][data-reaches-right],\n\t\t> tbody > tr > th[data-reaches-top][data-reaches-right] {\n\t\t\t&::after,\n\t\t\t&::before,\n\t\t\t&.", "::after,\n\t\t\t\t&.", ".", "::after {\n\t\t\t\tborder-top-right-radius: ", ";\n\t\t\t}\n\t\t}\n\n\t\t> tbody > tr > td[data-reaches-bottom][data-reaches-left],\n\t\t> tbody > tr > th[data-reaches-bottom][data-reaches-left] {\n\t\t\t&::after,\n\t\t\t&::before,\n\t\t\t&.", "::after,\n\t\t\t\t&.", ".", "::after {\n\t\t\t\tborder-bottom-left-radius: ", ";\n\t\t\t}\n\t\t}\n\n\t\t> tbody > tr > td[data-reaches-bottom][data-reaches-right],\n\t\t> tbody > tr > th[data-reaches-bottom][data-reaches-right] {\n\t\t\t&::after,\n\t\t\t&::before,\n\t\t\t&.", "::after,\n\t\t\t\t&.", ".", "::after {\n\t\t\t\tborder-bottom-right-radius: ", ";\n\t\t\t}\n\t\t}\n\t}\n"])), _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _types.TableCssClassName.HOVERED_NO_HIGHLIGHT, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, "var(--ds-radius-xlarge, 12px)", _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _types.TableCssClassName.HOVERED_NO_HIGHLIGHT, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, "var(--ds-radius-xlarge, 12px)", _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _types.TableCssClassName.HOVERED_NO_HIGHLIGHT, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, "var(--ds-radius-xlarge, 12px)", _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _types.TableCssClassName.HOVERED_NO_HIGHLIGHT, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, "var(--ds-radius-xlarge, 12px)");
|
|
37
37
|
};
|
|
38
38
|
var roundedTableInteractionOverlayStyles = function roundedTableInteractionOverlayStyles() {
|
|
39
|
-
return (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n\t.", " > table {\n\t\t/* Active-cell highlight base properties (replaces activeCellHighlightStyles).\n\t\t width/height: auto overrides the base cell ::after which uses width: 100%; height: 100%,\n\t\t so that left/right/top/bottom determine the size instead. */\n\t\ttd.", ".", "::after,\n\t\t\tth.", ".", "::after {\n\t\t\tborder: 1px solid ", ";\n\t\t\tbox-shadow: ", ";\n\t\t\tcontent: '';\n\t\t\tposition: absolute;\n\t\t\ttop: -1px;\n\t\t\tleft: -1px;\n\t\t\tright: -1px;\n\t\t\tbottom: -1px;\n\t\t\twidth: auto;\n\t\t\theight: auto;\n\t\t\tz-index: ", ";\n\t\t\tpointer-events: none;\n\t\t}\n\n\t\t/* Normalize selected/hover/danger overlays to the same box model as active-cell.\n\t\t width/height: auto overrides the base cell ::after which uses width: 100%; height: 100%. */\n\t\ttd.", "::after,\n\t\t\ttd.", "::after,\n\t\t\tth.", ".", "::after,\n\t\t\tth.", ".", "::after,\n\t\t\tth.", ".", "::after,\n\t\t\ttd.", ".", "::after {\n\t\t\tleft: -1px;\n\t\t\tright: -1px;\n\t\t\ttop: -1px;\n\t\t\tbottom: -1px;\n\t\t\twidth: auto;\n\t\t\theight: auto;\n\t\t}\n\n\t\t/* Preserve interaction border colours on table edges without changing the shared -1px overlay inset. */\n\t\t> tbody\n\t\t\t> tr\n\t\t\t> td:is(\n\t\t\t\t.", ", .", ", .", "\n\t\t\t),\n\t\t> tbody\n\t\t\t> tr\n\t\t\t> th:is(\n\t\t\t\t.", ", .", ", .", "\n\t\t\t) {\n\t\t\t&[data-reaches-top] {\n\t\t\t\tborder-top-color: transparent;\n\n\t\t\t\t&::after {\n\t\t\t\t\ttop: -1px;\n\t\t\t\t\tbottom: -1px;\n\t\t\t\t\tborder-top-color: ", ";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t&[data-reaches-left] {\n\t\t\t\tborder-left-color: transparent;\n\n\t\t\t\t&::after {\n\t\t\t\t\tborder-left-color: ", ";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t&[data-reaches-right] {\n\t\t\t\tborder-right-color: transparent;\n\n\t\t\t\t&::after {\n\t\t\t\t\tborder-right-color: ", ";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t&[data-reaches-bottom] {\n\t\t\t\tborder-bottom-color: transparent;\n\n\t\t\t\t&::after {\n\t\t\t\t\tborder-bottom-color: ", ";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t> tbody\n\t\t\t> tr\n\t\t\t> td.", ",\n\t\t\t> tbody\n\t\t\t> tr\n\t\t\t> th.", " {\n\t\t\t&[data-reaches-top] {\n\t\t\t\tborder-top-color: transparent;\n\n\t\t\t\t&::after {\n\t\t\t\t\ttop: -1px;\n\t\t\t\t\tbottom: -1px;\n\t\t\t\t\tborder-top-color: ", ";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t&[data-reaches-left] {\n\t\t\t\tborder-left-color: transparent;\n\n\t\t\t\t&::after {\n\t\t\t\t\tborder-left-color: ", ";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t&[data-reaches-right] {\n\t\t\t\tborder-right-color: transparent;\n\n\t\t\t\t&::after {\n\t\t\t\t\tborder-right-color: ", ";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t&[data-reaches-bottom] {\n\t\t\t\tborder-bottom-color: transparent;\n\n\t\t\t\t&::after {\n\t\t\t\t\tborder-bottom-color: ", ";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n"])), _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.TABLE_CELL, _types.TableCssClassName.ACTIVE_CURSOR_CELL, _types.TableCssClassName.TABLE_HEADER_CELL, _types.TableCssClassName.ACTIVE_CURSOR_CELL, "var(--ds-border-selected, #1868DB)", "var(--ds-shadow-raised, 0px 1px 1px #1E1F2140, 0px 0px 1px #1E1F214f)",
|
|
39
|
+
return (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n\t.", " > table {\n\t\t/* Active-cell highlight base properties (replaces activeCellHighlightStyles).\n\t\t width/height: auto overrides the base cell ::after which uses width: 100%; height: 100%,\n\t\t so that left/right/top/bottom determine the size instead. */\n\t\ttd.", ".", "::after,\n\t\t\tth.", ".", "::after {\n\t\t\tborder: 1px solid ", ";\n\t\t\tbox-shadow: ", ";\n\t\t\tcontent: '';\n\t\t\tposition: absolute;\n\t\t\ttop: -1px;\n\t\t\tleft: -1px;\n\t\t\tright: -1px;\n\t\t\tbottom: -1px;\n\t\t\twidth: auto;\n\t\t\theight: auto;\n\t\t\tz-index: ", ";\n\t\t\tpointer-events: none;\n\t\t}\n\n\t\t/* Normalize selected/hover/danger overlays to the same box model as active-cell.\n\t\t width/height: auto overrides the base cell ::after which uses width: 100%; height: 100%. */\n\t\ttd.", "::after,\n\t\t\ttd.", "::after,\n\t\t\tth.", ".", "::after,\n\t\t\tth.", ".", "::after,\n\t\t\tth.", ".", "::after,\n\t\t\ttd.", ".", "::after {\n\t\t\tleft: -1px;\n\t\t\tright: -1px;\n\t\t\ttop: -1px;\n\t\t\tbottom: -1px;\n\t\t\twidth: auto;\n\t\t\theight: auto;\n\t\t}\n\n\t\t/* Preserve interaction border colours on table edges without changing the shared -1px overlay inset. */\n\t\t> tbody\n\t\t\t> tr\n\t\t\t> td:is(\n\t\t\t\t.", ", .", ", .", "\n\t\t\t),\n\t\t> tbody\n\t\t\t> tr\n\t\t\t> th:is(\n\t\t\t\t.", ", .", ", .", "\n\t\t\t) {\n\t\t\t&[data-reaches-top] {\n\t\t\t\tborder-top-color: transparent;\n\n\t\t\t\t&::after {\n\t\t\t\t\ttop: -1px;\n\t\t\t\t\tbottom: -1px;\n\t\t\t\t\tborder-top-color: ", ";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t&[data-reaches-left] {\n\t\t\t\tborder-left-color: transparent;\n\n\t\t\t\t&::after {\n\t\t\t\t\tborder-left-color: ", ";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t&[data-reaches-right] {\n\t\t\t\tborder-right-color: transparent;\n\n\t\t\t\t&::after {\n\t\t\t\t\tborder-right-color: ", ";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t&[data-reaches-bottom] {\n\t\t\t\tborder-bottom-color: transparent;\n\n\t\t\t\t&::after {\n\t\t\t\t\tborder-bottom-color: ", ";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t> tbody\n\t\t\t> tr\n\t\t\t> td.", ",\n\t\t\t> tbody\n\t\t\t> tr\n\t\t\t> th.", " {\n\t\t\t&[data-reaches-top] {\n\t\t\t\tborder-top-color: transparent;\n\n\t\t\t\t&::after {\n\t\t\t\t\ttop: -1px;\n\t\t\t\t\tbottom: -1px;\n\t\t\t\t\tborder-top-color: ", ";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t&[data-reaches-left] {\n\t\t\t\tborder-left-color: transparent;\n\n\t\t\t\t&::after {\n\t\t\t\t\tborder-left-color: ", ";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t&[data-reaches-right] {\n\t\t\t\tborder-right-color: transparent;\n\n\t\t\t\t&::after {\n\t\t\t\t\tborder-right-color: ", ";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t&[data-reaches-bottom] {\n\t\t\t\tborder-bottom-color: transparent;\n\n\t\t\t\t&::after {\n\t\t\t\t\tborder-bottom-color: ", ";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n"])), _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.TABLE_CELL, _types.TableCssClassName.ACTIVE_CURSOR_CELL, _types.TableCssClassName.TABLE_HEADER_CELL, _types.TableCssClassName.ACTIVE_CURSOR_CELL, "var(--ds-border-selected, #1868DB)", "var(--ds-shadow-raised, 0px 1px 1px #1E1F2140, 0px 0px 1px #1E1F214f)", _constants.akEditorSmallZIndex, _types.TableCssClassName.HOVERED_CELL, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.TABLE_HEADER_CELL, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.TABLE_HEADER_CELL, _types.TableCssClassName.HOVERED_CELL, _types.TableCssClassName.TABLE_HEADER_CELL, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _types.TableCssClassName.TABLE_CELL, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.HOVERED_CELL, _types.TableCssClassName.ACTIVE_CURSOR_CELL, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.HOVERED_CELL, _types.TableCssClassName.ACTIVE_CURSOR_CELL, _consts2.tableBorderSelectedColor, _consts2.tableBorderSelectedColor, _consts2.tableBorderSelectedColor, _consts2.tableBorderSelectedColor, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _consts2.tableBorderDeleteColor, _consts2.tableBorderDeleteColor, _consts2.tableBorderDeleteColor, _consts2.tableBorderDeleteColor);
|
|
40
40
|
};
|
|
41
41
|
var roundedTableSelectedNodeStyles = function roundedTableSelectedNodeStyles() {
|
|
42
|
-
return (0, _react.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n\t.", ".", "\n\t\t> .", "\n\t\t> .", "\n\t\t> table,\n\t.", ".", "\n\t\t> [data-testid='table-alignment-container']\n\t\t> .", "\n\t\t> .resizer-item\n\t\t> .resizer-hover-zone\n\t\t> .", "\n\t\t> .", "\n\t\t> table {\n\t\t/* Make a node-selected table look identical to a cell-selected one by mirroring the\n\t\t .selectedCell single-::after overlay model (getSelectionStyles is blocked for this path). */\n\n\t\t/* Recolour the single table-level rounded outer overlay to the selected colour. */\n\t\t&::after {\n\t\t\tborder-color: ", ";\n\t\t}\n\n\t\t> tbody > tr > td,\n\t\t> tbody > tr > th {\n\t\t\t/* position: relative anchors the overlay (the blocked blanket used to provide it);\n\t\t\t transparent border + the ::after overlay below replicate .selectedCell exactly. */\n\t\t\tposition: relative;\n\t\t\tborder-color: transparent;\n\n\t\t\t&::after {\n\t\t\t\tcontent: '';\n\t\t\t\tposition: absolute;\n\t\t\t\tleft: -1px;\n\t\t\t\tright: -1px;\n\t\t\t\ttop: -1px;\n\t\t\t\tbottom: -1px;\n\t\t\t\twidth: auto;\n\t\t\t\theight: auto;\n\t\t\t\tborder: 1px solid ", ";\n\t\t\t\tbackground: ", ";\n\t\t\t\tz-index: ", ";\n\t\t\t\tpointer-events: none;\n\t\t\t}\n\t\t}\n\t}\n"])), _types.TableCssClassName.NODEVIEW_WRAPPER,
|
|
42
|
+
return (0, _react.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n\t.", ".", "\n\t\t> .", "\n\t\t> .", "\n\t\t> table,\n\t.", ".", "\n\t\t> [data-testid='table-alignment-container']\n\t\t> .", "\n\t\t> .resizer-item\n\t\t> .resizer-hover-zone\n\t\t> .", "\n\t\t> .", "\n\t\t> table {\n\t\t/* Make a node-selected table look identical to a cell-selected one by mirroring the\n\t\t .selectedCell single-::after overlay model (getSelectionStyles is blocked for this path). */\n\n\t\t/* Recolour the single table-level rounded outer overlay to the selected colour. */\n\t\t&::after {\n\t\t\tborder-color: ", ";\n\t\t}\n\n\t\t> tbody > tr > td,\n\t\t> tbody > tr > th {\n\t\t\t/* position: relative anchors the overlay (the blocked blanket used to provide it);\n\t\t\t transparent border + the ::after overlay below replicate .selectedCell exactly. */\n\t\t\tposition: relative;\n\t\t\tborder-color: transparent;\n\n\t\t\t&::after {\n\t\t\t\tcontent: '';\n\t\t\t\tposition: absolute;\n\t\t\t\tleft: -1px;\n\t\t\t\tright: -1px;\n\t\t\t\ttop: -1px;\n\t\t\t\tbottom: -1px;\n\t\t\t\twidth: auto;\n\t\t\t\theight: auto;\n\t\t\t\tborder: 1px solid ", ";\n\t\t\t\tbackground: ", ";\n\t\t\t\tz-index: ", ";\n\t\t\t\tpointer-events: none;\n\t\t\t}\n\t\t}\n\t}\n"])), _types.TableCssClassName.NODEVIEW_WRAPPER, _constants.akEditorSelectedNodeClassName, _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.NODEVIEW_WRAPPER, _constants.akEditorSelectedNodeClassName, _types.TableCssClassName.TABLE_RESIZER_CONTAINER, _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.TABLE_NODE_WRAPPER, _consts2.tableBorderSelectedColor, _consts2.tableBorderSelectedColor, _consts2.tableCellSelectedColor, _constants.akEditorSmallZIndex);
|
|
43
43
|
};
|
|
44
44
|
var roundedTableNumberedColumnStyles = function roundedTableNumberedColumnStyles() {
|
|
45
|
-
return (0, _react.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n\t/* Numbered columns are separate, so they need their own rounded edge owner. */\n\t.", "[data-number-column='true'] {\n\t\t/* Override the inline/container left border and replace it with one rounded pseudo-border. */\n\t\t> .", "\n\t\t\t.", ",\n\t\t\t> .", "\n\t\t\t.", " {\n\t\t\tposition: relative;\n\t\t\tborder-left: 0;\n\n\t\t\t&::before {\n\t\t\t\tcontent: '';\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: 0;\n\t\t\t\tleft: 0;\n\t\t\t\tbottom: 0;\n\t\t\t\twidth: 100%;\n\t\t\t\tborder-left: 1px solid ", ";\n\t\t\t\tborder-top-left-radius: ", ";\n\t\t\t\tborder-bottom-left-radius: ", ";\n\t\t\t\tpointer-events: none;\n\t\t\t\tz-index: ", ";\n\t\t\t}\n\t\t}\n\n\t\t/* Prevent individual number buttons from drawing a straight left border. */\n\t\t> .", "\n\t\t\t.", ",\n\t\t\t> .", "\n\t\t\t.", " {\n\t\t\tborder-left-color: transparent;\n\t\t}\n\n\t\t> .", "\n\t\t\t.", ".", ",\n\t\t\t> .", "\n\t\t\t.", ".", ",\n\t\t\t> .", "\n\t\t\t.", ".", ",\n\t\t\t> .", "\n\t\t\t.", ".", ",\n\t\t\t> .", "\n\t\t\t.", ".active,\n\t\t\t> .", "\n\t\t\t.", ".active {\n\t\t\tborder-left-color: transparent;\n\t\t}\n\n\t\t/* When numbered column is present, the visual left edge belongs to the number column widget.\n\t\t Zero out any left-side border-radius on the cell and its overlays/pseudo-borders \u2014\n\t\t but leave right-side radii untouched so right-edge cells still round correctly.\n\t\t ::before is intentionally excluded here because on the sticky header it carries the\n\t\t numbered-column mask which needs to round its own top-left corner (see overrides\n\t\t below and in roundedTableStickyHeaderStyles). */\n\t\t> .", "\n\t\t\t> table\n\t\t\t> tbody\n\t\t\t> tr\n\t\t\t> th[data-reaches-top][data-reaches-left],\n\t\t> .", "\n\t\t\t> table\n\t\t\t> tbody\n\t\t\t> tr\n\t\t\t> td[data-reaches-top][data-reaches-left] {\n\t\t\tborder-top-left-radius: 0;\n\n\t\t\t&::after {\n\t\t\t\tborder-top-left-radius: 0;\n\t\t\t}\n\t\t}\n\n\t\t> .", "\n\t\t\t> table\n\t\t\t> tbody\n\t\t\t> tr\n\t\t\t> th[data-reaches-bottom][data-reaches-left],\n\t\t> .", "\n\t\t\t> table\n\t\t\t> tbody\n\t\t\t> tr\n\t\t\t> td[data-reaches-bottom][data-reaches-left] {\n\t\t\tborder-bottom-left-radius: 0;\n\n\t\t\t&::after,\n\t\t\t&::before {\n\t\t\t\tborder-bottom-left-radius: 0;\n\t\t\t}\n\t\t}\n\n\t\t/* Preserve rounded numbered-column corners across normal, active, and danger states. */\n\t\t.", ":first-of-type,\n\t\t\t.", ".", ":first-of-type,\n\t\t\t.", ".", ":first-of-type,\n\t\t\t.", ".active:first-of-type {\n\t\t\tborder-top-left-radius: ", ";\n\t\t}\n\n\t\t.", ":last-of-type,\n\t\t\t.", ".", ":last-of-type,\n\t\t\t.", ".", ":last-of-type,\n\t\t\t.", ".active:last-of-type {\n\t\t\tborder-bottom-left-radius: ", ";\n\t\t}\n\n\t\t.", ".", ":first-of-type::after {\n\t\t\tborder-top-left-radius: ", ";\n\t\t}\n\n\t\t.", ".", ":last-of-type::after {\n\t\t\tborder-bottom-left-radius: ", ";\n\t\t}\n\n\t\t/* Sticky numbered-column mask also needs the same top-left radius. */\n\t\t> .", "\n\t\t\ttr\n\t\t\tth[data-reaches-top][data-reaches-left]::before {\n\t\t\tborder-top-left-radius: ", ";\n\t\t}\n\t}\n"])), _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.ROW_CONTROLS_WRAPPER, _types.TableCssClassName.NUMBERED_COLUMN, _types.TableCssClassName.DRAG_ROW_CONTROLS_WRAPPER, _types.TableCssClassName.NUMBERED_COLUMN, _consts2.tableBorderColor, "var(--ds-radius-xlarge, 12px)", "var(--ds-radius-xlarge, 12px)",
|
|
45
|
+
return (0, _react.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n\t/* Numbered columns are separate, so they need their own rounded edge owner. */\n\t.", "[data-number-column='true'] {\n\t\t/* Override the inline/container left border and replace it with one rounded pseudo-border. */\n\t\t> .", "\n\t\t\t.", ",\n\t\t\t> .", "\n\t\t\t.", " {\n\t\t\tposition: relative;\n\t\t\tborder-left: 0;\n\n\t\t\t&::before {\n\t\t\t\tcontent: '';\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: 0;\n\t\t\t\tleft: 0;\n\t\t\t\tbottom: 0;\n\t\t\t\twidth: 100%;\n\t\t\t\tborder-left: 1px solid ", ";\n\t\t\t\tborder-top-left-radius: ", ";\n\t\t\t\tborder-bottom-left-radius: ", ";\n\t\t\t\tpointer-events: none;\n\t\t\t\tz-index: ", ";\n\t\t\t}\n\t\t}\n\n\t\t/* Prevent individual number buttons from drawing a straight left border. */\n\t\t> .", "\n\t\t\t.", ",\n\t\t\t> .", "\n\t\t\t.", " {\n\t\t\tborder-left-color: transparent;\n\t\t}\n\n\t\t> .", "\n\t\t\t.", ".", ",\n\t\t\t> .", "\n\t\t\t.", ".", ",\n\t\t\t> .", "\n\t\t\t.", ".", ",\n\t\t\t> .", "\n\t\t\t.", ".", ",\n\t\t\t> .", "\n\t\t\t.", ".active,\n\t\t\t> .", "\n\t\t\t.", ".active {\n\t\t\tborder-left-color: transparent;\n\t\t}\n\n\t\t/* When numbered column is present, the visual left edge belongs to the number column widget.\n\t\t Zero out any left-side border-radius on the cell and its overlays/pseudo-borders \u2014\n\t\t but leave right-side radii untouched so right-edge cells still round correctly.\n\t\t ::before is intentionally excluded here because on the sticky header it carries the\n\t\t numbered-column mask which needs to round its own top-left corner (see overrides\n\t\t below and in roundedTableStickyHeaderStyles). */\n\t\t> .", "\n\t\t\t> table\n\t\t\t> tbody\n\t\t\t> tr\n\t\t\t> th[data-reaches-top][data-reaches-left],\n\t\t> .", "\n\t\t\t> table\n\t\t\t> tbody\n\t\t\t> tr\n\t\t\t> td[data-reaches-top][data-reaches-left] {\n\t\t\tborder-top-left-radius: 0;\n\n\t\t\t&::after {\n\t\t\t\tborder-top-left-radius: 0;\n\t\t\t}\n\t\t}\n\n\t\t> .", "\n\t\t\t> table\n\t\t\t> tbody\n\t\t\t> tr\n\t\t\t> th[data-reaches-bottom][data-reaches-left],\n\t\t> .", "\n\t\t\t> table\n\t\t\t> tbody\n\t\t\t> tr\n\t\t\t> td[data-reaches-bottom][data-reaches-left] {\n\t\t\tborder-bottom-left-radius: 0;\n\n\t\t\t&::after,\n\t\t\t&::before {\n\t\t\t\tborder-bottom-left-radius: 0;\n\t\t\t}\n\t\t}\n\n\t\t/* Preserve rounded numbered-column corners across normal, active, and danger states. */\n\t\t.", ":first-of-type,\n\t\t\t.", ".", ":first-of-type,\n\t\t\t.", ".", ":first-of-type,\n\t\t\t.", ".active:first-of-type {\n\t\t\tborder-top-left-radius: ", ";\n\t\t}\n\n\t\t.", ":last-of-type,\n\t\t\t.", ".", ":last-of-type,\n\t\t\t.", ".", ":last-of-type,\n\t\t\t.", ".active:last-of-type {\n\t\t\tborder-bottom-left-radius: ", ";\n\t\t}\n\n\t\t.", ".", ":first-of-type::after {\n\t\t\tborder-top-left-radius: ", ";\n\t\t}\n\n\t\t.", ".", ":last-of-type::after {\n\t\t\tborder-bottom-left-radius: ", ";\n\t\t}\n\n\t\t/* Sticky numbered-column mask also needs the same top-left radius. */\n\t\t> .", "\n\t\t\ttr\n\t\t\tth[data-reaches-top][data-reaches-left]::before {\n\t\t\tborder-top-left-radius: ", ";\n\t\t}\n\t}\n"])), _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.ROW_CONTROLS_WRAPPER, _types.TableCssClassName.NUMBERED_COLUMN, _types.TableCssClassName.DRAG_ROW_CONTROLS_WRAPPER, _types.TableCssClassName.NUMBERED_COLUMN, _consts2.tableBorderColor, "var(--ds-radius-xlarge, 12px)", "var(--ds-radius-xlarge, 12px)", _constants.akEditorUnitZIndex, _types.TableCssClassName.ROW_CONTROLS_WRAPPER, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types.TableCssClassName.DRAG_ROW_CONTROLS_WRAPPER, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types.TableCssClassName.ROW_CONTROLS_WRAPPER, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _types.TableCssClassName.DRAG_ROW_CONTROLS_WRAPPER, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _types.TableCssClassName.ROW_CONTROLS_WRAPPER, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types.TableCssClassName.HOVERED_CELL_ACTIVE, _types.TableCssClassName.DRAG_ROW_CONTROLS_WRAPPER, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types.TableCssClassName.HOVERED_CELL_ACTIVE, _types.TableCssClassName.ROW_CONTROLS_WRAPPER, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types.TableCssClassName.DRAG_ROW_CONTROLS_WRAPPER, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types.TableCssClassName.HOVERED_CELL_ACTIVE, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, "var(--ds-radius-xlarge, 12px)", _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types.TableCssClassName.HOVERED_CELL_ACTIVE, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, "var(--ds-radius-xlarge, 12px)", _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, "var(--ds-radius-xlarge, 12px)", _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, "var(--ds-radius-xlarge, 12px)", _types.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, "var(--ds-radius-xlarge, 12px)");
|
|
46
46
|
};
|
|
47
47
|
var roundedTableStickyHeaderCellCornerStyles = function roundedTableStickyHeaderCellCornerStyles() {
|
|
48
48
|
return (0, _react.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n\t/* Sticky header rows have independent border/shadow/mask painting, so patch the sticky-only painters too. */\n\t.", "\n\t\t> table\n\t\t> tbody\n\t\t> tr.", ",\n\t\t.", "\n\t\t> table.", "\n\t\t> tbody\n\t\t> tr.sticky {\n\t\t> th[data-reaches-left],\n\t\t> td[data-reaches-left] {\n\t\t\tborder-top-left-radius: ", ";\n\n\t\t\t&::after,\n\t\t\t&::before {\n\t\t\t\tborder-top-left-radius: ", ";\n\t\t\t}\n\t\t}\n\n\t\t> td[data-reaches-right],\n\t\t> th[data-reaches-right] {\n\t\t\tborder-top-right-radius: ", ";\n\n\t\t\t&::after,\n\t\t\t&::before {\n\t\t\t\tborder-top-right-radius: ", ";\n\t\t\t}\n\t\t}\n\t}\n\n\t.", " .", "::after {\n\t\tborder-left-color: transparent;\n\t}\n"])), _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.NATIVE_STICKY, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.TABLE_STICKY, "var(--ds-radius-xlarge, 12px)", "var(--ds-radius-xlarge, 12px)", "var(--ds-radius-xlarge, 12px)", "var(--ds-radius-xlarge, 12px)", _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.COLUMN_CONTROLS_DECORATIONS);
|
|
@@ -51,13 +51,13 @@ var roundedTableStickyHeaderNumberColumnStyles = function roundedTableStickyHead
|
|
|
51
51
|
return (0, _react.css)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n\t.", "[data-number-column='true'] .", " tr th[data-reaches-top][data-reaches-left]::before,\n\t.", "[data-number-column='true'] .", " tr.", " th[data-reaches-left]::before,\n\t.", "[data-number-column='true'] .", " .", " th[data-reaches-left]::before {\n\t\tborder-top-left-radius: ", ";\n\t\tborder-bottom: none;\n\t}\n"])), _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, _types.TableCssClassName.NATIVE_STICKY, _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, _types.TableCssClassName.NATIVE_STICKY_ACTIVE, "var(--ds-radius-xlarge, 12px)");
|
|
52
52
|
};
|
|
53
53
|
var roundedTableStickyHeaderCornerMaskStyles = function roundedTableStickyHeaderCornerMaskStyles() {
|
|
54
|
-
return (0, _react.css)(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n\t/* Same z-index as the sticky row; DOM order keeps the row above this mask and the table border below it. */\n\t.", " {\n\t\tdisplay: none;\n\t\tposition: sticky;\n\t\ttop: calc(", "px - 1px);\n\t\twidth: 12px;\n\t\theight: 12px;\n\t\tmargin-bottom: -12px;\n\t\tbackground: ", ";\n\t\tpointer-events: none;\n\t\tz-index: ", ";\n\t}\n\n\t.", "[data-number-column='true']\n\t\t.", "[data-corner='left'] {\n\t\tmargin-left: -", "px;\n\t}\n\n\t.", "[data-corner='right'] {\n\t\tleft: calc(100% - 11px);\n\t}\n\n\t/*\n\t\tScope the :has() selectors to a DIRECT child table so a nested table that\n\t\thas its own sticky row does not pull the OUTER wrapper's masks into the\n\t\tsticky / fallback layout. The masks belong to the wrapper of the table\n\t\tthat owns the sticky row, never to an ancestor wrapper.\n\t*/\n\t.", ":has(> table > tbody > tr.", ".", ")\n\t\t> .", ",\n\t\t.", ":has(> table.", " > tbody > tr.sticky)\n\t\t> .", " {\n\t\tdisplay: block;\n\t}\n\n\t/*\n\t\tWhen the table overflows horizontally, sticky headers fall back from native\n\t\tposition: sticky to a fixed-position header row. Match that positioning so\n\t\tthe corner masks continue to cover the rounded corners in the fallback path.\n\n\t\tThe direct-child combinator inside :has() is critical: without it a nested\n\t\ttable entering the legacy fallback would incorrectly trigger this rule on\n\t\tthe OUTER wrapper, detaching the outer table's masks from its corners.\n\t*/\n\t.", ":has(> table.", " > tbody > tr.sticky)\n\t\t> .", " {\n\t\tposition: fixed;\n\t\ttop: 30px;\n\t\tz-index: 1;\n\t}\n"])), _types.TableCssClassName.TABLE_CORNER_MASK,
|
|
54
|
+
return (0, _react.css)(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n\t/* Same z-index as the sticky row; DOM order keeps the row above this mask and the table border below it. */\n\t.", " {\n\t\tdisplay: none;\n\t\tposition: sticky;\n\t\ttop: calc(", "px - 1px);\n\t\twidth: 12px;\n\t\theight: 12px;\n\t\tmargin-bottom: -12px;\n\t\tbackground: ", ";\n\t\tpointer-events: none;\n\t\tz-index: ", ";\n\t}\n\n\t.", "[data-number-column='true']\n\t\t.", "[data-corner='left'] {\n\t\tmargin-left: -", "px;\n\t}\n\n\t.", "[data-corner='right'] {\n\t\tleft: calc(100% - 11px);\n\t}\n\n\t/*\n\t\tScope the :has() selectors to a DIRECT child table so a nested table that\n\t\thas its own sticky row does not pull the OUTER wrapper's masks into the\n\t\tsticky / fallback layout. The masks belong to the wrapper of the table\n\t\tthat owns the sticky row, never to an ancestor wrapper.\n\t*/\n\t.", ":has(> table > tbody > tr.", ".", ")\n\t\t> .", ",\n\t\t.", ":has(> table.", " > tbody > tr.sticky)\n\t\t> .", " {\n\t\tdisplay: block;\n\t}\n\n\t/*\n\t\tWhen the table overflows horizontally, sticky headers fall back from native\n\t\tposition: sticky to a fixed-position header row. Match that positioning so\n\t\tthe corner masks continue to cover the rounded corners in the fallback path.\n\n\t\tThe direct-child combinator inside :has() is critical: without it a nested\n\t\ttable entering the legacy fallback would incorrectly trigger this rule on\n\t\tthe OUTER wrapper, detaching the outer table's masks from its corners.\n\t*/\n\t.", ":has(> table.", " > tbody > tr.sticky)\n\t\t> .", " {\n\t\tposition: fixed;\n\t\ttop: 30px;\n\t\tz-index: 1;\n\t}\n"])), _types.TableCssClassName.TABLE_CORNER_MASK, _table.tableMarginTop, (0, _expValEquals.expValEquals)('platform_editor_nest_table_in_panel', 'isEnabled', true) ? "var(".concat(_consts.akEditorTableContainerBg, ", ", "var(--ds-surface, #FFFFFF)", ")") : "var(--ds-surface, #FFFFFF)", (0, _stickyHeaderZIndex.getTableZIndexes)().header, _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.TABLE_CORNER_MASK, _constants.akEditorTableNumberColumnWidth, _types.TableCssClassName.TABLE_CORNER_MASK, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.NATIVE_STICKY, _types.TableCssClassName.NATIVE_STICKY_ACTIVE, _types.TableCssClassName.TABLE_CORNER_MASK, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_CORNER_MASK, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_CORNER_MASK);
|
|
55
55
|
};
|
|
56
56
|
var roundedTableStickyHeaderOverlayStyles = function roundedTableStickyHeaderOverlayStyles() {
|
|
57
|
-
return (0, _react.css)(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n\t/*\n\t\tPaint the pinned sticky row's rounded top edge via each cell's ::after.\n\t\ttop: -1px places it in the reserved transparent border slot, aligned with\n\t\tthe row's inset-shadow bottom border. Longhand border-top-* lets\n\t\tinteraction-state rules override only the colour.\n\t*/\n\t.", "\n\t\t> table\n\t\t> tbody\n\t\t> tr.", ".", "\n\t\t> th.", "[data-reaches-top]::after,\n\t\t.", "\n\t\t> table\n\t\t> tbody\n\t\t> tr.", ".", "\n\t\t> td.", "[data-reaches-top]::after {\n\t\tcontent: '';\n\t\tposition: absolute;\n\t\tleft: -1px;\n\t\tright: -1px;\n\t\ttop: -1px;\n\t\tbottom: -1px;\n\t\twidth: auto;\n\t\theight: auto;\n\t\tpointer-events: none;\n\t\tborder-top-width: 1px;\n\t\tborder-top-style: solid;\n\t\tborder-top-color: ", ";\n\t}\n\n\t/* Selection / hover / active-cursor colour for the painted top edge. */\n\t.", "\n\t\t> table\n\t\t> tbody\n\t\t> tr.", ".", "\n\t\t> th.", "[data-reaches-top]:is(\n\t\t\t.", ",\n\t\t\t.", ",\n\t\t\t.", "\n\t\t)::after,\n\t.", "\n\t\t> table\n\t\t> tbody\n\t\t> tr.", ".", "\n\t\t> td.", "[data-reaches-top]:is(\n\t\t\t.", ",\n\t\t\t.", ",\n\t\t\t.", "\n\t\t)::after {\n\t\tborder-top-color: ", ";\n\t}\n\n\t/* Danger colour for the painted top edge. */\n\t.", "\n\t\t> table\n\t\t> tbody\n\t\t> tr.", ".", "\n\t\t> th.", "[data-reaches-top].", "::after,\n\t\t.", "\n\t\t> table\n\t\t> tbody\n\t\t> tr.", ".", "\n\t\t> td.", "[data-reaches-top].", "::after {\n\t\tborder-top-color: ", ";\n\t}\n\n\t:where(.", " > table > tbody > tr.", ")\n\t\t> th.", "[data-reaches-left]::after {\n\t\tborder-left-color: transparent;\n\t}\n\n\t", "\n"])), _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.NATIVE_STICKY, _types.TableCssClassName.NATIVE_STICKY_ACTIVE, _types.TableCssClassName.TABLE_HEADER_CELL, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.NATIVE_STICKY, _types.TableCssClassName.NATIVE_STICKY_ACTIVE, _types.TableCssClassName.TABLE_CELL, _consts2.tableBorderColor, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.NATIVE_STICKY, _types.TableCssClassName.NATIVE_STICKY_ACTIVE, _types.TableCssClassName.TABLE_HEADER_CELL, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.HOVERED_CELL, _types.TableCssClassName.ACTIVE_CURSOR_CELL, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.NATIVE_STICKY, _types.TableCssClassName.NATIVE_STICKY_ACTIVE, _types.TableCssClassName.TABLE_CELL, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.HOVERED_CELL, _types.TableCssClassName.ACTIVE_CURSOR_CELL, _consts2.tableBorderSelectedColor, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.NATIVE_STICKY, _types.TableCssClassName.NATIVE_STICKY_ACTIVE, _types.TableCssClassName.TABLE_HEADER_CELL, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.NATIVE_STICKY, _types.TableCssClassName.NATIVE_STICKY_ACTIVE, _types.TableCssClassName.TABLE_CELL, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _consts2.tableBorderDeleteColor, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.NATIVE_STICKY, _types.TableCssClassName.TABLE_HEADER_CELL, (0, _react.css)(_templateObject0 || (_templateObject0 = (0, _taggedTemplateLiteral2.default)(["\n\t\t/* Node-selected (ak-editor-selected-node) sticky header: the pinned row leaves the table's\n\t\t\t\t rounded overlay behind, so recolour its painted top edge to the selected colour too. */\n\t\t.", ".", "\n\t\t\t.", "\n\t\t\t> table\n\t\t\t> tbody\n\t\t\t> tr.", ".", "\n\t\t\t> th.", "[data-reaches-top]::after,\n\t\t\t.", ".", "\n\t\t\t.", "\n\t\t\t> table\n\t\t\t> tbody\n\t\t\t> tr.", ".", "\n\t\t\t> td.", "[data-reaches-top]::after {\n\t\t\tborder-top-color: ", ";\n\t\t}\n\t"])), _types.TableCssClassName.NODEVIEW_WRAPPER,
|
|
57
|
+
return (0, _react.css)(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n\t/*\n\t\tPaint the pinned sticky row's rounded top edge via each cell's ::after.\n\t\ttop: -1px places it in the reserved transparent border slot, aligned with\n\t\tthe row's inset-shadow bottom border. Longhand border-top-* lets\n\t\tinteraction-state rules override only the colour.\n\t*/\n\t.", "\n\t\t> table\n\t\t> tbody\n\t\t> tr.", ".", "\n\t\t> th.", "[data-reaches-top]::after,\n\t\t.", "\n\t\t> table\n\t\t> tbody\n\t\t> tr.", ".", "\n\t\t> td.", "[data-reaches-top]::after {\n\t\tcontent: '';\n\t\tposition: absolute;\n\t\tleft: -1px;\n\t\tright: -1px;\n\t\ttop: -1px;\n\t\tbottom: -1px;\n\t\twidth: auto;\n\t\theight: auto;\n\t\tpointer-events: none;\n\t\tborder-top-width: 1px;\n\t\tborder-top-style: solid;\n\t\tborder-top-color: ", ";\n\t}\n\n\t/* Selection / hover / active-cursor colour for the painted top edge. */\n\t.", "\n\t\t> table\n\t\t> tbody\n\t\t> tr.", ".", "\n\t\t> th.", "[data-reaches-top]:is(\n\t\t\t.", ",\n\t\t\t.", ",\n\t\t\t.", "\n\t\t)::after,\n\t.", "\n\t\t> table\n\t\t> tbody\n\t\t> tr.", ".", "\n\t\t> td.", "[data-reaches-top]:is(\n\t\t\t.", ",\n\t\t\t.", ",\n\t\t\t.", "\n\t\t)::after {\n\t\tborder-top-color: ", ";\n\t}\n\n\t/* Danger colour for the painted top edge. */\n\t.", "\n\t\t> table\n\t\t> tbody\n\t\t> tr.", ".", "\n\t\t> th.", "[data-reaches-top].", "::after,\n\t\t.", "\n\t\t> table\n\t\t> tbody\n\t\t> tr.", ".", "\n\t\t> td.", "[data-reaches-top].", "::after {\n\t\tborder-top-color: ", ";\n\t}\n\n\t:where(.", " > table > tbody > tr.", ")\n\t\t> th.", "[data-reaches-left]::after {\n\t\tborder-left-color: transparent;\n\t}\n\n\t", "\n"])), _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.NATIVE_STICKY, _types.TableCssClassName.NATIVE_STICKY_ACTIVE, _types.TableCssClassName.TABLE_HEADER_CELL, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.NATIVE_STICKY, _types.TableCssClassName.NATIVE_STICKY_ACTIVE, _types.TableCssClassName.TABLE_CELL, _consts2.tableBorderColor, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.NATIVE_STICKY, _types.TableCssClassName.NATIVE_STICKY_ACTIVE, _types.TableCssClassName.TABLE_HEADER_CELL, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.HOVERED_CELL, _types.TableCssClassName.ACTIVE_CURSOR_CELL, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.NATIVE_STICKY, _types.TableCssClassName.NATIVE_STICKY_ACTIVE, _types.TableCssClassName.TABLE_CELL, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.HOVERED_CELL, _types.TableCssClassName.ACTIVE_CURSOR_CELL, _consts2.tableBorderSelectedColor, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.NATIVE_STICKY, _types.TableCssClassName.NATIVE_STICKY_ACTIVE, _types.TableCssClassName.TABLE_HEADER_CELL, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.NATIVE_STICKY, _types.TableCssClassName.NATIVE_STICKY_ACTIVE, _types.TableCssClassName.TABLE_CELL, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _consts2.tableBorderDeleteColor, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.NATIVE_STICKY, _types.TableCssClassName.TABLE_HEADER_CELL, (0, _react.css)(_templateObject0 || (_templateObject0 = (0, _taggedTemplateLiteral2.default)(["\n\t\t/* Node-selected (ak-editor-selected-node) sticky header: the pinned row leaves the table's\n\t\t\t\t rounded overlay behind, so recolour its painted top edge to the selected colour too. */\n\t\t.", ".", "\n\t\t\t.", "\n\t\t\t> table\n\t\t\t> tbody\n\t\t\t> tr.", ".", "\n\t\t\t> th.", "[data-reaches-top]::after,\n\t\t\t.", ".", "\n\t\t\t.", "\n\t\t\t> table\n\t\t\t> tbody\n\t\t\t> tr.", ".", "\n\t\t\t> td.", "[data-reaches-top]::after {\n\t\t\tborder-top-color: ", ";\n\t\t}\n\t"])), _types.TableCssClassName.NODEVIEW_WRAPPER, _constants.akEditorSelectedNodeClassName, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.NATIVE_STICKY, _types.TableCssClassName.NATIVE_STICKY_ACTIVE, _types.TableCssClassName.TABLE_HEADER_CELL, _types.TableCssClassName.NODEVIEW_WRAPPER, _constants.akEditorSelectedNodeClassName, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.NATIVE_STICKY, _types.TableCssClassName.NATIVE_STICKY_ACTIVE, _types.TableCssClassName.TABLE_CELL, _consts2.tableBorderSelectedColor));
|
|
58
58
|
};
|
|
59
59
|
var roundedTableStickyHeaderShadowStyles = function roundedTableStickyHeaderShadowStyles() {
|
|
60
|
-
return (0, _react.css)(_templateObject1 || (_templateObject1 = (0, _taggedTemplateLiteral2.default)(["\n\t/* Native sticky row */\n\t.", "\n\t\t> table\n\t\t> tbody\n\t\t> tr.", ",\n\t/* Legacy sticky row */\n\t.", "\n\t\t> table.", "\n\t\t> tbody\n\t\t> tr.sticky {\n\t\tbox-shadow: inset 0 -1px ", " !important;\n\t}\n\n\t/*\n\t\tBox-shadow below active sticky header.\n\t*/\n\t.", "\n\t\t> table\n\t\t> tbody\n\t\t> tr.", ".", " {\n\t\tbox-shadow:\n\t\t\tinset 0 -1px ", ",\n\t\t\t0 6px 4px -4px ", " !important;\n\t}\n\n\t/*\n\t\tSticky headers leave the table's rounded outer overlay behind, so make the\n\t\treserved 1px top-border slot visible on the pinned row.\n\t*/\n\t.", "\n\t\t> table\n\t\t> tbody\n\t\t> tr.", ".", "\n\t\t> th.", "[data-reaches-top],\n\t\t.", "\n\t\t> table\n\t\t> tbody\n\t\t> tr.", ".", "\n\t\t> td.", "[data-reaches-top],\n\t\t.", "\n\t\t> table.", "\n\t\t> tbody\n\t\t> tr.sticky\n\t\t> th.", "[data-reaches-top],\n\t\t.", "\n\t\t> table.", "\n\t\t> tbody\n\t\t> tr.sticky\n\t\t> td.", "[data-reaches-top] {\n\t\tborder-top-color: ", ";\n\t}\n\n\t/*\n\t\tRestore legacy sticky corner side borders after the row is pinned outside the\n\t\ttable's outer overlay. (Pinned row top edge is painted by the cell ::after\n\t\toverlay in roundedTableStickyHeaderOverlayStyles.)\n\t*/\n\t.", "\n\t\t> table.", "\n\t\t> tbody\n\t\t> tr.sticky\n\t\t> th.", "[data-reaches-left],\n\t\t.", "\n\t\t> table.", "\n\t\t> tbody\n\t\t> tr.sticky\n\t\t> td.", "[data-reaches-left] {\n\t\tborder-left-color: ", ";\n\t}\n\n\t.", "\n\t\t> table.", "\n\t\t> tbody\n\t\t> tr.sticky\n\t\t> th.", "[data-reaches-right],\n\t\t.", "\n\t\t> table.", "\n\t\t> tbody\n\t\t> tr.sticky\n\t\t> td.", "[data-reaches-right] {\n\t\tborder-right: 1px solid ", ";\n\t}\n\n\t/*\n\t\tPaint the legacy sticky bottom edge on cells so it aligns under display: grid.\n\t*/\n\t.", "\n\t\t> table.", "\n\t\t> tbody\n\t\t> tr.sticky\n\t\t> th.", ",\n\t\t.", "\n\t\t> table.", "\n\t\t> tbody\n\t\t> tr.sticky\n\t\t> td.", " {\n\t\tborder-bottom: 1px solid ", ";\n\t}\n\n\t.", ".", ":has(tr.sticky)\n\t\t.", "\n\t\t.", ":first-of-type {\n\t\tbox-shadow: none !important;\n\t}\n\n\t", "\n"])), _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.NATIVE_STICKY, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.TABLE_STICKY, _consts2.tableBorderColor, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.NATIVE_STICKY, _types.TableCssClassName.NATIVE_STICKY_ACTIVE, _consts2.tableBorderColor, "var(--ds-shadow-overflow-perimeter, #1E1F211f)", _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.NATIVE_STICKY, _types.TableCssClassName.NATIVE_STICKY_ACTIVE, _types.TableCssClassName.TABLE_HEADER_CELL, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.NATIVE_STICKY, _types.TableCssClassName.NATIVE_STICKY_ACTIVE, _types.TableCssClassName.TABLE_CELL, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_HEADER_CELL, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_CELL, _consts2.tableBorderColor, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_HEADER_CELL, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_CELL, _consts2.tableBorderColor, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_HEADER_CELL, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_CELL, _consts2.tableBorderColor, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_HEADER_CELL, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_CELL, _consts2.tableBorderColor, _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.WITH_CONTROLS, _types.TableCssClassName.NUMBERED_COLUMN, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, (0, _react.css)(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n\t\t/* Node-selected (ak-editor-selected-node) sticky header: recolour the bottom-edge\n\t\t\t\t shadow to the selected colour so it matches the rest of the selection. */\n\t\t.", ".", "\n\t\t\t.", "\n\t\t\t> table\n\t\t\t> tbody\n\t\t\t> tr.", ",\n\t\t\t.", ".", "\n\t\t\t.", "\n\t\t\t> table.", "\n\t\t\t> tbody\n\t\t\t> tr.sticky {\n\t\t\tbox-shadow: inset 0 -1px ", " !important;\n\t\t}\n\n\t\t/* Active (pinned) variant keeps its drop shadow but recolours the bottom border. */\n\t\t.", ".", "\n\t\t\t.", "\n\t\t\t> table\n\t\t\t> tbody\n\t\t\t> tr.", ".", " {\n\t\t\tbox-shadow:\n\t\t\t\tinset 0 -1px ", ",\n\t\t\t\t0 6px 4px -4px ", " !important;\n\t\t}\n\t"])), _types.TableCssClassName.NODEVIEW_WRAPPER,
|
|
60
|
+
return (0, _react.css)(_templateObject1 || (_templateObject1 = (0, _taggedTemplateLiteral2.default)(["\n\t/* Native sticky row */\n\t.", "\n\t\t> table\n\t\t> tbody\n\t\t> tr.", ",\n\t/* Legacy sticky row */\n\t.", "\n\t\t> table.", "\n\t\t> tbody\n\t\t> tr.sticky {\n\t\tbox-shadow: inset 0 -1px ", " !important;\n\t}\n\n\t/*\n\t\tBox-shadow below active sticky header.\n\t*/\n\t.", "\n\t\t> table\n\t\t> tbody\n\t\t> tr.", ".", " {\n\t\tbox-shadow:\n\t\t\tinset 0 -1px ", ",\n\t\t\t0 6px 4px -4px ", " !important;\n\t}\n\n\t/*\n\t\tSticky headers leave the table's rounded outer overlay behind, so make the\n\t\treserved 1px top-border slot visible on the pinned row.\n\t*/\n\t.", "\n\t\t> table\n\t\t> tbody\n\t\t> tr.", ".", "\n\t\t> th.", "[data-reaches-top],\n\t\t.", "\n\t\t> table\n\t\t> tbody\n\t\t> tr.", ".", "\n\t\t> td.", "[data-reaches-top],\n\t\t.", "\n\t\t> table.", "\n\t\t> tbody\n\t\t> tr.sticky\n\t\t> th.", "[data-reaches-top],\n\t\t.", "\n\t\t> table.", "\n\t\t> tbody\n\t\t> tr.sticky\n\t\t> td.", "[data-reaches-top] {\n\t\tborder-top-color: ", ";\n\t}\n\n\t/*\n\t\tRestore legacy sticky corner side borders after the row is pinned outside the\n\t\ttable's outer overlay. (Pinned row top edge is painted by the cell ::after\n\t\toverlay in roundedTableStickyHeaderOverlayStyles.)\n\t*/\n\t.", "\n\t\t> table.", "\n\t\t> tbody\n\t\t> tr.sticky\n\t\t> th.", "[data-reaches-left],\n\t\t.", "\n\t\t> table.", "\n\t\t> tbody\n\t\t> tr.sticky\n\t\t> td.", "[data-reaches-left] {\n\t\tborder-left-color: ", ";\n\t}\n\n\t.", "\n\t\t> table.", "\n\t\t> tbody\n\t\t> tr.sticky\n\t\t> th.", "[data-reaches-right],\n\t\t.", "\n\t\t> table.", "\n\t\t> tbody\n\t\t> tr.sticky\n\t\t> td.", "[data-reaches-right] {\n\t\tborder-right: 1px solid ", ";\n\t}\n\n\t/*\n\t\tPaint the legacy sticky bottom edge on cells so it aligns under display: grid.\n\t*/\n\t.", "\n\t\t> table.", "\n\t\t> tbody\n\t\t> tr.sticky\n\t\t> th.", ",\n\t\t.", "\n\t\t> table.", "\n\t\t> tbody\n\t\t> tr.sticky\n\t\t> td.", " {\n\t\tborder-bottom: 1px solid ", ";\n\t}\n\n\t.", ".", ":has(tr.sticky)\n\t\t.", "\n\t\t.", ":first-of-type {\n\t\tbox-shadow: none !important;\n\t}\n\n\t", "\n"])), _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.NATIVE_STICKY, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.TABLE_STICKY, _consts2.tableBorderColor, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.NATIVE_STICKY, _types.TableCssClassName.NATIVE_STICKY_ACTIVE, _consts2.tableBorderColor, "var(--ds-shadow-overflow-perimeter, #1E1F211f)", _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.NATIVE_STICKY, _types.TableCssClassName.NATIVE_STICKY_ACTIVE, _types.TableCssClassName.TABLE_HEADER_CELL, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.NATIVE_STICKY, _types.TableCssClassName.NATIVE_STICKY_ACTIVE, _types.TableCssClassName.TABLE_CELL, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_HEADER_CELL, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_CELL, _consts2.tableBorderColor, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_HEADER_CELL, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_CELL, _consts2.tableBorderColor, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_HEADER_CELL, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_CELL, _consts2.tableBorderColor, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_HEADER_CELL, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_CELL, _consts2.tableBorderColor, _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.WITH_CONTROLS, _types.TableCssClassName.NUMBERED_COLUMN, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, (0, _react.css)(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n\t\t/* Node-selected (ak-editor-selected-node) sticky header: recolour the bottom-edge\n\t\t\t\t shadow to the selected colour so it matches the rest of the selection. */\n\t\t.", ".", "\n\t\t\t.", "\n\t\t\t> table\n\t\t\t> tbody\n\t\t\t> tr.", ",\n\t\t\t.", ".", "\n\t\t\t.", "\n\t\t\t> table.", "\n\t\t\t> tbody\n\t\t\t> tr.sticky {\n\t\t\tbox-shadow: inset 0 -1px ", " !important;\n\t\t}\n\n\t\t/* Active (pinned) variant keeps its drop shadow but recolours the bottom border. */\n\t\t.", ".", "\n\t\t\t.", "\n\t\t\t> table\n\t\t\t> tbody\n\t\t\t> tr.", ".", " {\n\t\t\tbox-shadow:\n\t\t\t\tinset 0 -1px ", ",\n\t\t\t\t0 6px 4px -4px ", " !important;\n\t\t}\n\t"])), _types.TableCssClassName.NODEVIEW_WRAPPER, _constants.akEditorSelectedNodeClassName, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.NATIVE_STICKY, _types.TableCssClassName.NODEVIEW_WRAPPER, _constants.akEditorSelectedNodeClassName, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.TABLE_STICKY, _consts2.tableBorderSelectedColor, _types.TableCssClassName.NODEVIEW_WRAPPER, _constants.akEditorSelectedNodeClassName, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.NATIVE_STICKY, _types.TableCssClassName.NATIVE_STICKY_ACTIVE, _consts2.tableBorderSelectedColor, "var(--ds-shadow-overflow-perimeter, #1E1F211f)"));
|
|
61
61
|
};
|
|
62
62
|
var roundedTableOverrides = exports.roundedTableOverrides = function roundedTableOverrides() {
|
|
63
63
|
return (0, _react.css)(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n\t", "\n\t", "\n\t", "\n\t", "\n\t", "\n\t", "\n\t", "\n\t", "\n\t", "\n"])),
|