@atlaskit/editor-plugin-mentions 20.1.1 → 20.1.3
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 +18 -0
- package/dist/cjs/editor-commands/index.js +2 -2
- package/dist/cjs/mentionsPlugin.js +4 -3
- package/dist/cjs/nodeviews/mentionNodeView.js +5 -4
- package/dist/cjs/pm-plugins/agent.js +8 -7
- package/dist/cjs/pm-plugins/main.js +3 -3
- package/dist/cjs/ui/type-ahead/MentionItemWithProfileCard.js +3 -3
- package/dist/cjs/ui/type-ahead/analytics.js +2 -2
- package/dist/cjs/ui/type-ahead/index.js +7 -6
- 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 +2 -1
- package/dist/es2019/pm-plugins/main.js +2 -2
- package/dist/es2019/ui/type-ahead/MentionItemWithProfileCard.js +1 -1
- package/dist/es2019/ui/type-ahead/analytics.js +1 -1
- package/dist/es2019/ui/type-ahead/index.js +3 -2
- 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 +2 -1
- package/dist/esm/pm-plugins/main.js +2 -2
- package/dist/esm/ui/type-ahead/MentionItemWithProfileCard.js +1 -1
- package/dist/esm/ui/type-ahead/analytics.js +1 -1
- package/dist/esm/ui/type-ahead/index.js +3 -2
- package/dist/types/editor-commands/index.d.ts +1 -1
- package/dist/types/mentionsPluginType.d.ts +1 -1
- package/dist/types/pm-plugins/agent.d.ts +1 -1
- package/dist/types/providers/mention-node-data-provider.d.ts +1 -2
- package/dist/types/types/index.d.ts +1 -1
- package/dist/types/ui/InlineInvitePopupContainer.d.ts +1 -1
- package/dist/types/ui/InviteItem/InviteItemWithEmailDomain.d.ts +1 -2
- package/dist/types/ui/InviteItem/index.d.ts +1 -2
- package/dist/types/ui/type-ahead/MentionItemWithProfileCard.d.ts +1 -1
- package/dist/types/ui/type-ahead/analytics.d.ts +1 -2
- package/dist/types/ui/type-ahead/index.d.ts +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-mentions
|
|
2
2
|
|
|
3
|
+
## 20.1.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`2bbc1c84de468`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2bbc1c84de468) -
|
|
8
|
+
Migrate Volt consumer imports to existing definitions and align affected test mocks without
|
|
9
|
+
changing runtime behavior.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 20.1.2
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [`b827702a00ecc`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b827702a00ecc) -
|
|
17
|
+
Correct the direct Mention default import and consolidate mention type imports after consumer
|
|
18
|
+
migration.
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 20.1.1
|
|
4
22
|
|
|
5
23
|
### 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");
|
|
@@ -117,7 +118,7 @@ var toDOM = function toDOM(node, hasAvatarSlot) {
|
|
|
117
118
|
}, _whitespace.ZERO_WIDTH_SPACE]];
|
|
118
119
|
};
|
|
119
120
|
var processName = function processName(name) {
|
|
120
|
-
return name.status ===
|
|
121
|
+
return name.status === _types.MentionNameStatus.OK ? "@".concat(name.name || '') : unknownMentionText;
|
|
121
122
|
};
|
|
122
123
|
var handleProviderName = /*#__PURE__*/function () {
|
|
123
124
|
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(mentionProvider, node, isAgentMentionsEnabled) {
|
|
@@ -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
|
|
@@ -10,7 +10,8 @@ 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 _view = require("@atlaskit/editor-prosemirror/view");
|
|
13
|
-
var
|
|
13
|
+
var _types = require("@atlaskit/mention/types");
|
|
14
|
+
var _isResolvingMentionProvider = require("@atlaskit/mention/is-resolving-mention-provider");
|
|
14
15
|
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
15
16
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
16
17
|
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
@@ -234,12 +235,12 @@ var clearTrackedAgentMentionState = function clearTrackedAgentMentionState(plugi
|
|
|
234
235
|
* is not OK.
|
|
235
236
|
*/
|
|
236
237
|
var resolveCachedAgentMentionName = function resolveCachedAgentMentionName(mentionProvider, params, id) {
|
|
237
|
-
if (params !== null && params !== void 0 && params.name || !(0,
|
|
238
|
+
if (params !== null && params !== void 0 && params.name || !(0, _isResolvingMentionProvider.isResolvingMentionProvider)(mentionProvider)) {
|
|
238
239
|
var _params$name;
|
|
239
240
|
return (_params$name = params === null || params === void 0 ? void 0 : params.name) !== null && _params$name !== void 0 ? _params$name : undefined;
|
|
240
241
|
}
|
|
241
242
|
var result = mentionProvider.resolveMentionName(id);
|
|
242
|
-
if (!(result instanceof Promise) && result.status ===
|
|
243
|
+
if (!(result instanceof Promise) && result.status === _types.MentionNameStatus.OK) {
|
|
243
244
|
return result.name || undefined;
|
|
244
245
|
}
|
|
245
246
|
return undefined;
|
|
@@ -258,7 +259,7 @@ var resolveAndDispatchPastedAgentMentionName = exports.resolveAndDispatchPastedA
|
|
|
258
259
|
if (result instanceof Promise) {
|
|
259
260
|
result.then(function (nameDetails) {
|
|
260
261
|
pendingResolveMentionIds.delete(agentId);
|
|
261
|
-
if (nameDetails.status ===
|
|
262
|
+
if (nameDetails.status === _types.MentionNameStatus.OK && nameDetails.name) {
|
|
262
263
|
view.dispatch(view.state.tr.setMeta(_key.mentionPluginKey, {
|
|
263
264
|
action: _main.ACTIONS.RESOLVE_PASTED_AGENT_MENTION_NAME,
|
|
264
265
|
params: {
|
|
@@ -277,7 +278,7 @@ var resolveAndDispatchPastedAgentMentionName = exports.resolveAndDispatchPastedA
|
|
|
277
278
|
}).catch(function () {
|
|
278
279
|
pendingResolveMentionIds.delete(agentId);
|
|
279
280
|
});
|
|
280
|
-
} else if (result.status ===
|
|
281
|
+
} else if (result.status === _types.MentionNameStatus.OK && result.name) {
|
|
281
282
|
pendingResolveMentionIds.delete(agentId);
|
|
282
283
|
view.dispatch(view.state.tr.setMeta(_key.mentionPluginKey, {
|
|
283
284
|
action: _main.ACTIONS.RESOLVE_PASTED_AGENT_MENTION_NAME,
|
|
@@ -564,7 +565,7 @@ var applyAgentMentionState = exports.applyAgentMentionState = function applyAgen
|
|
|
564
565
|
var isTaskItemMentionForPaste = agentMentionParentNodeType === 'taskItem';
|
|
565
566
|
if (!isTaskItemMentionForPaste && isNewInsertion && getIsRovoPanelOpen !== null && getIsRovoPanelOpen !== void 0 && getIsRovoPanelOpen()) {
|
|
566
567
|
// Rovo is already open, so do not publish a nudge-triggering state change.
|
|
567
|
-
} 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')) {
|
|
568
569
|
newPluginState = _objectSpread(_objectSpread({}, newPluginState), {}, {
|
|
569
570
|
pendingPastedAgentMention: {
|
|
570
571
|
id: agentMentionId,
|
|
@@ -721,7 +722,7 @@ var createAgentMentionPluginView = exports.createAgentMentionPluginView = functi
|
|
|
721
722
|
return;
|
|
722
723
|
}
|
|
723
724
|
_schedulePendingTypedAgentMentionTimer(mentionPluginState);
|
|
724
|
-
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')) {
|
|
725
726
|
resolveAndDispatchPastedAgentMentionName(mentionPluginState.pendingPastedAgentMention.id, mentionPluginState.mentionProvider, pendingResolveMentionIds, view);
|
|
726
727
|
}
|
|
727
728
|
},
|
|
@@ -10,7 +10,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
10
10
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
11
11
|
var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
12
12
|
var _insm = require("@atlaskit/insm");
|
|
13
|
-
var
|
|
13
|
+
var _analytics2 = require("@atlaskit/mention/analytics");
|
|
14
14
|
var _types = require("@atlaskit/mention/types");
|
|
15
15
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
16
16
|
var _mentionNodeView = require("../nodeviews/mentionNodeView");
|
|
@@ -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.2";
|
|
47
47
|
var setProvider = function setProvider(provider) {
|
|
48
48
|
return function (state, dispatch) {
|
|
49
49
|
if (dispatch) {
|
|
@@ -64,7 +64,7 @@ function createMentionPlugin(_ref) {
|
|
|
64
64
|
api = _ref.api;
|
|
65
65
|
var mentionProvider;
|
|
66
66
|
var sendAnalytics = function sendAnalytics(event, actionSubject, action, attributes) {
|
|
67
|
-
if (event ===
|
|
67
|
+
if (event === _analytics2.SLI_EVENT_TYPE || event === _analytics2.SMART_EVENT_TYPE) {
|
|
68
68
|
fireEvent({
|
|
69
69
|
action: action,
|
|
70
70
|
actionSubject: actionSubject,
|
|
@@ -11,7 +11,7 @@ require("./MentionItemWithProfileCard.compiled.css");
|
|
|
11
11
|
var _runtime = require("@compiled/react/runtime");
|
|
12
12
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
13
|
var _react = _interopRequireWildcard(require("react"));
|
|
14
|
-
var
|
|
14
|
+
var _mentionItem = _interopRequireDefault(require("@atlaskit/mention/mention-item"));
|
|
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 _compiled = require("@atlaskit/primitives/compiled");
|
|
@@ -158,7 +158,7 @@ function MentionItemWithProfileCard(_ref2) {
|
|
|
158
158
|
xcss: styles.placeholderContainer
|
|
159
159
|
}, /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
160
160
|
xcss: styles.placeholderContent
|
|
161
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
161
|
+
}, /*#__PURE__*/_react.default.createElement(_mentionItem.default, {
|
|
162
162
|
mention: mention,
|
|
163
163
|
selected: selected,
|
|
164
164
|
onMouseEnter: handleMouseEnter,
|
|
@@ -172,7 +172,7 @@ function MentionItemWithProfileCard(_ref2) {
|
|
|
172
172
|
onMouseOut: scheduleHide,
|
|
173
173
|
onMouseLeave: handleMouseLeave,
|
|
174
174
|
onBlur: handleMouseLeave
|
|
175
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
175
|
+
}, /*#__PURE__*/_react.default.createElement(_mentionItem.default, {
|
|
176
176
|
mention: mention,
|
|
177
177
|
selected: selected,
|
|
178
178
|
onMouseEnter: handleMouseEnter,
|
|
@@ -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,
|
|
@@ -17,8 +17,9 @@ 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
19
|
var _lozenge = _interopRequireDefault(require("@atlaskit/lozenge/lozenge"));
|
|
20
|
-
var
|
|
21
|
-
var
|
|
20
|
+
var _styles = require("@atlaskit/mention/mention-item/styles");
|
|
21
|
+
var _mentionItem = _interopRequireDefault(require("@atlaskit/mention/mention-item"));
|
|
22
|
+
var _isResolvingMentionProvider = require("@atlaskit/mention/is-resolving-mention-provider");
|
|
22
23
|
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
23
24
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
24
25
|
var _expVal = require("@atlaskit/tmp-editor-statsig/expVal");
|
|
@@ -123,7 +124,7 @@ var makeMentionToTypeaheadItem = function makeMentionToTypeaheadItem(_ref4) {
|
|
|
123
124
|
var useRefreshedItemHeight = _ref4.useRefreshedItemHeight,
|
|
124
125
|
profilecardProvider = _ref4.profilecardProvider;
|
|
125
126
|
return function (mention) {
|
|
126
|
-
var itemHeight = useRefreshedItemHeight ?
|
|
127
|
+
var itemHeight = useRefreshedItemHeight ? _styles.MENTION_ITEM_HEIGHT_REFRESHED : _styles.MENTION_ITEM_HEIGHT;
|
|
127
128
|
if (isAgentMentionLoadErrorEnabled(mention)) {
|
|
128
129
|
return {
|
|
129
130
|
title: mention.id,
|
|
@@ -172,7 +173,7 @@ var makeMentionToTypeaheadItem = function makeMentionToTypeaheadItem(_ref4) {
|
|
|
172
173
|
onSelection: onClick,
|
|
173
174
|
height: itemHeight,
|
|
174
175
|
profilecardProvider: profilecardProvider
|
|
175
|
-
}) : /*#__PURE__*/_react.default.createElement(
|
|
176
|
+
}) : /*#__PURE__*/_react.default.createElement(_mentionItem.default, {
|
|
176
177
|
mention: mention,
|
|
177
178
|
selected: isSelected,
|
|
178
179
|
onMouseEnter: onHover,
|
|
@@ -295,7 +296,7 @@ var buildNodesForTeamMention = function buildNodesForTeamMention(schema, selecte
|
|
|
295
296
|
id = member.id;
|
|
296
297
|
var mentionName = "@".concat(name);
|
|
297
298
|
var text = sanitizePrivateContent ? '' : mentionName;
|
|
298
|
-
if (sanitizePrivateContent && (0,
|
|
299
|
+
if (sanitizePrivateContent && (0, _isResolvingMentionProvider.isResolvingMentionProvider)(mentionProvider)) {
|
|
299
300
|
mentionProvider.cacheMentionName(id, name);
|
|
300
301
|
}
|
|
301
302
|
var userMentionNode = nodes.mention.createChecked({
|
|
@@ -682,7 +683,7 @@ var createTypeAheadConfig = exports.createTypeAheadConfig = function createTypeA
|
|
|
682
683
|
});
|
|
683
684
|
// Cache the agent name so pasted mentions (where attrs.text is stripped)
|
|
684
685
|
// can recover it synchronously via resolveMentionName() cache hit.
|
|
685
|
-
if (name && mentionProvider && (0,
|
|
686
|
+
if (name && mentionProvider && (0, _isResolvingMentionProvider.isResolvingMentionProvider)(mentionProvider) && (0, _fg.fg)('platform_editor_agent_mentions_drop_one_fixes')) {
|
|
686
687
|
mentionProvider.cacheMentionName(id, name);
|
|
687
688
|
}
|
|
688
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
|
|
11
|
-
import { isRestricted } from '@atlaskit/mention/
|
|
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';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
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
|
-
import {
|
|
4
|
+
import { MentionNameStatus } from '@atlaskit/mention/types';
|
|
5
|
+
import { isResolvingMentionProvider } from '@atlaskit/mention/is-resolving-mention-provider';
|
|
5
6
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
6
7
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
7
8
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
3
|
import { insm } from '@atlaskit/insm';
|
|
4
|
-
import { SLI_EVENT_TYPE, SMART_EVENT_TYPE } from '@atlaskit/mention/
|
|
4
|
+
import { SLI_EVENT_TYPE, SMART_EVENT_TYPE } from '@atlaskit/mention/analytics';
|
|
5
5
|
import { ComponentNames } from '@atlaskit/mention/types';
|
|
6
6
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
7
7
|
import { MentionNodeView } from '../nodeviews/mentionNodeView';
|
|
@@ -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.2";
|
|
36
36
|
const setProvider = provider => (state, dispatch) => {
|
|
37
37
|
if (dispatch) {
|
|
38
38
|
dispatch(state.tr.setMeta(mentionPluginKey, {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import "./MentionItemWithProfileCard.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
5
|
-
import
|
|
5
|
+
import MentionItem from '@atlaskit/mention/mention-item';
|
|
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 { Box } from '@atlaskit/primitives/compiled';
|
|
@@ -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';
|
|
@@ -7,8 +7,9 @@ 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
9
|
import Lozenge from '@atlaskit/lozenge/lozenge';
|
|
10
|
-
import { MENTION_ITEM_HEIGHT, MENTION_ITEM_HEIGHT_REFRESHED
|
|
11
|
-
import
|
|
10
|
+
import { MENTION_ITEM_HEIGHT, MENTION_ITEM_HEIGHT_REFRESHED } from '@atlaskit/mention/mention-item/styles';
|
|
11
|
+
import MentionItem from '@atlaskit/mention/mention-item';
|
|
12
|
+
import { isResolvingMentionProvider } from '@atlaskit/mention/is-resolving-mention-provider';
|
|
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 @@
|
|
|
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
|
|
17
|
-
import { isRestricted } from '@atlaskit/mention/
|
|
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';
|
|
@@ -8,7 +8,8 @@ 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 { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
11
|
-
import {
|
|
11
|
+
import { MentionNameStatus } from '@atlaskit/mention/types';
|
|
12
|
+
import { isResolvingMentionProvider } from '@atlaskit/mention/is-resolving-mention-provider';
|
|
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 { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
@@ -4,7 +4,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
5
5
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
6
6
|
import { insm } from '@atlaskit/insm';
|
|
7
|
-
import { SLI_EVENT_TYPE, SMART_EVENT_TYPE } from '@atlaskit/mention/
|
|
7
|
+
import { SLI_EVENT_TYPE, SMART_EVENT_TYPE } from '@atlaskit/mention/analytics';
|
|
8
8
|
import { ComponentNames } from '@atlaskit/mention/types';
|
|
9
9
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
10
10
|
import { MentionNodeView } from '../nodeviews/mentionNodeView';
|
|
@@ -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.2";
|
|
39
39
|
var setProvider = function setProvider(provider) {
|
|
40
40
|
return function (state, dispatch) {
|
|
41
41
|
if (dispatch) {
|
|
@@ -3,7 +3,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
3
3
|
import "./MentionItemWithProfileCard.compiled.css";
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
6
|
-
import
|
|
6
|
+
import MentionItem from '@atlaskit/mention/mention-item';
|
|
7
7
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
8
8
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
9
9
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
@@ -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';
|
|
@@ -14,8 +14,9 @@ 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
16
|
import Lozenge from '@atlaskit/lozenge/lozenge';
|
|
17
|
-
import { MENTION_ITEM_HEIGHT, MENTION_ITEM_HEIGHT_REFRESHED
|
|
18
|
-
import
|
|
17
|
+
import { MENTION_ITEM_HEIGHT, MENTION_ITEM_HEIGHT_REFRESHED } from '@atlaskit/mention/mention-item/styles';
|
|
18
|
+
import MentionItem from '@atlaskit/mention/mention-item';
|
|
19
|
+
import { isResolvingMentionProvider } from '@atlaskit/mention/is-resolving-mention-provider';
|
|
19
20
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
20
21
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
21
22
|
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ExtractInjectionAPI, EditorCommand } from '@atlaskit/editor-common/types';
|
|
2
2
|
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
3
3
|
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
-
import type { MentionProvider, MentionDescription } from '@atlaskit/mention/
|
|
4
|
+
import type { MentionProvider, MentionDescription } from '@atlaskit/mention/types';
|
|
5
5
|
import type { MentionsPlugin } from '../mentionsPluginType';
|
|
6
6
|
export type InsertMentionParameters = Pick<MentionDescription, 'name' | 'id' | 'userType' | 'isXProductUser' | 'nickname' | 'accessLevel'> & {
|
|
7
7
|
localId?: string;
|
|
@@ -6,7 +6,7 @@ import type { SelectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
|
6
6
|
import type { UiControlRegistryPlugin } from '@atlaskit/editor-plugin-ui-control-registry';
|
|
7
7
|
import type { TypeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead/type-ahead-plugin-type';
|
|
8
8
|
import type { TypeAheadInputMethod } from '@atlaskit/editor-plugin-type-ahead/types';
|
|
9
|
-
import type { MentionProvider } from '@atlaskit/mention/
|
|
9
|
+
import type { MentionProvider } from '@atlaskit/mention/types';
|
|
10
10
|
import type { InsertMentionParameters } from './editor-commands';
|
|
11
11
|
import type { AgentRunStateByLocalId, MentionChange, MentionPluginOptions, MentionSharedState } from './types';
|
|
12
12
|
export type MentionActionOpenTypeAhead = (inputMethod: TypeAheadInputMethod) => boolean;
|
|
@@ -3,7 +3,7 @@ import type { PMPluginFactoryParams } from '@atlaskit/editor-common/types';
|
|
|
3
3
|
import type { EditorState, ReadonlyTransaction } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
5
5
|
import { type EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
|
-
import type { ResolvingMentionProvider } from '@atlaskit/mention/resource';
|
|
6
|
+
import type { ResolvingMentionProvider } from '@atlaskit/mention/mention-resource';
|
|
7
7
|
import type { MentionPluginOptions, MentionPluginState } from '../types';
|
|
8
8
|
/**
|
|
9
9
|
* Resolves the name of a pasted agent mention via the mention provider and
|
|
@@ -1,8 +1,7 @@
|
|
|
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
3
|
import type { JSONNode } from '@atlaskit/editor-json-transformer/types';
|
|
4
|
-
import type { MentionProvider } from '@atlaskit/mention/
|
|
5
|
-
import type { MentionNodeData } from '@atlaskit/mention/types';
|
|
4
|
+
import type { MentionNodeData, MentionProvider } from '@atlaskit/mention/types';
|
|
6
5
|
import { NodeDataProvider } from '@atlaskit/node-data-provider/node-data-provider';
|
|
7
6
|
export type FetchMentionNodeData = (accountIds: string[], signal?: AbortSignal) => Promise<Record<string, MentionNodeData>>;
|
|
8
7
|
export type ResolveMentionNodeData = (mention: MentionNodeDataIdentifier) => MentionNodeData | undefined;
|
|
@@ -4,7 +4,7 @@ import type { MentionNodeDataProvider } from '@atlaskit/editor-common/mention';
|
|
|
4
4
|
import type { Providers, ProfilecardProvider } from '@atlaskit/editor-common/provider-factory';
|
|
5
5
|
import type { TypeAheadHandler } from '@atlaskit/editor-common/types';
|
|
6
6
|
import type { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
7
|
-
import type { MentionDescription, MentionProvider } from '@atlaskit/mention';
|
|
7
|
+
import type { MentionDescription, MentionProvider } from '@atlaskit/mention/types';
|
|
8
8
|
export declare const MENTION_PROVIDER_REJECTED = "REJECTED";
|
|
9
9
|
export declare const MENTION_PROVIDER_UNDEFINED = "UNDEFINED";
|
|
10
10
|
export interface TeamInfoAttrAnalytics {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
2
2
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
|
-
import type { MentionProvider } from '@atlaskit/mention/
|
|
3
|
+
import type { MentionProvider } from '@atlaskit/mention/types';
|
|
4
4
|
import type { MentionsPlugin } from '../mentionsPluginType';
|
|
5
5
|
interface Props {
|
|
6
6
|
api: ExtractInjectionAPI<MentionsPlugin> | undefined;
|
|
@@ -6,8 +6,7 @@
|
|
|
6
6
|
import type { SyntheticEvent } from 'react';
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import type { WithIntlProps, WrappedComponentProps } from 'react-intl';
|
|
9
|
-
import type { UserRole } from '@atlaskit/mention';
|
|
10
|
-
import type { MentionDescription } from '@atlaskit/mention/resource';
|
|
9
|
+
import type { UserRole, MentionDescription } from '@atlaskit/mention/types';
|
|
11
10
|
/**
|
|
12
11
|
* Truncates an email-like string to fit within a max length by inserting an
|
|
13
12
|
* ellipsis into the middle of the local part (before the @).
|
|
@@ -5,8 +5,7 @@
|
|
|
5
5
|
import type { SyntheticEvent } from 'react';
|
|
6
6
|
import React from 'react';
|
|
7
7
|
import type { WithIntlProps, WrappedComponentProps } from 'react-intl';
|
|
8
|
-
import type { UserRole } from '@atlaskit/mention';
|
|
9
|
-
import type { MentionDescription } from '@atlaskit/mention/resource';
|
|
8
|
+
import type { UserRole, MentionDescription } from '@atlaskit/mention/types';
|
|
10
9
|
interface OnMentionEvent {
|
|
11
10
|
(mention: MentionDescription, event?: SyntheticEvent<any>): void;
|
|
12
11
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ProfilecardProvider } from '@atlaskit/editor-common/provider-factory';
|
|
2
|
-
import type { MentionDescription } from '@atlaskit/mention/
|
|
2
|
+
import type { MentionDescription } from '@atlaskit/mention/types';
|
|
3
3
|
type Props = {
|
|
4
4
|
height?: number;
|
|
5
5
|
mention: MentionDescription;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { AnalyticsEventPayload } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
|
|
3
3
|
import type { SelectItemMode } from '@atlaskit/editor-common/type-ahead';
|
|
4
|
-
import type { UserRole } from '@atlaskit/mention';
|
|
5
|
-
import type { MentionDescription } from '@atlaskit/mention/resource';
|
|
4
|
+
import type { UserRole, MentionDescription } from '@atlaskit/mention/types';
|
|
6
5
|
import type { TeamInfoAttrAnalytics } from '../../types';
|
|
7
6
|
export declare const MENTION_SOURCE = "mentionInEditor";
|
|
8
7
|
export declare const buildTypeAheadCancelPayload: (duration: number, upKeyCount: number, downKeyCount: number, sessionId: string, query?: string) => AnalyticsEventPayload;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ProfilecardProvider } from '@atlaskit/editor-common/provider-factory';
|
|
3
3
|
import type { ExtractInjectionAPI, TypeAheadHandler, TypeAheadItem } from '@atlaskit/editor-common/types';
|
|
4
|
-
import type { MentionDescription } from '@atlaskit/mention/
|
|
4
|
+
import type { MentionDescription } from '@atlaskit/mention/types';
|
|
5
5
|
import type { MentionsPlugin } from '../../mentionsPluginType';
|
|
6
6
|
import type { FireElementsChannelEvent, MentionChange } from '../../types';
|
|
7
7
|
export declare const mentionToTypeaheadItem: (mention: MentionDescription) => TypeAheadItem;
|
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.3",
|
|
4
4
|
"description": "Mentions plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -35,7 +35,7 @@
|
|
|
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",
|
|
@@ -47,7 +47,7 @@
|
|
|
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.8.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"
|