@atlaskit/editor-plugin-table 2.3.0 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (427) hide show
  1. package/.eslintrc.js +6 -0
  2. package/CHANGELOG.md +12 -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 +10 -8
  15. package/dist/cjs/plugins/table/nodeviews/TableResizer.js +2 -2
  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 +21 -18
  72. package/dist/es2019/plugins/table/nodeviews/TableContainer.js +10 -9
  73. package/dist/es2019/plugins/table/nodeviews/TableResizer.js +4 -4
  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 +39 -36
  133. package/dist/esm/plugins/table/nodeviews/TableContainer.js +10 -9
  134. package/dist/esm/plugins/table/nodeviews/TableResizer.js +4 -4
  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 +11 -3
  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 +23 -30
  361. package/src/plugins/table/nodeviews/TableContainer.tsx +16 -23
  362. package/src/plugins/table/nodeviews/TableResizer.tsx +8 -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
  427. package/tmp/api-report-tmp.d.ts +2 -0
@@ -14,8 +14,8 @@ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime
14
14
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
15
15
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
16
16
  var _react = _interopRequireWildcard(require("react"));
17
- var _reactIntlNext = require("react-intl-next");
18
17
  var _classnames = _interopRequireDefault(require("classnames"));
18
+ var _reactIntlNext = require("react-intl-next");
19
19
  var _tableMap = require("@atlaskit/editor-tables/table-map");
20
20
  var _utils = require("@atlaskit/editor-tables/utils");
21
21
  var _commands = require("../../../commands");
@@ -8,10 +8,10 @@ exports.tableStyles = exports.tableFullPageEditorStyles = exports.tableCommentEd
8
8
  var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
9
9
  var _react = require("@emotion/react");
10
10
  var _styles = require("@atlaskit/editor-common/styles");
11
- var _constants = require("@atlaskit/theme/constants");
12
- var _colors = require("@atlaskit/theme/colors");
13
11
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
14
12
  var _scrollbar = require("@atlaskit/editor-shared-styles/scrollbar");
13
+ var _colors = require("@atlaskit/theme/colors");
14
+ var _constants = require("@atlaskit/theme/constants");
15
15
  var _types = require("../types");
16
16
  var _consts = require("./consts");
17
17
  var _uiStyles = require("./ui-styles");
@@ -4,11 +4,11 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.tableToolbarSize = exports.tableToolbarSelectedColor = exports.tableToolbarDeleteColor = exports.tableToolbarColor = exports.tableTextColor = exports.tableScrollbarOffset = exports.tablePadding = exports.tableMarginFullWidthMode = exports.tableInsertColumnButtonSize = exports.tableInsertColumnButtonOffset = exports.tableHeaderCellBackgroundColor = exports.tableFloatingControlsColor = exports.tableDeleteButtonSize = exports.tableDeleteButtonOffset = exports.tableControlsSpacing = exports.tableCellSelectedColor = exports.tableCellDeleteColor = exports.tableCellBackgroundColor = exports.tableBorderSelectedColor = exports.tableBorderRadiusSize = exports.tableBorderDeleteColor = exports.tableBorderColor = exports.stickyRowZIndex = exports.stickyRowOffsetTop = exports.stickyHeaderBorderBottomWidth = exports.resizeLineWidth = exports.resizeHandlerZIndex = exports.resizeHandlerAreaWidth = exports.lineMarkerSize = exports.lineMarkerOffsetFromColumnControls = exports.layoutButtonSize = exports.contextualMenuTriggerSize = exports.contextualMenuDropdownWidth = exports.columnResizeHandleZIndex = exports.columnControlsZIndex = exports.columnControlsSelectedZIndex = exports.columnControlsDecorationHeight = exports.TABLE_SNAP_GAP = exports.TABLE_HIGHLIGHT_GAP = void 0;
7
- var _colors = require("@atlaskit/theme/colors");
8
7
  var _styles = require("@atlaskit/editor-common/styles");
9
8
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
10
- var _types = require("../types");
9
+ var _colors = require("@atlaskit/theme/colors");
11
10
  var _components = require("@atlaskit/theme/components");
11
+ var _types = require("../types");
12
12
  /**
13
13
  * Basic colors added to prevent content overflow in table cells.
14
14
  */
@@ -10,9 +10,9 @@ var _react = require("@emotion/react");
10
10
  var _styles = require("@atlaskit/editor-common/styles");
11
11
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
12
12
  var _colors = require("@atlaskit/theme/colors");
13
- var _consts = require("./consts");
14
- var _types = require("../types");
15
13
  var _constants = require("@atlaskit/theme/constants");
14
+ var _types = require("../types");
15
+ var _consts = require("./consts");
16
16
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21;
17
17
  var InsertLine = function InsertLine(cssString) {
18
18
  return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .", " {\n background: ", ";\n display: none;\n position: absolute;\n z-index: ", ";\n ", "\n }\n"])), _types.TableCssClassName.CONTROLS_INSERT_LINE, _consts.tableBorderSelectedColor, _editorSharedStyles.akEditorUnitZIndex, cssString);
@@ -6,17 +6,17 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.isColumnDeleteButtonVisible = exports.getColumnsWidths = exports.getColumnDeleteButtonParams = exports.getColumnClassNames = exports.colWidthsForRow = void 0;
8
8
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
9
- var _tableMap = require("@atlaskit/editor-tables/table-map");
10
- var _cellSelection = require("@atlaskit/editor-tables/cell-selection");
11
9
  var _prosemirrorUtils = require("prosemirror-utils");
12
- var _utils = require("@atlaskit/editor-tables/utils");
13
- var _utils2 = require("@atlaskit/editor-common/utils");
10
+ var _utils = require("@atlaskit/editor-common/utils");
11
+ var _cellSelection = require("@atlaskit/editor-tables/cell-selection");
12
+ var _tableMap = require("@atlaskit/editor-tables/table-map");
13
+ var _utils2 = require("@atlaskit/editor-tables/utils");
14
14
  var _types = require("../types");
15
15
  var _consts = require("../ui/consts");
16
16
  var getColumnsWidths = function getColumnsWidths(view) {
17
17
  var selection = view.state.selection;
18
18
  var widths = [];
19
- var table = (0, _utils.findTable)(selection);
19
+ var table = (0, _utils2.findTable)(selection);
20
20
  if (table) {
21
21
  var map = _tableMap.TableMap.get(table.node);
22
22
  var domAtPos = view.domAtPos.bind(view);
@@ -26,7 +26,7 @@ var getColumnsWidths = function getColumnsWidths(view) {
26
26
  length: map.width
27
27
  });
28
28
  for (var i = 0; i < map.width; i++) {
29
- var cells = (0, _utils.getCellsInColumn)(i)(selection);
29
+ var cells = (0, _utils2.getCellsInColumn)(i)(selection);
30
30
  var cell = cells[0];
31
31
  if (cell) {
32
32
  var cellRef = (0, _prosemirrorUtils.findDomRefAtPos)(cell.pos, domAtPos);
@@ -40,14 +40,14 @@ var getColumnsWidths = function getColumnsWidths(view) {
40
40
  };
41
41
  exports.getColumnsWidths = getColumnsWidths;
42
42
  var isColumnDeleteButtonVisible = function isColumnDeleteButtonVisible(selection) {
43
- if (!(0, _utils.isTableSelected)(selection) && selection instanceof _cellSelection.CellSelection && selection.isColSelection()) {
43
+ if (!(0, _utils2.isTableSelected)(selection) && selection instanceof _cellSelection.CellSelection && selection.isColSelection()) {
44
44
  return true;
45
45
  }
46
46
  return false;
47
47
  };
48
48
  exports.isColumnDeleteButtonVisible = isColumnDeleteButtonVisible;
49
49
  var getColumnDeleteButtonParams = function getColumnDeleteButtonParams(columnsWidths, selection) {
50
- var rect = (0, _utils.getSelectionRect)(selection);
50
+ var rect = (0, _utils2.getSelectionRect)(selection);
51
51
  if (!rect) {
52
52
  return null;
53
53
  }
@@ -81,7 +81,7 @@ var getColumnClassNames = function getColumnClassNames(index, selection) {
81
81
  var isInDanger = arguments.length > 3 ? arguments[3] : undefined;
82
82
  var isResizing = arguments.length > 4 ? arguments[4] : undefined;
83
83
  var classNames = [];
84
- if ((0, _utils.isColumnSelected)(index)(selection) || hoveredColumns.indexOf(index) > -1 && !isResizing) {
84
+ if ((0, _utils2.isColumnSelected)(index)(selection) || hoveredColumns.indexOf(index) > -1 && !isResizing) {
85
85
  classNames.push(_types.TableCssClassName.HOVERED_CELL_ACTIVE);
86
86
  if (isInDanger) {
87
87
  classNames.push(_types.TableCssClassName.HOVERED_CELL_IN_DANGER);
@@ -144,7 +144,7 @@ var getRelativeDomCellWidths = function getRelativeDomCellWidths(_ref) {
144
144
  };
145
145
  var colWidthsForRow = function colWidthsForRow(tr) {
146
146
  // get the colspans
147
- var rowColSpans = (0, _utils2.maphElem)(tr, function (cell) {
147
+ var rowColSpans = (0, _utils.maphElem)(tr, function (cell) {
148
148
  return Number(cell.getAttribute('colspan') || 1 /* default to span of 1 */);
149
149
  });
150
150
 
@@ -159,7 +159,7 @@ var colWidthsForRow = function colWidthsForRow(tr) {
159
159
  var copyTarget = tr.nextElementSibling || tr;
160
160
  if (copyTarget) {
161
161
  // either from the first row while it's still in the table
162
- var cellInfos = (0, _utils2.maphElem)(copyTarget, function (cell) {
162
+ var cellInfos = (0, _utils.maphElem)(copyTarget, function (cell) {
163
163
  return {
164
164
  width: cell.getBoundingClientRect().width,
165
165
  colspan: Number(cell.getAttribute('colspan') || 1),
@@ -6,10 +6,10 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.updateDecorations = exports.findControlsHoverDecoration = exports.findColumnControlSelectedDecoration = exports.createResizeHandleDecoration = exports.createControlsHoverDecoration = exports.createColumnSelectedDecoration = exports.createColumnLineResize = exports.createColumnControlsDecoration = exports.createCellHoverDecoration = void 0;
8
8
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
9
- var _tableMap = require("@atlaskit/editor-tables/table-map");
10
- var _utils = require("@atlaskit/editor-tables/utils");
11
9
  var _prosemirrorView = require("prosemirror-view");
12
- var _utils2 = require("@atlaskit/editor-common/utils");
10
+ var _utils = require("@atlaskit/editor-common/utils");
11
+ var _tableMap = require("@atlaskit/editor-tables/table-map");
12
+ var _utils2 = require("@atlaskit/editor-tables/utils");
13
13
  var _types = require("../types");
14
14
  // @ts-ignore -- ReadonlyTransaction is a local declaration and will cause a TS2305 error in CCFE typecheck
15
15
 
@@ -37,7 +37,7 @@ var createCellHoverDecoration = function createCellHoverDecoration(cells) {
37
37
  };
38
38
  exports.createCellHoverDecoration = createCellHoverDecoration;
39
39
  var createControlsHoverDecoration = function createControlsHoverDecoration(cells, type, tr, danger, selected) {
40
- var table = (0, _utils.findTable)(tr.selection);
40
+ var table = (0, _utils2.findTable)(tr.selection);
41
41
  if (!table) {
42
42
  return [];
43
43
  }
@@ -137,8 +137,8 @@ exports.createControlsHoverDecoration = createControlsHoverDecoration;
137
137
  var createColumnSelectedDecoration = function createColumnSelectedDecoration(tr) {
138
138
  var selection = tr.selection,
139
139
  doc = tr.doc;
140
- var table = (0, _utils.findTable)(selection);
141
- var rect = (0, _utils.getSelectionRect)(selection);
140
+ var table = (0, _utils2.findTable)(selection);
141
+ var rect = (0, _utils2.getSelectionRect)(selection);
142
142
  if (!table || !rect) {
143
143
  return [];
144
144
  }
@@ -155,7 +155,7 @@ var createColumnSelectedDecoration = function createColumnSelectedDecoration(tr)
155
155
  };
156
156
  exports.createColumnSelectedDecoration = createColumnSelectedDecoration;
157
157
  var createColumnControlsDecoration = function createColumnControlsDecoration(selection) {
158
- var cells = (0, _utils.getCellsInRow)(0)(selection) || [];
158
+ var cells = (0, _utils2.getCellsInRow)(0)(selection) || [];
159
159
  var index = 0;
160
160
  return cells.map(function (cell) {
161
161
  var colspan = cell.node.attrs.colspan || 1;
@@ -271,7 +271,7 @@ var makeArray = function makeArray(n) {
271
271
  */
272
272
  var createResizeHandleDecoration = function createResizeHandleDecoration(tr, rowIndexTarget, columnEndIndexTarget) {
273
273
  var emptyResult = [[], []];
274
- var table = (0, _utils.findTable)(tr.selection);
274
+ var table = (0, _utils2.findTable)(tr.selection);
275
275
  if (!table || !table.node) {
276
276
  return emptyResult;
277
277
  }
@@ -347,7 +347,7 @@ var createResizeHandleDecoration = function createResizeHandleDecoration(tr, row
347
347
  lastCellElementsDecorations.push(lastCellDec);
348
348
  }
349
349
  }
350
- return [resizeHandleCellDecorations, lastCellElementsDecorations.filter(_utils2.nonNullable)];
350
+ return [resizeHandleCellDecorations, lastCellElementsDecorations.filter(_utils.nonNullable)];
351
351
  };
352
352
 
353
353
  /*
@@ -394,7 +394,7 @@ var createResizeHandleDecoration = function createResizeHandleDecoration(tr, row
394
394
  */
395
395
  exports.createResizeHandleDecoration = createResizeHandleDecoration;
396
396
  var createColumnLineResize = function createColumnLineResize(selection, cellColumnPositioning) {
397
- var table = (0, _utils.findTable)(selection);
397
+ var table = (0, _utils2.findTable)(selection);
398
398
  if (!table || cellColumnPositioning.right === null) {
399
399
  return [];
400
400
  }
@@ -431,6 +431,6 @@ var createColumnLineResize = function createColumnLineResize(selection, cellColu
431
431
  }, {
432
432
  key: "".concat(_types.TableDecorations.COLUMN_RESIZING_HANDLE_LINE, "_").concat(cellColumnPositioning.right, "_").concat(index)
433
433
  });
434
- }).filter(_utils2.nonNullable);
434
+ }).filter(_utils.nonNullable);
435
435
  };
436
436
  exports.createColumnLineResize = createColumnLineResize;
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.tablesHaveDifferentNoOfColumns = exports.tablesHaveDifferentColumnWidths = exports.isTableNested = exports.isLayoutSupported = exports.isIsolating = exports.getTableWidth = exports.containsHeaderRow = exports.containsHeaderColumn = exports.checkIfNumberColumnEnabled = exports.checkIfHeaderRowEnabled = exports.checkIfHeaderColumnEnabled = void 0;
8
8
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
9
- var _tableMap = require("@atlaskit/editor-tables/table-map");
10
9
  var _prosemirrorUtils = require("prosemirror-utils");
10
+ var _tableMap = require("@atlaskit/editor-tables/table-map");
11
11
  var _utils = require("@atlaskit/editor-tables/utils");
12
12
  var _pluginKey = require("../pm-plugins/plugin-key");
13
13
  var isIsolating = function isIsolating(node) {
@@ -6,11 +6,11 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.isRowDeleteButtonVisible = exports.getRowsParams = exports.getRowHeights = exports.getRowDeleteButtonParams = exports.getRowClassNames = exports.copyPreviousRow = void 0;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
- var _tableMap = require("@atlaskit/editor-tables/table-map");
10
- var _cellSelection = require("@atlaskit/editor-tables/cell-selection");
11
9
  var _prosemirrorUtils = require("prosemirror-utils");
12
- var _utils = require("@atlaskit/editor-tables/utils");
13
- var _utils2 = require("@atlaskit/editor-common/utils");
10
+ var _utils = require("@atlaskit/editor-common/utils");
11
+ var _cellSelection = require("@atlaskit/editor-tables/cell-selection");
12
+ var _tableMap = require("@atlaskit/editor-tables/table-map");
13
+ var _utils2 = require("@atlaskit/editor-tables/utils");
14
14
  var _types = require("../types");
15
15
  var _consts = require("../ui/consts");
16
16
  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; }
@@ -27,7 +27,7 @@ var getRowHeights = function getRowHeights(tableRef) {
27
27
  // padding only gets applied when the container has sticky
28
28
  if (row.classList.contains('sticky') && i === 0) {
29
29
  var styles = window.getComputedStyle(row);
30
- var paddingTop = (0, _utils2.parsePx)(styles.paddingTop || '');
30
+ var paddingTop = (0, _utils.parsePx)(styles.paddingTop || '');
31
31
  heights[i] -= paddingTop ? paddingTop + 1 : +1;
32
32
  }
33
33
  }
@@ -36,7 +36,7 @@ var getRowHeights = function getRowHeights(tableRef) {
36
36
  };
37
37
  exports.getRowHeights = getRowHeights;
38
38
  var isRowDeleteButtonVisible = function isRowDeleteButtonVisible(selection) {
39
- if (!(0, _utils.isTableSelected)(selection) && selection instanceof _cellSelection.CellSelection && selection.isRowSelection()) {
39
+ if (!(0, _utils2.isTableSelected)(selection) && selection instanceof _cellSelection.CellSelection && selection.isRowSelection()) {
40
40
  return true;
41
41
  }
42
42
  return false;
@@ -44,7 +44,7 @@ var isRowDeleteButtonVisible = function isRowDeleteButtonVisible(selection) {
44
44
  exports.isRowDeleteButtonVisible = isRowDeleteButtonVisible;
45
45
  var getRowDeleteButtonParams = function getRowDeleteButtonParams(rowsHeights, selection) {
46
46
  var offsetTop = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
47
- var rect = (0, _utils.getSelectionRect)(selection);
47
+ var rect = (0, _utils2.getSelectionRect)(selection);
48
48
  if (!rect) {
49
49
  return null;
50
50
  }
@@ -101,7 +101,7 @@ var getRowClassNames = function getRowClassNames(index, selection) {
101
101
  var isInDanger = arguments.length > 3 ? arguments[3] : undefined;
102
102
  var isResizing = arguments.length > 4 ? arguments[4] : undefined;
103
103
  var classNames = [];
104
- if ((0, _utils.isRowSelected)(index)(selection) || hoveredRows.indexOf(index) > -1 && !isResizing) {
104
+ if ((0, _utils2.isRowSelected)(index)(selection) || hoveredRows.indexOf(index) > -1 && !isResizing) {
105
105
  classNames.push(_types.TableCssClassName.HOVERED_CELL_ACTIVE);
106
106
  if (isInDanger) {
107
107
  classNames.push(_types.TableCssClassName.HOVERED_CELL_IN_DANGER);
@@ -113,7 +113,7 @@ exports.getRowClassNames = getRowClassNames;
113
113
  var copyPreviousRow = function copyPreviousRow(schema) {
114
114
  return function (insertNewRowIndex) {
115
115
  return function (tr) {
116
- var table = (0, _utils.findTable)(tr.selection);
116
+ var table = (0, _utils2.findTable)(tr.selection);
117
117
  if (!table) {
118
118
  return tr;
119
119
  }
@@ -4,8 +4,8 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.normalizeSelection = exports.isSelectionUpdated = exports.getSelectedRowIndexes = exports.getSelectedColumnIndexes = void 0;
7
- var _tableMap = require("@atlaskit/editor-tables/table-map");
8
7
  var _cellSelection = require("@atlaskit/editor-tables/cell-selection");
8
+ var _tableMap = require("@atlaskit/editor-tables/table-map");
9
9
  var _utils = require("@atlaskit/editor-tables/utils");
10
10
  var isSelectionUpdated = function isSelectionUpdated(oldSelection, newSelection) {
11
11
  return !!(!newSelection && oldSelection) || (0, _utils.isSelectionType)(oldSelection, 'cell') !== (0, _utils.isSelectionType)(newSelection, 'cell') || (0, _utils.isSelectionType)(oldSelection, 'cell') && (0, _utils.isSelectionType)(newSelection, 'cell') && oldSelection.ranges !== newSelection.ranges;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "2.3.0",
3
+ "version": "2.4.0",
4
4
  "sideEffects": false
5
5
  }
@@ -1,7 +1,9 @@
1
1
  // #region Imports
2
2
  import { Selection } from 'prosemirror-state';
3
- import { findCellClosestToPos, emptyCell, isSelectionType } from '@atlaskit/editor-tables/utils';
3
+ import { emptyCell, findCellClosestToPos, isSelectionType } from '@atlaskit/editor-tables/utils';
4
+
4
5
  // #endregion
6
+
5
7
  // #region Commands
6
8
  export const clearMultipleCells = targetCellPosition => (state, dispatch) => {
7
9
  let cursorPos;
@@ -1,8 +1,8 @@
1
1
  // #region Constants
2
- import { findTable, goToNextCell as baseGotoNextCell } from '@atlaskit/editor-tables/utils';
3
- import { TableMap } from '@atlaskit/editor-tables/table-map';
4
2
  import { findParentNodeOfType } from 'prosemirror-utils';
5
3
  import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
4
+ import { TableMap } from '@atlaskit/editor-tables/table-map';
5
+ import { goToNextCell as baseGotoNextCell, findTable } from '@atlaskit/editor-tables/utils';
6
6
  import { insertRowWithAnalytics } from '../commands-with-analytics';
7
7
  const TAB_FORWARD_DIRECTION = 1;
8
8
  const TAB_BACKWARD_DIRECTION = -1;
@@ -1,12 +1,13 @@
1
1
  // #region Imports
2
2
  import { Selection } from 'prosemirror-state';
3
- import { TableMap } from '@atlaskit/editor-tables/table-map';
4
- import { addColumnAt as addColumnAtPMUtils, addRowAt, createTable as createTableNode, findTable, selectedRect } from '@atlaskit/editor-tables/utils';
5
3
  import { safeInsert } from 'prosemirror-utils';
6
4
  import { AddColumnStep } from '@atlaskit/adf-schema/steps';
5
+ import { TableMap } from '@atlaskit/editor-tables/table-map';
6
+ import { addColumnAt as addColumnAtPMUtils, addRowAt, createTable as createTableNode, findTable, selectedRect } from '@atlaskit/editor-tables/utils';
7
+ import { rescaleColumns } from '../transforms/column-width';
7
8
  import { checkIfHeaderRowEnabled, copyPreviousRow } from '../utils';
8
9
  import { getAllowAddColumnCustomStep } from '../utils/get-allow-add-column-custom-step';
9
- import { rescaleColumns } from '../transforms/column-width';
10
+
10
11
  // #endregion
11
12
 
12
13
  function addColumnAtCustomStep(column) {
@@ -1,17 +1,17 @@
1
1
  // #region Imports
2
2
 
3
3
  import { TextSelection } from 'prosemirror-state';
4
- import { TableMap } from '@atlaskit/editor-tables/table-map';
4
+ import { closestElement, isParagraph, isTextSelection, mapSlice } from '@atlaskit/editor-common/utils';
5
5
  import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
6
- import { selectionCell, findCellClosestToPos, findTable, getCellsInColumn, getCellsInRow, getSelectionRect, isSelectionType, removeTable, selectColumn as selectColumnTransform, selectRow as selectRowTransform, setCellAttrs, isTableSelected } from '@atlaskit/editor-tables/utils';
7
- import { isParagraph, isTextSelection, closestElement, mapSlice } from '@atlaskit/editor-common/utils';
6
+ import { TableMap } from '@atlaskit/editor-tables/table-map';
7
+ import { findCellClosestToPos, findTable, getCellsInColumn, getCellsInRow, getSelectionRect, isSelectionType, isTableSelected, removeTable, selectColumn as selectColumnTransform, selectionCell, selectRow as selectRowTransform, setCellAttrs } from '@atlaskit/editor-tables/utils';
8
8
  import { getDecorations } from '../pm-plugins/decorations/plugin';
9
9
  import { buildColumnResizingDecorations } from '../pm-plugins/decorations/utils';
10
10
  import { createCommand, getPluginState } from '../pm-plugins/plugin-factory';
11
11
  import { fixAutoSizedTable } from '../transforms';
12
12
  import { TableCssClassName as ClassName, TableDecorations } from '../types';
13
13
  import { createColumnControlsDecoration, createColumnSelectedDecoration } from '../utils/decoration';
14
- import { checkIfNumberColumnEnabled, checkIfHeaderColumnEnabled, checkIfHeaderRowEnabled, isIsolating } from '../utils/nodes';
14
+ import { checkIfHeaderColumnEnabled, checkIfHeaderRowEnabled, checkIfNumberColumnEnabled, isIsolating } from '../utils/nodes';
15
15
  import { updatePluginStateDecorations } from '../utils/update-plugin-state-decorations';
16
16
  // #endregion
17
17
 
@@ -1,5 +1,5 @@
1
- import { createCommand } from '../pm-plugins/plugin-factory';
2
1
  import { removeConnectedNodes } from '@atlaskit/editor-common/utils';
2
+ import { createCommand } from '../pm-plugins/plugin-factory';
3
3
  export const removeDescendantNodes = sourceNode => createCommand({
4
4
  type: 'UPDATE_STATE',
5
5
  data: {
@@ -1,8 +1,8 @@
1
- import { TextSelection, Selection } from 'prosemirror-state';
2
- import { TableMap } from '@atlaskit/editor-tables/table-map';
1
+ import { Selection, TextSelection } from 'prosemirror-state';
2
+ import { GapCursorSelection, isSelectionAtEndOfNode, isSelectionAtStartOfNode, RelativeSelectionPos, Side } from '@atlaskit/editor-common/selection';
3
3
  import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
4
+ import { TableMap } from '@atlaskit/editor-tables/table-map';
4
5
  import { findTable, isTableSelected } from '@atlaskit/editor-tables/utils';
5
- import { RelativeSelectionPos, GapCursorSelection, Side, isSelectionAtStartOfNode, isSelectionAtEndOfNode } from '@atlaskit/editor-common/selection';
6
6
  export let TableSelectionDirection = /*#__PURE__*/function (TableSelectionDirection) {
7
7
  TableSelectionDirection["TopToBottom"] = "TopToBottom";
8
8
  TableSelectionDirection["BottomToTop"] = "BottomToTop";
@@ -1,10 +1,9 @@
1
1
  import { Selection } from 'prosemirror-state';
2
- import { TableMap } from '@atlaskit/editor-tables/table-map';
3
- import { findCellRectClosestToPos } from '@atlaskit/editor-tables/utils';
4
- import { convertArrayOfRowsToTableNode, convertTableNodeToArrayOfRows, findTable, getSelectionRect, isSelectionType } from '@atlaskit/editor-tables/utils';
2
+ import { TableSortOrder as SortOrder, TableSortStep } from '@atlaskit/adf-schema/steps';
5
3
  import { createCompareNodes } from '@atlaskit/editor-common/utils';
4
+ import { TableMap } from '@atlaskit/editor-tables/table-map';
5
+ import { convertArrayOfRowsToTableNode, convertTableNodeToArrayOfRows, findCellRectClosestToPos, findTable, getSelectionRect, isSelectionType } from '@atlaskit/editor-tables/utils';
6
6
  import { createCommand, getPluginState } from '../pm-plugins/plugin-factory';
7
- import { TableSortStep, TableSortOrder as SortOrder } from '@atlaskit/adf-schema/steps';
8
7
  const createGetInlineCardTextFromStore = attrs => {
9
8
  const {
10
9
  data
@@ -1,7 +1,6 @@
1
1
  //#region Imports
2
2
 
3
- import { toggleHeader } from '@atlaskit/editor-tables/utils';
4
- import { findTable } from '@atlaskit/editor-tables/utils';
3
+ import { findTable, toggleHeader } from '@atlaskit/editor-tables/utils';
5
4
  import { createCommand } from '../pm-plugins/plugin-factory';
6
5
  //#endregion
7
6
 
@@ -1,16 +1,16 @@
1
- import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
2
- import { findCellClosestToPos, findCellRectClosestToPos, getSelectionRect } from '@atlaskit/editor-tables/utils';
3
1
  import { tableBackgroundColorPalette } from '@atlaskit/adf-schema';
4
2
  import { ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD, TABLE_ACTION, TABLE_BREAKOUT } from '@atlaskit/editor-common/analytics';
3
+ import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
4
+ import { findCellClosestToPos, findCellRectClosestToPos, getSelectionRect } from '@atlaskit/editor-tables/utils';
5
5
  import { clearMultipleCells } from './commands/clear';
6
6
  import { wrapTableInExpand } from './commands/collapse';
7
7
  import { insertColumn, insertRow } from './commands/insert';
8
- import { deleteTable, setMultipleCellAttrs, deleteTableIfSelected } from './commands/misc';
8
+ import { deleteTable, deleteTableIfSelected, setMultipleCellAttrs } from './commands/misc';
9
9
  import { sortByColumn } from './commands/sort';
10
10
  import { splitCell } from './commands/split-cell';
11
11
  import { getNextLayout, toggleHeaderColumn, toggleHeaderRow, toggleNumberColumn, toggleTableLayout } from './commands/toggle';
12
- import { distributeColumnsWidths } from './pm-plugins/table-resizing/commands';
13
12
  import { getPluginState } from './pm-plugins/plugin-factory';
13
+ import { distributeColumnsWidths } from './pm-plugins/table-resizing/commands';
14
14
  import { deleteColumns, deleteRows, mergeCells } from './transforms';
15
15
  import { checkIfNumberColumnEnabled, getSelectedCellInfo, getSelectedTableInfo } from './utils';
16
16
  import { withEditorAnalyticsAPI } from './utils/analytics';
@@ -1,17 +1,15 @@
1
1
  import { Selection, TextSelection } from 'prosemirror-state';
2
+ import { ACTION_SUBJECT, EVENT_TYPE, TABLE_ACTION } from '@atlaskit/editor-common/analytics';
3
+ import { browser, closestElement, isElementInTableCell, isLastItemMediaGroup, setNodeSelection } from '@atlaskit/editor-common/utils';
2
4
  import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
3
5
  import { TableMap } from '@atlaskit/editor-tables/table-map';
4
6
  import { cellAround, findCellRectClosestToPos, findTable, getSelectionRect, removeTable } from '@atlaskit/editor-tables/utils';
5
- import { browser } from '@atlaskit/editor-common/utils';
6
- import { isElementInTableCell, isLastItemMediaGroup, setNodeSelection } from '@atlaskit/editor-common/utils';
7
- import { closestElement } from '@atlaskit/editor-common/utils';
8
- import { ACTION_SUBJECT, EVENT_TYPE, TABLE_ACTION } from '@atlaskit/editor-common/analytics';
9
7
  import { addResizeHandleDecorations, clearHoverSelection, hideInsertColumnOrRowButton, hideResizeHandleLine, hoverColumns, selectColumn, setEditorFocus, showInsertColumnButton, showInsertRowButton, showResizeHandleLine } from './commands';
10
8
  import { getPluginState } from './pm-plugins/plugin-factory';
11
9
  import { getPluginState as getResizePluginState } from './pm-plugins/table-resizing/plugin-factory';
12
10
  import { deleteColumns, deleteRows } from './transforms';
13
11
  import { RESIZE_HANDLE_AREA_DECORATION_GAP } from './types';
14
- import { getColumnOrRowIndex, getMousePositionHorizontalRelativeByElement, getMousePositionVerticalRelativeByElement, getSelectedCellInfo, isCell, isColumnControlsDecorations, isCornerButton, isInsertRowButton, isResizeHandleDecoration, isRowControlsButton, isTableControlsButton, isTableContainerOrWrapper, hasResizeHandler } from './utils';
12
+ import { getColumnOrRowIndex, getMousePositionHorizontalRelativeByElement, getMousePositionVerticalRelativeByElement, getSelectedCellInfo, hasResizeHandler, isCell, isColumnControlsDecorations, isCornerButton, isInsertRowButton, isResizeHandleDecoration, isRowControlsButton, isTableContainerOrWrapper, isTableControlsButton } from './utils';
15
13
  import { getAllowAddColumnCustomStep } from './utils/get-allow-add-column-custom-step';
16
14
  const isFocusingCalendar = event => event instanceof FocusEvent && event.relatedTarget instanceof HTMLElement && event.relatedTarget.getAttribute('aria-label') === 'calendar';
17
15
  const isFocusingModal = event => event instanceof FocusEvent && event.relatedTarget instanceof HTMLElement && event.relatedTarget.closest('[role="dialog"]');
@@ -1,15 +1,15 @@
1
1
  // #region Imports
2
+
2
3
  // @ts-ignore -- ReadonlyTransaction is a local declaration and will cause a TS2305 error in CCFE typecheck
3
4
 
4
5
  import { findParentNodeOfType } from 'prosemirror-utils';
5
- import { findTable } from '@atlaskit/editor-tables/utils';
6
+ import { TableSortStep } from '@atlaskit/adf-schema/steps';
6
7
  import { isTextInput } from '@atlaskit/editor-common/utils';
7
- import { isTableCollapsible } from './utils/collapse';
8
+ import { findTable } from '@atlaskit/editor-tables/utils';
8
9
  import { defaultTableSelection } from './pm-plugins/default-table-selection';
9
10
  import { pluginKey as tableResizingPluginKey } from './pm-plugins/table-resizing';
10
- import { TableSortStep } from '@atlaskit/adf-schema/steps';
11
- // #endregion
12
- import { checkIfNumberColumnEnabled, checkIfHeaderColumnEnabled, checkIfHeaderRowEnabled } from './utils/nodes';
11
+ import { isTableCollapsible } from './utils/collapse';
12
+ import { checkIfHeaderColumnEnabled, checkIfHeaderRowEnabled, checkIfNumberColumnEnabled } from './utils/nodes';
13
13
  const nextTableSorting = (tr, table) => {
14
14
  const tableSortStep = tr.steps.find(step => step instanceof TableSortStep);
15
15
  return tableSortStep && table && table.pos === tableSortStep.pos ? tableSortStep.next : undefined;
@@ -1,25 +1,26 @@
1
1
  import React from 'react';
2
+ import { table, tableCell, tableHeader, tableRow, tableWithCustomWidth } from '@atlaskit/adf-schema';
3
+ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD, TABLE_ACTION } from '@atlaskit/editor-common/analytics';
4
+ import { ErrorBoundary } from '@atlaskit/editor-common/error-boundary';
5
+ import { IconTable } from '@atlaskit/editor-common/icons';
6
+ import { toggleTable, tooltip } from '@atlaskit/editor-common/keymaps';
7
+ import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
2
8
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
3
9
  import { browser } from '@atlaskit/editor-common/utils';
10
+ import { WithPluginState } from '@atlaskit/editor-common/with-plugin-state';
4
11
  import { tableEditing } from '@atlaskit/editor-tables/pm-plugins';
5
12
  import { createTable } from '@atlaskit/editor-tables/utils';
6
- import { table, tableCell, tableHeader, tableRow, tableWithCustomWidth } from '@atlaskit/adf-schema';
7
- import { toggleTable, tooltip } from '@atlaskit/editor-common/keymaps';
8
- import { WithPluginState } from '@atlaskit/editor-common/with-plugin-state';
9
- import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD, TABLE_ACTION } from '@atlaskit/editor-common/analytics';
10
- import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
11
- import { IconTable } from '@atlaskit/editor-common/icons';
12
13
  import { pluginConfig } from './create-plugin-config';
13
- import { createPlugin as createTableLocalIdPlugin } from './pm-plugins/table-local-id';
14
- import { pluginKey as tableWidthPluginKey, createPlugin as createTableWidthPlugin } from './pm-plugins/table-width';
15
- import { createPlugin as createTableSafariDeleteCompositionTextIssueWorkaroundPlugin } from './pm-plugins/safari-delete-composition-text-issue-workaround';
16
14
  import { createPlugin as createDecorationsPlugin } from './pm-plugins/decorations/plugin';
17
15
  import { keymapPlugin } from './pm-plugins/keymap';
18
- import { tableSelectionKeymapPlugin } from './pm-plugins/table-selection-keymap';
19
16
  import { createPlugin } from './pm-plugins/main';
20
17
  import { pluginKey } from './pm-plugins/plugin-key';
18
+ import { createPlugin as createTableSafariDeleteCompositionTextIssueWorkaroundPlugin } from './pm-plugins/safari-delete-composition-text-issue-workaround';
21
19
  import { createPlugin as createStickyHeadersPlugin, findStickyHeaderForTable, pluginKey as stickyHeadersPluginKey } from './pm-plugins/sticky-headers';
20
+ import { createPlugin as createTableLocalIdPlugin } from './pm-plugins/table-local-id';
22
21
  import { createPlugin as createFlexiResizingPlugin, pluginKey as tableResizingPluginKey } from './pm-plugins/table-resizing';
22
+ import { tableSelectionKeymapPlugin } from './pm-plugins/table-selection-keymap';
23
+ import { createPlugin as createTableWidthPlugin, pluginKey as tableWidthPluginKey } from './pm-plugins/table-width';
23
24
  import { getToolbarConfig } from './toolbar';
24
25
  import FloatingContextualButton from './ui/FloatingContextualButton';
25
26
  import FloatingContextualMenu from './ui/FloatingContextualMenu';
@@ -27,8 +28,6 @@ import FloatingDeleteButton from './ui/FloatingDeleteButton';
27
28
  import FloatingInsertButton from './ui/FloatingInsertButton';
28
29
  import LayoutButton from './ui/LayoutButton';
29
30
  import { isLayoutSupported } from './utils';
30
- import { ErrorBoundary } from '@atlaskit/editor-common/error-boundary';
31
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
32
31
  const defaultGetEditorFeatureFlags = () => ({});
33
32
  const tablesPlugin = (options, api) => {
34
33
  var _api$dependencies$ana;
@@ -63,7 +62,7 @@ const tablesPlugin = (options, api) => {
63
62
  }
64
63
  },
65
64
  nodes() {
66
- const tableNode = getBooleanFF('platform.editor.custom-table-width') ? tableWithCustomWidth : table;
65
+ const tableNode = options !== null && options !== void 0 && options.tableResizingEnabled ? tableWithCustomWidth : table;
67
66
  return [{
68
67
  name: 'table',
69
68
  node: tableNode
@@ -90,11 +89,12 @@ const tablesPlugin = (options, api) => {
90
89
  const {
91
90
  fullWidthEnabled,
92
91
  wasFullWidthEnabled,
92
+ tableResizingEnabled,
93
93
  breakoutEnabled,
94
94
  tableOptions,
95
95
  getEditorFeatureFlags
96
96
  } = options || {};
97
- return createPlugin(dispatchAnalyticsEvent, dispatch, portalProviderAPI, eventDispatcher, pluginConfig(tableOptions), defaultGetEditorContainerWidth, getEditorFeatureFlags || defaultGetEditorFeatureFlags, breakoutEnabled, fullWidthEnabled, wasFullWidthEnabled, editorAnalyticsAPI, api);
97
+ return createPlugin(dispatchAnalyticsEvent, dispatch, portalProviderAPI, eventDispatcher, pluginConfig(tableOptions), defaultGetEditorContainerWidth, getEditorFeatureFlags || defaultGetEditorFeatureFlags, breakoutEnabled, fullWidthEnabled, tableResizingEnabled, wasFullWidthEnabled, editorAnalyticsAPI, api);
98
98
  }
99
99
  }, {
100
100
  name: 'tablePMColResizing',
@@ -160,7 +160,7 @@ const tablesPlugin = (options, api) => {
160
160
  dispatch
161
161
  }) => {
162
162
  var _options$fullWidthEna;
163
- return getBooleanFF('platform.editor.custom-table-width') ? createTableWidthPlugin(dispatch, (_options$fullWidthEna = options === null || options === void 0 ? void 0 : options.fullWidthEnabled) !== null && _options$fullWidthEna !== void 0 ? _options$fullWidthEna : false) : undefined;
163
+ return options !== null && options !== void 0 && options.tableResizingEnabled ? createTableWidthPlugin(dispatch, (_options$fullWidthEna = options === null || options === void 0 ? void 0 : options.fullWidthEnabled) !== null && _options$fullWidthEna !== void 0 ? _options$fullWidthEna : false) : undefined;
164
164
  }
165
165
  }, {
166
166
  name: 'tableGetEditorViewReferencePlugin',
@@ -238,7 +238,7 @@ const tablesPlugin = (options, api) => {
238
238
  allowControls
239
239
  } = pluginConfig;
240
240
  const stickyHeader = stickyHeadersState ? findStickyHeaderForTable(stickyHeadersState, tablePos) : undefined;
241
- const LayoutContent = getBooleanFF('platform.editor.custom-table-width') ? null : isLayoutSupported(state) && options && options.breakoutEnabled ? /*#__PURE__*/React.createElement(LayoutButton, {
241
+ const LayoutContent = options && !options.tableResizingEnabled && isLayoutSupported(state) && options.breakoutEnabled ? /*#__PURE__*/React.createElement(LayoutButton, {
242
242
  editorView: editorView,
243
243
  mountPoint: popupsMountPoint,
244
244
  boundariesElement: popupsBoundariesElement,
@@ -1,5 +1,5 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
- import { ShadowEvent, TableCssClassName as ClassName } from '../types';
2
+ import { TableCssClassName as ClassName, ShadowEvent } from '../types';
3
3
  import { tableInsertColumnButtonSize } from '../ui/consts';
4
4
  import { updateShadowListForStickyStyles } from './update-overflow-shadows';
5
5
  export class OverflowShadowsObserver {