@atlaskit/editor-plugin-table 2.3.1 → 2.4.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 +6 -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 +2 -2
- 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 +4 -4
- 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 +4 -4
- 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 +11 -3
- 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 +8 -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
- package/tmp/api-report-tmp.d.ts +108 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React, { useEffect, useRef } from 'react';
|
|
2
|
-
import { createPortal } from 'react-dom';
|
|
3
2
|
import rafSchedule from 'raf-schd';
|
|
3
|
+
import { createPortal } from 'react-dom';
|
|
4
4
|
import { akEditorFloatingPanelZIndex } from '@atlaskit/editor-shared-styles';
|
|
5
|
-
import { insertColumnButtonOffset } from '../common-styles';
|
|
6
5
|
import { TableCssClassName as ClassName } from '../../types';
|
|
6
|
+
import { insertColumnButtonOffset } from '../common-styles';
|
|
7
7
|
export const BUTTON_WIDTH = 20;
|
|
8
8
|
export const calcLeftPos = ({
|
|
9
9
|
buttonWidth,
|
|
@@ -3,17 +3,17 @@ import React from 'react';
|
|
|
3
3
|
import { jsx } from '@emotion/react';
|
|
4
4
|
import { findDomRefAtPos } from 'prosemirror-utils';
|
|
5
5
|
import { injectIntl } from 'react-intl-next';
|
|
6
|
+
import { ACTION_SUBJECT } from '@atlaskit/editor-common/analytics';
|
|
7
|
+
import { ErrorBoundary } from '@atlaskit/editor-common/error-boundary';
|
|
6
8
|
import { Popup } from '@atlaskit/editor-common/ui';
|
|
9
|
+
import { ToolbarButton } from '@atlaskit/editor-common/ui-menu';
|
|
7
10
|
import { akEditorSmallZIndex } from '@atlaskit/editor-shared-styles';
|
|
8
11
|
import ExpandIcon from '@atlaskit/icon/glyph/chevron-down';
|
|
9
|
-
import { ToolbarButton } from '@atlaskit/editor-common/ui-menu';
|
|
10
12
|
import { toggleContextualMenu } from '../../commands';
|
|
11
13
|
import { TableCssClassName as ClassName } from '../../types';
|
|
12
14
|
import messages from '../../ui/messages';
|
|
13
15
|
import FixedButton from './FixedButton';
|
|
14
|
-
import {
|
|
15
|
-
import { tableFloatingCellButtonStyles, tableFloatingCellButtonSelectedStyles } from './styles';
|
|
16
|
-
import { ErrorBoundary } from '@atlaskit/editor-common/error-boundary';
|
|
16
|
+
import { tableFloatingCellButtonSelectedStyles, tableFloatingCellButtonStyles } from './styles';
|
|
17
17
|
const BUTTON_OFFSET = 3;
|
|
18
18
|
const FloatingContextualButtonInner = /*#__PURE__*/React.memo(props => {
|
|
19
19
|
const {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
2
|
import { B75, DN0, DN60, N0, N20, N30A, N700 } from '@atlaskit/theme/colors';
|
|
3
|
+
import { themed } from '@atlaskit/theme/components';
|
|
3
4
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
4
5
|
import { contextualMenuTriggerSize } from '../consts';
|
|
5
|
-
import { themed } from '@atlaskit/theme/components';
|
|
6
6
|
export const tableFloatingCellButtonStyles = props => css`
|
|
7
7
|
> div {
|
|
8
8
|
// Sits behind button to provide surface-color background
|
|
@@ -2,27 +2,27 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
/** @jsx jsx */
|
|
3
3
|
import { Component } from 'react';
|
|
4
4
|
import { jsx } from '@emotion/react';
|
|
5
|
-
import { hexToEditorBackgroundPaletteColor } from '@atlaskit/editor-palette';
|
|
6
|
-
import { splitCell } from '@atlaskit/editor-tables/utils';
|
|
7
5
|
import { defineMessages, injectIntl } from 'react-intl-next';
|
|
6
|
+
import { TableSortOrder as SortOrder } from '@atlaskit/adf-schema/steps';
|
|
7
|
+
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
8
8
|
import { addColumnAfter, addRowAfter, backspace, tooltip } from '@atlaskit/editor-common/keymaps';
|
|
9
|
-
import { ColorPalette, backgroundPaletteTooltipMessages, cellBackgroundColorPalette } from '@atlaskit/editor-common/ui-color';
|
|
10
9
|
import { DropdownMenuSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
10
|
+
import { backgroundPaletteTooltipMessages, cellBackgroundColorPalette, ColorPalette } from '@atlaskit/editor-common/ui-color';
|
|
11
11
|
import { ArrowKeyNavigationType, DropdownMenu } from '@atlaskit/editor-common/ui-menu';
|
|
12
|
-
import { shortcutStyle } from '@atlaskit/editor-shared-styles/shortcut';
|
|
13
|
-
import { cellColourPreviewStyles } from './styles';
|
|
14
12
|
import { closestElement } from '@atlaskit/editor-common/utils';
|
|
15
|
-
import {
|
|
13
|
+
import { hexToEditorBackgroundPaletteColor } from '@atlaskit/editor-palette';
|
|
14
|
+
import { shortcutStyle } from '@atlaskit/editor-shared-styles/shortcut';
|
|
15
|
+
import { splitCell } from '@atlaskit/editor-tables/utils';
|
|
16
16
|
import { clearHoverSelection, hoverColumns, hoverMergedCells, hoverRows, toggleContextualMenu } from '../../commands';
|
|
17
|
-
import { deleteColumnsWithAnalytics, deleteRowsWithAnalytics, emptyMultipleCellsWithAnalytics, insertColumnWithAnalytics, insertRowWithAnalytics, mergeCellsWithAnalytics, setColorWithAnalytics, sortColumnWithAnalytics, splitCellWithAnalytics
|
|
17
|
+
import { deleteColumnsWithAnalytics, deleteRowsWithAnalytics, distributeColumnsWidthsWithAnalytics, emptyMultipleCellsWithAnalytics, insertColumnWithAnalytics, insertRowWithAnalytics, mergeCellsWithAnalytics, setColorWithAnalytics, sortColumnWithAnalytics, splitCellWithAnalytics } from '../../commands-with-analytics';
|
|
18
18
|
import { getPluginState } from '../../pm-plugins/plugin-factory';
|
|
19
|
+
import { getNewResizeStateFromSelectedColumns } from '../../pm-plugins/table-resizing/utils/resize-state';
|
|
19
20
|
import { canMergeCells } from '../../transforms';
|
|
20
21
|
import { TableCssClassName as ClassName } from '../../types';
|
|
21
|
-
import { TableSortOrder as SortOrder } from '@atlaskit/adf-schema/steps';
|
|
22
22
|
import { getMergedCellsPositions, getSelectedColumnIndexes, getSelectedRowIndexes } from '../../utils';
|
|
23
|
-
import tableMessages from '../messages';
|
|
24
23
|
import { contextualMenuDropdownWidth } from '../consts';
|
|
25
|
-
import
|
|
24
|
+
import tableMessages from '../messages';
|
|
25
|
+
import { cellColourPreviewStyles } from './styles';
|
|
26
26
|
export const messages = defineMessages({
|
|
27
27
|
cellBackground: {
|
|
28
28
|
id: 'fabric.editor.cellBackground',
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { jsx } from '@emotion/react';
|
|
3
3
|
import { findDomRefAtPos } from 'prosemirror-utils';
|
|
4
|
-
import { findCellRectClosestToPos, getSelectionRect, isSelectionType } from '@atlaskit/editor-tables/utils';
|
|
5
4
|
import { Popup } from '@atlaskit/editor-common/ui';
|
|
6
5
|
import { akEditorFloatingOverlapPanelZIndex } from '@atlaskit/editor-shared-styles';
|
|
6
|
+
import { findCellRectClosestToPos, getSelectionRect, isSelectionType } from '@atlaskit/editor-tables/utils';
|
|
7
7
|
import { getPluginState } from '../../pm-plugins/plugin-factory';
|
|
8
8
|
import { pluginKey } from '../../pm-plugins/plugin-key';
|
|
9
9
|
import { contextualMenuDropdownWidth, contextualMenuTriggerSize } from '../consts';
|
|
10
|
-
import { tablePopupStyles } from './styles';
|
|
11
10
|
import ContextualMenu from './ContextualMenu';
|
|
11
|
+
import { tablePopupStyles } from './styles';
|
|
12
12
|
|
|
13
13
|
// offset of the contextual menu dropdown
|
|
14
14
|
const calculateOffset = (targetCellRef, state) => {
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
2
|
import { tableBackgroundBorderColor } from '@atlaskit/adf-schema';
|
|
3
3
|
import { N60A, N90 } from '@atlaskit/theme/colors';
|
|
4
|
-
import { contextualMenuDropdownWidth } from '../consts';
|
|
5
|
-
import { TableCssClassName as ClassName } from '../../types';
|
|
6
4
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
5
|
+
import { TableCssClassName as ClassName } from '../../types';
|
|
6
|
+
import { contextualMenuDropdownWidth } from '../consts';
|
|
7
7
|
export const cellColourPreviewStyles = selectedColor => css`
|
|
8
8
|
&::before {
|
|
9
9
|
background: ${selectedColor};
|
|
10
10
|
}
|
|
11
11
|
`;
|
|
12
|
+
|
|
13
|
+
// TODO Delete this comment after verifying space token -> previous value `padding: 8px`
|
|
14
|
+
// TODO Delete this comment after verifying space token -> previous value `margin-left: 4px`
|
|
12
15
|
export const tablePopupStyles = css`
|
|
13
16
|
.${ClassName.CONTEXTUAL_SUBMENU} {
|
|
14
17
|
border-radius: ${borderRadius()}px;
|
|
@@ -18,7 +21,7 @@ export const tablePopupStyles = css`
|
|
|
18
21
|
position: absolute;
|
|
19
22
|
top: 0;
|
|
20
23
|
left: ${contextualMenuDropdownWidth}px;
|
|
21
|
-
padding: 8px;
|
|
24
|
+
padding: ${"var(--ds-space-100, 8px)"};
|
|
22
25
|
|
|
23
26
|
> div {
|
|
24
27
|
padding: 0;
|
|
@@ -39,7 +42,7 @@ export const tablePopupStyles = css`
|
|
|
39
42
|
|
|
40
43
|
&::after {
|
|
41
44
|
content: '›';
|
|
42
|
-
margin-left: 4px;
|
|
45
|
+
margin-left: ${"var(--ds-space-050, 4px)"};
|
|
43
46
|
line-height: 20px;
|
|
44
47
|
color: ${`var(--ds-icon, ${N90})`};
|
|
45
48
|
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
import React, { Component } from 'react';
|
|
4
|
-
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
5
|
-
import { getSelectionRect, isTableSelected } from '@atlaskit/editor-tables/utils';
|
|
6
4
|
import { createPortal } from 'react-dom';
|
|
5
|
+
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
7
6
|
import { Popup } from '@atlaskit/editor-common/ui';
|
|
8
|
-
import { akEditorTableNumberColumnWidth } from '@atlaskit/editor-shared-styles';
|
|
9
7
|
import { closestElement } from '@atlaskit/editor-common/utils';
|
|
10
|
-
import {
|
|
8
|
+
import { akEditorTableNumberColumnWidth } from '@atlaskit/editor-shared-styles';
|
|
9
|
+
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
10
|
+
import { getSelectionRect, isTableSelected } from '@atlaskit/editor-tables/utils';
|
|
11
11
|
import { clearHoverSelection, hoverColumns, hoverRows } from '../../commands';
|
|
12
12
|
import { deleteColumnsWithAnalytics, deleteRowsWithAnalytics } from '../../commands-with-analytics';
|
|
13
13
|
import { getPluginState as getTablePluginState } from '../../pm-plugins/plugin-factory';
|
|
14
14
|
import { TableCssClassName as ClassName } from '../../types';
|
|
15
15
|
import { getColumnDeleteButtonParams, getColumnsWidths, getRowDeleteButtonParams, getRowHeights } from '../../utils';
|
|
16
|
-
import tableMessages from '../messages';
|
|
17
16
|
import { stickyRowZIndex } from '../consts';
|
|
17
|
+
import tableMessages from '../messages';
|
|
18
18
|
import DeleteButton from './DeleteButton';
|
|
19
19
|
import getPopupOptions from './getPopUpOptions';
|
|
20
20
|
export function getSelectionType(selection) {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { injectIntl } from 'react-intl-next';
|
|
3
|
+
import * as keymaps from '@atlaskit/editor-common/keymaps';
|
|
3
4
|
import { tableMarginTop } from '@atlaskit/editor-common/styles';
|
|
5
|
+
import { closestElement } from '@atlaskit/editor-common/utils';
|
|
4
6
|
import { akEditorTableNumberColumnWidth } from '@atlaskit/editor-shared-styles';
|
|
5
7
|
import Tooltip from '@atlaskit/tooltip';
|
|
6
|
-
import * as keymaps from '@atlaskit/editor-common/keymaps';
|
|
7
|
-
import { closestElement } from '@atlaskit/editor-common/utils';
|
|
8
8
|
import { TableCssClassName as ClassName } from '../../types';
|
|
9
|
-
import tableMessages from '../messages';
|
|
10
9
|
import { tableToolbarSize } from '../consts';
|
|
10
|
+
import tableMessages from '../messages';
|
|
11
11
|
const getInsertLineHeight = (tableRef, hasStickyHeaders) => {
|
|
12
12
|
// The line gets height 100% from the table,
|
|
13
13
|
// but since we have an overflow on the left,
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
import React from 'react';
|
|
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 { injectIntl } from 'react-intl-next';
|
|
6
|
+
import { ACTION, ACTION_SUBJECT, CONTENT_COMPONENT, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
9
7
|
import { Popup } from '@atlaskit/editor-common/ui';
|
|
10
8
|
import { closestElement } from '@atlaskit/editor-common/utils';
|
|
11
|
-
import {
|
|
9
|
+
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
10
|
+
import { TableMap } from '@atlaskit/editor-tables/table-map';
|
|
11
|
+
import { findTable } from '@atlaskit/editor-tables/utils';
|
|
12
12
|
import { insertColumnWithAnalytics, insertRowWithAnalytics } from '../../commands-with-analytics';
|
|
13
13
|
import { TableCssClassName as ClassName } from '../../types';
|
|
14
14
|
import { checkIfNumberColumnEnabled } from '../../utils';
|
|
15
15
|
import getPopupOptions from './getPopupOptions';
|
|
16
16
|
import InsertButton from './InsertButton';
|
|
17
|
-
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, CONTENT_COMPONENT } from '@atlaskit/editor-common/analytics';
|
|
18
17
|
export class FloatingInsertButton extends React.Component {
|
|
19
18
|
constructor(props) {
|
|
20
19
|
super(props);
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import React, { createRef } from 'react';
|
|
3
3
|
import classnames from 'classnames';
|
|
4
|
+
import { findDomRefAtPos } from 'prosemirror-utils';
|
|
4
5
|
import { injectIntl } from 'react-intl-next';
|
|
6
|
+
import commonMessages from '@atlaskit/editor-common/messages';
|
|
5
7
|
import { Popup } from '@atlaskit/editor-common/ui';
|
|
8
|
+
import { ToolbarButton } from '@atlaskit/editor-common/ui-menu';
|
|
6
9
|
import CollapseIcon from '@atlaskit/icon/glyph/editor/collapse';
|
|
7
10
|
import ExpandIcon from '@atlaskit/icon/glyph/editor/expand';
|
|
8
|
-
import commonMessages from '@atlaskit/editor-common/messages';
|
|
9
|
-
import { ToolbarButton } from '@atlaskit/editor-common/ui-menu';
|
|
10
11
|
import { toggleTableLayoutWithAnalytics } from '../../commands-with-analytics';
|
|
11
12
|
import { TableCssClassName as ClassName } from '../../types';
|
|
12
|
-
import { findDomRefAtPos } from 'prosemirror-utils';
|
|
13
13
|
const addPopupOffset = pos => ({
|
|
14
14
|
...pos,
|
|
15
15
|
// add 12 pixels to align y position with
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import React, { Component } from 'react';
|
|
3
|
-
import { defineMessages, injectIntl } from 'react-intl-next';
|
|
4
3
|
import classnames from 'classnames';
|
|
4
|
+
import { defineMessages, injectIntl } from 'react-intl-next';
|
|
5
5
|
import { TableMap } from '@atlaskit/editor-tables/table-map';
|
|
6
6
|
import { findTable, isTableSelected, selectTable } from '@atlaskit/editor-tables/utils';
|
|
7
7
|
import { clearHoverSelection, hoverTable } from '../../../commands';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
2
|
import { tableMarginTop, tableSharedStyle } from '@atlaskit/editor-common/styles';
|
|
3
|
-
import {
|
|
4
|
-
import { N40A, B300, N300, N20A, N0, R500 } from '@atlaskit/theme/colors';
|
|
5
|
-
import { SelectionStyle, getSelectionStyles, akEditorSmallZIndex, akEditorTableNumberColumnWidth, akEditorStickyHeaderZIndex, akEditorTableToolbarSize, akEditorUnitZIndex, akEditorSelectedNodeClassName, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
3
|
+
import { akEditorSelectedNodeClassName, akEditorSmallZIndex, akEditorStickyHeaderZIndex, akEditorTableNumberColumnWidth, akEditorTableToolbarSize, akEditorUnitZIndex, getSelectionStyles, relativeFontSizeToBase16, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
6
4
|
import { scrollbarStyles } from '@atlaskit/editor-shared-styles/scrollbar';
|
|
5
|
+
import { B300, N0, N20A, N300, N40A, R500 } from '@atlaskit/theme/colors';
|
|
6
|
+
import { fontSize } from '@atlaskit/theme/constants';
|
|
7
7
|
import { TableCssClassName as ClassName } from '../types';
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { columnControlsDecorationHeight, resizeHandlerAreaWidth, resizeLineWidth, stickyHeaderBorderBottomWidth, stickyRowOffsetTop, stickyRowZIndex, tableBorderColor, tableBorderDeleteColor, tableBorderRadiusSize, tableBorderSelectedColor, tableCellBackgroundColor, tableCellDeleteColor, tableCellSelectedColor, tableControlsSpacing, tableHeaderCellBackgroundColor, tableInsertColumnButtonSize, tablePadding, tableScrollbarOffset, tableTextColor, tableToolbarDeleteColor, tableToolbarSelectedColor, tableToolbarSize } from './consts';
|
|
9
|
+
import { columnControlsDecoration, columnControlsLineMarker, DeleteButton, HeaderButton, HeaderButtonDanger, HeaderButtonHover, hoveredCell, hoveredDeleteButton, hoveredWarningCell, insertColumnButtonWrapper, InsertMarker, insertRowButtonWrapper, OverflowShadow, resizeHandle } from './ui-styles';
|
|
10
10
|
const cornerControlHeight = tableToolbarSize + 1;
|
|
11
11
|
|
|
12
12
|
/*
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { B200, B300, N20, R400, R75, DN400, N200, DN30, N0 } from '@atlaskit/theme/colors';
|
|
2
1
|
import { tableCellBorderWidth, tableMarginTop } from '@atlaskit/editor-common/styles';
|
|
3
2
|
import { akEditorTableBorder, akEditorTableBorderDark, akEditorTableToolbar, akEditorTableToolbarDark, akEditorTableToolbarSize, akEditorUnitZIndex, akRichMediaResizeZIndex } from '@atlaskit/editor-shared-styles';
|
|
4
|
-
import {
|
|
3
|
+
import { B200, B300, DN30, DN400, N0, N20, N200, R400, R75 } from '@atlaskit/theme/colors';
|
|
5
4
|
import { themed } from '@atlaskit/theme/components';
|
|
5
|
+
import { RESIZE_HANDLE_AREA_DECORATION_GAP } from '../types';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Basic colors added to prevent content overflow in table cells.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
2
|
import { tableCellBorderWidth, tableMarginTop, tableMarginTopWithControl } from '@atlaskit/editor-common/styles';
|
|
3
3
|
import { akEditorShadowZIndex, akEditorTableNumberColumnWidth, akEditorUnitZIndex } from '@atlaskit/editor-shared-styles';
|
|
4
|
-
import {
|
|
5
|
-
import { tableBorderColor, tableToolbarSelectedColor, tableHeaderCellBackgroundColor, tableBorderSelectedColor, tableCellDeleteColor, tableBorderDeleteColor, tableToolbarDeleteColor, lineMarkerSize, columnControlsDecorationHeight, columnControlsZIndex, columnControlsSelectedZIndex, resizeHandlerAreaWidth, resizeLineWidth, resizeHandlerZIndex, tableToolbarSize, tableInsertColumnButtonSize, tableDeleteButtonSize } from './consts';
|
|
6
|
-
import { TableCssClassName as ClassName } from '../types';
|
|
4
|
+
import { B300, N0, N20A, N300, N40A, N60A, R300, Y200, Y50 } from '@atlaskit/theme/colors';
|
|
7
5
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
6
|
+
import { TableCssClassName as ClassName } from '../types';
|
|
7
|
+
import { columnControlsDecorationHeight, columnControlsSelectedZIndex, columnControlsZIndex, lineMarkerSize, resizeHandlerAreaWidth, resizeHandlerZIndex, resizeLineWidth, tableBorderColor, tableBorderDeleteColor, tableBorderSelectedColor, tableCellDeleteColor, tableDeleteButtonSize, tableHeaderCellBackgroundColor, tableInsertColumnButtonSize, tableToolbarDeleteColor, tableToolbarSelectedColor, tableToolbarSize } from './consts';
|
|
8
8
|
const InsertLine = cssString => css`
|
|
9
9
|
.${ClassName.CONTROLS_INSERT_LINE} {
|
|
10
10
|
background: ${tableBorderSelectedColor};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { TableMap } from '@atlaskit/editor-tables/table-map';
|
|
2
|
-
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
3
1
|
import { findDomRefAtPos } from 'prosemirror-utils';
|
|
4
|
-
import { findTable, getCellsInColumn, getSelectionRect, isColumnSelected, isTableSelected } from '@atlaskit/editor-tables/utils';
|
|
5
2
|
import { maphElem } from '@atlaskit/editor-common/utils';
|
|
3
|
+
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
4
|
+
import { TableMap } from '@atlaskit/editor-tables/table-map';
|
|
5
|
+
import { findTable, getCellsInColumn, getSelectionRect, isColumnSelected, isTableSelected } from '@atlaskit/editor-tables/utils';
|
|
6
6
|
import { TableCssClassName as ClassName } from '../types';
|
|
7
7
|
import { tableDeleteButtonSize } from '../ui/consts';
|
|
8
8
|
export const getColumnsWidths = view => {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// @ts-ignore -- ReadonlyTransaction is a local declaration and will cause a TS2305 error in CCFE typecheck
|
|
2
2
|
|
|
3
|
-
import { Rect, TableMap } from '@atlaskit/editor-tables/table-map';
|
|
4
|
-
import { findTable, getCellsInRow, getSelectionRect } from '@atlaskit/editor-tables/utils';
|
|
5
3
|
import { Decoration } from 'prosemirror-view';
|
|
6
4
|
import { nonNullable } from '@atlaskit/editor-common/utils';
|
|
5
|
+
import { Rect, TableMap } from '@atlaskit/editor-tables/table-map';
|
|
6
|
+
import { findTable, getCellsInRow, getSelectionRect } from '@atlaskit/editor-tables/utils';
|
|
7
7
|
import { TableCssClassName as ClassName, TableDecorations } from '../types';
|
|
8
8
|
const filterDecorationByKey = (key, decorationSet) => decorationSet.find(undefined, undefined, spec => spec.key.indexOf(key) > -1);
|
|
9
9
|
export const findColumnControlSelectedDecoration = decorationSet => filterDecorationByKey(TableDecorations.COLUMN_SELECTED, decorationSet);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { createFixedGuidelinesFromLengths } from '@atlaskit/editor-common/guideline';
|
|
2
|
-
import { akEditorDefaultLayoutWidth,
|
|
2
|
+
import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorWideLayoutWidth } from '@atlaskit/editor-shared-styles';
|
|
3
3
|
export const defaultGuidelineWidths = [akEditorDefaultLayoutWidth, akEditorWideLayoutWidth, akEditorFullWidthLayoutWidth];
|
|
4
4
|
export const defaultGuidelines = createFixedGuidelinesFromLengths(defaultGuidelineWidths);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TableMap } from '@atlaskit/editor-tables/table-map';
|
|
2
1
|
import { hasParentNodeOfType } from 'prosemirror-utils';
|
|
2
|
+
import { TableMap } from '@atlaskit/editor-tables/table-map';
|
|
3
3
|
import { findTable } from '@atlaskit/editor-tables/utils';
|
|
4
4
|
import { pluginKey } from '../pm-plugins/plugin-key';
|
|
5
5
|
export const isIsolating = node => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { TableMap } from '@atlaskit/editor-tables/table-map';
|
|
2
|
-
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
3
1
|
import { safeInsert } from 'prosemirror-utils';
|
|
4
|
-
import { findTable, getSelectionRect, isRowSelected, isTableSelected } from '@atlaskit/editor-tables/utils';
|
|
5
2
|
import { parsePx } from '@atlaskit/editor-common/utils';
|
|
3
|
+
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
4
|
+
import { TableMap } from '@atlaskit/editor-tables/table-map';
|
|
5
|
+
import { findTable, getSelectionRect, isRowSelected, isTableSelected } from '@atlaskit/editor-tables/utils';
|
|
6
6
|
import { TableCssClassName as ClassName } from '../types';
|
|
7
7
|
import { tableDeleteButtonSize } from '../ui/consts';
|
|
8
8
|
export const getRowHeights = tableRef => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TableMap } from '@atlaskit/editor-tables/table-map';
|
|
2
1
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
2
|
+
import { TableMap } from '@atlaskit/editor-tables/table-map';
|
|
3
3
|
import { findTable, getSelectionRangeInColumn, getSelectionRangeInRow, getSelectionRect, isSelectionType } from '@atlaskit/editor-tables/utils';
|
|
4
4
|
export const isSelectionUpdated = (oldSelection, newSelection) => !!(!newSelection && oldSelection) || isSelectionType(oldSelection, 'cell') !== isSelectionType(newSelection, 'cell') || isSelectionType(oldSelection, 'cell') && isSelectionType(newSelection, 'cell') && oldSelection.ranges !== newSelection.ranges;
|
|
5
5
|
const isRectangularCellSelection = (selection, rect) => {
|
package/dist/es2019/version.json
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
// #region Imports
|
|
2
2
|
import { Selection } from 'prosemirror-state';
|
|
3
|
-
import {
|
|
3
|
+
import { emptyCell, findCellClosestToPos, isSelectionType } from '@atlaskit/editor-tables/utils';
|
|
4
|
+
|
|
4
5
|
// #endregion
|
|
6
|
+
|
|
5
7
|
// #region Commands
|
|
6
8
|
export var clearMultipleCells = function clearMultipleCells(targetCellPosition) {
|
|
7
9
|
return function (state, dispatch) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// #region Constants
|
|
2
|
-
import { findTable, goToNextCell as baseGotoNextCell } from '@atlaskit/editor-tables/utils';
|
|
3
|
-
import { TableMap } from '@atlaskit/editor-tables/table-map';
|
|
4
2
|
import { findParentNodeOfType } from 'prosemirror-utils';
|
|
5
3
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
|
+
import { TableMap } from '@atlaskit/editor-tables/table-map';
|
|
5
|
+
import { goToNextCell as baseGotoNextCell, findTable } from '@atlaskit/editor-tables/utils';
|
|
6
6
|
import { insertRowWithAnalytics } from '../commands-with-analytics';
|
|
7
7
|
var TAB_FORWARD_DIRECTION = 1;
|
|
8
8
|
var TAB_BACKWARD_DIRECTION = -1;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
// #region Imports
|
|
2
2
|
import { Selection } from 'prosemirror-state';
|
|
3
|
-
import { TableMap } from '@atlaskit/editor-tables/table-map';
|
|
4
|
-
import { addColumnAt as addColumnAtPMUtils, addRowAt, createTable as createTableNode, findTable, selectedRect } from '@atlaskit/editor-tables/utils';
|
|
5
3
|
import { safeInsert } from 'prosemirror-utils';
|
|
6
4
|
import { AddColumnStep } from '@atlaskit/adf-schema/steps';
|
|
5
|
+
import { TableMap } from '@atlaskit/editor-tables/table-map';
|
|
6
|
+
import { addColumnAt as addColumnAtPMUtils, addRowAt, createTable as createTableNode, findTable, selectedRect } from '@atlaskit/editor-tables/utils';
|
|
7
|
+
import { rescaleColumns } from '../transforms/column-width';
|
|
7
8
|
import { checkIfHeaderRowEnabled, copyPreviousRow } from '../utils';
|
|
8
9
|
import { getAllowAddColumnCustomStep } from '../utils/get-allow-add-column-custom-step';
|
|
9
|
-
|
|
10
|
+
|
|
10
11
|
// #endregion
|
|
11
12
|
|
|
12
13
|
function addColumnAtCustomStep(column) {
|
|
@@ -4,17 +4,17 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
4
4
|
// #region Imports
|
|
5
5
|
|
|
6
6
|
import { TextSelection } from 'prosemirror-state';
|
|
7
|
-
import {
|
|
7
|
+
import { closestElement, isParagraph, isTextSelection, mapSlice } from '@atlaskit/editor-common/utils';
|
|
8
8
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
9
|
+
import { TableMap } from '@atlaskit/editor-tables/table-map';
|
|
10
|
+
import { findCellClosestToPos, findTable, getCellsInColumn, getCellsInRow, getSelectionRect, isSelectionType, isTableSelected, removeTable, selectColumn as selectColumnTransform, selectionCell, selectRow as selectRowTransform, setCellAttrs } from '@atlaskit/editor-tables/utils';
|
|
11
11
|
import { getDecorations } from '../pm-plugins/decorations/plugin';
|
|
12
12
|
import { buildColumnResizingDecorations } from '../pm-plugins/decorations/utils';
|
|
13
13
|
import { createCommand, getPluginState } from '../pm-plugins/plugin-factory';
|
|
14
14
|
import { fixAutoSizedTable } from '../transforms';
|
|
15
15
|
import { TableCssClassName as ClassName, TableDecorations } from '../types';
|
|
16
16
|
import { createColumnControlsDecoration, createColumnSelectedDecoration } from '../utils/decoration';
|
|
17
|
-
import {
|
|
17
|
+
import { checkIfHeaderColumnEnabled, checkIfHeaderRowEnabled, checkIfNumberColumnEnabled, isIsolating } from '../utils/nodes';
|
|
18
18
|
import { updatePluginStateDecorations } from '../utils/update-plugin-state-decorations';
|
|
19
19
|
// #endregion
|
|
20
20
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createCommand } from '../pm-plugins/plugin-factory';
|
|
2
1
|
import { removeConnectedNodes } from '@atlaskit/editor-common/utils';
|
|
2
|
+
import { createCommand } from '../pm-plugins/plugin-factory';
|
|
3
3
|
export var removeDescendantNodes = function removeDescendantNodes(sourceNode) {
|
|
4
4
|
return createCommand({
|
|
5
5
|
type: 'UPDATE_STATE',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Selection, TextSelection } from 'prosemirror-state';
|
|
2
|
+
import { GapCursorSelection, isSelectionAtEndOfNode, isSelectionAtStartOfNode, RelativeSelectionPos, Side } from '@atlaskit/editor-common/selection';
|
|
3
3
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
4
|
+
import { TableMap } from '@atlaskit/editor-tables/table-map';
|
|
4
5
|
import { findTable, isTableSelected } from '@atlaskit/editor-tables/utils';
|
|
5
|
-
import { RelativeSelectionPos, GapCursorSelection, Side, isSelectionAtStartOfNode, isSelectionAtEndOfNode } from '@atlaskit/editor-common/selection';
|
|
6
6
|
export var TableSelectionDirection = /*#__PURE__*/function (TableSelectionDirection) {
|
|
7
7
|
TableSelectionDirection["TopToBottom"] = "TopToBottom";
|
|
8
8
|
TableSelectionDirection["BottomToTop"] = "BottomToTop";
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { Selection } from 'prosemirror-state';
|
|
2
|
-
import {
|
|
3
|
-
import { findCellRectClosestToPos } from '@atlaskit/editor-tables/utils';
|
|
4
|
-
import { convertArrayOfRowsToTableNode, convertTableNodeToArrayOfRows, findTable, getSelectionRect, isSelectionType } from '@atlaskit/editor-tables/utils';
|
|
2
|
+
import { TableSortOrder as SortOrder, TableSortStep } from '@atlaskit/adf-schema/steps';
|
|
5
3
|
import { createCompareNodes } from '@atlaskit/editor-common/utils';
|
|
4
|
+
import { TableMap } from '@atlaskit/editor-tables/table-map';
|
|
5
|
+
import { convertArrayOfRowsToTableNode, convertTableNodeToArrayOfRows, findCellRectClosestToPos, findTable, getSelectionRect, isSelectionType } from '@atlaskit/editor-tables/utils';
|
|
6
6
|
import { createCommand, getPluginState } from '../pm-plugins/plugin-factory';
|
|
7
|
-
import { TableSortStep, TableSortOrder as SortOrder } from '@atlaskit/adf-schema/steps';
|
|
8
7
|
var createGetInlineCardTextFromStore = function createGetInlineCardTextFromStore(attrs) {
|
|
9
8
|
var _ref = attrs,
|
|
10
9
|
data = _ref.data;
|
|
@@ -3,8 +3,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
3
3
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
4
|
//#region Imports
|
|
5
5
|
|
|
6
|
-
import { toggleHeader } from '@atlaskit/editor-tables/utils';
|
|
7
|
-
import { findTable } from '@atlaskit/editor-tables/utils';
|
|
6
|
+
import { findTable, toggleHeader } from '@atlaskit/editor-tables/utils';
|
|
8
7
|
import { createCommand } from '../pm-plugins/plugin-factory';
|
|
9
8
|
//#endregion
|
|
10
9
|
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
3
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
-
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
5
|
-
import { findCellClosestToPos, findCellRectClosestToPos, getSelectionRect } from '@atlaskit/editor-tables/utils';
|
|
6
4
|
import { tableBackgroundColorPalette } from '@atlaskit/adf-schema';
|
|
7
5
|
import { ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD, TABLE_ACTION, TABLE_BREAKOUT } from '@atlaskit/editor-common/analytics';
|
|
6
|
+
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
7
|
+
import { findCellClosestToPos, findCellRectClosestToPos, getSelectionRect } from '@atlaskit/editor-tables/utils';
|
|
8
8
|
import { clearMultipleCells } from './commands/clear';
|
|
9
9
|
import { wrapTableInExpand } from './commands/collapse';
|
|
10
10
|
import { insertColumn, insertRow } from './commands/insert';
|
|
11
|
-
import { deleteTable,
|
|
11
|
+
import { deleteTable, deleteTableIfSelected, setMultipleCellAttrs } from './commands/misc';
|
|
12
12
|
import { sortByColumn } from './commands/sort';
|
|
13
13
|
import { splitCell } from './commands/split-cell';
|
|
14
14
|
import { getNextLayout, toggleHeaderColumn, toggleHeaderRow, toggleNumberColumn, toggleTableLayout } from './commands/toggle';
|
|
15
|
-
import { distributeColumnsWidths } from './pm-plugins/table-resizing/commands';
|
|
16
15
|
import { getPluginState } from './pm-plugins/plugin-factory';
|
|
16
|
+
import { distributeColumnsWidths } from './pm-plugins/table-resizing/commands';
|
|
17
17
|
import { deleteColumns, deleteRows, mergeCells } from './transforms';
|
|
18
18
|
import { checkIfNumberColumnEnabled, getSelectedCellInfo, getSelectedTableInfo } from './utils';
|
|
19
19
|
import { withEditorAnalyticsAPI } from './utils/analytics';
|
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
2
|
import { Selection, TextSelection } from 'prosemirror-state';
|
|
3
|
+
import { ACTION_SUBJECT, EVENT_TYPE, TABLE_ACTION } from '@atlaskit/editor-common/analytics';
|
|
4
|
+
import { browser, closestElement, isElementInTableCell, isLastItemMediaGroup, setNodeSelection } from '@atlaskit/editor-common/utils';
|
|
3
5
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
4
6
|
import { TableMap } from '@atlaskit/editor-tables/table-map';
|
|
5
7
|
import { cellAround, findCellRectClosestToPos, findTable, getSelectionRect, removeTable } from '@atlaskit/editor-tables/utils';
|
|
6
|
-
import { browser } from '@atlaskit/editor-common/utils';
|
|
7
|
-
import { isElementInTableCell, isLastItemMediaGroup, setNodeSelection } from '@atlaskit/editor-common/utils';
|
|
8
|
-
import { closestElement } from '@atlaskit/editor-common/utils';
|
|
9
|
-
import { ACTION_SUBJECT, EVENT_TYPE, TABLE_ACTION } from '@atlaskit/editor-common/analytics';
|
|
10
8
|
import { addResizeHandleDecorations, clearHoverSelection, hideInsertColumnOrRowButton, hideResizeHandleLine, hoverColumns, selectColumn, setEditorFocus, showInsertColumnButton, showInsertRowButton, showResizeHandleLine } from './commands';
|
|
11
9
|
import { getPluginState } from './pm-plugins/plugin-factory';
|
|
12
10
|
import { getPluginState as getResizePluginState } from './pm-plugins/table-resizing/plugin-factory';
|
|
13
11
|
import { deleteColumns, deleteRows } from './transforms';
|
|
14
12
|
import { RESIZE_HANDLE_AREA_DECORATION_GAP } from './types';
|
|
15
|
-
import { getColumnOrRowIndex, getMousePositionHorizontalRelativeByElement, getMousePositionVerticalRelativeByElement, getSelectedCellInfo, isCell, isColumnControlsDecorations, isCornerButton, isInsertRowButton, isResizeHandleDecoration, isRowControlsButton,
|
|
13
|
+
import { getColumnOrRowIndex, getMousePositionHorizontalRelativeByElement, getMousePositionVerticalRelativeByElement, getSelectedCellInfo, hasResizeHandler, isCell, isColumnControlsDecorations, isCornerButton, isInsertRowButton, isResizeHandleDecoration, isRowControlsButton, isTableContainerOrWrapper, isTableControlsButton } from './utils';
|
|
16
14
|
import { getAllowAddColumnCustomStep } from './utils/get-allow-add-column-custom-step';
|
|
17
15
|
var isFocusingCalendar = function isFocusingCalendar(event) {
|
|
18
16
|
return event instanceof FocusEvent && event.relatedTarget instanceof HTMLElement && event.relatedTarget.getAttribute('aria-label') === 'calendar';
|
|
@@ -2,17 +2,17 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
3
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
4
|
// #region Imports
|
|
5
|
+
|
|
5
6
|
// @ts-ignore -- ReadonlyTransaction is a local declaration and will cause a TS2305 error in CCFE typecheck
|
|
6
7
|
|
|
7
8
|
import { findParentNodeOfType } from 'prosemirror-utils';
|
|
8
|
-
import {
|
|
9
|
+
import { TableSortStep } from '@atlaskit/adf-schema/steps';
|
|
9
10
|
import { isTextInput } from '@atlaskit/editor-common/utils';
|
|
10
|
-
import {
|
|
11
|
+
import { findTable } from '@atlaskit/editor-tables/utils';
|
|
11
12
|
import { defaultTableSelection } from './pm-plugins/default-table-selection';
|
|
12
13
|
import { pluginKey as tableResizingPluginKey } from './pm-plugins/table-resizing';
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
import { checkIfNumberColumnEnabled, checkIfHeaderColumnEnabled, checkIfHeaderRowEnabled } from './utils/nodes';
|
|
14
|
+
import { isTableCollapsible } from './utils/collapse';
|
|
15
|
+
import { checkIfHeaderColumnEnabled, checkIfHeaderRowEnabled, checkIfNumberColumnEnabled } from './utils/nodes';
|
|
16
16
|
var nextTableSorting = function nextTableSorting(tr, table) {
|
|
17
17
|
var tableSortStep = tr.steps.find(function (step) {
|
|
18
18
|
return step instanceof TableSortStep;
|