@atlaskit/editor-plugin-table 24.4.14 → 24.4.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/cjs/nodeviews/TableRowNativeStickyWithFallback.js +60 -85
  3. package/dist/cjs/pm-plugins/table-anchor-names/plugin.js +3 -6
  4. package/dist/cjs/tablePlugin.js +2 -2
  5. package/dist/cjs/ui/FloatingContextualButton/index.js +1 -16
  6. package/dist/cjs/ui/FloatingDragMenu/index.js +1 -2
  7. package/dist/cjs/ui/FloatingTableMenu/index.js +1 -2
  8. package/dist/cjs/ui/TableFloatingControls/index.js +1 -10
  9. package/dist/cjs/ui/TableMenu/column/items/SortDecreasingItem.js +1 -1
  10. package/dist/cjs/ui/TableMenu/column/items/SortIncreasingItem.js +1 -1
  11. package/dist/cjs/ui/TableMenu/shared/items/BackgroundColorItem.compiled.css +0 -1
  12. package/dist/cjs/ui/TableMenu/shared/items/BackgroundColorItem.js +1 -1
  13. package/dist/cjs/ui/common-styles.js +4 -4
  14. package/dist/es2019/nodeviews/TableRowNativeStickyWithFallback.js +60 -85
  15. package/dist/es2019/pm-plugins/table-anchor-names/plugin.js +3 -6
  16. package/dist/es2019/tablePlugin.js +2 -2
  17. package/dist/es2019/ui/FloatingContextualButton/index.js +1 -16
  18. package/dist/es2019/ui/FloatingDragMenu/index.js +1 -2
  19. package/dist/es2019/ui/FloatingTableMenu/index.js +1 -2
  20. package/dist/es2019/ui/TableFloatingControls/index.js +2 -11
  21. package/dist/es2019/ui/TableMenu/column/items/SortDecreasingItem.js +1 -1
  22. package/dist/es2019/ui/TableMenu/column/items/SortIncreasingItem.js +1 -1
  23. package/dist/es2019/ui/TableMenu/shared/items/BackgroundColorItem.compiled.css +0 -1
  24. package/dist/es2019/ui/TableMenu/shared/items/BackgroundColorItem.js +1 -1
  25. package/dist/es2019/ui/common-styles.js +54 -72
  26. package/dist/esm/nodeviews/TableRowNativeStickyWithFallback.js +60 -85
  27. package/dist/esm/pm-plugins/table-anchor-names/plugin.js +3 -6
  28. package/dist/esm/tablePlugin.js +2 -2
  29. package/dist/esm/ui/FloatingContextualButton/index.js +1 -16
  30. package/dist/esm/ui/FloatingDragMenu/index.js +1 -2
  31. package/dist/esm/ui/FloatingTableMenu/index.js +1 -2
  32. package/dist/esm/ui/TableFloatingControls/index.js +2 -11
  33. package/dist/esm/ui/TableMenu/column/items/SortDecreasingItem.js +1 -1
  34. package/dist/esm/ui/TableMenu/column/items/SortIncreasingItem.js +1 -1
  35. package/dist/esm/ui/TableMenu/shared/items/BackgroundColorItem.compiled.css +0 -1
  36. package/dist/esm/ui/TableMenu/shared/items/BackgroundColorItem.js +1 -1
  37. package/dist/esm/ui/common-styles.js +4 -4
  38. package/package.json +6 -27
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/editor-plugin-table
2
2
 
3
+ ## 24.4.15
4
+
5
+ ### Patch Changes
6
+
7
+ - [`0a6b16efd7f45`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0a6b16efd7f45) -
8
+ Clean up sticky header patch feature gates and experiments.
9
+ - Updated dependencies
10
+
3
11
  ## 24.4.14
4
12
 
5
13
  ### Patch Changes
@@ -149,7 +149,7 @@ var TableRowNativeStickyWithFallback = exports.default = /*#__PURE__*/function (
149
149
  }
150
150
  });
151
151
  }
152
- if (_this.isHeaderRow && _this.isStickyHeaderEnabled && (0, _platformFeatureFlags.fg)('platform_editor_table_sticky_header_patch_4')) {
152
+ if (_this.isHeaderRow && _this.isStickyHeaderEnabled) {
153
153
  var _api$table;
154
154
  _this.onEditorContentAreaHeightChange = api === null || api === void 0 || (_api$table = api.table) === null || _api$table === void 0 ? void 0 : _api$table.sharedState.onChange(function (_ref) {
155
155
  var nextSharedState = _ref.nextSharedState;
@@ -278,47 +278,45 @@ var TableRowNativeStickyWithFallback = exports.default = /*#__PURE__*/function (
278
278
  if (this.editorScrollableElement) {
279
279
  this.initObservers();
280
280
  this.topPosEditorElement = (0, _dom2.getTop)(this.editorScrollableElement);
281
- if ((0, _platformFeatureFlags.fg)('platform_editor_table_sticky_header_patch_5')) {
282
- this.scrollListener = function () {
283
- var _this3$overflowObserv;
284
- if (_this3.hasScrolledSinceLoad) {
285
- return;
286
- }
287
- _this3.hasScrolledSinceLoad = true;
288
- if (!_this3.overflowObserver) {
289
- return;
290
- }
291
-
292
- // Re-check intersection state now that scrolling has occurred
293
- var entries = (_this3$overflowObserv = _this3.overflowObserverEntries) !== null && _this3$overflowObserv !== void 0 ? _this3$overflowObserv : _this3.overflowObserver.takeRecords();
294
- _this3.overflowObserverEntries = undefined;
281
+ this.scrollListener = function () {
282
+ var _this3$overflowObserv;
283
+ if (_this3.hasScrolledSinceLoad) {
284
+ return;
285
+ }
286
+ _this3.hasScrolledSinceLoad = true;
287
+ if (!_this3.overflowObserver) {
288
+ return;
289
+ }
295
290
 
296
- /** NOTE: This logic is duplicated in the overflowObserver callback
297
- * to avoid conflicting with a follow up refactor where this will
298
- * be cleaned up.
299
- */
300
- entries.forEach(function (entry) {
301
- var tableWrapper = _this3.dom.closest(".".concat(_types.TableCssClassName.TABLE_NODE_WRAPPER));
302
- if (tableWrapper && tableWrapper instanceof HTMLElement && (!(0, _dom2.areAllRectsZero)(entry) && (0, _expValEquals.expValEquals)('platform_editor_table_sticky_header_patch_10', 'isEnabled', true) || !(0, _expValEquals.expValEquals)('platform_editor_table_sticky_header_patch_10', 'isEnabled', true))) {
303
- if (entry.isIntersecting) {
304
- tableWrapper.classList.add(_types.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW);
305
- _this3.dom.classList.add(_types.TableCssClassName.NATIVE_STICKY);
306
- _this3.isNativeSticky = true;
307
- } else {
308
- tableWrapper.classList.remove(_types.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW);
309
- _this3.dom.classList.remove(_types.TableCssClassName.NATIVE_STICKY);
310
- _this3.isNativeSticky = false;
311
- }
312
- _this3.refreshLegacyStickyState();
291
+ // Re-check intersection state now that scrolling has occurred
292
+ var entries = (_this3$overflowObserv = _this3.overflowObserverEntries) !== null && _this3$overflowObserv !== void 0 ? _this3$overflowObserv : _this3.overflowObserver.takeRecords();
293
+ _this3.overflowObserverEntries = undefined;
294
+
295
+ /** NOTE: This logic is duplicated in the overflowObserver callback
296
+ * to avoid conflicting with a follow up refactor where this will
297
+ * be cleaned up.
298
+ */
299
+ entries.forEach(function (entry) {
300
+ var tableWrapper = _this3.dom.closest(".".concat(_types.TableCssClassName.TABLE_NODE_WRAPPER));
301
+ if (tableWrapper && tableWrapper instanceof HTMLElement && !(0, _dom2.areAllRectsZero)(entry)) {
302
+ if (entry.isIntersecting) {
303
+ tableWrapper.classList.add(_types.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW);
304
+ _this3.dom.classList.add(_types.TableCssClassName.NATIVE_STICKY);
305
+ _this3.isNativeSticky = true;
306
+ } else {
307
+ tableWrapper.classList.remove(_types.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW);
308
+ _this3.dom.classList.remove(_types.TableCssClassName.NATIVE_STICKY);
309
+ _this3.isNativeSticky = false;
313
310
  }
314
- });
315
- };
316
- // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
317
- this.editorScrollableElement.addEventListener('scroll', this.scrollListener, {
318
- passive: true,
319
- once: true
311
+ _this3.refreshLegacyStickyState();
312
+ }
320
313
  });
321
- }
314
+ };
315
+ // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
316
+ this.editorScrollableElement.addEventListener('scroll', this.scrollListener, {
317
+ passive: true,
318
+ once: true
319
+ });
322
320
  }
323
321
  this.eventDispatcher.on('widthPlugin', this.updateStickyHeaderWidth.bind(this));
324
322
 
@@ -389,48 +387,36 @@ var TableRowNativeStickyWithFallback = exports.default = /*#__PURE__*/function (
389
387
  };
390
388
  this.overflowObserver = new IntersectionObserver(function (entries, observer) {
391
389
  entries.forEach(function (entry) {
390
+ var _this4$api;
392
391
  if (!(observer.root instanceof HTMLElement)) {
393
392
  return;
394
393
  }
395
394
  // Only apply classes if page has scrolled since load
396
- if (!_this4.hasScrolledSinceLoad && (0, _platformFeatureFlags.fg)('platform_editor_table_sticky_header_patch_5')) {
395
+ if (!_this4.hasScrolledSinceLoad) {
397
396
  _this4.overflowObserverEntries = entries;
398
397
  return;
399
398
  }
400
399
  if (entry.isIntersecting) {
401
- if ((0, _platformFeatureFlags.fg)('platform_editor_table_sticky_header_patch_4')) {
402
- observer.root.classList.add(_types.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW);
403
- if (!_this4.disableNativeSticky) {
404
- _this4.dom.classList.add(_types.TableCssClassName.NATIVE_STICKY);
405
- }
406
- } else {
407
- observer.root.classList.add(_types.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW);
400
+ observer.root.classList.add(_types.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW);
401
+ if (!_this4.disableNativeSticky) {
408
402
  _this4.dom.classList.add(_types.TableCssClassName.NATIVE_STICKY);
409
403
  }
410
404
  _this4.isNativeSticky = true;
411
405
  } else {
412
- if ((0, _platformFeatureFlags.fg)('platform_editor_table_sticky_header_patch_4')) {
413
- observer.root.classList.remove(_types.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW);
414
- _this4.dom.classList.remove(_types.TableCssClassName.NATIVE_STICKY);
415
- } else {
416
- observer.root.classList.remove(_types.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW);
417
- _this4.dom.classList.remove(_types.TableCssClassName.NATIVE_STICKY);
418
- }
406
+ observer.root.classList.remove(_types.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW);
407
+ _this4.dom.classList.remove(_types.TableCssClassName.NATIVE_STICKY);
419
408
  _this4.isNativeSticky = false;
420
409
  }
421
410
  _this4.refreshLegacyStickyState();
422
- if ((0, _expValEquals.expValEquals)('platform_editor_table_sticky_header_patch_9', 'isEnabled', true)) {
423
- var _this4$api;
424
- (_this4$api = _this4.api) === null || _this4$api === void 0 || (_this4$api = _this4$api.analytics) === null || _this4$api === void 0 || (_this4$api = _this4$api.actions) === null || _this4$api === void 0 || _this4$api.fireAnalyticsEvent({
425
- action: _analytics.TABLE_ACTION.STICKY_HEADER_METHOD_TOGGLED,
426
- actionSubject: _analytics.ACTION_SUBJECT.TABLE,
427
- actionSubjectId: _analytics.ACTION_SUBJECT_ID.TABLE_STICKY_HEADER,
428
- eventType: _analytics.EVENT_TYPE.UI,
429
- attributes: {
430
- nativeStickyHeaderEnabled: entry.isIntersecting
431
- }
432
- });
433
- }
411
+ (_this4$api = _this4.api) === null || _this4$api === void 0 || (_this4$api = _this4$api.analytics) === null || _this4$api === void 0 || (_this4$api = _this4$api.actions) === null || _this4$api === void 0 || _this4$api.fireAnalyticsEvent({
412
+ action: _analytics.TABLE_ACTION.STICKY_HEADER_METHOD_TOGGLED,
413
+ actionSubject: _analytics.ACTION_SUBJECT.TABLE,
414
+ actionSubjectId: _analytics.ACTION_SUBJECT_ID.TABLE_STICKY_HEADER,
415
+ eventType: _analytics.EVENT_TYPE.UI,
416
+ attributes: {
417
+ nativeStickyHeaderEnabled: entry.isIntersecting
418
+ }
419
+ });
434
420
  });
435
421
  }, options);
436
422
  }
@@ -456,7 +442,7 @@ var TableRowNativeStickyWithFallback = exports.default = /*#__PURE__*/function (
456
442
  entries.forEach(function (entry) {
457
443
  var _entry$rootBounds;
458
444
  var tableContainer = _this5.dom.closest(".".concat(_types.TableCssClassName.TABLE_CONTAINER));
459
- if (entry.intersectionRect.top === ((_entry$rootBounds = entry.rootBounds) === null || _entry$rootBounds === void 0 ? void 0 : _entry$rootBounds.top) && (!_this5.disableNativeSticky || !(0, _platformFeatureFlags.fg)('platform_editor_table_sticky_header_patch_4'))) {
445
+ if (entry.intersectionRect.top === ((_entry$rootBounds = entry.rootBounds) === null || _entry$rootBounds === void 0 ? void 0 : _entry$rootBounds.top) && !_this5.disableNativeSticky) {
460
446
  _this5.dom.classList.add(_types.TableCssClassName.NATIVE_STICKY_ACTIVE);
461
447
  if (tableContainer && tableContainer instanceof HTMLElement) {
462
448
  tableContainer.dataset.tableHeaderIsStuck = 'true';
@@ -464,11 +450,7 @@ var TableRowNativeStickyWithFallback = exports.default = /*#__PURE__*/function (
464
450
  } else {
465
451
  _this5.dom.classList.remove(_types.TableCssClassName.NATIVE_STICKY_ACTIVE);
466
452
  if (tableContainer && tableContainer instanceof HTMLElement) {
467
- if ((0, _platformFeatureFlags.fg)('platform_editor_table_sticky_header_patch_3')) {
468
- delete tableContainer.dataset.tableHeaderIsStuck;
469
- } else {
470
- tableContainer.dataset.tableHeaderIsStuck = 'false';
471
- }
453
+ delete tableContainer.dataset.tableHeaderIsStuck;
472
454
  }
473
455
  }
474
456
  });
@@ -496,17 +478,12 @@ var TableRowNativeStickyWithFallback = exports.default = /*#__PURE__*/function (
496
478
  this.dom.style.setProperty('anchor-name', (_this$dom$getAttribut = this.dom.getAttribute('data-node-anchor')) !== null && _this$dom$getAttribut !== void 0 ? _this$dom$getAttribut : '');
497
479
  }
498
480
  this.initOverflowObserver();
499
- if ((0, _platformFeatureFlags.fg)('platform_editor_table_sticky_header_patch_4')) {
500
- this.initNodeVisibilityObserver();
501
- }
481
+ this.initNodeVisibilityObserver();
502
482
  var closestTable = this.dom.closest('table');
503
483
  if (closestTable) {
504
- var _this$overflowObserve;
484
+ var _this$overflowObserve, _this$nodeVisibilityO2;
505
485
  (_this$overflowObserve = this.overflowObserver) === null || _this$overflowObserve === void 0 || _this$overflowObserve.observe(closestTable);
506
- if ((0, _platformFeatureFlags.fg)('platform_editor_table_sticky_header_patch_4')) {
507
- var _this$nodeVisibilityO2;
508
- (_this$nodeVisibilityO2 = this.nodeVisibilityObserver) === null || _this$nodeVisibilityO2 === void 0 || _this$nodeVisibilityO2.observe(closestTable);
509
- }
486
+ (_this$nodeVisibilityO2 = this.nodeVisibilityObserver) === null || _this$nodeVisibilityO2 === void 0 || _this$nodeVisibilityO2.observe(closestTable);
510
487
  }
511
488
  this.initStickyStateObserver();
512
489
  (_this$stickyStateObse = this.stickyStateObserver) === null || _this$stickyStateObse === void 0 || _this$stickyStateObse.observe(this.dom);
@@ -641,6 +618,7 @@ var TableRowNativeStickyWithFallback = exports.default = /*#__PURE__*/function (
641
618
  if (entry.target.className === ((_this8$editorScrollab = _this8.editorScrollableElement) === null || _this8$editorScrollab === void 0 ? void 0 : _this8$editorScrollab.className)) {
642
619
  _this8.updateStickyHeaderWidth();
643
620
  } else {
621
+ var _this8$editorContentA;
644
622
  var newHeight = entry.contentRect ? entry.contentRect.height :
645
623
  // Ignored via go/ees005
646
624
  // eslint-disable-next-line @atlaskit/editor/no-as-casting
@@ -653,11 +631,8 @@ var TableRowNativeStickyWithFallback = exports.default = /*#__PURE__*/function (
653
631
  _this8.sentinels.bottom.style.bottom = "".concat(_consts.tableScrollbarOffset + _consts.stickyRowOffsetTop + newHeight, "px");
654
632
  (0, _dom.updateStickyMargins)(table);
655
633
  }
656
- if ((0, _platformFeatureFlags.fg)('platform_editor_table_sticky_header_patch_4')) {
657
- var _this8$editorContentA;
658
- var viewportHeight = (_this8$editorContentA = _this8.editorContentAreaHeight) !== null && _this8$editorContentA !== void 0 ? _this8$editorContentA : _editorContentAreaHeight.INITIAL_STATIC_VIEWPORT_HEIGHT;
659
- _this8.toggleDisableNativeSticky(newHeight, viewportHeight);
660
- }
634
+ var viewportHeight = (_this8$editorContentA = _this8.editorContentAreaHeight) !== null && _this8$editorContentA !== void 0 ? _this8$editorContentA : _editorContentAreaHeight.INITIAL_STATIC_VIEWPORT_HEIGHT;
635
+ _this8.toggleDisableNativeSticky(newHeight, viewportHeight);
661
636
  }
662
637
  });
663
638
  });
@@ -13,8 +13,6 @@ var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
13
13
  var _styles = require("@atlaskit/editor-common/styles");
14
14
  var _state = require("@atlaskit/editor-prosemirror/state");
15
15
  var _view = require("@atlaskit/editor-prosemirror/view");
16
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
17
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
18
16
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid
19
17
  var ObjHash = /*#__PURE__*/function () {
20
18
  function ObjHash() {
@@ -45,9 +43,8 @@ var createTableAnchorDecorations = function createTableAnchorDecorations(state)
45
43
  var _parent$attrs;
46
44
  var isTableHeader = node.type.name === 'tableHeader';
47
45
  var isTableRow = node.type.name === 'tableRow';
48
- var isParentTableRow = (parent === null || parent === void 0 ? void 0 : parent.type.name) === 'tableRow';
49
46
  var isParentTableHeaderRow = (parent === null || parent === void 0 ? void 0 : parent.type.name) === 'tableRow' && headerRowId && (parent === null || parent === void 0 || (_parent$attrs = parent.attrs) === null || _parent$attrs === void 0 ? void 0 : _parent$attrs.localId) === headerRowId;
50
- var shouldAddDecorationToHeader = (0, _expValEquals.expValEquals)('platform_editor_table_sticky_header_patch_9', 'isEnabled', true) ? isParentTableHeaderRow && isTableHeader : isTableHeader;
47
+ var shouldAddDecorationToHeader = isParentTableHeaderRow && isTableHeader;
51
48
  var isFirstRow = isTableRow && index === 0;
52
49
  if (isFirstRow) {
53
50
  headerRowId = node.attrs.localId;
@@ -55,7 +52,7 @@ var createTableAnchorDecorations = function createTableAnchorDecorations(state)
55
52
  // only apply to header cells and the first row of a table, for performance reasons
56
53
  if (isFirstRow || shouldAddDecorationToHeader) {
57
54
  var anchorName = getNodeAnchor(node);
58
- var shouldAddAnchorNameInDecoration = !(0, _styles.isCSSAttrAnchorSupported)() && (0, _styles.isCSSAnchorSupported)() && (0, _platformFeatureFlags.fg)('platform_editor_table_sticky_header_patch_8');
55
+ var shouldAddAnchorNameInDecoration = !(0, _styles.isCSSAttrAnchorSupported)() && (0, _styles.isCSSAnchorSupported)();
59
56
  var attributes = {
60
57
  'data-node-anchor': anchorName,
61
58
  style: "anchor-name: ".concat(anchorName, ";")
@@ -66,7 +63,7 @@ var createTableAnchorDecorations = function createTableAnchorDecorations(state)
66
63
  }
67
64
 
68
65
  // only decend if there is a possible table row or table header node after the current node, for performance reasons
69
- return (0, _expValEquals.expValEquals)('platform_editor_table_sticky_header_patch_9', 'isEnabled', true) ? !(isTableHeader || isParentTableHeaderRow) : !(isTableHeader || isParentTableRow);
66
+ return !(isTableHeader || isParentTableHeaderRow);
70
67
  });
71
68
  return _view.DecorationSet.create(state.doc, decs);
72
69
  };
@@ -160,7 +160,7 @@ var tablePlugin = function tablePlugin(_ref) {
160
160
  isDragMenuOpen: dragAndDropState === null || dragAndDropState === void 0 ? void 0 : dragAndDropState.isDragMenuOpen,
161
161
  isSizeSelectorOpen: sizeSelectorPluginState === null || sizeSelectorPluginState === void 0 ? void 0 : sizeSelectorPluginState.isSelectorOpen,
162
162
  sizeSelectorTargetRef: sizeSelectorPluginState === null || sizeSelectorPluginState === void 0 ? void 0 : sizeSelectorPluginState.targetRef,
163
- editorContentAreaHeight: (0, _expValEquals.expValEquals)('platform_editor_table_sticky_header_improvements', 'cohort', 'test_with_overflow') && (0, _platformFeatureFlags.fg)('platform_editor_table_sticky_header_patch_4') ? editorContentAreaHeightPluginState === null || editorContentAreaHeightPluginState === void 0 ? void 0 : editorContentAreaHeightPluginState.height : undefined
163
+ editorContentAreaHeight: (0, _expValEquals.expValEquals)('platform_editor_table_sticky_header_improvements', 'cohort', 'test_with_overflow') ? editorContentAreaHeightPluginState === null || editorContentAreaHeightPluginState === void 0 ? void 0 : editorContentAreaHeightPluginState.height : undefined
164
164
  };
165
165
  return sharedStateInternal;
166
166
  },
@@ -498,7 +498,7 @@ var tablePlugin = function tablePlugin(_ref) {
498
498
  }, {
499
499
  name: 'editorContentAreaHeightPlugin',
500
500
  plugin: function plugin() {
501
- return (0, _expValEquals.expValEquals)('platform_editor_table_sticky_header_improvements', 'cohort', 'test_with_overflow') && (0, _platformFeatureFlags.fg)('platform_editor_table_sticky_header_patch_1') ? (0, _editorContentAreaHeight.createPlugin)() : undefined;
501
+ return (0, _expValEquals.expValEquals)('platform_editor_table_sticky_header_improvements', 'cohort', 'test_with_overflow') ? (0, _editorContentAreaHeight.createPlugin)() : undefined;
502
502
  }
503
503
  }];
504
504
  if (!(0, _expValEquals.expValEquals)('platform_editor_native_anchor_with_dnd', 'isEnabled', true) && (0, _expValEquals.expValEquals)('platform_editor_table_sticky_header_improvements', 'cohort', 'test_with_overflow')) {
@@ -19,7 +19,6 @@ var _uiMenu = require("@atlaskit/editor-common/ui-menu");
19
19
  var _utils = require("@atlaskit/editor-prosemirror/utils");
20
20
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
21
21
  var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/core/chevron-down"));
22
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
23
22
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
24
23
  var _commands = require("../../pm-plugins/commands");
25
24
  var _pluginFactory = require("../../pm-plugins/plugin-factory");
@@ -154,7 +153,7 @@ var FloatingContextualButtonInner = /*#__PURE__*/_react.default.memo(function (p
154
153
  testId: (0, _expValEquals.expValEquals)('platform_editor_table_menu_updates', 'isEnabled', true) ? 'pm-table-contextual-menu-button' : undefined
155
154
  }));
156
155
  var parentSticky = targetCellRef.parentElement && targetCellRef.parentElement.className.indexOf('sticky') > -1;
157
- var parentStickyNative = targetCellRef.parentElement && ((0, _platformFeatureFlags.fg)('platform_editor_table_sticky_header_patch_4') ? tableWrapper === null || tableWrapper === void 0 ? void 0 : tableWrapper.classList.contains(_types.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW) : targetCellRef.parentElement.classList.contains(_types.TableCssClassName.NATIVE_STICKY));
156
+ var parentStickyNative = targetCellRef.parentElement && (tableWrapper === null || tableWrapper === void 0 ? void 0 : tableWrapper.classList.contains(_types.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW));
158
157
  if (parentStickyNative && targetCellRef.nodeName === 'TH' && (0, _stickyHeader.isNativeStickySupported)() && (0, _expValEquals.expValEquals)('platform_editor_table_sticky_header_improvements', 'cohort', 'test_with_overflow')) {
159
158
  var _targetCellRef$parent;
160
159
  /* We need to default to checking the anchor style because there may be a conflict with the block controls
@@ -169,20 +168,6 @@ var FloatingContextualButtonInner = /*#__PURE__*/_react.default.memo(function (p
169
168
  if (colAnchorName === '') {
170
169
  colAnchorName = targetCellRef === null || targetCellRef === void 0 ? void 0 : targetCellRef.dataset.nodeAnchor;
171
170
  }
172
- if (!(0, _expValEquals.expValEquals)('platform_editor_table_sticky_header_patch_9', 'isEnabled', true)) {
173
- return (0, _react2.jsx)("div", {
174
- css: anchorStyles,
175
- style: {
176
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
177
- top: "calc(".concat(BUTTON_OFFSET, "px + anchor(").concat(rowAnchorName, " top))"),
178
- right: "calc(".concat(BUTTON_OFFSET, "px + anchor(").concat(colAnchorName, " right))"),
179
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
180
- positionAnchor: colAnchorName
181
- } // need to do this because CSSProperties doesn't have positionAnchor property even though it's a valid CSS property
182
- ,
183
- "data-testid": "table-cell-options-anchor-wrapper"
184
- }, button);
185
- }
186
171
  if (rowAnchorName && colAnchorName) {
187
172
  return (0, _react2.jsx)("div", {
188
173
  css: anchorStyles,
@@ -9,7 +9,6 @@ var _react = _interopRequireDefault(require("react"));
9
9
  var _ui = require("@atlaskit/editor-common/ui");
10
10
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
11
11
  var _cellSelection = require("@atlaskit/editor-tables/cell-selection");
12
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
13
12
  var _types = require("../../types");
14
13
  var _consts = require("../consts");
15
14
  var _DragMenu = _interopRequireDefault(require("./DragMenu"));
@@ -37,7 +36,7 @@ var FloatingDragMenu = function FloatingDragMenu(_ref) {
37
36
  if (!isOpen || !targetCellPosition || editorView.state.doc.nodeSize <= targetCellPosition) {
38
37
  return null;
39
38
  }
40
- var inStickyMode = (stickyHeaders === null || stickyHeaders === void 0 ? void 0 : stickyHeaders.sticky) || (tableWrapper === null || tableWrapper === void 0 ? void 0 : tableWrapper.classList.contains(_types.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW)) && (0, _platformFeatureFlags.fg)('platform_editor_table_sticky_header_patch_7');
39
+ var inStickyMode = (stickyHeaders === null || stickyHeaders === void 0 ? void 0 : stickyHeaders.sticky) || (tableWrapper === null || tableWrapper === void 0 ? void 0 : tableWrapper.classList.contains(_types.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW));
41
40
  var targetHandleRef = direction === 'row' ? document.querySelector('#drag-handle-button-row') : document.querySelector('#drag-handle-button-column');
42
41
  if (!targetHandleRef || !(editorView.state.selection instanceof _cellSelection.CellSelection)) {
43
42
  return null;
@@ -12,7 +12,6 @@ var _uiReact = require("@atlaskit/editor-common/ui-react");
12
12
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
13
13
  var _cellSelection = require("@atlaskit/editor-tables/cell-selection");
14
14
  var _toolbarKeyboardNavigationProvider = require("@atlaskit/editor-toolbar/toolbar-keyboard-navigation-provider");
15
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
16
15
  var _commands = require("../../pm-plugins/commands");
17
16
  var _types = require("../../types");
18
17
  var _consts = require("../consts");
@@ -132,7 +131,7 @@ var FloatingTableMenu = function FloatingTableMenu(_ref) {
132
131
  if (!isDragMenuOpen || !targetCellPosition || editorView.state.doc.nodeSize <= targetCellPosition) {
133
132
  return null;
134
133
  }
135
- var inStickyMode = (stickyHeaders === null || stickyHeaders === void 0 ? void 0 : stickyHeaders.sticky) || (tableWrapper === null || tableWrapper === void 0 ? void 0 : tableWrapper.classList.contains(_types.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW)) && (0, _platformFeatureFlags.fg)('platform_editor_table_sticky_header_patch_7');
134
+ var inStickyMode = (stickyHeaders === null || stickyHeaders === void 0 ? void 0 : stickyHeaders.sticky) || (tableWrapper === null || tableWrapper === void 0 ? void 0 : tableWrapper.classList.contains(_types.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW));
136
135
  var targetHandleRef = dragMenuDirection === 'row' ? document.querySelector('#drag-handle-button-row') : document.querySelector('#drag-handle-button-column');
137
136
  if (!targetHandleRef || !(editorView.state.selection instanceof _cellSelection.CellSelection)) {
138
137
  return null;
@@ -10,7 +10,6 @@ var _react2 = require("@emotion/react");
10
10
  var _browser = require("@atlaskit/editor-common/browser");
11
11
  var _utils = require("@atlaskit/editor-tables/utils");
12
12
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
13
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
14
13
  var _commands = require("../../pm-plugins/commands");
15
14
  var _nodes = require("../../pm-plugins/utils/nodes");
16
15
  var _types = require("../../types");
@@ -24,13 +23,6 @@ var _DragControls = require("./RowControls/DragControls");
24
23
 
25
24
  /* eslint-disable @typescript-eslint/consistent-type-imports, @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766; jsx required at runtime for @jsxRuntime classic */
26
25
 
27
- var styles = (0, _react2.css)({
28
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
29
- '&:has(~ .pm-table-wrapper-no-overflow)': {
30
- marginTop: 0
31
- }
32
- });
33
-
34
26
  // Row controls
35
27
  var TableFloatingControls = exports.TableFloatingControls = function TableFloatingControls(_ref) {
36
28
  var _findTable;
@@ -102,8 +94,7 @@ var TableFloatingControls = exports.TableFloatingControls = function TableFloati
102
94
  var shouldShowCornerControls = isNested && !(0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes');
103
95
  return (0, _react2.jsx)("div", {
104
96
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
105
- className: wrapperClassName,
106
- css: [(0, _expValEquals.expValEquals)('platform_editor_table_sticky_header_improvements', 'cohort', 'test_with_overflow') && !(0, _platformFeatureFlags.fg)('platform_editor_table_sticky_header_patch_7') && styles]
97
+ className: wrapperClassName
107
98
  }, (0, _react2.jsx)("div", {
108
99
  role: "none",
109
100
  onMouseDown: function onMouseDown(e) {
@@ -1,4 +1,4 @@
1
- /* SortDecreasingItem.tsx generated by @compiled/babel-plugin v0.39.1 */
1
+ /* SortDecreasingItem.tsx generated by @compiled/babel-plugin v0.40.0 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1,4 +1,4 @@
1
- /* SortIncreasingItem.tsx generated by @compiled/babel-plugin v0.39.1 */
1
+ /* SortIncreasingItem.tsx generated by @compiled/babel-plugin v0.40.0 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1,4 +1,3 @@
1
-
2
1
  ._2rko12b0{border-radius:var(--ds-radius-small,4px)}
3
2
  ._zulp1b66{gap:var(--ds-space-050,4px)}._189ee4h9{border-width:var(--ds-border-width,1px)}
4
3
  ._1dqonqa1{border-style:solid}
@@ -1,4 +1,4 @@
1
- /* BackgroundColorItem.tsx generated by @compiled/babel-plugin v0.39.1 */
1
+ /* BackgroundColorItem.tsx generated by @compiled/babel-plugin v0.40.0 */
2
2
  "use strict";
3
3
 
4
4
  var _typeof = require("@babel/runtime/helpers/typeof");