@atlaskit/editor-plugin-table 2.6.4 → 2.6.6

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 (347) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/cjs/plugins/table/commands/clear.js +3 -3
  3. package/dist/cjs/plugins/table/commands/go-to-next-cell.js +5 -5
  4. package/dist/cjs/plugins/table/commands/insert.js +19 -19
  5. package/dist/cjs/plugins/table/commands/misc.js +4 -4
  6. package/dist/cjs/plugins/table/commands/selection.js +5 -5
  7. package/dist/cjs/plugins/table/commands/sort.js +2 -2
  8. package/dist/cjs/plugins/table/event-handlers.js +4 -4
  9. package/dist/cjs/plugins/table/handlers.js +5 -5
  10. package/dist/cjs/plugins/table/nodeviews/TableContainer.js +2 -2
  11. package/dist/cjs/plugins/table/nodeviews/table.js +2 -2
  12. package/dist/cjs/plugins/table/nodeviews/tableCell.js +2 -2
  13. package/dist/cjs/plugins/table/pm-plugins/decorations/plugin.js +5 -5
  14. package/dist/cjs/plugins/table/pm-plugins/keymap.js +10 -10
  15. package/dist/cjs/plugins/table/pm-plugins/main.js +12 -12
  16. package/dist/cjs/plugins/table/pm-plugins/plugin-key.js +2 -2
  17. package/dist/cjs/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.js +7 -7
  18. package/dist/cjs/plugins/table/pm-plugins/sticky-headers/plugin-key.js +2 -2
  19. package/dist/cjs/plugins/table/pm-plugins/table-local-id.js +2 -2
  20. package/dist/cjs/plugins/table/pm-plugins/table-resizing/plugin-key.js +2 -2
  21. package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/colgroup.js +2 -2
  22. package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/column-state.js +2 -2
  23. package/dist/cjs/plugins/table/pm-plugins/table-selection-keymap.js +2 -2
  24. package/dist/cjs/plugins/table/pm-plugins/table-width.js +4 -4
  25. package/dist/cjs/plugins/table/toolbar.js +12 -12
  26. package/dist/cjs/plugins/table/transforms/delete-columns.js +4 -4
  27. package/dist/cjs/plugins/table/transforms/delete-rows.js +2 -2
  28. package/dist/cjs/plugins/table/transforms/merge.js +5 -5
  29. package/dist/cjs/plugins/table/transforms/replace-table.js +4 -4
  30. package/dist/cjs/plugins/table/ui/FloatingContextualButton/index.js +2 -2
  31. package/dist/cjs/plugins/table/ui/FloatingContextualMenu/index.js +4 -4
  32. package/dist/cjs/plugins/table/ui/FloatingInsertButton/index.js +6 -6
  33. package/dist/cjs/plugins/table/ui/LayoutButton/index.js +2 -2
  34. package/dist/cjs/plugins/table/ui/TableFloatingControls/NumberColumn/index.js +3 -3
  35. package/dist/cjs/plugins/table/utils/collapse.js +4 -4
  36. package/dist/cjs/plugins/table/utils/column-controls.js +8 -8
  37. package/dist/cjs/plugins/table/utils/decoration.js +8 -8
  38. package/dist/cjs/plugins/table/utils/nodes.js +6 -6
  39. package/dist/cjs/plugins/table/utils/paste.js +7 -7
  40. package/dist/cjs/plugins/table/utils/row-controls.js +7 -7
  41. package/dist/cjs/version.json +1 -1
  42. package/dist/es2019/plugins/table/commands/clear.js +2 -1
  43. package/dist/es2019/plugins/table/commands/go-to-next-cell.js +2 -1
  44. package/dist/es2019/plugins/table/commands/insert.js +2 -2
  45. package/dist/es2019/plugins/table/commands/misc.js +1 -1
  46. package/dist/es2019/plugins/table/commands/selection.js +1 -1
  47. package/dist/es2019/plugins/table/commands/sort.js +1 -1
  48. package/dist/es2019/plugins/table/event-handlers.js +1 -1
  49. package/dist/es2019/plugins/table/handlers.js +3 -3
  50. package/dist/es2019/plugins/table/nodeviews/TableContainer.js +2 -2
  51. package/dist/es2019/plugins/table/nodeviews/table.js +1 -1
  52. package/dist/es2019/plugins/table/nodeviews/tableCell.js +1 -1
  53. package/dist/es2019/plugins/table/pm-plugins/decorations/plugin.js +3 -3
  54. package/dist/es2019/plugins/table/pm-plugins/keymap.js +2 -2
  55. package/dist/es2019/plugins/table/pm-plugins/main.js +1 -1
  56. package/dist/es2019/plugins/table/pm-plugins/plugin-key.js +1 -1
  57. package/dist/es2019/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.js +2 -2
  58. package/dist/es2019/plugins/table/pm-plugins/sticky-headers/plugin-key.js +1 -1
  59. package/dist/es2019/plugins/table/pm-plugins/table-local-id.js +1 -2
  60. package/dist/es2019/plugins/table/pm-plugins/table-resizing/plugin-factory.js +0 -1
  61. package/dist/es2019/plugins/table/pm-plugins/table-resizing/plugin-key.js +1 -1
  62. package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/colgroup.js +1 -1
  63. package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/column-state.js +1 -1
  64. package/dist/es2019/plugins/table/pm-plugins/table-selection-keymap.js +1 -1
  65. package/dist/es2019/plugins/table/pm-plugins/table-width.js +3 -2
  66. package/dist/es2019/plugins/table/toolbar.js +1 -1
  67. package/dist/es2019/plugins/table/transforms/delete-columns.js +1 -1
  68. package/dist/es2019/plugins/table/transforms/delete-rows.js +1 -1
  69. package/dist/es2019/plugins/table/transforms/merge.js +2 -2
  70. package/dist/es2019/plugins/table/transforms/replace-table.js +2 -2
  71. package/dist/es2019/plugins/table/ui/FloatingContextualButton/index.js +1 -1
  72. package/dist/es2019/plugins/table/ui/FloatingContextualMenu/index.js +1 -1
  73. package/dist/es2019/plugins/table/ui/FloatingInsertButton/index.js +1 -1
  74. package/dist/es2019/plugins/table/ui/LayoutButton/index.js +1 -1
  75. package/dist/es2019/plugins/table/ui/TableFloatingControls/NumberColumn/index.js +1 -1
  76. package/dist/es2019/plugins/table/utils/collapse.js +2 -2
  77. package/dist/es2019/plugins/table/utils/column-controls.js +1 -1
  78. package/dist/es2019/plugins/table/utils/decoration.js +3 -2
  79. package/dist/es2019/plugins/table/utils/nodes.js +1 -1
  80. package/dist/es2019/plugins/table/utils/paste.js +2 -2
  81. package/dist/es2019/plugins/table/utils/row-controls.js +1 -1
  82. package/dist/es2019/version.json +1 -1
  83. package/dist/esm/plugins/table/commands/clear.js +2 -1
  84. package/dist/esm/plugins/table/commands/go-to-next-cell.js +2 -1
  85. package/dist/esm/plugins/table/commands/insert.js +2 -2
  86. package/dist/esm/plugins/table/commands/misc.js +1 -1
  87. package/dist/esm/plugins/table/commands/selection.js +1 -1
  88. package/dist/esm/plugins/table/commands/sort.js +1 -1
  89. package/dist/esm/plugins/table/event-handlers.js +1 -1
  90. package/dist/esm/plugins/table/handlers.js +3 -3
  91. package/dist/esm/plugins/table/nodeviews/TableContainer.js +2 -2
  92. package/dist/esm/plugins/table/nodeviews/table.js +1 -1
  93. package/dist/esm/plugins/table/nodeviews/tableCell.js +1 -1
  94. package/dist/esm/plugins/table/pm-plugins/decorations/plugin.js +3 -3
  95. package/dist/esm/plugins/table/pm-plugins/keymap.js +2 -2
  96. package/dist/esm/plugins/table/pm-plugins/main.js +1 -1
  97. package/dist/esm/plugins/table/pm-plugins/plugin-key.js +1 -1
  98. package/dist/esm/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.js +2 -2
  99. package/dist/esm/plugins/table/pm-plugins/sticky-headers/plugin-key.js +1 -1
  100. package/dist/esm/plugins/table/pm-plugins/table-local-id.js +1 -2
  101. package/dist/esm/plugins/table/pm-plugins/table-resizing/plugin-factory.js +0 -1
  102. package/dist/esm/plugins/table/pm-plugins/table-resizing/plugin-key.js +1 -1
  103. package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/colgroup.js +1 -1
  104. package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/column-state.js +1 -1
  105. package/dist/esm/plugins/table/pm-plugins/table-selection-keymap.js +1 -1
  106. package/dist/esm/plugins/table/pm-plugins/table-width.js +3 -2
  107. package/dist/esm/plugins/table/toolbar.js +1 -1
  108. package/dist/esm/plugins/table/transforms/delete-columns.js +1 -1
  109. package/dist/esm/plugins/table/transforms/delete-rows.js +1 -1
  110. package/dist/esm/plugins/table/transforms/merge.js +2 -2
  111. package/dist/esm/plugins/table/transforms/replace-table.js +2 -2
  112. package/dist/esm/plugins/table/ui/FloatingContextualButton/index.js +1 -1
  113. package/dist/esm/plugins/table/ui/FloatingContextualMenu/index.js +1 -1
  114. package/dist/esm/plugins/table/ui/FloatingInsertButton/index.js +1 -1
  115. package/dist/esm/plugins/table/ui/LayoutButton/index.js +1 -1
  116. package/dist/esm/plugins/table/ui/TableFloatingControls/NumberColumn/index.js +1 -1
  117. package/dist/esm/plugins/table/utils/collapse.js +2 -2
  118. package/dist/esm/plugins/table/utils/column-controls.js +1 -1
  119. package/dist/esm/plugins/table/utils/decoration.js +3 -2
  120. package/dist/esm/plugins/table/utils/nodes.js +1 -1
  121. package/dist/esm/plugins/table/utils/paste.js +2 -2
  122. package/dist/esm/plugins/table/utils/row-controls.js +1 -1
  123. package/dist/esm/version.json +1 -1
  124. package/dist/types/plugins/table/commands/insert.d.ts +2 -2
  125. package/dist/types/plugins/table/commands/misc.d.ts +4 -4
  126. package/dist/types/plugins/table/commands/referentiality.d.ts +1 -1
  127. package/dist/types/plugins/table/event-handlers.d.ts +2 -2
  128. package/dist/types/plugins/table/handlers.d.ts +1 -1
  129. package/dist/types/plugins/table/nodeviews/TableComponent.d.ts +2 -2
  130. package/dist/types/plugins/table/nodeviews/TableContainer.d.ts +2 -2
  131. package/dist/types/plugins/table/nodeviews/TableResizer.d.ts +3 -3
  132. package/dist/types/plugins/table/nodeviews/table.d.ts +2 -2
  133. package/dist/types/plugins/table/nodeviews/tableCell.d.ts +2 -2
  134. package/dist/types/plugins/table/nodeviews/types.d.ts +2 -2
  135. package/dist/types/plugins/table/pm-plugins/decorations/plugin.d.ts +2 -2
  136. package/dist/types/plugins/table/pm-plugins/decorations/utils/types.d.ts +2 -2
  137. package/dist/types/plugins/table/pm-plugins/plugin-key.d.ts +1 -1
  138. package/dist/types/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.d.ts +2 -2
  139. package/dist/types/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.d.ts +2 -2
  140. package/dist/types/plugins/table/pm-plugins/sticky-headers/plugin-key.d.ts +1 -1
  141. package/dist/types/plugins/table/pm-plugins/table-resizing/commands.d.ts +3 -3
  142. package/dist/types/plugins/table/pm-plugins/table-resizing/event-handlers.d.ts +1 -1
  143. package/dist/types/plugins/table/pm-plugins/table-resizing/plugin-key.d.ts +1 -1
  144. package/dist/types/plugins/table/pm-plugins/table-resizing/utils/colgroup.d.ts +1 -1
  145. package/dist/types/plugins/table/pm-plugins/table-resizing/utils/column-state.d.ts +1 -1
  146. package/dist/types/plugins/table/pm-plugins/table-resizing/utils/dom.d.ts +2 -2
  147. package/dist/types/plugins/table/pm-plugins/table-resizing/utils/misc.d.ts +3 -3
  148. package/dist/types/plugins/table/pm-plugins/table-resizing/utils/resize-state.d.ts +2 -2
  149. package/dist/types/plugins/table/pm-plugins/table-resizing/utils/scale-table.d.ts +3 -3
  150. package/dist/types/plugins/table/pm-plugins/table-resizing/utils/types.d.ts +1 -1
  151. package/dist/types/plugins/table/pm-plugins/table-width.d.ts +1 -1
  152. package/dist/types/plugins/table/toolbar.d.ts +2 -2
  153. package/dist/types/plugins/table/transforms/column-width.d.ts +4 -4
  154. package/dist/types/plugins/table/transforms/delete-columns.d.ts +1 -1
  155. package/dist/types/plugins/table/transforms/delete-rows.d.ts +1 -1
  156. package/dist/types/plugins/table/transforms/fix-tables.d.ts +3 -3
  157. package/dist/types/plugins/table/transforms/merge.d.ts +2 -2
  158. package/dist/types/plugins/table/transforms/replace-table.d.ts +2 -2
  159. package/dist/types/plugins/table/transforms/split.d.ts +1 -1
  160. package/dist/types/plugins/table/types.d.ts +3 -3
  161. package/dist/types/plugins/table/ui/FloatingContextualButton/index.d.ts +2 -2
  162. package/dist/types/plugins/table/ui/FloatingContextualMenu/ContextualMenu.d.ts +1 -1
  163. package/dist/types/plugins/table/ui/FloatingContextualMenu/index.d.ts +1 -1
  164. package/dist/types/plugins/table/ui/FloatingDeleteButton/index.d.ts +2 -2
  165. package/dist/types/plugins/table/ui/FloatingInsertButton/index.d.ts +2 -2
  166. package/dist/types/plugins/table/ui/LayoutButton/index.d.ts +1 -1
  167. package/dist/types/plugins/table/ui/TableFloatingControls/CornerControls/index.d.ts +1 -1
  168. package/dist/types/plugins/table/ui/TableFloatingControls/NumberColumn/index.d.ts +1 -1
  169. package/dist/types/plugins/table/ui/TableFloatingControls/RowControls/index.d.ts +1 -1
  170. package/dist/types/plugins/table/ui/TableFloatingControls/index.d.ts +2 -2
  171. package/dist/types/plugins/table/utils/analytics.d.ts +1 -1
  172. package/dist/types/plugins/table/utils/collapse.d.ts +2 -2
  173. package/dist/types/plugins/table/utils/column-controls.d.ts +2 -2
  174. package/dist/types/plugins/table/utils/decoration.d.ts +3 -3
  175. package/dist/types/plugins/table/utils/get-allow-add-column-custom-step.d.ts +1 -1
  176. package/dist/types/plugins/table/utils/nodes.d.ts +2 -2
  177. package/dist/types/plugins/table/utils/paste.d.ts +2 -2
  178. package/dist/types/plugins/table/utils/row-controls.d.ts +2 -2
  179. package/dist/types/plugins/table/utils/selection.d.ts +1 -1
  180. package/dist/types/plugins/table/utils/table.d.ts +1 -1
  181. package/dist/types/plugins/table/utils/update-plugin-state-decorations.d.ts +2 -2
  182. package/dist/types-ts4.5/plugins/table/commands/insert.d.ts +2 -2
  183. package/dist/types-ts4.5/plugins/table/commands/misc.d.ts +4 -4
  184. package/dist/types-ts4.5/plugins/table/commands/referentiality.d.ts +1 -1
  185. package/dist/types-ts4.5/plugins/table/event-handlers.d.ts +2 -2
  186. package/dist/types-ts4.5/plugins/table/handlers.d.ts +1 -1
  187. package/dist/types-ts4.5/plugins/table/nodeviews/TableComponent.d.ts +2 -2
  188. package/dist/types-ts4.5/plugins/table/nodeviews/TableContainer.d.ts +2 -2
  189. package/dist/types-ts4.5/plugins/table/nodeviews/TableResizer.d.ts +3 -3
  190. package/dist/types-ts4.5/plugins/table/nodeviews/table.d.ts +2 -2
  191. package/dist/types-ts4.5/plugins/table/nodeviews/tableCell.d.ts +2 -2
  192. package/dist/types-ts4.5/plugins/table/nodeviews/types.d.ts +2 -2
  193. package/dist/types-ts4.5/plugins/table/pm-plugins/decorations/plugin.d.ts +2 -2
  194. package/dist/types-ts4.5/plugins/table/pm-plugins/decorations/utils/types.d.ts +2 -2
  195. package/dist/types-ts4.5/plugins/table/pm-plugins/plugin-key.d.ts +1 -1
  196. package/dist/types-ts4.5/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.d.ts +2 -2
  197. package/dist/types-ts4.5/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.d.ts +2 -2
  198. package/dist/types-ts4.5/plugins/table/pm-plugins/sticky-headers/plugin-key.d.ts +1 -1
  199. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/commands.d.ts +3 -3
  200. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/event-handlers.d.ts +1 -1
  201. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/plugin-key.d.ts +1 -1
  202. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/colgroup.d.ts +1 -1
  203. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/column-state.d.ts +1 -1
  204. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/dom.d.ts +2 -2
  205. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/misc.d.ts +3 -3
  206. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/resize-state.d.ts +2 -2
  207. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/scale-table.d.ts +3 -3
  208. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/types.d.ts +1 -1
  209. package/dist/types-ts4.5/plugins/table/pm-plugins/table-width.d.ts +1 -1
  210. package/dist/types-ts4.5/plugins/table/toolbar.d.ts +2 -2
  211. package/dist/types-ts4.5/plugins/table/transforms/column-width.d.ts +4 -4
  212. package/dist/types-ts4.5/plugins/table/transforms/delete-columns.d.ts +1 -1
  213. package/dist/types-ts4.5/plugins/table/transforms/delete-rows.d.ts +1 -1
  214. package/dist/types-ts4.5/plugins/table/transforms/fix-tables.d.ts +3 -3
  215. package/dist/types-ts4.5/plugins/table/transforms/merge.d.ts +2 -2
  216. package/dist/types-ts4.5/plugins/table/transforms/replace-table.d.ts +2 -2
  217. package/dist/types-ts4.5/plugins/table/transforms/split.d.ts +1 -1
  218. package/dist/types-ts4.5/plugins/table/types.d.ts +3 -3
  219. package/dist/types-ts4.5/plugins/table/ui/FloatingContextualButton/index.d.ts +2 -2
  220. package/dist/types-ts4.5/plugins/table/ui/FloatingContextualMenu/ContextualMenu.d.ts +1 -1
  221. package/dist/types-ts4.5/plugins/table/ui/FloatingContextualMenu/index.d.ts +1 -1
  222. package/dist/types-ts4.5/plugins/table/ui/FloatingDeleteButton/index.d.ts +2 -2
  223. package/dist/types-ts4.5/plugins/table/ui/FloatingInsertButton/index.d.ts +2 -2
  224. package/dist/types-ts4.5/plugins/table/ui/LayoutButton/index.d.ts +1 -1
  225. package/dist/types-ts4.5/plugins/table/ui/TableFloatingControls/CornerControls/index.d.ts +1 -1
  226. package/dist/types-ts4.5/plugins/table/ui/TableFloatingControls/NumberColumn/index.d.ts +1 -1
  227. package/dist/types-ts4.5/plugins/table/ui/TableFloatingControls/RowControls/index.d.ts +1 -1
  228. package/dist/types-ts4.5/plugins/table/ui/TableFloatingControls/index.d.ts +2 -2
  229. package/dist/types-ts4.5/plugins/table/utils/analytics.d.ts +1 -1
  230. package/dist/types-ts4.5/plugins/table/utils/collapse.d.ts +2 -2
  231. package/dist/types-ts4.5/plugins/table/utils/column-controls.d.ts +2 -2
  232. package/dist/types-ts4.5/plugins/table/utils/decoration.d.ts +3 -3
  233. package/dist/types-ts4.5/plugins/table/utils/get-allow-add-column-custom-step.d.ts +1 -1
  234. package/dist/types-ts4.5/plugins/table/utils/nodes.d.ts +2 -2
  235. package/dist/types-ts4.5/plugins/table/utils/paste.d.ts +2 -2
  236. package/dist/types-ts4.5/plugins/table/utils/row-controls.d.ts +2 -2
  237. package/dist/types-ts4.5/plugins/table/utils/selection.d.ts +1 -1
  238. package/dist/types-ts4.5/plugins/table/utils/table.d.ts +1 -1
  239. package/dist/types-ts4.5/plugins/table/utils/update-plugin-state-decorations.d.ts +2 -2
  240. package/package.json +4 -11
  241. package/src/__tests__/integration/resize.ts +1 -2
  242. package/src/__tests__/unit/commands/go-to-next-cell.ts +1 -2
  243. package/src/__tests__/unit/commands/insert.ts +1 -2
  244. package/src/__tests__/unit/commands/misc.ts +1 -2
  245. package/src/__tests__/unit/commands.ts +4 -5
  246. package/src/__tests__/unit/copy-paste.ts +15 -8
  247. package/src/__tests__/unit/event-handlers/index.ts +1 -2
  248. package/src/__tests__/unit/event-handlers.ts +1 -2
  249. package/src/__tests__/unit/get-toolbar-config.ts +1 -2
  250. package/src/__tests__/unit/handlers.ts +1 -2
  251. package/src/__tests__/unit/hover-selection.ts +2 -3
  252. package/src/__tests__/unit/index.ts +1 -2
  253. package/src/__tests__/unit/layout.ts +1 -2
  254. package/src/__tests__/unit/nodeviews/TableComponent.tsx +1 -1
  255. package/src/__tests__/unit/nodeviews/table.ts +2 -3
  256. package/src/__tests__/unit/pm-plugins/decorations/column-controls.ts +1 -2
  257. package/src/__tests__/unit/pm-plugins/decorations/column-resizing.ts +3 -4
  258. package/src/__tests__/unit/pm-plugins/decorations/plugin.ts +2 -3
  259. package/src/__tests__/unit/pm-plugins/main.ts +8 -7
  260. package/src/__tests__/unit/pm-plugins/sticky-headers/tableRow.tsx +2 -2
  261. package/src/__tests__/unit/pm-plugins/table-local-id.ts +5 -2
  262. package/src/__tests__/unit/pm-plugins/table-resizing/event-handlers.ts +2 -3
  263. package/src/__tests__/unit/sort-column.ts +1 -2
  264. package/src/__tests__/unit/transforms/delete-columns.ts +1 -2
  265. package/src/__tests__/unit/transforms/delete-rows.ts +1 -2
  266. package/src/__tests__/unit/transforms/merging.ts +1 -2
  267. package/src/__tests__/unit/ui/ContextualMenu.tsx +1 -1
  268. package/src/__tests__/unit/ui/FloatingContextualButton.tsx +7 -5
  269. package/src/__tests__/unit/ui/FloatingContextualMenu.tsx +1 -1
  270. package/src/__tests__/unit/ui/FloatingDeleteButton.tsx +1 -1
  271. package/src/__tests__/unit/ui/FloatingInsertButton.tsx +7 -5
  272. package/src/__tests__/unit/ui/TableFloatingControls.tsx +1 -1
  273. package/src/__tests__/unit/undo-redo.ts +2 -2
  274. package/src/__tests__/unit/utils.ts +1 -2
  275. package/src/plugins/table/commands/clear.ts +1 -2
  276. package/src/plugins/table/commands/go-to-next-cell.ts +1 -1
  277. package/src/plugins/table/commands/insert.ts +3 -4
  278. package/src/plugins/table/commands/misc.ts +8 -5
  279. package/src/plugins/table/commands/referentiality.ts +1 -2
  280. package/src/plugins/table/commands/selection.ts +5 -3
  281. package/src/plugins/table/commands/sort.ts +6 -3
  282. package/src/plugins/table/commands/toggle.ts +1 -1
  283. package/src/plugins/table/commands-with-analytics.ts +1 -2
  284. package/src/plugins/table/event-handlers.ts +8 -9
  285. package/src/plugins/table/handlers.ts +10 -5
  286. package/src/plugins/table/index.tsx +2 -3
  287. package/src/plugins/table/nodeviews/TableComponent.tsx +2 -2
  288. package/src/plugins/table/nodeviews/TableContainer.tsx +3 -3
  289. package/src/plugins/table/nodeviews/TableResizer.tsx +3 -3
  290. package/src/plugins/table/nodeviews/table.tsx +7 -8
  291. package/src/plugins/table/nodeviews/tableCell.tsx +2 -2
  292. package/src/plugins/table/nodeviews/types.ts +2 -3
  293. package/src/plugins/table/pm-plugins/decorations/plugin.ts +3 -4
  294. package/src/plugins/table/pm-plugins/decorations/utils/column-controls.ts +5 -3
  295. package/src/plugins/table/pm-plugins/decorations/utils/column-resizing.ts +1 -1
  296. package/src/plugins/table/pm-plugins/decorations/utils/compose-decorations.ts +1 -1
  297. package/src/plugins/table/pm-plugins/decorations/utils/types.ts +5 -2
  298. package/src/plugins/table/pm-plugins/keymap.ts +2 -3
  299. package/src/plugins/table/pm-plugins/main.ts +11 -8
  300. package/src/plugins/table/pm-plugins/plugin-key.ts +1 -1
  301. package/src/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.ts +6 -3
  302. package/src/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.ts +2 -2
  303. package/src/plugins/table/pm-plugins/sticky-headers/plugin-key.ts +1 -1
  304. package/src/plugins/table/pm-plugins/table-local-id.ts +2 -2
  305. package/src/plugins/table/pm-plugins/table-resizing/commands.ts +3 -4
  306. package/src/plugins/table/pm-plugins/table-resizing/event-handlers.ts +1 -2
  307. package/src/plugins/table/pm-plugins/table-resizing/plugin-factory.ts +1 -2
  308. package/src/plugins/table/pm-plugins/table-resizing/plugin-key.ts +1 -1
  309. package/src/plugins/table/pm-plugins/table-resizing/utils/colgroup.ts +4 -2
  310. package/src/plugins/table/pm-plugins/table-resizing/utils/column-state.ts +2 -3
  311. package/src/plugins/table/pm-plugins/table-resizing/utils/dom.ts +2 -3
  312. package/src/plugins/table/pm-plugins/table-resizing/utils/misc.ts +7 -4
  313. package/src/plugins/table/pm-plugins/table-resizing/utils/resize-state.ts +2 -3
  314. package/src/plugins/table/pm-plugins/table-resizing/utils/scale-table.ts +3 -4
  315. package/src/plugins/table/pm-plugins/table-resizing/utils/types.ts +1 -1
  316. package/src/plugins/table/pm-plugins/table-selection-keymap.ts +1 -2
  317. package/src/plugins/table/pm-plugins/table-width.ts +2 -2
  318. package/src/plugins/table/toolbar.tsx +4 -4
  319. package/src/plugins/table/transforms/column-width.ts +4 -5
  320. package/src/plugins/table/transforms/delete-columns.ts +2 -3
  321. package/src/plugins/table/transforms/delete-rows.ts +2 -3
  322. package/src/plugins/table/transforms/fix-tables.ts +3 -4
  323. package/src/plugins/table/transforms/merge.ts +2 -3
  324. package/src/plugins/table/transforms/replace-table.ts +6 -3
  325. package/src/plugins/table/transforms/split.ts +2 -3
  326. package/src/plugins/table/types.ts +3 -3
  327. package/src/plugins/table/ui/FloatingContextualButton/index.tsx +3 -3
  328. package/src/plugins/table/ui/FloatingContextualMenu/ContextualMenu.tsx +1 -1
  329. package/src/plugins/table/ui/FloatingContextualMenu/index.tsx +2 -2
  330. package/src/plugins/table/ui/FloatingDeleteButton/index.tsx +2 -2
  331. package/src/plugins/table/ui/FloatingInsertButton/index.tsx +3 -3
  332. package/src/plugins/table/ui/LayoutButton/index.tsx +2 -2
  333. package/src/plugins/table/ui/TableFloatingControls/CornerControls/index.tsx +1 -1
  334. package/src/plugins/table/ui/TableFloatingControls/NumberColumn/index.tsx +2 -3
  335. package/src/plugins/table/ui/TableFloatingControls/RowControls/index.tsx +2 -1
  336. package/src/plugins/table/ui/TableFloatingControls/index.tsx +2 -3
  337. package/src/plugins/table/utils/analytics.ts +1 -2
  338. package/src/plugins/table/utils/collapse.ts +6 -4
  339. package/src/plugins/table/utils/column-controls.ts +3 -4
  340. package/src/plugins/table/utils/decoration.ts +9 -6
  341. package/src/plugins/table/utils/get-allow-add-column-custom-step.ts +1 -1
  342. package/src/plugins/table/utils/nodes.ts +3 -4
  343. package/src/plugins/table/utils/paste.ts +8 -4
  344. package/src/plugins/table/utils/row-controls.ts +3 -4
  345. package/src/plugins/table/utils/selection.ts +1 -2
  346. package/src/plugins/table/utils/table.ts +1 -2
  347. package/src/plugins/table/utils/update-plugin-state-decorations.ts +2 -2
@@ -6,17 +6,17 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.isColumnDeleteButtonVisible = exports.getColumnsWidths = exports.getColumnDeleteButtonParams = exports.getColumnClassNames = exports.colWidthsForRow = void 0;
8
8
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
9
- var _prosemirrorUtils = require("prosemirror-utils");
10
9
  var _utils = require("@atlaskit/editor-common/utils");
10
+ var _utils2 = require("@atlaskit/editor-prosemirror/utils");
11
11
  var _cellSelection = require("@atlaskit/editor-tables/cell-selection");
12
12
  var _tableMap = require("@atlaskit/editor-tables/table-map");
13
- var _utils2 = require("@atlaskit/editor-tables/utils");
13
+ var _utils3 = require("@atlaskit/editor-tables/utils");
14
14
  var _types = require("../types");
15
15
  var _consts = require("../ui/consts");
16
16
  var getColumnsWidths = function getColumnsWidths(view) {
17
17
  var selection = view.state.selection;
18
18
  var widths = [];
19
- var table = (0, _utils2.findTable)(selection);
19
+ var table = (0, _utils3.findTable)(selection);
20
20
  if (table) {
21
21
  var map = _tableMap.TableMap.get(table.node);
22
22
  var domAtPos = view.domAtPos.bind(view);
@@ -26,10 +26,10 @@ var getColumnsWidths = function getColumnsWidths(view) {
26
26
  length: map.width
27
27
  });
28
28
  for (var i = 0; i < map.width; i++) {
29
- var cells = (0, _utils2.getCellsInColumn)(i)(selection);
29
+ var cells = (0, _utils3.getCellsInColumn)(i)(selection);
30
30
  var cell = cells[0];
31
31
  if (cell) {
32
- var cellRef = (0, _prosemirrorUtils.findDomRefAtPos)(cell.pos, domAtPos);
32
+ var cellRef = (0, _utils2.findDomRefAtPos)(cell.pos, domAtPos);
33
33
  var rect = cellRef.getBoundingClientRect();
34
34
  widths[i] = (rect ? rect.width : cellRef.offsetWidth) + 1;
35
35
  i += cell.node.attrs.colspan - 1;
@@ -40,14 +40,14 @@ var getColumnsWidths = function getColumnsWidths(view) {
40
40
  };
41
41
  exports.getColumnsWidths = getColumnsWidths;
42
42
  var isColumnDeleteButtonVisible = function isColumnDeleteButtonVisible(selection) {
43
- if (!(0, _utils2.isTableSelected)(selection) && selection instanceof _cellSelection.CellSelection && selection.isColSelection()) {
43
+ if (!(0, _utils3.isTableSelected)(selection) && selection instanceof _cellSelection.CellSelection && selection.isColSelection()) {
44
44
  return true;
45
45
  }
46
46
  return false;
47
47
  };
48
48
  exports.isColumnDeleteButtonVisible = isColumnDeleteButtonVisible;
49
49
  var getColumnDeleteButtonParams = function getColumnDeleteButtonParams(columnsWidths, selection) {
50
- var rect = (0, _utils2.getSelectionRect)(selection);
50
+ var rect = (0, _utils3.getSelectionRect)(selection);
51
51
  if (!rect) {
52
52
  return null;
53
53
  }
@@ -81,7 +81,7 @@ var getColumnClassNames = function getColumnClassNames(index, selection) {
81
81
  var isInDanger = arguments.length > 3 ? arguments[3] : undefined;
82
82
  var isResizing = arguments.length > 4 ? arguments[4] : undefined;
83
83
  var classNames = [];
84
- if ((0, _utils2.isColumnSelected)(index)(selection) || hoveredColumns.indexOf(index) > -1 && !isResizing) {
84
+ if ((0, _utils3.isColumnSelected)(index)(selection) || hoveredColumns.indexOf(index) > -1 && !isResizing) {
85
85
  classNames.push(_types.TableCssClassName.HOVERED_CELL_ACTIVE);
86
86
  if (isInDanger) {
87
87
  classNames.push(_types.TableCssClassName.HOVERED_CELL_IN_DANGER);
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.updateDecorations = exports.findControlsHoverDecoration = exports.findColumnControlSelectedDecoration = exports.createResizeHandleDecoration = exports.createControlsHoverDecoration = exports.createColumnSelectedDecoration = exports.createColumnLineResize = exports.createColumnControlsDecoration = exports.createCellHoverDecoration = void 0;
8
8
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
9
- var _prosemirrorView = require("prosemirror-view");
10
9
  var _utils = require("@atlaskit/editor-common/utils");
10
+ var _view = require("@atlaskit/editor-prosemirror/view");
11
11
  var _tableMap = require("@atlaskit/editor-tables/table-map");
12
12
  var _utils2 = require("@atlaskit/editor-tables/utils");
13
13
  var _types = require("../types");
@@ -28,7 +28,7 @@ var findControlsHoverDecoration = function findControlsHoverDecoration(decoratio
28
28
  exports.findControlsHoverDecoration = findControlsHoverDecoration;
29
29
  var createCellHoverDecoration = function createCellHoverDecoration(cells) {
30
30
  return cells.map(function (cell) {
31
- return _prosemirrorView.Decoration.node(cell.pos, cell.pos + cell.node.nodeSize, {
31
+ return _view.Decoration.node(cell.pos, cell.pos + cell.node.nodeSize, {
32
32
  class: _types.TableCssClassName.HOVERED_CELL_WARNING
33
33
  }, {
34
34
  key: _types.TableDecorations.CELL_CONTROLS_HOVER
@@ -126,7 +126,7 @@ var createControlsHoverDecoration = function createControlsHoverDecoration(cells
126
126
  key = _types.TableDecorations.TABLE_CONTROLS_HOVER;
127
127
  break;
128
128
  }
129
- return _prosemirrorView.Decoration.node(pos, pos + cell.nodeSize, {
129
+ return _view.Decoration.node(pos, pos + cell.nodeSize, {
130
130
  class: classes.join(' ')
131
131
  }, {
132
132
  key: key
@@ -146,7 +146,7 @@ var createColumnSelectedDecoration = function createColumnSelectedDecoration(tr)
146
146
  var cellPositions = map.cellsInRect(rect);
147
147
  return cellPositions.map(function (pos, index) {
148
148
  var cell = doc.nodeAt(pos + table.start);
149
- return _prosemirrorView.Decoration.node(pos + table.start, pos + table.start + cell.nodeSize, {
149
+ return _view.Decoration.node(pos + table.start, pos + table.start + cell.nodeSize, {
150
150
  class: _types.TableCssClassName.COLUMN_SELECTED
151
151
  }, {
152
152
  key: "".concat(_types.TableDecorations.COLUMN_SELECTED, "_").concat(index)
@@ -166,7 +166,7 @@ var createColumnControlsDecoration = function createColumnControlsDecoration(sel
166
166
 
167
167
  // The next cell start index will commence from the current cell end index.
168
168
  index = endIndex;
169
- return _prosemirrorView.Decoration.widget(cell.pos + 1, function () {
169
+ return _view.Decoration.widget(cell.pos + 1, function () {
170
170
  var element = document.createElement('div');
171
171
  element.classList.add(_types.TableCssClassName.COLUMN_CONTROLS_DECORATIONS);
172
172
  element.dataset.startIndex = "".concat(startIndex);
@@ -281,7 +281,7 @@ var createResizeHandleDecoration = function createResizeHandleDecoration(tr, row
281
281
  }
282
282
  var createResizerHandleDecoration = function createResizerHandleDecoration(cellColumnPositioning, columnIndex, rowIndex, cellPos, cellNode) {
283
283
  var position = cellPos + cellNode.nodeSize - 1;
284
- return _prosemirrorView.Decoration.widget(position, function () {
284
+ return _view.Decoration.widget(position, function () {
285
285
  var element = document.createElement('div');
286
286
  element.classList.add(_types.TableCssClassName.RESIZE_HANDLE_DECORATION);
287
287
  element.dataset.startIndex = "".concat(cellColumnPositioning.left);
@@ -305,7 +305,7 @@ var createResizeHandleDecoration = function createResizeHandleDecoration(tr, row
305
305
  if (!lastItemPositions) {
306
306
  return null;
307
307
  }
308
- return _prosemirrorView.Decoration.node(lastItemPositions.from, lastItemPositions.to, {
308
+ return _view.Decoration.node(lastItemPositions.from, lastItemPositions.to, {
309
309
  class: _types.TableCssClassName.LAST_ITEM_IN_CELL
310
310
  }, {
311
311
  key: "".concat(_types.TableDecorations.LAST_CELL_ELEMENT, "_").concat(cellColumnPositioning.left, "_").concat(cellColumnPositioning.right)
@@ -426,7 +426,7 @@ var createColumnLineResize = function createColumnLineResize(selection, cellColu
426
426
  if (!cell || !cell.node) {
427
427
  return;
428
428
  }
429
- return _prosemirrorView.Decoration.node(cell.pos, cell.pos + cell.node.nodeSize, {
429
+ return _view.Decoration.node(cell.pos, cell.pos + cell.node.nodeSize, {
430
430
  class: decorationClassName
431
431
  }, {
432
432
  key: "".concat(_types.TableDecorations.COLUMN_RESIZING_HANDLE_LINE, "_").concat(cellColumnPositioning.right, "_").concat(index)
@@ -6,9 +6,9 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.tablesHaveDifferentNoOfColumns = exports.tablesHaveDifferentColumnWidths = exports.isTableNested = exports.isLayoutSupported = exports.isIsolating = exports.getTableWidth = exports.containsHeaderRow = exports.containsHeaderColumn = exports.checkIfNumberColumnEnabled = exports.checkIfHeaderRowEnabled = exports.checkIfHeaderColumnEnabled = void 0;
8
8
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
9
- var _prosemirrorUtils = require("prosemirror-utils");
9
+ var _utils = require("@atlaskit/editor-prosemirror/utils");
10
10
  var _tableMap = require("@atlaskit/editor-tables/table-map");
11
- var _utils = require("@atlaskit/editor-tables/utils");
11
+ var _utils2 = require("@atlaskit/editor-tables/utils");
12
12
  var _pluginKey = require("../pm-plugins/plugin-key");
13
13
  var isIsolating = function isIsolating(node) {
14
14
  return !!node.type.spec.isolating;
@@ -48,15 +48,15 @@ var containsHeaderRow = function containsHeaderRow(table) {
48
48
  };
49
49
  exports.containsHeaderRow = containsHeaderRow;
50
50
  var checkIfHeaderColumnEnabled = function checkIfHeaderColumnEnabled(selection) {
51
- return filterNearSelection(selection, _utils.findTable, containsHeaderColumn, false);
51
+ return filterNearSelection(selection, _utils2.findTable, containsHeaderColumn, false);
52
52
  };
53
53
  exports.checkIfHeaderColumnEnabled = checkIfHeaderColumnEnabled;
54
54
  var checkIfHeaderRowEnabled = function checkIfHeaderRowEnabled(selection) {
55
- return filterNearSelection(selection, _utils.findTable, containsHeaderRow, false);
55
+ return filterNearSelection(selection, _utils2.findTable, containsHeaderRow, false);
56
56
  };
57
57
  exports.checkIfHeaderRowEnabled = checkIfHeaderRowEnabled;
58
58
  var checkIfNumberColumnEnabled = function checkIfNumberColumnEnabled(selection) {
59
- return filterNearSelection(selection, _utils.findTable, function (table) {
59
+ return filterNearSelection(selection, _utils2.findTable, function (table) {
60
60
  return !!table.attrs.isNumberColumnEnabled;
61
61
  }, false);
62
62
  };
@@ -69,7 +69,7 @@ var isLayoutSupported = function isLayoutSupported(state) {
69
69
  bodiedExtension = _state$schema$nodes.bodiedExtension,
70
70
  layoutSection = _state$schema$nodes.layoutSection,
71
71
  expand = _state$schema$nodes.expand;
72
- return !(0, _prosemirrorUtils.hasParentNodeOfType)([expand, layoutSection, bodiedExtension])(state.selection) && !!permittedLayouts && (permittedLayouts === 'all' || permittedLayouts.indexOf('default') > -1 && permittedLayouts.indexOf('wide') > -1 && permittedLayouts.indexOf('full-width') > -1);
72
+ return !(0, _utils.hasParentNodeOfType)([expand, layoutSection, bodiedExtension])(state.selection) && !!permittedLayouts && (permittedLayouts === 'all' || permittedLayouts.indexOf('default') > -1 && permittedLayouts.indexOf('wide') > -1 && permittedLayouts.indexOf('full-width') > -1);
73
73
  };
74
74
  exports.isLayoutSupported = isLayoutSupported;
75
75
  var getTableWidth = function getTableWidth(node) {
@@ -7,9 +7,9 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.isHeaderRowRequired = isHeaderRowRequired;
8
8
  exports.unwrapContentFromTable = exports.transformSliceToRemoveOpenTable = exports.transformSliceToFixHardBreakProblemOnCopyFromCell = exports.transformSliceToCorrectEmptyTableCells = exports.removeTableFromLastChild = exports.removeTableFromFirstChild = void 0;
9
9
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
10
- var _prosemirrorModel = require("prosemirror-model");
11
- var _prosemirrorUtils = require("prosemirror-utils");
12
10
  var _utils = require("@atlaskit/editor-common/utils");
11
+ var _model = require("@atlaskit/editor-prosemirror/model");
12
+ var _utils2 = require("@atlaskit/editor-prosemirror/utils");
13
13
  var _pluginFactory = require("../pm-plugins/plugin-factory");
14
14
  // lifts up the content of each cell, returning an array of nodes
15
15
  var unwrapContentFromTable = function unwrapContentFromTable(maybeTable) {
@@ -21,7 +21,7 @@ var unwrapContentFromTable = function unwrapContentFromTable(maybeTable) {
21
21
  tableHeader = _schema$nodes.tableHeader;
22
22
  maybeTable.descendants(function (maybeCell) {
23
23
  if (maybeCell.type === tableCell || maybeCell.type === tableHeader) {
24
- content.push.apply(content, (0, _toConsumableArray2.default)((0, _prosemirrorUtils.flatten)(maybeCell, false).map(function (child) {
24
+ content.push.apply(content, (0, _toConsumableArray2.default)((0, _utils2.flatten)(maybeCell, false).map(function (child) {
25
25
  return child.node;
26
26
  })));
27
27
  }
@@ -59,7 +59,7 @@ var transformSliceToFixHardBreakProblemOnCopyFromCell = function transformSliceT
59
59
  if (slice.content.childCount === 2 && slice.content.firstChild && slice.content.lastChild && slice.content.firstChild.type === table && slice.content.lastChild.type === paragraph && slice.content.lastChild.nodeSize === paragraphWithHardBreakSize) {
60
60
  var nodes = unwrapContentFromTable(slice.content.firstChild);
61
61
  if (nodes instanceof Array) {
62
- return new _prosemirrorModel.Slice(_prosemirrorModel.Fragment.from(
62
+ return new _model.Slice(_model.Fragment.from(
63
63
  // keep only the content and discard the hardBreak
64
64
  nodes[0]), slice.openStart, slice.openEnd);
65
65
  }
@@ -86,9 +86,9 @@ var transformSliceToRemoveOpenTable = function transformSliceToRemoveOpenTable(s
86
86
  // As we are removing wrapping table anyway, we keep duplicated table and tableRow for simplicity
87
87
  var cleaned = slice;
88
88
  if (((_slice$content$firstC = slice.content.firstChild) === null || _slice$content$firstC === void 0 ? void 0 : (_slice$content$firstC2 = _slice$content$firstC.content) === null || _slice$content$firstC2 === void 0 ? void 0 : (_slice$content$firstC3 = _slice$content$firstC2.firstChild) === null || _slice$content$firstC3 === void 0 ? void 0 : (_slice$content$firstC4 = _slice$content$firstC3.content) === null || _slice$content$firstC4 === void 0 ? void 0 : (_slice$content$firstC5 = _slice$content$firstC4.firstChild) === null || _slice$content$firstC5 === void 0 ? void 0 : _slice$content$firstC5.type) === schema.nodes.table) {
89
- cleaned = new _prosemirrorModel.Slice(slice.content.firstChild.content.firstChild.content, slice.openStart - 2, slice.openEnd - 2);
89
+ cleaned = new _model.Slice(slice.content.firstChild.content.firstChild.content, slice.openStart - 2, slice.openEnd - 2);
90
90
  }
91
- return new _prosemirrorModel.Slice((0, _utils.flatmap)(cleaned.content, unwrapContentFromTable), cleaned.openStart - depthDecrement, cleaned.openEnd - depthDecrement);
91
+ return new _model.Slice((0, _utils.flatmap)(cleaned.content, unwrapContentFromTable), cleaned.openStart - depthDecrement, cleaned.openEnd - depthDecrement);
92
92
  }
93
93
 
94
94
  // Case 2: A slice starting within a CELL and ending outside the table
@@ -99,7 +99,7 @@ var transformSliceToRemoveOpenTable = function transformSliceToRemoveOpenTable(s
99
99
  slice.content.childCount > 1 && ((_slice$content$firstC6 = slice.content.firstChild) === null || _slice$content$firstC6 === void 0 ? void 0 : _slice$content$firstC6.type) === schema.nodes.table) {
100
100
  // repoint the slice's cutting depth so that cell content where the slice starts
101
101
  // does not get lifted out of the cell on paste
102
- return new _prosemirrorModel.Slice(slice.content, 1, slice.openEnd);
102
+ return new _model.Slice(slice.content, 1, slice.openEnd);
103
103
  }
104
104
  return slice;
105
105
  };
@@ -6,11 +6,11 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.isRowDeleteButtonVisible = exports.getRowsParams = exports.getRowHeights = exports.getRowDeleteButtonParams = exports.getRowClassNames = exports.copyPreviousRow = void 0;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
- var _prosemirrorUtils = require("prosemirror-utils");
10
9
  var _utils = require("@atlaskit/editor-common/utils");
10
+ var _utils2 = require("@atlaskit/editor-prosemirror/utils");
11
11
  var _cellSelection = require("@atlaskit/editor-tables/cell-selection");
12
12
  var _tableMap = require("@atlaskit/editor-tables/table-map");
13
- var _utils2 = require("@atlaskit/editor-tables/utils");
13
+ var _utils3 = require("@atlaskit/editor-tables/utils");
14
14
  var _types = require("../types");
15
15
  var _consts = require("../ui/consts");
16
16
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
@@ -36,7 +36,7 @@ var getRowHeights = function getRowHeights(tableRef) {
36
36
  };
37
37
  exports.getRowHeights = getRowHeights;
38
38
  var isRowDeleteButtonVisible = function isRowDeleteButtonVisible(selection) {
39
- if (!(0, _utils2.isTableSelected)(selection) && selection instanceof _cellSelection.CellSelection && selection.isRowSelection()) {
39
+ if (!(0, _utils3.isTableSelected)(selection) && selection instanceof _cellSelection.CellSelection && selection.isRowSelection()) {
40
40
  return true;
41
41
  }
42
42
  return false;
@@ -44,7 +44,7 @@ var isRowDeleteButtonVisible = function isRowDeleteButtonVisible(selection) {
44
44
  exports.isRowDeleteButtonVisible = isRowDeleteButtonVisible;
45
45
  var getRowDeleteButtonParams = function getRowDeleteButtonParams(rowsHeights, selection) {
46
46
  var offsetTop = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
47
- var rect = (0, _utils2.getSelectionRect)(selection);
47
+ var rect = (0, _utils3.getSelectionRect)(selection);
48
48
  if (!rect) {
49
49
  return null;
50
50
  }
@@ -101,7 +101,7 @@ var getRowClassNames = function getRowClassNames(index, selection) {
101
101
  var isInDanger = arguments.length > 3 ? arguments[3] : undefined;
102
102
  var isResizing = arguments.length > 4 ? arguments[4] : undefined;
103
103
  var classNames = [];
104
- if ((0, _utils2.isRowSelected)(index)(selection) || hoveredRows.indexOf(index) > -1 && !isResizing) {
104
+ if ((0, _utils3.isRowSelected)(index)(selection) || hoveredRows.indexOf(index) > -1 && !isResizing) {
105
105
  classNames.push(_types.TableCssClassName.HOVERED_CELL_ACTIVE);
106
106
  if (isInDanger) {
107
107
  classNames.push(_types.TableCssClassName.HOVERED_CELL_IN_DANGER);
@@ -113,7 +113,7 @@ exports.getRowClassNames = getRowClassNames;
113
113
  var copyPreviousRow = function copyPreviousRow(schema) {
114
114
  return function (insertNewRowIndex) {
115
115
  return function (tr) {
116
- var table = (0, _utils2.findTable)(tr.selection);
116
+ var table = (0, _utils3.findTable)(tr.selection);
117
117
  if (!table) {
118
118
  return tr;
119
119
  }
@@ -187,7 +187,7 @@ var copyPreviousRow = function copyPreviousRow(schema) {
187
187
  for (var _i2 = 0; _i2 < insertNewRowIndex; _i2++) {
188
188
  rowPos += tableNode.child(_i2).nodeSize;
189
189
  }
190
- return (0, _prosemirrorUtils.safeInsert)(tableRow.createChecked(cloneRow.attrs, cells, cloneRow.marks), rowPos)(tr);
190
+ return (0, _utils2.safeInsert)(tableRow.createChecked(cloneRow.attrs, cells, cloneRow.marks), rowPos)(tr);
191
191
  };
192
192
  };
193
193
  };
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "2.6.4",
3
+ "version": "2.6.6",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,6 @@
1
1
  // #region Imports
2
- import { Selection } from 'prosemirror-state';
2
+
3
+ import { Selection } from '@atlaskit/editor-prosemirror/state';
3
4
  import { emptyCell, findCellClosestToPos, isSelectionType } from '@atlaskit/editor-tables/utils';
4
5
 
5
6
  // #endregion
@@ -1,6 +1,7 @@
1
1
  // #region Constants
2
- import { findParentNodeOfType } from 'prosemirror-utils';
2
+
3
3
  import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
4
+ import { findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
4
5
  import { TableMap } from '@atlaskit/editor-tables/table-map';
5
6
  import { goToNextCell as baseGotoNextCell, findTable } from '@atlaskit/editor-tables/utils';
6
7
  import { insertRowWithAnalytics } from '../commands-with-analytics';
@@ -1,7 +1,7 @@
1
1
  // #region Imports
2
- import { Selection } from 'prosemirror-state';
3
- import { safeInsert } from 'prosemirror-utils';
4
2
  import { AddColumnStep } from '@atlaskit/adf-schema/steps';
3
+ import { Selection } from '@atlaskit/editor-prosemirror/state';
4
+ import { safeInsert } from '@atlaskit/editor-prosemirror/utils';
5
5
  import { TableMap } from '@atlaskit/editor-tables/table-map';
6
6
  import { addColumnAt as addColumnAtPMUtils, addRowAt, createTable as createTableNode, findTable, selectedRect } from '@atlaskit/editor-tables/utils';
7
7
  import { rescaleColumns } from '../transforms/column-width';
@@ -1,7 +1,7 @@
1
1
  // #region Imports
2
2
 
3
- import { TextSelection } from 'prosemirror-state';
4
3
  import { closestElement, isParagraph, isTextSelection, mapSlice } from '@atlaskit/editor-common/utils';
4
+ import { TextSelection } from '@atlaskit/editor-prosemirror/state';
5
5
  import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
6
6
  import { TableMap } from '@atlaskit/editor-tables/table-map';
7
7
  import { findCellClosestToPos, findTable, getCellsInColumn, getCellsInRow, getSelectionRect, isSelectionType, isTableSelected, removeTable, selectColumn as selectColumnTransform, selectionCell, selectRow as selectRowTransform, setCellAttrs } from '@atlaskit/editor-tables/utils';
@@ -1,5 +1,5 @@
1
- import { Selection, TextSelection } from 'prosemirror-state';
2
1
  import { GapCursorSelection, isSelectionAtEndOfNode, isSelectionAtStartOfNode, RelativeSelectionPos, Side } from '@atlaskit/editor-common/selection';
2
+ import { Selection, TextSelection } from '@atlaskit/editor-prosemirror/state';
3
3
  import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
4
4
  import { TableMap } from '@atlaskit/editor-tables/table-map';
5
5
  import { findTable, isTableSelected } from '@atlaskit/editor-tables/utils';
@@ -1,6 +1,6 @@
1
- import { Selection } from 'prosemirror-state';
2
1
  import { TableSortOrder as SortOrder, TableSortStep } from '@atlaskit/adf-schema/steps';
3
2
  import { createCompareNodes } from '@atlaskit/editor-common/utils';
3
+ import { Selection } from '@atlaskit/editor-prosemirror/state';
4
4
  import { TableMap } from '@atlaskit/editor-tables/table-map';
5
5
  import { convertArrayOfRowsToTableNode, convertTableNodeToArrayOfRows, findCellRectClosestToPos, findTable, getSelectionRect, isSelectionType } from '@atlaskit/editor-tables/utils';
6
6
  import { createCommand, getPluginState } from '../pm-plugins/plugin-factory';
@@ -1,6 +1,6 @@
1
- import { Selection, TextSelection } from 'prosemirror-state';
2
1
  import { ACTION_SUBJECT, EVENT_TYPE, TABLE_ACTION } from '@atlaskit/editor-common/analytics';
3
2
  import { browser, closestElement, isElementInTableCell, isLastItemMediaGroup, setNodeSelection } from '@atlaskit/editor-common/utils';
3
+ import { Selection, TextSelection } from '@atlaskit/editor-prosemirror/state';
4
4
  import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
5
5
  import { TableMap } from '@atlaskit/editor-tables/table-map';
6
6
  import { cellAround, findCellRectClosestToPos, findTable, getSelectionRect, removeTable } from '@atlaskit/editor-tables/utils';
@@ -1,10 +1,10 @@
1
1
  // #region Imports
2
+ import { TableSortStep } from '@atlaskit/adf-schema/steps';
3
+ import { isTextInput } from '@atlaskit/editor-common/utils';
2
4
 
3
5
  // @ts-ignore -- ReadonlyTransaction is a local declaration and will cause a TS2305 error in CCFE typecheck
4
6
 
5
- import { findParentNodeOfType } from 'prosemirror-utils';
6
- import { TableSortStep } from '@atlaskit/adf-schema/steps';
7
- import { isTextInput } from '@atlaskit/editor-common/utils';
7
+ import { findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
8
8
  import { findTable } from '@atlaskit/editor-tables/utils';
9
9
  import { defaultTableSelection } from './pm-plugins/default-table-selection';
10
10
  import { pluginKey as tableResizingPluginKey } from './pm-plugins/table-resizing';
@@ -63,8 +63,8 @@ export const ResizableTableContainer = ({
63
63
  })) !== null && _pluginInjectionApi$d !== void 0 ? _pluginInjectionApi$d : false;
64
64
  }, [pluginInjectionApi, editorView]);
65
65
  const attachAnalyticsEvent = useCallback(payload => {
66
- var _pluginInjectionApi$d5;
67
- return pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d5 = pluginInjectionApi.dependencies) === null || _pluginInjectionApi$d5 === void 0 ? void 0 : _pluginInjectionApi$d5.analytics.actions.attachAnalyticsEvent(payload);
66
+ var _pluginInjectionApi$d5, _pluginInjectionApi$d6;
67
+ return pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d5 = pluginInjectionApi.dependencies) === null || _pluginInjectionApi$d5 === void 0 ? void 0 : (_pluginInjectionApi$d6 = _pluginInjectionApi$d5.analytics) === null || _pluginInjectionApi$d6 === void 0 ? void 0 : _pluginInjectionApi$d6.actions.attachAnalyticsEvent(payload);
68
68
  }, [pluginInjectionApi]);
69
69
  const tableWidth = getTableContainerWidth(node);
70
70
  // 76 is currently an accepted padding value considering the spacing for resizer handle
@@ -1,9 +1,9 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import React from 'react';
3
- import { DOMSerializer } from 'prosemirror-model';
4
3
  import { getTableContainerWidth } from '@atlaskit/editor-common/node-width';
5
4
  import ReactNodeView from '@atlaskit/editor-common/react-node-view';
6
5
  import { WithPluginState } from '@atlaskit/editor-common/with-plugin-state';
6
+ import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
7
7
  import { akEditorTableNumberColumnWidth } from '@atlaskit/editor-shared-styles';
8
8
  import { TableMap } from '@atlaskit/editor-tables/table-map';
9
9
  import { pluginConfig as getPluginConfig } from '../create-plugin-config';
@@ -1,6 +1,6 @@
1
- import { DOMSerializer } from 'prosemirror-model';
2
1
  import uuid from 'uuid';
3
2
  import { getCellAttrs, getCellDomAttrs } from '@atlaskit/adf-schema';
3
+ import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
4
4
  const DEFAULT_COL_SPAN = 1;
5
5
  const DEFAULT_ROW_SPAN = 1;
6
6
  export default class TableCellNodeView {
@@ -1,8 +1,8 @@
1
+ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
1
2
  import { PluginKey
2
3
  // @ts-ignore -- ReadonlyTransaction is a local declaration and will cause a TS2305 error in CCFE typecheck
3
- } from 'prosemirror-state';
4
- import { DecorationSet } from 'prosemirror-view';
5
- import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
4
+ } from '@atlaskit/editor-prosemirror/state';
5
+ import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
6
6
  import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
7
7
  import { pluginKey as tablePluginKey } from '../plugin-key';
8
8
  import { pluginKey as tableWidthPluginKey } from '../table-width';
@@ -1,7 +1,7 @@
1
- import { chainCommands } from 'prosemirror-commands';
2
- import { keymap } from 'prosemirror-keymap';
3
1
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
4
2
  import * as keymaps from '@atlaskit/editor-common/keymaps';
3
+ import { chainCommands } from '@atlaskit/editor-prosemirror/commands';
4
+ import { keymap } from '@atlaskit/editor-prosemirror/keymap';
5
5
  import { createTable, goToNextCell, moveCursorBackward, triggerUnlessTableHeader } from '../commands';
6
6
  import { addRowAroundSelection, deleteTableIfSelectedWithAnalytics, emptyMultipleCellsWithAnalytics } from '../commands-with-analytics';
7
7
  import { addColumnAfter, addColumnBefore } from '../commands/insert';
@@ -1,9 +1,9 @@
1
- import { findParentDomRefOfType, findParentNodeOfType } from 'prosemirror-utils';
2
1
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
3
2
  import { insideTable } from '@atlaskit/editor-common/core-utils';
4
3
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
5
4
  import { transformSliceToRemoveOpenBodiedExtension, transformSliceToRemoveOpenExpand, transformSliceToRemoveOpenLayoutNodes } from '@atlaskit/editor-common/transforms';
6
5
  import { browser, closestElement } from '@atlaskit/editor-common/utils';
6
+ import { findParentDomRefOfType, findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
7
7
  import { findTable } from '@atlaskit/editor-tables/utils';
8
8
  import { addBoldInEmptyHeaderCells, clearHoverSelection, setTableRef } from '../commands';
9
9
  import { transformSliceRemoveCellBackgroundColor, transformSliceToAddTableHeaders, transformSliceToRemoveColumnsWidths } from '../commands/misc';
@@ -1,2 +1,2 @@
1
- import { PluginKey } from 'prosemirror-state';
1
+ import { PluginKey } from '@atlaskit/editor-prosemirror/state';
2
2
  export const pluginKey = new PluginKey('tablePlugin');
@@ -3,9 +3,9 @@
3
3
  * https://github.com/ProseMirror/prosemirror/issues/934
4
4
  * We will remove this plugin when Webkit fix the problem itself.
5
5
  */
6
- import { PluginKey } from 'prosemirror-state';
7
- import { Decoration, DecorationSet } from 'prosemirror-view';
8
6
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
7
+ import { PluginKey } from '@atlaskit/editor-prosemirror/state';
8
+ import { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
9
9
  export const tableSafariDeleteCompositionTextIssueWorkaroundKey = new PluginKey('tableSafariDeleteCompositionTextIssueWorkaround');
10
10
  export const createPlugin = () => {
11
11
  return new SafePlugin({
@@ -1,2 +1,2 @@
1
- import { PluginKey } from 'prosemirror-state';
1
+ import { PluginKey } from '@atlaskit/editor-prosemirror/state';
2
2
  export const pluginKey = new PluginKey('stickyHeadersPlugin');
@@ -10,12 +10,11 @@
10
10
  * TODO: https://product-fabric.atlassian.net/browse/ED-12714
11
11
  *
12
12
  */
13
-
14
- import { PluginKey } from 'prosemirror-state';
15
13
  import rafSchedule from 'raf-schd';
16
14
  import { uuid } from '@atlaskit/adf-schema';
17
15
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
18
16
  import { stepHasSlice } from '@atlaskit/editor-common/utils';
17
+ import { PluginKey } from '@atlaskit/editor-prosemirror/state';
19
18
  const pluginKey = new PluginKey('tableLocalIdPlugin');
20
19
  const getPluginState = state => state && pluginKey.getState(state);
21
20
 
@@ -1,5 +1,4 @@
1
1
  // @ts-ignore -- ReadonlyTransaction is a local declaration and will cause a TS2305 error in CCFE typecheck
2
-
3
2
  import { pluginFactory } from '@atlaskit/editor-common/utils';
4
3
  import { pluginKey } from './plugin-key';
5
4
  import reducer from './reducer';
@@ -1,2 +1,2 @@
1
- import { PluginKey } from 'prosemirror-state';
1
+ import { PluginKey } from '@atlaskit/editor-prosemirror/state';
2
2
  export const pluginKey = new PluginKey('tableFlexiColumnResizing');
@@ -1,6 +1,6 @@
1
- import { DOMSerializer } from 'prosemirror-model';
2
1
  import { tableCellMinWidth } from '@atlaskit/editor-common/styles';
3
2
  import { getFragmentBackingArray } from '@atlaskit/editor-common/utils';
3
+ import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
4
4
  import { TableMap } from '@atlaskit/editor-tables/table-map';
5
5
  import { getBooleanFF } from '@atlaskit/platform-feature-flags';
6
6
  export const generateColgroup = table => {
@@ -1,5 +1,5 @@
1
- import { findDomRefAtPos } from 'prosemirror-utils';
2
1
  import { tableNewColumnMinWidth } from '@atlaskit/editor-common/styles';
2
+ import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
3
3
  import { TableMap } from '@atlaskit/editor-tables/table-map';
4
4
  import { contentWidth } from './content-width';
5
5
  import { unitToNumber } from './unit-to-number';
@@ -1,5 +1,5 @@
1
- import { keymap } from 'prosemirror-keymap';
2
1
  import { bindKeymapWithCommand, moveLeft, moveRight } from '@atlaskit/editor-common/keymaps';
2
+ import { keymap } from '@atlaskit/editor-prosemirror/keymap';
3
3
  import { arrowLeftFromTable, arrowRightFromTable } from '../commands/selection';
4
4
  export function tableSelectionKeymapPlugin(editorSelectionAPI) {
5
5
  const list = {};
@@ -3,10 +3,11 @@
3
3
  * Has login to scan the document, add width value to table's width attribute when necessary
4
4
  * Also holds resizing state to hide / show table controls
5
5
  */
6
- import { PluginKey } from 'prosemirror-state';
7
- import { ReplaceStep } from 'prosemirror-transform';
6
+
8
7
  import { SetAttrsStep } from '@atlaskit/adf-schema/steps';
9
8
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
9
+ import { PluginKey } from '@atlaskit/editor-prosemirror/state';
10
+ import { ReplaceStep } from '@atlaskit/editor-prosemirror/transform';
10
11
  import { akEditorFullWidthLayoutWidth, akEditorWideLayoutWidth } from '@atlaskit/editor-shared-styles';
11
12
  export const pluginKey = new PluginKey('tableWidthPlugin');
12
13
  const createPlugin = (dispatch, fullWidthEnabled) => new SafePlugin({
@@ -1,6 +1,5 @@
1
1
  /** @jsx jsx */
2
2
  import { jsx } from '@emotion/react';
3
- import { findParentDomRefOfType } from 'prosemirror-utils';
4
3
  import { defineMessages } from 'react-intl-next';
5
4
  import { TableSortOrder as SortOrder } from '@atlaskit/adf-schema/steps';
6
5
  import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
@@ -8,6 +7,7 @@ import { addColumnAfter, addRowAfter, backspace, tooltip } from '@atlaskit/edito
8
7
  import commonMessages from '@atlaskit/editor-common/messages';
9
8
  import { cellBackgroundColorPalette, DEFAULT_BORDER_COLOR } from '@atlaskit/editor-common/ui-color';
10
9
  import { closestElement, getChildrenInfo, getNodeName, isReferencedSource } from '@atlaskit/editor-common/utils';
10
+ import { findParentDomRefOfType } from '@atlaskit/editor-prosemirror/utils';
11
11
  import { akEditorFloatingPanelZIndex } from '@atlaskit/editor-shared-styles';
12
12
  import { shortcutStyle } from '@atlaskit/editor-shared-styles/shortcut';
13
13
  import { findCellRectClosestToPos, findTable, getSelectionRect, isSelectionType, splitCell } from '@atlaskit/editor-tables/utils';
@@ -1,5 +1,5 @@
1
- import { Selection } from 'prosemirror-state';
2
1
  import { AddColumnStep } from '@atlaskit/adf-schema/steps';
2
+ import { Selection } from '@atlaskit/editor-prosemirror/state';
3
3
  import { TableMap } from '@atlaskit/editor-tables/table-map';
4
4
  import { findTable } from '@atlaskit/editor-tables/utils';
5
5
  import { splitCellsInColumns } from './split';
@@ -1,4 +1,4 @@
1
- import { Selection } from 'prosemirror-state';
1
+ import { Selection } from '@atlaskit/editor-prosemirror/state';
2
2
  import { TableMap } from '@atlaskit/editor-tables/table-map';
3
3
  import { findTable } from '@atlaskit/editor-tables/utils';
4
4
  import { mergeEmptyColumns } from './merge';
@@ -1,5 +1,5 @@
1
- import { Fragment } from 'prosemirror-model';
2
- import { Selection } from 'prosemirror-state';
1
+ import { Fragment } from '@atlaskit/editor-prosemirror/model';
2
+ import { Selection } from '@atlaskit/editor-prosemirror/state';
3
3
  import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
4
4
  import { TableMap } from '@atlaskit/editor-tables/table-map';
5
5
  import { findTable, getSelectionRect } from '@atlaskit/editor-tables/utils';
@@ -1,6 +1,6 @@
1
- import { Fragment, Slice } from 'prosemirror-model';
2
- import { TextSelection } from 'prosemirror-state';
3
1
  import { ACTION_SUBJECT, EVENT_TYPE, TABLE_ACTION } from '@atlaskit/editor-common/analytics';
2
+ import { Fragment, Slice } from '@atlaskit/editor-prosemirror/model';
3
+ import { TextSelection } from '@atlaskit/editor-prosemirror/state';
4
4
  import { findTable, isTableSelected } from '@atlaskit/editor-tables/utils';
5
5
  import { getSelectedTableInfo } from '../utils';
6
6
  export const replaceSelectedTable = (state, content, inputMethod, editorAnalyticsAPI) => {
@@ -1,12 +1,12 @@
1
1
  /** @jsx jsx */
2
2
  import React from 'react';
3
3
  import { jsx } from '@emotion/react';
4
- import { findDomRefAtPos } from 'prosemirror-utils';
5
4
  import { injectIntl } from 'react-intl-next';
6
5
  import { ACTION_SUBJECT } from '@atlaskit/editor-common/analytics';
7
6
  import { ErrorBoundary } from '@atlaskit/editor-common/error-boundary';
8
7
  import { Popup } from '@atlaskit/editor-common/ui';
9
8
  import { ToolbarButton } from '@atlaskit/editor-common/ui-menu';
9
+ import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
10
10
  import { akEditorSmallZIndex } from '@atlaskit/editor-shared-styles';
11
11
  import ExpandIcon from '@atlaskit/icon/glyph/chevron-down';
12
12
  import { toggleContextualMenu } from '../../commands';
@@ -1,7 +1,7 @@
1
1
  /** @jsx jsx */
2
2
  import { jsx } from '@emotion/react';
3
- import { findDomRefAtPos } from 'prosemirror-utils';
4
3
  import { Popup } from '@atlaskit/editor-common/ui';
4
+ import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
5
5
  import { akEditorFloatingDialogZIndex, akEditorFloatingOverlapPanelZIndex } from '@atlaskit/editor-shared-styles';
6
6
  import { findCellRectClosestToPos, getSelectionRect, isSelectionType } from '@atlaskit/editor-tables/utils';
7
7
  import { getPluginState } from '../../pm-plugins/plugin-factory';