@atlaskit/editor-common 123.6.0 → 123.7.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,32 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 123.7.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`a1df9dd2d8f02`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a1df9dd2d8f02) -
8
+ Add the optional `showNoResultsMessage` empty-state handler parameter and
9
+ `platform_editor_slash_command`-gated Ask Rovo and View more recovery for registered quick insert
10
+ searches with no matches. Respect registry visibility and keep Marketplace content separate from
11
+ listbox navigation while preserving its native keyboard controls.
12
+
13
+ Show the registered Ask Rovo action alongside Marketplace suggestions in the element browser's
14
+ no-match state, with a divider separating the fallback action from Marketplace content. Keep the
15
+ toolbar's View more footer visible while Marketplace content scrolls and preserve native Tab
16
+ navigation.
17
+
18
+ Respect `data-keyboard-navigation-independent` containers in both toolbar keyboard navigation
19
+ providers. Apply the attribute to the registered insert menu, whose rendering is gated by
20
+ `platform_editor_slash_command`, so its controls retain their own key handling and native tab
21
+ stops.
22
+
23
+ ### Patch Changes
24
+
25
+ - [`f11db7a4b4188`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f11db7a4b4188) -
26
+ Fix comment renderer agent mention profile cards, behind experiment
27
+ `platform_editor_comment_mention_card_fixes`
28
+ - Updated dependencies
29
+
3
30
  ## 123.6.0
4
31
 
5
32
  ### Minor Changes
@@ -27,7 +27,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
27
27
  var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
28
28
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
29
29
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
30
- var packageVersion = "123.5.1";
30
+ var packageVersion = "123.6.0";
31
31
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
32
32
  // Remove URL as it has UGC
33
33
  // Ignored via go/ees007
@@ -7,6 +7,7 @@ exports.getMatchingQuickInsertComponents = void 0;
7
7
  var _surfaceRenderer = require("@atlaskit/editor-ui-control-model/surface-renderer");
8
8
  var _isMenuFooterSectionKey = require("../type-ahead/isMenuFooterSectionKey");
9
9
  var _isSectionOverflowItemKey = require("../type-ahead/isSectionOverflowItemKey");
10
+ var _keys = require("./keys");
10
11
  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; } } }; }
11
12
  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; } }
12
13
  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; }
@@ -25,6 +26,7 @@ var compareMatchedItems = function compareMatchedItems(a, b) {
25
26
  * no empty-query path so browse behavior remains owned by buildQuickInsertMenuModel.
26
27
  */
27
28
  var getMatchingQuickInsertComponents = exports.getMatchingQuickInsertComponents = function getMatchingQuickInsertComponents(_ref) {
29
+ var _childrenMap$get2;
28
30
  var components = _ref.components,
29
31
  rootComponent = _ref.rootComponent,
30
32
  query = _ref.query,
@@ -46,12 +48,12 @@ var getMatchingQuickInsertComponents = exports.getMatchingQuickInsertComponents
46
48
  _step;
47
49
  try {
48
50
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
49
- var _childrenMap$get;
51
+ var _childrenMap$get3;
50
52
  var section = _step.value;
51
53
  if (section.type !== 'menu-section' || (0, _isMenuFooterSectionKey.isMenuFooterSectionKey)(section.key) || !(0, _surfaceRenderer.willComponentRender)(section, childrenMap, surfaceContext)) {
52
54
  continue;
53
55
  }
54
- var _iterator3 = _createForOfIteratorHelper((_childrenMap$get = childrenMap.get((0, _surfaceRenderer.getComponentIdentity)(section))) !== null && _childrenMap$get !== void 0 ? _childrenMap$get : []),
56
+ var _iterator3 = _createForOfIteratorHelper((_childrenMap$get3 = childrenMap.get((0, _surfaceRenderer.getComponentIdentity)(section))) !== null && _childrenMap$get3 !== void 0 ? _childrenMap$get3 : []),
55
57
  _step3;
56
58
  try {
57
59
  for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
@@ -109,9 +111,33 @@ var getMatchingQuickInsertComponents = exports.getMatchingQuickInsertComponents
109
111
  } finally {
110
112
  _iterator2.f();
111
113
  }
114
+ var sections = Array.from(sectionsByKey.values());
115
+ if (sections.length > 0 || query === '') {
116
+ return {
117
+ footer: undefined,
118
+ root: root,
119
+ sections: sections
120
+ };
121
+ }
122
+ var fallbackItem = topLevelChildren.filter(function (section) {
123
+ return section.type === 'menu-section' && !(0, _isMenuFooterSectionKey.isMenuFooterSectionKey)(section.key) && (0, _surfaceRenderer.willComponentRender)(section, childrenMap, surfaceContext);
124
+ }).flatMap(function (section) {
125
+ var _childrenMap$get;
126
+ return (_childrenMap$get = childrenMap.get((0, _surfaceRenderer.getComponentIdentity)(section))) !== null && _childrenMap$get !== void 0 ? _childrenMap$get : [];
127
+ }).find(function (component) {
128
+ return component.type === _keys.ASK_ROVO_MENU_ITEM.type && component.key === _keys.ASK_ROVO_MENU_ITEM.key && (0, _surfaceRenderer.willComponentRender)(component, childrenMap, surfaceContext);
129
+ });
130
+ var fallbackItems = fallbackItem ? [fallbackItem] : [];
131
+ var footerSection = topLevelChildren.find(function (section) {
132
+ return section.type === 'menu-section' && (0, _isMenuFooterSectionKey.isMenuFooterSectionKey)(section.key) && (0, _surfaceRenderer.willComponentRender)(section, childrenMap, surfaceContext);
133
+ });
134
+ var footer = footerSection ? ((_childrenMap$get2 = childrenMap.get((0, _surfaceRenderer.getComponentIdentity)(footerSection))) !== null && _childrenMap$get2 !== void 0 ? _childrenMap$get2 : []).find(function (child) {
135
+ return child.type === 'menu-item' && (0, _surfaceRenderer.willComponentRender)(child, childrenMap, surfaceContext);
136
+ }) : undefined;
112
137
  return {
113
- footer: undefined,
138
+ fallbackItems: fallbackItems,
139
+ footer: footer,
114
140
  root: root,
115
- sections: Array.from(sectionsByKey.values())
141
+ sections: sections
116
142
  };
117
143
  };
@@ -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 = "123.5.1";
27
+ var packageVersion = "123.6.0";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -87,6 +87,7 @@ function MentionWithProfileCard(_ref) {
87
87
  if (userType === 'APP' && cloudId && (0, _isExperimentEnabled.isExperimentEnabled)('rovo_chat_mention_agents')) {
88
88
  return /*#__PURE__*/_react.default.createElement(AgentProfileCardTrigger, {
89
89
  agentId: id,
90
+ agentIdType: (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_comment_mention_card_fixes') ? 'identity' : undefined,
90
91
  cloudId: cloudId,
91
92
  resourceClient: resourceClient,
92
93
  trigger: "click"
@@ -133,7 +133,7 @@ var ToolbarArrowKeyNavigationProvider = exports.ToolbarArrowKeyNavigationProvide
133
133
  if (targetElement instanceof HTMLElement && !targetElement.closest("".concat(childComponentSelector))) {
134
134
  return;
135
135
  }
136
- if (targetElement instanceof HTMLElement && (_document$querySelect = document.querySelector('[data-role="droplistContent"], [data-test-id="color-picker-menu"], [data-emoji-picker-container="true"]')) !== null && _document$querySelect !== void 0 && _document$querySelect.contains(targetElement) || targetElement instanceof HTMLElement && (_document$querySelect2 = document.querySelector('[data-test-id="color-picker-menu"]')) !== null && _document$querySelect2 !== void 0 && _document$querySelect2.contains(targetElement) || event.key === 'ArrowUp' || event.key === 'ArrowDown' || disableArrowKeyNavigation) {
136
+ if (targetElement instanceof HTMLElement && (_document$querySelect = document.querySelector('[data-role="droplistContent"], [data-test-id="color-picker-menu"], [data-emoji-picker-container="true"]')) !== null && _document$querySelect !== void 0 && _document$querySelect.contains(targetElement) || targetElement instanceof HTMLElement && (_document$querySelect2 = document.querySelector('[data-test-id="color-picker-menu"]')) !== null && _document$querySelect2 !== void 0 && _document$querySelect2.contains(targetElement) || targetElement instanceof HTMLElement && targetElement.closest('[data-keyboard-navigation-independent]') || event.key === 'ArrowUp' || event.key === 'ArrowDown' || disableArrowKeyNavigation) {
137
137
  return;
138
138
  }
139
139
  var menuWrapper = document.querySelector('.menu-key-handler-wrapper');
@@ -270,10 +270,10 @@ function isElementOrAncestorHiddenOrDisabled(element, rootNode) {
270
270
  return false;
271
271
  }
272
272
  function getFilteredFocusableElements(rootNode) {
273
- // The focusable elements from child components such as dropdown menus / popups are ignored
273
+ // Independent containers and child popups own their key handling and tab stops.
274
274
  return getFocusableElements(rootNode).filter(function (elm) {
275
275
  // Check if element or any ancestor is hidden or disabled
276
276
  var isHiddenOrDisabled = isElementOrAncestorHiddenOrDisabled(elm, rootNode);
277
- return !elm.closest('[data-role="droplistContent"]') && !elm.closest('[data-emoji-picker-container="true"]') && !elm.closest('[data-test-id="color-picker-menu"]') && !elm.closest('.scroll-buttons') && !isHiddenOrDisabled;
277
+ return !elm.closest('[data-role="droplistContent"]') && !elm.closest('[data-emoji-picker-container="true"]') && !elm.closest('[data-test-id="color-picker-menu"]') && !elm.closest('[data-keyboard-navigation-independent]') && !elm.closest('.scroll-buttons') && !isHiddenOrDisabled;
278
278
  });
279
279
  }
@@ -13,7 +13,7 @@ const NETWORK_FAILURE_REGEX = /^network failure/i;
13
13
  const RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
14
14
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
15
15
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
16
- const packageVersion = "123.5.1";
16
+ const packageVersion = "123.6.0";
17
17
  const sanitiseSentryEvents = (data, _hint) => {
18
18
  // Remove URL as it has UGC
19
19
  // Ignored via go/ees007
@@ -1,6 +1,7 @@
1
1
  import { getComponentIdentity, resolveSurface, willComponentRender } from '@atlaskit/editor-ui-control-model/surface-renderer';
2
2
  import { isMenuFooterSectionKey } from '../type-ahead/isMenuFooterSectionKey';
3
3
  import { isSectionOverflowItemKey } from '../type-ahead/isSectionOverflowItemKey';
4
+ import { ASK_ROVO_MENU_ITEM } from './keys';
4
5
  const getRank = (component, parentKey) => {
5
6
  var _component$parents$fi, _component$parents, _component$parents$fi2;
6
7
  return (_component$parents$fi = (_component$parents = component.parents) === null || _component$parents === void 0 ? void 0 : (_component$parents$fi2 = _component$parents.find(parent => parent.key === parentKey)) === null || _component$parents$fi2 === void 0 ? void 0 : _component$parents$fi2.rank) !== null && _component$parents$fi !== void 0 ? _component$parents$fi : Number.MAX_SAFE_INTEGER;
@@ -18,6 +19,7 @@ export const getMatchingQuickInsertComponents = ({
18
19
  formatMessage,
19
20
  surfaceContext
20
21
  }) => {
22
+ var _childrenMap$get3;
21
23
  const {
22
24
  childrenMap,
23
25
  root,
@@ -70,9 +72,25 @@ export const getMatchingQuickInsertComponents = ({
70
72
  sectionsByKey.set(match.section.key, [match.section, match.item]);
71
73
  }
72
74
  }
75
+ const sections = Array.from(sectionsByKey.values());
76
+ if (sections.length > 0 || query === '') {
77
+ return {
78
+ footer: undefined,
79
+ root,
80
+ sections
81
+ };
82
+ }
83
+ const fallbackItem = topLevelChildren.filter(section => section.type === 'menu-section' && !isMenuFooterSectionKey(section.key) && willComponentRender(section, childrenMap, surfaceContext)).flatMap(section => {
84
+ var _childrenMap$get2;
85
+ return (_childrenMap$get2 = childrenMap.get(getComponentIdentity(section))) !== null && _childrenMap$get2 !== void 0 ? _childrenMap$get2 : [];
86
+ }).find(component => component.type === ASK_ROVO_MENU_ITEM.type && component.key === ASK_ROVO_MENU_ITEM.key && willComponentRender(component, childrenMap, surfaceContext));
87
+ const fallbackItems = fallbackItem ? [fallbackItem] : [];
88
+ const footerSection = topLevelChildren.find(section => section.type === 'menu-section' && isMenuFooterSectionKey(section.key) && willComponentRender(section, childrenMap, surfaceContext));
89
+ const footer = footerSection ? ((_childrenMap$get3 = childrenMap.get(getComponentIdentity(footerSection))) !== null && _childrenMap$get3 !== void 0 ? _childrenMap$get3 : []).find(child => child.type === 'menu-item' && willComponentRender(child, childrenMap, surfaceContext)) : undefined;
73
90
  return {
74
- footer: undefined,
91
+ fallbackItems,
92
+ footer,
75
93
  root,
76
- sections: Array.from(sectionsByKey.values())
94
+ sections
77
95
  };
78
96
  };
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import { fg } from '@atlaskit/platform-feature-flags/fg';
15
15
  import Layer from '../Layer';
16
16
  const packageName = "@atlaskit/editor-common";
17
- const packageVersion = "123.5.1";
17
+ const packageVersion = "123.6.0";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -72,6 +72,7 @@ export default function MentionWithProfileCard({
72
72
  if (userType === 'APP' && cloudId && isExperimentEnabled('rovo_chat_mention_agents')) {
73
73
  return /*#__PURE__*/React.createElement(AgentProfileCardTrigger, {
74
74
  agentId: id,
75
+ agentIdType: isExperimentEnabled('platform_editor_comment_mention_card_fixes') ? 'identity' : undefined,
75
76
  cloudId: cloudId,
76
77
  resourceClient: resourceClient,
77
78
  trigger: "click"
@@ -125,7 +125,7 @@ export const ToolbarArrowKeyNavigationProvider = ({
125
125
  if (targetElement instanceof HTMLElement && !targetElement.closest(`${childComponentSelector}`)) {
126
126
  return;
127
127
  }
128
- if (targetElement instanceof HTMLElement && (_document$querySelect = document.querySelector('[data-role="droplistContent"], [data-test-id="color-picker-menu"], [data-emoji-picker-container="true"]')) !== null && _document$querySelect !== void 0 && _document$querySelect.contains(targetElement) || targetElement instanceof HTMLElement && (_document$querySelect2 = document.querySelector('[data-test-id="color-picker-menu"]')) !== null && _document$querySelect2 !== void 0 && _document$querySelect2.contains(targetElement) || event.key === 'ArrowUp' || event.key === 'ArrowDown' || disableArrowKeyNavigation) {
128
+ if (targetElement instanceof HTMLElement && (_document$querySelect = document.querySelector('[data-role="droplistContent"], [data-test-id="color-picker-menu"], [data-emoji-picker-container="true"]')) !== null && _document$querySelect !== void 0 && _document$querySelect.contains(targetElement) || targetElement instanceof HTMLElement && (_document$querySelect2 = document.querySelector('[data-test-id="color-picker-menu"]')) !== null && _document$querySelect2 !== void 0 && _document$querySelect2.contains(targetElement) || targetElement instanceof HTMLElement && targetElement.closest('[data-keyboard-navigation-independent]') || event.key === 'ArrowUp' || event.key === 'ArrowDown' || disableArrowKeyNavigation) {
129
129
  return;
130
130
  }
131
131
  const menuWrapper = document.querySelector('.menu-key-handler-wrapper');
@@ -262,10 +262,10 @@ function isElementOrAncestorHiddenOrDisabled(element, rootNode) {
262
262
  return false;
263
263
  }
264
264
  function getFilteredFocusableElements(rootNode) {
265
- // The focusable elements from child components such as dropdown menus / popups are ignored
265
+ // Independent containers and child popups own their key handling and tab stops.
266
266
  return getFocusableElements(rootNode).filter(elm => {
267
267
  // Check if element or any ancestor is hidden or disabled
268
268
  const isHiddenOrDisabled = isElementOrAncestorHiddenOrDisabled(elm, rootNode);
269
- return !elm.closest('[data-role="droplistContent"]') && !elm.closest('[data-emoji-picker-container="true"]') && !elm.closest('[data-test-id="color-picker-menu"]') && !elm.closest('.scroll-buttons') && !isHiddenOrDisabled;
269
+ return !elm.closest('[data-role="droplistContent"]') && !elm.closest('[data-emoji-picker-container="true"]') && !elm.closest('[data-test-id="color-picker-menu"]') && !elm.closest('[data-keyboard-navigation-independent]') && !elm.closest('.scroll-buttons') && !isHiddenOrDisabled;
270
270
  });
271
271
  }
@@ -19,7 +19,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
19
19
  var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
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 = "123.5.1";
22
+ var packageVersion = "123.6.0";
23
23
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
24
24
  // Remove URL as it has UGC
25
25
  // Ignored via go/ees007
@@ -4,6 +4,7 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
4
4
  import { getComponentIdentity, resolveSurface, willComponentRender } from '@atlaskit/editor-ui-control-model/surface-renderer';
5
5
  import { isMenuFooterSectionKey } from '../type-ahead/isMenuFooterSectionKey';
6
6
  import { isSectionOverflowItemKey } from '../type-ahead/isSectionOverflowItemKey';
7
+ import { ASK_ROVO_MENU_ITEM } from './keys';
7
8
  var getRank = function getRank(component, parentKey) {
8
9
  var _component$parents$fi, _component$parents;
9
10
  return (_component$parents$fi = (_component$parents = component.parents) === null || _component$parents === void 0 || (_component$parents = _component$parents.find(function (parent) {
@@ -19,6 +20,7 @@ var compareMatchedItems = function compareMatchedItems(a, b) {
19
20
  * no empty-query path so browse behavior remains owned by buildQuickInsertMenuModel.
20
21
  */
21
22
  export var getMatchingQuickInsertComponents = function getMatchingQuickInsertComponents(_ref) {
23
+ var _childrenMap$get2;
22
24
  var components = _ref.components,
23
25
  rootComponent = _ref.rootComponent,
24
26
  query = _ref.query,
@@ -40,12 +42,12 @@ export var getMatchingQuickInsertComponents = function getMatchingQuickInsertCom
40
42
  _step;
41
43
  try {
42
44
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
43
- var _childrenMap$get;
45
+ var _childrenMap$get3;
44
46
  var section = _step.value;
45
47
  if (section.type !== 'menu-section' || isMenuFooterSectionKey(section.key) || !willComponentRender(section, childrenMap, surfaceContext)) {
46
48
  continue;
47
49
  }
48
- var _iterator3 = _createForOfIteratorHelper((_childrenMap$get = childrenMap.get(getComponentIdentity(section))) !== null && _childrenMap$get !== void 0 ? _childrenMap$get : []),
50
+ var _iterator3 = _createForOfIteratorHelper((_childrenMap$get3 = childrenMap.get(getComponentIdentity(section))) !== null && _childrenMap$get3 !== void 0 ? _childrenMap$get3 : []),
49
51
  _step3;
50
52
  try {
51
53
  for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
@@ -103,9 +105,33 @@ export var getMatchingQuickInsertComponents = function getMatchingQuickInsertCom
103
105
  } finally {
104
106
  _iterator2.f();
105
107
  }
108
+ var sections = Array.from(sectionsByKey.values());
109
+ if (sections.length > 0 || query === '') {
110
+ return {
111
+ footer: undefined,
112
+ root: root,
113
+ sections: sections
114
+ };
115
+ }
116
+ var fallbackItem = topLevelChildren.filter(function (section) {
117
+ return section.type === 'menu-section' && !isMenuFooterSectionKey(section.key) && willComponentRender(section, childrenMap, surfaceContext);
118
+ }).flatMap(function (section) {
119
+ var _childrenMap$get;
120
+ return (_childrenMap$get = childrenMap.get(getComponentIdentity(section))) !== null && _childrenMap$get !== void 0 ? _childrenMap$get : [];
121
+ }).find(function (component) {
122
+ return component.type === ASK_ROVO_MENU_ITEM.type && component.key === ASK_ROVO_MENU_ITEM.key && willComponentRender(component, childrenMap, surfaceContext);
123
+ });
124
+ var fallbackItems = fallbackItem ? [fallbackItem] : [];
125
+ var footerSection = topLevelChildren.find(function (section) {
126
+ return section.type === 'menu-section' && isMenuFooterSectionKey(section.key) && willComponentRender(section, childrenMap, surfaceContext);
127
+ });
128
+ var footer = footerSection ? ((_childrenMap$get2 = childrenMap.get(getComponentIdentity(footerSection))) !== null && _childrenMap$get2 !== void 0 ? _childrenMap$get2 : []).find(function (child) {
129
+ return child.type === 'menu-item' && willComponentRender(child, childrenMap, surfaceContext);
130
+ }) : undefined;
106
131
  return {
107
- footer: undefined,
132
+ fallbackItems: fallbackItems,
133
+ footer: footer,
108
134
  root: root,
109
- sections: Array.from(sectionsByKey.values())
135
+ sections: sections
110
136
  };
111
137
  };
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
21
21
  import { fg } from '@atlaskit/platform-feature-flags/fg';
22
22
  import Layer from '../Layer';
23
23
  var packageName = "@atlaskit/editor-common";
24
- var packageVersion = "123.5.1";
24
+ var packageVersion = "123.6.0";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var fadeIn = keyframes({
@@ -77,6 +77,7 @@ export default function MentionWithProfileCard(_ref) {
77
77
  if (userType === 'APP' && cloudId && isExperimentEnabled('rovo_chat_mention_agents')) {
78
78
  return /*#__PURE__*/React.createElement(AgentProfileCardTrigger, {
79
79
  agentId: id,
80
+ agentIdType: isExperimentEnabled('platform_editor_comment_mention_card_fixes') ? 'identity' : undefined,
80
81
  cloudId: cloudId,
81
82
  resourceClient: resourceClient,
82
83
  trigger: "click"
@@ -125,7 +125,7 @@ export var ToolbarArrowKeyNavigationProvider = function ToolbarArrowKeyNavigatio
125
125
  if (targetElement instanceof HTMLElement && !targetElement.closest("".concat(childComponentSelector))) {
126
126
  return;
127
127
  }
128
- if (targetElement instanceof HTMLElement && (_document$querySelect = document.querySelector('[data-role="droplistContent"], [data-test-id="color-picker-menu"], [data-emoji-picker-container="true"]')) !== null && _document$querySelect !== void 0 && _document$querySelect.contains(targetElement) || targetElement instanceof HTMLElement && (_document$querySelect2 = document.querySelector('[data-test-id="color-picker-menu"]')) !== null && _document$querySelect2 !== void 0 && _document$querySelect2.contains(targetElement) || event.key === 'ArrowUp' || event.key === 'ArrowDown' || disableArrowKeyNavigation) {
128
+ if (targetElement instanceof HTMLElement && (_document$querySelect = document.querySelector('[data-role="droplistContent"], [data-test-id="color-picker-menu"], [data-emoji-picker-container="true"]')) !== null && _document$querySelect !== void 0 && _document$querySelect.contains(targetElement) || targetElement instanceof HTMLElement && (_document$querySelect2 = document.querySelector('[data-test-id="color-picker-menu"]')) !== null && _document$querySelect2 !== void 0 && _document$querySelect2.contains(targetElement) || targetElement instanceof HTMLElement && targetElement.closest('[data-keyboard-navigation-independent]') || event.key === 'ArrowUp' || event.key === 'ArrowDown' || disableArrowKeyNavigation) {
129
129
  return;
130
130
  }
131
131
  var menuWrapper = document.querySelector('.menu-key-handler-wrapper');
@@ -262,10 +262,10 @@ function isElementOrAncestorHiddenOrDisabled(element, rootNode) {
262
262
  return false;
263
263
  }
264
264
  function getFilteredFocusableElements(rootNode) {
265
- // The focusable elements from child components such as dropdown menus / popups are ignored
265
+ // Independent containers and child popups own their key handling and tab stops.
266
266
  return getFocusableElements(rootNode).filter(function (elm) {
267
267
  // Check if element or any ancestor is hidden or disabled
268
268
  var isHiddenOrDisabled = isElementOrAncestorHiddenOrDisabled(elm, rootNode);
269
- return !elm.closest('[data-role="droplistContent"]') && !elm.closest('[data-emoji-picker-container="true"]') && !elm.closest('[data-test-id="color-picker-menu"]') && !elm.closest('.scroll-buttons') && !isHiddenOrDisabled;
269
+ return !elm.closest('[data-role="droplistContent"]') && !elm.closest('[data-emoji-picker-container="true"]') && !elm.closest('[data-test-id="color-picker-menu"]') && !elm.closest('[data-keyboard-navigation-independent]') && !elm.closest('.scroll-buttons') && !isHiddenOrDisabled;
270
270
  });
271
271
  }
@@ -3,6 +3,7 @@ import type { RegisterComponent, RegisterMenuItem, RegisterMenuSection, SurfaceC
3
3
  import type { QuickInsertCategoryItemSelectionPolicy } from './selectQuickInsertCategoryItems';
4
4
  export type QuickInsertMenuSection = [RegisterMenuSection, ...RegisterMenuItem[]];
5
5
  export type QuickInsertMenuModel = {
6
+ fallbackItems?: RegisterMenuItem[];
6
7
  footer: RegisterMenuItem | undefined;
7
8
  root: RegisterComponent | undefined;
8
9
  sections: QuickInsertMenuSection[];
@@ -3,4 +3,5 @@ export type EmptyStateHandlerParams = {
3
3
  mode: string;
4
4
  searchTerm?: string;
5
5
  selectedCategory?: string;
6
+ showNoResultsMessage?: boolean;
6
7
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "123.6.0",
3
+ "version": "123.7.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/"
@@ -78,7 +78,7 @@
78
78
  "@atlaskit/react-compiler-gating": "^0.2.0",
79
79
  "@atlaskit/react-ufo": "^7.13.0",
80
80
  "@atlaskit/section-message": "^10.2.0",
81
- "@atlaskit/smart-card": "^45.25.0",
81
+ "@atlaskit/smart-card": "^45.26.0",
82
82
  "@atlaskit/smart-user-picker": "^11.8.0",
83
83
  "@atlaskit/spinner": "^20.4.0",
84
84
  "@atlaskit/task-decision": "^21.10.0",