@atlaskit/editor-plugin-table 2.3.1 → 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 +6 -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 +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 +19 -15
  72. package/dist/es2019/plugins/table/nodeviews/TableContainer.js +7 -10
  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 +37 -34
  133. package/dist/esm/plugins/table/nodeviews/TableContainer.js +7 -10
  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 +22 -25
  361. package/src/plugins/table/nodeviews/TableContainer.tsx +13 -24
  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 +108 -0
@@ -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
  var defaultGetEditorFeatureFlags = function defaultGetEditorFeatureFlags() {
33
32
  return {};
34
33
  };
@@ -67,7 +66,7 @@ var tablesPlugin = function tablesPlugin(options, api) {
67
66
  }
68
67
  },
69
68
  nodes: function nodes() {
70
- var tableNode = getBooleanFF('platform.editor.custom-table-width') ? tableWithCustomWidth : table;
69
+ var tableNode = options !== null && options !== void 0 && options.tableResizingEnabled ? tableWithCustomWidth : table;
71
70
  return [{
72
71
  name: 'table',
73
72
  node: tableNode
@@ -93,10 +92,11 @@ var tablesPlugin = function tablesPlugin(options, api) {
93
92
  var _ref2 = options || {},
94
93
  fullWidthEnabled = _ref2.fullWidthEnabled,
95
94
  wasFullWidthEnabled = _ref2.wasFullWidthEnabled,
95
+ tableResizingEnabled = _ref2.tableResizingEnabled,
96
96
  breakoutEnabled = _ref2.breakoutEnabled,
97
97
  tableOptions = _ref2.tableOptions,
98
98
  getEditorFeatureFlags = _ref2.getEditorFeatureFlags;
99
- return createPlugin(dispatchAnalyticsEvent, dispatch, portalProviderAPI, eventDispatcher, pluginConfig(tableOptions), defaultGetEditorContainerWidth, getEditorFeatureFlags || defaultGetEditorFeatureFlags, breakoutEnabled, fullWidthEnabled, wasFullWidthEnabled, editorAnalyticsAPI, api);
99
+ return createPlugin(dispatchAnalyticsEvent, dispatch, portalProviderAPI, eventDispatcher, pluginConfig(tableOptions), defaultGetEditorContainerWidth, getEditorFeatureFlags || defaultGetEditorFeatureFlags, breakoutEnabled, fullWidthEnabled, tableResizingEnabled, wasFullWidthEnabled, editorAnalyticsAPI, api);
100
100
  }
101
101
  }, {
102
102
  name: 'tablePMColResizing',
@@ -169,7 +169,7 @@ var tablesPlugin = function tablesPlugin(options, api) {
169
169
  plugin: function plugin(_ref8) {
170
170
  var _options$fullWidthEna;
171
171
  var dispatch = _ref8.dispatch;
172
- 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;
172
+ 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;
173
173
  }
174
174
  }, {
175
175
  name: 'tableGetEditorViewReferencePlugin',
@@ -240,7 +240,7 @@ var tablesPlugin = function tablesPlugin(options, api) {
240
240
  tableWrapperTarget = _ref11.tableWrapperTarget;
241
241
  var allowControls = pluginConfig.allowControls;
242
242
  var stickyHeader = stickyHeadersState ? findStickyHeaderForTable(stickyHeadersState, tablePos) : undefined;
243
- var LayoutContent = getBooleanFF('platform.editor.custom-table-width') ? null : isLayoutSupported(state) && options && options.breakoutEnabled ? /*#__PURE__*/React.createElement(LayoutButton, {
243
+ var LayoutContent = options && !options.tableResizingEnabled && isLayoutSupported(state) && options.breakoutEnabled ? /*#__PURE__*/React.createElement(LayoutButton, {
244
244
  editorView: editorView,
245
245
  mountPoint: popupsMountPoint,
246
246
  boundariesElement: popupsBoundariesElement,
@@ -1,7 +1,7 @@
1
1
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
2
  import _createClass from "@babel/runtime/helpers/createClass";
3
3
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
- import { ShadowEvent, TableCssClassName as ClassName } from '../types';
4
+ import { TableCssClassName as ClassName, ShadowEvent } from '../types';
5
5
  import { tableInsertColumnButtonSize } from '../ui/consts';
6
6
  import { updateShadowListForStickyStyles } from './update-overflow-shadows';
7
7
  export var OverflowShadowsObserver = /*#__PURE__*/function () {
@@ -11,13 +11,13 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
11
11
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
12
12
  import React from 'react';
13
13
  import classnames from 'classnames';
14
- import { isTableSelected } from '@atlaskit/editor-tables/utils';
14
+ import memoizeOne from 'memoize-one';
15
15
  import rafSchedule from 'raf-schd';
16
- import { findTable } from '@atlaskit/editor-tables/utils';
16
+ import { getParentNodeWidth } from '@atlaskit/editor-common/node-width';
17
17
  import { tableMarginSides } from '@atlaskit/editor-common/styles';
18
18
  import { browser, isValidPosition } from '@atlaskit/editor-common/utils';
19
19
  import { akEditorTableToolbarSize as tableToolbarSize } from '@atlaskit/editor-shared-styles';
20
- import { getParentNodeWidth } from '@atlaskit/editor-common/node-width';
20
+ import { findTable, isTableSelected } from '@atlaskit/editor-tables/utils';
21
21
  import { autoSizeTable, clearHoverSelection } from '../commands';
22
22
  import { getPluginState } from '../pm-plugins/plugin-factory';
23
23
  import { findStickyHeaderForTable, pluginKey as stickyHeadersPluginKey } from '../pm-plugins/sticky-headers';
@@ -25,12 +25,10 @@ import { getLayoutSize, insertColgroupFromNode as recreateResizeColsByNode, scal
25
25
  import { updateControls } from '../pm-plugins/table-resizing/utils/dom';
26
26
  import { TableCssClassName as ClassName, ShadowEvent } from '../types';
27
27
  import TableFloatingControls from '../ui/TableFloatingControls';
28
- import { containsHeaderRow, tablesHaveDifferentColumnWidths, tablesHaveDifferentNoOfColumns, isTableNested } from '../utils';
29
- import { updateOverflowShadows } from './update-overflow-shadows';
30
- import memoizeOne from 'memoize-one';
28
+ import { containsHeaderRow, isTableNested, tablesHaveDifferentColumnWidths, tablesHaveDifferentNoOfColumns } from '../utils';
31
29
  import { OverflowShadowsObserver } from './OverflowShadowsObserver';
32
30
  import { TableContainer } from './TableContainer';
33
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
31
+ import { updateOverflowShadows } from './update-overflow-shadows';
34
32
  var isIE11 = browser.ie_version === 11;
35
33
  var NOOP = function NOOP() {
36
34
  return undefined;
@@ -129,7 +127,7 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
129
127
  // This last check is also to cater for dynamic text sizing changing the 'default' layout width
130
128
  // Usually happens on window resize.
131
129
  layoutSize !== _this.layoutSize || noOfColumnsChanged) {
132
- var shouldScaleTable = (!getBooleanFF('platform.editor.custom-table-width') || getBooleanFF('platform.editor.custom-table-width') && isNested) && !hasNumberedColumnChanged && !noOfColumnsChanged;
130
+ var shouldScaleTable = (!(options !== null && options !== void 0 && options.isTableResizingEnabled) || (options === null || options === void 0 ? void 0 : options.isTableResizingEnabled) && isNested) && !hasNumberedColumnChanged && !noOfColumnsChanged;
133
131
 
134
132
  // If column has been inserted/deleted avoid multi dispatch
135
133
  if (shouldScaleTable) {
@@ -271,7 +269,8 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
271
269
  value: function componentDidMount() {
272
270
  var _this$props6 = this.props,
273
271
  allowColumnResizing = _this$props6.allowColumnResizing,
274
- eventDispatcher = _this$props6.eventDispatcher;
272
+ eventDispatcher = _this$props6.eventDispatcher,
273
+ options = _this$props6.options;
275
274
  if (allowColumnResizing && this.wrapper && !isIE11) {
276
275
  this.wrapper.addEventListener('scroll', this.handleScrollDebounced);
277
276
  }
@@ -280,7 +279,7 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
280
279
  * We no longer use `containerWidth` as a variable to determine an update for table resizing (avoids unnecessary updates).
281
280
  * Instead we use the resize event to only trigger updates when necessary.
282
281
  */
283
- if (!getBooleanFF('platform.editor.custom-table-width')) {
282
+ if (!(options !== null && options !== void 0 && options.isTableResizingEnabled)) {
284
283
  window.addEventListener('resize', this.handleWindowResizeDebounced);
285
284
  }
286
285
  this.handleTableResizingDebounced();
@@ -294,6 +293,10 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
294
293
  }, {
295
294
  key: "componentWillUnmount",
296
295
  value: function componentWillUnmount() {
296
+ var _this$props7 = this.props,
297
+ allowColumnResizing = _this$props7.allowColumnResizing,
298
+ eventDispatcher = _this$props7.eventDispatcher,
299
+ options = _this$props7.options;
297
300
  if (this.wrapper && !isIE11) {
298
301
  this.wrapper.removeEventListener('scroll', this.handleScrollDebounced);
299
302
  }
@@ -301,25 +304,25 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
301
304
  this.scaleTableDebounced.cancel();
302
305
  this.handleTableResizingDebounced.cancel();
303
306
  this.handleAutoSizeDebounced.cancel();
304
- if (!getBooleanFF('platform.editor.custom-table-width')) {
307
+ if (!(options !== null && options !== void 0 && options.isTableResizingEnabled)) {
305
308
  this.handleWindowResizeDebounced.cancel();
306
309
  }
307
- if (!getBooleanFF('platform.editor.custom-table-width') && this.props.allowColumnResizing) {
310
+ if (!(options !== null && options !== void 0 && options.isTableResizingEnabled) && allowColumnResizing) {
308
311
  window.removeEventListener('resize', this.handleWindowResizeDebounced);
309
312
  }
310
313
  if (this.overflowShadowsObserver) {
311
314
  this.overflowShadowsObserver.dispose();
312
315
  }
313
- this.props.eventDispatcher.off(stickyHeadersPluginKey.key, this.onStickyState);
316
+ eventDispatcher.off(stickyHeadersPluginKey.key, this.onStickyState);
314
317
  }
315
318
  }, {
316
319
  key: "componentDidUpdate",
317
320
  value: function componentDidUpdate() {
318
- var _this$props7 = this.props,
319
- view = _this$props7.view,
320
- getNode = _this$props7.getNode,
321
- isMediaFullscreen = _this$props7.isMediaFullscreen,
322
- allowColumnResizing = _this$props7.allowColumnResizing;
321
+ var _this$props8 = this.props,
322
+ view = _this$props8.view,
323
+ getNode = _this$props8.getNode,
324
+ isMediaFullscreen = _this$props8.isMediaFullscreen,
325
+ allowColumnResizing = _this$props8.allowColumnResizing;
323
326
  var _getPluginState = getPluginState(view.state),
324
327
  isInDanger = _getPluginState.isInDanger;
325
328
  var table = findTable(view.state.selection);
@@ -375,20 +378,20 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
375
378
  value: function render() {
376
379
  var _classnames,
377
380
  _this2 = this;
378
- var _this$props8 = this.props,
379
- view = _this$props8.view,
380
- getNode = _this$props8.getNode,
381
- isResizing = _this$props8.isResizing,
382
- _this$props8$allowCon = _this$props8.allowControls,
383
- allowControls = _this$props8$allowCon === void 0 ? true : _this$props8$allowCon,
384
- isHeaderRowEnabled = _this$props8.isHeaderRowEnabled,
385
- ordering = _this$props8.ordering,
386
- isHeaderColumnEnabled = _this$props8.isHeaderColumnEnabled,
387
- tableActive = _this$props8.tableActive,
388
- containerWidth = _this$props8.containerWidth,
389
- options = _this$props8.options,
390
- getPos = _this$props8.getPos,
391
- pluginInjectionApi = _this$props8.pluginInjectionApi;
381
+ var _this$props9 = this.props,
382
+ view = _this$props9.view,
383
+ getNode = _this$props9.getNode,
384
+ isResizing = _this$props9.isResizing,
385
+ _this$props9$allowCon = _this$props9.allowControls,
386
+ allowControls = _this$props9$allowCon === void 0 ? true : _this$props9$allowCon,
387
+ isHeaderRowEnabled = _this$props9.isHeaderRowEnabled,
388
+ ordering = _this$props9.ordering,
389
+ isHeaderColumnEnabled = _this$props9.isHeaderColumnEnabled,
390
+ tableActive = _this$props9.tableActive,
391
+ containerWidth = _this$props9.containerWidth,
392
+ options = _this$props9.options,
393
+ getPos = _this$props9.getPos,
394
+ pluginInjectionApi = _this$props9.pluginInjectionApi;
392
395
  var _this$state = this.state,
393
396
  isLoading = _this$state.isLoading,
394
397
  showBeforeShadow = _this$state.showBeforeShadow,
@@ -445,10 +448,10 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
445
448
  node: node,
446
449
  tableRef: tableRef,
447
450
  containerWidth: containerWidth,
448
- isFullWidthModeEnabled: options === null || options === void 0 ? void 0 : options.isFullWidthModeEnabled,
449
451
  isBreakoutEnabled: options === null || options === void 0 ? void 0 : options.isBreakoutEnabled,
450
452
  isNested: isNested,
451
- pluginInjectionApi: pluginInjectionApi
453
+ pluginInjectionApi: pluginInjectionApi,
454
+ isTableResizingEnabled: options === null || options === void 0 ? void 0 : options.isTableResizingEnabled
452
455
  }, stickyHeadersOptimization && /*#__PURE__*/React.createElement("div", {
453
456
  className: ClassName.TABLE_STICKY_SENTINEL_TOP,
454
457
  "data-testid": "sticky-sentinel-top"
@@ -1,12 +1,11 @@
1
- import React, { useCallback, useRef, forwardRef } from 'react';
2
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
1
+ import React, { forwardRef, useCallback, useRef } from 'react';
2
+ import classNames from 'classnames';
3
3
  import { getTableContainerWidth } from '@atlaskit/editor-common/node-width';
4
4
  import { calcTableWidth } from '@atlaskit/editor-common/styles';
5
+ import { akEditorMobileBreakoutPoint } from '@atlaskit/editor-shared-styles';
6
+ import { TABLE_MAX_WIDTH } from '../pm-plugins/table-resizing/utils';
5
7
  import { TableCssClassName as ClassName } from '../types';
6
8
  import { TableResizer } from './TableResizer';
7
- import { TABLE_MAX_WIDTH } from '../pm-plugins/table-resizing/utils';
8
- import classNames from 'classnames';
9
- import { akEditorMobileBreakoutPoint } from '@atlaskit/editor-shared-styles';
10
9
  var getMarginLeft = function getMarginLeft(lineLength, tableWidth) {
11
10
  var marginLeft;
12
11
  if (tableWidth !== 'inherit' && lineLength) {
@@ -42,10 +41,9 @@ export var ResizableTableContainer = function ResizableTableContainer(_ref2) {
42
41
  tableRef = _ref2.tableRef,
43
42
  pluginInjectionApi = _ref2.pluginInjectionApi;
44
43
  var containerRef = useRef(null);
45
- var innerContainerRef = useRef(null);
46
44
  var marginLeftRef = useRef(0);
47
45
  var updateWidth = useCallback(function (width) {
48
- if (!containerRef.current || !innerContainerRef.current) {
46
+ if (!containerRef.current) {
49
47
  return;
50
48
  }
51
49
  var marginLeft = getMarginLeft(lineLength, width);
@@ -86,7 +84,6 @@ export var ResizableTableContainer = function ResizableTableContainer(_ref2) {
86
84
  tableRef: tableRef,
87
85
  displayGuideline: displayGuideline
88
86
  }, /*#__PURE__*/React.createElement(InnerContainer, {
89
- ref: innerContainerRef,
90
87
  className: className,
91
88
  node: node
92
89
  }, children)));
@@ -98,14 +95,14 @@ export var TableContainer = function TableContainer(_ref3) {
98
95
  _ref3$containerWidth = _ref3.containerWidth,
99
96
  lineLength = _ref3$containerWidth.lineLength,
100
97
  editorWidth = _ref3$containerWidth.width,
101
- isFullWidthModeEnabled = _ref3.isFullWidthModeEnabled,
98
+ isTableResizingEnabled = _ref3.isTableResizingEnabled,
102
99
  isBreakoutEnabled = _ref3.isBreakoutEnabled,
103
100
  editorView = _ref3.editorView,
104
101
  getPos = _ref3.getPos,
105
102
  tableRef = _ref3.tableRef,
106
103
  isNested = _ref3.isNested,
107
104
  pluginInjectionApi = _ref3.pluginInjectionApi;
108
- if ((isFullWidthModeEnabled || isBreakoutEnabled) && getBooleanFF('platform.editor.custom-table-width') && !isNested) {
105
+ if (isTableResizingEnabled && !isNested) {
109
106
  return /*#__PURE__*/React.createElement(ResizableTableContainer, {
110
107
  className: className,
111
108
  node: node,
@@ -2,15 +2,15 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  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; }
4
4
  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) { _defineProperty(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; }
5
- import React, { useCallback, useRef, useMemo, useState } from 'react';
5
+ import React, { useCallback, useMemo, useRef, useState } from 'react';
6
6
  import rafSchd from 'raf-schd';
7
- import { ResizerNext } from '@atlaskit/editor-common/resizer';
8
7
  import { getGuidelinesWithHighlights } from '@atlaskit/editor-common/guideline';
9
- import { scaleTable, previewScaleTable, getColgroupChildrenLength, COLUMN_MIN_WIDTH } from '../pm-plugins/table-resizing/utils';
8
+ import { ResizerNext } from '@atlaskit/editor-common/resizer';
9
+ import { COLUMN_MIN_WIDTH, getColgroupChildrenLength, previewScaleTable, scaleTable } from '../pm-plugins/table-resizing/utils';
10
10
  import { pluginKey as tableWidthPluginKey } from '../pm-plugins/table-width';
11
+ import { TABLE_HIGHLIGHT_GAP, TABLE_SNAP_GAP } from '../ui/consts';
11
12
  import { defaultGuidelines, defaultGuidelineWidths } from '../utils/guidelines';
12
13
  import { findClosestSnap } from '../utils/snapping';
13
- import { TABLE_SNAP_GAP, TABLE_HIGHLIGHT_GAP } from '../ui/consts';
14
14
  var handles = {
15
15
  right: true
16
16
  };
@@ -12,21 +12,23 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
12
12
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
13
13
  import React from 'react';
14
14
  import { DOMSerializer } from 'prosemirror-model';
15
+ import { getTableContainerWidth } from '@atlaskit/editor-common/node-width';
15
16
  import ReactNodeView from '@atlaskit/editor-common/react-node-view';
16
17
  import { WithPluginState } from '@atlaskit/editor-common/with-plugin-state';
18
+ import { TableMap } from '@atlaskit/editor-tables/table-map';
17
19
  import { pluginConfig as getPluginConfig } from '../create-plugin-config';
18
20
  import { getPluginState } from '../pm-plugins/plugin-factory';
19
21
  import { pluginKey } from '../pm-plugins/plugin-key';
20
22
  import { pluginKey as tableResizingPluginKey } from '../pm-plugins/table-resizing';
21
- import { pluginKey as tableWidthPluginKey } from '../pm-plugins/table-width';
22
23
  import { generateColgroup } from '../pm-plugins/table-resizing/utils';
23
- import { TableMap } from '@atlaskit/editor-tables/table-map';
24
- import TableComponent from './TableComponent';
25
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
26
- import { getTableContainerWidth } from '@atlaskit/editor-common/node-width';
24
+ import { pluginKey as tableWidthPluginKey } from '../pm-plugins/table-width';
27
25
  import { isTableNested } from '../utils';
28
- var tableAttributes = function tableAttributes(node, state, pos) {
29
- var shouldHaveInlineWidth = getBooleanFF('platform.editor.custom-table-width') && !isTableNested(state, pos);
26
+ import TableComponent from './TableComponent';
27
+ var tableAttributes = function tableAttributes(node, options, state, pos) {
28
+ // provide a width for tables when custom table width is supported
29
+ // this is to ensure 'responsive' tables (colgroup widths are undefined) become fixed to
30
+ // support screen size adjustments
31
+ var shouldHaveInlineWidth = (options === null || options === void 0 ? void 0 : options.isTableResizingEnabled) && !isTableNested(state, pos);
30
32
  var style = shouldHaveInlineWidth ? "width: ".concat(getTableContainerWidth(node), "px") : undefined;
31
33
  return {
32
34
  'data-number-column': node.attrs.isNumberColumnEnabled,
@@ -42,7 +44,7 @@ var toDOM = function toDOM(node, props) {
42
44
  if (props.allowColumnResizing) {
43
45
  colgroup = ['colgroup', {}].concat(_toConsumableArray(generateColgroup(node)));
44
46
  }
45
- return ['table', tableAttributes(node, props.view.state, props.getPos()), colgroup, ['tbody', 0]];
47
+ return ['table', tableAttributes(node, props.options, props.view.state, props.getPos()), colgroup, ['tbody', 0]];
46
48
  };
47
49
  var TableView = /*#__PURE__*/function (_ReactNodeView) {
48
50
  _inherits(TableView, _ReactNodeView);
@@ -76,7 +78,7 @@ var TableView = /*#__PURE__*/function (_ReactNodeView) {
76
78
  if (!this.table) {
77
79
  return;
78
80
  }
79
- var attrs = tableAttributes(node, this.view.state, this.getPos());
81
+ var attrs = tableAttributes(node, this.reactComponentProps.options, this.view.state, this.getPos());
80
82
  Object.keys(attrs).forEach(function (attr) {
81
83
  _this2.table.setAttribute(attr, attrs[attr]);
82
84
  });
@@ -1,9 +1,9 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
2
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
3
3
  import _createClass from "@babel/runtime/helpers/createClass";
4
- import uuid from 'uuid';
5
4
  import { DOMSerializer } from 'prosemirror-model';
6
- import { getCellDomAttrs, getCellAttrs } from '@atlaskit/adf-schema';
5
+ import uuid from 'uuid';
6
+ import { getCellAttrs, getCellDomAttrs } from '@atlaskit/adf-schema';
7
7
  var DEFAULT_COL_SPAN = 1;
8
8
  var DEFAULT_ROW_SPAN = 1;
9
9
  var TableCellNodeView = /*#__PURE__*/function () {
@@ -1,10 +1,9 @@
1
- import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
1
  import { PluginKey
3
-
4
2
  // @ts-ignore -- ReadonlyTransaction is a local declaration and will cause a TS2305 error in CCFE typecheck
5
3
  } from 'prosemirror-state';
6
- import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
7
4
  import { DecorationSet } from 'prosemirror-view';
5
+ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
6
+ import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
8
7
  import { pluginKey as tablePluginKey } from '../plugin-key';
9
8
  import { pluginKey as tableWidthPluginKey } from '../table-width';
10
9
  import { buildColumnControlsDecorations, maybeUpdateColumnControlsSelectedDecoration } from './utils';
@@ -1,9 +1,9 @@
1
- import { keymap } from 'prosemirror-keymap';
2
1
  import { chainCommands } from 'prosemirror-commands';
3
- import * as keymaps from '@atlaskit/editor-common/keymaps';
2
+ import { keymap } from 'prosemirror-keymap';
4
3
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
5
- import { triggerUnlessTableHeader, createTable, goToNextCell, moveCursorBackward } from '../commands';
6
- import { addRowAroundSelection, emptyMultipleCellsWithAnalytics, deleteTableIfSelectedWithAnalytics } from '../commands-with-analytics';
4
+ import * as keymaps from '@atlaskit/editor-common/keymaps';
5
+ import { createTable, goToNextCell, moveCursorBackward, triggerUnlessTableHeader } from '../commands';
6
+ import { addRowAroundSelection, deleteTableIfSelectedWithAnalytics, emptyMultipleCellsWithAnalytics } from '../commands-with-analytics';
7
7
  import { addColumnAfter, addColumnBefore } from '../commands/insert';
8
8
  import { withEditorAnalyticsAPI } from '../utils/analytics';
9
9
  var createTableWithAnalytics = function createTableWithAnalytics(editorAnalyticsAPI) {
@@ -1,37 +1,36 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  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; }
3
3
  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) { _defineProperty(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; }
4
- import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
5
4
  import { findParentDomRefOfType, findParentNodeOfType } from 'prosemirror-utils';
5
+ import { ACTION, ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
6
+ import { insideTable } from '@atlaskit/editor-common/core-utils';
7
+ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
8
+ import { transformSliceToRemoveOpenBodiedExtension, transformSliceToRemoveOpenExpand, transformSliceToRemoveOpenLayoutNodes } from '@atlaskit/editor-common/transforms';
9
+ import { browser, closestElement } from '@atlaskit/editor-common/utils';
6
10
  import { findTable } from '@atlaskit/editor-tables/utils';
7
- import { browser } from '@atlaskit/editor-common/utils';
8
- import { closestElement } from '@atlaskit/editor-common/utils';
9
11
  import { addBoldInEmptyHeaderCells, clearHoverSelection, setTableRef } from '../commands';
12
+ import { transformSliceRemoveCellBackgroundColor, transformSliceToAddTableHeaders, transformSliceToRemoveColumnsWidths } from '../commands/misc';
10
13
  import { handleBlur, handleClick, handleCut, handleFocus, handleMouseDown, handleMouseLeave, handleMouseMove, handleMouseOut, handleMouseOver, handleTripleClick, whenTableInFocus } from '../event-handlers';
11
14
  import { createTableView } from '../nodeviews/table';
15
+ import TableCellNodeView from '../nodeviews/tableCell';
12
16
  import { pluginKey as decorationsPluginKey } from '../pm-plugins/decorations/plugin';
13
17
  import { fixTables, replaceSelectedTable } from '../transforms';
14
18
  import { TableCssClassName as ClassName } from '../types';
15
19
  import { findControlsHoverDecoration, transformSliceToCorrectEmptyTableCells, transformSliceToFixHardBreakProblemOnCopyFromCell, transformSliceToRemoveOpenTable, updateResizeHandles } from '../utils';
16
- import { ACTION, ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
20
+ import { isHeaderRowRequired } from '../utils/paste';
17
21
  import { defaultTableSelection } from './default-table-selection';
18
22
  import { createPluginState, getPluginState } from './plugin-factory';
19
23
  import { pluginKey } from './plugin-key';
20
- import TableCellNodeView from '../nodeviews/tableCell';
21
- import { transformSliceRemoveCellBackgroundColor, transformSliceToRemoveColumnsWidths, transformSliceToAddTableHeaders } from '../commands/misc';
22
- import { transformSliceToRemoveOpenLayoutNodes } from '@atlaskit/editor-common/transforms';
23
- import { transformSliceToRemoveOpenExpand } from '@atlaskit/editor-common/transforms';
24
- import { transformSliceToRemoveOpenBodiedExtension } from '@atlaskit/editor-common/transforms';
25
- import { insideTable } from '@atlaskit/editor-common/core-utils';
26
- import { isHeaderRowRequired } from '../utils/paste';
27
24
  var isBreakoutEnabled;
28
25
  var isFullWidthModeEnabled;
29
26
  var wasFullWidthModeEnabled;
30
- export var createPlugin = function createPlugin(dispatchAnalyticsEvent, dispatch, portalProviderAPI, eventDispatcher, pluginConfig, getEditorContainerWidth, getEditorFeatureFlags, breakoutEnabled, fullWidthModeEnabled, previousFullWidthModeEnabled, editorAnalyticsAPI, pluginInjectionApi) {
27
+ var isTableResizingEnabled;
28
+ export var createPlugin = function createPlugin(dispatchAnalyticsEvent, dispatch, portalProviderAPI, eventDispatcher, pluginConfig, getEditorContainerWidth, getEditorFeatureFlags, breakoutEnabled, fullWidthModeEnabled, tableResizingEnabled, previousFullWidthModeEnabled, editorAnalyticsAPI, pluginInjectionApi) {
31
29
  var _window;
32
30
  isBreakoutEnabled = breakoutEnabled;
33
31
  isFullWidthModeEnabled = fullWidthModeEnabled;
34
32
  wasFullWidthModeEnabled = previousFullWidthModeEnabled;
33
+ isTableResizingEnabled = tableResizingEnabled;
35
34
  var state = createPluginState(dispatch, _objectSpread({
36
35
  pluginConfig: pluginConfig,
37
36
  insertColumnButtonIndex: undefined,
@@ -231,7 +230,8 @@ export var createPlugin = function createPlugin(dispatchAnalyticsEvent, dispatch
231
230
  return createTableView(node, view, getPos, portalProviderAPI, eventDispatcher, {
232
231
  isBreakoutEnabled: isBreakoutEnabled,
233
232
  isFullWidthModeEnabled: isFullWidthModeEnabled,
234
- wasFullWidthModeEnabled: wasFullWidthModeEnabled
233
+ wasFullWidthModeEnabled: wasFullWidthModeEnabled,
234
+ isTableResizingEnabled: isTableResizingEnabled
235
235
  }, getEditorContainerWidth, getEditorFeatureFlags, pluginInjectionApi);
236
236
  }
237
237
  }),
@@ -3,9 +3,9 @@
3
3
  * https://github.com/ProseMirror/prosemirror/issues/934
4
4
  * We will remove this plugin when Webkit fix the problem itself.
5
5
  */
6
- import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
7
6
  import { PluginKey } from 'prosemirror-state';
8
7
  import { Decoration, DecorationSet } from 'prosemirror-view';
8
+ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
9
9
  export var tableSafariDeleteCompositionTextIssueWorkaroundKey = new PluginKey('tableSafariDeleteCompositionTextIssueWorkaround');
10
10
  export var createPlugin = function createPlugin() {
11
11
  return new SafePlugin({
@@ -1,6 +1,8 @@
1
1
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
2
  import _createClass from "@babel/runtime/helpers/createClass";
3
3
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
+ import debounce from 'lodash/debounce';
5
+ import throttle from 'lodash/throttle';
4
6
  import { findOverflowScrollParent } from '@atlaskit/editor-common/ui';
5
7
  import { mapChildren } from '@atlaskit/editor-common/utils';
6
8
  import { TableCssClassName as ClassName, TableCssClassName } from '../../../types';
@@ -9,8 +11,6 @@ import { pluginKey as tablePluginKey } from '../../plugin-key';
9
11
  import { syncStickyRowToTable, updateStickyMargins as updateTableMargin } from '../../table-resizing/utils/dom';
10
12
  import { updateStickyState } from '../commands';
11
13
  import { getTop, getTree } from './dom';
12
- import debounce from 'lodash/debounce';
13
- import throttle from 'lodash/throttle';
14
14
 
15
15
  // limit scroll event calls
16
16
  var HEADER_ROW_SCROLL_THROTTLE_TIMEOUT = 200;
@@ -17,10 +17,10 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
17
17
  *
18
18
  */
19
19
 
20
- import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
21
20
  import { PluginKey } from 'prosemirror-state';
22
21
  import rafSchedule from 'raf-schd';
23
22
  import { uuid } from '@atlaskit/adf-schema';
23
+ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
24
24
  import { stepHasSlice } from '@atlaskit/editor-common/utils';
25
25
  var pluginKey = new PluginKey('tableLocalIdPlugin');
26
26
  var getPluginState = function getPluginState(state) {
@@ -1,7 +1,7 @@
1
1
  import { isTableSelected } from '@atlaskit/editor-tables/utils';
2
+ import { updateColumnWidths } from '../../transforms';
2
3
  import { createCommand, getPluginState } from './plugin-factory';
3
4
  import { evenAllColumnsWidths, isClickNear } from './utils';
4
- import { updateColumnWidths } from '../../transforms';
5
5
  export var evenColumns = function evenColumns(_ref) {
6
6
  var resizeState = _ref.resizeState,
7
7
  table = _ref.table,
@@ -1,14 +1,14 @@
1
- import { TableMap } from '@atlaskit/editor-tables/table-map';
2
- import { getSelectionRect } from '@atlaskit/editor-tables/utils';
1
+ import { ACTION_SUBJECT, EVENT_TYPE, TABLE_ACTION } from '@atlaskit/editor-common/analytics';
2
+ import { getParentNodeWidth } from '@atlaskit/editor-common/node-width';
3
3
  import { tableCellMinWidth } from '@atlaskit/editor-common/styles';
4
4
  import { akEditorTableNumberColumnWidth } from '@atlaskit/editor-shared-styles';
5
- import { getParentNodeWidth } from '@atlaskit/editor-common/node-width';
5
+ import { TableMap } from '@atlaskit/editor-tables/table-map';
6
+ import { getSelectionRect } from '@atlaskit/editor-tables/utils';
6
7
  import { updateColumnWidths } from '../../transforms';
7
8
  import { getSelectedColumnIndexes, updateResizeHandles } from '../../utils';
8
9
  import { evenColumns, setDragging, stopResizing } from './commands';
9
10
  import { getPluginState } from './plugin-factory';
10
11
  import { currentColWidth, getLayoutSize, getResizeState, pointsAtCell, resizeColumn, updateControls } from './utils';
11
- import { ACTION_SUBJECT, EVENT_TYPE, TABLE_ACTION } from '@atlaskit/editor-common/analytics';
12
12
  export var handleMouseDown = function handleMouseDown(view, event, localResizeHandlePos, getEditorContainerWidth, getEditorFeatureFlags, editorAnalyticsAPI) {
13
13
  var state = view.state,
14
14
  dispatch = view.dispatch;
@@ -1,7 +1,7 @@
1
1
  import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
2
2
  import { DOMSerializer } from 'prosemirror-model';
3
- import { getFragmentBackingArray } from '@atlaskit/editor-common/utils';
4
3
  import { tableCellMinWidth } from '@atlaskit/editor-common/styles';
4
+ import { getFragmentBackingArray } from '@atlaskit/editor-common/utils';
5
5
  import { TableMap } from '@atlaskit/editor-tables/table-map';
6
6
  import { getBooleanFF } from '@atlaskit/platform-feature-flags';
7
7
  export var generateColgroup = function generateColgroup(table) {
@@ -1,6 +1,6 @@
1
- import { TableMap } from '@atlaskit/editor-tables/table-map';
2
1
  import { findDomRefAtPos } from 'prosemirror-utils';
3
2
  import { tableNewColumnMinWidth } from '@atlaskit/editor-common/styles';
3
+ import { TableMap } from '@atlaskit/editor-tables/table-map';
4
4
  import { contentWidth } from './content-width';
5
5
  import { unitToNumber } from './unit-to-number';
6
6
  // Reads `width` and `minWidth` of each column from DOM and returns `ColumnState` containing those values
@@ -2,8 +2,8 @@ import { tableCellBorderWidth, tableMarginTop } from '@atlaskit/editor-common/st
2
2
  import { closestElement, containsClassName, parsePx } from '@atlaskit/editor-common/utils';
3
3
  import { updateOverflowShadows } from '../../../nodeviews/update-overflow-shadows';
4
4
  import { TableCssClassName as ClassName } from '../../../types';
5
- import { getRowHeights } from '../../../utils/row-controls';
6
5
  import { colWidthsForRow } from '../../../utils/column-controls';
6
+ import { getRowHeights } from '../../../utils/row-controls';
7
7
  import { getPluginState as getMainPluginState } from '../../plugin-factory';
8
8
  export var updateControls = function updateControls(getEditorFeatureFlags) {
9
9
  return function (state) {
@@ -1,9 +1,8 @@
1
+ import { getParentNodeWidth, layoutToWidth } from '@atlaskit/editor-common/node-width';
1
2
  import { calcTableWidth } from '@atlaskit/editor-common/styles';
2
3
  import { getBreakpoint, mapBreakpointToLayoutMaxWidth } from '@atlaskit/editor-common/ui';
3
- import { akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorTableNumberColumnWidth } from '@atlaskit/editor-shared-styles';
4
4
  import { containsClassName } from '@atlaskit/editor-common/utils';
5
- import { getParentNodeWidth, layoutToWidth } from '@atlaskit/editor-common/node-width';
6
-
5
+ import { akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorTableNumberColumnWidth } from '@atlaskit/editor-shared-styles';
7
6
  // Translates named layouts in number values.
8
7
  export function getLayoutSize(tableLayout) {
9
8
  var containerWidth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
@@ -3,11 +3,11 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
3
3
  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) { _defineProperty(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; }
4
4
  import { tableCellMinWidth, tableNewColumnMinWidth } from '@atlaskit/editor-common/styles';
5
5
  import { calcTableColumnWidths } from '@atlaskit/editor-common/utils';
6
+ import { getSelectedTableInfo } from '../../../utils';
6
7
  import { hasTableBeenResized, insertColgroupFromNode } from './colgroup';
7
8
  import { getCellsRefsInColumn, getColumnStateFromDOM } from './column-state';
8
9
  import { syncStickyRowToTable } from './dom';
9
10
  import { getTableMaxWidth } from './misc';
10
- import { getSelectedTableInfo } from '../../../utils';
11
11
  export var getResizeState = function getResizeState(_ref) {
12
12
  var minWidth = _ref.minWidth,
13
13
  maxSize = _ref.maxSize,