@atlaskit/editor-plugin-table 1.1.0 → 1.1.2

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 (284) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/index.js +0 -2
  3. package/dist/cjs/plugins/table/commands/clear.js +4 -16
  4. package/dist/cjs/plugins/table/commands/collapse.js +0 -6
  5. package/dist/cjs/plugins/table/commands/go-to-next-cell.js +7 -18
  6. package/dist/cjs/plugins/table/commands/hover.js +7 -37
  7. package/dist/cjs/plugins/table/commands/index.js +0 -8
  8. package/dist/cjs/plugins/table/commands/insert.js +17 -56
  9. package/dist/cjs/plugins/table/commands/misc.js +36 -132
  10. package/dist/cjs/plugins/table/commands/referentiality.js +0 -4
  11. package/dist/cjs/plugins/table/commands/selection.js +21 -87
  12. package/dist/cjs/plugins/table/commands/sort.js +2 -23
  13. package/dist/cjs/plugins/table/commands/split-cell.js +3 -11
  14. package/dist/cjs/plugins/table/commands/toggle.js +8 -34
  15. package/dist/cjs/plugins/table/commands-with-analytics.js +50 -139
  16. package/dist/cjs/plugins/table/create-plugin-config.js +0 -6
  17. package/dist/cjs/plugins/table/event-handlers.js +58 -160
  18. package/dist/cjs/plugins/table/handlers.js +10 -39
  19. package/dist/cjs/plugins/table/index.js +47 -91
  20. package/dist/cjs/plugins/table/nodeviews/OverflowShadowsObserver.js +8 -41
  21. package/dist/cjs/plugins/table/nodeviews/TableComponent.js +82 -188
  22. package/dist/cjs/plugins/table/nodeviews/table.js +12 -70
  23. package/dist/cjs/plugins/table/nodeviews/tableCell.js +15 -39
  24. package/dist/cjs/plugins/table/nodeviews/update-overflow-shadows.js +3 -15
  25. package/dist/cjs/plugins/table/pm-plugins/decorations/plugin.js +0 -18
  26. package/dist/cjs/plugins/table/pm-plugins/decorations/utils/column-controls.js +8 -27
  27. package/dist/cjs/plugins/table/pm-plugins/decorations/utils/column-resizing.js +8 -20
  28. package/dist/cjs/plugins/table/pm-plugins/decorations/utils/compose-decorations.js +1 -3
  29. package/dist/cjs/plugins/table/pm-plugins/decorations/utils/index.js +0 -3
  30. package/dist/cjs/plugins/table/pm-plugins/keymap.js +2 -15
  31. package/dist/cjs/plugins/table/pm-plugins/main.js +20 -72
  32. package/dist/cjs/plugins/table/pm-plugins/plugin-factory.js +25 -42
  33. package/dist/cjs/plugins/table/pm-plugins/plugin-key.js +0 -2
  34. package/dist/cjs/plugins/table/pm-plugins/safari-delayed-dom-selection-syncing-workaround.js +8 -8
  35. package/dist/cjs/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.js +4 -23
  36. package/dist/cjs/plugins/table/pm-plugins/sticky-headers/commands.js +0 -5
  37. package/dist/cjs/plugins/table/pm-plugins/sticky-headers/index.js +0 -5
  38. package/dist/cjs/plugins/table/pm-plugins/sticky-headers/nodeviews/dom.js +4 -13
  39. package/dist/cjs/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +56 -138
  40. package/dist/cjs/plugins/table/pm-plugins/sticky-headers/plugin-key.js +0 -2
  41. package/dist/cjs/plugins/table/pm-plugins/sticky-headers/plugin-state.js +15 -30
  42. package/dist/cjs/plugins/table/pm-plugins/sticky-headers/plugin.js +0 -6
  43. package/dist/cjs/plugins/table/pm-plugins/sticky-headers/util.js +0 -5
  44. package/dist/cjs/plugins/table/pm-plugins/table-local-id.js +13 -44
  45. package/dist/cjs/plugins/table/pm-plugins/table-resizing/commands.js +12 -42
  46. package/dist/cjs/plugins/table/pm-plugins/table-resizing/event-handlers.js +16 -52
  47. package/dist/cjs/plugins/table/pm-plugins/table-resizing/index.js +0 -4
  48. package/dist/cjs/plugins/table/pm-plugins/table-resizing/plugin-factory.js +0 -10
  49. package/dist/cjs/plugins/table/pm-plugins/table-resizing/plugin-key.js +0 -2
  50. package/dist/cjs/plugins/table/pm-plugins/table-resizing/plugin.js +5 -19
  51. package/dist/cjs/plugins/table/pm-plugins/table-resizing/reducer.js +0 -10
  52. package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/colgroup.js +0 -15
  53. package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/column-state.js +8 -28
  54. package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/content-width.js +3 -23
  55. package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/dom.js +4 -46
  56. package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/index.js +0 -9
  57. package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/misc.js +15 -36
  58. package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/resize-column.js +1 -4
  59. package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/resize-logic.js +15 -71
  60. package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +34 -82
  61. package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/scale-table.js +12 -36
  62. package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/unit-to-number.js +0 -2
  63. package/dist/cjs/plugins/table/pm-plugins/table-selection-keymap.js +0 -5
  64. package/dist/cjs/plugins/table/reducer.js +0 -24
  65. package/dist/cjs/plugins/table/toolbar.js +14 -94
  66. package/dist/cjs/plugins/table/transforms/column-width.js +12 -45
  67. package/dist/cjs/plugins/table/transforms/delete-columns.js +11 -76
  68. package/dist/cjs/plugins/table/transforms/delete-rows.js +4 -42
  69. package/dist/cjs/plugins/table/transforms/fix-tables.js +24 -61
  70. package/dist/cjs/plugins/table/transforms/index.js +0 -7
  71. package/dist/cjs/plugins/table/transforms/merge.js +14 -90
  72. package/dist/cjs/plugins/table/transforms/metadata.js +0 -5
  73. package/dist/cjs/plugins/table/transforms/replace-table.js +2 -13
  74. package/dist/cjs/plugins/table/transforms/split.js +18 -32
  75. package/dist/cjs/plugins/table/types.js +0 -11
  76. package/dist/cjs/plugins/table/ui/FloatingContextualButton/index.js +10 -51
  77. package/dist/cjs/plugins/table/ui/FloatingContextualButton/styles.js +0 -12
  78. package/dist/cjs/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +46 -145
  79. package/dist/cjs/plugins/table/ui/FloatingContextualMenu/index.js +12 -35
  80. package/dist/cjs/plugins/table/ui/FloatingContextualMenu/styles.js +0 -11
  81. package/dist/cjs/plugins/table/ui/FloatingDeleteButton/DeleteButton.js +5 -12
  82. package/dist/cjs/plugins/table/ui/FloatingDeleteButton/getPopUpOptions.js +3 -16
  83. package/dist/cjs/plugins/table/ui/FloatingDeleteButton/index.js +19 -89
  84. package/dist/cjs/plugins/table/ui/FloatingInsertButton/InsertButton.js +6 -31
  85. package/dist/cjs/plugins/table/ui/FloatingInsertButton/getPopupOptions.js +5 -22
  86. package/dist/cjs/plugins/table/ui/FloatingInsertButton/index.js +25 -80
  87. package/dist/cjs/plugins/table/ui/LayoutButton/index.js +16 -64
  88. package/dist/cjs/plugins/table/ui/TableFloatingControls/CornerControls/index.js +14 -47
  89. package/dist/cjs/plugins/table/ui/TableFloatingControls/NumberColumn/index.js +20 -48
  90. package/dist/cjs/plugins/table/ui/TableFloatingControls/RowControls/index.js +10 -43
  91. package/dist/cjs/plugins/table/ui/TableFloatingControls/index.js +33 -74
  92. package/dist/cjs/plugins/table/ui/common-styles.js +6 -19
  93. package/dist/cjs/plugins/table/ui/consts.js +3 -8
  94. package/dist/cjs/plugins/table/ui/messages.js +0 -3
  95. package/dist/cjs/plugins/table/ui/ui-styles.js +0 -32
  96. package/dist/cjs/plugins/table/utils/analytics.js +4 -19
  97. package/dist/cjs/plugins/table/utils/collapse.js +4 -21
  98. package/dist/cjs/plugins/table/utils/column-controls.js +25 -61
  99. package/dist/cjs/plugins/table/utils/decoration.js +46 -114
  100. package/dist/cjs/plugins/table/utils/dom.js +4 -51
  101. package/dist/cjs/plugins/table/utils/get-allow-add-column-custom-step.js +0 -2
  102. package/dist/cjs/plugins/table/utils/index.js +0 -10
  103. package/dist/cjs/plugins/table/utils/nodes.js +5 -48
  104. package/dist/cjs/plugins/table/utils/paste.js +22 -47
  105. package/dist/cjs/plugins/table/utils/row-controls.js +6 -67
  106. package/dist/cjs/plugins/table/utils/selection.js +3 -36
  107. package/dist/cjs/plugins/table/utils/table.js +0 -11
  108. package/dist/cjs/plugins/table/utils/update-plugin-state-decorations.js +0 -4
  109. package/dist/cjs/plugins/table-plugin.js +0 -3
  110. package/dist/cjs/version.json +1 -1
  111. package/dist/es2019/plugins/table/commands/clear.js +3 -8
  112. package/dist/es2019/plugins/table/commands/collapse.js +0 -3
  113. package/dist/es2019/plugins/table/commands/go-to-next-cell.js +4 -7
  114. package/dist/es2019/plugins/table/commands/hover.js +7 -17
  115. package/dist/es2019/plugins/table/commands/insert.js +16 -36
  116. package/dist/es2019/plugins/table/commands/misc.js +37 -67
  117. package/dist/es2019/plugins/table/commands/selection.js +7 -62
  118. package/dist/es2019/plugins/table/commands/sort.js +0 -12
  119. package/dist/es2019/plugins/table/commands/split-cell.js +0 -4
  120. package/dist/es2019/plugins/table/commands/toggle.js +13 -15
  121. package/dist/es2019/plugins/table/commands-with-analytics.js +4 -14
  122. package/dist/es2019/plugins/table/event-handlers.js +14 -62
  123. package/dist/es2019/plugins/table/handlers.js +16 -26
  124. package/dist/es2019/plugins/table/index.js +12 -25
  125. package/dist/es2019/plugins/table/nodeviews/OverflowShadowsObserver.js +8 -40
  126. package/dist/es2019/plugins/table/nodeviews/TableComponent.js +27 -100
  127. package/dist/es2019/plugins/table/nodeviews/table.js +3 -33
  128. package/dist/es2019/plugins/table/nodeviews/tableCell.js +7 -16
  129. package/dist/es2019/plugins/table/nodeviews/update-overflow-shadows.js +3 -10
  130. package/dist/es2019/plugins/table/pm-plugins/decorations/plugin.js +0 -5
  131. package/dist/es2019/plugins/table/pm-plugins/decorations/utils/column-controls.js +4 -13
  132. package/dist/es2019/plugins/table/pm-plugins/decorations/utils/column-resizing.js +0 -3
  133. package/dist/es2019/plugins/table/pm-plugins/keymap.js +2 -3
  134. package/dist/es2019/plugins/table/pm-plugins/main.js +19 -43
  135. package/dist/es2019/plugins/table/pm-plugins/plugin-factory.js +2 -6
  136. package/dist/es2019/plugins/table/pm-plugins/safari-delayed-dom-selection-syncing-workaround.js +8 -3
  137. package/dist/es2019/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.js +0 -12
  138. package/dist/es2019/plugins/table/pm-plugins/sticky-headers/nodeviews/dom.js +4 -9
  139. package/dist/es2019/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +55 -130
  140. package/dist/es2019/plugins/table/pm-plugins/sticky-headers/plugin-state.js +2 -9
  141. package/dist/es2019/plugins/table/pm-plugins/sticky-headers/util.js +0 -3
  142. package/dist/es2019/plugins/table/pm-plugins/table-local-id.js +20 -39
  143. package/dist/es2019/plugins/table/pm-plugins/table-resizing/commands.js +7 -15
  144. package/dist/es2019/plugins/table/pm-plugins/table-resizing/event-handlers.js +9 -27
  145. package/dist/es2019/plugins/table/pm-plugins/table-resizing/plugin-factory.js +2 -4
  146. package/dist/es2019/plugins/table/pm-plugins/table-resizing/plugin.js +2 -5
  147. package/dist/es2019/plugins/table/pm-plugins/table-resizing/reducer.js +8 -8
  148. package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/colgroup.js +0 -4
  149. package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/column-state.js +8 -11
  150. package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/content-width.js +4 -21
  151. package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/dom.js +3 -22
  152. package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/misc.js +10 -18
  153. package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/resize-logic.js +29 -59
  154. package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +54 -51
  155. package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/scale-table.js +9 -14
  156. package/dist/es2019/plugins/table/reducer.js +26 -30
  157. package/dist/es2019/plugins/table/toolbar.js +5 -48
  158. package/dist/es2019/plugins/table/transforms/column-width.js +16 -28
  159. package/dist/es2019/plugins/table/transforms/delete-columns.js +17 -58
  160. package/dist/es2019/plugins/table/transforms/delete-rows.js +8 -25
  161. package/dist/es2019/plugins/table/transforms/fix-tables.js +25 -42
  162. package/dist/es2019/plugins/table/transforms/merge.js +22 -70
  163. package/dist/es2019/plugins/table/transforms/metadata.js +3 -2
  164. package/dist/es2019/plugins/table/transforms/replace-table.js +0 -2
  165. package/dist/es2019/plugins/table/transforms/split.js +16 -19
  166. package/dist/es2019/plugins/table/types.js +2 -4
  167. package/dist/es2019/plugins/table/ui/FloatingContextualButton/index.js +2 -16
  168. package/dist/es2019/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +8 -54
  169. package/dist/es2019/plugins/table/ui/FloatingContextualMenu/index.js +4 -13
  170. package/dist/es2019/plugins/table/ui/FloatingDeleteButton/DeleteButton.js +0 -2
  171. package/dist/es2019/plugins/table/ui/FloatingDeleteButton/getPopUpOptions.js +2 -11
  172. package/dist/es2019/plugins/table/ui/FloatingDeleteButton/index.js +13 -49
  173. package/dist/es2019/plugins/table/ui/FloatingInsertButton/InsertButton.js +0 -8
  174. package/dist/es2019/plugins/table/ui/FloatingInsertButton/getPopupOptions.js +16 -24
  175. package/dist/es2019/plugins/table/ui/FloatingInsertButton/index.js +3 -31
  176. package/dist/es2019/plugins/table/ui/LayoutButton/index.js +2 -29
  177. package/dist/es2019/plugins/table/ui/TableFloatingControls/CornerControls/index.js +0 -12
  178. package/dist/es2019/plugins/table/ui/TableFloatingControls/NumberColumn/index.js +6 -12
  179. package/dist/es2019/plugins/table/ui/TableFloatingControls/RowControls/index.js +0 -9
  180. package/dist/es2019/plugins/table/ui/TableFloatingControls/index.js +4 -19
  181. package/dist/es2019/plugins/table/ui/common-styles.js +6 -5
  182. package/dist/es2019/plugins/table/ui/consts.js +4 -3
  183. package/dist/es2019/plugins/table/ui/ui-styles.js +0 -10
  184. package/dist/es2019/plugins/table/utils/analytics.js +0 -8
  185. package/dist/es2019/plugins/table/utils/collapse.js +3 -14
  186. package/dist/es2019/plugins/table/utils/column-controls.js +22 -37
  187. package/dist/es2019/plugins/table/utils/decoration.js +13 -51
  188. package/dist/es2019/plugins/table/utils/dom.js +3 -19
  189. package/dist/es2019/plugins/table/utils/nodes.js +2 -15
  190. package/dist/es2019/plugins/table/utils/paste.js +17 -22
  191. package/dist/es2019/plugins/table/utils/row-controls.js +12 -45
  192. package/dist/es2019/plugins/table/utils/selection.js +0 -21
  193. package/dist/es2019/plugins/table/utils/table.js +0 -2
  194. package/dist/es2019/version.json +1 -1
  195. package/dist/esm/plugins/table/commands/clear.js +3 -8
  196. package/dist/esm/plugins/table/commands/collapse.js +0 -3
  197. package/dist/esm/plugins/table/commands/go-to-next-cell.js +6 -9
  198. package/dist/esm/plugins/table/commands/hover.js +8 -18
  199. package/dist/esm/plugins/table/commands/insert.js +16 -36
  200. package/dist/esm/plugins/table/commands/misc.js +39 -78
  201. package/dist/esm/plugins/table/commands/selection.js +21 -78
  202. package/dist/esm/plugins/table/commands/sort.js +2 -14
  203. package/dist/esm/plugins/table/commands/split-cell.js +3 -8
  204. package/dist/esm/plugins/table/commands/toggle.js +11 -20
  205. package/dist/esm/plugins/table/commands-with-analytics.js +50 -85
  206. package/dist/esm/plugins/table/create-plugin-config.js +0 -3
  207. package/dist/esm/plugins/table/event-handlers.js +58 -123
  208. package/dist/esm/plugins/table/handlers.js +11 -29
  209. package/dist/esm/plugins/table/index.js +47 -60
  210. package/dist/esm/plugins/table/nodeviews/OverflowShadowsObserver.js +8 -44
  211. package/dist/esm/plugins/table/nodeviews/TableComponent.js +82 -181
  212. package/dist/esm/plugins/table/nodeviews/table.js +12 -52
  213. package/dist/esm/plugins/table/nodeviews/tableCell.js +15 -33
  214. package/dist/esm/plugins/table/nodeviews/update-overflow-shadows.js +3 -10
  215. package/dist/esm/plugins/table/pm-plugins/decorations/plugin.js +0 -5
  216. package/dist/esm/plugins/table/pm-plugins/decorations/utils/column-controls.js +8 -19
  217. package/dist/esm/plugins/table/pm-plugins/decorations/utils/column-resizing.js +8 -13
  218. package/dist/esm/plugins/table/pm-plugins/decorations/utils/compose-decorations.js +1 -1
  219. package/dist/esm/plugins/table/pm-plugins/keymap.js +2 -3
  220. package/dist/esm/plugins/table/pm-plugins/main.js +20 -47
  221. package/dist/esm/plugins/table/pm-plugins/plugin-factory.js +25 -37
  222. package/dist/esm/plugins/table/pm-plugins/safari-delayed-dom-selection-syncing-workaround.js +8 -3
  223. package/dist/esm/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.js +3 -15
  224. package/dist/esm/plugins/table/pm-plugins/sticky-headers/nodeviews/dom.js +4 -9
  225. package/dist/esm/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +58 -147
  226. package/dist/esm/plugins/table/pm-plugins/sticky-headers/plugin-state.js +15 -27
  227. package/dist/esm/plugins/table/pm-plugins/sticky-headers/util.js +0 -3
  228. package/dist/esm/plugins/table/pm-plugins/table-local-id.js +14 -37
  229. package/dist/esm/plugins/table/pm-plugins/table-resizing/commands.js +12 -24
  230. package/dist/esm/plugins/table/pm-plugins/table-resizing/event-handlers.js +16 -36
  231. package/dist/esm/plugins/table/pm-plugins/table-resizing/plugin-factory.js +0 -6
  232. package/dist/esm/plugins/table/pm-plugins/table-resizing/plugin.js +5 -8
  233. package/dist/esm/plugins/table/pm-plugins/table-resizing/reducer.js +0 -7
  234. package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/colgroup.js +0 -4
  235. package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/column-state.js +8 -12
  236. package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/content-width.js +5 -22
  237. package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/dom.js +4 -23
  238. package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/misc.js +15 -23
  239. package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/resize-logic.js +15 -60
  240. package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +34 -55
  241. package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/scale-table.js +12 -24
  242. package/dist/esm/plugins/table/reducer.js +0 -20
  243. package/dist/esm/plugins/table/toolbar.js +13 -63
  244. package/dist/esm/plugins/table/transforms/column-width.js +12 -32
  245. package/dist/esm/plugins/table/transforms/delete-columns.js +11 -62
  246. package/dist/esm/plugins/table/transforms/delete-rows.js +4 -30
  247. package/dist/esm/plugins/table/transforms/fix-tables.js +24 -49
  248. package/dist/esm/plugins/table/transforms/merge.js +16 -75
  249. package/dist/esm/plugins/table/transforms/metadata.js +3 -2
  250. package/dist/esm/plugins/table/transforms/replace-table.js +2 -6
  251. package/dist/esm/plugins/table/transforms/split.js +18 -29
  252. package/dist/esm/plugins/table/types.js +0 -6
  253. package/dist/esm/plugins/table/ui/FloatingContextualButton/index.js +10 -31
  254. package/dist/esm/plugins/table/ui/FloatingContextualButton/styles.js +0 -2
  255. package/dist/esm/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +46 -126
  256. package/dist/esm/plugins/table/ui/FloatingContextualMenu/index.js +13 -24
  257. package/dist/esm/plugins/table/ui/FloatingContextualMenu/styles.js +0 -2
  258. package/dist/esm/plugins/table/ui/FloatingDeleteButton/DeleteButton.js +5 -7
  259. package/dist/esm/plugins/table/ui/FloatingDeleteButton/getPopUpOptions.js +3 -13
  260. package/dist/esm/plugins/table/ui/FloatingDeleteButton/index.js +19 -68
  261. package/dist/esm/plugins/table/ui/FloatingInsertButton/InsertButton.js +6 -14
  262. package/dist/esm/plugins/table/ui/FloatingInsertButton/getPopupOptions.js +5 -18
  263. package/dist/esm/plugins/table/ui/FloatingInsertButton/index.js +25 -57
  264. package/dist/esm/plugins/table/ui/LayoutButton/index.js +16 -47
  265. package/dist/esm/plugins/table/ui/TableFloatingControls/CornerControls/index.js +14 -35
  266. package/dist/esm/plugins/table/ui/TableFloatingControls/NumberColumn/index.js +20 -38
  267. package/dist/esm/plugins/table/ui/TableFloatingControls/RowControls/index.js +10 -29
  268. package/dist/esm/plugins/table/ui/TableFloatingControls/index.js +33 -62
  269. package/dist/esm/plugins/table/ui/common-styles.js +6 -7
  270. package/dist/esm/plugins/table/ui/consts.js +4 -3
  271. package/dist/esm/plugins/table/ui/ui-styles.js +0 -12
  272. package/dist/esm/plugins/table/utils/analytics.js +4 -13
  273. package/dist/esm/plugins/table/utils/collapse.js +4 -15
  274. package/dist/esm/plugins/table/utils/column-controls.js +25 -41
  275. package/dist/esm/plugins/table/utils/decoration.js +46 -88
  276. package/dist/esm/plugins/table/utils/dom.js +4 -20
  277. package/dist/esm/plugins/table/utils/nodes.js +5 -18
  278. package/dist/esm/plugins/table/utils/paste.js +24 -29
  279. package/dist/esm/plugins/table/utils/row-controls.js +6 -46
  280. package/dist/esm/plugins/table/utils/selection.js +3 -26
  281. package/dist/esm/plugins/table/utils/table.js +0 -2
  282. package/dist/esm/version.json +1 -1
  283. package/package.json +2 -2
  284. package/src/__tests__/visual-regression/cell-options-menu.ts +1 -12
@@ -1,97 +1,61 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.default = void 0;
9
-
10
8
  var _react = _interopRequireDefault(require("react"));
11
-
12
9
  var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
13
-
14
10
  var _utils = require("@atlaskit/editor-common/utils");
15
-
16
11
  var _pmPlugins = require("@atlaskit/editor-tables/pm-plugins");
17
-
18
12
  var _utils2 = require("@atlaskit/editor-tables/utils");
19
-
20
13
  var _adfSchema = require("@atlaskit/adf-schema");
21
-
22
14
  var _keymaps = require("@atlaskit/editor-common/keymaps");
23
-
24
15
  var _withPluginState = require("@atlaskit/editor-common/with-plugin-state");
25
-
26
16
  var _analytics = require("@atlaskit/editor-common/analytics");
27
-
28
17
  var _messages = require("@atlaskit/editor-common/messages");
29
-
30
18
  var _icons = require("@atlaskit/editor-common/icons");
31
-
32
19
  var _createPluginConfig = require("./create-plugin-config");
33
-
34
20
  var _tableLocalId = require("./pm-plugins/table-local-id");
35
-
36
21
  var _safariDelayedDomSelectionSyncingWorkaround = require("./pm-plugins/safari-delayed-dom-selection-syncing-workaround");
37
-
38
22
  var _safariDeleteCompositionTextIssueWorkaround = require("./pm-plugins/safari-delete-composition-text-issue-workaround");
39
-
40
23
  var _plugin = require("./pm-plugins/decorations/plugin");
41
-
42
24
  var _keymap = require("./pm-plugins/keymap");
43
-
44
25
  var _tableSelectionKeymap = require("./pm-plugins/table-selection-keymap");
45
-
46
26
  var _main = require("./pm-plugins/main");
47
-
48
27
  var _pluginKey = require("./pm-plugins/plugin-key");
49
-
50
28
  var _stickyHeaders = require("./pm-plugins/sticky-headers");
51
-
52
29
  var _tableResizing = require("./pm-plugins/table-resizing");
53
-
54
30
  var _toolbar = require("./toolbar");
55
-
56
31
  var _FloatingContextualButton = _interopRequireDefault(require("./ui/FloatingContextualButton"));
57
-
58
32
  var _FloatingContextualMenu = _interopRequireDefault(require("./ui/FloatingContextualMenu"));
59
-
60
33
  var _FloatingDeleteButton = _interopRequireDefault(require("./ui/FloatingDeleteButton"));
61
-
62
34
  var _FloatingInsertButton = _interopRequireDefault(require("./ui/FloatingInsertButton"));
63
-
64
35
  var _LayoutButton = _interopRequireDefault(require("./ui/LayoutButton"));
65
-
66
36
  var _utils3 = require("./utils");
67
-
68
37
  var _errorBoundary = require("@atlaskit/editor-common/error-boundary");
69
-
70
38
  var defaultGetEditorFeatureFlags = function defaultGetEditorFeatureFlags() {
71
39
  return {};
72
40
  };
73
-
74
41
  var tablesPlugin = function tablesPlugin(options) {
75
42
  var editorViewRef = {
76
43
  current: null
77
44
  };
78
-
79
45
  var defaultGetEditorContainerWidth = function defaultGetEditorContainerWidth() {
80
46
  if (!editorViewRef.current) {
81
47
  var _document, _document$body;
82
-
83
48
  return {
84
49
  width: ((_document = document) === null || _document === void 0 ? void 0 : (_document$body = _document.body) === null || _document$body === void 0 ? void 0 : _document$body.offsetWidth) || 500
85
50
  };
86
51
  }
52
+ var state = editorViewRef.current.state;
87
53
 
88
- var state = editorViewRef.current.state; // TODO: ED-15663
54
+ // TODO: ED-15663
89
55
  // Please, do not copy or use this kind of code below
90
56
  // @ts-ignore
91
-
92
57
  return state['widthPlugin$'];
93
58
  };
94
-
95
59
  return {
96
60
  name: 'table',
97
61
  nodes: function nodes() {
@@ -114,34 +78,29 @@ var tablesPlugin = function tablesPlugin(options) {
114
78
  name: 'table',
115
79
  plugin: function plugin(_ref) {
116
80
  var dispatchAnalyticsEvent = _ref.dispatchAnalyticsEvent,
117
- dispatch = _ref.dispatch,
118
- portalProviderAPI = _ref.portalProviderAPI,
119
- eventDispatcher = _ref.eventDispatcher;
120
-
81
+ dispatch = _ref.dispatch,
82
+ portalProviderAPI = _ref.portalProviderAPI,
83
+ eventDispatcher = _ref.eventDispatcher;
121
84
  var _ref2 = options || {},
122
- fullWidthEnabled = _ref2.fullWidthEnabled,
123
- wasFullWidthEnabled = _ref2.wasFullWidthEnabled,
124
- breakoutEnabled = _ref2.breakoutEnabled,
125
- tableOptions = _ref2.tableOptions,
126
- editorAnalyticsAPI = _ref2.editorAnalyticsAPI,
127
- getEditorFeatureFlags = _ref2.getEditorFeatureFlags;
128
-
85
+ fullWidthEnabled = _ref2.fullWidthEnabled,
86
+ wasFullWidthEnabled = _ref2.wasFullWidthEnabled,
87
+ breakoutEnabled = _ref2.breakoutEnabled,
88
+ tableOptions = _ref2.tableOptions,
89
+ editorAnalyticsAPI = _ref2.editorAnalyticsAPI,
90
+ getEditorFeatureFlags = _ref2.getEditorFeatureFlags;
129
91
  return (0, _main.createPlugin)(dispatchAnalyticsEvent, dispatch, portalProviderAPI, eventDispatcher, (0, _createPluginConfig.pluginConfig)(tableOptions), defaultGetEditorContainerWidth, getEditorFeatureFlags || defaultGetEditorFeatureFlags, breakoutEnabled, fullWidthEnabled, wasFullWidthEnabled, editorAnalyticsAPI);
130
92
  }
131
93
  }, {
132
94
  name: 'tablePMColResizing',
133
95
  plugin: function plugin(_ref3) {
134
96
  var dispatch = _ref3.dispatch;
135
-
136
97
  var _ref4 = options || {},
137
- fullWidthEnabled = _ref4.fullWidthEnabled,
138
- tableOptions = _ref4.tableOptions,
139
- editorAnalyticsAPI = _ref4.editorAnalyticsAPI,
140
- getEditorFeatureFlags = _ref4.getEditorFeatureFlags;
141
-
98
+ fullWidthEnabled = _ref4.fullWidthEnabled,
99
+ tableOptions = _ref4.tableOptions,
100
+ editorAnalyticsAPI = _ref4.editorAnalyticsAPI,
101
+ getEditorFeatureFlags = _ref4.getEditorFeatureFlags;
142
102
  var _pluginConfig = (0, _createPluginConfig.pluginConfig)(tableOptions),
143
- allowColumnResizing = _pluginConfig.allowColumnResizing;
144
-
103
+ allowColumnResizing = _pluginConfig.allowColumnResizing;
145
104
  return allowColumnResizing ? (0, _tableResizing.createPlugin)(dispatch, {
146
105
  lastColumnResizable: !fullWidthEnabled
147
106
  }, defaultGetEditorContainerWidth, getEditorFeatureFlags || defaultGetEditorFeatureFlags, editorAnalyticsAPI) : undefined;
@@ -151,7 +110,8 @@ var tablesPlugin = function tablesPlugin(options) {
151
110
  plugin: function plugin() {
152
111
  return (0, _plugin.createPlugin)();
153
112
  }
154
- }, // Needs to be lower priority than editor-tables.tableEditing
113
+ },
114
+ // Needs to be lower priority than editor-tables.tableEditing
155
115
  // plugin as it is currently swallowing backspace events inside tables
156
116
  {
157
117
  name: 'tableKeymap',
@@ -169,10 +129,9 @@ var tablesPlugin = function tablesPlugin(options) {
169
129
  return (0, _pmPlugins.tableEditing)({
170
130
  reportFixedTable: function reportFixedTable(_ref5) {
171
131
  var _options$editorAnalyt;
172
-
173
132
  var state = _ref5.state,
174
- tr = _ref5.tr,
175
- reason = _ref5.reason;
133
+ tr = _ref5.tr,
134
+ reason = _ref5.reason;
176
135
  options === null || options === void 0 ? void 0 : (_options$editorAnalyt = options.editorAnalyticsAPI) === null || _options$editorAnalyt === void 0 ? void 0 : _options$editorAnalyt.attachAnalyticsEvent({
177
136
  action: _analytics.TABLE_ACTION.FIXED,
178
137
  actionSubject: _analytics.ACTION_SUBJECT.TABLE,
@@ -189,7 +148,7 @@ var tablesPlugin = function tablesPlugin(options) {
189
148
  name: 'tableStickyHeaders',
190
149
  plugin: function plugin(_ref6) {
191
150
  var dispatch = _ref6.dispatch,
192
- eventDispatcher = _ref6.eventDispatcher;
151
+ eventDispatcher = _ref6.eventDispatcher;
193
152
  return options && options.tableOptions.stickyHeaders ? (0, _stickyHeaders.createPlugin)(dispatch, eventDispatcher, function () {
194
153
  return [];
195
154
  }, (options === null || options === void 0 ? void 0 : options.getEditorFeatureFlags) || defaultGetEditorFeatureFlags) : undefined;
@@ -214,12 +173,14 @@ var tablesPlugin = function tablesPlugin(options) {
214
173
  }
215
174
  });
216
175
  }
217
- }]; // workaround for prosemirrors delayed dom selection syncing during pointer drag
176
+ }];
177
+
178
+ // workaround for prosemirrors delayed dom selection syncing during pointer drag
218
179
  // causing issues with table selections in Safari
219
180
  // https://github.com/ProseMirror/prosemirror-view/commit/885258b80551ac87b81601d3ed25f552aeb22293
181
+
220
182
  // NOTE: this workaround can be removed when next upgrading prosemirror as the issue will be fixed
221
183
  // https://github.com/ProseMirror/prosemirror-view/pull/116
222
-
223
184
  if (_utils.browser.safari) {
224
185
  plugins.push({
225
186
  name: 'tableSafariDelayedDomSelectionSyncingWorkaround',
@@ -227,10 +188,10 @@ var tablesPlugin = function tablesPlugin(options) {
227
188
  return (0, _safariDelayedDomSelectionSyncingWorkaround.createPlugin)();
228
189
  }
229
190
  });
230
- } // Workaround for table element breaking issue caused by composition event with an inputType of deleteCompositionText.
231
- // https://github.com/ProseMirror/prosemirror/issues/934
232
-
191
+ }
233
192
 
193
+ // Workaround for table element breaking issue caused by composition event with an inputType of deleteCompositionText.
194
+ // https://github.com/ProseMirror/prosemirror/issues/934
234
195
  if (_utils.browser.safari) {
235
196
  plugins.push({
236
197
  name: 'tableSafariDeleteCompositionTextIssueWorkaround',
@@ -239,15 +200,14 @@ var tablesPlugin = function tablesPlugin(options) {
239
200
  }
240
201
  });
241
202
  }
242
-
243
203
  return plugins;
244
204
  },
245
205
  contentComponent: function contentComponent(_ref8) {
246
206
  var editorView = _ref8.editorView,
247
- popupsMountPoint = _ref8.popupsMountPoint,
248
- popupsBoundariesElement = _ref8.popupsBoundariesElement,
249
- popupsScrollableElement = _ref8.popupsScrollableElement,
250
- dispatchAnalyticsEvent = _ref8.dispatchAnalyticsEvent;
207
+ popupsMountPoint = _ref8.popupsMountPoint,
208
+ popupsBoundariesElement = _ref8.popupsBoundariesElement,
209
+ popupsScrollableElement = _ref8.popupsScrollableElement,
210
+ dispatchAnalyticsEvent = _ref8.dispatchAnalyticsEvent;
251
211
  return /*#__PURE__*/_react.default.createElement(_errorBoundary.ErrorBoundary, {
252
212
  component: _analytics.ACTION_SUBJECT.TABLES_PLUGIN,
253
213
  dispatchAnalyticsEvent: dispatchAnalyticsEvent,
@@ -260,23 +220,23 @@ var tablesPlugin = function tablesPlugin(options) {
260
220
  },
261
221
  render: function render(_ref9) {
262
222
  var resizingPluginState = _ref9.tableResizingPluginState,
263
- stickyHeadersState = _ref9.stickyHeadersState,
264
- tablePluginState = _ref9.tablePluginState;
223
+ stickyHeadersState = _ref9.stickyHeadersState,
224
+ tablePluginState = _ref9.tablePluginState;
265
225
  var state = editorView.state;
266
226
  var isDragging = resizingPluginState === null || resizingPluginState === void 0 ? void 0 : resizingPluginState.dragging;
267
227
  var _ref10 = tablePluginState,
268
- tableNode = _ref10.tableNode,
269
- tablePos = _ref10.tablePos,
270
- targetCellPosition = _ref10.targetCellPosition,
271
- isContextualMenuOpen = _ref10.isContextualMenuOpen,
272
- layout = _ref10.layout,
273
- tableRef = _ref10.tableRef,
274
- pluginConfig = _ref10.pluginConfig,
275
- insertColumnButtonIndex = _ref10.insertColumnButtonIndex,
276
- insertRowButtonIndex = _ref10.insertRowButtonIndex,
277
- isHeaderColumnEnabled = _ref10.isHeaderColumnEnabled,
278
- isHeaderRowEnabled = _ref10.isHeaderRowEnabled,
279
- tableWrapperTarget = _ref10.tableWrapperTarget;
228
+ tableNode = _ref10.tableNode,
229
+ tablePos = _ref10.tablePos,
230
+ targetCellPosition = _ref10.targetCellPosition,
231
+ isContextualMenuOpen = _ref10.isContextualMenuOpen,
232
+ layout = _ref10.layout,
233
+ tableRef = _ref10.tableRef,
234
+ pluginConfig = _ref10.pluginConfig,
235
+ insertColumnButtonIndex = _ref10.insertColumnButtonIndex,
236
+ insertRowButtonIndex = _ref10.insertRowButtonIndex,
237
+ isHeaderColumnEnabled = _ref10.isHeaderColumnEnabled,
238
+ isHeaderRowEnabled = _ref10.isHeaderRowEnabled,
239
+ tableWrapperTarget = _ref10.tableWrapperTarget;
280
240
  var allowControls = pluginConfig.allowControls;
281
241
  var stickyHeader = stickyHeadersState ? (0, _stickyHeaders.findStickyHeaderForTable)(stickyHeadersState, tablePos) : undefined;
282
242
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, targetCellPosition && tableRef && !isDragging && options && options.allowContextualMenu && /*#__PURE__*/_react.default.createElement(_FloatingContextualButton.default, {
@@ -343,13 +303,11 @@ var tablesPlugin = function tablesPlugin(options) {
343
303
  // For now, we are using this on (insert-api/api.ts) but we may create a proper place for it
344
304
  createNodeHandler: function createNodeHandler(_ref11) {
345
305
  var nodeName = _ref11.nodeName,
346
- schema = _ref11.schema;
347
-
306
+ schema = _ref11.schema;
348
307
  // An EditorPlugin may manage more than one node.
349
308
  if (nodeName !== 'table') {
350
309
  return null;
351
310
  }
352
-
353
311
  var table = (0, _utils2.createTable)({
354
312
  schema: schema
355
313
  });
@@ -369,7 +327,6 @@ var tablesPlugin = function tablesPlugin(options) {
369
327
  },
370
328
  action: function action(insert, state) {
371
329
  var _options$editorAnalyt2;
372
-
373
330
  var tr = insert((0, _utils2.createTable)({
374
331
  schema: state.schema
375
332
  }));
@@ -392,6 +349,5 @@ var tablesPlugin = function tablesPlugin(options) {
392
349
  }
393
350
  };
394
351
  };
395
-
396
352
  var _default = tablesPlugin;
397
353
  exports.default = _default;
@@ -1,68 +1,50 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.OverflowShadowsObserver = void 0;
9
-
10
8
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
11
-
12
9
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
13
-
14
10
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
15
-
16
11
  var _types = require("../types");
17
-
18
12
  var _consts = require("../ui/consts");
19
-
20
13
  var _updateOverflowShadows = require("./update-overflow-shadows");
21
-
22
14
  var OverflowShadowsObserver = /*#__PURE__*/function () {
23
15
  // updateShadowState is a method to update shadow key
24
16
  function OverflowShadowsObserver(updateShadowState, _table, wrapper) {
25
17
  var _this = this;
26
-
27
18
  (0, _classCallCheck2.default)(this, OverflowShadowsObserver);
28
19
  (0, _defineProperty2.default)(this, "firstCell", null);
29
20
  (0, _defineProperty2.default)(this, "lastCell", null);
30
21
  (0, _defineProperty2.default)(this, "getFirstCell", function (isSticky, hasHeaderRow) {
31
22
  var _this$table;
32
-
33
23
  return (_this$table = _this.table) === null || _this$table === void 0 ? void 0 : _this$table.querySelector(isSticky || !hasHeaderRow ? 'table tbody tr td' : 'table tbody tr th');
34
24
  });
35
25
  (0, _defineProperty2.default)(this, "getLastCell", function (isSticky, hasHeaderRow) {
36
26
  var _this$table2;
37
-
38
27
  return (_this$table2 = _this.table) === null || _this$table2 === void 0 ? void 0 : _this$table2.querySelector(isSticky || !hasHeaderRow ? 'table tbody tr td:last-child' : 'table tbody tr th:last-child');
39
28
  });
40
29
  (0, _defineProperty2.default)(this, "isSticky", false);
41
30
  (0, _defineProperty2.default)(this, "stickyRowHeight", 0);
42
31
  (0, _defineProperty2.default)(this, "init", function () {
43
32
  var table = _this.table;
44
-
45
33
  if (!_this.wrapper || !table) {
46
34
  return;
47
35
  }
48
-
49
36
  if (!_this.tableIntersectionObserver) {
50
37
  var intersectonOnbserverCallback = function intersectonOnbserverCallback(entry) {
51
38
  var _entry$rootBounds, _entry$rootBounds2;
52
-
53
39
  if (!((_entry$rootBounds = entry.rootBounds) !== null && _entry$rootBounds !== void 0 && _entry$rootBounds.height) && !((_entry$rootBounds2 = entry.rootBounds) !== null && _entry$rootBounds2 !== void 0 && _entry$rootBounds2.width)) {
54
40
  return;
55
41
  }
56
-
57
42
  if (entry.target !== _this.firstCell && entry.target !== _this.lastCell) {
58
43
  return;
59
44
  }
60
-
61
45
  _this.updateStickyShadowsHeightIfChanged();
62
-
63
46
  _this.checkIntersectionEvent(entry, _this.firstCell === entry.target ? _types.ShadowEvent.SHOW_BEFORE_SHADOW : _types.ShadowEvent.SHOW_AFTER_SHADOW);
64
47
  };
65
-
66
48
  _this.tableIntersectionObserver = new IntersectionObserver(function (entries, _) {
67
49
  entries.forEach(function (entry) {
68
50
  return intersectonOnbserverCallback(entry);
@@ -76,57 +58,49 @@ var OverflowShadowsObserver = /*#__PURE__*/function () {
76
58
  }
77
59
  });
78
60
  (0, _defineProperty2.default)(this, "checkIntersectionEvent", function (entry, shadowKey) {
79
- if ( // If it's in full view, don't show shadow.
61
+ if (
62
+ // If it's in full view, don't show shadow.
80
63
  entry.isIntersecting && entry.intersectionRatio === 1) {
81
64
  _this.updateShadowState(shadowKey, false);
82
- } else if ( // If it's in partial view, show a shadow
65
+ } else if (
66
+ // If it's in partial view, show a shadow
83
67
  entry.intersectionRatio < 1) {
84
68
  _this.updateShadowState(shadowKey, true);
85
69
  }
86
70
  });
87
71
  (0, _defineProperty2.default)(this, "observeCells", function (isSticky, hasHeaderRow) {
88
72
  var stickyChanged = !!isSticky !== _this.isSticky;
89
- _this.isSticky = !!isSticky; // update sticky shadows
73
+ _this.isSticky = !!isSticky;
90
74
 
75
+ // update sticky shadows
91
76
  _this.updateStickyShadowsHeightIfChanged();
92
-
93
77
  if (!stickyChanged) {
94
78
  var firstCell = _this.getFirstCell(isSticky, hasHeaderRow);
95
-
96
79
  var lastCell = _this.getLastCell(isSticky, hasHeaderRow);
97
-
98
80
  if (!firstCell || !lastCell || firstCell === _this.firstCell && lastCell === _this.lastCell) {
99
81
  return;
100
82
  }
101
83
  }
102
-
103
84
  _this.firstCell = _this.getFirstCell(isSticky, hasHeaderRow);
104
85
  _this.lastCell = _this.getLastCell(isSticky, hasHeaderRow);
105
-
106
86
  if (_this.tableIntersectionObserver && _this.firstCell && _this.lastCell) {
107
87
  _this.tableIntersectionObserver.disconnect();
108
-
109
88
  _this.tableIntersectionObserver.observe(_this.firstCell);
110
-
111
89
  _this.tableIntersectionObserver.observe(_this.lastCell);
112
90
  }
113
91
  });
114
92
  (0, _defineProperty2.default)(this, "updateStickyShadows", function (stickyRowHeight) {
115
93
  var _this$wrapper, _this$wrapper2, _this$wrapper2$parent, _this$wrapper3, _this$wrapper3$parent;
116
-
117
94
  if (!_this.isSticky) {
118
95
  return;
119
96
  }
120
-
121
97
  var stickyCell = _this.getStickyCell();
122
-
123
98
  if (!stickyCell || !((_this$wrapper = _this.wrapper) !== null && _this$wrapper !== void 0 && _this$wrapper.parentElement)) {
124
99
  return;
125
100
  }
126
-
127
- var heightStyleOrCompute = "".concat(stickyRowHeight || stickyCell.clientHeight + 1, "px"); // Use getElementsByClassName here for a live node list to capture
101
+ var heightStyleOrCompute = "".concat(stickyRowHeight || stickyCell.clientHeight + 1, "px");
102
+ // Use getElementsByClassName here for a live node list to capture
128
103
  // sticky shadows
129
-
130
104
  var liveRightShadows = (_this$wrapper2 = _this.wrapper) === null || _this$wrapper2 === void 0 ? void 0 : (_this$wrapper2$parent = _this$wrapper2.parentElement) === null || _this$wrapper2$parent === void 0 ? void 0 : _this$wrapper2$parent.getElementsByClassName("".concat(_types.TableCssClassName.TABLE_RIGHT_SHADOW));
131
105
  var liveLeftShadows = (_this$wrapper3 = _this.wrapper) === null || _this$wrapper3 === void 0 ? void 0 : (_this$wrapper3$parent = _this$wrapper3.parentElement) === null || _this$wrapper3$parent === void 0 ? void 0 : _this$wrapper3$parent.getElementsByClassName("".concat(_types.TableCssClassName.TABLE_LEFT_SHADOW));
132
106
  (0, _updateOverflowShadows.updateShadowListForStickyStyles)(heightStyleOrCompute, liveLeftShadows);
@@ -137,22 +111,17 @@ var OverflowShadowsObserver = /*#__PURE__*/function () {
137
111
  this.wrapper = wrapper;
138
112
  this.init();
139
113
  }
140
-
141
114
  (0, _createClass2.default)(OverflowShadowsObserver, [{
142
115
  key: "updateStickyShadowsHeightIfChanged",
143
116
  value: function updateStickyShadowsHeightIfChanged() {
144
117
  if (!this.isSticky) {
145
118
  return;
146
119
  }
147
-
148
120
  var stickyCell = this.getStickyCell();
149
-
150
121
  if (!stickyCell) {
151
122
  return;
152
123
  }
153
-
154
124
  var newStickyRowHeight = stickyCell.clientHeight + 1;
155
-
156
125
  if (newStickyRowHeight === this.stickyRowHeight) {
157
126
  this.stickyRowHeight = newStickyRowHeight;
158
127
  this.updateStickyShadows(this.stickyRowHeight);
@@ -162,7 +131,6 @@ var OverflowShadowsObserver = /*#__PURE__*/function () {
162
131
  key: "getStickyCell",
163
132
  value: function getStickyCell() {
164
133
  var _this$wrapper4;
165
-
166
134
  var stickyRow = (_this$wrapper4 = this.wrapper) === null || _this$wrapper4 === void 0 ? void 0 : _this$wrapper4.querySelector('tr.sticky');
167
135
  var stickyCell = stickyRow && stickyRow.firstElementChild;
168
136
  return stickyCell;
@@ -178,5 +146,4 @@ var OverflowShadowsObserver = /*#__PURE__*/function () {
178
146
  }]);
179
147
  return OverflowShadowsObserver;
180
148
  }();
181
-
182
149
  exports.OverflowShadowsObserver = OverflowShadowsObserver;