@atlaskit/editor-plugin-table 8.4.11 → 8.4.13

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 (387) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/cjs/nodeviews/ExternalDropTargets.js +6 -3
  3. package/dist/cjs/nodeviews/TableCell.js +5 -0
  4. package/dist/cjs/nodeviews/TableComponent.js +92 -29
  5. package/dist/cjs/nodeviews/TableComponentWithSharedState.js +7 -1
  6. package/dist/cjs/nodeviews/TableContainer.js +16 -6
  7. package/dist/cjs/nodeviews/TableNodeViewBase.js +4 -0
  8. package/dist/cjs/nodeviews/TableResizer.js +44 -15
  9. package/dist/cjs/nodeviews/TableRow.js +45 -1
  10. package/dist/cjs/nodeviews/TableStickyScrollbar.js +21 -2
  11. package/dist/cjs/nodeviews/lazy-node-views.js +16 -4
  12. package/dist/cjs/nodeviews/table.js +53 -18
  13. package/dist/cjs/pm-plugins/commands/clear.js +6 -0
  14. package/dist/cjs/pm-plugins/commands/column-resize.js +26 -17
  15. package/dist/cjs/pm-plugins/commands/commands-with-analytics.js +39 -26
  16. package/dist/cjs/pm-plugins/commands/go-to-next-cell.js +2 -0
  17. package/dist/cjs/pm-plugins/commands/hover.js +17 -13
  18. package/dist/cjs/pm-plugins/commands/insert.js +27 -10
  19. package/dist/cjs/pm-plugins/commands/misc.js +29 -9
  20. package/dist/cjs/pm-plugins/commands/selection.js +4 -0
  21. package/dist/cjs/pm-plugins/commands/sort.js +10 -1
  22. package/dist/cjs/pm-plugins/commands/toggle.js +2 -0
  23. package/dist/cjs/pm-plugins/decorations/plugin.js +9 -4
  24. package/dist/cjs/pm-plugins/decorations/utils/column-resizing.js +4 -1
  25. package/dist/cjs/pm-plugins/drag-and-drop/commands-with-analytics.js +19 -10
  26. package/dist/cjs/pm-plugins/drag-and-drop/commands.js +16 -7
  27. package/dist/cjs/pm-plugins/drag-and-drop/plugin.js +21 -8
  28. package/dist/cjs/pm-plugins/handlers.js +2 -2
  29. package/dist/cjs/pm-plugins/keymap.js +103 -24
  30. package/dist/cjs/pm-plugins/main.js +22 -11
  31. package/dist/cjs/pm-plugins/table-resizing/commands.js +7 -6
  32. package/dist/cjs/pm-plugins/table-resizing/event-handlers.js +39 -20
  33. package/dist/cjs/pm-plugins/table-resizing/plugin.js +4 -2
  34. package/dist/cjs/pm-plugins/table-resizing/utils/colgroup.js +19 -1
  35. package/dist/cjs/pm-plugins/table-resizing/utils/column-state.js +6 -1
  36. package/dist/cjs/pm-plugins/table-resizing/utils/content-width.js +17 -0
  37. package/dist/cjs/pm-plugins/table-resizing/utils/dom.js +4 -0
  38. package/dist/cjs/pm-plugins/table-resizing/utils/misc.js +2 -0
  39. package/dist/cjs/pm-plugins/table-resizing/utils/resize-column.js +8 -1
  40. package/dist/cjs/pm-plugins/table-resizing/utils/resize-logic.js +10 -2
  41. package/dist/cjs/pm-plugins/table-resizing/utils/resize-state.js +6 -3
  42. package/dist/cjs/pm-plugins/table-resizing/utils/scale-table.js +4 -4
  43. package/dist/cjs/pm-plugins/table-selection-keymap.js +12 -0
  44. package/dist/cjs/pm-plugins/table-width.js +9 -4
  45. package/dist/cjs/pm-plugins/transforms/column-width.js +8 -5
  46. package/dist/cjs/pm-plugins/transforms/delete-columns.js +2 -0
  47. package/dist/cjs/pm-plugins/transforms/fix-tables.js +24 -8
  48. package/dist/cjs/pm-plugins/transforms/merge.js +7 -0
  49. package/dist/cjs/pm-plugins/transforms/replace-table.js +6 -3
  50. package/dist/cjs/pm-plugins/transforms/split.js +6 -1
  51. package/dist/cjs/pm-plugins/utils/alignment.js +4 -1
  52. package/dist/cjs/pm-plugins/utils/analytics.js +3 -3
  53. package/dist/cjs/pm-plugins/utils/column-controls.js +4 -0
  54. package/dist/cjs/pm-plugins/utils/create.js +2 -2
  55. package/dist/cjs/pm-plugins/utils/decoration.js +24 -6
  56. package/dist/cjs/pm-plugins/utils/dom.js +4 -0
  57. package/dist/cjs/pm-plugins/utils/drag-menu.js +19 -7
  58. package/dist/cjs/pm-plugins/utils/nodes.js +3 -0
  59. package/dist/cjs/pm-plugins/utils/paste.js +4 -1
  60. package/dist/cjs/pm-plugins/utils/row-controls.js +4 -1
  61. package/dist/cjs/tablePlugin.js +24 -18
  62. package/dist/cjs/ui/ColumnResizeWidget/index.js +2 -0
  63. package/dist/cjs/ui/DragHandle/HandleIconComponent.js +5 -3
  64. package/dist/cjs/ui/DragHandle/index.js +14 -7
  65. package/dist/cjs/ui/FloatingAlignmentButtons/FloatingAlignmentButtons.js +8 -1
  66. package/dist/cjs/ui/FloatingContextualButton/FixedButton.js +4 -0
  67. package/dist/cjs/ui/FloatingContextualButton/index.js +7 -1
  68. package/dist/cjs/ui/FloatingContextualMenu/ContextualMenu.js +32 -15
  69. package/dist/cjs/ui/FloatingContextualMenu/index.js +19 -4
  70. package/dist/cjs/ui/FloatingDeleteButton/index.js +27 -5
  71. package/dist/cjs/ui/FloatingDragMenu/DragMenu.js +19 -7
  72. package/dist/cjs/ui/FloatingDragMenu/DropdownMenu.js +15 -2
  73. package/dist/cjs/ui/FloatingDragMenu/index.js +4 -1
  74. package/dist/cjs/ui/FloatingInsertButton/InsertButton.js +4 -0
  75. package/dist/cjs/ui/FloatingInsertButton/getPopupOptions.js +6 -0
  76. package/dist/cjs/ui/FloatingInsertButton/index.js +27 -3
  77. package/dist/cjs/ui/TableFloatingColumnControls/ColumnControls/index.js +30 -8
  78. package/dist/cjs/ui/TableFloatingColumnControls/ColumnDropTargets/index.js +4 -1
  79. package/dist/cjs/ui/TableFloatingColumnControls/index.js +9 -5
  80. package/dist/cjs/ui/TableFloatingControls/CornerControls/ClassicCornerControls.js +2 -0
  81. package/dist/cjs/ui/TableFloatingControls/FloatingControlsWithSelection.js +4 -4
  82. package/dist/cjs/ui/TableFloatingControls/NumberColumn/index.js +8 -2
  83. package/dist/cjs/ui/TableFloatingControls/RowControls/ClassicControls.js +9 -5
  84. package/dist/cjs/ui/TableFloatingControls/RowControls/DragControls.js +68 -41
  85. package/dist/cjs/ui/TableFloatingControls/index.js +19 -8
  86. package/dist/cjs/ui/common-styles.js +1 -1
  87. package/dist/cjs/ui/event-handlers.js +59 -32
  88. package/dist/cjs/ui/icons/SortingIconWrapper.js +2 -0
  89. package/dist/cjs/ui/toolbar.js +42 -16
  90. package/dist/es2019/nodeviews/ExternalDropTargets.js +5 -2
  91. package/dist/es2019/nodeviews/TableCell.js +5 -0
  92. package/dist/es2019/nodeviews/TableComponent.js +77 -13
  93. package/dist/es2019/nodeviews/TableComponentWithSharedState.js +8 -1
  94. package/dist/es2019/nodeviews/TableContainer.js +14 -4
  95. package/dist/es2019/nodeviews/TableNodeViewBase.js +4 -0
  96. package/dist/es2019/nodeviews/TableResizer.js +33 -4
  97. package/dist/es2019/nodeviews/TableRow.js +45 -1
  98. package/dist/es2019/nodeviews/TableStickyScrollbar.js +20 -2
  99. package/dist/es2019/nodeviews/lazy-node-views.js +16 -4
  100. package/dist/es2019/nodeviews/table.js +47 -12
  101. package/dist/es2019/pm-plugins/commands/clear.js +6 -0
  102. package/dist/es2019/pm-plugins/commands/column-resize.js +16 -7
  103. package/dist/es2019/pm-plugins/commands/commands-with-analytics.js +28 -9
  104. package/dist/es2019/pm-plugins/commands/delete.js +4 -1
  105. package/dist/es2019/pm-plugins/commands/go-to-next-cell.js +2 -0
  106. package/dist/es2019/pm-plugins/commands/hover.js +5 -1
  107. package/dist/es2019/pm-plugins/commands/insert.js +26 -6
  108. package/dist/es2019/pm-plugins/commands/misc.js +25 -5
  109. package/dist/es2019/pm-plugins/commands/selection.js +4 -0
  110. package/dist/es2019/pm-plugins/commands/sort.js +10 -1
  111. package/dist/es2019/pm-plugins/commands/toggle.js +2 -0
  112. package/dist/es2019/pm-plugins/decorations/plugin.js +7 -2
  113. package/dist/es2019/pm-plugins/decorations/utils/column-resizing.js +4 -1
  114. package/dist/es2019/pm-plugins/drag-and-drop/commands-with-analytics.js +14 -5
  115. package/dist/es2019/pm-plugins/drag-and-drop/commands.js +17 -5
  116. package/dist/es2019/pm-plugins/drag-and-drop/plugin.js +21 -5
  117. package/dist/es2019/pm-plugins/handlers.js +1 -1
  118. package/dist/es2019/pm-plugins/keymap.js +104 -24
  119. package/dist/es2019/pm-plugins/main.js +16 -5
  120. package/dist/es2019/pm-plugins/table-resizing/commands.js +3 -2
  121. package/dist/es2019/pm-plugins/table-resizing/event-handlers.js +25 -6
  122. package/dist/es2019/pm-plugins/table-resizing/plugin.js +4 -1
  123. package/dist/es2019/pm-plugins/table-resizing/utils/colgroup.js +23 -2
  124. package/dist/es2019/pm-plugins/table-resizing/utils/column-state.js +6 -1
  125. package/dist/es2019/pm-plugins/table-resizing/utils/content-width.js +17 -0
  126. package/dist/es2019/pm-plugins/table-resizing/utils/dom.js +4 -0
  127. package/dist/es2019/pm-plugins/table-resizing/utils/misc.js +2 -0
  128. package/dist/es2019/pm-plugins/table-resizing/utils/resize-column.js +12 -2
  129. package/dist/es2019/pm-plugins/table-resizing/utils/resize-logic.js +10 -2
  130. package/dist/es2019/pm-plugins/table-resizing/utils/resize-state.js +9 -3
  131. package/dist/es2019/pm-plugins/table-resizing/utils/scale-table.js +18 -6
  132. package/dist/es2019/pm-plugins/table-selection-keymap.js +12 -0
  133. package/dist/es2019/pm-plugins/table-width.js +7 -2
  134. package/dist/es2019/pm-plugins/transforms/column-width.js +12 -5
  135. package/dist/es2019/pm-plugins/transforms/delete-columns.js +6 -1
  136. package/dist/es2019/pm-plugins/transforms/fix-tables.js +20 -4
  137. package/dist/es2019/pm-plugins/transforms/merge.js +7 -0
  138. package/dist/es2019/pm-plugins/transforms/replace-table.js +5 -2
  139. package/dist/es2019/pm-plugins/transforms/split.js +6 -1
  140. package/dist/es2019/pm-plugins/utils/alignment.js +4 -1
  141. package/dist/es2019/pm-plugins/utils/analytics.js +2 -2
  142. package/dist/es2019/pm-plugins/utils/column-controls.js +4 -0
  143. package/dist/es2019/pm-plugins/utils/create.js +1 -1
  144. package/dist/es2019/pm-plugins/utils/decoration.js +24 -6
  145. package/dist/es2019/pm-plugins/utils/dom.js +4 -0
  146. package/dist/es2019/pm-plugins/utils/drag-menu.js +19 -4
  147. package/dist/es2019/pm-plugins/utils/nodes.js +3 -0
  148. package/dist/es2019/pm-plugins/utils/paste.js +8 -2
  149. package/dist/es2019/pm-plugins/utils/row-controls.js +4 -1
  150. package/dist/es2019/pm-plugins/utils/snapping.js +4 -1
  151. package/dist/es2019/tablePlugin.js +13 -4
  152. package/dist/es2019/ui/ColumnResizeWidget/index.js +2 -0
  153. package/dist/es2019/ui/DragHandle/HandleIconComponent.js +3 -1
  154. package/dist/es2019/ui/DragHandle/index.js +10 -3
  155. package/dist/es2019/ui/FloatingAlignmentButtons/FloatingAlignmentButtons.js +8 -1
  156. package/dist/es2019/ui/FloatingContextualButton/FixedButton.js +4 -0
  157. package/dist/es2019/ui/FloatingContextualButton/index.js +7 -1
  158. package/dist/es2019/ui/FloatingContextualMenu/ContextualMenu.js +23 -6
  159. package/dist/es2019/ui/FloatingContextualMenu/index.js +19 -4
  160. package/dist/es2019/ui/FloatingDeleteButton/index.js +23 -1
  161. package/dist/es2019/ui/FloatingDragMenu/DragMenu.js +15 -3
  162. package/dist/es2019/ui/FloatingDragMenu/DropdownMenu.js +15 -2
  163. package/dist/es2019/ui/FloatingDragMenu/index.js +4 -1
  164. package/dist/es2019/ui/FloatingInsertButton/InsertButton.js +4 -0
  165. package/dist/es2019/ui/FloatingInsertButton/getPopupOptions.js +6 -0
  166. package/dist/es2019/ui/FloatingInsertButton/index.js +26 -2
  167. package/dist/es2019/ui/TableFloatingColumnControls/ColumnControls/index.js +28 -6
  168. package/dist/es2019/ui/TableFloatingColumnControls/ColumnDropTargets/index.js +4 -1
  169. package/dist/es2019/ui/TableFloatingColumnControls/index.js +7 -2
  170. package/dist/es2019/ui/TableFloatingControls/CornerControls/ClassicCornerControls.js +2 -0
  171. package/dist/es2019/ui/TableFloatingControls/FloatingControlsWithSelection.js +2 -2
  172. package/dist/es2019/ui/TableFloatingControls/NumberColumn/index.js +7 -1
  173. package/dist/es2019/ui/TableFloatingControls/RowControls/ClassicControls.js +7 -2
  174. package/dist/es2019/ui/TableFloatingControls/RowControls/DragControls.js +32 -6
  175. package/dist/es2019/ui/TableFloatingControls/index.js +14 -3
  176. package/dist/es2019/ui/common-styles.js +7 -0
  177. package/dist/es2019/ui/event-handlers.js +35 -5
  178. package/dist/es2019/ui/icons/SortingIconWrapper.js +2 -0
  179. package/dist/es2019/ui/toolbar.js +58 -14
  180. package/dist/esm/nodeviews/ExternalDropTargets.js +5 -2
  181. package/dist/esm/nodeviews/TableCell.js +5 -0
  182. package/dist/esm/nodeviews/TableComponent.js +75 -11
  183. package/dist/esm/nodeviews/TableComponentWithSharedState.js +8 -1
  184. package/dist/esm/nodeviews/TableContainer.js +14 -4
  185. package/dist/esm/nodeviews/TableNodeViewBase.js +4 -0
  186. package/dist/esm/nodeviews/TableResizer.js +33 -4
  187. package/dist/esm/nodeviews/TableRow.js +45 -1
  188. package/dist/esm/nodeviews/TableStickyScrollbar.js +21 -2
  189. package/dist/esm/nodeviews/lazy-node-views.js +16 -4
  190. package/dist/esm/nodeviews/table.js +47 -12
  191. package/dist/esm/pm-plugins/commands/clear.js +6 -0
  192. package/dist/esm/pm-plugins/commands/column-resize.js +16 -7
  193. package/dist/esm/pm-plugins/commands/commands-with-analytics.js +20 -7
  194. package/dist/esm/pm-plugins/commands/go-to-next-cell.js +2 -0
  195. package/dist/esm/pm-plugins/commands/hover.js +5 -1
  196. package/dist/esm/pm-plugins/commands/insert.js +22 -5
  197. package/dist/esm/pm-plugins/commands/misc.js +25 -5
  198. package/dist/esm/pm-plugins/commands/selection.js +4 -0
  199. package/dist/esm/pm-plugins/commands/sort.js +10 -1
  200. package/dist/esm/pm-plugins/commands/toggle.js +2 -0
  201. package/dist/esm/pm-plugins/decorations/plugin.js +7 -2
  202. package/dist/esm/pm-plugins/decorations/utils/column-resizing.js +4 -1
  203. package/dist/esm/pm-plugins/drag-and-drop/commands-with-analytics.js +14 -5
  204. package/dist/esm/pm-plugins/drag-and-drop/commands.js +13 -4
  205. package/dist/esm/pm-plugins/drag-and-drop/plugin.js +17 -4
  206. package/dist/esm/pm-plugins/handlers.js +1 -1
  207. package/dist/esm/pm-plugins/keymap.js +104 -24
  208. package/dist/esm/pm-plugins/main.js +16 -5
  209. package/dist/esm/pm-plugins/table-resizing/commands.js +3 -2
  210. package/dist/esm/pm-plugins/table-resizing/event-handlers.js +25 -6
  211. package/dist/esm/pm-plugins/table-resizing/plugin.js +4 -1
  212. package/dist/esm/pm-plugins/table-resizing/utils/colgroup.js +19 -1
  213. package/dist/esm/pm-plugins/table-resizing/utils/column-state.js +6 -1
  214. package/dist/esm/pm-plugins/table-resizing/utils/content-width.js +17 -0
  215. package/dist/esm/pm-plugins/table-resizing/utils/dom.js +4 -0
  216. package/dist/esm/pm-plugins/table-resizing/utils/misc.js +2 -0
  217. package/dist/esm/pm-plugins/table-resizing/utils/resize-column.js +8 -1
  218. package/dist/esm/pm-plugins/table-resizing/utils/resize-logic.js +10 -2
  219. package/dist/esm/pm-plugins/table-resizing/utils/resize-state.js +5 -2
  220. package/dist/esm/pm-plugins/table-resizing/utils/scale-table.js +2 -2
  221. package/dist/esm/pm-plugins/table-selection-keymap.js +12 -0
  222. package/dist/esm/pm-plugins/table-width.js +7 -2
  223. package/dist/esm/pm-plugins/transforms/column-width.js +6 -4
  224. package/dist/esm/pm-plugins/transforms/delete-columns.js +2 -0
  225. package/dist/esm/pm-plugins/transforms/fix-tables.js +20 -4
  226. package/dist/esm/pm-plugins/transforms/merge.js +7 -0
  227. package/dist/esm/pm-plugins/transforms/replace-table.js +5 -2
  228. package/dist/esm/pm-plugins/transforms/split.js +6 -1
  229. package/dist/esm/pm-plugins/utils/alignment.js +4 -1
  230. package/dist/esm/pm-plugins/utils/analytics.js +2 -2
  231. package/dist/esm/pm-plugins/utils/column-controls.js +4 -0
  232. package/dist/esm/pm-plugins/utils/create.js +1 -1
  233. package/dist/esm/pm-plugins/utils/decoration.js +24 -6
  234. package/dist/esm/pm-plugins/utils/dom.js +4 -0
  235. package/dist/esm/pm-plugins/utils/drag-menu.js +15 -3
  236. package/dist/esm/pm-plugins/utils/nodes.js +3 -0
  237. package/dist/esm/pm-plugins/utils/paste.js +4 -1
  238. package/dist/esm/pm-plugins/utils/row-controls.js +4 -1
  239. package/dist/esm/tablePlugin.js +11 -4
  240. package/dist/esm/ui/ColumnResizeWidget/index.js +2 -0
  241. package/dist/esm/ui/DragHandle/HandleIconComponent.js +3 -1
  242. package/dist/esm/ui/DragHandle/index.js +10 -3
  243. package/dist/esm/ui/FloatingAlignmentButtons/FloatingAlignmentButtons.js +8 -1
  244. package/dist/esm/ui/FloatingContextualButton/FixedButton.js +4 -0
  245. package/dist/esm/ui/FloatingContextualButton/index.js +7 -1
  246. package/dist/esm/ui/FloatingContextualMenu/ContextualMenu.js +23 -6
  247. package/dist/esm/ui/FloatingContextualMenu/index.js +19 -4
  248. package/dist/esm/ui/FloatingDeleteButton/index.js +23 -1
  249. package/dist/esm/ui/FloatingDragMenu/DragMenu.js +15 -3
  250. package/dist/esm/ui/FloatingDragMenu/DropdownMenu.js +15 -2
  251. package/dist/esm/ui/FloatingDragMenu/index.js +4 -1
  252. package/dist/esm/ui/FloatingInsertButton/InsertButton.js +4 -0
  253. package/dist/esm/ui/FloatingInsertButton/getPopupOptions.js +6 -0
  254. package/dist/esm/ui/FloatingInsertButton/index.js +26 -2
  255. package/dist/esm/ui/TableFloatingColumnControls/ColumnControls/index.js +28 -6
  256. package/dist/esm/ui/TableFloatingColumnControls/ColumnDropTargets/index.js +4 -1
  257. package/dist/esm/ui/TableFloatingColumnControls/index.js +6 -2
  258. package/dist/esm/ui/TableFloatingControls/CornerControls/ClassicCornerControls.js +2 -0
  259. package/dist/esm/ui/TableFloatingControls/FloatingControlsWithSelection.js +2 -2
  260. package/dist/esm/ui/TableFloatingControls/NumberColumn/index.js +7 -1
  261. package/dist/esm/ui/TableFloatingControls/RowControls/ClassicControls.js +6 -2
  262. package/dist/esm/ui/TableFloatingControls/RowControls/DragControls.js +65 -38
  263. package/dist/esm/ui/TableFloatingControls/index.js +14 -3
  264. package/dist/esm/ui/common-styles.js +1 -1
  265. package/dist/esm/ui/event-handlers.js +31 -4
  266. package/dist/esm/ui/icons/SortingIconWrapper.js +2 -0
  267. package/dist/esm/ui/toolbar.js +34 -8
  268. package/dist/types/pm-plugins/commands/commands-with-analytics.d.ts +1 -1
  269. package/dist/types/pm-plugins/table-resizing/commands.d.ts +1 -1
  270. package/dist/types/pm-plugins/transforms/column-width.d.ts +1 -1
  271. package/dist/types/pm-plugins/utils/collapse.d.ts +2 -1
  272. package/dist/types/ui/FloatingContextualButton/FixedButton.d.ts +1 -1
  273. package/dist/types/ui/FloatingContextualButton/index.d.ts +1 -1
  274. package/dist/types/ui/FloatingDeleteButton/index.d.ts +1 -1
  275. package/dist/types/ui/FloatingDragMenu/index.d.ts +1 -1
  276. package/dist/types/ui/TableFloatingColumnControls/ColumnControls/index.d.ts +2 -2
  277. package/dist/types/ui/TableFloatingColumnControls/index.d.ts +1 -1
  278. package/dist/types/ui/TableFloatingControls/CornerControls/DragCornerControls.d.ts +4 -4
  279. package/dist/types/ui/TableFloatingControls/index.d.ts +3 -3
  280. package/dist/types-ts4.5/pm-plugins/commands/commands-with-analytics.d.ts +1 -1
  281. package/dist/types-ts4.5/pm-plugins/table-resizing/commands.d.ts +1 -1
  282. package/dist/types-ts4.5/pm-plugins/transforms/column-width.d.ts +1 -1
  283. package/dist/types-ts4.5/pm-plugins/utils/collapse.d.ts +2 -1
  284. package/dist/types-ts4.5/ui/FloatingContextualButton/FixedButton.d.ts +1 -1
  285. package/dist/types-ts4.5/ui/FloatingContextualButton/index.d.ts +1 -1
  286. package/dist/types-ts4.5/ui/FloatingDeleteButton/index.d.ts +1 -1
  287. package/dist/types-ts4.5/ui/FloatingDragMenu/index.d.ts +1 -1
  288. package/dist/types-ts4.5/ui/TableFloatingColumnControls/ColumnControls/index.d.ts +2 -2
  289. package/dist/types-ts4.5/ui/TableFloatingColumnControls/index.d.ts +1 -1
  290. package/dist/types-ts4.5/ui/TableFloatingControls/CornerControls/DragCornerControls.d.ts +4 -4
  291. package/dist/types-ts4.5/ui/TableFloatingControls/index.d.ts +3 -3
  292. package/package.json +4 -4
  293. package/src/nodeviews/ExternalDropTargets.tsx +3 -1
  294. package/src/nodeviews/TableCell.ts +4 -0
  295. package/src/nodeviews/TableComponent.tsx +63 -18
  296. package/src/nodeviews/TableComponentWithSharedState.tsx +4 -0
  297. package/src/nodeviews/TableContainer.tsx +7 -1
  298. package/src/nodeviews/TableNodeViewBase.ts +4 -0
  299. package/src/nodeviews/TableResizer.tsx +27 -4
  300. package/src/nodeviews/TableRow.ts +41 -1
  301. package/src/nodeviews/TableStickyScrollbar.ts +14 -0
  302. package/src/nodeviews/__mocks__/OverflowShadowsObserver.ts +2 -0
  303. package/src/nodeviews/__mocks__/OverridableMock.ts +6 -0
  304. package/src/nodeviews/lazy-node-views.ts +8 -0
  305. package/src/nodeviews/table.tsx +30 -4
  306. package/src/pm-plugins/commands/clear.ts +6 -0
  307. package/src/pm-plugins/commands/column-resize.ts +12 -9
  308. package/src/pm-plugins/commands/commands-with-analytics.ts +21 -4
  309. package/src/pm-plugins/commands/delete.ts +2 -0
  310. package/src/pm-plugins/commands/go-to-next-cell.ts +2 -0
  311. package/src/pm-plugins/commands/hover.ts +7 -5
  312. package/src/pm-plugins/commands/insert.ts +15 -1
  313. package/src/pm-plugins/commands/misc.ts +24 -3
  314. package/src/pm-plugins/commands/selection.ts +4 -0
  315. package/src/pm-plugins/commands/sort.ts +9 -1
  316. package/src/pm-plugins/commands/toggle.ts +2 -0
  317. package/src/pm-plugins/decorations/plugin.ts +5 -1
  318. package/src/pm-plugins/decorations/utils/column-resizing.ts +2 -0
  319. package/src/pm-plugins/drag-and-drop/commands-with-analytics.ts +8 -2
  320. package/src/pm-plugins/drag-and-drop/commands.ts +9 -1
  321. package/src/pm-plugins/drag-and-drop/plugin.ts +17 -2
  322. package/src/pm-plugins/handlers.ts +1 -1
  323. package/src/pm-plugins/keymap.ts +54 -0
  324. package/src/pm-plugins/main.ts +12 -5
  325. package/src/pm-plugins/table-resizing/commands.ts +4 -3
  326. package/src/pm-plugins/table-resizing/event-handlers.ts +24 -10
  327. package/src/pm-plugins/table-resizing/plugin.ts +3 -1
  328. package/src/pm-plugins/table-resizing/utils/colgroup.ts +17 -1
  329. package/src/pm-plugins/table-resizing/utils/column-state.ts +4 -0
  330. package/src/pm-plugins/table-resizing/utils/content-width.ts +14 -0
  331. package/src/pm-plugins/table-resizing/utils/dom.ts +4 -0
  332. package/src/pm-plugins/table-resizing/utils/misc.ts +2 -0
  333. package/src/pm-plugins/table-resizing/utils/resize-column.ts +9 -1
  334. package/src/pm-plugins/table-resizing/utils/resize-logic.ts +6 -0
  335. package/src/pm-plugins/table-resizing/utils/resize-state.ts +5 -1
  336. package/src/pm-plugins/table-resizing/utils/scale-table.ts +10 -2
  337. package/src/pm-plugins/table-selection-keymap.ts +8 -0
  338. package/src/pm-plugins/table-width.ts +5 -1
  339. package/src/pm-plugins/transforms/column-width.ts +9 -7
  340. package/src/pm-plugins/transforms/delete-columns.ts +4 -0
  341. package/src/pm-plugins/transforms/fix-tables.ts +13 -6
  342. package/src/pm-plugins/transforms/merge.ts +6 -0
  343. package/src/pm-plugins/transforms/replace-table.ts +3 -1
  344. package/src/pm-plugins/transforms/split.ts +4 -0
  345. package/src/pm-plugins/utils/alignment.ts +2 -0
  346. package/src/pm-plugins/utils/analytics.ts +2 -2
  347. package/src/pm-plugins/utils/collapse.ts +3 -4
  348. package/src/pm-plugins/utils/column-controls.ts +4 -0
  349. package/src/pm-plugins/utils/create.ts +1 -1
  350. package/src/pm-plugins/utils/decoration.ts +12 -0
  351. package/src/pm-plugins/utils/dom.ts +4 -0
  352. package/src/pm-plugins/utils/drag-menu.ts +12 -1
  353. package/src/pm-plugins/utils/nodes.ts +2 -0
  354. package/src/pm-plugins/utils/paste.ts +4 -0
  355. package/src/pm-plugins/utils/row-controls.ts +2 -0
  356. package/src/pm-plugins/utils/snapping.ts +2 -0
  357. package/src/tablePlugin.tsx +13 -15
  358. package/src/tablePluginType.ts +10 -0
  359. package/src/ui/ColumnResizeWidget/index.tsx +2 -0
  360. package/src/ui/DragHandle/HandleIconComponent.tsx +3 -1
  361. package/src/ui/DragHandle/index.tsx +11 -2
  362. package/src/ui/FloatingAlignmentButtons/FloatingAlignmentButtons.tsx +6 -0
  363. package/src/ui/FloatingContextualButton/FixedButton.tsx +5 -1
  364. package/src/ui/FloatingContextualButton/index.tsx +8 -2
  365. package/src/ui/FloatingContextualMenu/ContextualMenu.tsx +17 -7
  366. package/src/ui/FloatingContextualMenu/index.tsx +11 -1
  367. package/src/ui/FloatingDeleteButton/index.tsx +23 -4
  368. package/src/ui/FloatingDragMenu/DragMenu.tsx +13 -6
  369. package/src/ui/FloatingDragMenu/DropdownMenu.tsx +10 -0
  370. package/src/ui/FloatingDragMenu/index.tsx +3 -1
  371. package/src/ui/FloatingInsertButton/InsertButton.tsx +4 -0
  372. package/src/ui/FloatingInsertButton/getPopupOptions.ts +4 -0
  373. package/src/ui/FloatingInsertButton/index.tsx +21 -1
  374. package/src/ui/TableFloatingColumnControls/ColumnControls/index.tsx +19 -2
  375. package/src/ui/TableFloatingColumnControls/ColumnDropTargets/index.tsx +2 -0
  376. package/src/ui/TableFloatingColumnControls/index.tsx +8 -4
  377. package/src/ui/TableFloatingControls/CornerControls/ClassicCornerControls.tsx +2 -0
  378. package/src/ui/TableFloatingControls/FloatingControlsWithSelection.tsx +2 -2
  379. package/src/ui/TableFloatingControls/NumberColumn/index.tsx +7 -1
  380. package/src/ui/TableFloatingControls/RowControls/ClassicControls.tsx +11 -3
  381. package/src/ui/TableFloatingControls/RowControls/DragControls.tsx +20 -1
  382. package/src/ui/TableFloatingControls/index.tsx +13 -4
  383. package/src/ui/common-styles.ts +7 -0
  384. package/src/ui/event-handlers.ts +28 -3
  385. package/src/ui/icons/SortingIconWrapper.tsx +2 -0
  386. package/src/ui/toolbar.tsx +43 -11
  387. package/tsconfig.json +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @atlaskit/editor-plugin-table
2
2
 
3
+ ## 8.4.13
4
+
5
+ ### Patch Changes
6
+
7
+ - [#98157](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/98157)
8
+ [`402532942b383`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/402532942b383) -
9
+ [ux] [ED-25644] This change restores the left border for nested tables with numbered columns
10
+ enabled. Previously, we were removing it by accident while removing the left border for the parent
11
+ table.
12
+ - Updated dependencies
13
+
14
+ ## 8.4.12
15
+
16
+ ### Patch Changes
17
+
18
+ - Updated dependencies
19
+
3
20
  ## 8.4.11
4
21
 
5
22
  ### Patch Changes
@@ -10,7 +10,7 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
10
10
  var _react = _interopRequireWildcard(require("react"));
11
11
  var _styles = require("@atlaskit/editor-common/styles");
12
12
  var _adapter = require("@atlaskit/pragmatic-drag-and-drop/element/adapter");
13
- var _utils = require("../pm-plugins/utils");
13
+ var _columnControls = require("../pm-plugins/utils/column-controls");
14
14
  var _consts = require("../ui/consts");
15
15
  var _ColumnDropTarget = require("../ui/TableFloatingColumnControls/ColumnDropTargets/ColumnDropTarget");
16
16
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
@@ -46,7 +46,7 @@ var ExternalDropTargets = exports.ExternalDropTargets = function ExternalDropTar
46
46
  if (!isDragging) {
47
47
  return null;
48
48
  }
49
- var colWidths = (0, _utils.getColumnsWidths)(editorView);
49
+ var colWidths = (0, _columnControls.getColumnsWidths)(editorView);
50
50
  return /*#__PURE__*/_react.default.createElement("div", {
51
51
  style: {
52
52
  width: getTableWrapperWidth(),
@@ -71,7 +71,10 @@ var ExternalDropTargets = exports.ExternalDropTargets = function ExternalDropTar
71
71
  marginLeft: "-".concat(getScrollOffset(), "px")
72
72
  }
73
73
  }, colWidths === null || colWidths === void 0 ? void 0 : colWidths.map(function (width, index) {
74
- return /*#__PURE__*/_react.default.createElement(_ColumnDropTarget.ColumnDropTarget, {
74
+ return /*#__PURE__*/_react.default.createElement(_ColumnDropTarget.ColumnDropTarget
75
+ // Ignored via go/ees005
76
+ // eslint-disable-next-line react/no-array-index-key
77
+ , {
75
78
  key: index,
76
79
  index: index,
77
80
  localId: currentNodeLocalId,
@@ -40,8 +40,13 @@ function delayUntilIdle(cb) {
40
40
  return cb();
41
41
  });
42
42
  }
43
+
44
+ // Ignored via go/ees005
45
+ // eslint-disable-next-line require-unicode-regexp
43
46
  var cssVariablePattern = /^VAR\(--.*\)$/;
44
47
  var TableCell = exports.default = /*#__PURE__*/function (_TableNodeView) {
48
+ // Ignored via go/ees005
49
+ // eslint-disable-next-line @typescript-eslint/max-params
45
50
  function TableCell(node, view, getPos, eventDispatcher, editorAnalyticsAPI) {
46
51
  var _this;
47
52
  (0, _classCallCheck2.default)(this, TableCell);
@@ -28,16 +28,19 @@ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
28
28
  var _combine = require("@atlaskit/pragmatic-drag-and-drop/combine");
29
29
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
30
30
  var _commands = require("../pm-plugins/commands");
31
- var _utils3 = require("../pm-plugins/drag-and-drop/utils");
31
+ var _autoscrollers = require("../pm-plugins/drag-and-drop/utils/autoscrollers");
32
32
  var _pluginFactory = require("../pm-plugins/plugin-factory");
33
- var _stickyHeaders = require("../pm-plugins/sticky-headers");
33
+ var _pluginKey = require("../pm-plugins/sticky-headers/plugin-key");
34
+ var _util = require("../pm-plugins/sticky-headers/util");
34
35
  var _tableAnalytics = require("../pm-plugins/table-analytics");
35
- var _utils4 = require("../pm-plugins/table-resizing/utils");
36
36
  var _colgroup = require("../pm-plugins/table-resizing/utils/colgroup");
37
37
  var _consts = require("../pm-plugins/table-resizing/utils/consts");
38
38
  var _dom = require("../pm-plugins/table-resizing/utils/dom");
39
39
  var _misc = require("../pm-plugins/table-resizing/utils/misc");
40
- var _utils5 = require("../pm-plugins/utils");
40
+ var _resizeState = require("../pm-plugins/table-resizing/utils/resize-state");
41
+ var _scaleTable = require("../pm-plugins/table-resizing/utils/scale-table");
42
+ var _nodes = require("../pm-plugins/utils/nodes");
43
+ var _table = require("../pm-plugins/utils/table");
41
44
  var _types = require("../types");
42
45
  var _eventHandlers = require("../ui/event-handlers");
43
46
  var _TableFloatingColumnControls = _interopRequireDefault(require("../ui/TableFloatingColumnControls"));
@@ -52,7 +55,8 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
52
55
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
53
56
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty3.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
54
57
  function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
55
- function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
58
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } // Ignored via go/ees005
59
+ // eslint-disable-next-line import/no-named-as-default
56
60
  var isIE11 = _utils.browser.ie_version === 11;
57
61
  // When table is inserted via paste, keyboard shortcut or quickInsert,
58
62
  // componentDidUpdate is called multiple times. The isOverflowing value is correct only on the last update.
@@ -68,6 +72,8 @@ var isOverflowAnalyticsEnabled = false;
68
72
  // Prevent unnecessary parentWidth updates when table is nested inside of a node that is nested itself.
69
73
  var NESTED_TABLE_IN_NESTED_PARENT_WIDTH_DIFF_MIN_THRESHOLD = 2;
70
74
  var NESTED_TABLE_IN_NESTED_PARENT_WIDTH_DIFF_MAX_THRESHOLD = 20;
75
+ // Ignored via go/ees005
76
+ // eslint-disable-next-line @repo/internal/react/no-class-components
71
77
  var TableComponent = /*#__PURE__*/function (_React$Component) {
72
78
  function TableComponent(props) {
73
79
  var _this;
@@ -118,7 +124,7 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
118
124
  if (!(0, _utils.isValidPosition)(pos, _this.props.view.state)) {
119
125
  return;
120
126
  }
121
- var stickyHeader = (0, _stickyHeaders.findStickyHeaderForTable)(state, pos);
127
+ var stickyHeader = (0, _util.findStickyHeaderForTable)(state, pos);
122
128
  if (stickyHeader !== _this.state.stickyHeader) {
123
129
  _this.setState({
124
130
  stickyHeader: stickyHeader
@@ -128,6 +134,8 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
128
134
  }
129
135
  }
130
136
  });
137
+ // Ignored via go/ees005
138
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
131
139
  (0, _defineProperty3.default)(_this, "prevTableState", null);
132
140
  (0, _defineProperty3.default)(_this, "handleScroll", function (event) {
133
141
  if (!_this.wrapper || event.target !== _this.wrapper) {
@@ -140,6 +148,8 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
140
148
  // sync sticky header row to table scroll
141
149
  var headers = _this.table.querySelectorAll('tr[data-header-row]');
142
150
  for (var i = 0; i < headers.length; i++) {
151
+ // Ignored via go/ees005
152
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
143
153
  var header = headers[i];
144
154
  header.scrollLeft = _this.wrapper.scrollLeft;
145
155
  header.style.marginRight = '2px';
@@ -153,12 +163,14 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
153
163
  containerWidth = _this$props.containerWidth,
154
164
  options = _this$props.options,
155
165
  allowTableResizing = _this$props.allowTableResizing;
166
+ // Ignored via go/ees005
167
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
156
168
  var prevNode = _this.node;
157
169
  var node = getNode();
158
170
  var prevAttrs = prevNode.attrs;
159
- var isNested = (0, _utils5.isTableNested)(_this.props.view.state, _this.props.getPos());
171
+ var isNested = (0, _nodes.isTableNested)(_this.props.view.state, _this.props.getPos());
160
172
  var parentWidth = _this.getParentNodeWidth();
161
- if (isNested && (0, _utils5.isTableNestedInMoreThanOneNode)(_this.props.view.state, _this.props.getPos()) && (0, _platformFeatureFlags.fg)('platform_editor_nested_table_in_nested_parent_fix')) {
173
+ if (isNested && (0, _nodes.isTableNestedInMoreThanOneNode)(_this.props.view.state, _this.props.getPos()) && (0, _platformFeatureFlags.fg)('platform_editor_nested_table_in_nested_parent_fix')) {
162
174
  var resizeObsWrapperWidth = _this.wrapperWidth || 0;
163
175
  var wrapperWidthDiffBetweenRerenders = Math.abs(resizeObsWrapperWidth - (_this.state.parentWidth || 0));
164
176
  var isOusideOfThreshold = wrapperWidthDiffBetweenRerenders <= NESTED_TABLE_IN_NESTED_PARENT_WIDTH_DIFF_MIN_THRESHOLD || wrapperWidthDiffBetweenRerenders > NESTED_TABLE_IN_NESTED_PARENT_WIDTH_DIFF_MAX_THRESHOLD;
@@ -176,7 +188,7 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
176
188
  var parentWidthChanged = parentWidth && parentWidth !== _this.state.parentWidth;
177
189
  var layoutSize = _this.tableNodeLayoutSize(node, containerWidth.width, options);
178
190
  var hasNumberedColumnChanged = prevAttrs.isNumberColumnEnabled !== node.attrs.isNumberColumnEnabled;
179
- var noOfColumnsChanged = (0, _utils5.tablesHaveDifferentNoOfColumns)(node, prevNode);
191
+ var noOfColumnsChanged = (0, _nodes.tablesHaveDifferentNoOfColumns)(node, prevNode);
180
192
  if (
181
193
  // We need to react if our parent changes
182
194
  // Scales the cols widths relative to the new parent width.
@@ -228,11 +240,13 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
228
240
  var domAtPos = view.domAtPos.bind(view);
229
241
  var width = containerWidth.width;
230
242
  _this.scaleTableDebounced.cancel();
231
- var tr = (0, _utils4.scaleTable)(_this.table, _objectSpread(_objectSpread({}, scaleOptions), {}, {
243
+ var tr = (0, _scaleTable.scaleTable)(_this.table, _objectSpread(_objectSpread({}, scaleOptions), {}, {
232
244
  node: node,
233
245
  prevNode: _this.node || node,
234
246
  start: pos + 1,
235
247
  containerWidth: width,
248
+ // Ignored via go/ees005
249
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
236
250
  previousContainerWidth: _this.containerWidth.width || width
237
251
  }, options), domAtPos, _this.props.pluginInjectionApi, false,
238
252
  // isTableScalingEnabled doesn't change the behavior of nested tables
@@ -317,7 +331,7 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
317
331
  });
318
332
  });
319
333
  (0, _defineProperty3.default)(_this, "tableNodeLayoutSize", function (node, containerWidth, options) {
320
- return (0, _utils4.getLayoutSize)(node.attrs.layout, containerWidth || _this.props.containerWidth.width, options || _this.props.options || {});
334
+ return (0, _misc.getLayoutSize)(node.attrs.layout, containerWidth || _this.props.containerWidth.width, options || _this.props.options || {});
321
335
  });
322
336
  (0, _defineProperty3.default)(_this, "scaleTableDebounced", (0, _rafSchd.default)(_this.scaleTable));
323
337
  (0, _defineProperty3.default)(_this, "handleTableResizingDebounced", (0, _rafSchd.default)(_this.handleTableResizing));
@@ -390,8 +404,17 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
390
404
  getNode = _this$props7.getNode,
391
405
  getEditorFeatureFlags = _this$props7.getEditorFeatureFlags,
392
406
  isTableScalingEnabled = _this$props7.isTableScalingEnabled;
407
+
408
+ // Ignored via go/ees005
409
+ // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
393
410
  this === null || this === void 0 || (_this$table = this.table) === null || _this$table === void 0 || _this$table.addEventListener('mouseenter', this.handleMouseEnter);
411
+
412
+ // Ignored via go/ees005
413
+ // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
394
414
  this === null || this === void 0 || (_this$table2 = this.table) === null || _this$table2 === void 0 || _this$table2.addEventListener('mouseout', this.handleMouseOut);
415
+
416
+ // Ignored via go/ees005
417
+ // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
395
418
  this === null || this === void 0 || (_this$table3 = this.table) === null || _this$table3 === void 0 || _this$table3.addEventListener('mouseover', this.handleMouseOver);
396
419
  var _getEditorFeatureFlag = getEditorFeatureFlags(),
397
420
  _getEditorFeatureFlag2 = _getEditorFeatureFlag.tableWithFixedColumnWidthsOption,
@@ -420,6 +443,8 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
420
443
  this.wrapperReisizeObserver.observe(this.wrapper);
421
444
  }
422
445
  if (allowColumnResizing && this.wrapper && !isIE11) {
446
+ // Ignored via go/ees005
447
+ // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
423
448
  this.wrapper.addEventListener('scroll', this.handleScrollDebounced, {
424
449
  passive: true
425
450
  });
@@ -427,7 +452,7 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
427
452
  this.stickyScrollbar = new _TableStickyScrollbar.TableStickyScrollbar(this.wrapper, this.props.view);
428
453
  }
429
454
  if (isDragAndDropEnabled) {
430
- this.dragAndDropCleanupFn = _combine.combine.apply(void 0, (0, _toConsumableArray2.default)((0, _utils3.autoScrollerFactory)({
455
+ this.dragAndDropCleanupFn = _combine.combine.apply(void 0, (0, _toConsumableArray2.default)((0, _autoscrollers.autoScrollerFactory)({
431
456
  tableWrapper: this.wrapper,
432
457
  getNode: getNode
433
458
  })));
@@ -439,15 +464,20 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
439
464
  * Instead we use the resize event to only trigger updates when necessary.
440
465
  */
441
466
  if (!allowTableResizing) {
467
+ // Ignored via go/ees005
468
+ // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
442
469
  window.addEventListener('resize', this.handleWindowResizeDebounced);
443
470
  }
444
471
  this.handleTableResizingDebounced();
445
472
  }
446
- var currentStickyState = _stickyHeaders.pluginKey.getState(this.props.view.state);
473
+ var currentStickyState = _pluginKey.pluginKey.getState(this.props.view.state);
447
474
  if (currentStickyState) {
448
475
  this.onStickyState(currentStickyState);
449
476
  }
450
- eventDispatcher.on(_stickyHeaders.pluginKey.key, this.onStickyState);
477
+
478
+ // Ignored via go/ees005
479
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
480
+ eventDispatcher.on(_pluginKey.pluginKey.key, this.onStickyState);
451
481
  if (isOverflowAnalyticsEnabled) {
452
482
  var initialIsOveflowing = this.state[_types.ShadowEvent.SHOW_BEFORE_SHADOW] || this.state[_types.ShadowEvent.SHOW_AFTER_SHADOW];
453
483
  this.setTimerToSendInitialOverflowCaptured(initialIsOveflowing);
@@ -463,6 +493,8 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
463
493
  eventDispatcher = _this$props8.eventDispatcher,
464
494
  isDragAndDropEnabled = _this$props8.isDragAndDropEnabled;
465
495
  if (this.wrapper && !isIE11) {
496
+ // Ignored via go/ees005
497
+ // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
466
498
  this.wrapper.removeEventListener('scroll', this.handleScrollDebounced);
467
499
  }
468
500
  if (isDragAndDropEnabled && this.dragAndDropCleanupFn) {
@@ -481,15 +513,29 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
481
513
  this.handleWindowResizeDebounced.cancel();
482
514
  }
483
515
  if (!allowTableResizing && allowColumnResizing) {
516
+ // Ignored via go/ees005
517
+ // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
484
518
  window.removeEventListener('resize', this.handleWindowResizeDebounced);
485
519
  }
520
+
521
+ // Ignored via go/ees005
522
+ // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
486
523
  this === null || this === void 0 || (_this$table4 = this.table) === null || _this$table4 === void 0 || _this$table4.removeEventListener('mouseenter', this.handleMouseEnter);
524
+
525
+ // Ignored via go/ees005
526
+ // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
487
527
  this === null || this === void 0 || (_this$table5 = this.table) === null || _this$table5 === void 0 || _this$table5.removeEventListener('mouseout', this.handleMouseOut);
528
+
529
+ // Ignored via go/ees005
530
+ // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
488
531
  this === null || this === void 0 || (_this$table6 = this.table) === null || _this$table6 === void 0 || _this$table6.removeEventListener('mouseover', this.handleMouseOver);
489
532
  if (this.overflowShadowsObserver) {
490
533
  this.overflowShadowsObserver.dispose();
491
534
  }
492
- eventDispatcher.off(_stickyHeaders.pluginKey.key, this.onStickyState);
535
+
536
+ // Ignored via go/ees005
537
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
538
+ eventDispatcher.off(_pluginKey.pluginKey.key, this.onStickyState);
493
539
  if (this.initialOverflowCaptureTimerId) {
494
540
  clearTimeout(this.initialOverflowCaptureTimerId);
495
541
  }
@@ -555,7 +601,7 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
555
601
  tableNodeWidth = options !== null && options !== void 0 && options.isCommentEditor && !tableNode.attrs.width ? tableRenderWidth : tableNodeWidth;
556
602
  var isTableSquashed = tableRenderWidth < tableNodeWidth;
557
603
  var isNumberColumnChanged = tableNode.attrs.isNumberColumnEnabled !== this.node.attrs.isNumberColumnEnabled;
558
- var isNumberOfColumnsChanged = (0, _utils5.tablesHaveDifferentNoOfColumns)(tableNode, this.node);
604
+ var isNumberOfColumnsChanged = (0, _nodes.tablesHaveDifferentNoOfColumns)(tableNode, this.node);
559
605
  var containerWidthValue = containerWidth.width,
560
606
  containerLineLength = containerWidth.lineLength;
561
607
  var isLineLengthChanged = ((_this$containerWidth = this.containerWidth) === null || _this$containerWidth === void 0 ? void 0 : _this$containerWidth.lineLength) !== containerLineLength;
@@ -576,8 +622,8 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
576
622
  var shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled || !!((_this$props$options2 = this.props.options) !== null && _this$props$options2 !== void 0 && _this$props$options2.isTableScalingEnabled) && !!((_this$props$options3 = this.props.options) !== null && _this$props$options3 !== void 0 && _this$props$options3.isCommentEditor);
577
623
  if (force || !isResizing && shouldUpdateColgroup) {
578
624
  var _this$props$options4, _this$props$options5, _this$props$options6, _this$props$options7;
579
- var resizeState = (0, _utils4.getResizeState)({
580
- minWidth: _utils4.COLUMN_MIN_WIDTH,
625
+ var resizeState = (0, _resizeState.getResizeState)({
626
+ minWidth: _consts.COLUMN_MIN_WIDTH,
581
627
  // When numbered column enabled, we need to subtract the width of the numbered column
582
628
  maxSize: tableNode.attrs.isNumberColumnEnabled ? tableRenderWidth - _editorSharedStyles.akEditorTableNumberColumnWidth : tableRenderWidth,
583
629
  table: tableNode,
@@ -605,13 +651,21 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
605
651
  // renderWidth calculated as `tableRef?.parentElement?.clientWidth`
606
652
  // inside of getTableScalingPercent returns 0.
607
653
  if (!((_this3$props$options = _this3.props.options) !== null && _this3$props$options !== void 0 && _this3$props$options.isCommentEditor) || (_this3$props$options2 = _this3.props.options) !== null && _this3$props$options2 !== void 0 && _this3$props$options2.isCommentEditor && tableNode.attrs.width) {
608
- scalePercent = (0, _misc.getTableScalingPercent)(tableNode, _this3.table, shouldUseIncreasedScalingPercent);
654
+ scalePercent = (0, _misc.getTableScalingPercent)(tableNode,
655
+ // Ignored via go/ees005
656
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
657
+ _this3.table, shouldUseIncreasedScalingPercent);
609
658
  } else {
659
+ // Ignored via go/ees005
660
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
610
661
  scalePercent = (0, _misc.getScalingPercentForTableWithoutWidth)(tableNode, _this3.table);
611
662
  }
612
663
 
613
664
  // Request animation frame required for Firefox
614
- (0, _utils4.updateColgroup)(resizeState, _this3.table, tableNode, shouldScaleOnColgroupUpdate, scalePercent);
665
+ (0, _resizeState.updateColgroup)(resizeState,
666
+ // Ignored via go/ees005
667
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
668
+ _this3.table, tableNode, shouldScaleOnColgroupUpdate, scalePercent);
615
669
  });
616
670
  }
617
671
  }
@@ -622,6 +676,9 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
622
676
  this.wasResizing = isResizing;
623
677
  this.containerWidth = containerWidth;
624
678
  }
679
+
680
+ // Ignored via go/ees005
681
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
625
682
  }, {
626
683
  key: "componentDidUpdate",
627
684
  value: function componentDidUpdate(_, prevState) {
@@ -676,7 +733,10 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
676
733
  // that happens when a table is nested in expand and expand's width is
677
734
  // changed via breakout button
678
735
  window.requestAnimationFrame(function () {
679
- _this4.overflowShadowsObserver = new _OverflowShadowsObserver.OverflowShadowsObserver(_this4.updateShadowState, _this4.table, _this4.wrapper);
736
+ _this4.overflowShadowsObserver = new _OverflowShadowsObserver.OverflowShadowsObserver(_this4.updateShadowState,
737
+ // Ignored via go/ees005
738
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
739
+ _this4.table, _this4.wrapper);
680
740
  });
681
741
  } else {
682
742
  this.overflowShadowsObserver = new _OverflowShadowsObserver.OverflowShadowsObserver(this.updateShadowState, this.table, this.wrapper);
@@ -688,11 +748,11 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
688
748
  }
689
749
  var currentTable = getNode();
690
750
  var previousTable = this.node;
691
- var isNoOfColumnsChanged = (0, _utils5.tablesHaveDifferentNoOfColumns)(currentTable, previousTable);
692
- var isNoOfRowsChanged = (0, _utils5.tablesHaveDifferentNoOfRows)(currentTable, previousTable);
751
+ var isNoOfColumnsChanged = (0, _nodes.tablesHaveDifferentNoOfColumns)(currentTable, previousTable);
752
+ var isNoOfRowsChanged = (0, _nodes.tablesHaveDifferentNoOfRows)(currentTable, previousTable);
693
753
  if (isNoOfColumnsChanged || isNoOfRowsChanged) {
694
754
  var _this$props$pluginInj;
695
- (_this$props$pluginInj = this.props.pluginInjectionApi) === null || _this$props$pluginInj === void 0 || (_this$props$pluginInj = _this$props$pluginInj.accessibilityUtils) === null || _this$props$pluginInj === void 0 || _this$props$pluginInj.actions.ariaNotify((0, _utils5.getAssistiveMessage)(previousTable, currentTable, this.props.intl), {
755
+ (_this$props$pluginInj = this.props.pluginInjectionApi) === null || _this$props$pluginInj === void 0 || (_this$props$pluginInj = _this$props$pluginInj.accessibilityUtils) === null || _this$props$pluginInj === void 0 || _this$props$pluginInj.actions.ariaNotify((0, _table.getAssistiveMessage)(previousTable, currentTable, this.props.intl), {
696
756
  priority: 'important'
697
757
  });
698
758
  }
@@ -705,14 +765,14 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
705
765
  else if (allowColumnResizing && this.table && !isMediaFullscreen) {
706
766
  // If col widths (e.g. via collab) or number of columns (e.g. delete a column) have changed,
707
767
  // re-draw colgroup.
708
- if ((0, _utils5.tablesHaveDifferentColumnWidths)(currentTable, previousTable) || isNoOfColumnsChanged) {
768
+ if ((0, _nodes.tablesHaveDifferentColumnWidths)(currentTable, previousTable) || isNoOfColumnsChanged) {
709
769
  var _view = this.props.view;
710
770
  var shouldRecreateResizeCols = !allowTableResizing || !isResizing || isNoOfColumnsChanged && isResizing;
711
771
  if (shouldRecreateResizeCols) {
712
772
  var start = getPos() || 0;
713
773
  var depth = _view.state.doc.resolve(start).depth;
714
774
  shouldScale = depth === 0 && shouldScale;
715
- (0, _utils4.insertColgroupFromNode)(this.table, currentTable, shouldScale, undefined, shouldUseIncreasedScalingPercent, options === null || options === void 0 ? void 0 : options.isCommentEditor);
775
+ (0, _colgroup.insertColgroupFromNode)(this.table, currentTable, shouldScale, undefined, shouldUseIncreasedScalingPercent, options === null || options === void 0 ? void 0 : options.isCommentEditor);
716
776
  }
717
777
  (0, _dom.updateControls)()(_view.state);
718
778
  }
@@ -796,7 +856,7 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
796
856
  }
797
857
  var tableRef = this.table || undefined;
798
858
  var headerRow = tableRef ? tableRef.querySelector('tr[data-header-row]') : undefined;
799
- var hasHeaderRow = (0, _utils5.containsHeaderRow)(node);
859
+ var hasHeaderRow = (0, _nodes.containsHeaderRow)(node);
800
860
  var rowControls = /*#__PURE__*/_react.default.createElement(_TableFloatingControls.default, {
801
861
  editorView: view,
802
862
  tableRef: tableRef,
@@ -869,7 +929,7 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
869
929
  } catch (e) {
870
930
  tablePos = undefined;
871
931
  }
872
- var isNested = (0, _utils5.isTableNested)(view.state, tablePos);
932
+ var isNested = (0, _nodes.isTableNested)(view.state, tablePos);
873
933
  var topShadowPadding = isDragAndDropEnabled ? 0 : shadowPadding;
874
934
  var topOffset = (0, _platformFeatureFlags.fg)('platform_editor_breakout_use_css') ? 0 : (_this$state$stickyHea2 = (_this$state$stickyHea3 = this.state.stickyHeader) === null || _this$state$stickyHea3 === void 0 ? void 0 : _this$state$stickyHea3.top) !== null && _this$state$stickyHea2 !== void 0 ? _this$state$stickyHea2 : 0;
875
935
  var topStickyShadowPosition = this.state.stickyHeader && topOffset + this.state.stickyHeader.padding + topShadowPadding + 2;
@@ -883,7 +943,10 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
883
943
  className: (0, _classnames2.default)(_types.TableCssClassName.TABLE_CONTAINER, (0, _defineProperty3.default)((0, _defineProperty3.default)((0, _defineProperty3.default)((0, _defineProperty3.default)({}, _types.TableCssClassName.WITH_CONTROLS, allowControls && tableActive), _types.TableCssClassName.TABLE_STICKY, this.state.stickyHeader && hasHeaderRow), _types.TableCssClassName.HOVERED_DELETE_BUTTON, isInDanger), _types.TableCssClassName.TABLE_SELECTED, (0, _utils2.isTableSelected)(view.state.selection))),
884
944
  editorView: view,
885
945
  getPos: getPos,
886
- node: node,
946
+ node: node
947
+ // Ignored via go/ees005
948
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
949
+ ,
887
950
  tableRef: tableRef,
888
951
  containerWidth: containerWidth,
889
952
  isNested: isNested,
@@ -9,6 +9,9 @@ var _react = _interopRequireDefault(require("react"));
9
9
  var _hooks = require("@atlaskit/editor-common/hooks");
10
10
  var _editorTables = require("@atlaskit/editor-tables");
11
11
  var _TableComponent = _interopRequireDefault(require("./TableComponent"));
12
+ // Ignored via go/ees005
13
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
14
+
12
15
  /**
13
16
  * Use useSharedPluginState to control re-renders from plugin dependencies
14
17
  */
@@ -76,7 +79,10 @@ var TableComponentWithSharedState = exports.TableComponentWithSharedState = func
76
79
  tableActive: tableActive,
77
80
  ordering: ordering,
78
81
  isResizing: isResizing,
79
- getNode: getNode,
82
+ getNode: getNode
83
+ // Ignored via go/ees005
84
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
85
+ ,
80
86
  containerWidth: widthState,
81
87
  contentDOM: forwardRef,
82
88
  getEditorFeatureFlags: getEditorFeatureFlags,
@@ -15,7 +15,7 @@ var _nodeWidth = require("@atlaskit/editor-common/node-width");
15
15
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
16
16
  var _commandsWithAnalytics = require("../pm-plugins/commands/commands-with-analytics");
17
17
  var _pluginFactory = require("../pm-plugins/plugin-factory");
18
- var _utils = require("../pm-plugins/table-resizing/utils");
18
+ var _consts = require("../pm-plugins/table-resizing/utils/consts");
19
19
  var _alignment = require("../pm-plugins/utils/alignment");
20
20
  var _types = require("../types");
21
21
  var _tableContainerStyles = require("./table-container-styles");
@@ -202,7 +202,7 @@ var ResizableTableContainer = exports.ResizableTableContainer = /*#__PURE__*/_re
202
202
  // scrollbarWidth can vary. Values can be 14, 15, 16 and up to 20px;
203
203
  responsiveContainerWidth = isTableScalingEnabled ? lineLength : containerWidth - (0, _editorSharedStyles.akEditorGutterPaddingDynamic)() * 2 - resizeHandleSpacing;
204
204
  } else if (isCommentEditor) {
205
- responsiveContainerWidth = containerWidth - _utils.TABLE_OFFSET_IN_COMMENT_EDITOR;
205
+ responsiveContainerWidth = containerWidth - _consts.TABLE_OFFSET_IN_COMMENT_EDITOR;
206
206
  } else {
207
207
  // 76 is currently an accepted padding value considering the spacing for resizer handle
208
208
  // containerWidth = width of a DIV with test id="ak-editor-fp-content-area". It is a parent of
@@ -214,7 +214,7 @@ var ResizableTableContainer = exports.ResizableTableContainer = /*#__PURE__*/_re
214
214
  if (!isResizing) {
215
215
  tableWidthRef.current = width;
216
216
  }
217
- var maxResizerWidth = isCommentEditor ? responsiveContainerWidth : Math.min(responsiveContainerWidth, _utils.TABLE_MAX_WIDTH);
217
+ var maxResizerWidth = isCommentEditor ? responsiveContainerWidth : Math.min(responsiveContainerWidth, _consts.TABLE_MAX_WIDTH);
218
218
  var tableResizerProps = {
219
219
  width: width,
220
220
  maxWidth: maxResizerWidth,
@@ -266,7 +266,11 @@ var ResizableTableContainer = exports.ResizableTableContainer = /*#__PURE__*/_re
266
266
  style: {
267
267
  width: 'inherit'
268
268
  }
269
- }, children) : /*#__PURE__*/_react.default.createElement(_TableResizer.TableResizer, tableResizerProps, /*#__PURE__*/_react.default.createElement(InnerContainer, {
269
+ }, children) :
270
+ /*#__PURE__*/
271
+ // Ignored via go/ees005
272
+ // eslint-disable-next-line react/jsx-props-no-spreading
273
+ _react.default.createElement(_TableResizer.TableResizer, tableResizerProps, /*#__PURE__*/_react.default.createElement(InnerContainer, {
270
274
  className: className,
271
275
  node: node
272
276
  }, children))));
@@ -298,8 +302,14 @@ var TableContainer = exports.TableContainer = function TableContainer(_ref6) {
298
302
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
299
303
  , {
300
304
  className: className,
301
- node: node,
302
- containerWidth: editorWidth,
305
+ node: node
306
+ // Ignored via go/ees005
307
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
308
+ ,
309
+ containerWidth: editorWidth
310
+ // Ignored via go/ees005
311
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
312
+ ,
303
313
  lineLength: lineLength,
304
314
  editorView: editorView,
305
315
  getPos: getPos,
@@ -12,12 +12,16 @@ var TableNodeView = exports.default = /*#__PURE__*/(0, _createClass2.default)(
12
12
  /**
13
13
  * @constructor
14
14
  */
15
+ // Ignored via go/ees005
16
+ // eslint-disable-next-line @typescript-eslint/max-params
15
17
  function TableNodeView(node, view, getPos, eventDispatcher) {
16
18
  (0, _classCallCheck2.default)(this, TableNodeView);
17
19
  this.node = node;
18
20
  this.view = view;
19
21
  this.getPos = getPos;
20
22
  this.eventDispatcher = eventDispatcher;
23
+ // Ignored via go/ees005
24
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
21
25
  var _DOMSerializer$render = _model.DOMSerializer.renderSpec(document, node.type.spec.toDOM(node)),
22
26
  dom = _DOMSerializer$render.dom,
23
27
  contentDOM = _DOMSerializer$render.contentDOM;