@atlaskit/editor-plugin-mentions 14.9.6 → 14.9.7
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 +8 -0
- package/dist/cjs/nodeviews/profileCardRenderer.js +4 -4
- package/dist/cjs/pm-plugins/main.js +1 -1
- package/dist/cjs/ui/ProfileCardComponent.js +2 -2
- package/dist/es2019/nodeviews/profileCardRenderer.js +4 -4
- package/dist/es2019/pm-plugins/main.js +1 -1
- package/dist/es2019/ui/ProfileCardComponent.js +2 -2
- package/dist/esm/nodeviews/profileCardRenderer.js +4 -4
- package/dist/esm/pm-plugins/main.js +1 -1
- package/dist/esm/ui/ProfileCardComponent.js +2 -2
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-mentions
|
|
2
2
|
|
|
3
|
+
## 14.9.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`3e55e8eea5a11`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3e55e8eea5a11) -
|
|
8
|
+
Fixes reduced profile card exp flag name
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 14.9.6
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -56,14 +56,14 @@ var profileCardRenderer = exports.profileCardRenderer = function profileCardRend
|
|
|
56
56
|
cleanupSelection = api === null || api === void 0 || (_api$selection = api.selection) === null || _api$selection === void 0 ? void 0 : _api$selection.sharedState.onChange(function (_ref2) {
|
|
57
57
|
var nextSharedState = _ref2.nextSharedState;
|
|
58
58
|
var selection = nextSharedState === null || nextSharedState === void 0 ? void 0 : nextSharedState.selection;
|
|
59
|
-
if (selection instanceof _state.NodeSelection ? (0, _expVal.expVal)('
|
|
59
|
+
if (selection instanceof _state.NodeSelection ? (0, _expVal.expVal)('platform_editor_reduced_agent_profile_cards', 'isEnabled', false) ? selection.node.sameMarkup(currentNode) : selection.node === node : false) {
|
|
60
60
|
return;
|
|
61
61
|
}
|
|
62
62
|
removeProfileCard === null || removeProfileCard === void 0 || removeProfileCard();
|
|
63
63
|
});
|
|
64
64
|
};
|
|
65
65
|
var renderEditorProfileCard = function renderEditorProfileCard() {
|
|
66
|
-
var isReducedProfileCards = (0, _expVal.expVal)('
|
|
66
|
+
var isReducedProfileCards = (0, _expVal.expVal)('platform_editor_reduced_agent_profile_cards', 'isEnabled', false);
|
|
67
67
|
var clickedNode = isReducedProfileCards ? currentNode : node;
|
|
68
68
|
var activeMention = isReducedProfileCards ? function (_dom$querySelector, _currentNode, _currentNode2) {
|
|
69
69
|
// Read the display name from the DOM element at click time — this is
|
|
@@ -155,7 +155,7 @@ var profileCardRenderer = exports.profileCardRenderer = function profileCardRend
|
|
|
155
155
|
listener: function listener() {
|
|
156
156
|
if ((0, _platformFeatureFlags.fg)('people-teams_migrate-user-profile-card')) {
|
|
157
157
|
var _currentNode$attrs, _node$attrs, _options$profilecardP;
|
|
158
|
-
var userId = (0, _expVal.expVal)('
|
|
158
|
+
var userId = (0, _expVal.expVal)('platform_editor_reduced_agent_profile_cards', 'isEnabled', false) ? (_currentNode$attrs = currentNode.attrs) === null || _currentNode$attrs === void 0 ? void 0 : _currentNode$attrs.id : (_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.id;
|
|
159
159
|
if (!userId) {
|
|
160
160
|
return;
|
|
161
161
|
}
|
|
@@ -166,7 +166,7 @@ var profileCardRenderer = exports.profileCardRenderer = function profileCardRend
|
|
|
166
166
|
renderDefaultProfileCard(userId, provider);
|
|
167
167
|
return;
|
|
168
168
|
}
|
|
169
|
-
if ((0, _ProfileCardComponent.isAgentMentionType)((0, _expVal.expVal)('
|
|
169
|
+
if ((0, _ProfileCardComponent.isAgentMentionType)((0, _expVal.expVal)('platform_editor_reduced_agent_profile_cards', 'isEnabled', false) ? (_currentNode$attrs2 = currentNode.attrs) === null || _currentNode$attrs2 === void 0 ? void 0 : _currentNode$attrs2.userType : (_node$attrs2 = node.attrs) === null || _node$attrs2 === void 0 ? void 0 : _node$attrs2.userType)) {
|
|
170
170
|
renderEditorProfileCard();
|
|
171
171
|
} else {
|
|
172
172
|
renderDefaultProfileCard(userId, provider);
|
|
@@ -66,7 +66,7 @@ var AI_STREAMING_TRANSFORMATION_META_KEY = 'isAIStreamingTransformation';
|
|
|
66
66
|
var AGENT_MENTION_INACTIVITY_MS = 3000;
|
|
67
67
|
var MAX_PENDING_TYPED_AGENT_MENTION_FOCUS_DEFERS = 20;
|
|
68
68
|
var PACKAGE_NAME = "@atlaskit/editor-plugin-mentions";
|
|
69
|
-
var PACKAGE_VERSION = "14.9.
|
|
69
|
+
var PACKAGE_VERSION = "14.9.6";
|
|
70
70
|
var setProvider = function setProvider(provider) {
|
|
71
71
|
return function (state, dispatch) {
|
|
72
72
|
if (dispatch) {
|
|
@@ -195,7 +195,7 @@ function ProfileCardComponent(_ref5) {
|
|
|
195
195
|
}, isAgentMention && provider && id ? /*#__PURE__*/React.createElement(AgentProfileCardContent, {
|
|
196
196
|
accountId: id,
|
|
197
197
|
provider: provider,
|
|
198
|
-
text: (0, _expVal.expVal)('
|
|
198
|
+
text: (0, _expVal.expVal)('platform_editor_reduced_agent_profile_cards', 'isEnabled', false) ? text : undefined,
|
|
199
199
|
onChatClick: onAgentMentionChatClick && (0, _platformFeatureFlags.fg)('platform_editor_agent_mentions_drop_one_fixes') ? function (event, agentStudioId) {
|
|
200
200
|
return (
|
|
201
201
|
// agentMentionContext is already captured in the onAgentMentionChatClick
|
|
@@ -261,7 +261,7 @@ var AgentProfileCardContent = function AgentProfileCardContent(_ref9) {
|
|
|
261
261
|
text = _ref9.text,
|
|
262
262
|
onChatClick = _ref9.onChatClick;
|
|
263
263
|
var agentName = (text !== null && text !== void 0 ? text : '').replace(LEADING_AT_SIGN_RE, '');
|
|
264
|
-
return (0, _expVal.expVal)('
|
|
264
|
+
return (0, _expVal.expVal)('platform_editor_reduced_agent_profile_cards', 'isEnabled', false) ? /*#__PURE__*/React.createElement(AgentProfileCardResourcedLazy, {
|
|
265
265
|
accountId: accountId,
|
|
266
266
|
cloudId: provider.cloudId,
|
|
267
267
|
resourceClient: provider.resourceClient,
|
|
@@ -47,14 +47,14 @@ export const profileCardRenderer = ({
|
|
|
47
47
|
nextSharedState
|
|
48
48
|
}) => {
|
|
49
49
|
const selection = nextSharedState === null || nextSharedState === void 0 ? void 0 : nextSharedState.selection;
|
|
50
|
-
if (selection instanceof NodeSelection ? expVal('
|
|
50
|
+
if (selection instanceof NodeSelection ? expVal('platform_editor_reduced_agent_profile_cards', 'isEnabled', false) ? selection.node.sameMarkup(currentNode) : selection.node === node : false) {
|
|
51
51
|
return;
|
|
52
52
|
}
|
|
53
53
|
removeProfileCard === null || removeProfileCard === void 0 ? void 0 : removeProfileCard();
|
|
54
54
|
});
|
|
55
55
|
};
|
|
56
56
|
const renderEditorProfileCard = () => {
|
|
57
|
-
const isReducedProfileCards = expVal('
|
|
57
|
+
const isReducedProfileCards = expVal('platform_editor_reduced_agent_profile_cards', 'isEnabled', false);
|
|
58
58
|
const clickedNode = isReducedProfileCards ? currentNode : node;
|
|
59
59
|
const activeMention = isReducedProfileCards ? ((_dom$querySelector, _dom$querySelector$te, _currentNode, _currentNode2, _currentNode2$attrs) => {
|
|
60
60
|
// Read the display name from the DOM element at click time — this is
|
|
@@ -143,7 +143,7 @@ export const profileCardRenderer = ({
|
|
|
143
143
|
listener: () => {
|
|
144
144
|
if (fg('people-teams_migrate-user-profile-card')) {
|
|
145
145
|
var _currentNode$attrs, _node$attrs, _options$profilecardP;
|
|
146
|
-
const userId = expVal('
|
|
146
|
+
const userId = expVal('platform_editor_reduced_agent_profile_cards', 'isEnabled', false) ? (_currentNode$attrs = currentNode.attrs) === null || _currentNode$attrs === void 0 ? void 0 : _currentNode$attrs.id : (_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.id;
|
|
147
147
|
if (!userId) {
|
|
148
148
|
return;
|
|
149
149
|
}
|
|
@@ -154,7 +154,7 @@ export const profileCardRenderer = ({
|
|
|
154
154
|
renderDefaultProfileCard(userId, provider);
|
|
155
155
|
return;
|
|
156
156
|
}
|
|
157
|
-
if (isAgentMentionType(expVal('
|
|
157
|
+
if (isAgentMentionType(expVal('platform_editor_reduced_agent_profile_cards', 'isEnabled', false) ? (_currentNode$attrs2 = currentNode.attrs) === null || _currentNode$attrs2 === void 0 ? void 0 : _currentNode$attrs2.userType : (_node$attrs2 = node.attrs) === null || _node$attrs2 === void 0 ? void 0 : _node$attrs2.userType)) {
|
|
158
158
|
renderEditorProfileCard();
|
|
159
159
|
} else {
|
|
160
160
|
renderDefaultProfileCard(userId, provider);
|
|
@@ -50,7 +50,7 @@ const AI_STREAMING_TRANSFORMATION_META_KEY = 'isAIStreamingTransformation';
|
|
|
50
50
|
const AGENT_MENTION_INACTIVITY_MS = 3000;
|
|
51
51
|
const MAX_PENDING_TYPED_AGENT_MENTION_FOCUS_DEFERS = 20;
|
|
52
52
|
const PACKAGE_NAME = "@atlaskit/editor-plugin-mentions";
|
|
53
|
-
const PACKAGE_VERSION = "14.9.
|
|
53
|
+
const PACKAGE_VERSION = "14.9.6";
|
|
54
54
|
const setProvider = provider => (state, dispatch) => {
|
|
55
55
|
if (dispatch) {
|
|
56
56
|
dispatch(state.tr.setMeta(mentionPluginKey, {
|
|
@@ -125,7 +125,7 @@ export function ProfileCardComponent({
|
|
|
125
125
|
}, isAgentMention && provider && id ? /*#__PURE__*/React.createElement(AgentProfileCardContent, {
|
|
126
126
|
accountId: id,
|
|
127
127
|
provider: provider,
|
|
128
|
-
text: expVal('
|
|
128
|
+
text: expVal('platform_editor_reduced_agent_profile_cards', 'isEnabled', false) ? text : undefined,
|
|
129
129
|
onChatClick: onAgentMentionChatClick && fg('platform_editor_agent_mentions_drop_one_fixes') ? (event, agentStudioId) =>
|
|
130
130
|
// agentMentionContext is already captured in the onAgentMentionChatClick
|
|
131
131
|
// closure built by profileCardRenderer at chip-click time via doc.descendants()
|
|
@@ -189,7 +189,7 @@ const AgentProfileCardContent = ({
|
|
|
189
189
|
onChatClick
|
|
190
190
|
}) => {
|
|
191
191
|
const agentName = (text !== null && text !== void 0 ? text : '').replace(LEADING_AT_SIGN_RE, '');
|
|
192
|
-
return expVal('
|
|
192
|
+
return expVal('platform_editor_reduced_agent_profile_cards', 'isEnabled', false) ? /*#__PURE__*/React.createElement(AgentProfileCardResourcedLazy, {
|
|
193
193
|
accountId: accountId,
|
|
194
194
|
cloudId: provider.cloudId,
|
|
195
195
|
resourceClient: provider.resourceClient,
|
|
@@ -50,14 +50,14 @@ export var profileCardRenderer = function profileCardRenderer(_ref) {
|
|
|
50
50
|
cleanupSelection = api === null || api === void 0 || (_api$selection = api.selection) === null || _api$selection === void 0 ? void 0 : _api$selection.sharedState.onChange(function (_ref2) {
|
|
51
51
|
var nextSharedState = _ref2.nextSharedState;
|
|
52
52
|
var selection = nextSharedState === null || nextSharedState === void 0 ? void 0 : nextSharedState.selection;
|
|
53
|
-
if (selection instanceof NodeSelection ? expVal('
|
|
53
|
+
if (selection instanceof NodeSelection ? expVal('platform_editor_reduced_agent_profile_cards', 'isEnabled', false) ? selection.node.sameMarkup(currentNode) : selection.node === node : false) {
|
|
54
54
|
return;
|
|
55
55
|
}
|
|
56
56
|
removeProfileCard === null || removeProfileCard === void 0 || removeProfileCard();
|
|
57
57
|
});
|
|
58
58
|
};
|
|
59
59
|
var renderEditorProfileCard = function renderEditorProfileCard() {
|
|
60
|
-
var isReducedProfileCards = expVal('
|
|
60
|
+
var isReducedProfileCards = expVal('platform_editor_reduced_agent_profile_cards', 'isEnabled', false);
|
|
61
61
|
var clickedNode = isReducedProfileCards ? currentNode : node;
|
|
62
62
|
var activeMention = isReducedProfileCards ? function (_dom$querySelector, _currentNode, _currentNode2) {
|
|
63
63
|
// Read the display name from the DOM element at click time — this is
|
|
@@ -149,7 +149,7 @@ export var profileCardRenderer = function profileCardRenderer(_ref) {
|
|
|
149
149
|
listener: function listener() {
|
|
150
150
|
if (fg('people-teams_migrate-user-profile-card')) {
|
|
151
151
|
var _currentNode$attrs, _node$attrs, _options$profilecardP;
|
|
152
|
-
var userId = expVal('
|
|
152
|
+
var userId = expVal('platform_editor_reduced_agent_profile_cards', 'isEnabled', false) ? (_currentNode$attrs = currentNode.attrs) === null || _currentNode$attrs === void 0 ? void 0 : _currentNode$attrs.id : (_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.id;
|
|
153
153
|
if (!userId) {
|
|
154
154
|
return;
|
|
155
155
|
}
|
|
@@ -160,7 +160,7 @@ export var profileCardRenderer = function profileCardRenderer(_ref) {
|
|
|
160
160
|
renderDefaultProfileCard(userId, provider);
|
|
161
161
|
return;
|
|
162
162
|
}
|
|
163
|
-
if (isAgentMentionType(expVal('
|
|
163
|
+
if (isAgentMentionType(expVal('platform_editor_reduced_agent_profile_cards', 'isEnabled', false) ? (_currentNode$attrs2 = currentNode.attrs) === null || _currentNode$attrs2 === void 0 ? void 0 : _currentNode$attrs2.userType : (_node$attrs2 = node.attrs) === null || _node$attrs2 === void 0 ? void 0 : _node$attrs2.userType)) {
|
|
164
164
|
renderEditorProfileCard();
|
|
165
165
|
} else {
|
|
166
166
|
renderDefaultProfileCard(userId, provider);
|
|
@@ -57,7 +57,7 @@ var AI_STREAMING_TRANSFORMATION_META_KEY = 'isAIStreamingTransformation';
|
|
|
57
57
|
var AGENT_MENTION_INACTIVITY_MS = 3000;
|
|
58
58
|
var MAX_PENDING_TYPED_AGENT_MENTION_FOCUS_DEFERS = 20;
|
|
59
59
|
var PACKAGE_NAME = "@atlaskit/editor-plugin-mentions";
|
|
60
|
-
var PACKAGE_VERSION = "14.9.
|
|
60
|
+
var PACKAGE_VERSION = "14.9.6";
|
|
61
61
|
var setProvider = function setProvider(provider) {
|
|
62
62
|
return function (state, dispatch) {
|
|
63
63
|
if (dispatch) {
|
|
@@ -184,7 +184,7 @@ export function ProfileCardComponent(_ref5) {
|
|
|
184
184
|
}, isAgentMention && provider && id ? /*#__PURE__*/React.createElement(AgentProfileCardContent, {
|
|
185
185
|
accountId: id,
|
|
186
186
|
provider: provider,
|
|
187
|
-
text: expVal('
|
|
187
|
+
text: expVal('platform_editor_reduced_agent_profile_cards', 'isEnabled', false) ? text : undefined,
|
|
188
188
|
onChatClick: onAgentMentionChatClick && fg('platform_editor_agent_mentions_drop_one_fixes') ? function (event, agentStudioId) {
|
|
189
189
|
return (
|
|
190
190
|
// agentMentionContext is already captured in the onAgentMentionChatClick
|
|
@@ -250,7 +250,7 @@ var AgentProfileCardContent = function AgentProfileCardContent(_ref9) {
|
|
|
250
250
|
text = _ref9.text,
|
|
251
251
|
onChatClick = _ref9.onChatClick;
|
|
252
252
|
var agentName = (text !== null && text !== void 0 ? text : '').replace(LEADING_AT_SIGN_RE, '');
|
|
253
|
-
return expVal('
|
|
253
|
+
return expVal('platform_editor_reduced_agent_profile_cards', 'isEnabled', false) ? /*#__PURE__*/React.createElement(AgentProfileCardResourcedLazy, {
|
|
254
254
|
accountId: accountId,
|
|
255
255
|
cloudId: provider.cloudId,
|
|
256
256
|
resourceClient: provider.resourceClient,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-mentions",
|
|
3
|
-
"version": "14.9.
|
|
3
|
+
"version": "14.9.7",
|
|
4
4
|
"description": "Mentions plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -33,18 +33,18 @@
|
|
|
33
33
|
"@atlaskit/insm": "^1.0.0",
|
|
34
34
|
"@atlaskit/link": "^4.3.0",
|
|
35
35
|
"@atlaskit/lozenge": "^14.1.0",
|
|
36
|
-
"@atlaskit/mention": "^27.
|
|
36
|
+
"@atlaskit/mention": "^27.10.0",
|
|
37
37
|
"@atlaskit/platform-feature-flags": "^2.1.0",
|
|
38
38
|
"@atlaskit/popper": "^8.3.0",
|
|
39
39
|
"@atlaskit/portal": "^6.1.0",
|
|
40
|
-
"@atlaskit/primitives": "^22.
|
|
41
|
-
"@atlaskit/profilecard": "^26.
|
|
40
|
+
"@atlaskit/primitives": "^22.2.0",
|
|
41
|
+
"@atlaskit/profilecard": "^26.13.0",
|
|
42
42
|
"@atlaskit/teams-app-config": "^2.1.0",
|
|
43
43
|
"@atlaskit/theme": "^26.1.0",
|
|
44
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
45
|
-
"@atlaskit/tokens": "^16.
|
|
44
|
+
"@atlaskit/tmp-editor-statsig": "^133.0.0",
|
|
45
|
+
"@atlaskit/tokens": "^16.3.0",
|
|
46
46
|
"@atlaskit/tooltip": "^23.1.0",
|
|
47
|
-
"@atlaskit/user-picker": "^13.
|
|
47
|
+
"@atlaskit/user-picker": "^13.7.0",
|
|
48
48
|
"@babel/runtime": "^7.0.0",
|
|
49
49
|
"@compiled/react": "^1.0.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.39.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"
|