@atlaskit/editor-plugin-table 0.0.10 → 0.1.1
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 +35 -0
- package/CHANGELOG.md +31 -0
- package/commands/package.json +14 -0
- package/dist/cjs/plugins/table/commands/hover.js +4 -4
- package/dist/cjs/plugins/table/commands-with-analytics.js +59 -58
- package/dist/cjs/plugins/table/event-handlers.js +0 -1
- package/dist/cjs/plugins/table/index.js +54 -37
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/index.js +9 -1
- package/dist/cjs/plugins/table/toolbar.js +150 -22
- package/dist/cjs/plugins/table/transforms/fix-tables.js +7 -7
- package/dist/cjs/plugins/table/ui/FloatingContextualButton/index.js +1 -2
- package/dist/cjs/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +4 -6
- package/dist/cjs/plugins/table/ui/FloatingDeleteButton/index.js +2 -1
- package/dist/cjs/plugins/table/ui/LayoutButton/index.js +3 -5
- package/dist/cjs/plugins/table/ui/TableFloatingControls/CornerControls/index.js +2 -1
- package/dist/cjs/plugins/table/utils/column-controls.js +0 -1
- package/dist/cjs/plugins/table/utils/decoration.js +53 -4
- package/dist/cjs/plugins/table/utils/dom.js +0 -2
- package/dist/cjs/plugins/table/utils/paste.js +0 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/plugins/table/commands/hover.js +4 -4
- package/dist/es2019/plugins/table/commands-with-analytics.js +6 -9
- package/dist/es2019/plugins/table/event-handlers.js +1 -2
- package/dist/es2019/plugins/table/handlers.js +1 -2
- package/dist/es2019/plugins/table/index.js +23 -5
- package/dist/es2019/plugins/table/pm-plugins/keymap.js +1 -1
- package/dist/es2019/plugins/table/pm-plugins/table-local-id.js +1 -3
- package/dist/es2019/plugins/table/pm-plugins/table-resizing/index.js +2 -1
- package/dist/es2019/plugins/table/toolbar.js +133 -16
- package/dist/es2019/plugins/table/transforms/fix-tables.js +2 -4
- package/dist/es2019/plugins/table/ui/FloatingContextualButton/index.js +1 -2
- package/dist/es2019/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +4 -6
- package/dist/es2019/plugins/table/ui/FloatingDeleteButton/index.js +3 -3
- package/dist/es2019/plugins/table/ui/FloatingInsertButton/index.js +1 -2
- package/dist/es2019/plugins/table/ui/LayoutButton/index.js +3 -5
- package/dist/es2019/plugins/table/ui/TableFloatingControls/CornerControls/index.js +2 -1
- package/dist/es2019/plugins/table/utils/column-controls.js +0 -1
- package/dist/es2019/plugins/table/utils/decoration.js +60 -25
- package/dist/es2019/plugins/table/utils/dom.js +0 -2
- package/dist/es2019/plugins/table/utils/paste.js +1 -2
- package/dist/es2019/plugins/table/utils/row-controls.js +1 -2
- package/dist/es2019/version.json +1 -1
- package/dist/esm/plugins/table/commands/hover.js +4 -4
- package/dist/esm/plugins/table/commands-with-analytics.js +56 -55
- package/dist/esm/plugins/table/event-handlers.js +1 -2
- package/dist/esm/plugins/table/handlers.js +1 -2
- package/dist/esm/plugins/table/index.js +55 -38
- package/dist/esm/plugins/table/pm-plugins/keymap.js +1 -1
- package/dist/esm/plugins/table/pm-plugins/table-local-id.js +1 -3
- package/dist/esm/plugins/table/pm-plugins/table-resizing/index.js +2 -1
- package/dist/esm/plugins/table/toolbar.js +139 -17
- package/dist/esm/plugins/table/transforms/fix-tables.js +2 -4
- package/dist/esm/plugins/table/ui/FloatingContextualButton/index.js +1 -2
- package/dist/esm/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +4 -6
- package/dist/esm/plugins/table/ui/FloatingDeleteButton/index.js +3 -3
- package/dist/esm/plugins/table/ui/FloatingInsertButton/index.js +1 -2
- package/dist/esm/plugins/table/ui/LayoutButton/index.js +3 -5
- package/dist/esm/plugins/table/ui/TableFloatingControls/CornerControls/index.js +2 -1
- package/dist/esm/plugins/table/utils/column-controls.js +0 -1
- package/dist/esm/plugins/table/utils/decoration.js +50 -4
- package/dist/esm/plugins/table/utils/dom.js +0 -2
- package/dist/esm/plugins/table/utils/paste.js +1 -2
- package/dist/esm/plugins/table/utils/row-controls.js +1 -2
- package/dist/esm/version.json +1 -1
- package/dist/types/plugins/table/commands-with-analytics.d.ts +5 -5
- package/dist/types/plugins/table/pm-plugins/table-resizing/index.d.ts +1 -0
- package/dist/types/plugins/table/toolbar.d.ts +2 -2
- package/dist/types/plugins/table/transforms/fix-tables.d.ts +1 -1
- package/dist/types/plugins/table/utils/decoration.d.ts +1 -1
- package/examples/99-testing.tsx +35 -30
- package/examples/config.jsonc +14 -0
- package/package.json +14 -19
- package/plugin-key/package.json +14 -0
- package/report.api.md +1 -1
- package/src/{plugins/table/__tests__ → __tests__}/integration/__fixtures__/auto-size-documents.ts +5 -10
- package/src/{plugins/table/__tests__ → __tests__}/integration/__fixtures__/basic-table.ts +0 -0
- package/src/{plugins/table/__tests__ → __tests__}/integration/__fixtures__/empty-paragraph-underneath-table.ts +0 -0
- package/src/{plugins/table/__tests__ → __tests__}/integration/__fixtures__/even-columns.ts +0 -0
- package/src/{plugins/table/__tests__ → __tests__}/integration/__fixtures__/layout-documents.ts +1 -2
- package/src/{plugins/table/__tests__ → __tests__}/integration/__fixtures__/merged-rows-and-cols-document.ts +0 -0
- package/src/{plugins/table/__tests__ → __tests__}/integration/__fixtures__/nested-in-extension.ts +0 -0
- package/src/{plugins/table/__tests__ → __tests__}/integration/__fixtures__/paragraph-and-table-adf.json +0 -0
- package/src/{plugins/table/__tests__ → __tests__}/integration/__fixtures__/resize-documents.ts +5 -10
- package/src/{plugins/table/__tests__ → __tests__}/integration/__fixtures__/scale.ts +0 -0
- package/src/{plugins/table/__tests__ → __tests__}/integration/__fixtures__/table-inside-layout.ts +0 -0
- package/src/{plugins/table/__tests__ → __tests__}/integration/__fixtures__/table-with-min-width-columns-document.ts +0 -0
- package/src/{plugins/table/__tests__ → __tests__}/integration/__fixtures__/table-with-multiline-date.adf.json +0 -0
- package/src/{plugins/table/__tests__ → __tests__}/integration/__fixtures__/table-with-text-and-empty-row.ts +0 -0
- package/src/{plugins/table/__tests__ → __tests__}/integration/__snapshots__/auto-size.ts.snap +0 -0
- package/src/{plugins/table/__tests__ → __tests__}/integration/__snapshots__/change-date-inside-table.ts.snap +0 -0
- package/src/{plugins/table/__tests__ → __tests__}/integration/__snapshots__/copy-button.ts.snap +0 -0
- package/src/{plugins/table/__tests__ → __tests__}/integration/__snapshots__/delete-columns.ts.snap +0 -0
- package/src/{plugins/table/__tests__ → __tests__}/integration/__snapshots__/delete-last-column-in-full-width.ts.snap +0 -0
- package/src/{plugins/table/__tests__ → __tests__}/integration/__snapshots__/delete-last-column-with-empty-action.ts.snap +0 -0
- package/src/{plugins/table/__tests__ → __tests__}/integration/__snapshots__/delete-last-row-with-empty-action.ts.snap +0 -0
- package/src/{plugins/table/__tests__ → __tests__}/integration/__snapshots__/delete-rows.ts.snap +0 -0
- package/src/{plugins/table/__tests__ → __tests__}/integration/__snapshots__/delete-table-when-selected.ts.snap +0 -0
- package/src/{plugins/table/__tests__ → __tests__}/integration/__snapshots__/deleting-empty-paragraph-under-table.ts.snap +0 -0
- package/src/{plugins/table/__tests__ → __tests__}/integration/__snapshots__/even-columns.ts.snap +0 -0
- package/src/{plugins/table/__tests__ → __tests__}/integration/__snapshots__/insert-cell-header-with-strong-mark.ts.snap +0 -0
- package/src/{plugins/table/__tests__ → __tests__}/integration/__snapshots__/insert-row-inside-layout.ts.snap +0 -0
- package/src/{plugins/table/__tests__ → __tests__}/integration/__snapshots__/layout.ts.snap +0 -0
- package/src/{plugins/table/__tests__ → __tests__}/integration/__snapshots__/resize.ts.snap +0 -0
- package/src/{plugins/table/__tests__ → __tests__}/integration/__snapshots__/scale.ts.snap +0 -0
- package/src/{plugins/table/__tests__ → __tests__}/integration/arrow-down-into-table.ts +0 -0
- package/src/{plugins/table/__tests__ → __tests__}/integration/auto-size.ts +0 -0
- package/src/{plugins/table/__tests__ → __tests__}/integration/block-node-selection.ts +1 -0
- package/src/{plugins/table/__tests__ → __tests__}/integration/cell-selection.ts +0 -0
- package/src/{plugins/table/__tests__ → __tests__}/integration/change-date-inside-table.ts +0 -0
- package/src/{plugins/table/__tests__ → __tests__}/integration/copy-button.ts +1 -1
- package/src/{plugins/table/__tests__ → __tests__}/integration/delete-columns.ts +2 -2
- package/src/{plugins/table/__tests__ → __tests__}/integration/delete-last-column-in-full-width.ts +1 -1
- package/src/{plugins/table/__tests__ → __tests__}/integration/delete-last-column-with-empty-action.ts +1 -1
- package/src/{plugins/table/__tests__ → __tests__}/integration/delete-last-row-with-empty-action.ts +1 -1
- package/src/{plugins/table/__tests__ → __tests__}/integration/delete-rows.ts +2 -2
- package/src/{plugins/table/__tests__ → __tests__}/integration/delete-table-when-selected.ts +0 -0
- package/src/{plugins/table/__tests__ → __tests__}/integration/deleting-empty-paragraph-under-table.ts +0 -0
- package/src/{plugins/table/__tests__ → __tests__}/integration/even-columns.ts +0 -0
- package/src/{plugins/table/__tests__ → __tests__}/integration/insert-cell-header-with-strong-mark.ts +0 -0
- package/src/{plugins/table/__tests__ → __tests__}/integration/insert-long-smart-link.ts +1 -0
- package/src/{plugins/table/__tests__ → __tests__}/integration/insert-row-inside-layout.ts +0 -0
- package/src/{plugins/table/__tests__ → __tests__}/integration/layout.ts +0 -0
- package/src/{plugins/table/__tests__ → __tests__}/integration/resize-handler.ts +0 -0
- package/src/{plugins/table/__tests__ → __tests__}/integration/resize.ts +2 -3
- package/src/{plugins/table/__tests__ → __tests__}/integration/scale.ts +0 -0
- package/src/__tests__/integration/table-controls-selection.ts +71 -0
- package/src/__tests__/unit/analytics.ts +41 -41
- package/src/__tests__/unit/collab.ts +12 -9
- package/src/{plugins/table/__tests__ → __tests__}/unit/commands/go-to-next-cell.ts +4 -4
- package/src/{plugins/table/__tests__ → __tests__}/unit/commands/insert.ts +4 -4
- package/src/{plugins/table/__tests__ → __tests__}/unit/commands/misc.ts +12 -6
- package/src/__tests__/unit/commands/sort.ts +28 -28
- package/src/{plugins/table/__tests__ → __tests__}/unit/commands.ts +7 -7
- package/src/__tests__/unit/copy-button.ts +22 -0
- package/src/__tests__/unit/copy-paste.ts +6 -8
- package/src/__tests__/unit/event-handlers.ts +127 -11
- package/src/__tests__/unit/fix-tables.ts +17 -23
- package/src/{plugins/table/__tests__ → __tests__}/unit/get-toolbar-config.ts +8 -8
- package/src/__tests__/unit/hover-selection.ts +1 -66
- package/src/__tests__/unit/index-with-fake-timers.ts +1 -1
- package/src/__tests__/unit/index.ts +5 -5
- package/src/{plugins/table/__tests__ → __tests__}/unit/nodeviews/OverflowShadowsObserver.ts +2 -2
- package/src/__tests__/unit/nodeviews/TableComponent.tsx +181 -0
- package/src/__tests__/unit/nodeviews/cell.ts +12 -10
- package/src/{plugins/table/__tests__ → __tests__}/unit/nodeviews/table.ts +29 -30
- package/src/{plugins/table/__tests__ → __tests__}/unit/pm-plugins/decorations/column-controls.ts +2 -2
- package/src/{plugins/table/__tests__ → __tests__}/unit/pm-plugins/decorations/column-resizing.ts +9 -6
- package/src/{plugins/table/__tests__ → __tests__}/unit/pm-plugins/decorations/plugin.ts +5 -5
- package/src/{plugins/table/__tests__ → __tests__}/unit/pm-plugins/main-with-allow-collapse.ts +4 -4
- package/src/{plugins/table/__tests__ → __tests__}/unit/pm-plugins/main.ts +6 -6
- package/src/{plugins/table/__tests__ → __tests__}/unit/pm-plugins/safari-delete-composition-text-issue-workaround.ts +12 -9
- package/src/{plugins/table/__tests__ → __tests__}/unit/pm-plugins/sticky-headers/tableRow.tsx +27 -25
- package/src/{plugins/table/__tests__ → __tests__}/unit/pm-plugins/table-local-id.ts +3 -6
- package/src/{plugins/table/__tests__ → __tests__}/unit/pm-plugins/table-resizing/colgroup.ts +1 -1
- package/src/{plugins/table/__tests__ → __tests__}/unit/pm-plugins/table-resizing/event-handlers.ts +3 -3
- package/src/{plugins/table/__tests__ → __tests__}/unit/pm-plugins/table-selection-keymap.ts +3 -3
- package/src/{plugins/table/__tests__ → __tests__}/unit/toolbar.ts +23 -14
- package/src/__tests__/unit/ui/ContextualMenu.tsx +55 -0
- package/src/__tests__/unit/ui/CornerControls.tsx +7 -7
- package/src/__tests__/unit/ui/FloatingContextualButton.tsx +45 -49
- package/src/__tests__/unit/ui/FloatingContextualMenu.tsx +49 -0
- package/src/__tests__/unit/ui/FloatingDeleteButton.tsx +30 -2
- package/src/__tests__/unit/ui/FloatingInsertButton.tsx +143 -111
- package/src/__tests__/unit/ui/RowControls.tsx +112 -141
- package/src/__tests__/unit/ui/TableFloatingControls.tsx +18 -15
- package/src/__tests__/unit/undo-redo.ts +10 -9
- package/src/{plugins/table/__tests__ → __tests__}/unit/utils/collapse.ts +2 -2
- package/src/{plugins/table/__tests__ → __tests__}/unit/utils/column-controls.ts +1 -1
- package/src/__tests__/unit/utils/nodes.ts +8 -4
- package/src/__tests__/unit/utils/row-controls.ts +8 -4
- package/src/{plugins/table/__tests__ → __tests__}/visual-regression/__fixtures__/table-with-100-numbered-list-items.json +0 -0
- package/src/{plugins/table/__tests__ → __tests__}/visual-regression/__image_snapshots__/cell-options-menu-ts-table-cell-options-menu-delete-column-menu-item-should-remove-the-table-column-on-click-1-snap.png +0 -0
- package/src/{plugins/table/__tests__ → __tests__}/visual-regression/__image_snapshots__/cell-options-menu-ts-table-cell-options-menu-delete-column-menu-item-visual-hints-should-be-added-to-the-table-column-on-hover-1-snap.png +0 -0
- package/src/{plugins/table/__tests__ → __tests__}/visual-regression/__image_snapshots__/cell-options-menu-ts-table-cell-options-menu-delete-row-menu-item-should-remove-the-table-row-on-click-1-snap.png +0 -0
- package/src/{plugins/table/__tests__ → __tests__}/visual-regression/__image_snapshots__/cell-options-menu-ts-table-cell-options-menu-delete-row-menu-item-visual-hints-should-be-added-to-the-table-row-on-hover-1-snap.png +0 -0
- package/src/{plugins/table/__tests__ → __tests__}/visual-regression/__image_snapshots__/copy-button-ts-floating-toolbar-copy-button-table-target-node-displays-blue-border-when-copy-button-is-hovered-1-snap.png +0 -0
- package/src/{plugins/table/__tests__ → __tests__}/visual-regression/__image_snapshots__/index-ts-snapshot-test-table-numbered-list-should-not-overflow-table-cell-when-there-are-more-than-100-ordered-list-items-1-snap.png +0 -0
- package/src/{plugins/table/__tests__ → __tests__}/visual-regression/__image_snapshots__/index-ts-snapshot-test-table-numbered-list-should-not-overflow-table-cell-when-there-are-more-than-100-ordered-list-items-2-snap.png +0 -0
- package/src/{plugins/table/__tests__ → __tests__}/visual-regression/__image_snapshots__/index-ts-snapshot-test-table-numbered-list-should-not-overflow-table-cell-when-there-are-more-than-100-ordered-list-items-3-snap.png +0 -0
- package/src/{plugins/table/__tests__ → __tests__}/visual-regression/cell-options-menu.ts +2 -0
- package/src/__tests__/visual-regression/copy-button.ts +181 -0
- package/src/{plugins/table/__tests__ → __tests__}/visual-regression/index.ts +3 -1
- package/src/plugins/table/commands/clear.ts +30 -29
- package/src/plugins/table/commands/go-to-next-cell.ts +41 -38
- package/src/plugins/table/commands/hover.ts +4 -1
- package/src/plugins/table/commands/insert.ts +91 -91
- package/src/plugins/table/commands/misc.ts +123 -125
- package/src/plugins/table/commands/selection.ts +329 -319
- package/src/plugins/table/commands-with-analytics.ts +299 -290
- package/src/plugins/table/event-handlers.ts +111 -112
- package/src/plugins/table/handlers.ts +95 -95
- package/src/plugins/table/index.tsx +28 -2
- package/src/plugins/table/nodeviews/OverflowShadowsObserver.ts +4 -3
- package/src/plugins/table/nodeviews/TableComponent.tsx +6 -9
- package/src/plugins/table/nodeviews/update-overflow-shadows.ts +39 -39
- package/src/plugins/table/pm-plugins/decorations/utils/column-controls.ts +7 -9
- package/src/plugins/table/pm-plugins/decorations/utils/column-resizing.ts +30 -30
- package/src/plugins/table/pm-plugins/decorations/utils/compose-decorations.ts +7 -7
- package/src/plugins/table/pm-plugins/keymap.ts +1 -1
- package/src/plugins/table/pm-plugins/plugin-factory.ts +33 -33
- package/src/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.ts +6 -9
- package/src/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.ts +3 -2
- package/src/plugins/table/pm-plugins/table-local-id.ts +0 -2
- package/src/plugins/table/pm-plugins/table-resizing/commands.ts +98 -90
- package/src/plugins/table/pm-plugins/table-resizing/index.ts +1 -0
- package/src/plugins/table/pm-plugins/table-resizing/utils/dom.ts +46 -47
- package/src/plugins/table/{toolbar.ts → toolbar.tsx} +276 -101
- package/src/plugins/table/transforms/column-width.ts +143 -146
- package/src/plugins/table/transforms/delete-columns.ts +144 -142
- package/src/plugins/table/transforms/delete-rows.ts +110 -111
- package/src/plugins/table/transforms/fix-tables.ts +2 -3
- package/src/plugins/table/transforms/metadata.ts +9 -9
- package/src/plugins/table/ui/FloatingContextualButton/index.tsx +0 -1
- package/src/plugins/table/ui/FloatingContextualMenu/ContextualMenu.tsx +20 -16
- package/src/plugins/table/ui/FloatingDeleteButton/index.tsx +3 -3
- package/src/plugins/table/ui/FloatingInsertButton/index.tsx +2 -6
- package/src/plugins/table/ui/LayoutButton/index.tsx +4 -10
- package/src/plugins/table/ui/TableFloatingControls/CornerControls/index.tsx +1 -0
- package/src/plugins/table/ui/common-styles.ts +1 -3
- package/src/plugins/table/utils/analytics.ts +24 -25
- package/src/plugins/table/utils/column-controls.ts +0 -1
- package/src/plugins/table/utils/decoration.ts +44 -5
- package/src/plugins/table/utils/dom.ts +3 -5
- package/src/plugins/table/utils/paste.ts +0 -1
- package/src/plugins/table/utils/row-controls.ts +92 -94
- package/types/package.json +5 -5
- package/ui/common-styles/package.json +14 -0
- package/ui/consts/package.json +14 -0
- package/dist/cjs/plugins/plugin-key.js +0 -17
- package/dist/cjs/plugins/table/todo-stubs.js +0 -10
- package/dist/cjs/types.js +0 -5
- package/dist/es2019/plugins/plugin-key.js +0 -3
- package/dist/es2019/plugins/table/todo-stubs.js +0 -1
- package/dist/es2019/types.js +0 -1
- package/dist/esm/plugins/plugin-key.js +0 -5
- package/dist/esm/plugins/table/todo-stubs.js +0 -1
- package/dist/esm/types.js +0 -1
- package/dist/types/plugins/plugin-key.d.ts +0 -4
- package/dist/types/plugins/table/todo-stubs.d.ts +0 -1
- package/dist/types/types.d.ts +0 -3
- package/dist/types-ts4.0/index.d.ts +0 -1
- package/dist/types-ts4.0/plugins/plugin-key.d.ts +0 -4
- package/dist/types-ts4.0/plugins/table/commands/clear.d.ts +0 -3
- package/dist/types-ts4.0/plugins/table/commands/collapse.d.ts +0 -2
- package/dist/types-ts4.0/plugins/table/commands/go-to-next-cell.d.ts +0 -4
- package/dist/types-ts4.0/plugins/table/commands/hover.d.ts +0 -8
- package/dist/types-ts4.0/plugins/table/commands/index.d.ts +0 -7
- package/dist/types-ts4.0/plugins/table/commands/insert.d.ts +0 -10
- package/dist/types-ts4.0/plugins/table/commands/misc.d.ts +0 -27
- package/dist/types-ts4.0/plugins/table/commands/selection.d.ts +0 -8
- package/dist/types-ts4.0/plugins/table/commands/sort.d.ts +0 -3
- package/dist/types-ts4.0/plugins/table/commands/split-cell.d.ts +0 -6
- package/dist/types-ts4.0/plugins/table/commands/toggle.d.ts +0 -12
- package/dist/types-ts4.0/plugins/table/commands-with-analytics.d.ts +0 -26
- package/dist/types-ts4.0/plugins/table/create-plugin-config.d.ts +0 -2
- package/dist/types-ts4.0/plugins/table/event-handlers.d.ts +0 -16
- package/dist/types-ts4.0/plugins/table/handlers.d.ts +0 -3
- package/dist/types-ts4.0/plugins/table/index.d.ts +0 -17
- package/dist/types-ts4.0/plugins/table/nodeviews/OverflowShadowsObserver.d.ts +0 -26
- package/dist/types-ts4.0/plugins/table/nodeviews/TableComponent.d.ts +0 -72
- package/dist/types-ts4.0/plugins/table/nodeviews/__mocks__/OverflowShadowsObserver.d.ts +0 -9
- package/dist/types-ts4.0/plugins/table/nodeviews/__mocks__/OverridableMock.d.ts +0 -9
- package/dist/types-ts4.0/plugins/table/nodeviews/table.d.ts +0 -31
- package/dist/types-ts4.0/plugins/table/nodeviews/tableCell.d.ts +0 -19
- package/dist/types-ts4.0/plugins/table/nodeviews/types.d.ts +0 -24
- package/dist/types-ts4.0/plugins/table/nodeviews/update-overflow-shadows.d.ts +0 -8
- package/dist/types-ts4.0/plugins/table/pm-plugins/decorations/plugin.d.ts +0 -7
- package/dist/types-ts4.0/plugins/table/pm-plugins/decorations/utils/column-controls.d.ts +0 -3
- package/dist/types-ts4.0/plugins/table/pm-plugins/decorations/utils/column-resizing.d.ts +0 -2
- package/dist/types-ts4.0/plugins/table/pm-plugins/decorations/utils/compose-decorations.d.ts +0 -2
- package/dist/types-ts4.0/plugins/table/pm-plugins/decorations/utils/index.d.ts +0 -3
- package/dist/types-ts4.0/plugins/table/pm-plugins/decorations/utils/types.d.ts +0 -6
- package/dist/types-ts4.0/plugins/table/pm-plugins/default-table-selection.d.ts +0 -5
- package/dist/types-ts4.0/plugins/table/pm-plugins/keymap.d.ts +0 -5
- package/dist/types-ts4.0/plugins/table/pm-plugins/main.d.ts +0 -8
- package/dist/types-ts4.0/plugins/table/pm-plugins/plugin-factory.d.ts +0 -1
- package/dist/types-ts4.0/plugins/table/pm-plugins/plugin-key.d.ts +0 -3
- package/dist/types-ts4.0/plugins/table/pm-plugins/safari-delayed-dom-selection-syncing-workaround.d.ts +0 -4
- package/dist/types-ts4.0/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.d.ts +0 -15
- package/dist/types-ts4.0/plugins/table/pm-plugins/sticky-headers/commands.d.ts +0 -3
- package/dist/types-ts4.0/plugins/table/pm-plugins/sticky-headers/index.d.ts +0 -6
- package/dist/types-ts4.0/plugins/table/pm-plugins/sticky-headers/nodeviews/dom.d.ts +0 -6
- package/dist/types-ts4.0/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.d.ts +0 -65
- package/dist/types-ts4.0/plugins/table/pm-plugins/sticky-headers/plugin-key.d.ts +0 -3
- package/dist/types-ts4.0/plugins/table/pm-plugins/sticky-headers/plugin-state.d.ts +0 -3
- package/dist/types-ts4.0/plugins/table/pm-plugins/sticky-headers/plugin.d.ts +0 -4
- package/dist/types-ts4.0/plugins/table/pm-plugins/sticky-headers/types.d.ts +0 -16
- package/dist/types-ts4.0/plugins/table/pm-plugins/sticky-headers/util.d.ts +0 -2
- package/dist/types-ts4.0/plugins/table/pm-plugins/table-local-id.d.ts +0 -22
- package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/commands.d.ts +0 -25
- package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/event-handlers.d.ts +0 -4
- package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/index.d.ts +0 -3
- package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/plugin-factory.d.ts +0 -4
- package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/plugin-key.d.ts +0 -3
- package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/plugin.d.ts +0 -6
- package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/reducer.d.ts +0 -3
- package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/utils/colgroup.d.ts +0 -8
- package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/utils/column-state.d.ts +0 -14
- package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/utils/content-width.d.ts +0 -4
- package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/utils/dom.d.ts +0 -13
- package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/utils/index.d.ts +0 -12
- package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/utils/misc.d.ts +0 -22
- package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/utils/resize-column.d.ts +0 -2
- package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/utils/resize-logic.d.ts +0 -4
- package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/utils/resize-state.d.ts +0 -29
- package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/utils/scale-table.d.ts +0 -17
- package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/utils/types.d.ts +0 -22
- package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/utils/unit-to-number.d.ts +0 -1
- package/dist/types-ts4.0/plugins/table/pm-plugins/table-selection-keymap.d.ts +0 -4
- package/dist/types-ts4.0/plugins/table/reducer.d.ts +0 -3
- package/dist/types-ts4.0/plugins/table/todo-stubs.d.ts +0 -1
- package/dist/types-ts4.0/plugins/table/toolbar.d.ts +0 -36
- package/dist/types-ts4.0/plugins/table/transforms/column-width.d.ts +0 -18
- package/dist/types-ts4.0/plugins/table/transforms/delete-columns.d.ts +0 -3
- package/dist/types-ts4.0/plugins/table/transforms/delete-rows.d.ts +0 -3
- package/dist/types-ts4.0/plugins/table/transforms/fix-tables.d.ts +0 -10
- package/dist/types-ts4.0/plugins/table/transforms/index.d.ts +0 -7
- package/dist/types-ts4.0/plugins/table/transforms/merge.d.ts +0 -5
- package/dist/types-ts4.0/plugins/table/transforms/metadata.d.ts +0 -21
- package/dist/types-ts4.0/plugins/table/transforms/replace-table.d.ts +0 -5
- package/dist/types-ts4.0/plugins/table/transforms/split.d.ts +0 -9
- package/dist/types-ts4.0/plugins/table/types.d.ts +0 -328
- package/dist/types-ts4.0/plugins/table/ui/FloatingContextualButton/index.d.ts +0 -29
- package/dist/types-ts4.0/plugins/table/ui/FloatingContextualButton/styles.d.ts +0 -1
- package/dist/types-ts4.0/plugins/table/ui/FloatingContextualMenu/ContextualMenu.d.ts +0 -87
- package/dist/types-ts4.0/plugins/table/ui/FloatingContextualMenu/index.d.ts +0 -22
- package/dist/types-ts4.0/plugins/table/ui/FloatingContextualMenu/styles.d.ts +0 -2
- package/dist/types-ts4.0/plugins/table/ui/FloatingDeleteButton/DeleteButton.d.ts +0 -14
- package/dist/types-ts4.0/plugins/table/ui/FloatingDeleteButton/getPopUpOptions.d.ts +0 -10
- package/dist/types-ts4.0/plugins/table/ui/FloatingDeleteButton/index.d.ts +0 -54
- package/dist/types-ts4.0/plugins/table/ui/FloatingDeleteButton/types.d.ts +0 -1
- package/dist/types-ts4.0/plugins/table/ui/FloatingInsertButton/InsertButton.d.ts +0 -12
- package/dist/types-ts4.0/plugins/table/ui/FloatingInsertButton/getPopupOptions.d.ts +0 -3
- package/dist/types-ts4.0/plugins/table/ui/FloatingInsertButton/index.d.ts +0 -35
- package/dist/types-ts4.0/plugins/table/ui/LayoutButton/index.d.ts +0 -21
- package/dist/types-ts4.0/plugins/table/ui/TableFloatingControls/CornerControls/index.d.ts +0 -16
- package/dist/types-ts4.0/plugins/table/ui/TableFloatingControls/NumberColumn/index.d.ts +0 -21
- package/dist/types-ts4.0/plugins/table/ui/TableFloatingControls/RowControls/index.d.ts +0 -17
- package/dist/types-ts4.0/plugins/table/ui/TableFloatingControls/index.d.ts +0 -40
- package/dist/types-ts4.0/plugins/table/ui/common-styles.d.ts +0 -4
- package/dist/types-ts4.0/plugins/table/ui/consts.d.ts +0 -39
- package/dist/types-ts4.0/plugins/table/ui/messages.d.ts +0 -38
- package/dist/types-ts4.0/plugins/table/ui/ui-styles.d.ts +0 -15
- package/dist/types-ts4.0/plugins/table/utils/analytics.d.ts +0 -18
- package/dist/types-ts4.0/plugins/table/utils/collapse.d.ts +0 -29
- package/dist/types-ts4.0/plugins/table/utils/column-controls.d.ts +0 -10
- package/dist/types-ts4.0/plugins/table/utils/decoration.d.ts +0 -16
- package/dist/types-ts4.0/plugins/table/utils/dom.d.ts +0 -20
- package/dist/types-ts4.0/plugins/table/utils/get-allow-add-column-custom-step.d.ts +0 -2
- package/dist/types-ts4.0/plugins/table/utils/index.d.ts +0 -11
- package/dist/types-ts4.0/plugins/table/utils/nodes.d.ts +0 -12
- package/dist/types-ts4.0/plugins/table/utils/paste.d.ts +0 -14
- package/dist/types-ts4.0/plugins/table/utils/referentiality.d.ts +0 -2
- package/dist/types-ts4.0/plugins/table/utils/row-controls.d.ts +0 -16
- package/dist/types-ts4.0/plugins/table/utils/selection.d.ts +0 -6
- package/dist/types-ts4.0/plugins/table/utils/table.d.ts +0 -4
- package/dist/types-ts4.0/plugins/table/utils/update-plugin-state-decorations.d.ts +0 -4
- package/dist/types-ts4.0/plugins/table-plugin.d.ts +0 -2
- package/dist/types-ts4.0/types.d.ts +0 -3
- package/src/plugins/plugin-key.ts +0 -7
- package/src/plugins/table/__tests__/integration/table-controls-selection.ts +0 -70
- package/src/plugins/table/__tests__/unit/event-handlers.ts +0 -130
- package/src/plugins/table/__tests__/unit/nodeviews/TableComponent.tsx +0 -388
- package/src/plugins/table/todo-stubs.ts +0 -1
- package/src/plugins/table/ui/FloatingContextualMenu/__tests__/ContextualMenu.tsx +0 -55
- package/src/plugins/table/ui/FloatingContextualMenu/__tests__/FloatingContextualMenu.tsx +0 -49
- package/src/types.ts +0 -3
- package/tmp/api-report-tmp.d.ts +0 -91
package/src/{plugins/table/__tests__ → __tests__}/integration/__fixtures__/resize-documents.ts
RENAMED
|
@@ -212,8 +212,7 @@ export const twoColFullWidthTableWithContent = {
|
|
|
212
212
|
},
|
|
213
213
|
{
|
|
214
214
|
type: 'text',
|
|
215
|
-
text:
|
|
216
|
-
'2. Paste a jira link in for the href and immediately close the bracket to complete the markdown',
|
|
215
|
+
text: '2. Paste a jira link in for the href and immediately close the bracket to complete the markdown',
|
|
217
216
|
},
|
|
218
217
|
],
|
|
219
218
|
},
|
|
@@ -229,8 +228,7 @@ export const twoColFullWidthTableWithContent = {
|
|
|
229
228
|
},
|
|
230
229
|
{
|
|
231
230
|
type: 'text',
|
|
232
|
-
text:
|
|
233
|
-
'markdown for URL works correctly? or smartcard overrides it?',
|
|
231
|
+
text: 'markdown for URL works correctly? or smartcard overrides it?',
|
|
234
232
|
},
|
|
235
233
|
],
|
|
236
234
|
},
|
|
@@ -246,8 +244,7 @@ export const twoColFullWidthTableWithContent = {
|
|
|
246
244
|
},
|
|
247
245
|
{
|
|
248
246
|
type: 'text',
|
|
249
|
-
text:
|
|
250
|
-
'Smartcard link for Jira is still being processed and is entered as the value for the markdown for the URL ',
|
|
247
|
+
text: 'Smartcard link for Jira is still being processed and is entered as the value for the markdown for the URL ',
|
|
251
248
|
},
|
|
252
249
|
{
|
|
253
250
|
type: 'emoji',
|
|
@@ -262,8 +259,7 @@ export const twoColFullWidthTableWithContent = {
|
|
|
262
259
|
},
|
|
263
260
|
{
|
|
264
261
|
type: 'text',
|
|
265
|
-
text:
|
|
266
|
-
'URL ends up pointing to the confluence edit link but without a page ID so 404s',
|
|
262
|
+
text: 'URL ends up pointing to the confluence edit link but without a page ID so 404s',
|
|
267
263
|
},
|
|
268
264
|
],
|
|
269
265
|
},
|
|
@@ -302,8 +298,7 @@ export const twoColFullWidthTableWithContent = {
|
|
|
302
298
|
content: [
|
|
303
299
|
{
|
|
304
300
|
type: 'text',
|
|
305
|
-
text:
|
|
306
|
-
"Publishing somewhat big pages doesn't really provide any indication to the user that their page is actually being published and they're going to be navigated away",
|
|
301
|
+
text: "Publishing somewhat big pages doesn't really provide any indication to the user that their page is actually being published and they're going to be navigated away",
|
|
307
302
|
},
|
|
308
303
|
],
|
|
309
304
|
},
|
|
File without changes
|
package/src/{plugins/table/__tests__ → __tests__}/integration/__fixtures__/table-inside-layout.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/src/{plugins/table/__tests__ → __tests__}/integration/__snapshots__/auto-size.ts.snap
RENAMED
|
File without changes
|
|
File without changes
|
package/src/{plugins/table/__tests__ → __tests__}/integration/__snapshots__/copy-button.ts.snap
RENAMED
|
File without changes
|
package/src/{plugins/table/__tests__ → __tests__}/integration/__snapshots__/delete-columns.ts.snap
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/src/{plugins/table/__tests__ → __tests__}/integration/__snapshots__/delete-rows.ts.snap
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/src/{plugins/table/__tests__ → __tests__}/integration/__snapshots__/even-columns.ts.snap
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//import { runBlockNodeSelectionTestSuite } from '@atlaskit/editor-test-helpers/integration/selection';
|
|
2
2
|
// import { _getCopyButtonTestSuite } from '@atlaskit/editor-core/src/plugins/copy-button/__tests__/integration/_getCopyButtonTestSuite';
|
|
3
|
-
|
|
3
|
+
export {};
|
|
4
4
|
test.todo('TODO: ED-15706 We disabled the copy button');
|
|
5
5
|
// _getCopyButtonTestSuite({
|
|
6
6
|
// nodeName: 'Table',
|
|
@@ -7,12 +7,12 @@ import {
|
|
|
7
7
|
fullpage,
|
|
8
8
|
} from '@atlaskit/editor-test-helpers/integration/helpers';
|
|
9
9
|
import { documentWithMergedCells } from './__fixtures__/merged-rows-and-cols-document';
|
|
10
|
-
import { TableCssClassName as ClassName } from '
|
|
10
|
+
import { TableCssClassName as ClassName } from '../../plugins/table/types';
|
|
11
11
|
import {
|
|
12
12
|
goToEditorTestingWDExample,
|
|
13
13
|
mountEditor,
|
|
14
14
|
} from '@atlaskit/editor-test-helpers/testing-example-page';
|
|
15
|
-
import messages from '
|
|
15
|
+
import messages from '../../plugins/table/ui/messages';
|
|
16
16
|
|
|
17
17
|
BrowserTestCase(
|
|
18
18
|
'Should delete merged columns from contextual menu and append missing cells to the table',
|
package/src/{plugins/table/__tests__ → __tests__}/integration/delete-last-column-in-full-width.ts
RENAMED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
fullpage,
|
|
7
7
|
quickInsert,
|
|
8
8
|
} from '@atlaskit/editor-test-helpers/integration/helpers';
|
|
9
|
-
import { TableCssClassName as ClassName } from '
|
|
9
|
+
import { TableCssClassName as ClassName } from '../../plugins/table/types';
|
|
10
10
|
import {
|
|
11
11
|
goToEditorTestingWDExample,
|
|
12
12
|
mountEditor,
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
fullpage,
|
|
7
7
|
quickInsert,
|
|
8
8
|
} from '@atlaskit/editor-test-helpers/integration/helpers';
|
|
9
|
-
import { TableCssClassName as ClassName } from '
|
|
9
|
+
import { TableCssClassName as ClassName } from '../../plugins/table/types';
|
|
10
10
|
import {
|
|
11
11
|
goToEditorTestingWDExample,
|
|
12
12
|
mountEditor,
|
package/src/{plugins/table/__tests__ → __tests__}/integration/delete-last-row-with-empty-action.ts
RENAMED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
fullpage,
|
|
7
7
|
quickInsert,
|
|
8
8
|
} from '@atlaskit/editor-test-helpers/integration/helpers';
|
|
9
|
-
import { TableCssClassName as ClassName } from '
|
|
9
|
+
import { TableCssClassName as ClassName } from '../../plugins/table/types';
|
|
10
10
|
import {
|
|
11
11
|
goToEditorTestingWDExample,
|
|
12
12
|
mountEditor,
|
|
@@ -8,12 +8,12 @@ import {
|
|
|
8
8
|
} from '@atlaskit/editor-test-helpers/integration/helpers';
|
|
9
9
|
import { documentWithMergedCells } from './__fixtures__/merged-rows-and-cols-document';
|
|
10
10
|
import { nestedInExtension } from './__fixtures__/nested-in-extension';
|
|
11
|
-
import { TableCssClassName as ClassName } from '
|
|
11
|
+
import { TableCssClassName as ClassName } from '../../plugins/table/types';
|
|
12
12
|
import {
|
|
13
13
|
goToEditorTestingWDExample,
|
|
14
14
|
mountEditor,
|
|
15
15
|
} from '@atlaskit/editor-test-helpers/testing-example-page';
|
|
16
|
-
import messages from '
|
|
16
|
+
import messages from '../../plugins/table/ui/messages';
|
|
17
17
|
import { deleteRow } from '@atlaskit/editor-test-helpers/page-objects/table';
|
|
18
18
|
|
|
19
19
|
BrowserTestCase(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/src/{plugins/table/__tests__ → __tests__}/integration/insert-cell-header-with-strong-mark.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
tableForBulkResizeWithNumberCol,
|
|
28
28
|
} from './__fixtures__/resize-documents';
|
|
29
29
|
import { tableWithMinWidthColumnsDocument } from './__fixtures__/table-with-min-width-columns-document';
|
|
30
|
-
import { pluginKey as tableResizingPluginKey } from '
|
|
30
|
+
import { pluginKey as tableResizingPluginKey } from '../../plugins/table/pm-plugins/table-resizing';
|
|
31
31
|
|
|
32
32
|
import {
|
|
33
33
|
goToEditorTestingWDExample,
|
|
@@ -185,8 +185,7 @@ BrowserTestCase(
|
|
|
185
185
|
featureFlags: {},
|
|
186
186
|
},
|
|
187
187
|
{
|
|
188
|
-
test:
|
|
189
|
-
'Should stack columns to the right and go to overflow with overflowShadowsOptimisation',
|
|
188
|
+
test: 'Should stack columns to the right and go to overflow with overflowShadowsOptimisation',
|
|
190
189
|
featureFlags: {
|
|
191
190
|
tableOverflowShadowsOptimization: true,
|
|
192
191
|
},
|
|
File without changes
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
export {};
|
|
2
|
+
test.todo('TODO [ED-15027]; restore unit');
|
|
3
|
+
|
|
4
|
+
// //TODO: [ED-15027] remove and relocate this test once the behaviour has been corrected.\
|
|
5
|
+
// import { BrowserTestCase } from '@atlaskit/webdriver-runner/runner';
|
|
6
|
+
// import { BrowserObject } from '@atlaskit/webdriver-runner/wd-wrapper';
|
|
7
|
+
// import {
|
|
8
|
+
// goToEditorTestingWDExample,
|
|
9
|
+
// mountEditor,
|
|
10
|
+
// } from '../../../../__tests__/__helpers/testing-example-helpers';
|
|
11
|
+
|
|
12
|
+
// import {
|
|
13
|
+
// fullpage,
|
|
14
|
+
// expectToMatchSelection,
|
|
15
|
+
// setProseMirrorTextSelection,
|
|
16
|
+
// } from '../../../../__tests__/integration/_helpers';
|
|
17
|
+
// import { WebDriverPage } from '../../../../__tests__/__helpers/page-objects/_types';
|
|
18
|
+
// import adf from './__fixtures__/table-with-multiline-date.adf.json';
|
|
19
|
+
|
|
20
|
+
// describe('table with multiline date', () => {
|
|
21
|
+
// const initEditor = async ({
|
|
22
|
+
// client,
|
|
23
|
+
// selection,
|
|
24
|
+
// adf,
|
|
25
|
+
// }: {
|
|
26
|
+
// client: BrowserObject;
|
|
27
|
+
// selection: { anchor: number; head: number };
|
|
28
|
+
// adf: string;
|
|
29
|
+
// }): Promise<WebDriverPage> => {
|
|
30
|
+
// const page = await goToEditorTestingWDExample(client);
|
|
31
|
+
// const props = {
|
|
32
|
+
// appearance: fullpage.appearance,
|
|
33
|
+
// defaultValue: adf,
|
|
34
|
+
// allowTextAlignment: true,
|
|
35
|
+
// allowTables: {
|
|
36
|
+
// advanced: true,
|
|
37
|
+
// allowColumnResizing: true,
|
|
38
|
+
// },
|
|
39
|
+
// allowDate: true,
|
|
40
|
+
// };
|
|
41
|
+
|
|
42
|
+
// await mountEditor(page, props, undefined, { clickInEditor: false });
|
|
43
|
+
|
|
44
|
+
// await page.waitForSelector('.inlineNodeView');
|
|
45
|
+
|
|
46
|
+
// await setProseMirrorTextSelection(page, selection);
|
|
47
|
+
|
|
48
|
+
// return page;
|
|
49
|
+
// };
|
|
50
|
+
// BrowserTestCase(
|
|
51
|
+
// 'Does not select table corner controls when navigating up from a multiline node inside a table',
|
|
52
|
+
// {
|
|
53
|
+
// skip: ['firefox', 'safari'],
|
|
54
|
+
// },
|
|
55
|
+
// async (client: BrowserObject) => {
|
|
56
|
+
// const page = await initEditor({
|
|
57
|
+
// client,
|
|
58
|
+
// selection: { anchor: 27, head: 27 },
|
|
59
|
+
// adf,
|
|
60
|
+
// });
|
|
61
|
+
|
|
62
|
+
// await page.keys('ArrowUp');
|
|
63
|
+
|
|
64
|
+
// await expectToMatchSelection(page, {
|
|
65
|
+
// type: 'text',
|
|
66
|
+
// anchor: 27,
|
|
67
|
+
// head: 27,
|
|
68
|
+
// });
|
|
69
|
+
// },
|
|
70
|
+
// );
|
|
71
|
+
// });
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { Rect } from '@atlaskit/editor-tables/table-map';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
createProsemirrorEditorFactory,
|
|
4
|
+
LightEditorPlugin,
|
|
5
|
+
Preset,
|
|
6
|
+
} from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
|
|
3
7
|
import {
|
|
4
8
|
doc,
|
|
5
9
|
p,
|
|
@@ -14,7 +18,7 @@ import {
|
|
|
14
18
|
import sendKeyToPm from '@atlaskit/editor-test-helpers/send-key-to-pm';
|
|
15
19
|
import { B50 } from '@atlaskit/theme/colors';
|
|
16
20
|
|
|
17
|
-
import {
|
|
21
|
+
import { PluginConfig } from '../../plugins/table/types';
|
|
18
22
|
import {
|
|
19
23
|
deleteTableWithAnalytics,
|
|
20
24
|
emptyMultipleCellsWithAnalytics,
|
|
@@ -37,11 +41,15 @@ import { pluginKey } from '../../plugins/table/pm-plugins/plugin-key';
|
|
|
37
41
|
import { replaceSelectedTable } from '../../plugins/table/transforms';
|
|
38
42
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
39
43
|
import tablePlugin from '../../plugins/table-plugin';
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
44
|
+
import typeAheadPlugin from '@atlaskit/editor-core/src/plugins/type-ahead';
|
|
45
|
+
import quickInsertPlugin from '@atlaskit/editor-core/src/plugins/quick-insert';
|
|
46
|
+
|
|
47
|
+
const defaultTableDoc = doc(
|
|
48
|
+
table()(
|
|
49
|
+
tr(thEmpty, thEmpty, thEmpty),
|
|
50
|
+
tr(tdEmpty, tdEmpty, tdEmpty),
|
|
51
|
+
tr(tdEmpty, tdEmpty, tdCursor),
|
|
52
|
+
),
|
|
45
53
|
);
|
|
46
54
|
|
|
47
55
|
const secondRow: Rect = { left: 0, top: 1, bottom: 2, right: 3 };
|
|
@@ -57,7 +65,7 @@ describe('Table analytic events', () => {
|
|
|
57
65
|
};
|
|
58
66
|
});
|
|
59
67
|
|
|
60
|
-
const createEditor =
|
|
68
|
+
const createEditor = createProsemirrorEditorFactory();
|
|
61
69
|
|
|
62
70
|
const editor = (doc: DocBuilder) => {
|
|
63
71
|
const tableOptions = {
|
|
@@ -69,20 +77,13 @@ describe('Table analytic events', () => {
|
|
|
69
77
|
|
|
70
78
|
const _editor = createEditor({
|
|
71
79
|
doc,
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
tablePlugin({
|
|
80
|
-
tableOptions,
|
|
81
|
-
editorAnalyticsAPI: editorAnalyticsAPIFake,
|
|
82
|
-
}),
|
|
83
|
-
],
|
|
84
|
-
},
|
|
85
|
-
},
|
|
80
|
+
preset: new Preset<LightEditorPlugin>()
|
|
81
|
+
.add(typeAheadPlugin)
|
|
82
|
+
.add(quickInsertPlugin)
|
|
83
|
+
.add([
|
|
84
|
+
tablePlugin,
|
|
85
|
+
{ tableOptions, editorAnalyticsAPI: editorAnalyticsAPIFake },
|
|
86
|
+
]),
|
|
86
87
|
pluginKey,
|
|
87
88
|
});
|
|
88
89
|
|
|
@@ -108,7 +109,7 @@ describe('Table analytic events', () => {
|
|
|
108
109
|
|
|
109
110
|
describe('table deleted', () => {
|
|
110
111
|
beforeEach(() => {
|
|
111
|
-
const { editorView } = editor(
|
|
112
|
+
const { editorView } = editor(defaultTableDoc);
|
|
112
113
|
deleteTableWithAnalytics(editorAnalyticsAPIFake)(
|
|
113
114
|
editorView.state,
|
|
114
115
|
editorView.dispatch,
|
|
@@ -239,9 +240,8 @@ describe('Table analytic events', () => {
|
|
|
239
240
|
);
|
|
240
241
|
|
|
241
242
|
mergeCellsWithAnalytics(editorAnalyticsAPIFake)(
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
);
|
|
243
|
+
INPUT_METHOD.CONTEXT_MENU,
|
|
244
|
+
)(editorView.state, editorView.dispatch);
|
|
245
245
|
});
|
|
246
246
|
|
|
247
247
|
it('should fire v3 analytics', () => {
|
|
@@ -273,7 +273,7 @@ describe('Table analytic events', () => {
|
|
|
273
273
|
),
|
|
274
274
|
);
|
|
275
275
|
|
|
276
|
-
splitCellWithAnalytics(editorAnalyticsAPIFake)(
|
|
276
|
+
splitCellWithAnalytics(editorAnalyticsAPIFake)(INPUT_METHOD.CONTEXT_MENU)(
|
|
277
277
|
editorView.state,
|
|
278
278
|
editorView.dispatch,
|
|
279
279
|
);
|
|
@@ -308,11 +308,11 @@ describe('Table analytic events', () => {
|
|
|
308
308
|
),
|
|
309
309
|
);
|
|
310
310
|
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
);
|
|
311
|
+
setColorWithAnalytics(editorAnalyticsAPIFake)(
|
|
312
|
+
INPUT_METHOD.CONTEXT_MENU,
|
|
313
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
314
|
+
B50,
|
|
315
|
+
)(editorView.state, editorView.dispatch);
|
|
316
316
|
});
|
|
317
317
|
|
|
318
318
|
it('should fire v3 analytics', () => {
|
|
@@ -335,7 +335,7 @@ describe('Table analytic events', () => {
|
|
|
335
335
|
|
|
336
336
|
describe('header row toggled', () => {
|
|
337
337
|
beforeEach(() => {
|
|
338
|
-
const { editorView } = editor(
|
|
338
|
+
const { editorView } = editor(defaultTableDoc);
|
|
339
339
|
toggleHeaderRowWithAnalytics(editorAnalyticsAPIFake)(
|
|
340
340
|
editorView.state,
|
|
341
341
|
editorView.dispatch,
|
|
@@ -359,7 +359,7 @@ describe('Table analytic events', () => {
|
|
|
359
359
|
|
|
360
360
|
describe('header column toggled', () => {
|
|
361
361
|
beforeEach(() => {
|
|
362
|
-
const { editorView } = editor(
|
|
362
|
+
const { editorView } = editor(defaultTableDoc);
|
|
363
363
|
toggleHeaderColumnWithAnalytics(editorAnalyticsAPIFake)(
|
|
364
364
|
editorView.state,
|
|
365
365
|
editorView.dispatch,
|
|
@@ -383,7 +383,7 @@ describe('Table analytic events', () => {
|
|
|
383
383
|
|
|
384
384
|
describe('number column toggled', () => {
|
|
385
385
|
beforeEach(() => {
|
|
386
|
-
const { editorView } = editor(
|
|
386
|
+
const { editorView } = editor(defaultTableDoc);
|
|
387
387
|
toggleNumberColumnWithAnalytics(editorAnalyticsAPIFake)(
|
|
388
388
|
editorView.state,
|
|
389
389
|
editorView.dispatch,
|
|
@@ -408,7 +408,7 @@ describe('Table analytic events', () => {
|
|
|
408
408
|
describe('layout changed', () => {
|
|
409
409
|
describe('normal', () => {
|
|
410
410
|
it('should fire v3 analytics', () => {
|
|
411
|
-
const { editorView } = editor(
|
|
411
|
+
const { editorView } = editor(defaultTableDoc);
|
|
412
412
|
toggleTableLayoutWithAnalytics(editorAnalyticsAPIFake)(
|
|
413
413
|
editorView.state,
|
|
414
414
|
editorView.dispatch,
|
|
@@ -537,7 +537,7 @@ describe('Table analytic events', () => {
|
|
|
537
537
|
describe('row added', () => {
|
|
538
538
|
describe('context menu', () => {
|
|
539
539
|
beforeEach(() => {
|
|
540
|
-
const { editorView } = editor(
|
|
540
|
+
const { editorView } = editor(defaultTableDoc);
|
|
541
541
|
insertRowWithAnalytics(editorAnalyticsAPIFake)(
|
|
542
542
|
INPUT_METHOD.CONTEXT_MENU,
|
|
543
543
|
{
|
|
@@ -566,7 +566,7 @@ describe('Table analytic events', () => {
|
|
|
566
566
|
describe('keyboard', () => {
|
|
567
567
|
describe('Tab', () => {
|
|
568
568
|
beforeEach(() => {
|
|
569
|
-
const { editorView } = editor(
|
|
569
|
+
const { editorView } = editor(defaultTableDoc);
|
|
570
570
|
sendKeyToPm(editorView, 'Tab');
|
|
571
571
|
});
|
|
572
572
|
|
|
@@ -623,7 +623,7 @@ describe('Table analytic events', () => {
|
|
|
623
623
|
return { width: 500 };
|
|
624
624
|
};
|
|
625
625
|
beforeEach(() => {
|
|
626
|
-
const { editorView } = editor(
|
|
626
|
+
const { editorView } = editor(defaultTableDoc);
|
|
627
627
|
insertColumnWithAnalytics(
|
|
628
628
|
getEditorContainerWidth,
|
|
629
629
|
editorAnalyticsAPIFake,
|
|
@@ -652,7 +652,7 @@ describe('Table analytic events', () => {
|
|
|
652
652
|
|
|
653
653
|
describe('row deleted', () => {
|
|
654
654
|
beforeEach(() => {
|
|
655
|
-
const { editorView } = editor(
|
|
655
|
+
const { editorView } = editor(defaultTableDoc);
|
|
656
656
|
deleteRowsWithAnalytics(editorAnalyticsAPIFake)(
|
|
657
657
|
INPUT_METHOD.CONTEXT_MENU,
|
|
658
658
|
secondRow,
|
|
@@ -679,7 +679,7 @@ describe('Table analytic events', () => {
|
|
|
679
679
|
|
|
680
680
|
describe('column deleted', () => {
|
|
681
681
|
beforeEach(() => {
|
|
682
|
-
const { editorView } = editor(
|
|
682
|
+
const { editorView } = editor(defaultTableDoc);
|
|
683
683
|
deleteColumnsWithAnalytics(editorAnalyticsAPIFake)(
|
|
684
684
|
INPUT_METHOD.CONTEXT_MENU,
|
|
685
685
|
secondColumn,
|
|
@@ -8,16 +8,22 @@ import {
|
|
|
8
8
|
DocBuilder,
|
|
9
9
|
} from '@atlaskit/editor-test-helpers/doc-builder';
|
|
10
10
|
import { removeColumnAt } from '@atlaskit/editor-tables/utils';
|
|
11
|
-
import {
|
|
11
|
+
import { PluginConfig } from '../../plugins/table/types';
|
|
12
12
|
|
|
13
13
|
import { setResizeHandlePos } from '../../plugins/table/pm-plugins/table-resizing/commands';
|
|
14
14
|
import { pluginKey as tablePluginKey } from '../../plugins/table/pm-plugins/plugin-key';
|
|
15
|
-
import {
|
|
15
|
+
import {
|
|
16
|
+
createProsemirrorEditorFactory,
|
|
17
|
+
LightEditorPlugin,
|
|
18
|
+
Preset,
|
|
19
|
+
} from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
|
|
16
20
|
import tablePlugin from '../../plugins/table-plugin';
|
|
21
|
+
import widthPlugin from '@atlaskit/editor-core/src/plugins/width';
|
|
22
|
+
|
|
17
23
|
const TABLE_LOCAL_ID = 'test-table-local-id';
|
|
18
24
|
|
|
19
25
|
describe('Tables with Collab editing', () => {
|
|
20
|
-
const createEditor =
|
|
26
|
+
const createEditor = createProsemirrorEditorFactory();
|
|
21
27
|
const tableOptions = {
|
|
22
28
|
allowNumberColumn: true,
|
|
23
29
|
allowHeaderRow: true,
|
|
@@ -29,12 +35,9 @@ describe('Tables with Collab editing', () => {
|
|
|
29
35
|
const editor = (doc: DocBuilder) => {
|
|
30
36
|
return createEditor({
|
|
31
37
|
doc,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
__plugins: [tablePlugin({ tableOptions })],
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
+
preset: new Preset<LightEditorPlugin>()
|
|
39
|
+
.add([tablePlugin, { tableOptions }])
|
|
40
|
+
.add(widthPlugin),
|
|
38
41
|
pluginKey: tablePluginKey,
|
|
39
42
|
});
|
|
40
43
|
};
|
|
@@ -16,10 +16,10 @@ import {
|
|
|
16
16
|
DocBuilder,
|
|
17
17
|
} from '@atlaskit/editor-test-helpers/doc-builder';
|
|
18
18
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
19
|
-
import tablePlugin from '../../../index';
|
|
20
|
-
import { pluginKey } from '../../../pm-plugins/plugin-key';
|
|
21
|
-
import { TablePluginState } from '../../../types';
|
|
22
|
-
import { goToNextCell } from '../../../commands/go-to-next-cell';
|
|
19
|
+
import tablePlugin from '../../../plugins/table/index';
|
|
20
|
+
import { pluginKey } from '../../../plugins/table/pm-plugins/plugin-key';
|
|
21
|
+
import { TablePluginState } from '../../../plugins/table/types';
|
|
22
|
+
import { goToNextCell } from '../../../plugins/table/commands/go-to-next-cell';
|
|
23
23
|
|
|
24
24
|
const TABLE_LOCAL_ID = 'test-table-local-id';
|
|
25
25
|
|
|
@@ -16,10 +16,10 @@ import {
|
|
|
16
16
|
} from '@atlaskit/editor-test-helpers/doc-builder';
|
|
17
17
|
import type { GetEditorContainerWidth } from '@atlaskit/editor-common/types';
|
|
18
18
|
|
|
19
|
-
import tablePlugin from '../../../index';
|
|
20
|
-
import { pluginKey } from '../../../pm-plugins/plugin-key';
|
|
21
|
-
import { TablePluginState } from '../../../types';
|
|
22
|
-
import { addColumnAt } from '../../../commands/insert';
|
|
19
|
+
import tablePlugin from '../../../plugins/table/index';
|
|
20
|
+
import { pluginKey } from '../../../plugins/table/pm-plugins/plugin-key';
|
|
21
|
+
import { TablePluginState } from '../../../plugins/table/types';
|
|
22
|
+
import { addColumnAt } from '../../../plugins/table/commands/insert';
|
|
23
23
|
import widthPlugin from '@atlaskit/editor-core/src/plugins/width';
|
|
24
24
|
|
|
25
25
|
const TABLE_LOCAL_ID = 'test-table-local-id';
|
|
@@ -15,12 +15,18 @@ import {
|
|
|
15
15
|
createProsemirrorEditorFactory,
|
|
16
16
|
} from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
|
|
17
17
|
import panelPlugin from '@atlaskit/editor-core/src/plugins/panel';
|
|
18
|
-
import {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
import {
|
|
23
|
-
import
|
|
18
|
+
import {
|
|
19
|
+
selectColumn,
|
|
20
|
+
moveCursorBackward,
|
|
21
|
+
} from '../../../plugins/table/commands';
|
|
22
|
+
import { getDecorations } from '../../../plugins/table/pm-plugins/decorations/plugin';
|
|
23
|
+
import { getPluginState } from '../../../plugins/table/pm-plugins/plugin-factory';
|
|
24
|
+
import { pluginKey } from '../../../plugins/table/pm-plugins/plugin-key';
|
|
25
|
+
import {
|
|
26
|
+
TableDecorations,
|
|
27
|
+
TablePluginState,
|
|
28
|
+
} from '../../../plugins/table/types';
|
|
29
|
+
import tablePlugin from '../../../plugins/table';
|
|
24
30
|
|
|
25
31
|
describe('table plugin: commands', () => {
|
|
26
32
|
const createEditor = createProsemirrorEditorFactory();
|