@atlaskit/editor-plugin-mentions 17.1.1 → 17.1.3

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,20 @@
1
1
  # @atlaskit/editor-plugin-mentions
2
2
 
3
+ ## 17.1.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 17.1.2
10
+
11
+ ### Patch Changes
12
+
13
+ - [`f586794c14d5b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f586794c14d5b) -
14
+ Under agent sectioning, the "Add teammate" option in the mention typeahead now appears below the
15
+ agent results instead of above them, so the first highlighted option is an agent you can select
16
+ with Enter. Behind the `platform_editor_agent_mentions_invite_order` feature gate.
17
+
3
18
  ## 17.1.1
4
19
 
5
20
  ### Patch Changes
@@ -67,7 +67,7 @@ var AI_STREAMING_TRANSFORMATION_META_KEY = 'isAIStreamingTransformation';
67
67
  var AGENT_MENTION_INACTIVITY_MS = 3000;
68
68
  var MAX_PENDING_TYPED_AGENT_MENTION_FOCUS_DEFERS = 20;
69
69
  var PACKAGE_NAME = "@atlaskit/editor-plugin-mentions";
70
- var PACKAGE_VERSION = "17.1.0";
70
+ var PACKAGE_VERSION = "17.1.2";
71
71
  var setProvider = function setProvider(provider) {
72
72
  return function (state, dispatch) {
73
73
  if (dispatch) {
@@ -431,7 +431,17 @@ var createTypeAheadConfig = exports.createTypeAheadConfig = function createTypeA
431
431
  id: 'people',
432
432
  title: intl.formatMessage(_messages.mentionMessages.typeAheadSectionPeople),
433
433
  filter: function filter(item) {
434
- return !isAgentTypeAheadItem(item);
434
+ if (isAgentTypeAheadItem(item)) {
435
+ return false;
436
+ }
437
+ // Keep the invite ("Add teammate") row out of the people section so no
438
+ // section claims it. `buildSectionedResult` then appends it after every
439
+ // section, placing it below the agent results instead of above them, so the
440
+ // first highlighted option is an agent you can pick with Enter.
441
+ if (item.mention && (0, _utils3.isInviteItem)(item.mention) && (0, _platformFeatureFlags.fg)('platform_editor_agent_mentions_invite_order')) {
442
+ return false;
443
+ }
444
+ return true;
435
445
  },
436
446
  limit: 5,
437
447
  sectionTitleDisplay: {
@@ -51,7 +51,7 @@ const AI_STREAMING_TRANSFORMATION_META_KEY = 'isAIStreamingTransformation';
51
51
  const AGENT_MENTION_INACTIVITY_MS = 3000;
52
52
  const MAX_PENDING_TYPED_AGENT_MENTION_FOCUS_DEFERS = 20;
53
53
  const PACKAGE_NAME = "@atlaskit/editor-plugin-mentions";
54
- const PACKAGE_VERSION = "17.1.0";
54
+ const PACKAGE_VERSION = "17.1.2";
55
55
  const setProvider = provider => (state, dispatch) => {
56
56
  if (dispatch) {
57
57
  dispatch(state.tr.setMeta(mentionPluginKey, {
@@ -401,7 +401,19 @@ export const createTypeAheadConfig = ({
401
401
  return [{
402
402
  id: 'people',
403
403
  title: intl.formatMessage(mentionMessages.typeAheadSectionPeople),
404
- filter: item => !isAgentTypeAheadItem(item),
404
+ filter: item => {
405
+ if (isAgentTypeAheadItem(item)) {
406
+ return false;
407
+ }
408
+ // Keep the invite ("Add teammate") row out of the people section so no
409
+ // section claims it. `buildSectionedResult` then appends it after every
410
+ // section, placing it below the agent results instead of above them, so the
411
+ // first highlighted option is an agent you can pick with Enter.
412
+ if (item.mention && isInviteItem(item.mention) && fg('platform_editor_agent_mentions_invite_order')) {
413
+ return false;
414
+ }
415
+ return true;
416
+ },
405
417
  limit: 5,
406
418
  sectionTitleDisplay: {
407
419
  showWhenQueryPresent: false,
@@ -58,7 +58,7 @@ var AI_STREAMING_TRANSFORMATION_META_KEY = 'isAIStreamingTransformation';
58
58
  var AGENT_MENTION_INACTIVITY_MS = 3000;
59
59
  var MAX_PENDING_TYPED_AGENT_MENTION_FOCUS_DEFERS = 20;
60
60
  var PACKAGE_NAME = "@atlaskit/editor-plugin-mentions";
61
- var PACKAGE_VERSION = "17.1.0";
61
+ var PACKAGE_VERSION = "17.1.2";
62
62
  var setProvider = function setProvider(provider) {
63
63
  return function (state, dispatch) {
64
64
  if (dispatch) {
@@ -422,7 +422,17 @@ export var createTypeAheadConfig = function createTypeAheadConfig(_ref9) {
422
422
  id: 'people',
423
423
  title: intl.formatMessage(mentionMessages.typeAheadSectionPeople),
424
424
  filter: function filter(item) {
425
- return !isAgentTypeAheadItem(item);
425
+ if (isAgentTypeAheadItem(item)) {
426
+ return false;
427
+ }
428
+ // Keep the invite ("Add teammate") row out of the people section so no
429
+ // section claims it. `buildSectionedResult` then appends it after every
430
+ // section, placing it below the agent results instead of above them, so the
431
+ // first highlighted option is an agent you can pick with Enter.
432
+ if (item.mention && isInviteItem(item.mention) && fg('platform_editor_agent_mentions_invite_order')) {
433
+ return false;
434
+ }
435
+ return true;
426
436
  },
427
437
  limit: 5,
428
438
  sectionTitleDisplay: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-mentions",
3
- "version": "17.1.1",
3
+ "version": "17.1.3",
4
4
  "description": "Mentions plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -46,7 +46,7 @@
46
46
  "@atlaskit/profilecard": "^26.18.0",
47
47
  "@atlaskit/teams-app-config": "^2.2.0",
48
48
  "@atlaskit/theme": "^28.0.0",
49
- "@atlaskit/tmp-editor-statsig": "^147.1.0",
49
+ "@atlaskit/tmp-editor-statsig": "^148.0.0",
50
50
  "@atlaskit/tokens": "^16.7.0",
51
51
  "@atlaskit/tooltip": "^24.0.0",
52
52
  "@atlaskit/user-picker": "^13.9.0",
@@ -58,7 +58,7 @@
58
58
  "uuid": "^3.1.0"
59
59
  },
60
60
  "peerDependencies": {
61
- "@atlaskit/editor-common": "^119.4.0",
61
+ "@atlaskit/editor-common": "^119.5.0",
62
62
  "react": "^18.2.0 || ^19.2.0",
63
63
  "react-dom": "^18.2.0 || ^19.2.0",
64
64
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
@@ -130,6 +130,9 @@
130
130
  },
131
131
  "platform_editor_mention_typeahead_profilecard": {
132
132
  "type": "boolean"
133
+ },
134
+ "platform_editor_agent_mentions_invite_order": {
135
+ "type": "boolean"
133
136
  }
134
137
  },
135
138
  "platform-experiments": {