@atlaskit/editor-plugin-quick-insert 30.0.4 → 30.0.5

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,15 @@
1
1
  # @atlaskit/editor-plugin-quick-insert
2
2
 
3
+ ## 30.0.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [`92255b30e6242`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/92255b30e6242) -
8
+ Keep Quick Insert match scores consistent across menus. Recommend Jira work items followed by Jira
9
+ work item creation for `ji`, `jir`, and `jira`. Add `task` as a search keyword for Jira work item
10
+ creation under `platform_editor_slash_command`.
11
+ - Updated dependencies
12
+
3
13
  ## 30.0.4
4
14
 
5
15
  ### Patch Changes
@@ -19,7 +19,6 @@ var _keys = require("@atlaskit/editor-common/quick-insert/keys");
19
19
  var _surfaceContext = require("@atlaskit/editor-common/registered-menu/surface-context");
20
20
  var _typeAheadGetMenuFooterSectionKey = require("@atlaskit/editor-common/type-ahead-get-menu-footer-section-key");
21
21
  var _typeAheadGetSectionOverflowItemKey = require("@atlaskit/editor-common/type-ahead-get-section-overflow-item-key");
22
- var _heading = _interopRequireDefault(require("@atlaskit/heading/heading"));
23
22
  var _cross = _interopRequireDefault(require("@atlaskit/icon/core/cross"));
24
23
  var _modalBody = _interopRequireDefault(require("@atlaskit/modal-dialog/modal-body"));
25
24
  var _modalDialog = _interopRequireDefault(require("@atlaskit/modal-dialog/modal-dialog"));
@@ -27,7 +26,6 @@ var _modalFooter = _interopRequireDefault(require("@atlaskit/modal-dialog/modal-
27
26
  var _modalHeader = _interopRequireDefault(require("@atlaskit/modal-dialog/modal-header"));
28
27
  var _modalTitle = _interopRequireDefault(require("@atlaskit/modal-dialog/modal-title"));
29
28
  var _modalTransition = _interopRequireDefault(require("@atlaskit/modal-dialog/modal-transition"));
30
- var _fg = require("@atlaskit/platform-feature-flags/fg");
31
29
  var _textField = _interopRequireDefault(require("@atlaskit/textfield/text-field"));
32
30
  var _useQuickInsertSearchAnalytics = require("../registered-menu/useQuickInsertSearchAnalytics");
33
31
  var _model = require("./model");
@@ -337,12 +335,7 @@ var RegistryElementBrowser = exports.RegistryElementBrowser = function RegistryE
337
335
  width: "min(968px, calc(100vw - 32px))"
338
336
  }, /*#__PURE__*/_react.default.createElement(_modalHeader.default, null, /*#__PURE__*/_react.default.createElement("div", {
339
337
  className: (0, _runtime.ax)(["_zulp1fka _1e0c11p5 _yv0e1xuv _1bsb1osq _lk4ji47z"])
340
- }, (0, _fg.fg)('platform_dst_modal-dialog-use-modal-title') ? /*#__PURE__*/_react.default.createElement(_modalTitle.default, null, formatMessage({
341
- defaultMessage: 'Insert elements',
342
- id: 'editor.quick-insert.title'
343
- })) : /*#__PURE__*/_react.default.createElement(_heading.default, {
344
- size: "medium"
345
- }, formatMessage({
338
+ }, /*#__PURE__*/_react.default.createElement(_modalTitle.default, null, formatMessage({
346
339
  defaultMessage: 'Insert elements',
347
340
  id: 'editor.quick-insert.title'
348
341
  })), /*#__PURE__*/_react.default.createElement("div", {
@@ -9,6 +9,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
9
9
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
10
10
  var _createQuickInsertMatcher = require("@atlaskit/editor-common/quick-insert/create-quick-insert-matcher");
11
11
  var _keys = require("@atlaskit/editor-common/quick-insert/keys");
12
+ var _normalizeQuickInsertMatchResult = require("../normalizeQuickInsertMatchResult");
12
13
  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
14
  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; }
14
15
  var compareRanks = function compareRanks(left, right) {
@@ -134,10 +135,7 @@ var getRegistryElementBrowserItems = exports.getRegistryElementBrowserItems = fu
134
135
  itemKey: item.registration.key,
135
136
  query: normalizedQuery
136
137
  });
137
- return result ? [_objectSpread(_objectSpread({}, item), {}, {
138
- priorityGroup: result.priorityGroup !== undefined && Number.isFinite(result.priorityGroup) ? result.priorityGroup : undefined,
139
- score: Math.min(1, Math.max(0, result.score))
140
- })] : [];
138
+ return result ? [_objectSpread(_objectSpread({}, item), (0, _normalizeQuickInsertMatchResult.normalizeQuickInsertMatchResult)(result))] : [];
141
139
  });
142
140
  var prioritized = matches.filter(function (_ref4) {
143
141
  var priorityGroup = _ref4.priorityGroup;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.normalizeQuickInsertMatchResult = void 0;
7
+ /** Keeps score and priority handling consistent across Quick Insert search models. */
8
+ var normalizeQuickInsertMatchResult = exports.normalizeQuickInsertMatchResult = function normalizeQuickInsertMatchResult(match) {
9
+ var _match$score;
10
+ return {
11
+ priorityGroup: Number.isFinite(match === null || match === void 0 ? void 0 : match.priorityGroup) ? match === null || match === void 0 ? void 0 : match.priorityGroup : undefined,
12
+ score: Math.min(1, Math.max(0, (_match$score = match === null || match === void 0 ? void 0 : match.score) !== null && _match$score !== void 0 ? _match$score : 0))
13
+ };
14
+ };
@@ -12,6 +12,7 @@ var _itemRank = require("@atlaskit/editor-common/registered-menu/item-rank");
12
12
  var _typeAheadIsMenuFooterSectionKey = require("@atlaskit/editor-common/type-ahead-is-menu-footer-section-key");
13
13
  var _typeAheadIsSectionOverflowItemKey = require("@atlaskit/editor-common/type-ahead-is-section-overflow-item-key");
14
14
  var _surfaceRenderer = require("@atlaskit/editor-ui-control-model/surface-renderer");
15
+ var _normalizeQuickInsertMatchResult = require("../normalizeQuickInsertMatchResult");
15
16
  var _QuickInsertSearchResultsSection = require("./QuickInsertSearchResultsSection");
16
17
  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; }
17
18
  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; }
@@ -187,7 +188,7 @@ var buildSearchSections = function buildSearchSections(_ref5) {
187
188
  _step5;
188
189
  try {
189
190
  for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
190
- var _item$match, _match$score, _sourceIndexByCompone;
191
+ var _item$match, _sourceIndexByCompone;
191
192
  var item = _step5.value;
192
193
  if (item.key === _keys.ASK_ROVO_MENU_ITEM.key) {
193
194
  fallbackItem !== null && fallbackItem !== void 0 ? fallbackItem : fallbackItem = item;
@@ -200,15 +201,15 @@ var buildSearchSections = function buildSearchSections(_ref5) {
200
201
  if (item.match && match === null || getOwnerSectionKey(item, isRecommendedItem) !== section.key) {
201
202
  continue;
202
203
  }
203
- var candidate = {
204
+ var normalizedMatch = (0, _normalizeQuickInsertMatchResult.normalizeQuickInsertMatchResult)(match);
205
+ var candidate = _objectSpread(_objectSpread({
204
206
  identity: (0, _surfaceRenderer.getComponentIdentity)(item),
205
207
  item: item,
206
- itemRank: getParentRank(item, section.key),
207
- priorityGroup: (match === null || match === void 0 ? void 0 : match.priorityGroup) !== undefined && Number.isFinite(match.priorityGroup) ? match.priorityGroup : undefined,
208
- score: Math.min(1, Math.max(0, (_match$score = match === null || match === void 0 ? void 0 : match.score) !== null && _match$score !== void 0 ? _match$score : 0)),
208
+ itemRank: getParentRank(item, section.key)
209
+ }, normalizedMatch), {}, {
209
210
  sectionRank: sectionRank,
210
211
  sourceIndex: (_sourceIndexByCompone = sourceIndexByComponent.get(item)) !== null && _sourceIndexByCompone !== void 0 ? _sourceIndexByCompone : Number.MAX_SAFE_INTEGER
211
- };
212
+ });
212
213
  var existing = matches.get(candidate.identity);
213
214
  if (!existing || compareMatchedItems(candidate, existing) < 0) {
214
215
  matches.set(candidate.identity, candidate);
@@ -10,7 +10,6 @@ import { MENU, RECOMMENDED_SECTION } from '@atlaskit/editor-common/quick-insert/
10
10
  import { createRegisteredMenuSurfaceContext } from '@atlaskit/editor-common/registered-menu/surface-context';
11
11
  import { getMenuFooterSectionKey } from '@atlaskit/editor-common/type-ahead-get-menu-footer-section-key';
12
12
  import { getSectionOverflowItemKey } from '@atlaskit/editor-common/type-ahead-get-section-overflow-item-key';
13
- import Heading from '@atlaskit/heading/heading';
14
13
  import CrossIcon from '@atlaskit/icon/core/cross';
15
14
  import ModalBody from '@atlaskit/modal-dialog/modal-body';
16
15
  import Modal from '@atlaskit/modal-dialog/modal-dialog';
@@ -18,7 +17,6 @@ import ModalFooter from '@atlaskit/modal-dialog/modal-footer';
18
17
  import ModalHeader from '@atlaskit/modal-dialog/modal-header';
19
18
  import ModalTitle from '@atlaskit/modal-dialog/modal-title';
20
19
  import ModalTransition from '@atlaskit/modal-dialog/modal-transition';
21
- import { fg } from '@atlaskit/platform-feature-flags/fg';
22
20
  import Textfield from '@atlaskit/textfield/text-field';
23
21
  import { useQuickInsertSearchAnalytics } from '../registered-menu/useQuickInsertSearchAnalytics';
24
22
  import { createRegistryElementBrowserModel, getInitialRegistryElementBrowserSection, getRegistryElementBrowserItems } from './model';
@@ -307,12 +305,7 @@ export const RegistryElementBrowser = ({
307
305
  width: "min(968px, calc(100vw - 32px))"
308
306
  }, /*#__PURE__*/React.createElement(ModalHeader, null, /*#__PURE__*/React.createElement("div", {
309
307
  className: ax(["_zulp1fka _1e0c11p5 _yv0e1xuv _1bsb1osq _lk4ji47z"])
310
- }, fg('platform_dst_modal-dialog-use-modal-title') ? /*#__PURE__*/React.createElement(ModalTitle, null, formatMessage({
311
- defaultMessage: 'Insert elements',
312
- id: 'editor.quick-insert.title'
313
- })) : /*#__PURE__*/React.createElement(Heading, {
314
- size: "medium"
315
- }, formatMessage({
308
+ }, /*#__PURE__*/React.createElement(ModalTitle, null, formatMessage({
316
309
  defaultMessage: 'Insert elements',
317
310
  id: 'editor.quick-insert.title'
318
311
  })), /*#__PURE__*/React.createElement("div", {
@@ -1,5 +1,6 @@
1
1
  import { createQuickInsertMatcher } from '@atlaskit/editor-common/quick-insert/create-quick-insert-matcher';
2
2
  import { ASK_ROVO_MENU_ITEM } from '@atlaskit/editor-common/quick-insert/keys';
3
+ import { normalizeQuickInsertMatchResult } from '../normalizeQuickInsertMatchResult';
3
4
  const compareRanks = (left, right) => {
4
5
  for (let index = 0; index < Math.max(left.length, right.length); index++) {
5
6
  var _left$index, _right$index;
@@ -105,8 +106,7 @@ export const getRegistryElementBrowserItems = ({
105
106
  });
106
107
  return result ? [{
107
108
  ...item,
108
- priorityGroup: result.priorityGroup !== undefined && Number.isFinite(result.priorityGroup) ? result.priorityGroup : undefined,
109
- score: Math.min(1, Math.max(0, result.score))
109
+ ...normalizeQuickInsertMatchResult(result)
110
110
  }] : [];
111
111
  });
112
112
  const prioritized = matches.filter(({
@@ -0,0 +1,8 @@
1
+ /** Keeps score and priority handling consistent across Quick Insert search models. */
2
+ export const normalizeQuickInsertMatchResult = match => {
3
+ var _match$score;
4
+ return {
5
+ priorityGroup: Number.isFinite(match === null || match === void 0 ? void 0 : match.priorityGroup) ? match === null || match === void 0 ? void 0 : match.priorityGroup : undefined,
6
+ score: Math.min(1, Math.max(0, (_match$score = match === null || match === void 0 ? void 0 : match.score) !== null && _match$score !== void 0 ? _match$score : 0))
7
+ };
8
+ };
@@ -3,6 +3,7 @@ import { applyRegisteredItemRanks } from '@atlaskit/editor-common/registered-men
3
3
  import { isMenuFooterSectionKey } from '@atlaskit/editor-common/type-ahead-is-menu-footer-section-key';
4
4
  import { isSectionOverflowItemKey } from '@atlaskit/editor-common/type-ahead-is-section-overflow-item-key';
5
5
  import { getComponentIdentity, resolveSurface, willComponentRender } from '@atlaskit/editor-ui-control-model/surface-renderer';
6
+ import { normalizeQuickInsertMatchResult } from '../normalizeQuickInsertMatchResult';
6
7
  import { QuickInsertSearchResultsSection } from './QuickInsertSearchResultsSection';
7
8
  const SEARCH_TOP_MATCH_LIMIT = 5;
8
9
  const SEARCH_RESULTS_HEADING = {
@@ -128,7 +129,7 @@ const buildSearchSections = ({
128
129
  } of contentSections) {
129
130
  const sectionRank = getParentRank(section, root.key);
130
131
  for (const item of items) {
131
- var _item$match, _match$score, _sourceIndexByCompone;
132
+ var _item$match, _sourceIndexByCompone;
132
133
  if (item.key === ASK_ROVO_MENU_ITEM.key) {
133
134
  fallbackItem ??= item;
134
135
  }
@@ -140,12 +141,12 @@ const buildSearchSections = ({
140
141
  if (item.match && match === null || getOwnerSectionKey(item, isRecommendedItem) !== section.key) {
141
142
  continue;
142
143
  }
144
+ const normalizedMatch = normalizeQuickInsertMatchResult(match);
143
145
  const candidate = {
144
146
  identity: getComponentIdentity(item),
145
147
  item,
146
148
  itemRank: getParentRank(item, section.key),
147
- priorityGroup: (match === null || match === void 0 ? void 0 : match.priorityGroup) !== undefined && Number.isFinite(match.priorityGroup) ? match.priorityGroup : undefined,
148
- score: Math.min(1, Math.max(0, (_match$score = match === null || match === void 0 ? void 0 : match.score) !== null && _match$score !== void 0 ? _match$score : 0)),
149
+ ...normalizedMatch,
149
150
  sectionRank,
150
151
  sourceIndex: (_sourceIndexByCompone = sourceIndexByComponent.get(item)) !== null && _sourceIndexByCompone !== void 0 ? _sourceIndexByCompone : Number.MAX_SAFE_INTEGER
151
152
  };
@@ -14,7 +14,6 @@ import { MENU, RECOMMENDED_SECTION } from '@atlaskit/editor-common/quick-insert/
14
14
  import { createRegisteredMenuSurfaceContext } from '@atlaskit/editor-common/registered-menu/surface-context';
15
15
  import { getMenuFooterSectionKey } from '@atlaskit/editor-common/type-ahead-get-menu-footer-section-key';
16
16
  import { getSectionOverflowItemKey } from '@atlaskit/editor-common/type-ahead-get-section-overflow-item-key';
17
- import Heading from '@atlaskit/heading/heading';
18
17
  import CrossIcon from '@atlaskit/icon/core/cross';
19
18
  import ModalBody from '@atlaskit/modal-dialog/modal-body';
20
19
  import Modal from '@atlaskit/modal-dialog/modal-dialog';
@@ -22,7 +21,6 @@ import ModalFooter from '@atlaskit/modal-dialog/modal-footer';
22
21
  import ModalHeader from '@atlaskit/modal-dialog/modal-header';
23
22
  import ModalTitle from '@atlaskit/modal-dialog/modal-title';
24
23
  import ModalTransition from '@atlaskit/modal-dialog/modal-transition';
25
- import { fg } from '@atlaskit/platform-feature-flags/fg';
26
24
  import Textfield from '@atlaskit/textfield/text-field';
27
25
  import { useQuickInsertSearchAnalytics } from '../registered-menu/useQuickInsertSearchAnalytics';
28
26
  import { createRegistryElementBrowserModel, getInitialRegistryElementBrowserSection, getRegistryElementBrowserItems } from './model';
@@ -329,12 +327,7 @@ export var RegistryElementBrowser = function RegistryElementBrowser(_ref) {
329
327
  width: "min(968px, calc(100vw - 32px))"
330
328
  }, /*#__PURE__*/React.createElement(ModalHeader, null, /*#__PURE__*/React.createElement("div", {
331
329
  className: ax(["_zulp1fka _1e0c11p5 _yv0e1xuv _1bsb1osq _lk4ji47z"])
332
- }, fg('platform_dst_modal-dialog-use-modal-title') ? /*#__PURE__*/React.createElement(ModalTitle, null, formatMessage({
333
- defaultMessage: 'Insert elements',
334
- id: 'editor.quick-insert.title'
335
- })) : /*#__PURE__*/React.createElement(Heading, {
336
- size: "medium"
337
- }, formatMessage({
330
+ }, /*#__PURE__*/React.createElement(ModalTitle, null, formatMessage({
338
331
  defaultMessage: 'Insert elements',
339
332
  id: 'editor.quick-insert.title'
340
333
  })), /*#__PURE__*/React.createElement("div", {
@@ -4,6 +4,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
4
4
  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; }
5
5
  import { createQuickInsertMatcher } from '@atlaskit/editor-common/quick-insert/create-quick-insert-matcher';
6
6
  import { ASK_ROVO_MENU_ITEM } from '@atlaskit/editor-common/quick-insert/keys';
7
+ import { normalizeQuickInsertMatchResult } from '../normalizeQuickInsertMatchResult';
7
8
  var compareRanks = function compareRanks(left, right) {
8
9
  for (var index = 0; index < Math.max(left.length, right.length); index++) {
9
10
  var _left$index, _right$index;
@@ -127,10 +128,7 @@ export var getRegistryElementBrowserItems = function getRegistryElementBrowserIt
127
128
  itemKey: item.registration.key,
128
129
  query: normalizedQuery
129
130
  });
130
- return result ? [_objectSpread(_objectSpread({}, item), {}, {
131
- priorityGroup: result.priorityGroup !== undefined && Number.isFinite(result.priorityGroup) ? result.priorityGroup : undefined,
132
- score: Math.min(1, Math.max(0, result.score))
133
- })] : [];
131
+ return result ? [_objectSpread(_objectSpread({}, item), normalizeQuickInsertMatchResult(result))] : [];
134
132
  });
135
133
  var prioritized = matches.filter(function (_ref4) {
136
134
  var priorityGroup = _ref4.priorityGroup;
@@ -0,0 +1,8 @@
1
+ /** Keeps score and priority handling consistent across Quick Insert search models. */
2
+ export var normalizeQuickInsertMatchResult = function normalizeQuickInsertMatchResult(match) {
3
+ var _match$score;
4
+ return {
5
+ priorityGroup: Number.isFinite(match === null || match === void 0 ? void 0 : match.priorityGroup) ? match === null || match === void 0 ? void 0 : match.priorityGroup : undefined,
6
+ score: Math.min(1, Math.max(0, (_match$score = match === null || match === void 0 ? void 0 : match.score) !== null && _match$score !== void 0 ? _match$score : 0))
7
+ };
8
+ };
@@ -10,6 +10,7 @@ import { applyRegisteredItemRanks } from '@atlaskit/editor-common/registered-men
10
10
  import { isMenuFooterSectionKey } from '@atlaskit/editor-common/type-ahead-is-menu-footer-section-key';
11
11
  import { isSectionOverflowItemKey } from '@atlaskit/editor-common/type-ahead-is-section-overflow-item-key';
12
12
  import { getComponentIdentity, resolveSurface, willComponentRender } from '@atlaskit/editor-ui-control-model/surface-renderer';
13
+ import { normalizeQuickInsertMatchResult } from '../normalizeQuickInsertMatchResult';
13
14
  import { QuickInsertSearchResultsSection } from './QuickInsertSearchResultsSection';
14
15
  var SEARCH_TOP_MATCH_LIMIT = 5;
15
16
  var SEARCH_RESULTS_HEADING = {
@@ -180,7 +181,7 @@ var buildSearchSections = function buildSearchSections(_ref5) {
180
181
  _step5;
181
182
  try {
182
183
  for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
183
- var _item$match, _match$score, _sourceIndexByCompone;
184
+ var _item$match, _sourceIndexByCompone;
184
185
  var item = _step5.value;
185
186
  if (item.key === ASK_ROVO_MENU_ITEM.key) {
186
187
  fallbackItem !== null && fallbackItem !== void 0 ? fallbackItem : fallbackItem = item;
@@ -193,15 +194,15 @@ var buildSearchSections = function buildSearchSections(_ref5) {
193
194
  if (item.match && match === null || getOwnerSectionKey(item, isRecommendedItem) !== section.key) {
194
195
  continue;
195
196
  }
196
- var candidate = {
197
+ var normalizedMatch = normalizeQuickInsertMatchResult(match);
198
+ var candidate = _objectSpread(_objectSpread({
197
199
  identity: getComponentIdentity(item),
198
200
  item: item,
199
- itemRank: getParentRank(item, section.key),
200
- priorityGroup: (match === null || match === void 0 ? void 0 : match.priorityGroup) !== undefined && Number.isFinite(match.priorityGroup) ? match.priorityGroup : undefined,
201
- score: Math.min(1, Math.max(0, (_match$score = match === null || match === void 0 ? void 0 : match.score) !== null && _match$score !== void 0 ? _match$score : 0)),
201
+ itemRank: getParentRank(item, section.key)
202
+ }, normalizedMatch), {}, {
202
203
  sectionRank: sectionRank,
203
204
  sourceIndex: (_sourceIndexByCompone = sourceIndexByComponent.get(item)) !== null && _sourceIndexByCompone !== void 0 ? _sourceIndexByCompone : Number.MAX_SAFE_INTEGER
204
- };
205
+ });
205
206
  var existing = matches.get(candidate.identity);
206
207
  if (!existing || compareMatchedItems(candidate, existing) < 0) {
207
208
  matches.set(candidate.identity, candidate);
@@ -0,0 +1,3 @@
1
+ import type { MenuItemMatchResult } from '@atlaskit/editor-ui-control-model/types';
2
+ /** Keeps score and priority handling consistent across Quick Insert search models. */
3
+ export declare const normalizeQuickInsertMatchResult: (match: MenuItemMatchResult | null | undefined) => MenuItemMatchResult;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-quick-insert",
3
- "version": "30.0.4",
3
+ "version": "30.0.5",
4
4
  "description": "Quick insert plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -26,7 +26,7 @@
26
26
  ],
27
27
  "atlaskit:src": "src/index.ts",
28
28
  "dependencies": {
29
- "@atlaskit/button": "^25.6.0",
29
+ "@atlaskit/button": "^25.7.0",
30
30
  "@atlaskit/css": "^1.1.0",
31
31
  "@atlaskit/docs": "^12.3.0",
32
32
  "@atlaskit/editor-plugin-analytics": "^30.0.0",
@@ -41,12 +41,12 @@
41
41
  "@atlaskit/heading": "^8.0.0",
42
42
  "@atlaskit/icon": "^38.0.0",
43
43
  "@atlaskit/menu": "^11.0.0",
44
- "@atlaskit/modal-dialog": "^17.1.0",
44
+ "@atlaskit/modal-dialog": "^17.2.0",
45
45
  "@atlaskit/platform-feature-experiments": "^0.3.0",
46
46
  "@atlaskit/platform-feature-flags": "^2.2.0",
47
47
  "@atlaskit/primitives": "^22.6.0",
48
48
  "@atlaskit/textfield": "^10.3.0",
49
- "@atlaskit/tokens": "^20.8.0",
49
+ "@atlaskit/tokens": "^20.9.0",
50
50
  "@atlaskit/tooltip": "^24.4.0",
51
51
  "@babel/runtime": "^7.0.0",
52
52
  "@compiled/react": "^1.0.2",
@@ -54,12 +54,13 @@
54
54
  "react-loosely-lazy": "^1.0.0"
55
55
  },
56
56
  "peerDependencies": {
57
- "@atlaskit/editor-common": "^134.2.0",
57
+ "@atlaskit/editor-common": "^134.6.0",
58
58
  "react": "^18.2.0 || ^19.2.0",
59
59
  "react-dom": "^18.2.0 || ^19.2.0",
60
60
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
61
61
  },
62
62
  "devDependencies": {
63
+ "@atlaskit/editor-common": "^134.6.0",
63
64
  "@atlassian/structured-docs-types": "workspace:^",
64
65
  "react": "^19.2.0",
65
66
  "react-dom": "^19.2.0",
@@ -68,10 +69,6 @@
68
69
  "platform-feature-flags": {
69
70
  "platform_editor_ease_of_use_metrics": {
70
71
  "type": "boolean"
71
- },
72
- "platform_dst_modal-dialog-use-modal-title": {
73
- "type": "boolean",
74
- "referenceOnly": true
75
72
  }
76
73
  }
77
74
  }