@atlaskit/editor-plugin-table 2.3.0 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (427) hide show
  1. package/.eslintrc.js +6 -0
  2. package/CHANGELOG.md +12 -0
  3. package/dist/cjs/plugins/table/commands/go-to-next-cell.js +2 -2
  4. package/dist/cjs/plugins/table/commands/insert.js +3 -3
  5. package/dist/cjs/plugins/table/commands/misc.js +26 -26
  6. package/dist/cjs/plugins/table/commands/referentiality.js +1 -1
  7. package/dist/cjs/plugins/table/commands/selection.js +2 -2
  8. package/dist/cjs/plugins/table/commands/sort.js +8 -8
  9. package/dist/cjs/plugins/table/commands-with-analytics.js +3 -3
  10. package/dist/cjs/plugins/table/event-handlers.js +15 -15
  11. package/dist/cjs/plugins/table/handlers.js +6 -7
  12. package/dist/cjs/plugins/table/index.js +16 -16
  13. package/dist/cjs/plugins/table/nodeviews/TableComponent.js +44 -40
  14. package/dist/cjs/plugins/table/nodeviews/TableContainer.js +10 -8
  15. package/dist/cjs/plugins/table/nodeviews/TableResizer.js +2 -2
  16. package/dist/cjs/plugins/table/nodeviews/table.js +11 -9
  17. package/dist/cjs/plugins/table/nodeviews/tableCell.js +1 -1
  18. package/dist/cjs/plugins/table/pm-plugins/decorations/plugin.js +2 -2
  19. package/dist/cjs/plugins/table/pm-plugins/keymap.js +2 -2
  20. package/dist/cjs/plugins/table/pm-plugins/main.js +24 -21
  21. package/dist/cjs/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.js +1 -1
  22. package/dist/cjs/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +2 -2
  23. package/dist/cjs/plugins/table/pm-plugins/table-local-id.js +1 -1
  24. package/dist/cjs/plugins/table/pm-plugins/table-resizing/commands.js +1 -1
  25. package/dist/cjs/plugins/table/pm-plugins/table-resizing/event-handlers.js +4 -4
  26. package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/colgroup.js +1 -1
  27. package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/column-state.js +1 -1
  28. package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/dom.js +1 -1
  29. package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/misc.js +2 -2
  30. package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +1 -1
  31. package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/scale-table.js +2 -3
  32. package/dist/cjs/plugins/table/pm-plugins/table-width.js +3 -3
  33. package/dist/cjs/plugins/table/toolbar.js +26 -26
  34. package/dist/cjs/plugins/table/transforms/column-width.js +5 -5
  35. package/dist/cjs/plugins/table/transforms/delete-columns.js +1 -1
  36. package/dist/cjs/plugins/table/transforms/merge.js +1 -1
  37. package/dist/cjs/plugins/table/transforms/replace-table.js +2 -2
  38. package/dist/cjs/plugins/table/ui/FloatingContextualButton/FixedButton.js +2 -2
  39. package/dist/cjs/plugins/table/ui/FloatingContextualButton/index.js +3 -3
  40. package/dist/cjs/plugins/table/ui/FloatingContextualButton/styles.js +1 -1
  41. package/dist/cjs/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +11 -11
  42. package/dist/cjs/plugins/table/ui/FloatingContextualMenu/index.js +2 -2
  43. package/dist/cjs/plugins/table/ui/FloatingContextualMenu/styles.js +6 -3
  44. package/dist/cjs/plugins/table/ui/FloatingDeleteButton/index.js +10 -10
  45. package/dist/cjs/plugins/table/ui/FloatingInsertButton/InsertButton.js +3 -3
  46. package/dist/cjs/plugins/table/ui/FloatingInsertButton/index.js +9 -9
  47. package/dist/cjs/plugins/table/ui/LayoutButton/index.js +3 -3
  48. package/dist/cjs/plugins/table/ui/TableFloatingControls/CornerControls/index.js +1 -1
  49. package/dist/cjs/plugins/table/ui/common-styles.js +2 -2
  50. package/dist/cjs/plugins/table/ui/consts.js +2 -2
  51. package/dist/cjs/plugins/table/ui/ui-styles.js +2 -2
  52. package/dist/cjs/plugins/table/utils/column-controls.js +11 -11
  53. package/dist/cjs/plugins/table/utils/decoration.js +11 -11
  54. package/dist/cjs/plugins/table/utils/nodes.js +1 -1
  55. package/dist/cjs/plugins/table/utils/row-controls.js +9 -9
  56. package/dist/cjs/plugins/table/utils/selection.js +1 -1
  57. package/dist/cjs/version.json +1 -1
  58. package/dist/es2019/plugins/table/commands/clear.js +3 -1
  59. package/dist/es2019/plugins/table/commands/go-to-next-cell.js +2 -2
  60. package/dist/es2019/plugins/table/commands/insert.js +4 -3
  61. package/dist/es2019/plugins/table/commands/misc.js +4 -4
  62. package/dist/es2019/plugins/table/commands/referentiality.js +1 -1
  63. package/dist/es2019/plugins/table/commands/selection.js +3 -3
  64. package/dist/es2019/plugins/table/commands/sort.js +3 -4
  65. package/dist/es2019/plugins/table/commands/toggle.js +1 -2
  66. package/dist/es2019/plugins/table/commands-with-analytics.js +4 -4
  67. package/dist/es2019/plugins/table/event-handlers.js +3 -5
  68. package/dist/es2019/plugins/table/handlers.js +5 -5
  69. package/dist/es2019/plugins/table/index.js +16 -16
  70. package/dist/es2019/plugins/table/nodeviews/OverflowShadowsObserver.js +1 -1
  71. package/dist/es2019/plugins/table/nodeviews/TableComponent.js +21 -18
  72. package/dist/es2019/plugins/table/nodeviews/TableContainer.js +10 -9
  73. package/dist/es2019/plugins/table/nodeviews/TableResizer.js +4 -4
  74. package/dist/es2019/plugins/table/nodeviews/table.js +11 -9
  75. package/dist/es2019/plugins/table/nodeviews/tableCell.js +2 -2
  76. package/dist/es2019/plugins/table/pm-plugins/decorations/plugin.js +2 -3
  77. package/dist/es2019/plugins/table/pm-plugins/keymap.js +4 -4
  78. package/dist/es2019/plugins/table/pm-plugins/main.js +13 -13
  79. package/dist/es2019/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.js +1 -1
  80. package/dist/es2019/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +2 -2
  81. package/dist/es2019/plugins/table/pm-plugins/table-local-id.js +1 -1
  82. package/dist/es2019/plugins/table/pm-plugins/table-resizing/commands.js +1 -1
  83. package/dist/es2019/plugins/table/pm-plugins/table-resizing/event-handlers.js +4 -4
  84. package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/colgroup.js +1 -1
  85. package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/column-state.js +1 -1
  86. package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/dom.js +1 -1
  87. package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/misc.js +2 -3
  88. package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +1 -1
  89. package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/scale-table.js +2 -3
  90. package/dist/es2019/plugins/table/pm-plugins/table-selection-keymap.js +1 -1
  91. package/dist/es2019/plugins/table/pm-plugins/table-width.js +3 -3
  92. package/dist/es2019/plugins/table/toolbar.js +16 -18
  93. package/dist/es2019/plugins/table/transforms/column-width.js +6 -7
  94. package/dist/es2019/plugins/table/transforms/delete-columns.js +1 -1
  95. package/dist/es2019/plugins/table/transforms/merge.js +2 -1
  96. package/dist/es2019/plugins/table/transforms/replace-table.js +2 -2
  97. package/dist/es2019/plugins/table/transforms/split.js +1 -0
  98. package/dist/es2019/plugins/table/ui/FloatingContextualButton/FixedButton.js +2 -2
  99. package/dist/es2019/plugins/table/ui/FloatingContextualButton/index.js +4 -4
  100. package/dist/es2019/plugins/table/ui/FloatingContextualButton/styles.js +1 -1
  101. package/dist/es2019/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +10 -10
  102. package/dist/es2019/plugins/table/ui/FloatingContextualMenu/index.js +2 -2
  103. package/dist/es2019/plugins/table/ui/FloatingContextualMenu/styles.js +7 -4
  104. package/dist/es2019/plugins/table/ui/FloatingDeleteButton/index.js +5 -5
  105. package/dist/es2019/plugins/table/ui/FloatingInsertButton/InsertButton.js +3 -3
  106. package/dist/es2019/plugins/table/ui/FloatingInsertButton/index.js +4 -5
  107. package/dist/es2019/plugins/table/ui/LayoutButton/index.js +3 -3
  108. package/dist/es2019/plugins/table/ui/TableFloatingControls/CornerControls/index.js +1 -1
  109. package/dist/es2019/plugins/table/ui/common-styles.js +5 -5
  110. package/dist/es2019/plugins/table/ui/consts.js +2 -2
  111. package/dist/es2019/plugins/table/ui/ui-styles.js +3 -3
  112. package/dist/es2019/plugins/table/utils/column-controls.js +3 -3
  113. package/dist/es2019/plugins/table/utils/decoration.js +2 -2
  114. package/dist/es2019/plugins/table/utils/guidelines.js +1 -1
  115. package/dist/es2019/plugins/table/utils/nodes.js +1 -1
  116. package/dist/es2019/plugins/table/utils/row-controls.js +3 -3
  117. package/dist/es2019/plugins/table/utils/selection.js +1 -1
  118. package/dist/es2019/version.json +1 -1
  119. package/dist/esm/plugins/table/commands/clear.js +3 -1
  120. package/dist/esm/plugins/table/commands/go-to-next-cell.js +2 -2
  121. package/dist/esm/plugins/table/commands/insert.js +4 -3
  122. package/dist/esm/plugins/table/commands/misc.js +4 -4
  123. package/dist/esm/plugins/table/commands/referentiality.js +1 -1
  124. package/dist/esm/plugins/table/commands/selection.js +3 -3
  125. package/dist/esm/plugins/table/commands/sort.js +3 -4
  126. package/dist/esm/plugins/table/commands/toggle.js +1 -2
  127. package/dist/esm/plugins/table/commands-with-analytics.js +4 -4
  128. package/dist/esm/plugins/table/event-handlers.js +3 -5
  129. package/dist/esm/plugins/table/handlers.js +5 -5
  130. package/dist/esm/plugins/table/index.js +16 -16
  131. package/dist/esm/plugins/table/nodeviews/OverflowShadowsObserver.js +1 -1
  132. package/dist/esm/plugins/table/nodeviews/TableComponent.js +39 -36
  133. package/dist/esm/plugins/table/nodeviews/TableContainer.js +10 -9
  134. package/dist/esm/plugins/table/nodeviews/TableResizer.js +4 -4
  135. package/dist/esm/plugins/table/nodeviews/table.js +11 -9
  136. package/dist/esm/plugins/table/nodeviews/tableCell.js +2 -2
  137. package/dist/esm/plugins/table/pm-plugins/decorations/plugin.js +2 -3
  138. package/dist/esm/plugins/table/pm-plugins/keymap.js +4 -4
  139. package/dist/esm/plugins/table/pm-plugins/main.js +13 -13
  140. package/dist/esm/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.js +1 -1
  141. package/dist/esm/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +2 -2
  142. package/dist/esm/plugins/table/pm-plugins/table-local-id.js +1 -1
  143. package/dist/esm/plugins/table/pm-plugins/table-resizing/commands.js +1 -1
  144. package/dist/esm/plugins/table/pm-plugins/table-resizing/event-handlers.js +4 -4
  145. package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/colgroup.js +1 -1
  146. package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/column-state.js +1 -1
  147. package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/dom.js +1 -1
  148. package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/misc.js +2 -3
  149. package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +1 -1
  150. package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/scale-table.js +2 -3
  151. package/dist/esm/plugins/table/pm-plugins/table-selection-keymap.js +1 -1
  152. package/dist/esm/plugins/table/pm-plugins/table-width.js +3 -3
  153. package/dist/esm/plugins/table/toolbar.js +16 -18
  154. package/dist/esm/plugins/table/transforms/column-width.js +6 -7
  155. package/dist/esm/plugins/table/transforms/delete-columns.js +1 -1
  156. package/dist/esm/plugins/table/transforms/merge.js +2 -1
  157. package/dist/esm/plugins/table/transforms/replace-table.js +2 -2
  158. package/dist/esm/plugins/table/transforms/split.js +1 -0
  159. package/dist/esm/plugins/table/ui/FloatingContextualButton/FixedButton.js +2 -2
  160. package/dist/esm/plugins/table/ui/FloatingContextualButton/index.js +4 -4
  161. package/dist/esm/plugins/table/ui/FloatingContextualButton/styles.js +1 -1
  162. package/dist/esm/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +10 -10
  163. package/dist/esm/plugins/table/ui/FloatingContextualMenu/index.js +2 -2
  164. package/dist/esm/plugins/table/ui/FloatingContextualMenu/styles.js +6 -3
  165. package/dist/esm/plugins/table/ui/FloatingDeleteButton/index.js +5 -5
  166. package/dist/esm/plugins/table/ui/FloatingInsertButton/InsertButton.js +3 -3
  167. package/dist/esm/plugins/table/ui/FloatingInsertButton/index.js +4 -5
  168. package/dist/esm/plugins/table/ui/LayoutButton/index.js +3 -3
  169. package/dist/esm/plugins/table/ui/TableFloatingControls/CornerControls/index.js +1 -1
  170. package/dist/esm/plugins/table/ui/common-styles.js +5 -5
  171. package/dist/esm/plugins/table/ui/consts.js +2 -2
  172. package/dist/esm/plugins/table/ui/ui-styles.js +3 -3
  173. package/dist/esm/plugins/table/utils/column-controls.js +3 -3
  174. package/dist/esm/plugins/table/utils/decoration.js +2 -2
  175. package/dist/esm/plugins/table/utils/guidelines.js +1 -1
  176. package/dist/esm/plugins/table/utils/nodes.js +1 -1
  177. package/dist/esm/plugins/table/utils/row-controls.js +3 -3
  178. package/dist/esm/plugins/table/utils/selection.js +1 -1
  179. package/dist/esm/version.json +1 -1
  180. package/dist/types/plugins/table/commands/go-to-next-cell.d.ts +2 -2
  181. package/dist/types/plugins/table/commands/insert.d.ts +1 -1
  182. package/dist/types/plugins/table/commands/selection.d.ts +1 -1
  183. package/dist/types/plugins/table/commands/sort.d.ts +1 -1
  184. package/dist/types/plugins/table/commands-with-analytics.d.ts +4 -5
  185. package/dist/types/plugins/table/event-handlers.d.ts +1 -1
  186. package/dist/types/plugins/table/handlers.d.ts +1 -1
  187. package/dist/types/plugins/table/index.d.ts +4 -4
  188. package/dist/types/plugins/table/nodeviews/TableComponent.d.ts +3 -4
  189. package/dist/types/plugins/table/nodeviews/TableContainer.d.ts +2 -2
  190. package/dist/types/plugins/table/nodeviews/TableResizer.d.ts +1 -1
  191. package/dist/types/plugins/table/nodeviews/table.d.ts +3 -4
  192. package/dist/types/plugins/table/nodeviews/tableCell.d.ts +1 -2
  193. package/dist/types/plugins/table/nodeviews/types.d.ts +2 -1
  194. package/dist/types/plugins/table/pm-plugins/decorations/plugin.d.ts +2 -2
  195. package/dist/types/plugins/table/pm-plugins/keymap.d.ts +1 -1
  196. package/dist/types/plugins/table/pm-plugins/main.d.ts +4 -6
  197. package/dist/types/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.d.ts +1 -1
  198. package/dist/types/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.d.ts +1 -1
  199. package/dist/types/plugins/table/pm-plugins/sticky-headers/plugin.d.ts +1 -1
  200. package/dist/types/plugins/table/pm-plugins/table-local-id.d.ts +0 -12
  201. package/dist/types/plugins/table/pm-plugins/table-resizing/plugin.d.ts +3 -3
  202. package/dist/types/plugins/table/pm-plugins/table-resizing/utils/misc.d.ts +3 -4
  203. package/dist/types/plugins/table/pm-plugins/table-resizing/utils/resize-state.d.ts +3 -3
  204. package/dist/types/plugins/table/pm-plugins/table-resizing/utils/types.d.ts +1 -1
  205. package/dist/types/plugins/table/pm-plugins/table-width.d.ts +1 -1
  206. package/dist/types/plugins/table/toolbar.d.ts +4 -5
  207. package/dist/types/plugins/table/transforms/column-width.d.ts +1 -1
  208. package/dist/types/plugins/table/transforms/replace-table.d.ts +1 -1
  209. package/dist/types/plugins/table/types.d.ts +1 -1
  210. package/dist/types/plugins/table/ui/FloatingContextualButton/index.d.ts +2 -2
  211. package/dist/types/plugins/table/ui/FloatingContextualMenu/ContextualMenu.d.ts +2 -2
  212. package/dist/types/plugins/table/ui/FloatingContextualMenu/index.d.ts +1 -1
  213. package/dist/types/plugins/table/ui/FloatingDeleteButton/DeleteButton.d.ts +1 -2
  214. package/dist/types/plugins/table/ui/FloatingDeleteButton/index.d.ts +1 -1
  215. package/dist/types/plugins/table/ui/FloatingInsertButton/index.d.ts +1 -1
  216. package/dist/types/plugins/table/ui/LayoutButton/index.d.ts +1 -1
  217. package/dist/types/plugins/table/ui/TableFloatingControls/CornerControls/index.d.ts +1 -1
  218. package/dist/types/plugins/table/ui/TableFloatingControls/index.d.ts +1 -1
  219. package/dist/types/plugins/table/utils/analytics.d.ts +1 -1
  220. package/dist/types/plugins/table/utils/collapse.d.ts +2 -2
  221. package/dist/types/plugins/table/utils/decoration.d.ts +1 -1
  222. package/dist/types-ts4.5/plugins/table/commands/go-to-next-cell.d.ts +2 -2
  223. package/dist/types-ts4.5/plugins/table/commands/insert.d.ts +1 -1
  224. package/dist/types-ts4.5/plugins/table/commands/selection.d.ts +1 -1
  225. package/dist/types-ts4.5/plugins/table/commands/sort.d.ts +1 -1
  226. package/dist/types-ts4.5/plugins/table/commands-with-analytics.d.ts +4 -5
  227. package/dist/types-ts4.5/plugins/table/event-handlers.d.ts +1 -1
  228. package/dist/types-ts4.5/plugins/table/handlers.d.ts +1 -1
  229. package/dist/types-ts4.5/plugins/table/index.d.ts +4 -4
  230. package/dist/types-ts4.5/plugins/table/nodeviews/TableComponent.d.ts +3 -4
  231. package/dist/types-ts4.5/plugins/table/nodeviews/TableContainer.d.ts +2 -2
  232. package/dist/types-ts4.5/plugins/table/nodeviews/TableResizer.d.ts +1 -1
  233. package/dist/types-ts4.5/plugins/table/nodeviews/table.d.ts +3 -4
  234. package/dist/types-ts4.5/plugins/table/nodeviews/tableCell.d.ts +1 -2
  235. package/dist/types-ts4.5/plugins/table/nodeviews/types.d.ts +2 -1
  236. package/dist/types-ts4.5/plugins/table/pm-plugins/decorations/plugin.d.ts +2 -2
  237. package/dist/types-ts4.5/plugins/table/pm-plugins/keymap.d.ts +1 -1
  238. package/dist/types-ts4.5/plugins/table/pm-plugins/main.d.ts +4 -6
  239. package/dist/types-ts4.5/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.d.ts +1 -1
  240. package/dist/types-ts4.5/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.d.ts +1 -1
  241. package/dist/types-ts4.5/plugins/table/pm-plugins/sticky-headers/plugin.d.ts +1 -1
  242. package/dist/types-ts4.5/plugins/table/pm-plugins/table-local-id.d.ts +0 -12
  243. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/plugin.d.ts +3 -3
  244. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/misc.d.ts +3 -4
  245. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/resize-state.d.ts +3 -3
  246. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/types.d.ts +1 -1
  247. package/dist/types-ts4.5/plugins/table/pm-plugins/table-width.d.ts +1 -1
  248. package/dist/types-ts4.5/plugins/table/toolbar.d.ts +4 -5
  249. package/dist/types-ts4.5/plugins/table/transforms/column-width.d.ts +1 -1
  250. package/dist/types-ts4.5/plugins/table/transforms/replace-table.d.ts +1 -1
  251. package/dist/types-ts4.5/plugins/table/types.d.ts +1 -1
  252. package/dist/types-ts4.5/plugins/table/ui/FloatingContextualButton/index.d.ts +2 -2
  253. package/dist/types-ts4.5/plugins/table/ui/FloatingContextualMenu/ContextualMenu.d.ts +2 -2
  254. package/dist/types-ts4.5/plugins/table/ui/FloatingContextualMenu/index.d.ts +1 -1
  255. package/dist/types-ts4.5/plugins/table/ui/FloatingDeleteButton/DeleteButton.d.ts +1 -2
  256. package/dist/types-ts4.5/plugins/table/ui/FloatingDeleteButton/index.d.ts +1 -1
  257. package/dist/types-ts4.5/plugins/table/ui/FloatingInsertButton/index.d.ts +1 -1
  258. package/dist/types-ts4.5/plugins/table/ui/LayoutButton/index.d.ts +1 -1
  259. package/dist/types-ts4.5/plugins/table/ui/TableFloatingControls/CornerControls/index.d.ts +1 -1
  260. package/dist/types-ts4.5/plugins/table/ui/TableFloatingControls/index.d.ts +1 -1
  261. package/dist/types-ts4.5/plugins/table/utils/analytics.d.ts +1 -1
  262. package/dist/types-ts4.5/plugins/table/utils/collapse.d.ts +2 -2
  263. package/dist/types-ts4.5/plugins/table/utils/decoration.d.ts +1 -1
  264. package/examples/99-testing.tsx +11 -10
  265. package/package.json +11 -3
  266. package/report.api.md +2 -0
  267. package/src/__tests__/integration/arrow-down-into-table.ts +3 -2
  268. package/src/__tests__/integration/auto-size.ts +8 -10
  269. package/src/__tests__/integration/cell-selection.ts +8 -7
  270. package/src/__tests__/integration/change-date-inside-table.ts +4 -5
  271. package/src/__tests__/integration/delete-columns.ts +6 -4
  272. package/src/__tests__/integration/delete-last-column-in-full-width.ts +4 -4
  273. package/src/__tests__/integration/delete-last-column-with-empty-action.ts +4 -4
  274. package/src/__tests__/integration/delete-last-row-with-empty-action.ts +4 -4
  275. package/src/__tests__/integration/delete-rows.ts +8 -6
  276. package/src/__tests__/integration/delete-table-when-selected.ts +10 -11
  277. package/src/__tests__/integration/deleting-empty-paragraph-under-table.ts +5 -4
  278. package/src/__tests__/integration/even-columns.ts +8 -8
  279. package/src/__tests__/integration/floating-toolbar.ts +3 -1
  280. package/src/__tests__/integration/horizontal-scroll-shadows.ts +7 -8
  281. package/src/__tests__/integration/horizontal-scroll.ts +8 -7
  282. package/src/__tests__/integration/insert-cell-header-with-strong-mark.ts +3 -4
  283. package/src/__tests__/integration/insert-row-inside-layout.ts +8 -6
  284. package/src/__tests__/integration/layout.ts +8 -11
  285. package/src/__tests__/integration/meta-arrowup-cursor-in-first-row.ts +3 -2
  286. package/src/__tests__/integration/resize-handler.ts +2 -2
  287. package/src/__tests__/integration/resize.ts +15 -15
  288. package/src/__tests__/integration/scale.ts +8 -8
  289. package/src/__tests__/integration/sticky-header.ts +3 -2
  290. package/src/__tests__/unit/analytics.ts +21 -21
  291. package/src/__tests__/unit/collab.ts +16 -16
  292. package/src/__tests__/unit/commands/go-to-next-cell.ts +14 -13
  293. package/src/__tests__/unit/commands/insert.ts +12 -12
  294. package/src/__tests__/unit/commands/misc.ts +18 -16
  295. package/src/__tests__/unit/commands/sort.ts +9 -8
  296. package/src/__tests__/unit/commands.ts +13 -14
  297. package/src/__tests__/unit/copy-paste.ts +31 -25
  298. package/src/__tests__/unit/event-handlers/index.ts +15 -13
  299. package/src/__tests__/unit/event-handlers.ts +18 -18
  300. package/src/__tests__/unit/fix-tables.ts +9 -9
  301. package/src/__tests__/unit/get-toolbar-config.ts +21 -21
  302. package/src/__tests__/unit/handlers.ts +13 -12
  303. package/src/__tests__/unit/hover-selection.ts +14 -13
  304. package/src/__tests__/unit/index-with-fake-timers.ts +6 -5
  305. package/src/__tests__/unit/index.ts +30 -31
  306. package/src/__tests__/unit/layout.ts +16 -16
  307. package/src/__tests__/unit/nodeviews/OverflowShadowsObserver.ts +4 -2
  308. package/src/__tests__/unit/nodeviews/TableComponent.tsx +21 -20
  309. package/src/__tests__/unit/nodeviews/TableContainer.tsx +38 -105
  310. package/src/__tests__/unit/nodeviews/cell.ts +17 -16
  311. package/src/__tests__/unit/nodeviews/table.ts +15 -13
  312. package/src/__tests__/unit/pm-plugins/decorations/column-controls.ts +1 -1
  313. package/src/__tests__/unit/pm-plugins/decorations/column-resizing.ts +7 -8
  314. package/src/__tests__/unit/pm-plugins/decorations/plugin.ts +45 -57
  315. package/src/__tests__/unit/pm-plugins/main.ts +15 -14
  316. package/src/__tests__/unit/pm-plugins/safari-delete-composition-text-issue-workaround.ts +7 -6
  317. package/src/__tests__/unit/pm-plugins/sticky-headers/tableRow.tsx +23 -21
  318. package/src/__tests__/unit/pm-plugins/table-local-id.ts +14 -15
  319. package/src/__tests__/unit/pm-plugins/table-resizing/colgroup.ts +3 -2
  320. package/src/__tests__/unit/pm-plugins/table-resizing/event-handlers.ts +22 -21
  321. package/src/__tests__/unit/sort-column.ts +16 -14
  322. package/src/__tests__/unit/toolbar.ts +22 -21
  323. package/src/__tests__/unit/transforms/delete-columns.ts +16 -14
  324. package/src/__tests__/unit/transforms/delete-rows.ts +16 -14
  325. package/src/__tests__/unit/transforms/merging.ts +15 -13
  326. package/src/__tests__/unit/ui/ContextualMenu.tsx +8 -6
  327. package/src/__tests__/unit/ui/CornerControls.tsx +11 -9
  328. package/src/__tests__/unit/ui/DeleteButton.tsx +3 -1
  329. package/src/__tests__/unit/ui/FixedButton.tsx +4 -1
  330. package/src/__tests__/unit/ui/FloatingContextualButton.tsx +14 -11
  331. package/src/__tests__/unit/ui/FloatingContextualMenu.tsx +8 -6
  332. package/src/__tests__/unit/ui/FloatingDeleteButton.tsx +12 -9
  333. package/src/__tests__/unit/ui/FloatingInsertButton.tsx +21 -19
  334. package/src/__tests__/unit/ui/RowControls.tsx +15 -12
  335. package/src/__tests__/unit/ui/TableFloatingControls.tsx +16 -15
  336. package/src/__tests__/unit/undo-redo.ts +17 -15
  337. package/src/__tests__/unit/utils/collapse.ts +7 -8
  338. package/src/__tests__/unit/utils/nodes.ts +12 -11
  339. package/src/__tests__/unit/utils/row-controls.ts +12 -12
  340. package/src/__tests__/unit/utils/table.ts +5 -4
  341. package/src/__tests__/unit/utils.ts +18 -16
  342. package/src/__tests__/visual-regression/cell-options-menu.ts +2 -2
  343. package/src/__tests__/visual-regression/index.ts +8 -7
  344. package/src/__tests__/visual-regression/sticky-header.ts +6 -5
  345. package/src/plugins/table/commands/clear.ts +3 -2
  346. package/src/plugins/table/commands/collapse.ts +1 -0
  347. package/src/plugins/table/commands/go-to-next-cell.ts +8 -7
  348. package/src/plugins/table/commands/insert.ts +8 -7
  349. package/src/plugins/table/commands/misc.ts +15 -18
  350. package/src/plugins/table/commands/referentiality.ts +3 -1
  351. package/src/plugins/table/commands/selection.ts +11 -10
  352. package/src/plugins/table/commands/sort.ts +9 -9
  353. package/src/plugins/table/commands/split-cell.ts +1 -1
  354. package/src/plugins/table/commands/toggle.ts +2 -3
  355. package/src/plugins/table/commands-with-analytics.ts +15 -15
  356. package/src/plugins/table/event-handlers.ts +19 -20
  357. package/src/plugins/table/handlers.ts +6 -7
  358. package/src/plugins/table/index.tsx +51 -51
  359. package/src/plugins/table/nodeviews/OverflowShadowsObserver.ts +2 -1
  360. package/src/plugins/table/nodeviews/TableComponent.tsx +23 -30
  361. package/src/plugins/table/nodeviews/TableContainer.tsx +16 -23
  362. package/src/plugins/table/nodeviews/TableResizer.tsx +8 -7
  363. package/src/plugins/table/nodeviews/table.tsx +25 -18
  364. package/src/plugins/table/nodeviews/tableCell.tsx +9 -7
  365. package/src/plugins/table/nodeviews/types.ts +4 -2
  366. package/src/plugins/table/nodeviews/update-overflow-shadows.ts +3 -1
  367. package/src/plugins/table/pm-plugins/decorations/plugin.ts +4 -3
  368. package/src/plugins/table/pm-plugins/decorations/utils/column-controls.ts +2 -1
  369. package/src/plugins/table/pm-plugins/keymap.ts +8 -8
  370. package/src/plugins/table/pm-plugins/main.ts +38 -33
  371. package/src/plugins/table/pm-plugins/plugin-factory.ts +2 -0
  372. package/src/plugins/table/pm-plugins/plugin-key.ts +1 -0
  373. package/src/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.ts +2 -1
  374. package/src/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.ts +6 -7
  375. package/src/plugins/table/pm-plugins/sticky-headers/plugin-key.ts +1 -0
  376. package/src/plugins/table/pm-plugins/sticky-headers/plugin.ts +3 -4
  377. package/src/plugins/table/pm-plugins/table-local-id.ts +3 -4
  378. package/src/plugins/table/pm-plugins/table-resizing/commands.ts +3 -2
  379. package/src/plugins/table/pm-plugins/table-resizing/event-handlers.ts +13 -14
  380. package/src/plugins/table/pm-plugins/table-resizing/plugin-factory.ts +1 -0
  381. package/src/plugins/table/pm-plugins/table-resizing/plugin-key.ts +1 -0
  382. package/src/plugins/table/pm-plugins/table-resizing/plugin.ts +7 -6
  383. package/src/plugins/table/pm-plugins/table-resizing/utils/colgroup.ts +2 -1
  384. package/src/plugins/table/pm-plugins/table-resizing/utils/column-state.ts +1 -1
  385. package/src/plugins/table/pm-plugins/table-resizing/utils/dom.ts +3 -3
  386. package/src/plugins/table/pm-plugins/table-resizing/utils/misc.ts +8 -9
  387. package/src/plugins/table/pm-plugins/table-resizing/utils/resize-state.ts +8 -6
  388. package/src/plugins/table/pm-plugins/table-resizing/utils/scale-table.ts +4 -5
  389. package/src/plugins/table/pm-plugins/table-resizing/utils/types.ts +2 -1
  390. package/src/plugins/table/pm-plugins/table-selection-keymap.ts +4 -3
  391. package/src/plugins/table/pm-plugins/table-width.ts +5 -4
  392. package/src/plugins/table/toolbar.tsx +54 -57
  393. package/src/plugins/table/transforms/column-width.ts +13 -13
  394. package/src/plugins/table/transforms/delete-columns.ts +2 -2
  395. package/src/plugins/table/transforms/delete-rows.ts +2 -2
  396. package/src/plugins/table/transforms/merge.ts +3 -3
  397. package/src/plugins/table/transforms/replace-table.ts +6 -5
  398. package/src/plugins/table/transforms/split.ts +1 -1
  399. package/src/plugins/table/types.ts +3 -3
  400. package/src/plugins/table/ui/FloatingContextualButton/FixedButton.tsx +4 -2
  401. package/src/plugins/table/ui/FloatingContextualButton/index.tsx +12 -11
  402. package/src/plugins/table/ui/FloatingContextualButton/styles.ts +5 -3
  403. package/src/plugins/table/ui/FloatingContextualMenu/ContextualMenu.tsx +27 -28
  404. package/src/plugins/table/ui/FloatingContextualMenu/index.tsx +10 -11
  405. package/src/plugins/table/ui/FloatingContextualMenu/styles.ts +8 -4
  406. package/src/plugins/table/ui/FloatingDeleteButton/DeleteButton.tsx +5 -2
  407. package/src/plugins/table/ui/FloatingDeleteButton/index.tsx +9 -9
  408. package/src/plugins/table/ui/FloatingInsertButton/InsertButton.tsx +4 -5
  409. package/src/plugins/table/ui/FloatingInsertButton/index.tsx +16 -18
  410. package/src/plugins/table/ui/LayoutButton/index.tsx +6 -6
  411. package/src/plugins/table/ui/TableFloatingControls/CornerControls/index.tsx +3 -2
  412. package/src/plugins/table/ui/TableFloatingControls/NumberColumn/index.tsx +2 -1
  413. package/src/plugins/table/ui/TableFloatingControls/index.tsx +2 -3
  414. package/src/plugins/table/ui/common-styles.ts +33 -34
  415. package/src/plugins/table/ui/consts.ts +12 -13
  416. package/src/plugins/table/ui/ui-styles.ts +24 -22
  417. package/src/plugins/table/utils/analytics.ts +3 -2
  418. package/src/plugins/table/utils/collapse.ts +2 -2
  419. package/src/plugins/table/utils/column-controls.ts +5 -6
  420. package/src/plugins/table/utils/decoration.ts +6 -7
  421. package/src/plugins/table/utils/dom.ts +1 -0
  422. package/src/plugins/table/utils/guidelines.ts +2 -2
  423. package/src/plugins/table/utils/nodes.ts +2 -1
  424. package/src/plugins/table/utils/row-controls.ts +4 -3
  425. package/src/plugins/table/utils/selection.ts +2 -1
  426. package/src/plugins/table/utils/table.ts +2 -1
  427. package/tmp/api-report-tmp.d.ts +2 -0
@@ -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,
@@ -3,13 +3,12 @@ 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 } from '@atlaskit/editor-common/styles';
5
5
  import { akEditorTableNumberColumnWidth } from '@atlaskit/editor-shared-styles';
6
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
6
+ import { updateColumnWidths } from '../../../transforms';
7
7
  import { getTableWidth } from '../../../utils';
8
8
  import { getLayoutSize } from '../utils/misc';
9
9
  import { reduceSpace } from '../utils/resize-logic';
10
10
  import { adjustColumnsWidths, getResizeState, getTotalWidth, updateColgroup } from '../utils/resize-state';
11
11
  import { hasTableBeenResized, insertColgroupFromNode } from './colgroup';
12
- import { updateColumnWidths } from '../../../transforms';
13
12
  // Base function to trigger the actual scale on a table node.
14
13
  // Will only resize/scale if a table has been previously resized.
15
14
  export var scale = function scale(tableRef, options, domAtPos) {
@@ -105,7 +104,7 @@ export var previewScaleTable = function previewScaleTable(tableRef, options, dom
105
104
  if (!tableRef) {
106
105
  return;
107
106
  }
108
- if (getBooleanFF('platform.editor.custom-table-width') && parentWidth) {
107
+ if (parentWidth) {
109
108
  tableRef.style.width = "".concat(parentWidth, "px");
110
109
  }
111
110
  if (!hasTableBeenResized(node)) {
@@ -1,5 +1,5 @@
1
1
  import { keymap } from 'prosemirror-keymap';
2
- import { bindKeymapWithCommand, moveRight, moveLeft } from '@atlaskit/editor-common/keymaps';
2
+ import { bindKeymapWithCommand, moveLeft, moveRight } from '@atlaskit/editor-common/keymaps';
3
3
  import { arrowLeftFromTable, arrowRightFromTable } from '../commands/selection';
4
4
  export function tableSelectionKeymapPlugin(editorSelectionAPI) {
5
5
  var list = {};
@@ -8,11 +8,11 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
8
8
  * Has login to scan the document, add width value to table's width attribute when necessary
9
9
  * Also holds resizing state to hide / show table controls
10
10
  */
11
+ import { PluginKey } from 'prosemirror-state';
12
+ import { ReplaceStep } from 'prosemirror-transform';
13
+ import { SetAttrsStep } from '@atlaskit/adf-schema/steps';
11
14
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
12
15
  import { akEditorFullWidthLayoutWidth, akEditorWideLayoutWidth } from '@atlaskit/editor-shared-styles';
13
- import { SetAttrsStep } from '@atlaskit/adf-schema/steps';
14
- import { ReplaceStep } from 'prosemirror-transform';
15
- import { PluginKey } from 'prosemirror-state';
16
16
  export var pluginKey = new PluginKey('tableWidthPlugin');
17
17
  var createPlugin = function createPlugin(dispatch, fullWidthEnabled) {
18
18
  return new SafePlugin({
@@ -1,30 +1,28 @@
1
1
  /** @jsx jsx */
2
2
  import { jsx } from '@emotion/react';
3
+ import { findParentDomRefOfType } from 'prosemirror-utils';
3
4
  import { defineMessages } from 'react-intl-next';
4
- import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
5
+ import { TableSortOrder as SortOrder } from '@atlaskit/adf-schema/steps';
6
+ import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
7
+ import { addColumnAfter, addRowAfter, backspace, tooltip } from '@atlaskit/editor-common/keymaps';
5
8
  import commonMessages from '@atlaskit/editor-common/messages';
6
- import { clearHoverSelection, hoverTable, hoverColumns, hoverRows, removeDescendantNodes, hoverMergedCells } from './commands';
7
- import { deleteTableWithAnalytics, toggleHeaderColumnWithAnalytics, toggleHeaderRowWithAnalytics, toggleNumberColumnWithAnalytics, insertRowWithAnalytics, deleteRowsWithAnalytics, mergeCellsWithAnalytics, splitCellWithAnalytics, deleteColumnsWithAnalytics, emptyMultipleCellsWithAnalytics, insertColumnWithAnalytics, wrapTableInExpandWithAnalytics, sortColumnWithAnalytics, setColorWithAnalytics, distributeColumnsWidthsWithAnalytics } from './commands-with-analytics';
9
+ import { cellBackgroundColorPalette, DEFAULT_BORDER_COLOR } from '@atlaskit/editor-common/ui-color';
10
+ import { closestElement, getChildrenInfo as _getChildrenInfo, getNodeName, isReferencedSource } from '@atlaskit/editor-common/utils';
11
+ import { akEditorFloatingPanelZIndex } from '@atlaskit/editor-shared-styles';
12
+ import { shortcutStyle } from '@atlaskit/editor-shared-styles/shortcut';
13
+ import { findCellRectClosestToPos, findTable, getSelectionRect, isSelectionType, splitCell } from '@atlaskit/editor-tables/utils';
14
+ import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
15
+ import { clearHoverSelection, hoverColumns, hoverMergedCells, hoverRows, hoverTable, removeDescendantNodes } from './commands';
16
+ import { deleteColumnsWithAnalytics, deleteRowsWithAnalytics, deleteTableWithAnalytics, distributeColumnsWidthsWithAnalytics, emptyMultipleCellsWithAnalytics, insertColumnWithAnalytics, insertRowWithAnalytics, mergeCellsWithAnalytics, setColorWithAnalytics, sortColumnWithAnalytics, splitCellWithAnalytics, toggleHeaderColumnWithAnalytics, toggleHeaderRowWithAnalytics, toggleNumberColumnWithAnalytics, wrapTableInExpandWithAnalytics } from './commands-with-analytics';
8
17
  import { getPluginState } from './pm-plugins/plugin-factory';
9
18
  import { pluginKey as tableResizingPluginKey } from './pm-plugins/table-resizing';
19
+ import { getNewResizeStateFromSelectedColumns } from './pm-plugins/table-resizing/utils/resize-state';
10
20
  import { pluginKey as tableWidthPluginKey } from './pm-plugins/table-width';
11
- import { TableCssClassName } from './types';
12
- import { getMergedCellsPositions, getSelectedColumnIndexes, getSelectedRowIndexes } from './utils';
13
- import { isReferencedSource, getChildrenInfo as _getChildrenInfo, getNodeName } from '@atlaskit/editor-common/utils';
14
- import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
15
- import { findCellRectClosestToPos, findTable, getSelectionRect, isSelectionType } from '@atlaskit/editor-tables/utils';
16
21
  import { canMergeCells } from './transforms';
17
- import { splitCell } from '@atlaskit/editor-tables/utils';
18
- import tableMessages from './ui/messages';
22
+ import { TableCssClassName } from './types';
19
23
  import { messages as ContextualMenuMessages } from './ui/FloatingContextualMenu/ContextualMenu';
20
- import { findParentDomRefOfType } from 'prosemirror-utils';
21
- import { closestElement } from '@atlaskit/editor-common/utils';
22
- import { addColumnAfter, addRowAfter, tooltip, backspace } from '@atlaskit/editor-common/keymaps';
23
- import { getNewResizeStateFromSelectedColumns } from './pm-plugins/table-resizing/utils/resize-state';
24
- import { TableSortOrder as SortOrder } from '@atlaskit/adf-schema/steps';
25
- import { shortcutStyle } from '@atlaskit/editor-shared-styles/shortcut';
26
- import { cellBackgroundColorPalette, DEFAULT_BORDER_COLOR } from '@atlaskit/editor-common/ui-color';
27
- import { akEditorFloatingPanelZIndex } from '@atlaskit/editor-shared-styles';
24
+ import tableMessages from './ui/messages';
25
+ import { getMergedCellsPositions, getSelectedColumnIndexes, getSelectedRowIndexes } from './utils';
28
26
  export var messages = defineMessages({
29
27
  tableOptions: {
30
28
  id: 'fabric.editor.tableOptions',
@@ -1,18 +1,17 @@
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 { TableMap } from '@atlaskit/editor-tables/table-map';
5
- import { tableNewColumnMinWidth } from '@atlaskit/editor-common/styles';
4
+ import { SetAttrsStep } from '@atlaskit/adf-schema/steps';
5
+ import { tableCellMinWidth, tableNewColumnMinWidth } from '@atlaskit/editor-common/styles';
6
6
  import { akEditorDefaultLayoutWidth } from '@atlaskit/editor-shared-styles';
7
+ import { TableMap } from '@atlaskit/editor-tables/table-map';
8
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
7
9
  import { hasTableBeenResized } from '../pm-plugins/table-resizing/utils';
8
- import { SetAttrsStep } from '@atlaskit/adf-schema/steps';
9
- import { getResizeState, normaliseTableLayout } from '../pm-plugins/table-resizing/utils/resize-state';
10
+ import { isMinCellWidthTable } from '../pm-plugins/table-resizing/utils/colgroup';
10
11
  import { getTableMaxWidth } from '../pm-plugins/table-resizing/utils/misc';
11
- import { tableCellMinWidth } from '@atlaskit/editor-common/styles';
12
+ import { getResizeState, normaliseTableLayout } from '../pm-plugins/table-resizing/utils/resize-state';
12
13
  import { scaleTableTo } from '../pm-plugins/table-resizing/utils/scale-table';
13
- import { isMinCellWidthTable } from '../pm-plugins/table-resizing/utils/colgroup';
14
14
  import { insertColumnButtonOffset } from '../ui/common-styles';
15
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
16
15
  export var updateColumnWidths = function updateColumnWidths(resizeState, table, start) {
17
16
  return function (tr) {
18
17
  var map = TableMap.get(table);
@@ -3,9 +3,9 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
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
5
  import { Selection } from 'prosemirror-state';
6
+ import { AddColumnStep } from '@atlaskit/adf-schema/steps';
6
7
  import { TableMap } from '@atlaskit/editor-tables/table-map';
7
8
  import { findTable } from '@atlaskit/editor-tables/utils';
8
- import { AddColumnStep } from '@atlaskit/adf-schema/steps';
9
9
  import { splitCellsInColumns } from './split';
10
10
  var deleteColumnsCustomStep = function deleteColumnsCustomStep(rect) {
11
11
  return function (tr) {
@@ -3,9 +3,10 @@ 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 { Fragment } from 'prosemirror-model';
5
5
  import { Selection } from 'prosemirror-state';
6
- import { TableMap } from '@atlaskit/editor-tables/table-map';
7
6
  import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
7
+ import { TableMap } from '@atlaskit/editor-tables/table-map';
8
8
  import { findTable, getSelectionRect } from '@atlaskit/editor-tables/utils';
9
+
9
10
  // re-creates table node with merged cells
10
11
  export function mergeCells(tr) {
11
12
  var selection = tr.selection;
@@ -1,7 +1,7 @@
1
+ import { Fragment, Slice } from 'prosemirror-model';
1
2
  import { TextSelection } from 'prosemirror-state';
2
- import { Slice, Fragment } from 'prosemirror-model';
3
+ import { ACTION_SUBJECT, EVENT_TYPE, TABLE_ACTION } from '@atlaskit/editor-common/analytics';
3
4
  import { findTable, isTableSelected } from '@atlaskit/editor-tables/utils';
4
- import { TABLE_ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
5
5
  import { getSelectedTableInfo } from '../utils';
6
6
  export var replaceSelectedTable = function replaceSelectedTable(state, content, inputMethod, editorAnalyticsAPI) {
7
7
  if (isTableSelected(state.selection)) {
@@ -2,6 +2,7 @@ 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
4
  import { TableMap } from '@atlaskit/editor-tables/table-map';
5
+
5
6
  /**
6
7
  * Helper to split all the cells in a range of columns
7
8
  * @param tr
@@ -1,9 +1,9 @@
1
1
  import React, { useEffect, useRef } from 'react';
2
- import { createPortal } from 'react-dom';
3
2
  import rafSchedule from 'raf-schd';
3
+ import { createPortal } from 'react-dom';
4
4
  import { akEditorFloatingPanelZIndex } from '@atlaskit/editor-shared-styles';
5
- import { insertColumnButtonOffset } from '../common-styles';
6
5
  import { TableCssClassName as ClassName } from '../../types';
6
+ import { insertColumnButtonOffset } from '../common-styles';
7
7
  export var BUTTON_WIDTH = 20;
8
8
  export var calcLeftPos = function calcLeftPos(_ref) {
9
9
  var buttonWidth = _ref.buttonWidth,
@@ -3,17 +3,17 @@ import React from 'react';
3
3
  import { jsx } from '@emotion/react';
4
4
  import { findDomRefAtPos } from 'prosemirror-utils';
5
5
  import { injectIntl } from 'react-intl-next';
6
+ import { ACTION_SUBJECT } from '@atlaskit/editor-common/analytics';
7
+ import { ErrorBoundary } from '@atlaskit/editor-common/error-boundary';
6
8
  import { Popup } from '@atlaskit/editor-common/ui';
9
+ import { ToolbarButton } from '@atlaskit/editor-common/ui-menu';
7
10
  import { akEditorSmallZIndex } from '@atlaskit/editor-shared-styles';
8
11
  import ExpandIcon from '@atlaskit/icon/glyph/chevron-down';
9
- import { ToolbarButton } from '@atlaskit/editor-common/ui-menu';
10
12
  import { toggleContextualMenu } from '../../commands';
11
13
  import { TableCssClassName as ClassName } from '../../types';
12
14
  import messages from '../../ui/messages';
13
15
  import FixedButton from './FixedButton';
14
- import { ACTION_SUBJECT } from '@atlaskit/editor-common/analytics';
15
- import { tableFloatingCellButtonStyles, tableFloatingCellButtonSelectedStyles } from './styles';
16
- import { ErrorBoundary } from '@atlaskit/editor-common/error-boundary';
16
+ import { tableFloatingCellButtonSelectedStyles, tableFloatingCellButtonStyles } from './styles';
17
17
  var BUTTON_OFFSET = 3;
18
18
  var FloatingContextualButtonInner = /*#__PURE__*/React.memo(function (props) {
19
19
  var editorView = props.editorView,
@@ -2,9 +2,9 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
2
2
  var _templateObject, _templateObject2;
3
3
  import { css } from '@emotion/react';
4
4
  import { B75, DN0, DN60, N0, N20, N30A, N700 } from '@atlaskit/theme/colors';
5
+ import { themed } from '@atlaskit/theme/components';
5
6
  import { borderRadius } from '@atlaskit/theme/constants';
6
7
  import { contextualMenuTriggerSize } from '../consts';
7
- import { themed } from '@atlaskit/theme/components';
8
8
  export var tableFloatingCellButtonStyles = function tableFloatingCellButtonStyles(props) {
9
9
  return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n > div {\n // Sits behind button to provide surface-color background\n background: ", ";\n border-radius: ", "px;\n display: flex;\n height: ", "px;\n flex-direction: column;\n }\n && button {\n background: ", ";\n flex-direction: column;\n margin: 2px;\n outline: 2px solid ", ";\n border-radius: 1px;\n padding: 0;\n height: calc(100% - 4px);\n display: flex;\n }\n && button:hover {\n background: ", ";\n }\n && button:active {\n background: ", ";\n }\n && button > span {\n margin: 0px -4px;\n }\n && span {\n pointer-events: none;\n }\n"])), "var(--ds-surface, ".concat(N20, ")"), borderRadius(), contextualMenuTriggerSize + 2, themed({
10
10
  light: "var(--ds-background-neutral, none)",
@@ -12,27 +12,27 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
12
12
  /** @jsx jsx */
13
13
  import { Component } from 'react';
14
14
  import { jsx } from '@emotion/react';
15
- import { hexToEditorBackgroundPaletteColor } from '@atlaskit/editor-palette';
16
- import { splitCell } from '@atlaskit/editor-tables/utils';
17
15
  import { defineMessages, injectIntl } from 'react-intl-next';
16
+ import { TableSortOrder as SortOrder } from '@atlaskit/adf-schema/steps';
17
+ import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
18
18
  import { addColumnAfter, addRowAfter, backspace, tooltip } from '@atlaskit/editor-common/keymaps';
19
- import { ColorPalette, backgroundPaletteTooltipMessages, cellBackgroundColorPalette } from '@atlaskit/editor-common/ui-color';
20
19
  import { DropdownMenuSharedCssClassName } from '@atlaskit/editor-common/styles';
20
+ import { backgroundPaletteTooltipMessages, cellBackgroundColorPalette, ColorPalette } from '@atlaskit/editor-common/ui-color';
21
21
  import { ArrowKeyNavigationType, DropdownMenu } from '@atlaskit/editor-common/ui-menu';
22
- import { shortcutStyle } from '@atlaskit/editor-shared-styles/shortcut';
23
- import { cellColourPreviewStyles } from './styles';
24
22
  import { closestElement } from '@atlaskit/editor-common/utils';
25
- import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
23
+ import { hexToEditorBackgroundPaletteColor } from '@atlaskit/editor-palette';
24
+ import { shortcutStyle } from '@atlaskit/editor-shared-styles/shortcut';
25
+ import { splitCell } from '@atlaskit/editor-tables/utils';
26
26
  import { clearHoverSelection, hoverColumns, hoverMergedCells, hoverRows, toggleContextualMenu } from '../../commands';
27
- import { deleteColumnsWithAnalytics, deleteRowsWithAnalytics, emptyMultipleCellsWithAnalytics, insertColumnWithAnalytics, insertRowWithAnalytics, mergeCellsWithAnalytics, setColorWithAnalytics, sortColumnWithAnalytics, splitCellWithAnalytics, distributeColumnsWidthsWithAnalytics } from '../../commands-with-analytics';
27
+ import { deleteColumnsWithAnalytics, deleteRowsWithAnalytics, distributeColumnsWidthsWithAnalytics, emptyMultipleCellsWithAnalytics, insertColumnWithAnalytics, insertRowWithAnalytics, mergeCellsWithAnalytics, setColorWithAnalytics, sortColumnWithAnalytics, splitCellWithAnalytics } from '../../commands-with-analytics';
28
28
  import { getPluginState } from '../../pm-plugins/plugin-factory';
29
+ import { getNewResizeStateFromSelectedColumns } from '../../pm-plugins/table-resizing/utils/resize-state';
29
30
  import { canMergeCells } from '../../transforms';
30
31
  import { TableCssClassName as ClassName } from '../../types';
31
- import { TableSortOrder as SortOrder } from '@atlaskit/adf-schema/steps';
32
32
  import { getMergedCellsPositions, getSelectedColumnIndexes, getSelectedRowIndexes } from '../../utils';
33
- import tableMessages from '../messages';
34
33
  import { contextualMenuDropdownWidth } from '../consts';
35
- import { getNewResizeStateFromSelectedColumns } from '../../pm-plugins/table-resizing/utils/resize-state';
34
+ import tableMessages from '../messages';
35
+ import { cellColourPreviewStyles } from './styles';
36
36
  export var messages = defineMessages({
37
37
  cellBackground: {
38
38
  id: 'fabric.editor.cellBackground',
@@ -1,14 +1,14 @@
1
1
  /** @jsx jsx */
2
2
  import { jsx } from '@emotion/react';
3
3
  import { findDomRefAtPos } from 'prosemirror-utils';
4
- import { findCellRectClosestToPos, getSelectionRect, isSelectionType } from '@atlaskit/editor-tables/utils';
5
4
  import { Popup } from '@atlaskit/editor-common/ui';
6
5
  import { akEditorFloatingOverlapPanelZIndex } from '@atlaskit/editor-shared-styles';
6
+ import { findCellRectClosestToPos, getSelectionRect, isSelectionType } from '@atlaskit/editor-tables/utils';
7
7
  import { getPluginState } from '../../pm-plugins/plugin-factory';
8
8
  import { pluginKey } from '../../pm-plugins/plugin-key';
9
9
  import { contextualMenuDropdownWidth, contextualMenuTriggerSize } from '../consts';
10
- import { tablePopupStyles } from './styles';
11
10
  import ContextualMenu from './ContextualMenu';
11
+ import { tablePopupStyles } from './styles';
12
12
 
13
13
  // offset of the contextual menu dropdown
14
14
  var calculateOffset = function calculateOffset(targetCellRef, state) {
@@ -3,10 +3,13 @@ var _templateObject, _templateObject2;
3
3
  import { css } from '@emotion/react';
4
4
  import { tableBackgroundBorderColor } from '@atlaskit/adf-schema';
5
5
  import { N60A, N90 } from '@atlaskit/theme/colors';
6
- import { contextualMenuDropdownWidth } from '../consts';
7
- import { TableCssClassName as ClassName } from '../../types';
8
6
  import { borderRadius } from '@atlaskit/theme/constants';
7
+ import { TableCssClassName as ClassName } from '../../types';
8
+ import { contextualMenuDropdownWidth } from '../consts';
9
9
  export var cellColourPreviewStyles = function cellColourPreviewStyles(selectedColor) {
10
10
  return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n &::before {\n background: ", ";\n }\n"])), selectedColor);
11
11
  };
12
- export var tablePopupStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .", " {\n border-radius: ", "px;\n background: ", ";\n box-shadow: ", ";\n display: block;\n position: absolute;\n top: 0;\n left: ", "px;\n padding: 8px;\n\n > div {\n padding: 0;\n }\n }\n\n .", " {\n display: flex;\n\n &::before {\n content: '';\n display: block;\n border: 1px solid ", ";\n border-radius: ", "px;\n width: 20px;\n height: 20px;\n }\n\n &::after {\n content: '\u203A';\n margin-left: 4px;\n line-height: 20px;\n color: ", ";\n }\n }\n"])), ClassName.CONTEXTUAL_SUBMENU, borderRadius(), "var(--ds-surface-overlay, white)", "var(--ds-shadow-overlay, ".concat("0 4px 8px -2px ".concat(N60A, ", 0 0 1px ").concat(N60A), ")"), contextualMenuDropdownWidth, ClassName.CONTEXTUAL_MENU_ICON, tableBackgroundBorderColor, borderRadius(), "var(--ds-icon, ".concat(N90, ")"));
12
+
13
+ // TODO Delete this comment after verifying space token -> previous value `padding: 8px`
14
+ // TODO Delete this comment after verifying space token -> previous value `margin-left: 4px`
15
+ export var tablePopupStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .", " {\n border-radius: ", "px;\n background: ", ";\n box-shadow: ", ";\n display: block;\n position: absolute;\n top: 0;\n left: ", "px;\n padding: ", ";\n\n > div {\n padding: 0;\n }\n }\n\n .", " {\n display: flex;\n\n &::before {\n content: '';\n display: block;\n border: 1px solid ", ";\n border-radius: ", "px;\n width: 20px;\n height: 20px;\n }\n\n &::after {\n content: '\u203A';\n margin-left: ", ";\n line-height: 20px;\n color: ", ";\n }\n }\n"])), ClassName.CONTEXTUAL_SUBMENU, borderRadius(), "var(--ds-surface-overlay, white)", "var(--ds-shadow-overlay, ".concat("0 4px 8px -2px ".concat(N60A, ", 0 0 1px ").concat(N60A), ")"), contextualMenuDropdownWidth, "var(--ds-space-100, 8px)", ClassName.CONTEXTUAL_MENU_ICON, tableBackgroundBorderColor, borderRadius(), "var(--ds-space-050, 4px)", "var(--ds-icon, ".concat(N90, ")"));
@@ -11,20 +11,20 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
11
11
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
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, { Component } from 'react';
14
- import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
15
- import { getSelectionRect, isTableSelected } from '@atlaskit/editor-tables/utils';
16
14
  import { createPortal } from 'react-dom';
15
+ import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
17
16
  import { Popup } from '@atlaskit/editor-common/ui';
18
- import { akEditorTableNumberColumnWidth } from '@atlaskit/editor-shared-styles';
19
17
  import { closestElement } from '@atlaskit/editor-common/utils';
20
- import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
18
+ import { akEditorTableNumberColumnWidth } from '@atlaskit/editor-shared-styles';
19
+ import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
20
+ import { getSelectionRect, isTableSelected } from '@atlaskit/editor-tables/utils';
21
21
  import { clearHoverSelection, hoverColumns, hoverRows } from '../../commands';
22
22
  import { deleteColumnsWithAnalytics, deleteRowsWithAnalytics } from '../../commands-with-analytics';
23
23
  import { getPluginState as getTablePluginState } from '../../pm-plugins/plugin-factory';
24
24
  import { TableCssClassName as ClassName } from '../../types';
25
25
  import { getColumnDeleteButtonParams, getColumnsWidths, getRowDeleteButtonParams, getRowHeights } from '../../utils';
26
- import tableMessages from '../messages';
27
26
  import { stickyRowZIndex } from '../consts';
27
+ import tableMessages from '../messages';
28
28
  import DeleteButton from './DeleteButton';
29
29
  import getPopupOptions from './getPopUpOptions';
30
30
  export function getSelectionType(selection) {
@@ -1,13 +1,13 @@
1
1
  import React from 'react';
2
2
  import { injectIntl } from 'react-intl-next';
3
+ import * as keymaps from '@atlaskit/editor-common/keymaps';
3
4
  import { tableMarginTop } from '@atlaskit/editor-common/styles';
5
+ import { closestElement } from '@atlaskit/editor-common/utils';
4
6
  import { akEditorTableNumberColumnWidth } from '@atlaskit/editor-shared-styles';
5
7
  import Tooltip from '@atlaskit/tooltip';
6
- import * as keymaps from '@atlaskit/editor-common/keymaps';
7
- import { closestElement } from '@atlaskit/editor-common/utils';
8
8
  import { TableCssClassName as ClassName } from '../../types';
9
- import tableMessages from '../messages';
10
9
  import { tableToolbarSize } from '../consts';
10
+ import tableMessages from '../messages';
11
11
  var getInsertLineHeight = function getInsertLineHeight(tableRef, hasStickyHeaders) {
12
12
  // The line gets height 100% from the table,
13
13
  // but since we have an overflow on the left,
@@ -9,20 +9,19 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
9
9
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
10
10
  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; } }
11
11
  import React from 'react';
12
- import { TableMap } from '@atlaskit/editor-tables/table-map';
13
- import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
14
12
  import { findDomRefAtPos } from 'prosemirror-utils';
15
- import { findTable } from '@atlaskit/editor-tables/utils';
16
13
  import { injectIntl } from 'react-intl-next';
14
+ import { ACTION, ACTION_SUBJECT, CONTENT_COMPONENT, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
17
15
  import { Popup } from '@atlaskit/editor-common/ui';
18
16
  import { closestElement } from '@atlaskit/editor-common/utils';
19
- import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
17
+ import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
18
+ import { TableMap } from '@atlaskit/editor-tables/table-map';
19
+ import { findTable } from '@atlaskit/editor-tables/utils';
20
20
  import { insertColumnWithAnalytics, insertRowWithAnalytics } from '../../commands-with-analytics';
21
21
  import { TableCssClassName as ClassName } from '../../types';
22
22
  import { checkIfNumberColumnEnabled } from '../../utils';
23
23
  import getPopupOptions from './getPopupOptions';
24
24
  import InsertButton from './InsertButton';
25
- import { ACTION, ACTION_SUBJECT, EVENT_TYPE, CONTENT_COMPONENT } from '@atlaskit/editor-common/analytics';
26
25
  export var FloatingInsertButton = /*#__PURE__*/function (_React$Component) {
27
26
  _inherits(FloatingInsertButton, _React$Component);
28
27
  var _super = _createSuper(FloatingInsertButton);
@@ -11,15 +11,15 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
11
11
  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; }
12
12
  import React, { createRef } from 'react';
13
13
  import classnames from 'classnames';
14
+ import { findDomRefAtPos } from 'prosemirror-utils';
14
15
  import { injectIntl } from 'react-intl-next';
16
+ import commonMessages from '@atlaskit/editor-common/messages';
15
17
  import { Popup } from '@atlaskit/editor-common/ui';
18
+ import { ToolbarButton } from '@atlaskit/editor-common/ui-menu';
16
19
  import CollapseIcon from '@atlaskit/icon/glyph/editor/collapse';
17
20
  import ExpandIcon from '@atlaskit/icon/glyph/editor/expand';
18
- import commonMessages from '@atlaskit/editor-common/messages';
19
- import { ToolbarButton } from '@atlaskit/editor-common/ui-menu';
20
21
  import { toggleTableLayoutWithAnalytics } from '../../commands-with-analytics';
21
22
  import { TableCssClassName as ClassName } from '../../types';
22
- import { findDomRefAtPos } from 'prosemirror-utils';
23
23
  var addPopupOffset = function addPopupOffset(pos) {
24
24
  return _objectSpread(_objectSpread({}, pos), {}, {
25
25
  // add 12 pixels to align y position with
@@ -8,8 +8,8 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
8
8
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
9
9
  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; } }
10
10
  import React, { Component } from 'react';
11
- import { defineMessages, injectIntl } from 'react-intl-next';
12
11
  import classnames from 'classnames';
12
+ import { defineMessages, injectIntl } from 'react-intl-next';
13
13
  import { TableMap } from '@atlaskit/editor-tables/table-map';
14
14
  import { findTable, isTableSelected, selectTable } from '@atlaskit/editor-tables/utils';
15
15
  import { clearHoverSelection, hoverTable } from '../../../commands';
@@ -2,13 +2,13 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
2
2
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
3
3
  import { css } from '@emotion/react';
4
4
  import { tableMarginTop, tableSharedStyle } from '@atlaskit/editor-common/styles';
5
- import { fontSize } from '@atlaskit/theme/constants';
6
- import { N40A, B300, N300, N20A, N0, R500 } from '@atlaskit/theme/colors';
7
- import { SelectionStyle, getSelectionStyles, akEditorSmallZIndex, akEditorTableNumberColumnWidth, akEditorStickyHeaderZIndex, akEditorTableToolbarSize, akEditorUnitZIndex, akEditorSelectedNodeClassName, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
5
+ import { akEditorSelectedNodeClassName, akEditorSmallZIndex, akEditorStickyHeaderZIndex, akEditorTableNumberColumnWidth, akEditorTableToolbarSize, akEditorUnitZIndex, getSelectionStyles, relativeFontSizeToBase16, SelectionStyle } from '@atlaskit/editor-shared-styles';
8
6
  import { scrollbarStyles } from '@atlaskit/editor-shared-styles/scrollbar';
7
+ import { B300, N0, N20A, N300, N40A, R500 } from '@atlaskit/theme/colors';
8
+ import { fontSize } from '@atlaskit/theme/constants';
9
9
  import { TableCssClassName as ClassName } from '../types';
10
- import { tableCellBackgroundColor, tableHeaderCellBackgroundColor, tableBorderColor, tableCellSelectedColor, tableToolbarSelectedColor, tableBorderSelectedColor, tableCellDeleteColor, tableBorderDeleteColor, tableToolbarDeleteColor, tableBorderRadiusSize, tablePadding, tableScrollbarOffset, resizeHandlerAreaWidth, resizeLineWidth, tableToolbarSize, tableInsertColumnButtonSize, tableControlsSpacing, tableTextColor, stickyRowZIndex, columnControlsDecorationHeight, stickyRowOffsetTop, stickyHeaderBorderBottomWidth } from './consts';
11
- import { HeaderButton, HeaderButtonHover, HeaderButtonDanger, insertColumnButtonWrapper, insertRowButtonWrapper, columnControlsLineMarker, DeleteButton, OverflowShadow, columnControlsDecoration, hoveredDeleteButton, hoveredCell, hoveredWarningCell, resizeHandle, InsertMarker } from './ui-styles';
10
+ import { columnControlsDecorationHeight, resizeHandlerAreaWidth, resizeLineWidth, stickyHeaderBorderBottomWidth, stickyRowOffsetTop, stickyRowZIndex, tableBorderColor, tableBorderDeleteColor, tableBorderRadiusSize, tableBorderSelectedColor, tableCellBackgroundColor, tableCellDeleteColor, tableCellSelectedColor, tableControlsSpacing, tableHeaderCellBackgroundColor, tableInsertColumnButtonSize, tablePadding, tableScrollbarOffset, tableTextColor, tableToolbarDeleteColor, tableToolbarSelectedColor, tableToolbarSize } from './consts';
11
+ import { columnControlsDecoration, columnControlsLineMarker, DeleteButton, HeaderButton, HeaderButtonDanger, HeaderButtonHover, hoveredCell, hoveredDeleteButton, hoveredWarningCell, insertColumnButtonWrapper, InsertMarker, insertRowButtonWrapper, OverflowShadow, resizeHandle } from './ui-styles';
12
12
  var cornerControlHeight = tableToolbarSize + 1;
13
13
 
14
14
  /*
@@ -1,8 +1,8 @@
1
- import { B200, B300, N20, R400, R75, DN400, N200, DN30, N0 } from '@atlaskit/theme/colors';
2
1
  import { tableCellBorderWidth, tableMarginTop } from '@atlaskit/editor-common/styles';
3
2
  import { akEditorTableBorder, akEditorTableBorderDark, akEditorTableToolbar, akEditorTableToolbarDark, akEditorTableToolbarSize, akEditorUnitZIndex, akRichMediaResizeZIndex } from '@atlaskit/editor-shared-styles';
4
- import { RESIZE_HANDLE_AREA_DECORATION_GAP } from '../types';
3
+ import { B200, B300, DN30, DN400, N0, N20, N200, R400, R75 } from '@atlaskit/theme/colors';
5
4
  import { themed } from '@atlaskit/theme/components';
5
+ import { RESIZE_HANDLE_AREA_DECORATION_GAP } from '../types';
6
6
 
7
7
  /**
8
8
  * Basic colors added to prevent content overflow in table cells.
@@ -3,10 +3,10 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _temp
3
3
  import { css } from '@emotion/react';
4
4
  import { tableCellBorderWidth, tableMarginTop, tableMarginTopWithControl } from '@atlaskit/editor-common/styles';
5
5
  import { akEditorShadowZIndex, akEditorTableNumberColumnWidth, akEditorUnitZIndex } from '@atlaskit/editor-shared-styles';
6
- import { N40A, B300, N300, R300, N20A, N60A, N0, Y50, Y200 } from '@atlaskit/theme/colors';
7
- import { tableBorderColor, tableToolbarSelectedColor, tableHeaderCellBackgroundColor, tableBorderSelectedColor, tableCellDeleteColor, tableBorderDeleteColor, tableToolbarDeleteColor, lineMarkerSize, columnControlsDecorationHeight, columnControlsZIndex, columnControlsSelectedZIndex, resizeHandlerAreaWidth, resizeLineWidth, resizeHandlerZIndex, tableToolbarSize, tableInsertColumnButtonSize, tableDeleteButtonSize } from './consts';
8
- import { TableCssClassName as ClassName } from '../types';
6
+ import { B300, N0, N20A, N300, N40A, N60A, R300, Y200, Y50 } from '@atlaskit/theme/colors';
9
7
  import { borderRadius } from '@atlaskit/theme/constants';
8
+ import { TableCssClassName as ClassName } from '../types';
9
+ import { columnControlsDecorationHeight, columnControlsSelectedZIndex, columnControlsZIndex, lineMarkerSize, resizeHandlerAreaWidth, resizeHandlerZIndex, resizeLineWidth, tableBorderColor, tableBorderDeleteColor, tableBorderSelectedColor, tableCellDeleteColor, tableDeleteButtonSize, tableHeaderCellBackgroundColor, tableInsertColumnButtonSize, tableToolbarDeleteColor, tableToolbarSelectedColor, tableToolbarSize } from './consts';
10
10
  var InsertLine = function InsertLine(cssString) {
11
11
  return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", " {\n background: ", ";\n display: none;\n position: absolute;\n z-index: ", ";\n ", "\n }\n"])), ClassName.CONTROLS_INSERT_LINE, tableBorderSelectedColor, akEditorUnitZIndex, cssString);
12
12
  };
@@ -1,9 +1,9 @@
1
1
  import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
2
- import { TableMap } from '@atlaskit/editor-tables/table-map';
3
- import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
4
2
  import { findDomRefAtPos } from 'prosemirror-utils';
5
- import { findTable, getCellsInColumn, getSelectionRect, isColumnSelected, isTableSelected } from '@atlaskit/editor-tables/utils';
6
3
  import { maphElem } from '@atlaskit/editor-common/utils';
4
+ import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
5
+ import { TableMap } from '@atlaskit/editor-tables/table-map';
6
+ import { findTable, getCellsInColumn, getSelectionRect, isColumnSelected, isTableSelected } from '@atlaskit/editor-tables/utils';
7
7
  import { TableCssClassName as ClassName } from '../types';
8
8
  import { tableDeleteButtonSize } from '../ui/consts';
9
9
  export var getColumnsWidths = function getColumnsWidths(view) {
@@ -1,10 +1,10 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
2
  // @ts-ignore -- ReadonlyTransaction is a local declaration and will cause a TS2305 error in CCFE typecheck
3
3
 
4
- import { Rect, TableMap } from '@atlaskit/editor-tables/table-map';
5
- import { findTable, getCellsInRow, getSelectionRect } from '@atlaskit/editor-tables/utils';
6
4
  import { Decoration } from 'prosemirror-view';
7
5
  import { nonNullable } from '@atlaskit/editor-common/utils';
6
+ import { Rect, TableMap } from '@atlaskit/editor-tables/table-map';
7
+ import { findTable, getCellsInRow, getSelectionRect } from '@atlaskit/editor-tables/utils';
8
8
  import { TableCssClassName as ClassName, TableDecorations } from '../types';
9
9
  var filterDecorationByKey = function filterDecorationByKey(key, decorationSet) {
10
10
  return decorationSet.find(undefined, undefined, function (spec) {
@@ -1,4 +1,4 @@
1
1
  import { createFixedGuidelinesFromLengths } from '@atlaskit/editor-common/guideline';
2
- import { akEditorDefaultLayoutWidth, akEditorWideLayoutWidth, akEditorFullWidthLayoutWidth } from '@atlaskit/editor-shared-styles';
2
+ import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorWideLayoutWidth } from '@atlaskit/editor-shared-styles';
3
3
  export var defaultGuidelineWidths = [akEditorDefaultLayoutWidth, akEditorWideLayoutWidth, akEditorFullWidthLayoutWidth];
4
4
  export var defaultGuidelines = createFixedGuidelinesFromLengths(defaultGuidelineWidths);
@@ -1,6 +1,6 @@
1
1
  import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
2
- import { TableMap } from '@atlaskit/editor-tables/table-map';
3
2
  import { hasParentNodeOfType } from 'prosemirror-utils';
3
+ import { TableMap } from '@atlaskit/editor-tables/table-map';
4
4
  import { findTable } from '@atlaskit/editor-tables/utils';
5
5
  import { pluginKey } from '../pm-plugins/plugin-key';
6
6
  export var isIsolating = function isIsolating(node) {
@@ -1,11 +1,11 @@
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 { TableMap } from '@atlaskit/editor-tables/table-map';
5
- import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
6
4
  import { safeInsert } from 'prosemirror-utils';
7
- import { findTable, getSelectionRect, isRowSelected, isTableSelected } from '@atlaskit/editor-tables/utils';
8
5
  import { parsePx } from '@atlaskit/editor-common/utils';
6
+ import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
7
+ import { TableMap } from '@atlaskit/editor-tables/table-map';
8
+ import { findTable, getSelectionRect, isRowSelected, isTableSelected } from '@atlaskit/editor-tables/utils';
9
9
  import { TableCssClassName as ClassName } from '../types';
10
10
  import { tableDeleteButtonSize } from '../ui/consts';
11
11
  export var getRowHeights = function getRowHeights(tableRef) {
@@ -1,5 +1,5 @@
1
- import { TableMap } from '@atlaskit/editor-tables/table-map';
2
1
  import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
2
+ import { TableMap } from '@atlaskit/editor-tables/table-map';
3
3
  import { findTable, getSelectionRangeInColumn, getSelectionRangeInRow, getSelectionRect, isSelectionType } from '@atlaskit/editor-tables/utils';
4
4
  export var isSelectionUpdated = function isSelectionUpdated(oldSelection, newSelection) {
5
5
  return !!(!newSelection && oldSelection) || isSelectionType(oldSelection, 'cell') !== isSelectionType(newSelection, 'cell') || isSelectionType(oldSelection, 'cell') && isSelectionType(newSelection, 'cell') && oldSelection.ranges !== newSelection.ranges;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "2.3.0",
3
+ "version": "2.4.0",
4
4
  "sideEffects": false
5
5
  }
@@ -1,4 +1,4 @@
1
- import { Direction } from '@atlaskit/editor-tables/types';
2
- import { Command } from '@atlaskit/editor-common/types';
3
1
  import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
2
+ import { Command } from '@atlaskit/editor-common/types';
3
+ import { Direction } from '@atlaskit/editor-tables/types';
4
4
  export declare const goToNextCell: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (direction: Direction) => Command;
@@ -1,6 +1,6 @@
1
1
  import { Transaction } from 'prosemirror-state';
2
- import { Command } from '@atlaskit/editor-common/types';
3
2
  import { EditorView } from 'prosemirror-view';
3
+ import { Command } from '@atlaskit/editor-common/types';
4
4
  import type { GetEditorContainerWidth } from '@atlaskit/editor-common/types';
5
5
  export declare function addColumnAt(getEditorContainerWidth: GetEditorContainerWidth): (column: number, allowAddColumnCustomStep: boolean | undefined, view: EditorView | undefined) => (tr: Transaction) => Transaction;
6
6
  export declare const addColumnBefore: (getEditorContainerWidth: GetEditorContainerWidth) => Command;
@@ -1,5 +1,5 @@
1
- import type { Command } from '@atlaskit/editor-common/types';
2
1
  import { EditorSelectionAPI } from '@atlaskit/editor-common/selection';
2
+ import type { Command } from '@atlaskit/editor-common/types';
3
3
  export declare enum TableSelectionDirection {
4
4
  TopToBottom = "TopToBottom",
5
5
  BottomToTop = "BottomToTop"
@@ -1,3 +1,3 @@
1
- import { Command } from '@atlaskit/editor-common/types';
2
1
  import { TableSortOrder as SortOrder } from '@atlaskit/adf-schema/steps';
2
+ import { Command } from '@atlaskit/editor-common/types';
3
3
  export declare const sortByColumn: (columnIndex: number, order?: SortOrder) => Command;