@atlaskit/editor-plugin-mentions 25.0.0 → 25.0.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 +16 -0
- package/dist/cjs/nodeviews/mentionNodeView.js +5 -3
- package/dist/cjs/pm-plugins/main.js +1 -1
- package/dist/es2019/nodeviews/mentionNodeView.js +3 -1
- package/dist/es2019/pm-plugins/main.js +1 -1
- package/dist/esm/nodeviews/mentionNodeView.js +3 -1
- package/dist/esm/pm-plugins/main.js +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-mentions
|
|
2
2
|
|
|
3
|
+
## 25.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`4b7d3cc53594a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4b7d3cc53594a) -
|
|
8
|
+
Enable avatar mentions for the person and all cohorts of convo_ai_entity_hover_cards_non_hello_exp
|
|
9
|
+
alongside the existing editor avatar experiments. Make the avatar provider available in Chat for
|
|
10
|
+
these cohorts, regardless of mention source. Other cohorts retain the existing rollout checks.
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
13
|
+
## 25.0.1
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 25.0.0
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -20,9 +20,10 @@ var _constants = require("@atlaskit/mention/constants");
|
|
|
20
20
|
var _isResolvingMentionProvider = require("@atlaskit/mention/is-resolving-mention-provider");
|
|
21
21
|
var _isRestricted = require("@atlaskit/mention/is-restricted");
|
|
22
22
|
var _types = require("@atlaskit/mention/types");
|
|
23
|
+
var _expVal = require("@atlaskit/platform-feature-experiments/exp-val");
|
|
23
24
|
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
24
25
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
25
|
-
var
|
|
26
|
+
var _expVal2 = require("@atlaskit/tmp-editor-statsig/expVal");
|
|
26
27
|
var _disabledTooltipRenderer = require("./disabledTooltipRenderer");
|
|
27
28
|
var _mentionAvatarRenderer = require("./mentionAvatarRenderer");
|
|
28
29
|
var _profileCardRenderer2 = require("./profileCardRenderer");
|
|
@@ -55,7 +56,7 @@ var isMentionTextAnAaid = function isMentionTextAnAaid(text) {
|
|
|
55
56
|
return AAID_MENTION_TEXT_PATTERN.test(text);
|
|
56
57
|
};
|
|
57
58
|
var isAgentMentionsExperimentEnabled = function isAgentMentionsExperimentEnabled() {
|
|
58
|
-
return (0,
|
|
59
|
+
return (0, _expVal2.expVal)('platform_editor_agent_mentions', 'isEnabled', false);
|
|
59
60
|
};
|
|
60
61
|
|
|
61
62
|
/**
|
|
@@ -193,7 +194,8 @@ var MentionNodeView = exports.MentionNodeView = /*#__PURE__*/function () {
|
|
|
193
194
|
editorView = config.editorView;
|
|
194
195
|
var hasProvider = Boolean(options === null || options === void 0 ? void 0 : options.mentionNodeDataProvider);
|
|
195
196
|
var canReportMissingProvider = !hasProvider && (0, _fg.fg)('platform_editor_mention_avatar_observability');
|
|
196
|
-
var
|
|
197
|
+
var cohort = (0, _expVal.expVal)('convo_ai_entity_hover_cards_non_hello_exp', 'hover_card_cohort', 'control');
|
|
198
|
+
var isAvatarEnabled = (hasProvider || canReportMissingProvider) && node.attrs.userType !== 'SPECIAL' && !genericMentionIds.includes(node.attrs.id) && (cohort === 'person' || cohort === 'all' || (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_mention_node_avatar') || (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_mention_node_graphql_provider'));
|
|
197
199
|
this.hasAvatarSlot = hasProvider && isAvatarEnabled;
|
|
198
200
|
var _DOMSerializer$render = _model.DOMSerializer.renderSpec(document, toDOM(node, this.hasAvatarSlot)),
|
|
199
201
|
dom = _DOMSerializer$render.dom,
|
|
@@ -45,7 +45,7 @@ var ACTIONS = exports.ACTIONS = {
|
|
|
45
45
|
CLEAR_PENDING_PASTED_AGENT_MENTION: 'CLEAR_PENDING_PASTED_AGENT_MENTION'
|
|
46
46
|
};
|
|
47
47
|
var PACKAGE_NAME = "@atlaskit/editor-plugin-mentions";
|
|
48
|
-
var PACKAGE_VERSION = "
|
|
48
|
+
var PACKAGE_VERSION = "25.0.1";
|
|
49
49
|
var setProvider = function setProvider(provider) {
|
|
50
50
|
return function (state, dispatch) {
|
|
51
51
|
if (dispatch) {
|
|
@@ -11,6 +11,7 @@ import { ELEMENTS_CHANNEL, UNKNOWN_USER_ID } from '@atlaskit/mention/constants';
|
|
|
11
11
|
import { isResolvingMentionProvider } from '@atlaskit/mention/is-resolving-mention-provider';
|
|
12
12
|
import { isRestricted } from '@atlaskit/mention/is-restricted';
|
|
13
13
|
import { MentionNameStatus } from '@atlaskit/mention/types';
|
|
14
|
+
import { expVal as platformExpVal } from '@atlaskit/platform-feature-experiments/exp-val';
|
|
14
15
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
15
16
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
16
17
|
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
@@ -156,7 +157,8 @@ export class MentionNodeView {
|
|
|
156
157
|
} = config;
|
|
157
158
|
const hasProvider = Boolean(options === null || options === void 0 ? void 0 : options.mentionNodeDataProvider);
|
|
158
159
|
const canReportMissingProvider = !hasProvider && fg('platform_editor_mention_avatar_observability');
|
|
159
|
-
const
|
|
160
|
+
const cohort = platformExpVal('convo_ai_entity_hover_cards_non_hello_exp', 'hover_card_cohort', 'control');
|
|
161
|
+
const isAvatarEnabled = (hasProvider || canReportMissingProvider) && node.attrs.userType !== 'SPECIAL' && !genericMentionIds.includes(node.attrs.id) && (cohort === 'person' || cohort === 'all' || isExperimentEnabled('platform_editor_mention_node_avatar') || isExperimentEnabled('platform_editor_mention_node_graphql_provider'));
|
|
160
162
|
this.hasAvatarSlot = hasProvider && isAvatarEnabled;
|
|
161
163
|
const {
|
|
162
164
|
dom,
|
|
@@ -34,7 +34,7 @@ export const ACTIONS = {
|
|
|
34
34
|
CLEAR_PENDING_PASTED_AGENT_MENTION: 'CLEAR_PENDING_PASTED_AGENT_MENTION'
|
|
35
35
|
};
|
|
36
36
|
const PACKAGE_NAME = "@atlaskit/editor-plugin-mentions";
|
|
37
|
-
const PACKAGE_VERSION = "
|
|
37
|
+
const PACKAGE_VERSION = "25.0.1";
|
|
38
38
|
const setProvider = provider => (state, dispatch) => {
|
|
39
39
|
if (dispatch) {
|
|
40
40
|
dispatch(state.tr.setMeta(mentionPluginKey, {
|
|
@@ -17,6 +17,7 @@ import { ELEMENTS_CHANNEL, UNKNOWN_USER_ID } from '@atlaskit/mention/constants';
|
|
|
17
17
|
import { isResolvingMentionProvider } from '@atlaskit/mention/is-resolving-mention-provider';
|
|
18
18
|
import { isRestricted } from '@atlaskit/mention/is-restricted';
|
|
19
19
|
import { MentionNameStatus } from '@atlaskit/mention/types';
|
|
20
|
+
import { expVal as platformExpVal } from '@atlaskit/platform-feature-experiments/exp-val';
|
|
20
21
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
21
22
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
22
23
|
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
@@ -188,7 +189,8 @@ export var MentionNodeView = /*#__PURE__*/function () {
|
|
|
188
189
|
editorView = config.editorView;
|
|
189
190
|
var hasProvider = Boolean(options === null || options === void 0 ? void 0 : options.mentionNodeDataProvider);
|
|
190
191
|
var canReportMissingProvider = !hasProvider && fg('platform_editor_mention_avatar_observability');
|
|
191
|
-
var
|
|
192
|
+
var cohort = platformExpVal('convo_ai_entity_hover_cards_non_hello_exp', 'hover_card_cohort', 'control');
|
|
193
|
+
var isAvatarEnabled = (hasProvider || canReportMissingProvider) && node.attrs.userType !== 'SPECIAL' && !genericMentionIds.includes(node.attrs.id) && (cohort === 'person' || cohort === 'all' || isExperimentEnabled('platform_editor_mention_node_avatar') || isExperimentEnabled('platform_editor_mention_node_graphql_provider'));
|
|
192
194
|
this.hasAvatarSlot = hasProvider && isAvatarEnabled;
|
|
193
195
|
var _DOMSerializer$render = DOMSerializer.renderSpec(document, toDOM(node, this.hasAvatarSlot)),
|
|
194
196
|
dom = _DOMSerializer$render.dom,
|
|
@@ -37,7 +37,7 @@ export var ACTIONS = {
|
|
|
37
37
|
CLEAR_PENDING_PASTED_AGENT_MENTION: 'CLEAR_PENDING_PASTED_AGENT_MENTION'
|
|
38
38
|
};
|
|
39
39
|
var PACKAGE_NAME = "@atlaskit/editor-plugin-mentions";
|
|
40
|
-
var PACKAGE_VERSION = "
|
|
40
|
+
var PACKAGE_VERSION = "25.0.1";
|
|
41
41
|
var setProvider = function setProvider(provider) {
|
|
42
42
|
return function (state, dispatch) {
|
|
43
43
|
if (dispatch) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-mentions",
|
|
3
|
-
"version": "25.0.
|
|
3
|
+
"version": "25.0.2",
|
|
4
4
|
"description": "Mentions plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@atlaskit/platform-feature-experiments": "^0.3.0",
|
|
41
41
|
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
42
42
|
"@atlaskit/popper": "^9.4.0",
|
|
43
|
-
"@atlaskit/popup": "^
|
|
43
|
+
"@atlaskit/popup": "^9.0.0",
|
|
44
44
|
"@atlaskit/portal": "^7.0.0",
|
|
45
45
|
"@atlaskit/primitives": "^22.5.0",
|
|
46
46
|
"@atlaskit/profilecard": "^27.1.0",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@atlaskit/theme": "^28.2.0",
|
|
50
50
|
"@atlaskit/tmp-editor-statsig": "^219.0.0",
|
|
51
51
|
"@atlaskit/tokens": "^20.1.0",
|
|
52
|
-
"@atlaskit/tooltip": "^24.
|
|
52
|
+
"@atlaskit/tooltip": "^24.4.0",
|
|
53
53
|
"@atlaskit/user-picker": "^14.0.0",
|
|
54
54
|
"@babel/runtime": "^7.0.0",
|
|
55
55
|
"@compiled/react": "^1.0.2",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"uuid": "^11.1.1"
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
|
-
"@atlaskit/editor-common": "^127.
|
|
63
|
+
"@atlaskit/editor-common": "^127.1.0",
|
|
64
64
|
"react": "^18.2.0 || ^19.2.0",
|
|
65
65
|
"react-dom": "^18.2.0 || ^19.2.0",
|
|
66
66
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|