@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,17 +1,22 @@
|
|
|
1
1
|
import React, { CSSProperties } from 'react';
|
|
2
|
+
|
|
2
3
|
import classnames from 'classnames';
|
|
4
|
+
import memoizeOne from 'memoize-one';
|
|
3
5
|
import { Node as PmNode } from 'prosemirror-model';
|
|
4
|
-
import { isTableSelected } from '@atlaskit/editor-tables/utils';
|
|
5
6
|
import { EditorView } from 'prosemirror-view';
|
|
6
7
|
import rafSchedule from 'raf-schd';
|
|
7
|
-
import { findTable } from '@atlaskit/editor-tables/utils';
|
|
8
8
|
|
|
9
|
+
import type { TableColumnOrdering } from '@atlaskit/adf-schema/steps';
|
|
10
|
+
import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
11
|
+
import { getParentNodeWidth } from '@atlaskit/editor-common/node-width';
|
|
9
12
|
import { tableMarginSides } from '@atlaskit/editor-common/styles';
|
|
13
|
+
import type {
|
|
14
|
+
EditorContainerWidth,
|
|
15
|
+
GetEditorFeatureFlags,
|
|
16
|
+
} from '@atlaskit/editor-common/types';
|
|
10
17
|
import { browser, isValidPosition } from '@atlaskit/editor-common/utils';
|
|
11
18
|
import { akEditorTableToolbarSize as tableToolbarSize } from '@atlaskit/editor-shared-styles';
|
|
12
|
-
|
|
13
|
-
import type { EditorContainerWidth } from '@atlaskit/editor-common/types';
|
|
14
|
-
import { getParentNodeWidth } from '@atlaskit/editor-common/node-width';
|
|
19
|
+
import { findTable, isTableSelected } from '@atlaskit/editor-tables/utils';
|
|
15
20
|
|
|
16
21
|
import { autoSizeTable, clearHoverSelection } from '../commands';
|
|
17
22
|
import { getPluginState } from '../pm-plugins/plugin-factory';
|
|
@@ -27,29 +32,23 @@ import {
|
|
|
27
32
|
scaleTable,
|
|
28
33
|
} from '../pm-plugins/table-resizing/utils';
|
|
29
34
|
import { updateControls } from '../pm-plugins/table-resizing/utils/dom';
|
|
30
|
-
|
|
31
|
-
import type { GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
|
|
32
35
|
import {
|
|
33
36
|
TableCssClassName as ClassName,
|
|
34
37
|
PluginInjectionAPI,
|
|
35
38
|
ShadowEvent,
|
|
36
39
|
} from '../types';
|
|
37
|
-
import type { TableColumnOrdering } from '@atlaskit/adf-schema/steps';
|
|
38
40
|
import TableFloatingControls from '../ui/TableFloatingControls';
|
|
39
41
|
import {
|
|
40
42
|
containsHeaderRow,
|
|
43
|
+
isTableNested,
|
|
41
44
|
tablesHaveDifferentColumnWidths,
|
|
42
45
|
tablesHaveDifferentNoOfColumns,
|
|
43
|
-
isTableNested,
|
|
44
46
|
} from '../utils';
|
|
45
47
|
|
|
46
|
-
import type { TableOptions } from './types';
|
|
47
|
-
import { updateOverflowShadows } from './update-overflow-shadows';
|
|
48
|
-
import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
49
|
-
import memoizeOne from 'memoize-one';
|
|
50
48
|
import { OverflowShadowsObserver } from './OverflowShadowsObserver';
|
|
51
49
|
import { TableContainer } from './TableContainer';
|
|
52
|
-
import {
|
|
50
|
+
import type { TableOptions } from './types';
|
|
51
|
+
import { updateOverflowShadows } from './update-overflow-shadows';
|
|
53
52
|
|
|
54
53
|
const isIE11 = browser.ie_version === 11;
|
|
55
54
|
const NOOP = () => undefined;
|
|
@@ -139,7 +138,7 @@ class TableComponent extends React.Component<ComponentProps, TableState> {
|
|
|
139
138
|
}
|
|
140
139
|
|
|
141
140
|
componentDidMount() {
|
|
142
|
-
const { allowColumnResizing, eventDispatcher } = this.props;
|
|
141
|
+
const { allowColumnResizing, eventDispatcher, options } = this.props;
|
|
143
142
|
if (allowColumnResizing && this.wrapper && !isIE11) {
|
|
144
143
|
this.wrapper.addEventListener('scroll', this.handleScrollDebounced);
|
|
145
144
|
}
|
|
@@ -149,7 +148,7 @@ class TableComponent extends React.Component<ComponentProps, TableState> {
|
|
|
149
148
|
* We no longer use `containerWidth` as a variable to determine an update for table resizing (avoids unnecessary updates).
|
|
150
149
|
* Instead we use the resize event to only trigger updates when necessary.
|
|
151
150
|
*/
|
|
152
|
-
if (!
|
|
151
|
+
if (!options?.isTableResizingEnabled) {
|
|
153
152
|
window.addEventListener('resize', this.handleWindowResizeDebounced);
|
|
154
153
|
}
|
|
155
154
|
this.handleTableResizingDebounced();
|
|
@@ -167,6 +166,7 @@ class TableComponent extends React.Component<ComponentProps, TableState> {
|
|
|
167
166
|
}
|
|
168
167
|
|
|
169
168
|
componentWillUnmount() {
|
|
169
|
+
const { allowColumnResizing, eventDispatcher, options } = this.props;
|
|
170
170
|
if (this.wrapper && !isIE11) {
|
|
171
171
|
this.wrapper.removeEventListener('scroll', this.handleScrollDebounced);
|
|
172
172
|
}
|
|
@@ -175,14 +175,11 @@ class TableComponent extends React.Component<ComponentProps, TableState> {
|
|
|
175
175
|
this.scaleTableDebounced.cancel();
|
|
176
176
|
this.handleTableResizingDebounced.cancel();
|
|
177
177
|
this.handleAutoSizeDebounced.cancel();
|
|
178
|
-
if (!
|
|
178
|
+
if (!options?.isTableResizingEnabled) {
|
|
179
179
|
this.handleWindowResizeDebounced.cancel();
|
|
180
180
|
}
|
|
181
181
|
|
|
182
|
-
if (
|
|
183
|
-
!getBooleanFF('platform.editor.custom-table-width') &&
|
|
184
|
-
this.props.allowColumnResizing
|
|
185
|
-
) {
|
|
182
|
+
if (!options?.isTableResizingEnabled && allowColumnResizing) {
|
|
186
183
|
window.removeEventListener('resize', this.handleWindowResizeDebounced);
|
|
187
184
|
}
|
|
188
185
|
|
|
@@ -190,7 +187,7 @@ class TableComponent extends React.Component<ComponentProps, TableState> {
|
|
|
190
187
|
this.overflowShadowsObserver.dispose();
|
|
191
188
|
}
|
|
192
189
|
|
|
193
|
-
|
|
190
|
+
eventDispatcher.off(
|
|
194
191
|
(stickyHeadersPluginKey as any).key,
|
|
195
192
|
this.onStickyState,
|
|
196
193
|
);
|
|
@@ -399,10 +396,10 @@ class TableComponent extends React.Component<ComponentProps, TableState> {
|
|
|
399
396
|
node={node}
|
|
400
397
|
tableRef={tableRef!}
|
|
401
398
|
containerWidth={containerWidth}
|
|
402
|
-
isFullWidthModeEnabled={options?.isFullWidthModeEnabled}
|
|
403
399
|
isBreakoutEnabled={options?.isBreakoutEnabled}
|
|
404
400
|
isNested={isNested}
|
|
405
401
|
pluginInjectionApi={pluginInjectionApi}
|
|
402
|
+
isTableResizingEnabled={options?.isTableResizingEnabled}
|
|
406
403
|
>
|
|
407
404
|
{stickyHeadersOptimization && (
|
|
408
405
|
<div
|
|
@@ -558,8 +555,8 @@ class TableComponent extends React.Component<ComponentProps, TableState> {
|
|
|
558
555
|
noOfColumnsChanged
|
|
559
556
|
) {
|
|
560
557
|
const shouldScaleTable =
|
|
561
|
-
(!
|
|
562
|
-
(
|
|
558
|
+
(!options?.isTableResizingEnabled ||
|
|
559
|
+
(options?.isTableResizingEnabled && isNested)) &&
|
|
563
560
|
!hasNumberedColumnChanged &&
|
|
564
561
|
!noOfColumnsChanged;
|
|
565
562
|
|
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
import React, {
|
|
2
|
+
forwardRef,
|
|
2
3
|
PropsWithChildren,
|
|
3
4
|
useCallback,
|
|
4
5
|
useRef,
|
|
5
|
-
forwardRef,
|
|
6
6
|
} from 'react';
|
|
7
|
+
|
|
8
|
+
import classNames from 'classnames';
|
|
7
9
|
import { Node as PMNode } from 'prosemirror-model';
|
|
8
10
|
import { EditorView } from 'prosemirror-view';
|
|
9
11
|
|
|
10
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
11
12
|
import { getTableContainerWidth } from '@atlaskit/editor-common/node-width';
|
|
12
|
-
import { EditorContainerWidth } from '@atlaskit/editor-common/types';
|
|
13
13
|
import { calcTableWidth } from '@atlaskit/editor-common/styles';
|
|
14
|
+
import { EditorContainerWidth } from '@atlaskit/editor-common/types';
|
|
14
15
|
import type { GuidelineConfig } from '@atlaskit/editor-plugin-guideline';
|
|
16
|
+
import { akEditorMobileBreakoutPoint } from '@atlaskit/editor-shared-styles';
|
|
15
17
|
|
|
16
|
-
import { PluginInjectionAPI, TableCssClassName as ClassName } from '../types';
|
|
17
|
-
import { TableResizer } from './TableResizer';
|
|
18
18
|
import { TABLE_MAX_WIDTH } from '../pm-plugins/table-resizing/utils';
|
|
19
|
-
import
|
|
20
|
-
|
|
19
|
+
import { TableCssClassName as ClassName, PluginInjectionAPI } from '../types';
|
|
20
|
+
|
|
21
|
+
import { TableResizer } from './TableResizer';
|
|
21
22
|
|
|
22
23
|
const getMarginLeft = (lineLength: number, tableWidth: number | 'inherit') => {
|
|
23
24
|
let marginLeft;
|
|
@@ -82,12 +83,11 @@ export const ResizableTableContainer = ({
|
|
|
82
83
|
pluginInjectionApi,
|
|
83
84
|
}: PropsWithChildren<ResizableTableContainerProps>) => {
|
|
84
85
|
const containerRef = useRef<HTMLDivElement | null>(null);
|
|
85
|
-
const innerContainerRef = useRef<HTMLDivElement | null>(null);
|
|
86
86
|
const marginLeftRef = useRef<number | undefined>(0);
|
|
87
87
|
|
|
88
88
|
const updateWidth = useCallback(
|
|
89
89
|
(width: number) => {
|
|
90
|
-
if (!containerRef.current
|
|
90
|
+
if (!containerRef.current) {
|
|
91
91
|
return;
|
|
92
92
|
}
|
|
93
93
|
|
|
@@ -142,11 +142,7 @@ export const ResizableTableContainer = ({
|
|
|
142
142
|
tableRef={tableRef}
|
|
143
143
|
displayGuideline={displayGuideline}
|
|
144
144
|
>
|
|
145
|
-
<InnerContainer
|
|
146
|
-
ref={innerContainerRef}
|
|
147
|
-
className={className}
|
|
148
|
-
node={node}
|
|
149
|
-
>
|
|
145
|
+
<InnerContainer className={className} node={node}>
|
|
150
146
|
{children}
|
|
151
147
|
</InnerContainer>
|
|
152
148
|
</TableResizer>
|
|
@@ -158,10 +154,7 @@ type TableContainerProps = {
|
|
|
158
154
|
node: PMNode;
|
|
159
155
|
className: string;
|
|
160
156
|
containerWidth: EditorContainerWidth;
|
|
161
|
-
|
|
162
|
-
// exiting breakout behaviour. In the future these values will be removed and replaced
|
|
163
|
-
// with a single table plugin option - requires changes to editor-core
|
|
164
|
-
isFullWidthModeEnabled: boolean | undefined;
|
|
157
|
+
isTableResizingEnabled: boolean | undefined;
|
|
165
158
|
isBreakoutEnabled: boolean | undefined;
|
|
166
159
|
editorView: EditorView;
|
|
167
160
|
getPos: () => number | undefined;
|
|
@@ -175,7 +168,7 @@ export const TableContainer = ({
|
|
|
175
168
|
node,
|
|
176
169
|
className,
|
|
177
170
|
containerWidth: { lineLength, width: editorWidth },
|
|
178
|
-
|
|
171
|
+
isTableResizingEnabled,
|
|
179
172
|
isBreakoutEnabled,
|
|
180
173
|
editorView,
|
|
181
174
|
getPos,
|
|
@@ -183,11 +176,7 @@ export const TableContainer = ({
|
|
|
183
176
|
isNested,
|
|
184
177
|
pluginInjectionApi,
|
|
185
178
|
}: PropsWithChildren<TableContainerProps>) => {
|
|
186
|
-
if (
|
|
187
|
-
(isFullWidthModeEnabled || isBreakoutEnabled) &&
|
|
188
|
-
getBooleanFF('platform.editor.custom-table-width') &&
|
|
189
|
-
!isNested
|
|
190
|
-
) {
|
|
179
|
+
if (isTableResizingEnabled && !isNested) {
|
|
191
180
|
return (
|
|
192
181
|
<ResizableTableContainer
|
|
193
182
|
className={className}
|
|
@@ -1,32 +1,33 @@
|
|
|
1
1
|
import React, {
|
|
2
2
|
PropsWithChildren,
|
|
3
3
|
useCallback,
|
|
4
|
-
useRef,
|
|
5
4
|
useMemo,
|
|
5
|
+
useRef,
|
|
6
6
|
useState,
|
|
7
7
|
} from 'react';
|
|
8
|
-
|
|
8
|
+
|
|
9
9
|
import { Node as PMNode } from 'prosemirror-model';
|
|
10
|
+
import { EditorView } from 'prosemirror-view';
|
|
10
11
|
import rafSchd from 'raf-schd';
|
|
11
12
|
|
|
13
|
+
import { getGuidelinesWithHighlights } from '@atlaskit/editor-common/guideline';
|
|
12
14
|
import {
|
|
13
15
|
HandleHeightSizeType,
|
|
14
16
|
HandleResize,
|
|
15
17
|
ResizerNext,
|
|
16
18
|
} from '@atlaskit/editor-common/resizer';
|
|
17
|
-
import { getGuidelinesWithHighlights } from '@atlaskit/editor-common/guideline';
|
|
18
19
|
import type { GuidelineConfig } from '@atlaskit/editor-plugin-guideline';
|
|
19
20
|
|
|
20
21
|
import {
|
|
21
|
-
scaleTable,
|
|
22
|
-
previewScaleTable,
|
|
23
|
-
getColgroupChildrenLength,
|
|
24
22
|
COLUMN_MIN_WIDTH,
|
|
23
|
+
getColgroupChildrenLength,
|
|
24
|
+
previewScaleTable,
|
|
25
|
+
scaleTable,
|
|
25
26
|
} from '../pm-plugins/table-resizing/utils';
|
|
26
27
|
import { pluginKey as tableWidthPluginKey } from '../pm-plugins/table-width';
|
|
28
|
+
import { TABLE_HIGHLIGHT_GAP, TABLE_SNAP_GAP } from '../ui/consts';
|
|
27
29
|
import { defaultGuidelines, defaultGuidelineWidths } from '../utils/guidelines';
|
|
28
30
|
import { findClosestSnap } from '../utils/snapping';
|
|
29
|
-
import { TABLE_SNAP_GAP, TABLE_HIGHLIGHT_GAP } from '../ui/consts';
|
|
30
31
|
|
|
31
32
|
interface TableResizerProps {
|
|
32
33
|
width: number;
|
|
@@ -1,50 +1,52 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
|
|
2
3
|
import {
|
|
3
4
|
DOMOutputSpec,
|
|
4
5
|
DOMSerializer,
|
|
5
6
|
Node as PmNode,
|
|
6
7
|
} from 'prosemirror-model';
|
|
8
|
+
import { EditorState, PluginKey } from 'prosemirror-state';
|
|
7
9
|
import { EditorView, NodeView } from 'prosemirror-view';
|
|
8
|
-
import { PluginKey, EditorState } from 'prosemirror-state';
|
|
9
|
-
import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
10
|
-
import type {
|
|
11
|
-
getPosHandler,
|
|
12
|
-
getPosHandlerNode,
|
|
13
|
-
} from '@atlaskit/editor-common/types';
|
|
14
10
|
|
|
15
|
-
import
|
|
11
|
+
import type { TableColumnOrdering } from '@atlaskit/adf-schema/steps';
|
|
12
|
+
import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
13
|
+
import { getTableContainerWidth } from '@atlaskit/editor-common/node-width';
|
|
16
14
|
import type { PortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
|
|
15
|
+
import ReactNodeView from '@atlaskit/editor-common/react-node-view';
|
|
17
16
|
import type {
|
|
18
17
|
GetEditorContainerWidth,
|
|
19
18
|
GetEditorFeatureFlags,
|
|
19
|
+
getPosHandler,
|
|
20
|
+
getPosHandlerNode,
|
|
20
21
|
} from '@atlaskit/editor-common/types';
|
|
21
22
|
import { WithPluginState } from '@atlaskit/editor-common/with-plugin-state';
|
|
23
|
+
import { TableMap } from '@atlaskit/editor-tables/table-map';
|
|
22
24
|
|
|
23
25
|
import { pluginConfig as getPluginConfig } from '../create-plugin-config';
|
|
24
26
|
import { getPluginState } from '../pm-plugins/plugin-factory';
|
|
25
27
|
import { pluginKey } from '../pm-plugins/plugin-key';
|
|
26
28
|
import { pluginKey as tableResizingPluginKey } from '../pm-plugins/table-resizing';
|
|
27
|
-
import { pluginKey as tableWidthPluginKey } from '../pm-plugins/table-width';
|
|
28
29
|
import { generateColgroup } from '../pm-plugins/table-resizing/utils';
|
|
29
|
-
import {
|
|
30
|
+
import { pluginKey as tableWidthPluginKey } from '../pm-plugins/table-width';
|
|
31
|
+
import { PluginInjectionAPI } from '../types';
|
|
32
|
+
import { isTableNested } from '../utils';
|
|
33
|
+
|
|
30
34
|
import TableComponent from './TableComponent';
|
|
31
35
|
import { Props, TableOptions } from './types';
|
|
32
|
-
import type { TableColumnOrdering } from '@atlaskit/adf-schema/steps';
|
|
33
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
34
|
-
import { getTableContainerWidth } from '@atlaskit/editor-common/node-width';
|
|
35
|
-
import { isTableNested } from '../utils';
|
|
36
|
-
import { PluginInjectionAPI } from '../types';
|
|
37
36
|
|
|
38
37
|
type ForwardRef = (node: HTMLElement | null) => void;
|
|
39
38
|
|
|
40
39
|
const tableAttributes = (
|
|
41
40
|
node: PmNode,
|
|
41
|
+
options: Props['options'],
|
|
42
42
|
state: EditorState,
|
|
43
43
|
pos: number | undefined,
|
|
44
44
|
) => {
|
|
45
|
+
// provide a width for tables when custom table width is supported
|
|
46
|
+
// this is to ensure 'responsive' tables (colgroup widths are undefined) become fixed to
|
|
47
|
+
// support screen size adjustments
|
|
45
48
|
const shouldHaveInlineWidth =
|
|
46
|
-
|
|
47
|
-
!isTableNested(state, pos);
|
|
49
|
+
options?.isTableResizingEnabled && !isTableNested(state, pos);
|
|
48
50
|
|
|
49
51
|
let style = shouldHaveInlineWidth
|
|
50
52
|
? `width: ${getTableContainerWidth(node)}px`
|
|
@@ -69,7 +71,7 @@ const toDOM = (node: PmNode, props: Props) => {
|
|
|
69
71
|
|
|
70
72
|
return [
|
|
71
73
|
'table',
|
|
72
|
-
tableAttributes(node, props.view.state, props.getPos()),
|
|
74
|
+
tableAttributes(node, props.options, props.view.state, props.getPos()),
|
|
73
75
|
colgroup,
|
|
74
76
|
['tbody', 0],
|
|
75
77
|
] as DOMOutputSpec;
|
|
@@ -122,7 +124,12 @@ export default class TableView extends ReactNodeView<Props> {
|
|
|
122
124
|
return;
|
|
123
125
|
}
|
|
124
126
|
|
|
125
|
-
const attrs = tableAttributes(
|
|
127
|
+
const attrs = tableAttributes(
|
|
128
|
+
node,
|
|
129
|
+
(this.reactComponentProps as Props).options,
|
|
130
|
+
this.view.state,
|
|
131
|
+
this.getPos(),
|
|
132
|
+
);
|
|
126
133
|
(Object.keys(attrs) as Array<keyof typeof attrs>).forEach((attr) => {
|
|
127
134
|
this.table!.setAttribute(attr, attrs[attr]);
|
|
128
135
|
});
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Node, DOMSerializer } from 'prosemirror-model';
|
|
1
|
+
import { DOMSerializer, Node } from 'prosemirror-model';
|
|
3
2
|
import { EditorView, NodeView } from 'prosemirror-view';
|
|
4
|
-
import
|
|
5
|
-
import type { getPosHandler } from '@atlaskit/editor-common/types';
|
|
3
|
+
import uuid from 'uuid';
|
|
6
4
|
|
|
7
5
|
import {
|
|
8
|
-
getCellDomAttrs,
|
|
9
|
-
getCellAttrs,
|
|
10
6
|
CellDomAttrs,
|
|
7
|
+
getCellAttrs,
|
|
8
|
+
getCellDomAttrs,
|
|
11
9
|
} from '@atlaskit/adf-schema';
|
|
12
|
-
import
|
|
10
|
+
import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
11
|
+
import type {
|
|
12
|
+
GetEditorFeatureFlags,
|
|
13
|
+
getPosHandler,
|
|
14
|
+
} from '@atlaskit/editor-common/types';
|
|
13
15
|
|
|
14
16
|
const DEFAULT_COL_SPAN = 1;
|
|
15
17
|
const DEFAULT_ROW_SPAN = 1;
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import { Node as PmNode } from 'prosemirror-model';
|
|
2
2
|
import { EditorView } from 'prosemirror-view';
|
|
3
3
|
|
|
4
|
+
import { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
5
|
+
import type { PortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
|
|
4
6
|
import type {
|
|
5
7
|
GetEditorContainerWidth,
|
|
6
8
|
GetEditorFeatureFlags,
|
|
7
9
|
} from '@atlaskit/editor-common/types';
|
|
8
|
-
|
|
9
|
-
import type { PortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
|
|
10
|
+
|
|
10
11
|
import type { PluginInjectionAPI } from '../types';
|
|
11
12
|
|
|
12
13
|
export type TableOptions = {
|
|
13
14
|
isBreakoutEnabled?: boolean;
|
|
14
15
|
isFullWidthModeEnabled?: boolean;
|
|
15
16
|
wasFullWidthModeEnabled?: boolean;
|
|
17
|
+
isTableResizingEnabled?: boolean;
|
|
16
18
|
};
|
|
17
19
|
|
|
18
20
|
export interface Props {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { TableCssClassName as ClassName } from '../types';
|
|
2
1
|
import type { GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
|
|
2
|
+
|
|
3
|
+
import { TableCssClassName as ClassName } from '../types';
|
|
4
|
+
|
|
3
5
|
export const updateShadowListForStickyStyles = (
|
|
4
6
|
heightStyle: string,
|
|
5
7
|
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
1
|
import {
|
|
3
2
|
EditorState,
|
|
4
3
|
PluginKey,
|
|
5
|
-
Transaction,
|
|
6
4
|
// @ts-ignore -- ReadonlyTransaction is a local declaration and will cause a TS2305 error in CCFE typecheck
|
|
7
5
|
ReadonlyTransaction,
|
|
6
|
+
Transaction,
|
|
8
7
|
} from 'prosemirror-state';
|
|
9
|
-
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
10
8
|
import { DecorationSet } from 'prosemirror-view';
|
|
11
9
|
|
|
10
|
+
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
11
|
+
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
12
|
+
|
|
12
13
|
import { pluginKey as tablePluginKey } from '../plugin-key';
|
|
13
14
|
import { pluginKey as tableWidthPluginKey } from '../table-width';
|
|
14
15
|
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
// @ts-ignore -- ReadonlyTransaction is a local declaration and will cause a TS2305 error in CCFE typecheck
|
|
2
2
|
import { ReadonlyTransaction, Transaction } from 'prosemirror-state';
|
|
3
|
+
import { DecorationSet } from 'prosemirror-view';
|
|
4
|
+
|
|
3
5
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
4
6
|
import { findTable } from '@atlaskit/editor-tables/utils';
|
|
5
|
-
import { DecorationSet } from 'prosemirror-view';
|
|
6
7
|
|
|
7
8
|
import { TableDecorations } from '../../../types';
|
|
8
9
|
import {
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { keymap } from 'prosemirror-keymap';
|
|
2
|
-
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
1
|
import { chainCommands } from 'prosemirror-commands';
|
|
2
|
+
import { keymap } from 'prosemirror-keymap';
|
|
4
3
|
|
|
5
|
-
import * as keymaps from '@atlaskit/editor-common/keymaps';
|
|
6
4
|
import {
|
|
7
5
|
ACTION,
|
|
8
6
|
ACTION_SUBJECT,
|
|
9
7
|
ACTION_SUBJECT_ID,
|
|
8
|
+
EditorAnalyticsAPI,
|
|
10
9
|
EVENT_TYPE,
|
|
11
10
|
INPUT_METHOD,
|
|
12
11
|
} from '@atlaskit/editor-common/analytics';
|
|
12
|
+
import * as keymaps from '@atlaskit/editor-common/keymaps';
|
|
13
|
+
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
14
|
+
import type { GetEditorContainerWidth } from '@atlaskit/editor-common/types';
|
|
15
|
+
|
|
13
16
|
import {
|
|
14
|
-
triggerUnlessTableHeader,
|
|
15
17
|
createTable,
|
|
16
18
|
goToNextCell,
|
|
17
19
|
moveCursorBackward,
|
|
20
|
+
triggerUnlessTableHeader,
|
|
18
21
|
} from '../commands';
|
|
19
22
|
import {
|
|
20
23
|
addRowAroundSelection,
|
|
21
|
-
emptyMultipleCellsWithAnalytics,
|
|
22
24
|
deleteTableIfSelectedWithAnalytics,
|
|
25
|
+
emptyMultipleCellsWithAnalytics,
|
|
23
26
|
} from '../commands-with-analytics';
|
|
24
27
|
import { addColumnAfter, addColumnBefore } from '../commands/insert';
|
|
25
|
-
|
|
26
28
|
import { withEditorAnalyticsAPI } from '../utils/analytics';
|
|
27
|
-
import type { GetEditorContainerWidth } from '@atlaskit/editor-common/types';
|
|
28
|
-
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
29
29
|
|
|
30
30
|
const createTableWithAnalytics = (
|
|
31
31
|
editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null,
|
|
@@ -1,27 +1,51 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Node as ProseMirrorNode } from 'prosemirror-model';
|
|
2
2
|
import { EditorState, TextSelection, Transaction } from 'prosemirror-state';
|
|
3
3
|
import {
|
|
4
4
|
findParentDomRefOfType,
|
|
5
5
|
findParentNodeOfType,
|
|
6
6
|
} from 'prosemirror-utils';
|
|
7
|
-
import { Node as ProseMirrorNode } from 'prosemirror-model';
|
|
8
|
-
import { findTable } from '@atlaskit/editor-tables/utils';
|
|
9
7
|
import { EditorView } from 'prosemirror-view';
|
|
10
|
-
import { browser } from '@atlaskit/editor-common/utils';
|
|
11
8
|
|
|
9
|
+
import {
|
|
10
|
+
ACTION,
|
|
11
|
+
ACTION_SUBJECT,
|
|
12
|
+
EVENT_TYPE,
|
|
13
|
+
INPUT_METHOD,
|
|
14
|
+
} from '@atlaskit/editor-common/analytics';
|
|
15
|
+
import type {
|
|
16
|
+
DispatchAnalyticsEvent,
|
|
17
|
+
EditorAnalyticsAPI,
|
|
18
|
+
} from '@atlaskit/editor-common/analytics';
|
|
19
|
+
import { insideTable } from '@atlaskit/editor-common/core-utils';
|
|
12
20
|
import type {
|
|
13
21
|
Dispatch,
|
|
14
22
|
EventDispatcher,
|
|
15
23
|
} from '@atlaskit/editor-common/event-dispatcher';
|
|
16
24
|
import type { PortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
|
|
17
|
-
|
|
18
|
-
import {
|
|
25
|
+
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
26
|
+
import {
|
|
27
|
+
transformSliceToRemoveOpenBodiedExtension,
|
|
28
|
+
transformSliceToRemoveOpenExpand,
|
|
29
|
+
transformSliceToRemoveOpenLayoutNodes,
|
|
30
|
+
} from '@atlaskit/editor-common/transforms';
|
|
31
|
+
import type {
|
|
32
|
+
GetEditorContainerWidth,
|
|
33
|
+
GetEditorFeatureFlags,
|
|
34
|
+
getPosHandler,
|
|
35
|
+
} from '@atlaskit/editor-common/types';
|
|
36
|
+
import { browser, closestElement } from '@atlaskit/editor-common/utils';
|
|
37
|
+
import { findTable } from '@atlaskit/editor-tables/utils';
|
|
19
38
|
|
|
20
39
|
import {
|
|
21
40
|
addBoldInEmptyHeaderCells,
|
|
22
41
|
clearHoverSelection,
|
|
23
42
|
setTableRef,
|
|
24
43
|
} from '../commands';
|
|
44
|
+
import {
|
|
45
|
+
transformSliceRemoveCellBackgroundColor,
|
|
46
|
+
transformSliceToAddTableHeaders,
|
|
47
|
+
transformSliceToRemoveColumnsWidths,
|
|
48
|
+
} from '../commands/misc';
|
|
25
49
|
import {
|
|
26
50
|
handleBlur,
|
|
27
51
|
handleClick,
|
|
@@ -36,13 +60,15 @@ import {
|
|
|
36
60
|
whenTableInFocus,
|
|
37
61
|
} from '../event-handlers';
|
|
38
62
|
import { createTableView } from '../nodeviews/table';
|
|
63
|
+
import TableCellNodeView from '../nodeviews/tableCell';
|
|
39
64
|
import { pluginKey as decorationsPluginKey } from '../pm-plugins/decorations/plugin';
|
|
40
65
|
import { fixTables, replaceSelectedTable } from '../transforms';
|
|
41
66
|
import {
|
|
42
67
|
TableCssClassName as ClassName,
|
|
43
|
-
PluginConfig,
|
|
44
68
|
ElementContentRects,
|
|
45
69
|
InvalidNodeAttr,
|
|
70
|
+
PluginConfig,
|
|
71
|
+
PluginInjectionAPI,
|
|
46
72
|
} from '../types';
|
|
47
73
|
import {
|
|
48
74
|
findControlsHoverDecoration,
|
|
@@ -51,40 +77,16 @@ import {
|
|
|
51
77
|
transformSliceToRemoveOpenTable,
|
|
52
78
|
updateResizeHandles,
|
|
53
79
|
} from '../utils';
|
|
54
|
-
import {
|
|
55
|
-
ACTION,
|
|
56
|
-
ACTION_SUBJECT,
|
|
57
|
-
EVENT_TYPE,
|
|
58
|
-
INPUT_METHOD,
|
|
59
|
-
} from '@atlaskit/editor-common/analytics';
|
|
60
|
-
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
80
|
+
import { isHeaderRowRequired } from '../utils/paste';
|
|
61
81
|
|
|
62
82
|
import { defaultTableSelection } from './default-table-selection';
|
|
63
83
|
import { createPluginState, getPluginState } from './plugin-factory';
|
|
64
84
|
import { pluginKey } from './plugin-key';
|
|
65
|
-
import TableCellNodeView from '../nodeviews/tableCell';
|
|
66
|
-
|
|
67
|
-
import {
|
|
68
|
-
transformSliceRemoveCellBackgroundColor,
|
|
69
|
-
transformSliceToRemoveColumnsWidths,
|
|
70
|
-
transformSliceToAddTableHeaders,
|
|
71
|
-
} from '../commands/misc';
|
|
72
|
-
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
73
|
-
import { transformSliceToRemoveOpenLayoutNodes } from '@atlaskit/editor-common/transforms';
|
|
74
|
-
import { transformSliceToRemoveOpenExpand } from '@atlaskit/editor-common/transforms';
|
|
75
|
-
import { transformSliceToRemoveOpenBodiedExtension } from '@atlaskit/editor-common/transforms';
|
|
76
|
-
import { insideTable } from '@atlaskit/editor-common/core-utils';
|
|
77
|
-
import { isHeaderRowRequired } from '../utils/paste';
|
|
78
|
-
import type {
|
|
79
|
-
GetEditorContainerWidth,
|
|
80
|
-
GetEditorFeatureFlags,
|
|
81
|
-
} from '@atlaskit/editor-common/types';
|
|
82
|
-
import type { getPosHandler } from '@atlaskit/editor-common/types';
|
|
83
|
-
import type { PluginInjectionAPI } from '../types';
|
|
84
85
|
|
|
85
86
|
let isBreakoutEnabled: boolean | undefined;
|
|
86
87
|
let isFullWidthModeEnabled: boolean | undefined;
|
|
87
88
|
let wasFullWidthModeEnabled: boolean | undefined;
|
|
89
|
+
let isTableResizingEnabled: boolean | undefined;
|
|
88
90
|
|
|
89
91
|
export const createPlugin = (
|
|
90
92
|
dispatchAnalyticsEvent: DispatchAnalyticsEvent,
|
|
@@ -96,6 +98,7 @@ export const createPlugin = (
|
|
|
96
98
|
getEditorFeatureFlags: GetEditorFeatureFlags,
|
|
97
99
|
breakoutEnabled?: boolean,
|
|
98
100
|
fullWidthModeEnabled?: boolean,
|
|
101
|
+
tableResizingEnabled?: boolean,
|
|
99
102
|
previousFullWidthModeEnabled?: boolean,
|
|
100
103
|
editorAnalyticsAPI?: EditorAnalyticsAPI,
|
|
101
104
|
pluginInjectionApi?: PluginInjectionAPI,
|
|
@@ -103,6 +106,7 @@ export const createPlugin = (
|
|
|
103
106
|
isBreakoutEnabled = breakoutEnabled;
|
|
104
107
|
isFullWidthModeEnabled = fullWidthModeEnabled;
|
|
105
108
|
wasFullWidthModeEnabled = previousFullWidthModeEnabled;
|
|
109
|
+
isTableResizingEnabled = tableResizingEnabled;
|
|
106
110
|
|
|
107
111
|
const state = createPluginState(dispatch, {
|
|
108
112
|
pluginConfig,
|
|
@@ -373,6 +377,7 @@ export const createPlugin = (
|
|
|
373
377
|
isBreakoutEnabled,
|
|
374
378
|
isFullWidthModeEnabled,
|
|
375
379
|
wasFullWidthModeEnabled,
|
|
380
|
+
isTableResizingEnabled,
|
|
376
381
|
},
|
|
377
382
|
getEditorContainerWidth,
|
|
378
383
|
getEditorFeatureFlags,
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { pluginFactory } from '@atlaskit/editor-common/utils';
|
|
2
|
+
|
|
2
3
|
import { handleDocOrSelectionChanged } from '../handlers';
|
|
3
4
|
import reducer from '../reducer';
|
|
5
|
+
|
|
4
6
|
import { pluginKey } from './plugin-key';
|
|
5
7
|
|
|
6
8
|
export const { createPluginState, createCommand, getPluginState } =
|
|
@@ -3,10 +3,11 @@
|
|
|
3
3
|
* https://github.com/ProseMirror/prosemirror/issues/934
|
|
4
4
|
* We will remove this plugin when Webkit fix the problem itself.
|
|
5
5
|
*/
|
|
6
|
-
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
7
6
|
import { PluginKey } from 'prosemirror-state';
|
|
8
7
|
import { Decoration, DecorationSet, EditorView } from 'prosemirror-view';
|
|
9
8
|
|
|
9
|
+
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
10
|
+
|
|
10
11
|
interface SafariDeleteCompositionTextIssueWorkaroundPluginState {
|
|
11
12
|
renderSpan: boolean;
|
|
12
13
|
decorations: DecorationSet;
|