@atlaskit/editor-plugin-table 1.3.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (293) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/commands/package.json +2 -2
  3. package/dist/cjs/plugins/table/commands/misc.js +1 -2
  4. package/dist/cjs/plugins/table/index.js +25 -34
  5. package/dist/cjs/plugins/table/transforms/column-width.js +0 -17
  6. package/dist/cjs/plugins/table/transforms/delete-columns.js +4 -13
  7. package/dist/cjs/plugins/table/transforms/delete-rows.js +4 -13
  8. package/dist/cjs/plugins/table/transforms/fix-tables.js +6 -24
  9. package/dist/cjs/plugins/table/transforms/index.js +0 -13
  10. package/dist/cjs/plugins/table/transforms/merge.js +5 -20
  11. package/dist/cjs/version.json +1 -1
  12. package/dist/es2019/plugins/table/commands/misc.js +2 -3
  13. package/dist/es2019/plugins/table/index.js +21 -33
  14. package/dist/es2019/plugins/table/transforms/column-width.js +0 -17
  15. package/dist/es2019/plugins/table/transforms/delete-columns.js +4 -13
  16. package/dist/es2019/plugins/table/transforms/delete-rows.js +4 -13
  17. package/dist/es2019/plugins/table/transforms/fix-tables.js +0 -14
  18. package/dist/es2019/plugins/table/transforms/index.js +1 -2
  19. package/dist/es2019/plugins/table/transforms/merge.js +5 -21
  20. package/dist/es2019/version.json +1 -1
  21. package/dist/esm/plugins/table/commands/misc.js +2 -3
  22. package/dist/esm/plugins/table/index.js +25 -34
  23. package/dist/esm/plugins/table/transforms/column-width.js +0 -17
  24. package/dist/esm/plugins/table/transforms/delete-columns.js +4 -13
  25. package/dist/esm/plugins/table/transforms/delete-rows.js +4 -13
  26. package/dist/esm/plugins/table/transforms/fix-tables.js +0 -17
  27. package/dist/esm/plugins/table/transforms/index.js +1 -2
  28. package/dist/esm/plugins/table/transforms/merge.js +5 -21
  29. package/dist/esm/version.json +1 -1
  30. package/dist/types/i18n/cs.d.ts +6 -6
  31. package/dist/types/i18n/da.d.ts +6 -6
  32. package/dist/types/i18n/de.d.ts +6 -6
  33. package/dist/types/i18n/en.d.ts +6 -6
  34. package/dist/types/i18n/en_GB.d.ts +6 -6
  35. package/dist/types/i18n/es.d.ts +6 -6
  36. package/dist/types/i18n/fi.d.ts +6 -6
  37. package/dist/types/i18n/fr.d.ts +6 -6
  38. package/dist/types/i18n/hu.d.ts +6 -6
  39. package/dist/types/i18n/it.d.ts +6 -6
  40. package/dist/types/i18n/ja.d.ts +6 -6
  41. package/dist/types/i18n/ko.d.ts +6 -6
  42. package/dist/types/i18n/nb.d.ts +6 -6
  43. package/dist/types/i18n/nl.d.ts +6 -6
  44. package/dist/types/i18n/pl.d.ts +6 -6
  45. package/dist/types/i18n/pt_BR.d.ts +6 -6
  46. package/dist/types/i18n/ru.d.ts +6 -6
  47. package/dist/types/i18n/sv.d.ts +6 -6
  48. package/dist/types/i18n/th.d.ts +6 -6
  49. package/dist/types/i18n/tr.d.ts +6 -6
  50. package/dist/types/i18n/uk.d.ts +6 -6
  51. package/dist/types/i18n/vi.d.ts +6 -6
  52. package/dist/types/i18n/zh.d.ts +6 -6
  53. package/dist/types/i18n/zh_TW.d.ts +6 -6
  54. package/dist/types/plugins/table/commands/clear.d.ts +1 -1
  55. package/dist/types/plugins/table/commands/hover.d.ts +3 -3
  56. package/dist/types/plugins/table/commands/misc.d.ts +4 -4
  57. package/dist/types/plugins/table/commands-with-analytics.d.ts +2 -2
  58. package/dist/types/plugins/table/event-handlers.d.ts +3 -3
  59. package/dist/types/plugins/table/index.d.ts +9 -0
  60. package/dist/types/plugins/table/nodeviews/OverflowShadowsObserver.d.ts +2 -2
  61. package/dist/types/plugins/table/nodeviews/table.d.ts +1 -1
  62. package/dist/types/plugins/table/nodeviews/types.d.ts +1 -1
  63. package/dist/types/plugins/table/nodeviews/update-overflow-shadows.d.ts +1 -1
  64. package/dist/types/plugins/table/pm-plugins/decorations/utils/types.d.ts +1 -1
  65. package/dist/types/plugins/table/pm-plugins/main.d.ts +1 -1
  66. package/dist/types/plugins/table/pm-plugins/sticky-headers/nodeviews/dom.d.ts +1 -1
  67. package/dist/types/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.d.ts +1 -1
  68. package/dist/types/plugins/table/pm-plugins/sticky-headers/types.d.ts +5 -5
  69. package/dist/types/plugins/table/pm-plugins/table-resizing/commands.d.ts +2 -2
  70. package/dist/types/plugins/table/pm-plugins/table-resizing/event-handlers.d.ts +1 -1
  71. package/dist/types/plugins/table/pm-plugins/table-resizing/utils/colgroup.d.ts +1 -1
  72. package/dist/types/plugins/table/pm-plugins/table-resizing/utils/dom.d.ts +1 -1
  73. package/dist/types/plugins/table/pm-plugins/table-resizing/utils/resize-column.d.ts +1 -1
  74. package/dist/types/plugins/table/pm-plugins/table-resizing/utils/resize-logic.d.ts +2 -2
  75. package/dist/types/plugins/table/transforms/fix-tables.d.ts +2 -3
  76. package/dist/types/plugins/table/transforms/index.d.ts +1 -2
  77. package/dist/types/plugins/table/transforms/replace-table.d.ts +1 -1
  78. package/dist/types/plugins/table/types.d.ts +11 -11
  79. package/dist/types/plugins/table/ui/FloatingDeleteButton/types.d.ts +1 -1
  80. package/dist/types/plugins/table/ui/ui-styles.d.ts +2 -2
  81. package/dist/types/plugins/table/utils/column-controls.d.ts +1 -1
  82. package/dist/types/plugins/table/utils/decoration.d.ts +1 -1
  83. package/dist/types/plugins/table/utils/dom.d.ts +2 -2
  84. package/dist/types/plugins/table/utils/row-controls.d.ts +1 -1
  85. package/dist/types/plugins/table/utils/selection.d.ts +1 -1
  86. package/dist/types-ts4.5/i18n/cs.d.ts +35 -0
  87. package/dist/types-ts4.5/i18n/da.d.ts +33 -0
  88. package/dist/types-ts4.5/i18n/de.d.ts +33 -0
  89. package/dist/types-ts4.5/i18n/en.d.ts +35 -0
  90. package/dist/types-ts4.5/i18n/en_GB.d.ts +35 -0
  91. package/dist/types-ts4.5/i18n/es.d.ts +33 -0
  92. package/dist/types-ts4.5/i18n/fi.d.ts +33 -0
  93. package/dist/types-ts4.5/i18n/fr.d.ts +35 -0
  94. package/dist/types-ts4.5/i18n/hu.d.ts +35 -0
  95. package/dist/types-ts4.5/i18n/it.d.ts +35 -0
  96. package/dist/types-ts4.5/i18n/ja.d.ts +35 -0
  97. package/dist/types-ts4.5/i18n/ko.d.ts +33 -0
  98. package/dist/types-ts4.5/i18n/nb.d.ts +33 -0
  99. package/dist/types-ts4.5/i18n/nl.d.ts +35 -0
  100. package/dist/types-ts4.5/i18n/pl.d.ts +35 -0
  101. package/dist/types-ts4.5/i18n/pt_BR.d.ts +35 -0
  102. package/dist/types-ts4.5/i18n/ru.d.ts +35 -0
  103. package/dist/types-ts4.5/i18n/sv.d.ts +33 -0
  104. package/dist/types-ts4.5/i18n/th.d.ts +33 -0
  105. package/dist/types-ts4.5/i18n/tr.d.ts +35 -0
  106. package/dist/types-ts4.5/i18n/uk.d.ts +35 -0
  107. package/dist/types-ts4.5/i18n/vi.d.ts +33 -0
  108. package/dist/types-ts4.5/i18n/zh.d.ts +35 -0
  109. package/dist/types-ts4.5/i18n/zh_TW.d.ts +35 -0
  110. package/dist/types-ts4.5/index.d.ts +1 -0
  111. package/dist/types-ts4.5/plugins/table/commands/clear.d.ts +3 -0
  112. package/dist/types-ts4.5/plugins/table/commands/collapse.d.ts +2 -0
  113. package/dist/types-ts4.5/plugins/table/commands/go-to-next-cell.d.ts +4 -0
  114. package/dist/types-ts4.5/plugins/table/commands/hover.d.ts +8 -0
  115. package/dist/types-ts4.5/plugins/table/commands/index.d.ts +8 -0
  116. package/dist/types-ts4.5/plugins/table/commands/insert.d.ts +10 -0
  117. package/dist/types-ts4.5/plugins/table/commands/misc.d.ts +27 -0
  118. package/dist/types-ts4.5/plugins/table/commands/referentiality.d.ts +2 -0
  119. package/dist/types-ts4.5/plugins/table/commands/selection.d.ts +8 -0
  120. package/dist/types-ts4.5/plugins/table/commands/sort.d.ts +3 -0
  121. package/dist/types-ts4.5/plugins/table/commands/split-cell.d.ts +6 -0
  122. package/dist/types-ts4.5/plugins/table/commands/toggle.d.ts +12 -0
  123. package/dist/types-ts4.5/plugins/table/commands-with-analytics.d.ts +26 -0
  124. package/dist/types-ts4.5/plugins/table/create-plugin-config.d.ts +2 -0
  125. package/dist/types-ts4.5/plugins/table/event-handlers.d.ts +16 -0
  126. package/dist/types-ts4.5/plugins/table/handlers.d.ts +3 -0
  127. package/dist/types-ts4.5/plugins/table/index.d.ts +30 -0
  128. package/dist/types-ts4.5/plugins/table/nodeviews/OverflowShadowsObserver.d.ts +25 -0
  129. package/dist/types-ts4.5/plugins/table/nodeviews/TableComponent.d.ts +73 -0
  130. package/dist/types-ts4.5/plugins/table/nodeviews/__mocks__/OverflowShadowsObserver.d.ts +9 -0
  131. package/dist/types-ts4.5/plugins/table/nodeviews/__mocks__/OverridableMock.d.ts +9 -0
  132. package/dist/types-ts4.5/plugins/table/nodeviews/table.d.ts +34 -0
  133. package/dist/types-ts4.5/plugins/table/nodeviews/tableCell.d.ts +19 -0
  134. package/dist/types-ts4.5/plugins/table/nodeviews/types.d.ts +24 -0
  135. package/dist/types-ts4.5/plugins/table/nodeviews/update-overflow-shadows.d.ts +8 -0
  136. package/dist/types-ts4.5/plugins/table/pm-plugins/decorations/plugin.d.ts +7 -0
  137. package/dist/types-ts4.5/plugins/table/pm-plugins/decorations/utils/column-controls.d.ts +3 -0
  138. package/dist/types-ts4.5/plugins/table/pm-plugins/decorations/utils/column-resizing.d.ts +2 -0
  139. package/dist/types-ts4.5/plugins/table/pm-plugins/decorations/utils/compose-decorations.d.ts +2 -0
  140. package/dist/types-ts4.5/plugins/table/pm-plugins/decorations/utils/index.d.ts +3 -0
  141. package/dist/types-ts4.5/plugins/table/pm-plugins/decorations/utils/types.d.ts +6 -0
  142. package/dist/types-ts4.5/plugins/table/pm-plugins/default-table-selection.d.ts +4 -0
  143. package/dist/types-ts4.5/plugins/table/pm-plugins/keymap.d.ts +5 -0
  144. package/dist/types-ts4.5/plugins/table/pm-plugins/main.d.ts +8 -0
  145. package/dist/types-ts4.5/plugins/table/pm-plugins/plugin-factory.d.ts +1 -0
  146. package/dist/types-ts4.5/plugins/table/pm-plugins/plugin-key.d.ts +3 -0
  147. package/dist/types-ts4.5/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.d.ts +15 -0
  148. package/dist/types-ts4.5/plugins/table/pm-plugins/sticky-headers/commands.d.ts +3 -0
  149. package/dist/types-ts4.5/plugins/table/pm-plugins/sticky-headers/index.d.ts +6 -0
  150. package/dist/types-ts4.5/plugins/table/pm-plugins/sticky-headers/nodeviews/dom.d.ts +6 -0
  151. package/dist/types-ts4.5/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.d.ts +72 -0
  152. package/dist/types-ts4.5/plugins/table/pm-plugins/sticky-headers/plugin-key.d.ts +3 -0
  153. package/dist/types-ts4.5/plugins/table/pm-plugins/sticky-headers/plugin-state.d.ts +3 -0
  154. package/dist/types-ts4.5/plugins/table/pm-plugins/sticky-headers/plugin.d.ts +4 -0
  155. package/dist/types-ts4.5/plugins/table/pm-plugins/sticky-headers/types.d.ts +16 -0
  156. package/dist/types-ts4.5/plugins/table/pm-plugins/sticky-headers/util.d.ts +2 -0
  157. package/dist/types-ts4.5/plugins/table/pm-plugins/table-local-id.d.ts +22 -0
  158. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/commands.d.ts +25 -0
  159. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/event-handlers.d.ts +4 -0
  160. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/index.d.ts +4 -0
  161. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/plugin-factory.d.ts +4 -0
  162. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/plugin-key.d.ts +3 -0
  163. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/plugin.d.ts +6 -0
  164. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/reducer.d.ts +3 -0
  165. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/colgroup.d.ts +15 -0
  166. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/column-state.d.ts +14 -0
  167. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/content-width.d.ts +4 -0
  168. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/dom.d.ts +13 -0
  169. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/index.d.ts +12 -0
  170. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/misc.d.ts +22 -0
  171. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/resize-column.d.ts +2 -0
  172. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/resize-logic.d.ts +4 -0
  173. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/resize-state.d.ts +29 -0
  174. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/scale-table.d.ts +17 -0
  175. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/types.d.ts +22 -0
  176. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/unit-to-number.d.ts +1 -0
  177. package/dist/types-ts4.5/plugins/table/pm-plugins/table-selection-keymap.d.ts +4 -0
  178. package/dist/types-ts4.5/plugins/table/reducer.d.ts +3 -0
  179. package/dist/types-ts4.5/plugins/table/toolbar.d.ts +37 -0
  180. package/dist/types-ts4.5/plugins/table/transforms/column-width.d.ts +18 -0
  181. package/dist/types-ts4.5/plugins/table/transforms/delete-columns.d.ts +3 -0
  182. package/dist/types-ts4.5/plugins/table/transforms/delete-rows.d.ts +3 -0
  183. package/dist/types-ts4.5/plugins/table/transforms/fix-tables.d.ts +9 -0
  184. package/dist/types-ts4.5/plugins/table/transforms/index.d.ts +6 -0
  185. package/dist/types-ts4.5/plugins/table/transforms/merge.d.ts +5 -0
  186. package/dist/types-ts4.5/plugins/table/transforms/replace-table.d.ts +5 -0
  187. package/dist/types-ts4.5/plugins/table/transforms/split.d.ts +9 -0
  188. package/dist/types-ts4.5/plugins/table/types.d.ts +332 -0
  189. package/dist/types-ts4.5/plugins/table/ui/FloatingContextualButton/index.d.ts +29 -0
  190. package/dist/types-ts4.5/plugins/table/ui/FloatingContextualButton/styles.d.ts +3 -0
  191. package/dist/types-ts4.5/plugins/table/ui/FloatingContextualMenu/ContextualMenu.d.ts +88 -0
  192. package/dist/types-ts4.5/plugins/table/ui/FloatingContextualMenu/index.d.ts +23 -0
  193. package/dist/types-ts4.5/plugins/table/ui/FloatingContextualMenu/styles.d.ts +2 -0
  194. package/dist/types-ts4.5/plugins/table/ui/FloatingDeleteButton/DeleteButton.d.ts +14 -0
  195. package/dist/types-ts4.5/plugins/table/ui/FloatingDeleteButton/getPopUpOptions.d.ts +10 -0
  196. package/dist/types-ts4.5/plugins/table/ui/FloatingDeleteButton/index.d.ts +54 -0
  197. package/dist/types-ts4.5/plugins/table/ui/FloatingDeleteButton/types.d.ts +1 -0
  198. package/dist/types-ts4.5/plugins/table/ui/FloatingInsertButton/InsertButton.d.ts +12 -0
  199. package/dist/types-ts4.5/plugins/table/ui/FloatingInsertButton/getPopupOptions.d.ts +3 -0
  200. package/dist/types-ts4.5/plugins/table/ui/FloatingInsertButton/index.d.ts +35 -0
  201. package/dist/types-ts4.5/plugins/table/ui/LayoutButton/index.d.ts +21 -0
  202. package/dist/types-ts4.5/plugins/table/ui/TableFloatingControls/CornerControls/index.d.ts +16 -0
  203. package/dist/types-ts4.5/plugins/table/ui/TableFloatingControls/NumberColumn/index.d.ts +21 -0
  204. package/dist/types-ts4.5/plugins/table/ui/TableFloatingControls/RowControls/index.d.ts +17 -0
  205. package/dist/types-ts4.5/plugins/table/ui/TableFloatingControls/index.d.ts +40 -0
  206. package/dist/types-ts4.5/plugins/table/ui/common-styles.d.ts +8 -0
  207. package/dist/types-ts4.5/plugins/table/ui/consts.d.ts +39 -0
  208. package/dist/types-ts4.5/plugins/table/ui/messages.d.ts +58 -0
  209. package/dist/types-ts4.5/plugins/table/ui/ui-styles.d.ts +15 -0
  210. package/dist/types-ts4.5/plugins/table/utils/analytics.d.ts +18 -0
  211. package/dist/types-ts4.5/plugins/table/utils/collapse.d.ts +29 -0
  212. package/dist/types-ts4.5/plugins/table/utils/column-controls.d.ts +10 -0
  213. package/dist/types-ts4.5/plugins/table/utils/decoration.d.ts +16 -0
  214. package/dist/types-ts4.5/plugins/table/utils/dom.d.ts +20 -0
  215. package/dist/types-ts4.5/plugins/table/utils/get-allow-add-column-custom-step.d.ts +2 -0
  216. package/dist/types-ts4.5/plugins/table/utils/index.d.ts +11 -0
  217. package/dist/types-ts4.5/plugins/table/utils/nodes.d.ts +12 -0
  218. package/dist/types-ts4.5/plugins/table/utils/paste.d.ts +14 -0
  219. package/dist/types-ts4.5/plugins/table/utils/row-controls.d.ts +16 -0
  220. package/dist/types-ts4.5/plugins/table/utils/selection.d.ts +6 -0
  221. package/dist/types-ts4.5/plugins/table/utils/table.d.ts +4 -0
  222. package/dist/types-ts4.5/plugins/table/utils/update-plugin-state-decorations.d.ts +4 -0
  223. package/dist/types-ts4.5/plugins/table-plugin.d.ts +2 -0
  224. package/dist/types-ts4.5/types/i18n.d.ts +5 -0
  225. package/examples/99-testing.tsx +4 -94
  226. package/package.json +19 -9
  227. package/plugin-key/package.json +2 -2
  228. package/report.api.md +11 -0
  229. package/src/__tests__/unit/analytics.ts +6 -0
  230. package/src/__tests__/unit/collab.ts +6 -0
  231. package/src/__tests__/unit/color-picker.ts +4 -0
  232. package/src/__tests__/unit/commands/go-to-next-cell.ts +8 -1
  233. package/src/__tests__/unit/commands/insert.ts +6 -0
  234. package/src/__tests__/unit/commands/misc.ts +14 -6
  235. package/src/__tests__/unit/commands/sort.ts +19 -12
  236. package/src/__tests__/unit/commands.ts +10 -2
  237. package/src/__tests__/unit/copy-paste.ts +6 -0
  238. package/src/__tests__/unit/event-handlers/index.ts +13 -8
  239. package/src/__tests__/unit/event-handlers.ts +13 -1
  240. package/src/__tests__/unit/fix-tables.ts +8 -4
  241. package/src/__tests__/unit/get-toolbar-config.ts +4 -0
  242. package/src/__tests__/unit/handlers.ts +8 -1
  243. package/src/__tests__/unit/hover-selection.ts +8 -1
  244. package/src/__tests__/unit/index.ts +10 -2
  245. package/src/__tests__/unit/keymap.ts +10 -4
  246. package/src/__tests__/unit/layout.ts +4 -0
  247. package/src/__tests__/unit/nodeviews/cell.ts +6 -0
  248. package/src/__tests__/unit/nodeviews/table.ts +16 -9
  249. package/src/__tests__/unit/pm-plugins/decorations/column-resizing.ts +14 -4
  250. package/src/__tests__/unit/pm-plugins/decorations/plugin.ts +8 -1
  251. package/src/__tests__/unit/pm-plugins/main-with-allow-collapse.ts +4 -0
  252. package/src/__tests__/unit/pm-plugins/main.ts +6 -0
  253. package/src/__tests__/unit/pm-plugins/safari-delete-composition-text-issue-workaround.ts +8 -4
  254. package/src/__tests__/unit/pm-plugins/sticky-headers/tableRow.tsx +13 -4
  255. package/src/__tests__/unit/pm-plugins/table-resizing/event-handlers.ts +6 -0
  256. package/src/__tests__/unit/pm-plugins/table-selection-keymap.ts +6 -0
  257. package/src/__tests__/unit/sort-column.ts +6 -0
  258. package/src/__tests__/unit/toolbar.ts +16 -9
  259. package/src/__tests__/unit/transforms/delete-columns.ts +8 -1
  260. package/src/__tests__/unit/transforms/delete-rows.ts +8 -1
  261. package/src/__tests__/unit/transforms/merging.ts +8 -1
  262. package/src/__tests__/unit/ui/ContextualMenu.tsx +8 -4
  263. package/src/__tests__/unit/ui/CornerControls.tsx +8 -1
  264. package/src/__tests__/unit/ui/FloatingContextualButton.tsx +8 -1
  265. package/src/__tests__/unit/ui/FloatingContextualMenu.tsx +8 -1
  266. package/src/__tests__/unit/ui/RowControls.tsx +8 -1
  267. package/src/__tests__/unit/ui/TableFloatingControls.tsx +8 -1
  268. package/src/__tests__/unit/undo-redo.ts +6 -0
  269. package/src/__tests__/unit/utils/collapse.ts +4 -0
  270. package/src/__tests__/unit/utils/nodes.ts +8 -1
  271. package/src/__tests__/unit/utils/row-controls.ts +8 -1
  272. package/src/__tests__/unit/utils.ts +8 -1
  273. package/src/plugins/table/commands/misc.ts +2 -4
  274. package/src/plugins/table/index.tsx +39 -40
  275. package/src/plugins/table/transforms/column-width.ts +0 -11
  276. package/src/plugins/table/transforms/delete-columns.ts +4 -5
  277. package/src/plugins/table/transforms/delete-rows.ts +4 -7
  278. package/src/plugins/table/transforms/fix-tables.ts +0 -17
  279. package/src/plugins/table/transforms/index.ts +1 -2
  280. package/src/plugins/table/transforms/merge.ts +9 -20
  281. package/types/package.json +2 -2
  282. package/ui/common-styles/package.json +2 -2
  283. package/ui/consts/package.json +2 -2
  284. package/dist/cjs/plugins/table/pm-plugins/safari-delayed-dom-selection-syncing-workaround.js +0 -79
  285. package/dist/cjs/plugins/table/transforms/metadata.js +0 -20
  286. package/dist/es2019/plugins/table/pm-plugins/safari-delayed-dom-selection-syncing-workaround.js +0 -71
  287. package/dist/es2019/plugins/table/transforms/metadata.js +0 -12
  288. package/dist/esm/plugins/table/pm-plugins/safari-delayed-dom-selection-syncing-workaround.js +0 -71
  289. package/dist/esm/plugins/table/transforms/metadata.js +0 -14
  290. package/dist/types/plugins/table/pm-plugins/safari-delayed-dom-selection-syncing-workaround.d.ts +0 -4
  291. package/dist/types/plugins/table/transforms/metadata.d.ts +0 -21
  292. package/src/plugins/table/pm-plugins/safari-delayed-dom-selection-syncing-workaround.ts +0 -78
  293. package/src/plugins/table/transforms/metadata.ts +0 -35
@@ -31,10 +31,17 @@ import { pluginKey } from '../../plugins/table/pm-plugins/plugin-key';
31
31
  import { getDecorations } from '../../plugins/table/pm-plugins/decorations/plugin';
32
32
  import tablePlugin from '../../plugins/table-plugin';
33
33
  import { PluginKey } from 'prosemirror-state';
34
+ import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
35
+ import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
36
+ import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
34
37
 
35
38
  describe('table hover selection plugin', () => {
36
39
  const createEditor = createProsemirrorEditorFactory();
37
- const preset = new Preset<LightEditorPlugin>().add(tablePlugin);
40
+ const preset = new Preset<LightEditorPlugin>()
41
+ .add([featureFlagsPlugin, {}])
42
+ .add([analyticsPlugin, {}])
43
+ .add(contentInsertionPlugin)
44
+ .add(tablePlugin);
38
45
 
39
46
  const editor = (doc: DocBuilder) =>
40
47
  createEditor<TablePluginState, PluginKey>({
@@ -53,9 +53,12 @@ import {
53
53
  } from '../../plugins/table/utils';
54
54
  import listPlugin from '@atlaskit/editor-core/src/plugins/list';
55
55
  import textFormattingPlugin from '@atlaskit/editor-core/src/plugins/text-formatting';
56
- import analyticsPlugin from '@atlaskit/editor-core/src/plugins/analytics';
56
+ import deprecatedAnalyticsPlugin from '@atlaskit/editor-core/src/plugins/analytics';
57
+ import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
57
58
  import mediaPlugin from '@atlaskit/editor-core/src/plugins/media';
58
59
  import selectionPlugin from '@atlaskit/editor-core/src/plugins/selection';
60
+ import widthPlugin from '@atlaskit/editor-core/src/plugins/width';
61
+ import gridPlugin from '@atlaskit/editor-core/src/plugins/grid';
59
62
  import { insertMediaAsMediaSingle } from '@atlaskit/editor-core/src/plugins/media/utils/media-single';
60
63
  import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
61
64
  import { getPluginState } from '../../plugins/table/pm-plugins/plugin-factory';
@@ -63,6 +66,7 @@ import { pluginKey } from '../../plugins/table/pm-plugins/plugin-key';
63
66
  import type { GetEditorContainerWidth } from '@atlaskit/editor-common/types';
64
67
  import tablePlugin from '../../plugins/table-plugin';
65
68
  import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
69
+ import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
66
70
 
67
71
  const TABLE_LOCAL_ID = 'test-table-local-id';
68
72
 
@@ -93,9 +97,13 @@ describe('table plugin', () => {
93
97
 
94
98
  const preset = new Preset<LightEditorPlugin>()
95
99
  .add([featureFlagsPlugin, {}])
100
+ .add([analyticsPlugin, {}])
101
+ .add([deprecatedAnalyticsPlugin, {}])
102
+ .add(contentInsertionPlugin)
103
+ .add(widthPlugin)
104
+ .add(gridPlugin)
96
105
  .add([tablePlugin, { tableOptions }])
97
106
  .add([mediaPlugin, { allowMediaSingle: true }])
98
- .add([analyticsPlugin, {}])
99
107
  .add(textFormattingPlugin)
100
108
  .add(listPlugin)
101
109
  .add(selectionPlugin);
@@ -36,12 +36,14 @@ import {
36
36
  import { uuid } from '@atlaskit/adf-schema';
37
37
  import { uuid as tablesUuid } from '@atlaskit/editor-tables';
38
38
 
39
+ import gridPlugin from '@atlaskit/editor-core/src/plugins/grid';
39
40
  import panelPlugin from '@atlaskit/editor-core/src/plugins/panel';
40
41
  import expandPlugin from '@atlaskit/editor-core/src/plugins/expand';
41
42
  import tasksDecisionsPlugin from '@atlaskit/editor-core/src/plugins/tasks-and-decisions';
42
43
  import selectionPlugin from '@atlaskit/editor-core/src/plugins/selection';
43
44
  import mediaPlugin from '@atlaskit/editor-core/src/plugins/media';
44
- import analyticsPlugin from '@atlaskit/editor-core/src/plugins/analytics';
45
+ import deprecatedAnalyticsPlugin from '@atlaskit/editor-core/src/plugins/analytics';
46
+ import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
45
47
  import listPlugin from '@atlaskit/editor-core/src/plugins/list';
46
48
  import blockTypePlugin from '@atlaskit/editor-core/src/plugins/block-type';
47
49
  import codeBlockPlugin from '@atlaskit/editor-core/src/plugins/code-block';
@@ -59,6 +61,7 @@ import { pluginKey } from '../../plugins/table/pm-plugins/plugin-key';
59
61
  import widthPlugin from '@atlaskit/editor-core/src/plugins/width';
60
62
  import editorDisabledPlugin from '@atlaskit/editor-core/src/plugins/editor-disabled';
61
63
  import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
64
+ import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
62
65
 
63
66
  const TABLE_LOCAL_ID = 'test-table-local-id';
64
67
 
@@ -83,6 +86,11 @@ describe('table keymap', () => {
83
86
  const createEditor = createProsemirrorEditorFactory();
84
87
  const preset = new Preset<LightEditorPlugin>()
85
88
  .add([featureFlagsPlugin, {}])
89
+ .add([analyticsPlugin, { createAnalyticsEvent }])
90
+ .add([deprecatedAnalyticsPlugin, { createAnalyticsEvent }])
91
+ .add(contentInsertionPlugin)
92
+ .add(widthPlugin)
93
+ .add(gridPlugin)
86
94
  .add(selectionPlugin)
87
95
  .add([
88
96
  tablePlugin,
@@ -103,9 +111,7 @@ describe('table keymap', () => {
103
111
  .add(datePlugin)
104
112
  .add(layoutPlugin)
105
113
  .add([statusPlugin, { menuDisabled: false }])
106
- .add([mediaPlugin, { allowMediaSingle: true }])
107
- .add([analyticsPlugin, { createAnalyticsEvent }])
108
- .add(widthPlugin);
114
+ .add([mediaPlugin, { allowMediaSingle: true }]);
109
115
 
110
116
  const editor = (doc: DocBuilder) =>
111
117
  createEditor<TablePluginState, PluginKey>({
@@ -36,6 +36,8 @@ import extensionPlugin from '@atlaskit/editor-core/src/plugins/extension';
36
36
  import layoutPlugin from '@atlaskit/editor-core/src/plugins/layout';
37
37
  import { PluginKey } from 'prosemirror-state';
38
38
  import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
39
+ import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
40
+ import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
39
41
 
40
42
  describe('table toolbar', () => {
41
43
  const tableOptions = {
@@ -48,6 +50,8 @@ describe('table toolbar', () => {
48
50
  const createEditor = createProsemirrorEditorFactory();
49
51
  const preset = new Preset<LightEditorPlugin>()
50
52
  .add([featureFlagsPlugin, {}])
53
+ .add([analyticsPlugin, {}])
54
+ .add(contentInsertionPlugin)
51
55
  .add([tablePlugin, { tableOptions }])
52
56
  .add(expandPlugin)
53
57
  .add(extensionPlugin)
@@ -31,6 +31,9 @@ import sendKeyToPm from '@atlaskit/editor-test-helpers/send-key-to-pm';
31
31
  import * as domHelpers from '../../../plugins/table/pm-plugins/sticky-headers/nodeviews/dom';
32
32
  import tablePlugin from '../../../plugins/table-plugin';
33
33
  import undoRedoPlugin from '@atlaskit/editor-core/src/plugins/undo-redo';
34
+ import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
35
+ import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
36
+ import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
34
37
 
35
38
  jest.mock('@atlaskit/editor-common/utils', () => ({
36
39
  ...jest.requireActual<Object>('@atlaskit/editor-common/utils'),
@@ -62,6 +65,9 @@ describe('table -> nodeviews -> tableCell.tsx', () => {
62
65
  doc,
63
66
  attachTo: document.body,
64
67
  preset: new Preset<LightEditorPlugin>()
68
+ .add([featureFlagsPlugin, {}])
69
+ .add([analyticsPlugin, {}])
70
+ .add(contentInsertionPlugin)
65
71
  .add([tablePlugin, { tableOptions: { advanced: true, ...props } }])
66
72
  .add(undoRedoPlugin),
67
73
  pluginKey,
@@ -21,6 +21,9 @@ import TableView from '../../../plugins/table/nodeviews/table';
21
21
  import defaultSchema from '@atlaskit/editor-test-helpers/schema';
22
22
  import { EditorView } from 'prosemirror-view';
23
23
  import { hoverRows } from '../../../plugins/table/commands';
24
+ import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
25
+ import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
26
+ import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
24
27
 
25
28
  describe('table -> nodeviews -> table.tsx', () => {
26
29
  const createEditor = createProsemirrorEditorFactory();
@@ -34,15 +37,19 @@ describe('table -> nodeviews -> table.tsx', () => {
34
37
  const editor = (doc: DocBuilder) =>
35
38
  createEditor({
36
39
  doc,
37
- preset: new Preset<LightEditorPlugin>().add([
38
- tablePlugin,
39
- {
40
- tableOptions: {},
41
- getEditorFeatureFlags: () => ({
42
- tableRenderOptimization: true,
43
- }),
44
- },
45
- ]),
40
+ preset: new Preset<LightEditorPlugin>()
41
+ .add([featureFlagsPlugin, {}])
42
+ .add([analyticsPlugin, {}])
43
+ .add(contentInsertionPlugin)
44
+ .add([
45
+ tablePlugin,
46
+ {
47
+ tableOptions: {},
48
+ getEditorFeatureFlags: () => ({
49
+ tableRenderOptimization: true,
50
+ }),
51
+ },
52
+ ]),
46
53
  pluginKey,
47
54
  });
48
55
 
@@ -32,6 +32,9 @@ import {
32
32
  TableDecorations,
33
33
  TablePluginState,
34
34
  } from '../../../../plugins/table/types';
35
+ import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
36
+ import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
37
+ import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
35
38
 
36
39
  describe('tables: column resizing decorations', () => {
37
40
  const createEditor = createProsemirrorEditorFactory();
@@ -39,10 +42,17 @@ describe('tables: column resizing decorations', () => {
39
42
  const editor = (doc: DocBuilder) =>
40
43
  createEditor<TablePluginState, PluginKey>({
41
44
  doc,
42
- preset: new Preset<LightEditorPlugin>().add([
43
- tablePlugin,
44
- { tableOptions: { allowColumnResizing: true }, getEditorFeatureFlags },
45
- ]),
45
+ preset: new Preset<LightEditorPlugin>()
46
+ .add([featureFlagsPlugin, {}])
47
+ .add([analyticsPlugin, {}])
48
+ .add(contentInsertionPlugin)
49
+ .add([
50
+ tablePlugin,
51
+ {
52
+ tableOptions: { allowColumnResizing: true },
53
+ getEditorFeatureFlags,
54
+ },
55
+ ]),
46
56
  pluginKey,
47
57
  });
48
58
 
@@ -24,6 +24,9 @@ import {
24
24
  import { pluginKey } from '../../../../plugins/table/pm-plugins/plugin-key';
25
25
  import { TableDecorations } from '../../../../plugins/table/types';
26
26
  import tablePlugin from '../../../../plugins/table';
27
+ import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
28
+ import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
29
+ import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
27
30
 
28
31
  describe('decorations plugin', () => {
29
32
  const createEditor = createProsemirrorEditorFactory();
@@ -31,7 +34,11 @@ describe('decorations plugin', () => {
31
34
  createEditor({
32
35
  doc,
33
36
  attachTo: document.body,
34
- preset: new Preset<LightEditorPlugin>().add(tablePlugin),
37
+ preset: new Preset<LightEditorPlugin>()
38
+ .add([featureFlagsPlugin, {}])
39
+ .add([analyticsPlugin, {}])
40
+ .add(contentInsertionPlugin)
41
+ .add(tablePlugin),
35
42
  pluginKey,
36
43
  });
37
44
 
@@ -22,6 +22,8 @@ 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
  import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
25
+ import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
26
+ import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
25
27
 
26
28
  describe('tables: main plugin with allowCollapse: true', () => {
27
29
  const createEditor = createProsemirrorEditorFactory();
@@ -30,6 +32,8 @@ describe('tables: main plugin with allowCollapse: true', () => {
30
32
  doc,
31
33
  preset: new Preset<LightEditorPlugin>()
32
34
  .add([featureFlagsPlugin, {}])
35
+ .add([analyticsPlugin, {}])
36
+ .add(contentInsertionPlugin)
33
37
  .add(tablePlugin)
34
38
  .add(expandPlugin)
35
39
  .add(extensionPlugin),
@@ -28,6 +28,9 @@ import {
28
28
  toggleHeaderRow,
29
29
  toggleNumberColumn,
30
30
  } from '../../../plugins/table/commands';
31
+ import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
32
+ import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
33
+ import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
31
34
 
32
35
  describe('tables: main plugin', () => {
33
36
  const createEditor = createProsemirrorEditorFactory();
@@ -35,6 +38,9 @@ describe('tables: main plugin', () => {
35
38
  createEditor({
36
39
  doc,
37
40
  preset: new Preset<LightEditorPlugin>()
41
+ .add([featureFlagsPlugin, {}])
42
+ .add([analyticsPlugin, {}])
43
+ .add(contentInsertionPlugin)
38
44
  .add(tablePlugin)
39
45
  .add(textFormattingPlugin),
40
46
  pluginKey,
@@ -13,6 +13,9 @@ import {
13
13
  } from '@atlaskit/editor-test-helpers/doc-builder';
14
14
  import { pluginKey } from '../../../plugins/table/pm-plugins/plugin-key';
15
15
  import tablePlugin from '../../../plugins/table-plugin';
16
+ import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
17
+ import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
18
+ import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
16
19
 
17
20
  describe('table/safari-delete-composition-text-issue-workaround', () => {
18
21
  let editor: any;
@@ -21,10 +24,11 @@ describe('table/safari-delete-composition-text-issue-workaround', () => {
21
24
  editor = (doc: DocBuilder) =>
22
25
  createEditor({
23
26
  doc,
24
- preset: new Preset<LightEditorPlugin>().add([
25
- tablePlugin,
26
- { tableOptions: { allowColumnResizing: true } },
27
- ]),
27
+ preset: new Preset<LightEditorPlugin>()
28
+ .add([featureFlagsPlugin, {}])
29
+ .add([analyticsPlugin, {}])
30
+ .add(contentInsertionPlugin)
31
+ .add([tablePlugin, { tableOptions: { allowColumnResizing: true } }]),
28
32
  pluginKey,
29
33
  });
30
34
  });
@@ -18,7 +18,7 @@ import tablePlugin from '../../../../plugins/table';
18
18
  import { pluginKey } from '../../../../plugins/table/pm-plugins/plugin-key';
19
19
  import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
20
20
  import createStub, { Stub } from 'raf-stub';
21
- import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
21
+
22
22
  jest.mock(
23
23
  '../../../../plugins/table/pm-plugins/sticky-headers/commands',
24
24
  () => ({
@@ -43,6 +43,9 @@ import {
43
43
  stickyRowOffsetTop,
44
44
  tableScrollbarOffset,
45
45
  } from '../../../../plugins/table/ui/consts';
46
+ import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
47
+ import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
48
+ import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
46
49
 
47
50
  describe('TableRowNodeView', () => {
48
51
  let tableRowNodeView: TableRowNodeView;
@@ -54,8 +57,10 @@ describe('TableRowNodeView', () => {
54
57
  return createEditor({
55
58
  doc,
56
59
  preset: new Preset<LightEditorPlugin>()
57
- .add(tablePlugin)
58
- .add([featureFlagsPlugin, featureFlags]),
60
+ .add([featureFlagsPlugin, {}])
61
+ .add([analyticsPlugin, {}])
62
+ .add(contentInsertionPlugin)
63
+ .add(tablePlugin),
59
64
  pluginKey,
60
65
  attachTo: document.body,
61
66
  });
@@ -82,7 +87,11 @@ describe('TableRowNodeView', () => {
82
87
  const editorWithTableSticky = (doc: DocBuilder) =>
83
88
  createEditor({
84
89
  doc,
85
- preset: new Preset<LightEditorPlugin>().add(tablePlugin),
90
+ preset: new Preset<LightEditorPlugin>()
91
+ .add([featureFlagsPlugin, {}])
92
+ .add([analyticsPlugin, {}])
93
+ .add(contentInsertionPlugin)
94
+ .add(tablePlugin),
86
95
  pluginKey,
87
96
  });
88
97
  const editorData = editorWithTableSticky(
@@ -30,6 +30,9 @@ import {
30
30
  akEditorFullPageMaxWidth,
31
31
  akEditorDefaultLayoutWidth,
32
32
  } from '@atlaskit/editor-shared-styles/consts';
33
+ import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
34
+ import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
35
+ import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
33
36
 
34
37
  describe('table-resizing/event-handlers', () => {
35
38
  const editorAnalyticsAPIFake: EditorAnalyticsAPI = {
@@ -43,6 +46,9 @@ describe('table-resizing/event-handlers', () => {
43
46
  doc,
44
47
  attachTo: document.body,
45
48
  preset: new Preset<LightEditorPlugin>()
49
+ .add([featureFlagsPlugin, {}])
50
+ .add([analyticsPlugin, {}])
51
+ .add(contentInsertionPlugin)
46
52
  .add([
47
53
  tablePlugin,
48
54
  {
@@ -28,6 +28,9 @@ import { TablePluginState } from '../../../plugins/table/types';
28
28
  import { pluginKey } from '../../../plugins/table/pm-plugins/plugin-key';
29
29
  import { createEditorSelectionAPI } from '@atlaskit/editor-core/src/selection-api/api';
30
30
  import type { EditorSelectionAPI } from '@atlaskit/editor-common/selection';
31
+ import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
32
+ import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
33
+ import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
31
34
 
32
35
  const TABLE_LOCAL_ID = 'test-table-local-id';
33
36
  describe('table selection keymap', () => {
@@ -42,6 +45,9 @@ describe('table selection keymap', () => {
42
45
 
43
46
  const createEditor = createProsemirrorEditorFactory();
44
47
  const preset = new Preset<LightEditorPlugin>()
48
+ .add([featureFlagsPlugin, {}])
49
+ .add([analyticsPlugin, {}])
50
+ .add(contentInsertionPlugin)
45
51
  .add(selectionPlugin)
46
52
  .add([tablePlugin, { tableOptions: {}, editorSelectionAPI }])
47
53
  .add(panelPlugin)
@@ -26,6 +26,9 @@ import { sortByColumn } from '../../plugins/table/commands';
26
26
  import { pluginKey as tablePluginKey } from '../../plugins/table/pm-plugins/plugin-key';
27
27
  import tablePlugin from '../../plugins/table-plugin';
28
28
  import { PluginKey } from 'prosemirror-state';
29
+ import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
30
+ import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
31
+ import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
29
32
 
30
33
  const TABLE_LOCAL_ID = 'test-table-local-id';
31
34
 
@@ -48,6 +51,9 @@ describe('table plugin', () => {
48
51
  allowColumnSorting: true,
49
52
  };
50
53
  const preset = new Preset<LightEditorPlugin>()
54
+ .add([featureFlagsPlugin, {}])
55
+ .add([analyticsPlugin, {}])
56
+ .add(contentInsertionPlugin)
51
57
  .add([tablePlugin, { tableOptions }])
52
58
  .add(textFormattingPlugin)
53
59
  .add(blockTypePlugin);
@@ -31,6 +31,9 @@ import tablePlugin from '../../plugins/table';
31
31
  import { pluginKey } from '../../plugins/table/pm-plugins/plugin-key';
32
32
  import { getMergedCellsPositions } from '../../plugins/table/utils';
33
33
  import { getNewResizeStateFromSelectedColumns } from '../../plugins/table/pm-plugins/table-resizing/utils/resize-state';
34
+ import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
35
+ import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
36
+ import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
34
37
 
35
38
  jest.mock('@atlaskit/editor-tables/utils');
36
39
  jest.mock('../../plugins/table/transforms');
@@ -151,16 +154,20 @@ describe('getToolbarMenuConfig', () => {
151
154
  describe('getToolbarCellOptionsConfig', () => {
152
155
  const createEditor = createProsemirrorEditorFactory();
153
156
  const props = {
154
- preset: new Preset<LightEditorPlugin>().add([
155
- tablePlugin,
156
- {
157
- tableOptions: {
158
- allowDistributeColumns: true,
159
- allowColumnResizing: true,
160
- allowColumnSorting: true,
157
+ preset: new Preset<LightEditorPlugin>()
158
+ .add([featureFlagsPlugin, {}])
159
+ .add([analyticsPlugin, {}])
160
+ .add(contentInsertionPlugin)
161
+ .add([
162
+ tablePlugin,
163
+ {
164
+ tableOptions: {
165
+ allowDistributeColumns: true,
166
+ allowColumnResizing: true,
167
+ allowColumnSorting: true,
168
+ },
161
169
  },
162
- },
163
- ]),
170
+ ]),
164
171
  pluginKey,
165
172
  };
166
173
  const { editorView } = createEditor({
@@ -21,6 +21,9 @@ import { getSelectionRect } from '@atlaskit/editor-tables/utils';
21
21
  import { pluginKey } from '../../../plugins/table/pm-plugins/plugin-key';
22
22
  import { PluginKey } from 'prosemirror-state';
23
23
  import tablePlugin from '../../../plugins/table-plugin';
24
+ import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
25
+ import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
26
+ import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
24
27
 
25
28
  const colsToRect = (cols: Array<number>, noOfRows: number): Rect => ({
26
29
  left: Math.min(...cols),
@@ -41,7 +44,11 @@ describe('table plugin -> transforms -> delete columns', () => {
41
44
  });
42
45
 
43
46
  const createEditor = createProsemirrorEditorFactory();
44
- const preset = new Preset<LightEditorPlugin>().add(tablePlugin);
47
+ const preset = new Preset<LightEditorPlugin>()
48
+ .add([featureFlagsPlugin, {}])
49
+ .add([analyticsPlugin, {}])
50
+ .add(contentInsertionPlugin)
51
+ .add(tablePlugin);
45
52
 
46
53
  const editor = (doc: DocBuilder) =>
47
54
  createEditor<TablePluginState, PluginKey>({
@@ -22,6 +22,9 @@ import { deleteRows } from '../../../plugins/table/transforms';
22
22
  import { pluginKey } from '../../../plugins/table/pm-plugins/plugin-key';
23
23
  import { PluginKey } from 'prosemirror-state';
24
24
  import tablePlugin from '../../../plugins/table-plugin';
25
+ import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
26
+ import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
27
+ import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
25
28
 
26
29
  const rowsToRect = (rows: Array<number>, noOfColumns: number): Rect => ({
27
30
  left: 0,
@@ -41,7 +44,11 @@ describe('table plugin -> transforms -> delete rows', () => {
41
44
  uuid.setStatic(false);
42
45
  });
43
46
  const createEditor = createProsemirrorEditorFactory();
44
- const preset = new Preset<LightEditorPlugin>().add(tablePlugin);
47
+ const preset = new Preset<LightEditorPlugin>()
48
+ .add([featureFlagsPlugin, {}])
49
+ .add([analyticsPlugin, {}])
50
+ .add(contentInsertionPlugin)
51
+ .add(tablePlugin);
45
52
 
46
53
  const editor = (doc: DocBuilder) =>
47
54
  createEditor<TablePluginState, PluginKey>({
@@ -18,6 +18,9 @@ import { mergeCells } from '../../../plugins/table/transforms';
18
18
  import { pluginKey } from '../../../plugins/table/pm-plugins/plugin-key';
19
19
  import tablePlugin from '../../../plugins/table-plugin';
20
20
  import { PluginKey } from 'prosemirror-state';
21
+ import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
22
+ import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
23
+ import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
21
24
 
22
25
  const TABLE_LOCAL_ID = 'test-table-local-id';
23
26
 
@@ -31,7 +34,11 @@ describe('table plugin -> transforms -> merge cells', () => {
31
34
  });
32
35
 
33
36
  const createEditor = createProsemirrorEditorFactory();
34
- const preset = new Preset<LightEditorPlugin>().add(tablePlugin);
37
+ const preset = new Preset<LightEditorPlugin>()
38
+ .add([featureFlagsPlugin, {}])
39
+ .add([analyticsPlugin, {}])
40
+ .add(contentInsertionPlugin)
41
+ .add(tablePlugin);
35
42
 
36
43
  const editor = (doc: DocBuilder) =>
37
44
  createEditor<TablePluginState, PluginKey>({
@@ -17,6 +17,9 @@ import {
17
17
  tr,
18
18
  } from '@atlaskit/editor-test-helpers/doc-builder';
19
19
  import tablePlugin from '../../../plugins/table-plugin';
20
+ import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
21
+ import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
22
+ import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
20
23
 
21
24
  import { ContextualMenu } from '../../../plugins/table/ui/FloatingContextualMenu/ContextualMenu';
22
25
 
@@ -29,10 +32,11 @@ describe('ContextualMenu', () => {
29
32
  beforeEach(() => {
30
33
  ({ editorView } = createEditor({
31
34
  doc: doc(table()(tr(th()(p('')), th()(p(''))), tr(tdCursor, tdEmpty))),
32
- preset: new Preset<LightEditorPlugin>().add([
33
- tablePlugin,
34
- { tableOptions: { advanced: true } },
35
- ]),
35
+ preset: new Preset<LightEditorPlugin>()
36
+ .add([featureFlagsPlugin, {}])
37
+ .add([analyticsPlugin, {}])
38
+ .add(contentInsertionPlugin)
39
+ .add([tablePlugin, { tableOptions: { advanced: true } }]),
36
40
  }));
37
41
  });
38
42
 
@@ -19,6 +19,9 @@ import { CornerControls } from '../../../plugins/table/ui/TableFloatingControls/
19
19
  import { getPluginState } from '../../../plugins/table/pm-plugins/plugin-factory';
20
20
  import { pluginKey } from '../../../plugins/table/pm-plugins/plugin-key';
21
21
  import tablePlugin from '../../../plugins/table-plugin';
22
+ import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
23
+ import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
24
+ import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
22
25
 
23
26
  describe('CornerControls', () => {
24
27
  const createEditor = createProsemirrorEditorFactory();
@@ -26,7 +29,11 @@ describe('CornerControls', () => {
26
29
  const editor = (doc: DocBuilder) =>
27
30
  createEditor({
28
31
  doc,
29
- preset: new Preset<LightEditorPlugin>().add(tablePlugin),
32
+ preset: new Preset<LightEditorPlugin>()
33
+ .add([featureFlagsPlugin, {}])
34
+ .add([analyticsPlugin, {}])
35
+ .add(contentInsertionPlugin)
36
+ .add(tablePlugin),
30
37
  pluginKey,
31
38
  });
32
39
 
@@ -23,13 +23,20 @@ import FloatingContextualButton, {
23
23
  Props as FloatingContextualButtonProps,
24
24
  } from '../../../plugins/table/ui/FloatingContextualButton';
25
25
  import tablePlugin from '../../../plugins/table-plugin';
26
+ import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
27
+ import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
28
+ import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
26
29
 
27
30
  const createEditor = createProsemirrorEditorFactory();
28
31
  let createAnalyticsEvent = jest.fn(() => ({ fire() {} } as UIAnalyticsEvent));
29
32
  const editor = (doc: DocBuilder) =>
30
33
  createEditor({
31
34
  doc,
32
- preset: new Preset<LightEditorPlugin>().add(tablePlugin),
35
+ preset: new Preset<LightEditorPlugin>()
36
+ .add([featureFlagsPlugin, {}])
37
+ .add([analyticsPlugin, {}])
38
+ .add(contentInsertionPlugin)
39
+ .add(tablePlugin),
33
40
  });
34
41
 
35
42
  describe('Floating Contextual Button', () => {
@@ -20,6 +20,9 @@ import {
20
20
  import { getPluginState } from '../../../plugins/table/pm-plugins/plugin-factory';
21
21
  import FloatingContextualMenu from '../../../plugins/table/ui/FloatingContextualMenu';
22
22
  import tablePlugin from '../../../plugins/table-plugin';
23
+ import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
24
+ import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
25
+ import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
23
26
 
24
27
  describe('FloatingContextualMenu', () => {
25
28
  const createEditor = createProsemirrorEditorFactory();
@@ -28,7 +31,11 @@ describe('FloatingContextualMenu', () => {
28
31
  beforeEach(() => {
29
32
  ({ editorView } = createEditor({
30
33
  doc: doc(table()(tr(th()(p('')), th()(p(''))), tr(tdCursor, tdEmpty))),
31
- preset: new Preset<LightEditorPlugin>().add(tablePlugin),
34
+ preset: new Preset<LightEditorPlugin>()
35
+ .add([featureFlagsPlugin, {}])
36
+ .add([analyticsPlugin, {}])
37
+ .add(contentInsertionPlugin)
38
+ .add(tablePlugin),
32
39
  }));
33
40
  });
34
41
 
@@ -25,6 +25,9 @@ import TableFloatingControls from '../../../plugins/table/ui/TableFloatingContro
25
25
  import { RowControls } from '../../../plugins/table/ui/TableFloatingControls/RowControls';
26
26
  import { pluginKey } from '../../../plugins/table/pm-plugins/plugin-key';
27
27
  import tablePlugin from '../../../plugins/table-plugin';
28
+ import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
29
+ import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
30
+ import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
28
31
 
29
32
  describe('RowControls', () => {
30
33
  const createEditor = createProsemirrorEditorFactory();
@@ -52,7 +55,11 @@ describe('RowControls', () => {
52
55
  const editor = (doc: DocBuilder) => {
53
56
  return createEditor({
54
57
  doc,
55
- preset: new Preset<LightEditorPlugin>().add(tablePlugin),
58
+ preset: new Preset<LightEditorPlugin>()
59
+ .add([featureFlagsPlugin, {}])
60
+ .add([analyticsPlugin, {}])
61
+ .add(contentInsertionPlugin)
62
+ .add(tablePlugin),
56
63
  pluginKey,
57
64
  });
58
65
  };