@atlaskit/editor-plugin-table 7.1.4 → 7.2.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.
- package/CHANGELOG.md +11 -0
- package/dist/cjs/nodeviews/TableComponent.js +0 -3
- package/dist/cjs/nodeviews/table.js +1 -4
- package/dist/cjs/plugin.js +0 -1
- package/dist/cjs/pm-plugins/drag-and-drop/actions.js +1 -2
- package/dist/cjs/pm-plugins/drag-and-drop/consts.js +2 -3
- package/dist/cjs/pm-plugins/drag-and-drop/plugin.js +14 -39
- package/dist/cjs/pm-plugins/drag-and-drop/reducer.js +0 -2
- package/dist/cjs/ui/DragHandle/index.js +3 -5
- package/dist/cjs/ui/FloatingDragMenu/DragMenu.js +1 -2
- package/dist/cjs/ui/FloatingDragMenu/index.js +0 -2
- package/dist/cjs/ui/TableFloatingColumnControls/ColumnControls/index.js +1 -3
- package/dist/cjs/ui/TableFloatingColumnControls/index.js +0 -2
- package/dist/cjs/ui/TableFloatingControls/RowControls/DragControls.js +1 -3
- package/dist/cjs/ui/TableFloatingControls/index.js +4 -7
- package/dist/es2019/nodeviews/TableComponent.js +0 -3
- package/dist/es2019/nodeviews/table.js +1 -5
- package/dist/es2019/plugin.js +0 -1
- package/dist/es2019/pm-plugins/drag-and-drop/actions.js +1 -2
- package/dist/es2019/pm-plugins/drag-and-drop/consts.js +1 -2
- package/dist/es2019/pm-plugins/drag-and-drop/plugin.js +15 -39
- package/dist/es2019/pm-plugins/drag-and-drop/reducer.js +0 -5
- package/dist/es2019/ui/DragHandle/index.js +3 -4
- package/dist/es2019/ui/FloatingDragMenu/DragMenu.js +1 -2
- package/dist/es2019/ui/FloatingDragMenu/index.js +0 -2
- package/dist/es2019/ui/TableFloatingColumnControls/ColumnControls/index.js +1 -3
- package/dist/es2019/ui/TableFloatingColumnControls/index.js +0 -2
- package/dist/es2019/ui/TableFloatingControls/RowControls/DragControls.js +1 -3
- package/dist/es2019/ui/TableFloatingControls/index.js +4 -7
- package/dist/esm/nodeviews/TableComponent.js +0 -3
- package/dist/esm/nodeviews/table.js +1 -4
- package/dist/esm/plugin.js +0 -1
- package/dist/esm/pm-plugins/drag-and-drop/actions.js +1 -2
- package/dist/esm/pm-plugins/drag-and-drop/consts.js +1 -2
- package/dist/esm/pm-plugins/drag-and-drop/plugin.js +15 -39
- package/dist/esm/pm-plugins/drag-and-drop/reducer.js +0 -2
- package/dist/esm/ui/DragHandle/index.js +3 -5
- package/dist/esm/ui/FloatingDragMenu/DragMenu.js +1 -2
- package/dist/esm/ui/FloatingDragMenu/index.js +0 -2
- package/dist/esm/ui/TableFloatingColumnControls/ColumnControls/index.js +1 -3
- package/dist/esm/ui/TableFloatingColumnControls/index.js +0 -2
- package/dist/esm/ui/TableFloatingControls/RowControls/DragControls.js +1 -3
- package/dist/esm/ui/TableFloatingControls/index.js +4 -7
- package/dist/types/nodeviews/TableComponent.d.ts +0 -1
- package/dist/types/pm-plugins/drag-and-drop/actions.d.ts +1 -4
- package/dist/types/pm-plugins/drag-and-drop/consts.d.ts +0 -1
- package/dist/types/pm-plugins/drag-and-drop/plugin.d.ts +1 -2
- package/dist/types/pm-plugins/drag-and-drop/types.d.ts +0 -1
- package/dist/types/ui/DragHandle/index.d.ts +0 -1
- package/dist/types/ui/FloatingDragMenu/DragMenu.d.ts +1 -2
- package/dist/types/ui/FloatingDragMenu/index.d.ts +1 -2
- package/dist/types/ui/TableFloatingColumnControls/ColumnControls/index.d.ts +1 -2
- package/dist/types/ui/TableFloatingColumnControls/index.d.ts +0 -1
- package/dist/types/ui/TableFloatingControls/RowControls/DragControls.d.ts +0 -1
- package/dist/types/ui/TableFloatingControls/index.d.ts +0 -1
- package/dist/types-ts4.5/nodeviews/TableComponent.d.ts +0 -1
- package/dist/types-ts4.5/pm-plugins/drag-and-drop/actions.d.ts +1 -4
- package/dist/types-ts4.5/pm-plugins/drag-and-drop/consts.d.ts +0 -1
- package/dist/types-ts4.5/pm-plugins/drag-and-drop/plugin.d.ts +1 -2
- package/dist/types-ts4.5/pm-plugins/drag-and-drop/types.d.ts +0 -1
- package/dist/types-ts4.5/ui/DragHandle/index.d.ts +0 -1
- package/dist/types-ts4.5/ui/FloatingDragMenu/DragMenu.d.ts +1 -2
- package/dist/types-ts4.5/ui/FloatingDragMenu/index.d.ts +1 -2
- package/dist/types-ts4.5/ui/TableFloatingColumnControls/ColumnControls/index.d.ts +1 -2
- package/dist/types-ts4.5/ui/TableFloatingColumnControls/index.d.ts +0 -1
- package/dist/types-ts4.5/ui/TableFloatingControls/RowControls/DragControls.d.ts +0 -1
- package/dist/types-ts4.5/ui/TableFloatingControls/index.d.ts +0 -1
- package/package.json +4 -4
- package/src/nodeviews/TableComponent.tsx +0 -4
- package/src/nodeviews/table.tsx +0 -3
- package/src/plugin.tsx +0 -1
- package/src/pm-plugins/drag-and-drop/actions.ts +1 -9
- package/src/pm-plugins/drag-and-drop/consts.ts +0 -2
- package/src/pm-plugins/drag-and-drop/plugin.ts +17 -49
- package/src/pm-plugins/drag-and-drop/reducer.ts +0 -5
- package/src/pm-plugins/drag-and-drop/types.ts +0 -1
- package/src/ui/DragHandle/index.tsx +2 -5
- package/src/ui/FloatingDragMenu/DragMenu.tsx +1 -3
- package/src/ui/FloatingDragMenu/index.tsx +0 -3
- package/src/ui/TableFloatingColumnControls/ColumnControls/index.tsx +0 -3
- package/src/ui/TableFloatingColumnControls/index.tsx +0 -3
- package/src/ui/TableFloatingControls/RowControls/DragControls.tsx +0 -3
- package/src/ui/TableFloatingControls/index.tsx +1 -6
- package/src/__tests__/unit/pm-plugins/drag-and-drop/plugin.ts +0 -112
|
@@ -16,7 +16,6 @@ export const TableFloatingColumnControls = ({
|
|
|
16
16
|
selection,
|
|
17
17
|
isInDanger,
|
|
18
18
|
isTableHovered,
|
|
19
|
-
canDrag,
|
|
20
19
|
tableContainerWidth,
|
|
21
20
|
isNumberColumnEnabled
|
|
22
21
|
}) => {
|
|
@@ -106,7 +105,6 @@ export const TableFloatingColumnControls = ({
|
|
|
106
105
|
rowHeights: rowHeights,
|
|
107
106
|
colWidths: colWidths,
|
|
108
107
|
hasHeaderColumn: hasHeaderColumn,
|
|
109
|
-
canDrag: canDrag,
|
|
110
108
|
tableContainerWidth: tableContainerWidth,
|
|
111
109
|
isNumberColumnEnabled: isNumberColumnEnabled,
|
|
112
110
|
isDragging: isDragging
|
|
@@ -33,7 +33,6 @@ const DragControlsComponent = ({
|
|
|
33
33
|
isInDanger,
|
|
34
34
|
isResizing,
|
|
35
35
|
isTableHovered,
|
|
36
|
-
canDrag,
|
|
37
36
|
hoverRows,
|
|
38
37
|
selectRow,
|
|
39
38
|
selectRows,
|
|
@@ -160,8 +159,7 @@ const DragControlsComponent = ({
|
|
|
160
159
|
onMouseOver: handleMouseOver,
|
|
161
160
|
onMouseOut: handleMouseOut,
|
|
162
161
|
onMouseUp: onMouseUp,
|
|
163
|
-
editorView: editorView
|
|
164
|
-
canDrag: canDrag
|
|
162
|
+
editorView: editorView
|
|
165
163
|
}));
|
|
166
164
|
};
|
|
167
165
|
const rowHandles = hoveredCell => {
|
|
@@ -113,10 +113,9 @@ export default class TableFloatingControls extends Component {
|
|
|
113
113
|
headerRowHeight,
|
|
114
114
|
stickyHeader,
|
|
115
115
|
hoveredCell,
|
|
116
|
-
isTableHovered
|
|
117
|
-
canDrag
|
|
116
|
+
isTableHovered
|
|
118
117
|
} = this.props;
|
|
119
|
-
return this.state.tableWrapperWidth !== nextState.tableWrapperWidth || this.state.tableWrapperHeight !== nextState.tableWrapperHeight || ordering !== nextProps.ordering || tableRef !== nextProps.tableRef || tableActive !== nextProps.tableActive || isInDanger !== nextProps.isInDanger || isResizing !== nextProps.isResizing || hoveredRows !== nextProps.hoveredRows || isHeaderRowEnabled !== nextProps.isHeaderRowEnabled || isHeaderColumnEnabled !== nextProps.isHeaderColumnEnabled || isNumberColumnEnabled !== nextProps.isNumberColumnEnabled || isSelectionUpdated(selection, nextProps.selection) || headerRowHeight !== nextProps.headerRowHeight || stickyHeader !== nextProps.stickyHeader || hoveredCell !== nextProps.hoveredCell || isTableHovered !== nextProps.isTableHovered
|
|
118
|
+
return this.state.tableWrapperWidth !== nextState.tableWrapperWidth || this.state.tableWrapperHeight !== nextState.tableWrapperHeight || ordering !== nextProps.ordering || tableRef !== nextProps.tableRef || tableActive !== nextProps.tableActive || isInDanger !== nextProps.isInDanger || isResizing !== nextProps.isResizing || hoveredRows !== nextProps.hoveredRows || isHeaderRowEnabled !== nextProps.isHeaderRowEnabled || isHeaderColumnEnabled !== nextProps.isHeaderColumnEnabled || isNumberColumnEnabled !== nextProps.isNumberColumnEnabled || isSelectionUpdated(selection, nextProps.selection) || headerRowHeight !== nextProps.headerRowHeight || stickyHeader !== nextProps.stickyHeader || hoveredCell !== nextProps.hoveredCell || isTableHovered !== nextProps.isTableHovered;
|
|
120
119
|
}
|
|
121
120
|
componentWillUnmount() {
|
|
122
121
|
if (this.resizeObserver) {
|
|
@@ -139,8 +138,7 @@ export default class TableFloatingControls extends Component {
|
|
|
139
138
|
stickyHeader,
|
|
140
139
|
isDragAndDropEnabled,
|
|
141
140
|
hoveredCell,
|
|
142
|
-
isTableHovered
|
|
143
|
-
canDrag
|
|
141
|
+
isTableHovered
|
|
144
142
|
} = this.props;
|
|
145
143
|
if (!tableRef) {
|
|
146
144
|
return null;
|
|
@@ -182,8 +180,7 @@ export default class TableFloatingControls extends Component {
|
|
|
182
180
|
hoverRows: this.hoverRows,
|
|
183
181
|
selectRow: this.selectRow,
|
|
184
182
|
selectRows: this.selectRows,
|
|
185
|
-
updateCellHoverLocation: this.updateCellHoverLocation
|
|
186
|
-
canDrag: canDrag
|
|
183
|
+
updateCellHoverLocation: this.updateCellHoverLocation
|
|
187
184
|
})) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CornerControls, {
|
|
188
185
|
editorView: editorView,
|
|
189
186
|
tableRef: tableRef,
|
|
@@ -481,7 +481,6 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
481
481
|
getPos = _this$props10.getPos,
|
|
482
482
|
pluginInjectionApi = _this$props10.pluginInjectionApi,
|
|
483
483
|
isDragAndDropEnabled = _this$props10.isDragAndDropEnabled,
|
|
484
|
-
canDrag = _this$props10.canDrag,
|
|
485
484
|
getEditorFeatureFlags = _this$props10.getEditorFeatureFlags;
|
|
486
485
|
var _this$state3 = this.state,
|
|
487
486
|
showBeforeShadow = _this$state3.showBeforeShadow,
|
|
@@ -509,7 +508,6 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
509
508
|
isNumberColumnEnabled: node.attrs.isNumberColumnEnabled,
|
|
510
509
|
isHeaderRowEnabled: isHeaderRowEnabled,
|
|
511
510
|
isDragAndDropEnabled: isDragAndDropEnabled,
|
|
512
|
-
canDrag: canDrag,
|
|
513
511
|
ordering: ordering,
|
|
514
512
|
isHeaderColumnEnabled: isHeaderColumnEnabled,
|
|
515
513
|
hasHeaderRow: hasHeaderRow
|
|
@@ -537,7 +535,6 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
537
535
|
selection: view.state.selection,
|
|
538
536
|
headerRowHeight: headerRow ? headerRow.offsetHeight : undefined,
|
|
539
537
|
stickyHeader: this.state.stickyHeader,
|
|
540
|
-
canDrag: canDrag,
|
|
541
538
|
getEditorFeatureFlags: getEditorFeatureFlags,
|
|
542
539
|
tableContainerWidth: tableContainerWidth,
|
|
543
540
|
isNumberColumnEnabled: node.attrs.isNumberColumnEnabled
|
|
@@ -141,12 +141,10 @@ var TableView = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
141
141
|
},
|
|
142
142
|
editorView: props.view,
|
|
143
143
|
render: function render(pluginStates) {
|
|
144
|
-
var _tableDragAndDropStat;
|
|
145
144
|
var tableResizingPluginState = pluginStates.tableResizingPluginState,
|
|
146
145
|
tableWidthPluginState = pluginStates.tableWidthPluginState,
|
|
147
146
|
pluginState = pluginStates.pluginState,
|
|
148
|
-
mediaState = pluginStates.mediaState
|
|
149
|
-
tableDragAndDropState = pluginStates.tableDragAndDropState;
|
|
147
|
+
mediaState = pluginStates.mediaState;
|
|
150
148
|
var containerWidth = props.getEditorContainerWidth();
|
|
151
149
|
var isTableResizing = tableWidthPluginState === null || tableWidthPluginState === void 0 ? void 0 : tableWidthPluginState.resizing;
|
|
152
150
|
var isResizing = Boolean((tableResizingPluginState === null || tableResizingPluginState === void 0 ? void 0 : tableResizingPluginState.dragging) || isTableResizing);
|
|
@@ -174,7 +172,6 @@ var TableView = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
174
172
|
isHeaderRowEnabled: pluginState.isHeaderRowEnabled,
|
|
175
173
|
isHeaderColumnEnabled: pluginState.isHeaderColumnEnabled,
|
|
176
174
|
isDragAndDropEnabled: pluginState.isDragAndDropEnabled,
|
|
177
|
-
canDrag: (_tableDragAndDropStat = tableDragAndDropState === null || tableDragAndDropState === void 0 ? void 0 : tableDragAndDropState.canDrag) !== null && _tableDragAndDropStat !== void 0 ? _tableDragAndDropStat : false,
|
|
178
175
|
tableActive: tableActive,
|
|
179
176
|
ordering: pluginState.ordering,
|
|
180
177
|
isResizing: isResizing,
|
package/dist/esm/plugin.js
CHANGED
|
@@ -352,7 +352,6 @@ var tablesPlugin = function tablesPlugin(_ref) {
|
|
|
352
352
|
direction: dragAndDropState === null || dragAndDropState === void 0 ? void 0 : dragAndDropState.dragMenuDirection,
|
|
353
353
|
index: dragAndDropState === null || dragAndDropState === void 0 ? void 0 : dragAndDropState.dragMenuIndex,
|
|
354
354
|
isOpen: !!(dragAndDropState !== null && dragAndDropState !== void 0 && dragAndDropState.isDragMenuOpen) && !isResizing,
|
|
355
|
-
canDrag: dragAndDropState === null || dragAndDropState === void 0 ? void 0 : dragAndDropState.canDrag,
|
|
356
355
|
getEditorContainerWidth: defaultGetEditorContainerWidth,
|
|
357
356
|
editorAnalyticsAPI: editorAnalyticsAPI,
|
|
358
357
|
stickyHeaders: stickyHeader,
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
export var DragAndDropActionType = {
|
|
2
2
|
SET_DROP_TARGET: 'SET_DROP_TARGET',
|
|
3
3
|
CLEAR_DROP_TARGET: 'CLEAR_DROP_TARGET',
|
|
4
|
-
TOGGLE_DRAG_MENU: 'TOGGLE_DRAG_MENU'
|
|
5
|
-
UPDATE: 'UPDATE'
|
|
4
|
+
TOGGLE_DRAG_MENU: 'TOGGLE_DRAG_MENU'
|
|
6
5
|
};
|
|
7
6
|
|
|
8
7
|
// NOTE: This should be a Union of all possible actions
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
1
|
import { INPUT_METHOD, TABLE_STATUS } from '@atlaskit/editor-common/analytics';
|
|
5
2
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
6
3
|
import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
@@ -16,7 +13,7 @@ import { insertColgroupFromNode } from '../table-resizing/utils';
|
|
|
16
13
|
import { DragAndDropActionType } from './actions';
|
|
17
14
|
import { clearDropTarget, setDropTarget, toggleDragMenu } from './commands';
|
|
18
15
|
import { clearDropTargetWithAnalytics, moveSourceWithAnalytics } from './commands-with-analytics';
|
|
19
|
-
import {
|
|
16
|
+
import { DropTargetType } from './consts';
|
|
20
17
|
import { createPluginState, getPluginState } from './plugin-factory';
|
|
21
18
|
import { pluginKey } from './plugin-key';
|
|
22
19
|
import { getDraggableDataFromEvent } from './utils/monitor';
|
|
@@ -167,24 +164,18 @@ export var createPlugin = function createPlugin(dispatch, eventDispatcher, edito
|
|
|
167
164
|
dropTargetIndex: 0,
|
|
168
165
|
isDragMenuOpen: false,
|
|
169
166
|
dragMenuIndex: 0,
|
|
170
|
-
isDragging: false
|
|
171
|
-
canDrag: false
|
|
167
|
+
isDragging: false
|
|
172
168
|
};
|
|
173
169
|
}),
|
|
174
170
|
key: pluginKey,
|
|
175
171
|
appendTransaction: function appendTransaction(transactions, oldState, newState) {
|
|
176
172
|
var _getTablePluginState4 = getTablePluginState(oldState),
|
|
177
|
-
oldTargetCellPosition = _getTablePluginState4.targetCellPosition
|
|
178
|
-
oldTableNode = _getTablePluginState4.tableNode;
|
|
173
|
+
oldTargetCellPosition = _getTablePluginState4.targetCellPosition;
|
|
179
174
|
var _getTablePluginState5 = getTablePluginState(newState),
|
|
180
|
-
newTargetCellPosition = _getTablePluginState5.targetCellPosition
|
|
181
|
-
newTableNode = _getTablePluginState5.tableNode;
|
|
175
|
+
newTargetCellPosition = _getTablePluginState5.targetCellPosition;
|
|
182
176
|
var _getPluginState = getPluginState(newState),
|
|
183
177
|
isDragMenuOpen = _getPluginState.isDragMenuOpen,
|
|
184
|
-
dragMenuIndex = _getPluginState.dragMenuIndex
|
|
185
|
-
canDrag = _getPluginState.canDrag;
|
|
186
|
-
var stateChanges = [];
|
|
187
|
-
var tr = newState.tr;
|
|
178
|
+
dragMenuIndex = _getPluginState.dragMenuIndex;
|
|
188
179
|
|
|
189
180
|
// What's happening here? you asked... In a nutshell;
|
|
190
181
|
// If the target cell position changes while the drag menu is open then we want to close the drag menu if it has been opened.
|
|
@@ -192,6 +183,14 @@ export var createPlugin = function createPlugin(dispatch, eventDispatcher, edito
|
|
|
192
183
|
// to check if the new target cell position is pointed at a different cell than what the drag menu was opened on.
|
|
193
184
|
if (oldTargetCellPosition !== newTargetCellPosition) {
|
|
194
185
|
if (isDragMenuOpen) {
|
|
186
|
+
var tr = newState.tr;
|
|
187
|
+
var action = {
|
|
188
|
+
type: DragAndDropActionType.TOGGLE_DRAG_MENU,
|
|
189
|
+
data: {
|
|
190
|
+
isDragMenuOpen: false,
|
|
191
|
+
direction: undefined
|
|
192
|
+
}
|
|
193
|
+
};
|
|
195
194
|
if (newTargetCellPosition !== undefined) {
|
|
196
195
|
var cells = getCellsInRow(dragMenuIndex)(tr.selection);
|
|
197
196
|
// ED-20673 check if it is a cell selection,
|
|
@@ -199,36 +198,13 @@ export var createPlugin = function createPlugin(dispatch, eventDispatcher, edito
|
|
|
199
198
|
// should not close the drag menu.
|
|
200
199
|
var isCellSelection = tr.selection instanceof CellSelection;
|
|
201
200
|
if (cells && cells.length && cells[0].node !== tr.doc.nodeAt(newTargetCellPosition) && !isCellSelection) {
|
|
202
|
-
|
|
203
|
-
isDragMenuOpen: false,
|
|
204
|
-
dragMenuDirection: undefined
|
|
205
|
-
});
|
|
201
|
+
return tr.setMeta(pluginKey, action);
|
|
206
202
|
} // else NOP
|
|
207
203
|
} else {
|
|
208
|
-
|
|
209
|
-
isDragMenuOpen: false,
|
|
210
|
-
dragMenuDirection: undefined
|
|
211
|
-
});
|
|
204
|
+
return tr.setMeta(pluginKey, action);
|
|
212
205
|
}
|
|
213
206
|
}
|
|
214
207
|
}
|
|
215
|
-
if ((oldTableNode === null || oldTableNode === void 0 ? void 0 : oldTableNode.nodeSize) !== (newTableNode === null || newTableNode === void 0 ? void 0 : newTableNode.nodeSize)) {
|
|
216
|
-
var _newTableNode$nodeSiz;
|
|
217
|
-
var nextCanDrag = ((_newTableNode$nodeSiz = newTableNode === null || newTableNode === void 0 ? void 0 : newTableNode.nodeSize) !== null && _newTableNode$nodeSiz !== void 0 ? _newTableNode$nodeSiz : 0) < DRAGGABLE_TABLE_NODE_SIZE_LIMIT;
|
|
218
|
-
if (canDrag !== nextCanDrag) {
|
|
219
|
-
stateChanges.push({
|
|
220
|
-
canDrag: nextCanDrag
|
|
221
|
-
});
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
if (stateChanges.length) {
|
|
225
|
-
return tr.setMeta(pluginKey, {
|
|
226
|
-
type: DragAndDropActionType.UPDATE,
|
|
227
|
-
data: _objectSpread({}, stateChanges.reduce(function (state, cur) {
|
|
228
|
-
return _objectSpread(_objectSpread({}, state), cur);
|
|
229
|
-
}, {}))
|
|
230
|
-
}).setMeta('addToHistory', false);
|
|
231
|
-
}
|
|
232
208
|
},
|
|
233
209
|
view: function view(editorView) {
|
|
234
210
|
return {
|
|
@@ -25,8 +25,6 @@ export default (function (pluginState, action) {
|
|
|
25
25
|
dragMenuDirection: action.data.direction,
|
|
26
26
|
dragMenuIndex: action.data.index
|
|
27
27
|
});
|
|
28
|
-
case DragAndDropActionType.UPDATE:
|
|
29
|
-
return _objectSpread(_objectSpread({}, pluginState), action.data);
|
|
30
28
|
default:
|
|
31
29
|
return pluginState;
|
|
32
30
|
}
|
|
@@ -31,8 +31,6 @@ var DragHandleComponent = function DragHandleComponent(_ref) {
|
|
|
31
31
|
_onMouseUp = _ref.onMouseUp,
|
|
32
32
|
onClick = _ref.onClick,
|
|
33
33
|
editorView = _ref.editorView,
|
|
34
|
-
_ref$canDrag = _ref.canDrag,
|
|
35
|
-
_canDrag = _ref$canDrag === void 0 ? false : _ref$canDrag,
|
|
36
34
|
formatMessage = _ref.intl.formatMessage;
|
|
37
35
|
var dragHandleDivRef = useRef(null);
|
|
38
36
|
var _useState = useState(null),
|
|
@@ -62,7 +60,7 @@ var DragHandleComponent = function DragHandleComponent(_ref) {
|
|
|
62
60
|
return draggable({
|
|
63
61
|
element: dragHandleDivRefCurrent,
|
|
64
62
|
canDrag: function canDrag() {
|
|
65
|
-
return
|
|
63
|
+
return !hasMergedCells;
|
|
66
64
|
},
|
|
67
65
|
getInitialData: function getInitialData() {
|
|
68
66
|
return {
|
|
@@ -110,7 +108,7 @@ var DragHandleComponent = function DragHandleComponent(_ref) {
|
|
|
110
108
|
}
|
|
111
109
|
});
|
|
112
110
|
}
|
|
113
|
-
}, [tableLocalId, direction, indexes, isRow, editorView.state.selection, hasMergedCells
|
|
111
|
+
}, [tableLocalId, direction, indexes, isRow, editorView.state.selection, hasMergedCells]);
|
|
114
112
|
var showDragMenuAnchorId = isRow ? 'drag-handle-button-row' : 'drag-handle-button-column';
|
|
115
113
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("button", {
|
|
116
114
|
className: ClassName.DRAG_HANDLE_BUTTON_CLICKABLE_ZONE,
|
|
@@ -128,7 +126,7 @@ var DragHandleComponent = function DragHandleComponent(_ref) {
|
|
|
128
126
|
onClick: onClick
|
|
129
127
|
}), /*#__PURE__*/React.createElement("button", {
|
|
130
128
|
id: isDragMenuTarget ? showDragMenuAnchorId : undefined,
|
|
131
|
-
className: classnames(ClassName.DRAG_HANDLE_BUTTON_CONTAINER, appearance, _defineProperty({}, ClassName.DRAG_HANDLE_DISABLED,
|
|
129
|
+
className: classnames(ClassName.DRAG_HANDLE_BUTTON_CONTAINER, appearance, _defineProperty({}, ClassName.DRAG_HANDLE_DISABLED, hasMergedCells)),
|
|
132
130
|
ref: dragHandleDivRef,
|
|
133
131
|
style: {
|
|
134
132
|
transform: isColumn ? 'none' : 'rotate(90deg)',
|
|
@@ -170,7 +170,6 @@ export var DragMenu = function DragMenu(_ref) {
|
|
|
170
170
|
scrollableElement = _ref.scrollableElement,
|
|
171
171
|
targetCellPosition = _ref.targetCellPosition,
|
|
172
172
|
getEditorContainerWidth = _ref.getEditorContainerWidth,
|
|
173
|
-
canDrag = _ref.canDrag,
|
|
174
173
|
editorAnalyticsAPI = _ref.editorAnalyticsAPI,
|
|
175
174
|
pluginConfig = _ref.pluginConfig,
|
|
176
175
|
formatMessage = _ref.intl.formatMessage;
|
|
@@ -187,7 +186,7 @@ export var DragMenu = function DragMenu(_ref) {
|
|
|
187
186
|
var shouldMoveDisabled = index !== undefined && hasMergedCells(index)(selection);
|
|
188
187
|
var hasMergedCellsInTable = getMergedCellsPositions(state.tr).length > 0;
|
|
189
188
|
var allowBackgroundColor = (_pluginConfig$allowBa = pluginConfig === null || pluginConfig === void 0 ? void 0 : pluginConfig.allowBackgroundColor) !== null && _pluginConfig$allowBa !== void 0 ? _pluginConfig$allowBa : false;
|
|
190
|
-
var dragMenuConfig = getDragMenuConfig(direction, getEditorContainerWidth,
|
|
189
|
+
var dragMenuConfig = getDragMenuConfig(direction, getEditorContainerWidth, !shouldMoveDisabled, hasMergedCellsInTable, editorView, tableMap, index, targetCellPosition, selectionRect, editorAnalyticsAPI);
|
|
191
190
|
var _convertToDropdownIte = convertToDropdownItems(dragMenuConfig, formatMessage, selectionRect),
|
|
192
191
|
menuItems = _convertToDropdownIte.menuItems,
|
|
193
192
|
menuCallback = _convertToDropdownIte.menuCallback;
|
|
@@ -15,7 +15,6 @@ var FloatingDragMenu = function FloatingDragMenu(_ref) {
|
|
|
15
15
|
index = _ref.index,
|
|
16
16
|
targetCellPosition = _ref.targetCellPosition,
|
|
17
17
|
getEditorContainerWidth = _ref.getEditorContainerWidth,
|
|
18
|
-
canDrag = _ref.canDrag,
|
|
19
18
|
editorAnalyticsAPI = _ref.editorAnalyticsAPI,
|
|
20
19
|
stickyHeaders = _ref.stickyHeaders,
|
|
21
20
|
pluginConfig = _ref.pluginConfig;
|
|
@@ -55,7 +54,6 @@ var FloatingDragMenu = function FloatingDragMenu(_ref) {
|
|
|
55
54
|
index: index,
|
|
56
55
|
targetCellPosition: targetCellPosition,
|
|
57
56
|
getEditorContainerWidth: getEditorContainerWidth,
|
|
58
|
-
canDrag: canDrag,
|
|
59
57
|
editorAnalyticsAPI: editorAnalyticsAPI,
|
|
60
58
|
pluginConfig: pluginConfig
|
|
61
59
|
}));
|
|
@@ -35,7 +35,6 @@ export var ColumnControls = function ColumnControls(_ref) {
|
|
|
35
35
|
colWidths = _ref.colWidths,
|
|
36
36
|
hasHeaderColumn = _ref.hasHeaderColumn,
|
|
37
37
|
isTableHovered = _ref.isTableHovered,
|
|
38
|
-
canDrag = _ref.canDrag,
|
|
39
38
|
tableContainerWidth = _ref.tableContainerWidth,
|
|
40
39
|
isNumberColumnEnabled = _ref.isNumberColumnEnabled,
|
|
41
40
|
isDragging = _ref.isDragging;
|
|
@@ -179,8 +178,7 @@ export var ColumnControls = function ColumnControls(_ref) {
|
|
|
179
178
|
onMouseOver: handleMouseOver,
|
|
180
179
|
onMouseOut: handleMouseOut,
|
|
181
180
|
onMouseUp: handleMouseUp,
|
|
182
|
-
editorView: editorView
|
|
183
|
-
canDrag: canDrag
|
|
181
|
+
editorView: editorView
|
|
184
182
|
}));
|
|
185
183
|
};
|
|
186
184
|
var columnHandles = function columnHandles(hoveredCell) {
|
|
@@ -20,7 +20,6 @@ export var TableFloatingColumnControls = function TableFloatingColumnControls(_r
|
|
|
20
20
|
selection = _ref.selection,
|
|
21
21
|
isInDanger = _ref.isInDanger,
|
|
22
22
|
isTableHovered = _ref.isTableHovered,
|
|
23
|
-
canDrag = _ref.canDrag,
|
|
24
23
|
tableContainerWidth = _ref.tableContainerWidth,
|
|
25
24
|
isNumberColumnEnabled = _ref.isNumberColumnEnabled;
|
|
26
25
|
var _useState = useState({
|
|
@@ -125,7 +124,6 @@ export var TableFloatingColumnControls = function TableFloatingColumnControls(_r
|
|
|
125
124
|
rowHeights: rowHeights,
|
|
126
125
|
colWidths: colWidths,
|
|
127
126
|
hasHeaderColumn: hasHeaderColumn,
|
|
128
|
-
canDrag: canDrag,
|
|
129
127
|
tableContainerWidth: tableContainerWidth,
|
|
130
128
|
isNumberColumnEnabled: isNumberColumnEnabled,
|
|
131
129
|
isDragging: isDragging
|
|
@@ -35,7 +35,6 @@ var DragControlsComponent = function DragControlsComponent(_ref) {
|
|
|
35
35
|
isInDanger = _ref.isInDanger,
|
|
36
36
|
isResizing = _ref.isResizing,
|
|
37
37
|
isTableHovered = _ref.isTableHovered,
|
|
38
|
-
canDrag = _ref.canDrag,
|
|
39
38
|
hoverRows = _ref.hoverRows,
|
|
40
39
|
selectRow = _ref.selectRow,
|
|
41
40
|
selectRows = _ref.selectRows,
|
|
@@ -162,8 +161,7 @@ var DragControlsComponent = function DragControlsComponent(_ref) {
|
|
|
162
161
|
onMouseOver: handleMouseOver,
|
|
163
162
|
onMouseOut: handleMouseOut,
|
|
164
163
|
onMouseUp: onMouseUp,
|
|
165
|
-
editorView: editorView
|
|
166
|
-
canDrag: canDrag
|
|
164
|
+
editorView: editorView
|
|
167
165
|
}));
|
|
168
166
|
};
|
|
169
167
|
var rowHandles = function rowHandles(hoveredCell) {
|
|
@@ -136,9 +136,8 @@ var TableFloatingControls = /*#__PURE__*/function (_Component) {
|
|
|
136
136
|
headerRowHeight = _this$props2.headerRowHeight,
|
|
137
137
|
stickyHeader = _this$props2.stickyHeader,
|
|
138
138
|
hoveredCell = _this$props2.hoveredCell,
|
|
139
|
-
isTableHovered = _this$props2.isTableHovered
|
|
140
|
-
|
|
141
|
-
return this.state.tableWrapperWidth !== nextState.tableWrapperWidth || this.state.tableWrapperHeight !== nextState.tableWrapperHeight || ordering !== nextProps.ordering || tableRef !== nextProps.tableRef || tableActive !== nextProps.tableActive || isInDanger !== nextProps.isInDanger || isResizing !== nextProps.isResizing || hoveredRows !== nextProps.hoveredRows || isHeaderRowEnabled !== nextProps.isHeaderRowEnabled || isHeaderColumnEnabled !== nextProps.isHeaderColumnEnabled || isNumberColumnEnabled !== nextProps.isNumberColumnEnabled || isSelectionUpdated(selection, nextProps.selection) || headerRowHeight !== nextProps.headerRowHeight || stickyHeader !== nextProps.stickyHeader || hoveredCell !== nextProps.hoveredCell || isTableHovered !== nextProps.isTableHovered || canDrag !== nextProps.canDrag;
|
|
139
|
+
isTableHovered = _this$props2.isTableHovered;
|
|
140
|
+
return this.state.tableWrapperWidth !== nextState.tableWrapperWidth || this.state.tableWrapperHeight !== nextState.tableWrapperHeight || ordering !== nextProps.ordering || tableRef !== nextProps.tableRef || tableActive !== nextProps.tableActive || isInDanger !== nextProps.isInDanger || isResizing !== nextProps.isResizing || hoveredRows !== nextProps.hoveredRows || isHeaderRowEnabled !== nextProps.isHeaderRowEnabled || isHeaderColumnEnabled !== nextProps.isHeaderColumnEnabled || isNumberColumnEnabled !== nextProps.isNumberColumnEnabled || isSelectionUpdated(selection, nextProps.selection) || headerRowHeight !== nextProps.headerRowHeight || stickyHeader !== nextProps.stickyHeader || hoveredCell !== nextProps.hoveredCell || isTableHovered !== nextProps.isTableHovered;
|
|
142
141
|
}
|
|
143
142
|
}, {
|
|
144
143
|
key: "componentWillUnmount",
|
|
@@ -165,8 +164,7 @@ var TableFloatingControls = /*#__PURE__*/function (_Component) {
|
|
|
165
164
|
stickyHeader = _this$props3.stickyHeader,
|
|
166
165
|
isDragAndDropEnabled = _this$props3.isDragAndDropEnabled,
|
|
167
166
|
hoveredCell = _this$props3.hoveredCell,
|
|
168
|
-
isTableHovered = _this$props3.isTableHovered
|
|
169
|
-
canDrag = _this$props3.canDrag;
|
|
167
|
+
isTableHovered = _this$props3.isTableHovered;
|
|
170
168
|
if (!tableRef) {
|
|
171
169
|
return null;
|
|
172
170
|
}
|
|
@@ -209,8 +207,7 @@ var TableFloatingControls = /*#__PURE__*/function (_Component) {
|
|
|
209
207
|
hoverRows: this.hoverRows,
|
|
210
208
|
selectRow: this.selectRow,
|
|
211
209
|
selectRows: this.selectRows,
|
|
212
|
-
updateCellHoverLocation: this.updateCellHoverLocation
|
|
213
|
-
canDrag: canDrag
|
|
210
|
+
updateCellHoverLocation: this.updateCellHoverLocation
|
|
214
211
|
})) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CornerControls, {
|
|
215
212
|
editorView: editorView,
|
|
216
213
|
tableRef: tableRef,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
2
2
|
import type { TableDirection } from '../../types';
|
|
3
3
|
import type { DropTargetType } from './consts';
|
|
4
|
-
import type { DragAndDropPluginState } from './types';
|
|
5
4
|
export interface DragAndDropAction<T, D> {
|
|
6
5
|
type: T;
|
|
7
6
|
data: D;
|
|
@@ -10,7 +9,6 @@ export declare const DragAndDropActionType: {
|
|
|
10
9
|
readonly SET_DROP_TARGET: "SET_DROP_TARGET";
|
|
11
10
|
readonly CLEAR_DROP_TARGET: "CLEAR_DROP_TARGET";
|
|
12
11
|
readonly TOGGLE_DRAG_MENU: "TOGGLE_DRAG_MENU";
|
|
13
|
-
readonly UPDATE: "UPDATE";
|
|
14
12
|
};
|
|
15
13
|
export type DragAndDropSetDropTargetAction = DragAndDropAction<typeof DragAndDropActionType.SET_DROP_TARGET, {
|
|
16
14
|
type: DropTargetType;
|
|
@@ -25,5 +23,4 @@ export type DragAndDropToggleDragMenuAction = DragAndDropAction<typeof DragAndDr
|
|
|
25
23
|
direction: TableDirection;
|
|
26
24
|
index: number;
|
|
27
25
|
}>;
|
|
28
|
-
export type
|
|
29
|
-
export type DragAndDropPluginAction = DragAndDropSetDropTargetAction | DragAndDropClearDropTargetAction | DragAndDropToggleDragMenuAction | DragAndDropUpdateAction;
|
|
26
|
+
export type DragAndDropPluginAction = DragAndDropSetDropTargetAction | DragAndDropClearDropTargetAction | DragAndDropToggleDragMenuAction;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import type { Dispatch, EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
3
3
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
4
|
-
|
|
5
|
-
export declare const createPlugin: (dispatch: Dispatch, eventDispatcher: EventDispatcher, editorAnalyticsAPI?: EditorAnalyticsAPI) => SafePlugin<DragAndDropPluginState>;
|
|
4
|
+
export declare const createPlugin: (dispatch: Dispatch, eventDispatcher: EventDispatcher, editorAnalyticsAPI?: EditorAnalyticsAPI) => SafePlugin<import("./types").DragAndDropPluginState>;
|
|
@@ -17,7 +17,6 @@ type DragHandleProps = {
|
|
|
17
17
|
onMouseOut?: MouseEventHandler;
|
|
18
18
|
onMouseUp?: MouseEventHandler;
|
|
19
19
|
editorView: EditorView;
|
|
20
|
-
canDrag?: boolean;
|
|
21
20
|
isDragMenuTarget: boolean;
|
|
22
21
|
};
|
|
23
22
|
export declare const DragHandle: React.FC<import("react-intl-next").WithIntlProps<DragHandleProps & WrappedComponentProps<"intl">>> & {
|
|
@@ -19,10 +19,9 @@ type DragMenuProps = {
|
|
|
19
19
|
scrollableElement?: HTMLElement;
|
|
20
20
|
pluginConfig?: PluginConfig;
|
|
21
21
|
getEditorContainerWidth: GetEditorContainerWidth;
|
|
22
|
-
canDrag?: boolean;
|
|
23
22
|
editorAnalyticsAPI?: EditorAnalyticsAPI;
|
|
24
23
|
};
|
|
25
|
-
export declare const DragMenu: ({ direction, index, isOpen, editorView, tableNode, mountPoint, boundariesElement, scrollableElement, targetCellPosition, getEditorContainerWidth,
|
|
24
|
+
export declare const DragMenu: ({ direction, index, isOpen, editorView, tableNode, mountPoint, boundariesElement, scrollableElement, targetCellPosition, getEditorContainerWidth, editorAnalyticsAPI, pluginConfig, intl: { formatMessage }, }: DragMenuProps & WrappedComponentProps) => jsx.JSX.Element | null;
|
|
26
25
|
declare const _default: import("react").FC<import("react-intl-next").WithIntlProps<DragMenuProps & WrappedComponentProps<"intl">>> & {
|
|
27
26
|
WrappedComponent: import("react").ComponentType<DragMenuProps & WrappedComponentProps<"intl">>;
|
|
28
27
|
};
|
|
@@ -17,13 +17,12 @@ export interface Props {
|
|
|
17
17
|
index?: number;
|
|
18
18
|
targetCellPosition?: number;
|
|
19
19
|
getEditorContainerWidth: GetEditorContainerWidth;
|
|
20
|
-
canDrag?: boolean;
|
|
21
20
|
editorAnalyticsAPI?: EditorAnalyticsAPI;
|
|
22
21
|
stickyHeaders?: RowStickyState;
|
|
23
22
|
pluginConfig?: PluginConfig;
|
|
24
23
|
}
|
|
25
24
|
declare const FloatingDragMenu: {
|
|
26
|
-
({ mountPoint, boundariesElement, scrollableElement, editorView, isOpen, tableNode, direction, index, targetCellPosition, getEditorContainerWidth,
|
|
25
|
+
({ mountPoint, boundariesElement, scrollableElement, editorView, isOpen, tableNode, direction, index, targetCellPosition, getEditorContainerWidth, editorAnalyticsAPI, stickyHeaders, pluginConfig, }: Props): JSX.Element | null;
|
|
27
26
|
displayName: string;
|
|
28
27
|
};
|
|
29
28
|
export default FloatingDragMenu;
|
|
@@ -14,10 +14,9 @@ export interface ColumnControlsProps {
|
|
|
14
14
|
colWidths?: (number | undefined)[];
|
|
15
15
|
hasHeaderColumn?: boolean;
|
|
16
16
|
isTableHovered?: boolean;
|
|
17
|
-
canDrag?: boolean;
|
|
18
17
|
tableContainerWidth?: number;
|
|
19
18
|
isNumberColumnEnabled?: boolean;
|
|
20
19
|
isDragging?: boolean;
|
|
21
20
|
}
|
|
22
|
-
export declare const ColumnControls: ({ editorView, tableActive, tableRef, hoveredCell, isResizing, stickyTop, localId, isInDanger, rowHeights, colWidths, hasHeaderColumn, isTableHovered,
|
|
21
|
+
export declare const ColumnControls: ({ editorView, tableActive, tableRef, hoveredCell, isResizing, stickyTop, localId, isInDanger, rowHeights, colWidths, hasHeaderColumn, isTableHovered, tableContainerWidth, isNumberColumnEnabled, isDragging, }: ColumnControlsProps) => JSX.Element;
|
|
23
22
|
export default ColumnControls;
|
|
@@ -13,7 +13,6 @@ type DragControlsProps = {
|
|
|
13
13
|
isInDanger?: boolean;
|
|
14
14
|
isResizing?: boolean;
|
|
15
15
|
isTableHovered?: boolean;
|
|
16
|
-
canDrag?: boolean;
|
|
17
16
|
hoverRows: (rows: number[], danger?: boolean) => void;
|
|
18
17
|
selectRow: (row: number, expand: boolean) => void;
|
|
19
18
|
selectRows: (rowIndexes: number[]) => void;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
2
2
|
import type { TableDirection } from '../../types';
|
|
3
3
|
import type { DropTargetType } from './consts';
|
|
4
|
-
import type { DragAndDropPluginState } from './types';
|
|
5
4
|
export interface DragAndDropAction<T, D> {
|
|
6
5
|
type: T;
|
|
7
6
|
data: D;
|
|
@@ -10,7 +9,6 @@ export declare const DragAndDropActionType: {
|
|
|
10
9
|
readonly SET_DROP_TARGET: "SET_DROP_TARGET";
|
|
11
10
|
readonly CLEAR_DROP_TARGET: "CLEAR_DROP_TARGET";
|
|
12
11
|
readonly TOGGLE_DRAG_MENU: "TOGGLE_DRAG_MENU";
|
|
13
|
-
readonly UPDATE: "UPDATE";
|
|
14
12
|
};
|
|
15
13
|
export type DragAndDropSetDropTargetAction = DragAndDropAction<typeof DragAndDropActionType.SET_DROP_TARGET, {
|
|
16
14
|
type: DropTargetType;
|
|
@@ -25,5 +23,4 @@ export type DragAndDropToggleDragMenuAction = DragAndDropAction<typeof DragAndDr
|
|
|
25
23
|
direction: TableDirection;
|
|
26
24
|
index: number;
|
|
27
25
|
}>;
|
|
28
|
-
export type
|
|
29
|
-
export type DragAndDropPluginAction = DragAndDropSetDropTargetAction | DragAndDropClearDropTargetAction | DragAndDropToggleDragMenuAction | DragAndDropUpdateAction;
|
|
26
|
+
export type DragAndDropPluginAction = DragAndDropSetDropTargetAction | DragAndDropClearDropTargetAction | DragAndDropToggleDragMenuAction;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import type { Dispatch, EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
3
3
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
4
|
-
|
|
5
|
-
export declare const createPlugin: (dispatch: Dispatch, eventDispatcher: EventDispatcher, editorAnalyticsAPI?: EditorAnalyticsAPI) => SafePlugin<DragAndDropPluginState>;
|
|
4
|
+
export declare const createPlugin: (dispatch: Dispatch, eventDispatcher: EventDispatcher, editorAnalyticsAPI?: EditorAnalyticsAPI) => SafePlugin<import("./types").DragAndDropPluginState>;
|
|
@@ -17,7 +17,6 @@ type DragHandleProps = {
|
|
|
17
17
|
onMouseOut?: MouseEventHandler;
|
|
18
18
|
onMouseUp?: MouseEventHandler;
|
|
19
19
|
editorView: EditorView;
|
|
20
|
-
canDrag?: boolean;
|
|
21
20
|
isDragMenuTarget: boolean;
|
|
22
21
|
};
|
|
23
22
|
export declare const DragHandle: React.FC<import("react-intl-next").WithIntlProps<DragHandleProps & WrappedComponentProps<"intl">>> & {
|
|
@@ -19,10 +19,9 @@ type DragMenuProps = {
|
|
|
19
19
|
scrollableElement?: HTMLElement;
|
|
20
20
|
pluginConfig?: PluginConfig;
|
|
21
21
|
getEditorContainerWidth: GetEditorContainerWidth;
|
|
22
|
-
canDrag?: boolean;
|
|
23
22
|
editorAnalyticsAPI?: EditorAnalyticsAPI;
|
|
24
23
|
};
|
|
25
|
-
export declare const DragMenu: ({ direction, index, isOpen, editorView, tableNode, mountPoint, boundariesElement, scrollableElement, targetCellPosition, getEditorContainerWidth,
|
|
24
|
+
export declare const DragMenu: ({ direction, index, isOpen, editorView, tableNode, mountPoint, boundariesElement, scrollableElement, targetCellPosition, getEditorContainerWidth, editorAnalyticsAPI, pluginConfig, intl: { formatMessage }, }: DragMenuProps & WrappedComponentProps) => jsx.JSX.Element | null;
|
|
26
25
|
declare const _default: import("react").FC<import("react-intl-next").WithIntlProps<DragMenuProps & WrappedComponentProps<"intl">>> & {
|
|
27
26
|
WrappedComponent: import("react").ComponentType<DragMenuProps & WrappedComponentProps<"intl">>;
|
|
28
27
|
};
|