@atlaskit/editor-plugin-table 1.3.1 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (235) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/cjs/plugins/table/commands/misc.js +1 -2
  3. package/dist/cjs/plugins/table/index.js +25 -34
  4. package/dist/cjs/plugins/table/transforms/column-width.js +0 -17
  5. package/dist/cjs/plugins/table/transforms/delete-columns.js +4 -13
  6. package/dist/cjs/plugins/table/transforms/delete-rows.js +4 -13
  7. package/dist/cjs/plugins/table/transforms/fix-tables.js +6 -24
  8. package/dist/cjs/plugins/table/transforms/index.js +0 -13
  9. package/dist/cjs/plugins/table/transforms/merge.js +5 -20
  10. package/dist/cjs/version.json +1 -1
  11. package/dist/es2019/plugins/table/commands/misc.js +2 -3
  12. package/dist/es2019/plugins/table/index.js +21 -33
  13. package/dist/es2019/plugins/table/transforms/column-width.js +0 -17
  14. package/dist/es2019/plugins/table/transforms/delete-columns.js +4 -13
  15. package/dist/es2019/plugins/table/transforms/delete-rows.js +4 -13
  16. package/dist/es2019/plugins/table/transforms/fix-tables.js +0 -14
  17. package/dist/es2019/plugins/table/transforms/index.js +1 -2
  18. package/dist/es2019/plugins/table/transforms/merge.js +5 -21
  19. package/dist/es2019/version.json +1 -1
  20. package/dist/esm/plugins/table/commands/misc.js +2 -3
  21. package/dist/esm/plugins/table/index.js +25 -34
  22. package/dist/esm/plugins/table/transforms/column-width.js +0 -17
  23. package/dist/esm/plugins/table/transforms/delete-columns.js +4 -13
  24. package/dist/esm/plugins/table/transforms/delete-rows.js +4 -13
  25. package/dist/esm/plugins/table/transforms/fix-tables.js +0 -17
  26. package/dist/esm/plugins/table/transforms/index.js +1 -2
  27. package/dist/esm/plugins/table/transforms/merge.js +5 -21
  28. package/dist/esm/version.json +1 -1
  29. package/dist/types/plugins/table/index.d.ts +9 -0
  30. package/dist/types/plugins/table/transforms/fix-tables.d.ts +0 -1
  31. package/dist/types/plugins/table/transforms/index.d.ts +1 -2
  32. package/dist/types-ts4.5/i18n/cs.d.ts +35 -0
  33. package/dist/types-ts4.5/i18n/da.d.ts +33 -0
  34. package/dist/types-ts4.5/i18n/de.d.ts +33 -0
  35. package/dist/types-ts4.5/i18n/en.d.ts +35 -0
  36. package/dist/types-ts4.5/i18n/en_GB.d.ts +35 -0
  37. package/dist/types-ts4.5/i18n/es.d.ts +33 -0
  38. package/dist/types-ts4.5/i18n/fi.d.ts +33 -0
  39. package/dist/types-ts4.5/i18n/fr.d.ts +35 -0
  40. package/dist/types-ts4.5/i18n/hu.d.ts +35 -0
  41. package/dist/types-ts4.5/i18n/it.d.ts +35 -0
  42. package/dist/types-ts4.5/i18n/ja.d.ts +35 -0
  43. package/dist/types-ts4.5/i18n/ko.d.ts +33 -0
  44. package/dist/types-ts4.5/i18n/nb.d.ts +33 -0
  45. package/dist/types-ts4.5/i18n/nl.d.ts +35 -0
  46. package/dist/types-ts4.5/i18n/pl.d.ts +35 -0
  47. package/dist/types-ts4.5/i18n/pt_BR.d.ts +35 -0
  48. package/dist/types-ts4.5/i18n/ru.d.ts +35 -0
  49. package/dist/types-ts4.5/i18n/sv.d.ts +33 -0
  50. package/dist/types-ts4.5/i18n/th.d.ts +33 -0
  51. package/dist/types-ts4.5/i18n/tr.d.ts +35 -0
  52. package/dist/types-ts4.5/i18n/uk.d.ts +35 -0
  53. package/dist/types-ts4.5/i18n/vi.d.ts +33 -0
  54. package/dist/types-ts4.5/i18n/zh.d.ts +35 -0
  55. package/dist/types-ts4.5/i18n/zh_TW.d.ts +35 -0
  56. package/dist/types-ts4.5/index.d.ts +1 -0
  57. package/dist/types-ts4.5/plugins/table/commands/clear.d.ts +3 -0
  58. package/dist/types-ts4.5/plugins/table/commands/collapse.d.ts +2 -0
  59. package/dist/types-ts4.5/plugins/table/commands/go-to-next-cell.d.ts +4 -0
  60. package/dist/types-ts4.5/plugins/table/commands/hover.d.ts +8 -0
  61. package/dist/types-ts4.5/plugins/table/commands/index.d.ts +8 -0
  62. package/dist/types-ts4.5/plugins/table/commands/insert.d.ts +10 -0
  63. package/dist/types-ts4.5/plugins/table/commands/misc.d.ts +27 -0
  64. package/dist/types-ts4.5/plugins/table/commands/referentiality.d.ts +2 -0
  65. package/dist/types-ts4.5/plugins/table/commands/selection.d.ts +8 -0
  66. package/dist/types-ts4.5/plugins/table/commands/sort.d.ts +3 -0
  67. package/dist/types-ts4.5/plugins/table/commands/split-cell.d.ts +6 -0
  68. package/dist/types-ts4.5/plugins/table/commands/toggle.d.ts +12 -0
  69. package/dist/types-ts4.5/plugins/table/commands-with-analytics.d.ts +26 -0
  70. package/dist/types-ts4.5/plugins/table/create-plugin-config.d.ts +2 -0
  71. package/dist/types-ts4.5/plugins/table/event-handlers.d.ts +16 -0
  72. package/dist/types-ts4.5/plugins/table/handlers.d.ts +3 -0
  73. package/dist/types-ts4.5/plugins/table/index.d.ts +30 -0
  74. package/dist/types-ts4.5/plugins/table/nodeviews/OverflowShadowsObserver.d.ts +25 -0
  75. package/dist/types-ts4.5/plugins/table/nodeviews/TableComponent.d.ts +73 -0
  76. package/dist/types-ts4.5/plugins/table/nodeviews/__mocks__/OverflowShadowsObserver.d.ts +9 -0
  77. package/dist/types-ts4.5/plugins/table/nodeviews/__mocks__/OverridableMock.d.ts +9 -0
  78. package/dist/types-ts4.5/plugins/table/nodeviews/table.d.ts +34 -0
  79. package/dist/types-ts4.5/plugins/table/nodeviews/tableCell.d.ts +19 -0
  80. package/dist/types-ts4.5/plugins/table/nodeviews/types.d.ts +24 -0
  81. package/dist/types-ts4.5/plugins/table/nodeviews/update-overflow-shadows.d.ts +8 -0
  82. package/dist/types-ts4.5/plugins/table/pm-plugins/decorations/plugin.d.ts +7 -0
  83. package/dist/types-ts4.5/plugins/table/pm-plugins/decorations/utils/column-controls.d.ts +3 -0
  84. package/dist/types-ts4.5/plugins/table/pm-plugins/decorations/utils/column-resizing.d.ts +2 -0
  85. package/dist/types-ts4.5/plugins/table/pm-plugins/decorations/utils/compose-decorations.d.ts +2 -0
  86. package/dist/types-ts4.5/plugins/table/pm-plugins/decorations/utils/index.d.ts +3 -0
  87. package/dist/types-ts4.5/plugins/table/pm-plugins/decorations/utils/types.d.ts +6 -0
  88. package/dist/types-ts4.5/plugins/table/pm-plugins/default-table-selection.d.ts +4 -0
  89. package/dist/types-ts4.5/plugins/table/pm-plugins/keymap.d.ts +5 -0
  90. package/dist/types-ts4.5/plugins/table/pm-plugins/main.d.ts +8 -0
  91. package/dist/types-ts4.5/plugins/table/pm-plugins/plugin-factory.d.ts +1 -0
  92. package/dist/types-ts4.5/plugins/table/pm-plugins/plugin-key.d.ts +3 -0
  93. package/dist/types-ts4.5/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.d.ts +15 -0
  94. package/dist/types-ts4.5/plugins/table/pm-plugins/sticky-headers/commands.d.ts +3 -0
  95. package/dist/types-ts4.5/plugins/table/pm-plugins/sticky-headers/index.d.ts +6 -0
  96. package/dist/types-ts4.5/plugins/table/pm-plugins/sticky-headers/nodeviews/dom.d.ts +6 -0
  97. package/dist/types-ts4.5/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.d.ts +72 -0
  98. package/dist/types-ts4.5/plugins/table/pm-plugins/sticky-headers/plugin-key.d.ts +3 -0
  99. package/dist/types-ts4.5/plugins/table/pm-plugins/sticky-headers/plugin-state.d.ts +3 -0
  100. package/dist/types-ts4.5/plugins/table/pm-plugins/sticky-headers/plugin.d.ts +4 -0
  101. package/dist/types-ts4.5/plugins/table/pm-plugins/sticky-headers/types.d.ts +16 -0
  102. package/dist/types-ts4.5/plugins/table/pm-plugins/sticky-headers/util.d.ts +2 -0
  103. package/dist/types-ts4.5/plugins/table/pm-plugins/table-local-id.d.ts +22 -0
  104. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/commands.d.ts +25 -0
  105. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/event-handlers.d.ts +4 -0
  106. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/index.d.ts +4 -0
  107. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/plugin-factory.d.ts +4 -0
  108. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/plugin-key.d.ts +3 -0
  109. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/plugin.d.ts +6 -0
  110. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/reducer.d.ts +3 -0
  111. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/colgroup.d.ts +15 -0
  112. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/column-state.d.ts +14 -0
  113. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/content-width.d.ts +4 -0
  114. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/dom.d.ts +13 -0
  115. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/index.d.ts +12 -0
  116. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/misc.d.ts +22 -0
  117. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/resize-column.d.ts +2 -0
  118. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/resize-logic.d.ts +4 -0
  119. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/resize-state.d.ts +29 -0
  120. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/scale-table.d.ts +17 -0
  121. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/types.d.ts +22 -0
  122. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/unit-to-number.d.ts +1 -0
  123. package/dist/types-ts4.5/plugins/table/pm-plugins/table-selection-keymap.d.ts +4 -0
  124. package/dist/types-ts4.5/plugins/table/reducer.d.ts +3 -0
  125. package/dist/types-ts4.5/plugins/table/toolbar.d.ts +37 -0
  126. package/dist/types-ts4.5/plugins/table/transforms/column-width.d.ts +18 -0
  127. package/dist/types-ts4.5/plugins/table/transforms/delete-columns.d.ts +3 -0
  128. package/dist/types-ts4.5/plugins/table/transforms/delete-rows.d.ts +3 -0
  129. package/dist/types-ts4.5/plugins/table/transforms/fix-tables.d.ts +9 -0
  130. package/dist/types-ts4.5/plugins/table/transforms/index.d.ts +6 -0
  131. package/dist/types-ts4.5/plugins/table/transforms/merge.d.ts +5 -0
  132. package/dist/types-ts4.5/plugins/table/transforms/replace-table.d.ts +5 -0
  133. package/dist/types-ts4.5/plugins/table/transforms/split.d.ts +9 -0
  134. package/dist/types-ts4.5/plugins/table/types.d.ts +332 -0
  135. package/dist/types-ts4.5/plugins/table/ui/FloatingContextualButton/index.d.ts +29 -0
  136. package/dist/types-ts4.5/plugins/table/ui/FloatingContextualButton/styles.d.ts +3 -0
  137. package/dist/types-ts4.5/plugins/table/ui/FloatingContextualMenu/ContextualMenu.d.ts +88 -0
  138. package/dist/types-ts4.5/plugins/table/ui/FloatingContextualMenu/index.d.ts +23 -0
  139. package/dist/types-ts4.5/plugins/table/ui/FloatingContextualMenu/styles.d.ts +2 -0
  140. package/dist/types-ts4.5/plugins/table/ui/FloatingDeleteButton/DeleteButton.d.ts +14 -0
  141. package/dist/types-ts4.5/plugins/table/ui/FloatingDeleteButton/getPopUpOptions.d.ts +10 -0
  142. package/dist/types-ts4.5/plugins/table/ui/FloatingDeleteButton/index.d.ts +54 -0
  143. package/dist/types-ts4.5/plugins/table/ui/FloatingDeleteButton/types.d.ts +1 -0
  144. package/dist/types-ts4.5/plugins/table/ui/FloatingInsertButton/InsertButton.d.ts +12 -0
  145. package/dist/types-ts4.5/plugins/table/ui/FloatingInsertButton/getPopupOptions.d.ts +3 -0
  146. package/dist/types-ts4.5/plugins/table/ui/FloatingInsertButton/index.d.ts +35 -0
  147. package/dist/types-ts4.5/plugins/table/ui/LayoutButton/index.d.ts +21 -0
  148. package/dist/types-ts4.5/plugins/table/ui/TableFloatingControls/CornerControls/index.d.ts +16 -0
  149. package/dist/types-ts4.5/plugins/table/ui/TableFloatingControls/NumberColumn/index.d.ts +21 -0
  150. package/dist/types-ts4.5/plugins/table/ui/TableFloatingControls/RowControls/index.d.ts +17 -0
  151. package/dist/types-ts4.5/plugins/table/ui/TableFloatingControls/index.d.ts +40 -0
  152. package/dist/types-ts4.5/plugins/table/ui/common-styles.d.ts +8 -0
  153. package/dist/types-ts4.5/plugins/table/ui/consts.d.ts +39 -0
  154. package/dist/types-ts4.5/plugins/table/ui/messages.d.ts +58 -0
  155. package/dist/types-ts4.5/plugins/table/ui/ui-styles.d.ts +15 -0
  156. package/dist/types-ts4.5/plugins/table/utils/analytics.d.ts +18 -0
  157. package/dist/types-ts4.5/plugins/table/utils/collapse.d.ts +29 -0
  158. package/dist/types-ts4.5/plugins/table/utils/column-controls.d.ts +10 -0
  159. package/dist/types-ts4.5/plugins/table/utils/decoration.d.ts +16 -0
  160. package/dist/types-ts4.5/plugins/table/utils/dom.d.ts +20 -0
  161. package/dist/types-ts4.5/plugins/table/utils/get-allow-add-column-custom-step.d.ts +2 -0
  162. package/dist/types-ts4.5/plugins/table/utils/index.d.ts +11 -0
  163. package/dist/types-ts4.5/plugins/table/utils/nodes.d.ts +12 -0
  164. package/dist/types-ts4.5/plugins/table/utils/paste.d.ts +14 -0
  165. package/dist/types-ts4.5/plugins/table/utils/row-controls.d.ts +16 -0
  166. package/dist/types-ts4.5/plugins/table/utils/selection.d.ts +6 -0
  167. package/dist/types-ts4.5/plugins/table/utils/table.d.ts +4 -0
  168. package/dist/types-ts4.5/plugins/table/utils/update-plugin-state-decorations.d.ts +4 -0
  169. package/dist/types-ts4.5/plugins/table-plugin.d.ts +2 -0
  170. package/dist/types-ts4.5/types/i18n.d.ts +5 -0
  171. package/examples/99-testing.tsx +4 -94
  172. package/package.json +7 -5
  173. package/report.api.md +11 -0
  174. package/src/__tests__/unit/analytics.ts +6 -0
  175. package/src/__tests__/unit/collab.ts +6 -0
  176. package/src/__tests__/unit/color-picker.ts +4 -0
  177. package/src/__tests__/unit/commands/go-to-next-cell.ts +8 -1
  178. package/src/__tests__/unit/commands/insert.ts +6 -0
  179. package/src/__tests__/unit/commands/misc.ts +14 -6
  180. package/src/__tests__/unit/commands/sort.ts +19 -12
  181. package/src/__tests__/unit/commands.ts +10 -2
  182. package/src/__tests__/unit/copy-paste.ts +6 -0
  183. package/src/__tests__/unit/event-handlers/index.ts +13 -8
  184. package/src/__tests__/unit/event-handlers.ts +13 -1
  185. package/src/__tests__/unit/fix-tables.ts +8 -4
  186. package/src/__tests__/unit/get-toolbar-config.ts +4 -0
  187. package/src/__tests__/unit/handlers.ts +8 -1
  188. package/src/__tests__/unit/hover-selection.ts +8 -1
  189. package/src/__tests__/unit/index.ts +10 -2
  190. package/src/__tests__/unit/keymap.ts +10 -4
  191. package/src/__tests__/unit/layout.ts +4 -0
  192. package/src/__tests__/unit/nodeviews/cell.ts +6 -0
  193. package/src/__tests__/unit/nodeviews/table.ts +16 -9
  194. package/src/__tests__/unit/pm-plugins/decorations/column-resizing.ts +14 -4
  195. package/src/__tests__/unit/pm-plugins/decorations/plugin.ts +8 -1
  196. package/src/__tests__/unit/pm-plugins/main-with-allow-collapse.ts +4 -0
  197. package/src/__tests__/unit/pm-plugins/main.ts +6 -0
  198. package/src/__tests__/unit/pm-plugins/safari-delete-composition-text-issue-workaround.ts +8 -4
  199. package/src/__tests__/unit/pm-plugins/sticky-headers/tableRow.tsx +13 -4
  200. package/src/__tests__/unit/pm-plugins/table-resizing/event-handlers.ts +6 -0
  201. package/src/__tests__/unit/pm-plugins/table-selection-keymap.ts +6 -0
  202. package/src/__tests__/unit/sort-column.ts +6 -0
  203. package/src/__tests__/unit/toolbar.ts +16 -9
  204. package/src/__tests__/unit/transforms/delete-columns.ts +8 -1
  205. package/src/__tests__/unit/transforms/delete-rows.ts +8 -1
  206. package/src/__tests__/unit/transforms/merging.ts +8 -1
  207. package/src/__tests__/unit/ui/ContextualMenu.tsx +8 -4
  208. package/src/__tests__/unit/ui/CornerControls.tsx +8 -1
  209. package/src/__tests__/unit/ui/FloatingContextualButton.tsx +8 -1
  210. package/src/__tests__/unit/ui/FloatingContextualMenu.tsx +8 -1
  211. package/src/__tests__/unit/ui/RowControls.tsx +8 -1
  212. package/src/__tests__/unit/ui/TableFloatingControls.tsx +8 -1
  213. package/src/__tests__/unit/undo-redo.ts +6 -0
  214. package/src/__tests__/unit/utils/collapse.ts +4 -0
  215. package/src/__tests__/unit/utils/nodes.ts +8 -1
  216. package/src/__tests__/unit/utils/row-controls.ts +8 -1
  217. package/src/__tests__/unit/utils.ts +8 -1
  218. package/src/plugins/table/commands/misc.ts +2 -4
  219. package/src/plugins/table/index.tsx +39 -40
  220. package/src/plugins/table/transforms/column-width.ts +0 -11
  221. package/src/plugins/table/transforms/delete-columns.ts +4 -5
  222. package/src/plugins/table/transforms/delete-rows.ts +4 -7
  223. package/src/plugins/table/transforms/fix-tables.ts +0 -17
  224. package/src/plugins/table/transforms/index.ts +1 -2
  225. package/src/plugins/table/transforms/merge.ts +9 -20
  226. package/dist/cjs/plugins/table/pm-plugins/safari-delayed-dom-selection-syncing-workaround.js +0 -79
  227. package/dist/cjs/plugins/table/transforms/metadata.js +0 -20
  228. package/dist/es2019/plugins/table/pm-plugins/safari-delayed-dom-selection-syncing-workaround.js +0 -71
  229. package/dist/es2019/plugins/table/transforms/metadata.js +0 -12
  230. package/dist/esm/plugins/table/pm-plugins/safari-delayed-dom-selection-syncing-workaround.js +0 -71
  231. package/dist/esm/plugins/table/transforms/metadata.js +0 -14
  232. package/dist/types/plugins/table/pm-plugins/safari-delayed-dom-selection-syncing-workaround.d.ts +0 -4
  233. package/dist/types/plugins/table/transforms/metadata.d.ts +0 -21
  234. package/src/plugins/table/pm-plugins/safari-delayed-dom-selection-syncing-workaround.ts +0 -78
  235. package/src/plugins/table/transforms/metadata.ts +0 -35
@@ -0,0 +1,332 @@
1
+ import { Node as PmNode } from 'prosemirror-model';
2
+ import { Transaction } from 'prosemirror-state';
3
+ import { Rect } from '@atlaskit/editor-tables/table-map';
4
+ import { DecorationSet } from 'prosemirror-view';
5
+ import { IntlShape } from 'react-intl-next';
6
+ import { TableLayout } from '@atlaskit/adf-schema';
7
+ import { TableColumnOrdering } from '@atlaskit/adf-schema/steps';
8
+ import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
9
+ export declare const RESIZE_HANDLE_AREA_DECORATION_GAP = 30;
10
+ export type RowInsertPosition = 'TOP' | 'BOTTOM';
11
+ export type PermittedLayoutsDescriptor = TableLayout[] | 'all';
12
+ export type Cell = {
13
+ pos: number;
14
+ start: number;
15
+ node: PmNode;
16
+ };
17
+ export type CellTransform = (cell: Cell) => (tr: Transaction) => Transaction;
18
+ export interface InsertRowOptions {
19
+ index: number;
20
+ moveCursorToInsertedRow: boolean;
21
+ }
22
+ export type InsertRowMethods = INPUT_METHOD.CONTEXT_MENU | INPUT_METHOD.BUTTON | INPUT_METHOD.SHORTCUT | INPUT_METHOD.KEYBOARD | INPUT_METHOD.FLOATING_TB;
23
+ export interface PluginConfig {
24
+ advanced?: boolean;
25
+ allowBackgroundColor?: boolean;
26
+ allowColumnResizing?: boolean;
27
+ allowHeaderColumn?: boolean;
28
+ allowHeaderRow?: boolean;
29
+ allowMergeCells?: boolean;
30
+ allowNumberColumn?: boolean;
31
+ allowColumnSorting?: boolean;
32
+ allowAddColumnWithCustomStep?: boolean;
33
+ allowCollapse?: boolean;
34
+ isHeaderRowRequired?: boolean;
35
+ permittedLayouts?: PermittedLayoutsDescriptor;
36
+ allowControls?: boolean;
37
+ stickyHeaders?: boolean;
38
+ allowCellOptionsInFloatingToolbar?: boolean;
39
+ tableCellOptimization?: boolean;
40
+ tableRenderOptimization?: boolean;
41
+ stickyHeadersOptimization?: boolean;
42
+ initialRenderOptimization?: boolean;
43
+ mouseMoveOptimization?: boolean;
44
+ tableOverflowShadowsOptimization?: boolean;
45
+ allowDistributeColumns?: boolean;
46
+ }
47
+ export interface ColumnResizingPluginState {
48
+ resizeHandlePos: number | null;
49
+ dragging: {
50
+ startX: number;
51
+ startWidth: number;
52
+ } | null;
53
+ lastClick: {
54
+ x: number;
55
+ y: number;
56
+ time: number;
57
+ } | null;
58
+ lastColumnResizable?: boolean;
59
+ }
60
+ export type CellColumnPositioning = Pick<Rect, 'right' | 'left'>;
61
+ export interface TablePluginState {
62
+ editorHasFocus?: boolean;
63
+ hoveredColumns: number[];
64
+ hoveredRows: number[];
65
+ pluginConfig: PluginConfig;
66
+ isHeaderColumnEnabled: boolean;
67
+ isHeaderRowEnabled: boolean;
68
+ isNumberColumnEnabled?: boolean;
69
+ targetCellPosition?: number;
70
+ tableNode?: PmNode;
71
+ tableRef?: HTMLTableElement;
72
+ tablePos?: number;
73
+ tableWrapperTarget?: HTMLElement;
74
+ isContextualMenuOpen?: boolean;
75
+ isInDanger?: boolean;
76
+ insertColumnButtonIndex?: number;
77
+ insertRowButtonIndex?: number;
78
+ isFullWidthModeEnabled?: boolean;
79
+ layout?: TableLayout;
80
+ ordering?: TableColumnOrdering;
81
+ resizeHandleRowIndex?: number;
82
+ resizeHandleColumnIndex?: number;
83
+ tableCellOptimization?: boolean;
84
+ isTableCollapsed?: boolean;
85
+ canCollapseTable?: boolean;
86
+ }
87
+ export type TablePluginAction = {
88
+ type: 'SET_EDITOR_FOCUS';
89
+ data: {
90
+ editorHasFocus: boolean;
91
+ };
92
+ } | {
93
+ type: 'TOGGLE_HEADER_ROW';
94
+ } | {
95
+ type: 'TOGGLE_HEADER_COLUMN';
96
+ } | {
97
+ type: 'SORT_TABLE';
98
+ data: {
99
+ ordering: TableColumnOrdering;
100
+ };
101
+ } | {
102
+ type: 'SET_TABLE_REF';
103
+ data: {
104
+ tableRef?: HTMLTableElement;
105
+ tableNode?: PmNode;
106
+ tableWrapperTarget?: HTMLElement;
107
+ layout: TableLayout;
108
+ isHeaderRowEnabled: boolean;
109
+ isHeaderColumnEnabled: boolean;
110
+ };
111
+ } | {
112
+ type: 'HOVER_ROWS';
113
+ data: {
114
+ decorationSet: DecorationSet;
115
+ hoveredRows: number[];
116
+ isInDanger?: boolean;
117
+ };
118
+ } | {
119
+ type: 'HOVER_CELLS';
120
+ data: {
121
+ decorationSet: DecorationSet;
122
+ };
123
+ } | {
124
+ type: 'HOVER_COLUMNS';
125
+ data: {
126
+ decorationSet: DecorationSet;
127
+ hoveredColumns: number[];
128
+ isInDanger?: boolean;
129
+ };
130
+ } | {
131
+ type: 'HOVER_TABLE';
132
+ data: {
133
+ decorationSet: DecorationSet;
134
+ hoveredRows: number[];
135
+ hoveredColumns: number[];
136
+ isInDanger?: boolean;
137
+ };
138
+ } | {
139
+ type: 'ADD_RESIZE_HANDLE_DECORATIONS';
140
+ data: {
141
+ decorationSet: DecorationSet;
142
+ resizeHandleRowIndex: number;
143
+ resizeHandleColumnIndex: number;
144
+ };
145
+ } | {
146
+ type: 'CLEAR_HOVER_SELECTION';
147
+ data: {
148
+ decorationSet: DecorationSet;
149
+ };
150
+ } | {
151
+ type: 'SHOW_RESIZE_HANDLE_LINE';
152
+ data: {
153
+ decorationSet: DecorationSet;
154
+ };
155
+ } | {
156
+ type: 'HIDE_RESIZE_HANDLE_LINE';
157
+ data: {
158
+ decorationSet: DecorationSet;
159
+ };
160
+ } | {
161
+ type: 'SET_TARGET_CELL_POSITION';
162
+ data: {
163
+ targetCellPosition?: number;
164
+ };
165
+ } | {
166
+ type: 'SELECT_COLUMN';
167
+ data: {
168
+ targetCellPosition: number;
169
+ decorationSet: DecorationSet;
170
+ };
171
+ } | {
172
+ type: 'SET_TABLE_LAYOUT';
173
+ data: {
174
+ layout: TableLayout;
175
+ };
176
+ } | {
177
+ type: 'SHOW_INSERT_ROW_BUTTON';
178
+ data: {
179
+ insertRowButtonIndex: number;
180
+ };
181
+ } | {
182
+ type: 'SHOW_INSERT_COLUMN_BUTTON';
183
+ data: {
184
+ insertColumnButtonIndex: number;
185
+ };
186
+ } | {
187
+ type: 'HIDE_INSERT_COLUMN_OR_ROW_BUTTON';
188
+ } | {
189
+ type: 'TOGGLE_CONTEXTUAL_MENU';
190
+ };
191
+ export type ColumnResizingPluginAction = {
192
+ type: 'SET_RESIZE_HANDLE_POSITION';
193
+ data: {
194
+ resizeHandlePos: number | null;
195
+ };
196
+ } | {
197
+ type: 'STOP_RESIZING';
198
+ } | {
199
+ type: 'SET_DRAGGING';
200
+ data: {
201
+ dragging: {
202
+ startX: number;
203
+ startWidth: number;
204
+ } | null;
205
+ };
206
+ } | {
207
+ type: 'SET_LAST_CLICK';
208
+ data: {
209
+ lastClick: {
210
+ x: number;
211
+ y: number;
212
+ time: number;
213
+ } | null;
214
+ };
215
+ };
216
+ export declare enum TableDecorations {
217
+ ALL_CONTROLS_HOVER = "CONTROLS_HOVER",
218
+ ROW_CONTROLS_HOVER = "ROW_CONTROLS_HOVER",
219
+ COLUMN_CONTROLS_HOVER = "COLUMN_CONTROLS_HOVER",
220
+ TABLE_CONTROLS_HOVER = "TABLE_CONTROLS_HOVER",
221
+ CELL_CONTROLS_HOVER = "CELL_CONTROLS_HOVER",
222
+ COLUMN_CONTROLS_DECORATIONS = "COLUMN_CONTROLS_DECORATIONS",
223
+ COLUMN_SELECTED = "COLUMN_SELECTED",
224
+ COLUMN_RESIZING_HANDLE = "COLUMN_RESIZING_HANDLE",
225
+ COLUMN_RESIZING_HANDLE_LINE = "COLUMN_RESIZING_HANDLE_LINE",
226
+ LAST_CELL_ELEMENT = "LAST_CELL_ELEMENT"
227
+ }
228
+ export declare const TableCssClassName: {
229
+ COLUMN_CONTROLS: string;
230
+ COLUMN_CONTROLS_DECORATIONS: string;
231
+ COLUMN_SELECTED: string;
232
+ ROW_CONTROLS_WRAPPER: string;
233
+ ROW_CONTROLS: string;
234
+ ROW_CONTROLS_INNER: string;
235
+ ROW_CONTROLS_BUTTON_WRAP: string;
236
+ ROW_CONTROLS_BUTTON: string;
237
+ CONTROLS_BUTTON: string;
238
+ CONTROLS_BUTTON_ICON: string;
239
+ CONTROLS_INSERT_BUTTON: string;
240
+ CONTROLS_INSERT_BUTTON_INNER: string;
241
+ CONTROLS_INSERT_BUTTON_WRAP: string;
242
+ CONTROLS_INSERT_LINE: string;
243
+ CONTROLS_BUTTON_OVERLAY: string;
244
+ LAYOUT_BUTTON: string;
245
+ CONTROLS_INSERT_MARKER: string;
246
+ CONTROLS_INSERT_COLUMN: string;
247
+ CONTROLS_INSERT_ROW: string;
248
+ CONTROLS_DELETE_BUTTON_WRAP: string;
249
+ CONTROLS_DELETE_BUTTON: string;
250
+ CONTROLS_FLOATING_BUTTON_COLUMN: string;
251
+ CONTROLS_FLOATING_BUTTON_ROW: string;
252
+ CORNER_CONTROLS: string;
253
+ CORNER_CONTROLS_INSERT_ROW_MARKER: string;
254
+ CORNER_CONTROLS_INSERT_COLUMN_MARKER: string;
255
+ CONTROLS_CORNER_BUTTON: string;
256
+ NUMBERED_COLUMN: string;
257
+ NUMBERED_COLUMN_BUTTON: string;
258
+ HOVERED_COLUMN: string;
259
+ HOVERED_ROW: string;
260
+ HOVERED_TABLE: string;
261
+ HOVERED_CELL: string;
262
+ HOVERED_CELL_IN_DANGER: string;
263
+ HOVERED_CELL_ACTIVE: string;
264
+ HOVERED_CELL_WARNING: string;
265
+ HOVERED_DELETE_BUTTON: string;
266
+ WITH_CONTROLS: string;
267
+ RESIZING_PLUGIN: string;
268
+ RESIZE_CURSOR: string;
269
+ IS_RESIZING: string;
270
+ RESIZE_HANDLE: string;
271
+ RESIZE_HANDLE_DECORATION: string;
272
+ CONTEXTUAL_SUBMENU: string;
273
+ CONTEXTUAL_MENU_BUTTON_WRAP: string;
274
+ CONTEXTUAL_MENU_BUTTON: string;
275
+ CONTEXTUAL_MENU_ICON: string;
276
+ SELECTED_CELL: string;
277
+ NODEVIEW_WRAPPER: string;
278
+ TABLE_SELECTED: string;
279
+ TABLE_CELL: string;
280
+ TABLE_HEADER_CELL: string;
281
+ TABLE_STICKY: string;
282
+ TOP_LEFT_CELL: string;
283
+ LAST_ITEM_IN_CELL: string;
284
+ WITH_RESIZE_LINE: string;
285
+ WITH_RESIZE_LINE_LAST_COLUMN: string;
286
+ TABLE_CONTAINER: string;
287
+ TABLE_NODE_WRAPPER: string;
288
+ TABLE_LEFT_SHADOW: string;
289
+ TABLE_RIGHT_SHADOW: string;
290
+ TABLE_STICKY_SHADOW: string;
291
+ TABLE_STICKY_WRAPPER: string;
292
+ TABLE_STICKY_SENTINEL_TOP: string;
293
+ TABLE_STICKY_SENTINEL_BOTTOM: string;
294
+ TABLE_SHADOW_SENTINEL_LEFT: string;
295
+ TABLE_SHADOW_SENTINEL_RIGHT: string;
296
+ TABLE_CELL_NODEVIEW_CONTENT_DOM: string;
297
+ TABLE_CELL_WRAPPER: string;
298
+ TABLE_HEADER_CELL_WRAPPER: string;
299
+ TABLE_ROW_CONTROLS_WRAPPER: string;
300
+ TABLE_COLUMN_CONTROLS_DECORATIONS: string;
301
+ };
302
+ export interface ToolbarMenuConfig {
303
+ allowHeaderRow?: boolean;
304
+ allowHeaderColumn?: boolean;
305
+ allowNumberColumn?: boolean;
306
+ allowCollapse?: boolean;
307
+ }
308
+ export interface ToolbarMenuState {
309
+ isHeaderRowEnabled?: boolean;
310
+ isHeaderColumnEnabled?: boolean;
311
+ isNumberColumnEnabled?: boolean;
312
+ isTableCollapsed?: boolean;
313
+ canCollapseTable?: boolean;
314
+ }
315
+ export interface ToolbarMenuContext {
316
+ formatMessage: IntlShape['formatMessage'];
317
+ }
318
+ export type ElementContentRects = {
319
+ [key: string]: ResizeObserverEntry['contentRect'];
320
+ };
321
+ export declare enum ShadowEvent {
322
+ SHOW_BEFORE_SHADOW = "showBeforeShadow",
323
+ SHOW_AFTER_SHADOW = "showAfterShadow"
324
+ }
325
+ export type ReportInvalidNodeAttrs = (invalidNodeAttrs: InvalidNodeAttr) => void;
326
+ export type InvalidNodeAttr = {
327
+ nodeType: string;
328
+ attribute: string;
329
+ reason: string;
330
+ spanValue: number;
331
+ tableLocalId: string;
332
+ };
@@ -0,0 +1,29 @@
1
+ /** @jsx jsx */
2
+ import React from 'react';
3
+ import { jsx } from '@emotion/react';
4
+ import { EditorView } from 'prosemirror-view';
5
+ import { WrappedComponentProps } from 'react-intl-next';
6
+ import { TableLayout } from '@atlaskit/adf-schema';
7
+ import { RowStickyState } from '../../pm-plugins/sticky-headers';
8
+ import { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
9
+ import { Node as PMNode } from 'prosemirror-model';
10
+ export interface Props {
11
+ editorView: EditorView;
12
+ tableNode?: PMNode;
13
+ targetCellPosition: number;
14
+ isContextualMenuOpen?: boolean;
15
+ mountPoint?: HTMLElement;
16
+ boundariesElement?: HTMLElement;
17
+ scrollableElement?: HTMLElement;
18
+ layout?: TableLayout;
19
+ isNumberColumnEnabled?: boolean;
20
+ stickyHeader?: RowStickyState;
21
+ dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
22
+ }
23
+ export declare class FloatingContextualButtonInner extends React.Component<Props & WrappedComponentProps, any> {
24
+ static displayName: string;
25
+ render(): jsx.JSX.Element | null;
26
+ shouldComponentUpdate(nextProps: Props): boolean;
27
+ private handleClick;
28
+ }
29
+ export default function (props: Props): jsx.JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { ThemeProps } from '@atlaskit/theme/types';
2
+ export declare const tableFloatingCellButtonStyles: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
3
+ export declare const tableFloatingCellButtonSelectedStyles: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
@@ -0,0 +1,88 @@
1
+ /** @jsx jsx */
2
+ import { Component } from 'react';
3
+ import { jsx } from '@emotion/react';
4
+ import { Rect } from '@atlaskit/editor-tables/table-map';
5
+ import { EditorView } from 'prosemirror-view';
6
+ import { WrappedComponentProps } from 'react-intl-next';
7
+ import type { GetEditorContainerWidth, GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
8
+ import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
9
+ export declare const messages: {
10
+ cellBackground: {
11
+ id: string;
12
+ defaultMessage: string;
13
+ description: string;
14
+ };
15
+ mergeCells: {
16
+ id: string;
17
+ defaultMessage: string;
18
+ description: string;
19
+ };
20
+ splitCell: {
21
+ id: string;
22
+ defaultMessage: string;
23
+ description: string;
24
+ };
25
+ clearCells: {
26
+ id: string;
27
+ defaultMessage: string;
28
+ description: string;
29
+ };
30
+ sortColumnASC: {
31
+ id: string;
32
+ defaultMessage: string;
33
+ description: string;
34
+ };
35
+ sortColumnDESC: {
36
+ id: string;
37
+ defaultMessage: string;
38
+ description: string;
39
+ };
40
+ canNotSortTable: {
41
+ id: string;
42
+ defaultMessage: string;
43
+ description: string;
44
+ };
45
+ distributeColumns: {
46
+ id: string;
47
+ defaultMessage: string;
48
+ description: string;
49
+ };
50
+ };
51
+ export interface Props {
52
+ editorView: EditorView;
53
+ isOpen: boolean;
54
+ selectionRect: Rect;
55
+ targetCellPosition?: number;
56
+ mountPoint?: HTMLElement;
57
+ allowMergeCells?: boolean;
58
+ allowColumnSorting?: boolean;
59
+ allowBackgroundColor?: boolean;
60
+ boundariesElement?: HTMLElement;
61
+ offset?: Array<number>;
62
+ editorAnalyticsAPI?: EditorAnalyticsAPI;
63
+ getEditorContainerWidth: GetEditorContainerWidth;
64
+ getEditorFeatureFlags: GetEditorFeatureFlags;
65
+ }
66
+ export interface State {
67
+ isSubmenuOpen: boolean;
68
+ }
69
+ export declare class ContextualMenu extends Component<Props & WrappedComponentProps, State> {
70
+ state: State;
71
+ static defaultProps: {
72
+ boundariesElement: HTMLElement;
73
+ };
74
+ render(): jsx.JSX.Element | null;
75
+ private handleSubMenuRef;
76
+ private createItems;
77
+ private onMenuItemActivated;
78
+ private toggleOpen;
79
+ private handleOpenChange;
80
+ private handleItemMouseEnter;
81
+ private handleItemMouseLeave;
82
+ private closeSubmenu;
83
+ private setColor;
84
+ }
85
+ declare const _default: import("react").FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps<"intl">>> & {
86
+ WrappedComponent: import("react").ComponentType<Props & WrappedComponentProps<"intl">>;
87
+ };
88
+ export default _default;
@@ -0,0 +1,23 @@
1
+ /** @jsx jsx */
2
+ import { jsx } from '@emotion/react';
3
+ import { EditorView } from 'prosemirror-view';
4
+ import { PluginConfig } from '../../types';
5
+ import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
6
+ import type { GetEditorContainerWidth, GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
7
+ export interface Props {
8
+ editorView: EditorView;
9
+ isOpen: boolean;
10
+ getEditorContainerWidth: GetEditorContainerWidth;
11
+ getEditorFeatureFlags: GetEditorFeatureFlags;
12
+ targetCellPosition?: number;
13
+ mountPoint?: HTMLElement;
14
+ boundariesElement?: HTMLElement;
15
+ scrollableElement?: HTMLElement;
16
+ pluginConfig?: PluginConfig;
17
+ editorAnalyticsAPI?: EditorAnalyticsAPI;
18
+ }
19
+ declare const FloatingContextualMenu: {
20
+ ({ mountPoint, boundariesElement, scrollableElement, editorView, isOpen, pluginConfig, editorAnalyticsAPI, getEditorContainerWidth, getEditorFeatureFlags, }: Props): jsx.JSX.Element | null;
21
+ displayName: string;
22
+ };
23
+ export default FloatingContextualMenu;
@@ -0,0 +1,2 @@
1
+ export declare const cellColourPreviewStyles: (selectedColor: string) => import("@emotion/react").SerializedStyles;
2
+ export declare const tablePopupStyles: import("@emotion/react").SerializedStyles;
@@ -0,0 +1,14 @@
1
+ import React, { SyntheticEvent } from 'react';
2
+ import { WrappedComponentProps } from 'react-intl-next';
3
+ import { MessageDescriptor } from 'react-intl-next';
4
+ export interface ButtonProps {
5
+ removeLabel: MessageDescriptor;
6
+ style?: object;
7
+ onClick?: (event: SyntheticEvent) => void;
8
+ onMouseEnter?: (event: SyntheticEvent) => void;
9
+ onMouseLeave?: (event: SyntheticEvent) => void;
10
+ }
11
+ declare const _default: React.FC<import("react-intl-next").WithIntlProps<ButtonProps & WrappedComponentProps<"intl">>> & {
12
+ WrappedComponent: React.ComponentType<ButtonProps & WrappedComponentProps<"intl">>;
13
+ };
14
+ export default _default;
@@ -0,0 +1,10 @@
1
+ import type { PopupProps } from '@atlaskit/editor-common/ui';
2
+ import { CellSelectionType } from './types';
3
+ interface GetPopupOptions {
4
+ left: number;
5
+ top: number;
6
+ selectionType?: CellSelectionType;
7
+ tableWrapper: HTMLElement | null;
8
+ }
9
+ export default function getPopupOptions({ left, top, selectionType, tableWrapper, }: GetPopupOptions): Partial<PopupProps>;
10
+ export {};
@@ -0,0 +1,54 @@
1
+ import { Component } from 'react';
2
+ import { Selection } from 'prosemirror-state';
3
+ import { EditorView } from 'prosemirror-view';
4
+ import { RowStickyState } from '../../pm-plugins/sticky-headers';
5
+ import { CellSelectionType } from './types';
6
+ import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
7
+ export interface Props {
8
+ editorView: EditorView;
9
+ selection: Selection;
10
+ tableRef?: HTMLTableElement;
11
+ mountPoint?: HTMLElement;
12
+ boundariesElement?: HTMLElement;
13
+ scrollableElement?: HTMLElement;
14
+ stickyHeaders?: RowStickyState;
15
+ isNumberColumnEnabled?: boolean;
16
+ editorAnalyticsAPI?: EditorAnalyticsAPI;
17
+ }
18
+ export interface State {
19
+ selectionType?: CellSelectionType;
20
+ left: number;
21
+ top: number;
22
+ indexes: number[];
23
+ position?: string;
24
+ scrollLeft: number;
25
+ }
26
+ export declare function getSelectionType(selection: Selection): 'column' | 'row' | undefined;
27
+ declare class FloatingDeleteButton extends Component<Props, State> {
28
+ static displayName: string;
29
+ wrapper: HTMLElement | null;
30
+ constructor(props: Props);
31
+ shouldComponentUpdate(_: Props, nextState: State): boolean;
32
+ componentDidMount(): void;
33
+ componentDidUpdate(): void;
34
+ updateWrapper: () => void;
35
+ componentWillUnmount(): void;
36
+ onWrapperScrolled: (e: Event) => void;
37
+ /**
38
+ * We derivate the button state from the properties passed.
39
+ * We do this in here because we need this information in different places
40
+ * and this prevent to do multiple width calculations in the same component.
41
+ */
42
+ static getDerivedStateFromProps(nextProps: Readonly<Props>, prevState: State): Partial<State> | null;
43
+ private handleMouseEnter;
44
+ private handleMouseLeave;
45
+ /**
46
+ *
47
+ *
48
+ * @private
49
+ * @memberof FloatingDeleteButton
50
+ */
51
+ private handleClick;
52
+ render(): JSX.Element | null;
53
+ }
54
+ export default FloatingDeleteButton;
@@ -0,0 +1 @@
1
+ export type CellSelectionType = 'column' | 'row' | undefined;
@@ -0,0 +1,12 @@
1
+ import React, { SyntheticEvent } from 'react';
2
+ import { WrappedComponentProps } from 'react-intl-next';
3
+ export interface ButtonProps {
4
+ type: 'row' | 'column';
5
+ tableRef: HTMLElement;
6
+ onMouseDown: (event: SyntheticEvent<HTMLButtonElement>) => void;
7
+ hasStickyHeaders: boolean;
8
+ }
9
+ declare const _default: React.FC<import("react-intl-next").WithIntlProps<ButtonProps & WrappedComponentProps<"intl">>> & {
10
+ WrappedComponent: React.ComponentType<ButtonProps & WrappedComponentProps<"intl">>;
11
+ };
12
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import type { PopupProps } from '@atlaskit/editor-common/ui';
2
+ declare function getPopupOptions(type: 'column' | 'row', index: number, hasNumberedColumns: boolean, tableContainer: HTMLElement | null): Partial<PopupProps>;
3
+ export default getPopupOptions;
@@ -0,0 +1,35 @@
1
+ import React from 'react';
2
+ import { Node as PmNode } from 'prosemirror-model';
3
+ import { EditorView } from 'prosemirror-view';
4
+ import { WrappedComponentProps } from 'react-intl-next';
5
+ import { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
6
+ import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
7
+ import type { GetEditorContainerWidth } from '@atlaskit/editor-common/types';
8
+ export interface Props {
9
+ editorView: EditorView;
10
+ getEditorContainerWidth: GetEditorContainerWidth;
11
+ tableRef?: HTMLElement;
12
+ tableNode?: PmNode;
13
+ insertColumnButtonIndex?: number;
14
+ insertRowButtonIndex?: number;
15
+ isHeaderColumnEnabled?: boolean;
16
+ isHeaderRowEnabled?: boolean;
17
+ mountPoint?: HTMLElement;
18
+ boundariesElement?: HTMLElement;
19
+ scrollableElement?: HTMLElement;
20
+ hasStickyHeaders?: boolean;
21
+ dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
22
+ editorAnalyticsAPI?: EditorAnalyticsAPI;
23
+ }
24
+ export declare class FloatingInsertButton extends React.Component<Props & WrappedComponentProps, any> {
25
+ static displayName: string;
26
+ constructor(props: Props & WrappedComponentProps);
27
+ render(): JSX.Element | null;
28
+ private getCellPosition;
29
+ private insertRow;
30
+ private insertColumn;
31
+ }
32
+ declare const _default: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps<"intl">>> & {
33
+ WrappedComponent: React.ComponentType<Props & WrappedComponentProps<"intl">>;
34
+ };
35
+ export default _default;
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ import { EditorView } from 'prosemirror-view';
3
+ import { WrappedComponentProps } from 'react-intl-next';
4
+ import { TableLayout } from '@atlaskit/adf-schema';
5
+ import { RowStickyState } from '../../pm-plugins/sticky-headers';
6
+ import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
7
+ export interface Props {
8
+ editorView: EditorView;
9
+ targetRef?: HTMLElement;
10
+ mountPoint?: HTMLElement;
11
+ boundariesElement?: HTMLElement;
12
+ scrollableElement?: HTMLElement;
13
+ isResizing?: boolean;
14
+ layout?: TableLayout;
15
+ stickyHeader?: RowStickyState;
16
+ editorAnalyticsAPI?: EditorAnalyticsAPI;
17
+ }
18
+ declare const _default: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps<"intl">>> & {
19
+ WrappedComponent: React.ComponentType<Props & WrappedComponentProps<"intl">>;
20
+ };
21
+ export default _default;
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import type { WrappedComponentProps } from 'react-intl-next';
3
+ import { EditorView } from 'prosemirror-view';
4
+ export interface Props {
5
+ editorView: EditorView;
6
+ tableRef?: HTMLTableElement;
7
+ isInDanger?: boolean;
8
+ isResizing?: boolean;
9
+ hoveredRows?: number[];
10
+ isHeaderColumnEnabled?: boolean;
11
+ isHeaderRowEnabled?: boolean;
12
+ stickyTop?: number;
13
+ }
14
+ export declare const CornerControls: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps<"intl">>> & {
15
+ WrappedComponent: React.ComponentType<Props & WrappedComponentProps<"intl">>;
16
+ };
@@ -0,0 +1,21 @@
1
+ import { Component } from 'react';
2
+ import { EditorView } from 'prosemirror-view';
3
+ export interface Props {
4
+ editorView: EditorView;
5
+ tableRef: HTMLTableElement;
6
+ tableActive?: boolean;
7
+ hoverRows: (rows: number[], danger?: boolean) => void;
8
+ hoveredRows?: number[];
9
+ selectRow: (row: number, expand: boolean) => void;
10
+ hasHeaderRow?: boolean;
11
+ isInDanger?: boolean;
12
+ isResizing?: boolean;
13
+ stickyTop?: number;
14
+ }
15
+ export default class NumberColumn extends Component<Props, any> {
16
+ render(): JSX.Element;
17
+ private hoverRows;
18
+ private selectRow;
19
+ private clearHoverSelection;
20
+ private getClassNames;
21
+ }