@atlaskit/editor-plugin-table 23.4.1 → 23.4.3

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 (272) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/cjs/ui/TableFloatingControls/index.js +1 -17
  3. package/dist/es2019/ui/TableFloatingControls/index.js +1 -17
  4. package/dist/esm/ui/TableFloatingControls/index.js +1 -17
  5. package/dist/types/ui/FloatingContextualButton/index.d.ts +0 -1
  6. package/dist/types/ui/TableFloatingControls/index.d.ts +1 -1
  7. package/package.json +4 -4
  8. package/table-plugin/package.json +1 -8
  9. package/table-plugin-type/package.json +1 -8
  10. package/types/package.json +1 -8
  11. package/ui/common-styles/package.json +1 -8
  12. package/dist/cjs/ui/TableFloatingControls/CornerControls/ClassicCornerControls.js +0 -125
  13. package/dist/cjs/ui/TableFloatingControls/FloatingControlsWithSelection.js +0 -52
  14. package/dist/cjs/ui/TableFloatingControls/RowControls/ClassicControls.js +0 -124
  15. package/dist/es2019/ui/TableFloatingControls/CornerControls/ClassicCornerControls.js +0 -110
  16. package/dist/es2019/ui/TableFloatingControls/FloatingControlsWithSelection.js +0 -47
  17. package/dist/es2019/ui/TableFloatingControls/RowControls/ClassicControls.js +0 -101
  18. package/dist/esm/ui/TableFloatingControls/CornerControls/ClassicCornerControls.js +0 -116
  19. package/dist/esm/ui/TableFloatingControls/FloatingControlsWithSelection.js +0 -45
  20. package/dist/esm/ui/TableFloatingControls/RowControls/ClassicControls.js +0 -115
  21. package/dist/types/ui/TableFloatingControls/CornerControls/ClassicCornerControls.d.ts +0 -6
  22. package/dist/types/ui/TableFloatingControls/FloatingControlsWithSelection.d.ts +0 -20
  23. package/dist/types/ui/TableFloatingControls/RowControls/ClassicControls.d.ts +0 -19
  24. package/dist/types-ts4.5/entry-points/table-plugin-type.d.ts +0 -1
  25. package/dist/types-ts4.5/entry-points/table-plugin.d.ts +0 -6
  26. package/dist/types-ts4.5/entry-points/types.d.ts +0 -2
  27. package/dist/types-ts4.5/entry-points/ui-common-styles.d.ts +0 -1
  28. package/dist/types-ts4.5/index.d.ts +0 -7
  29. package/dist/types-ts4.5/nodeviews/ExternalDropTargets.d.ts +0 -9
  30. package/dist/types-ts4.5/nodeviews/OverflowShadowsObserver.d.ts +0 -26
  31. package/dist/types-ts4.5/nodeviews/TableCell.d.ts +0 -24
  32. package/dist/types-ts4.5/nodeviews/TableComponent.d.ts +0 -48
  33. package/dist/types-ts4.5/nodeviews/TableComponentWithSharedState.d.ts +0 -30
  34. package/dist/types-ts4.5/nodeviews/TableContainer.d.ts +0 -48
  35. package/dist/types-ts4.5/nodeviews/TableNodeViewBase.d.ts +0 -18
  36. package/dist/types-ts4.5/nodeviews/TableResizer.d.ts +0 -36
  37. package/dist/types-ts4.5/nodeviews/TableRow.d.ts +0 -68
  38. package/dist/types-ts4.5/nodeviews/TableRowNativeStickyWithFallback.d.ts +0 -89
  39. package/dist/types-ts4.5/nodeviews/TableStickyScrollbar.d.ts +0 -23
  40. package/dist/types-ts4.5/nodeviews/__mocks__/OverflowShadowsObserver.d.ts +0 -9
  41. package/dist/types-ts4.5/nodeviews/__mocks__/OverridableMock.d.ts +0 -9
  42. package/dist/types-ts4.5/nodeviews/table-container-styles.d.ts +0 -5
  43. package/dist/types-ts4.5/nodeviews/table-node-views.d.ts +0 -30
  44. package/dist/types-ts4.5/nodeviews/table.d.ts +0 -48
  45. package/dist/types-ts4.5/nodeviews/toDOM.d.ts +0 -17
  46. package/dist/types-ts4.5/nodeviews/types.d.ts +0 -33
  47. package/dist/types-ts4.5/nodeviews/update-overflow-shadows.d.ts +0 -1
  48. package/dist/types-ts4.5/pm-plugins/active-cell-highlight/plugin.d.ts +0 -11
  49. package/dist/types-ts4.5/pm-plugins/analytics/actions.d.ts +0 -18
  50. package/dist/types-ts4.5/pm-plugins/analytics/commands.d.ts +0 -6
  51. package/dist/types-ts4.5/pm-plugins/analytics/plugin-factory.d.ts +0 -8
  52. package/dist/types-ts4.5/pm-plugins/analytics/plugin-key.d.ts +0 -3
  53. package/dist/types-ts4.5/pm-plugins/analytics/plugin.d.ts +0 -5
  54. package/dist/types-ts4.5/pm-plugins/analytics/reducer.d.ts +0 -3
  55. package/dist/types-ts4.5/pm-plugins/analytics/types.d.ts +0 -11
  56. package/dist/types-ts4.5/pm-plugins/analytics/utils/moved-event.d.ts +0 -6
  57. package/dist/types-ts4.5/pm-plugins/commands/active-table-menu.d.ts +0 -6
  58. package/dist/types-ts4.5/pm-plugins/commands/clear.d.ts +0 -2
  59. package/dist/types-ts4.5/pm-plugins/commands/collapse.d.ts +0 -2
  60. package/dist/types-ts4.5/pm-plugins/commands/column-resize.d.ts +0 -34
  61. package/dist/types-ts4.5/pm-plugins/commands/commands-with-analytics.d.ts +0 -33
  62. package/dist/types-ts4.5/pm-plugins/commands/delete.d.ts +0 -4
  63. package/dist/types-ts4.5/pm-plugins/commands/display-mode.d.ts +0 -2
  64. package/dist/types-ts4.5/pm-plugins/commands/go-to-next-cell.d.ts +0 -11
  65. package/dist/types-ts4.5/pm-plugins/commands/hover.d.ts +0 -11
  66. package/dist/types-ts4.5/pm-plugins/commands/index.d.ts +0 -10
  67. package/dist/types-ts4.5/pm-plugins/commands/insert.d.ts +0 -54
  68. package/dist/types-ts4.5/pm-plugins/commands/misc.d.ts +0 -47
  69. package/dist/types-ts4.5/pm-plugins/commands/referentiality.d.ts +0 -3
  70. package/dist/types-ts4.5/pm-plugins/commands/selection.d.ts +0 -10
  71. package/dist/types-ts4.5/pm-plugins/commands/sort.d.ts +0 -3
  72. package/dist/types-ts4.5/pm-plugins/commands/split-cell.d.ts +0 -8
  73. package/dist/types-ts4.5/pm-plugins/commands/toggle.d.ts +0 -12
  74. package/dist/types-ts4.5/pm-plugins/create-plugin-config.d.ts +0 -2
  75. package/dist/types-ts4.5/pm-plugins/decorations/plugin.d.ts +0 -8
  76. package/dist/types-ts4.5/pm-plugins/decorations/utils/column-controls.d.ts +0 -4
  77. package/dist/types-ts4.5/pm-plugins/decorations/utils/column-resizing.d.ts +0 -5
  78. package/dist/types-ts4.5/pm-plugins/decorations/utils/compose-decorations.d.ts +0 -2
  79. package/dist/types-ts4.5/pm-plugins/decorations/utils/types.d.ts +0 -7
  80. package/dist/types-ts4.5/pm-plugins/default-table-selection.d.ts +0 -16
  81. package/dist/types-ts4.5/pm-plugins/drag-and-drop/actions.d.ts +0 -28
  82. package/dist/types-ts4.5/pm-plugins/drag-and-drop/commands-with-analytics.d.ts +0 -13
  83. package/dist/types-ts4.5/pm-plugins/drag-and-drop/commands.d.ts +0 -10
  84. package/dist/types-ts4.5/pm-plugins/drag-and-drop/consts.d.ts +0 -6
  85. package/dist/types-ts4.5/pm-plugins/drag-and-drop/plugin-factory.d.ts +0 -8
  86. package/dist/types-ts4.5/pm-plugins/drag-and-drop/plugin-key.d.ts +0 -3
  87. package/dist/types-ts4.5/pm-plugins/drag-and-drop/plugin.d.ts +0 -7
  88. package/dist/types-ts4.5/pm-plugins/drag-and-drop/reducer.d.ts +0 -4
  89. package/dist/types-ts4.5/pm-plugins/drag-and-drop/types.d.ts +0 -14
  90. package/dist/types-ts4.5/pm-plugins/drag-and-drop/utils/autoscrollers.d.ts +0 -8
  91. package/dist/types-ts4.5/pm-plugins/drag-and-drop/utils/getDragBehaviour.d.ts +0 -3
  92. package/dist/types-ts4.5/pm-plugins/drag-and-drop/utils/monitor.d.ts +0 -3
  93. package/dist/types-ts4.5/pm-plugins/editor-content-area-height.d.ts +0 -12
  94. package/dist/types-ts4.5/pm-plugins/handlers.d.ts +0 -3
  95. package/dist/types-ts4.5/pm-plugins/keymap.d.ts +0 -8
  96. package/dist/types-ts4.5/pm-plugins/main.d.ts +0 -8
  97. package/dist/types-ts4.5/pm-plugins/plugin-factory.d.ts +0 -7
  98. package/dist/types-ts4.5/pm-plugins/plugin-key.d.ts +0 -3
  99. package/dist/types-ts4.5/pm-plugins/reducer.d.ts +0 -3
  100. package/dist/types-ts4.5/pm-plugins/safari-delete-composition-text-issue-workaround.d.ts +0 -13
  101. package/dist/types-ts4.5/pm-plugins/sticky-headers/commands.d.ts +0 -4
  102. package/dist/types-ts4.5/pm-plugins/sticky-headers/plugin-key.d.ts +0 -3
  103. package/dist/types-ts4.5/pm-plugins/sticky-headers/plugin-state.d.ts +0 -7
  104. package/dist/types-ts4.5/pm-plugins/sticky-headers/plugin.d.ts +0 -4
  105. package/dist/types-ts4.5/pm-plugins/sticky-headers/types.d.ts +0 -17
  106. package/dist/types-ts4.5/pm-plugins/sticky-headers/util.d.ts +0 -2
  107. package/dist/types-ts4.5/pm-plugins/table-analytics.d.ts +0 -11
  108. package/dist/types-ts4.5/pm-plugins/table-anchor-names/plugin.d.ts +0 -5
  109. package/dist/types-ts4.5/pm-plugins/table-local-id.d.ts +0 -10
  110. package/dist/types-ts4.5/pm-plugins/table-resizing/commands.d.ts +0 -20
  111. package/dist/types-ts4.5/pm-plugins/table-resizing/event-handlers.d.ts +0 -6
  112. package/dist/types-ts4.5/pm-plugins/table-resizing/plugin-factory.d.ts +0 -7
  113. package/dist/types-ts4.5/pm-plugins/table-resizing/plugin-key.d.ts +0 -3
  114. package/dist/types-ts4.5/pm-plugins/table-resizing/plugin.d.ts +0 -7
  115. package/dist/types-ts4.5/pm-plugins/table-resizing/reducer.d.ts +0 -3
  116. package/dist/types-ts4.5/pm-plugins/table-resizing/utils/colgroup.d.ts +0 -26
  117. package/dist/types-ts4.5/pm-plugins/table-resizing/utils/column-state.d.ts +0 -14
  118. package/dist/types-ts4.5/pm-plugins/table-resizing/utils/consts.d.ts +0 -9
  119. package/dist/types-ts4.5/pm-plugins/table-resizing/utils/content-width.d.ts +0 -4
  120. package/dist/types-ts4.5/pm-plugins/table-resizing/utils/dom.d.ts +0 -11
  121. package/dist/types-ts4.5/pm-plugins/table-resizing/utils/misc.d.ts +0 -69
  122. package/dist/types-ts4.5/pm-plugins/table-resizing/utils/resize-column.d.ts +0 -3
  123. package/dist/types-ts4.5/pm-plugins/table-resizing/utils/resize-logic.d.ts +0 -8
  124. package/dist/types-ts4.5/pm-plugins/table-resizing/utils/resize-state.d.ts +0 -28
  125. package/dist/types-ts4.5/pm-plugins/table-resizing/utils/scale-table.d.ts +0 -20
  126. package/dist/types-ts4.5/pm-plugins/table-resizing/utils/types.d.ts +0 -23
  127. package/dist/types-ts4.5/pm-plugins/table-resizing/utils/unit-to-number.d.ts +0 -1
  128. package/dist/types-ts4.5/pm-plugins/table-selection-keymap.d.ts +0 -4
  129. package/dist/types-ts4.5/pm-plugins/table-size-selector.d.ts +0 -10
  130. package/dist/types-ts4.5/pm-plugins/table-width-in-comment-fix.d.ts +0 -9
  131. package/dist/types-ts4.5/pm-plugins/table-width.d.ts +0 -17
  132. package/dist/types-ts4.5/pm-plugins/transforms/column-width.d.ts +0 -25
  133. package/dist/types-ts4.5/pm-plugins/transforms/content-mode.d.ts +0 -9
  134. package/dist/types-ts4.5/pm-plugins/transforms/delete-columns.d.ts +0 -5
  135. package/dist/types-ts4.5/pm-plugins/transforms/delete-rows.d.ts +0 -3
  136. package/dist/types-ts4.5/pm-plugins/transforms/fix-tables.d.ts +0 -9
  137. package/dist/types-ts4.5/pm-plugins/transforms/merge.d.ts +0 -7
  138. package/dist/types-ts4.5/pm-plugins/transforms/replace-table.d.ts +0 -4
  139. package/dist/types-ts4.5/pm-plugins/transforms/split.d.ts +0 -9
  140. package/dist/types-ts4.5/pm-plugins/transforms/table-transform-utils.d.ts +0 -11
  141. package/dist/types-ts4.5/pm-plugins/utils/alignment.d.ts +0 -14
  142. package/dist/types-ts4.5/pm-plugins/utils/analytics.d.ts +0 -49
  143. package/dist/types-ts4.5/pm-plugins/utils/collapse.d.ts +0 -31
  144. package/dist/types-ts4.5/pm-plugins/utils/column-controls.d.ts +0 -11
  145. package/dist/types-ts4.5/pm-plugins/utils/create.d.ts +0 -15
  146. package/dist/types-ts4.5/pm-plugins/utils/decoration.d.ts +0 -19
  147. package/dist/types-ts4.5/pm-plugins/utils/dom.d.ts +0 -42
  148. package/dist/types-ts4.5/pm-plugins/utils/drag-menu.d.ts +0 -19
  149. package/dist/types-ts4.5/pm-plugins/utils/get-allow-add-column-custom-step.d.ts +0 -2
  150. package/dist/types-ts4.5/pm-plugins/utils/guidelines.d.ts +0 -5
  151. package/dist/types-ts4.5/pm-plugins/utils/merged-cells.d.ts +0 -25
  152. package/dist/types-ts4.5/pm-plugins/utils/nodes.d.ts +0 -30
  153. package/dist/types-ts4.5/pm-plugins/utils/paste.d.ts +0 -16
  154. package/dist/types-ts4.5/pm-plugins/utils/row-controls.d.ts +0 -15
  155. package/dist/types-ts4.5/pm-plugins/utils/selection.d.ts +0 -3
  156. package/dist/types-ts4.5/pm-plugins/utils/snapping.d.ts +0 -17
  157. package/dist/types-ts4.5/pm-plugins/utils/sticky-header.d.ts +0 -3
  158. package/dist/types-ts4.5/pm-plugins/utils/table.d.ts +0 -5
  159. package/dist/types-ts4.5/pm-plugins/utils/tableMode/apply-measured-width-to-all-tables.d.ts +0 -8
  160. package/dist/types-ts4.5/pm-plugins/utils/tableMode/apply-measured-width-to-selected-table.d.ts +0 -6
  161. package/dist/types-ts4.5/pm-plugins/utils/tableMode/is-content-mode-supported.d.ts +0 -7
  162. package/dist/types-ts4.5/pm-plugins/utils/tableMode/measure-table-with-auto-layout.d.ts +0 -2
  163. package/dist/types-ts4.5/pm-plugins/utils/tableMode/smart-adjust/constants.d.ts +0 -4
  164. package/dist/types-ts4.5/pm-plugins/utils/tableMode/smart-adjust/distribute-column-widths.d.ts +0 -8
  165. package/dist/types-ts4.5/pm-plugins/utils/tableMode/smart-adjust/run-smart-adjust.d.ts +0 -7
  166. package/dist/types-ts4.5/pm-plugins/utils/update-plugin-state-decorations.d.ts +0 -4
  167. package/dist/types-ts4.5/pm-plugins/view-mode-sort/consts.d.ts +0 -3
  168. package/dist/types-ts4.5/pm-plugins/view-mode-sort/index.d.ts +0 -21
  169. package/dist/types-ts4.5/pm-plugins/view-mode-sort/plugin-key.d.ts +0 -3
  170. package/dist/types-ts4.5/pm-plugins/view-mode-sort/types.d.ts +0 -22
  171. package/dist/types-ts4.5/pm-plugins/view-mode-sort/utils.d.ts +0 -11
  172. package/dist/types-ts4.5/tablePlugin.d.ts +0 -7
  173. package/dist/types-ts4.5/tablePluginType.d.ts +0 -81
  174. package/dist/types-ts4.5/types/index.d.ts +0 -544
  175. package/dist/types-ts4.5/ui/ColumnResizeWidget/index.d.ts +0 -12
  176. package/dist/types-ts4.5/ui/ContentComponent.d.ts +0 -18
  177. package/dist/types-ts4.5/ui/DragHandle/HandleIconComponent.d.ts +0 -8
  178. package/dist/types-ts4.5/ui/DragHandle/index.d.ts +0 -29
  179. package/dist/types-ts4.5/ui/DragPreview/index.d.ts +0 -7
  180. package/dist/types-ts4.5/ui/FloatingAlignmentButtons/FloatingAlignmentButtons.d.ts +0 -13
  181. package/dist/types-ts4.5/ui/FloatingContextualButton/FixedButton.d.ts +0 -22
  182. package/dist/types-ts4.5/ui/FloatingContextualButton/index.d.ts +0 -22
  183. package/dist/types-ts4.5/ui/FloatingContextualButton/styles.d.ts +0 -3
  184. package/dist/types-ts4.5/ui/FloatingContextualMenu/CellMenuPopup.d.ts +0 -14
  185. package/dist/types-ts4.5/ui/FloatingContextualMenu/ContextualMenu.d.ts +0 -63
  186. package/dist/types-ts4.5/ui/FloatingContextualMenu/index.d.ts +0 -24
  187. package/dist/types-ts4.5/ui/FloatingContextualMenu/styles.d.ts +0 -3
  188. package/dist/types-ts4.5/ui/FloatingDeleteButton/DeleteButton.d.ts +0 -14
  189. package/dist/types-ts4.5/ui/FloatingDeleteButton/getPopUpOptions.d.ts +0 -10
  190. package/dist/types-ts4.5/ui/FloatingDeleteButton/index.d.ts +0 -55
  191. package/dist/types-ts4.5/ui/FloatingDeleteButton/types.d.ts +0 -2
  192. package/dist/types-ts4.5/ui/FloatingDragMenu/DragMenu.d.ts +0 -41
  193. package/dist/types-ts4.5/ui/FloatingDragMenu/DropdownMenu.d.ts +0 -36
  194. package/dist/types-ts4.5/ui/FloatingDragMenu/index.d.ts +0 -36
  195. package/dist/types-ts4.5/ui/FloatingDragMenu/styles.d.ts +0 -4
  196. package/dist/types-ts4.5/ui/FloatingInsertButton/InsertButton.d.ts +0 -18
  197. package/dist/types-ts4.5/ui/FloatingInsertButton/getPopupOptions.d.ts +0 -4
  198. package/dist/types-ts4.5/ui/FloatingInsertButton/index.d.ts +0 -40
  199. package/dist/types-ts4.5/ui/FloatingTableMenu/index.d.ts +0 -23
  200. package/dist/types-ts4.5/ui/FloatingToolbarLabel/FloatingToolbarLabel.d.ts +0 -16
  201. package/dist/types-ts4.5/ui/SizeSelector/index.d.ts +0 -9
  202. package/dist/types-ts4.5/ui/TableFloatingColumnControls/ColumnControls/index.d.ts +0 -24
  203. package/dist/types-ts4.5/ui/TableFloatingColumnControls/ColumnDropTargets/ColumnDropTarget.d.ts +0 -10
  204. package/dist/types-ts4.5/ui/TableFloatingColumnControls/ColumnDropTargets/index.d.ts +0 -11
  205. package/dist/types-ts4.5/ui/TableFloatingColumnControls/index.d.ts +0 -33
  206. package/dist/types-ts4.5/ui/TableFloatingControls/CornerControls/ClassicCornerControls.d.ts +0 -6
  207. package/dist/types-ts4.5/ui/TableFloatingControls/CornerControls/DragCornerControls.d.ts +0 -15
  208. package/dist/types-ts4.5/ui/TableFloatingControls/CornerControls/types.d.ts +0 -11
  209. package/dist/types-ts4.5/ui/TableFloatingControls/FloatingControlsWithSelection.d.ts +0 -20
  210. package/dist/types-ts4.5/ui/TableFloatingControls/NumberColumn/index.d.ts +0 -22
  211. package/dist/types-ts4.5/ui/TableFloatingControls/RowControls/ClassicControls.d.ts +0 -19
  212. package/dist/types-ts4.5/ui/TableFloatingControls/RowControls/DragControls.d.ts +0 -25
  213. package/dist/types-ts4.5/ui/TableFloatingControls/RowDropTarget/index.d.ts +0 -8
  214. package/dist/types-ts4.5/ui/TableFloatingControls/index.d.ts +0 -37
  215. package/dist/types-ts4.5/ui/TableFullWidthLabel/index.d.ts +0 -2
  216. package/dist/types-ts4.5/ui/TableMenu/cell/getCellMenuComponents.d.ts +0 -3
  217. package/dist/types-ts4.5/ui/TableMenu/cell/items/MergeCellsItem.d.ts +0 -3
  218. package/dist/types-ts4.5/ui/TableMenu/cell/items/SplitCellItem.d.ts +0 -3
  219. package/dist/types-ts4.5/ui/TableMenu/cell/items/VerticalAlignDropdownItem.d.ts +0 -12
  220. package/dist/types-ts4.5/ui/TableMenu/cell/items/VerticalAlignNestedMenu.d.ts +0 -4
  221. package/dist/types-ts4.5/ui/TableMenu/cell/items/verticalAlignUtils.d.ts +0 -3
  222. package/dist/types-ts4.5/ui/TableMenu/cell/keys.d.ts +0 -16
  223. package/dist/types-ts4.5/ui/TableMenu/column/getColumnMenuComponents.d.ts +0 -3
  224. package/dist/types-ts4.5/ui/TableMenu/column/items/AddColumnLeftItem.d.ts +0 -3
  225. package/dist/types-ts4.5/ui/TableMenu/column/items/AddColumnRightItem.d.ts +0 -3
  226. package/dist/types-ts4.5/ui/TableMenu/column/items/ColumnBackgroundSection.d.ts +0 -11
  227. package/dist/types-ts4.5/ui/TableMenu/column/items/ColumnToggleSection.d.ts +0 -10
  228. package/dist/types-ts4.5/ui/TableMenu/column/items/DeleteColumnItem.d.ts +0 -3
  229. package/dist/types-ts4.5/ui/TableMenu/column/items/DistributeColumnsItem.d.ts +0 -3
  230. package/dist/types-ts4.5/ui/TableMenu/column/items/HeaderColumnToggleItem.d.ts +0 -16
  231. package/dist/types-ts4.5/ui/TableMenu/column/items/MoveColumnLeftItem.d.ts +0 -3
  232. package/dist/types-ts4.5/ui/TableMenu/column/items/MoveColumnRightItem.d.ts +0 -3
  233. package/dist/types-ts4.5/ui/TableMenu/column/items/SortDecreasingItem.d.ts +0 -3
  234. package/dist/types-ts4.5/ui/TableMenu/column/items/SortIncreasingItem.d.ts +0 -3
  235. package/dist/types-ts4.5/ui/TableMenu/column/keys.d.ts +0 -22
  236. package/dist/types-ts4.5/ui/TableMenu/row/getRowMenuComponents.d.ts +0 -3
  237. package/dist/types-ts4.5/ui/TableMenu/row/items/AddRowAboveItem.d.ts +0 -3
  238. package/dist/types-ts4.5/ui/TableMenu/row/items/AddRowBelowItem.d.ts +0 -3
  239. package/dist/types-ts4.5/ui/TableMenu/row/items/DeleteRowItem.d.ts +0 -3
  240. package/dist/types-ts4.5/ui/TableMenu/row/items/HeaderRowToggleItem.d.ts +0 -3
  241. package/dist/types-ts4.5/ui/TableMenu/row/items/MoveRowDownItem.d.ts +0 -3
  242. package/dist/types-ts4.5/ui/TableMenu/row/items/MoveRowUpItem.d.ts +0 -3
  243. package/dist/types-ts4.5/ui/TableMenu/row/items/NumberedRowsToggleItem.d.ts +0 -3
  244. package/dist/types-ts4.5/ui/TableMenu/row/keys.d.ts +0 -18
  245. package/dist/types-ts4.5/ui/TableMenu/shared/TableMenu.d.ts +0 -11
  246. package/dist/types-ts4.5/ui/TableMenu/shared/TableMenuContext.d.ts +0 -16
  247. package/dist/types-ts4.5/ui/TableMenu/shared/consts.d.ts +0 -4
  248. package/dist/types-ts4.5/ui/TableMenu/shared/getSharedItems.d.ts +0 -3
  249. package/dist/types-ts4.5/ui/TableMenu/shared/getTableMenuComponents.d.ts +0 -3
  250. package/dist/types-ts4.5/ui/TableMenu/shared/items/BackgroundColorItem.d.ts +0 -7
  251. package/dist/types-ts4.5/ui/TableMenu/shared/items/ClearCellsItem.d.ts +0 -3
  252. package/dist/types-ts4.5/ui/TableMenu/shared/keys.d.ts +0 -3
  253. package/dist/types-ts4.5/ui/TableMenu/shared/types.d.ts +0 -4
  254. package/dist/types-ts4.5/ui/common-styles.d.ts +0 -14
  255. package/dist/types-ts4.5/ui/consts.d.ts +0 -69
  256. package/dist/types-ts4.5/ui/event-handlers.d.ts +0 -20
  257. package/dist/types-ts4.5/ui/global-styles.d.ts +0 -11
  258. package/dist/types-ts4.5/ui/hooks/useInternalTablePluginStateSelector.d.ts +0 -22
  259. package/dist/types-ts4.5/ui/icons/AddColLeftIcon.d.ts +0 -2
  260. package/dist/types-ts4.5/ui/icons/AddColRightIcon.d.ts +0 -2
  261. package/dist/types-ts4.5/ui/icons/AddRowAboveIcon.d.ts +0 -2
  262. package/dist/types-ts4.5/ui/icons/AddRowBelowIcon.d.ts +0 -2
  263. package/dist/types-ts4.5/ui/icons/DragHandleDisabledIcon.d.ts +0 -6
  264. package/dist/types-ts4.5/ui/icons/DragHandleIcon.d.ts +0 -2
  265. package/dist/types-ts4.5/ui/icons/DragInMotionIcon.d.ts +0 -6
  266. package/dist/types-ts4.5/ui/icons/MergeCellsIcon.d.ts +0 -2
  267. package/dist/types-ts4.5/ui/icons/MinimisedHandle.d.ts +0 -2
  268. package/dist/types-ts4.5/ui/icons/SortingIconWrapper.d.ts +0 -10
  269. package/dist/types-ts4.5/ui/icons/SplitCellIcon.d.ts +0 -2
  270. package/dist/types-ts4.5/ui/rounded-table-styles.d.ts +0 -2
  271. package/dist/types-ts4.5/ui/toolbar.d.ts +0 -11
  272. package/dist/types-ts4.5/ui/ui-styles.d.ts +0 -21
@@ -1,110 +0,0 @@
1
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
- import React, { Component } from 'react';
3
- import classnames from 'classnames';
4
- import { injectIntl } from 'react-intl';
5
- import { tableMessages as messages } from '@atlaskit/editor-common/messages';
6
- import { TableMap } from '@atlaskit/editor-tables/table-map';
7
- import { findTable, isTableSelected, selectTable } from '@atlaskit/editor-tables/utils';
8
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
9
- import { clearHoverSelection, hoverTable } from '../../../pm-plugins/commands';
10
- import { TableCssClassName as ClassName } from '../../../types';
11
- // Ignored via go/ees005
12
- // eslint-disable-next-line @repo/internal/react/no-class-components, @typescript-eslint/no-explicit-any
13
- class CornerControlComponent extends Component {
14
- constructor(...args) {
15
- super(...args);
16
- _defineProperty(this, "isActive", () => {
17
- const {
18
- editorView,
19
- hoveredRows,
20
- isResizing
21
- } = this.props;
22
- const {
23
- selection
24
- } = editorView.state;
25
- const table = findTable(selection);
26
- if (!table) {
27
- return false;
28
- }
29
- return isTableSelected(selection) || hoveredRows && hoveredRows.length === TableMap.get(table.node).height && !isResizing;
30
- });
31
- _defineProperty(this, "clearHoverSelection", () => {
32
- const {
33
- state,
34
- dispatch
35
- } = this.props.editorView;
36
- clearHoverSelection()(state, dispatch);
37
- });
38
- _defineProperty(this, "selectTable", () => {
39
- const {
40
- state,
41
- dispatch
42
- } = this.props.editorView;
43
- dispatch(selectTable(state.tr).setMeta('addToHistory', false));
44
- });
45
- _defineProperty(this, "hoverTable", () => {
46
- const {
47
- state,
48
- dispatch
49
- } = this.props.editorView;
50
- hoverTable()(state, dispatch);
51
- });
52
- }
53
- render() {
54
- const {
55
- isInDanger,
56
- tableRef,
57
- isHeaderColumnEnabled,
58
- isHeaderRowEnabled,
59
- intl: {
60
- formatMessage
61
- }
62
- } = this.props;
63
- if (!tableRef) {
64
- return null;
65
- }
66
- const isActive = this.isActive();
67
- return /*#__PURE__*/React.createElement("div", {
68
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
69
- className: classnames(ClassName.CORNER_CONTROLS, {
70
- active: isActive,
71
- sticky: this.props.stickyTop !== undefined
72
- }),
73
- style: {
74
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
75
- top: this.props.stickyTop !== undefined ? `0px` : undefined
76
- },
77
- contentEditable: false
78
- }, /*#__PURE__*/React.createElement("button", {
79
- "aria-label": formatMessage(messages.cornerControl),
80
- type: "button"
81
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
82
- ,
83
- className: classnames(ClassName.CONTROLS_CORNER_BUTTON, {
84
- danger: isActive && isInDanger
85
- }),
86
- onClick: this.selectTable,
87
- onMouseOver: this.hoverTable,
88
- onMouseOut: this.clearHoverSelection,
89
- onFocus: expValEquals('platform_editor_table_a11y_eslint_fix', 'isEnabled', true) ? this.hoverTable : undefined,
90
- onBlur: expValEquals('platform_editor_table_a11y_eslint_fix', 'isEnabled', true) ? this.clearHoverSelection : undefined
91
- }), !isHeaderRowEnabled &&
92
- /*#__PURE__*/
93
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
94
- React.createElement("div", {
95
- className: ClassName.CORNER_CONTROLS_INSERT_ROW_MARKER
96
- }, /*#__PURE__*/React.createElement("div", {
97
- className: ClassName.CONTROLS_INSERT_MARKER
98
- })), !isHeaderColumnEnabled &&
99
- /*#__PURE__*/
100
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
101
- React.createElement("div", {
102
- className: ClassName.CORNER_CONTROLS_INSERT_COLUMN_MARKER
103
- }, /*#__PURE__*/React.createElement("div", {
104
- className: ClassName.CONTROLS_INSERT_MARKER
105
- })));
106
- }
107
- }
108
-
109
- // eslint-disable-next-line @typescript-eslint/ban-types
110
- export const CornerControls = injectIntl(CornerControlComponent);
@@ -1,47 +0,0 @@
1
- import React from 'react';
2
- import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
3
- import { CornerControls } from './CornerControls/ClassicCornerControls';
4
- import { RowControls } from './RowControls/ClassicControls';
5
- export const FloatingControlsWithSelection = ({
6
- editorView,
7
- tableRef,
8
- isInDanger,
9
- isResizing,
10
- isHeaderRowEnabled,
11
- isHeaderColumnEnabled,
12
- hoveredRows,
13
- stickyTop,
14
- hoverRows,
15
- selectRow,
16
- tableActive,
17
- api
18
- }) => {
19
- const {
20
- selection
21
- } = useSharedPluginStateWithSelector(api, ['selection'], states => {
22
- var _states$selectionStat;
23
- return {
24
- selection: (_states$selectionStat = states.selectionState) === null || _states$selectionStat === void 0 ? void 0 : _states$selectionStat.selection
25
- };
26
- });
27
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CornerControls, {
28
- editorView: editorView,
29
- tableRef: tableRef,
30
- isInDanger: isInDanger,
31
- isResizing: isResizing,
32
- isHeaderRowEnabled: isHeaderRowEnabled,
33
- isHeaderColumnEnabled: isHeaderColumnEnabled,
34
- hoveredRows: hoveredRows,
35
- stickyTop: tableActive ? stickyTop : undefined
36
- }), /*#__PURE__*/React.createElement(RowControls, {
37
- selection: selection,
38
- editorView: editorView,
39
- tableRef: tableRef,
40
- hoverRows: hoverRows,
41
- hoveredRows: hoveredRows,
42
- isInDanger: isInDanger,
43
- isResizing: isResizing,
44
- selectRow: selectRow,
45
- stickyTop: tableActive ? stickyTop : undefined
46
- }));
47
- };
@@ -1,101 +0,0 @@
1
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
- import React, { Component } from 'react';
3
- import { injectIntl } from 'react-intl';
4
- import { tableMessages as messages } from '@atlaskit/editor-common/messages';
5
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
6
- import { clearHoverSelection } from '../../../pm-plugins/commands';
7
- import { getRowClassNames, getRowHeights, getRowsParams } from '../../../pm-plugins/utils/row-controls';
8
- import { TableCssClassName as ClassName } from '../../../types';
9
- import { tableControlsSpacing, tableToolbarSize } from '../../consts';
10
- // Ignored via go/ees005
11
- // eslint-disable-next-line @repo/internal/react/no-class-components
12
- class RowControlsComponent extends Component {
13
- constructor(...args) {
14
- super(...args);
15
- _defineProperty(this, "clearHoverSelection", () => {
16
- const {
17
- state,
18
- dispatch
19
- } = this.props.editorView;
20
- clearHoverSelection()(state, dispatch);
21
- });
22
- }
23
- render() {
24
- const {
25
- editorView,
26
- tableRef,
27
- hoveredRows,
28
- isInDanger,
29
- isResizing,
30
- intl: {
31
- formatMessage
32
- },
33
- selection: selectionState
34
- } = this.props;
35
- if (!tableRef) {
36
- return null;
37
- }
38
- const {
39
- selection
40
- } = editorView.state;
41
- const rowHeights = getRowHeights(tableRef);
42
- const rowsParams = getRowsParams(rowHeights);
43
- const firstRow = tableRef.querySelector('tr');
44
- const hasHeaderRow = firstRow ? firstRow.getAttribute('data-header-row') : false;
45
- return (
46
- /*#__PURE__*/
47
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
48
- React.createElement("div", {
49
- className: ClassName.ROW_CONTROLS
50
- }, /*#__PURE__*/React.createElement("div", {
51
- className: ClassName.ROW_CONTROLS_INNER
52
- }, rowsParams.map(({
53
- startIndex,
54
- endIndex,
55
- height
56
- }, index) => {
57
- // if previous row was header row, add its height to our margin
58
- let marginTop = -1;
59
- if (index === 1 && hasHeaderRow && this.props.stickyTop !== undefined) {
60
- marginTop += rowHeights[index - 1] + tableToolbarSize;
61
- }
62
- const thisRowSticky = this.props.stickyTop !== undefined && index === 0 && hasHeaderRow;
63
- return /*#__PURE__*/React.createElement("div", {
64
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
65
- className: `${ClassName.ROW_CONTROLS_BUTTON_WRAP} ${getRowClassNames(startIndex, selectionState || selection, hoveredRows, isInDanger, isResizing)} ${thisRowSticky ? 'sticky' : ''}`,
66
- key: startIndex,
67
- style: {
68
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
69
- height: height,
70
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
71
- marginTop: `${marginTop}px`,
72
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
73
- top: thisRowSticky ? `3px` : undefined,
74
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
75
- paddingTop: thisRowSticky ?
76
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
77
- `${tableControlsSpacing - 2}px` : undefined
78
- }
79
- }, /*#__PURE__*/React.createElement("button", {
80
- "aria-label": formatMessage(messages.rowControl),
81
- type: "button"
82
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
83
- ,
84
- className: `${ClassName.ROW_CONTROLS_BUTTON} ${ClassName.CONTROLS_BUTTON}`,
85
- onClick: event => this.props.selectRow(startIndex, event.shiftKey),
86
- onMouseOver: () => this.props.hoverRows([startIndex]),
87
- onFocus: expValEquals('platform_editor_table_a11y_eslint_fix', 'isEnabled', true) ? () => this.props.hoverRows([startIndex]) : undefined,
88
- onMouseOut: this.clearHoverSelection,
89
- onBlur: expValEquals('platform_editor_table_a11y_eslint_fix', 'isEnabled', true) ? this.clearHoverSelection : undefined,
90
- "data-start-index": startIndex,
91
- "data-end-index": endIndex
92
- }), /*#__PURE__*/React.createElement("div", {
93
- className: ClassName.CONTROLS_INSERT_MARKER
94
- }));
95
- })))
96
- );
97
- }
98
- }
99
-
100
- // eslint-disable-next-line @typescript-eslint/ban-types
101
- export const RowControls = injectIntl(RowControlsComponent);
@@ -1,116 +0,0 @@
1
- import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
- import _createClass from "@babel/runtime/helpers/createClass";
3
- import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
4
- import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
5
- import _inherits from "@babel/runtime/helpers/inherits";
6
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
7
- function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
8
- function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
9
- import React, { Component } from 'react';
10
- import classnames from 'classnames';
11
- import { injectIntl } from 'react-intl';
12
- import { tableMessages as messages } from '@atlaskit/editor-common/messages';
13
- import { TableMap } from '@atlaskit/editor-tables/table-map';
14
- import { findTable, isTableSelected, selectTable } from '@atlaskit/editor-tables/utils';
15
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
16
- import { clearHoverSelection, hoverTable } from '../../../pm-plugins/commands';
17
- import { TableCssClassName as ClassName } from '../../../types';
18
- // Ignored via go/ees005
19
- // eslint-disable-next-line @repo/internal/react/no-class-components, @typescript-eslint/no-explicit-any
20
- var CornerControlComponent = /*#__PURE__*/function (_Component) {
21
- function CornerControlComponent() {
22
- var _this;
23
- _classCallCheck(this, CornerControlComponent);
24
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
25
- args[_key] = arguments[_key];
26
- }
27
- _this = _callSuper(this, CornerControlComponent, [].concat(args));
28
- _defineProperty(_this, "isActive", function () {
29
- var _this$props = _this.props,
30
- editorView = _this$props.editorView,
31
- hoveredRows = _this$props.hoveredRows,
32
- isResizing = _this$props.isResizing;
33
- var selection = editorView.state.selection;
34
- var table = findTable(selection);
35
- if (!table) {
36
- return false;
37
- }
38
- return isTableSelected(selection) || hoveredRows && hoveredRows.length === TableMap.get(table.node).height && !isResizing;
39
- });
40
- _defineProperty(_this, "clearHoverSelection", function () {
41
- var _this$props$editorVie = _this.props.editorView,
42
- state = _this$props$editorVie.state,
43
- dispatch = _this$props$editorVie.dispatch;
44
- clearHoverSelection()(state, dispatch);
45
- });
46
- _defineProperty(_this, "selectTable", function () {
47
- var _this$props$editorVie2 = _this.props.editorView,
48
- state = _this$props$editorVie2.state,
49
- dispatch = _this$props$editorVie2.dispatch;
50
- dispatch(selectTable(state.tr).setMeta('addToHistory', false));
51
- });
52
- _defineProperty(_this, "hoverTable", function () {
53
- var _this$props$editorVie3 = _this.props.editorView,
54
- state = _this$props$editorVie3.state,
55
- dispatch = _this$props$editorVie3.dispatch;
56
- hoverTable()(state, dispatch);
57
- });
58
- return _this;
59
- }
60
- _inherits(CornerControlComponent, _Component);
61
- return _createClass(CornerControlComponent, [{
62
- key: "render",
63
- value: function render() {
64
- var _this$props2 = this.props,
65
- isInDanger = _this$props2.isInDanger,
66
- tableRef = _this$props2.tableRef,
67
- isHeaderColumnEnabled = _this$props2.isHeaderColumnEnabled,
68
- isHeaderRowEnabled = _this$props2.isHeaderRowEnabled,
69
- formatMessage = _this$props2.intl.formatMessage;
70
- if (!tableRef) {
71
- return null;
72
- }
73
- var isActive = this.isActive();
74
- return /*#__PURE__*/React.createElement("div", {
75
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
76
- className: classnames(ClassName.CORNER_CONTROLS, {
77
- active: isActive,
78
- sticky: this.props.stickyTop !== undefined
79
- }),
80
- style: {
81
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
82
- top: this.props.stickyTop !== undefined ? "0px" : undefined
83
- },
84
- contentEditable: false
85
- }, /*#__PURE__*/React.createElement("button", {
86
- "aria-label": formatMessage(messages.cornerControl),
87
- type: "button"
88
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
89
- ,
90
- className: classnames(ClassName.CONTROLS_CORNER_BUTTON, {
91
- danger: isActive && isInDanger
92
- }),
93
- onClick: this.selectTable,
94
- onMouseOver: this.hoverTable,
95
- onMouseOut: this.clearHoverSelection,
96
- onFocus: expValEquals('platform_editor_table_a11y_eslint_fix', 'isEnabled', true) ? this.hoverTable : undefined,
97
- onBlur: expValEquals('platform_editor_table_a11y_eslint_fix', 'isEnabled', true) ? this.clearHoverSelection : undefined
98
- }), !isHeaderRowEnabled &&
99
- /*#__PURE__*/
100
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
101
- React.createElement("div", {
102
- className: ClassName.CORNER_CONTROLS_INSERT_ROW_MARKER
103
- }, /*#__PURE__*/React.createElement("div", {
104
- className: ClassName.CONTROLS_INSERT_MARKER
105
- })), !isHeaderColumnEnabled &&
106
- /*#__PURE__*/
107
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
108
- React.createElement("div", {
109
- className: ClassName.CORNER_CONTROLS_INSERT_COLUMN_MARKER
110
- }, /*#__PURE__*/React.createElement("div", {
111
- className: ClassName.CONTROLS_INSERT_MARKER
112
- })));
113
- }
114
- }]);
115
- }(Component); // eslint-disable-next-line @typescript-eslint/ban-types
116
- export var CornerControls = injectIntl(CornerControlComponent);
@@ -1,45 +0,0 @@
1
- import React from 'react';
2
- import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
3
- import { CornerControls } from './CornerControls/ClassicCornerControls';
4
- import { RowControls } from './RowControls/ClassicControls';
5
- export var FloatingControlsWithSelection = function FloatingControlsWithSelection(_ref) {
6
- var editorView = _ref.editorView,
7
- tableRef = _ref.tableRef,
8
- isInDanger = _ref.isInDanger,
9
- isResizing = _ref.isResizing,
10
- isHeaderRowEnabled = _ref.isHeaderRowEnabled,
11
- isHeaderColumnEnabled = _ref.isHeaderColumnEnabled,
12
- hoveredRows = _ref.hoveredRows,
13
- stickyTop = _ref.stickyTop,
14
- hoverRows = _ref.hoverRows,
15
- selectRow = _ref.selectRow,
16
- tableActive = _ref.tableActive,
17
- api = _ref.api;
18
- var _useSharedPluginState = useSharedPluginStateWithSelector(api, ['selection'], function (states) {
19
- var _states$selectionStat;
20
- return {
21
- selection: (_states$selectionStat = states.selectionState) === null || _states$selectionStat === void 0 ? void 0 : _states$selectionStat.selection
22
- };
23
- }),
24
- selection = _useSharedPluginState.selection;
25
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CornerControls, {
26
- editorView: editorView,
27
- tableRef: tableRef,
28
- isInDanger: isInDanger,
29
- isResizing: isResizing,
30
- isHeaderRowEnabled: isHeaderRowEnabled,
31
- isHeaderColumnEnabled: isHeaderColumnEnabled,
32
- hoveredRows: hoveredRows,
33
- stickyTop: tableActive ? stickyTop : undefined
34
- }), /*#__PURE__*/React.createElement(RowControls, {
35
- selection: selection,
36
- editorView: editorView,
37
- tableRef: tableRef,
38
- hoverRows: hoverRows,
39
- hoveredRows: hoveredRows,
40
- isInDanger: isInDanger,
41
- isResizing: isResizing,
42
- selectRow: selectRow,
43
- stickyTop: tableActive ? stickyTop : undefined
44
- }));
45
- };
@@ -1,115 +0,0 @@
1
- import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
- import _createClass from "@babel/runtime/helpers/createClass";
3
- import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
4
- import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
5
- import _inherits from "@babel/runtime/helpers/inherits";
6
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
7
- function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
8
- function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
9
- import React, { Component } from 'react';
10
- import { injectIntl } from 'react-intl';
11
- import { tableMessages as messages } from '@atlaskit/editor-common/messages';
12
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
13
- import { clearHoverSelection } from '../../../pm-plugins/commands';
14
- import { getRowClassNames, getRowHeights, getRowsParams } from '../../../pm-plugins/utils/row-controls';
15
- import { TableCssClassName as ClassName } from '../../../types';
16
- import { tableControlsSpacing, tableToolbarSize } from '../../consts';
17
- // Ignored via go/ees005
18
- // eslint-disable-next-line @repo/internal/react/no-class-components
19
- var RowControlsComponent = /*#__PURE__*/function (_Component) {
20
- function RowControlsComponent() {
21
- var _this;
22
- _classCallCheck(this, RowControlsComponent);
23
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
24
- args[_key] = arguments[_key];
25
- }
26
- _this = _callSuper(this, RowControlsComponent, [].concat(args));
27
- _defineProperty(_this, "clearHoverSelection", function () {
28
- var _this$props$editorVie = _this.props.editorView,
29
- state = _this$props$editorVie.state,
30
- dispatch = _this$props$editorVie.dispatch;
31
- clearHoverSelection()(state, dispatch);
32
- });
33
- return _this;
34
- }
35
- _inherits(RowControlsComponent, _Component);
36
- return _createClass(RowControlsComponent, [{
37
- key: "render",
38
- value: function render() {
39
- var _this2 = this;
40
- var _this$props = this.props,
41
- editorView = _this$props.editorView,
42
- tableRef = _this$props.tableRef,
43
- hoveredRows = _this$props.hoveredRows,
44
- isInDanger = _this$props.isInDanger,
45
- isResizing = _this$props.isResizing,
46
- formatMessage = _this$props.intl.formatMessage,
47
- selectionState = _this$props.selection;
48
- if (!tableRef) {
49
- return null;
50
- }
51
- var selection = editorView.state.selection;
52
- var rowHeights = getRowHeights(tableRef);
53
- var rowsParams = getRowsParams(rowHeights);
54
- var firstRow = tableRef.querySelector('tr');
55
- var hasHeaderRow = firstRow ? firstRow.getAttribute('data-header-row') : false;
56
- return (
57
- /*#__PURE__*/
58
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
59
- React.createElement("div", {
60
- className: ClassName.ROW_CONTROLS
61
- }, /*#__PURE__*/React.createElement("div", {
62
- className: ClassName.ROW_CONTROLS_INNER
63
- }, rowsParams.map(function (_ref, index) {
64
- var startIndex = _ref.startIndex,
65
- endIndex = _ref.endIndex,
66
- height = _ref.height;
67
- // if previous row was header row, add its height to our margin
68
- var marginTop = -1;
69
- if (index === 1 && hasHeaderRow && _this2.props.stickyTop !== undefined) {
70
- marginTop += rowHeights[index - 1] + tableToolbarSize;
71
- }
72
- var thisRowSticky = _this2.props.stickyTop !== undefined && index === 0 && hasHeaderRow;
73
- return /*#__PURE__*/React.createElement("div", {
74
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
75
- className: "".concat(ClassName.ROW_CONTROLS_BUTTON_WRAP, " ").concat(getRowClassNames(startIndex, selectionState || selection, hoveredRows, isInDanger, isResizing), " ").concat(thisRowSticky ? 'sticky' : ''),
76
- key: startIndex,
77
- style: {
78
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
79
- height: height,
80
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
81
- marginTop: "".concat(marginTop, "px"),
82
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
83
- top: thisRowSticky ? "3px" : undefined,
84
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
85
- paddingTop: thisRowSticky ? // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
86
- "".concat(tableControlsSpacing - 2, "px") : undefined
87
- }
88
- }, /*#__PURE__*/React.createElement("button", {
89
- "aria-label": formatMessage(messages.rowControl),
90
- type: "button"
91
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
92
- ,
93
- className: "".concat(ClassName.ROW_CONTROLS_BUTTON, " ").concat(ClassName.CONTROLS_BUTTON),
94
- onClick: function onClick(event) {
95
- return _this2.props.selectRow(startIndex, event.shiftKey);
96
- },
97
- onMouseOver: function onMouseOver() {
98
- return _this2.props.hoverRows([startIndex]);
99
- },
100
- onFocus: expValEquals('platform_editor_table_a11y_eslint_fix', 'isEnabled', true) ? function () {
101
- return _this2.props.hoverRows([startIndex]);
102
- } : undefined,
103
- onMouseOut: _this2.clearHoverSelection,
104
- onBlur: expValEquals('platform_editor_table_a11y_eslint_fix', 'isEnabled', true) ? _this2.clearHoverSelection : undefined,
105
- "data-start-index": startIndex,
106
- "data-end-index": endIndex
107
- }), /*#__PURE__*/React.createElement("div", {
108
- className: ClassName.CONTROLS_INSERT_MARKER
109
- }));
110
- })))
111
- );
112
- }
113
- }]);
114
- }(Component); // eslint-disable-next-line @typescript-eslint/ban-types
115
- export var RowControls = injectIntl(RowControlsComponent);
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- import type { WithIntlProps, WrappedComponentProps } from 'react-intl';
3
- import type { CornerControlProps } from './types';
4
- export declare const CornerControls: React.FC<WithIntlProps<CornerControlProps & WrappedComponentProps>> & {
5
- WrappedComponent: React.ComponentType<CornerControlProps & WrappedComponentProps>;
6
- };
@@ -1,20 +0,0 @@
1
- import React from 'react';
2
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
4
- import type { TablePlugin } from '../../tablePluginType';
5
- type FloatingControlsWithSelectionProps = {
6
- api?: ExtractInjectionAPI<TablePlugin>;
7
- editorView: EditorView;
8
- hoveredRows?: number[];
9
- hoverRows: (rows: number[]) => void;
10
- isHeaderColumnEnabled?: boolean;
11
- isHeaderRowEnabled?: boolean;
12
- isInDanger?: boolean;
13
- isResizing?: boolean;
14
- selectRow: (row: number, expand: boolean) => void;
15
- stickyTop?: number;
16
- tableActive: boolean;
17
- tableRef: HTMLTableElement;
18
- };
19
- export declare const FloatingControlsWithSelection: ({ editorView, tableRef, isInDanger, isResizing, isHeaderRowEnabled, isHeaderColumnEnabled, hoveredRows, stickyTop, hoverRows, selectRow, tableActive, api, }: FloatingControlsWithSelectionProps) => React.JSX.Element;
20
- export {};
@@ -1,19 +0,0 @@
1
- import React from 'react';
2
- import type { WithIntlProps, WrappedComponentProps } from 'react-intl';
3
- import type { Selection } from '@atlaskit/editor-prosemirror/state';
4
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
5
- export interface Props {
6
- editorView: EditorView;
7
- hoveredRows?: number[];
8
- hoverRows: (rows: number[], danger?: boolean) => void;
9
- insertRowButtonIndex?: number;
10
- isInDanger?: boolean;
11
- isResizing?: boolean;
12
- selection?: Selection;
13
- selectRow: (row: number, expand: boolean) => void;
14
- stickyTop?: number;
15
- tableRef: HTMLTableElement;
16
- }
17
- export declare const RowControls: React.FC<WithIntlProps<Props & WrappedComponentProps>> & {
18
- WrappedComponent: React.ComponentType<Props & WrappedComponentProps>;
19
- };
@@ -1 +0,0 @@
1
- export type { TablePlugin, TablePluginOptions, TablePluginDependencies, TablePluginActions, TablePluginCommands, } from '../tablePluginType';
@@ -1,6 +0,0 @@
1
- export {
2
- /**
3
- * @private
4
- * @deprecated Use {@link tablePlugin} instead.
5
- */
6
- default as tablesPlugin, default as tablePlugin, } from '../tablePlugin';
@@ -1,2 +0,0 @@
1
- export { RESIZE_HANDLE_AREA_DECORATION_GAP, ShadowEvent, TableCssClassName, TableDecorations, } from '../types/index';
2
- export type { ActiveTableMenu, AlignmentOptions, Cell, CellColumnPositioning, CellHoverMeta, CellTransform, ColumnResizingPluginAction, ColumnResizingPluginState, DraggableBehaviour, DraggableData, DraggableSourceData, DraggableTargetData, DraggableType, HandleTypes, InsertRowMethods, InsertRowOptions, InvalidNodeAttr, MessageDescriptor, PermittedLayoutsDescriptor, PluginConfig, PluginInjectionAPI, PluginInjectionAPIWithA11y, ReportInvalidNodeAttrs, RowInsertPosition, TableDirection, TablePluginAction, TablePluginState, TableSharedState, TableSharedStateInternal, ToolbarMenuConfig, ToolbarMenuContext, ToolbarMenuState, WidthToWidest, } from '../types/index';
@@ -1 +0,0 @@
1
- export { baseTableStyles, insertColumnButtonOffset, tableCommentEditorStyles, tableFullPageEditorStyles, tableRowHeight, tableStyles, } from '../ui/common-styles';
@@ -1,7 +0,0 @@
1
- export {
2
- /**
3
- * @private
4
- * @deprecated Use {@link tablePlugin} instead.
5
- */
6
- default as tablesPlugin, default as tablePlugin, } from './tablePlugin';
7
- export type { TablePlugin, TablePluginOptions, TablePluginDependencies, TablePluginActions, TablePluginCommands, } from './tablePluginType';
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
3
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
4
- export declare const ExternalDropTargets: ({ editorView, node, getScrollOffset, getTableWrapperWidth, }: {
5
- editorView: EditorView;
6
- getScrollOffset: () => number;
7
- getTableWrapperWidth: () => number;
8
- node?: PMNode;
9
- }) => React.JSX.Element | null;
@@ -1,26 +0,0 @@
1
- import { ShadowEvent } from '../types';
2
- export declare class OverflowShadowsObserver {
3
- private tableIntersectionObserver?;
4
- private updateShadowState;
5
- private table;
6
- private wrapper;
7
- private leftShadowSentinel;
8
- private rightShadowSentinel;
9
- private shadowsObserved;
10
- private isSticky;
11
- private stickyRowHeight;
12
- constructor(updateShadowState: (shadowKey: ShadowEvent, value: boolean) => void, table: HTMLElement, wrapper: HTMLDivElement);
13
- private init;
14
- private updateStickyShadowsHeightIfChanged;
15
- private getStickyCell;
16
- observeShadowSentinels: (isSticky?: boolean) => void;
17
- /**
18
- * Takes a heightStyle if it can be computed in a less expensive manner,
19
- * e.g. bounds on an IntersectionObserverEntry, otherwise proceed with
20
- * reading it from sticky cell
21
- */
22
- updateStickyShadows: ((stickyRowHeight?: number) => void) & {
23
- cancel(): void;
24
- };
25
- dispose(): void;
26
- }