@atlaskit/editor-plugin-table 38.0.4 → 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 +12 -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
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.FloatingToolbarLabel = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var
|
|
9
|
+
var _Popup = _interopRequireDefault(require("@atlaskit/editor-common/Popup"));
|
|
10
10
|
var FloatingToolbarLabel = exports.FloatingToolbarLabel = /*#__PURE__*/_react.default.memo(function (props) {
|
|
11
11
|
var target = props.target,
|
|
12
12
|
content = props.content,
|
|
@@ -16,7 +16,7 @@ var FloatingToolbarLabel = exports.FloatingToolbarLabel = /*#__PURE__*/_react.de
|
|
|
16
16
|
forcePlacement = props.forcePlacement,
|
|
17
17
|
stick = props.stick,
|
|
18
18
|
offset = props.offset;
|
|
19
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
19
|
+
return /*#__PURE__*/_react.default.createElement(_Popup.default, {
|
|
20
20
|
target: target,
|
|
21
21
|
alignX: alignX,
|
|
22
22
|
alignY: alignY,
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.SizeSelector = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _react2 = require("@emotion/react");
|
|
9
|
-
var
|
|
9
|
+
var _TableSelector = require("@atlaskit/editor-common/TableSelector");
|
|
10
10
|
var _tableSizeSelector = require("../../pm-plugins/table-size-selector");
|
|
11
11
|
/**
|
|
12
12
|
* @jsxRuntime classic
|
|
@@ -47,7 +47,7 @@ var SizeSelector = exports.SizeSelector = function SizeSelector(_ref) {
|
|
|
47
47
|
var onUnmount = function onUnmount() {
|
|
48
48
|
api === null || api === void 0 || api.core.actions.focus();
|
|
49
49
|
};
|
|
50
|
-
return (0, _react2.jsx)(
|
|
50
|
+
return (0, _react2.jsx)(_TableSelector.TableSelectorPopup
|
|
51
51
|
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
52
52
|
, {
|
|
53
53
|
defaultSize: {
|
|
@@ -6,12 +6,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.ColumnControls = void 0;
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
var
|
|
9
|
+
var _enums = require("@atlaskit/editor-common/analytics/types/enums");
|
|
10
|
+
var _tableEvents = require("@atlaskit/editor-common/analytics/types/table-events");
|
|
11
|
+
var _table = require("@atlaskit/editor-common/styles/table");
|
|
12
|
+
var _useSharedPluginStateWithSelector = require("@atlaskit/editor-common/useSharedPluginStateWithSelector");
|
|
13
|
+
var _constants = require("@atlaskit/editor-shared-styles/constants");
|
|
14
|
+
var _cellSelection = require("@atlaskit/editor-tables/cell-selection");
|
|
15
|
+
var _getSelectionRect = require("@atlaskit/editor-tables/utils/get-selection-rect");
|
|
15
16
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
16
17
|
var _commands = require("../../../pm-plugins/commands");
|
|
17
18
|
var _commandsWithAnalytics = require("../../../pm-plugins/drag-and-drop/commands-with-analytics");
|
|
@@ -24,7 +25,7 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
24
25
|
/* eslint-disable @atlaskit/design-system/prefer-primitives */
|
|
25
26
|
|
|
26
27
|
var getSelectedColumns = function getSelectedColumns(selection) {
|
|
27
|
-
if (!(selection instanceof
|
|
28
|
+
if (!(selection instanceof _cellSelection.CellSelection)) {
|
|
28
29
|
return [];
|
|
29
30
|
}
|
|
30
31
|
if ((0, _expValEquals.expValEquals)('platform_editor_table_menu_updates', 'isEnabled', true)) {
|
|
@@ -32,13 +33,13 @@ var getSelectedColumns = function getSelectedColumns(selection) {
|
|
|
32
33
|
if (!isColumnSelection) {
|
|
33
34
|
return [];
|
|
34
35
|
}
|
|
35
|
-
var rect = (0,
|
|
36
|
+
var rect = (0, _getSelectionRect.getSelectionRect)(selection);
|
|
36
37
|
return rect ? (0, _selection.getSelectedColumnIndexes)(rect) : [];
|
|
37
38
|
}
|
|
38
39
|
|
|
39
40
|
// Old behaviour: only standard column selections are recognised.
|
|
40
41
|
if (selection.isColSelection()) {
|
|
41
|
-
var _rect = (0,
|
|
42
|
+
var _rect = (0, _getSelectionRect.getSelectionRect)(selection);
|
|
42
43
|
if (!_rect) {
|
|
43
44
|
return [];
|
|
44
45
|
}
|
|
@@ -64,7 +65,7 @@ var ColumnControls = exports.ColumnControls = function ColumnControls(_ref) {
|
|
|
64
65
|
getScrollOffset = _ref.getScrollOffset,
|
|
65
66
|
api = _ref.api;
|
|
66
67
|
var columnControlsRef = (0, _react.useRef)(null);
|
|
67
|
-
var _useSharedPluginState = (0,
|
|
68
|
+
var _useSharedPluginState = (0, _useSharedPluginStateWithSelector.useSharedPluginStateWithSelector)(api, ['selection', 'table'], function (states) {
|
|
68
69
|
var _states$tableState, _states$selectionStat;
|
|
69
70
|
return {
|
|
70
71
|
activeTableMenu: (_states$tableState = states.tableState) === null || _states$tableState === void 0 ? void 0 : _states$tableState.activeTableMenu,
|
|
@@ -161,12 +162,12 @@ var ColumnControls = exports.ColumnControls = function ColumnControls(_ref) {
|
|
|
161
162
|
if (!isSameActiveMenu) {
|
|
162
163
|
var _api$analytics;
|
|
163
164
|
(_api$analytics = api.analytics) === null || _api$analytics === void 0 || (_api$analytics = _api$analytics.actions) === null || _api$analytics === void 0 || _api$analytics.attachAnalyticsEvent({
|
|
164
|
-
action:
|
|
165
|
-
actionSubject:
|
|
165
|
+
action: _tableEvents.TABLE_ACTION.DRAG_MENU_OPENED,
|
|
166
|
+
actionSubject: _enums.ACTION_SUBJECT.TABLE,
|
|
166
167
|
actionSubjectId: null,
|
|
167
|
-
eventType:
|
|
168
|
+
eventType: _enums.EVENT_TYPE.TRACK,
|
|
168
169
|
attributes: {
|
|
169
|
-
inputMethod: trigger === 'keyboard' ?
|
|
170
|
+
inputMethod: trigger === 'keyboard' ? _enums.INPUT_METHOD.KEYBOARD : _enums.INPUT_METHOD.MOUSE,
|
|
170
171
|
direction: 'column'
|
|
171
172
|
}
|
|
172
173
|
})(tr);
|
|
@@ -202,8 +203,8 @@ var ColumnControls = exports.ColumnControls = function ColumnControls(_ref) {
|
|
|
202
203
|
return sum + cur;
|
|
203
204
|
}, 0)) !== null && _rowHeights$reduce !== void 0 ? _rowHeights$reduce : 0;
|
|
204
205
|
var previewWidth = (_colWidths$reduce = colWidths === null || colWidths === void 0 ? void 0 : colWidths.reduce(function (sum, v, i) {
|
|
205
|
-
return sum + (v !== null && v !== void 0 ? v :
|
|
206
|
-
}, 0)) !== null && _colWidths$reduce !== void 0 ? _colWidths$reduce :
|
|
206
|
+
return sum + (v !== null && v !== void 0 ? v : _table.tableCellMinWidth) * (indexes.includes(i) ? 1 : 0);
|
|
207
|
+
}, 0)) !== null && _colWidths$reduce !== void 0 ? _colWidths$reduce : _table.tableCellMinWidth;
|
|
207
208
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
208
209
|
contentEditable: false,
|
|
209
210
|
key: type,
|
|
@@ -272,7 +273,7 @@ var ColumnControls = exports.ColumnControls = function ColumnControls(_ref) {
|
|
|
272
273
|
}
|
|
273
274
|
return handles;
|
|
274
275
|
};
|
|
275
|
-
var containerWidth = isNumberColumnEnabled && tableContainerWidth ? tableContainerWidth -
|
|
276
|
+
var containerWidth = isNumberColumnEnabled && tableContainerWidth ? tableContainerWidth - _constants.akEditorTableNumberColumnWidth : tableContainerWidth;
|
|
276
277
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
277
278
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
278
279
|
className: _types.TableCssClassName.DRAG_COLUMN_CONTROLS,
|
|
@@ -14,7 +14,7 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
|
|
|
14
14
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
15
15
|
var _react = _interopRequireWildcard(require("react"));
|
|
16
16
|
var _classnames2 = _interopRequireDefault(require("classnames"));
|
|
17
|
-
var
|
|
17
|
+
var _isSsr = require("@atlaskit/editor-common/is-ssr");
|
|
18
18
|
var _utils = require("@atlaskit/editor-tables/utils");
|
|
19
19
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
20
20
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
@@ -83,7 +83,7 @@ var NumberColumn = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
83
83
|
// with platform_editor_table_q4_loveability enabled, table controls have margin-top of 1px applied. Offset this here.
|
|
84
84
|
return rowHeights[0] + 1;
|
|
85
85
|
};
|
|
86
|
-
if ((0,
|
|
86
|
+
if ((0, _isSsr.isSSR)()) {
|
|
87
87
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
88
88
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
89
89
|
className: _types.TableCssClassName.NUMBERED_COLUMN,
|
|
@@ -8,10 +8,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.DragControlsWithSelection = exports.DragControls = void 0;
|
|
9
9
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
var
|
|
11
|
+
var _enums = require("@atlaskit/editor-common/analytics/types/enums");
|
|
12
|
+
var _tableEvents = require("@atlaskit/editor-common/analytics/types/table-events");
|
|
13
|
+
var _useSharedPluginStateWithSelector = require("@atlaskit/editor-common/useSharedPluginStateWithSelector");
|
|
14
|
+
var _cellSelection = require("@atlaskit/editor-tables/cell-selection");
|
|
15
|
+
var _getSelectionRect = require("@atlaskit/editor-tables/utils/get-selection-rect");
|
|
15
16
|
var _elementAdapter = require("@atlaskit/pragmatic-drag-and-drop/adapter/element-adapter");
|
|
16
17
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
17
18
|
var _commands = require("../../../pm-plugins/commands");
|
|
@@ -27,7 +28,7 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
27
28
|
/* eslint-disable @atlaskit/design-system/prefer-primitives */
|
|
28
29
|
|
|
29
30
|
var getSelectedRows = function getSelectedRows(selection) {
|
|
30
|
-
if (!(selection instanceof
|
|
31
|
+
if (!(selection instanceof _cellSelection.CellSelection)) {
|
|
31
32
|
return [];
|
|
32
33
|
}
|
|
33
34
|
if ((0, _expValEquals.expValEquals)('platform_editor_table_menu_updates', 'isEnabled', true)) {
|
|
@@ -36,13 +37,13 @@ var getSelectedRows = function getSelectedRows(selection) {
|
|
|
36
37
|
if (!selection.isRowSelection() && !(0, _selection.isRowSelectionWithMergedFirstColumn)(selection)) {
|
|
37
38
|
return [];
|
|
38
39
|
}
|
|
39
|
-
var rect = (0,
|
|
40
|
+
var rect = (0, _getSelectionRect.getSelectionRect)(selection);
|
|
40
41
|
return rect ? (0, _selection.getSelectedRowIndexes)(rect) : [];
|
|
41
42
|
}
|
|
42
43
|
|
|
43
44
|
// Old behaviour: only standard row selections are recognised.
|
|
44
45
|
if (selection.isRowSelection()) {
|
|
45
|
-
var _rect = (0,
|
|
46
|
+
var _rect = (0, _getSelectionRect.getSelectionRect)(selection);
|
|
46
47
|
if (!_rect) {
|
|
47
48
|
return [];
|
|
48
49
|
}
|
|
@@ -121,12 +122,12 @@ var DragControls = exports.DragControls = function DragControls(_ref) {
|
|
|
121
122
|
if (!isSameActiveMenu) {
|
|
122
123
|
var _api$analytics;
|
|
123
124
|
(_api$analytics = api.analytics) === null || _api$analytics === void 0 || (_api$analytics = _api$analytics.actions) === null || _api$analytics === void 0 || _api$analytics.attachAnalyticsEvent({
|
|
124
|
-
action:
|
|
125
|
-
actionSubject:
|
|
125
|
+
action: _tableEvents.TABLE_ACTION.DRAG_MENU_OPENED,
|
|
126
|
+
actionSubject: _enums.ACTION_SUBJECT.TABLE,
|
|
126
127
|
actionSubjectId: null,
|
|
127
|
-
eventType:
|
|
128
|
+
eventType: _enums.EVENT_TYPE.TRACK,
|
|
128
129
|
attributes: {
|
|
129
|
-
inputMethod: trigger === 'keyboard' ?
|
|
130
|
+
inputMethod: trigger === 'keyboard' ? _enums.INPUT_METHOD.KEYBOARD : _enums.INPUT_METHOD.MOUSE,
|
|
130
131
|
direction: 'row'
|
|
131
132
|
}
|
|
132
133
|
})(tr);
|
|
@@ -350,7 +351,7 @@ var DragControlsWithSelection = exports.DragControlsWithSelection = function Dra
|
|
|
350
351
|
selectRows = _ref6.selectRows,
|
|
351
352
|
updateCellHoverLocation = _ref6.updateCellHoverLocation,
|
|
352
353
|
api = _ref6.api;
|
|
353
|
-
var _useSharedPluginState = (0,
|
|
354
|
+
var _useSharedPluginState = (0, _useSharedPluginStateWithSelector.useSharedPluginStateWithSelector)(api, ['selection'], function (states) {
|
|
354
355
|
var _states$selectionStat;
|
|
355
356
|
return {
|
|
356
357
|
selection: (_states$selectionStat = states.selectionState) === null || _states$selectionStat === void 0 ? void 0 : _states$selectionStat.selection
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.FullWidthDisplay = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _reactIntl = require("react-intl");
|
|
10
|
-
var
|
|
10
|
+
var _table = require("@atlaskit/editor-common/messages/table");
|
|
11
11
|
var _primitives = require("@atlaskit/primitives");
|
|
12
12
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
13
13
|
|
|
@@ -37,5 +37,5 @@ var FullWidthDisplay = exports.FullWidthDisplay = function FullWidthDisplay() {
|
|
|
37
37
|
xcss: tableFullWidthLabelWrapperStyles
|
|
38
38
|
}, /*#__PURE__*/_react.default.createElement(_primitives.Inline, {
|
|
39
39
|
xcss: tableFullWidthLabelStyles
|
|
40
|
-
}, formatMessage(
|
|
40
|
+
}, formatMessage(_table.messages.fullWidthLabel)));
|
|
41
41
|
};
|
|
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.getCellMenuComponents = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var
|
|
10
|
-
var
|
|
9
|
+
var _table = require("@atlaskit/editor-common/messages/table");
|
|
10
|
+
var _toolbarDropdownItemSection = require("@atlaskit/editor-toolbar/toolbar-dropdown-item-section");
|
|
11
11
|
var _alignPositionBottom = _interopRequireDefault(require("@atlaskit/icon-lab/core/align-position-bottom"));
|
|
12
12
|
var _alignPositionCenterVertical = _interopRequireDefault(require("@atlaskit/icon-lab/core/align-position-center-vertical"));
|
|
13
13
|
var _alignPositionTop = _interopRequireDefault(require("@atlaskit/icon-lab/core/align-position-top"));
|
|
@@ -39,7 +39,7 @@ var getCellMenuComponents = exports.getCellMenuComponents = function getCellMenu
|
|
|
39
39
|
rank: _keys.CELL_MENU_RANK[_keys.CELL_ACTION_SECTION.key]
|
|
40
40
|
}],
|
|
41
41
|
component: function component(props) {
|
|
42
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
42
|
+
return /*#__PURE__*/_react.default.createElement(_toolbarDropdownItemSection.ToolbarDropdownItemSection, null, props.children);
|
|
43
43
|
}
|
|
44
44
|
}, {
|
|
45
45
|
type: _keys.VERTICAL_ALIGN_MENU.type,
|
|
@@ -61,7 +61,7 @@ var getCellMenuComponents = exports.getCellMenuComponents = function getCellMenu
|
|
|
61
61
|
rank: _keys.VERTICAL_ALIGN_MENU_RANK[_keys.VERTICAL_ALIGN_MENU_SECTION.key]
|
|
62
62
|
}],
|
|
63
63
|
component: function component(props) {
|
|
64
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
64
|
+
return /*#__PURE__*/_react.default.createElement(_toolbarDropdownItemSection.ToolbarDropdownItemSection, null, props.children);
|
|
65
65
|
}
|
|
66
66
|
}, {
|
|
67
67
|
type: _keys.VERTICAL_ALIGN_TOP_ITEM.type,
|
|
@@ -75,7 +75,7 @@ var getCellMenuComponents = exports.getCellMenuComponents = function getCellMenu
|
|
|
75
75
|
return /*#__PURE__*/_react.default.createElement(_VerticalAlignDropdownItem.VerticalAlignDropdownItem, {
|
|
76
76
|
api: api,
|
|
77
77
|
icon: _alignPositionTop.default,
|
|
78
|
-
label:
|
|
78
|
+
label: _table.messages.cellAlignmentTop,
|
|
79
79
|
value: "top"
|
|
80
80
|
});
|
|
81
81
|
}
|
|
@@ -91,7 +91,7 @@ var getCellMenuComponents = exports.getCellMenuComponents = function getCellMenu
|
|
|
91
91
|
return /*#__PURE__*/_react.default.createElement(_VerticalAlignDropdownItem.VerticalAlignDropdownItem, {
|
|
92
92
|
api: api,
|
|
93
93
|
icon: _alignPositionCenterVertical.default,
|
|
94
|
-
label:
|
|
94
|
+
label: _table.messages.cellAlignmentMiddle,
|
|
95
95
|
value: "middle"
|
|
96
96
|
});
|
|
97
97
|
}
|
|
@@ -107,7 +107,7 @@ var getCellMenuComponents = exports.getCellMenuComponents = function getCellMenu
|
|
|
107
107
|
return /*#__PURE__*/_react.default.createElement(_VerticalAlignDropdownItem.VerticalAlignDropdownItem, {
|
|
108
108
|
api: api,
|
|
109
109
|
icon: _alignPositionBottom.default,
|
|
110
|
-
label:
|
|
110
|
+
label: _table.messages.cellAlignmentBottom,
|
|
111
111
|
value: "bottom"
|
|
112
112
|
});
|
|
113
113
|
}
|
|
@@ -123,7 +123,7 @@ var getCellMenuComponents = exports.getCellMenuComponents = function getCellMenu
|
|
|
123
123
|
rank: _keys.CELL_MENU_RANK[_keys.CELL_ADD_SECTION.key]
|
|
124
124
|
}],
|
|
125
125
|
component: function component(props) {
|
|
126
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
126
|
+
return /*#__PURE__*/_react.default.createElement(_toolbarDropdownItemSection.ToolbarDropdownItemSection, {
|
|
127
127
|
hasSeparator: true
|
|
128
128
|
}, props.children);
|
|
129
129
|
}
|
|
@@ -164,7 +164,7 @@ var getCellMenuComponents = exports.getCellMenuComponents = function getCellMenu
|
|
|
164
164
|
rank: _keys.CELL_MENU_RANK[_keys.CELL_DANGER_SECTION.key]
|
|
165
165
|
}],
|
|
166
166
|
component: function component(props) {
|
|
167
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
167
|
+
return /*#__PURE__*/_react.default.createElement(_toolbarDropdownItemSection.ToolbarDropdownItemSection, {
|
|
168
168
|
hasSeparator: true
|
|
169
169
|
}, props.children);
|
|
170
170
|
}
|
|
@@ -186,7 +186,7 @@ var getCellMenuComponents = exports.getCellMenuComponents = function getCellMenu
|
|
|
186
186
|
rank: _keys.CELL_MENU_RANK[_keys.CELL_ACTION_SECTION.key]
|
|
187
187
|
}],
|
|
188
188
|
component: function component(props) {
|
|
189
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
189
|
+
return /*#__PURE__*/_react.default.createElement(_toolbarDropdownItemSection.ToolbarDropdownItemSection, null, props.children);
|
|
190
190
|
}
|
|
191
191
|
}, {
|
|
192
192
|
type: _keys.VERTICAL_ALIGN_MENU.type,
|
|
@@ -208,7 +208,7 @@ var getCellMenuComponents = exports.getCellMenuComponents = function getCellMenu
|
|
|
208
208
|
rank: _keys.VERTICAL_ALIGN_MENU_RANK[_keys.VERTICAL_ALIGN_MENU_SECTION.key]
|
|
209
209
|
}],
|
|
210
210
|
component: function component(props) {
|
|
211
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
211
|
+
return /*#__PURE__*/_react.default.createElement(_toolbarDropdownItemSection.ToolbarDropdownItemSection, null, props.children);
|
|
212
212
|
}
|
|
213
213
|
}, {
|
|
214
214
|
type: _keys.VERTICAL_ALIGN_TOP_ITEM.type,
|
|
@@ -222,7 +222,7 @@ var getCellMenuComponents = exports.getCellMenuComponents = function getCellMenu
|
|
|
222
222
|
return /*#__PURE__*/_react.default.createElement(_VerticalAlignDropdownItem.VerticalAlignDropdownItem, {
|
|
223
223
|
api: api,
|
|
224
224
|
icon: _alignPositionTop.default,
|
|
225
|
-
label:
|
|
225
|
+
label: _table.messages.cellAlignmentTop,
|
|
226
226
|
value: "top"
|
|
227
227
|
});
|
|
228
228
|
}
|
|
@@ -238,7 +238,7 @@ var getCellMenuComponents = exports.getCellMenuComponents = function getCellMenu
|
|
|
238
238
|
return /*#__PURE__*/_react.default.createElement(_VerticalAlignDropdownItem.VerticalAlignDropdownItem, {
|
|
239
239
|
api: api,
|
|
240
240
|
icon: _alignPositionCenterVertical.default,
|
|
241
|
-
label:
|
|
241
|
+
label: _table.messages.cellAlignmentMiddle,
|
|
242
242
|
value: "middle"
|
|
243
243
|
});
|
|
244
244
|
}
|
|
@@ -254,7 +254,7 @@ var getCellMenuComponents = exports.getCellMenuComponents = function getCellMenu
|
|
|
254
254
|
return /*#__PURE__*/_react.default.createElement(_VerticalAlignDropdownItem.VerticalAlignDropdownItem, {
|
|
255
255
|
api: api,
|
|
256
256
|
icon: _alignPositionBottom.default,
|
|
257
|
-
label:
|
|
257
|
+
label: _table.messages.cellAlignmentBottom,
|
|
258
258
|
value: "bottom"
|
|
259
259
|
});
|
|
260
260
|
}
|
|
@@ -295,7 +295,7 @@ var getCellMenuComponents = exports.getCellMenuComponents = function getCellMenu
|
|
|
295
295
|
rank: _keys.CELL_MENU_RANK[_keys.CELL_DANGER_SECTION.key]
|
|
296
296
|
}],
|
|
297
297
|
component: function component(props) {
|
|
298
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
298
|
+
return /*#__PURE__*/_react.default.createElement(_toolbarDropdownItemSection.ToolbarDropdownItemSection, {
|
|
299
299
|
hasSeparator: true
|
|
300
300
|
}, props.children);
|
|
301
301
|
}
|
|
@@ -7,9 +7,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.MergeCellsItem = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _reactIntl = require("react-intl");
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
10
|
+
var _enums = require("@atlaskit/editor-common/analytics/types/enums");
|
|
11
|
+
var _table = require("@atlaskit/editor-common/messages/table");
|
|
12
|
+
var _cellMergeIcon = require("@atlaskit/editor-toolbar/cell-merge-icon");
|
|
13
|
+
var _toolbarDropdownItem = require("@atlaskit/editor-toolbar/toolbar-dropdown-item");
|
|
13
14
|
var _commands = require("../../../../pm-plugins/commands");
|
|
14
15
|
var _commandsWithAnalytics = require("../../../../pm-plugins/commands/commands-with-analytics");
|
|
15
16
|
var _TableMenuContext = require("../../shared/TableMenuContext");
|
|
@@ -32,18 +33,18 @@ var MergeCellsItem = exports.MergeCellsItem = function MergeCellsItem(_ref) {
|
|
|
32
33
|
if (!editorView) {
|
|
33
34
|
return;
|
|
34
35
|
}
|
|
35
|
-
(0, _commandsWithAnalytics.mergeCellsWithAnalytics)(api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions)(
|
|
36
|
+
(0, _commandsWithAnalytics.mergeCellsWithAnalytics)(api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions)(_enums.INPUT_METHOD.CONTEXT_MENU)(editorView.state, editorView.dispatch);
|
|
36
37
|
api === null || api === void 0 || api.core.actions.execute((0, _commands.closeActiveTableMenu)(api));
|
|
37
38
|
api === null || api === void 0 || api.core.actions.focus();
|
|
38
39
|
};
|
|
39
40
|
if (!shouldShowMergeCells(tableMenuContext)) {
|
|
40
41
|
return null;
|
|
41
42
|
}
|
|
42
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
43
|
+
return /*#__PURE__*/_react.default.createElement(_toolbarDropdownItem.ToolbarDropdownItem, {
|
|
43
44
|
onClick: handleClick,
|
|
44
|
-
elemBefore: /*#__PURE__*/_react.default.createElement(
|
|
45
|
+
elemBefore: /*#__PURE__*/_react.default.createElement(_cellMergeIcon.TableCellMergeIcon, {
|
|
45
46
|
label: "",
|
|
46
47
|
size: "small"
|
|
47
48
|
})
|
|
48
|
-
}, formatMessage(
|
|
49
|
+
}, formatMessage(_table.messages.mergeCells));
|
|
49
50
|
};
|
|
@@ -7,9 +7,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.SplitCellItem = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _reactIntl = require("react-intl");
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
10
|
+
var _enums = require("@atlaskit/editor-common/analytics/types/enums");
|
|
11
|
+
var _table = require("@atlaskit/editor-common/messages/table");
|
|
12
|
+
var _cellSplitIcon = require("@atlaskit/editor-toolbar/cell-split-icon");
|
|
13
|
+
var _toolbarDropdownItem = require("@atlaskit/editor-toolbar/toolbar-dropdown-item");
|
|
13
14
|
var _commands = require("../../../../pm-plugins/commands");
|
|
14
15
|
var _commandsWithAnalytics = require("../../../../pm-plugins/commands/commands-with-analytics");
|
|
15
16
|
var _TableMenuContext = require("../../shared/TableMenuContext");
|
|
@@ -32,18 +33,18 @@ var SplitCellItem = exports.SplitCellItem = function SplitCellItem(_ref) {
|
|
|
32
33
|
if (!editorView) {
|
|
33
34
|
return;
|
|
34
35
|
}
|
|
35
|
-
(0, _commandsWithAnalytics.splitCellWithAnalytics)(api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions)(
|
|
36
|
+
(0, _commandsWithAnalytics.splitCellWithAnalytics)(api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions)(_enums.INPUT_METHOD.CONTEXT_MENU)(editorView.state, editorView.dispatch);
|
|
36
37
|
api === null || api === void 0 || api.core.actions.execute((0, _commands.closeActiveTableMenu)(api));
|
|
37
38
|
api === null || api === void 0 || api.core.actions.focus();
|
|
38
39
|
};
|
|
39
40
|
if (!shouldShowSplitCell(tableMenuContext)) {
|
|
40
41
|
return null;
|
|
41
42
|
}
|
|
42
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
43
|
+
return /*#__PURE__*/_react.default.createElement(_toolbarDropdownItem.ToolbarDropdownItem, {
|
|
43
44
|
onClick: handleClick,
|
|
44
|
-
elemBefore: /*#__PURE__*/_react.default.createElement(
|
|
45
|
+
elemBefore: /*#__PURE__*/_react.default.createElement(_cellSplitIcon.TableCellSplitIcon, {
|
|
45
46
|
label: "",
|
|
46
47
|
size: "small"
|
|
47
48
|
})
|
|
48
|
-
}, formatMessage(
|
|
49
|
+
}, formatMessage(_table.messages.splitCell));
|
|
49
50
|
};
|
|
@@ -7,8 +7,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.VerticalAlignDropdownItem = void 0;
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _reactIntl = require("react-intl");
|
|
10
|
-
var
|
|
11
|
-
var
|
|
10
|
+
var _enums = require("@atlaskit/editor-common/analytics/types/enums");
|
|
11
|
+
var _toolbarDropdownItem = require("@atlaskit/editor-toolbar/toolbar-dropdown-item");
|
|
12
12
|
var _commands = require("../../../../pm-plugins/commands");
|
|
13
13
|
var _commandsWithAnalytics = require("../../../../pm-plugins/commands/commands-with-analytics");
|
|
14
14
|
var _pluginFactory = require("../../../../pm-plugins/plugin-factory");
|
|
@@ -37,7 +37,7 @@ var VerticalAlignDropdownItem = exports.VerticalAlignDropdownItem = function Ver
|
|
|
37
37
|
api.core.actions.execute(function (_ref3) {
|
|
38
38
|
var _api$analytics;
|
|
39
39
|
var tr = _ref3.tr;
|
|
40
|
-
(0, _commandsWithAnalytics.setCellVerticalAlignmentWithAnalytics)((_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions)(
|
|
40
|
+
(0, _commandsWithAnalytics.setCellVerticalAlignmentWithAnalytics)((_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions)(_enums.INPUT_METHOD.TABLE_CONTEXT_MENU, value, targetCellPosition)({
|
|
41
41
|
tr: tr
|
|
42
42
|
});
|
|
43
43
|
(0, _commands.closeActiveTableMenu)(api)({
|
|
@@ -50,7 +50,7 @@ var VerticalAlignDropdownItem = exports.VerticalAlignDropdownItem = function Ver
|
|
|
50
50
|
if (!editorView) {
|
|
51
51
|
return null;
|
|
52
52
|
}
|
|
53
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
53
|
+
return /*#__PURE__*/_react.default.createElement(_toolbarDropdownItem.ToolbarDropdownItem, {
|
|
54
54
|
elemBefore: /*#__PURE__*/_react.default.createElement(Icon, {
|
|
55
55
|
color: "currentColor",
|
|
56
56
|
label: "",
|
|
@@ -8,8 +8,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.VerticalAlignNestedMenu = void 0;
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _reactIntl = require("react-intl");
|
|
11
|
-
var
|
|
12
|
-
var
|
|
11
|
+
var _table = require("@atlaskit/editor-common/messages/table");
|
|
12
|
+
var _nestedDropdownRightIcon = require("@atlaskit/editor-toolbar/nested-dropdown-right-icon");
|
|
13
|
+
var _toolbarNestedDropdownMenu = require("@atlaskit/editor-toolbar/toolbar-nested-dropdown-menu");
|
|
13
14
|
var _alignPositionBottom = _interopRequireDefault(require("@atlaskit/icon-lab/core/align-position-bottom"));
|
|
14
15
|
var _alignPositionCenterVertical = _interopRequireDefault(require("@atlaskit/icon-lab/core/align-position-center-vertical"));
|
|
15
16
|
var _alignPositionTop = _interopRequireDefault(require("@atlaskit/icon-lab/core/align-position-top"));
|
|
@@ -41,16 +42,16 @@ var VerticalAlignNestedMenu = exports.VerticalAlignNestedMenu = function Vertica
|
|
|
41
42
|
if (!editorView) {
|
|
42
43
|
return null;
|
|
43
44
|
}
|
|
44
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
45
|
+
return /*#__PURE__*/_react.default.createElement(_toolbarNestedDropdownMenu.ToolbarNestedDropdownMenu, {
|
|
45
46
|
elemBefore: /*#__PURE__*/_react.default.createElement(TriggerIcon, {
|
|
46
47
|
color: "currentColor",
|
|
47
48
|
label: "",
|
|
48
49
|
size: "small"
|
|
49
50
|
}),
|
|
50
|
-
elemAfter: /*#__PURE__*/_react.default.createElement(
|
|
51
|
+
elemAfter: /*#__PURE__*/_react.default.createElement(_nestedDropdownRightIcon.NestedDropdownRightIcon, {
|
|
51
52
|
label: "",
|
|
52
53
|
size: "small"
|
|
53
54
|
}),
|
|
54
|
-
text: formatMessage(
|
|
55
|
+
text: formatMessage(_table.messages.cellAlignment)
|
|
55
56
|
}, children);
|
|
56
57
|
};
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.getColumnMenuComponents = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var
|
|
9
|
+
var _toolbarDropdownItemSection = require("@atlaskit/editor-toolbar/toolbar-dropdown-item-section");
|
|
10
10
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
11
11
|
var _AddColumnLeftItem = require("./items/AddColumnLeftItem");
|
|
12
12
|
var _AddColumnRightItem = require("./items/AddColumnRightItem");
|
|
@@ -85,7 +85,7 @@ var getColumnMenuComponents = exports.getColumnMenuComponents = function getColu
|
|
|
85
85
|
rank: _keys.COLUMN_SECTION_RANK[_keys.COLUMN_SORT_SECTION.key]
|
|
86
86
|
}],
|
|
87
87
|
component: function component(props) {
|
|
88
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
88
|
+
return /*#__PURE__*/_react.default.createElement(_toolbarDropdownItemSection.ToolbarDropdownItemSection, {
|
|
89
89
|
hasSeparator: true
|
|
90
90
|
}, props.children);
|
|
91
91
|
}
|
|
@@ -126,7 +126,7 @@ var getColumnMenuComponents = exports.getColumnMenuComponents = function getColu
|
|
|
126
126
|
rank: _keys.COLUMN_SECTION_RANK[_keys.COLUMN_ADD_SECTION.key]
|
|
127
127
|
}],
|
|
128
128
|
component: function component(props) {
|
|
129
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
129
|
+
return /*#__PURE__*/_react.default.createElement(_toolbarDropdownItemSection.ToolbarDropdownItemSection, {
|
|
130
130
|
hasSeparator: true
|
|
131
131
|
}, props.children);
|
|
132
132
|
}
|
|
@@ -180,7 +180,7 @@ var getColumnMenuComponents = exports.getColumnMenuComponents = function getColu
|
|
|
180
180
|
rank: _keys.COLUMN_SECTION_RANK[_keys.COLUMN_DANGER_SECTION.key]
|
|
181
181
|
}],
|
|
182
182
|
component: function component(props) {
|
|
183
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
183
|
+
return /*#__PURE__*/_react.default.createElement(_toolbarDropdownItemSection.ToolbarDropdownItemSection, {
|
|
184
184
|
hasSeparator: true
|
|
185
185
|
}, props.children);
|
|
186
186
|
}
|
|
@@ -245,7 +245,7 @@ var getColumnMenuComponents = exports.getColumnMenuComponents = function getColu
|
|
|
245
245
|
rank: _keys.COLUMN_SECTION_RANK[_keys.COLUMN_SORT_SECTION.key]
|
|
246
246
|
}],
|
|
247
247
|
component: function component(props) {
|
|
248
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
248
|
+
return /*#__PURE__*/_react.default.createElement(_toolbarDropdownItemSection.ToolbarDropdownItemSection, {
|
|
249
249
|
hasSeparator: true
|
|
250
250
|
}, props.children);
|
|
251
251
|
}
|
|
@@ -286,7 +286,7 @@ var getColumnMenuComponents = exports.getColumnMenuComponents = function getColu
|
|
|
286
286
|
rank: _keys.COLUMN_SECTION_RANK[_keys.COLUMN_ADD_SECTION.key]
|
|
287
287
|
}],
|
|
288
288
|
component: function component(props) {
|
|
289
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
289
|
+
return /*#__PURE__*/_react.default.createElement(_toolbarDropdownItemSection.ToolbarDropdownItemSection, {
|
|
290
290
|
hasSeparator: true
|
|
291
291
|
}, props.children);
|
|
292
292
|
}
|
|
@@ -366,7 +366,7 @@ var getColumnMenuComponents = exports.getColumnMenuComponents = function getColu
|
|
|
366
366
|
rank: _keys.COLUMN_SECTION_RANK[_keys.COLUMN_DANGER_SECTION.key]
|
|
367
367
|
}],
|
|
368
368
|
component: function component(props) {
|
|
369
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
369
|
+
return /*#__PURE__*/_react.default.createElement(_toolbarDropdownItemSection.ToolbarDropdownItemSection, {
|
|
370
370
|
hasSeparator: true
|
|
371
371
|
}, props.children);
|
|
372
372
|
}
|
|
@@ -7,12 +7,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.AddColumnLeftItem = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _reactIntl = require("react-intl");
|
|
10
|
-
var
|
|
11
|
-
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
10
|
+
var _enums = require("@atlaskit/editor-common/analytics/types/enums");
|
|
12
11
|
var _keymaps = require("@atlaskit/editor-common/keymaps");
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
var
|
|
12
|
+
var _table = require("@atlaskit/editor-common/messages/table");
|
|
13
|
+
var _useSharedPluginStateWithSelector = require("@atlaskit/editor-common/useSharedPluginStateWithSelector");
|
|
14
|
+
var _getSelectionRect = require("@atlaskit/editor-tables/utils/get-selection-rect");
|
|
15
|
+
var _columnAddLeftIcon = require("@atlaskit/editor-toolbar/column-add-left-icon");
|
|
16
|
+
var _toolbarDropdownItem = require("@atlaskit/editor-toolbar/toolbar-dropdown-item");
|
|
17
|
+
var _toolbarKeyboardShortcutHint = require("@atlaskit/editor-toolbar/toolbar-keyboard-shortcut-hint");
|
|
16
18
|
var _commands = require("../../../../pm-plugins/commands");
|
|
17
19
|
var _commandsWithAnalytics = require("../../../../pm-plugins/commands/commands-with-analytics");
|
|
18
20
|
var _TableMenuContext = require("../../shared/TableMenuContext");
|
|
@@ -23,7 +25,7 @@ var AddColumnLeftItem = exports.AddColumnLeftItem = function AddColumnLeftItem(_
|
|
|
23
25
|
editorView = _ref2.editorView;
|
|
24
26
|
var _useIntl = (0, _reactIntl.useIntl)(),
|
|
25
27
|
formatMessage = _useIntl.formatMessage;
|
|
26
|
-
var _useSharedPluginState = (0,
|
|
28
|
+
var _useSharedPluginState = (0, _useSharedPluginStateWithSelector.useSharedPluginStateWithSelector)(api !== null && api !== void 0 ? api : undefined, ['table'], function (states) {
|
|
27
29
|
var tableState = states.tableState;
|
|
28
30
|
return {
|
|
29
31
|
isCommentEditor: tableState === null || tableState === void 0 ? void 0 : tableState.isCommentEditor,
|
|
@@ -39,25 +41,25 @@ var AddColumnLeftItem = exports.AddColumnLeftItem = function AddColumnLeftItem(_
|
|
|
39
41
|
if (!editorView) {
|
|
40
42
|
return;
|
|
41
43
|
}
|
|
42
|
-
var selectionRect = (0,
|
|
44
|
+
var selectionRect = (0, _getSelectionRect.getSelectionRect)(editorView.state.selection);
|
|
43
45
|
var index = selectionRect === null || selectionRect === void 0 ? void 0 : selectionRect.left;
|
|
44
46
|
if (index === undefined) {
|
|
45
47
|
return;
|
|
46
48
|
}
|
|
47
49
|
var shouldUseIncreasedScalingPercent = isTableScalingEnabled && (isTableFixedColumnWidthsOptionEnabled || isCommentEditor);
|
|
48
|
-
(0, _commandsWithAnalytics.insertColumnWithAnalytics)(api, api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions, isTableScalingEnabled, isTableFixedColumnWidthsOptionEnabled, shouldUseIncreasedScalingPercent, isCommentEditor)(
|
|
50
|
+
(0, _commandsWithAnalytics.insertColumnWithAnalytics)(api, api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions, isTableScalingEnabled, isTableFixedColumnWidthsOptionEnabled, shouldUseIncreasedScalingPercent, isCommentEditor)(_enums.INPUT_METHOD.TABLE_CONTEXT_MENU, index)(editorView.state, editorView.dispatch, editorView);
|
|
49
51
|
api === null || api === void 0 || api.core.actions.execute((0, _commands.closeActiveTableMenu)(api));
|
|
50
52
|
api === null || api === void 0 || api.core.actions.focus();
|
|
51
53
|
};
|
|
52
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
54
|
+
return /*#__PURE__*/_react.default.createElement(_toolbarDropdownItem.ToolbarDropdownItem, {
|
|
53
55
|
onClick: handleClick,
|
|
54
|
-
elemBefore: /*#__PURE__*/_react.default.createElement(
|
|
56
|
+
elemBefore: /*#__PURE__*/_react.default.createElement(_columnAddLeftIcon.TableColumnAddLeftIcon, {
|
|
55
57
|
color: "currentColor",
|
|
56
58
|
label: "",
|
|
57
59
|
size: "small"
|
|
58
60
|
}),
|
|
59
|
-
elemAfter: /*#__PURE__*/_react.default.createElement(
|
|
61
|
+
elemAfter: /*#__PURE__*/_react.default.createElement(_toolbarKeyboardShortcutHint.ToolbarKeyboardShortcutHint, {
|
|
60
62
|
shortcut: (_tooltip = (0, _keymaps.tooltip)(_keymaps.addColumnBefore)) !== null && _tooltip !== void 0 ? _tooltip : ''
|
|
61
63
|
})
|
|
62
|
-
}, formatMessage(
|
|
64
|
+
}, formatMessage(_table.messages.addColumnLeft));
|
|
63
65
|
};
|