@atlaskit/editor-plugin-table 15.3.8 → 15.3.10

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 (35) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/cjs/nodeviews/TableComponentLegacy.js +1 -1
  3. package/dist/cjs/nodeviews/TableComponentNext.js +1 -1
  4. package/dist/cjs/nodeviews/table.js +2 -5
  5. package/dist/cjs/pm-plugins/main.js +1 -1
  6. package/dist/cjs/pm-plugins/utils/paste.js +2 -2
  7. package/dist/cjs/ui/FloatingContextualMenu/ContextualMenu.js +33 -36
  8. package/dist/cjs/ui/FloatingDeleteButton/DeleteButton.js +31 -35
  9. package/dist/cjs/ui/TableFloatingColumnControls/ColumnControls/index.js +43 -47
  10. package/dist/cjs/ui/TableFloatingControls/NumberColumn/index.js +1 -4
  11. package/dist/cjs/ui/TableFloatingControls/RowControls/DragControls.js +61 -65
  12. package/dist/cjs/ui/common-styles.js +1 -1
  13. package/dist/es2019/nodeviews/TableComponentLegacy.js +1 -1
  14. package/dist/es2019/nodeviews/TableComponentNext.js +1 -1
  15. package/dist/es2019/nodeviews/table.js +2 -5
  16. package/dist/es2019/pm-plugins/main.js +1 -1
  17. package/dist/es2019/pm-plugins/utils/paste.js +2 -2
  18. package/dist/es2019/ui/FloatingContextualMenu/ContextualMenu.js +1 -3
  19. package/dist/es2019/ui/FloatingDeleteButton/DeleteButton.js +1 -4
  20. package/dist/es2019/ui/TableFloatingColumnControls/ColumnControls/index.js +45 -49
  21. package/dist/es2019/ui/TableFloatingControls/NumberColumn/index.js +1 -4
  22. package/dist/es2019/ui/TableFloatingControls/RowControls/DragControls.js +61 -65
  23. package/dist/es2019/ui/common-styles.js +1 -2
  24. package/dist/esm/nodeviews/TableComponentLegacy.js +1 -1
  25. package/dist/esm/nodeviews/TableComponentNext.js +1 -1
  26. package/dist/esm/nodeviews/table.js +2 -5
  27. package/dist/esm/pm-plugins/main.js +1 -1
  28. package/dist/esm/pm-plugins/utils/paste.js +2 -2
  29. package/dist/esm/ui/FloatingContextualMenu/ContextualMenu.js +33 -36
  30. package/dist/esm/ui/FloatingDeleteButton/DeleteButton.js +31 -35
  31. package/dist/esm/ui/TableFloatingColumnControls/ColumnControls/index.js +43 -47
  32. package/dist/esm/ui/TableFloatingControls/NumberColumn/index.js +1 -4
  33. package/dist/esm/ui/TableFloatingControls/RowControls/DragControls.js +61 -65
  34. package/dist/esm/ui/common-styles.js +1 -1
  35. package/package.json +4 -16
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @atlaskit/editor-plugin-table
2
2
 
3
+ ## 15.3.10
4
+
5
+ ### Patch Changes
6
+
7
+ - [`b31ba91cf1c16`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b31ba91cf1c16) -
8
+ Remove platform_editor_table_paste_in_dark_mode feature gate and enable dark mode table paste fix
9
+ permanently
10
+
11
+ ## 15.3.9
12
+
13
+ ### Patch Changes
14
+
15
+ - [`b504b21832b1f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b504b21832b1f) -
16
+ Removed feature gate platform_editor_table_overflow_in_full_width_fix
17
+ - Updated dependencies
18
+
3
19
  ## 15.3.8
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 && (0, _platformFeatureFlags.fg)('platform_editor_table_overflow_in_full_width_fix');
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 && (0, _platformFeatureFlags.fg)('platform_editor_table_overflow_in_full_width_fix');
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: (0, _platformFeatureFlags.fg)('platform_editor_table_overflow_in_full_width_fix') ? tableState === null || tableState === void 0 ? void 0 : tableState.isFullWidthModeEnabled : isFullWidthModeEnabled,
323
- wasFullWidthModeEnabled: (0, _platformFeatureFlags.fg)('platform_editor_table_overflow_in_full_width_fix') ? tableState === null || tableState === void 0 ? void 0 : tableState.wasFullWidthModeEnabled : 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
@@ -241,7 +241,7 @@ var createPlugin = exports.createPlugin = function createPlugin(dispatchAnalytic
241
241
  // from the paste slice
242
242
  if (!pluginConfig.allowBackgroundColor) {
243
243
  slice = (0, _misc.transformSliceRemoveCellBackgroundColor)(slice, schema);
244
- } else if ((0, _platformFeatureFlags.fg)('platform_editor_table_paste_in_dark_mode')) {
244
+ } else {
245
245
  slice = (0, _misc.transformSliceToFixDarkModeDefaultBackgroundColor)(slice, schema);
246
246
  }
247
247
  slice = (0, _transforms.transformSliceToRemoveOpenNestedExpand)(slice, schema);
@@ -116,7 +116,7 @@ var transformSliceToRemoveNestedTables = exports.transformSliceToRemoveNestedTab
116
116
 
117
117
  // paste of table cells into a table cell - content is spread across multiple cells
118
118
  // by editor-tables so needs to be treated a little differently
119
- if (isCellPaste || isCellSelection && (0, _platformFeatureFlags.fg)('platform_editor_nested_tables_cellselection_paste')) {
119
+ if (isCellPaste || isCellSelection) {
120
120
  allowedTableNesting = 1;
121
121
  if (isPasteInNestedTable) {
122
122
  allowedTableNesting = 0;
@@ -142,7 +142,7 @@ var transformSliceToRemoveNestedTables = exports.transformSliceToRemoveNestedTab
142
142
  allowedTableNesting = 0;
143
143
  }
144
144
  }
145
- if (isCellSelection && !isCellPaste && (0, _platformFeatureFlags.fg)('platform_editor_nested_tables_cellselection_paste')) {
145
+ if (isCellSelection && !isCellPaste) {
146
146
  // if pasting into a cell selection, we need to flatten the parent table as well
147
147
  return _unwrapNestedTables(_model.Fragment.fromArray([node]), schema, allowedTableNesting);
148
148
  } else {
@@ -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
- // eslint-disable-next-line @atlassian/a11y/no-static-element-interactions
771
- (0, _react2.jsx)("div", {
772
- "data-testid": "table-cell-contextual-menu"
773
- // eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
774
- ,
775
- onMouseLeave: _this2.closeSubmenu,
776
- ref: _this2.dropdownMenuRef
777
- }, (0, _react2.jsx)(_uiMenu.DropdownMenu, {
778
- mountTo: (0, _platformFeatureFlags.fg)('platform_editor_fix_table_menus_jira') ? undefined : mountPoint
779
- //This needs be removed when the a11y is completely handled
780
- //Disabling key navigation now as it works only partially
781
- ,
782
- arrowKeyNavigationProviderOptions: {
783
- type: _uiMenu.ArrowKeyNavigationType.MENU,
784
- disableArrowKeyNavigation: !isCellMenuOpenByKeyboard || _this2.state.isSubmenuOpen
785
- },
786
- items: items,
787
- isOpen: isOpenAllowed,
788
- onOpenChange: _this2.handleOpenChange,
789
- onItemActivated: _this2.onMenuItemActivated,
790
- onMouseEnter: _this2.handleItemMouseEnter,
791
- onMouseLeave: _this2.handleItemMouseLeave,
792
- fitHeight: 188,
793
- fitWidth: isDragAndDropEnabled ? _consts.contextualMenuDropdownWidthDnD : _consts.contextualMenuDropdownWidth,
794
- shouldFocusFirstItem: function shouldFocusFirstItem() {
795
- return Boolean(isCellMenuOpenByKeyboard);
796
- },
797
- boundariesElement: boundariesElement,
798
- offset: offset,
799
- section: isDragAndDropEnabled ? {
800
- hasSeparator: true
801
- } : undefined,
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
- /*#__PURE__*/
20
- // eslint-disable-next-line @atlassian/a11y/no-static-element-interactions
21
- _react.default.createElement("div", {
22
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
23
- className: _types.TableCssClassName.CONTROLS_DELETE_BUTTON_WRAP
24
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
25
- ,
26
- style: style
27
- // eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
28
- ,
29
- onMouseEnter: onMouseEnter
30
- // eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
31
- ,
32
- onMouseLeave: onMouseLeave
33
- }, /*#__PURE__*/_react.default.createElement("button", {
34
- type: "button",
35
- "aria-label": formatMessage(removeLabel, {
36
- 0: 1
37
- })
38
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
39
- ,
40
- className: _types.TableCssClassName.CONTROLS_DELETE_BUTTON,
41
- onMouseDown: onClick,
42
- onMouseMove: function onMouseMove(e) {
43
- return e.preventDefault();
44
- }
45
- }, /*#__PURE__*/_react.default.createElement("svg", {
46
- className: _types.TableCssClassName.CONTROLS_BUTTON_ICON
47
- }, /*#__PURE__*/_react.default.createElement("path", {
48
- 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",
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
- /*#__PURE__*/
220
- // eslint-disable-next-line @atlassian/a11y/no-static-element-interactions
221
- _react.default.createElement("div", {
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
- className: _types.TableCssClassName.DRAG_COLUMN_CONTROLS,
224
- onMouseMove: handleMouseMove
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
- className: _types.TableCssClassName.DRAG_COLUMN_CONTROLS_INNER,
230
- "data-testid": "table-floating-column-controls",
231
- style: {
232
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
233
- gridTemplateColumns: widths,
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
- /*#__PURE__*/
206
- // eslint-disable-next-line @atlassian/a11y/no-static-element-interactions
207
- _react.default.createElement("div", {
208
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
209
- className: _types.TableCssClassName.DRAG_ROW_CONTROLS,
210
- style: {
211
- gridTemplateRows: heights,
212
- gridTemplateColumns: isDragging ? // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
213
- "".concat(_consts.dropTargetExtendedWidth, "px 14px ").concat(tableWidth, "px") : '0px 14px 0px',
214
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
215
- left: isDragging ? // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
216
- "-".concat(_consts.dropTargetExtendedWidth + 2, "px") : "var(--ds-space-negative-025, -2px)"
217
- },
218
- onMouseMove: handleMouseMove,
219
- contentEditable: false
220
- }, rowsParams.map(function (_ref4, index) {
221
- var startIndex = _ref4.startIndex,
222
- endIndex = _ref4.endIndex;
223
- return (
224
- /*#__PURE__*/
225
- // Ignored via go/ees005
226
- // eslint-disable-next-line react/no-array-index-key
227
- _react.default.createElement(_react.Fragment, {
228
- key: index
229
- }, /*#__PURE__*/_react.default.createElement("div", {
230
- style: {
231
- gridRow: "".concat(index + 1, " / span 1"),
232
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
233
- gridColumn: '2'
234
- },
235
- "data-start-index": startIndex,
236
- "data-end-index": endIndex
237
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
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
- key: "drop-target-".concat(index),
252
- index: index,
253
- localId: currentNodeLocalId,
254
- style: {
255
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
256
- gridColumn: '1 / span 3',
257
- gridRow: "".concat(index + 1, " / span 1"),
258
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
259
- height: '100%',
260
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
261
- pointerEvents: 'auto',
262
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
263
- position: 'relative',
264
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
265
- left: "var(--ds-space-negative-100, -8px)"
266
- }
267
- }))
268
- );
269
- }), rowHandles())
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,