@atlaskit/editor-common 110.9.2 → 110.10.0

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 (52) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/afm-cc/tsconfig.json +3 -0
  3. package/afm-dev-agents/tsconfig.json +3 -0
  4. package/afm-jira/tsconfig.json +3 -0
  5. package/afm-passionfruit/tsconfig.json +3 -0
  6. package/afm-post-office/tsconfig.json +3 -0
  7. package/afm-rovo-extension/tsconfig.json +3 -0
  8. package/afm-townsquare/tsconfig.json +3 -0
  9. package/dist/cjs/element-browser/components/StatelessElementBrowser.js +1 -1
  10. package/dist/cjs/extensibility/Extension/Lozenge/EditToggle.js +2 -2
  11. package/dist/cjs/extensibility/Extension/Lozenge/ExtensionLabel.js +2 -2
  12. package/dist/cjs/link/LinkSearch/LinkSearchListItem.js +1 -1
  13. package/dist/cjs/monitoring/error.js +1 -1
  14. package/dist/cjs/resizer/BreakoutResizer.js +3 -10
  15. package/dist/cjs/toolbar/rank.js +1 -1
  16. package/dist/cjs/ui/DropList/index.js +1 -1
  17. package/dist/cjs/ui/HoverLinkOverlay/index.js +1 -1
  18. package/dist/cjs/ui/Popup/index.js +17 -3
  19. package/dist/cjs/ui/Popup/utils.js +12 -7
  20. package/dist/cjs/ui-menu/DropdownMenu/index.js +1 -1
  21. package/dist/cjs/utils/input-rules.js +2 -2
  22. package/dist/es2019/element-browser/components/StatelessElementBrowser.js +1 -1
  23. package/dist/es2019/extensibility/Extension/Lozenge/EditToggle.js +2 -2
  24. package/dist/es2019/extensibility/Extension/Lozenge/ExtensionLabel.js +2 -2
  25. package/dist/es2019/link/LinkSearch/LinkSearchListItem.js +1 -1
  26. package/dist/es2019/monitoring/error.js +1 -1
  27. package/dist/es2019/resizer/BreakoutResizer.js +3 -10
  28. package/dist/es2019/toolbar/rank.js +2 -4
  29. package/dist/es2019/ui/DropList/index.js +1 -1
  30. package/dist/es2019/ui/HoverLinkOverlay/index.js +1 -1
  31. package/dist/es2019/ui/Popup/index.js +17 -3
  32. package/dist/es2019/ui/Popup/utils.js +12 -7
  33. package/dist/es2019/ui-menu/DropdownMenu/index.js +1 -1
  34. package/dist/es2019/utils/input-rules.js +1 -1
  35. package/dist/esm/element-browser/components/StatelessElementBrowser.js +1 -1
  36. package/dist/esm/extensibility/Extension/Lozenge/EditToggle.js +2 -2
  37. package/dist/esm/extensibility/Extension/Lozenge/ExtensionLabel.js +2 -2
  38. package/dist/esm/link/LinkSearch/LinkSearchListItem.js +1 -1
  39. package/dist/esm/monitoring/error.js +1 -1
  40. package/dist/esm/resizer/BreakoutResizer.js +3 -10
  41. package/dist/esm/toolbar/rank.js +1 -1
  42. package/dist/esm/ui/DropList/index.js +1 -1
  43. package/dist/esm/ui/HoverLinkOverlay/index.js +1 -1
  44. package/dist/esm/ui/Popup/index.js +17 -3
  45. package/dist/esm/ui/Popup/utils.js +12 -7
  46. package/dist/esm/ui-menu/DropdownMenu/index.js +1 -1
  47. package/dist/esm/utils/input-rules.js +1 -1
  48. package/dist/types/toolbar/rank.d.ts +0 -2
  49. package/dist/types/ui/Popup/utils.d.ts +2 -1
  50. package/dist/types-ts4.5/toolbar/rank.d.ts +0 -2
  51. package/dist/types-ts4.5/ui/Popup/utils.d.ts +2 -1
  52. package/package.json +8 -13
package/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 110.10.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`0ac75e0d28c72`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0ac75e0d28c72) -
8
+ Migrate @atlaskit/editor-prosemirror/history to @atlaskit/prosemirror-history package
9
+
10
+ ### Patch Changes
11
+
12
+ - Updated dependencies
13
+
14
+ ## 110.9.3
15
+
16
+ ### Patch Changes
17
+
18
+ - [`2d1801fdf502c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2d1801fdf502c) -
19
+ [ux] AIFC-896 fix linker picker position
20
+ - Updated dependencies
21
+
3
22
  ## 110.9.2
4
23
 
5
24
  ### Patch Changes
@@ -143,6 +143,9 @@
143
143
  {
144
144
  "path": "../../../people-and-teams/profilecard/afm-cc/tsconfig.json"
145
145
  },
146
+ {
147
+ "path": "../../prosemirror-history/afm-cc/tsconfig.json"
148
+ },
146
149
  {
147
150
  "path": "../../../react-ufo/atlaskit/afm-cc/tsconfig.json"
148
151
  },
@@ -143,6 +143,9 @@
143
143
  {
144
144
  "path": "../../../people-and-teams/profilecard/afm-dev-agents/tsconfig.json"
145
145
  },
146
+ {
147
+ "path": "../../prosemirror-history/afm-dev-agents/tsconfig.json"
148
+ },
146
149
  {
147
150
  "path": "../../../react-ufo/atlaskit/afm-dev-agents/tsconfig.json"
148
151
  },
@@ -143,6 +143,9 @@
143
143
  {
144
144
  "path": "../../../people-and-teams/profilecard/afm-jira/tsconfig.json"
145
145
  },
146
+ {
147
+ "path": "../../prosemirror-history/afm-jira/tsconfig.json"
148
+ },
146
149
  {
147
150
  "path": "../../../react-ufo/atlaskit/afm-jira/tsconfig.json"
148
151
  },
@@ -143,6 +143,9 @@
143
143
  {
144
144
  "path": "../../../people-and-teams/profilecard/afm-passionfruit/tsconfig.json"
145
145
  },
146
+ {
147
+ "path": "../../prosemirror-history/afm-passionfruit/tsconfig.json"
148
+ },
146
149
  {
147
150
  "path": "../../../react-ufo/atlaskit/afm-passionfruit/tsconfig.json"
148
151
  },
@@ -143,6 +143,9 @@
143
143
  {
144
144
  "path": "../../../people-and-teams/profilecard/afm-post-office/tsconfig.json"
145
145
  },
146
+ {
147
+ "path": "../../prosemirror-history/afm-post-office/tsconfig.json"
148
+ },
146
149
  {
147
150
  "path": "../../../react-ufo/atlaskit/afm-post-office/tsconfig.json"
148
151
  },
@@ -143,6 +143,9 @@
143
143
  {
144
144
  "path": "../../../people-and-teams/profilecard/afm-rovo-extension/tsconfig.json"
145
145
  },
146
+ {
147
+ "path": "../../prosemirror-history/afm-rovo-extension/tsconfig.json"
148
+ },
146
149
  {
147
150
  "path": "../../../react-ufo/atlaskit/afm-rovo-extension/tsconfig.json"
148
151
  },
@@ -143,6 +143,9 @@
143
143
  {
144
144
  "path": "../../../people-and-teams/profilecard/afm-townsquare/tsconfig.json"
145
145
  },
146
+ {
147
+ "path": "../../prosemirror-history/afm-townsquare/tsconfig.json"
148
+ },
146
149
  {
147
150
  "path": "../../../react-ufo/atlaskit/afm-townsquare/tsconfig.json"
148
151
  },
@@ -254,7 +254,7 @@ function StatelessElementBrowser(props) {
254
254
  var handleClick = function handleClick() {
255
255
  setCanFocusSearch(true);
256
256
  };
257
- return /* eslint-disable-next-line jsx-a11y/no-static-element-interactions, @atlassian/a11y/interactive-element-not-keyboard-focusable */(
257
+ return /* eslint-disable-next-line @atlassian/a11y/no-static-element-interactions, @atlassian/a11y/interactive-element-not-keyboard-focusable*/(
258
258
  (0, _react2.jsx)("div", {
259
259
  css: wrapper,
260
260
  "data-testid": "element-browser",
@@ -94,7 +94,7 @@ var EditToggle = exports.EditToggle = function EditToggle(_ref) {
94
94
  }
95
95
  }, [handleClick]);
96
96
  return (
97
- // eslint-disable-next-line jsx-a11y/no-static-element-interactions
97
+ // eslint-disable-next-line @atlassian/a11y/no-static-element-interactions
98
98
  (0, _react2.jsx)("div", {
99
99
  "data-testid": "extension-edit-toggle-container"
100
100
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
@@ -106,7 +106,7 @@ var EditToggle = exports.EditToggle = function EditToggle(_ref) {
106
106
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
107
107
  ,
108
108
  className: "extension-edit-toggle-container"
109
- // eslint-disable-next-line jsx-a11y/mouse-events-have-key-events, @atlassian/a11y/mouse-events-have-key-events
109
+ // eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
110
110
  ,
111
111
  onMouseOver: function onMouseOver() {
112
112
  return setIsNodeHovered === null || setIsNodeHovered === void 0 ? void 0 : setIsNodeHovered(true);
@@ -163,7 +163,7 @@ var ExtensionLabel = exports.ExtensionLabel = function ExtensionLabel(_ref) {
163
163
  'extension-icon': (0, _expValEquals.expValEquals)('cc_editor_ttvc_release_bundle_one', 'extensionHoverRefactor', true)
164
164
  });
165
165
  return (
166
- // eslint-disable-next-line jsx-a11y/no-static-element-interactions, @atlassian/a11y/click-events-have-key-events, @atlassian/a11y/interactive-element-not-keyboard-focusable
166
+ // eslint-disable-next-line @atlassian/a11y/no-static-element-interactions, @atlassian/a11y/click-events-have-key-events, @atlassian/a11y/interactive-element-not-keyboard-focusable
167
167
  (0, _react.jsx)("div", {
168
168
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
169
169
  css: containerStyles
@@ -173,7 +173,7 @@ var ExtensionLabel = exports.ExtensionLabel = function ExtensionLabel(_ref) {
173
173
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
174
174
  ,
175
175
  style: customContainerStyles
176
- // eslint-disable-next-line jsx-a11y/mouse-events-have-key-events, @atlassian/a11y/mouse-events-have-key-events
176
+ // eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
177
177
  ,
178
178
  onMouseOver: function onMouseOver() {
179
179
  setIsNodeHovered === null || setIsNodeHovered === void 0 || setIsNodeHovered(true);
@@ -241,7 +241,7 @@ var LinkSearchListItem = /*#__PURE__*/function (_React$PureComponent) {
241
241
  id = _this$props7.id,
242
242
  role = _this$props7.role;
243
243
  return (
244
- // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions, @atlassian/a11y/no-noninteractive-element-interactions, @atlassian/a11y/click-events-have-key-events
244
+ // eslint-disable-next-line @atlassian/a11y/no-noninteractive-element-interactions, @atlassian/a11y/click-events-have-key-events
245
245
  (0, _react2.jsx)("li", {
246
246
  css: [container, selected && containerSelected],
247
247
  role: role,
@@ -16,7 +16,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
16
16
  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); }
17
17
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
18
18
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
19
- var packageVersion = "110.9.2";
19
+ var packageVersion = "110.9.3";
20
20
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
21
21
  // Remove URL as it has UGC
22
22
  // Ignored via go/ees007
@@ -63,17 +63,10 @@ var getHandleStyle = function getHandleStyle(node, hidden) {
63
63
  }
64
64
  };
65
65
  var ignoreResizerMutations = exports.ignoreResizerMutations = function ignoreResizerMutations(mutation) {
66
- if ((0, _platformFeatureFlags.fg)('platform_editor_breakoutresizer_remove_assertion')) {
67
- if (mutation.target instanceof Element) {
68
- return mutation.target.classList.contains('resizer-item') || mutation.type === 'attributes' && mutation.attributeName === 'style';
69
- }
70
- return mutation.type === 'attributes' && mutation.attributeName === 'style';
71
- } else {
72
- return (
73
- // eslint-disable-next-line @atlaskit/editor/no-as-casting
74
- mutation.target.classList.contains('resizer-item') || mutation.type === 'attributes' && mutation.attributeName === 'style'
75
- );
66
+ if (mutation.target instanceof Element) {
67
+ return mutation.target.classList.contains('resizer-item') || mutation.type === 'attributes' && mutation.attributeName === 'style';
76
68
  }
69
+ return mutation.type === 'attributes' && mutation.attributeName === 'style';
77
70
  };
78
71
  var resizingStyles = {
79
72
  left: '50%',
@@ -43,7 +43,7 @@ var TEXT_STYLES_MENU_SECTION_RANK = exports.TEXT_STYLES_MENU_SECTION_RANK = (0,
43
43
  /**
44
44
  * Text formatting group
45
45
  */
46
- var TEXT_FORMAT_GROUP_RANK = exports.TEXT_FORMAT_GROUP_RANK = (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, _keys.BOLD_BUTTON_GROUP.key, 100), _keys.UNDERLINE_BUTTON_GROUP.key, 200), _keys.TEXT_FORMATTING_HERO_BUTTON.key, 300), _keys.TEXT_FORMATTING_MENU.key, 400);
46
+ var TEXT_FORMAT_GROUP_RANK = exports.TEXT_FORMAT_GROUP_RANK = (0, _defineProperty2.default)((0, _defineProperty2.default)({}, _keys.TEXT_FORMATTING_HERO_BUTTON.key, 100), _keys.TEXT_FORMATTING_MENU.key, 200);
47
47
  var TEXT_FORMAT_GROUP_COLLAPSED_RANK = exports.TEXT_FORMAT_GROUP_COLLAPSED_RANK = (0, _defineProperty2.default)((0, _defineProperty2.default)({}, _keys.TEXT_FORMATTING_HERO_BUTTON_COLLAPSED.key, 100), _keys.TEXT_FORMATTING_MENU.key, 200);
48
48
  var TEXT_FORMAT_MENU_RANK = exports.TEXT_FORMAT_MENU_RANK = (0, _defineProperty2.default)((0, _defineProperty2.default)({}, _keys.TEXT_FORMATTING_MENU_SECTION.key, 100), _keys.CLEAR_FORMARTTING_MENU_SECTION.key, 200);
49
49
  var TEXT_FORMATTING_MENU_SECTION_RANK = exports.TEXT_FORMATTING_MENU_SECTION_RANK = (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, _keys.BOLD_MENU_ITEM.key, 100), _keys.ITALIC_MENU_ITEM.key, 200), _keys.UNDERLINE_MENU_ITEM.key, 300), _keys.STRIKE_MENU_ITEM.key, 400), _keys.CODE_MENU_ITEM.key, 500), _keys.SUBSCRIPT_MENU_ITEM.key, 600), _keys.SUPERSCRIPT_MENU_ITEM.key, 700);
@@ -24,7 +24,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
24
24
  * @jsx jsx
25
25
  */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
26
26
  var packageName = "@atlaskit/editor-common";
27
- var packageVersion = "110.9.2";
27
+ var packageVersion = "110.9.3";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -188,7 +188,7 @@ var HoverLinkOverlay = function HoverLinkOverlay(_ref) {
188
188
  });
189
189
  }
190
190
  return (
191
- // eslint-disable-next-line jsx-a11y/no-static-element-interactions
191
+ // eslint-disable-next-line @atlassian/a11y/no-static-element-interactions
192
192
  (0, _react2.jsx)("span", {
193
193
  ref: containerRef,
194
194
  css: containerStyles,
@@ -116,7 +116,8 @@ var Popup = exports.default = /*#__PURE__*/function (_React$Component) {
116
116
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
117
117
  offset: offset,
118
118
  allowOutOfBounds: allowOutOfBounds,
119
- rect: rect
119
+ rect: rect,
120
+ boundariesElement: (0, _platformFeatureFlags.fg)('platform_editor_link_popup_position_fix_aifc') ? boundariesElement || document.body : undefined
120
121
  });
121
122
  position = onPositionCalculated ? onPositionCalculated(position) : position;
122
123
  if (typeof position.top !== 'undefined' && absoluteOffset !== null && absoluteOffset !== void 0 && absoluteOffset.top) {
@@ -179,6 +180,10 @@ var Popup = exports.default = /*#__PURE__*/function (_React$Component) {
179
180
  }, {
180
181
  key: "initPopup",
181
182
  value: function initPopup(popup) {
183
+ if (this.popupRef.current && (0, _platformFeatureFlags.fg)('platform_editor_link_popup_position_fix_aifc')) {
184
+ var _this$resizeObserver;
185
+ (_this$resizeObserver = this.resizeObserver) === null || _this$resizeObserver === void 0 || _this$resizeObserver.unobserve(this.popupRef.current);
186
+ }
182
187
  this.popupRef.current = popup;
183
188
  var target = this.props.target;
184
189
  var overflowScrollParent = (0, _utils.findOverflowScrollParent)(popup);
@@ -203,6 +208,10 @@ var Popup = exports.default = /*#__PURE__*/function (_React$Component) {
203
208
  if (this.props.focusTrap) {
204
209
  this.initFocusTrap();
205
210
  }
211
+ if (this.popupRef.current && (0, _platformFeatureFlags.fg)('platform_editor_link_popup_position_fix_aifc')) {
212
+ var _this$resizeObserver2;
213
+ (_this$resizeObserver2 = this.resizeObserver) === null || _this$resizeObserver2 === void 0 || _this$resizeObserver2.observe(this.popupRef.current);
214
+ }
206
215
  }
207
216
  }, {
208
217
  key: "destroyFocusTrap",
@@ -283,8 +292,13 @@ var Popup = exports.default = /*#__PURE__*/function (_React$Component) {
283
292
  // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
284
293
  this.scrollElement.removeEventListener('scroll', this.onResize);
285
294
  }
286
- if (this.scrollParentElement && this.resizeObserver) {
287
- this.resizeObserver.unobserve(this.scrollParentElement);
295
+ if ((0, _platformFeatureFlags.fg)('platform_editor_link_popup_position_fix_aifc')) {
296
+ var _this$resizeObserver3;
297
+ (_this$resizeObserver3 = this.resizeObserver) === null || _this$resizeObserver3 === void 0 || _this$resizeObserver3.disconnect();
298
+ } else {
299
+ if (this.scrollParentElement && this.resizeObserver) {
300
+ this.resizeObserver.unobserve(this.scrollParentElement);
301
+ }
288
302
  }
289
303
  this.scheduledUpdatePosition.cancel();
290
304
  this.destroyFocusTrap();
@@ -144,8 +144,9 @@ var calculateVerticalStickBottom = function calculateVerticalStickBottom(_ref2)
144
144
  targetHeight = _ref2.targetHeight,
145
145
  popup = _ref2.popup,
146
146
  offset = _ref2.offset,
147
- position = _ref2.position;
148
- var scrollParent = findOverflowScrollParent(target);
147
+ position = _ref2.position,
148
+ boundariesElement = _ref2.boundariesElement;
149
+ var scrollParent = findOverflowScrollParent(target) || boundariesElement;
149
150
  var newPos = _objectSpread({}, position);
150
151
  if (scrollParent) {
151
152
  var topOffsetTop = targetTop - scrollParent.getBoundingClientRect().top;
@@ -167,8 +168,9 @@ var calculateVerticalStickTop = function calculateVerticalStickTop(_ref3) {
167
168
  popupOffsetParent = _ref3.popupOffsetParent,
168
169
  offset = _ref3.offset,
169
170
  position = _ref3.position,
170
- placement = _ref3.placement;
171
- var scrollParent = findOverflowScrollParent(target);
171
+ placement = _ref3.placement,
172
+ boundariesElement = _ref3.boundariesElement;
173
+ var scrollParent = findOverflowScrollParent(target) || boundariesElement;
172
174
  var newPos = _objectSpread({}, position);
173
175
  if (scrollParent) {
174
176
  var _scrollParent$getBoun = scrollParent.getBoundingClientRect(),
@@ -229,7 +231,8 @@ function calculatePosition(_ref5) {
229
231
  stick = _ref5.stick,
230
232
  _ref5$allowOutOfBound = _ref5.allowOutOfBounds,
231
233
  allowOutOfBounds = _ref5$allowOutOfBound === void 0 ? false : _ref5$allowOutOfBound,
232
- rect = _ref5.rect;
234
+ rect = _ref5.rect,
235
+ boundariesElement = _ref5.boundariesElement;
233
236
  var position = {};
234
237
  if (!target || !popup || !popup.offsetParent) {
235
238
  return position;
@@ -285,7 +288,8 @@ function calculatePosition(_ref5) {
285
288
  popup: popup,
286
289
  offset: offset,
287
290
  position: position,
288
- placement: verticalPlacement
291
+ placement: verticalPlacement,
292
+ boundariesElement: boundariesElement
289
293
  });
290
294
  }
291
295
  if (verticalPlacement !== 'top' && verticalPlacement !== 'start' && stick) {
@@ -295,7 +299,8 @@ function calculatePosition(_ref5) {
295
299
  targetHeight: targetHeight,
296
300
  popup: popup,
297
301
  offset: offset,
298
- position: position
302
+ position: position,
303
+ boundariesElement: boundariesElement
299
304
  });
300
305
  }
301
306
  var horizontalPosition = calculateHorizontalPlacement({
@@ -323,7 +323,7 @@ function DropdownMenuItem(_ref) {
323
323
  // especially when we pass any interactive element as a item.content
324
324
  var tabIndex = item.wrapperTabIndex === null ? undefined : item.wrapperTabIndex || -1;
325
325
  var dropListItem =
326
- // eslint-disable-next-line jsx-a11y/no-static-element-interactions
326
+ // eslint-disable-next-line @atlassian/a11y/no-static-element-interactions
327
327
  (0, _react2.jsx)("div", {
328
328
  css: function css() {
329
329
  return buttonStyles(item.isActive, submenuActive);
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.inputRuleWithAnalytics = exports.createWrappingJoinRule = exports.createRule = void 0;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
- var _history = require("@atlaskit/editor-prosemirror/history");
10
9
  var _transform = require("@atlaskit/editor-prosemirror/transform");
10
+ var _prosemirrorHistory = require("@atlaskit/prosemirror-history");
11
11
  var _analytics = require("../analytics");
12
12
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
13
13
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
@@ -66,7 +66,7 @@ var createRule = exports.createRule = function createRule(match, handler) {
66
66
  match: match,
67
67
  handler: handler,
68
68
  onHandlerApply: function onHandlerApply(_state, tr) {
69
- (0, _history.closeHistory)(tr);
69
+ (0, _prosemirrorHistory.closeHistory)(tr);
70
70
  }
71
71
  };
72
72
  };
@@ -240,7 +240,7 @@ function StatelessElementBrowser(props) {
240
240
  const handleClick = () => {
241
241
  setCanFocusSearch(true);
242
242
  };
243
- return /* eslint-disable-next-line jsx-a11y/no-static-element-interactions, @atlassian/a11y/interactive-element-not-keyboard-focusable */(
243
+ return /* eslint-disable-next-line @atlassian/a11y/no-static-element-interactions, @atlassian/a11y/interactive-element-not-keyboard-focusable*/(
244
244
  jsx("div", {
245
245
  css: wrapper,
246
246
  "data-testid": "element-browser",
@@ -87,7 +87,7 @@ export const EditToggle = ({
87
87
  }
88
88
  }, [handleClick]);
89
89
  return (
90
- // eslint-disable-next-line jsx-a11y/no-static-element-interactions
90
+ // eslint-disable-next-line @atlassian/a11y/no-static-element-interactions
91
91
  jsx("div", {
92
92
  "data-testid": "extension-edit-toggle-container"
93
93
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
@@ -99,7 +99,7 @@ export const EditToggle = ({
99
99
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
100
100
  ,
101
101
  className: "extension-edit-toggle-container"
102
- // eslint-disable-next-line jsx-a11y/mouse-events-have-key-events, @atlassian/a11y/mouse-events-have-key-events
102
+ // eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
103
103
  ,
104
104
  onMouseOver: () => setIsNodeHovered === null || setIsNodeHovered === void 0 ? void 0 : setIsNodeHovered(true)
105
105
  // eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
@@ -154,7 +154,7 @@ export const ExtensionLabel = ({
154
154
  'extension-icon': expValEquals('cc_editor_ttvc_release_bundle_one', 'extensionHoverRefactor', true)
155
155
  });
156
156
  return (
157
- // eslint-disable-next-line jsx-a11y/no-static-element-interactions, @atlassian/a11y/click-events-have-key-events, @atlassian/a11y/interactive-element-not-keyboard-focusable
157
+ // eslint-disable-next-line @atlassian/a11y/no-static-element-interactions, @atlassian/a11y/click-events-have-key-events, @atlassian/a11y/interactive-element-not-keyboard-focusable
158
158
  jsx("div", {
159
159
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
160
160
  css: containerStyles
@@ -164,7 +164,7 @@ export const ExtensionLabel = ({
164
164
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
165
165
  ,
166
166
  style: customContainerStyles
167
- // eslint-disable-next-line jsx-a11y/mouse-events-have-key-events, @atlassian/a11y/mouse-events-have-key-events
167
+ // eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
168
168
  ,
169
169
  onMouseOver: () => {
170
170
  setIsNodeHovered === null || setIsNodeHovered === void 0 ? void 0 : setIsNodeHovered(true);
@@ -226,7 +226,7 @@ class LinkSearchListItem extends React.PureComponent {
226
226
  role
227
227
  } = this.props;
228
228
  return (
229
- // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions, @atlassian/a11y/no-noninteractive-element-interactions, @atlassian/a11y/click-events-have-key-events
229
+ // eslint-disable-next-line @atlassian/a11y/no-noninteractive-element-interactions, @atlassian/a11y/click-events-have-key-events
230
230
  jsx("li", {
231
231
  css: [container, selected && containerSelected],
232
232
  role: role,
@@ -1,7 +1,7 @@
1
1
  import { isFedRamp } from './environment';
2
2
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
3
3
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
4
- const packageVersion = "110.9.2";
4
+ const packageVersion = "110.9.3";
5
5
  const sanitiseSentryEvents = (data, _hint) => {
6
6
  // Remove URL as it has UGC
7
7
  // Ignored via go/ees007
@@ -53,17 +53,10 @@ const getHandleStyle = (node, hidden) => {
53
53
  }
54
54
  };
55
55
  export const ignoreResizerMutations = mutation => {
56
- if (fg('platform_editor_breakoutresizer_remove_assertion')) {
57
- if (mutation.target instanceof Element) {
58
- return mutation.target.classList.contains('resizer-item') || mutation.type === 'attributes' && mutation.attributeName === 'style';
59
- }
60
- return mutation.type === 'attributes' && mutation.attributeName === 'style';
61
- } else {
62
- return (
63
- // eslint-disable-next-line @atlaskit/editor/no-as-casting
64
- mutation.target.classList.contains('resizer-item') || mutation.type === 'attributes' && mutation.attributeName === 'style'
65
- );
56
+ if (mutation.target instanceof Element) {
57
+ return mutation.target.classList.contains('resizer-item') || mutation.type === 'attributes' && mutation.attributeName === 'style';
66
58
  }
59
+ return mutation.type === 'attributes' && mutation.attributeName === 'style';
67
60
  };
68
61
  const resizingStyles = {
69
62
  left: '50%',
@@ -122,10 +122,8 @@ export const TEXT_STYLES_MENU_SECTION_RANK = {
122
122
  * Text formatting group
123
123
  */
124
124
  export const TEXT_FORMAT_GROUP_RANK = {
125
- [BOLD_BUTTON_GROUP.key]: 100,
126
- [UNDERLINE_BUTTON_GROUP.key]: 200,
127
- [TEXT_FORMATTING_HERO_BUTTON.key]: 300,
128
- [TEXT_FORMATTING_MENU.key]: 400
125
+ [TEXT_FORMATTING_HERO_BUTTON.key]: 100,
126
+ [TEXT_FORMATTING_MENU.key]: 200
129
127
  };
130
128
  export const TEXT_FORMAT_GROUP_COLLAPSED_RANK = {
131
129
  [TEXT_FORMATTING_HERO_BUTTON_COLLAPSED.key]: 100,
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import { fg } from '@atlaskit/platform-feature-flags';
15
15
  import Layer from '../Layer';
16
16
  const packageName = "@atlaskit/editor-common";
17
- const packageVersion = "110.9.2";
17
+ const packageVersion = "110.9.3";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -168,7 +168,7 @@ const HoverLinkOverlay = ({
168
168
  });
169
169
  }
170
170
  return (
171
- // eslint-disable-next-line jsx-a11y/no-static-element-interactions
171
+ // eslint-disable-next-line @atlassian/a11y/no-static-element-interactions
172
172
  jsx("span", {
173
173
  ref: containerRef,
174
174
  css: containerStyles,
@@ -93,7 +93,8 @@ export default class Popup extends React.Component {
93
93
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
94
94
  offset: offset,
95
95
  allowOutOfBounds,
96
- rect
96
+ rect,
97
+ boundariesElement: fg('platform_editor_link_popup_position_fix_aifc') ? boundariesElement || document.body : undefined
97
98
  });
98
99
  position = onPositionCalculated ? onPositionCalculated(position) : position;
99
100
  if (typeof position.top !== 'undefined' && absoluteOffset !== null && absoluteOffset !== void 0 && absoluteOffset.top) {
@@ -150,6 +151,10 @@ export default class Popup extends React.Component {
150
151
  * Checks whether it's possible to position popup along given target, and if it's not throws an error.
151
152
  */
152
153
  initPopup(popup) {
154
+ if (this.popupRef.current && fg('platform_editor_link_popup_position_fix_aifc')) {
155
+ var _this$resizeObserver;
156
+ (_this$resizeObserver = this.resizeObserver) === null || _this$resizeObserver === void 0 ? void 0 : _this$resizeObserver.unobserve(this.popupRef.current);
157
+ }
153
158
  this.popupRef.current = popup;
154
159
  const {
155
160
  target
@@ -176,6 +181,10 @@ export default class Popup extends React.Component {
176
181
  if (this.props.focusTrap) {
177
182
  this.initFocusTrap();
178
183
  }
184
+ if (this.popupRef.current && fg('platform_editor_link_popup_position_fix_aifc')) {
185
+ var _this$resizeObserver2;
186
+ (_this$resizeObserver2 = this.resizeObserver) === null || _this$resizeObserver2 === void 0 ? void 0 : _this$resizeObserver2.observe(this.popupRef.current);
187
+ }
179
188
  }
180
189
  /**
181
190
  * Cancels the initialisation of the focus trap if it has not yet occured
@@ -247,8 +256,13 @@ export default class Popup extends React.Component {
247
256
  // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
248
257
  this.scrollElement.removeEventListener('scroll', this.onResize);
249
258
  }
250
- if (this.scrollParentElement && this.resizeObserver) {
251
- this.resizeObserver.unobserve(this.scrollParentElement);
259
+ if (fg('platform_editor_link_popup_position_fix_aifc')) {
260
+ var _this$resizeObserver3;
261
+ (_this$resizeObserver3 = this.resizeObserver) === null || _this$resizeObserver3 === void 0 ? void 0 : _this$resizeObserver3.disconnect();
262
+ } else {
263
+ if (this.scrollParentElement && this.resizeObserver) {
264
+ this.resizeObserver.unobserve(this.scrollParentElement);
265
+ }
252
266
  }
253
267
  this.scheduledUpdatePosition.cancel();
254
268
  this.destroyFocusTrap();
@@ -131,9 +131,10 @@ const calculateVerticalStickBottom = ({
131
131
  targetHeight,
132
132
  popup,
133
133
  offset,
134
- position
134
+ position,
135
+ boundariesElement
135
136
  }) => {
136
- const scrollParent = findOverflowScrollParent(target);
137
+ const scrollParent = findOverflowScrollParent(target) || boundariesElement;
137
138
  const newPos = {
138
139
  ...position
139
140
  };
@@ -157,9 +158,10 @@ const calculateVerticalStickTop = ({
157
158
  popupOffsetParent,
158
159
  offset,
159
160
  position,
160
- placement
161
+ placement,
162
+ boundariesElement
161
163
  }) => {
162
- const scrollParent = findOverflowScrollParent(target);
164
+ const scrollParent = findOverflowScrollParent(target) || boundariesElement;
163
165
  const newPos = {
164
166
  ...position
165
167
  };
@@ -223,7 +225,8 @@ export function calculatePosition({
223
225
  offset,
224
226
  stick,
225
227
  allowOutOfBounds = false,
226
- rect
228
+ rect,
229
+ boundariesElement
227
230
  }) {
228
231
  let position = {};
229
232
  if (!target || !popup || !popup.offsetParent) {
@@ -283,7 +286,8 @@ export function calculatePosition({
283
286
  popup,
284
287
  offset,
285
288
  position,
286
- placement: verticalPlacement
289
+ placement: verticalPlacement,
290
+ boundariesElement
287
291
  });
288
292
  }
289
293
  if (verticalPlacement !== 'top' && verticalPlacement !== 'start' && stick) {
@@ -293,7 +297,8 @@ export function calculatePosition({
293
297
  targetHeight,
294
298
  popup,
295
299
  offset,
296
- position
300
+ position,
301
+ boundariesElement
297
302
  });
298
303
  }
299
304
  const horizontalPosition = calculateHorizontalPlacement({
@@ -350,7 +350,7 @@ export function DropdownMenuItem({
350
350
  // especially when we pass any interactive element as a item.content
351
351
  const tabIndex = item.wrapperTabIndex === null ? undefined : item.wrapperTabIndex || -1;
352
352
  const dropListItem =
353
- // eslint-disable-next-line jsx-a11y/no-static-element-interactions
353
+ // eslint-disable-next-line @atlassian/a11y/no-static-element-interactions
354
354
  jsx("div", {
355
355
  css: () => buttonStyles(item.isActive, submenuActive),
356
356
  role: expValEquals('platform_editor_august_a11y', 'isEnabled', true) ? shouldUseDefaultRole ? undefined : 'menuitem' : undefined,
@@ -1,5 +1,5 @@
1
- import { closeHistory } from '@atlaskit/editor-prosemirror/history';
2
1
  import { canJoin, findWrapping } from '@atlaskit/editor-prosemirror/transform';
2
+ import { closeHistory } from '@atlaskit/prosemirror-history';
3
3
  import { JOIN_SCENARIOS_WHEN_TYPING_TO_INSERT_LIST } from '../analytics';
4
4
  // Roughly based on atlassian-frontend/packages/editor/editor-core/src/utils/input-rules.ts but with the Editor Analytics API that's injected in plugins
5
5
  export const inputRuleWithAnalytics = (getPayload, analyticsApi) => {
@@ -244,7 +244,7 @@ function StatelessElementBrowser(props) {
244
244
  var handleClick = function handleClick() {
245
245
  setCanFocusSearch(true);
246
246
  };
247
- return /* eslint-disable-next-line jsx-a11y/no-static-element-interactions, @atlassian/a11y/interactive-element-not-keyboard-focusable */(
247
+ return /* eslint-disable-next-line @atlassian/a11y/no-static-element-interactions, @atlassian/a11y/interactive-element-not-keyboard-focusable*/(
248
248
  jsx("div", {
249
249
  css: wrapper,
250
250
  "data-testid": "element-browser",
@@ -86,7 +86,7 @@ export var EditToggle = function EditToggle(_ref) {
86
86
  }
87
87
  }, [handleClick]);
88
88
  return (
89
- // eslint-disable-next-line jsx-a11y/no-static-element-interactions
89
+ // eslint-disable-next-line @atlassian/a11y/no-static-element-interactions
90
90
  jsx("div", {
91
91
  "data-testid": "extension-edit-toggle-container"
92
92
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
@@ -98,7 +98,7 @@ export var EditToggle = function EditToggle(_ref) {
98
98
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
99
99
  ,
100
100
  className: "extension-edit-toggle-container"
101
- // eslint-disable-next-line jsx-a11y/mouse-events-have-key-events, @atlassian/a11y/mouse-events-have-key-events
101
+ // eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
102
102
  ,
103
103
  onMouseOver: function onMouseOver() {
104
104
  return setIsNodeHovered === null || setIsNodeHovered === void 0 ? void 0 : setIsNodeHovered(true);
@@ -154,7 +154,7 @@ export var ExtensionLabel = function ExtensionLabel(_ref) {
154
154
  'extension-icon': expValEquals('cc_editor_ttvc_release_bundle_one', 'extensionHoverRefactor', true)
155
155
  });
156
156
  return (
157
- // eslint-disable-next-line jsx-a11y/no-static-element-interactions, @atlassian/a11y/click-events-have-key-events, @atlassian/a11y/interactive-element-not-keyboard-focusable
157
+ // eslint-disable-next-line @atlassian/a11y/no-static-element-interactions, @atlassian/a11y/click-events-have-key-events, @atlassian/a11y/interactive-element-not-keyboard-focusable
158
158
  jsx("div", {
159
159
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
160
160
  css: containerStyles
@@ -164,7 +164,7 @@ export var ExtensionLabel = function ExtensionLabel(_ref) {
164
164
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
165
165
  ,
166
166
  style: customContainerStyles
167
- // eslint-disable-next-line jsx-a11y/mouse-events-have-key-events, @atlassian/a11y/mouse-events-have-key-events
167
+ // eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
168
168
  ,
169
169
  onMouseOver: function onMouseOver() {
170
170
  setIsNodeHovered === null || setIsNodeHovered === void 0 || setIsNodeHovered(true);
@@ -236,7 +236,7 @@ var LinkSearchListItem = /*#__PURE__*/function (_React$PureComponent) {
236
236
  id = _this$props7.id,
237
237
  role = _this$props7.role;
238
238
  return (
239
- // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions, @atlassian/a11y/no-noninteractive-element-interactions, @atlassian/a11y/click-events-have-key-events
239
+ // eslint-disable-next-line @atlassian/a11y/no-noninteractive-element-interactions, @atlassian/a11y/click-events-have-key-events
240
240
  jsx("li", {
241
241
  css: [container, selected && containerSelected],
242
242
  role: role,
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
7
7
  import { isFedRamp } from './environment';
8
8
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
9
9
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
10
- var packageVersion = "110.9.2";
10
+ var packageVersion = "110.9.3";
11
11
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
12
12
  // Remove URL as it has UGC
13
13
  // Ignored via go/ees007
@@ -54,17 +54,10 @@ var getHandleStyle = function getHandleStyle(node, hidden) {
54
54
  }
55
55
  };
56
56
  export var ignoreResizerMutations = function ignoreResizerMutations(mutation) {
57
- if (fg('platform_editor_breakoutresizer_remove_assertion')) {
58
- if (mutation.target instanceof Element) {
59
- return mutation.target.classList.contains('resizer-item') || mutation.type === 'attributes' && mutation.attributeName === 'style';
60
- }
61
- return mutation.type === 'attributes' && mutation.attributeName === 'style';
62
- } else {
63
- return (
64
- // eslint-disable-next-line @atlaskit/editor/no-as-casting
65
- mutation.target.classList.contains('resizer-item') || mutation.type === 'attributes' && mutation.attributeName === 'style'
66
- );
57
+ if (mutation.target instanceof Element) {
58
+ return mutation.target.classList.contains('resizer-item') || mutation.type === 'attributes' && mutation.attributeName === 'style';
67
59
  }
60
+ return mutation.type === 'attributes' && mutation.attributeName === 'style';
68
61
  };
69
62
  var resizingStyles = {
70
63
  left: '50%',
@@ -36,7 +36,7 @@ export var TEXT_STYLES_MENU_SECTION_RANK = _defineProperty(_defineProperty(_defi
36
36
  /**
37
37
  * Text formatting group
38
38
  */
39
- export var TEXT_FORMAT_GROUP_RANK = _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, BOLD_BUTTON_GROUP.key, 100), UNDERLINE_BUTTON_GROUP.key, 200), TEXT_FORMATTING_HERO_BUTTON.key, 300), TEXT_FORMATTING_MENU.key, 400);
39
+ export var TEXT_FORMAT_GROUP_RANK = _defineProperty(_defineProperty({}, TEXT_FORMATTING_HERO_BUTTON.key, 100), TEXT_FORMATTING_MENU.key, 200);
40
40
  export var TEXT_FORMAT_GROUP_COLLAPSED_RANK = _defineProperty(_defineProperty({}, TEXT_FORMATTING_HERO_BUTTON_COLLAPSED.key, 100), TEXT_FORMATTING_MENU.key, 200);
41
41
  export var TEXT_FORMAT_MENU_RANK = _defineProperty(_defineProperty({}, TEXT_FORMATTING_MENU_SECTION.key, 100), CLEAR_FORMARTTING_MENU_SECTION.key, 200);
42
42
  export var TEXT_FORMATTING_MENU_SECTION_RANK = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, BOLD_MENU_ITEM.key, 100), ITALIC_MENU_ITEM.key, 200), UNDERLINE_MENU_ITEM.key, 300), STRIKE_MENU_ITEM.key, 400), CODE_MENU_ITEM.key, 500), SUBSCRIPT_MENU_ITEM.key, 600), SUPERSCRIPT_MENU_ITEM.key, 700);
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
21
21
  import { fg } from '@atlaskit/platform-feature-flags';
22
22
  import Layer from '../Layer';
23
23
  var packageName = "@atlaskit/editor-common";
24
- var packageVersion = "110.9.2";
24
+ var packageVersion = "110.9.3";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var fadeIn = keyframes({
@@ -174,7 +174,7 @@ var HoverLinkOverlay = function HoverLinkOverlay(_ref) {
174
174
  });
175
175
  }
176
176
  return (
177
- // eslint-disable-next-line jsx-a11y/no-static-element-interactions
177
+ // eslint-disable-next-line @atlassian/a11y/no-static-element-interactions
178
178
  jsx("span", {
179
179
  ref: containerRef,
180
180
  css: containerStyles,
@@ -109,7 +109,8 @@ var Popup = /*#__PURE__*/function (_React$Component) {
109
109
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
110
110
  offset: offset,
111
111
  allowOutOfBounds: allowOutOfBounds,
112
- rect: rect
112
+ rect: rect,
113
+ boundariesElement: fg('platform_editor_link_popup_position_fix_aifc') ? boundariesElement || document.body : undefined
113
114
  });
114
115
  position = onPositionCalculated ? onPositionCalculated(position) : position;
115
116
  if (typeof position.top !== 'undefined' && absoluteOffset !== null && absoluteOffset !== void 0 && absoluteOffset.top) {
@@ -172,6 +173,10 @@ var Popup = /*#__PURE__*/function (_React$Component) {
172
173
  }, {
173
174
  key: "initPopup",
174
175
  value: function initPopup(popup) {
176
+ if (this.popupRef.current && fg('platform_editor_link_popup_position_fix_aifc')) {
177
+ var _this$resizeObserver;
178
+ (_this$resizeObserver = this.resizeObserver) === null || _this$resizeObserver === void 0 || _this$resizeObserver.unobserve(this.popupRef.current);
179
+ }
175
180
  this.popupRef.current = popup;
176
181
  var target = this.props.target;
177
182
  var overflowScrollParent = findOverflowScrollParent(popup);
@@ -196,6 +201,10 @@ var Popup = /*#__PURE__*/function (_React$Component) {
196
201
  if (this.props.focusTrap) {
197
202
  this.initFocusTrap();
198
203
  }
204
+ if (this.popupRef.current && fg('platform_editor_link_popup_position_fix_aifc')) {
205
+ var _this$resizeObserver2;
206
+ (_this$resizeObserver2 = this.resizeObserver) === null || _this$resizeObserver2 === void 0 || _this$resizeObserver2.observe(this.popupRef.current);
207
+ }
199
208
  }
200
209
  }, {
201
210
  key: "destroyFocusTrap",
@@ -276,8 +285,13 @@ var Popup = /*#__PURE__*/function (_React$Component) {
276
285
  // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
277
286
  this.scrollElement.removeEventListener('scroll', this.onResize);
278
287
  }
279
- if (this.scrollParentElement && this.resizeObserver) {
280
- this.resizeObserver.unobserve(this.scrollParentElement);
288
+ if (fg('platform_editor_link_popup_position_fix_aifc')) {
289
+ var _this$resizeObserver3;
290
+ (_this$resizeObserver3 = this.resizeObserver) === null || _this$resizeObserver3 === void 0 || _this$resizeObserver3.disconnect();
291
+ } else {
292
+ if (this.scrollParentElement && this.resizeObserver) {
293
+ this.resizeObserver.unobserve(this.scrollParentElement);
294
+ }
281
295
  }
282
296
  this.scheduledUpdatePosition.cancel();
283
297
  this.destroyFocusTrap();
@@ -130,8 +130,9 @@ var calculateVerticalStickBottom = function calculateVerticalStickBottom(_ref2)
130
130
  targetHeight = _ref2.targetHeight,
131
131
  popup = _ref2.popup,
132
132
  offset = _ref2.offset,
133
- position = _ref2.position;
134
- var scrollParent = findOverflowScrollParent(target);
133
+ position = _ref2.position,
134
+ boundariesElement = _ref2.boundariesElement;
135
+ var scrollParent = findOverflowScrollParent(target) || boundariesElement;
135
136
  var newPos = _objectSpread({}, position);
136
137
  if (scrollParent) {
137
138
  var topOffsetTop = targetTop - scrollParent.getBoundingClientRect().top;
@@ -153,8 +154,9 @@ var calculateVerticalStickTop = function calculateVerticalStickTop(_ref3) {
153
154
  popupOffsetParent = _ref3.popupOffsetParent,
154
155
  offset = _ref3.offset,
155
156
  position = _ref3.position,
156
- placement = _ref3.placement;
157
- var scrollParent = findOverflowScrollParent(target);
157
+ placement = _ref3.placement,
158
+ boundariesElement = _ref3.boundariesElement;
159
+ var scrollParent = findOverflowScrollParent(target) || boundariesElement;
158
160
  var newPos = _objectSpread({}, position);
159
161
  if (scrollParent) {
160
162
  var _scrollParent$getBoun = scrollParent.getBoundingClientRect(),
@@ -215,7 +217,8 @@ export function calculatePosition(_ref5) {
215
217
  stick = _ref5.stick,
216
218
  _ref5$allowOutOfBound = _ref5.allowOutOfBounds,
217
219
  allowOutOfBounds = _ref5$allowOutOfBound === void 0 ? false : _ref5$allowOutOfBound,
218
- rect = _ref5.rect;
220
+ rect = _ref5.rect,
221
+ boundariesElement = _ref5.boundariesElement;
219
222
  var position = {};
220
223
  if (!target || !popup || !popup.offsetParent) {
221
224
  return position;
@@ -271,7 +274,8 @@ export function calculatePosition(_ref5) {
271
274
  popup: popup,
272
275
  offset: offset,
273
276
  position: position,
274
- placement: verticalPlacement
277
+ placement: verticalPlacement,
278
+ boundariesElement: boundariesElement
275
279
  });
276
280
  }
277
281
  if (verticalPlacement !== 'top' && verticalPlacement !== 'start' && stick) {
@@ -281,7 +285,8 @@ export function calculatePosition(_ref5) {
281
285
  targetHeight: targetHeight,
282
286
  popup: popup,
283
287
  offset: offset,
284
- position: position
288
+ position: position,
289
+ boundariesElement: boundariesElement
285
290
  });
286
291
  }
287
292
  var horizontalPosition = calculateHorizontalPlacement({
@@ -316,7 +316,7 @@ export function DropdownMenuItem(_ref) {
316
316
  // especially when we pass any interactive element as a item.content
317
317
  var tabIndex = item.wrapperTabIndex === null ? undefined : item.wrapperTabIndex || -1;
318
318
  var dropListItem =
319
- // eslint-disable-next-line jsx-a11y/no-static-element-interactions
319
+ // eslint-disable-next-line @atlassian/a11y/no-static-element-interactions
320
320
  jsx("div", {
321
321
  css: function css() {
322
322
  return buttonStyles(item.isActive, submenuActive);
@@ -1,8 +1,8 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
3
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
- import { closeHistory } from '@atlaskit/editor-prosemirror/history';
5
4
  import { canJoin, findWrapping } from '@atlaskit/editor-prosemirror/transform';
5
+ import { closeHistory } from '@atlaskit/prosemirror-history';
6
6
  import { JOIN_SCENARIOS_WHEN_TYPING_TO_INSERT_LIST } from '../analytics';
7
7
  // Roughly based on atlassian-frontend/packages/editor/editor-core/src/utils/input-rules.ts but with the Editor Analytics API that's injected in plugins
8
8
  export var inputRuleWithAnalytics = function inputRuleWithAnalytics(getPayload, analyticsApi) {
@@ -116,8 +116,6 @@ export declare const TEXT_STYLES_MENU_SECTION_RANK: {
116
116
  * Text formatting group
117
117
  */
118
118
  export declare const TEXT_FORMAT_GROUP_RANK: {
119
- "bold-button-group": number;
120
- "underline-button-group": number;
121
119
  "text-formatting-hero-button": number;
122
120
  "text-formatting-menu": number;
123
121
  };
@@ -6,6 +6,7 @@ export interface Position {
6
6
  }
7
7
  export interface CalculatePositionParams {
8
8
  allowOutOfBounds?: boolean;
9
+ boundariesElement?: HTMLElement;
9
10
  offset: number[];
10
11
  placement: [string, string];
11
12
  popup?: HTMLElement;
@@ -28,7 +29,7 @@ export declare function calculatePlacement(target: HTMLElement, boundariesElemen
28
29
  * Calculates relative coordinates for placing popup along with the target.
29
30
  * Uses placement from calculatePlacement.
30
31
  */
31
- export declare function calculatePosition({ placement, target, popup, offset, stick, allowOutOfBounds, rect, }: CalculatePositionParams): Position;
32
+ export declare function calculatePosition({ placement, target, popup, offset, stick, allowOutOfBounds, rect, boundariesElement, }: CalculatePositionParams): Position;
32
33
  export declare function validatePosition(popup: HTMLElement): boolean;
33
34
  /**
34
35
  * Traverse DOM Tree upwards looking for popup parents with "overflow: scroll".
@@ -116,8 +116,6 @@ export declare const TEXT_STYLES_MENU_SECTION_RANK: {
116
116
  * Text formatting group
117
117
  */
118
118
  export declare const TEXT_FORMAT_GROUP_RANK: {
119
- "bold-button-group": number;
120
- "underline-button-group": number;
121
119
  "text-formatting-hero-button": number;
122
120
  "text-formatting-menu": number;
123
121
  };
@@ -6,6 +6,7 @@ export interface Position {
6
6
  }
7
7
  export interface CalculatePositionParams {
8
8
  allowOutOfBounds?: boolean;
9
+ boundariesElement?: HTMLElement;
9
10
  offset: number[];
10
11
  placement: [
11
12
  string,
@@ -34,7 +35,7 @@ export declare function calculatePlacement(target: HTMLElement, boundariesElemen
34
35
  * Calculates relative coordinates for placing popup along with the target.
35
36
  * Uses placement from calculatePlacement.
36
37
  */
37
- export declare function calculatePosition({ placement, target, popup, offset, stick, allowOutOfBounds, rect, }: CalculatePositionParams): Position;
38
+ export declare function calculatePosition({ placement, target, popup, offset, stick, allowOutOfBounds, rect, boundariesElement, }: CalculatePositionParams): Position;
38
39
  export declare function validatePosition(popup: HTMLElement): boolean;
39
40
  /**
40
41
  * Traverse DOM Tree upwards looking for popup parents with "overflow: scroll".
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "110.9.2",
3
+ "version": "110.10.0",
4
4
  "description": "A package that contains common classes and components for editor and renderer",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -41,7 +41,7 @@
41
41
  "@atlaskit/code": "^17.2.0",
42
42
  "@atlaskit/codemod-utils": "^4.2.0",
43
43
  "@atlaskit/css": "^0.14.0",
44
- "@atlaskit/custom-steps": "^0.14.0",
44
+ "@atlaskit/custom-steps": "^0.15.0",
45
45
  "@atlaskit/dropdown-menu": "^16.3.0",
46
46
  "@atlaskit/editor-json-transformer": "^8.30.0",
47
47
  "@atlaskit/editor-palette": "^2.1.0",
@@ -55,7 +55,7 @@
55
55
  "@atlaskit/icon-object": "^7.2.0",
56
56
  "@atlaskit/link": "^3.2.0",
57
57
  "@atlaskit/link-datasource": "^4.25.0",
58
- "@atlaskit/link-picker": "^3.14.0",
58
+ "@atlaskit/link-picker": "^3.16.0",
59
59
  "@atlaskit/media-card": "^79.5.0",
60
60
  "@atlaskit/media-client": "^35.5.0",
61
61
  "@atlaskit/media-client-react": "^4.1.0",
@@ -64,7 +64,7 @@
64
64
  "@atlaskit/media-picker": "^70.0.0",
65
65
  "@atlaskit/media-ui": "^28.7.0",
66
66
  "@atlaskit/media-viewer": "^52.4.0",
67
- "@atlaskit/mention": "^24.2.0",
67
+ "@atlaskit/mention": "^24.3.0",
68
68
  "@atlaskit/menu": "^8.4.0",
69
69
  "@atlaskit/onboarding": "^14.4.0",
70
70
  "@atlaskit/platform-feature-flags": "^1.1.0",
@@ -72,6 +72,7 @@
72
72
  "@atlaskit/popper": "^7.1.0",
73
73
  "@atlaskit/primitives": "^14.15.0",
74
74
  "@atlaskit/profilecard": "^24.18.0",
75
+ "@atlaskit/prosemirror-history": "^0.2.0",
75
76
  "@atlaskit/react-ufo": "^4.11.0",
76
77
  "@atlaskit/section-message": "^8.7.0",
77
78
  "@atlaskit/smart-card": "^43.1.0",
@@ -184,9 +185,6 @@
184
185
  "platform-visual-refresh-icons": {
185
186
  "type": "boolean"
186
187
  },
187
- "platform_editor_breakoutresizer_remove_assertion": {
188
- "type": "boolean"
189
- },
190
188
  "platform-component-visual-refresh": {
191
189
  "type": "boolean"
192
190
  },
@@ -196,6 +194,9 @@
196
194
  "platform_editor_renderer_table_header_styles": {
197
195
  "type": "boolean"
198
196
  },
197
+ "platform_editor_link_popup_position_fix_aifc": {
198
+ "type": "boolean"
199
+ },
199
200
  "platform_editor_elements_dnd_multi_select_patch_1": {
200
201
  "type": "boolean"
201
202
  },
@@ -274,12 +275,6 @@
274
275
  "p2m-drop-down-motion": {
275
276
  "type": "boolean"
276
277
  },
277
- "platform_editor_resolve_hyperlinks_CONFLUENCE": {
278
- "type": "boolean"
279
- },
280
- "platform_editor_resolve_hyperlinks_JIRA": {
281
- "type": "boolean"
282
- },
283
278
  "platform_editor_resolve_hyperlinks_killswitch": {
284
279
  "type": "boolean"
285
280
  },