@atlaskit/editor-plugin-mentions 14.4.5 → 14.5.1
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 +23 -0
- package/dist/cjs/nodeviews/mentionNodeView.js +4 -2
- package/dist/cjs/pm-plugins/main.js +1 -1
- package/dist/es2019/nodeviews/mentionNodeView.js +4 -2
- package/dist/es2019/pm-plugins/main.js +1 -1
- package/dist/esm/nodeviews/mentionNodeView.js +4 -2
- package/dist/esm/pm-plugins/main.js +1 -1
- package/package.json +16 -16
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-mentions
|
|
2
2
|
|
|
3
|
+
## 14.5.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`73743eb8b36e6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/73743eb8b36e6) -
|
|
8
|
+
CLeanup prefer static regex violations
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 14.5.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- [`1e60d10b9bddf`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1e60d10b9bddf) -
|
|
16
|
+
Fix agent mention chip not rendering as disabled after the last @-mentioned agent is dismissed via
|
|
17
|
+
the input hat (TREX-1692). An agent chip is now enabled only when its id is the active agent
|
|
18
|
+
(selectedAgentIds.at(-1)) and disabled otherwise; the rule is scoped to agent chips via the
|
|
19
|
+
mention node's userType (now forwarded through MentionDisabledStateInput) so people mentions are
|
|
20
|
+
never affected.
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- Updated dependencies
|
|
25
|
+
|
|
3
26
|
## 14.4.5
|
|
4
27
|
|
|
5
28
|
### Patch Changes
|
|
@@ -24,8 +24,9 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
24
24
|
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; }
|
|
25
25
|
var primitiveClassName = 'editor-mention-primitive';
|
|
26
26
|
// @ts-ignore - TS1501 TypeScript 5.9.2 upgrade
|
|
27
|
+
var AT_PREFIX_REGEX = /^@/;
|
|
27
28
|
var getAccessibilityLabelFromName = function getAccessibilityLabelFromName(name) {
|
|
28
|
-
return name.replace(
|
|
29
|
+
return name.replace(AT_PREFIX_REGEX, '');
|
|
29
30
|
};
|
|
30
31
|
var toDOM = function toDOM(node) {
|
|
31
32
|
// packages/elements/mention/src/components/Mention/index.tsx
|
|
@@ -186,7 +187,8 @@ var MentionNodeView = exports.MentionNodeView = /*#__PURE__*/function () {
|
|
|
186
187
|
value: function getDisabledState(mentionProvider) {
|
|
187
188
|
var _mentionProvider$getM;
|
|
188
189
|
var input = {
|
|
189
|
-
id: this.node.attrs.id
|
|
190
|
+
id: this.node.attrs.id,
|
|
191
|
+
userType: this.node.attrs.userType
|
|
190
192
|
};
|
|
191
193
|
return mentionProvider === null || mentionProvider === void 0 || (_mentionProvider$getM = mentionProvider.getMentionDisabledState) === null || _mentionProvider$getM === void 0 ? void 0 : _mentionProvider$getM.call(mentionProvider, input);
|
|
192
194
|
}
|
|
@@ -50,7 +50,7 @@ var getAgentMentionName = function getAgentMentionName(text, fallbackName) {
|
|
|
50
50
|
var AI_STREAMING_TRANSFORMATION_META_KEY = 'isAIStreamingTransformation';
|
|
51
51
|
var AGENT_MENTION_INACTIVITY_MS = 3000;
|
|
52
52
|
var PACKAGE_NAME = "@atlaskit/editor-plugin-mentions";
|
|
53
|
-
var PACKAGE_VERSION = "14.
|
|
53
|
+
var PACKAGE_VERSION = "14.5.0";
|
|
54
54
|
var setProvider = function setProvider(provider) {
|
|
55
55
|
return function (state, dispatch) {
|
|
56
56
|
if (dispatch) {
|
|
@@ -10,7 +10,8 @@ import { disabledTooltipRenderer } from './disabledTooltipRenderer';
|
|
|
10
10
|
import { profileCardRenderer } from './profileCardRenderer';
|
|
11
11
|
const primitiveClassName = 'editor-mention-primitive';
|
|
12
12
|
// @ts-ignore - TS1501 TypeScript 5.9.2 upgrade
|
|
13
|
-
const
|
|
13
|
+
const AT_PREFIX_REGEX = /^@/u;
|
|
14
|
+
const getAccessibilityLabelFromName = name => name.replace(AT_PREFIX_REGEX, '');
|
|
14
15
|
const toDOM = node => {
|
|
15
16
|
// packages/elements/mention/src/components/Mention/index.tsx
|
|
16
17
|
let mentionAttrs = {
|
|
@@ -152,7 +153,8 @@ export class MentionNodeView {
|
|
|
152
153
|
getDisabledState(mentionProvider) {
|
|
153
154
|
var _mentionProvider$getM;
|
|
154
155
|
const input = {
|
|
155
|
-
id: this.node.attrs.id
|
|
156
|
+
id: this.node.attrs.id,
|
|
157
|
+
userType: this.node.attrs.userType
|
|
156
158
|
};
|
|
157
159
|
return mentionProvider === null || mentionProvider === void 0 ? void 0 : (_mentionProvider$getM = mentionProvider.getMentionDisabledState) === null || _mentionProvider$getM === void 0 ? void 0 : _mentionProvider$getM.call(mentionProvider, input);
|
|
158
160
|
}
|
|
@@ -35,7 +35,7 @@ const getAgentMentionName = (text, fallbackName) => {
|
|
|
35
35
|
const AI_STREAMING_TRANSFORMATION_META_KEY = 'isAIStreamingTransformation';
|
|
36
36
|
const AGENT_MENTION_INACTIVITY_MS = 3000;
|
|
37
37
|
const PACKAGE_NAME = "@atlaskit/editor-plugin-mentions";
|
|
38
|
-
const PACKAGE_VERSION = "14.
|
|
38
|
+
const PACKAGE_VERSION = "14.5.0";
|
|
39
39
|
const setProvider = provider => (state, dispatch) => {
|
|
40
40
|
if (dispatch) {
|
|
41
41
|
dispatch(state.tr.setMeta(mentionPluginKey, {
|
|
@@ -17,8 +17,9 @@ import { disabledTooltipRenderer } from './disabledTooltipRenderer';
|
|
|
17
17
|
import { profileCardRenderer } from './profileCardRenderer';
|
|
18
18
|
var primitiveClassName = 'editor-mention-primitive';
|
|
19
19
|
// @ts-ignore - TS1501 TypeScript 5.9.2 upgrade
|
|
20
|
+
var AT_PREFIX_REGEX = /^@/;
|
|
20
21
|
var getAccessibilityLabelFromName = function getAccessibilityLabelFromName(name) {
|
|
21
|
-
return name.replace(
|
|
22
|
+
return name.replace(AT_PREFIX_REGEX, '');
|
|
22
23
|
};
|
|
23
24
|
var toDOM = function toDOM(node) {
|
|
24
25
|
// packages/elements/mention/src/components/Mention/index.tsx
|
|
@@ -179,7 +180,8 @@ export var MentionNodeView = /*#__PURE__*/function () {
|
|
|
179
180
|
value: function getDisabledState(mentionProvider) {
|
|
180
181
|
var _mentionProvider$getM;
|
|
181
182
|
var input = {
|
|
182
|
-
id: this.node.attrs.id
|
|
183
|
+
id: this.node.attrs.id,
|
|
184
|
+
userType: this.node.attrs.userType
|
|
183
185
|
};
|
|
184
186
|
return mentionProvider === null || mentionProvider === void 0 || (_mentionProvider$getM = mentionProvider.getMentionDisabledState) === null || _mentionProvider$getM === void 0 ? void 0 : _mentionProvider$getM.call(mentionProvider, input);
|
|
185
187
|
}
|
|
@@ -42,7 +42,7 @@ var getAgentMentionName = function getAgentMentionName(text, fallbackName) {
|
|
|
42
42
|
var AI_STREAMING_TRANSFORMATION_META_KEY = 'isAIStreamingTransformation';
|
|
43
43
|
var AGENT_MENTION_INACTIVITY_MS = 3000;
|
|
44
44
|
var PACKAGE_NAME = "@atlaskit/editor-plugin-mentions";
|
|
45
|
-
var PACKAGE_VERSION = "14.
|
|
45
|
+
var PACKAGE_VERSION = "14.5.0";
|
|
46
46
|
var setProvider = function setProvider(provider) {
|
|
47
47
|
return function (state, dispatch) {
|
|
48
48
|
if (dispatch) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-mentions",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.5.1",
|
|
4
4
|
"description": "Mentions plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -29,22 +29,22 @@
|
|
|
29
29
|
"@atlaskit/editor-plugin-selection": "^12.0.0",
|
|
30
30
|
"@atlaskit/editor-plugin-type-ahead": "^12.1.0",
|
|
31
31
|
"@atlaskit/editor-prosemirror": "^8.0.0",
|
|
32
|
-
"@atlaskit/icon": "^36.
|
|
32
|
+
"@atlaskit/icon": "^36.1.0",
|
|
33
33
|
"@atlaskit/insm": "^1.0.0",
|
|
34
|
-
"@atlaskit/link": "^4.
|
|
35
|
-
"@atlaskit/lozenge": "^14.
|
|
36
|
-
"@atlaskit/mention": "^27.
|
|
34
|
+
"@atlaskit/link": "^4.1.0",
|
|
35
|
+
"@atlaskit/lozenge": "^14.1.0",
|
|
36
|
+
"@atlaskit/mention": "^27.5.0",
|
|
37
37
|
"@atlaskit/platform-feature-flags": "^2.0.0",
|
|
38
|
-
"@atlaskit/popper": "^8.
|
|
39
|
-
"@atlaskit/portal": "^6.
|
|
40
|
-
"@atlaskit/primitives": "^20.
|
|
41
|
-
"@atlaskit/profilecard": "^26.
|
|
42
|
-
"@atlaskit/teams-app-config": "^2.
|
|
43
|
-
"@atlaskit/theme": "^26.
|
|
44
|
-
"@atlaskit/tmp-editor-statsig": "^114.
|
|
45
|
-
"@atlaskit/tokens": "^15.
|
|
46
|
-
"@atlaskit/tooltip": "^23.
|
|
47
|
-
"@atlaskit/user-picker": "^13.
|
|
38
|
+
"@atlaskit/popper": "^8.2.0",
|
|
39
|
+
"@atlaskit/portal": "^6.1.0",
|
|
40
|
+
"@atlaskit/primitives": "^20.2.0",
|
|
41
|
+
"@atlaskit/profilecard": "^26.4.0",
|
|
42
|
+
"@atlaskit/teams-app-config": "^2.1.0",
|
|
43
|
+
"@atlaskit/theme": "^26.1.0",
|
|
44
|
+
"@atlaskit/tmp-editor-statsig": "^114.5.0",
|
|
45
|
+
"@atlaskit/tokens": "^15.2.0",
|
|
46
|
+
"@atlaskit/tooltip": "^23.1.0",
|
|
47
|
+
"@atlaskit/user-picker": "^13.4.0",
|
|
48
48
|
"@babel/runtime": "^7.0.0",
|
|
49
49
|
"@compiled/react": "^0.20.0",
|
|
50
50
|
"bind-event-listener": "^3.0.0",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"uuid": "^3.1.0"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
|
-
"@atlaskit/editor-common": "^116.
|
|
56
|
+
"@atlaskit/editor-common": "^116.17.0",
|
|
57
57
|
"react": "^18.2.0",
|
|
58
58
|
"react-dom": "^18.2.0",
|
|
59
59
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|