@atlaskit/editor-plugin-mentions 20.1.2 → 20.1.4
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 +15 -0
- package/dist/cjs/editor-commands/index.js +2 -2
- package/dist/cjs/mentionsPlugin.js +4 -3
- package/dist/cjs/nodeviews/mentionNodeView.js +4 -3
- package/dist/cjs/pm-plugins/agent.js +4 -4
- package/dist/cjs/pm-plugins/main.js +1 -1
- package/dist/cjs/ui/type-ahead/analytics.js +2 -2
- package/dist/cjs/ui/type-ahead/index.js +3 -3
- package/dist/es2019/editor-commands/index.js +1 -1
- package/dist/es2019/mentionsPlugin.js +3 -2
- package/dist/es2019/nodeviews/mentionNodeView.js +3 -2
- package/dist/es2019/pm-plugins/agent.js +1 -1
- package/dist/es2019/pm-plugins/main.js +1 -1
- package/dist/es2019/ui/type-ahead/analytics.js +1 -1
- package/dist/es2019/ui/type-ahead/index.js +1 -1
- package/dist/esm/editor-commands/index.js +1 -1
- package/dist/esm/mentionsPlugin.js +3 -2
- package/dist/esm/nodeviews/mentionNodeView.js +3 -2
- package/dist/esm/pm-plugins/agent.js +1 -1
- package/dist/esm/pm-plugins/main.js +1 -1
- package/dist/esm/ui/type-ahead/analytics.js +1 -1
- package/dist/esm/ui/type-ahead/index.js +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-mentions
|
|
2
2
|
|
|
3
|
+
## 20.1.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 20.1.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`2bbc1c84de468`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2bbc1c84de468) -
|
|
14
|
+
Migrate Volt consumer imports to existing definitions and align affected test mocks without
|
|
15
|
+
changing runtime behavior.
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 20.1.2
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -7,7 +7,7 @@ exports.insertMention = exports.createSingleMentionFragment = void 0;
|
|
|
7
7
|
var _uuid = require("uuid");
|
|
8
8
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
9
9
|
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
10
|
-
var
|
|
10
|
+
var _isResolvingMentionProvider = require("@atlaskit/mention/is-resolving-mention-provider");
|
|
11
11
|
var _expVal = require("@atlaskit/tmp-editor-statsig/expVal");
|
|
12
12
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
13
13
|
|
|
@@ -37,7 +37,7 @@ var createSingleMentionFragment = exports.createSingleMentionFragment = function
|
|
|
37
37
|
|
|
38
38
|
// Don't insert into document if document data is sanitized.
|
|
39
39
|
var text = sanitizePrivateContent ? '' : "@".concat(renderName);
|
|
40
|
-
if (sanitizePrivateContent && (0,
|
|
40
|
+
if (sanitizePrivateContent && (0, _isResolvingMentionProvider.isResolvingMentionProvider)(mentionProvider)) {
|
|
41
41
|
// Cache (locally) for later rendering
|
|
42
42
|
mentionProvider.cacheMentionName(id, renderName);
|
|
43
43
|
}
|
|
@@ -17,7 +17,8 @@ var _analytics = require("@atlaskit/editor-common/analytics");
|
|
|
17
17
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
18
18
|
var _providerFactory = require("@atlaskit/editor-common/provider-factory");
|
|
19
19
|
var _assets = require("@atlaskit/editor-common/assets");
|
|
20
|
-
var
|
|
20
|
+
var _isResolvingMentionProvider = require("@atlaskit/mention/is-resolving-mention-provider");
|
|
21
|
+
var _isPromise = require("@atlaskit/mention/is-promise");
|
|
21
22
|
var _types = require("@atlaskit/mention/types");
|
|
22
23
|
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
23
24
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
@@ -69,10 +70,10 @@ function Component(_ref) {
|
|
|
69
70
|
var mentionNodeType = schema.nodes.mention;
|
|
70
71
|
var id = node.attrs.id;
|
|
71
72
|
if (node.type === mentionNodeType) {
|
|
72
|
-
if ((0,
|
|
73
|
+
if ((0, _isResolvingMentionProvider.isResolvingMentionProvider)(mentionProviderSync)) {
|
|
73
74
|
var nameDetail = mentionProviderSync === null || mentionProviderSync === void 0 ? void 0 : mentionProviderSync.resolveMentionName(id);
|
|
74
75
|
var newText;
|
|
75
|
-
if ((0,
|
|
76
|
+
if ((0, _isPromise.isPromise)(nameDetail)) {
|
|
76
77
|
newText = "@".concat(intl.formatMessage(_messages.mentionMessages.unknownLabel));
|
|
77
78
|
} else {
|
|
78
79
|
newText = processName(nameDetail, intl);
|
|
@@ -16,7 +16,8 @@ var _vanillaTooltip = require("@atlaskit/editor-common/vanilla-tooltip");
|
|
|
16
16
|
var _whitespace = require("@atlaskit/editor-common/whitespace");
|
|
17
17
|
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
18
18
|
var _constants = require("@atlaskit/mention/constants");
|
|
19
|
-
var
|
|
19
|
+
var _isResolvingMentionProvider = require("@atlaskit/mention/is-resolving-mention-provider");
|
|
20
|
+
var _isRestricted = require("@atlaskit/mention/is-restricted");
|
|
20
21
|
var _types = require("@atlaskit/mention/types");
|
|
21
22
|
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
22
23
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
@@ -127,7 +128,7 @@ var handleProviderName = /*#__PURE__*/function () {
|
|
|
127
128
|
case 0:
|
|
128
129
|
// Also resolve when text is a raw AAID — provider will return the real display name.
|
|
129
130
|
textIsAaid = isAgentAaidText(node, isAgentMentionsEnabled);
|
|
130
|
-
if (!((0,
|
|
131
|
+
if (!((0, _isResolvingMentionProvider.isResolvingMentionProvider)(mentionProvider) && node.attrs.id && (!node.attrs.text || textIsAaid))) {
|
|
131
132
|
_context.next = 2;
|
|
132
133
|
break;
|
|
133
134
|
}
|
|
@@ -419,7 +420,7 @@ var MentionNodeView = exports.MentionNodeView = /*#__PURE__*/function () {
|
|
|
419
420
|
isHighlighted = this.shouldHighlightMention(mentionProvider);
|
|
420
421
|
disabledState = this.getDisabledState(mentionProvider);
|
|
421
422
|
isDisabled = !!(disabledState !== null && disabledState !== void 0 && disabledState.disabled);
|
|
422
|
-
newState = getNewState(isHighlighted, (0,
|
|
423
|
+
newState = getNewState(isHighlighted, (0, _isRestricted.isRestricted)(this.node.attrs.accessLevel), isDisabled);
|
|
423
424
|
disabledTooltip = disabledState !== null && disabledState !== void 0 && disabledState.disabled ? disabledState.tooltip : undefined; // `setClassList` always runs so the aria-label (which depends on the
|
|
424
425
|
// tooltip text) stays in sync when the tooltip reason changes while
|
|
425
426
|
// the chip remains disabled. State-change-only writes would leave a
|
|
@@ -11,7 +11,7 @@ var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
|
11
11
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
12
12
|
var _view = require("@atlaskit/editor-prosemirror/view");
|
|
13
13
|
var _types = require("@atlaskit/mention/types");
|
|
14
|
-
var
|
|
14
|
+
var _isResolvingMentionProvider = require("@atlaskit/mention/is-resolving-mention-provider");
|
|
15
15
|
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
16
16
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
17
17
|
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
@@ -235,7 +235,7 @@ var clearTrackedAgentMentionState = function clearTrackedAgentMentionState(plugi
|
|
|
235
235
|
* is not OK.
|
|
236
236
|
*/
|
|
237
237
|
var resolveCachedAgentMentionName = function resolveCachedAgentMentionName(mentionProvider, params, id) {
|
|
238
|
-
if (params !== null && params !== void 0 && params.name || !(0,
|
|
238
|
+
if (params !== null && params !== void 0 && params.name || !(0, _isResolvingMentionProvider.isResolvingMentionProvider)(mentionProvider)) {
|
|
239
239
|
var _params$name;
|
|
240
240
|
return (_params$name = params === null || params === void 0 ? void 0 : params.name) !== null && _params$name !== void 0 ? _params$name : undefined;
|
|
241
241
|
}
|
|
@@ -565,7 +565,7 @@ var applyAgentMentionState = exports.applyAgentMentionState = function applyAgen
|
|
|
565
565
|
var isTaskItemMentionForPaste = agentMentionParentNodeType === 'taskItem';
|
|
566
566
|
if (!isTaskItemMentionForPaste && isNewInsertion && getIsRovoPanelOpen !== null && getIsRovoPanelOpen !== void 0 && getIsRovoPanelOpen()) {
|
|
567
567
|
// Rovo is already open, so do not publish a nudge-triggering state change.
|
|
568
|
-
} else if (agentMentionName === null && agentMentionId !== null && (0,
|
|
568
|
+
} else if (agentMentionName === null && agentMentionId !== null && (0, _isResolvingMentionProvider.isResolvingMentionProvider)(newPluginState.mentionProvider) && (0, _fg.fg)('platform_editor_agent_mentions_drop_one_fixes')) {
|
|
569
569
|
newPluginState = _objectSpread(_objectSpread({}, newPluginState), {}, {
|
|
570
570
|
pendingPastedAgentMention: {
|
|
571
571
|
id: agentMentionId,
|
|
@@ -722,7 +722,7 @@ var createAgentMentionPluginView = exports.createAgentMentionPluginView = functi
|
|
|
722
722
|
return;
|
|
723
723
|
}
|
|
724
724
|
_schedulePendingTypedAgentMentionTimer(mentionPluginState);
|
|
725
|
-
if ((0, _editorExperiment.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,
|
|
725
|
+
if ((0, _editorExperiment.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, _isResolvingMentionProvider.isResolvingMentionProvider)(mentionPluginState.mentionProvider) && (0, _fg.fg)('platform_editor_agent_mentions_drop_one_fixes')) {
|
|
726
726
|
resolveAndDispatchPastedAgentMentionName(mentionPluginState.pendingPastedAgentMention.id, mentionPluginState.mentionProvider, pendingResolveMentionIds, view);
|
|
727
727
|
}
|
|
728
728
|
},
|
|
@@ -43,7 +43,7 @@ var ACTIONS = exports.ACTIONS = {
|
|
|
43
43
|
CLEAR_PENDING_PASTED_AGENT_MENTION: 'CLEAR_PENDING_PASTED_AGENT_MENTION'
|
|
44
44
|
};
|
|
45
45
|
var PACKAGE_NAME = "@atlaskit/editor-plugin-mentions";
|
|
46
|
-
var PACKAGE_VERSION = "20.1.
|
|
46
|
+
var PACKAGE_VERSION = "20.1.3";
|
|
47
47
|
var setProvider = function setProvider(provider) {
|
|
48
48
|
return function (state, dispatch) {
|
|
49
49
|
if (dispatch) {
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.buildTypeAheadRenderedPayload = exports.buildTypeAheadInviteItemViewedPayload = exports.buildTypeAheadInviteItemClickedPayload = exports.buildTypeAheadInsertedPayload = exports.buildTypeAheadCancelPayload = exports.MENTION_SOURCE = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
10
|
-
var
|
|
10
|
+
var _isSpecialMention = require("@atlaskit/mention/is-special-mention");
|
|
11
11
|
var _utils = require("./utils");
|
|
12
12
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
13
13
|
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; }
|
|
@@ -132,7 +132,7 @@ var buildTypeAheadInsertedPayload = exports.buildTypeAheadInsertedPayload = func
|
|
|
132
132
|
source: mention.source,
|
|
133
133
|
queryLength: queryLength,
|
|
134
134
|
spaceInQuery: spaceInQuery,
|
|
135
|
-
isSpecial: (0,
|
|
135
|
+
isSpecial: (0, _isSpecialMention.isSpecialMention)(mention),
|
|
136
136
|
accessLevel: mention.accessLevel || '',
|
|
137
137
|
userType: mention.userType,
|
|
138
138
|
userId: mention.id,
|
|
@@ -19,7 +19,7 @@ var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
|
19
19
|
var _lozenge = _interopRequireDefault(require("@atlaskit/lozenge/lozenge"));
|
|
20
20
|
var _styles = require("@atlaskit/mention/mention-item/styles");
|
|
21
21
|
var _mentionItem = _interopRequireDefault(require("@atlaskit/mention/mention-item"));
|
|
22
|
-
var
|
|
22
|
+
var _isResolvingMentionProvider = require("@atlaskit/mention/is-resolving-mention-provider");
|
|
23
23
|
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
24
24
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
25
25
|
var _expVal = require("@atlaskit/tmp-editor-statsig/expVal");
|
|
@@ -296,7 +296,7 @@ var buildNodesForTeamMention = function buildNodesForTeamMention(schema, selecte
|
|
|
296
296
|
id = member.id;
|
|
297
297
|
var mentionName = "@".concat(name);
|
|
298
298
|
var text = sanitizePrivateContent ? '' : mentionName;
|
|
299
|
-
if (sanitizePrivateContent && (0,
|
|
299
|
+
if (sanitizePrivateContent && (0, _isResolvingMentionProvider.isResolvingMentionProvider)(mentionProvider)) {
|
|
300
300
|
mentionProvider.cacheMentionName(id, name);
|
|
301
301
|
}
|
|
302
302
|
var userMentionNode = nodes.mention.createChecked({
|
|
@@ -683,7 +683,7 @@ var createTypeAheadConfig = exports.createTypeAheadConfig = function createTypeA
|
|
|
683
683
|
});
|
|
684
684
|
// Cache the agent name so pasted mentions (where attrs.text is stripped)
|
|
685
685
|
// can recover it synchronously via resolveMentionName() cache hit.
|
|
686
|
-
if (name && mentionProvider && (0,
|
|
686
|
+
if (name && mentionProvider && (0, _isResolvingMentionProvider.isResolvingMentionProvider)(mentionProvider) && (0, _fg.fg)('platform_editor_agent_mentions_drop_one_fixes')) {
|
|
687
687
|
mentionProvider.cacheMentionName(id, name);
|
|
688
688
|
}
|
|
689
689
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { v4 as uuid } from 'uuid';
|
|
3
3
|
import { getAnnotationMarksForPos } from '@atlaskit/editor-common/utils';
|
|
4
4
|
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
5
|
-
import { isResolvingMentionProvider } from '@atlaskit/mention/
|
|
5
|
+
import { isResolvingMentionProvider } from '@atlaskit/mention/is-resolving-mention-provider';
|
|
6
6
|
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
7
7
|
const isAgentUserType = userType => userType === 'APP' || userType === 'AGENT';
|
|
8
8
|
export const createSingleMentionFragment = ({
|
|
@@ -6,8 +6,9 @@ import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
|
6
6
|
import { toolbarInsertBlockMessages as messages, mentionMessages } from '@atlaskit/editor-common/messages';
|
|
7
7
|
import { WithProviders } from '@atlaskit/editor-common/provider-factory';
|
|
8
8
|
import { IconMention } from '@atlaskit/editor-common/assets';
|
|
9
|
-
import { isResolvingMentionProvider } from '@atlaskit/mention/
|
|
10
|
-
import {
|
|
9
|
+
import { isResolvingMentionProvider } from '@atlaskit/mention/is-resolving-mention-provider';
|
|
10
|
+
import { isPromise } from '@atlaskit/mention/is-promise';
|
|
11
|
+
import { MentionNameStatus } from '@atlaskit/mention/types';
|
|
11
12
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
12
13
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
13
14
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
@@ -7,8 +7,9 @@ import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
|
|
|
7
7
|
// oxlint-disable-next-line import/no-duplicates
|
|
8
8
|
|
|
9
9
|
import { UNKNOWN_USER_ID } from '@atlaskit/mention/constants';
|
|
10
|
-
import { isResolvingMentionProvider } from '@atlaskit/mention/
|
|
11
|
-
import {
|
|
10
|
+
import { isResolvingMentionProvider } from '@atlaskit/mention/is-resolving-mention-provider';
|
|
11
|
+
import { isRestricted } from '@atlaskit/mention/is-restricted';
|
|
12
|
+
import { MentionNameStatus } from '@atlaskit/mention/types';
|
|
12
13
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
13
14
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
14
15
|
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
@@ -2,7 +2,7 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
|
2
2
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
3
3
|
import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
4
4
|
import { MentionNameStatus } from '@atlaskit/mention/types';
|
|
5
|
-
import { isResolvingMentionProvider } from '@atlaskit/mention/
|
|
5
|
+
import { isResolvingMentionProvider } from '@atlaskit/mention/is-resolving-mention-provider';
|
|
6
6
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
7
7
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
8
8
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
@@ -32,7 +32,7 @@ export const ACTIONS = {
|
|
|
32
32
|
CLEAR_PENDING_PASTED_AGENT_MENTION: 'CLEAR_PENDING_PASTED_AGENT_MENTION'
|
|
33
33
|
};
|
|
34
34
|
const PACKAGE_NAME = "@atlaskit/editor-plugin-mentions";
|
|
35
|
-
const PACKAGE_VERSION = "20.1.
|
|
35
|
+
const PACKAGE_VERSION = "20.1.3";
|
|
36
36
|
const setProvider = provider => (state, dispatch) => {
|
|
37
37
|
if (dispatch) {
|
|
38
38
|
dispatch(state.tr.setMeta(mentionPluginKey, {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import { isSpecialMention } from '@atlaskit/mention/
|
|
2
|
+
import { isSpecialMention } from '@atlaskit/mention/is-special-mention';
|
|
3
3
|
import { isTeamType } from './utils';
|
|
4
4
|
const componentName = 'mention';
|
|
5
5
|
export const MENTION_SOURCE = 'mentionInEditor';
|
|
@@ -9,7 +9,7 @@ import { findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
|
9
9
|
import Lozenge from '@atlaskit/lozenge/lozenge';
|
|
10
10
|
import { MENTION_ITEM_HEIGHT, MENTION_ITEM_HEIGHT_REFRESHED } from '@atlaskit/mention/mention-item/styles';
|
|
11
11
|
import MentionItem from '@atlaskit/mention/mention-item';
|
|
12
|
-
import { isResolvingMentionProvider } from '@atlaskit/mention/
|
|
12
|
+
import { isResolvingMentionProvider } from '@atlaskit/mention/is-resolving-mention-provider';
|
|
13
13
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
14
14
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
15
15
|
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { v4 as uuid } from 'uuid';
|
|
3
3
|
import { getAnnotationMarksForPos } from '@atlaskit/editor-common/utils';
|
|
4
4
|
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
5
|
-
import { isResolvingMentionProvider } from '@atlaskit/mention/
|
|
5
|
+
import { isResolvingMentionProvider } from '@atlaskit/mention/is-resolving-mention-provider';
|
|
6
6
|
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
7
7
|
var isAgentUserType = function isAgentUserType(userType) {
|
|
8
8
|
return userType === 'APP' || userType === 'AGENT';
|
|
@@ -13,8 +13,9 @@ import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
|
13
13
|
import { toolbarInsertBlockMessages as messages, mentionMessages } from '@atlaskit/editor-common/messages';
|
|
14
14
|
import { WithProviders } from '@atlaskit/editor-common/provider-factory';
|
|
15
15
|
import { IconMention } from '@atlaskit/editor-common/assets';
|
|
16
|
-
import { isResolvingMentionProvider } from '@atlaskit/mention/
|
|
17
|
-
import {
|
|
16
|
+
import { isResolvingMentionProvider } from '@atlaskit/mention/is-resolving-mention-provider';
|
|
17
|
+
import { isPromise } from '@atlaskit/mention/is-promise';
|
|
18
|
+
import { MentionNameStatus } from '@atlaskit/mention/types';
|
|
18
19
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
19
20
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
20
21
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
@@ -13,8 +13,9 @@ import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
|
|
|
13
13
|
// oxlint-disable-next-line import/no-duplicates
|
|
14
14
|
|
|
15
15
|
import { UNKNOWN_USER_ID } from '@atlaskit/mention/constants';
|
|
16
|
-
import { isResolvingMentionProvider } from '@atlaskit/mention/
|
|
17
|
-
import {
|
|
16
|
+
import { isResolvingMentionProvider } from '@atlaskit/mention/is-resolving-mention-provider';
|
|
17
|
+
import { isRestricted } from '@atlaskit/mention/is-restricted';
|
|
18
|
+
import { MentionNameStatus } from '@atlaskit/mention/types';
|
|
18
19
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
19
20
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
20
21
|
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
@@ -9,7 +9,7 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
|
9
9
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
10
10
|
import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
11
11
|
import { MentionNameStatus } from '@atlaskit/mention/types';
|
|
12
|
-
import { isResolvingMentionProvider } from '@atlaskit/mention/
|
|
12
|
+
import { isResolvingMentionProvider } from '@atlaskit/mention/is-resolving-mention-provider';
|
|
13
13
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
14
14
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
15
15
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
@@ -35,7 +35,7 @@ export var ACTIONS = {
|
|
|
35
35
|
CLEAR_PENDING_PASTED_AGENT_MENTION: 'CLEAR_PENDING_PASTED_AGENT_MENTION'
|
|
36
36
|
};
|
|
37
37
|
var PACKAGE_NAME = "@atlaskit/editor-plugin-mentions";
|
|
38
|
-
var PACKAGE_VERSION = "20.1.
|
|
38
|
+
var PACKAGE_VERSION = "20.1.3";
|
|
39
39
|
var setProvider = function setProvider(provider) {
|
|
40
40
|
return function (state, dispatch) {
|
|
41
41
|
if (dispatch) {
|
|
@@ -2,7 +2,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
3
|
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) { _defineProperty(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; }
|
|
4
4
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
5
|
-
import { isSpecialMention } from '@atlaskit/mention/
|
|
5
|
+
import { isSpecialMention } from '@atlaskit/mention/is-special-mention';
|
|
6
6
|
import { isTeamType } from './utils';
|
|
7
7
|
var componentName = 'mention';
|
|
8
8
|
export var MENTION_SOURCE = 'mentionInEditor';
|
|
@@ -16,7 +16,7 @@ import { findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
|
16
16
|
import Lozenge from '@atlaskit/lozenge/lozenge';
|
|
17
17
|
import { MENTION_ITEM_HEIGHT, MENTION_ITEM_HEIGHT_REFRESHED } from '@atlaskit/mention/mention-item/styles';
|
|
18
18
|
import MentionItem from '@atlaskit/mention/mention-item';
|
|
19
|
-
import { isResolvingMentionProvider } from '@atlaskit/mention/
|
|
19
|
+
import { isResolvingMentionProvider } from '@atlaskit/mention/is-resolving-mention-provider';
|
|
20
20
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
21
21
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
22
22
|
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-mentions",
|
|
3
|
-
"version": "20.1.
|
|
3
|
+
"version": "20.1.4",
|
|
4
4
|
"description": "Mentions plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -35,19 +35,19 @@
|
|
|
35
35
|
"@atlaskit/insm": "^3.0.0",
|
|
36
36
|
"@atlaskit/link": "^5.1.0",
|
|
37
37
|
"@atlaskit/lozenge": "^15.4.0",
|
|
38
|
-
"@atlaskit/mention": "^29.
|
|
38
|
+
"@atlaskit/mention": "^29.2.0",
|
|
39
39
|
"@atlaskit/node-data-provider": "^19.0.0",
|
|
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
43
|
"@atlaskit/popup": "^6.3.0",
|
|
44
|
-
"@atlaskit/portal": "^
|
|
44
|
+
"@atlaskit/portal": "^7.0.0",
|
|
45
45
|
"@atlaskit/primitives": "^22.5.0",
|
|
46
46
|
"@atlaskit/profilecard": "^26.24.0",
|
|
47
47
|
"@atlaskit/section-message": "^10.2.0",
|
|
48
48
|
"@atlaskit/teams-app-config": "^3.1.0",
|
|
49
49
|
"@atlaskit/theme": "^28.2.0",
|
|
50
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
50
|
+
"@atlaskit/tmp-editor-statsig": "^197.0.0",
|
|
51
51
|
"@atlaskit/tokens": "^17.0.0",
|
|
52
52
|
"@atlaskit/tooltip": "^24.3.0",
|
|
53
53
|
"@atlaskit/user-picker": "^13.13.0",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"uuid": "^11.1.1"
|
|
60
60
|
},
|
|
61
61
|
"peerDependencies": {
|
|
62
|
-
"@atlaskit/editor-common": "^122.
|
|
62
|
+
"@atlaskit/editor-common": "^122.9.0",
|
|
63
63
|
"react": "^18.2.0 || ^19.2.0",
|
|
64
64
|
"react-dom": "^18.2.0 || ^19.2.0",
|
|
65
65
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|