@atlaskit/editor-plugin-table 15.3.7 → 15.3.9
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 +16 -0
- package/dist/cjs/nodeviews/TableComponentLegacy.js +1 -1
- package/dist/cjs/nodeviews/TableComponentNext.js +1 -1
- package/dist/cjs/nodeviews/table.js +2 -5
- package/dist/cjs/ui/FloatingContextualMenu/ContextualMenu.js +33 -36
- package/dist/cjs/ui/FloatingDeleteButton/DeleteButton.js +31 -35
- package/dist/cjs/ui/TableFloatingColumnControls/ColumnControls/index.js +43 -47
- package/dist/cjs/ui/TableFloatingControls/NumberColumn/index.js +1 -4
- package/dist/cjs/ui/TableFloatingControls/RowControls/DragControls.js +61 -65
- package/dist/cjs/ui/common-styles.js +2 -2
- package/dist/es2019/nodeviews/TableComponentLegacy.js +1 -1
- package/dist/es2019/nodeviews/TableComponentNext.js +1 -1
- package/dist/es2019/nodeviews/table.js +2 -5
- package/dist/es2019/ui/FloatingContextualMenu/ContextualMenu.js +1 -3
- package/dist/es2019/ui/FloatingDeleteButton/DeleteButton.js +1 -4
- package/dist/es2019/ui/TableFloatingColumnControls/ColumnControls/index.js +45 -49
- package/dist/es2019/ui/TableFloatingControls/NumberColumn/index.js +1 -4
- package/dist/es2019/ui/TableFloatingControls/RowControls/DragControls.js +61 -65
- package/dist/es2019/ui/common-styles.js +6 -8
- package/dist/esm/nodeviews/TableComponentLegacy.js +1 -1
- package/dist/esm/nodeviews/TableComponentNext.js +1 -1
- package/dist/esm/nodeviews/table.js +2 -5
- package/dist/esm/ui/FloatingContextualMenu/ContextualMenu.js +33 -36
- package/dist/esm/ui/FloatingDeleteButton/DeleteButton.js +31 -35
- package/dist/esm/ui/TableFloatingColumnControls/ColumnControls/index.js +43 -47
- package/dist/esm/ui/TableFloatingControls/NumberColumn/index.js +1 -4
- package/dist/esm/ui/TableFloatingControls/RowControls/DragControls.js +61 -65
- package/dist/esm/ui/common-styles.js +2 -2
- package/package.json +7 -16
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-table
|
|
2
2
|
|
|
3
|
+
## 15.3.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`b504b21832b1f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b504b21832b1f) -
|
|
8
|
+
Removed feature gate platform_editor_table_overflow_in_full_width_fix
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 15.3.8
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`ca5c3cd4d655b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ca5c3cd4d655b) -
|
|
16
|
+
Clean up FG platform_editor_table_column_selected_state_fix
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 15.3.7
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -675,7 +675,7 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
675
675
|
var containerWidthValue = containerWidth.width,
|
|
676
676
|
containerLineLength = containerWidth.lineLength;
|
|
677
677
|
var isLineLengthChanged = ((_this$containerWidth = this.containerWidth) === null || _this$containerWidth === void 0 ? void 0 : _this$containerWidth.lineLength) !== containerLineLength;
|
|
678
|
-
var isFullWidthModeAndLineLengthChanged = this.updateColGroupFromFullWidthChange && isLineLengthChanged
|
|
678
|
+
var isFullWidthModeAndLineLengthChanged = this.updateColGroupFromFullWidthChange && isLineLengthChanged;
|
|
679
679
|
var maybeScale = isTableSquashed || isTableWidthChanged || isTableResizedFullWidth && !(options !== null && options !== void 0 && options.isCommentEditor) || isNumberColumnChanged || isNumberOfColumnsChanged || this.state.windowResized;
|
|
680
680
|
if (force || maybeScale || isFullWidthModeAndLineLengthChanged) {
|
|
681
681
|
var _this$containerWidth2, _this$props$options3, _this$props$options4, _this$props$options5;
|
|
@@ -609,7 +609,7 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
609
609
|
var containerWidthValue = containerWidth.width,
|
|
610
610
|
containerLineLength = containerWidth.lineLength;
|
|
611
611
|
var isLineLengthChanged = ((_this$containerWidth = this.containerWidth) === null || _this$containerWidth === void 0 ? void 0 : _this$containerWidth.lineLength) !== containerLineLength;
|
|
612
|
-
var isFullWidthModeAndLineLengthChanged = this.updateColGroupFromFullWidthChange && isLineLengthChanged
|
|
612
|
+
var isFullWidthModeAndLineLengthChanged = this.updateColGroupFromFullWidthChange && isLineLengthChanged;
|
|
613
613
|
var maybeScale = isTableSquashed || isTableWidthChanged || isTableResizedFullWidth && !(options !== null && options !== void 0 && options.isCommentEditor) || isNumberColumnChanged || isNumberOfColumnsChanged || this.state.windowResized;
|
|
614
614
|
if (force || maybeScale || isFullWidthModeAndLineLengthChanged) {
|
|
615
615
|
var _this$containerWidth2, _this$props$options3, _this$props$options4, _this$props$options5;
|
|
@@ -19,7 +19,6 @@ var _reactNodeView = _interopRequireDefault(require("@atlaskit/editor-common/rea
|
|
|
19
19
|
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
20
20
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
21
21
|
var _tableMap = require("@atlaskit/editor-tables/table-map");
|
|
22
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
23
22
|
var _createPluginConfig = require("../pm-plugins/create-plugin-config");
|
|
24
23
|
var _pluginFactory = require("../pm-plugins/plugin-factory");
|
|
25
24
|
var _tableWidth = require("../pm-plugins/table-width");
|
|
@@ -294,8 +293,6 @@ var createTableView = exports.createTableView = function createTableView(node, v
|
|
|
294
293
|
var _pluginInjectionApi$t;
|
|
295
294
|
var _getPluginState2 = (0, _pluginFactory.getPluginState)(view.state),
|
|
296
295
|
pluginConfig = _getPluginState2.pluginConfig,
|
|
297
|
-
isFullWidthModeEnabled = _getPluginState2.isFullWidthModeEnabled,
|
|
298
|
-
wasFullWidthModeEnabled = _getPluginState2.wasFullWidthModeEnabled,
|
|
299
296
|
isDragAndDropEnabled = _getPluginState2.isDragAndDropEnabled,
|
|
300
297
|
isTableScalingEnabled = _getPluginState2.isTableScalingEnabled;
|
|
301
298
|
|
|
@@ -319,8 +316,8 @@ var createTableView = exports.createTableView = function createTableView(node, v
|
|
|
319
316
|
eventDispatcher: eventDispatcher,
|
|
320
317
|
getPos: getPos,
|
|
321
318
|
options: {
|
|
322
|
-
isFullWidthModeEnabled:
|
|
323
|
-
wasFullWidthModeEnabled:
|
|
319
|
+
isFullWidthModeEnabled: tableState === null || tableState === void 0 ? void 0 : tableState.isFullWidthModeEnabled,
|
|
320
|
+
wasFullWidthModeEnabled: tableState === null || tableState === void 0 ? void 0 : tableState.wasFullWidthModeEnabled,
|
|
324
321
|
isDragAndDropEnabled: isDragAndDropEnabled,
|
|
325
322
|
isTableScalingEnabled: isTableScalingEnabled,
|
|
326
323
|
// same as options.isTableScalingEnabled
|
|
@@ -766,42 +766,39 @@ var ContextualMenu = exports.ContextualMenu = /*#__PURE__*/function (_Component)
|
|
|
766
766
|
var isOpenAllowed = false;
|
|
767
767
|
isOpenAllowed = isCellMenuOpenByKeyboard ? this.state.isOpenAllowed : isOpen;
|
|
768
768
|
var popupContent = function popupContent() {
|
|
769
|
-
return (
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
,
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
allowEnterDefaultBehavior: _this2.state.isSubmenuOpen
|
|
803
|
-
}))
|
|
804
|
-
);
|
|
769
|
+
return (0, _react2.jsx)("div", {
|
|
770
|
+
"data-testid": "table-cell-contextual-menu"
|
|
771
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
772
|
+
,
|
|
773
|
+
onMouseLeave: _this2.closeSubmenu,
|
|
774
|
+
ref: _this2.dropdownMenuRef
|
|
775
|
+
}, (0, _react2.jsx)(_uiMenu.DropdownMenu, {
|
|
776
|
+
mountTo: (0, _platformFeatureFlags.fg)('platform_editor_fix_table_menus_jira') ? undefined : mountPoint
|
|
777
|
+
//This needs be removed when the a11y is completely handled
|
|
778
|
+
//Disabling key navigation now as it works only partially
|
|
779
|
+
,
|
|
780
|
+
arrowKeyNavigationProviderOptions: {
|
|
781
|
+
type: _uiMenu.ArrowKeyNavigationType.MENU,
|
|
782
|
+
disableArrowKeyNavigation: !isCellMenuOpenByKeyboard || _this2.state.isSubmenuOpen
|
|
783
|
+
},
|
|
784
|
+
items: items,
|
|
785
|
+
isOpen: isOpenAllowed,
|
|
786
|
+
onOpenChange: _this2.handleOpenChange,
|
|
787
|
+
onItemActivated: _this2.onMenuItemActivated,
|
|
788
|
+
onMouseEnter: _this2.handleItemMouseEnter,
|
|
789
|
+
onMouseLeave: _this2.handleItemMouseLeave,
|
|
790
|
+
fitHeight: 188,
|
|
791
|
+
fitWidth: isDragAndDropEnabled ? _consts.contextualMenuDropdownWidthDnD : _consts.contextualMenuDropdownWidth,
|
|
792
|
+
shouldFocusFirstItem: function shouldFocusFirstItem() {
|
|
793
|
+
return Boolean(isCellMenuOpenByKeyboard);
|
|
794
|
+
},
|
|
795
|
+
boundariesElement: boundariesElement,
|
|
796
|
+
offset: offset,
|
|
797
|
+
section: isDragAndDropEnabled ? {
|
|
798
|
+
hasSeparator: true
|
|
799
|
+
} : undefined,
|
|
800
|
+
allowEnterDefaultBehavior: _this2.state.isSubmenuOpen
|
|
801
|
+
}));
|
|
805
802
|
};
|
|
806
803
|
if ((0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_lovability_user_intent', 'isEnabled', true)) {
|
|
807
804
|
return (0, _react2.jsx)(_userIntent.UserIntentPopupWrapper, {
|
|
@@ -15,40 +15,36 @@ var DeleteButton = function DeleteButton(_ref) {
|
|
|
15
15
|
onMouseLeave = _ref.onMouseLeave,
|
|
16
16
|
removeLabel = _ref.removeLabel,
|
|
17
17
|
formatMessage = _ref.intl.formatMessage;
|
|
18
|
-
return (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
fill: "currentColor",
|
|
50
|
-
fillRule: "evenodd"
|
|
51
|
-
}))))
|
|
52
|
-
);
|
|
18
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
19
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
20
|
+
className: _types.TableCssClassName.CONTROLS_DELETE_BUTTON_WRAP
|
|
21
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
22
|
+
,
|
|
23
|
+
style: style
|
|
24
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
25
|
+
,
|
|
26
|
+
onMouseEnter: onMouseEnter
|
|
27
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
28
|
+
,
|
|
29
|
+
onMouseLeave: onMouseLeave
|
|
30
|
+
}, /*#__PURE__*/_react.default.createElement("button", {
|
|
31
|
+
type: "button",
|
|
32
|
+
"aria-label": formatMessage(removeLabel, {
|
|
33
|
+
0: 1
|
|
34
|
+
})
|
|
35
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
36
|
+
,
|
|
37
|
+
className: _types.TableCssClassName.CONTROLS_DELETE_BUTTON,
|
|
38
|
+
onMouseDown: onClick,
|
|
39
|
+
onMouseMove: function onMouseMove(e) {
|
|
40
|
+
return e.preventDefault();
|
|
41
|
+
}
|
|
42
|
+
}, /*#__PURE__*/_react.default.createElement("svg", {
|
|
43
|
+
className: _types.TableCssClassName.CONTROLS_BUTTON_ICON
|
|
44
|
+
}, /*#__PURE__*/_react.default.createElement("path", {
|
|
45
|
+
d: "M12.242 10.828L9.414 8l2.828-2.829a.999.999 0 1 0-1.414-1.414L8 6.587l-2.829-2.83a1 1 0 0 0-1.414 1.414l2.83 2.83-2.83 2.827a1 1 0 0 0 1.414 1.414l2.83-2.828 2.827 2.828a.999.999 0 1 0 1.414-1.414",
|
|
46
|
+
fill: "currentColor",
|
|
47
|
+
fillRule: "evenodd"
|
|
48
|
+
}))));
|
|
53
49
|
};
|
|
54
50
|
var _default = exports.default = (0, _reactIntlNext.injectIntl)(DeleteButton);
|
|
@@ -215,55 +215,51 @@ var ColumnControls = exports.ColumnControls = function ColumnControls(_ref) {
|
|
|
215
215
|
return handles;
|
|
216
216
|
};
|
|
217
217
|
var containerWidth = isNumberColumnEnabled && tableContainerWidth ? tableContainerWidth - _editorSharedStyles.akEditorTableNumberColumnWidth : tableContainerWidth;
|
|
218
|
-
return (
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
218
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
219
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
220
|
+
className: _types.TableCssClassName.DRAG_COLUMN_CONTROLS,
|
|
221
|
+
onMouseMove: handleMouseMove
|
|
222
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
223
|
+
ref: columnControlsRef
|
|
224
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
225
|
+
,
|
|
226
|
+
className: _types.TableCssClassName.DRAG_COLUMN_CONTROLS_INNER,
|
|
227
|
+
"data-testid": "table-floating-column-controls",
|
|
228
|
+
style: {
|
|
229
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
230
|
+
gridTemplateColumns: widths,
|
|
231
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
232
|
+
marginTop: marginTop,
|
|
233
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
234
|
+
width: stickyTop ? containerWidth : undefined,
|
|
235
|
+
overflowX: stickyTop ? 'hidden' : 'visible',
|
|
236
|
+
pointerEvents: isDragging ? 'none' : undefined
|
|
237
|
+
}
|
|
238
|
+
}, columnParams.map(function (_ref2, index) {
|
|
239
|
+
var startIndex = _ref2.startIndex,
|
|
240
|
+
endIndex = _ref2.endIndex;
|
|
241
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
242
|
+
style: {
|
|
243
|
+
gridColumn: "".concat(startIndex + 1, " / span 1")
|
|
244
|
+
},
|
|
245
|
+
"data-start-index": startIndex,
|
|
246
|
+
"data-end-index": endIndex
|
|
222
247
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
223
|
-
|
|
224
|
-
|
|
248
|
+
,
|
|
249
|
+
className: _types.TableCssClassName.DRAG_COLUMN_FLOATING_INSERT_DOT_WRAPPER,
|
|
250
|
+
contentEditable: false
|
|
251
|
+
// Ignored via go/ees005
|
|
252
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
253
|
+
,
|
|
254
|
+
key: index
|
|
225
255
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
226
|
-
ref: columnControlsRef
|
|
227
256
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
257
|
+
className: _types.TableCssClassName.DRAG_COLUMN_FLOATING_INSERT_DOT
|
|
258
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
228
259
|
,
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
235
|
-
marginTop: marginTop,
|
|
236
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
237
|
-
width: stickyTop ? containerWidth : undefined,
|
|
238
|
-
overflowX: stickyTop ? 'hidden' : 'visible',
|
|
239
|
-
pointerEvents: isDragging ? 'none' : undefined
|
|
240
|
-
}
|
|
241
|
-
}, columnParams.map(function (_ref2, index) {
|
|
242
|
-
var startIndex = _ref2.startIndex,
|
|
243
|
-
endIndex = _ref2.endIndex;
|
|
244
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
245
|
-
style: {
|
|
246
|
-
gridColumn: "".concat(startIndex + 1, " / span 1")
|
|
247
|
-
},
|
|
248
|
-
"data-start-index": startIndex,
|
|
249
|
-
"data-end-index": endIndex
|
|
250
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
251
|
-
,
|
|
252
|
-
className: _types.TableCssClassName.DRAG_COLUMN_FLOATING_INSERT_DOT_WRAPPER,
|
|
253
|
-
contentEditable: false
|
|
254
|
-
// Ignored via go/ees005
|
|
255
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
256
|
-
,
|
|
257
|
-
key: index
|
|
258
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
259
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
260
|
-
className: _types.TableCssClassName.DRAG_COLUMN_FLOATING_INSERT_DOT
|
|
261
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
262
|
-
,
|
|
263
|
-
style: columnParams.length - 1 === index ? {
|
|
264
|
-
right: '0'
|
|
265
|
-
} : {}
|
|
266
|
-
}));
|
|
267
|
-
}), columnHandles()))
|
|
268
|
-
);
|
|
260
|
+
style: columnParams.length - 1 === index ? {
|
|
261
|
+
right: '0'
|
|
262
|
+
} : {}
|
|
263
|
+
}));
|
|
264
|
+
}), columnHandles()));
|
|
269
265
|
};
|
|
@@ -140,10 +140,7 @@ var NumberColumn = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
140
140
|
},
|
|
141
141
|
contentEditable: false
|
|
142
142
|
}, rowHeights.map(function (rowHeight, index) {
|
|
143
|
-
return isDragAndDropEnabled ?
|
|
144
|
-
/*#__PURE__*/
|
|
145
|
-
// eslint-disable-next-line @atlassian/a11y/no-static-element-interactions
|
|
146
|
-
_react.default.createElement("div", {
|
|
143
|
+
return isDragAndDropEnabled ? /*#__PURE__*/_react.default.createElement("div", {
|
|
147
144
|
// Ignored via go/ees005
|
|
148
145
|
// eslint-disable-next-line react/no-array-index-key
|
|
149
146
|
key: "wrapper-".concat(index)
|
|
@@ -201,73 +201,69 @@ var DragControls = exports.DragControls = function DragControls(_ref) {
|
|
|
201
201
|
if (isResizing) {
|
|
202
202
|
return null;
|
|
203
203
|
}
|
|
204
|
-
return (
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
,
|
|
239
|
-
className: _types.TableCssClassName.DRAG_ROW_FLOATING_INSERT_DOT_WRAPPER,
|
|
240
|
-
contentEditable: false
|
|
241
|
-
// Ignored via go/ees005
|
|
242
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
243
|
-
,
|
|
244
|
-
key: "insert-dot-".concat(index)
|
|
245
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
246
|
-
className: _types.TableCssClassName.DRAG_ROW_FLOATING_INSERT_DOT
|
|
247
|
-
})), isDragging && /*#__PURE__*/_react.default.createElement(_RowDropTarget.default
|
|
204
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
205
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
206
|
+
className: _types.TableCssClassName.DRAG_ROW_CONTROLS,
|
|
207
|
+
style: {
|
|
208
|
+
gridTemplateRows: heights,
|
|
209
|
+
gridTemplateColumns: isDragging ? // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
210
|
+
"".concat(_consts.dropTargetExtendedWidth, "px 14px ").concat(tableWidth, "px") : '0px 14px 0px',
|
|
211
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
212
|
+
left: isDragging ? // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
213
|
+
"-".concat(_consts.dropTargetExtendedWidth + 2, "px") : "var(--ds-space-negative-025, -2px)"
|
|
214
|
+
},
|
|
215
|
+
onMouseMove: handleMouseMove,
|
|
216
|
+
contentEditable: false
|
|
217
|
+
}, rowsParams.map(function (_ref4, index) {
|
|
218
|
+
var startIndex = _ref4.startIndex,
|
|
219
|
+
endIndex = _ref4.endIndex;
|
|
220
|
+
return (
|
|
221
|
+
/*#__PURE__*/
|
|
222
|
+
// Ignored via go/ees005
|
|
223
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
224
|
+
_react.default.createElement(_react.Fragment, {
|
|
225
|
+
key: index
|
|
226
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
227
|
+
style: {
|
|
228
|
+
gridRow: "".concat(index + 1, " / span 1"),
|
|
229
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
230
|
+
gridColumn: '2'
|
|
231
|
+
},
|
|
232
|
+
"data-start-index": startIndex,
|
|
233
|
+
"data-end-index": endIndex
|
|
234
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
235
|
+
,
|
|
236
|
+
className: _types.TableCssClassName.DRAG_ROW_FLOATING_INSERT_DOT_WRAPPER,
|
|
237
|
+
contentEditable: false
|
|
248
238
|
// Ignored via go/ees005
|
|
249
239
|
// eslint-disable-next-line react/no-array-index-key
|
|
250
|
-
,
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
240
|
+
,
|
|
241
|
+
key: "insert-dot-".concat(index)
|
|
242
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
243
|
+
className: _types.TableCssClassName.DRAG_ROW_FLOATING_INSERT_DOT
|
|
244
|
+
})), isDragging && /*#__PURE__*/_react.default.createElement(_RowDropTarget.default
|
|
245
|
+
// Ignored via go/ees005
|
|
246
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
247
|
+
, {
|
|
248
|
+
key: "drop-target-".concat(index),
|
|
249
|
+
index: index,
|
|
250
|
+
localId: currentNodeLocalId,
|
|
251
|
+
style: {
|
|
252
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
253
|
+
gridColumn: '1 / span 3',
|
|
254
|
+
gridRow: "".concat(index + 1, " / span 1"),
|
|
255
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
256
|
+
height: '100%',
|
|
257
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
258
|
+
pointerEvents: 'auto',
|
|
259
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
260
|
+
position: 'relative',
|
|
261
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
262
|
+
left: "var(--ds-space-negative-100, -8px)"
|
|
263
|
+
}
|
|
264
|
+
}))
|
|
265
|
+
);
|
|
266
|
+
}), rowHandles());
|
|
271
267
|
};
|
|
272
268
|
var DragControlsWithSelection = exports.DragControlsWithSelection = function DragControlsWithSelection(_ref5) {
|
|
273
269
|
var editorView = _ref5.editorView,
|