@atlaskit/editor-plugin-mentions 17.1.0 → 17.1.2
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 +15 -0
- package/dist/cjs/nodeviews/mentionNodeView.js +1 -1
- package/dist/cjs/pm-plugins/main.js +1 -1
- package/dist/cjs/ui/type-ahead/index.js +11 -1
- package/dist/es2019/nodeviews/mentionNodeView.js +2 -0
- package/dist/es2019/pm-plugins/main.js +1 -1
- package/dist/es2019/ui/type-ahead/index.js +13 -1
- package/dist/esm/nodeviews/mentionNodeView.js +2 -0
- package/dist/esm/pm-plugins/main.js +1 -1
- package/dist/esm/ui/type-ahead/index.js +11 -1
- package/package.json +8 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-mentions
|
|
2
2
|
|
|
3
|
+
## 17.1.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`f586794c14d5b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f586794c14d5b) -
|
|
8
|
+
Under agent sectioning, the "Add teammate" option in the mention typeahead now appears below the
|
|
9
|
+
agent results instead of above them, so the first highlighted option is an agent you can select
|
|
10
|
+
with Enter. Behind the `platform_editor_agent_mentions_invite_order` feature gate.
|
|
11
|
+
|
|
12
|
+
## 17.1.1
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 17.1.0
|
|
4
19
|
|
|
5
20
|
### Minor Changes
|
|
@@ -24,7 +24,7 @@ var _disabledTooltipRenderer = require("./disabledTooltipRenderer");
|
|
|
24
24
|
var _mentionAvatarRenderer = require("./mentionAvatarRenderer");
|
|
25
25
|
var _profileCardRenderer2 = require("./profileCardRenderer");
|
|
26
26
|
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; }
|
|
27
|
-
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; }
|
|
27
|
+
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; } // oxlint-disable-next-line import/no-duplicates
|
|
28
28
|
var primitiveClassName = 'editor-mention-primitive';
|
|
29
29
|
var primitiveWithAvatarClassName = 'editor-mention-primitive-with-avatar';
|
|
30
30
|
var avatarContainerClassName = 'editor-mention-avatar';
|
|
@@ -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.
|
|
70
|
+
var PACKAGE_VERSION = "17.1.1";
|
|
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
|
-
|
|
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: {
|
|
@@ -2,6 +2,8 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
import { getBrowserInfo } from '@atlaskit/editor-common/browser';
|
|
3
3
|
import { ZERO_WIDTH_SPACE } from '@atlaskit/editor-common/whitespace';
|
|
4
4
|
import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
|
|
5
|
+
// oxlint-disable-next-line import/no-duplicates
|
|
6
|
+
|
|
5
7
|
import { UNKNOWN_USER_ID } from '@atlaskit/mention/constants';
|
|
6
8
|
import { isResolvingMentionProvider, MentionNameStatus } from '@atlaskit/mention/resource';
|
|
7
9
|
import { isRestricted } from '@atlaskit/mention/types';
|
|
@@ -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.
|
|
54
|
+
const PACKAGE_VERSION = "17.1.1";
|
|
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 =>
|
|
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,
|
|
@@ -8,6 +8,8 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
8
8
|
import { getBrowserInfo } from '@atlaskit/editor-common/browser';
|
|
9
9
|
import { ZERO_WIDTH_SPACE } from '@atlaskit/editor-common/whitespace';
|
|
10
10
|
import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
|
|
11
|
+
// oxlint-disable-next-line import/no-duplicates
|
|
12
|
+
|
|
11
13
|
import { UNKNOWN_USER_ID } from '@atlaskit/mention/constants';
|
|
12
14
|
import { isResolvingMentionProvider, MentionNameStatus } from '@atlaskit/mention/resource';
|
|
13
15
|
import { isRestricted } from '@atlaskit/mention/types';
|
|
@@ -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.
|
|
61
|
+
var PACKAGE_VERSION = "17.1.1";
|
|
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
|
-
|
|
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.
|
|
3
|
+
"version": "17.1.2",
|
|
4
4
|
"description": "Mentions plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
],
|
|
22
22
|
"atlaskit:src": "src/index.ts",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@atlaskit/adf-schema": "^
|
|
24
|
+
"@atlaskit/adf-schema": "^57.0.0",
|
|
25
25
|
"@atlaskit/css": "^1.0.0",
|
|
26
|
-
"@atlaskit/editor-json-transformer": "^9.
|
|
26
|
+
"@atlaskit/editor-json-transformer": "^9.4.0",
|
|
27
27
|
"@atlaskit/editor-plugin-analytics": "^15.0.0",
|
|
28
28
|
"@atlaskit/editor-plugin-base": "^16.0.0",
|
|
29
29
|
"@atlaskit/editor-plugin-context-identifier": "^15.0.0",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@atlaskit/icon": "^37.3.0",
|
|
35
35
|
"@atlaskit/insm": "^2.0.0",
|
|
36
36
|
"@atlaskit/link": "^5.0.0",
|
|
37
|
-
"@atlaskit/lozenge": "^15.
|
|
37
|
+
"@atlaskit/lozenge": "^15.1.0",
|
|
38
38
|
"@atlaskit/mention": "^27.17.0",
|
|
39
39
|
"@atlaskit/node-data-provider": "^16.0.0",
|
|
40
40
|
"@atlaskit/platform-feature-experiments": "^0.3.0",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"uuid": "^3.1.0"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
|
-
"@atlaskit/editor-common": "^119.
|
|
61
|
+
"@atlaskit/editor-common": "^119.4.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": {
|