@atlaskit/editor-common 111.21.1 → 111.22.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 (29) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/cjs/block-menu/key.js +2 -1
  3. package/dist/cjs/element-browser/components/ElementList/ElementList.js +5 -3
  4. package/dist/cjs/element-browser/components/StatelessElementBrowser.js +4 -2
  5. package/dist/cjs/experiences/ExperienceCheckPopupMutation.js +19 -3
  6. package/dist/cjs/monitoring/error.js +1 -1
  7. package/dist/cjs/ui/DropList/index.js +1 -1
  8. package/dist/cjs/ui/Mention/mention-with-profilecard.js +3 -1
  9. package/dist/es2019/block-menu/key.js +2 -1
  10. package/dist/es2019/element-browser/components/ElementList/ElementList.js +4 -3
  11. package/dist/es2019/element-browser/components/StatelessElementBrowser.js +4 -2
  12. package/dist/es2019/experiences/ExperienceCheckPopupMutation.js +16 -3
  13. package/dist/es2019/monitoring/error.js +1 -1
  14. package/dist/es2019/ui/DropList/index.js +1 -1
  15. package/dist/es2019/ui/Mention/mention-with-profilecard.js +3 -1
  16. package/dist/esm/block-menu/key.js +2 -1
  17. package/dist/esm/element-browser/components/ElementList/ElementList.js +5 -3
  18. package/dist/esm/element-browser/components/StatelessElementBrowser.js +4 -2
  19. package/dist/esm/experiences/ExperienceCheckPopupMutation.js +18 -3
  20. package/dist/esm/monitoring/error.js +1 -1
  21. package/dist/esm/ui/DropList/index.js +1 -1
  22. package/dist/esm/ui/Mention/mention-with-profilecard.js +3 -1
  23. package/dist/types/block-menu/key.d.ts +1 -0
  24. package/dist/types/element-browser/components/ElementList/ElementList.d.ts +1 -0
  25. package/dist/types/experiences/ExperienceCheckPopupMutation.d.ts +12 -2
  26. package/dist/types-ts4.5/block-menu/key.d.ts +1 -0
  27. package/dist/types-ts4.5/element-browser/components/ElementList/ElementList.d.ts +1 -0
  28. package/dist/types-ts4.5/experiences/ExperienceCheckPopupMutation.d.ts +12 -2
  29. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 111.22.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`ab3866dd7f659`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ab3866dd7f659) -
8
+ Make sure that we use isRenderedInPortal for profilecards in the editor to make sure we are
9
+ focusing on the heading
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
15
+ ## 111.21.2
16
+
17
+ ### Patch Changes
18
+
19
+ - [`796722e0def07`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/796722e0def07) -
20
+ [ux] Set tabpanel role only when tablist it defined in the element broser.
21
+ - [`f623524e57d49`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f623524e57d49) -
22
+ Add portalRoot type to ExperienceCheckPopupMutation
23
+
3
24
  ## 111.21.1
4
25
 
5
26
  ### Patch Changes
@@ -128,5 +128,6 @@ var BLOCK_MENU_TEST_ID = exports.BLOCK_MENU_TEST_ID = 'editor-block-menu';
128
128
  var BLOCK_MENU_ACTION_TEST_ID = exports.BLOCK_MENU_ACTION_TEST_ID = {
129
129
  MOVE_UP: 'block-menu-move-up',
130
130
  MOVE_DOWN: 'block-menu-move-down',
131
- DELETE: 'block-menu-delete'
131
+ DELETE: 'block-menu-delete',
132
+ COPY_LINK: 'block-menu-copy-link'
132
133
  };
@@ -76,7 +76,9 @@ function ElementList(_ref) {
76
76
  setFocusedCategoryIndex = _ref.setFocusedCategoryIndex,
77
77
  setFocusedItemIndex = _ref.setFocusedItemIndex,
78
78
  cache = _ref.cache,
79
- onInsertItem = _ref.onInsertItem;
79
+ onInsertItem = _ref.onInsertItem,
80
+ _ref$hasTabListContex = _ref.hasTabListContext,
81
+ hasTabListContext = _ref$hasTabListContex === void 0 ? false : _ref$hasTabListContex;
80
82
  var _useContainerWidth = (0, _useContainerWidth2.default)(),
81
83
  containerWidth = _useContainerWidth.containerWidth,
82
84
  ContainerWidthMonitor = _useContainerWidth.ContainerWidthMonitor;
@@ -128,8 +130,8 @@ function ElementList(_ref) {
128
130
  css: elementItemsWrapper,
129
131
  "data-testid": "element-items",
130
132
  id: selectedCategory ? "browse-category-".concat(selectedCategory, "-tab") : 'browse-category-tab',
131
- "aria-labelledby": selectedCategory ? "browse-category--".concat(selectedCategory, "-button") : 'browse-category-button',
132
- role: "tabpanel",
133
+ "aria-labelledby": !hasTabListContext && (0, _platformFeatureFlags.fg)('platform_editor_ally_remove_role_tabpanel') ? undefined : selectedCategory ? "browse-category--".concat(selectedCategory, "-button") : 'browse-category-button',
134
+ role: !hasTabListContext && (0, _platformFeatureFlags.fg)('platform_editor_ally_remove_role_tabpanel') ? undefined : 'tabpanel',
133
135
  tabIndex: items.length === 0 ? 0 : undefined
134
136
  }, !items.length ? emptyStateHandler ? emptyStateHandler({
135
137
  mode: mode,
@@ -369,7 +369,8 @@ function MobileBrowser(_ref) {
369
369
  emptyStateHandler: emptyStateHandler,
370
370
  selectedCategory: selectedCategory,
371
371
  searchTerm: searchTerm,
372
- cache: cache
372
+ cache: cache,
373
+ hasTabListContext: false
373
374
  })), onViewMore && (0, _react2.jsx)(_ViewMore.ViewMore, {
374
375
  onViewMore: onViewMore,
375
376
  focus: focusOnViewMore
@@ -464,7 +465,8 @@ function DesktopBrowser(_ref2) {
464
465
  selectedCategoryIndex: selectedCategoryIndex,
465
466
  searchTerm: searchTerm,
466
467
  setFocusedCategoryIndex: showCategories ? setFocusedCategoryIndex : undefined,
467
- cache: cache
468
+ cache: cache,
469
+ hasTabListContext: showCategories
468
470
  })));
469
471
  }
470
472
  var MemoizedElementBrowser = /*#__PURE__*/(0, _react.memo)((0, _withAnalyticsContext.default)({
@@ -15,11 +15,14 @@ var _experienceUtils = require("./experience-utils");
15
15
  function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
16
16
  function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
17
17
  function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
18
+ var PORTAL_CONTAINER_SELECTOR = 'body > .atlaskit-portal-container';
19
+
18
20
  /**
19
21
  * Popup check type determines how popups are observed based on their DOM location:
20
22
  * - 'inline': Popups appearing in toolbar button-groups (emoji, media, table selector, image)
21
23
  * - 'editorRoot': Popups attached to editor root (e.g., mention popups)
22
24
  * - 'editorContent': Content-level popups or modals in portal containers (e.g., block menu)
25
+ * - 'portalRoot': Popups in body > .atlaskit-portal-container (e.g., flags, modals)
23
26
  */
24
27
  var ExperienceCheckPopupMutation = exports.ExperienceCheckPopupMutation = /*#__PURE__*/function () {
25
28
  function ExperienceCheckPopupMutation(config) {
@@ -42,9 +45,23 @@ var ExperienceCheckPopupMutation = exports.ExperienceCheckPopupMutation = /*#__P
42
45
  return this.getEditorRootTargets(config);
43
46
  case 'editorContent':
44
47
  return this.getEditorContentTargets(config);
48
+ case 'portalRoot':
49
+ return this.getPortalRootTargets();
45
50
  }
46
51
  }
47
52
 
53
+ /**
54
+ * For 'portalRoot' type: observe .atlaskit-portal-container.
55
+ * Popups like flags and modals render in body > .atlaskit-portal-container.
56
+ */
57
+ }, {
58
+ key: "getPortalRootTargets",
59
+ value: function getPortalRootTargets() {
60
+ var _getDocument;
61
+ var portalContainer = (_getDocument = (0, _browserApis.getDocument)()) === null || _getDocument === void 0 ? void 0 : _getDocument.querySelector(PORTAL_CONTAINER_SELECTOR);
62
+ return portalContainer ? [portalContainer] : [];
63
+ }
64
+
48
65
  /**
49
66
  * For 'editorContent' type: observe the target (mount point) and any existing
50
67
  * [data-editor-popup] wrappers within it. Content-level popups and modals
@@ -111,16 +128,15 @@ var ExperienceCheckPopupMutation = exports.ExperienceCheckPopupMutation = /*#__P
111
128
  key: "start",
112
129
  value: function start(callback) {
113
130
  var _this = this;
114
- var target = this.config.type === 'editorRoot' ? this.config.getEditorDom() : this.config.getTarget();
115
131
  var doc = (0, _browserApis.getDocument)();
116
- if (!target || !doc) {
132
+ var observeTargets = this.getObserveTargets();
133
+ if (!doc || !observeTargets.length) {
117
134
  callback({
118
135
  status: 'failure',
119
136
  reason: _consts.EXPERIENCE_FAILURE_REASON.DOM_MUTATION_TARGET_NOT_FOUND
120
137
  });
121
138
  return;
122
139
  }
123
- var observeTargets = this.getObserveTargets();
124
140
  var query = this.config.nestedElementQuery;
125
141
  var subtree = this.config.type === 'inline' && this.config.subtree === true;
126
142
  var observe = function observe(el) {
@@ -19,7 +19,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
19
19
  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); }
20
20
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
21
21
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
22
- var packageVersion = "0.0.0-development";
22
+ var packageVersion = "111.21.2";
23
23
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
24
24
  // Remove URL as it has UGC
25
25
  // Ignored via go/ees007
@@ -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 = "0.0.0-development";
27
+ var packageVersion = "111.21.2";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -9,6 +9,7 @@ exports.default = MentionWithProfileCard;
9
9
  var _react = _interopRequireWildcard(require("react"));
10
10
  var _mention = require("@atlaskit/mention");
11
11
  var _user = _interopRequireDefault(require("@atlaskit/profilecard/user"));
12
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
12
13
  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); }
13
14
  function MentionWithProfileCard(_ref) {
14
15
  var autoFocus = _ref.autoFocus,
@@ -40,7 +41,8 @@ function MentionWithProfileCard(_ref) {
40
41
  // eslint-disable-next-line require-unicode-regexp
41
42
  ,
42
43
  ariaLabel: text.replace(/^@/, ''),
43
- ssrPlaceholderId: ssrPlaceholderId
44
+ ssrPlaceholderId: ssrPlaceholderId,
45
+ isRenderedInPortal: (0, _expValEquals.expValEquals)('editor_a11y_7152_profile_card_tab_order', 'isEnabled', true)
44
46
  }, /*#__PURE__*/_react.default.createElement(_mention.ResourcedMention, {
45
47
  id: id,
46
48
  text: text,
@@ -122,5 +122,6 @@ export const BLOCK_MENU_TEST_ID = 'editor-block-menu';
122
122
  export const BLOCK_MENU_ACTION_TEST_ID = {
123
123
  MOVE_UP: 'block-menu-move-up',
124
124
  MOVE_DOWN: 'block-menu-move-down',
125
- DELETE: 'block-menu-delete'
125
+ DELETE: 'block-menu-delete',
126
+ COPY_LINK: 'block-menu-copy-link'
126
127
  };
@@ -64,7 +64,8 @@ function ElementList({
64
64
  setFocusedCategoryIndex,
65
65
  setFocusedItemIndex,
66
66
  cache,
67
- onInsertItem
67
+ onInsertItem,
68
+ hasTabListContext = false
68
69
  }) {
69
70
  const {
70
71
  containerWidth,
@@ -116,8 +117,8 @@ function ElementList({
116
117
  css: elementItemsWrapper,
117
118
  "data-testid": "element-items",
118
119
  id: selectedCategory ? `browse-category-${selectedCategory}-tab` : 'browse-category-tab',
119
- "aria-labelledby": selectedCategory ? `browse-category--${selectedCategory}-button` : 'browse-category-button',
120
- role: "tabpanel",
120
+ "aria-labelledby": !hasTabListContext && fg('platform_editor_ally_remove_role_tabpanel') ? undefined : selectedCategory ? `browse-category--${selectedCategory}-button` : 'browse-category-button',
121
+ role: !hasTabListContext && fg('platform_editor_ally_remove_role_tabpanel') ? undefined : 'tabpanel',
121
122
  tabIndex: items.length === 0 ? 0 : undefined
122
123
  }, !items.length ? emptyStateHandler ? emptyStateHandler({
123
124
  mode,
@@ -355,7 +355,8 @@ function MobileBrowser({
355
355
  emptyStateHandler: emptyStateHandler,
356
356
  selectedCategory: selectedCategory,
357
357
  searchTerm: searchTerm,
358
- cache: cache
358
+ cache: cache,
359
+ hasTabListContext: false
359
360
  })), onViewMore && jsx(ViewMore, {
360
361
  onViewMore: onViewMore,
361
362
  focus: focusOnViewMore
@@ -450,7 +451,8 @@ function DesktopBrowser({
450
451
  selectedCategoryIndex: selectedCategoryIndex,
451
452
  searchTerm: searchTerm,
452
453
  setFocusedCategoryIndex: showCategories ? setFocusedCategoryIndex : undefined,
453
- cache: cache
454
+ cache: cache,
455
+ hasTabListContext: showCategories
454
456
  })));
455
457
  }
456
458
  const MemoizedElementBrowser = /*#__PURE__*/memo(withAnalyticsContext({
@@ -2,12 +2,14 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import { getDocument } from '@atlaskit/browser-apis';
3
3
  import { EXPERIENCE_FAILURE_REASON } from './consts';
4
4
  import { popupWithNestedElement } from './experience-utils';
5
+ const PORTAL_CONTAINER_SELECTOR = 'body > .atlaskit-portal-container';
5
6
 
6
7
  /**
7
8
  * Popup check type determines how popups are observed based on their DOM location:
8
9
  * - 'inline': Popups appearing in toolbar button-groups (emoji, media, table selector, image)
9
10
  * - 'editorRoot': Popups attached to editor root (e.g., mention popups)
10
11
  * - 'editorContent': Content-level popups or modals in portal containers (e.g., block menu)
12
+ * - 'portalRoot': Popups in body > .atlaskit-portal-container (e.g., flags, modals)
11
13
  */
12
14
 
13
15
  export class ExperienceCheckPopupMutation {
@@ -30,9 +32,21 @@ export class ExperienceCheckPopupMutation {
30
32
  return this.getEditorRootTargets(config);
31
33
  case 'editorContent':
32
34
  return this.getEditorContentTargets(config);
35
+ case 'portalRoot':
36
+ return this.getPortalRootTargets();
33
37
  }
34
38
  }
35
39
 
40
+ /**
41
+ * For 'portalRoot' type: observe .atlaskit-portal-container.
42
+ * Popups like flags and modals render in body > .atlaskit-portal-container.
43
+ */
44
+ getPortalRootTargets() {
45
+ var _getDocument;
46
+ const portalContainer = (_getDocument = getDocument()) === null || _getDocument === void 0 ? void 0 : _getDocument.querySelector(PORTAL_CONTAINER_SELECTOR);
47
+ return portalContainer ? [portalContainer] : [];
48
+ }
49
+
36
50
  /**
37
51
  * For 'editorContent' type: observe the target (mount point) and any existing
38
52
  * [data-editor-popup] wrappers within it. Content-level popups and modals
@@ -81,16 +95,15 @@ export class ExperienceCheckPopupMutation {
81
95
  return targets;
82
96
  }
83
97
  start(callback) {
84
- const target = this.config.type === 'editorRoot' ? this.config.getEditorDom() : this.config.getTarget();
85
98
  const doc = getDocument();
86
- if (!target || !doc) {
99
+ const observeTargets = this.getObserveTargets();
100
+ if (!doc || !observeTargets.length) {
87
101
  callback({
88
102
  status: 'failure',
89
103
  reason: EXPERIENCE_FAILURE_REASON.DOM_MUTATION_TARGET_NOT_FOUND
90
104
  });
91
105
  return;
92
106
  }
93
- const observeTargets = this.getObserveTargets();
94
107
  const query = this.config.nestedElementQuery;
95
108
  const subtree = this.config.type === 'inline' && this.config.subtree === true;
96
109
  const observe = el => {
@@ -4,7 +4,7 @@ import { isFedRamp } from './environment';
4
4
  import { normaliseSentryBreadcrumbs, SERIALIZABLE_ATTRIBUTES } from './normalise-sentry-breadcrumbs';
5
5
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
6
6
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
7
- const packageVersion = "0.0.0-development";
7
+ const packageVersion = "111.21.2";
8
8
  const sanitiseSentryEvents = (data, _hint) => {
9
9
  // Remove URL as it has UGC
10
10
  // Ignored via go/ees007
@@ -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 = "0.0.0-development";
17
+ const packageVersion = "111.21.2";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -1,6 +1,7 @@
1
1
  import React, { useMemo } from 'react';
2
2
  import { ResourcedMention } from '@atlaskit/mention';
3
3
  import ProfileCardTrigger from '@atlaskit/profilecard/user';
4
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
4
5
  export default function MentionWithProfileCard({
5
6
  autoFocus,
6
7
  id,
@@ -32,7 +33,8 @@ export default function MentionWithProfileCard({
32
33
  // eslint-disable-next-line require-unicode-regexp
33
34
  ,
34
35
  ariaLabel: text.replace(/^@/, ''),
35
- ssrPlaceholderId: ssrPlaceholderId
36
+ ssrPlaceholderId: ssrPlaceholderId,
37
+ isRenderedInPortal: expValEquals('editor_a11y_7152_profile_card_tab_order', 'isEnabled', true)
36
38
  }, /*#__PURE__*/React.createElement(ResourcedMention, {
37
39
  id: id,
38
40
  text: text,
@@ -122,5 +122,6 @@ export var BLOCK_MENU_TEST_ID = 'editor-block-menu';
122
122
  export var BLOCK_MENU_ACTION_TEST_ID = {
123
123
  MOVE_UP: 'block-menu-move-up',
124
124
  MOVE_DOWN: 'block-menu-move-down',
125
- DELETE: 'block-menu-delete'
125
+ DELETE: 'block-menu-delete',
126
+ COPY_LINK: 'block-menu-copy-link'
126
127
  };
@@ -65,7 +65,9 @@ function ElementList(_ref) {
65
65
  setFocusedCategoryIndex = _ref.setFocusedCategoryIndex,
66
66
  setFocusedItemIndex = _ref.setFocusedItemIndex,
67
67
  cache = _ref.cache,
68
- onInsertItem = _ref.onInsertItem;
68
+ onInsertItem = _ref.onInsertItem,
69
+ _ref$hasTabListContex = _ref.hasTabListContext,
70
+ hasTabListContext = _ref$hasTabListContex === void 0 ? false : _ref$hasTabListContex;
69
71
  var _useContainerWidth = useContainerWidth(),
70
72
  containerWidth = _useContainerWidth.containerWidth,
71
73
  ContainerWidthMonitor = _useContainerWidth.ContainerWidthMonitor;
@@ -117,8 +119,8 @@ function ElementList(_ref) {
117
119
  css: elementItemsWrapper,
118
120
  "data-testid": "element-items",
119
121
  id: selectedCategory ? "browse-category-".concat(selectedCategory, "-tab") : 'browse-category-tab',
120
- "aria-labelledby": selectedCategory ? "browse-category--".concat(selectedCategory, "-button") : 'browse-category-button',
121
- role: "tabpanel",
122
+ "aria-labelledby": !hasTabListContext && fg('platform_editor_ally_remove_role_tabpanel') ? undefined : selectedCategory ? "browse-category--".concat(selectedCategory, "-button") : 'browse-category-button',
123
+ role: !hasTabListContext && fg('platform_editor_ally_remove_role_tabpanel') ? undefined : 'tabpanel',
122
124
  tabIndex: items.length === 0 ? 0 : undefined
123
125
  }, !items.length ? emptyStateHandler ? emptyStateHandler({
124
126
  mode: mode,
@@ -359,7 +359,8 @@ function MobileBrowser(_ref) {
359
359
  emptyStateHandler: emptyStateHandler,
360
360
  selectedCategory: selectedCategory,
361
361
  searchTerm: searchTerm,
362
- cache: cache
362
+ cache: cache,
363
+ hasTabListContext: false
363
364
  })), onViewMore && jsx(ViewMore, {
364
365
  onViewMore: onViewMore,
365
366
  focus: focusOnViewMore
@@ -454,7 +455,8 @@ function DesktopBrowser(_ref2) {
454
455
  selectedCategoryIndex: selectedCategoryIndex,
455
456
  searchTerm: searchTerm,
456
457
  setFocusedCategoryIndex: showCategories ? setFocusedCategoryIndex : undefined,
457
- cache: cache
458
+ cache: cache,
459
+ hasTabListContext: showCategories
458
460
  })));
459
461
  }
460
462
  var MemoizedElementBrowser = /*#__PURE__*/memo(withAnalyticsContext({
@@ -8,12 +8,14 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
8
8
  import { getDocument } from '@atlaskit/browser-apis';
9
9
  import { EXPERIENCE_FAILURE_REASON } from './consts';
10
10
  import { popupWithNestedElement } from './experience-utils';
11
+ var PORTAL_CONTAINER_SELECTOR = 'body > .atlaskit-portal-container';
11
12
 
12
13
  /**
13
14
  * Popup check type determines how popups are observed based on their DOM location:
14
15
  * - 'inline': Popups appearing in toolbar button-groups (emoji, media, table selector, image)
15
16
  * - 'editorRoot': Popups attached to editor root (e.g., mention popups)
16
17
  * - 'editorContent': Content-level popups or modals in portal containers (e.g., block menu)
18
+ * - 'portalRoot': Popups in body > .atlaskit-portal-container (e.g., flags, modals)
17
19
  */
18
20
 
19
21
  export var ExperienceCheckPopupMutation = /*#__PURE__*/function () {
@@ -37,9 +39,23 @@ export var ExperienceCheckPopupMutation = /*#__PURE__*/function () {
37
39
  return this.getEditorRootTargets(config);
38
40
  case 'editorContent':
39
41
  return this.getEditorContentTargets(config);
42
+ case 'portalRoot':
43
+ return this.getPortalRootTargets();
40
44
  }
41
45
  }
42
46
 
47
+ /**
48
+ * For 'portalRoot' type: observe .atlaskit-portal-container.
49
+ * Popups like flags and modals render in body > .atlaskit-portal-container.
50
+ */
51
+ }, {
52
+ key: "getPortalRootTargets",
53
+ value: function getPortalRootTargets() {
54
+ var _getDocument;
55
+ var portalContainer = (_getDocument = getDocument()) === null || _getDocument === void 0 ? void 0 : _getDocument.querySelector(PORTAL_CONTAINER_SELECTOR);
56
+ return portalContainer ? [portalContainer] : [];
57
+ }
58
+
43
59
  /**
44
60
  * For 'editorContent' type: observe the target (mount point) and any existing
45
61
  * [data-editor-popup] wrappers within it. Content-level popups and modals
@@ -106,16 +122,15 @@ export var ExperienceCheckPopupMutation = /*#__PURE__*/function () {
106
122
  key: "start",
107
123
  value: function start(callback) {
108
124
  var _this = this;
109
- var target = this.config.type === 'editorRoot' ? this.config.getEditorDom() : this.config.getTarget();
110
125
  var doc = getDocument();
111
- if (!target || !doc) {
126
+ var observeTargets = this.getObserveTargets();
127
+ if (!doc || !observeTargets.length) {
112
128
  callback({
113
129
  status: 'failure',
114
130
  reason: EXPERIENCE_FAILURE_REASON.DOM_MUTATION_TARGET_NOT_FOUND
115
131
  });
116
132
  return;
117
133
  }
118
- var observeTargets = this.getObserveTargets();
119
134
  var query = this.config.nestedElementQuery;
120
135
  var subtree = this.config.type === 'inline' && this.config.subtree === true;
121
136
  var observe = function observe(el) {
@@ -10,7 +10,7 @@ import { isFedRamp } from './environment';
10
10
  import { normaliseSentryBreadcrumbs, SERIALIZABLE_ATTRIBUTES } from './normalise-sentry-breadcrumbs';
11
11
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
12
12
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
13
- var packageVersion = "0.0.0-development";
13
+ var packageVersion = "111.21.2";
14
14
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
15
15
  // Remove URL as it has UGC
16
16
  // Ignored via go/ees007
@@ -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 = "0.0.0-development";
24
+ var packageVersion = "111.21.2";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var fadeIn = keyframes({
@@ -1,6 +1,7 @@
1
1
  import React, { useMemo } from 'react';
2
2
  import { ResourcedMention } from '@atlaskit/mention';
3
3
  import ProfileCardTrigger from '@atlaskit/profilecard/user';
4
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
4
5
  export default function MentionWithProfileCard(_ref) {
5
6
  var autoFocus = _ref.autoFocus,
6
7
  id = _ref.id,
@@ -31,7 +32,8 @@ export default function MentionWithProfileCard(_ref) {
31
32
  // eslint-disable-next-line require-unicode-regexp
32
33
  ,
33
34
  ariaLabel: text.replace(/^@/, ''),
34
- ssrPlaceholderId: ssrPlaceholderId
35
+ ssrPlaceholderId: ssrPlaceholderId,
36
+ isRenderedInPortal: expValEquals('editor_a11y_7152_profile_card_tab_order', 'isEnabled', true)
35
37
  }, /*#__PURE__*/React.createElement(ResourcedMention, {
36
38
  id: id,
37
39
  text: text,
@@ -108,4 +108,5 @@ export declare const BLOCK_MENU_ACTION_TEST_ID: {
108
108
  readonly MOVE_UP: "block-menu-move-up";
109
109
  readonly MOVE_DOWN: "block-menu-move-down";
110
110
  readonly DELETE: "block-menu-delete";
111
+ readonly COPY_LINK: "block-menu-copy-link";
111
112
  };
@@ -18,6 +18,7 @@ export interface Props {
18
18
  columnCount: number;
19
19
  emptyStateHandler?: EmptyStateHandler;
20
20
  focusOnEmptyStateButton?: boolean;
21
+ hasTabListContext?: boolean;
21
22
  items: QuickInsertItem[];
22
23
  mode: keyof typeof Modes;
23
24
  onInsertItem: (item: QuickInsertItem) => void;
@@ -4,8 +4,9 @@ import type { ExperienceCheck, ExperienceCheckCallback } from './ExperienceCheck
4
4
  * - 'inline': Popups appearing in toolbar button-groups (emoji, media, table selector, image)
5
5
  * - 'editorRoot': Popups attached to editor root (e.g., mention popups)
6
6
  * - 'editorContent': Content-level popups or modals in portal containers (e.g., block menu)
7
+ * - 'portalRoot': Popups in body > .atlaskit-portal-container (e.g., flags, modals)
7
8
  */
8
- export type PopupCheckType = 'inline' | 'editorRoot' | 'editorContent';
9
+ export type PopupCheckType = 'inline' | 'editorRoot' | 'editorContent' | 'portalRoot';
9
10
  type InlineConfig = {
10
11
  getTarget: () => HTMLElement | undefined | null;
11
12
  nestedElementQuery: string;
@@ -27,7 +28,11 @@ type EditorContentConfig = {
27
28
  nestedElementQuery: string;
28
29
  type: 'editorContent';
29
30
  };
30
- export type ExperienceCheckPopupMutationConfig = InlineConfig | EditorRootConfig | EditorContentConfig;
31
+ type PortalRootConfig = {
32
+ nestedElementQuery: string;
33
+ type: 'portalRoot';
34
+ };
35
+ export type ExperienceCheckPopupMutationConfig = InlineConfig | EditorRootConfig | EditorContentConfig | PortalRootConfig;
31
36
  export declare class ExperienceCheckPopupMutation implements ExperienceCheck {
32
37
  private config;
33
38
  private observers;
@@ -36,6 +41,11 @@ export declare class ExperienceCheckPopupMutation implements ExperienceCheck {
36
41
  * Returns the list of DOM elements to observe based on popup type.
37
42
  */
38
43
  private getObserveTargets;
44
+ /**
45
+ * For 'portalRoot' type: observe .atlaskit-portal-container.
46
+ * Popups like flags and modals render in body > .atlaskit-portal-container.
47
+ */
48
+ private getPortalRootTargets;
39
49
  /**
40
50
  * For 'editorContent' type: observe the target (mount point) and any existing
41
51
  * [data-editor-popup] wrappers within it. Content-level popups and modals
@@ -108,4 +108,5 @@ export declare const BLOCK_MENU_ACTION_TEST_ID: {
108
108
  readonly MOVE_UP: "block-menu-move-up";
109
109
  readonly MOVE_DOWN: "block-menu-move-down";
110
110
  readonly DELETE: "block-menu-delete";
111
+ readonly COPY_LINK: "block-menu-copy-link";
111
112
  };
@@ -18,6 +18,7 @@ export interface Props {
18
18
  columnCount: number;
19
19
  emptyStateHandler?: EmptyStateHandler;
20
20
  focusOnEmptyStateButton?: boolean;
21
+ hasTabListContext?: boolean;
21
22
  items: QuickInsertItem[];
22
23
  mode: keyof typeof Modes;
23
24
  onInsertItem: (item: QuickInsertItem) => void;
@@ -4,8 +4,9 @@ import type { ExperienceCheck, ExperienceCheckCallback } from './ExperienceCheck
4
4
  * - 'inline': Popups appearing in toolbar button-groups (emoji, media, table selector, image)
5
5
  * - 'editorRoot': Popups attached to editor root (e.g., mention popups)
6
6
  * - 'editorContent': Content-level popups or modals in portal containers (e.g., block menu)
7
+ * - 'portalRoot': Popups in body > .atlaskit-portal-container (e.g., flags, modals)
7
8
  */
8
- export type PopupCheckType = 'inline' | 'editorRoot' | 'editorContent';
9
+ export type PopupCheckType = 'inline' | 'editorRoot' | 'editorContent' | 'portalRoot';
9
10
  type InlineConfig = {
10
11
  getTarget: () => HTMLElement | undefined | null;
11
12
  nestedElementQuery: string;
@@ -27,7 +28,11 @@ type EditorContentConfig = {
27
28
  nestedElementQuery: string;
28
29
  type: 'editorContent';
29
30
  };
30
- export type ExperienceCheckPopupMutationConfig = InlineConfig | EditorRootConfig | EditorContentConfig;
31
+ type PortalRootConfig = {
32
+ nestedElementQuery: string;
33
+ type: 'portalRoot';
34
+ };
35
+ export type ExperienceCheckPopupMutationConfig = InlineConfig | EditorRootConfig | EditorContentConfig | PortalRootConfig;
31
36
  export declare class ExperienceCheckPopupMutation implements ExperienceCheck {
32
37
  private config;
33
38
  private observers;
@@ -36,6 +41,11 @@ export declare class ExperienceCheckPopupMutation implements ExperienceCheck {
36
41
  * Returns the list of DOM elements to observe based on popup type.
37
42
  */
38
43
  private getObserveTargets;
44
+ /**
45
+ * For 'portalRoot' type: observe .atlaskit-portal-container.
46
+ * Popups like flags and modals render in body > .atlaskit-portal-container.
47
+ */
48
+ private getPortalRootTargets;
39
49
  /**
40
50
  * For 'editorContent' type: observe the target (mount point) and any existing
41
51
  * [data-editor-popup] wrappers within it. Content-level popups and modals
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "111.21.1",
3
+ "version": "111.22.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/"
@@ -71,7 +71,7 @@
71
71
  "@atlaskit/platform-feature-flags-react": "^0.4.0",
72
72
  "@atlaskit/popper": "^7.1.0",
73
73
  "@atlaskit/primitives": "^18.0.0",
74
- "@atlaskit/profilecard": "^24.38.0",
74
+ "@atlaskit/profilecard": "^24.39.0",
75
75
  "@atlaskit/prosemirror-history": "^0.2.0",
76
76
  "@atlaskit/react-ufo": "^5.4.0",
77
77
  "@atlaskit/section-message": "^8.12.0",
@@ -82,7 +82,7 @@
82
82
  "@atlaskit/task-decision": "^19.3.0",
83
83
  "@atlaskit/textfield": "^8.2.0",
84
84
  "@atlaskit/theme": "^21.0.0",
85
- "@atlaskit/tmp-editor-statsig": "^32.4.0",
85
+ "@atlaskit/tmp-editor-statsig": "^32.5.0",
86
86
  "@atlaskit/tokens": "^11.0.0",
87
87
  "@atlaskit/tooltip": "^20.14.0",
88
88
  "@atlaskit/width-detector": "^5.0.0",