@atlaskit/editor-plugin-table 2.3.1 → 2.5.0
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/.eslintrc.js +6 -0
- package/CHANGELOG.md +16 -0
- package/dist/cjs/plugins/table/commands/go-to-next-cell.js +2 -2
- package/dist/cjs/plugins/table/commands/insert.js +3 -3
- package/dist/cjs/plugins/table/commands/misc.js +26 -26
- package/dist/cjs/plugins/table/commands/referentiality.js +1 -1
- package/dist/cjs/plugins/table/commands/selection.js +2 -2
- package/dist/cjs/plugins/table/commands/sort.js +8 -8
- package/dist/cjs/plugins/table/commands-with-analytics.js +3 -3
- package/dist/cjs/plugins/table/event-handlers.js +15 -15
- package/dist/cjs/plugins/table/handlers.js +6 -7
- package/dist/cjs/plugins/table/index.js +16 -16
- package/dist/cjs/plugins/table/nodeviews/TableComponent.js +44 -40
- package/dist/cjs/plugins/table/nodeviews/TableContainer.js +6 -9
- package/dist/cjs/plugins/table/nodeviews/TableResizer.js +4 -3
- package/dist/cjs/plugins/table/nodeviews/table.js +11 -9
- package/dist/cjs/plugins/table/nodeviews/tableCell.js +1 -1
- package/dist/cjs/plugins/table/pm-plugins/decorations/plugin.js +2 -2
- package/dist/cjs/plugins/table/pm-plugins/keymap.js +2 -2
- package/dist/cjs/plugins/table/pm-plugins/main.js +24 -21
- package/dist/cjs/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.js +1 -1
- package/dist/cjs/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +2 -2
- package/dist/cjs/plugins/table/pm-plugins/table-local-id.js +1 -1
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/commands.js +1 -1
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/event-handlers.js +4 -4
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/colgroup.js +1 -1
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/column-state.js +1 -1
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/dom.js +1 -1
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/misc.js +2 -2
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +1 -1
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/scale-table.js +2 -3
- package/dist/cjs/plugins/table/pm-plugins/table-width.js +3 -3
- package/dist/cjs/plugins/table/toolbar.js +26 -26
- package/dist/cjs/plugins/table/transforms/column-width.js +5 -5
- package/dist/cjs/plugins/table/transforms/delete-columns.js +1 -1
- package/dist/cjs/plugins/table/transforms/merge.js +1 -1
- package/dist/cjs/plugins/table/transforms/replace-table.js +2 -2
- package/dist/cjs/plugins/table/ui/FloatingContextualButton/FixedButton.js +2 -2
- package/dist/cjs/plugins/table/ui/FloatingContextualButton/index.js +3 -3
- package/dist/cjs/plugins/table/ui/FloatingContextualButton/styles.js +1 -1
- package/dist/cjs/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +11 -11
- package/dist/cjs/plugins/table/ui/FloatingContextualMenu/index.js +2 -2
- package/dist/cjs/plugins/table/ui/FloatingContextualMenu/styles.js +6 -3
- package/dist/cjs/plugins/table/ui/FloatingDeleteButton/index.js +10 -10
- package/dist/cjs/plugins/table/ui/FloatingInsertButton/InsertButton.js +3 -3
- package/dist/cjs/plugins/table/ui/FloatingInsertButton/index.js +9 -9
- package/dist/cjs/plugins/table/ui/LayoutButton/index.js +3 -3
- package/dist/cjs/plugins/table/ui/TableFloatingControls/CornerControls/index.js +1 -1
- package/dist/cjs/plugins/table/ui/common-styles.js +2 -2
- package/dist/cjs/plugins/table/ui/consts.js +2 -2
- package/dist/cjs/plugins/table/ui/ui-styles.js +2 -2
- package/dist/cjs/plugins/table/utils/column-controls.js +11 -11
- package/dist/cjs/plugins/table/utils/decoration.js +11 -11
- package/dist/cjs/plugins/table/utils/nodes.js +1 -1
- package/dist/cjs/plugins/table/utils/row-controls.js +9 -9
- package/dist/cjs/plugins/table/utils/selection.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/plugins/table/commands/clear.js +3 -1
- package/dist/es2019/plugins/table/commands/go-to-next-cell.js +2 -2
- package/dist/es2019/plugins/table/commands/insert.js +4 -3
- package/dist/es2019/plugins/table/commands/misc.js +4 -4
- package/dist/es2019/plugins/table/commands/referentiality.js +1 -1
- package/dist/es2019/plugins/table/commands/selection.js +3 -3
- package/dist/es2019/plugins/table/commands/sort.js +3 -4
- package/dist/es2019/plugins/table/commands/toggle.js +1 -2
- package/dist/es2019/plugins/table/commands-with-analytics.js +4 -4
- package/dist/es2019/plugins/table/event-handlers.js +3 -5
- package/dist/es2019/plugins/table/handlers.js +5 -5
- package/dist/es2019/plugins/table/index.js +16 -16
- package/dist/es2019/plugins/table/nodeviews/OverflowShadowsObserver.js +1 -1
- package/dist/es2019/plugins/table/nodeviews/TableComponent.js +19 -15
- package/dist/es2019/plugins/table/nodeviews/TableContainer.js +7 -10
- package/dist/es2019/plugins/table/nodeviews/TableResizer.js +6 -5
- package/dist/es2019/plugins/table/nodeviews/table.js +11 -9
- package/dist/es2019/plugins/table/nodeviews/tableCell.js +2 -2
- package/dist/es2019/plugins/table/pm-plugins/decorations/plugin.js +2 -3
- package/dist/es2019/plugins/table/pm-plugins/keymap.js +4 -4
- package/dist/es2019/plugins/table/pm-plugins/main.js +13 -13
- package/dist/es2019/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.js +1 -1
- package/dist/es2019/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +2 -2
- package/dist/es2019/plugins/table/pm-plugins/table-local-id.js +1 -1
- package/dist/es2019/plugins/table/pm-plugins/table-resizing/commands.js +1 -1
- package/dist/es2019/plugins/table/pm-plugins/table-resizing/event-handlers.js +4 -4
- package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/colgroup.js +1 -1
- package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/column-state.js +1 -1
- package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/dom.js +1 -1
- package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/misc.js +2 -3
- package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +1 -1
- package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/scale-table.js +2 -3
- package/dist/es2019/plugins/table/pm-plugins/table-selection-keymap.js +1 -1
- package/dist/es2019/plugins/table/pm-plugins/table-width.js +3 -3
- package/dist/es2019/plugins/table/toolbar.js +16 -18
- package/dist/es2019/plugins/table/transforms/column-width.js +6 -7
- package/dist/es2019/plugins/table/transforms/delete-columns.js +1 -1
- package/dist/es2019/plugins/table/transforms/merge.js +2 -1
- package/dist/es2019/plugins/table/transforms/replace-table.js +2 -2
- package/dist/es2019/plugins/table/transforms/split.js +1 -0
- package/dist/es2019/plugins/table/ui/FloatingContextualButton/FixedButton.js +2 -2
- package/dist/es2019/plugins/table/ui/FloatingContextualButton/index.js +4 -4
- package/dist/es2019/plugins/table/ui/FloatingContextualButton/styles.js +1 -1
- package/dist/es2019/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +10 -10
- package/dist/es2019/plugins/table/ui/FloatingContextualMenu/index.js +2 -2
- package/dist/es2019/plugins/table/ui/FloatingContextualMenu/styles.js +7 -4
- package/dist/es2019/plugins/table/ui/FloatingDeleteButton/index.js +5 -5
- package/dist/es2019/plugins/table/ui/FloatingInsertButton/InsertButton.js +3 -3
- package/dist/es2019/plugins/table/ui/FloatingInsertButton/index.js +4 -5
- package/dist/es2019/plugins/table/ui/LayoutButton/index.js +3 -3
- package/dist/es2019/plugins/table/ui/TableFloatingControls/CornerControls/index.js +1 -1
- package/dist/es2019/plugins/table/ui/common-styles.js +5 -5
- package/dist/es2019/plugins/table/ui/consts.js +2 -2
- package/dist/es2019/plugins/table/ui/ui-styles.js +3 -3
- package/dist/es2019/plugins/table/utils/column-controls.js +3 -3
- package/dist/es2019/plugins/table/utils/decoration.js +2 -2
- package/dist/es2019/plugins/table/utils/guidelines.js +1 -1
- package/dist/es2019/plugins/table/utils/nodes.js +1 -1
- package/dist/es2019/plugins/table/utils/row-controls.js +3 -3
- package/dist/es2019/plugins/table/utils/selection.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/plugins/table/commands/clear.js +3 -1
- package/dist/esm/plugins/table/commands/go-to-next-cell.js +2 -2
- package/dist/esm/plugins/table/commands/insert.js +4 -3
- package/dist/esm/plugins/table/commands/misc.js +4 -4
- package/dist/esm/plugins/table/commands/referentiality.js +1 -1
- package/dist/esm/plugins/table/commands/selection.js +3 -3
- package/dist/esm/plugins/table/commands/sort.js +3 -4
- package/dist/esm/plugins/table/commands/toggle.js +1 -2
- package/dist/esm/plugins/table/commands-with-analytics.js +4 -4
- package/dist/esm/plugins/table/event-handlers.js +3 -5
- package/dist/esm/plugins/table/handlers.js +5 -5
- package/dist/esm/plugins/table/index.js +16 -16
- package/dist/esm/plugins/table/nodeviews/OverflowShadowsObserver.js +1 -1
- package/dist/esm/plugins/table/nodeviews/TableComponent.js +37 -34
- package/dist/esm/plugins/table/nodeviews/TableContainer.js +7 -10
- package/dist/esm/plugins/table/nodeviews/TableResizer.js +6 -5
- package/dist/esm/plugins/table/nodeviews/table.js +11 -9
- package/dist/esm/plugins/table/nodeviews/tableCell.js +2 -2
- package/dist/esm/plugins/table/pm-plugins/decorations/plugin.js +2 -3
- package/dist/esm/plugins/table/pm-plugins/keymap.js +4 -4
- package/dist/esm/plugins/table/pm-plugins/main.js +13 -13
- package/dist/esm/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.js +1 -1
- package/dist/esm/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +2 -2
- package/dist/esm/plugins/table/pm-plugins/table-local-id.js +1 -1
- package/dist/esm/plugins/table/pm-plugins/table-resizing/commands.js +1 -1
- package/dist/esm/plugins/table/pm-plugins/table-resizing/event-handlers.js +4 -4
- package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/colgroup.js +1 -1
- package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/column-state.js +1 -1
- package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/dom.js +1 -1
- package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/misc.js +2 -3
- package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +1 -1
- package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/scale-table.js +2 -3
- package/dist/esm/plugins/table/pm-plugins/table-selection-keymap.js +1 -1
- package/dist/esm/plugins/table/pm-plugins/table-width.js +3 -3
- package/dist/esm/plugins/table/toolbar.js +16 -18
- package/dist/esm/plugins/table/transforms/column-width.js +6 -7
- package/dist/esm/plugins/table/transforms/delete-columns.js +1 -1
- package/dist/esm/plugins/table/transforms/merge.js +2 -1
- package/dist/esm/plugins/table/transforms/replace-table.js +2 -2
- package/dist/esm/plugins/table/transforms/split.js +1 -0
- package/dist/esm/plugins/table/ui/FloatingContextualButton/FixedButton.js +2 -2
- package/dist/esm/plugins/table/ui/FloatingContextualButton/index.js +4 -4
- package/dist/esm/plugins/table/ui/FloatingContextualButton/styles.js +1 -1
- package/dist/esm/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +10 -10
- package/dist/esm/plugins/table/ui/FloatingContextualMenu/index.js +2 -2
- package/dist/esm/plugins/table/ui/FloatingContextualMenu/styles.js +6 -3
- package/dist/esm/plugins/table/ui/FloatingDeleteButton/index.js +5 -5
- package/dist/esm/plugins/table/ui/FloatingInsertButton/InsertButton.js +3 -3
- package/dist/esm/plugins/table/ui/FloatingInsertButton/index.js +4 -5
- package/dist/esm/plugins/table/ui/LayoutButton/index.js +3 -3
- package/dist/esm/plugins/table/ui/TableFloatingControls/CornerControls/index.js +1 -1
- package/dist/esm/plugins/table/ui/common-styles.js +5 -5
- package/dist/esm/plugins/table/ui/consts.js +2 -2
- package/dist/esm/plugins/table/ui/ui-styles.js +3 -3
- package/dist/esm/plugins/table/utils/column-controls.js +3 -3
- package/dist/esm/plugins/table/utils/decoration.js +2 -2
- package/dist/esm/plugins/table/utils/guidelines.js +1 -1
- package/dist/esm/plugins/table/utils/nodes.js +1 -1
- package/dist/esm/plugins/table/utils/row-controls.js +3 -3
- package/dist/esm/plugins/table/utils/selection.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/plugins/table/commands/go-to-next-cell.d.ts +2 -2
- package/dist/types/plugins/table/commands/insert.d.ts +1 -1
- package/dist/types/plugins/table/commands/selection.d.ts +1 -1
- package/dist/types/plugins/table/commands/sort.d.ts +1 -1
- package/dist/types/plugins/table/commands-with-analytics.d.ts +4 -5
- package/dist/types/plugins/table/event-handlers.d.ts +1 -1
- package/dist/types/plugins/table/handlers.d.ts +1 -1
- package/dist/types/plugins/table/index.d.ts +4 -4
- package/dist/types/plugins/table/nodeviews/TableComponent.d.ts +3 -4
- package/dist/types/plugins/table/nodeviews/TableContainer.d.ts +2 -2
- package/dist/types/plugins/table/nodeviews/TableResizer.d.ts +1 -1
- package/dist/types/plugins/table/nodeviews/table.d.ts +3 -4
- package/dist/types/plugins/table/nodeviews/tableCell.d.ts +1 -2
- package/dist/types/plugins/table/nodeviews/types.d.ts +2 -1
- package/dist/types/plugins/table/pm-plugins/decorations/plugin.d.ts +2 -2
- package/dist/types/plugins/table/pm-plugins/keymap.d.ts +1 -1
- package/dist/types/plugins/table/pm-plugins/main.d.ts +4 -6
- package/dist/types/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.d.ts +1 -1
- package/dist/types/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.d.ts +1 -1
- package/dist/types/plugins/table/pm-plugins/sticky-headers/plugin.d.ts +1 -1
- package/dist/types/plugins/table/pm-plugins/table-local-id.d.ts +0 -12
- package/dist/types/plugins/table/pm-plugins/table-resizing/plugin.d.ts +3 -3
- package/dist/types/plugins/table/pm-plugins/table-resizing/utils/misc.d.ts +3 -4
- package/dist/types/plugins/table/pm-plugins/table-resizing/utils/resize-state.d.ts +3 -3
- package/dist/types/plugins/table/pm-plugins/table-resizing/utils/types.d.ts +1 -1
- package/dist/types/plugins/table/pm-plugins/table-width.d.ts +1 -1
- package/dist/types/plugins/table/toolbar.d.ts +4 -5
- package/dist/types/plugins/table/transforms/column-width.d.ts +1 -1
- package/dist/types/plugins/table/transforms/replace-table.d.ts +1 -1
- package/dist/types/plugins/table/types.d.ts +1 -1
- package/dist/types/plugins/table/ui/FloatingContextualButton/index.d.ts +2 -2
- package/dist/types/plugins/table/ui/FloatingContextualMenu/ContextualMenu.d.ts +2 -2
- package/dist/types/plugins/table/ui/FloatingContextualMenu/index.d.ts +1 -1
- package/dist/types/plugins/table/ui/FloatingDeleteButton/DeleteButton.d.ts +1 -2
- package/dist/types/plugins/table/ui/FloatingDeleteButton/index.d.ts +1 -1
- package/dist/types/plugins/table/ui/FloatingInsertButton/index.d.ts +1 -1
- package/dist/types/plugins/table/ui/LayoutButton/index.d.ts +1 -1
- package/dist/types/plugins/table/ui/TableFloatingControls/CornerControls/index.d.ts +1 -1
- package/dist/types/plugins/table/ui/TableFloatingControls/index.d.ts +1 -1
- package/dist/types/plugins/table/utils/analytics.d.ts +1 -1
- package/dist/types/plugins/table/utils/collapse.d.ts +2 -2
- package/dist/types/plugins/table/utils/decoration.d.ts +1 -1
- package/dist/types-ts4.5/plugins/table/commands/go-to-next-cell.d.ts +2 -2
- package/dist/types-ts4.5/plugins/table/commands/insert.d.ts +1 -1
- package/dist/types-ts4.5/plugins/table/commands/selection.d.ts +1 -1
- package/dist/types-ts4.5/plugins/table/commands/sort.d.ts +1 -1
- package/dist/types-ts4.5/plugins/table/commands-with-analytics.d.ts +4 -5
- package/dist/types-ts4.5/plugins/table/event-handlers.d.ts +1 -1
- package/dist/types-ts4.5/plugins/table/handlers.d.ts +1 -1
- package/dist/types-ts4.5/plugins/table/index.d.ts +4 -4
- package/dist/types-ts4.5/plugins/table/nodeviews/TableComponent.d.ts +3 -4
- package/dist/types-ts4.5/plugins/table/nodeviews/TableContainer.d.ts +2 -2
- package/dist/types-ts4.5/plugins/table/nodeviews/TableResizer.d.ts +1 -1
- package/dist/types-ts4.5/plugins/table/nodeviews/table.d.ts +3 -4
- package/dist/types-ts4.5/plugins/table/nodeviews/tableCell.d.ts +1 -2
- package/dist/types-ts4.5/plugins/table/nodeviews/types.d.ts +2 -1
- package/dist/types-ts4.5/plugins/table/pm-plugins/decorations/plugin.d.ts +2 -2
- package/dist/types-ts4.5/plugins/table/pm-plugins/keymap.d.ts +1 -1
- package/dist/types-ts4.5/plugins/table/pm-plugins/main.d.ts +4 -6
- package/dist/types-ts4.5/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.d.ts +1 -1
- package/dist/types-ts4.5/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.d.ts +1 -1
- package/dist/types-ts4.5/plugins/table/pm-plugins/sticky-headers/plugin.d.ts +1 -1
- package/dist/types-ts4.5/plugins/table/pm-plugins/table-local-id.d.ts +0 -12
- package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/plugin.d.ts +3 -3
- package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/misc.d.ts +3 -4
- package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/resize-state.d.ts +3 -3
- package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/types.d.ts +1 -1
- package/dist/types-ts4.5/plugins/table/pm-plugins/table-width.d.ts +1 -1
- package/dist/types-ts4.5/plugins/table/toolbar.d.ts +4 -5
- package/dist/types-ts4.5/plugins/table/transforms/column-width.d.ts +1 -1
- package/dist/types-ts4.5/plugins/table/transforms/replace-table.d.ts +1 -1
- package/dist/types-ts4.5/plugins/table/types.d.ts +1 -1
- package/dist/types-ts4.5/plugins/table/ui/FloatingContextualButton/index.d.ts +2 -2
- package/dist/types-ts4.5/plugins/table/ui/FloatingContextualMenu/ContextualMenu.d.ts +2 -2
- package/dist/types-ts4.5/plugins/table/ui/FloatingContextualMenu/index.d.ts +1 -1
- package/dist/types-ts4.5/plugins/table/ui/FloatingDeleteButton/DeleteButton.d.ts +1 -2
- package/dist/types-ts4.5/plugins/table/ui/FloatingDeleteButton/index.d.ts +1 -1
- package/dist/types-ts4.5/plugins/table/ui/FloatingInsertButton/index.d.ts +1 -1
- package/dist/types-ts4.5/plugins/table/ui/LayoutButton/index.d.ts +1 -1
- package/dist/types-ts4.5/plugins/table/ui/TableFloatingControls/CornerControls/index.d.ts +1 -1
- package/dist/types-ts4.5/plugins/table/ui/TableFloatingControls/index.d.ts +1 -1
- package/dist/types-ts4.5/plugins/table/utils/analytics.d.ts +1 -1
- package/dist/types-ts4.5/plugins/table/utils/collapse.d.ts +2 -2
- package/dist/types-ts4.5/plugins/table/utils/decoration.d.ts +1 -1
- package/examples/99-testing.tsx +11 -10
- package/package.json +12 -4
- package/report.api.md +2 -0
- package/src/__tests__/integration/arrow-down-into-table.ts +3 -2
- package/src/__tests__/integration/auto-size.ts +8 -10
- package/src/__tests__/integration/cell-selection.ts +8 -7
- package/src/__tests__/integration/change-date-inside-table.ts +4 -5
- package/src/__tests__/integration/delete-columns.ts +6 -4
- package/src/__tests__/integration/delete-last-column-in-full-width.ts +4 -4
- package/src/__tests__/integration/delete-last-column-with-empty-action.ts +4 -4
- package/src/__tests__/integration/delete-last-row-with-empty-action.ts +4 -4
- package/src/__tests__/integration/delete-rows.ts +8 -6
- package/src/__tests__/integration/delete-table-when-selected.ts +10 -11
- package/src/__tests__/integration/deleting-empty-paragraph-under-table.ts +5 -4
- package/src/__tests__/integration/even-columns.ts +8 -8
- package/src/__tests__/integration/floating-toolbar.ts +3 -1
- package/src/__tests__/integration/horizontal-scroll-shadows.ts +7 -8
- package/src/__tests__/integration/horizontal-scroll.ts +8 -7
- package/src/__tests__/integration/insert-cell-header-with-strong-mark.ts +3 -4
- package/src/__tests__/integration/insert-row-inside-layout.ts +8 -6
- package/src/__tests__/integration/layout.ts +8 -11
- package/src/__tests__/integration/meta-arrowup-cursor-in-first-row.ts +3 -2
- package/src/__tests__/integration/resize-handler.ts +2 -2
- package/src/__tests__/integration/resize.ts +15 -15
- package/src/__tests__/integration/scale.ts +8 -8
- package/src/__tests__/integration/sticky-header.ts +3 -2
- package/src/__tests__/unit/analytics.ts +21 -21
- package/src/__tests__/unit/collab.ts +16 -16
- package/src/__tests__/unit/commands/go-to-next-cell.ts +14 -13
- package/src/__tests__/unit/commands/insert.ts +12 -12
- package/src/__tests__/unit/commands/misc.ts +18 -16
- package/src/__tests__/unit/commands/sort.ts +9 -8
- package/src/__tests__/unit/commands.ts +13 -14
- package/src/__tests__/unit/copy-paste.ts +31 -25
- package/src/__tests__/unit/event-handlers/index.ts +15 -13
- package/src/__tests__/unit/event-handlers.ts +18 -18
- package/src/__tests__/unit/fix-tables.ts +9 -9
- package/src/__tests__/unit/get-toolbar-config.ts +21 -21
- package/src/__tests__/unit/handlers.ts +13 -12
- package/src/__tests__/unit/hover-selection.ts +14 -13
- package/src/__tests__/unit/index-with-fake-timers.ts +6 -5
- package/src/__tests__/unit/index.ts +30 -31
- package/src/__tests__/unit/layout.ts +16 -16
- package/src/__tests__/unit/nodeviews/OverflowShadowsObserver.ts +4 -2
- package/src/__tests__/unit/nodeviews/TableComponent.tsx +21 -20
- package/src/__tests__/unit/nodeviews/TableContainer.tsx +38 -105
- package/src/__tests__/unit/nodeviews/cell.ts +17 -16
- package/src/__tests__/unit/nodeviews/table.ts +15 -13
- package/src/__tests__/unit/pm-plugins/decorations/column-controls.ts +1 -1
- package/src/__tests__/unit/pm-plugins/decorations/column-resizing.ts +7 -8
- package/src/__tests__/unit/pm-plugins/decorations/plugin.ts +45 -57
- package/src/__tests__/unit/pm-plugins/main.ts +15 -14
- package/src/__tests__/unit/pm-plugins/safari-delete-composition-text-issue-workaround.ts +7 -6
- package/src/__tests__/unit/pm-plugins/sticky-headers/tableRow.tsx +23 -21
- package/src/__tests__/unit/pm-plugins/table-local-id.ts +14 -15
- package/src/__tests__/unit/pm-plugins/table-resizing/colgroup.ts +3 -2
- package/src/__tests__/unit/pm-plugins/table-resizing/event-handlers.ts +22 -21
- package/src/__tests__/unit/sort-column.ts +16 -14
- package/src/__tests__/unit/toolbar.ts +22 -21
- package/src/__tests__/unit/transforms/delete-columns.ts +16 -14
- package/src/__tests__/unit/transforms/delete-rows.ts +16 -14
- package/src/__tests__/unit/transforms/merging.ts +15 -13
- package/src/__tests__/unit/ui/ContextualMenu.tsx +8 -6
- package/src/__tests__/unit/ui/CornerControls.tsx +11 -9
- package/src/__tests__/unit/ui/DeleteButton.tsx +3 -1
- package/src/__tests__/unit/ui/FixedButton.tsx +4 -1
- package/src/__tests__/unit/ui/FloatingContextualButton.tsx +14 -11
- package/src/__tests__/unit/ui/FloatingContextualMenu.tsx +8 -6
- package/src/__tests__/unit/ui/FloatingDeleteButton.tsx +12 -9
- package/src/__tests__/unit/ui/FloatingInsertButton.tsx +21 -19
- package/src/__tests__/unit/ui/RowControls.tsx +15 -12
- package/src/__tests__/unit/ui/TableFloatingControls.tsx +16 -15
- package/src/__tests__/unit/undo-redo.ts +17 -15
- package/src/__tests__/unit/utils/collapse.ts +7 -8
- package/src/__tests__/unit/utils/nodes.ts +12 -11
- package/src/__tests__/unit/utils/row-controls.ts +12 -12
- package/src/__tests__/unit/utils/table.ts +5 -4
- package/src/__tests__/unit/utils.ts +18 -16
- package/src/__tests__/visual-regression/cell-options-menu.ts +2 -2
- package/src/__tests__/visual-regression/index.ts +8 -7
- package/src/__tests__/visual-regression/sticky-header.ts +6 -5
- package/src/plugins/table/commands/clear.ts +3 -2
- package/src/plugins/table/commands/collapse.ts +1 -0
- package/src/plugins/table/commands/go-to-next-cell.ts +8 -7
- package/src/plugins/table/commands/insert.ts +8 -7
- package/src/plugins/table/commands/misc.ts +15 -18
- package/src/plugins/table/commands/referentiality.ts +3 -1
- package/src/plugins/table/commands/selection.ts +11 -10
- package/src/plugins/table/commands/sort.ts +9 -9
- package/src/plugins/table/commands/split-cell.ts +1 -1
- package/src/plugins/table/commands/toggle.ts +2 -3
- package/src/plugins/table/commands-with-analytics.ts +15 -15
- package/src/plugins/table/event-handlers.ts +19 -20
- package/src/plugins/table/handlers.ts +6 -7
- package/src/plugins/table/index.tsx +51 -51
- package/src/plugins/table/nodeviews/OverflowShadowsObserver.ts +2 -1
- package/src/plugins/table/nodeviews/TableComponent.tsx +22 -25
- package/src/plugins/table/nodeviews/TableContainer.tsx +13 -24
- package/src/plugins/table/nodeviews/TableResizer.tsx +9 -7
- package/src/plugins/table/nodeviews/table.tsx +25 -18
- package/src/plugins/table/nodeviews/tableCell.tsx +9 -7
- package/src/plugins/table/nodeviews/types.ts +4 -2
- package/src/plugins/table/nodeviews/update-overflow-shadows.ts +3 -1
- package/src/plugins/table/pm-plugins/decorations/plugin.ts +4 -3
- package/src/plugins/table/pm-plugins/decorations/utils/column-controls.ts +2 -1
- package/src/plugins/table/pm-plugins/keymap.ts +8 -8
- package/src/plugins/table/pm-plugins/main.ts +38 -33
- package/src/plugins/table/pm-plugins/plugin-factory.ts +2 -0
- package/src/plugins/table/pm-plugins/plugin-key.ts +1 -0
- package/src/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.ts +2 -1
- package/src/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.ts +6 -7
- package/src/plugins/table/pm-plugins/sticky-headers/plugin-key.ts +1 -0
- package/src/plugins/table/pm-plugins/sticky-headers/plugin.ts +3 -4
- package/src/plugins/table/pm-plugins/table-local-id.ts +3 -4
- package/src/plugins/table/pm-plugins/table-resizing/commands.ts +3 -2
- package/src/plugins/table/pm-plugins/table-resizing/event-handlers.ts +13 -14
- package/src/plugins/table/pm-plugins/table-resizing/plugin-factory.ts +1 -0
- package/src/plugins/table/pm-plugins/table-resizing/plugin-key.ts +1 -0
- package/src/plugins/table/pm-plugins/table-resizing/plugin.ts +7 -6
- package/src/plugins/table/pm-plugins/table-resizing/utils/colgroup.ts +2 -1
- package/src/plugins/table/pm-plugins/table-resizing/utils/column-state.ts +1 -1
- package/src/plugins/table/pm-plugins/table-resizing/utils/dom.ts +3 -3
- package/src/plugins/table/pm-plugins/table-resizing/utils/misc.ts +8 -9
- package/src/plugins/table/pm-plugins/table-resizing/utils/resize-state.ts +8 -6
- package/src/plugins/table/pm-plugins/table-resizing/utils/scale-table.ts +4 -5
- package/src/plugins/table/pm-plugins/table-resizing/utils/types.ts +2 -1
- package/src/plugins/table/pm-plugins/table-selection-keymap.ts +4 -3
- package/src/plugins/table/pm-plugins/table-width.ts +5 -4
- package/src/plugins/table/toolbar.tsx +54 -57
- package/src/plugins/table/transforms/column-width.ts +13 -13
- package/src/plugins/table/transforms/delete-columns.ts +2 -2
- package/src/plugins/table/transforms/delete-rows.ts +2 -2
- package/src/plugins/table/transforms/merge.ts +3 -3
- package/src/plugins/table/transforms/replace-table.ts +6 -5
- package/src/plugins/table/transforms/split.ts +1 -1
- package/src/plugins/table/types.ts +3 -3
- package/src/plugins/table/ui/FloatingContextualButton/FixedButton.tsx +4 -2
- package/src/plugins/table/ui/FloatingContextualButton/index.tsx +12 -11
- package/src/plugins/table/ui/FloatingContextualButton/styles.ts +5 -3
- package/src/plugins/table/ui/FloatingContextualMenu/ContextualMenu.tsx +27 -28
- package/src/plugins/table/ui/FloatingContextualMenu/index.tsx +10 -11
- package/src/plugins/table/ui/FloatingContextualMenu/styles.ts +8 -4
- package/src/plugins/table/ui/FloatingDeleteButton/DeleteButton.tsx +5 -2
- package/src/plugins/table/ui/FloatingDeleteButton/index.tsx +9 -9
- package/src/plugins/table/ui/FloatingInsertButton/InsertButton.tsx +4 -5
- package/src/plugins/table/ui/FloatingInsertButton/index.tsx +16 -18
- package/src/plugins/table/ui/LayoutButton/index.tsx +6 -6
- package/src/plugins/table/ui/TableFloatingControls/CornerControls/index.tsx +3 -2
- package/src/plugins/table/ui/TableFloatingControls/NumberColumn/index.tsx +2 -1
- package/src/plugins/table/ui/TableFloatingControls/index.tsx +2 -3
- package/src/plugins/table/ui/common-styles.ts +33 -34
- package/src/plugins/table/ui/consts.ts +12 -13
- package/src/plugins/table/ui/ui-styles.ts +24 -22
- package/src/plugins/table/utils/analytics.ts +3 -2
- package/src/plugins/table/utils/collapse.ts +2 -2
- package/src/plugins/table/utils/column-controls.ts +5 -6
- package/src/plugins/table/utils/decoration.ts +6 -7
- package/src/plugins/table/utils/dom.ts +1 -0
- package/src/plugins/table/utils/guidelines.ts +2 -2
- package/src/plugins/table/utils/nodes.ts +2 -1
- package/src/plugins/table/utils/row-controls.ts +4 -3
- package/src/plugins/table/utils/selection.ts +2 -1
- package/src/plugins/table/utils/table.ts +2 -1
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Node as PmNode } from 'prosemirror-model';
|
|
2
2
|
import { Transaction } from 'prosemirror-state';
|
|
3
|
-
import { Rect } from '@atlaskit/editor-tables/table-map';
|
|
4
3
|
import { DecorationSet } from 'prosemirror-view';
|
|
5
4
|
import { IntlShape } from 'react-intl-next';
|
|
6
5
|
|
|
@@ -10,11 +9,12 @@ import {
|
|
|
10
9
|
TableLayout,
|
|
11
10
|
tablePrefixSelector,
|
|
12
11
|
} from '@atlaskit/adf-schema';
|
|
13
|
-
import { TableSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
14
12
|
import { TableColumnOrdering } from '@atlaskit/adf-schema/steps';
|
|
15
|
-
|
|
16
13
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
14
|
+
import { TableSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
17
15
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
16
|
+
import { Rect } from '@atlaskit/editor-tables/table-map';
|
|
17
|
+
|
|
18
18
|
import type tablePlugin from './index';
|
|
19
19
|
|
|
20
20
|
export const RESIZE_HANDLE_AREA_DECORATION_GAP = 30;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import React, { useEffect, useRef } from 'react';
|
|
2
|
-
|
|
2
|
+
|
|
3
3
|
import rafSchedule from 'raf-schd';
|
|
4
|
+
import { createPortal } from 'react-dom';
|
|
4
5
|
|
|
5
6
|
import { akEditorFloatingPanelZIndex } from '@atlaskit/editor-shared-styles';
|
|
7
|
+
|
|
6
8
|
import { RowStickyState } from '../../pm-plugins/sticky-headers';
|
|
7
|
-
import { insertColumnButtonOffset } from '../common-styles';
|
|
8
9
|
import { TableCssClassName as ClassName } from '../../types';
|
|
10
|
+
import { insertColumnButtonOffset } from '../common-styles';
|
|
9
11
|
|
|
10
12
|
export const BUTTON_WIDTH = 20;
|
|
11
13
|
|
|
@@ -1,33 +1,34 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { jsx } from '@emotion/react';
|
|
4
3
|
|
|
4
|
+
import { jsx } from '@emotion/react';
|
|
5
|
+
import { Node as PMNode } from 'prosemirror-model';
|
|
5
6
|
import { findDomRefAtPos } from 'prosemirror-utils';
|
|
6
7
|
import { EditorView } from 'prosemirror-view';
|
|
7
|
-
import {
|
|
8
|
+
import { injectIntl, WrappedComponentProps } from 'react-intl-next';
|
|
8
9
|
|
|
9
10
|
import { TableLayout } from '@atlaskit/adf-schema';
|
|
11
|
+
import {
|
|
12
|
+
ACTION_SUBJECT,
|
|
13
|
+
DispatchAnalyticsEvent,
|
|
14
|
+
} from '@atlaskit/editor-common/analytics';
|
|
15
|
+
import { ErrorBoundary } from '@atlaskit/editor-common/error-boundary';
|
|
10
16
|
import { Popup } from '@atlaskit/editor-common/ui';
|
|
17
|
+
import { ToolbarButton } from '@atlaskit/editor-common/ui-menu';
|
|
11
18
|
import { akEditorSmallZIndex } from '@atlaskit/editor-shared-styles';
|
|
12
19
|
import ExpandIcon from '@atlaskit/icon/glyph/chevron-down';
|
|
13
|
-
|
|
14
|
-
import { ToolbarButton } from '@atlaskit/editor-common/ui-menu';
|
|
20
|
+
import { ThemeProps } from '@atlaskit/theme/types';
|
|
15
21
|
|
|
16
22
|
import { toggleContextualMenu } from '../../commands';
|
|
17
23
|
import { RowStickyState } from '../../pm-plugins/sticky-headers';
|
|
18
24
|
import { TableCssClassName as ClassName } from '../../types';
|
|
19
25
|
import messages from '../../ui/messages';
|
|
20
|
-
import FixedButton from './FixedButton';
|
|
21
26
|
|
|
22
|
-
import
|
|
23
|
-
import { ACTION_SUBJECT } from '@atlaskit/editor-common/analytics';
|
|
27
|
+
import FixedButton from './FixedButton';
|
|
24
28
|
import {
|
|
25
|
-
tableFloatingCellButtonStyles,
|
|
26
29
|
tableFloatingCellButtonSelectedStyles,
|
|
30
|
+
tableFloatingCellButtonStyles,
|
|
27
31
|
} from './styles';
|
|
28
|
-
import { Node as PMNode } from 'prosemirror-model';
|
|
29
|
-
import { ErrorBoundary } from '@atlaskit/editor-common/error-boundary';
|
|
30
|
-
import { ThemeProps } from '@atlaskit/theme/types';
|
|
31
32
|
|
|
32
33
|
export interface Props {
|
|
33
34
|
editorView: EditorView;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
|
+
|
|
2
3
|
import { B75, DN0, DN60, N0, N20, N30A, N700 } from '@atlaskit/theme/colors';
|
|
3
|
-
import { borderRadius } from '@atlaskit/theme/constants';
|
|
4
|
-
import { contextualMenuTriggerSize } from '../consts';
|
|
5
|
-
import { token } from '@atlaskit/tokens';
|
|
6
4
|
import { themed } from '@atlaskit/theme/components';
|
|
5
|
+
import { borderRadius } from '@atlaskit/theme/constants';
|
|
7
6
|
import { ThemeProps } from '@atlaskit/theme/types';
|
|
7
|
+
import { token } from '@atlaskit/tokens';
|
|
8
|
+
|
|
9
|
+
import { contextualMenuTriggerSize } from '../consts';
|
|
8
10
|
|
|
9
11
|
export const tableFloatingCellButtonStyles = (props: ThemeProps) => css`
|
|
10
12
|
> div {
|
|
@@ -1,50 +1,49 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { Component } from 'react';
|
|
3
|
+
|
|
3
4
|
import { jsx } from '@emotion/react';
|
|
4
|
-
import { Rect } from '@atlaskit/editor-tables/table-map';
|
|
5
|
-
import { hexToEditorBackgroundPaletteColor } from '@atlaskit/editor-palette';
|
|
6
|
-
import { splitCell } from '@atlaskit/editor-tables/utils';
|
|
7
5
|
import { EditorView } from 'prosemirror-view';
|
|
8
6
|
import {
|
|
9
7
|
defineMessages,
|
|
10
|
-
WrappedComponentProps,
|
|
11
8
|
injectIntl,
|
|
9
|
+
WrappedComponentProps,
|
|
12
10
|
} from 'react-intl-next';
|
|
13
11
|
|
|
12
|
+
type DropdownItem = MenuItem & {
|
|
13
|
+
value: {
|
|
14
|
+
name: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
import { TableSortOrder as SortOrder } from '@atlaskit/adf-schema/steps';
|
|
19
|
+
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
20
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
14
21
|
import {
|
|
15
22
|
addColumnAfter,
|
|
16
23
|
addRowAfter,
|
|
17
24
|
backspace,
|
|
18
25
|
tooltip,
|
|
19
26
|
} from '@atlaskit/editor-common/keymaps';
|
|
27
|
+
import { DropdownMenuSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
28
|
+
import type {
|
|
29
|
+
GetEditorContainerWidth,
|
|
30
|
+
GetEditorFeatureFlags,
|
|
31
|
+
} from '@atlaskit/editor-common/types';
|
|
20
32
|
import {
|
|
21
|
-
ColorPalette,
|
|
22
33
|
backgroundPaletteTooltipMessages,
|
|
23
34
|
cellBackgroundColorPalette,
|
|
35
|
+
ColorPalette,
|
|
24
36
|
} from '@atlaskit/editor-common/ui-color';
|
|
25
|
-
import {
|
|
26
|
-
|
|
37
|
+
import type { MenuItem } from '@atlaskit/editor-common/ui-menu';
|
|
27
38
|
import {
|
|
28
39
|
ArrowKeyNavigationType,
|
|
29
40
|
DropdownMenu,
|
|
30
41
|
} from '@atlaskit/editor-common/ui-menu';
|
|
31
|
-
|
|
32
|
-
import { shortcutStyle } from '@atlaskit/editor-shared-styles/shortcut';
|
|
33
|
-
import { cellColourPreviewStyles } from './styles';
|
|
34
42
|
import { closestElement } from '@atlaskit/editor-common/utils';
|
|
35
|
-
|
|
36
|
-
import {
|
|
37
|
-
import
|
|
38
|
-
|
|
39
|
-
GetEditorFeatureFlags,
|
|
40
|
-
} from '@atlaskit/editor-common/types';
|
|
41
|
-
|
|
42
|
-
import type { MenuItem } from '@atlaskit/editor-common/ui-menu';
|
|
43
|
-
type DropdownItem = MenuItem & {
|
|
44
|
-
value: {
|
|
45
|
-
name: string;
|
|
46
|
-
};
|
|
47
|
-
};
|
|
43
|
+
import { hexToEditorBackgroundPaletteColor } from '@atlaskit/editor-palette';
|
|
44
|
+
import { shortcutStyle } from '@atlaskit/editor-shared-styles/shortcut';
|
|
45
|
+
import { Rect } from '@atlaskit/editor-tables/table-map';
|
|
46
|
+
import { splitCell } from '@atlaskit/editor-tables/utils';
|
|
48
47
|
|
|
49
48
|
import {
|
|
50
49
|
clearHoverSelection,
|
|
@@ -56,6 +55,7 @@ import {
|
|
|
56
55
|
import {
|
|
57
56
|
deleteColumnsWithAnalytics,
|
|
58
57
|
deleteRowsWithAnalytics,
|
|
58
|
+
distributeColumnsWidthsWithAnalytics,
|
|
59
59
|
emptyMultipleCellsWithAnalytics,
|
|
60
60
|
insertColumnWithAnalytics,
|
|
61
61
|
insertRowWithAnalytics,
|
|
@@ -63,21 +63,20 @@ import {
|
|
|
63
63
|
setColorWithAnalytics,
|
|
64
64
|
sortColumnWithAnalytics,
|
|
65
65
|
splitCellWithAnalytics,
|
|
66
|
-
distributeColumnsWidthsWithAnalytics,
|
|
67
66
|
} from '../../commands-with-analytics';
|
|
68
67
|
import { getPluginState } from '../../pm-plugins/plugin-factory';
|
|
68
|
+
import { getNewResizeStateFromSelectedColumns } from '../../pm-plugins/table-resizing/utils/resize-state';
|
|
69
69
|
import { canMergeCells } from '../../transforms';
|
|
70
70
|
import { TableCssClassName as ClassName } from '../../types';
|
|
71
|
-
import { TableSortOrder as SortOrder } from '@atlaskit/adf-schema/steps';
|
|
72
71
|
import {
|
|
73
72
|
getMergedCellsPositions,
|
|
74
73
|
getSelectedColumnIndexes,
|
|
75
74
|
getSelectedRowIndexes,
|
|
76
75
|
} from '../../utils';
|
|
77
|
-
import tableMessages from '../messages';
|
|
78
76
|
import { contextualMenuDropdownWidth } from '../consts';
|
|
79
|
-
import
|
|
80
|
-
|
|
77
|
+
import tableMessages from '../messages';
|
|
78
|
+
|
|
79
|
+
import { cellColourPreviewStyles } from './styles';
|
|
81
80
|
|
|
82
81
|
export const messages = defineMessages({
|
|
83
82
|
cellBackground: {
|
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { jsx } from '@emotion/react';
|
|
3
|
-
|
|
4
3
|
import { EditorState } from 'prosemirror-state';
|
|
5
4
|
import { findDomRefAtPos } from 'prosemirror-utils';
|
|
5
|
+
import { EditorView } from 'prosemirror-view';
|
|
6
|
+
|
|
7
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
8
|
+
import type {
|
|
9
|
+
GetEditorContainerWidth,
|
|
10
|
+
GetEditorFeatureFlags,
|
|
11
|
+
} from '@atlaskit/editor-common/types';
|
|
12
|
+
import { Popup } from '@atlaskit/editor-common/ui';
|
|
13
|
+
import { akEditorFloatingOverlapPanelZIndex } from '@atlaskit/editor-shared-styles';
|
|
6
14
|
import {
|
|
7
15
|
findCellRectClosestToPos,
|
|
8
16
|
getSelectionRect,
|
|
9
17
|
isSelectionType,
|
|
10
18
|
} from '@atlaskit/editor-tables/utils';
|
|
11
|
-
import { EditorView } from 'prosemirror-view';
|
|
12
|
-
|
|
13
|
-
import { Popup } from '@atlaskit/editor-common/ui';
|
|
14
|
-
import { akEditorFloatingOverlapPanelZIndex } from '@atlaskit/editor-shared-styles';
|
|
15
19
|
|
|
16
20
|
import { getPluginState } from '../../pm-plugins/plugin-factory';
|
|
17
21
|
import { pluginKey } from '../../pm-plugins/plugin-key';
|
|
@@ -20,14 +24,9 @@ import {
|
|
|
20
24
|
contextualMenuDropdownWidth,
|
|
21
25
|
contextualMenuTriggerSize,
|
|
22
26
|
} from '../consts';
|
|
23
|
-
import { tablePopupStyles } from './styles';
|
|
24
|
-
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
25
27
|
|
|
26
|
-
import type {
|
|
27
|
-
GetEditorContainerWidth,
|
|
28
|
-
GetEditorFeatureFlags,
|
|
29
|
-
} from '@atlaskit/editor-common/types';
|
|
30
28
|
import ContextualMenu from './ContextualMenu';
|
|
29
|
+
import { tablePopupStyles } from './styles';
|
|
31
30
|
|
|
32
31
|
// offset of the contextual menu dropdown
|
|
33
32
|
const calculateOffset = (targetCellRef: HTMLElement, state: EditorState) => {
|
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
|
+
|
|
2
3
|
import { tableBackgroundBorderColor } from '@atlaskit/adf-schema';
|
|
3
4
|
import { N60A, N90 } from '@atlaskit/theme/colors';
|
|
4
|
-
import { contextualMenuDropdownWidth } from '../consts';
|
|
5
|
-
import { TableCssClassName as ClassName } from '../../types';
|
|
6
5
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
7
6
|
import { token } from '@atlaskit/tokens';
|
|
8
7
|
|
|
8
|
+
import { TableCssClassName as ClassName } from '../../types';
|
|
9
|
+
import { contextualMenuDropdownWidth } from '../consts';
|
|
10
|
+
|
|
9
11
|
export const cellColourPreviewStyles = (selectedColor: string) => css`
|
|
10
12
|
&::before {
|
|
11
13
|
background: ${selectedColor};
|
|
12
14
|
}
|
|
13
15
|
`;
|
|
14
16
|
|
|
17
|
+
// TODO Delete this comment after verifying space token -> previous value `padding: 8px`
|
|
18
|
+
// TODO Delete this comment after verifying space token -> previous value `margin-left: 4px`
|
|
15
19
|
export const tablePopupStyles = css`
|
|
16
20
|
.${ClassName.CONTEXTUAL_SUBMENU} {
|
|
17
21
|
border-radius: ${borderRadius()}px;
|
|
@@ -24,7 +28,7 @@ export const tablePopupStyles = css`
|
|
|
24
28
|
position: absolute;
|
|
25
29
|
top: 0;
|
|
26
30
|
left: ${contextualMenuDropdownWidth}px;
|
|
27
|
-
padding: 8px;
|
|
31
|
+
padding: ${token('space.100', '8px')};
|
|
28
32
|
|
|
29
33
|
> div {
|
|
30
34
|
padding: 0;
|
|
@@ -45,7 +49,7 @@ export const tablePopupStyles = css`
|
|
|
45
49
|
|
|
46
50
|
&::after {
|
|
47
51
|
content: '›';
|
|
48
|
-
margin-left: 4px;
|
|
52
|
+
margin-left: ${token('space.050', '4px')};
|
|
49
53
|
line-height: 20px;
|
|
50
54
|
color: ${token('color.icon', N90)};
|
|
51
55
|
}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import React, { SyntheticEvent } from 'react';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
injectIntl,
|
|
5
|
+
MessageDescriptor,
|
|
6
|
+
WrappedComponentProps,
|
|
7
|
+
} from 'react-intl-next';
|
|
4
8
|
|
|
5
|
-
import { MessageDescriptor } from 'react-intl-next';
|
|
6
9
|
import { TableCssClassName as ClassName } from '../../types';
|
|
7
10
|
|
|
8
11
|
export interface ButtonProps {
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import React, { Component, SyntheticEvent } from 'react';
|
|
2
2
|
|
|
3
3
|
import { Selection } from 'prosemirror-state';
|
|
4
|
-
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
5
|
-
import {
|
|
6
|
-
getSelectionRect,
|
|
7
|
-
isTableSelected,
|
|
8
|
-
} from '@atlaskit/editor-tables/utils';
|
|
9
4
|
import { EditorView } from 'prosemirror-view';
|
|
10
5
|
import { createPortal } from 'react-dom';
|
|
11
6
|
|
|
7
|
+
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
8
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
12
9
|
import { Popup } from '@atlaskit/editor-common/ui';
|
|
10
|
+
import { closestElement } from '@atlaskit/editor-common/utils';
|
|
13
11
|
import { akEditorTableNumberColumnWidth } from '@atlaskit/editor-shared-styles';
|
|
12
|
+
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
13
|
+
import {
|
|
14
|
+
getSelectionRect,
|
|
15
|
+
isTableSelected,
|
|
16
|
+
} from '@atlaskit/editor-tables/utils';
|
|
14
17
|
|
|
15
|
-
import { closestElement } from '@atlaskit/editor-common/utils';
|
|
16
|
-
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
17
18
|
import { clearHoverSelection, hoverColumns, hoverRows } from '../../commands';
|
|
18
19
|
import {
|
|
19
20
|
deleteColumnsWithAnalytics,
|
|
@@ -28,13 +29,12 @@ import {
|
|
|
28
29
|
getRowDeleteButtonParams,
|
|
29
30
|
getRowHeights,
|
|
30
31
|
} from '../../utils';
|
|
31
|
-
import tableMessages from '../messages';
|
|
32
32
|
import { stickyRowZIndex } from '../consts';
|
|
33
|
+
import tableMessages from '../messages';
|
|
33
34
|
|
|
34
35
|
import DeleteButton from './DeleteButton';
|
|
35
36
|
import getPopupOptions from './getPopUpOptions';
|
|
36
37
|
import { CellSelectionType } from './types';
|
|
37
|
-
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
38
38
|
|
|
39
39
|
export interface Props {
|
|
40
40
|
editorView: EditorView;
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import React, { SyntheticEvent } from 'react';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { injectIntl, WrappedComponentProps } from 'react-intl-next';
|
|
4
4
|
|
|
5
|
+
import * as keymaps from '@atlaskit/editor-common/keymaps';
|
|
5
6
|
import { tableMarginTop } from '@atlaskit/editor-common/styles';
|
|
7
|
+
import { closestElement } from '@atlaskit/editor-common/utils';
|
|
6
8
|
import { akEditorTableNumberColumnWidth } from '@atlaskit/editor-shared-styles';
|
|
7
9
|
import Tooltip from '@atlaskit/tooltip';
|
|
8
10
|
|
|
9
|
-
import * as keymaps from '@atlaskit/editor-common/keymaps';
|
|
10
|
-
|
|
11
|
-
import { closestElement } from '@atlaskit/editor-common/utils';
|
|
12
11
|
import { TableCssClassName as ClassName } from '../../types';
|
|
13
|
-
import tableMessages from '../messages';
|
|
14
12
|
import { tableToolbarSize } from '../consts';
|
|
13
|
+
import tableMessages from '../messages';
|
|
15
14
|
|
|
16
15
|
export interface ButtonProps {
|
|
17
16
|
type: 'row' | 'column';
|
|
@@ -1,17 +1,27 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
3
|
import { Node as PmNode } from 'prosemirror-model';
|
|
4
|
-
import { TableMap } from '@atlaskit/editor-tables/table-map';
|
|
5
|
-
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
6
4
|
import { findDomRefAtPos } from 'prosemirror-utils';
|
|
7
|
-
import { findTable } from '@atlaskit/editor-tables/utils';
|
|
8
5
|
import { EditorView } from 'prosemirror-view';
|
|
9
|
-
import {
|
|
6
|
+
import { injectIntl, WrappedComponentProps } from 'react-intl-next';
|
|
10
7
|
|
|
8
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
9
|
+
import {
|
|
10
|
+
ACTION,
|
|
11
|
+
ACTION_SUBJECT,
|
|
12
|
+
AnalyticsEventPayload,
|
|
13
|
+
CONTENT_COMPONENT,
|
|
14
|
+
DispatchAnalyticsEvent,
|
|
15
|
+
EVENT_TYPE,
|
|
16
|
+
INPUT_METHOD,
|
|
17
|
+
} from '@atlaskit/editor-common/analytics';
|
|
18
|
+
import type { GetEditorContainerWidth } from '@atlaskit/editor-common/types';
|
|
11
19
|
import { Popup } from '@atlaskit/editor-common/ui';
|
|
12
|
-
|
|
13
20
|
import { closestElement } from '@atlaskit/editor-common/utils';
|
|
14
|
-
import {
|
|
21
|
+
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
22
|
+
import { TableMap } from '@atlaskit/editor-tables/table-map';
|
|
23
|
+
import { findTable } from '@atlaskit/editor-tables/utils';
|
|
24
|
+
|
|
15
25
|
import {
|
|
16
26
|
insertColumnWithAnalytics,
|
|
17
27
|
insertRowWithAnalytics,
|
|
@@ -21,12 +31,6 @@ import { checkIfNumberColumnEnabled } from '../../utils';
|
|
|
21
31
|
|
|
22
32
|
import getPopupOptions from './getPopupOptions';
|
|
23
33
|
import InsertButton from './InsertButton';
|
|
24
|
-
import {
|
|
25
|
-
DispatchAnalyticsEvent,
|
|
26
|
-
AnalyticsEventPayload,
|
|
27
|
-
} from '@atlaskit/editor-common/analytics';
|
|
28
|
-
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
29
|
-
import type { GetEditorContainerWidth } from '@atlaskit/editor-common/types';
|
|
30
34
|
|
|
31
35
|
export interface Props {
|
|
32
36
|
editorView: EditorView;
|
|
@@ -44,12 +48,6 @@ export interface Props {
|
|
|
44
48
|
dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
|
|
45
49
|
editorAnalyticsAPI?: EditorAnalyticsAPI;
|
|
46
50
|
}
|
|
47
|
-
import {
|
|
48
|
-
ACTION,
|
|
49
|
-
ACTION_SUBJECT,
|
|
50
|
-
EVENT_TYPE,
|
|
51
|
-
CONTENT_COMPONENT,
|
|
52
|
-
} from '@atlaskit/editor-common/analytics';
|
|
53
51
|
|
|
54
52
|
export class FloatingInsertButton extends React.Component<
|
|
55
53
|
Props & WrappedComponentProps,
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import React, { createRef } from 'react';
|
|
2
2
|
|
|
3
3
|
import classnames from 'classnames';
|
|
4
|
+
import { findDomRefAtPos } from 'prosemirror-utils';
|
|
4
5
|
import { EditorView } from 'prosemirror-view';
|
|
5
|
-
import {
|
|
6
|
+
import { injectIntl, WrappedComponentProps } from 'react-intl-next';
|
|
6
7
|
|
|
7
8
|
import { TableLayout } from '@atlaskit/adf-schema';
|
|
9
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
10
|
+
import commonMessages from '@atlaskit/editor-common/messages';
|
|
8
11
|
import { Popup } from '@atlaskit/editor-common/ui';
|
|
9
12
|
import type { PopupPosition } from '@atlaskit/editor-common/ui';
|
|
13
|
+
import { ToolbarButton } from '@atlaskit/editor-common/ui-menu';
|
|
10
14
|
import CollapseIcon from '@atlaskit/icon/glyph/editor/collapse';
|
|
11
15
|
import ExpandIcon from '@atlaskit/icon/glyph/editor/expand';
|
|
12
16
|
|
|
13
|
-
import commonMessages from '@atlaskit/editor-common/messages';
|
|
14
|
-
import { ToolbarButton } from '@atlaskit/editor-common/ui-menu';
|
|
15
17
|
import { toggleTableLayoutWithAnalytics } from '../../commands-with-analytics';
|
|
16
|
-
import { TableCssClassName as ClassName } from '../../types';
|
|
17
18
|
import { RowStickyState } from '../../pm-plugins/sticky-headers';
|
|
18
|
-
import {
|
|
19
|
-
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
19
|
+
import { TableCssClassName as ClassName } from '../../types';
|
|
20
20
|
|
|
21
21
|
export interface Props {
|
|
22
22
|
editorView: EditorView;
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
+
|
|
3
|
+
import classnames from 'classnames';
|
|
4
|
+
import { EditorView } from 'prosemirror-view';
|
|
2
5
|
import type { WrappedComponentProps } from 'react-intl-next';
|
|
3
6
|
import { defineMessages, injectIntl } from 'react-intl-next';
|
|
4
7
|
|
|
5
|
-
import classnames from 'classnames';
|
|
6
8
|
import { TableMap } from '@atlaskit/editor-tables/table-map';
|
|
7
9
|
import {
|
|
8
10
|
findTable,
|
|
9
11
|
isTableSelected,
|
|
10
12
|
selectTable,
|
|
11
13
|
} from '@atlaskit/editor-tables/utils';
|
|
12
|
-
import { EditorView } from 'prosemirror-view';
|
|
13
14
|
|
|
14
15
|
import { clearHoverSelection, hoverTable } from '../../../commands';
|
|
15
16
|
import { TableCssClassName as ClassName } from '../../../types';
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
|
|
3
3
|
import { Selection } from 'prosemirror-state';
|
|
4
|
-
import { isRowSelected } from '@atlaskit/editor-tables/utils';
|
|
5
4
|
import { EditorView } from 'prosemirror-view';
|
|
6
5
|
|
|
6
|
+
import { isRowSelected } from '@atlaskit/editor-tables/utils';
|
|
7
|
+
|
|
7
8
|
import { clearHoverSelection } from '../../../commands';
|
|
8
9
|
import { TableCssClassName as ClassName } from '../../../types';
|
|
9
10
|
import { getRowHeights } from '../../../utils';
|
|
@@ -3,18 +3,17 @@ import React, { Component } from 'react';
|
|
|
3
3
|
import { Selection } from 'prosemirror-state';
|
|
4
4
|
import { EditorView } from 'prosemirror-view';
|
|
5
5
|
|
|
6
|
-
import { browser } from '@atlaskit/editor-common/utils';
|
|
7
6
|
import type { TableColumnOrdering } from '@atlaskit/adf-schema/steps';
|
|
7
|
+
import type { GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
|
|
8
|
+
import { browser } from '@atlaskit/editor-common/utils';
|
|
8
9
|
|
|
9
10
|
import { hoverRows, selectRow } from '../../commands';
|
|
10
11
|
import { RowStickyState } from '../../pm-plugins/sticky-headers';
|
|
11
|
-
|
|
12
12
|
import { isSelectionUpdated } from '../../utils';
|
|
13
13
|
|
|
14
14
|
import { CornerControls } from './CornerControls';
|
|
15
15
|
import NumberColumn from './NumberColumn';
|
|
16
16
|
import { RowControls } from './RowControls';
|
|
17
|
-
import type { GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
|
|
18
17
|
|
|
19
18
|
export interface Props {
|
|
20
19
|
editorView: EditorView;
|
|
@@ -5,66 +5,65 @@ import {
|
|
|
5
5
|
tableSharedStyle,
|
|
6
6
|
} from '@atlaskit/editor-common/styles';
|
|
7
7
|
import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
8
|
-
import { fontSize } from '@atlaskit/theme/constants';
|
|
9
|
-
import { N40A, B300, N300, N20A, N0, R500 } from '@atlaskit/theme/colors';
|
|
10
8
|
import {
|
|
11
|
-
|
|
12
|
-
getSelectionStyles,
|
|
9
|
+
akEditorSelectedNodeClassName,
|
|
13
10
|
akEditorSmallZIndex,
|
|
14
|
-
akEditorTableNumberColumnWidth,
|
|
15
11
|
akEditorStickyHeaderZIndex,
|
|
12
|
+
akEditorTableNumberColumnWidth,
|
|
16
13
|
akEditorTableToolbarSize,
|
|
17
14
|
akEditorUnitZIndex,
|
|
18
|
-
|
|
15
|
+
getSelectionStyles,
|
|
19
16
|
relativeFontSizeToBase16,
|
|
17
|
+
SelectionStyle,
|
|
20
18
|
} from '@atlaskit/editor-shared-styles';
|
|
21
|
-
|
|
22
19
|
import { scrollbarStyles } from '@atlaskit/editor-shared-styles/scrollbar';
|
|
20
|
+
import { B300, N0, N20A, N300, N40A, R500 } from '@atlaskit/theme/colors';
|
|
21
|
+
import { fontSize } from '@atlaskit/theme/constants';
|
|
22
|
+
import { ThemeProps } from '@atlaskit/theme/types';
|
|
23
|
+
import { token } from '@atlaskit/tokens';
|
|
24
|
+
|
|
23
25
|
import { TableCssClassName as ClassName } from '../types';
|
|
24
26
|
|
|
25
27
|
import {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
+
columnControlsDecorationHeight,
|
|
29
|
+
resizeHandlerAreaWidth,
|
|
30
|
+
resizeLineWidth,
|
|
31
|
+
stickyHeaderBorderBottomWidth,
|
|
32
|
+
stickyRowOffsetTop,
|
|
33
|
+
stickyRowZIndex,
|
|
28
34
|
tableBorderColor,
|
|
29
|
-
tableCellSelectedColor,
|
|
30
|
-
tableToolbarSelectedColor,
|
|
31
|
-
tableBorderSelectedColor,
|
|
32
|
-
tableCellDeleteColor,
|
|
33
35
|
tableBorderDeleteColor,
|
|
34
|
-
tableToolbarDeleteColor,
|
|
35
36
|
tableBorderRadiusSize,
|
|
37
|
+
tableBorderSelectedColor,
|
|
38
|
+
tableCellBackgroundColor,
|
|
39
|
+
tableCellDeleteColor,
|
|
40
|
+
tableCellSelectedColor,
|
|
41
|
+
tableControlsSpacing,
|
|
42
|
+
tableHeaderCellBackgroundColor,
|
|
43
|
+
tableInsertColumnButtonSize,
|
|
36
44
|
tablePadding,
|
|
37
45
|
tableScrollbarOffset,
|
|
38
|
-
resizeHandlerAreaWidth,
|
|
39
|
-
resizeLineWidth,
|
|
40
|
-
tableToolbarSize,
|
|
41
|
-
tableInsertColumnButtonSize,
|
|
42
|
-
tableControlsSpacing,
|
|
43
46
|
tableTextColor,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
stickyHeaderBorderBottomWidth,
|
|
47
|
+
tableToolbarDeleteColor,
|
|
48
|
+
tableToolbarSelectedColor,
|
|
49
|
+
tableToolbarSize,
|
|
48
50
|
} from './consts';
|
|
49
|
-
|
|
50
51
|
import {
|
|
52
|
+
columnControlsDecoration,
|
|
53
|
+
columnControlsLineMarker,
|
|
54
|
+
DeleteButton,
|
|
51
55
|
HeaderButton,
|
|
52
|
-
HeaderButtonHover,
|
|
53
56
|
HeaderButtonDanger,
|
|
57
|
+
HeaderButtonHover,
|
|
58
|
+
hoveredCell,
|
|
59
|
+
hoveredDeleteButton,
|
|
60
|
+
hoveredWarningCell,
|
|
54
61
|
insertColumnButtonWrapper,
|
|
62
|
+
InsertMarker,
|
|
55
63
|
insertRowButtonWrapper,
|
|
56
|
-
columnControlsLineMarker,
|
|
57
|
-
DeleteButton,
|
|
58
64
|
OverflowShadow,
|
|
59
|
-
columnControlsDecoration,
|
|
60
|
-
hoveredDeleteButton,
|
|
61
|
-
hoveredCell,
|
|
62
|
-
hoveredWarningCell,
|
|
63
65
|
resizeHandle,
|
|
64
|
-
InsertMarker,
|
|
65
66
|
} from './ui-styles';
|
|
66
|
-
import { ThemeProps } from '@atlaskit/theme/types';
|
|
67
|
-
import { token } from '@atlaskit/tokens';
|
|
68
67
|
|
|
69
68
|
const cornerControlHeight = tableToolbarSize + 1;
|
|
70
69
|
|
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
B200,
|
|
3
|
-
B300,
|
|
4
|
-
N20,
|
|
5
|
-
R400,
|
|
6
|
-
R75,
|
|
7
|
-
DN400,
|
|
8
|
-
N200,
|
|
9
|
-
DN30,
|
|
10
|
-
N0,
|
|
11
|
-
} from '@atlaskit/theme/colors';
|
|
12
1
|
import {
|
|
13
2
|
tableCellBorderWidth,
|
|
14
3
|
tableMarginTop,
|
|
@@ -22,12 +11,22 @@ import {
|
|
|
22
11
|
akEditorUnitZIndex,
|
|
23
12
|
akRichMediaResizeZIndex,
|
|
24
13
|
} from '@atlaskit/editor-shared-styles';
|
|
14
|
+
import {
|
|
15
|
+
B200,
|
|
16
|
+
B300,
|
|
17
|
+
DN30,
|
|
18
|
+
DN400,
|
|
19
|
+
N0,
|
|
20
|
+
N20,
|
|
21
|
+
N200,
|
|
22
|
+
R400,
|
|
23
|
+
R75,
|
|
24
|
+
} from '@atlaskit/theme/colors';
|
|
25
|
+
import { themed } from '@atlaskit/theme/components';
|
|
25
26
|
import { token } from '@atlaskit/tokens';
|
|
26
27
|
|
|
27
28
|
import { RESIZE_HANDLE_AREA_DECORATION_GAP } from '../types';
|
|
28
29
|
|
|
29
|
-
import { themed } from '@atlaskit/theme/components';
|
|
30
|
-
|
|
31
30
|
/**
|
|
32
31
|
* Basic colors added to prevent content overflow in table cells.
|
|
33
32
|
*/
|