@atlaskit/editor-plugin-mentions 14.4.5 → 14.5.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,20 @@
1
1
  # @atlaskit/editor-plugin-mentions
2
2
 
3
+ ## 14.5.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`1e60d10b9bddf`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1e60d10b9bddf) -
8
+ Fix agent mention chip not rendering as disabled after the last @-mentioned agent is dismissed via
9
+ the input hat (TREX-1692). An agent chip is now enabled only when its id is the active agent
10
+ (selectedAgentIds.at(-1)) and disabled otherwise; the rule is scoped to agent chips via the
11
+ mention node's userType (now forwarded through MentionDisabledStateInput) so people mentions are
12
+ never affected.
13
+
14
+ ### Patch Changes
15
+
16
+ - Updated dependencies
17
+
3
18
  ## 14.4.5
4
19
 
5
20
  ### Patch Changes
@@ -186,7 +186,8 @@ var MentionNodeView = exports.MentionNodeView = /*#__PURE__*/function () {
186
186
  value: function getDisabledState(mentionProvider) {
187
187
  var _mentionProvider$getM;
188
188
  var input = {
189
- id: this.node.attrs.id
189
+ id: this.node.attrs.id,
190
+ userType: this.node.attrs.userType
190
191
  };
191
192
  return mentionProvider === null || mentionProvider === void 0 || (_mentionProvider$getM = mentionProvider.getMentionDisabledState) === null || _mentionProvider$getM === void 0 ? void 0 : _mentionProvider$getM.call(mentionProvider, input);
192
193
  }
@@ -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.4.4";
53
+ var PACKAGE_VERSION = "14.4.5";
54
54
  var setProvider = function setProvider(provider) {
55
55
  return function (state, dispatch) {
56
56
  if (dispatch) {
@@ -152,7 +152,8 @@ export class MentionNodeView {
152
152
  getDisabledState(mentionProvider) {
153
153
  var _mentionProvider$getM;
154
154
  const input = {
155
- id: this.node.attrs.id
155
+ id: this.node.attrs.id,
156
+ userType: this.node.attrs.userType
156
157
  };
157
158
  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
159
  }
@@ -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.4.4";
38
+ const PACKAGE_VERSION = "14.4.5";
39
39
  const setProvider = provider => (state, dispatch) => {
40
40
  if (dispatch) {
41
41
  dispatch(state.tr.setMeta(mentionPluginKey, {
@@ -179,7 +179,8 @@ export var MentionNodeView = /*#__PURE__*/function () {
179
179
  value: function getDisabledState(mentionProvider) {
180
180
  var _mentionProvider$getM;
181
181
  var input = {
182
- id: this.node.attrs.id
182
+ id: this.node.attrs.id,
183
+ userType: this.node.attrs.userType
183
184
  };
184
185
  return mentionProvider === null || mentionProvider === void 0 || (_mentionProvider$getM = mentionProvider.getMentionDisabledState) === null || _mentionProvider$getM === void 0 ? void 0 : _mentionProvider$getM.call(mentionProvider, input);
185
186
  }
@@ -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.4.4";
45
+ var PACKAGE_VERSION = "14.4.5";
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.4.5",
3
+ "version": "14.5.0",
4
4
  "description": "Mentions plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -33,7 +33,7 @@
33
33
  "@atlaskit/insm": "^1.0.0",
34
34
  "@atlaskit/link": "^4.0.0",
35
35
  "@atlaskit/lozenge": "^14.0.0",
36
- "@atlaskit/mention": "^27.2.0",
36
+ "@atlaskit/mention": "^27.3.0",
37
37
  "@atlaskit/platform-feature-flags": "^2.0.0",
38
38
  "@atlaskit/popper": "^8.1.0",
39
39
  "@atlaskit/portal": "^6.0.0",