@atlaskit/editor-plugin-table 2.3.1 → 2.5.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 (426) hide show
  1. package/.eslintrc.js +6 -0
  2. package/CHANGELOG.md +16 -0
  3. package/dist/cjs/plugins/table/commands/go-to-next-cell.js +2 -2
  4. package/dist/cjs/plugins/table/commands/insert.js +3 -3
  5. package/dist/cjs/plugins/table/commands/misc.js +26 -26
  6. package/dist/cjs/plugins/table/commands/referentiality.js +1 -1
  7. package/dist/cjs/plugins/table/commands/selection.js +2 -2
  8. package/dist/cjs/plugins/table/commands/sort.js +8 -8
  9. package/dist/cjs/plugins/table/commands-with-analytics.js +3 -3
  10. package/dist/cjs/plugins/table/event-handlers.js +15 -15
  11. package/dist/cjs/plugins/table/handlers.js +6 -7
  12. package/dist/cjs/plugins/table/index.js +16 -16
  13. package/dist/cjs/plugins/table/nodeviews/TableComponent.js +44 -40
  14. package/dist/cjs/plugins/table/nodeviews/TableContainer.js +6 -9
  15. package/dist/cjs/plugins/table/nodeviews/TableResizer.js +4 -3
  16. package/dist/cjs/plugins/table/nodeviews/table.js +11 -9
  17. package/dist/cjs/plugins/table/nodeviews/tableCell.js +1 -1
  18. package/dist/cjs/plugins/table/pm-plugins/decorations/plugin.js +2 -2
  19. package/dist/cjs/plugins/table/pm-plugins/keymap.js +2 -2
  20. package/dist/cjs/plugins/table/pm-plugins/main.js +24 -21
  21. package/dist/cjs/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.js +1 -1
  22. package/dist/cjs/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +2 -2
  23. package/dist/cjs/plugins/table/pm-plugins/table-local-id.js +1 -1
  24. package/dist/cjs/plugins/table/pm-plugins/table-resizing/commands.js +1 -1
  25. package/dist/cjs/plugins/table/pm-plugins/table-resizing/event-handlers.js +4 -4
  26. package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/colgroup.js +1 -1
  27. package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/column-state.js +1 -1
  28. package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/dom.js +1 -1
  29. package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/misc.js +2 -2
  30. package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +1 -1
  31. package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/scale-table.js +2 -3
  32. package/dist/cjs/plugins/table/pm-plugins/table-width.js +3 -3
  33. package/dist/cjs/plugins/table/toolbar.js +26 -26
  34. package/dist/cjs/plugins/table/transforms/column-width.js +5 -5
  35. package/dist/cjs/plugins/table/transforms/delete-columns.js +1 -1
  36. package/dist/cjs/plugins/table/transforms/merge.js +1 -1
  37. package/dist/cjs/plugins/table/transforms/replace-table.js +2 -2
  38. package/dist/cjs/plugins/table/ui/FloatingContextualButton/FixedButton.js +2 -2
  39. package/dist/cjs/plugins/table/ui/FloatingContextualButton/index.js +3 -3
  40. package/dist/cjs/plugins/table/ui/FloatingContextualButton/styles.js +1 -1
  41. package/dist/cjs/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +11 -11
  42. package/dist/cjs/plugins/table/ui/FloatingContextualMenu/index.js +2 -2
  43. package/dist/cjs/plugins/table/ui/FloatingContextualMenu/styles.js +6 -3
  44. package/dist/cjs/plugins/table/ui/FloatingDeleteButton/index.js +10 -10
  45. package/dist/cjs/plugins/table/ui/FloatingInsertButton/InsertButton.js +3 -3
  46. package/dist/cjs/plugins/table/ui/FloatingInsertButton/index.js +9 -9
  47. package/dist/cjs/plugins/table/ui/LayoutButton/index.js +3 -3
  48. package/dist/cjs/plugins/table/ui/TableFloatingControls/CornerControls/index.js +1 -1
  49. package/dist/cjs/plugins/table/ui/common-styles.js +2 -2
  50. package/dist/cjs/plugins/table/ui/consts.js +2 -2
  51. package/dist/cjs/plugins/table/ui/ui-styles.js +2 -2
  52. package/dist/cjs/plugins/table/utils/column-controls.js +11 -11
  53. package/dist/cjs/plugins/table/utils/decoration.js +11 -11
  54. package/dist/cjs/plugins/table/utils/nodes.js +1 -1
  55. package/dist/cjs/plugins/table/utils/row-controls.js +9 -9
  56. package/dist/cjs/plugins/table/utils/selection.js +1 -1
  57. package/dist/cjs/version.json +1 -1
  58. package/dist/es2019/plugins/table/commands/clear.js +3 -1
  59. package/dist/es2019/plugins/table/commands/go-to-next-cell.js +2 -2
  60. package/dist/es2019/plugins/table/commands/insert.js +4 -3
  61. package/dist/es2019/plugins/table/commands/misc.js +4 -4
  62. package/dist/es2019/plugins/table/commands/referentiality.js +1 -1
  63. package/dist/es2019/plugins/table/commands/selection.js +3 -3
  64. package/dist/es2019/plugins/table/commands/sort.js +3 -4
  65. package/dist/es2019/plugins/table/commands/toggle.js +1 -2
  66. package/dist/es2019/plugins/table/commands-with-analytics.js +4 -4
  67. package/dist/es2019/plugins/table/event-handlers.js +3 -5
  68. package/dist/es2019/plugins/table/handlers.js +5 -5
  69. package/dist/es2019/plugins/table/index.js +16 -16
  70. package/dist/es2019/plugins/table/nodeviews/OverflowShadowsObserver.js +1 -1
  71. package/dist/es2019/plugins/table/nodeviews/TableComponent.js +19 -15
  72. package/dist/es2019/plugins/table/nodeviews/TableContainer.js +7 -10
  73. package/dist/es2019/plugins/table/nodeviews/TableResizer.js +6 -5
  74. package/dist/es2019/plugins/table/nodeviews/table.js +11 -9
  75. package/dist/es2019/plugins/table/nodeviews/tableCell.js +2 -2
  76. package/dist/es2019/plugins/table/pm-plugins/decorations/plugin.js +2 -3
  77. package/dist/es2019/plugins/table/pm-plugins/keymap.js +4 -4
  78. package/dist/es2019/plugins/table/pm-plugins/main.js +13 -13
  79. package/dist/es2019/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.js +1 -1
  80. package/dist/es2019/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +2 -2
  81. package/dist/es2019/plugins/table/pm-plugins/table-local-id.js +1 -1
  82. package/dist/es2019/plugins/table/pm-plugins/table-resizing/commands.js +1 -1
  83. package/dist/es2019/plugins/table/pm-plugins/table-resizing/event-handlers.js +4 -4
  84. package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/colgroup.js +1 -1
  85. package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/column-state.js +1 -1
  86. package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/dom.js +1 -1
  87. package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/misc.js +2 -3
  88. package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +1 -1
  89. package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/scale-table.js +2 -3
  90. package/dist/es2019/plugins/table/pm-plugins/table-selection-keymap.js +1 -1
  91. package/dist/es2019/plugins/table/pm-plugins/table-width.js +3 -3
  92. package/dist/es2019/plugins/table/toolbar.js +16 -18
  93. package/dist/es2019/plugins/table/transforms/column-width.js +6 -7
  94. package/dist/es2019/plugins/table/transforms/delete-columns.js +1 -1
  95. package/dist/es2019/plugins/table/transforms/merge.js +2 -1
  96. package/dist/es2019/plugins/table/transforms/replace-table.js +2 -2
  97. package/dist/es2019/plugins/table/transforms/split.js +1 -0
  98. package/dist/es2019/plugins/table/ui/FloatingContextualButton/FixedButton.js +2 -2
  99. package/dist/es2019/plugins/table/ui/FloatingContextualButton/index.js +4 -4
  100. package/dist/es2019/plugins/table/ui/FloatingContextualButton/styles.js +1 -1
  101. package/dist/es2019/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +10 -10
  102. package/dist/es2019/plugins/table/ui/FloatingContextualMenu/index.js +2 -2
  103. package/dist/es2019/plugins/table/ui/FloatingContextualMenu/styles.js +7 -4
  104. package/dist/es2019/plugins/table/ui/FloatingDeleteButton/index.js +5 -5
  105. package/dist/es2019/plugins/table/ui/FloatingInsertButton/InsertButton.js +3 -3
  106. package/dist/es2019/plugins/table/ui/FloatingInsertButton/index.js +4 -5
  107. package/dist/es2019/plugins/table/ui/LayoutButton/index.js +3 -3
  108. package/dist/es2019/plugins/table/ui/TableFloatingControls/CornerControls/index.js +1 -1
  109. package/dist/es2019/plugins/table/ui/common-styles.js +5 -5
  110. package/dist/es2019/plugins/table/ui/consts.js +2 -2
  111. package/dist/es2019/plugins/table/ui/ui-styles.js +3 -3
  112. package/dist/es2019/plugins/table/utils/column-controls.js +3 -3
  113. package/dist/es2019/plugins/table/utils/decoration.js +2 -2
  114. package/dist/es2019/plugins/table/utils/guidelines.js +1 -1
  115. package/dist/es2019/plugins/table/utils/nodes.js +1 -1
  116. package/dist/es2019/plugins/table/utils/row-controls.js +3 -3
  117. package/dist/es2019/plugins/table/utils/selection.js +1 -1
  118. package/dist/es2019/version.json +1 -1
  119. package/dist/esm/plugins/table/commands/clear.js +3 -1
  120. package/dist/esm/plugins/table/commands/go-to-next-cell.js +2 -2
  121. package/dist/esm/plugins/table/commands/insert.js +4 -3
  122. package/dist/esm/plugins/table/commands/misc.js +4 -4
  123. package/dist/esm/plugins/table/commands/referentiality.js +1 -1
  124. package/dist/esm/plugins/table/commands/selection.js +3 -3
  125. package/dist/esm/plugins/table/commands/sort.js +3 -4
  126. package/dist/esm/plugins/table/commands/toggle.js +1 -2
  127. package/dist/esm/plugins/table/commands-with-analytics.js +4 -4
  128. package/dist/esm/plugins/table/event-handlers.js +3 -5
  129. package/dist/esm/plugins/table/handlers.js +5 -5
  130. package/dist/esm/plugins/table/index.js +16 -16
  131. package/dist/esm/plugins/table/nodeviews/OverflowShadowsObserver.js +1 -1
  132. package/dist/esm/plugins/table/nodeviews/TableComponent.js +37 -34
  133. package/dist/esm/plugins/table/nodeviews/TableContainer.js +7 -10
  134. package/dist/esm/plugins/table/nodeviews/TableResizer.js +6 -5
  135. package/dist/esm/plugins/table/nodeviews/table.js +11 -9
  136. package/dist/esm/plugins/table/nodeviews/tableCell.js +2 -2
  137. package/dist/esm/plugins/table/pm-plugins/decorations/plugin.js +2 -3
  138. package/dist/esm/plugins/table/pm-plugins/keymap.js +4 -4
  139. package/dist/esm/plugins/table/pm-plugins/main.js +13 -13
  140. package/dist/esm/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.js +1 -1
  141. package/dist/esm/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +2 -2
  142. package/dist/esm/plugins/table/pm-plugins/table-local-id.js +1 -1
  143. package/dist/esm/plugins/table/pm-plugins/table-resizing/commands.js +1 -1
  144. package/dist/esm/plugins/table/pm-plugins/table-resizing/event-handlers.js +4 -4
  145. package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/colgroup.js +1 -1
  146. package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/column-state.js +1 -1
  147. package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/dom.js +1 -1
  148. package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/misc.js +2 -3
  149. package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +1 -1
  150. package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/scale-table.js +2 -3
  151. package/dist/esm/plugins/table/pm-plugins/table-selection-keymap.js +1 -1
  152. package/dist/esm/plugins/table/pm-plugins/table-width.js +3 -3
  153. package/dist/esm/plugins/table/toolbar.js +16 -18
  154. package/dist/esm/plugins/table/transforms/column-width.js +6 -7
  155. package/dist/esm/plugins/table/transforms/delete-columns.js +1 -1
  156. package/dist/esm/plugins/table/transforms/merge.js +2 -1
  157. package/dist/esm/plugins/table/transforms/replace-table.js +2 -2
  158. package/dist/esm/plugins/table/transforms/split.js +1 -0
  159. package/dist/esm/plugins/table/ui/FloatingContextualButton/FixedButton.js +2 -2
  160. package/dist/esm/plugins/table/ui/FloatingContextualButton/index.js +4 -4
  161. package/dist/esm/plugins/table/ui/FloatingContextualButton/styles.js +1 -1
  162. package/dist/esm/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +10 -10
  163. package/dist/esm/plugins/table/ui/FloatingContextualMenu/index.js +2 -2
  164. package/dist/esm/plugins/table/ui/FloatingContextualMenu/styles.js +6 -3
  165. package/dist/esm/plugins/table/ui/FloatingDeleteButton/index.js +5 -5
  166. package/dist/esm/plugins/table/ui/FloatingInsertButton/InsertButton.js +3 -3
  167. package/dist/esm/plugins/table/ui/FloatingInsertButton/index.js +4 -5
  168. package/dist/esm/plugins/table/ui/LayoutButton/index.js +3 -3
  169. package/dist/esm/plugins/table/ui/TableFloatingControls/CornerControls/index.js +1 -1
  170. package/dist/esm/plugins/table/ui/common-styles.js +5 -5
  171. package/dist/esm/plugins/table/ui/consts.js +2 -2
  172. package/dist/esm/plugins/table/ui/ui-styles.js +3 -3
  173. package/dist/esm/plugins/table/utils/column-controls.js +3 -3
  174. package/dist/esm/plugins/table/utils/decoration.js +2 -2
  175. package/dist/esm/plugins/table/utils/guidelines.js +1 -1
  176. package/dist/esm/plugins/table/utils/nodes.js +1 -1
  177. package/dist/esm/plugins/table/utils/row-controls.js +3 -3
  178. package/dist/esm/plugins/table/utils/selection.js +1 -1
  179. package/dist/esm/version.json +1 -1
  180. package/dist/types/plugins/table/commands/go-to-next-cell.d.ts +2 -2
  181. package/dist/types/plugins/table/commands/insert.d.ts +1 -1
  182. package/dist/types/plugins/table/commands/selection.d.ts +1 -1
  183. package/dist/types/plugins/table/commands/sort.d.ts +1 -1
  184. package/dist/types/plugins/table/commands-with-analytics.d.ts +4 -5
  185. package/dist/types/plugins/table/event-handlers.d.ts +1 -1
  186. package/dist/types/plugins/table/handlers.d.ts +1 -1
  187. package/dist/types/plugins/table/index.d.ts +4 -4
  188. package/dist/types/plugins/table/nodeviews/TableComponent.d.ts +3 -4
  189. package/dist/types/plugins/table/nodeviews/TableContainer.d.ts +2 -2
  190. package/dist/types/plugins/table/nodeviews/TableResizer.d.ts +1 -1
  191. package/dist/types/plugins/table/nodeviews/table.d.ts +3 -4
  192. package/dist/types/plugins/table/nodeviews/tableCell.d.ts +1 -2
  193. package/dist/types/plugins/table/nodeviews/types.d.ts +2 -1
  194. package/dist/types/plugins/table/pm-plugins/decorations/plugin.d.ts +2 -2
  195. package/dist/types/plugins/table/pm-plugins/keymap.d.ts +1 -1
  196. package/dist/types/plugins/table/pm-plugins/main.d.ts +4 -6
  197. package/dist/types/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.d.ts +1 -1
  198. package/dist/types/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.d.ts +1 -1
  199. package/dist/types/plugins/table/pm-plugins/sticky-headers/plugin.d.ts +1 -1
  200. package/dist/types/plugins/table/pm-plugins/table-local-id.d.ts +0 -12
  201. package/dist/types/plugins/table/pm-plugins/table-resizing/plugin.d.ts +3 -3
  202. package/dist/types/plugins/table/pm-plugins/table-resizing/utils/misc.d.ts +3 -4
  203. package/dist/types/plugins/table/pm-plugins/table-resizing/utils/resize-state.d.ts +3 -3
  204. package/dist/types/plugins/table/pm-plugins/table-resizing/utils/types.d.ts +1 -1
  205. package/dist/types/plugins/table/pm-plugins/table-width.d.ts +1 -1
  206. package/dist/types/plugins/table/toolbar.d.ts +4 -5
  207. package/dist/types/plugins/table/transforms/column-width.d.ts +1 -1
  208. package/dist/types/plugins/table/transforms/replace-table.d.ts +1 -1
  209. package/dist/types/plugins/table/types.d.ts +1 -1
  210. package/dist/types/plugins/table/ui/FloatingContextualButton/index.d.ts +2 -2
  211. package/dist/types/plugins/table/ui/FloatingContextualMenu/ContextualMenu.d.ts +2 -2
  212. package/dist/types/plugins/table/ui/FloatingContextualMenu/index.d.ts +1 -1
  213. package/dist/types/plugins/table/ui/FloatingDeleteButton/DeleteButton.d.ts +1 -2
  214. package/dist/types/plugins/table/ui/FloatingDeleteButton/index.d.ts +1 -1
  215. package/dist/types/plugins/table/ui/FloatingInsertButton/index.d.ts +1 -1
  216. package/dist/types/plugins/table/ui/LayoutButton/index.d.ts +1 -1
  217. package/dist/types/plugins/table/ui/TableFloatingControls/CornerControls/index.d.ts +1 -1
  218. package/dist/types/plugins/table/ui/TableFloatingControls/index.d.ts +1 -1
  219. package/dist/types/plugins/table/utils/analytics.d.ts +1 -1
  220. package/dist/types/plugins/table/utils/collapse.d.ts +2 -2
  221. package/dist/types/plugins/table/utils/decoration.d.ts +1 -1
  222. package/dist/types-ts4.5/plugins/table/commands/go-to-next-cell.d.ts +2 -2
  223. package/dist/types-ts4.5/plugins/table/commands/insert.d.ts +1 -1
  224. package/dist/types-ts4.5/plugins/table/commands/selection.d.ts +1 -1
  225. package/dist/types-ts4.5/plugins/table/commands/sort.d.ts +1 -1
  226. package/dist/types-ts4.5/plugins/table/commands-with-analytics.d.ts +4 -5
  227. package/dist/types-ts4.5/plugins/table/event-handlers.d.ts +1 -1
  228. package/dist/types-ts4.5/plugins/table/handlers.d.ts +1 -1
  229. package/dist/types-ts4.5/plugins/table/index.d.ts +4 -4
  230. package/dist/types-ts4.5/plugins/table/nodeviews/TableComponent.d.ts +3 -4
  231. package/dist/types-ts4.5/plugins/table/nodeviews/TableContainer.d.ts +2 -2
  232. package/dist/types-ts4.5/plugins/table/nodeviews/TableResizer.d.ts +1 -1
  233. package/dist/types-ts4.5/plugins/table/nodeviews/table.d.ts +3 -4
  234. package/dist/types-ts4.5/plugins/table/nodeviews/tableCell.d.ts +1 -2
  235. package/dist/types-ts4.5/plugins/table/nodeviews/types.d.ts +2 -1
  236. package/dist/types-ts4.5/plugins/table/pm-plugins/decorations/plugin.d.ts +2 -2
  237. package/dist/types-ts4.5/plugins/table/pm-plugins/keymap.d.ts +1 -1
  238. package/dist/types-ts4.5/plugins/table/pm-plugins/main.d.ts +4 -6
  239. package/dist/types-ts4.5/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.d.ts +1 -1
  240. package/dist/types-ts4.5/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.d.ts +1 -1
  241. package/dist/types-ts4.5/plugins/table/pm-plugins/sticky-headers/plugin.d.ts +1 -1
  242. package/dist/types-ts4.5/plugins/table/pm-plugins/table-local-id.d.ts +0 -12
  243. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/plugin.d.ts +3 -3
  244. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/misc.d.ts +3 -4
  245. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/resize-state.d.ts +3 -3
  246. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/types.d.ts +1 -1
  247. package/dist/types-ts4.5/plugins/table/pm-plugins/table-width.d.ts +1 -1
  248. package/dist/types-ts4.5/plugins/table/toolbar.d.ts +4 -5
  249. package/dist/types-ts4.5/plugins/table/transforms/column-width.d.ts +1 -1
  250. package/dist/types-ts4.5/plugins/table/transforms/replace-table.d.ts +1 -1
  251. package/dist/types-ts4.5/plugins/table/types.d.ts +1 -1
  252. package/dist/types-ts4.5/plugins/table/ui/FloatingContextualButton/index.d.ts +2 -2
  253. package/dist/types-ts4.5/plugins/table/ui/FloatingContextualMenu/ContextualMenu.d.ts +2 -2
  254. package/dist/types-ts4.5/plugins/table/ui/FloatingContextualMenu/index.d.ts +1 -1
  255. package/dist/types-ts4.5/plugins/table/ui/FloatingDeleteButton/DeleteButton.d.ts +1 -2
  256. package/dist/types-ts4.5/plugins/table/ui/FloatingDeleteButton/index.d.ts +1 -1
  257. package/dist/types-ts4.5/plugins/table/ui/FloatingInsertButton/index.d.ts +1 -1
  258. package/dist/types-ts4.5/plugins/table/ui/LayoutButton/index.d.ts +1 -1
  259. package/dist/types-ts4.5/plugins/table/ui/TableFloatingControls/CornerControls/index.d.ts +1 -1
  260. package/dist/types-ts4.5/plugins/table/ui/TableFloatingControls/index.d.ts +1 -1
  261. package/dist/types-ts4.5/plugins/table/utils/analytics.d.ts +1 -1
  262. package/dist/types-ts4.5/plugins/table/utils/collapse.d.ts +2 -2
  263. package/dist/types-ts4.5/plugins/table/utils/decoration.d.ts +1 -1
  264. package/examples/99-testing.tsx +11 -10
  265. package/package.json +12 -4
  266. package/report.api.md +2 -0
  267. package/src/__tests__/integration/arrow-down-into-table.ts +3 -2
  268. package/src/__tests__/integration/auto-size.ts +8 -10
  269. package/src/__tests__/integration/cell-selection.ts +8 -7
  270. package/src/__tests__/integration/change-date-inside-table.ts +4 -5
  271. package/src/__tests__/integration/delete-columns.ts +6 -4
  272. package/src/__tests__/integration/delete-last-column-in-full-width.ts +4 -4
  273. package/src/__tests__/integration/delete-last-column-with-empty-action.ts +4 -4
  274. package/src/__tests__/integration/delete-last-row-with-empty-action.ts +4 -4
  275. package/src/__tests__/integration/delete-rows.ts +8 -6
  276. package/src/__tests__/integration/delete-table-when-selected.ts +10 -11
  277. package/src/__tests__/integration/deleting-empty-paragraph-under-table.ts +5 -4
  278. package/src/__tests__/integration/even-columns.ts +8 -8
  279. package/src/__tests__/integration/floating-toolbar.ts +3 -1
  280. package/src/__tests__/integration/horizontal-scroll-shadows.ts +7 -8
  281. package/src/__tests__/integration/horizontal-scroll.ts +8 -7
  282. package/src/__tests__/integration/insert-cell-header-with-strong-mark.ts +3 -4
  283. package/src/__tests__/integration/insert-row-inside-layout.ts +8 -6
  284. package/src/__tests__/integration/layout.ts +8 -11
  285. package/src/__tests__/integration/meta-arrowup-cursor-in-first-row.ts +3 -2
  286. package/src/__tests__/integration/resize-handler.ts +2 -2
  287. package/src/__tests__/integration/resize.ts +15 -15
  288. package/src/__tests__/integration/scale.ts +8 -8
  289. package/src/__tests__/integration/sticky-header.ts +3 -2
  290. package/src/__tests__/unit/analytics.ts +21 -21
  291. package/src/__tests__/unit/collab.ts +16 -16
  292. package/src/__tests__/unit/commands/go-to-next-cell.ts +14 -13
  293. package/src/__tests__/unit/commands/insert.ts +12 -12
  294. package/src/__tests__/unit/commands/misc.ts +18 -16
  295. package/src/__tests__/unit/commands/sort.ts +9 -8
  296. package/src/__tests__/unit/commands.ts +13 -14
  297. package/src/__tests__/unit/copy-paste.ts +31 -25
  298. package/src/__tests__/unit/event-handlers/index.ts +15 -13
  299. package/src/__tests__/unit/event-handlers.ts +18 -18
  300. package/src/__tests__/unit/fix-tables.ts +9 -9
  301. package/src/__tests__/unit/get-toolbar-config.ts +21 -21
  302. package/src/__tests__/unit/handlers.ts +13 -12
  303. package/src/__tests__/unit/hover-selection.ts +14 -13
  304. package/src/__tests__/unit/index-with-fake-timers.ts +6 -5
  305. package/src/__tests__/unit/index.ts +30 -31
  306. package/src/__tests__/unit/layout.ts +16 -16
  307. package/src/__tests__/unit/nodeviews/OverflowShadowsObserver.ts +4 -2
  308. package/src/__tests__/unit/nodeviews/TableComponent.tsx +21 -20
  309. package/src/__tests__/unit/nodeviews/TableContainer.tsx +38 -105
  310. package/src/__tests__/unit/nodeviews/cell.ts +17 -16
  311. package/src/__tests__/unit/nodeviews/table.ts +15 -13
  312. package/src/__tests__/unit/pm-plugins/decorations/column-controls.ts +1 -1
  313. package/src/__tests__/unit/pm-plugins/decorations/column-resizing.ts +7 -8
  314. package/src/__tests__/unit/pm-plugins/decorations/plugin.ts +45 -57
  315. package/src/__tests__/unit/pm-plugins/main.ts +15 -14
  316. package/src/__tests__/unit/pm-plugins/safari-delete-composition-text-issue-workaround.ts +7 -6
  317. package/src/__tests__/unit/pm-plugins/sticky-headers/tableRow.tsx +23 -21
  318. package/src/__tests__/unit/pm-plugins/table-local-id.ts +14 -15
  319. package/src/__tests__/unit/pm-plugins/table-resizing/colgroup.ts +3 -2
  320. package/src/__tests__/unit/pm-plugins/table-resizing/event-handlers.ts +22 -21
  321. package/src/__tests__/unit/sort-column.ts +16 -14
  322. package/src/__tests__/unit/toolbar.ts +22 -21
  323. package/src/__tests__/unit/transforms/delete-columns.ts +16 -14
  324. package/src/__tests__/unit/transforms/delete-rows.ts +16 -14
  325. package/src/__tests__/unit/transforms/merging.ts +15 -13
  326. package/src/__tests__/unit/ui/ContextualMenu.tsx +8 -6
  327. package/src/__tests__/unit/ui/CornerControls.tsx +11 -9
  328. package/src/__tests__/unit/ui/DeleteButton.tsx +3 -1
  329. package/src/__tests__/unit/ui/FixedButton.tsx +4 -1
  330. package/src/__tests__/unit/ui/FloatingContextualButton.tsx +14 -11
  331. package/src/__tests__/unit/ui/FloatingContextualMenu.tsx +8 -6
  332. package/src/__tests__/unit/ui/FloatingDeleteButton.tsx +12 -9
  333. package/src/__tests__/unit/ui/FloatingInsertButton.tsx +21 -19
  334. package/src/__tests__/unit/ui/RowControls.tsx +15 -12
  335. package/src/__tests__/unit/ui/TableFloatingControls.tsx +16 -15
  336. package/src/__tests__/unit/undo-redo.ts +17 -15
  337. package/src/__tests__/unit/utils/collapse.ts +7 -8
  338. package/src/__tests__/unit/utils/nodes.ts +12 -11
  339. package/src/__tests__/unit/utils/row-controls.ts +12 -12
  340. package/src/__tests__/unit/utils/table.ts +5 -4
  341. package/src/__tests__/unit/utils.ts +18 -16
  342. package/src/__tests__/visual-regression/cell-options-menu.ts +2 -2
  343. package/src/__tests__/visual-regression/index.ts +8 -7
  344. package/src/__tests__/visual-regression/sticky-header.ts +6 -5
  345. package/src/plugins/table/commands/clear.ts +3 -2
  346. package/src/plugins/table/commands/collapse.ts +1 -0
  347. package/src/plugins/table/commands/go-to-next-cell.ts +8 -7
  348. package/src/plugins/table/commands/insert.ts +8 -7
  349. package/src/plugins/table/commands/misc.ts +15 -18
  350. package/src/plugins/table/commands/referentiality.ts +3 -1
  351. package/src/plugins/table/commands/selection.ts +11 -10
  352. package/src/plugins/table/commands/sort.ts +9 -9
  353. package/src/plugins/table/commands/split-cell.ts +1 -1
  354. package/src/plugins/table/commands/toggle.ts +2 -3
  355. package/src/plugins/table/commands-with-analytics.ts +15 -15
  356. package/src/plugins/table/event-handlers.ts +19 -20
  357. package/src/plugins/table/handlers.ts +6 -7
  358. package/src/plugins/table/index.tsx +51 -51
  359. package/src/plugins/table/nodeviews/OverflowShadowsObserver.ts +2 -1
  360. package/src/plugins/table/nodeviews/TableComponent.tsx +22 -25
  361. package/src/plugins/table/nodeviews/TableContainer.tsx +13 -24
  362. package/src/plugins/table/nodeviews/TableResizer.tsx +9 -7
  363. package/src/plugins/table/nodeviews/table.tsx +25 -18
  364. package/src/plugins/table/nodeviews/tableCell.tsx +9 -7
  365. package/src/plugins/table/nodeviews/types.ts +4 -2
  366. package/src/plugins/table/nodeviews/update-overflow-shadows.ts +3 -1
  367. package/src/plugins/table/pm-plugins/decorations/plugin.ts +4 -3
  368. package/src/plugins/table/pm-plugins/decorations/utils/column-controls.ts +2 -1
  369. package/src/plugins/table/pm-plugins/keymap.ts +8 -8
  370. package/src/plugins/table/pm-plugins/main.ts +38 -33
  371. package/src/plugins/table/pm-plugins/plugin-factory.ts +2 -0
  372. package/src/plugins/table/pm-plugins/plugin-key.ts +1 -0
  373. package/src/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.ts +2 -1
  374. package/src/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.ts +6 -7
  375. package/src/plugins/table/pm-plugins/sticky-headers/plugin-key.ts +1 -0
  376. package/src/plugins/table/pm-plugins/sticky-headers/plugin.ts +3 -4
  377. package/src/plugins/table/pm-plugins/table-local-id.ts +3 -4
  378. package/src/plugins/table/pm-plugins/table-resizing/commands.ts +3 -2
  379. package/src/plugins/table/pm-plugins/table-resizing/event-handlers.ts +13 -14
  380. package/src/plugins/table/pm-plugins/table-resizing/plugin-factory.ts +1 -0
  381. package/src/plugins/table/pm-plugins/table-resizing/plugin-key.ts +1 -0
  382. package/src/plugins/table/pm-plugins/table-resizing/plugin.ts +7 -6
  383. package/src/plugins/table/pm-plugins/table-resizing/utils/colgroup.ts +2 -1
  384. package/src/plugins/table/pm-plugins/table-resizing/utils/column-state.ts +1 -1
  385. package/src/plugins/table/pm-plugins/table-resizing/utils/dom.ts +3 -3
  386. package/src/plugins/table/pm-plugins/table-resizing/utils/misc.ts +8 -9
  387. package/src/plugins/table/pm-plugins/table-resizing/utils/resize-state.ts +8 -6
  388. package/src/plugins/table/pm-plugins/table-resizing/utils/scale-table.ts +4 -5
  389. package/src/plugins/table/pm-plugins/table-resizing/utils/types.ts +2 -1
  390. package/src/plugins/table/pm-plugins/table-selection-keymap.ts +4 -3
  391. package/src/plugins/table/pm-plugins/table-width.ts +5 -4
  392. package/src/plugins/table/toolbar.tsx +54 -57
  393. package/src/plugins/table/transforms/column-width.ts +13 -13
  394. package/src/plugins/table/transforms/delete-columns.ts +2 -2
  395. package/src/plugins/table/transforms/delete-rows.ts +2 -2
  396. package/src/plugins/table/transforms/merge.ts +3 -3
  397. package/src/plugins/table/transforms/replace-table.ts +6 -5
  398. package/src/plugins/table/transforms/split.ts +1 -1
  399. package/src/plugins/table/types.ts +3 -3
  400. package/src/plugins/table/ui/FloatingContextualButton/FixedButton.tsx +4 -2
  401. package/src/plugins/table/ui/FloatingContextualButton/index.tsx +12 -11
  402. package/src/plugins/table/ui/FloatingContextualButton/styles.ts +5 -3
  403. package/src/plugins/table/ui/FloatingContextualMenu/ContextualMenu.tsx +27 -28
  404. package/src/plugins/table/ui/FloatingContextualMenu/index.tsx +10 -11
  405. package/src/plugins/table/ui/FloatingContextualMenu/styles.ts +8 -4
  406. package/src/plugins/table/ui/FloatingDeleteButton/DeleteButton.tsx +5 -2
  407. package/src/plugins/table/ui/FloatingDeleteButton/index.tsx +9 -9
  408. package/src/plugins/table/ui/FloatingInsertButton/InsertButton.tsx +4 -5
  409. package/src/plugins/table/ui/FloatingInsertButton/index.tsx +16 -18
  410. package/src/plugins/table/ui/LayoutButton/index.tsx +6 -6
  411. package/src/plugins/table/ui/TableFloatingControls/CornerControls/index.tsx +3 -2
  412. package/src/plugins/table/ui/TableFloatingControls/NumberColumn/index.tsx +2 -1
  413. package/src/plugins/table/ui/TableFloatingControls/index.tsx +2 -3
  414. package/src/plugins/table/ui/common-styles.ts +33 -34
  415. package/src/plugins/table/ui/consts.ts +12 -13
  416. package/src/plugins/table/ui/ui-styles.ts +24 -22
  417. package/src/plugins/table/utils/analytics.ts +3 -2
  418. package/src/plugins/table/utils/collapse.ts +2 -2
  419. package/src/plugins/table/utils/column-controls.ts +5 -6
  420. package/src/plugins/table/utils/decoration.ts +6 -7
  421. package/src/plugins/table/utils/dom.ts +1 -0
  422. package/src/plugins/table/utils/guidelines.ts +2 -2
  423. package/src/plugins/table/utils/nodes.ts +2 -1
  424. package/src/plugins/table/utils/row-controls.ts +4 -3
  425. package/src/plugins/table/utils/selection.ts +2 -1
  426. package/src/plugins/table/utils/table.ts +2 -1
package/.eslintrc.js ADDED
@@ -0,0 +1,6 @@
1
+ module.exports = {
2
+ rules: {
3
+ 'no-duplicate-imports': 'off',
4
+ '@typescript-eslint/no-duplicate-imports': 'error',
5
+ },
6
+ };
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @atlaskit/editor-plugin-table
2
2
 
3
+ ## 2.5.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`22a59977bb3`](https://bitbucket.org/atlassian/atlassian-frontend/commits/22a59977bb3) - [ux] Updated ResizerNext to allow handle style overrides. Updated the table resizer to space and align the resizer handle according the the design specifications
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies
12
+
13
+ ## 2.4.0
14
+
15
+ ### Minor Changes
16
+
17
+ - [`e7ed90bad7c`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e7ed90bad7c) - Remove platform feature flag calls to editor-core and pass through a new option instead for custom table widths project, allowing for simpler clean up and reference
18
+
3
19
  ## 2.3.1
4
20
 
5
21
  ### Patch Changes
@@ -4,10 +4,10 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.goToNextCell = void 0;
7
- var _utils = require("@atlaskit/editor-tables/utils");
8
- var _tableMap = require("@atlaskit/editor-tables/table-map");
9
7
  var _prosemirrorUtils = require("prosemirror-utils");
10
8
  var _analytics = require("@atlaskit/editor-common/analytics");
9
+ var _tableMap = require("@atlaskit/editor-tables/table-map");
10
+ var _utils = require("@atlaskit/editor-tables/utils");
11
11
  var _commandsWithAnalytics = require("../commands-with-analytics");
12
12
  // #region Constants
13
13
 
@@ -7,13 +7,13 @@ exports.addColumnAfter = void 0;
7
7
  exports.addColumnAt = addColumnAt;
8
8
  exports.insertRow = exports.insertColumn = exports.createTable = exports.addColumnBefore = void 0;
9
9
  var _prosemirrorState = require("prosemirror-state");
10
- var _tableMap = require("@atlaskit/editor-tables/table-map");
11
- var _utils = require("@atlaskit/editor-tables/utils");
12
10
  var _prosemirrorUtils = require("prosemirror-utils");
13
11
  var _steps = require("@atlaskit/adf-schema/steps");
12
+ var _tableMap = require("@atlaskit/editor-tables/table-map");
13
+ var _utils = require("@atlaskit/editor-tables/utils");
14
+ var _columnWidth = require("../transforms/column-width");
14
15
  var _utils2 = require("../utils");
15
16
  var _getAllowAddColumnCustomStep = require("../utils/get-allow-add-column-custom-step");
16
- var _columnWidth = require("../transforms/column-width");
17
17
  // #region Imports
18
18
 
19
19
  // #endregion
@@ -7,10 +7,10 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.triggerUnlessTableHeader = exports.transformSliceToRemoveColumnsWidths = exports.transformSliceToAddTableHeaders = exports.transformSliceRemoveCellBackgroundColor = exports.showInsertRowButton = exports.showInsertColumnButton = exports.setTableRef = exports.setMultipleCellAttrs = exports.setEditorFocus = exports.setCellAttr = exports.selectRow = exports.selectColumn = exports.moveCursorBackward = exports.hideInsertColumnOrRowButton = exports.deleteTableIfSelected = exports.deleteTable = exports.convertFirstRowToHeader = exports.autoSizeTable = exports.addResizeHandleDecorations = exports.addBoldInEmptyHeaderCells = void 0;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
9
  var _prosemirrorState = require("prosemirror-state");
10
- var _tableMap = require("@atlaskit/editor-tables/table-map");
10
+ var _utils = require("@atlaskit/editor-common/utils");
11
11
  var _cellSelection = require("@atlaskit/editor-tables/cell-selection");
12
- var _utils = require("@atlaskit/editor-tables/utils");
13
- var _utils2 = require("@atlaskit/editor-common/utils");
12
+ var _tableMap = require("@atlaskit/editor-tables/table-map");
13
+ var _utils2 = require("@atlaskit/editor-tables/utils");
14
14
  var _plugin = require("../pm-plugins/decorations/plugin");
15
15
  var _utils3 = require("../pm-plugins/decorations/utils");
16
16
  var _pluginFactory = require("../pm-plugins/plugin-factory");
@@ -38,10 +38,10 @@ exports.setEditorFocus = setEditorFocus;
38
38
  var setTableRef = function setTableRef(ref) {
39
39
  return (0, _pluginFactory.createCommand)(function (state) {
40
40
  var tableRef = ref;
41
- var foundTable = (0, _utils.findTable)(state.selection);
41
+ var foundTable = (0, _utils2.findTable)(state.selection);
42
42
  var tableNode = ref && foundTable ? foundTable.node : undefined;
43
43
  var tablePos = ref && foundTable ? foundTable.pos : undefined;
44
- var tableWrapperTarget = (0, _utils2.closestElement)(tableRef, ".".concat(_types.TableCssClassName.TABLE_NODE_WRAPPER)) || undefined;
44
+ var tableWrapperTarget = (0, _utils.closestElement)(tableRef, ".".concat(_types.TableCssClassName.TABLE_NODE_WRAPPER)) || undefined;
45
45
  var layout = tableNode ? tableNode.attrs.layout : undefined;
46
46
  var decorationSet = (0, _updatePluginStateDecorations.updatePluginStateDecorations)(state, (0, _decoration.createColumnControlsDecoration)(state.selection), _types.TableDecorations.COLUMN_CONTROLS_DECORATIONS);
47
47
  return {
@@ -84,7 +84,7 @@ var setCellAttr = function setCellAttr(name, value) {
84
84
  return true;
85
85
  }
86
86
  } else {
87
- var cell = (0, _utils.selectionCell)(state.selection);
87
+ var cell = (0, _utils2.selectionCell)(state.selection);
88
88
  if (cell) {
89
89
  if (dispatch) {
90
90
  var _cell$nodeAfter, _cell$nodeAfter2;
@@ -102,13 +102,13 @@ var triggerUnlessTableHeader = function triggerUnlessTableHeader(command) {
102
102
  var selection = state.selection,
103
103
  tableHeader = state.schema.nodes.tableHeader;
104
104
  if (selection instanceof _prosemirrorState.TextSelection) {
105
- var cell = (0, _utils.findCellClosestToPos)(selection.$from);
105
+ var cell = (0, _utils2.findCellClosestToPos)(selection.$from);
106
106
  if (cell && cell.node.type !== tableHeader) {
107
107
  return command(state, dispatch, view);
108
108
  }
109
109
  }
110
110
  if (selection instanceof _cellSelection.CellSelection) {
111
- var rect = (0, _utils.getSelectionRect)(selection);
111
+ var rect = (0, _utils2.getSelectionRect)(selection);
112
112
  if (!(0, _nodes.checkIfHeaderRowEnabled)(selection) || rect && rect.top > 0) {
113
113
  return command(state, dispatch, view);
114
114
  }
@@ -121,7 +121,7 @@ var transformSliceRemoveCellBackgroundColor = function transformSliceRemoveCellB
121
121
  var _schema$nodes = schema.nodes,
122
122
  tableCell = _schema$nodes.tableCell,
123
123
  tableHeader = _schema$nodes.tableHeader;
124
- return (0, _utils2.mapSlice)(slice, function (maybeCell) {
124
+ return (0, _utils.mapSlice)(slice, function (maybeCell) {
125
125
  if (maybeCell.type === tableCell || maybeCell.type === tableHeader) {
126
126
  var cellAttrs = _objectSpread({}, maybeCell.attrs);
127
127
  cellAttrs.background = undefined;
@@ -136,7 +136,7 @@ var transformSliceToAddTableHeaders = function transformSliceToAddTableHeaders(s
136
136
  table = _schema$nodes2.table,
137
137
  tableHeader = _schema$nodes2.tableHeader,
138
138
  tableRow = _schema$nodes2.tableRow;
139
- return (0, _utils2.mapSlice)(slice, function (maybeTable) {
139
+ return (0, _utils.mapSlice)(slice, function (maybeTable) {
140
140
  if (maybeTable.type === table) {
141
141
  var firstRow = maybeTable.firstChild;
142
142
  if (firstRow) {
@@ -156,7 +156,7 @@ var transformSliceToRemoveColumnsWidths = function transformSliceToRemoveColumns
156
156
  var _schema$nodes3 = schema.nodes,
157
157
  tableHeader = _schema$nodes3.tableHeader,
158
158
  tableCell = _schema$nodes3.tableCell;
159
- return (0, _utils2.mapSlice)(slice, function (maybeCell) {
159
+ return (0, _utils.mapSlice)(slice, function (maybeCell) {
160
160
  if (maybeCell.type === tableCell || maybeCell.type === tableHeader) {
161
161
  if (!maybeCell.attrs.colwidth) {
162
162
  return maybeCell;
@@ -171,13 +171,13 @@ var transformSliceToRemoveColumnsWidths = function transformSliceToRemoveColumns
171
171
  exports.transformSliceToRemoveColumnsWidths = transformSliceToRemoveColumnsWidths;
172
172
  var deleteTable = function deleteTable(state, dispatch) {
173
173
  if (dispatch) {
174
- dispatch((0, _utils.removeTable)(state.tr));
174
+ dispatch((0, _utils2.removeTable)(state.tr));
175
175
  }
176
176
  return true;
177
177
  };
178
178
  exports.deleteTable = deleteTable;
179
179
  var deleteTableIfSelected = function deleteTableIfSelected(state, dispatch) {
180
- if ((0, _utils.isTableSelected)(state.selection)) {
180
+ if ((0, _utils2.isTableSelected)(state.selection)) {
181
181
  return deleteTable(state, dispatch);
182
182
  }
183
183
  return false;
@@ -185,7 +185,7 @@ var deleteTableIfSelected = function deleteTableIfSelected(state, dispatch) {
185
185
  exports.deleteTableIfSelected = deleteTableIfSelected;
186
186
  var convertFirstRowToHeader = function convertFirstRowToHeader(schema) {
187
187
  return function (tr) {
188
- var table = (0, _utils.findTable)(tr.selection);
188
+ var table = (0, _utils2.findTable)(tr.selection);
189
189
  var map = _tableMap.TableMap.get(table.node);
190
190
  for (var i = 0; i < map.width; i++) {
191
191
  var cell = table.node.child(0).child(i);
@@ -262,16 +262,16 @@ var setMultipleCellAttrs = function setMultipleCellAttrs(attrs, targetCellPositi
262
262
  return function (state, dispatch) {
263
263
  var cursorPos;
264
264
  var tr = state.tr;
265
- if ((0, _utils.isSelectionType)(tr.selection, 'cell')) {
265
+ if ((0, _utils2.isSelectionType)(tr.selection, 'cell')) {
266
266
  var selection = tr.selection;
267
267
  selection.forEachCell(function (_cell, pos) {
268
268
  var $pos = tr.doc.resolve(tr.mapping.map(pos + 1));
269
- tr = (0, _utils.setCellAttrs)((0, _utils.findCellClosestToPos)($pos), attrs)(tr);
269
+ tr = (0, _utils2.setCellAttrs)((0, _utils2.findCellClosestToPos)($pos), attrs)(tr);
270
270
  });
271
271
  cursorPos = selection.$headCell.pos;
272
272
  } else if (targetCellPosition) {
273
- var cell = (0, _utils.findCellClosestToPos)(tr.doc.resolve(targetCellPosition + 1));
274
- tr = (0, _utils.setCellAttrs)(cell, attrs)(tr);
273
+ var cell = (0, _utils2.findCellClosestToPos)(tr.doc.resolve(targetCellPosition + 1));
274
+ tr = (0, _utils2.setCellAttrs)(cell, attrs)(tr);
275
275
  cursorPos = cell.pos;
276
276
  }
277
277
  if (tr.docChanged && cursorPos !== undefined) {
@@ -286,11 +286,11 @@ var setMultipleCellAttrs = function setMultipleCellAttrs(attrs, targetCellPositi
286
286
  exports.setMultipleCellAttrs = setMultipleCellAttrs;
287
287
  var selectColumn = function selectColumn(column, expand) {
288
288
  return (0, _pluginFactory.createCommand)(function (state) {
289
- var cells = (0, _utils.getCellsInColumn)(column)(state.tr.selection);
289
+ var cells = (0, _utils2.getCellsInColumn)(column)(state.tr.selection);
290
290
  if (!cells || !cells.length || typeof cells[0].pos !== 'number') {
291
291
  return false;
292
292
  }
293
- var decorations = (0, _decoration.createColumnSelectedDecoration)((0, _utils.selectColumn)(column, expand)(state.tr));
293
+ var decorations = (0, _decoration.createColumnSelectedDecoration)((0, _utils2.selectColumn)(column, expand)(state.tr));
294
294
  var decorationSet = (0, _updatePluginStateDecorations.updatePluginStateDecorations)(state, decorations, _types.TableDecorations.COLUMN_SELECTED);
295
295
  var targetCellPosition = cells[0].pos;
296
296
  return {
@@ -301,14 +301,14 @@ var selectColumn = function selectColumn(column, expand) {
301
301
  }
302
302
  };
303
303
  }, function (tr) {
304
- return (0, _utils.selectColumn)(column, expand)(tr).setMeta('addToHistory', false);
304
+ return (0, _utils2.selectColumn)(column, expand)(tr).setMeta('addToHistory', false);
305
305
  });
306
306
  };
307
307
  exports.selectColumn = selectColumn;
308
308
  var selectRow = function selectRow(row, expand) {
309
309
  return (0, _pluginFactory.createCommand)(function (state) {
310
310
  var targetCellPosition;
311
- var cells = (0, _utils.getCellsInRow)(row)(state.tr.selection);
311
+ var cells = (0, _utils2.getCellsInRow)(row)(state.tr.selection);
312
312
  if (cells && cells.length) {
313
313
  targetCellPosition = cells[0].pos;
314
314
  }
@@ -319,7 +319,7 @@ var selectRow = function selectRow(row, expand) {
319
319
  }
320
320
  };
321
321
  }, function (tr) {
322
- return (0, _utils.selectRow)(row, expand)(tr).setMeta('addToHistory', false);
322
+ return (0, _utils2.selectRow)(row, expand)(tr).setMeta('addToHistory', false);
323
323
  });
324
324
  };
325
325
  exports.selectRow = selectRow;
@@ -359,7 +359,7 @@ var hideInsertColumnOrRowButton = function hideInsertColumnOrRowButton() {
359
359
  exports.hideInsertColumnOrRowButton = hideInsertColumnOrRowButton;
360
360
  var addResizeHandleDecorations = function addResizeHandleDecorations(rowIndex, columnIndex) {
361
361
  return (0, _pluginFactory.createCommand)(function (state) {
362
- var tableNode = (0, _utils.findTable)(state.selection);
362
+ var tableNode = (0, _utils2.findTable)(state.selection);
363
363
  var _getPluginState = (0, _pluginFactory.getPluginState)(state),
364
364
  allowColumnResizing = _getPluginState.pluginConfig.allowColumnResizing;
365
365
  if (!tableNode || !allowColumnResizing) {
@@ -394,7 +394,7 @@ var addBoldInEmptyHeaderCells = function addBoldInEmptyHeaderCells(tableCellHead
394
394
  var tr = state.tr;
395
395
  if (
396
396
  // Avoid infinite loop when the current selection is not a TextSelection
397
- (0, _utils2.isTextSelection)(tr.selection) && tr.selection.$cursor &&
397
+ (0, _utils.isTextSelection)(tr.selection) && tr.selection.$cursor &&
398
398
  // When storedMark is null that means this is the initial state
399
399
  // if the user press to remove the mark storedMark will be an empty array
400
400
  // and we shouldn't apply the strong mark
@@ -402,7 +402,7 @@ var addBoldInEmptyHeaderCells = function addBoldInEmptyHeaderCells(tableCellHead
402
402
  // Check if the current node is a direct child from paragraph
403
403
  tr.selection.$from.depth === tableCellHeader.depth + 1 &&
404
404
  // this logic is applied only for empty paragraph
405
- tableCellHeader.node.nodeSize === 4 && (0, _utils2.isParagraph)(tableCellHeader.node.firstChild, state.schema)) {
405
+ tableCellHeader.node.nodeSize === 4 && (0, _utils.isParagraph)(tableCellHeader.node.firstChild, state.schema)) {
406
406
  var strong = state.schema.marks.strong;
407
407
  tr.setStoredMarks([strong.create()]).setMeta('addToHistory', false);
408
408
  if (dispatch) {
@@ -4,8 +4,8 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.removeDescendantNodes = void 0;
7
- var _pluginFactory = require("../pm-plugins/plugin-factory");
8
7
  var _utils = require("@atlaskit/editor-common/utils");
8
+ var _pluginFactory = require("../pm-plugins/plugin-factory");
9
9
  var removeDescendantNodes = function removeDescendantNodes(sourceNode) {
10
10
  return (0, _pluginFactory.createCommand)({
11
11
  type: 'UPDATE_STATE',
@@ -5,10 +5,10 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.arrowRightFromTable = exports.arrowLeftFromTable = exports.TableSelectionDirection = void 0;
7
7
  var _prosemirrorState = require("prosemirror-state");
8
- var _tableMap = require("@atlaskit/editor-tables/table-map");
8
+ var _selection = require("@atlaskit/editor-common/selection");
9
9
  var _cellSelection = require("@atlaskit/editor-tables/cell-selection");
10
+ var _tableMap = require("@atlaskit/editor-tables/table-map");
10
11
  var _utils = require("@atlaskit/editor-tables/utils");
11
- var _selection = require("@atlaskit/editor-common/selection");
12
12
  var TableSelectionDirection = /*#__PURE__*/function (TableSelectionDirection) {
13
13
  TableSelectionDirection["TopToBottom"] = "TopToBottom";
14
14
  TableSelectionDirection["BottomToTop"] = "BottomToTop";
@@ -5,11 +5,11 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.sortByColumn = void 0;
7
7
  var _prosemirrorState = require("prosemirror-state");
8
+ var _steps = require("@atlaskit/adf-schema/steps");
9
+ var _utils = require("@atlaskit/editor-common/utils");
8
10
  var _tableMap = require("@atlaskit/editor-tables/table-map");
9
- var _utils = require("@atlaskit/editor-tables/utils");
10
- var _utils2 = require("@atlaskit/editor-common/utils");
11
+ var _utils2 = require("@atlaskit/editor-tables/utils");
11
12
  var _pluginFactory = require("../pm-plugins/plugin-factory");
12
- var _steps = require("@atlaskit/adf-schema/steps");
13
13
  var createGetInlineCardTextFromStore = function createGetInlineCardTextFromStore(attrs) {
14
14
  var _ref = attrs,
15
15
  data = _ref.data;
@@ -33,21 +33,21 @@ var sortByColumn = function sortByColumn(columnIndex) {
33
33
  }
34
34
  };
35
35
  }, function (tr, state) {
36
- var table = (0, _utils.findTable)(tr.selection);
36
+ var table = (0, _utils2.findTable)(tr.selection);
37
37
  if (!table || !table.node) {
38
38
  return tr;
39
39
  }
40
- var selectionRect = (0, _utils.isSelectionType)(tr.selection, 'cell') ? (0, _utils.getSelectionRect)(tr.selection) : (0, _utils.findCellRectClosestToPos)(tr.selection.$from);
40
+ var selectionRect = (0, _utils2.isSelectionType)(tr.selection, 'cell') ? (0, _utils2.getSelectionRect)(tr.selection) : (0, _utils2.findCellRectClosestToPos)(tr.selection.$from);
41
41
  if (!selectionRect) {
42
42
  return tr;
43
43
  }
44
44
  var tablePluginState = (0, _pluginFactory.getPluginState)(state);
45
- var tableArray = (0, _utils.convertTableNodeToArrayOfRows)(table.node);
45
+ var tableArray = (0, _utils2.convertTableNodeToArrayOfRows)(table.node);
46
46
  var headerRow;
47
47
  if (tablePluginState.isHeaderRowEnabled) {
48
48
  headerRow = tableArray.shift();
49
49
  }
50
- var compareNodesInOrder = (0, _utils2.createCompareNodes)({
50
+ var compareNodesInOrder = (0, _utils.createCompareNodes)({
51
51
  getInlineCardTextFromStore: createGetInlineCardTextFromStore
52
52
  }, order);
53
53
  var sortedTable = tableArray.sort(function (rowA, rowB) {
@@ -56,7 +56,7 @@ var sortByColumn = function sortByColumn(columnIndex) {
56
56
  if (headerRow) {
57
57
  sortedTable.unshift(headerRow);
58
58
  }
59
- var newTableNode = (0, _utils.convertArrayOfRowsToTableNode)(table.node, sortedTable);
59
+ var newTableNode = (0, _utils2.convertArrayOfRowsToTableNode)(table.node, sortedTable);
60
60
  tr.replaceWith(table.pos, table.pos + table.node.nodeSize, newTableNode);
61
61
  var pos = _tableMap.TableMap.get(table.node).positionAt(selectionRect.top, columnIndex, table.node);
62
62
  var prev = tablePluginState.ordering;
@@ -6,10 +6,10 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.wrapTableInExpandWithAnalytics = exports.toggleTableLayoutWithAnalytics = exports.toggleNumberColumnWithAnalytics = exports.toggleHeaderRowWithAnalytics = exports.toggleHeaderColumnWithAnalytics = exports.splitCellWithAnalytics = exports.sortColumnWithAnalytics = exports.setColorWithAnalytics = exports.mergeCellsWithAnalytics = exports.insertRowWithAnalytics = exports.insertColumnWithAnalytics = exports.emptyMultipleCellsWithAnalytics = exports.distributeColumnsWidthsWithAnalytics = exports.deleteTableWithAnalytics = exports.deleteTableIfSelectedWithAnalytics = exports.deleteRowsWithAnalytics = exports.deleteColumnsWithAnalytics = exports.addRowAroundSelection = void 0;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
- var _cellSelection = require("@atlaskit/editor-tables/cell-selection");
10
- var _utils = require("@atlaskit/editor-tables/utils");
11
9
  var _adfSchema = require("@atlaskit/adf-schema");
12
10
  var _analytics = require("@atlaskit/editor-common/analytics");
11
+ var _cellSelection = require("@atlaskit/editor-tables/cell-selection");
12
+ var _utils = require("@atlaskit/editor-tables/utils");
13
13
  var _clear = require("./commands/clear");
14
14
  var _collapse = require("./commands/collapse");
15
15
  var _insert = require("./commands/insert");
@@ -17,8 +17,8 @@ var _misc = require("./commands/misc");
17
17
  var _sort = require("./commands/sort");
18
18
  var _splitCell = require("./commands/split-cell");
19
19
  var _toggle = require("./commands/toggle");
20
- var _commands = require("./pm-plugins/table-resizing/commands");
21
20
  var _pluginFactory = require("./pm-plugins/plugin-factory");
21
+ var _commands = require("./pm-plugins/table-resizing/commands");
22
22
  var _transforms = require("./transforms");
23
23
  var _utils2 = require("./utils");
24
24
  var _analytics2 = require("./utils/analytics");
@@ -9,11 +9,11 @@ exports.handleTripleClick = handleTripleClick;
9
9
  exports.whenTableInFocus = void 0;
10
10
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
11
11
  var _prosemirrorState = require("prosemirror-state");
12
+ var _analytics = require("@atlaskit/editor-common/analytics");
13
+ var _utils = require("@atlaskit/editor-common/utils");
12
14
  var _cellSelection = require("@atlaskit/editor-tables/cell-selection");
13
15
  var _tableMap = require("@atlaskit/editor-tables/table-map");
14
- var _utils = require("@atlaskit/editor-tables/utils");
15
- var _utils2 = require("@atlaskit/editor-common/utils");
16
- var _analytics = require("@atlaskit/editor-common/analytics");
16
+ var _utils2 = require("@atlaskit/editor-tables/utils");
17
17
  var _commands = require("./commands");
18
18
  var _pluginFactory = require("./pm-plugins/plugin-factory");
19
19
  var _pluginFactory2 = require("./pm-plugins/table-resizing/plugin-factory");
@@ -35,7 +35,7 @@ var handleBlur = function handleBlur(view, event) {
35
35
  dispatch = view.dispatch;
36
36
  // IE version check for ED-4665
37
37
  // Calendar focus check for ED-10466
38
- if (_utils2.browser.ie_version !== 11 && !isFocusingCalendar(event) && !isFocusingModal(event) && !isFocusingFloatingToolbar(event)) {
38
+ if (_utils.browser.ie_version !== 11 && !isFocusingCalendar(event) && !isFocusingModal(event) && !isFocusingFloatingToolbar(event)) {
39
39
  (0, _commands.setEditorFocus)(false)(state, dispatch);
40
40
  }
41
41
  event.preventDefault();
@@ -55,7 +55,7 @@ var handleClick = function handleClick(view, event) {
55
55
  return false;
56
56
  }
57
57
  var element = event.target;
58
- var table = (0, _utils.findTable)(view.state.selection);
58
+ var table = (0, _utils2.findTable)(view.state.selection);
59
59
  if (event instanceof MouseEvent && (0, _utils3.isColumnControlsDecorations)(element)) {
60
60
  var _getColumnOrRowIndex = (0, _utils3.getColumnOrRowIndex)(element),
61
61
  _getColumnOrRowIndex2 = (0, _slicedToArray2.default)(_getColumnOrRowIndex, 1),
@@ -67,15 +67,15 @@ var handleClick = function handleClick(view, event) {
67
67
  var matchfn = element.matches ? element.matches : element.msMatchesSelector;
68
68
 
69
69
  // check if the table cell with an image is clicked and its not the image itself
70
- if (!table || !(0, _utils2.isElementInTableCell)(element) || !matchfn || matchfn.call(element, 'table .image, table p, table .image div')) {
70
+ if (!table || !(0, _utils.isElementInTableCell)(element) || !matchfn || matchfn.call(element, 'table .image, table p, table .image div')) {
71
71
  return false;
72
72
  }
73
73
  var map = _tableMap.TableMap.get(table.node);
74
74
 
75
75
  /** Getting the offset of current item clicked */
76
- var colElement = (0, _utils2.closestElement)(element, 'td') || (0, _utils2.closestElement)(element, 'th');
76
+ var colElement = (0, _utils.closestElement)(element, 'td') || (0, _utils.closestElement)(element, 'th');
77
77
  var colIndex = colElement && colElement.cellIndex;
78
- var rowElement = (0, _utils2.closestElement)(element, 'tr');
78
+ var rowElement = (0, _utils.closestElement)(element, 'tr');
79
79
  var rowIndex = rowElement && rowElement.rowIndex;
80
80
  var cellIndex = map.width * rowIndex + colIndex;
81
81
  var dispatch = view.dispatch,
@@ -88,11 +88,11 @@ var handleClick = function handleClick(view, event) {
88
88
  }
89
89
  var editorElement = table.node.nodeAt(cellPos);
90
90
  /** Only if the last item is media group, insert a paragraph */
91
- if ((0, _utils2.isLastItemMediaGroup)(editorElement)) {
91
+ if ((0, _utils.isLastItemMediaGroup)(editorElement)) {
92
92
  var posInTable = map.map[cellIndex] + editorElement.nodeSize;
93
93
  tr.insert(posInTable + table.pos, paragraph.create());
94
94
  dispatch(tr);
95
- (0, _utils2.setNodeSelection)(view, posInTable + table.pos);
95
+ (0, _utils.setNodeSelection)(view, posInTable + table.pos);
96
96
  }
97
97
  return true;
98
98
  };
@@ -234,9 +234,9 @@ var handleMouseMove = function handleMouseMove(getEditorFeatureFlags) {
234
234
  var _getPluginState5 = (0, _pluginFactory.getPluginState)(_state4),
235
235
  resizeHandleColumnIndex = _getPluginState5.resizeHandleColumnIndex,
236
236
  resizeHandleRowIndex = _getPluginState5.resizeHandleRowIndex;
237
- var tableCell = (0, _utils2.closestElement)(element, 'td, th');
237
+ var tableCell = (0, _utils.closestElement)(element, 'td, th');
238
238
  var cellStartPosition = view.posAtDOM(tableCell, 0);
239
- var rect = (0, _utils.findCellRectClosestToPos)(_state4.doc.resolve(cellStartPosition));
239
+ var rect = (0, _utils2.findCellRectClosestToPos)(_state4.doc.resolve(cellStartPosition));
240
240
  if (rect) {
241
241
  var columnEndIndexTarget = _positionColumn === 'left' ? rect.left : rect.right;
242
242
  var rowIndexTarget = rect.top;
@@ -256,7 +256,7 @@ exports.handleMouseMove = handleMouseMove;
256
256
  function handleTripleClick(view, pos) {
257
257
  var state = view.state,
258
258
  dispatch = view.dispatch;
259
- var $cellPos = (0, _utils.cellAround)(state.doc.resolve(pos));
259
+ var $cellPos = (0, _utils2.cellAround)(state.doc.resolve(pos));
260
260
  if (!$cellPos) {
261
261
  return false;
262
262
  }
@@ -280,7 +280,7 @@ var handleCut = function handleCut(oldTr, oldState, newState, editorAnalyticsAPI
280
280
  var cellSelection = new _cellSelection.CellSelection($anchorCell, $headCell);
281
281
  tr.setSelection(cellSelection);
282
282
  if (tr.selection instanceof _cellSelection.CellSelection) {
283
- var rect = (0, _utils.getSelectionRect)(cellSelection);
283
+ var rect = (0, _utils2.getSelectionRect)(cellSelection);
284
284
  if (rect) {
285
285
  var _getSelectedCellInfo = (0, _utils3.getSelectedCellInfo)(tr.selection),
286
286
  verticalCells = _getSelectedCellInfo.verticalCells,
@@ -308,7 +308,7 @@ var handleCut = function handleCut(oldTr, oldState, newState, editorAnalyticsAPI
308
308
  if (tr.selection instanceof _cellSelection.CellSelection) {
309
309
  var isTableSelected = tr.selection.isRowSelection() && tr.selection.isColSelection();
310
310
  if (isTableSelected) {
311
- tr = (0, _utils.removeTable)(tr);
311
+ tr = (0, _utils2.removeTable)(tr);
312
312
  } else if (tr.selection.isRowSelection()) {
313
313
  var _getPluginState6 = (0, _pluginFactory.getPluginState)(newState),
314
314
  isHeaderRowRequired = _getPluginState6.pluginConfig.isHeaderRowRequired;
@@ -7,17 +7,16 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.handleDocOrSelectionChanged = void 0;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
9
  var _prosemirrorUtils = require("prosemirror-utils");
10
- var _utils = require("@atlaskit/editor-tables/utils");
11
- var _utils2 = require("@atlaskit/editor-common/utils");
12
- var _collapse = require("./utils/collapse");
10
+ var _steps = require("@atlaskit/adf-schema/steps");
11
+ var _utils = require("@atlaskit/editor-common/utils");
12
+ var _utils2 = require("@atlaskit/editor-tables/utils");
13
13
  var _defaultTableSelection = require("./pm-plugins/default-table-selection");
14
14
  var _tableResizing = require("./pm-plugins/table-resizing");
15
- var _steps = require("@atlaskit/adf-schema/steps");
15
+ var _collapse = require("./utils/collapse");
16
16
  var _nodes = require("./utils/nodes");
17
17
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
18
18
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } // #region Imports
19
19
  // @ts-ignore -- ReadonlyTransaction is a local declaration and will cause a TS2305 error in CCFE typecheck
20
- // #endregion
21
20
  var nextTableSorting = function nextTableSorting(tr, table) {
22
21
  var tableSortStep = tr.steps.find(function (step) {
23
22
  return step instanceof _steps.TableSortStep;
@@ -58,7 +57,7 @@ var updateTableNodePluginState = function updateTableNodePluginState(_ref2) {
58
57
  table = _ref2.table;
59
58
  return function (pluginState) {
60
59
  var tableNode = table && table.node;
61
- if (!tableNode || (0, _utils2.isTextInput)(tr)) {
60
+ if (!tableNode || (0, _utils.isTextInput)(tr)) {
62
61
  return pluginState;
63
62
  }
64
63
  return _objectSpread(_objectSpread(_objectSpread({}, pluginState), _defaultTableSelection.defaultTableSelection), {}, {
@@ -122,7 +121,7 @@ var buildPluginState = function buildPluginState(builders) {
122
121
  var handleDocOrSelectionChanged = function handleDocOrSelectionChanged(tr, pluginState) {
123
122
  return buildPluginState([updateTargetCellPosition, updateTableNodePluginState, updateCollapseHandler])({
124
123
  tr: tr,
125
- table: (0, _utils.findTable)(tr.selection)
124
+ table: (0, _utils2.findTable)(tr.selection)
126
125
  })(pluginState);
127
126
  };
128
127
  exports.handleDocOrSelectionChanged = handleDocOrSelectionChanged;
@@ -6,27 +6,28 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.default = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
+ var _adfSchema = require("@atlaskit/adf-schema");
10
+ var _analytics = require("@atlaskit/editor-common/analytics");
11
+ var _errorBoundary = require("@atlaskit/editor-common/error-boundary");
12
+ var _icons = require("@atlaskit/editor-common/icons");
13
+ var _keymaps = require("@atlaskit/editor-common/keymaps");
14
+ var _messages = require("@atlaskit/editor-common/messages");
9
15
  var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
10
16
  var _utils = require("@atlaskit/editor-common/utils");
17
+ var _withPluginState = require("@atlaskit/editor-common/with-plugin-state");
11
18
  var _pmPlugins = require("@atlaskit/editor-tables/pm-plugins");
12
19
  var _utils2 = require("@atlaskit/editor-tables/utils");
13
- var _adfSchema = require("@atlaskit/adf-schema");
14
- var _keymaps = require("@atlaskit/editor-common/keymaps");
15
- var _withPluginState = require("@atlaskit/editor-common/with-plugin-state");
16
- var _analytics = require("@atlaskit/editor-common/analytics");
17
- var _messages = require("@atlaskit/editor-common/messages");
18
- var _icons = require("@atlaskit/editor-common/icons");
19
20
  var _createPluginConfig = require("./create-plugin-config");
20
- var _tableLocalId = require("./pm-plugins/table-local-id");
21
- var _tableWidth = require("./pm-plugins/table-width");
22
- var _safariDeleteCompositionTextIssueWorkaround = require("./pm-plugins/safari-delete-composition-text-issue-workaround");
23
21
  var _plugin = require("./pm-plugins/decorations/plugin");
24
22
  var _keymap = require("./pm-plugins/keymap");
25
- var _tableSelectionKeymap = require("./pm-plugins/table-selection-keymap");
26
23
  var _main = require("./pm-plugins/main");
27
24
  var _pluginKey = require("./pm-plugins/plugin-key");
25
+ var _safariDeleteCompositionTextIssueWorkaround = require("./pm-plugins/safari-delete-composition-text-issue-workaround");
28
26
  var _stickyHeaders = require("./pm-plugins/sticky-headers");
27
+ var _tableLocalId = require("./pm-plugins/table-local-id");
29
28
  var _tableResizing = require("./pm-plugins/table-resizing");
29
+ var _tableSelectionKeymap = require("./pm-plugins/table-selection-keymap");
30
+ var _tableWidth = require("./pm-plugins/table-width");
30
31
  var _toolbar = require("./toolbar");
31
32
  var _FloatingContextualButton = _interopRequireDefault(require("./ui/FloatingContextualButton"));
32
33
  var _FloatingContextualMenu = _interopRequireDefault(require("./ui/FloatingContextualMenu"));
@@ -34,8 +35,6 @@ var _FloatingDeleteButton = _interopRequireDefault(require("./ui/FloatingDeleteB
34
35
  var _FloatingInsertButton = _interopRequireDefault(require("./ui/FloatingInsertButton"));
35
36
  var _LayoutButton = _interopRequireDefault(require("./ui/LayoutButton"));
36
37
  var _utils3 = require("./utils");
37
- var _errorBoundary = require("@atlaskit/editor-common/error-boundary");
38
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
39
38
  var defaultGetEditorFeatureFlags = function defaultGetEditorFeatureFlags() {
40
39
  return {};
41
40
  };
@@ -74,7 +73,7 @@ var tablesPlugin = function tablesPlugin(options, api) {
74
73
  }
75
74
  },
76
75
  nodes: function nodes() {
77
- var tableNode = (0, _platformFeatureFlags.getBooleanFF)('platform.editor.custom-table-width') ? _adfSchema.tableWithCustomWidth : _adfSchema.table;
76
+ var tableNode = options !== null && options !== void 0 && options.tableResizingEnabled ? _adfSchema.tableWithCustomWidth : _adfSchema.table;
78
77
  return [{
79
78
  name: 'table',
80
79
  node: tableNode
@@ -100,10 +99,11 @@ var tablesPlugin = function tablesPlugin(options, api) {
100
99
  var _ref2 = options || {},
101
100
  fullWidthEnabled = _ref2.fullWidthEnabled,
102
101
  wasFullWidthEnabled = _ref2.wasFullWidthEnabled,
102
+ tableResizingEnabled = _ref2.tableResizingEnabled,
103
103
  breakoutEnabled = _ref2.breakoutEnabled,
104
104
  tableOptions = _ref2.tableOptions,
105
105
  getEditorFeatureFlags = _ref2.getEditorFeatureFlags;
106
- return (0, _main.createPlugin)(dispatchAnalyticsEvent, dispatch, portalProviderAPI, eventDispatcher, (0, _createPluginConfig.pluginConfig)(tableOptions), defaultGetEditorContainerWidth, getEditorFeatureFlags || defaultGetEditorFeatureFlags, breakoutEnabled, fullWidthEnabled, wasFullWidthEnabled, editorAnalyticsAPI, api);
106
+ return (0, _main.createPlugin)(dispatchAnalyticsEvent, dispatch, portalProviderAPI, eventDispatcher, (0, _createPluginConfig.pluginConfig)(tableOptions), defaultGetEditorContainerWidth, getEditorFeatureFlags || defaultGetEditorFeatureFlags, breakoutEnabled, fullWidthEnabled, tableResizingEnabled, wasFullWidthEnabled, editorAnalyticsAPI, api);
107
107
  }
108
108
  }, {
109
109
  name: 'tablePMColResizing',
@@ -176,7 +176,7 @@ var tablesPlugin = function tablesPlugin(options, api) {
176
176
  plugin: function plugin(_ref8) {
177
177
  var _options$fullWidthEna;
178
178
  var dispatch = _ref8.dispatch;
179
- return (0, _platformFeatureFlags.getBooleanFF)('platform.editor.custom-table-width') ? (0, _tableWidth.createPlugin)(dispatch, (_options$fullWidthEna = options === null || options === void 0 ? void 0 : options.fullWidthEnabled) !== null && _options$fullWidthEna !== void 0 ? _options$fullWidthEna : false) : undefined;
179
+ return options !== null && options !== void 0 && options.tableResizingEnabled ? (0, _tableWidth.createPlugin)(dispatch, (_options$fullWidthEna = options === null || options === void 0 ? void 0 : options.fullWidthEnabled) !== null && _options$fullWidthEna !== void 0 ? _options$fullWidthEna : false) : undefined;
180
180
  }
181
181
  }, {
182
182
  name: 'tableGetEditorViewReferencePlugin',
@@ -247,7 +247,7 @@ var tablesPlugin = function tablesPlugin(options, api) {
247
247
  tableWrapperTarget = _ref11.tableWrapperTarget;
248
248
  var allowControls = pluginConfig.allowControls;
249
249
  var stickyHeader = stickyHeadersState ? (0, _stickyHeaders.findStickyHeaderForTable)(stickyHeadersState, tablePos) : undefined;
250
- var LayoutContent = (0, _platformFeatureFlags.getBooleanFF)('platform.editor.custom-table-width') ? null : (0, _utils3.isLayoutSupported)(state) && options && options.breakoutEnabled ? /*#__PURE__*/_react.default.createElement(_LayoutButton.default, {
250
+ var LayoutContent = options && !options.tableResizingEnabled && (0, _utils3.isLayoutSupported)(state) && options.breakoutEnabled ? /*#__PURE__*/_react.default.createElement(_LayoutButton.default, {
251
251
  editorView: editorView,
252
252
  mountPoint: popupsMountPoint,
253
253
  boundariesElement: popupsBoundariesElement,