@atlaskit/editor-plugin-table 5.3.13 → 5.3.15

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 (139) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/cjs/plugins/table/event-handlers.js +6 -3
  3. package/dist/cjs/plugins/table/index.js +6 -4
  4. package/dist/cjs/plugins/table/pm-plugins/decorations/plugin.js +3 -7
  5. package/dist/cjs/plugins/table/pm-plugins/decorations/utils/column-controls.js +1 -3
  6. package/dist/cjs/plugins/table/pm-plugins/drag-and-drop/plugin.js +11 -0
  7. package/dist/cjs/plugins/table/types.js +9 -2
  8. package/dist/cjs/plugins/table/ui/FloatingDragMenu/DragMenu.js +49 -11
  9. package/dist/cjs/plugins/table/ui/FloatingDragMenu/index.js +10 -5
  10. package/dist/cjs/plugins/table/ui/FloatingInsertButton/InsertButton.js +57 -9
  11. package/dist/cjs/plugins/table/ui/FloatingInsertButton/getPopupOptions.js +9 -7
  12. package/dist/cjs/plugins/table/ui/FloatingInsertButton/index.js +13 -4
  13. package/dist/cjs/plugins/table/ui/TableFloatingColumnControls/ColumnControls/index.js +44 -5
  14. package/dist/cjs/plugins/table/ui/TableFloatingColumnControls/index.js +6 -4
  15. package/dist/cjs/plugins/table/ui/TableFloatingControls/RowControls/DragControls.js +35 -13
  16. package/dist/cjs/plugins/table/ui/TableFloatingControls/index.js +2 -0
  17. package/dist/cjs/plugins/table/ui/common-styles.js +1 -1
  18. package/dist/cjs/plugins/table/ui/icons/AddColLeftIcon.js +44 -0
  19. package/dist/cjs/plugins/table/ui/icons/AddColRightIcon.js +44 -0
  20. package/dist/cjs/plugins/table/ui/icons/AddRowAboveIcon.js +45 -0
  21. package/dist/cjs/plugins/table/ui/icons/AddRowBelowIcon.js +40 -0
  22. package/dist/cjs/plugins/table/ui/icons/index.js +29 -1
  23. package/dist/cjs/plugins/table/ui/ui-styles.js +27 -24
  24. package/dist/cjs/plugins/table/utils/dom.js +12 -4
  25. package/dist/cjs/plugins/table/utils/drag-menu.js +122 -10
  26. package/dist/cjs/plugins/table/utils/index.js +12 -0
  27. package/dist/es2019/plugins/table/event-handlers.js +5 -4
  28. package/dist/es2019/plugins/table/index.js +6 -4
  29. package/dist/es2019/plugins/table/pm-plugins/decorations/plugin.js +3 -7
  30. package/dist/es2019/plugins/table/pm-plugins/decorations/utils/column-controls.js +1 -3
  31. package/dist/es2019/plugins/table/pm-plugins/drag-and-drop/plugin.js +12 -0
  32. package/dist/es2019/plugins/table/types.js +9 -2
  33. package/dist/es2019/plugins/table/ui/FloatingDragMenu/DragMenu.js +52 -8
  34. package/dist/es2019/plugins/table/ui/FloatingDragMenu/index.js +10 -5
  35. package/dist/es2019/plugins/table/ui/FloatingInsertButton/InsertButton.js +58 -7
  36. package/dist/es2019/plugins/table/ui/FloatingInsertButton/getPopupOptions.js +9 -7
  37. package/dist/es2019/plugins/table/ui/FloatingInsertButton/index.js +10 -4
  38. package/dist/es2019/plugins/table/ui/TableFloatingColumnControls/ColumnControls/index.js +46 -6
  39. package/dist/es2019/plugins/table/ui/TableFloatingColumnControls/index.js +7 -5
  40. package/dist/es2019/plugins/table/ui/TableFloatingControls/RowControls/DragControls.js +35 -14
  41. package/dist/es2019/plugins/table/ui/TableFloatingControls/index.js +2 -0
  42. package/dist/es2019/plugins/table/ui/common-styles.js +51 -3
  43. package/dist/es2019/plugins/table/ui/icons/AddColLeftIcon.js +35 -0
  44. package/dist/es2019/plugins/table/ui/icons/AddColRightIcon.js +35 -0
  45. package/dist/es2019/plugins/table/ui/icons/AddRowAboveIcon.js +36 -0
  46. package/dist/es2019/plugins/table/ui/icons/AddRowBelowIcon.js +31 -0
  47. package/dist/es2019/plugins/table/ui/icons/index.js +5 -1
  48. package/dist/es2019/plugins/table/ui/ui-styles.js +23 -1
  49. package/dist/es2019/plugins/table/utils/dom.js +5 -1
  50. package/dist/es2019/plugins/table/utils/drag-menu.js +118 -8
  51. package/dist/es2019/plugins/table/utils/index.js +1 -1
  52. package/dist/esm/plugins/table/event-handlers.js +7 -4
  53. package/dist/esm/plugins/table/index.js +6 -4
  54. package/dist/esm/plugins/table/pm-plugins/decorations/plugin.js +3 -7
  55. package/dist/esm/plugins/table/pm-plugins/decorations/utils/column-controls.js +1 -3
  56. package/dist/esm/plugins/table/pm-plugins/drag-and-drop/plugin.js +11 -0
  57. package/dist/esm/plugins/table/types.js +9 -2
  58. package/dist/esm/plugins/table/ui/FloatingDragMenu/DragMenu.js +46 -8
  59. package/dist/esm/plugins/table/ui/FloatingDragMenu/index.js +10 -5
  60. package/dist/esm/plugins/table/ui/FloatingInsertButton/InsertButton.js +56 -8
  61. package/dist/esm/plugins/table/ui/FloatingInsertButton/getPopupOptions.js +9 -7
  62. package/dist/esm/plugins/table/ui/FloatingInsertButton/index.js +10 -4
  63. package/dist/esm/plugins/table/ui/TableFloatingColumnControls/ColumnControls/index.js +45 -6
  64. package/dist/esm/plugins/table/ui/TableFloatingColumnControls/index.js +7 -5
  65. package/dist/esm/plugins/table/ui/TableFloatingControls/RowControls/DragControls.js +36 -14
  66. package/dist/esm/plugins/table/ui/TableFloatingControls/index.js +2 -0
  67. package/dist/esm/plugins/table/ui/common-styles.js +2 -2
  68. package/dist/esm/plugins/table/ui/icons/AddColLeftIcon.js +37 -0
  69. package/dist/esm/plugins/table/ui/icons/AddColRightIcon.js +37 -0
  70. package/dist/esm/plugins/table/ui/icons/AddRowAboveIcon.js +38 -0
  71. package/dist/esm/plugins/table/ui/icons/AddRowBelowIcon.js +33 -0
  72. package/dist/esm/plugins/table/ui/icons/index.js +5 -1
  73. package/dist/esm/plugins/table/ui/ui-styles.js +26 -23
  74. package/dist/esm/plugins/table/utils/dom.js +11 -3
  75. package/dist/esm/plugins/table/utils/drag-menu.js +120 -8
  76. package/dist/esm/plugins/table/utils/index.js +1 -1
  77. package/dist/types/plugins/table/types.d.ts +9 -2
  78. package/dist/types/plugins/table/ui/FloatingDragMenu/DragMenu.d.ts +5 -2
  79. package/dist/types/plugins/table/ui/FloatingDragMenu/index.d.ts +3 -1
  80. package/dist/types/plugins/table/ui/FloatingInsertButton/InsertButton.d.ts +5 -1
  81. package/dist/types/plugins/table/ui/FloatingInsertButton/getPopupOptions.d.ts +1 -1
  82. package/dist/types/plugins/table/ui/FloatingInsertButton/index.d.ts +1 -0
  83. package/dist/types/plugins/table/ui/TableFloatingColumnControls/ColumnControls/index.d.ts +2 -1
  84. package/dist/types/plugins/table/ui/TableFloatingControls/RowControls/DragControls.d.ts +2 -0
  85. package/dist/types/plugins/table/ui/icons/AddColLeftIcon.d.ts +2 -0
  86. package/dist/types/plugins/table/ui/icons/AddColRightIcon.d.ts +2 -0
  87. package/dist/types/plugins/table/ui/icons/AddRowAboveIcon.d.ts +2 -0
  88. package/dist/types/plugins/table/ui/icons/AddRowBelowIcon.d.ts +2 -0
  89. package/dist/types/plugins/table/ui/icons/index.d.ts +4 -0
  90. package/dist/types/plugins/table/ui/ui-styles.d.ts +1 -0
  91. package/dist/types/plugins/table/utils/dom.d.ts +4 -1
  92. package/dist/types/plugins/table/utils/drag-menu.d.ts +6 -3
  93. package/dist/types/plugins/table/utils/index.d.ts +1 -1
  94. package/dist/types-ts4.5/plugins/table/types.d.ts +9 -2
  95. package/dist/types-ts4.5/plugins/table/ui/FloatingDragMenu/DragMenu.d.ts +5 -2
  96. package/dist/types-ts4.5/plugins/table/ui/FloatingDragMenu/index.d.ts +3 -1
  97. package/dist/types-ts4.5/plugins/table/ui/FloatingInsertButton/InsertButton.d.ts +5 -1
  98. package/dist/types-ts4.5/plugins/table/ui/FloatingInsertButton/getPopupOptions.d.ts +1 -1
  99. package/dist/types-ts4.5/plugins/table/ui/FloatingInsertButton/index.d.ts +1 -0
  100. package/dist/types-ts4.5/plugins/table/ui/TableFloatingColumnControls/ColumnControls/index.d.ts +2 -1
  101. package/dist/types-ts4.5/plugins/table/ui/TableFloatingControls/RowControls/DragControls.d.ts +2 -0
  102. package/dist/types-ts4.5/plugins/table/ui/icons/AddColLeftIcon.d.ts +2 -0
  103. package/dist/types-ts4.5/plugins/table/ui/icons/AddColRightIcon.d.ts +2 -0
  104. package/dist/types-ts4.5/plugins/table/ui/icons/AddRowAboveIcon.d.ts +2 -0
  105. package/dist/types-ts4.5/plugins/table/ui/icons/AddRowBelowIcon.d.ts +2 -0
  106. package/dist/types-ts4.5/plugins/table/ui/icons/index.d.ts +4 -0
  107. package/dist/types-ts4.5/plugins/table/ui/ui-styles.d.ts +1 -0
  108. package/dist/types-ts4.5/plugins/table/utils/dom.d.ts +4 -1
  109. package/dist/types-ts4.5/plugins/table/utils/drag-menu.d.ts +6 -3
  110. package/dist/types-ts4.5/plugins/table/utils/index.d.ts +1 -1
  111. package/package.json +2 -1
  112. package/src/__tests__/unit/pm-plugins/decorations/plugin.ts +40 -194
  113. package/src/__tests__/unit/ui/RowDragControls.tsx +9 -11
  114. package/src/plugins/table/event-handlers.ts +15 -3
  115. package/src/plugins/table/index.tsx +4 -2
  116. package/src/plugins/table/pm-plugins/decorations/plugin.ts +2 -9
  117. package/src/plugins/table/pm-plugins/decorations/utils/column-controls.ts +1 -3
  118. package/src/plugins/table/pm-plugins/drag-and-drop/plugin.ts +9 -0
  119. package/src/plugins/table/types.ts +12 -2
  120. package/src/plugins/table/ui/FloatingDragMenu/DragMenu.tsx +73 -6
  121. package/src/plugins/table/ui/FloatingDragMenu/index.tsx +15 -3
  122. package/src/plugins/table/ui/FloatingInsertButton/InsertButton.tsx +82 -8
  123. package/src/plugins/table/ui/FloatingInsertButton/getPopupOptions.ts +28 -5
  124. package/src/plugins/table/ui/FloatingInsertButton/index.tsx +19 -7
  125. package/src/plugins/table/ui/TableFloatingColumnControls/ColumnControls/index.tsx +47 -3
  126. package/src/plugins/table/ui/TableFloatingColumnControls/index.tsx +11 -4
  127. package/src/plugins/table/ui/TableFloatingControls/RowControls/DragControls.tsx +49 -18
  128. package/src/plugins/table/ui/TableFloatingControls/index.tsx +2 -0
  129. package/src/plugins/table/ui/common-styles.ts +57 -2
  130. package/src/plugins/table/ui/icons/AddColLeftIcon.tsx +43 -0
  131. package/src/plugins/table/ui/icons/AddColRightIcon.tsx +43 -0
  132. package/src/plugins/table/ui/icons/AddRowAboveIcon.tsx +42 -0
  133. package/src/plugins/table/ui/icons/AddRowBelowIcon.tsx +36 -0
  134. package/src/plugins/table/ui/icons/index.ts +4 -0
  135. package/src/plugins/table/ui/ui-styles.ts +27 -1
  136. package/src/plugins/table/utils/dom.ts +11 -4
  137. package/src/plugins/table/utils/drag-menu.ts +158 -5
  138. package/src/plugins/table/utils/index.ts +2 -0
  139. package/tsconfig.app.json +3 -0
@@ -1,5 +1,20 @@
1
1
  import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
2
+ import { TableSortOrder as SortOrder } from '@atlaskit/custom-steps';
3
+ import { addColumnAfter, addColumnBefore, addRowAfter, addRowBefore, backspace, tooltip } from '@atlaskit/editor-common/keymaps';
4
+ import ArrowDownIcon from '@atlaskit/icon/glyph/arrow-down';
5
+ import ArrowLeftIcon from '@atlaskit/icon/glyph/arrow-left';
6
+ import ArrowRightIcon from '@atlaskit/icon/glyph/arrow-right';
7
+ import ArrowUpIcon from '@atlaskit/icon/glyph/arrow-up';
8
+ import CrossCircleIcon from '@atlaskit/icon/glyph/cross-circle';
9
+ import EditorLayoutThreeEqualIcon from '@atlaskit/icon/glyph/editor/layout-three-equal';
10
+ import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
11
+ import HipchatChevronDoubleDownIcon from '@atlaskit/icon/glyph/hipchat/chevron-double-down';
12
+ import HipchatChevronDoubleUpIcon from '@atlaskit/icon/glyph/hipchat/chevron-double-up';
13
+ import { clearMultipleCells, insertColumn, insertRow, sortByColumn } from '../commands';
14
+ import { deleteColumnsCommand } from '../commands/delete';
2
15
  import { moveSource } from '../pm-plugins/drag-and-drop/commands';
16
+ import { deleteRows } from '../transforms';
17
+ import { AddColLeftIcon, AddColRightIcon, AddRowAboveIcon, AddRowBelowIcon } from '../ui/icons';
3
18
  var canDecrease = function canDecrease(index) {
4
19
  var min = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
5
20
  return index !== undefined && index > min;
@@ -8,38 +23,122 @@ var canIncrease = function canIncrease(index) {
8
23
  var max = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
9
24
  return index !== undefined && index < max;
10
25
  };
11
- export var getDragMenuConfig = function getDragMenuConfig(direction, tableMap, index) {
26
+ export var getDragMenuConfig = function getDragMenuConfig(direction, getEditorContainerWidth, tableMap, index, targetCellPosition, selectionRect) {
27
+ var addOptions = direction === 'row' ? [{
28
+ label: 'above',
29
+ offset: 0,
30
+ icon: AddRowAboveIcon,
31
+ keymap: addRowBefore
32
+ }, {
33
+ label: 'below',
34
+ offset: 1,
35
+ icon: AddRowBelowIcon,
36
+ keymap: addRowAfter
37
+ }] : [{
38
+ label: 'left',
39
+ offset: 0,
40
+ icon: AddColLeftIcon,
41
+ keymap: addColumnBefore
42
+ }, {
43
+ label: 'right',
44
+ offset: 1,
45
+ icon: AddColRightIcon,
46
+ keymap: addColumnAfter
47
+ }];
12
48
  var moveOptions = direction === 'row' ? [{
13
49
  label: 'up',
14
50
  offset: -1,
15
- canMove: canDecrease
51
+ canMove: canDecrease,
52
+ icon: ArrowUpIcon
16
53
  }, {
17
54
  label: 'down',
18
55
  offset: 1,
19
56
  canMove: function canMove(index) {
20
57
  var _tableMap$height;
21
58
  return canIncrease(index, ((_tableMap$height = tableMap === null || tableMap === void 0 ? void 0 : tableMap.height) !== null && _tableMap$height !== void 0 ? _tableMap$height : 0) - 1);
22
- }
59
+ },
60
+ icon: ArrowDownIcon
23
61
  }] : [{
24
62
  label: 'left',
25
63
  offset: -1,
26
- canMove: canDecrease
64
+ canMove: canDecrease,
65
+ icon: ArrowLeftIcon
27
66
  }, {
28
67
  label: 'right',
29
68
  offset: 1,
30
69
  canMove: function canMove(index) {
31
70
  var _tableMap$width;
32
71
  return canIncrease(index, ((_tableMap$width = tableMap === null || tableMap === void 0 ? void 0 : tableMap.width) !== null && _tableMap$width !== void 0 ? _tableMap$width : 0) - 1);
33
- }
72
+ },
73
+ icon: ArrowRightIcon
34
74
  }];
35
- return _toConsumableArray(moveOptions.map(function (_ref) {
75
+ var sortOptions = direction === 'column' ? [{
76
+ label: 'increasing',
77
+ order: SortOrder.ASC,
78
+ icon: HipchatChevronDoubleUpIcon
79
+ }, {
80
+ label: 'decreasing',
81
+ order: SortOrder.DESC,
82
+ icon: HipchatChevronDoubleDownIcon
83
+ }] : [];
84
+ return [].concat(_toConsumableArray(addOptions.map(function (_ref) {
36
85
  var label = _ref.label,
37
86
  offset = _ref.offset,
38
- canMove = _ref.canMove;
87
+ icon = _ref.icon,
88
+ keymap = _ref.keymap;
89
+ return {
90
+ id: "add_".concat(direction, "_").concat(label),
91
+ title: "Add ".concat(direction, " ").concat(label),
92
+ icon: icon,
93
+ onClick: function onClick(state, dispatch) {
94
+ if (direction === 'row') {
95
+ insertRow(index + offset, true)(state, dispatch);
96
+ } else {
97
+ insertColumn(getEditorContainerWidth)(index + offset)(state, dispatch);
98
+ }
99
+ return true;
100
+ },
101
+ keymap: keymap && tooltip(keymap)
102
+ };
103
+ })), [direction === 'column' ? {
104
+ id: 'distribute_columns',
105
+ title: 'Distribute columns',
106
+ disabled: true,
107
+ onClick: function onClick() {
108
+ return false;
109
+ },
110
+ icon: EditorLayoutThreeEqualIcon
111
+ } : undefined, {
112
+ id: 'clear_cells',
113
+ title: 'Clear cells',
114
+ onClick: function onClick(state, dispatch) {
115
+ clearMultipleCells(targetCellPosition)(state, dispatch);
116
+ return true;
117
+ },
118
+ icon: CrossCircleIcon,
119
+ keymap: tooltip(backspace)
120
+ }, {
121
+ id: "delete_".concat(direction),
122
+ title: "Delete ".concat(direction),
123
+ onClick: function onClick(state, dispatch) {
124
+ if (direction === 'row') {
125
+ dispatch === null || dispatch === void 0 || dispatch(deleteRows(selectionRect, false)(state.tr));
126
+ } else {
127
+ deleteColumnsCommand(selectionRect)(state, dispatch);
128
+ }
129
+ return true;
130
+ },
131
+ icon: RemoveIcon
132
+ }], _toConsumableArray(moveOptions.map(function (_ref2) {
133
+ var label = _ref2.label,
134
+ offset = _ref2.offset,
135
+ canMove = _ref2.canMove,
136
+ icon = _ref2.icon;
39
137
  return {
40
138
  id: "move_".concat(direction, "_").concat(label),
41
139
  title: "Move ".concat(direction, " ").concat(label),
42
140
  disabled: !canMove(index),
141
+ icon: icon,
43
142
  onClick: function onClick(state, dispatch) {
44
143
  if (canMove(index)) {
45
144
  moveSource("table-".concat(direction), index, index + offset)(state, dispatch);
@@ -48,5 +147,18 @@ export var getDragMenuConfig = function getDragMenuConfig(direction, tableMap, i
48
147
  return false;
49
148
  }
50
149
  };
51
- }));
150
+ })), _toConsumableArray(sortOptions.map(function (_ref3) {
151
+ var label = _ref3.label,
152
+ order = _ref3.order,
153
+ icon = _ref3.icon;
154
+ return {
155
+ id: "sort_column_".concat(order),
156
+ title: "Sort ".concat(label),
157
+ icon: icon,
158
+ onClick: function onClick(state, dispatch) {
159
+ sortByColumn(index, order)(state, dispatch);
160
+ return true;
161
+ }
162
+ };
163
+ }))).filter(Boolean);
52
164
  };
@@ -2,7 +2,7 @@ export { getSelectedColumnIndexes, getSelectedRowIndexes, normalizeSelection, is
2
2
  export { findControlsHoverDecoration, createControlsHoverDecoration, createColumnControlsDecoration, createColumnSelectedDecoration, createCellHoverDecoration, updateDecorations, createResizeHandleDecoration, createColumnInsertLine, createColumnLineResize, createRowInsertLine } from './decoration';
3
3
  export { isIsolating, containsHeaderColumn, containsHeaderRow, checkIfHeaderColumnEnabled, checkIfHeaderRowEnabled, checkIfNumberColumnEnabled, isLayoutSupported, getTableWidth, tablesHaveDifferentColumnWidths, tablesHaveDifferentNoOfColumns, isTableNested, anyChildCellMergedAcrossRow, supportedHeaderRow } from './nodes';
4
4
  export { unwrapContentFromTable, removeTableFromFirstChild, removeTableFromLastChild, transformSliceToRemoveOpenTable, transformSliceToCorrectEmptyTableCells, transformSliceToFixHardBreakProblemOnCopyFromCell } from './paste';
5
- export { isCell, isCornerButton, isInsertRowButton, isColumnControlsDecorations, isTableControlsButton, isTableContainerOrWrapper, isRowDragControlsButton, isRowControlsButton, getColumnOrRowIndex, getMousePositionHorizontalRelativeByElement, getMousePositionVerticalRelativeByElement, updateResizeHandles, isResizeHandleDecoration, hasResizeHandler } from './dom';
5
+ export { isCell, isCornerButton, isInsertRowButton, isColumnControlsDecorations, isTableControlsButton, isTableContainerOrWrapper, isRowDragControlsButton, isRowControlsButton, isDragColumnFloatingInsertDot, isDragRowFloatingInsertDot, getColumnOrRowIndex, getMousePositionHorizontalRelativeByElement, getMousePositionVerticalRelativeByElement, updateResizeHandles, isResizeHandleDecoration, hasResizeHandler } from './dom';
6
6
  export { getColumnsWidths, isColumnDeleteButtonVisible, getColumnDeleteButtonParams, getColumnClassNames } from './column-controls';
7
7
  export { getRowHeights, isRowDeleteButtonVisible, getRowDeleteButtonParams, getRowsParams, getRowClassNames, copyPreviousRow } from './row-controls';
8
8
  export { getSelectedTableInfo, getSelectedCellInfo } from './analytics';
@@ -269,6 +269,9 @@ export declare const TableCssClassName: {
269
269
  CONTROLS_INSERT_LINE: string;
270
270
  CONTROLS_BUTTON_OVERLAY: string;
271
271
  LAYOUT_BUTTON: string;
272
+ DRAG_CONTROLS_INSERT_BUTTON: string;
273
+ DRAG_CONTROLS_INSERT_BUTTON_INNER: string;
274
+ DRAG_CONTROLS_INSERT_BUTTON_WRAP: string;
272
275
  CONTROLS_INSERT_MARKER: string;
273
276
  CONTROLS_INSERT_COLUMN: string;
274
277
  CONTROLS_INSERT_ROW: string;
@@ -281,8 +284,12 @@ export declare const TableCssClassName: {
281
284
  CORNER_CONTROLS_INSERT_COLUMN_MARKER: string;
282
285
  CONTROLS_CORNER_BUTTON: string;
283
286
  /** Controls with drag handle */
284
- COLUMN_CONTROLS_WITH_DRAG: string;
285
- ROW_CONTROLS_WITH_DRAG: string;
287
+ DRAG_ROW_CONTROLS: string;
288
+ DRAG_ROW_FLOATING_INSERT_DOT_WRAPPER: string;
289
+ DRAG_ROW_FLOATING_INSERT_DOT: string;
290
+ DRAG_COLUMN_CONTROLS: string;
291
+ DRAG_COLUMN_FLOATING_INSERT_DOT_WRAPPER: string;
292
+ DRAG_COLUMN_FLOATING_INSERT_DOT: string;
286
293
  DRAG_HANDLE_BUTTON_CONTAINER: string;
287
294
  /** Other classes */
288
295
  NUMBERED_COLUMN: string;
@@ -1,4 +1,6 @@
1
- /// <reference types="react" />
1
+ /** @jsx jsx */
2
+ import { jsx } from '@emotion/react';
3
+ import type { GetEditorContainerWidth } from '@atlaskit/editor-common/types';
2
4
  import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
3
5
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
4
6
  import type { PluginConfig, TableDirection } from '../../types';
@@ -14,6 +16,7 @@ type DragMenuProps = {
14
16
  boundariesElement?: HTMLElement;
15
17
  scrollableElement?: HTMLElement;
16
18
  pluginConfig?: PluginConfig;
19
+ getEditorContainerWidth: GetEditorContainerWidth;
17
20
  };
18
- export declare const DragMenu: ({ direction, index, isOpen, editorView, tableNode, mountPoint, boundariesElement, scrollableElement, }: DragMenuProps) => JSX.Element | null;
21
+ export declare const DragMenu: ({ direction, index, isOpen, editorView, tableNode, mountPoint, boundariesElement, scrollableElement, targetCellPosition, getEditorContainerWidth, }: DragMenuProps) => jsx.JSX.Element | null;
19
22
  export {};
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ import type { GetEditorContainerWidth } from '@atlaskit/editor-common/types';
2
3
  import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
3
4
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
4
5
  import type { TableDirection } from '../../types';
@@ -13,9 +14,10 @@ export interface Props {
13
14
  direction?: TableDirection;
14
15
  index?: number;
15
16
  targetCellPosition?: number;
17
+ getEditorContainerWidth: GetEditorContainerWidth;
16
18
  }
17
19
  declare const FloatingDragMenu: {
18
- ({ mountPoint, boundariesElement, scrollableElement, editorView, isOpen, tableRef, tableNode, direction, index, targetCellPosition, }: Props): JSX.Element | null;
20
+ ({ mountPoint, boundariesElement, scrollableElement, editorView, isOpen, tableRef, tableNode, direction, index, targetCellPosition, getEditorContainerWidth, }: Props): JSX.Element | null;
19
21
  displayName: string;
20
22
  };
21
23
  export default FloatingDragMenu;
@@ -3,11 +3,15 @@ import React from 'react';
3
3
  import type { WrappedComponentProps } from 'react-intl-next';
4
4
  import type { TableDirection } from '../../types';
5
5
  export interface ButtonProps {
6
- direction: TableDirection;
6
+ type: TableDirection;
7
7
  tableRef: HTMLElement;
8
8
  onMouseDown: (event: SyntheticEvent<HTMLButtonElement>) => void;
9
9
  hasStickyHeaders: boolean;
10
10
  }
11
+ export declare const InsertButtonForDragAndDrop: ({ onMouseDown, tableRef, type, intl: { formatMessage }, hasStickyHeaders, }: ButtonProps & WrappedComponentProps) => JSX.Element;
12
+ export declare const DragAndDropInsertButton: React.FC<import("react-intl-next").WithIntlProps<ButtonProps & WrappedComponentProps<"intl">>> & {
13
+ WrappedComponent: React.ComponentType<ButtonProps & WrappedComponentProps<"intl">>;
14
+ };
11
15
  declare const _default: React.FC<import("react-intl-next").WithIntlProps<ButtonProps & WrappedComponentProps<"intl">>> & {
12
16
  WrappedComponent: React.ComponentType<ButtonProps & WrappedComponentProps<"intl">>;
13
17
  };
@@ -1,4 +1,4 @@
1
1
  import type { PopupProps } from '@atlaskit/editor-common/ui';
2
2
  import type { TableDirection } from '../../types';
3
- declare function getPopupOptions(direction: TableDirection, index: number, hasNumberedColumns: boolean, tableContainer: HTMLElement | null): Partial<PopupProps>;
3
+ declare function getPopupOptions(direction: TableDirection, index: number, hasNumberedColumns: boolean, isDragAndDropEnabled: boolean, tableContainer: HTMLElement | null): Partial<PopupProps>;
4
4
  export default getPopupOptions;
@@ -13,6 +13,7 @@ export interface Props {
13
13
  insertRowButtonIndex?: number;
14
14
  isHeaderColumnEnabled?: boolean;
15
15
  isHeaderRowEnabled?: boolean;
16
+ isDragAndDropEnabled?: boolean;
16
17
  mountPoint?: HTMLElement;
17
18
  boundariesElement?: HTMLElement;
18
19
  scrollableElement?: HTMLElement;
@@ -12,6 +12,7 @@ export interface ColumnControlsProps {
12
12
  localId?: string;
13
13
  rowHeights?: number[];
14
14
  colWidths?: (number | undefined)[];
15
+ hasHeaderColumn?: boolean;
15
16
  }
16
- export declare const ColumnControls: ({ editorView, tableActive, tableRef, hoveredCell, isResizing, stickyTop, localId, isInDanger, rowHeights, colWidths, }: ColumnControlsProps) => JSX.Element;
17
+ export declare const ColumnControls: ({ editorView, tableActive, tableRef, hoveredCell, isResizing, stickyTop, localId, isInDanger, rowHeights, colWidths, hasHeaderColumn, }: ColumnControlsProps) => JSX.Element;
17
18
  export default ColumnControls;
@@ -10,6 +10,8 @@ type DragControlsProps = {
10
10
  tableActive?: boolean;
11
11
  hoveredCell?: CellHoverMeta;
12
12
  isInDanger?: boolean;
13
+ isResizing?: boolean;
14
+ hasHeaderRow?: boolean;
13
15
  hoverRows: (rows: number[], danger?: boolean) => void;
14
16
  selectRow: (row: number, expand: boolean) => void;
15
17
  updateCellHoverLocation: (rowIndex: number) => void;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const AddColLeftIcon: () => JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const AddColRightIcon: () => JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const AddRowAboveIcon: () => JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const AddRowBelowIcon: () => JSX.Element;
@@ -1,2 +1,6 @@
1
1
  export { DragHandleIcon } from './DragHandleIcon';
2
2
  export { DragInMotionIcon } from './DragInMotionIcon';
3
+ export { AddRowAboveIcon } from './AddRowAboveIcon';
4
+ export { AddRowBelowIcon } from './AddRowBelowIcon';
5
+ export { AddColLeftIcon } from './AddColLeftIcon';
6
+ export { AddColRightIcon } from './AddColRightIcon';
@@ -3,6 +3,7 @@ export declare const InsertMarker: (props: ThemeProps, cssString?: string) => im
3
3
  export declare const HeaderButton: (props: ThemeProps, cssString?: string) => import("@emotion/react").SerializedStyles;
4
4
  export declare const HeaderButtonHover: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
5
5
  export declare const HeaderButtonDanger: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
6
+ export declare const dragInsertButtonWrapper: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
6
7
  export declare const insertColumnButtonWrapper: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
7
8
  export declare const insertRowButtonWrapper: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
8
9
  export declare const columnControlsLineMarker: () => import("@emotion/react").SerializedStyles;
@@ -5,10 +5,13 @@ export declare const isInsertRowButton: (node: HTMLElement | null) => boolean |
5
5
  export declare const getColumnOrRowIndex: (target: HTMLElement) => [number, number];
6
6
  export declare const isColumnControlsDecorations: (node: HTMLElement | null) => boolean;
7
7
  export declare const isRowControlsButton: (node: HTMLElement | null) => boolean;
8
- export declare const isRowDragControlsButton: (node: HTMLElement | null) => true | HTMLElement | null;
9
8
  export declare const isResizeHandleDecoration: (node: HTMLElement | null) => boolean;
10
9
  export declare const isTableControlsButton: (node: HTMLElement | null) => boolean;
11
10
  export declare const isTableContainerOrWrapper: (node: HTMLElement | null) => boolean;
11
+ /** drag-and-drop classes */
12
+ export declare const isRowDragControlsButton: (node: HTMLElement | null) => true | HTMLElement | null;
13
+ export declare const isDragRowFloatingInsertDot: (node: HTMLElement | null) => boolean;
14
+ export declare const isDragColumnFloatingInsertDot: (node: HTMLElement | null) => boolean;
12
15
  export declare const getMousePositionHorizontalRelativeByElement: (mouseEvent: MouseEvent, elementContentRects?: ElementContentRects, gapInPixels?: number) => 'left' | 'right' | null;
13
16
  export declare const getMousePositionVerticalRelativeByElement: (mouseEvent: MouseEvent) => 'top' | 'bottom' | null;
14
17
  export declare const updateResizeHandles: (tableRef?: HTMLElement) => void;
@@ -1,7 +1,10 @@
1
- import type { Command, DropdownOptionT } from '@atlaskit/editor-common/types';
2
- import type { TableMap } from '@atlaskit/editor-tables/table-map';
1
+ /// <reference types="react" />
2
+ import type { Command, DropdownOptionT, GetEditorContainerWidth, IconProps } from '@atlaskit/editor-common/types';
3
+ import type { Rect, TableMap } from '@atlaskit/editor-tables/table-map';
3
4
  import type { TableDirection } from '../types';
4
5
  export interface DragMenuConfig extends DropdownOptionT<Command> {
5
6
  id: string;
7
+ icon?: React.ComponentType<IconProps>;
8
+ keymap?: string;
6
9
  }
7
- export declare const getDragMenuConfig: (direction: TableDirection, tableMap?: TableMap, index?: number) => DragMenuConfig[];
10
+ export declare const getDragMenuConfig: (direction: TableDirection, getEditorContainerWidth: GetEditorContainerWidth, tableMap?: TableMap, index?: number, targetCellPosition?: number, selectionRect?: Rect) => DragMenuConfig[];
@@ -2,7 +2,7 @@ export { getSelectedColumnIndexes, getSelectedRowIndexes, normalizeSelection, is
2
2
  export { findControlsHoverDecoration, createControlsHoverDecoration, createColumnControlsDecoration, createColumnSelectedDecoration, createCellHoverDecoration, updateDecorations, createResizeHandleDecoration, createColumnInsertLine, createColumnLineResize, createRowInsertLine, } from './decoration';
3
3
  export { isIsolating, containsHeaderColumn, containsHeaderRow, checkIfHeaderColumnEnabled, checkIfHeaderRowEnabled, checkIfNumberColumnEnabled, isLayoutSupported, getTableWidth, tablesHaveDifferentColumnWidths, tablesHaveDifferentNoOfColumns, isTableNested, anyChildCellMergedAcrossRow, supportedHeaderRow, } from './nodes';
4
4
  export { unwrapContentFromTable, removeTableFromFirstChild, removeTableFromLastChild, transformSliceToRemoveOpenTable, transformSliceToCorrectEmptyTableCells, transformSliceToFixHardBreakProblemOnCopyFromCell, } from './paste';
5
- export { isCell, isCornerButton, isInsertRowButton, isColumnControlsDecorations, isTableControlsButton, isTableContainerOrWrapper, isRowDragControlsButton, isRowControlsButton, getColumnOrRowIndex, getMousePositionHorizontalRelativeByElement, getMousePositionVerticalRelativeByElement, updateResizeHandles, isResizeHandleDecoration, hasResizeHandler, } from './dom';
5
+ export { isCell, isCornerButton, isInsertRowButton, isColumnControlsDecorations, isTableControlsButton, isTableContainerOrWrapper, isRowDragControlsButton, isRowControlsButton, isDragColumnFloatingInsertDot, isDragRowFloatingInsertDot, getColumnOrRowIndex, getMousePositionHorizontalRelativeByElement, getMousePositionVerticalRelativeByElement, updateResizeHandles, isResizeHandleDecoration, hasResizeHandler, } from './dom';
6
6
  export { getColumnsWidths, isColumnDeleteButtonVisible, getColumnDeleteButtonParams, getColumnClassNames, } from './column-controls';
7
7
  export { getRowHeights, isRowDeleteButtonVisible, getRowDeleteButtonParams, getRowsParams, getRowClassNames, copyPreviousRow, } from './row-controls';
8
8
  export type { RowParams } from './row-controls';
@@ -269,6 +269,9 @@ export declare const TableCssClassName: {
269
269
  CONTROLS_INSERT_LINE: string;
270
270
  CONTROLS_BUTTON_OVERLAY: string;
271
271
  LAYOUT_BUTTON: string;
272
+ DRAG_CONTROLS_INSERT_BUTTON: string;
273
+ DRAG_CONTROLS_INSERT_BUTTON_INNER: string;
274
+ DRAG_CONTROLS_INSERT_BUTTON_WRAP: string;
272
275
  CONTROLS_INSERT_MARKER: string;
273
276
  CONTROLS_INSERT_COLUMN: string;
274
277
  CONTROLS_INSERT_ROW: string;
@@ -281,8 +284,12 @@ export declare const TableCssClassName: {
281
284
  CORNER_CONTROLS_INSERT_COLUMN_MARKER: string;
282
285
  CONTROLS_CORNER_BUTTON: string;
283
286
  /** Controls with drag handle */
284
- COLUMN_CONTROLS_WITH_DRAG: string;
285
- ROW_CONTROLS_WITH_DRAG: string;
287
+ DRAG_ROW_CONTROLS: string;
288
+ DRAG_ROW_FLOATING_INSERT_DOT_WRAPPER: string;
289
+ DRAG_ROW_FLOATING_INSERT_DOT: string;
290
+ DRAG_COLUMN_CONTROLS: string;
291
+ DRAG_COLUMN_FLOATING_INSERT_DOT_WRAPPER: string;
292
+ DRAG_COLUMN_FLOATING_INSERT_DOT: string;
286
293
  DRAG_HANDLE_BUTTON_CONTAINER: string;
287
294
  /** Other classes */
288
295
  NUMBERED_COLUMN: string;
@@ -1,4 +1,6 @@
1
- /// <reference types="react" />
1
+ /** @jsx jsx */
2
+ import { jsx } from '@emotion/react';
3
+ import type { GetEditorContainerWidth } from '@atlaskit/editor-common/types';
2
4
  import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
3
5
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
4
6
  import type { PluginConfig, TableDirection } from '../../types';
@@ -14,6 +16,7 @@ type DragMenuProps = {
14
16
  boundariesElement?: HTMLElement;
15
17
  scrollableElement?: HTMLElement;
16
18
  pluginConfig?: PluginConfig;
19
+ getEditorContainerWidth: GetEditorContainerWidth;
17
20
  };
18
- export declare const DragMenu: ({ direction, index, isOpen, editorView, tableNode, mountPoint, boundariesElement, scrollableElement, }: DragMenuProps) => JSX.Element | null;
21
+ export declare const DragMenu: ({ direction, index, isOpen, editorView, tableNode, mountPoint, boundariesElement, scrollableElement, targetCellPosition, getEditorContainerWidth, }: DragMenuProps) => jsx.JSX.Element | null;
19
22
  export {};
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ import type { GetEditorContainerWidth } from '@atlaskit/editor-common/types';
2
3
  import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
3
4
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
4
5
  import type { TableDirection } from '../../types';
@@ -13,9 +14,10 @@ export interface Props {
13
14
  direction?: TableDirection;
14
15
  index?: number;
15
16
  targetCellPosition?: number;
17
+ getEditorContainerWidth: GetEditorContainerWidth;
16
18
  }
17
19
  declare const FloatingDragMenu: {
18
- ({ mountPoint, boundariesElement, scrollableElement, editorView, isOpen, tableRef, tableNode, direction, index, targetCellPosition, }: Props): JSX.Element | null;
20
+ ({ mountPoint, boundariesElement, scrollableElement, editorView, isOpen, tableRef, tableNode, direction, index, targetCellPosition, getEditorContainerWidth, }: Props): JSX.Element | null;
19
21
  displayName: string;
20
22
  };
21
23
  export default FloatingDragMenu;
@@ -3,11 +3,15 @@ import React from 'react';
3
3
  import type { WrappedComponentProps } from 'react-intl-next';
4
4
  import type { TableDirection } from '../../types';
5
5
  export interface ButtonProps {
6
- direction: TableDirection;
6
+ type: TableDirection;
7
7
  tableRef: HTMLElement;
8
8
  onMouseDown: (event: SyntheticEvent<HTMLButtonElement>) => void;
9
9
  hasStickyHeaders: boolean;
10
10
  }
11
+ export declare const InsertButtonForDragAndDrop: ({ onMouseDown, tableRef, type, intl: { formatMessage }, hasStickyHeaders, }: ButtonProps & WrappedComponentProps) => JSX.Element;
12
+ export declare const DragAndDropInsertButton: React.FC<import("react-intl-next").WithIntlProps<ButtonProps & WrappedComponentProps<"intl">>> & {
13
+ WrappedComponent: React.ComponentType<ButtonProps & WrappedComponentProps<"intl">>;
14
+ };
11
15
  declare const _default: React.FC<import("react-intl-next").WithIntlProps<ButtonProps & WrappedComponentProps<"intl">>> & {
12
16
  WrappedComponent: React.ComponentType<ButtonProps & WrappedComponentProps<"intl">>;
13
17
  };
@@ -1,4 +1,4 @@
1
1
  import type { PopupProps } from '@atlaskit/editor-common/ui';
2
2
  import type { TableDirection } from '../../types';
3
- declare function getPopupOptions(direction: TableDirection, index: number, hasNumberedColumns: boolean, tableContainer: HTMLElement | null): Partial<PopupProps>;
3
+ declare function getPopupOptions(direction: TableDirection, index: number, hasNumberedColumns: boolean, isDragAndDropEnabled: boolean, tableContainer: HTMLElement | null): Partial<PopupProps>;
4
4
  export default getPopupOptions;
@@ -13,6 +13,7 @@ export interface Props {
13
13
  insertRowButtonIndex?: number;
14
14
  isHeaderColumnEnabled?: boolean;
15
15
  isHeaderRowEnabled?: boolean;
16
+ isDragAndDropEnabled?: boolean;
16
17
  mountPoint?: HTMLElement;
17
18
  boundariesElement?: HTMLElement;
18
19
  scrollableElement?: HTMLElement;
@@ -12,6 +12,7 @@ export interface ColumnControlsProps {
12
12
  localId?: string;
13
13
  rowHeights?: number[];
14
14
  colWidths?: (number | undefined)[];
15
+ hasHeaderColumn?: boolean;
15
16
  }
16
- export declare const ColumnControls: ({ editorView, tableActive, tableRef, hoveredCell, isResizing, stickyTop, localId, isInDanger, rowHeights, colWidths, }: ColumnControlsProps) => JSX.Element;
17
+ export declare const ColumnControls: ({ editorView, tableActive, tableRef, hoveredCell, isResizing, stickyTop, localId, isInDanger, rowHeights, colWidths, hasHeaderColumn, }: ColumnControlsProps) => JSX.Element;
17
18
  export default ColumnControls;
@@ -10,6 +10,8 @@ type DragControlsProps = {
10
10
  tableActive?: boolean;
11
11
  hoveredCell?: CellHoverMeta;
12
12
  isInDanger?: boolean;
13
+ isResizing?: boolean;
14
+ hasHeaderRow?: boolean;
13
15
  hoverRows: (rows: number[], danger?: boolean) => void;
14
16
  selectRow: (row: number, expand: boolean) => void;
15
17
  updateCellHoverLocation: (rowIndex: number) => void;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const AddColLeftIcon: () => JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const AddColRightIcon: () => JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const AddRowAboveIcon: () => JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const AddRowBelowIcon: () => JSX.Element;
@@ -1,2 +1,6 @@
1
1
  export { DragHandleIcon } from './DragHandleIcon';
2
2
  export { DragInMotionIcon } from './DragInMotionIcon';
3
+ export { AddRowAboveIcon } from './AddRowAboveIcon';
4
+ export { AddRowBelowIcon } from './AddRowBelowIcon';
5
+ export { AddColLeftIcon } from './AddColLeftIcon';
6
+ export { AddColRightIcon } from './AddColRightIcon';
@@ -3,6 +3,7 @@ export declare const InsertMarker: (props: ThemeProps, cssString?: string) => im
3
3
  export declare const HeaderButton: (props: ThemeProps, cssString?: string) => import("@emotion/react").SerializedStyles;
4
4
  export declare const HeaderButtonHover: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
5
5
  export declare const HeaderButtonDanger: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
6
+ export declare const dragInsertButtonWrapper: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
6
7
  export declare const insertColumnButtonWrapper: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
7
8
  export declare const insertRowButtonWrapper: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
8
9
  export declare const columnControlsLineMarker: () => import("@emotion/react").SerializedStyles;
@@ -8,10 +8,13 @@ export declare const getColumnOrRowIndex: (target: HTMLElement) => [
8
8
  ];
9
9
  export declare const isColumnControlsDecorations: (node: HTMLElement | null) => boolean;
10
10
  export declare const isRowControlsButton: (node: HTMLElement | null) => boolean;
11
- export declare const isRowDragControlsButton: (node: HTMLElement | null) => true | HTMLElement | null;
12
11
  export declare const isResizeHandleDecoration: (node: HTMLElement | null) => boolean;
13
12
  export declare const isTableControlsButton: (node: HTMLElement | null) => boolean;
14
13
  export declare const isTableContainerOrWrapper: (node: HTMLElement | null) => boolean;
14
+ /** drag-and-drop classes */
15
+ export declare const isRowDragControlsButton: (node: HTMLElement | null) => true | HTMLElement | null;
16
+ export declare const isDragRowFloatingInsertDot: (node: HTMLElement | null) => boolean;
17
+ export declare const isDragColumnFloatingInsertDot: (node: HTMLElement | null) => boolean;
15
18
  export declare const getMousePositionHorizontalRelativeByElement: (mouseEvent: MouseEvent, elementContentRects?: ElementContentRects, gapInPixels?: number) => 'left' | 'right' | null;
16
19
  export declare const getMousePositionVerticalRelativeByElement: (mouseEvent: MouseEvent) => 'top' | 'bottom' | null;
17
20
  export declare const updateResizeHandles: (tableRef?: HTMLElement) => void;
@@ -1,7 +1,10 @@
1
- import type { Command, DropdownOptionT } from '@atlaskit/editor-common/types';
2
- import type { TableMap } from '@atlaskit/editor-tables/table-map';
1
+ /// <reference types="react" />
2
+ import type { Command, DropdownOptionT, GetEditorContainerWidth, IconProps } from '@atlaskit/editor-common/types';
3
+ import type { Rect, TableMap } from '@atlaskit/editor-tables/table-map';
3
4
  import type { TableDirection } from '../types';
4
5
  export interface DragMenuConfig extends DropdownOptionT<Command> {
5
6
  id: string;
7
+ icon?: React.ComponentType<IconProps>;
8
+ keymap?: string;
6
9
  }
7
- export declare const getDragMenuConfig: (direction: TableDirection, tableMap?: TableMap, index?: number) => DragMenuConfig[];
10
+ export declare const getDragMenuConfig: (direction: TableDirection, getEditorContainerWidth: GetEditorContainerWidth, tableMap?: TableMap, index?: number, targetCellPosition?: number, selectionRect?: Rect) => DragMenuConfig[];
@@ -2,7 +2,7 @@ export { getSelectedColumnIndexes, getSelectedRowIndexes, normalizeSelection, is
2
2
  export { findControlsHoverDecoration, createControlsHoverDecoration, createColumnControlsDecoration, createColumnSelectedDecoration, createCellHoverDecoration, updateDecorations, createResizeHandleDecoration, createColumnInsertLine, createColumnLineResize, createRowInsertLine, } from './decoration';
3
3
  export { isIsolating, containsHeaderColumn, containsHeaderRow, checkIfHeaderColumnEnabled, checkIfHeaderRowEnabled, checkIfNumberColumnEnabled, isLayoutSupported, getTableWidth, tablesHaveDifferentColumnWidths, tablesHaveDifferentNoOfColumns, isTableNested, anyChildCellMergedAcrossRow, supportedHeaderRow, } from './nodes';
4
4
  export { unwrapContentFromTable, removeTableFromFirstChild, removeTableFromLastChild, transformSliceToRemoveOpenTable, transformSliceToCorrectEmptyTableCells, transformSliceToFixHardBreakProblemOnCopyFromCell, } from './paste';
5
- export { isCell, isCornerButton, isInsertRowButton, isColumnControlsDecorations, isTableControlsButton, isTableContainerOrWrapper, isRowDragControlsButton, isRowControlsButton, getColumnOrRowIndex, getMousePositionHorizontalRelativeByElement, getMousePositionVerticalRelativeByElement, updateResizeHandles, isResizeHandleDecoration, hasResizeHandler, } from './dom';
5
+ export { isCell, isCornerButton, isInsertRowButton, isColumnControlsDecorations, isTableControlsButton, isTableContainerOrWrapper, isRowDragControlsButton, isRowControlsButton, isDragColumnFloatingInsertDot, isDragRowFloatingInsertDot, getColumnOrRowIndex, getMousePositionHorizontalRelativeByElement, getMousePositionVerticalRelativeByElement, updateResizeHandles, isResizeHandleDecoration, hasResizeHandler, } from './dom';
6
6
  export { getColumnsWidths, isColumnDeleteButtonVisible, getColumnDeleteButtonParams, getColumnClassNames, } from './column-controls';
7
7
  export { getRowHeights, isRowDeleteButtonVisible, getRowDeleteButtonParams, getRowsParams, getRowClassNames, copyPreviousRow, } from './row-controls';
8
8
  export type { RowParams } from './row-controls';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "5.3.13",
3
+ "version": "5.3.15",
4
4
  "description": "Table plugin for the @atlaskit/editor",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -40,6 +40,7 @@
40
40
  "@atlaskit/platform-feature-flags": "^0.2.1",
41
41
  "@atlaskit/pragmatic-drag-and-drop": "^0.23.0",
42
42
  "@atlaskit/pragmatic-drag-and-drop-hitbox": "^0.11.8",
43
+ "@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-autoscroll": "^0.6.4",
43
44
  "@atlaskit/primitives": "^1.7.0",
44
45
  "@atlaskit/theme": "^12.6.0",
45
46
  "@atlaskit/tokens": "^1.28.0",