@atlaskit/editor-plugin-mentions 20.1.0 → 20.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/dist/cjs/nodeviews/disabledTooltipRenderer.js +1 -1
- package/dist/cjs/nodeviews/mentionNodeView.js +1 -1
- package/dist/cjs/pm-plugins/agent.js +4 -3
- package/dist/cjs/pm-plugins/main.js +3 -3
- package/dist/cjs/ui/InlineInvitePopupContainer.js +1 -1
- package/dist/cjs/ui/InviteItem/InviteItemWithEmailDomain.js +1 -1
- package/dist/cjs/ui/InviteItem/index.js +1 -1
- package/dist/cjs/ui/ProfileCardComponent.js +1 -1
- package/dist/cjs/ui/type-ahead/AgentMentionLoadErrorItem.js +1 -1
- package/dist/cjs/ui/type-ahead/MentionItemWithProfileCard.js +4 -4
- package/dist/cjs/ui/type-ahead/index.js +4 -3
- package/dist/es2019/nodeviews/disabledTooltipRenderer.js +1 -1
- package/dist/es2019/nodeviews/mentionNodeView.js +2 -2
- package/dist/es2019/pm-plugins/agent.js +2 -1
- package/dist/es2019/pm-plugins/main.js +2 -2
- package/dist/es2019/ui/InlineInvitePopupContainer.js +1 -1
- package/dist/es2019/ui/InviteItem/InviteItemWithEmailDomain.js +1 -1
- package/dist/es2019/ui/InviteItem/index.js +1 -1
- package/dist/es2019/ui/ProfileCardComponent.js +1 -1
- package/dist/es2019/ui/type-ahead/AgentMentionLoadErrorItem.js +1 -1
- package/dist/es2019/ui/type-ahead/MentionItemWithProfileCard.js +2 -2
- package/dist/es2019/ui/type-ahead/index.js +2 -1
- package/dist/esm/nodeviews/disabledTooltipRenderer.js +1 -1
- package/dist/esm/nodeviews/mentionNodeView.js +2 -2
- package/dist/esm/pm-plugins/agent.js +2 -1
- package/dist/esm/pm-plugins/main.js +2 -2
- package/dist/esm/ui/InlineInvitePopupContainer.js +1 -1
- package/dist/esm/ui/InviteItem/InviteItemWithEmailDomain.js +1 -1
- package/dist/esm/ui/InviteItem/index.js +1 -1
- package/dist/esm/ui/ProfileCardComponent.js +1 -1
- package/dist/esm/ui/type-ahead/AgentMentionLoadErrorItem.js +1 -1
- package/dist/esm/ui/type-ahead/MentionItemWithProfileCard.js +2 -2
- package/dist/esm/ui/type-ahead/index.js +2 -1
- 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,20 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-mentions
|
|
2
2
|
|
|
3
|
+
## 20.1.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`b827702a00ecc`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b827702a00ecc) -
|
|
8
|
+
Correct the direct Mention default import and consolidate mention type imports after consumer
|
|
9
|
+
migration.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 20.1.1
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 20.1.0
|
|
4
19
|
|
|
5
20
|
### Minor Changes
|
|
@@ -117,7 +117,7 @@ var toDOM = function toDOM(node, hasAvatarSlot) {
|
|
|
117
117
|
}, _whitespace.ZERO_WIDTH_SPACE]];
|
|
118
118
|
};
|
|
119
119
|
var processName = function processName(name) {
|
|
120
|
-
return name.status ===
|
|
120
|
+
return name.status === _types.MentionNameStatus.OK ? "@".concat(name.name || '') : unknownMentionText;
|
|
121
121
|
};
|
|
122
122
|
var handleProviderName = /*#__PURE__*/function () {
|
|
123
123
|
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(mentionProvider, node, isAgentMentionsEnabled) {
|
|
@@ -10,6 +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 _view = require("@atlaskit/editor-prosemirror/view");
|
|
13
|
+
var _types = require("@atlaskit/mention/types");
|
|
13
14
|
var _resource = require("@atlaskit/mention/resource");
|
|
14
15
|
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
15
16
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
@@ -239,7 +240,7 @@ var resolveCachedAgentMentionName = function resolveCachedAgentMentionName(menti
|
|
|
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,
|
|
@@ -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.
|
|
46
|
+
var PACKAGE_VERSION = "20.1.1";
|
|
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,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* MentionItemWithProfileCard.tsx generated by @compiled/babel-plugin v3.0.
|
|
1
|
+
/* MentionItemWithProfileCard.tsx generated by @compiled/babel-plugin v3.0.2 */
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
@@ -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,
|
|
@@ -17,7 +17,8 @@ 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
|
|
20
|
+
var _styles = require("@atlaskit/mention/mention-item/styles");
|
|
21
|
+
var _mentionItem = _interopRequireDefault(require("@atlaskit/mention/mention-item"));
|
|
21
22
|
var _resource = require("@atlaskit/mention/resource");
|
|
22
23
|
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
23
24
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
@@ -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,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* disabledTooltipRenderer.tsx generated by @compiled/babel-plugin v3.0.
|
|
1
|
+
/* disabledTooltipRenderer.tsx generated by @compiled/babel-plugin v3.0.2 */
|
|
2
2
|
import "./disabledTooltipRenderer.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React, { useEffect, useState } from 'react';
|
|
@@ -7,8 +7,8 @@ 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/types';
|
|
10
|
+
import { isResolvingMentionProvider } from '@atlaskit/mention/resource';
|
|
11
|
+
import { MentionNameStatus, isRestricted } from '@atlaskit/mention/types';
|
|
12
12
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
13
13
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
14
14
|
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/resource';
|
|
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.
|
|
35
|
+
const PACKAGE_VERSION = "20.1.1";
|
|
36
36
|
const setProvider = provider => (state, dispatch) => {
|
|
37
37
|
if (dispatch) {
|
|
38
38
|
dispatch(state.tr.setMeta(mentionPluginKey, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* InlineInvitePopupContainer.tsx generated by @compiled/babel-plugin v3.0.
|
|
1
|
+
/* InlineInvitePopupContainer.tsx generated by @compiled/babel-plugin v3.0.2 */
|
|
2
2
|
import { ax, ix } from "@compiled/react/runtime";
|
|
3
3
|
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
4
4
|
const findMentionRange = (doc, localId) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* InviteItemWithEmailDomain.tsx generated by @compiled/babel-plugin v3.0.
|
|
1
|
+
/* InviteItemWithEmailDomain.tsx generated by @compiled/babel-plugin v3.0.2 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import "./InviteItemWithEmailDomain.compiled.css";
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* ProfileCardComponent.tsx generated by @compiled/babel-plugin v3.0.
|
|
1
|
+
/* ProfileCardComponent.tsx generated by @compiled/babel-plugin v3.0.2 */
|
|
2
2
|
import "./ProfileCardComponent.compiled.css";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* AgentMentionLoadErrorItem.tsx generated by @compiled/babel-plugin v3.0.
|
|
1
|
+
/* AgentMentionLoadErrorItem.tsx generated by @compiled/babel-plugin v3.0.2 */
|
|
2
2
|
import "./AgentMentionLoadErrorItem.compiled.css";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/* MentionItemWithProfileCard.tsx generated by @compiled/babel-plugin v3.0.
|
|
1
|
+
/* MentionItemWithProfileCard.tsx generated by @compiled/babel-plugin v3.0.2 */
|
|
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';
|
|
@@ -7,7 +7,8 @@ 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
|
|
10
|
+
import { MENTION_ITEM_HEIGHT, MENTION_ITEM_HEIGHT_REFRESHED } from '@atlaskit/mention/mention-item/styles';
|
|
11
|
+
import MentionItem from '@atlaskit/mention/mention-item';
|
|
11
12
|
import { isResolvingMentionProvider } from '@atlaskit/mention/resource';
|
|
12
13
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
13
14
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* disabledTooltipRenderer.tsx generated by @compiled/babel-plugin v3.0.
|
|
1
|
+
/* disabledTooltipRenderer.tsx generated by @compiled/babel-plugin v3.0.2 */
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
3
|
import "./disabledTooltipRenderer.compiled.css";
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
@@ -13,8 +13,8 @@ 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/types';
|
|
16
|
+
import { isResolvingMentionProvider } from '@atlaskit/mention/resource';
|
|
17
|
+
import { MentionNameStatus, isRestricted } from '@atlaskit/mention/types';
|
|
18
18
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
19
19
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
20
20
|
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/resource';
|
|
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.
|
|
38
|
+
var PACKAGE_VERSION = "20.1.1";
|
|
39
39
|
var setProvider = function setProvider(provider) {
|
|
40
40
|
return function (state, dispatch) {
|
|
41
41
|
if (dispatch) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* InlineInvitePopupContainer.tsx generated by @compiled/babel-plugin v3.0.
|
|
1
|
+
/* InlineInvitePopupContainer.tsx generated by @compiled/babel-plugin v3.0.2 */
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* InviteItemWithEmailDomain.tsx generated by @compiled/babel-plugin v3.0.
|
|
1
|
+
/* InviteItemWithEmailDomain.tsx generated by @compiled/babel-plugin v3.0.2 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
4
|
import "./InviteItemWithEmailDomain.compiled.css";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* ProfileCardComponent.tsx generated by @compiled/babel-plugin v3.0.
|
|
1
|
+
/* ProfileCardComponent.tsx generated by @compiled/babel-plugin v3.0.2 */
|
|
2
2
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
4
|
import "./ProfileCardComponent.compiled.css";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* AgentMentionLoadErrorItem.tsx generated by @compiled/babel-plugin v3.0.
|
|
1
|
+
/* AgentMentionLoadErrorItem.tsx generated by @compiled/babel-plugin v3.0.2 */
|
|
2
2
|
import "./AgentMentionLoadErrorItem.compiled.css";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/* MentionItemWithProfileCard.tsx generated by @compiled/babel-plugin v3.0.
|
|
1
|
+
/* MentionItemWithProfileCard.tsx generated by @compiled/babel-plugin v3.0.2 */
|
|
2
2
|
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';
|
|
@@ -14,7 +14,8 @@ 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
|
|
17
|
+
import { MENTION_ITEM_HEIGHT, MENTION_ITEM_HEIGHT_REFRESHED } from '@atlaskit/mention/mention-item/styles';
|
|
18
|
+
import MentionItem from '@atlaskit/mention/mention-item';
|
|
18
19
|
import { isResolvingMentionProvider } from '@atlaskit/mention/resource';
|
|
19
20
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
20
21
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
@@ -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.2",
|
|
4
4
|
"description": "Mentions plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -47,8 +47,8 @@
|
|
|
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": "^
|
|
51
|
-
"@atlaskit/tokens": "^
|
|
50
|
+
"@atlaskit/tmp-editor-statsig": "^196.0.0",
|
|
51
|
+
"@atlaskit/tokens": "^17.0.0",
|
|
52
52
|
"@atlaskit/tooltip": "^24.3.0",
|
|
53
53
|
"@atlaskit/user-picker": "^13.13.0",
|
|
54
54
|
"@babel/runtime": "^7.0.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.7.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"
|