@atlaskit/editor-plugin-table 28.0.4 → 28.0.6

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 (43) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/cjs/nodeviews/TableContainer.js +105 -13
  3. package/dist/cjs/ui/DragHandle/index.js +6 -12
  4. package/dist/cjs/ui/TableMenu/column/items/MoveColumnLeftItem.js +1 -4
  5. package/dist/cjs/ui/TableMenu/column/items/MoveColumnRightItem.js +1 -4
  6. package/dist/cjs/ui/TableMenu/column/items/SortDecreasingItem.compiled.css +1 -2
  7. package/dist/cjs/ui/TableMenu/column/items/SortDecreasingItem.js +1 -6
  8. package/dist/cjs/ui/TableMenu/column/items/SortIncreasingItem.compiled.css +1 -2
  9. package/dist/cjs/ui/TableMenu/column/items/SortIncreasingItem.js +1 -6
  10. package/dist/cjs/ui/TableMenu/row/items/MoveRowDownItem.js +1 -4
  11. package/dist/cjs/ui/TableMenu/row/items/MoveRowUpItem.js +1 -4
  12. package/dist/cjs/ui/common-styles.js +2 -4
  13. package/dist/cjs/ui/hooks/useIsTableInLimitedMode.js +20 -0
  14. package/dist/es2019/nodeviews/TableContainer.js +90 -1
  15. package/dist/es2019/ui/DragHandle/index.js +6 -13
  16. package/dist/es2019/ui/TableMenu/column/items/MoveColumnLeftItem.js +1 -4
  17. package/dist/es2019/ui/TableMenu/column/items/MoveColumnRightItem.js +1 -4
  18. package/dist/es2019/ui/TableMenu/column/items/SortDecreasingItem.compiled.css +1 -2
  19. package/dist/es2019/ui/TableMenu/column/items/SortDecreasingItem.js +1 -6
  20. package/dist/es2019/ui/TableMenu/column/items/SortIncreasingItem.compiled.css +1 -2
  21. package/dist/es2019/ui/TableMenu/column/items/SortIncreasingItem.js +1 -6
  22. package/dist/es2019/ui/TableMenu/row/items/MoveRowDownItem.js +1 -4
  23. package/dist/es2019/ui/TableMenu/row/items/MoveRowUpItem.js +1 -4
  24. package/dist/es2019/ui/common-styles.js +8 -6
  25. package/dist/es2019/ui/hooks/useIsTableInLimitedMode.js +14 -0
  26. package/dist/esm/nodeviews/TableContainer.js +106 -14
  27. package/dist/esm/ui/DragHandle/index.js +6 -12
  28. package/dist/esm/ui/TableMenu/column/items/MoveColumnLeftItem.js +1 -4
  29. package/dist/esm/ui/TableMenu/column/items/MoveColumnRightItem.js +1 -4
  30. package/dist/esm/ui/TableMenu/column/items/SortDecreasingItem.compiled.css +1 -2
  31. package/dist/esm/ui/TableMenu/column/items/SortDecreasingItem.js +1 -6
  32. package/dist/esm/ui/TableMenu/column/items/SortIncreasingItem.compiled.css +1 -2
  33. package/dist/esm/ui/TableMenu/column/items/SortIncreasingItem.js +1 -6
  34. package/dist/esm/ui/TableMenu/row/items/MoveRowDownItem.js +1 -4
  35. package/dist/esm/ui/TableMenu/row/items/MoveRowUpItem.js +1 -4
  36. package/dist/esm/ui/common-styles.js +2 -4
  37. package/dist/esm/ui/hooks/useIsTableInLimitedMode.js +14 -0
  38. package/dist/types/ui/hooks/useIsTableInLimitedMode.d.ts +8 -0
  39. package/package.json +4 -7
  40. package/dist/cjs/pm-plugins/utils/limited-mode.js +0 -21
  41. package/dist/es2019/pm-plugins/utils/limited-mode.js +0 -14
  42. package/dist/esm/pm-plugins/utils/limited-mode.js +0 -16
  43. package/dist/types/pm-plugins/utils/limited-mode.d.ts +0 -12
package/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # @atlaskit/editor-plugin-table
2
2
 
3
+ ## 28.0.6
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 28.0.5
10
+
11
+ ### Patch Changes
12
+
13
+ - [`76a10b0cda613`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/76a10b0cda613) -
14
+ Remove the `platform_editor_table_menu_updates_patch_2` experiment and permanently apply its
15
+ rolled-out table menu treatment.
16
+ - [`854ce1f630037`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/854ce1f630037) -
17
+ Cleanup experiment platform_editor_col_insert_patch_1 and retain the numbered sticky-table mask
18
+ adjustment.
19
+ - [`2bcdac2d8a382`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2bcdac2d8a382) -
20
+ [EDITOR-8301] Disable table width resizing while limited mode is active, behind the
21
+ platform_editor_table_limited_mode experiment (the same gate that disables table row and column
22
+ dragging). Tables render a static container instead of a TableResizer, so there is no table width
23
+ handle on the right edge. Column resizing is unaffected. Limited mode turning on or off at runtime
24
+ is picked up immediately.
25
+ - Updated dependencies
26
+
3
27
  ## 28.0.4
4
28
 
5
29
  ### Patch Changes
@@ -13,15 +13,18 @@ var _classnames = _interopRequireDefault(require("classnames"));
13
13
  var _analytics = require("@atlaskit/editor-common/analytics");
14
14
  var _hooks = require("@atlaskit/editor-common/hooks");
15
15
  var _nodeWidth = require("@atlaskit/editor-common/node-width");
16
+ var _resizer = require("@atlaskit/editor-common/styles/resizer");
16
17
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
17
18
  var _fg = require("@atlaskit/platform-feature-flags/fg");
18
19
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
19
20
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
20
21
  var _commandsWithAnalytics = require("../pm-plugins/commands/commands-with-analytics");
22
+ var _colgroup = require("../pm-plugins/table-resizing/utils/colgroup");
21
23
  var _consts = require("../pm-plugins/table-resizing/utils/consts");
22
24
  var _misc = require("../pm-plugins/table-resizing/utils/misc");
23
25
  var _alignment = require("../pm-plugins/utils/alignment");
24
26
  var _types = require("../types");
27
+ var _useIsTableInLimitedMode = require("../ui/hooks/useIsTableInLimitedMode");
25
28
  var _tableContainerStyles = require("./table-container-styles");
26
29
  var _TableResizer = require("./TableResizer");
27
30
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
@@ -344,29 +347,118 @@ var ResizableTableContainer = exports.ResizableTableContainer = /*#__PURE__*/_re
344
347
  node: node
345
348
  }, children))));
346
349
  });
347
- var TableContainer = exports.TableContainer = function TableContainer(_ref5) {
350
+ /**
351
+ * Stand-in for `ResizableTableContainer`, used when limited mode has disabled resizing the table as
352
+ * a whole. Column resizing is unaffected and keeps working through the cell decorations.
353
+ *
354
+ * It reproduces the same DOM and CSS that `toDOM` renders for a resizable table
355
+ * (`.pm-table-resizer-container` > `.resizer-item` > `.resizer-hover-zone`) so that swapping the
356
+ * nodeView in over the initial ProseMirror render leaves the table exactly where it was — and so
357
+ * that the column resize handles still find the elements they measure against — but it mounts no
358
+ * `TableResizer`, so there is no `re-resizable` instance, no table width handle, no handle tooltip,
359
+ * no `clientHeight` read for the handle size and no per-table subscription to the interaction and
360
+ * table shared states.
361
+ *
362
+ * Every width here comes from the same pure-CSS helpers `toDOM` uses, so unlike
363
+ * `ResizableTableContainer` it needs no measured container width and does no layout maths.
364
+ */
365
+ var StaticTableContainer = function StaticTableContainer(_ref5) {
348
366
  var children = _ref5.children,
349
- node = _ref5.node,
350
367
  className = _ref5.className,
351
- _ref5$containerWidth = _ref5.containerWidth,
352
- editorWidth = _ref5$containerWidth.width,
353
- lineLength = _ref5$containerWidth.lineLength,
368
+ node = _ref5.node,
354
369
  editorView = _ref5.editorView,
355
370
  getPos = _ref5.getPos,
356
- tableRef = _ref5.tableRef,
357
- isNested = _ref5.isNested,
358
- tableWrapperHeight = _ref5.tableWrapperHeight,
359
- isResizing = _ref5.isResizing,
360
371
  pluginInjectionApi = _ref5.pluginInjectionApi,
361
- isWholeTableInDanger = _ref5.isWholeTableInDanger,
362
- isTableResizingEnabled = _ref5.isTableResizingEnabled,
363
372
  isTableScalingEnabled = _ref5.isTableScalingEnabled,
364
- allowFixedColumnWidthOption = _ref5.allowFixedColumnWidthOption,
365
373
  isTableAlignmentEnabled = _ref5.isTableAlignmentEnabled,
366
- shouldUseIncreasedScalingPercent = _ref5.shouldUseIncreasedScalingPercent,
367
374
  isCommentEditor = _ref5.isCommentEditor,
368
375
  isChromelessEditor = _ref5.isChromelessEditor;
376
+ var isFullPageAppearance = !isCommentEditor && !isChromelessEditor;
377
+ var containerStyle = (0, _react.useMemo)(function () {
378
+ return {
379
+ '--ak-editor-table-gutter-padding': 'calc(var(--ak-editor--large-gutter-padding) * 2)',
380
+ '--ak-editor-table-width': isFullPageAppearance ? (0, _misc.getTableResizerContainerForFullPageWidthInCSS)(node, isTableScalingEnabled) : "calc(100cqw - calc(var(--ak-editor--large-gutter-padding) * 2))",
381
+ width: 'var(--ak-editor-table-width)'
382
+ };
383
+ }, [node, isTableScalingEnabled, isFullPageAppearance]);
384
+ var itemStyle = (0, _react.useMemo)(function () {
385
+ return {
386
+ position: 'relative',
387
+ boxSizing: 'border-box',
388
+ minWidth: "".concat((0, _colgroup.getResizerMinWidth)(node), "px"),
389
+ maxWidth: (0, _misc.getTableResizerContainerMaxWidthInCSS)(isCommentEditor, isChromelessEditor, isTableScalingEnabled),
390
+ width: (0, _misc.getTableResizerItemWidthInCSS)(node, isCommentEditor, isChromelessEditor)
391
+ };
392
+ }, [node, isCommentEditor, isChromelessEditor, isTableScalingEnabled]);
393
+ return /*#__PURE__*/_react.default.createElement(AlignmentTableContainerWrapper, {
394
+ isTableAlignmentEnabled: isTableAlignmentEnabled,
395
+ node: node,
396
+ pluginInjectionApi: pluginInjectionApi,
397
+ getPos: getPos,
398
+ editorView: editorView
399
+ }, /*#__PURE__*/_react.default.createElement("div", {
400
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
401
+ className: _types.TableCssClassName.TABLE_RESIZER_CONTAINER
402
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
403
+ ,
404
+ style: containerStyle
405
+ }, /*#__PURE__*/_react.default.createElement("div", {
406
+ // `display-handle` carries no handle to show here, but it keeps this element matching both
407
+ // `toDOM` and the `.resizer-item.display-handle` lookup in `measureTableWithAutoLayout`.
408
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
409
+ className: (0, _classnames.default)(_resizer.resizerItemClassName, 'display-handle')
410
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
411
+ ,
412
+ style: itemStyle
413
+ }, /*#__PURE__*/_react.default.createElement("span", {
414
+ className: _resizer.resizerHoverZoneClassName
415
+ }, /*#__PURE__*/_react.default.createElement(InnerContainer
416
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
417
+ , {
418
+ className: className,
419
+ node: node
420
+ }, children)))));
421
+ };
422
+ var TableContainer = exports.TableContainer = function TableContainer(_ref6) {
423
+ var children = _ref6.children,
424
+ node = _ref6.node,
425
+ className = _ref6.className,
426
+ _ref6$containerWidth = _ref6.containerWidth,
427
+ editorWidth = _ref6$containerWidth.width,
428
+ lineLength = _ref6$containerWidth.lineLength,
429
+ editorView = _ref6.editorView,
430
+ getPos = _ref6.getPos,
431
+ tableRef = _ref6.tableRef,
432
+ isNested = _ref6.isNested,
433
+ tableWrapperHeight = _ref6.tableWrapperHeight,
434
+ isResizing = _ref6.isResizing,
435
+ pluginInjectionApi = _ref6.pluginInjectionApi,
436
+ isWholeTableInDanger = _ref6.isWholeTableInDanger,
437
+ isTableResizingEnabled = _ref6.isTableResizingEnabled,
438
+ isTableScalingEnabled = _ref6.isTableScalingEnabled,
439
+ allowFixedColumnWidthOption = _ref6.allowFixedColumnWidthOption,
440
+ isTableAlignmentEnabled = _ref6.isTableAlignmentEnabled,
441
+ shouldUseIncreasedScalingPercent = _ref6.shouldUseIncreasedScalingPercent,
442
+ isCommentEditor = _ref6.isCommentEditor,
443
+ isChromelessEditor = _ref6.isChromelessEditor;
444
+ // Limited mode drops the whole-table resizer only; column resizing is untouched.
445
+ var isTableWidthResizingDisabled = (0, _useIsTableInLimitedMode.useIsTableInLimitedMode)(pluginInjectionApi, editorView);
369
446
  if (isTableResizingEnabled && !isNested) {
447
+ if (isTableWidthResizingDisabled) {
448
+ return /*#__PURE__*/_react.default.createElement(StaticTableContainer
449
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
450
+ , {
451
+ className: className,
452
+ node: node,
453
+ editorView: editorView,
454
+ getPos: getPos,
455
+ pluginInjectionApi: pluginInjectionApi,
456
+ isTableScalingEnabled: isTableScalingEnabled,
457
+ isTableAlignmentEnabled: isTableAlignmentEnabled,
458
+ isCommentEditor: isCommentEditor,
459
+ isChromelessEditor: isChromelessEditor
460
+ }, children);
461
+ }
370
462
  return /*#__PURE__*/_react.default.createElement(ResizableTableContainer
371
463
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
372
464
  , {
@@ -13,7 +13,6 @@ var _classnames2 = _interopRequireDefault(require("classnames"));
13
13
  var _reactDom = _interopRequireDefault(require("react-dom"));
14
14
  var _reactIntl = require("react-intl");
15
15
  var _browser = require("@atlaskit/editor-common/browser");
16
- var _hooks = require("@atlaskit/editor-common/hooks");
17
16
  var _messages = require("@atlaskit/editor-common/messages");
18
17
  var _state = require("@atlaskit/editor-prosemirror/state");
19
18
  var _editorTables = require("@atlaskit/editor-tables");
@@ -23,11 +22,11 @@ var _setCustomNativeDragPreview = require("@atlaskit/pragmatic-drag-and-drop/uti
23
22
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
24
23
  var _activeTableMenu = require("../../pm-plugins/commands/active-table-menu");
25
24
  var _pluginFactory = require("../../pm-plugins/drag-and-drop/plugin-factory");
26
- var _limitedMode = require("../../pm-plugins/utils/limited-mode");
27
25
  var _mergedCells = require("../../pm-plugins/utils/merged-cells");
28
26
  var _types = require("../../types");
29
27
  var _consts = require("../consts");
30
28
  var _DragPreview = require("../DragPreview");
29
+ var _useIsTableInLimitedMode = require("../hooks/useIsTableInLimitedMode");
31
30
  var _HandleIconComponent = require("./HandleIconComponent");
32
31
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
33
32
  /* eslint-disable @atlaskit/design-system/no-html-button */
@@ -70,16 +69,11 @@ var DragHandleComponent = function DragHandleComponent(_ref) {
70
69
  setIsHovered = _useState4[1];
71
70
 
72
71
  // Limited mode disables dragging rows and columns, but the handle itself keeps working as the
73
- // selection and menu affordance. Subscribing here (rather than reading the plugin state once) means
74
- // the effect below re-runs and un-registers the draggable if limited mode flips mid-session.
75
- var _useSharedPluginState = (0, _hooks.useSharedPluginStateWithSelector)(api, ['limitedMode'], function (states) {
76
- var _states$limitedModeSt;
77
- return {
78
- limitedModeEnabled: (_states$limitedModeSt = states.limitedModeState) === null || _states$limitedModeSt === void 0 ? void 0 : _states$limitedModeSt.enabled
79
- };
80
- }),
81
- limitedModeEnabled = _useSharedPluginState.limitedModeEnabled;
82
- var isDraggingEnabled = !(0, _limitedMode.isDragAndDropDisabledInLimitedMode)(limitedModeEnabled);
72
+ // selection and menu affordance. The hook subscribes to limited mode (rather than reading the
73
+ // plugin state once) so the effect below re-runs and un-registers the draggable if limited mode
74
+ // flips mid-session.
75
+ var isInLimitedMode = (0, _useIsTableInLimitedMode.useIsTableInLimitedMode)(api, editorView);
76
+ var isDraggingEnabled = !isInLimitedMode;
83
77
  var isRow = direction === 'row';
84
78
  var isColumn = direction === 'column';
85
79
  var hasMergedCells = (0, _react.useMemo)(function () {
@@ -17,7 +17,6 @@ var _toolbarDropdownItem = require("@atlaskit/editor-toolbar/toolbar-dropdown-it
17
17
  var _toolbarKeyboardShortcutHint = require("@atlaskit/editor-toolbar/toolbar-keyboard-shortcut-hint");
18
18
  var _tableColumnMoveLeft = _interopRequireDefault(require("@atlaskit/icon/core/table-column-move-left"));
19
19
  var _compiled = require("@atlaskit/primitives/compiled");
20
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
21
20
  var _Tooltip = _interopRequireDefault(require("@atlaskit/tooltip/Tooltip"));
22
21
  var _commands = require("../../../../pm-plugins/commands");
23
22
  var _commandsWithAnalytics = require("../../../../pm-plugins/drag-and-drop/commands-with-analytics");
@@ -63,9 +62,7 @@ var MoveColumnLeftItem = exports.MoveColumnLeftItem = function MoveColumnLeftIte
63
62
  var label = formatMessage(_messages.tableMessages.moveColumnLeft, {
64
63
  0: selectedColumnCount
65
64
  });
66
- var canMove = Boolean(tableMenuContext === null || tableMenuContext === void 0 ? void 0 : tableMenuContext.canMoveColumnLeft);
67
- var isMoveDisabled = (0, _expValEquals.expValEquals)('platform_editor_table_menu_updates_patch_2', 'isEnabled', true) && !canMove;
68
- if (isMoveDisabled) {
65
+ if (!Boolean(tableMenuContext === null || tableMenuContext === void 0 ? void 0 : tableMenuContext.canMoveColumnLeft)) {
69
66
  return /*#__PURE__*/_react.default.createElement(_toolbarDropdownItem.ToolbarDropdownItem, {
70
67
  elemBefore: /*#__PURE__*/_react.default.createElement(_tableColumnMoveLeft.default, {
71
68
  color: "var(--ds-text-disabled, #080F214A)",
@@ -17,7 +17,6 @@ var _informationCircleIcon = require("@atlaskit/editor-toolbar/information-circl
17
17
  var _toolbarDropdownItem = require("@atlaskit/editor-toolbar/toolbar-dropdown-item");
18
18
  var _toolbarKeyboardShortcutHint = require("@atlaskit/editor-toolbar/toolbar-keyboard-shortcut-hint");
19
19
  var _compiled = require("@atlaskit/primitives/compiled");
20
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
21
20
  var _Tooltip = _interopRequireDefault(require("@atlaskit/tooltip/Tooltip"));
22
21
  var _commands = require("../../../../pm-plugins/commands");
23
22
  var _commandsWithAnalytics = require("../../../../pm-plugins/drag-and-drop/commands-with-analytics");
@@ -63,9 +62,7 @@ var MoveColumnRightItem = exports.MoveColumnRightItem = function MoveColumnRight
63
62
  var label = formatMessage(_messages.tableMessages.moveColumnRight, {
64
63
  0: selectedColumnCount
65
64
  });
66
- var canMove = Boolean(tableMenuContext === null || tableMenuContext === void 0 ? void 0 : tableMenuContext.canMoveColumnRight);
67
- var isMoveDisabled = (0, _expValEquals.expValEquals)('platform_editor_table_menu_updates_patch_2', 'isEnabled', true) && !canMove;
68
- if (isMoveDisabled) {
65
+ if (!Boolean(tableMenuContext === null || tableMenuContext === void 0 ? void 0 : tableMenuContext.canMoveColumnRight)) {
69
66
  return /*#__PURE__*/_react.default.createElement(_toolbarDropdownItem.ToolbarDropdownItem, {
70
67
  elemBefore: /*#__PURE__*/_react.default.createElement(_columnMoveRightIcon.TableColumnMoveRightIcon, {
71
68
  color: "var(--ds-text-disabled, #080F214A)",
@@ -1,3 +1,2 @@
1
1
  ._1e0c116y{display:inline-flex}
2
- ._4cvr1h6o{align-items:center}
3
- ._syaz1gmx{color:var(--ds-text-disabled,#080f214a)}
2
+ ._4cvr1h6o{align-items:center}
@@ -18,13 +18,11 @@ var _utils = require("@atlaskit/editor-tables/utils");
18
18
  var _editorToolbar = require("@atlaskit/editor-toolbar");
19
19
  var _fg = require("@atlaskit/platform-feature-flags/fg");
20
20
  var _compiled = require("@atlaskit/primitives/compiled");
21
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
22
21
  var _Tooltip = _interopRequireDefault(require("@atlaskit/tooltip/Tooltip"));
23
22
  var _commands = require("../../../../pm-plugins/commands");
24
23
  var _commandsWithAnalytics = require("../../../../pm-plugins/commands/commands-with-analytics");
25
24
  var _TableMenuContext = require("../../shared/TableMenuContext");
26
25
  var styles = {
27
- disabledLabel: "_syaz1gmx",
28
26
  infoIconTrigger: "_1e0c116y _4cvr1h6o"
29
27
  };
30
28
  var SortDecreasingItem = exports.SortDecreasingItem = function SortDecreasingItem(_ref) {
@@ -73,11 +71,8 @@ var SortDecreasingItem = exports.SortDecreasingItem = function SortDecreasingIte
73
71
  color: "var(--ds-icon, #292A2E)"
74
72
  }));
75
73
  })
76
- }, (0, _expValEquals.expValEquals)('platform_editor_table_menu_updates_patch_2', 'isEnabled', true) ? /*#__PURE__*/_react.default.createElement(_compiled.Text, {
74
+ }, /*#__PURE__*/_react.default.createElement(_compiled.Text, {
77
75
  color: "color.text.disabled"
78
- }, formatMessage(_messages.tableMessages.sortColumnDecreasing)) : /*#__PURE__*/_react.default.createElement(_compiled.Box, {
79
- as: "span",
80
- xcss: styles.disabledLabel
81
76
  }, formatMessage(_messages.tableMessages.sortColumnDecreasing)));
82
77
  }
83
78
  return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarDropdownItem, {
@@ -1,3 +1,2 @@
1
1
  ._1e0c116y{display:inline-flex}
2
- ._4cvr1h6o{align-items:center}
3
- ._syaz1gmx{color:var(--ds-text-disabled,#080f214a)}
2
+ ._4cvr1h6o{align-items:center}
@@ -18,13 +18,11 @@ var _utils = require("@atlaskit/editor-tables/utils");
18
18
  var _editorToolbar = require("@atlaskit/editor-toolbar");
19
19
  var _fg = require("@atlaskit/platform-feature-flags/fg");
20
20
  var _compiled = require("@atlaskit/primitives/compiled");
21
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
22
21
  var _Tooltip = _interopRequireDefault(require("@atlaskit/tooltip/Tooltip"));
23
22
  var _commands = require("../../../../pm-plugins/commands");
24
23
  var _commandsWithAnalytics = require("../../../../pm-plugins/commands/commands-with-analytics");
25
24
  var _TableMenuContext = require("../../shared/TableMenuContext");
26
25
  var styles = {
27
- disabledLabel: "_syaz1gmx",
28
26
  infoIconTrigger: "_1e0c116y _4cvr1h6o"
29
27
  };
30
28
  var SortIncreasingItem = exports.SortIncreasingItem = function SortIncreasingItem(_ref) {
@@ -73,11 +71,8 @@ var SortIncreasingItem = exports.SortIncreasingItem = function SortIncreasingIte
73
71
  color: "var(--ds-icon, #292A2E)"
74
72
  }));
75
73
  })
76
- }, (0, _expValEquals.expValEquals)('platform_editor_table_menu_updates_patch_2', 'isEnabled', true) ? /*#__PURE__*/_react.default.createElement(_compiled.Text, {
74
+ }, /*#__PURE__*/_react.default.createElement(_compiled.Text, {
77
75
  color: "color.text.disabled"
78
- }, formatMessage(_messages.tableMessages.sortColumnIncreasing)) : /*#__PURE__*/_react.default.createElement(_compiled.Box, {
79
- as: "span",
80
- xcss: styles.disabledLabel
81
76
  }, formatMessage(_messages.tableMessages.sortColumnIncreasing)));
82
77
  }
83
78
  return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarDropdownItem, {
@@ -17,7 +17,6 @@ var _rowMoveDownIcon = require("@atlaskit/editor-toolbar/row-move-down-icon");
17
17
  var _toolbarDropdownItem = require("@atlaskit/editor-toolbar/toolbar-dropdown-item");
18
18
  var _toolbarKeyboardShortcutHint = require("@atlaskit/editor-toolbar/toolbar-keyboard-shortcut-hint");
19
19
  var _compiled = require("@atlaskit/primitives/compiled");
20
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
21
20
  var _Tooltip = _interopRequireDefault(require("@atlaskit/tooltip/Tooltip"));
22
21
  var _commands = require("../../../../pm-plugins/commands");
23
22
  var _commandsWithAnalytics = require("../../../../pm-plugins/drag-and-drop/commands-with-analytics");
@@ -63,9 +62,7 @@ var MoveRowDownItem = exports.MoveRowDownItem = function MoveRowDownItem(props)
63
62
  var label = formatMessage(_messages.tableMessages.moveRowDown, {
64
63
  0: selectedRowCount
65
64
  });
66
- var canMove = Boolean(tableMenuContext === null || tableMenuContext === void 0 ? void 0 : tableMenuContext.canMoveRowDown);
67
- var isMoveDisabled = (0, _expValEquals.expValEquals)('platform_editor_table_menu_updates_patch_2', 'isEnabled', true) && !canMove;
68
- if (isMoveDisabled) {
65
+ if (!Boolean(tableMenuContext === null || tableMenuContext === void 0 ? void 0 : tableMenuContext.canMoveRowDown)) {
69
66
  return /*#__PURE__*/_react.default.createElement(_toolbarDropdownItem.ToolbarDropdownItem, {
70
67
  elemBefore: /*#__PURE__*/_react.default.createElement(_rowMoveDownIcon.TableRowMoveDownIcon, {
71
68
  color: "var(--ds-text-disabled, #080F214A)",
@@ -17,7 +17,6 @@ var _rowMoveUpIcon = require("@atlaskit/editor-toolbar/row-move-up-icon");
17
17
  var _toolbarDropdownItem = require("@atlaskit/editor-toolbar/toolbar-dropdown-item");
18
18
  var _toolbarKeyboardShortcutHint = require("@atlaskit/editor-toolbar/toolbar-keyboard-shortcut-hint");
19
19
  var _compiled = require("@atlaskit/primitives/compiled");
20
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
21
20
  var _Tooltip = _interopRequireDefault(require("@atlaskit/tooltip/Tooltip"));
22
21
  var _commands = require("../../../../pm-plugins/commands");
23
22
  var _commandsWithAnalytics = require("../../../../pm-plugins/drag-and-drop/commands-with-analytics");
@@ -63,9 +62,7 @@ var MoveRowUpItem = exports.MoveRowUpItem = function MoveRowUpItem(props) {
63
62
  var label = formatMessage(_messages.tableMessages.moveRowUp, {
64
63
  0: selectedRowCount
65
64
  });
66
- var canMove = Boolean(tableMenuContext === null || tableMenuContext === void 0 ? void 0 : tableMenuContext.canMoveRowUp);
67
- var isMoveDisabled = (0, _expValEquals.expValEquals)('platform_editor_table_menu_updates_patch_2', 'isEnabled', true) && !canMove;
68
- if (isMoveDisabled) {
65
+ if (!Boolean(tableMenuContext === null || tableMenuContext === void 0 ? void 0 : tableMenuContext.canMoveRowUp)) {
69
66
  return /*#__PURE__*/_react.default.createElement(_toolbarDropdownItem.ToolbarDropdownItem, {
70
67
  elemBefore: /*#__PURE__*/_react.default.createElement(_rowMoveUpIcon.TableRowMoveUpIcon, {
71
68
  color: "var(--ds-text-disabled, #080F214A)",