@atlaskit/editor-plugin-table 0.0.9 → 0.1.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.
Files changed (219) hide show
  1. package/.eslintrc.js +35 -0
  2. package/CHANGELOG.md +29 -0
  3. package/commands/package.json +14 -0
  4. package/dist/cjs/plugins/table/commands/hover.js +4 -4
  5. package/dist/cjs/plugins/table/commands-with-analytics.js +59 -58
  6. package/dist/cjs/plugins/table/event-handlers.js +0 -1
  7. package/dist/cjs/plugins/table/index.js +54 -37
  8. package/dist/cjs/plugins/table/pm-plugins/table-resizing/index.js +9 -1
  9. package/dist/cjs/plugins/table/toolbar.js +150 -22
  10. package/dist/cjs/plugins/table/transforms/fix-tables.js +7 -7
  11. package/dist/cjs/plugins/table/ui/FloatingContextualButton/index.js +1 -2
  12. package/dist/cjs/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +4 -6
  13. package/dist/cjs/plugins/table/ui/FloatingDeleteButton/DeleteButton.js +1 -1
  14. package/dist/cjs/plugins/table/ui/LayoutButton/index.js +3 -5
  15. package/dist/cjs/plugins/table/ui/TableFloatingControls/CornerControls/index.js +2 -1
  16. package/dist/cjs/plugins/table/utils/column-controls.js +0 -1
  17. package/dist/cjs/plugins/table/utils/decoration.js +53 -4
  18. package/dist/cjs/plugins/table/utils/dom.js +0 -2
  19. package/dist/cjs/plugins/table/utils/paste.js +0 -1
  20. package/dist/cjs/version.json +1 -1
  21. package/dist/es2019/plugins/table/commands/hover.js +4 -4
  22. package/dist/es2019/plugins/table/commands-with-analytics.js +6 -9
  23. package/dist/es2019/plugins/table/event-handlers.js +1 -2
  24. package/dist/es2019/plugins/table/handlers.js +1 -2
  25. package/dist/es2019/plugins/table/index.js +23 -5
  26. package/dist/es2019/plugins/table/pm-plugins/keymap.js +1 -1
  27. package/dist/es2019/plugins/table/pm-plugins/table-local-id.js +1 -3
  28. package/dist/es2019/plugins/table/pm-plugins/table-resizing/index.js +2 -1
  29. package/dist/es2019/plugins/table/toolbar.js +133 -16
  30. package/dist/es2019/plugins/table/transforms/fix-tables.js +2 -4
  31. package/dist/es2019/plugins/table/ui/FloatingContextualButton/index.js +1 -2
  32. package/dist/es2019/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +4 -6
  33. package/dist/es2019/plugins/table/ui/FloatingDeleteButton/DeleteButton.js +2 -3
  34. package/dist/es2019/plugins/table/ui/FloatingDeleteButton/index.js +1 -2
  35. package/dist/es2019/plugins/table/ui/FloatingInsertButton/index.js +1 -2
  36. package/dist/es2019/plugins/table/ui/LayoutButton/index.js +3 -5
  37. package/dist/es2019/plugins/table/ui/TableFloatingControls/CornerControls/index.js +2 -1
  38. package/dist/es2019/plugins/table/utils/column-controls.js +0 -1
  39. package/dist/es2019/plugins/table/utils/decoration.js +60 -25
  40. package/dist/es2019/plugins/table/utils/dom.js +0 -2
  41. package/dist/es2019/plugins/table/utils/paste.js +1 -2
  42. package/dist/es2019/plugins/table/utils/row-controls.js +1 -2
  43. package/dist/es2019/version.json +1 -1
  44. package/dist/esm/plugins/table/commands/hover.js +4 -4
  45. package/dist/esm/plugins/table/commands-with-analytics.js +56 -55
  46. package/dist/esm/plugins/table/event-handlers.js +1 -2
  47. package/dist/esm/plugins/table/handlers.js +1 -2
  48. package/dist/esm/plugins/table/index.js +55 -38
  49. package/dist/esm/plugins/table/pm-plugins/keymap.js +1 -1
  50. package/dist/esm/plugins/table/pm-plugins/table-local-id.js +1 -3
  51. package/dist/esm/plugins/table/pm-plugins/table-resizing/index.js +2 -1
  52. package/dist/esm/plugins/table/toolbar.js +139 -17
  53. package/dist/esm/plugins/table/transforms/fix-tables.js +2 -4
  54. package/dist/esm/plugins/table/ui/FloatingContextualButton/index.js +1 -2
  55. package/dist/esm/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +4 -6
  56. package/dist/esm/plugins/table/ui/FloatingDeleteButton/DeleteButton.js +2 -3
  57. package/dist/esm/plugins/table/ui/FloatingDeleteButton/index.js +1 -2
  58. package/dist/esm/plugins/table/ui/FloatingInsertButton/index.js +1 -2
  59. package/dist/esm/plugins/table/ui/LayoutButton/index.js +3 -5
  60. package/dist/esm/plugins/table/ui/TableFloatingControls/CornerControls/index.js +2 -1
  61. package/dist/esm/plugins/table/utils/column-controls.js +0 -1
  62. package/dist/esm/plugins/table/utils/decoration.js +50 -4
  63. package/dist/esm/plugins/table/utils/dom.js +0 -2
  64. package/dist/esm/plugins/table/utils/paste.js +1 -2
  65. package/dist/esm/plugins/table/utils/row-controls.js +1 -2
  66. package/dist/esm/version.json +1 -1
  67. package/dist/types/plugins/table/commands-with-analytics.d.ts +5 -5
  68. package/dist/types/plugins/table/pm-plugins/table-resizing/index.d.ts +1 -0
  69. package/dist/types/plugins/table/toolbar.d.ts +2 -2
  70. package/dist/types/plugins/table/transforms/fix-tables.d.ts +1 -1
  71. package/dist/types/plugins/table/utils/decoration.d.ts +1 -1
  72. package/dist/types-ts4.0/plugins/table/commands-with-analytics.d.ts +5 -5
  73. package/dist/types-ts4.0/plugins/table/pm-plugins/table-resizing/index.d.ts +1 -0
  74. package/dist/types-ts4.0/plugins/table/toolbar.d.ts +2 -2
  75. package/dist/types-ts4.0/plugins/table/transforms/fix-tables.d.ts +1 -1
  76. package/dist/types-ts4.0/plugins/table/utils/decoration.d.ts +1 -1
  77. package/examples/config.jsonc +14 -0
  78. package/package.json +15 -11
  79. package/plugin-key/package.json +14 -0
  80. package/report.api.md +1 -1
  81. package/src/{plugins/table/__tests__ → __tests__}/integration/__fixtures__/auto-size-documents.ts +0 -0
  82. package/src/{plugins/table/__tests__ → __tests__}/integration/__fixtures__/basic-table.ts +0 -0
  83. package/src/{plugins/table/__tests__ → __tests__}/integration/__fixtures__/empty-paragraph-underneath-table.ts +0 -0
  84. package/src/{plugins/table/__tests__ → __tests__}/integration/__fixtures__/even-columns.ts +0 -0
  85. package/src/{plugins/table/__tests__ → __tests__}/integration/__fixtures__/layout-documents.ts +0 -0
  86. package/src/{plugins/table/__tests__ → __tests__}/integration/__fixtures__/merged-rows-and-cols-document.ts +0 -0
  87. package/src/{plugins/table/__tests__ → __tests__}/integration/__fixtures__/nested-in-extension.ts +0 -0
  88. package/src/{plugins/table/__tests__ → __tests__}/integration/__fixtures__/paragraph-and-table-adf.json +0 -0
  89. package/src/{plugins/table/__tests__ → __tests__}/integration/__fixtures__/resize-documents.ts +0 -0
  90. package/src/{plugins/table/__tests__ → __tests__}/integration/__fixtures__/scale.ts +0 -0
  91. package/src/{plugins/table/__tests__ → __tests__}/integration/__fixtures__/table-inside-layout.ts +0 -0
  92. package/src/{plugins/table/__tests__ → __tests__}/integration/__fixtures__/table-with-min-width-columns-document.ts +0 -0
  93. package/src/{plugins/table/__tests__ → __tests__}/integration/__fixtures__/table-with-multiline-date.adf.json +0 -0
  94. package/src/{plugins/table/__tests__ → __tests__}/integration/__fixtures__/table-with-text-and-empty-row.ts +0 -0
  95. package/src/{plugins/table/__tests__ → __tests__}/integration/__snapshots__/auto-size.ts.snap +0 -0
  96. package/src/{plugins/table/__tests__ → __tests__}/integration/__snapshots__/change-date-inside-table.ts.snap +0 -0
  97. package/src/{plugins/table/__tests__ → __tests__}/integration/__snapshots__/copy-button.ts.snap +0 -0
  98. package/src/{plugins/table/__tests__ → __tests__}/integration/__snapshots__/delete-columns.ts.snap +0 -0
  99. package/src/{plugins/table/__tests__ → __tests__}/integration/__snapshots__/delete-last-column-in-full-width.ts.snap +0 -0
  100. package/src/{plugins/table/__tests__ → __tests__}/integration/__snapshots__/delete-last-column-with-empty-action.ts.snap +0 -0
  101. package/src/{plugins/table/__tests__ → __tests__}/integration/__snapshots__/delete-last-row-with-empty-action.ts.snap +0 -0
  102. package/src/{plugins/table/__tests__ → __tests__}/integration/__snapshots__/delete-rows.ts.snap +0 -0
  103. package/src/{plugins/table/__tests__ → __tests__}/integration/__snapshots__/delete-table-when-selected.ts.snap +0 -0
  104. package/src/{plugins/table/__tests__ → __tests__}/integration/__snapshots__/deleting-empty-paragraph-under-table.ts.snap +0 -0
  105. package/src/{plugins/table/__tests__ → __tests__}/integration/__snapshots__/even-columns.ts.snap +0 -0
  106. package/src/{plugins/table/__tests__ → __tests__}/integration/__snapshots__/insert-cell-header-with-strong-mark.ts.snap +0 -0
  107. package/src/{plugins/table/__tests__ → __tests__}/integration/__snapshots__/insert-row-inside-layout.ts.snap +0 -0
  108. package/src/{plugins/table/__tests__ → __tests__}/integration/__snapshots__/layout.ts.snap +0 -0
  109. package/src/{plugins/table/__tests__ → __tests__}/integration/__snapshots__/resize.ts.snap +0 -0
  110. package/src/{plugins/table/__tests__ → __tests__}/integration/__snapshots__/scale.ts.snap +0 -0
  111. package/src/{plugins/table/__tests__ → __tests__}/integration/arrow-down-into-table.ts +0 -0
  112. package/src/{plugins/table/__tests__ → __tests__}/integration/auto-size.ts +0 -0
  113. package/src/{plugins/table/__tests__ → __tests__}/integration/block-node-selection.ts +1 -0
  114. package/src/{plugins/table/__tests__ → __tests__}/integration/cell-selection.ts +0 -0
  115. package/src/{plugins/table/__tests__ → __tests__}/integration/change-date-inside-table.ts +0 -0
  116. package/src/{plugins/table/__tests__ → __tests__}/integration/copy-button.ts +1 -1
  117. package/src/{plugins/table/__tests__ → __tests__}/integration/delete-columns.ts +2 -2
  118. package/src/{plugins/table/__tests__ → __tests__}/integration/delete-last-column-in-full-width.ts +1 -1
  119. package/src/{plugins/table/__tests__ → __tests__}/integration/delete-last-column-with-empty-action.ts +1 -1
  120. package/src/{plugins/table/__tests__ → __tests__}/integration/delete-last-row-with-empty-action.ts +1 -1
  121. package/src/{plugins/table/__tests__ → __tests__}/integration/delete-rows.ts +2 -2
  122. package/src/{plugins/table/__tests__ → __tests__}/integration/delete-table-when-selected.ts +0 -0
  123. package/src/{plugins/table/__tests__ → __tests__}/integration/deleting-empty-paragraph-under-table.ts +0 -0
  124. package/src/{plugins/table/__tests__ → __tests__}/integration/even-columns.ts +0 -0
  125. package/src/{plugins/table/__tests__ → __tests__}/integration/insert-cell-header-with-strong-mark.ts +0 -0
  126. package/src/{plugins/table/__tests__ → __tests__}/integration/insert-long-smart-link.ts +1 -0
  127. package/src/{plugins/table/__tests__ → __tests__}/integration/insert-row-inside-layout.ts +0 -0
  128. package/src/{plugins/table/__tests__ → __tests__}/integration/layout.ts +0 -0
  129. package/src/{plugins/table/__tests__ → __tests__}/integration/resize-handler.ts +0 -0
  130. package/src/{plugins/table/__tests__ → __tests__}/integration/resize.ts +1 -1
  131. package/src/{plugins/table/__tests__ → __tests__}/integration/scale.ts +0 -0
  132. package/src/__tests__/integration/table-controls-selection.ts +71 -0
  133. package/src/__tests__/unit/analytics.ts +8 -9
  134. package/src/{plugins/table/__tests__ → __tests__}/unit/commands/go-to-next-cell.ts +4 -4
  135. package/src/{plugins/table/__tests__ → __tests__}/unit/commands/insert.ts +4 -4
  136. package/src/{plugins/table/__tests__ → __tests__}/unit/commands/misc.ts +12 -6
  137. package/src/{plugins/table/__tests__ → __tests__}/unit/commands.ts +7 -7
  138. package/src/__tests__/unit/copy-button.ts +22 -0
  139. package/src/__tests__/unit/event-handlers.ts +120 -1
  140. package/src/{plugins/table/__tests__ → __tests__}/unit/get-toolbar-config.ts +8 -3
  141. package/src/{plugins/table/__tests__ → __tests__}/unit/nodeviews/OverflowShadowsObserver.ts +2 -2
  142. package/src/{plugins/table/__tests__ → __tests__}/unit/nodeviews/TableComponent.tsx +11 -11
  143. package/src/{plugins/table/__tests__ → __tests__}/unit/nodeviews/table.ts +5 -5
  144. package/src/{plugins/table/__tests__ → __tests__}/unit/pm-plugins/decorations/column-controls.ts +2 -2
  145. package/src/{plugins/table/__tests__ → __tests__}/unit/pm-plugins/decorations/column-resizing.ts +9 -6
  146. package/src/{plugins/table/__tests__ → __tests__}/unit/pm-plugins/decorations/plugin.ts +5 -5
  147. package/src/{plugins/table/__tests__ → __tests__}/unit/pm-plugins/main-with-allow-collapse.ts +4 -4
  148. package/src/{plugins/table/__tests__ → __tests__}/unit/pm-plugins/main.ts +6 -6
  149. package/src/{plugins/table/__tests__ → __tests__}/unit/pm-plugins/safari-delete-composition-text-issue-workaround.ts +2 -2
  150. package/src/{plugins/table/__tests__ → __tests__}/unit/pm-plugins/sticky-headers/tableRow.tsx +16 -13
  151. package/src/{plugins/table/__tests__ → __tests__}/unit/pm-plugins/table-local-id.ts +3 -6
  152. package/src/{plugins/table/__tests__ → __tests__}/unit/pm-plugins/table-resizing/colgroup.ts +1 -1
  153. package/src/{plugins/table/__tests__ → __tests__}/unit/pm-plugins/table-resizing/event-handlers.ts +3 -3
  154. package/src/{plugins/table/__tests__ → __tests__}/unit/pm-plugins/table-selection-keymap.ts +3 -3
  155. package/src/{plugins/table/__tests__ → __tests__}/unit/toolbar.ts +5 -9
  156. package/src/__tests__/unit/ui/DeleteButton.tsx +35 -0
  157. package/src/__tests__/unit/ui/FloatingDeleteButton.tsx +26 -64
  158. package/src/{plugins/table/__tests__ → __tests__}/unit/utils/collapse.ts +2 -2
  159. package/src/{plugins/table/__tests__ → __tests__}/unit/utils/column-controls.ts +1 -1
  160. package/src/{plugins/table/__tests__ → __tests__}/visual-regression/__fixtures__/table-with-100-numbered-list-items.json +0 -0
  161. 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
  162. 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
  163. 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
  164. 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
  165. 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
  166. 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
  167. 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
  168. 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
  169. package/src/{plugins/table/__tests__ → __tests__}/visual-regression/cell-options-menu.ts +2 -0
  170. package/src/__tests__/visual-regression/copy-button.ts +181 -0
  171. package/src/{plugins/table/__tests__ → __tests__}/visual-regression/index.ts +3 -1
  172. package/src/plugins/table/commands/hover.ts +4 -1
  173. package/src/plugins/table/commands-with-analytics.ts +12 -8
  174. package/src/plugins/table/event-handlers.ts +0 -1
  175. package/src/plugins/table/handlers.ts +0 -1
  176. package/src/plugins/table/index.tsx +28 -2
  177. package/src/plugins/table/pm-plugins/keymap.ts +1 -1
  178. package/src/plugins/table/pm-plugins/table-local-id.ts +0 -2
  179. package/src/plugins/table/pm-plugins/table-resizing/index.ts +1 -0
  180. package/src/plugins/table/{toolbar.ts → toolbar.tsx} +186 -14
  181. package/src/plugins/table/transforms/fix-tables.ts +2 -3
  182. package/src/plugins/table/ui/FloatingContextualButton/index.tsx +0 -1
  183. package/src/plugins/table/ui/FloatingContextualMenu/ContextualMenu.tsx +13 -10
  184. package/src/plugins/table/ui/FloatingContextualMenu/__tests__/ContextualMenu.tsx +1 -0
  185. package/src/plugins/table/ui/FloatingContextualMenu/__tests__/FloatingContextualMenu.tsx +1 -0
  186. package/src/plugins/table/ui/FloatingDeleteButton/DeleteButton.tsx +1 -2
  187. package/src/plugins/table/ui/FloatingDeleteButton/index.tsx +0 -1
  188. package/src/plugins/table/ui/FloatingInsertButton/index.tsx +0 -1
  189. package/src/plugins/table/ui/LayoutButton/index.tsx +2 -4
  190. package/src/plugins/table/ui/TableFloatingControls/CornerControls/index.tsx +1 -0
  191. package/src/plugins/table/utils/column-controls.ts +0 -1
  192. package/src/plugins/table/utils/decoration.ts +44 -5
  193. package/src/plugins/table/utils/dom.ts +0 -2
  194. package/src/plugins/table/utils/paste.ts +0 -1
  195. package/src/plugins/table/utils/row-controls.ts +0 -1
  196. package/types/package.json +5 -5
  197. package/ui/common-styles/package.json +14 -0
  198. package/ui/consts/package.json +14 -0
  199. package/dist/cjs/plugins/plugin-key.js +0 -17
  200. package/dist/cjs/plugins/table/todo-stubs.js +0 -10
  201. package/dist/cjs/types.js +0 -5
  202. package/dist/es2019/plugins/plugin-key.js +0 -3
  203. package/dist/es2019/plugins/table/todo-stubs.js +0 -1
  204. package/dist/es2019/types.js +0 -1
  205. package/dist/esm/plugins/plugin-key.js +0 -5
  206. package/dist/esm/plugins/table/todo-stubs.js +0 -1
  207. package/dist/esm/types.js +0 -1
  208. package/dist/types/plugins/plugin-key.d.ts +0 -4
  209. package/dist/types/plugins/table/todo-stubs.d.ts +0 -1
  210. package/dist/types/types.d.ts +0 -3
  211. package/dist/types-ts4.0/plugins/plugin-key.d.ts +0 -4
  212. package/dist/types-ts4.0/plugins/table/todo-stubs.d.ts +0 -1
  213. package/dist/types-ts4.0/types.d.ts +0 -3
  214. package/src/plugins/plugin-key.ts +0 -7
  215. package/src/plugins/table/__tests__/integration/table-controls-selection.ts +0 -70
  216. package/src/plugins/table/__tests__/unit/event-handlers.ts +0 -130
  217. package/src/plugins/table/todo-stubs.ts +0 -1
  218. package/src/types.ts +0 -3
  219. package/tmp/api-report-tmp.d.ts +0 -91
@@ -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 '@atlaskit/editor-core/src/plugins/table/types';
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 '@atlaskit/editor-core/src/plugins/table/types';
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 '@atlaskit/editor-core/src/plugins/table/types';
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 '@atlaskit/editor-core/src/plugins/table/types';
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 '@atlaskit/editor-core/src/plugins/table/ui/messages';
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(
@@ -1,3 +1,4 @@
1
+ export {};
1
2
  it.todo('TODO: ED-15801 - Fix smart link async rendering integration test');
2
3
  // import { BrowserTestCase } from '@atlaskit/webdriver-runner/runner';
3
4
  // import { copyToClipboard } from '@atlaskit/editor-test-helpers/integration/helpers';
@@ -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 '@atlaskit/editor-core/src/plugins/table/pm-plugins/table-resizing';
30
+ import { pluginKey as tableResizingPluginKey } from '../../plugins/table/pm-plugins/table-resizing';
31
31
 
32
32
  import {
33
33
  goToEditorTestingWDExample,
@@ -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
+ // });
@@ -239,9 +239,8 @@ describe('Table analytic events', () => {
239
239
  );
240
240
 
241
241
  mergeCellsWithAnalytics(editorAnalyticsAPIFake)(
242
- editorView.state,
243
- editorView.dispatch,
244
- );
242
+ INPUT_METHOD.CONTEXT_MENU,
243
+ )(editorView.state, editorView.dispatch);
245
244
  });
246
245
 
247
246
  it('should fire v3 analytics', () => {
@@ -273,7 +272,7 @@ describe('Table analytic events', () => {
273
272
  ),
274
273
  );
275
274
 
276
- splitCellWithAnalytics(editorAnalyticsAPIFake)(
275
+ splitCellWithAnalytics(editorAnalyticsAPIFake)(INPUT_METHOD.CONTEXT_MENU)(
277
276
  editorView.state,
278
277
  editorView.dispatch,
279
278
  );
@@ -308,11 +307,11 @@ describe('Table analytic events', () => {
308
307
  ),
309
308
  );
310
309
 
311
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
312
- setColorWithAnalytics(editorAnalyticsAPIFake)(B50)(
313
- editorView.state,
314
- editorView.dispatch,
315
- );
310
+ setColorWithAnalytics(editorAnalyticsAPIFake)(
311
+ INPUT_METHOD.CONTEXT_MENU,
312
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
313
+ B50,
314
+ )(editorView.state, editorView.dispatch);
316
315
  });
317
316
 
318
317
  it('should fire v3 analytics', () => {
@@ -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 { selectColumn, moveCursorBackward } from '../../../commands';
19
- import { getDecorations } from '../../../pm-plugins/decorations/plugin';
20
- import { getPluginState } from '../../../pm-plugins/plugin-factory';
21
- import { pluginKey } from '../../../pm-plugins/plugin-key';
22
- import { TableDecorations, TablePluginState } from '../../../types';
23
- import tablePlugin from '../../../';
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();
@@ -48,13 +48,13 @@ import {
48
48
  toggleHeaderColumn,
49
49
  toggleHeaderRow,
50
50
  transformSliceToAddTableHeaders,
51
- } from '../../commands';
52
- import { splitCell } from '../../commands/split-cell';
53
- import { wrapTableInExpand } from '../../commands/collapse';
54
- import { handleCut } from '../../event-handlers';
55
- import { getPluginState } from '../../pm-plugins/plugin-factory';
56
- import { pluginKey } from '../../pm-plugins/plugin-key';
57
- import tablePlugin from '../../../table';
51
+ } from '../../plugins/table/commands';
52
+ import { splitCell } from '../../plugins/table/commands/split-cell';
53
+ import { wrapTableInExpand } from '../../plugins/table/commands/collapse';
54
+ import { handleCut } from '../../plugins/table/event-handlers';
55
+ import { getPluginState } from '../../plugins/table/pm-plugins/plugin-factory';
56
+ import { pluginKey } from '../../plugins/table/pm-plugins/plugin-key';
57
+ import tablePlugin from '../../plugins/table';
58
58
  import panelPlugin from '@atlaskit/editor-core/src/plugins/panel';
59
59
  import expandPlugin from '@atlaskit/editor-core/src/plugins/expand';
60
60
  import extensionPlugin from '@atlaskit/editor-core/src/plugins/extension';
@@ -0,0 +1,22 @@
1
+ export {};
2
+
3
+ it.skip('TODO; restore unit', () => {});
4
+
5
+ // import { _getCopyButtonTestSuite } from '../../../copy-button/__tests__/unit/_getCopyButtonTestSuite';
6
+ // import {
7
+ // doc,
8
+ // p,
9
+ // table,
10
+ // tr,
11
+ // td,
12
+ // } from '@atlaskit/editor-test-helpers/doc-builder';
13
+
14
+ // _getCopyButtonTestSuite({
15
+ // nodeType: 'table',
16
+ // editorOptions: {
17
+ // allowTables: {
18
+ // advanced: true,
19
+ // },
20
+ // },
21
+ // doc: doc(table()(tr(td({})(p())), tr(td({})(p())), tr(td({})(p())))),
22
+ // });
@@ -1,6 +1,11 @@
1
1
  import { MediaAttributes } from '@atlaskit/adf-schema';
2
2
  import { TextSelection } from 'prosemirror-state';
3
3
  import { createEditorFactory } from '@atlaskit/editor-test-helpers/create-editor';
4
+ import {
5
+ createProsemirrorEditorFactory,
6
+ LightEditorPlugin,
7
+ Preset,
8
+ } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
4
9
  import {
5
10
  doc,
6
11
  table,
@@ -24,9 +29,124 @@ import {
24
29
  showInsertColumnButton,
25
30
  addResizeHandleDecorations,
26
31
  } from '../../plugins/table/commands';
32
+ import {
33
+ handleMouseOut,
34
+ handleMouseDown,
35
+ } from '../../plugins/table/event-handlers';
27
36
  import { pluginKey } from '../../plugins/table/pm-plugins/plugin-key';
37
+ import { TableCssClassName as ClassName } from '../../plugins/table/types';
28
38
  import tablePlugin from '../../plugins/table-plugin';
29
39
 
40
+ describe('table plugin: decorations', () => {
41
+ const createEditor = createProsemirrorEditorFactory();
42
+ const editor = (doc: DocBuilder) =>
43
+ createEditor({
44
+ doc,
45
+ preset: new Preset<LightEditorPlugin>().add(tablePlugin),
46
+ pluginKey,
47
+ });
48
+
49
+ describe('#handleMouseDown', () => {
50
+ beforeEach(() => {
51
+ jest.resetAllMocks();
52
+ });
53
+ it('should return true & prevent default behaviour for table wrappers: pm-table-contianer', () => {
54
+ const { editorView } = editor(
55
+ doc(table()(tr(td({})(p())), tr(td({})(p())), tr(td({})(p())))),
56
+ );
57
+ const tableContainer = document.createElement('div');
58
+ tableContainer.className = 'pm-table-container';
59
+ const event = new MouseEvent('mousedown');
60
+ Object.defineProperty(event, 'target', { value: tableContainer });
61
+ const preventDefaultSpy = jest.spyOn(
62
+ MouseEvent.prototype,
63
+ 'preventDefault',
64
+ );
65
+
66
+ expect(handleMouseDown(editorView, event)).toEqual(true);
67
+ expect(preventDefaultSpy).toHaveBeenCalledTimes(1);
68
+ });
69
+
70
+ it('should return true & prevent default behaviour for table wrappers: pm-table-wrapper', () => {
71
+ const { editorView } = editor(
72
+ doc(table()(tr(td({})(p())), tr(td({})(p())), tr(td({})(p())))),
73
+ );
74
+ const tableContainer = document.createElement('div');
75
+ tableContainer.className = 'pm-table-wrapper';
76
+ const event = new MouseEvent('mousedown');
77
+ Object.defineProperty(event, 'target', { value: tableContainer });
78
+ const preventDefaultSpy = jest.spyOn(
79
+ MouseEvent.prototype,
80
+ 'preventDefault',
81
+ );
82
+
83
+ expect(handleMouseDown(editorView, event)).toEqual(true);
84
+ expect(preventDefaultSpy).toHaveBeenCalledTimes(1);
85
+ });
86
+
87
+ it('should return false & not prevent default behaviour for editor content area: ak-editor-content-area', () => {
88
+ const { editorView } = editor(
89
+ doc(table()(tr(td({})(p())), tr(td({})(p())), tr(td({})(p())))),
90
+ );
91
+ const editorContentArea = document.createElement('div');
92
+ editorContentArea.className = 'ak-editor-content-area';
93
+ const event = new MouseEvent('mousedown');
94
+ Object.defineProperty(event, 'target', { value: editorContentArea });
95
+ const preventDefaultSpy = jest.spyOn(
96
+ MouseEvent.prototype,
97
+ 'preventDefault',
98
+ );
99
+
100
+ expect(handleMouseDown(editorView, event)).toEqual(false);
101
+ expect(preventDefaultSpy).toHaveBeenCalledTimes(0);
102
+ });
103
+ });
104
+
105
+ describe('#handleMouseOut', () => {
106
+ describe('when the target is a resize handle column', () => {
107
+ it('should return true', () => {
108
+ const { editorView } = editor(
109
+ doc(table()(tr(tdCursor, tdEmpty), tr(td()(p('{o}')), tdEmpty))),
110
+ );
111
+ const firstCell = document.createElement('div');
112
+ firstCell.classList.add(ClassName.RESIZE_HANDLE_DECORATION);
113
+
114
+ const spy = jest
115
+ .spyOn(MouseEvent.prototype, 'target', 'get')
116
+ .mockReturnValue(firstCell);
117
+
118
+ const event = new MouseEvent('opa');
119
+
120
+ expect(handleMouseOut(editorView, event)).toEqual(true);
121
+ spy.mockRestore();
122
+ });
123
+ });
124
+
125
+ describe('when the relatedTarget is a resize handle column too', () => {
126
+ it('should return false', () => {
127
+ const { editorView } = editor(
128
+ doc(table()(tr(tdCursor, tdEmpty), tr(td()(p('{o}')), tdEmpty))),
129
+ );
130
+ const firstCell = document.createElement('div');
131
+ firstCell.classList.add(ClassName.RESIZE_HANDLE_DECORATION);
132
+ const secondCell = document.createElement('div');
133
+ secondCell.classList.add(ClassName.RESIZE_HANDLE_DECORATION);
134
+
135
+ const spy = jest
136
+ .spyOn(MouseEvent.prototype, 'target', 'get')
137
+ .mockReturnValue(secondCell);
138
+
139
+ const event = new MouseEvent('opa', {
140
+ relatedTarget: firstCell,
141
+ });
142
+
143
+ expect(handleMouseOut(editorView, event)).toEqual(false);
144
+ spy.mockRestore();
145
+ });
146
+ });
147
+ });
148
+ });
149
+
30
150
  describe('table event handlers', () => {
31
151
  const createEditor = createEditorFactory<TablePluginState>();
32
152
  const fakeGetEditorFeatureFlags = () => ({});
@@ -160,7 +280,6 @@ describe('table event handlers', () => {
160
280
  collection: testCollectionName,
161
281
  };
162
282
  const tableAttrs = { localId: 'table' };
163
-
164
283
  const { editorView } = editor(
165
284
  doc(
166
285
  table(tableAttrs)(
@@ -17,15 +17,16 @@ import {
17
17
  Preset,
18
18
  } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
19
19
 
20
- import tablePlugin from '../../../table';
20
+ import tablePlugin from '../../plugins/table';
21
21
  import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
22
- import { getToolbarConfig } from '../../toolbar';
23
- import { setTableRef, setEditorFocus } from '../../commands';
22
+ import { getToolbarConfig } from '../../plugins/table/toolbar';
23
+ import { setTableRef, setEditorFocus } from '../../plugins/table/commands';
24
24
  import extensionPlugin from '@atlaskit/editor-core/src/plugins/extension';
25
25
  import dataConsumerPlugin from '@atlaskit/editor-core/src/plugins/data-consumer';
26
26
  import type {
27
27
  FloatingToolbarItem,
28
28
  FloatingToolbarButton,
29
+ GetEditorFeatureFlags,
29
30
  } from '@atlaskit/editor-common/types';
30
31
 
31
32
  const formatMessage: (t: { id: string }) => string = (message) =>
@@ -36,11 +37,15 @@ describe('getToolbarConfig', () => {
36
37
  const editorAnalyticsAPIFake: EditorAnalyticsAPI = {
37
38
  attachAnalyticsEvent: jest.fn().mockReturnValue(() => jest.fn()),
38
39
  };
40
+ const getEditorFeatureFlags: GetEditorFeatureFlags = jest
41
+ .fn()
42
+ .mockReturnValue({});
39
43
  const getButton = (editorView: EditorView) => {
40
44
  const { state } = editorView;
41
45
  const config = getToolbarConfig(
42
46
  getEditorContainerWidth,
43
47
  editorAnalyticsAPIFake,
48
+ getEditorFeatureFlags,
44
49
  )({})(state, { formatMessage } as any, {} as any)!;
45
50
  //
46
51
  expect(config).not.toBeUndefined();
@@ -1,7 +1,7 @@
1
1
  import { MockIntersectionObserver } from '@atlaskit/editor-test-helpers/mock-intersection-observer';
2
2
 
3
- import { OverflowShadowsObserver } from '../../../nodeviews/OverflowShadowsObserver';
4
- import { ShadowEvent } from '../../../types';
3
+ import { OverflowShadowsObserver } from '../../../plugins/table/nodeviews/OverflowShadowsObserver';
4
+ import { ShadowEvent } from '../../../plugins/table/types';
5
5
 
6
6
  describe('OverflowShadowsObserver', () => {
7
7
  let table: HTMLTableElement;
@@ -3,7 +3,7 @@ import { mount, ReactWrapper, shallow } from 'enzyme';
3
3
  import { replaceRaf } from 'raf-stub';
4
4
 
5
5
  import { createEditorFactory } from '@atlaskit/editor-test-helpers/create-editor';
6
- import tablePlugin from '../../../../table';
6
+ import tablePlugin from '../../../plugins/table-plugin';
7
7
  import {
8
8
  doc,
9
9
  p,
@@ -19,26 +19,26 @@ import { findTable, selectTable } from '@atlaskit/editor-tables/utils';
19
19
  import {
20
20
  TableCssClassName as ClassName,
21
21
  TablePluginState,
22
- } from '../../../types';
23
- import TableComponent from '../../../nodeviews/TableComponent';
24
- import { OverflowShadowsObserver } from '../../../nodeviews/OverflowShadowsObserver';
25
- import { pluginKey } from '../../../pm-plugins/plugin-key';
22
+ } from '../../../plugins/table/types';
23
+ import TableComponent from '../../../plugins/table/nodeviews/TableComponent';
24
+ import { OverflowShadowsObserver } from '../../../plugins/table/nodeviews/OverflowShadowsObserver';
25
+ import { pluginKey } from '../../../plugins/table/pm-plugins/plugin-key';
26
26
  import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
27
- import { toggleNumberColumn } from '../../../commands';
27
+ import { toggleNumberColumn } from '../../../plugins/table/commands';
28
28
  import {
29
29
  pluginKey as stickyHeadersPluginKey,
30
30
  StickyPluginState,
31
- } from '../../../pm-plugins/sticky-headers';
32
- import { tablesHaveDifferentColumnWidths } from '../../../utils/nodes';
31
+ } from '../../../plugins/table/pm-plugins/sticky-headers';
32
+ import { tablesHaveDifferentColumnWidths } from '../../../plugins/table/utils/nodes';
33
33
 
34
- jest.mock('../../../utils/nodes', () =>
35
- Object.assign({}, jest.requireActual('../../../utils/nodes'), {
34
+ jest.mock('../../../plugins/table/utils/nodes', () =>
35
+ Object.assign({}, jest.requireActual('../../../plugins/table/utils/nodes'), {
36
36
  tablesHaveDifferentColumnWidths: jest.fn(),
37
37
  }),
38
38
  );
39
39
 
40
40
  // with this jest will load mocked class from the relative __mocks__ folder
41
- jest.mock('../../../nodeviews/OverflowShadowsObserver');
41
+ jest.mock('../../../plugins/table/nodeviews/OverflowShadowsObserver');
42
42
 
43
43
  replaceRaf();
44
44
  const requestAnimationFrame = window.requestAnimationFrame as any;
@@ -11,14 +11,14 @@ import {
11
11
  DocBuilder,
12
12
  } from '@atlaskit/editor-test-helpers/doc-builder';
13
13
  import { TableAttributes } from '@atlaskit/adf-schema';
14
- import { TablePluginState } from '../../../../../plugins/table/types';
15
- import { pluginKey } from '../../../../../plugins/table/pm-plugins/plugin-key';
16
- import tablePlugin from '../../../../../plugins/table';
17
- import TableView from '../../../../../plugins/table/nodeviews/table';
14
+ import { TablePluginState } from '../../../plugins/table/types';
15
+ import { pluginKey } from '../../../plugins/table/pm-plugins/plugin-key';
16
+ import tablePlugin from '../../../plugins/table';
17
+ import TableView from '../../../plugins/table/nodeviews/table';
18
18
  import defaultSchema from '@atlaskit/editor-test-helpers/schema';
19
19
  import type { EditorProps } from '@atlaskit/editor-core';
20
20
  import { EditorView } from 'prosemirror-view';
21
- import { hoverRows } from '../../../commands';
21
+ import { hoverRows } from '../../../plugins/table/commands';
22
22
 
23
23
  describe('table -> nodeviews -> table.tsx', () => {
24
24
  const createEditor = createEditorFactory<TablePluginState>();
@@ -9,8 +9,8 @@ import {
9
9
  } from '@atlaskit/editor-test-helpers/doc-builder';
10
10
  import { createEditorState } from '@atlaskit/editor-test-helpers/create-editor-state';
11
11
 
12
- import { buildColumnControlsDecorations } from '../../../../pm-plugins/decorations/utils';
13
- import { TableDecorations } from '../../../../types';
12
+ import { buildColumnControlsDecorations } from '../../../../plugins/table/pm-plugins/decorations/utils';
13
+ import { TableDecorations } from '../../../../plugins/table/types';
14
14
 
15
15
  describe('tables: column controls decorations', () => {
16
16
  describe('#buildColumnControlsDecorations', () => {
@@ -20,15 +20,18 @@ import {
20
20
  DocBuilder,
21
21
  } from '@atlaskit/editor-test-helpers/doc-builder';
22
22
 
23
- import tablePlugin from '../../../../../table';
23
+ import tablePlugin from '../../../../plugins/table';
24
24
  import {
25
25
  hideResizeHandleLine,
26
26
  showResizeHandleLine,
27
- } from '../../../../commands/hover';
28
- import { getDecorations } from '../../../../pm-plugins/decorations/plugin';
29
- import { buildColumnResizingDecorations } from '../../../../pm-plugins/decorations/utils';
30
- import { pluginKey } from '../../../../pm-plugins/plugin-key';
31
- import { TableDecorations, TablePluginState } from '../../../../types';
27
+ } from '../../../../plugins/table/commands/hover';
28
+ import { getDecorations } from '../../../../plugins/table/pm-plugins/decorations/plugin';
29
+ import { buildColumnResizingDecorations } from '../../../../plugins/table/pm-plugins/decorations/utils';
30
+ import { pluginKey } from '../../../../plugins/table/pm-plugins/plugin-key';
31
+ import {
32
+ TableDecorations,
33
+ TablePluginState,
34
+ } from '../../../../plugins/table/types';
32
35
 
33
36
  describe('tables: column resizing decorations', () => {
34
37
  const createEditor = createProsemirrorEditorFactory();
@@ -16,14 +16,14 @@ import {
16
16
  DocBuilder,
17
17
  } from '@atlaskit/editor-test-helpers/doc-builder';
18
18
 
19
- import { selectColumn } from '../../../../commands';
19
+ import { selectColumn } from '../../../../plugins/table/commands';
20
20
  import {
21
21
  getDecorations,
22
22
  handleDocOrSelectionChanged,
23
- } from '../../../../pm-plugins/decorations/plugin';
24
- import { pluginKey } from '../../../../pm-plugins/plugin-key';
25
- import { TableDecorations } from '../../../../types';
26
- import tablePlugin from '../../../../../table';
23
+ } from '../../../../plugins/table/pm-plugins/decorations/plugin';
24
+ import { pluginKey } from '../../../../plugins/table/pm-plugins/plugin-key';
25
+ import { TableDecorations } from '../../../../plugins/table/types';
26
+ import tablePlugin from '../../../../plugins/table';
27
27
 
28
28
  describe('decorations plugin', () => {
29
29
  const createEditor = createProsemirrorEditorFactory();
@@ -15,10 +15,10 @@ import {
15
15
  DocBuilder,
16
16
  } from '@atlaskit/editor-test-helpers/doc-builder';
17
17
 
18
- import tablePlugin from '../../../../table';
19
- import { pluginKey } from '../../../pm-plugins/plugin-key';
20
- import { TablePluginState } from '../../../types';
21
- import { handleDocOrSelectionChanged } from '../../../handlers';
18
+ import tablePlugin from '../../../plugins/table';
19
+ import { pluginKey } from '../../../plugins/table/pm-plugins/plugin-key';
20
+ import { TablePluginState } from '../../../plugins/table/types';
21
+ import { handleDocOrSelectionChanged } from '../../../plugins/table/handlers';
22
22
  import expandPlugin from '@atlaskit/editor-core/src/plugins/expand';
23
23
  import extensionPlugin from '@atlaskit/editor-core/src/plugins/extension';
24
24