@atlaskit/editor-plugin-mentions 17.1.15 → 17.1.17
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/disabledTooltipRenderer.js +2 -2
- package/dist/cjs/nodeviews/mentionNodeView.js +2 -2
- package/dist/cjs/nodeviews/profileCardRenderer.js +4 -4
- package/dist/cjs/pm-plugins/agent.js +8 -8
- package/dist/cjs/pm-plugins/main.js +13 -13
- package/dist/cjs/ui/PopperWrapper.js +3 -3
- package/dist/cjs/ui/ProfileCardComponent.js +2 -2
- package/dist/cjs/ui/type-ahead/index.js +11 -11
- package/dist/es2019/nodeviews/disabledTooltipRenderer.js +1 -1
- package/dist/es2019/nodeviews/mentionNodeView.js +1 -1
- package/dist/es2019/nodeviews/profileCardRenderer.js +1 -1
- package/dist/es2019/pm-plugins/agent.js +1 -1
- package/dist/es2019/pm-plugins/main.js +2 -2
- package/dist/es2019/ui/PopperWrapper.js +2 -2
- package/dist/es2019/ui/ProfileCardComponent.js +1 -1
- package/dist/es2019/ui/type-ahead/index.js +2 -2
- package/dist/esm/nodeviews/disabledTooltipRenderer.js +1 -1
- package/dist/esm/nodeviews/mentionNodeView.js +1 -1
- package/dist/esm/nodeviews/profileCardRenderer.js +1 -1
- package/dist/esm/pm-plugins/agent.js +1 -1
- package/dist/esm/pm-plugins/main.js +2 -2
- package/dist/esm/ui/PopperWrapper.js +2 -2
- package/dist/esm/ui/ProfileCardComponent.js +1 -1
- package/dist/esm/ui/type-ahead/index.js +2 -2
- package/dist/types/providers/mention-node-data-provider.d.ts +1 -1
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-mentions
|
|
2
2
|
|
|
3
|
+
## 17.1.17
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`656801b9e097c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/656801b9e097c) -
|
|
8
|
+
VOLTC-331 - Migrate updated package usage in platform/editor: rewrite barrel imports of
|
|
9
|
+
voltCompliant provider packages to deep/subpath imports (consumer-side debarrel). No public API
|
|
10
|
+
changes.
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
13
|
+
## 17.1.16
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 17.1.15
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -13,7 +13,7 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
13
13
|
var _react = _interopRequireWildcard(require("react"));
|
|
14
14
|
var _bindEventListener = require("bind-event-listener");
|
|
15
15
|
var _v = _interopRequireDefault(require("uuid/v4"));
|
|
16
|
-
var
|
|
16
|
+
var _Tooltip = _interopRequireDefault(require("@atlaskit/tooltip/Tooltip"));
|
|
17
17
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
18
18
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- mirror existing renderer pattern
|
|
19
19
|
var styles = {
|
|
@@ -121,7 +121,7 @@ var AnchoredTooltip = function AnchoredTooltip(_ref3) {
|
|
|
121
121
|
if (!tooltip) {
|
|
122
122
|
return null;
|
|
123
123
|
}
|
|
124
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
124
|
+
return /*#__PURE__*/_react.default.createElement(_Tooltip.default, {
|
|
125
125
|
content: tooltip,
|
|
126
126
|
position: "top"
|
|
127
127
|
}, function (tooltipProps) {
|
|
@@ -17,7 +17,7 @@ var _constants = require("@atlaskit/mention/constants");
|
|
|
17
17
|
var _resource = require("@atlaskit/mention/resource");
|
|
18
18
|
var _types = require("@atlaskit/mention/types");
|
|
19
19
|
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
20
|
-
var
|
|
20
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
21
21
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
22
22
|
var _expVal = require("@atlaskit/tmp-editor-statsig/expVal");
|
|
23
23
|
var _disabledTooltipRenderer = require("./disabledTooltipRenderer");
|
|
@@ -73,7 +73,7 @@ var toDOM = function toDOM(node, hasAvatarSlot) {
|
|
|
73
73
|
'data-prosemirror-node-view-type': 'vanilla',
|
|
74
74
|
class: 'mentionView-content-wrap inlineNodeView'
|
|
75
75
|
};
|
|
76
|
-
if ((0,
|
|
76
|
+
if ((0, _fg.fg)('platform_editor_adf_with_localid')) {
|
|
77
77
|
mentionAttrs = _objectSpread(_objectSpread({}, mentionAttrs), {}, {
|
|
78
78
|
'data-local-id': node.attrs.localId
|
|
79
79
|
});
|
|
@@ -12,7 +12,7 @@ var _v = _interopRequireDefault(require("uuid/v4"));
|
|
|
12
12
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
13
13
|
var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
14
14
|
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
15
|
-
var
|
|
15
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
16
16
|
var _navigation = require("@atlaskit/teams-app-config/navigation");
|
|
17
17
|
var _expVal = require("@atlaskit/tmp-editor-statsig/expVal");
|
|
18
18
|
var _agentMentionContext = require("../pm-plugins/agent-mention-context");
|
|
@@ -84,7 +84,7 @@ var profileCardRenderer = exports.profileCardRenderer = function profileCardRend
|
|
|
84
84
|
// Build agent mention context at click time by finding the parent block of this mention
|
|
85
85
|
// in the live document.
|
|
86
86
|
var agentMentionContext;
|
|
87
|
-
if (options !== null && options !== void 0 && options.onAgentMentionChatClick && editorView && (0,
|
|
87
|
+
if (options !== null && options !== void 0 && options.onAgentMentionChatClick && editorView && (0, _fg.fg)('platform_editor_agent_mentions_drop_one_fixes')) {
|
|
88
88
|
var _clickedNode$attrs;
|
|
89
89
|
var localId = (_clickedNode$attrs = clickedNode.attrs) === null || _clickedNode$attrs === void 0 ? void 0 : _clickedNode$attrs.localId;
|
|
90
90
|
if (localId) {
|
|
@@ -101,7 +101,7 @@ var profileCardRenderer = exports.profileCardRenderer = function profileCardRend
|
|
|
101
101
|
return /*#__PURE__*/_react.default.createElement(_ProfileCardComponent.ProfileCardComponent, {
|
|
102
102
|
activeMention: activeMention,
|
|
103
103
|
profilecardProvider: options === null || options === void 0 ? void 0 : options.profilecardProvider,
|
|
104
|
-
onAgentMentionChatClick: options !== null && options !== void 0 && options.onAgentMentionChatClick && (0,
|
|
104
|
+
onAgentMentionChatClick: options !== null && options !== void 0 && options.onAgentMentionChatClick && (0, _fg.fg)('platform_editor_agent_mentions_drop_one_fixes') ? function (agentId) {
|
|
105
105
|
var _options$onAgentMenti;
|
|
106
106
|
return (_options$onAgentMenti = options.onAgentMentionChatClick) === null || _options$onAgentMenti === void 0 ? void 0 : _options$onAgentMenti.call(options, agentId, agentMentionContext);
|
|
107
107
|
} : undefined,
|
|
@@ -156,7 +156,7 @@ var profileCardRenderer = exports.profileCardRenderer = function profileCardRend
|
|
|
156
156
|
var listenerCleanup = (0, _bindEventListener.bind)(dom, {
|
|
157
157
|
type: 'click',
|
|
158
158
|
listener: function listener() {
|
|
159
|
-
if ((0,
|
|
159
|
+
if ((0, _fg.fg)('people-teams_migrate-user-profile-card') || (0, _isExperimentEnabled.isExperimentEnabled)('pt_user_profile_card_migration_exp')) {
|
|
160
160
|
var _currentNode$attrs, _node$attrs, _options$profilecardP;
|
|
161
161
|
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;
|
|
162
162
|
if (!userId) {
|
|
@@ -10,7 +10,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
10
10
|
var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
11
11
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
12
12
|
var _resource = require("@atlaskit/mention/resource");
|
|
13
|
-
var
|
|
13
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
14
14
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
15
15
|
var _agentMentionContext = require("./agent-mention-context");
|
|
16
16
|
var _key = require("./key");
|
|
@@ -201,7 +201,7 @@ var commitPendingTypedAgentMention = function commitPendingTypedAgentMention(sta
|
|
|
201
201
|
return commitResolvedPendingTypedAgentMention(pluginState, pendingMentionDetails);
|
|
202
202
|
};
|
|
203
203
|
var hasTrackedAgentMentionState = function hasTrackedAgentMentionState(pluginState) {
|
|
204
|
-
return Boolean(pluginState.pendingTypedAgentMention) || Boolean(pluginState.pendingPastedAgentMention) && (0,
|
|
204
|
+
return Boolean(pluginState.pendingTypedAgentMention) || Boolean(pluginState.pendingPastedAgentMention) && (0, _fg.fg)('platform_editor_agent_mentions_drop_one_fixes') || pluginState.lastInsertedAgentMentionId != null || pluginState.lastInsertedAgentMentionLocalId != null || pluginState.lastInsertedAgentMentionContext != null || pluginState.lastInsertedAgentMentionName != null || pluginState.lastInsertedAgentMentionPrompt != null || pluginState.lastInsertedAgentMentionParentNodeType != null;
|
|
205
205
|
};
|
|
206
206
|
|
|
207
207
|
/**
|
|
@@ -212,7 +212,7 @@ var hasTrackedAgentMentionState = function hasTrackedAgentMentionState(pluginSta
|
|
|
212
212
|
var clearTrackedAgentMentionState = function clearTrackedAgentMentionState(pluginState) {
|
|
213
213
|
return _objectSpread(_objectSpread(_objectSpread({}, pluginState), {}, {
|
|
214
214
|
pendingTypedAgentMention: null
|
|
215
|
-
}, (0,
|
|
215
|
+
}, (0, _fg.fg)('platform_editor_agent_mentions_drop_one_fixes') ? {
|
|
216
216
|
pendingPastedAgentMention: null
|
|
217
217
|
} : {}), {}, {
|
|
218
218
|
lastInsertedAgentMentionId: null,
|
|
@@ -344,7 +344,7 @@ var applyAgentMentionState = exports.applyAgentMentionState = function applyAgen
|
|
|
344
344
|
case _main.ACTIONS.RESOLVE_PASTED_AGENT_MENTION_NAME:
|
|
345
345
|
{
|
|
346
346
|
var _newPluginState$pendi, _newPluginState$pendi2, _newPluginState$pendi3, _newPluginState$pendi4, _newPluginState$pendi5, _newPluginState$pendi6;
|
|
347
|
-
if (!isAgentMentionsExperimentEnabled || !(params !== null && params !== void 0 && params.id) || !(params !== null && params !== void 0 && params.name) || ((_newPluginState$pendi = newPluginState.pendingPastedAgentMention) === null || _newPluginState$pendi === void 0 ? void 0 : _newPluginState$pendi.id) !== params.id || !(0,
|
|
347
|
+
if (!isAgentMentionsExperimentEnabled || !(params !== null && params !== void 0 && params.id) || !(params !== null && params !== void 0 && params.name) || ((_newPluginState$pendi = newPluginState.pendingPastedAgentMention) === null || _newPluginState$pendi === void 0 ? void 0 : _newPluginState$pendi.id) !== params.id || !(0, _fg.fg)('platform_editor_agent_mentions_drop_one_fixes')) {
|
|
348
348
|
break;
|
|
349
349
|
}
|
|
350
350
|
newPluginState = _objectSpread(_objectSpread({}, newPluginState), {}, {
|
|
@@ -362,7 +362,7 @@ var applyAgentMentionState = exports.applyAgentMentionState = function applyAgen
|
|
|
362
362
|
case _main.ACTIONS.CLEAR_PENDING_PASTED_AGENT_MENTION:
|
|
363
363
|
{
|
|
364
364
|
var _newPluginState$pendi7;
|
|
365
|
-
if (!isAgentMentionsExperimentEnabled || !(params !== null && params !== void 0 && params.id) || ((_newPluginState$pendi7 = newPluginState.pendingPastedAgentMention) === null || _newPluginState$pendi7 === void 0 ? void 0 : _newPluginState$pendi7.id) !== params.id || !(0,
|
|
365
|
+
if (!isAgentMentionsExperimentEnabled || !(params !== null && params !== void 0 && params.id) || ((_newPluginState$pendi7 = newPluginState.pendingPastedAgentMention) === null || _newPluginState$pendi7 === void 0 ? void 0 : _newPluginState$pendi7.id) !== params.id || !(0, _fg.fg)('platform_editor_agent_mentions_drop_one_fixes')) {
|
|
366
366
|
break;
|
|
367
367
|
}
|
|
368
368
|
newPluginState = _objectSpread(_objectSpread({}, newPluginState), {}, {
|
|
@@ -447,7 +447,7 @@ var applyAgentMentionState = exports.applyAgentMentionState = function applyAgen
|
|
|
447
447
|
}, params.name);
|
|
448
448
|
}
|
|
449
449
|
if (agentMentionLocalId === null && node.attrs.localId) {
|
|
450
|
-
var cachedName = (0,
|
|
450
|
+
var cachedName = (0, _fg.fg)('platform_editor_agent_mentions_drop_one_fixes') ? resolveCachedAgentMentionName(newPluginState.mentionProvider, params, node.attrs.id) : params === null || params === void 0 ? void 0 : params.name;
|
|
451
451
|
var agentMentionDetails = getAgentMentionDetailsAtPos(newState, pos, function (attrs) {
|
|
452
452
|
return attrs.localId === node.attrs.localId;
|
|
453
453
|
}, cachedName);
|
|
@@ -561,7 +561,7 @@ var applyAgentMentionState = exports.applyAgentMentionState = function applyAgen
|
|
|
561
561
|
var isTaskItemMentionForPaste = agentMentionParentNodeType === 'taskItem';
|
|
562
562
|
if (!isTaskItemMentionForPaste && isNewInsertion && getIsRovoPanelOpen !== null && getIsRovoPanelOpen !== void 0 && getIsRovoPanelOpen()) {
|
|
563
563
|
// Rovo is already open, so do not publish a nudge-triggering state change.
|
|
564
|
-
} else if (agentMentionName === null && agentMentionId !== null && (0, _resource.isResolvingMentionProvider)(newPluginState.mentionProvider) && (0,
|
|
564
|
+
} else if (agentMentionName === null && agentMentionId !== null && (0, _resource.isResolvingMentionProvider)(newPluginState.mentionProvider) && (0, _fg.fg)('platform_editor_agent_mentions_drop_one_fixes')) {
|
|
565
565
|
newPluginState = _objectSpread(_objectSpread({}, newPluginState), {}, {
|
|
566
566
|
pendingPastedAgentMention: {
|
|
567
567
|
id: agentMentionId,
|
|
@@ -718,7 +718,7 @@ var createAgentMentionPluginView = exports.createAgentMentionPluginView = functi
|
|
|
718
718
|
return;
|
|
719
719
|
}
|
|
720
720
|
_schedulePendingTypedAgentMentionTimer(mentionPluginState);
|
|
721
|
-
if ((0, _experiments.editorExperiment)('platform_editor_agent_mentions', true) && (mentionPluginState === null || mentionPluginState === void 0 || (_mentionPluginState$p = mentionPluginState.pendingPastedAgentMention) === null || _mentionPluginState$p === void 0 ? void 0 : _mentionPluginState$p.id) != null && mentionPluginState !== null && mentionPluginState !== void 0 && mentionPluginState.mentionProvider && (0, _resource.isResolvingMentionProvider)(mentionPluginState.mentionProvider) && (0,
|
|
721
|
+
if ((0, _experiments.editorExperiment)('platform_editor_agent_mentions', true) && (mentionPluginState === null || mentionPluginState === void 0 || (_mentionPluginState$p = mentionPluginState.pendingPastedAgentMention) === null || _mentionPluginState$p === void 0 ? void 0 : _mentionPluginState$p.id) != null && mentionPluginState !== null && mentionPluginState !== void 0 && mentionPluginState.mentionProvider && (0, _resource.isResolvingMentionProvider)(mentionPluginState.mentionProvider) && (0, _fg.fg)('platform_editor_agent_mentions_drop_one_fixes')) {
|
|
722
722
|
resolveAndDispatchPastedAgentMentionName(mentionPluginState.pendingPastedAgentMention.id, mentionPluginState.mentionProvider, pendingResolveMentionIds, view);
|
|
723
723
|
}
|
|
724
724
|
},
|
|
@@ -15,7 +15,7 @@ var _insm = require("@atlaskit/insm");
|
|
|
15
15
|
var _resource = require("@atlaskit/mention/resource");
|
|
16
16
|
var _types = require("@atlaskit/mention/types");
|
|
17
17
|
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
18
|
-
var
|
|
18
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
19
19
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
20
20
|
var _mentionNodeView = require("../nodeviews/mentionNodeView");
|
|
21
21
|
var _types2 = require("../types");
|
|
@@ -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.1.
|
|
70
|
+
var PACKAGE_VERSION = "17.1.16";
|
|
71
71
|
var setProvider = function setProvider(provider) {
|
|
72
72
|
return function (state, dispatch) {
|
|
73
73
|
if (dispatch) {
|
|
@@ -243,7 +243,7 @@ var commitPendingTypedAgentMention = function commitPendingTypedAgentMention(sta
|
|
|
243
243
|
return commitResolvedPendingTypedAgentMention(pluginState, pendingMentionDetails);
|
|
244
244
|
};
|
|
245
245
|
var hasTrackedAgentMentionState = function hasTrackedAgentMentionState(pluginState) {
|
|
246
|
-
return Boolean(pluginState.pendingTypedAgentMention) || Boolean(pluginState.pendingPastedAgentMention) && (0,
|
|
246
|
+
return Boolean(pluginState.pendingTypedAgentMention) || Boolean(pluginState.pendingPastedAgentMention) && (0, _fg.fg)('platform_editor_agent_mentions_drop_one_fixes') || pluginState.lastInsertedAgentMentionId != null || pluginState.lastInsertedAgentMentionLocalId != null || pluginState.lastInsertedAgentMentionContext != null || pluginState.lastInsertedAgentMentionName != null || pluginState.lastInsertedAgentMentionPrompt != null || pluginState.lastInsertedAgentMentionParentNodeType != null;
|
|
247
247
|
};
|
|
248
248
|
|
|
249
249
|
/**
|
|
@@ -254,7 +254,7 @@ var hasTrackedAgentMentionState = function hasTrackedAgentMentionState(pluginSta
|
|
|
254
254
|
var clearTrackedAgentMentionState = function clearTrackedAgentMentionState(pluginState) {
|
|
255
255
|
return _objectSpread(_objectSpread(_objectSpread({}, pluginState), {}, {
|
|
256
256
|
pendingTypedAgentMention: null
|
|
257
|
-
}, (0,
|
|
257
|
+
}, (0, _fg.fg)('platform_editor_agent_mentions_drop_one_fixes') ? {
|
|
258
258
|
pendingPastedAgentMention: null
|
|
259
259
|
} : {}), {}, {
|
|
260
260
|
lastInsertedAgentMentionId: null,
|
|
@@ -432,7 +432,7 @@ function createMentionPlugin(_ref2) {
|
|
|
432
432
|
{
|
|
433
433
|
var _newPluginState$pendi, _newPluginState$pendi2, _newPluginState$pendi3, _newPluginState$pendi4, _newPluginState$pendi5, _newPluginState$pendi6;
|
|
434
434
|
// Guard: only apply if there is a matching pending pasted mention (staleness check).
|
|
435
|
-
if (!(params !== null && params !== void 0 && params.id) || !(params !== null && params !== void 0 && params.name) || ((_newPluginState$pendi = newPluginState.pendingPastedAgentMention) === null || _newPluginState$pendi === void 0 ? void 0 : _newPluginState$pendi.id) !== params.id || !(0,
|
|
435
|
+
if (!(params !== null && params !== void 0 && params.id) || !(params !== null && params !== void 0 && params.name) || ((_newPluginState$pendi = newPluginState.pendingPastedAgentMention) === null || _newPluginState$pendi === void 0 ? void 0 : _newPluginState$pendi.id) !== params.id || !(0, _fg.fg)('platform_editor_agent_mentions_drop_one_fixes')) {
|
|
436
436
|
break;
|
|
437
437
|
}
|
|
438
438
|
newPluginState = _objectSpread(_objectSpread({}, newPluginState), {}, {
|
|
@@ -450,7 +450,7 @@ function createMentionPlugin(_ref2) {
|
|
|
450
450
|
case ACTIONS.CLEAR_PENDING_PASTED_AGENT_MENTION:
|
|
451
451
|
{
|
|
452
452
|
var _newPluginState$pendi7;
|
|
453
|
-
if (!(params !== null && params !== void 0 && params.id) || ((_newPluginState$pendi7 = newPluginState.pendingPastedAgentMention) === null || _newPluginState$pendi7 === void 0 ? void 0 : _newPluginState$pendi7.id) !== params.id || !(0,
|
|
453
|
+
if (!(params !== null && params !== void 0 && params.id) || ((_newPluginState$pendi7 = newPluginState.pendingPastedAgentMention) === null || _newPluginState$pendi7 === void 0 ? void 0 : _newPluginState$pendi7.id) !== params.id || !(0, _fg.fg)('platform_editor_agent_mentions_drop_one_fixes')) {
|
|
454
454
|
break;
|
|
455
455
|
}
|
|
456
456
|
// resolveMentionName() returned a non-OK status — clear the pending state.
|
|
@@ -606,7 +606,7 @@ function createMentionPlugin(_ref2) {
|
|
|
606
606
|
if (agentMentionLocalId === null && node.attrs.localId) {
|
|
607
607
|
// Try to recover the name synchronously from the mention provider's
|
|
608
608
|
// name cache (populated by cacheMentionName on typed insert).
|
|
609
|
-
var cachedName = (0,
|
|
609
|
+
var cachedName = (0, _fg.fg)('platform_editor_agent_mentions_drop_one_fixes') ? resolveCachedAgentMentionName(mentionProvider, params, node.attrs.id) : params === null || params === void 0 ? void 0 : params.name;
|
|
610
610
|
var agentMentionDetails = getAgentMentionDetailsAtPos(newState, pos, function (attrs) {
|
|
611
611
|
return attrs.localId === node.attrs.localId;
|
|
612
612
|
}, cachedName);
|
|
@@ -727,11 +727,11 @@ function createMentionPlugin(_ref2) {
|
|
|
727
727
|
// Task items are exempt only while
|
|
728
728
|
// platform_editor_agent_mentions_no_task_autofire is off (they auto-fire
|
|
729
729
|
// instead). With it on they are suppressed like every other block.
|
|
730
|
-
var isTaskItemMentionForPaste = agentMentionParentNodeType === 'taskItem' && !(0,
|
|
730
|
+
var isTaskItemMentionForPaste = agentMentionParentNodeType === 'taskItem' && !(0, _fg.fg)('platform_editor_agent_mentions_no_task_autofire');
|
|
731
731
|
if (!isTaskItemMentionForPaste && isNewInsertion && options !== null && options !== void 0 && (_options$getIsRovoPan = options.getIsRovoPanelOpen) !== null && _options$getIsRovoPan !== void 0 && _options$getIsRovoPan.call(options)) {
|
|
732
732
|
// Rovo is already open — skip setting lastInsertedAgentMention* so the
|
|
733
733
|
// downstream nudge listener never fires.
|
|
734
|
-
} else if (agentMentionName === null && agentMentionId !== null && (0, _resource.isResolvingMentionProvider)(newPluginState.mentionProvider) && (0,
|
|
734
|
+
} else if (agentMentionName === null && agentMentionId !== null && (0, _resource.isResolvingMentionProvider)(newPluginState.mentionProvider) && (0, _fg.fg)('platform_editor_agent_mentions_drop_one_fixes')) {
|
|
735
735
|
// Store details in pendingPastedAgentMention (private, not broadcast), preventing a double-nudge.
|
|
736
736
|
newPluginState = _objectSpread(_objectSpread({}, newPluginState), {}, {
|
|
737
737
|
pendingPastedAgentMention: {
|
|
@@ -795,7 +795,7 @@ function createMentionPlugin(_ref2) {
|
|
|
795
795
|
// exempt only while platform_editor_agent_mentions_no_task_autofire is off
|
|
796
796
|
// (they auto-fire the mini modal and never show a nudge). With it on they
|
|
797
797
|
// are suppressed like any block.
|
|
798
|
-
var isTaskItemMention = pendingMentionDetails.parentNodeType === 'taskItem' && !(0,
|
|
798
|
+
var isTaskItemMention = pendingMentionDetails.parentNodeType === 'taskItem' && !(0, _fg.fg)('platform_editor_agent_mentions_no_task_autofire');
|
|
799
799
|
if (!isTaskItemMention && options !== null && options !== void 0 && (_options$getIsRovoPan2 = options.getIsRovoPanelOpen) !== null && _options$getIsRovoPan2 !== void 0 && _options$getIsRovoPan2.call(options)) {
|
|
800
800
|
// Discard without committing so lastInsertedAgentMention* fields are
|
|
801
801
|
// never set and the downstream nudge listener never fires.
|
|
@@ -901,7 +901,7 @@ function createMentionPlugin(_ref2) {
|
|
|
901
901
|
// items are exempt only while platform_editor_agent_mentions_no_task_autofire
|
|
902
902
|
// is off (they auto-fire instead). With it on they are suppressed like every
|
|
903
903
|
// other block.
|
|
904
|
-
var isTaskItemMention = pendingTypedAgentMention.parentNodeType === 'taskItem' && !(0,
|
|
904
|
+
var isTaskItemMention = pendingTypedAgentMention.parentNodeType === 'taskItem' && !(0, _fg.fg)('platform_editor_agent_mentions_no_task_autofire');
|
|
905
905
|
if (!isTaskItemMention && options !== null && options !== void 0 && (_options$getIsRovoPan3 = options.getIsRovoPanelOpen) !== null && _options$getIsRovoPan3 !== void 0 && _options$getIsRovoPan3.call(options)) {
|
|
906
906
|
// Dispatch a discard so pendingTypedAgentMention is nulled out of plugin
|
|
907
907
|
// state.
|
|
@@ -975,7 +975,7 @@ function createMentionPlugin(_ref2) {
|
|
|
975
975
|
}
|
|
976
976
|
return;
|
|
977
977
|
};
|
|
978
|
-
var providerViaConfig = (0,
|
|
978
|
+
var providerViaConfig = (0, _fg.fg)('platform_editor_mention_provider_via_plugin_config');
|
|
979
979
|
if (providerViaConfig && options !== null && options !== void 0 && options.mentionProvider) {
|
|
980
980
|
providerHandler('mentionProvider', options === null || options === void 0 ? void 0 : options.mentionProvider);
|
|
981
981
|
} else {
|
|
@@ -994,7 +994,7 @@ function createMentionPlugin(_ref2) {
|
|
|
994
994
|
// If a pasted agent mention has no name (cache miss), resolve it async
|
|
995
995
|
// via the mention provider and dispatch RESOLVE_PASTED_AGENT_MENTION_NAME
|
|
996
996
|
// so the nudge displays the correct name.
|
|
997
|
-
if ((0, _experiments.editorExperiment)('platform_editor_agent_mentions', true) && (mentionPluginState === null || mentionPluginState === void 0 || (_mentionPluginState$p = mentionPluginState.pendingPastedAgentMention) === null || _mentionPluginState$p === void 0 ? void 0 : _mentionPluginState$p.id) != null && mentionPluginState !== null && mentionPluginState !== void 0 && mentionPluginState.mentionProvider && (0, _resource.isResolvingMentionProvider)(mentionPluginState.mentionProvider) && (0,
|
|
997
|
+
if ((0, _experiments.editorExperiment)('platform_editor_agent_mentions', true) && (mentionPluginState === null || mentionPluginState === void 0 || (_mentionPluginState$p = mentionPluginState.pendingPastedAgentMention) === null || _mentionPluginState$p === void 0 ? void 0 : _mentionPluginState$p.id) != null && mentionPluginState !== null && mentionPluginState !== void 0 && mentionPluginState.mentionProvider && (0, _resource.isResolvingMentionProvider)(mentionPluginState.mentionProvider) && (0, _fg.fg)('platform_editor_agent_mentions_drop_one_fixes')) {
|
|
998
998
|
resolveAndDispatchPastedAgentMentionName(mentionPluginState.pendingPastedAgentMention.id, mentionPluginState.mentionProvider, pendingResolveMentionIds, view);
|
|
999
999
|
}
|
|
1000
1000
|
}
|
|
@@ -9,9 +9,9 @@ exports.Popup = Popup;
|
|
|
9
9
|
exports.RepositionOnUpdate = void 0;
|
|
10
10
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
-
var
|
|
12
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
13
13
|
var _main = require("@atlaskit/popper/main");
|
|
14
|
-
var _portal = _interopRequireDefault(require("@atlaskit/portal"));
|
|
14
|
+
var _portal = _interopRequireDefault(require("@atlaskit/portal/portal"));
|
|
15
15
|
var _constants = require("@atlaskit/theme/constants");
|
|
16
16
|
var _expVal = require("@atlaskit/tmp-editor-statsig/expVal");
|
|
17
17
|
var _useFocusTrap = require("./useFocusTrap");
|
|
@@ -50,7 +50,7 @@ function useResizeAwarePopper(_ref2) {
|
|
|
50
50
|
(0, _react.useEffect)(function () {
|
|
51
51
|
// No-op when forceUpdate is not provided (e.g. when the gate is off).
|
|
52
52
|
// This ensures the ResizeObserver is not created unnecessarily.
|
|
53
|
-
if (typeof forceUpdateRef.current !== 'function' && (0,
|
|
53
|
+
if (typeof forceUpdateRef.current !== 'function' && (0, _fg.fg)('platform_editor_agent_mentions_drop_one_fixes')) {
|
|
54
54
|
return;
|
|
55
55
|
}
|
|
56
56
|
if (!popupRef || typeof ResizeObserver === 'undefined') {
|
|
@@ -17,7 +17,7 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
|
|
|
17
17
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
18
18
|
var _bindEventListener = require("bind-event-listener");
|
|
19
19
|
var _reactLoadable = _interopRequireDefault(require("react-loadable"));
|
|
20
|
-
var
|
|
20
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
21
21
|
var _user = require("@atlaskit/profilecard/user");
|
|
22
22
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
23
23
|
var _expVal = require("@atlaskit/tmp-editor-statsig/expVal");
|
|
@@ -208,7 +208,7 @@ function ProfileCardComponent(_ref5) {
|
|
|
208
208
|
provider: provider,
|
|
209
209
|
hideActions: hideActions,
|
|
210
210
|
text: (0, _expVal.expVal)('platform_editor_reduced_agent_profile_cards', 'isEnabled', false) ? text : undefined,
|
|
211
|
-
onChatClick: onAgentMentionChatClick && (0,
|
|
211
|
+
onChatClick: onAgentMentionChatClick && (0, _fg.fg)('platform_editor_agent_mentions_drop_one_fixes') ? function (event, agentStudioId) {
|
|
212
212
|
return (
|
|
213
213
|
// agentMentionContext is already captured in the onAgentMentionChatClick
|
|
214
214
|
// closure built by profileCardRenderer at chip-click time via doc.descendants()
|
|
@@ -16,11 +16,11 @@ var _messages = require("@atlaskit/editor-common/messages");
|
|
|
16
16
|
var _typeAhead = require("@atlaskit/editor-common/type-ahead");
|
|
17
17
|
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
18
18
|
var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
19
|
-
var _lozenge = _interopRequireDefault(require("@atlaskit/lozenge"));
|
|
19
|
+
var _lozenge = _interopRequireDefault(require("@atlaskit/lozenge/lozenge"));
|
|
20
20
|
var _item = require("@atlaskit/mention/item");
|
|
21
21
|
var _resource = require("@atlaskit/mention/resource");
|
|
22
22
|
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
23
|
-
var
|
|
23
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
24
24
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
25
25
|
var _expVal = require("@atlaskit/tmp-editor-statsig/expVal");
|
|
26
26
|
var _editorCommands = require("../../editor-commands");
|
|
@@ -70,7 +70,7 @@ var createInviteItem = function createInviteItem(_ref) {
|
|
|
70
70
|
var isSelected = _ref2.isSelected,
|
|
71
71
|
onClick = _ref2.onClick,
|
|
72
72
|
onHover = _ref2.onHover;
|
|
73
|
-
return emailDomain && (_mentionProvider$getS = mentionProvider.getShouldEnableInlineInvite) !== null && _mentionProvider$getS !== void 0 && _mentionProvider$getS.call(mentionProvider) && (0,
|
|
73
|
+
return emailDomain && (_mentionProvider$getS = mentionProvider.getShouldEnableInlineInvite) !== null && _mentionProvider$getS !== void 0 && _mentionProvider$getS.call(mentionProvider) && (0, _fg.fg)('inline_invite_from_mentions_kill_switch') ? /*#__PURE__*/_react.default.createElement(_InviteItemWithEmailDomain.default, {
|
|
74
74
|
productName: mentionProvider ? mentionProvider.productName : undefined,
|
|
75
75
|
selected: isSelected,
|
|
76
76
|
onMount: onInviteItemMount,
|
|
@@ -124,7 +124,7 @@ var makeMentionToTypeaheadItem = function makeMentionToTypeaheadItem(_ref4) {
|
|
|
124
124
|
var isSelected = _ref5.isSelected,
|
|
125
125
|
onClick = _ref5.onClick,
|
|
126
126
|
onHover = _ref5.onHover;
|
|
127
|
-
return (0, _expVal.expVal)('platform_editor_agent_mentions', 'isEnabled', false) && (0,
|
|
127
|
+
return (0, _expVal.expVal)('platform_editor_agent_mentions', 'isEnabled', false) && (0, _fg.fg)('platform_editor_mention_typeahead_profilecard') ? /*#__PURE__*/_react.default.createElement(_MentionItemWithProfileCard.MentionItemWithProfileCard, {
|
|
128
128
|
mention: mention,
|
|
129
129
|
selected: isSelected,
|
|
130
130
|
onSelection: onClick,
|
|
@@ -235,7 +235,7 @@ var buildNodesForTeamMention = function buildNodesForTeamMention(schema, selecte
|
|
|
235
235
|
// build team link
|
|
236
236
|
var defaultTeamLink = "".concat(window.location.origin, "/people/team/").concat(teamId);
|
|
237
237
|
var teamLink = context && context.teamLink ? context.teamLink : defaultTeamLink;
|
|
238
|
-
var teamLinkNode = (0,
|
|
238
|
+
var teamLinkNode = (0, _fg.fg)('team-mention-inline-smartlink') ? schema.nodes.inlineCard.create({
|
|
239
239
|
url: teamLink
|
|
240
240
|
}) :
|
|
241
241
|
// Ignored via go/ees005
|
|
@@ -336,7 +336,7 @@ var makeTransformMentionsToTypeAheadItems = function makeTransformMentionsToType
|
|
|
336
336
|
currentQuery: query,
|
|
337
337
|
onInviteItemMount: function onInviteItemMount() {
|
|
338
338
|
var _mentionProvider$getS2;
|
|
339
|
-
fireEvent((0, _analytics.buildTypeAheadInviteItemViewedPayload)(sessionId, contextIdentifierProvider, mentionProvider.userRole, (0,
|
|
339
|
+
fireEvent((0, _analytics.buildTypeAheadInviteItemViewedPayload)(sessionId, contextIdentifierProvider, mentionProvider.userRole, (0, _fg.fg)('inline_invite_from_mentions_kill_switch') ? {
|
|
340
340
|
isInlineInviteMentionsEnabled: (_mentionProvider$getS2 = mentionProvider.getShouldEnableInlineInvite) === null || _mentionProvider$getS2 === void 0 ? void 0 : _mentionProvider$getS2.call(mentionProvider)
|
|
341
341
|
} : {}));
|
|
342
342
|
},
|
|
@@ -451,7 +451,7 @@ var createTypeAheadConfig = exports.createTypeAheadConfig = function createTypeA
|
|
|
451
451
|
// section claims it. `buildSectionedResult` then appends it after every
|
|
452
452
|
// section, placing it below the agent results instead of above them, so the
|
|
453
453
|
// first highlighted option is an agent you can pick with Enter.
|
|
454
|
-
if (item.mention && (0, _utils3.isInviteItem)(item.mention) && (0,
|
|
454
|
+
if (item.mention && (0, _utils3.isInviteItem)(item.mention) && (0, _fg.fg)('platform_editor_agent_mentions_invite_order')) {
|
|
455
455
|
return false;
|
|
456
456
|
}
|
|
457
457
|
return true;
|
|
@@ -470,7 +470,7 @@ var createTypeAheadConfig = exports.createTypeAheadConfig = function createTypeA
|
|
|
470
470
|
showWhenQueryPresent: false,
|
|
471
471
|
showWhenOnlySection: true
|
|
472
472
|
},
|
|
473
|
-
lozenge: !(0,
|
|
473
|
+
lozenge: !(0, _fg.fg)('platform_editor_agent_mentions_drop_one_fixes') || showAgentMentionsLabsLozenge ? /*#__PURE__*/_react.default.createElement(_lozenge.default, {
|
|
474
474
|
appearance: "discovery"
|
|
475
475
|
}, intl.formatMessage(_messages.mentionMessages.typeAheadSectionAgentsLabsLozengeLabel)) : null
|
|
476
476
|
}];
|
|
@@ -521,10 +521,10 @@ var createTypeAheadConfig = exports.createTypeAheadConfig = function createTypeA
|
|
|
521
521
|
// Don't fire event and the callback with selection by space press
|
|
522
522
|
if (mode !== 'space') {
|
|
523
523
|
var _mentionProvider$getS3, _mentionProvider$getS4;
|
|
524
|
-
fireEvent((0, _analytics.buildTypeAheadInviteItemClickedPayload)(pickerElapsedTime, stats.keyCount.arrowUp, stats.keyCount.arrowDown, sessionId, mode, query, contextIdentifierProvider, mentionProvider.userRole, (0,
|
|
524
|
+
fireEvent((0, _analytics.buildTypeAheadInviteItemClickedPayload)(pickerElapsedTime, stats.keyCount.arrowUp, stats.keyCount.arrowDown, sessionId, mode, query, contextIdentifierProvider, mentionProvider.userRole, (0, _fg.fg)('inline_invite_from_mentions_kill_switch') ? {
|
|
525
525
|
isInlineInviteMentionsEnabled: (_mentionProvider$getS3 = mentionProvider.getShouldEnableInlineInvite) === null || _mentionProvider$getS3 === void 0 ? void 0 : _mentionProvider$getS3.call(mentionProvider)
|
|
526
526
|
} : {}));
|
|
527
|
-
if ((_mentionProvider$getS4 = mentionProvider.getShouldEnableInlineInvite) !== null && _mentionProvider$getS4 !== void 0 && _mentionProvider$getS4.call(mentionProvider) && (0,
|
|
527
|
+
if ((_mentionProvider$getS4 = mentionProvider.getShouldEnableInlineInvite) !== null && _mentionProvider$getS4 !== void 0 && _mentionProvider$getS4.call(mentionProvider) && (0, _fg.fg)('inline_invite_from_mentions_kill_switch')) {
|
|
528
528
|
// Get the email from query, using the same logic as InviteItemWithEmailDomain
|
|
529
529
|
var emailDomain = mentionProvider.userEmailDomain;
|
|
530
530
|
var email = query || '';
|
|
@@ -623,7 +623,7 @@ var createTypeAheadConfig = exports.createTypeAheadConfig = function createTypeA
|
|
|
623
623
|
});
|
|
624
624
|
// Cache the agent name so pasted mentions (where attrs.text is stripped)
|
|
625
625
|
// can recover it synchronously via resolveMentionName() cache hit.
|
|
626
|
-
if (name && mentionProvider && (0, _resource.isResolvingMentionProvider)(mentionProvider) && (0,
|
|
626
|
+
if (name && mentionProvider && (0, _resource.isResolvingMentionProvider)(mentionProvider) && (0, _fg.fg)('platform_editor_agent_mentions_drop_one_fixes')) {
|
|
627
627
|
mentionProvider.cacheMentionName(id, name);
|
|
628
628
|
}
|
|
629
629
|
}
|
|
@@ -5,7 +5,7 @@ import React, { useEffect, useState } from 'react';
|
|
|
5
5
|
import { bindAll } from 'bind-event-listener';
|
|
6
6
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- mirror existing renderer pattern
|
|
7
7
|
import uuid from 'uuid/v4';
|
|
8
|
-
import Tooltip from '@atlaskit/tooltip';
|
|
8
|
+
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
9
9
|
const styles = {
|
|
10
10
|
hiddenTrigger: "_1e0cglyw"
|
|
11
11
|
};
|
|
@@ -8,7 +8,7 @@ import { UNKNOWN_USER_ID } from '@atlaskit/mention/constants';
|
|
|
8
8
|
import { isResolvingMentionProvider, MentionNameStatus } from '@atlaskit/mention/resource';
|
|
9
9
|
import { isRestricted } from '@atlaskit/mention/types';
|
|
10
10
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
11
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
12
12
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
13
13
|
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
14
14
|
import { disabledTooltipRenderer } from './disabledTooltipRenderer';
|
|
@@ -5,7 +5,7 @@ import uuid from 'uuid/v4';
|
|
|
5
5
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
6
6
|
import { findChildrenByAttr } from '@atlaskit/editor-prosemirror/utils';
|
|
7
7
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
8
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
9
9
|
import { navigateToTeamsApp } from '@atlaskit/teams-app-config/navigation';
|
|
10
10
|
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
11
11
|
import { getAgentMentionParentContext } from '../pm-plugins/agent-mention-context';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
3
3
|
import { isResolvingMentionProvider, MentionNameStatus } from '@atlaskit/mention/resource';
|
|
4
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
5
5
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
6
6
|
import { getAgentMentionParentContext } from './agent-mention-context';
|
|
7
7
|
import { mentionPluginKey } from './key';
|
|
@@ -4,7 +4,7 @@ import { insm } from '@atlaskit/insm';
|
|
|
4
4
|
import { isResolvingMentionProvider, MentionNameStatus, SLI_EVENT_TYPE, SMART_EVENT_TYPE } from '@atlaskit/mention/resource';
|
|
5
5
|
import { ComponentNames } from '@atlaskit/mention/types';
|
|
6
6
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
7
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
8
8
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
9
9
|
import { MentionNodeView } from '../nodeviews/mentionNodeView';
|
|
10
10
|
import { MENTION_PROVIDER_REJECTED, MENTION_PROVIDER_UNDEFINED } from '../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.1.
|
|
54
|
+
const PACKAGE_VERSION = "17.1.16";
|
|
55
55
|
const setProvider = provider => (state, dispatch) => {
|
|
56
56
|
if (dispatch) {
|
|
57
57
|
dispatch(state.tr.setMeta(mentionPluginKey, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useRef, useLayoutEffect, useEffect, Suspense } from 'react';
|
|
2
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
3
3
|
import { Popper as ReactPopper } from '@atlaskit/popper/main';
|
|
4
|
-
import Portal from '@atlaskit/portal';
|
|
4
|
+
import Portal from '@atlaskit/portal/portal';
|
|
5
5
|
import { layers } from '@atlaskit/theme/constants';
|
|
6
6
|
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
7
7
|
import { useFocusTrap } from './useFocusTrap';
|
|
@@ -5,7 +5,7 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
5
5
|
import { useEffect, useMemo, useState } from 'react';
|
|
6
6
|
import { bind } from 'bind-event-listener';
|
|
7
7
|
import Loadable from 'react-loadable';
|
|
8
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
9
9
|
import { ProfileCardLazy } from '@atlaskit/profilecard/user';
|
|
10
10
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
11
11
|
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
@@ -6,11 +6,11 @@ import { mentionMessages } from '@atlaskit/editor-common/messages';
|
|
|
6
6
|
import { TypeAheadAvailableNodes } from '@atlaskit/editor-common/type-ahead';
|
|
7
7
|
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
8
8
|
import { findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
9
|
-
import Lozenge from '@atlaskit/lozenge';
|
|
9
|
+
import Lozenge from '@atlaskit/lozenge/lozenge';
|
|
10
10
|
import { MENTION_ITEM_HEIGHT, MENTION_ITEM_HEIGHT_REFRESHED, MentionItem } from '@atlaskit/mention/item';
|
|
11
11
|
import { isResolvingMentionProvider } from '@atlaskit/mention/resource';
|
|
12
12
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
13
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
14
14
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
15
15
|
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
16
16
|
import { createSingleMentionFragment } from '../../editor-commands';
|
|
@@ -6,7 +6,7 @@ import React, { useEffect, useState } from 'react';
|
|
|
6
6
|
import { bindAll } from 'bind-event-listener';
|
|
7
7
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- mirror existing renderer pattern
|
|
8
8
|
import uuid from 'uuid/v4';
|
|
9
|
-
import Tooltip from '@atlaskit/tooltip';
|
|
9
|
+
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
10
10
|
var styles = {
|
|
11
11
|
hiddenTrigger: "_1e0cglyw"
|
|
12
12
|
};
|
|
@@ -14,7 +14,7 @@ import { UNKNOWN_USER_ID } from '@atlaskit/mention/constants';
|
|
|
14
14
|
import { isResolvingMentionProvider, MentionNameStatus } from '@atlaskit/mention/resource';
|
|
15
15
|
import { isRestricted } from '@atlaskit/mention/types';
|
|
16
16
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
17
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
17
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
18
18
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
19
19
|
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
20
20
|
import { disabledTooltipRenderer } from './disabledTooltipRenderer';
|
|
@@ -8,7 +8,7 @@ import uuid from 'uuid/v4';
|
|
|
8
8
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
9
9
|
import { findChildrenByAttr } from '@atlaskit/editor-prosemirror/utils';
|
|
10
10
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
11
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
12
12
|
import { navigateToTeamsApp } from '@atlaskit/teams-app-config/navigation';
|
|
13
13
|
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
14
14
|
import { getAgentMentionParentContext } from '../pm-plugins/agent-mention-context';
|
|
@@ -8,7 +8,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
8
8
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
9
9
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
10
10
|
import { isResolvingMentionProvider, MentionNameStatus } from '@atlaskit/mention/resource';
|
|
11
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
12
12
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
13
13
|
import { getAgentMentionParentContext } from './agent-mention-context';
|
|
14
14
|
import { mentionPluginKey } from './key';
|
|
@@ -11,7 +11,7 @@ import { insm } from '@atlaskit/insm';
|
|
|
11
11
|
import { isResolvingMentionProvider, MentionNameStatus, SLI_EVENT_TYPE, SMART_EVENT_TYPE } from '@atlaskit/mention/resource';
|
|
12
12
|
import { ComponentNames } from '@atlaskit/mention/types';
|
|
13
13
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
14
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
14
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
15
15
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
16
16
|
import { MentionNodeView } from '../nodeviews/mentionNodeView';
|
|
17
17
|
import { MENTION_PROVIDER_REJECTED, MENTION_PROVIDER_UNDEFINED } from '../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.1.
|
|
61
|
+
var PACKAGE_VERSION = "17.1.16";
|
|
62
62
|
var setProvider = function setProvider(provider) {
|
|
63
63
|
return function (state, dispatch) {
|
|
64
64
|
if (dispatch) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
2
|
import React, { useRef, useLayoutEffect, useEffect, Suspense } from 'react';
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
4
4
|
import { Popper as ReactPopper } from '@atlaskit/popper/main';
|
|
5
|
-
import Portal from '@atlaskit/portal';
|
|
5
|
+
import Portal from '@atlaskit/portal/portal';
|
|
6
6
|
import { layers } from '@atlaskit/theme/constants';
|
|
7
7
|
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
8
8
|
import { useFocusTrap } from './useFocusTrap';
|
|
@@ -8,7 +8,7 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
|
8
8
|
import { useEffect, useMemo, useState } from 'react';
|
|
9
9
|
import { bind } from 'bind-event-listener';
|
|
10
10
|
import Loadable from 'react-loadable';
|
|
11
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
12
12
|
import { ProfileCardLazy } from '@atlaskit/profilecard/user';
|
|
13
13
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
14
14
|
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
@@ -13,11 +13,11 @@ import { mentionMessages } from '@atlaskit/editor-common/messages';
|
|
|
13
13
|
import { TypeAheadAvailableNodes } from '@atlaskit/editor-common/type-ahead';
|
|
14
14
|
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
15
15
|
import { findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
16
|
-
import Lozenge from '@atlaskit/lozenge';
|
|
16
|
+
import Lozenge from '@atlaskit/lozenge/lozenge';
|
|
17
17
|
import { MENTION_ITEM_HEIGHT, MENTION_ITEM_HEIGHT_REFRESHED, MentionItem } from '@atlaskit/mention/item';
|
|
18
18
|
import { isResolvingMentionProvider } from '@atlaskit/mention/resource';
|
|
19
19
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
20
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
20
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
21
21
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
22
22
|
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
23
23
|
import { createSingleMentionFragment } from '../../editor-commands';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { MentionDefinition } from '@atlaskit/adf-schema/mention';
|
|
2
2
|
import type { MentionNodeDataCallback, MentionNodeDataIdentifier, MentionNodeDataProvider as MentionNodeDataProviderContract } from '@atlaskit/editor-common/mention';
|
|
3
|
-
import type { JSONNode } from '@atlaskit/editor-json-transformer';
|
|
3
|
+
import type { JSONNode } from '@atlaskit/editor-json-transformer/types';
|
|
4
4
|
import type { MentionNodeData } from '@atlaskit/mention/types';
|
|
5
5
|
import { NodeDataProvider } from '@atlaskit/node-data-provider/node-data-provider';
|
|
6
6
|
export type FetchMentionNodeData = (accountIds: string[]) => Promise<Record<string, MentionNodeData>>;
|
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.17",
|
|
4
4
|
"description": "Mentions plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -44,9 +44,10 @@
|
|
|
44
44
|
"@atlaskit/portal": "^6.3.0",
|
|
45
45
|
"@atlaskit/primitives": "^22.4.0",
|
|
46
46
|
"@atlaskit/profilecard": "^26.19.0",
|
|
47
|
+
"@atlaskit/section-message": "^10.1.0",
|
|
47
48
|
"@atlaskit/teams-app-config": "^2.2.0",
|
|
48
49
|
"@atlaskit/theme": "^28.1.0",
|
|
49
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
50
|
+
"@atlaskit/tmp-editor-statsig": "^159.0.0",
|
|
50
51
|
"@atlaskit/tokens": "^16.8.0",
|
|
51
52
|
"@atlaskit/tooltip": "^24.2.0",
|
|
52
53
|
"@atlaskit/user-picker": "^13.9.0",
|