@atlaskit/editor-plugin-table 15.4.8 → 15.4.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 CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/editor-plugin-table
2
2
 
3
+ ## 15.4.9
4
+
5
+ ### Patch Changes
6
+
7
+ - [`9fa355db69f2c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9fa355db69f2c) -
8
+ [ux] Cleans up FG platform_editor_fix_table_menus_jira
9
+ - Updated dependencies
10
+
3
11
  ## 15.4.8
4
12
 
5
13
  ### Patch Changes
@@ -39,7 +39,6 @@ var _tableRowAddBelow = _interopRequireDefault(require("@atlaskit/icon/core/tabl
39
39
  var _tableRowDelete = _interopRequireDefault(require("@atlaskit/icon/core/table-row-delete"));
40
40
  var _crossCircle = _interopRequireDefault(require("@atlaskit/icon/glyph/cross-circle"));
41
41
  var _remove = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/remove"));
42
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
43
42
  var _primitives = require("@atlaskit/primitives");
44
43
  var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
45
44
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
@@ -88,47 +87,35 @@ var ContextualMenu = exports.ContextualMenu = /*#__PURE__*/function (_Component)
88
87
  });
89
88
  (0, _defineProperty2.default)(_this, "dropdownMenuRef", /*#__PURE__*/_react.default.createRef());
90
89
  (0, _defineProperty2.default)(_this, "handleSubMenuRef", function (ref) {
91
- var parent = (0, _utils.closestElement)(
92
90
  // Ignored via go/ees005
93
91
  // eslint-disable-next-line @atlaskit/editor/no-as-casting
94
- _this.props.editorView.dom, '.fabric-editor-popup-scroll-parent');
95
- if (!parent && (0, _platformFeatureFlags.fg)('platform_editor_fix_table_menus_jira')) {
96
- parent = (0, _utils.closestElement)(
97
- // Ignored via go/ees005
98
- // eslint-disable-next-line @atlaskit/editor/no-as-casting
99
- _this.props.editorView.dom, '.ak-editor-content-area');
100
- }
92
+ var dom = _this.props.editorView.dom;
93
+ var parent = (0, _utils.closestElement)(dom, '.fabric-editor-popup-scroll-parent') || (0, _utils.closestElement)(dom, '.ak-editor-content-area');
101
94
  if (!(parent && ref)) {
102
95
  return;
103
96
  }
104
97
  var boundariesRect = parent.getBoundingClientRect();
105
98
  var rect = ref.getBoundingClientRect();
106
- if ((0, _platformFeatureFlags.fg)('platform_editor_fix_table_menus_jira')) {
107
- if (!!_this.props.mountPoint) {
108
- return;
109
- }
110
- var offsetParent = ref === null || ref === void 0 ? void 0 : ref.offsetParent;
111
- if (!offsetParent) {
112
- return;
113
- }
114
- var offsetParentRect = offsetParent.getBoundingClientRect();
115
- var rightOverflow = offsetParentRect.right + rect.width - boundariesRect.right;
116
- var leftOverflow = boundariesRect.left - (offsetParentRect.left - rect.width);
117
- if (rightOverflow > leftOverflow) {
118
- ref.style.left = "-".concat(rect.width, "px");
119
- }
99
+ if (!!_this.props.mountPoint) {
100
+ return;
101
+ }
102
+ var offsetParent = ref === null || ref === void 0 ? void 0 : ref.offsetParent;
103
+ if (!offsetParent) {
104
+ return;
105
+ }
106
+ var offsetParentRect = offsetParent.getBoundingClientRect();
107
+ var rightOverflow = offsetParentRect.right + rect.width - boundariesRect.right;
108
+ var leftOverflow = boundariesRect.left - (offsetParentRect.left - rect.width);
109
+ if (rightOverflow > leftOverflow) {
110
+ ref.style.left = "-".concat(rect.width, "px");
111
+ }
120
112
 
121
- // if it overflows regardless of side, let it overlap with the parent menu
122
- if (leftOverflow > 0 && rightOverflow > 0) {
123
- if (rightOverflow < leftOverflow) {
124
- ref.style.left = "".concat(offsetParentRect.width - rightOverflow, "px");
125
- } else {
126
- ref.style.left = "-".concat(rect.width - leftOverflow, "px");
127
- }
128
- }
129
- } else {
130
- if (rect.left + rect.width > boundariesRect.width) {
131
- ref.style.left = "-".concat(rect.width, "px");
113
+ // if it overflows regardless of side, let it overlap with the parent menu
114
+ if (leftOverflow > 0 && rightOverflow > 0) {
115
+ if (rightOverflow < leftOverflow) {
116
+ ref.style.left = "".concat(offsetParentRect.width - rightOverflow, "px");
117
+ } else {
118
+ ref.style.left = "-".concat(rect.width - leftOverflow, "px");
132
119
  }
133
120
  }
134
121
  });
@@ -765,7 +752,6 @@ var ContextualMenu = exports.ContextualMenu = /*#__PURE__*/function (_Component)
765
752
  var _this2 = this;
766
753
  var _this$props13 = this.props,
767
754
  isOpen = _this$props13.isOpen,
768
- mountPoint = _this$props13.mountPoint,
769
755
  offset = _this$props13.offset,
770
756
  boundariesElement = _this$props13.boundariesElement,
771
757
  editorView = _this$props13.editorView,
@@ -783,11 +769,10 @@ var ContextualMenu = exports.ContextualMenu = /*#__PURE__*/function (_Component)
783
769
  ,
784
770
  onMouseLeave: _this2.closeSubmenu,
785
771
  ref: _this2.dropdownMenuRef
786
- }, (0, _react2.jsx)(_uiMenu.DropdownMenu, {
787
- mountTo: (0, _platformFeatureFlags.fg)('platform_editor_fix_table_menus_jira') ? undefined : mountPoint
788
- //This needs be removed when the a11y is completely handled
789
- //Disabling key navigation now as it works only partially
790
- ,
772
+ }, (0, _react2.jsx)(_uiMenu.DropdownMenu
773
+ //This needs be removed when the a11y is completely handled
774
+ //Disabling key navigation now as it works only partially
775
+ , {
791
776
  arrowKeyNavigationProviderOptions: {
792
777
  type: _uiMenu.ArrowKeyNavigationType.MENU,
793
778
  disableArrowKeyNavigation: !isCellMenuOpenByKeyboard || _this2.state.isSubmenuOpen
@@ -10,7 +10,6 @@ var _ui = require("@atlaskit/editor-common/ui");
10
10
  var _utils = require("@atlaskit/editor-prosemirror/utils");
11
11
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
12
12
  var _utils2 = require("@atlaskit/editor-tables/utils");
13
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
14
13
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
15
14
  var _expVal = require("@atlaskit/tmp-editor-statsig/expVal");
16
15
  var _pluginFactory = require("../../pm-plugins/plugin-factory");
@@ -113,7 +112,7 @@ var FloatingContextualMenu = function FloatingContextualMenu(_ref) {
113
112
  ,
114
113
  allowBackgroundColor: pluginConfig.allowBackgroundColor,
115
114
  selectionRect: selectionRect,
116
- mountPoint: (0, _platformFeatureFlags.fg)('platform_editor_fix_table_menus_jira') ? mountPoint : undefined,
115
+ mountPoint: mountPoint,
117
116
  boundariesElement: boundariesElement,
118
117
  editorAnalyticsAPI: editorAnalyticsAPI,
119
118
  getEditorContainerWidth: getEditorContainerWidth,
@@ -23,7 +23,6 @@ var _shortcut = require("@atlaskit/editor-shared-styles/shortcut");
23
23
  var _tableMap = require("@atlaskit/editor-tables/table-map");
24
24
  var _utils2 = require("@atlaskit/editor-tables/utils");
25
25
  var _paintBucketEditorBackgroundColor = _interopRequireDefault(require("@atlaskit/icon/core/migration/paint-bucket--editor-background-color"));
26
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
27
26
  var _primitives = require("@atlaskit/primitives");
28
27
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
29
28
  var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
@@ -242,47 +241,35 @@ var DragMenu = /*#__PURE__*/_react.default.memo(function (_ref) {
242
241
  menuCallback = _convertToDropdownIte.menuCallback;
243
242
  var isToolbarAIFCEnabled = Boolean(api === null || api === void 0 ? void 0 : api.toolbar);
244
243
  var handleSubMenuRef = function handleSubMenuRef(ref) {
245
- var parent = (0, _utils.closestElement)(
246
244
  // Ignored via go/ees005
247
245
  // eslint-disable-next-line @atlaskit/editor/no-as-casting
248
- editorView.dom, '.fabric-editor-popup-scroll-parent');
249
- if (!parent && (0, _platformFeatureFlags.fg)('platform_editor_fix_table_menus_jira')) {
250
- parent = (0, _utils.closestElement)(
251
- // Ignored via go/ees005
252
- // eslint-disable-next-line @atlaskit/editor/no-as-casting
253
- editorView.dom, '.ak-editor-content-area');
254
- }
246
+ var dom = editorView.dom;
247
+ var parent = (0, _utils.closestElement)(dom, '.fabric-editor-popup-scroll-parent') || (0, _utils.closestElement)(dom, '.ak-editor-content-area');
255
248
  if (!(parent && ref)) {
256
249
  return;
257
250
  }
258
251
  var boundariesRect = parent.getBoundingClientRect();
259
252
  var rect = ref.getBoundingClientRect();
260
- if ((0, _platformFeatureFlags.fg)('platform_editor_fix_table_menus_jira')) {
261
- if (!!mountPoint) {
262
- return;
263
- }
264
- var offsetParent = ref === null || ref === void 0 ? void 0 : ref.offsetParent;
265
- if (!offsetParent) {
266
- return;
267
- }
268
- var offsetParentRect = offsetParent.getBoundingClientRect();
269
- var rightOverflow = offsetParentRect.right + rect.width - boundariesRect.right;
270
- var leftOverflow = boundariesRect.left - (offsetParentRect.left - rect.width);
271
- if (rightOverflow > leftOverflow) {
272
- ref.style.left = "-".concat(rect.width, "px");
273
- }
253
+ if (!!mountPoint) {
254
+ return;
255
+ }
256
+ var offsetParent = ref === null || ref === void 0 ? void 0 : ref.offsetParent;
257
+ if (!offsetParent) {
258
+ return;
259
+ }
260
+ var offsetParentRect = offsetParent.getBoundingClientRect();
261
+ var rightOverflow = offsetParentRect.right + rect.width - boundariesRect.right;
262
+ var leftOverflow = boundariesRect.left - (offsetParentRect.left - rect.width);
263
+ if (rightOverflow > leftOverflow) {
264
+ ref.style.left = "-".concat(rect.width, "px");
265
+ }
274
266
 
275
- // if it overflows regardless of side, let it overlap with the parent menu
276
- if (leftOverflow > 0 && rightOverflow > 0) {
277
- if (rightOverflow < leftOverflow) {
278
- ref.style.left = "".concat(offsetParentRect.width - rightOverflow, "px");
279
- } else {
280
- ref.style.left = "-".concat(rect.width - leftOverflow, "px");
281
- }
282
- }
283
- } else {
284
- if (rect.left + rect.width > boundariesRect.width) {
285
- ref.style.left = "-".concat(rect.width, "px");
267
+ // if it overflows regardless of side, let it overlap with the parent menu
268
+ if (leftOverflow > 0 && rightOverflow > 0) {
269
+ if (rightOverflow < leftOverflow) {
270
+ ref.style.left = "".concat(offsetParentRect.width - rightOverflow, "px");
271
+ } else {
272
+ ref.style.left = "-".concat(rect.width - leftOverflow, "px");
286
273
  }
287
274
  }
288
275
  };
@@ -31,7 +31,6 @@ import TableRowAddBelowIcon from '@atlaskit/icon/core/table-row-add-below';
31
31
  import TableRowDeleteIcon from '@atlaskit/icon/core/table-row-delete';
32
32
  import CrossCircleIcon from '@atlaskit/icon/glyph/cross-circle';
33
33
  import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
34
- import { fg } from '@atlaskit/platform-feature-flags';
35
34
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
36
35
  import { Box, xcss } from '@atlaskit/primitives';
37
36
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
@@ -67,47 +66,35 @@ export class ContextualMenu extends Component {
67
66
  });
68
67
  _defineProperty(this, "dropdownMenuRef", /*#__PURE__*/React.createRef());
69
68
  _defineProperty(this, "handleSubMenuRef", ref => {
70
- let parent = closestElement(
71
69
  // Ignored via go/ees005
72
70
  // eslint-disable-next-line @atlaskit/editor/no-as-casting
73
- this.props.editorView.dom, '.fabric-editor-popup-scroll-parent');
74
- if (!parent && fg('platform_editor_fix_table_menus_jira')) {
75
- parent = closestElement(
76
- // Ignored via go/ees005
77
- // eslint-disable-next-line @atlaskit/editor/no-as-casting
78
- this.props.editorView.dom, '.ak-editor-content-area');
79
- }
71
+ const dom = this.props.editorView.dom;
72
+ const parent = closestElement(dom, '.fabric-editor-popup-scroll-parent') || closestElement(dom, '.ak-editor-content-area');
80
73
  if (!(parent && ref)) {
81
74
  return;
82
75
  }
83
76
  const boundariesRect = parent.getBoundingClientRect();
84
77
  const rect = ref.getBoundingClientRect();
85
- if (fg('platform_editor_fix_table_menus_jira')) {
86
- if (!!this.props.mountPoint) {
87
- return;
88
- }
89
- const offsetParent = ref === null || ref === void 0 ? void 0 : ref.offsetParent;
90
- if (!offsetParent) {
91
- return;
92
- }
93
- const offsetParentRect = offsetParent.getBoundingClientRect();
94
- const rightOverflow = offsetParentRect.right + rect.width - boundariesRect.right;
95
- const leftOverflow = boundariesRect.left - (offsetParentRect.left - rect.width);
96
- if (rightOverflow > leftOverflow) {
97
- ref.style.left = `-${rect.width}px`;
98
- }
78
+ if (!!this.props.mountPoint) {
79
+ return;
80
+ }
81
+ const offsetParent = ref === null || ref === void 0 ? void 0 : ref.offsetParent;
82
+ if (!offsetParent) {
83
+ return;
84
+ }
85
+ const offsetParentRect = offsetParent.getBoundingClientRect();
86
+ const rightOverflow = offsetParentRect.right + rect.width - boundariesRect.right;
87
+ const leftOverflow = boundariesRect.left - (offsetParentRect.left - rect.width);
88
+ if (rightOverflow > leftOverflow) {
89
+ ref.style.left = `-${rect.width}px`;
90
+ }
99
91
 
100
- // if it overflows regardless of side, let it overlap with the parent menu
101
- if (leftOverflow > 0 && rightOverflow > 0) {
102
- if (rightOverflow < leftOverflow) {
103
- ref.style.left = `${offsetParentRect.width - rightOverflow}px`;
104
- } else {
105
- ref.style.left = `-${rect.width - leftOverflow}px`;
106
- }
107
- }
108
- } else {
109
- if (rect.left + rect.width > boundariesRect.width) {
110
- ref.style.left = `-${rect.width}px`;
92
+ // if it overflows regardless of side, let it overlap with the parent menu
93
+ if (leftOverflow > 0 && rightOverflow > 0) {
94
+ if (rightOverflow < leftOverflow) {
95
+ ref.style.left = `${offsetParentRect.width - rightOverflow}px`;
96
+ } else {
97
+ ref.style.left = `-${rect.width - leftOverflow}px`;
111
98
  }
112
99
  }
113
100
  });
@@ -820,7 +807,6 @@ export class ContextualMenu extends Component {
820
807
  render() {
821
808
  const {
822
809
  isOpen,
823
- mountPoint,
824
810
  offset,
825
811
  boundariesElement,
826
812
  editorView,
@@ -839,11 +825,10 @@ export class ContextualMenu extends Component {
839
825
  ,
840
826
  onMouseLeave: this.closeSubmenu,
841
827
  ref: this.dropdownMenuRef
842
- }, jsx(DropdownMenu, {
843
- mountTo: fg('platform_editor_fix_table_menus_jira') ? undefined : mountPoint
844
- //This needs be removed when the a11y is completely handled
845
- //Disabling key navigation now as it works only partially
846
- ,
828
+ }, jsx(DropdownMenu
829
+ //This needs be removed when the a11y is completely handled
830
+ //Disabling key navigation now as it works only partially
831
+ , {
847
832
  arrowKeyNavigationProviderOptions: {
848
833
  type: ArrowKeyNavigationType.MENU,
849
834
  disableArrowKeyNavigation: !isCellMenuOpenByKeyboard || this.state.isSubmenuOpen
@@ -8,7 +8,6 @@ import { Popup } from '@atlaskit/editor-common/ui';
8
8
  import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
9
9
  import { akEditorFloatingDialogZIndex, akEditorFloatingOverlapPanelZIndex } from '@atlaskit/editor-shared-styles';
10
10
  import { findCellRectClosestToPos, getSelectionRect, isSelectionType } from '@atlaskit/editor-tables/utils';
11
- import { fg } from '@atlaskit/platform-feature-flags';
12
11
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
13
12
  import { expValNoExposure } from '@atlaskit/tmp-editor-statsig/expVal';
14
13
  import { getPluginState } from '../../pm-plugins/plugin-factory';
@@ -109,7 +108,7 @@ const FloatingContextualMenu = ({
109
108
  ,
110
109
  allowBackgroundColor: pluginConfig.allowBackgroundColor,
111
110
  selectionRect: selectionRect,
112
- mountPoint: fg('platform_editor_fix_table_menus_jira') ? mountPoint : undefined,
111
+ mountPoint: mountPoint,
113
112
  boundariesElement: boundariesElement,
114
113
  editorAnalyticsAPI: editorAnalyticsAPI,
115
114
  getEditorContainerWidth: getEditorContainerWidth,
@@ -21,7 +21,6 @@ import { shortcutStyle } from '@atlaskit/editor-shared-styles/shortcut';
21
21
  import { TableMap } from '@atlaskit/editor-tables/table-map';
22
22
  import { findCellRectClosestToPos, getSelectionRect, isSelectionType } from '@atlaskit/editor-tables/utils';
23
23
  import PaintBucketIcon from '@atlaskit/icon/core/migration/paint-bucket--editor-background-color';
24
- import { fg } from '@atlaskit/platform-feature-flags';
25
24
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
26
25
  import { Box, xcss } from '@atlaskit/primitives';
27
26
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
@@ -232,47 +231,35 @@ const DragMenu = /*#__PURE__*/React.memo(({
232
231
  } = convertToDropdownItems(dragMenuConfig, formatMessage, selectionRect);
233
232
  const isToolbarAIFCEnabled = Boolean(api === null || api === void 0 ? void 0 : api.toolbar);
234
233
  const handleSubMenuRef = ref => {
235
- let parent = closestElement(
236
234
  // Ignored via go/ees005
237
235
  // eslint-disable-next-line @atlaskit/editor/no-as-casting
238
- editorView.dom, '.fabric-editor-popup-scroll-parent');
239
- if (!parent && fg('platform_editor_fix_table_menus_jira')) {
240
- parent = closestElement(
241
- // Ignored via go/ees005
242
- // eslint-disable-next-line @atlaskit/editor/no-as-casting
243
- editorView.dom, '.ak-editor-content-area');
244
- }
236
+ const dom = editorView.dom;
237
+ const parent = closestElement(dom, '.fabric-editor-popup-scroll-parent') || closestElement(dom, '.ak-editor-content-area');
245
238
  if (!(parent && ref)) {
246
239
  return;
247
240
  }
248
241
  const boundariesRect = parent.getBoundingClientRect();
249
242
  const rect = ref.getBoundingClientRect();
250
- if (fg('platform_editor_fix_table_menus_jira')) {
251
- if (!!mountPoint) {
252
- return;
253
- }
254
- const offsetParent = ref === null || ref === void 0 ? void 0 : ref.offsetParent;
255
- if (!offsetParent) {
256
- return;
257
- }
258
- const offsetParentRect = offsetParent.getBoundingClientRect();
259
- const rightOverflow = offsetParentRect.right + rect.width - boundariesRect.right;
260
- const leftOverflow = boundariesRect.left - (offsetParentRect.left - rect.width);
261
- if (rightOverflow > leftOverflow) {
262
- ref.style.left = `-${rect.width}px`;
263
- }
243
+ if (!!mountPoint) {
244
+ return;
245
+ }
246
+ const offsetParent = ref === null || ref === void 0 ? void 0 : ref.offsetParent;
247
+ if (!offsetParent) {
248
+ return;
249
+ }
250
+ const offsetParentRect = offsetParent.getBoundingClientRect();
251
+ const rightOverflow = offsetParentRect.right + rect.width - boundariesRect.right;
252
+ const leftOverflow = boundariesRect.left - (offsetParentRect.left - rect.width);
253
+ if (rightOverflow > leftOverflow) {
254
+ ref.style.left = `-${rect.width}px`;
255
+ }
264
256
 
265
- // if it overflows regardless of side, let it overlap with the parent menu
266
- if (leftOverflow > 0 && rightOverflow > 0) {
267
- if (rightOverflow < leftOverflow) {
268
- ref.style.left = `${offsetParentRect.width - rightOverflow}px`;
269
- } else {
270
- ref.style.left = `-${rect.width - leftOverflow}px`;
271
- }
272
- }
273
- } else {
274
- if (rect.left + rect.width > boundariesRect.width) {
275
- ref.style.left = `-${rect.width}px`;
257
+ // if it overflows regardless of side, let it overlap with the parent menu
258
+ if (leftOverflow > 0 && rightOverflow > 0) {
259
+ if (rightOverflow < leftOverflow) {
260
+ ref.style.left = `${offsetParentRect.width - rightOverflow}px`;
261
+ } else {
262
+ ref.style.left = `-${rect.width - leftOverflow}px`;
276
263
  }
277
264
  }
278
265
  };
@@ -41,7 +41,6 @@ import TableRowAddBelowIcon from '@atlaskit/icon/core/table-row-add-below';
41
41
  import TableRowDeleteIcon from '@atlaskit/icon/core/table-row-delete';
42
42
  import CrossCircleIcon from '@atlaskit/icon/glyph/cross-circle';
43
43
  import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
44
- import { fg } from '@atlaskit/platform-feature-flags';
45
44
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
46
45
  import { Box, xcss } from '@atlaskit/primitives';
47
46
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
@@ -82,47 +81,35 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
82
81
  });
83
82
  _defineProperty(_this, "dropdownMenuRef", /*#__PURE__*/React.createRef());
84
83
  _defineProperty(_this, "handleSubMenuRef", function (ref) {
85
- var parent = closestElement(
86
84
  // Ignored via go/ees005
87
85
  // eslint-disable-next-line @atlaskit/editor/no-as-casting
88
- _this.props.editorView.dom, '.fabric-editor-popup-scroll-parent');
89
- if (!parent && fg('platform_editor_fix_table_menus_jira')) {
90
- parent = closestElement(
91
- // Ignored via go/ees005
92
- // eslint-disable-next-line @atlaskit/editor/no-as-casting
93
- _this.props.editorView.dom, '.ak-editor-content-area');
94
- }
86
+ var dom = _this.props.editorView.dom;
87
+ var parent = closestElement(dom, '.fabric-editor-popup-scroll-parent') || closestElement(dom, '.ak-editor-content-area');
95
88
  if (!(parent && ref)) {
96
89
  return;
97
90
  }
98
91
  var boundariesRect = parent.getBoundingClientRect();
99
92
  var rect = ref.getBoundingClientRect();
100
- if (fg('platform_editor_fix_table_menus_jira')) {
101
- if (!!_this.props.mountPoint) {
102
- return;
103
- }
104
- var offsetParent = ref === null || ref === void 0 ? void 0 : ref.offsetParent;
105
- if (!offsetParent) {
106
- return;
107
- }
108
- var offsetParentRect = offsetParent.getBoundingClientRect();
109
- var rightOverflow = offsetParentRect.right + rect.width - boundariesRect.right;
110
- var leftOverflow = boundariesRect.left - (offsetParentRect.left - rect.width);
111
- if (rightOverflow > leftOverflow) {
112
- ref.style.left = "-".concat(rect.width, "px");
113
- }
93
+ if (!!_this.props.mountPoint) {
94
+ return;
95
+ }
96
+ var offsetParent = ref === null || ref === void 0 ? void 0 : ref.offsetParent;
97
+ if (!offsetParent) {
98
+ return;
99
+ }
100
+ var offsetParentRect = offsetParent.getBoundingClientRect();
101
+ var rightOverflow = offsetParentRect.right + rect.width - boundariesRect.right;
102
+ var leftOverflow = boundariesRect.left - (offsetParentRect.left - rect.width);
103
+ if (rightOverflow > leftOverflow) {
104
+ ref.style.left = "-".concat(rect.width, "px");
105
+ }
114
106
 
115
- // if it overflows regardless of side, let it overlap with the parent menu
116
- if (leftOverflow > 0 && rightOverflow > 0) {
117
- if (rightOverflow < leftOverflow) {
118
- ref.style.left = "".concat(offsetParentRect.width - rightOverflow, "px");
119
- } else {
120
- ref.style.left = "-".concat(rect.width - leftOverflow, "px");
121
- }
122
- }
123
- } else {
124
- if (rect.left + rect.width > boundariesRect.width) {
125
- ref.style.left = "-".concat(rect.width, "px");
107
+ // if it overflows regardless of side, let it overlap with the parent menu
108
+ if (leftOverflow > 0 && rightOverflow > 0) {
109
+ if (rightOverflow < leftOverflow) {
110
+ ref.style.left = "".concat(offsetParentRect.width - rightOverflow, "px");
111
+ } else {
112
+ ref.style.left = "-".concat(rect.width - leftOverflow, "px");
126
113
  }
127
114
  }
128
115
  });
@@ -759,7 +746,6 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
759
746
  var _this2 = this;
760
747
  var _this$props13 = this.props,
761
748
  isOpen = _this$props13.isOpen,
762
- mountPoint = _this$props13.mountPoint,
763
749
  offset = _this$props13.offset,
764
750
  boundariesElement = _this$props13.boundariesElement,
765
751
  editorView = _this$props13.editorView,
@@ -777,11 +763,10 @@ export var ContextualMenu = /*#__PURE__*/function (_Component) {
777
763
  ,
778
764
  onMouseLeave: _this2.closeSubmenu,
779
765
  ref: _this2.dropdownMenuRef
780
- }, jsx(DropdownMenu, {
781
- mountTo: fg('platform_editor_fix_table_menus_jira') ? undefined : mountPoint
782
- //This needs be removed when the a11y is completely handled
783
- //Disabling key navigation now as it works only partially
784
- ,
766
+ }, jsx(DropdownMenu
767
+ //This needs be removed when the a11y is completely handled
768
+ //Disabling key navigation now as it works only partially
769
+ , {
785
770
  arrowKeyNavigationProviderOptions: {
786
771
  type: ArrowKeyNavigationType.MENU,
787
772
  disableArrowKeyNavigation: !isCellMenuOpenByKeyboard || _this2.state.isSubmenuOpen
@@ -8,7 +8,6 @@ import { Popup } from '@atlaskit/editor-common/ui';
8
8
  import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
9
9
  import { akEditorFloatingDialogZIndex, akEditorFloatingOverlapPanelZIndex } from '@atlaskit/editor-shared-styles';
10
10
  import { findCellRectClosestToPos, getSelectionRect, isSelectionType } from '@atlaskit/editor-tables/utils';
11
- import { fg } from '@atlaskit/platform-feature-flags';
12
11
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
13
12
  import { expValNoExposure } from '@atlaskit/tmp-editor-statsig/expVal';
14
13
  import { getPluginState } from '../../pm-plugins/plugin-factory';
@@ -105,7 +104,7 @@ var FloatingContextualMenu = function FloatingContextualMenu(_ref) {
105
104
  ,
106
105
  allowBackgroundColor: pluginConfig.allowBackgroundColor,
107
106
  selectionRect: selectionRect,
108
- mountPoint: fg('platform_editor_fix_table_menus_jira') ? mountPoint : undefined,
107
+ mountPoint: mountPoint,
109
108
  boundariesElement: boundariesElement,
110
109
  editorAnalyticsAPI: editorAnalyticsAPI,
111
110
  getEditorContainerWidth: getEditorContainerWidth,
@@ -23,7 +23,6 @@ import { shortcutStyle } from '@atlaskit/editor-shared-styles/shortcut';
23
23
  import { TableMap } from '@atlaskit/editor-tables/table-map';
24
24
  import { findCellRectClosestToPos, getSelectionRect, isSelectionType } from '@atlaskit/editor-tables/utils';
25
25
  import PaintBucketIcon from '@atlaskit/icon/core/migration/paint-bucket--editor-background-color';
26
- import { fg } from '@atlaskit/platform-feature-flags';
27
26
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
28
27
  import { Box, xcss } from '@atlaskit/primitives';
29
28
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
@@ -231,47 +230,35 @@ var DragMenu = /*#__PURE__*/React.memo(function (_ref) {
231
230
  menuCallback = _convertToDropdownIte.menuCallback;
232
231
  var isToolbarAIFCEnabled = Boolean(api === null || api === void 0 ? void 0 : api.toolbar);
233
232
  var handleSubMenuRef = function handleSubMenuRef(ref) {
234
- var parent = closestElement(
235
233
  // Ignored via go/ees005
236
234
  // eslint-disable-next-line @atlaskit/editor/no-as-casting
237
- editorView.dom, '.fabric-editor-popup-scroll-parent');
238
- if (!parent && fg('platform_editor_fix_table_menus_jira')) {
239
- parent = closestElement(
240
- // Ignored via go/ees005
241
- // eslint-disable-next-line @atlaskit/editor/no-as-casting
242
- editorView.dom, '.ak-editor-content-area');
243
- }
235
+ var dom = editorView.dom;
236
+ var parent = closestElement(dom, '.fabric-editor-popup-scroll-parent') || closestElement(dom, '.ak-editor-content-area');
244
237
  if (!(parent && ref)) {
245
238
  return;
246
239
  }
247
240
  var boundariesRect = parent.getBoundingClientRect();
248
241
  var rect = ref.getBoundingClientRect();
249
- if (fg('platform_editor_fix_table_menus_jira')) {
250
- if (!!mountPoint) {
251
- return;
252
- }
253
- var offsetParent = ref === null || ref === void 0 ? void 0 : ref.offsetParent;
254
- if (!offsetParent) {
255
- return;
256
- }
257
- var offsetParentRect = offsetParent.getBoundingClientRect();
258
- var rightOverflow = offsetParentRect.right + rect.width - boundariesRect.right;
259
- var leftOverflow = boundariesRect.left - (offsetParentRect.left - rect.width);
260
- if (rightOverflow > leftOverflow) {
261
- ref.style.left = "-".concat(rect.width, "px");
262
- }
242
+ if (!!mountPoint) {
243
+ return;
244
+ }
245
+ var offsetParent = ref === null || ref === void 0 ? void 0 : ref.offsetParent;
246
+ if (!offsetParent) {
247
+ return;
248
+ }
249
+ var offsetParentRect = offsetParent.getBoundingClientRect();
250
+ var rightOverflow = offsetParentRect.right + rect.width - boundariesRect.right;
251
+ var leftOverflow = boundariesRect.left - (offsetParentRect.left - rect.width);
252
+ if (rightOverflow > leftOverflow) {
253
+ ref.style.left = "-".concat(rect.width, "px");
254
+ }
263
255
 
264
- // if it overflows regardless of side, let it overlap with the parent menu
265
- if (leftOverflow > 0 && rightOverflow > 0) {
266
- if (rightOverflow < leftOverflow) {
267
- ref.style.left = "".concat(offsetParentRect.width - rightOverflow, "px");
268
- } else {
269
- ref.style.left = "-".concat(rect.width - leftOverflow, "px");
270
- }
271
- }
272
- } else {
273
- if (rect.left + rect.width > boundariesRect.width) {
274
- ref.style.left = "-".concat(rect.width, "px");
256
+ // if it overflows regardless of side, let it overlap with the parent menu
257
+ if (leftOverflow > 0 && rightOverflow > 0) {
258
+ if (rightOverflow < leftOverflow) {
259
+ ref.style.left = "".concat(offsetParentRect.width - rightOverflow, "px");
260
+ } else {
261
+ ref.style.left = "-".concat(rect.width - leftOverflow, "px");
275
262
  }
276
263
  }
277
264
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "15.4.8",
3
+ "version": "15.4.9",
4
4
  "description": "Table plugin for the @atlaskit/editor",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -135,9 +135,6 @@
135
135
  "platform_editor_fix_confirm_table_removal": {
136
136
  "type": "boolean"
137
137
  },
138
- "platform_editor_fix_table_menus_jira": {
139
- "type": "boolean"
140
- },
141
138
  "platform_editor_content_mode_button_mvp": {
142
139
  "type": "boolean"
143
140
  },