@atlaskit/editor-plugin-mentions 28.1.2 → 28.1.5
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 +10 -9
- package/dist/cjs/nodeviews/mentionNodeSpec.js +2 -2
- package/dist/cjs/nodeviews/mentionNodeView.js +3 -3
- package/dist/cjs/pm-plugins/main.js +16 -16
- package/dist/cjs/ui/InviteItem/InviteItemWithEmailDomain.js +4 -4
- package/dist/cjs/ui/InviteItem/index.js +3 -3
- package/dist/cjs/ui/SecondaryToolbarComponent.js +4 -4
- package/dist/cjs/ui/ToolbarMention/index.js +6 -5
- package/dist/cjs/ui/quick-insert/MentionQuickInsertMenuItem.js +7 -7
- package/dist/cjs/ui/quick-insert/getMentionQuickInsertComponents.js +3 -3
- package/dist/cjs/ui/type-ahead/AgentMentionLoadErrorItem.js +3 -3
- package/dist/cjs/ui/type-ahead/analytics.js +16 -16
- package/dist/cjs/ui/type-ahead/index.js +4 -4
- package/dist/es2019/editor-commands/index.js +1 -1
- package/dist/es2019/mentionsPlugin.js +4 -3
- package/dist/es2019/nodeviews/mentionNodeSpec.js +1 -1
- package/dist/es2019/nodeviews/mentionNodeView.js +2 -2
- package/dist/es2019/pm-plugins/main.js +3 -3
- package/dist/es2019/ui/InviteItem/InviteItemWithEmailDomain.js +1 -1
- package/dist/es2019/ui/InviteItem/index.js +1 -1
- package/dist/es2019/ui/SecondaryToolbarComponent.js +2 -2
- package/dist/es2019/ui/ToolbarMention/index.js +3 -2
- package/dist/es2019/ui/quick-insert/MentionQuickInsertMenuItem.js +2 -2
- package/dist/es2019/ui/quick-insert/getMentionQuickInsertComponents.js +1 -1
- package/dist/es2019/ui/type-ahead/AgentMentionLoadErrorItem.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 +4 -3
- package/dist/esm/nodeviews/mentionNodeSpec.js +1 -1
- package/dist/esm/nodeviews/mentionNodeView.js +2 -2
- package/dist/esm/pm-plugins/main.js +3 -3
- package/dist/esm/ui/InviteItem/InviteItemWithEmailDomain.js +1 -1
- package/dist/esm/ui/InviteItem/index.js +1 -1
- package/dist/esm/ui/SecondaryToolbarComponent.js +2 -2
- package/dist/esm/ui/ToolbarMention/index.js +3 -2
- package/dist/esm/ui/quick-insert/MentionQuickInsertMenuItem.js +2 -2
- package/dist/esm/ui/quick-insert/getMentionQuickInsertComponents.js +1 -1
- package/dist/esm/ui/type-ahead/AgentMentionLoadErrorItem.js +1 -1
- package/dist/esm/ui/type-ahead/analytics.js +1 -1
- package/dist/esm/ui/type-ahead/index.js +1 -1
- package/dist/types/editor-commands/index.d.ts +2 -1
- package/dist/types/mentionsPluginType.d.ts +8 -6
- package/dist/types/nodeviews/disabledTooltipRenderer.d.ts +1 -1
- package/dist/types/nodeviews/mentionNodeView.d.ts +2 -2
- package/dist/types/nodeviews/profileCardRenderer.d.ts +2 -2
- package/dist/types/pm-plugins/agent.d.ts +1 -1
- package/dist/types/pm-plugins/main.d.ts +2 -1
- package/dist/types/types/index.d.ts +4 -3
- package/dist/types/ui/InlineInvitePopupContainer.d.ts +1 -1
- package/dist/types/ui/ProfileCardComponent.d.ts +1 -1
- package/dist/types/ui/SecondaryToolbarComponent.d.ts +2 -1
- package/dist/types/ui/quick-insert/MentionQuickInsertMenuItem.d.ts +2 -2
- package/dist/types/ui/quick-insert/getMentionQuickInsertComponents.d.ts +2 -2
- package/dist/types/ui/type-ahead/MentionItemWithProfileCard.d.ts +1 -1
- package/dist/types/ui/type-ahead/analytics.d.ts +2 -2
- package/dist/types/ui/type-ahead/index.d.ts +3 -2
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-mentions
|
|
2
2
|
|
|
3
|
+
## 28.1.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 28.1.4
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
15
|
+
## 28.1.3
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 28.1.2
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.insertMention = exports.createSingleMentionFragment = void 0;
|
|
7
7
|
var _uuid = require("uuid");
|
|
8
|
-
var
|
|
8
|
+
var _annotation = require("@atlaskit/editor-common/utils/annotation");
|
|
9
9
|
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
10
10
|
var _isResolvingMentionProvider = require("@atlaskit/mention/is-resolving-mention-provider");
|
|
11
11
|
var _expVal = require("@atlaskit/tmp-editor-statsig/expVal");
|
|
@@ -41,7 +41,7 @@ var createSingleMentionFragment = exports.createSingleMentionFragment = function
|
|
|
41
41
|
// Cache (locally) for later rendering
|
|
42
42
|
mentionProvider.cacheMentionName(id, renderName);
|
|
43
43
|
}
|
|
44
|
-
var annotationMarksForPos = (0,
|
|
44
|
+
var annotationMarksForPos = (0, _annotation.getAnnotationMarksForPos)(tr.selection.$head);
|
|
45
45
|
var mentionNode = schema.nodes.mention.createChecked({
|
|
46
46
|
text: text,
|
|
47
47
|
id: id,
|
|
@@ -13,10 +13,11 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
|
|
|
13
13
|
var _react = _interopRequireWildcard(require("react"));
|
|
14
14
|
var _reactIntl = require("react-intl");
|
|
15
15
|
var _uuid = require("uuid");
|
|
16
|
-
var
|
|
16
|
+
var _enums = require("@atlaskit/editor-common/analytics/types/enums");
|
|
17
17
|
var _assets = require("@atlaskit/editor-common/assets");
|
|
18
|
-
var
|
|
19
|
-
var
|
|
18
|
+
var _insertBlock = require("@atlaskit/editor-common/messages/insert-block");
|
|
19
|
+
var _mentions = require("@atlaskit/editor-common/messages/mentions");
|
|
20
|
+
var _withProviders = require("@atlaskit/editor-common/provider-factory/with-providers");
|
|
20
21
|
var _isPromise = require("@atlaskit/mention/is-promise");
|
|
21
22
|
var _isResolvingMentionProvider = require("@atlaskit/mention/is-resolving-mention-provider");
|
|
22
23
|
var _types = require("@atlaskit/mention/types");
|
|
@@ -38,7 +39,7 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
38
39
|
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; }
|
|
39
40
|
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; }
|
|
40
41
|
var processName = function processName(name, intl) {
|
|
41
|
-
var unknownLabel = intl.formatMessage(
|
|
42
|
+
var unknownLabel = intl.formatMessage(_mentions.mentionMessages.unknownLabel);
|
|
42
43
|
if (name.status === _types.MentionNameStatus.OK) {
|
|
43
44
|
return "@".concat(name.name || unknownLabel);
|
|
44
45
|
} else {
|
|
@@ -75,7 +76,7 @@ function Component(_ref) {
|
|
|
75
76
|
var nameDetail = mentionProviderSync === null || mentionProviderSync === void 0 ? void 0 : mentionProviderSync.resolveMentionName(id);
|
|
76
77
|
var newText;
|
|
77
78
|
if ((0, _isPromise.isPromise)(nameDetail)) {
|
|
78
|
-
newText = "@".concat(intl.formatMessage(
|
|
79
|
+
newText = "@".concat(intl.formatMessage(_mentions.mentionMessages.unknownLabel));
|
|
79
80
|
} else {
|
|
80
81
|
newText = processName(nameDetail, intl);
|
|
81
82
|
}
|
|
@@ -169,7 +170,7 @@ var mentionsPlugin = exports.mentionsPlugin = function mentionsPlugin(_ref3) {
|
|
|
169
170
|
if (!editorView) {
|
|
170
171
|
return null;
|
|
171
172
|
}
|
|
172
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
173
|
+
return /*#__PURE__*/_react.default.createElement(_withProviders.WithProviders
|
|
173
174
|
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
174
175
|
, {
|
|
175
176
|
providers: ['mentionProvider'],
|
|
@@ -319,8 +320,8 @@ var mentionsPlugin = exports.mentionsPlugin = function mentionsPlugin(_ref3) {
|
|
|
319
320
|
var formatMessage = _ref0.formatMessage;
|
|
320
321
|
return [{
|
|
321
322
|
id: 'mention',
|
|
322
|
-
title: formatMessage(
|
|
323
|
-
description: formatMessage(
|
|
323
|
+
title: formatMessage(_insertBlock.toolbarInsertBlockMessages.mention),
|
|
324
|
+
description: formatMessage(_insertBlock.toolbarInsertBlockMessages.mentionDescription),
|
|
324
325
|
keywords: ['team', 'user'],
|
|
325
326
|
priority: 400,
|
|
326
327
|
keyshortcut: '@',
|
|
@@ -340,7 +341,7 @@ var mentionsPlugin = exports.mentionsPlugin = function mentionsPlugin(_ref3) {
|
|
|
340
341
|
var tr = insert(undefined);
|
|
341
342
|
var didOpen = api === null || api === void 0 || (_api$typeAhead3 = api.typeAhead) === null || _api$typeAhead3 === void 0 ? void 0 : _api$typeAhead3.actions.openAtTransaction({
|
|
342
343
|
triggerHandler: typeAhead,
|
|
343
|
-
inputMethod:
|
|
344
|
+
inputMethod: _enums.INPUT_METHOD.QUICK_INSERT
|
|
344
345
|
})(tr);
|
|
345
346
|
if (didOpen === false) {
|
|
346
347
|
return false;
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.mentionNodeSpec = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _mention = require("@atlaskit/adf-schema/mention");
|
|
10
|
-
var
|
|
10
|
+
var _cssHelper = require("@atlaskit/editor-common/css-helper");
|
|
11
11
|
var _expVal = require("@atlaskit/tmp-editor-statsig/expVal");
|
|
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; }
|
|
@@ -35,7 +35,7 @@ var mentionNodeSpec = exports.mentionNodeSpec = function mentionNodeSpec() {
|
|
|
35
35
|
'data-prosemirror-node-inline': 'true',
|
|
36
36
|
'data-prosemirror-node-name': 'mention',
|
|
37
37
|
'data-user-type': (0, _expVal.expVal)('platform_editor_agent_mentions', 'isEnabled', false) && node.attrs.userType ? node.attrs.userType : undefined,
|
|
38
|
-
style: (0,
|
|
38
|
+
style: (0, _cssHelper.convertToInlineCss)({
|
|
39
39
|
display: 'inline',
|
|
40
40
|
border: "1px solid transparent",
|
|
41
41
|
background: "var(--ds-background-neutral, #0515240F)",
|
|
@@ -12,9 +12,9 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
|
|
|
12
12
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
13
13
|
var _bindEventListener = require("bind-event-listener");
|
|
14
14
|
var _browser = require("@atlaskit/editor-common/browser");
|
|
15
|
-
var
|
|
15
|
+
var _isSsr = require("@atlaskit/editor-common/is-ssr");
|
|
16
16
|
var _vanillaTooltip = require("@atlaskit/editor-common/vanilla-tooltip");
|
|
17
|
-
var _whitespace = require("@atlaskit/editor-common/whitespace");
|
|
17
|
+
var _whitespace = require("@atlaskit/editor-common/whitespace/whitespace");
|
|
18
18
|
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
19
19
|
var _constants = require("@atlaskit/mention/constants");
|
|
20
20
|
var _isResolvingMentionProvider = require("@atlaskit/mention/is-resolving-mention-provider");
|
|
@@ -465,7 +465,7 @@ var MentionNodeView = exports.MentionNodeView = /*#__PURE__*/function () {
|
|
|
465
465
|
(_this$vanillaDisabled = this.vanillaDisabledTooltip) === null || _this$vanillaDisabled === void 0 || _this$vanillaDisabled.destroy();
|
|
466
466
|
this.vanillaDisabledTooltip = undefined;
|
|
467
467
|
this.vanillaDisabledTooltipText = tooltipText;
|
|
468
|
-
if ((0,
|
|
468
|
+
if ((0, _isSsr.isSSR)() || !tooltipText) {
|
|
469
469
|
return;
|
|
470
470
|
}
|
|
471
471
|
this.vanillaDisabledTooltip = new _vanillaTooltip.VanillaTooltip(trigger, tooltipText, undefined, disabledTooltipClassNames);
|
|
@@ -7,10 +7,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.ACTIONS = void 0;
|
|
8
8
|
exports.createMentionPlugin = createMentionPlugin;
|
|
9
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
|
-
var
|
|
10
|
+
var _enums = require("@atlaskit/editor-common/analytics/types/enums");
|
|
11
11
|
var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
12
|
-
var
|
|
13
|
-
var
|
|
12
|
+
var _api = require("@atlaskit/insm/api");
|
|
13
|
+
var _analytics = require("@atlaskit/mention/analytics");
|
|
14
14
|
var _types = require("@atlaskit/mention/types");
|
|
15
15
|
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
16
16
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
@@ -45,7 +45,7 @@ var ACTIONS = exports.ACTIONS = {
|
|
|
45
45
|
CLEAR_PENDING_PASTED_AGENT_MENTION: 'CLEAR_PENDING_PASTED_AGENT_MENTION'
|
|
46
46
|
};
|
|
47
47
|
var PACKAGE_NAME = "@atlaskit/editor-plugin-mentions";
|
|
48
|
-
var PACKAGE_VERSION = "28.1.
|
|
48
|
+
var PACKAGE_VERSION = "28.1.4";
|
|
49
49
|
var setProvider = function setProvider(provider) {
|
|
50
50
|
return function (state, dispatch) {
|
|
51
51
|
if (dispatch) {
|
|
@@ -69,11 +69,11 @@ function createMentionPlugin(_ref) {
|
|
|
69
69
|
return (0, _isMentionTypeAheadEnabled.isMentionTypeAheadEnabled)(options === null || options === void 0 ? void 0 : options.canOpenTypeAhead) && (0, _utils.canMentionBeCreatedInRange)(state.selection.from, state.selection.to)(state);
|
|
70
70
|
};
|
|
71
71
|
var sendAnalytics = function sendAnalytics(event, actionSubject, action, attributes) {
|
|
72
|
-
if (event ===
|
|
72
|
+
if (event === _analytics.SLI_EVENT_TYPE || event === _analytics.SMART_EVENT_TYPE) {
|
|
73
73
|
fireEvent({
|
|
74
74
|
action: action,
|
|
75
75
|
actionSubject: actionSubject,
|
|
76
|
-
eventType:
|
|
76
|
+
eventType: _enums.EVENT_TYPE.OPERATIONAL,
|
|
77
77
|
attributes: _objectSpread({
|
|
78
78
|
packageName: PACKAGE_NAME,
|
|
79
79
|
packageVersion: PACKAGE_VERSION,
|
|
@@ -121,7 +121,7 @@ function createMentionPlugin(_ref) {
|
|
|
121
121
|
}
|
|
122
122
|
if (options !== null && options !== void 0 && options.handleMentionsChanged && tr.docChanged) {
|
|
123
123
|
var _insm$session, _insm$session2;
|
|
124
|
-
(_insm$session =
|
|
124
|
+
(_insm$session = _api.insm.session) === null || _insm$session === void 0 || _insm$session.startFeature('mentionDeletionDetection');
|
|
125
125
|
var mentionSchema = newState.schema.nodes.mention;
|
|
126
126
|
var mentionsRemoved = new Map();
|
|
127
127
|
tr.steps.forEach(function (step, index) {
|
|
@@ -176,7 +176,7 @@ function createMentionPlugin(_ref) {
|
|
|
176
176
|
});
|
|
177
177
|
options.handleMentionsChanged(changes);
|
|
178
178
|
}
|
|
179
|
-
(_insm$session2 =
|
|
179
|
+
(_insm$session2 = _api.insm.session) === null || _insm$session2 === void 0 || _insm$session2.endFeature('mentionDeletionDetection');
|
|
180
180
|
}
|
|
181
181
|
return newPluginState;
|
|
182
182
|
}
|
|
@@ -203,10 +203,10 @@ function createMentionPlugin(_ref) {
|
|
|
203
203
|
currentProviderPromise = providerPromise;
|
|
204
204
|
if (!providerPromise) {
|
|
205
205
|
fireEvent({
|
|
206
|
-
action:
|
|
207
|
-
actionSubject:
|
|
208
|
-
actionSubjectId:
|
|
209
|
-
eventType:
|
|
206
|
+
action: _enums.ACTION.ERRORED,
|
|
207
|
+
actionSubject: _enums.ACTION_SUBJECT.MENTION,
|
|
208
|
+
actionSubjectId: _enums.ACTION_SUBJECT_ID.MENTION_PROVIDER,
|
|
209
|
+
eventType: _enums.EVENT_TYPE.OPERATIONAL,
|
|
210
210
|
attributes: {
|
|
211
211
|
reason: _types2.MENTION_PROVIDER_UNDEFINED
|
|
212
212
|
}
|
|
@@ -228,10 +228,10 @@ function createMentionPlugin(_ref) {
|
|
|
228
228
|
return;
|
|
229
229
|
}
|
|
230
230
|
fireEvent({
|
|
231
|
-
action:
|
|
232
|
-
actionSubject:
|
|
233
|
-
actionSubjectId:
|
|
234
|
-
eventType:
|
|
231
|
+
action: _enums.ACTION.ERRORED,
|
|
232
|
+
actionSubject: _enums.ACTION_SUBJECT.MENTION,
|
|
233
|
+
actionSubjectId: _enums.ACTION_SUBJECT_ID.MENTION_PROVIDER,
|
|
234
|
+
eventType: _enums.EVENT_TYPE.OPERATIONAL,
|
|
235
235
|
attributes: {
|
|
236
236
|
reason: _types2.MENTION_PROVIDER_REJECTED
|
|
237
237
|
}
|
|
@@ -13,7 +13,7 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
13
13
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
14
14
|
var _react = _interopRequireWildcard(require("react"));
|
|
15
15
|
var _reactIntl = require("react-intl");
|
|
16
|
-
var
|
|
16
|
+
var _mentions = require("@atlaskit/editor-common/messages/mentions");
|
|
17
17
|
var _email = _interopRequireDefault(require("@atlaskit/icon/core/email"));
|
|
18
18
|
var _statusError = _interopRequireDefault(require("@atlaskit/icon/core/status-error"));
|
|
19
19
|
var _emailValidation = require("@atlaskit/user-picker/components/email-validation");
|
|
@@ -135,13 +135,13 @@ var InviteItemWithEmailDomain = function InviteItemWithEmailDomain(_ref2) {
|
|
|
135
135
|
var isEmailValid = getIsEmailValid(query);
|
|
136
136
|
var getByline = function getByline() {
|
|
137
137
|
if (showErrorIcon) {
|
|
138
|
-
return intl.formatMessage(
|
|
138
|
+
return intl.formatMessage(_mentions.mentionMessages.inviteTeammateInvalidEmail);
|
|
139
139
|
}
|
|
140
140
|
if (userRole === 'admin') {
|
|
141
141
|
return /*#__PURE__*/_react.default.createElement(_reactIntl.FormattedMessage
|
|
142
142
|
// Ignored via go/ees005
|
|
143
143
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
144
|
-
, (0, _extends2.default)({},
|
|
144
|
+
, (0, _extends2.default)({}, _mentions.mentionMessages.inviteItemTitle, {
|
|
145
145
|
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
146
146
|
values: {
|
|
147
147
|
userRole: userRole || 'basic',
|
|
@@ -152,7 +152,7 @@ var InviteItemWithEmailDomain = function InviteItemWithEmailDomain(_ref2) {
|
|
|
152
152
|
}
|
|
153
153
|
}));
|
|
154
154
|
}
|
|
155
|
-
return intl.formatMessage(
|
|
155
|
+
return intl.formatMessage(_mentions.mentionMessages.sendInvite);
|
|
156
156
|
};
|
|
157
157
|
var onSelected = (0, _react.useCallback)(
|
|
158
158
|
// Ignored via go/ees005
|
|
@@ -12,7 +12,7 @@ var _runtime = require("@compiled/react/runtime");
|
|
|
12
12
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
13
|
var _react = _interopRequireWildcard(require("react"));
|
|
14
14
|
var _reactIntl = require("react-intl");
|
|
15
|
-
var
|
|
15
|
+
var _mentions = require("@atlaskit/editor-common/messages/mentions");
|
|
16
16
|
var _add = _interopRequireDefault(require("@atlaskit/icon/core/add"));
|
|
17
17
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
18
18
|
var mentionItemStyle = null;
|
|
@@ -93,7 +93,7 @@ var InviteItem = function InviteItem(_ref) {
|
|
|
93
93
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
94
94
|
className: (0, _runtime.ax)(["_16jlidpf _1o9zkb7n _i0dl1wug _1e0c1txw _4cvr1h6o _1bah1h6o _kqswh2mm _1bsb14no _4t3i14no"])
|
|
95
95
|
}, /*#__PURE__*/_react.default.createElement(_add.default, {
|
|
96
|
-
label: intl.formatMessage(
|
|
96
|
+
label: intl.formatMessage(_mentions.mentionMessages.mentionsAddLabel),
|
|
97
97
|
color: "var(--ds-icon-subtle, #505258)"
|
|
98
98
|
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
99
99
|
"data-testid": "name-section",
|
|
@@ -101,7 +101,7 @@ var InviteItem = function InviteItem(_ref) {
|
|
|
101
101
|
}, /*#__PURE__*/_react.default.createElement(_reactIntl.FormattedMessage
|
|
102
102
|
// Ignored via go/ees005
|
|
103
103
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
104
|
-
, (0, _extends2.default)({},
|
|
104
|
+
, (0, _extends2.default)({}, _mentions.mentionMessages.inviteItemTitle, {
|
|
105
105
|
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
106
106
|
values: {
|
|
107
107
|
userRole: userRole || 'basic',
|
|
@@ -7,8 +7,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.SecondaryToolbarComponent = SecondaryToolbarComponent;
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
-
var
|
|
11
|
-
var
|
|
10
|
+
var _enums = require("@atlaskit/editor-common/analytics/types/enums");
|
|
11
|
+
var _useSharedPluginStateWithSelector = require("@atlaskit/editor-common/useSharedPluginStateWithSelector");
|
|
12
12
|
var _ToolbarMention = _interopRequireDefault(require("./ToolbarMention"));
|
|
13
13
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
14
14
|
var selector = function selector(states) {
|
|
@@ -23,13 +23,13 @@ function SecondaryToolbarComponent(_ref) {
|
|
|
23
23
|
api = _ref.api,
|
|
24
24
|
typeAhead = _ref.typeAhead,
|
|
25
25
|
disabled = _ref.disabled;
|
|
26
|
-
var _useSharedPluginState = (0,
|
|
26
|
+
var _useSharedPluginState = (0, _useSharedPluginStateWithSelector.useSharedPluginStateWithSelector)(api, ['mention'], selector),
|
|
27
27
|
mentionProvider = _useSharedPluginState.mentionProvider;
|
|
28
28
|
var openMentionTypeAhead = (0, _react.useCallback)(function () {
|
|
29
29
|
var _api$typeAhead;
|
|
30
30
|
api === null || api === void 0 || (_api$typeAhead = api.typeAhead) === null || _api$typeAhead === void 0 || (_api$typeAhead = _api$typeAhead.actions) === null || _api$typeAhead === void 0 || _api$typeAhead.open({
|
|
31
31
|
triggerHandler: typeAhead,
|
|
32
|
-
inputMethod:
|
|
32
|
+
inputMethod: _enums.INPUT_METHOD.INSERT_MENU
|
|
33
33
|
});
|
|
34
34
|
}, [api, typeAhead]);
|
|
35
35
|
return !mentionProvider ? null : /*#__PURE__*/_react.default.createElement(_ToolbarMention.default, {
|
|
@@ -14,8 +14,9 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
|
|
|
14
14
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
15
15
|
var _react = _interopRequireWildcard(require("react"));
|
|
16
16
|
var _reactIntl = require("react-intl");
|
|
17
|
-
var
|
|
18
|
-
var
|
|
17
|
+
var _toolbarButton = require("@atlaskit/editor-common/analytics/types/toolbar-button");
|
|
18
|
+
var _mentions = require("@atlaskit/editor-common/messages/mentions");
|
|
19
|
+
var _ToolbarButton = _interopRequireDefault(require("@atlaskit/editor-common/ui-menu/ToolbarButton"));
|
|
19
20
|
var _mention = _interopRequireDefault(require("@atlaskit/icon/core/mention"));
|
|
20
21
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
21
22
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
@@ -43,10 +44,10 @@ var ToolbarMention = /*#__PURE__*/function (_PureComponent) {
|
|
|
43
44
|
return (0, _createClass2.default)(ToolbarMention, [{
|
|
44
45
|
key: "render",
|
|
45
46
|
value: function render() {
|
|
46
|
-
var mentionStringTranslated = this.props.intl.formatMessage(
|
|
47
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
47
|
+
var mentionStringTranslated = this.props.intl.formatMessage(_mentions.mentionMessages.mentionsIconLabel);
|
|
48
|
+
return /*#__PURE__*/_react.default.createElement(_ToolbarButton.default, {
|
|
48
49
|
testId: this.props.testId,
|
|
49
|
-
buttonId:
|
|
50
|
+
buttonId: _toolbarButton.TOOLBAR_ACTION_SUBJECT_ID.MENTION,
|
|
50
51
|
spacing: "none",
|
|
51
52
|
onClick: this.handleInsertMention,
|
|
52
53
|
disabled: this.props.isDisabled,
|
|
@@ -8,10 +8,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.MentionQuickInsertMenuItem = void 0;
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _reactIntl = require("react-intl");
|
|
11
|
-
var
|
|
12
|
-
var
|
|
11
|
+
var _enums = require("@atlaskit/editor-common/analytics/types/enums");
|
|
12
|
+
var _insertBlock = require("@atlaskit/editor-common/messages/insert-block");
|
|
13
13
|
var _menuItem = require("@atlaskit/editor-common/quick-insert/menu-item");
|
|
14
|
-
var
|
|
14
|
+
var _messages = require("@atlaskit/editor-common/quick-insert/messages");
|
|
15
15
|
var _mention = _interopRequireDefault(require("@atlaskit/icon/core/mention"));
|
|
16
16
|
var _key = require("../../pm-plugins/key");
|
|
17
17
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
@@ -25,7 +25,7 @@ var MentionQuickInsertMenuItem = exports.MentionQuickInsertMenuItem = function M
|
|
|
25
25
|
return previewImageUrls ? {
|
|
26
26
|
image: previewImageUrls,
|
|
27
27
|
attribution: {
|
|
28
|
-
name: formatMessage(
|
|
28
|
+
name: formatMessage(_messages.messages.previewAttributionAtlassian)
|
|
29
29
|
}
|
|
30
30
|
} : undefined;
|
|
31
31
|
}, [formatMessage, previewImageUrls]);
|
|
@@ -39,7 +39,7 @@ var MentionQuickInsertMenuItem = exports.MentionQuickInsertMenuItem = function M
|
|
|
39
39
|
var tr = insert(undefined);
|
|
40
40
|
var didOpen = api === null || api === void 0 || (_api$typeAhead = api.typeAhead) === null || _api$typeAhead === void 0 ? void 0 : _api$typeAhead.actions.openAtTransaction({
|
|
41
41
|
triggerHandler: typeAhead,
|
|
42
|
-
inputMethod:
|
|
42
|
+
inputMethod: _enums.INPUT_METHOD.QUICK_INSERT
|
|
43
43
|
})(tr);
|
|
44
44
|
if (didOpen === false) {
|
|
45
45
|
return false;
|
|
@@ -47,13 +47,13 @@ var MentionQuickInsertMenuItem = exports.MentionQuickInsertMenuItem = function M
|
|
|
47
47
|
return tr;
|
|
48
48
|
}, [api, typeAhead]);
|
|
49
49
|
return /*#__PURE__*/_react.default.createElement(_menuItem.QuickInsertMenuItem, {
|
|
50
|
-
description: formatMessage(
|
|
50
|
+
description: formatMessage(_insertBlock.toolbarInsertBlockMessages.mentionDescription),
|
|
51
51
|
iconBefore: /*#__PURE__*/_react.default.createElement(_mention.default, {
|
|
52
52
|
label: ""
|
|
53
53
|
}),
|
|
54
54
|
onSelect: onSelect,
|
|
55
55
|
preview: preview,
|
|
56
56
|
shortcut: "@",
|
|
57
|
-
title: formatMessage(
|
|
57
|
+
title: formatMessage(_insertBlock.toolbarInsertBlockMessages.mention)
|
|
58
58
|
});
|
|
59
59
|
};
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.getMentionQuickInsertComponents = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var
|
|
9
|
+
var _insertBlock = require("@atlaskit/editor-common/messages/insert-block");
|
|
10
10
|
var _createQuickInsertMatcher = require("@atlaskit/editor-common/quick-insert/create-quick-insert-matcher");
|
|
11
11
|
var _keys = require("@atlaskit/editor-common/quick-insert/keys");
|
|
12
12
|
var _rank = require("@atlaskit/editor-common/quick-insert/rank");
|
|
@@ -34,10 +34,10 @@ var getMentionQuickInsertComponents = exports.getMentionQuickInsertComponents =
|
|
|
34
34
|
match: (0, _createQuickInsertMatcher.createQuickInsertMatcher)(function (_ref2) {
|
|
35
35
|
var formatMessage = _ref2.formatMessage;
|
|
36
36
|
return {
|
|
37
|
-
description: formatMessage(
|
|
37
|
+
description: formatMessage(_insertBlock.toolbarInsertBlockMessages.mentionDescription),
|
|
38
38
|
keywords: ['team', 'user'],
|
|
39
39
|
shortcut: '@',
|
|
40
|
-
title: formatMessage(
|
|
40
|
+
title: formatMessage(_insertBlock.toolbarInsertBlockMessages.mention)
|
|
41
41
|
};
|
|
42
42
|
}),
|
|
43
43
|
component: function component() {
|
|
@@ -12,7 +12,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
12
12
|
var React = _react;
|
|
13
13
|
var _runtime = require("@compiled/react/runtime");
|
|
14
14
|
var _reactIntl = require("react-intl");
|
|
15
|
-
var
|
|
15
|
+
var _mentions = require("@atlaskit/editor-common/messages/mentions");
|
|
16
16
|
var _statusError = _interopRequireDefault(require("@atlaskit/icon/core/status-error"));
|
|
17
17
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
18
18
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
@@ -46,7 +46,7 @@ var AgentMentionLoadErrorItem = exports.AgentMentionLoadErrorItem = function Age
|
|
|
46
46
|
}), /*#__PURE__*/React.createElement(_compiled.Text, {
|
|
47
47
|
as: "span",
|
|
48
48
|
color: "color.text.subtle"
|
|
49
|
-
}, intl.formatMessage(
|
|
49
|
+
}, intl.formatMessage(_mentions.mentionMessages.typeAheadSectionAgentsLoadError)), /*#__PURE__*/React.createElement("span", {
|
|
50
50
|
className: (0, _runtime.ax)([styles.retryText])
|
|
51
|
-
}, intl.formatMessage(
|
|
51
|
+
}, intl.formatMessage(_mentions.mentionMessages.typeAheadSectionAgentsRetry))));
|
|
52
52
|
};
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
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
|
-
var
|
|
9
|
+
var _enums = require("@atlaskit/editor-common/analytics/types/enums");
|
|
10
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; }
|
|
@@ -31,9 +31,9 @@ var buildTypeAheadCancelPayload = exports.buildTypeAheadCancelPayload = function
|
|
|
31
31
|
queryLength = _extractAttributesFro.queryLength,
|
|
32
32
|
spaceInQuery = _extractAttributesFro.spaceInQuery;
|
|
33
33
|
return {
|
|
34
|
-
action:
|
|
35
|
-
actionSubject:
|
|
36
|
-
eventType:
|
|
34
|
+
action: _enums.ACTION.CANCELLED,
|
|
35
|
+
actionSubject: _enums.ACTION_SUBJECT.MENTION_TYPEAHEAD,
|
|
36
|
+
eventType: _enums.EVENT_TYPE.UI,
|
|
37
37
|
attributes: {
|
|
38
38
|
componentName: componentName,
|
|
39
39
|
duration: duration,
|
|
@@ -63,9 +63,9 @@ var buildTypeAheadInviteItemViewedPayload = exports.buildTypeAheadInviteItemView
|
|
|
63
63
|
objectId = _ref.objectId,
|
|
64
64
|
childObjectId = _ref.childObjectId;
|
|
65
65
|
return {
|
|
66
|
-
action:
|
|
67
|
-
actionSubject:
|
|
68
|
-
eventType:
|
|
66
|
+
action: _enums.ACTION.RENDERED,
|
|
67
|
+
actionSubject: _enums.ACTION_SUBJECT.INVITE_ITEM,
|
|
68
|
+
eventType: _enums.EVENT_TYPE.UI,
|
|
69
69
|
attributes: _objectSpread({
|
|
70
70
|
componentName: componentName,
|
|
71
71
|
containerId: containerId,
|
|
@@ -86,9 +86,9 @@ var buildTypeAheadInviteItemClickedPayload = exports.buildTypeAheadInviteItemCli
|
|
|
86
86
|
objectId = _ref2.objectId,
|
|
87
87
|
childObjectId = _ref2.childObjectId;
|
|
88
88
|
return {
|
|
89
|
-
action: isClicked(insertType) ?
|
|
90
|
-
actionSubject:
|
|
91
|
-
eventType:
|
|
89
|
+
action: isClicked(insertType) ? _enums.ACTION.CLICKED : _enums.ACTION.PRESSED,
|
|
90
|
+
actionSubject: _enums.ACTION_SUBJECT.INVITE_ITEM,
|
|
91
|
+
eventType: _enums.EVENT_TYPE.UI,
|
|
92
92
|
attributes: _objectSpread({
|
|
93
93
|
componentName: componentName,
|
|
94
94
|
duration: duration,
|
|
@@ -118,9 +118,9 @@ var buildTypeAheadInsertedPayload = exports.buildTypeAheadInsertedPayload = func
|
|
|
118
118
|
childObjectId = contextIdentifierProvider.childObjectId || undefined;
|
|
119
119
|
}
|
|
120
120
|
return {
|
|
121
|
-
action: isClicked(insertType) ?
|
|
122
|
-
actionSubject:
|
|
123
|
-
eventType:
|
|
121
|
+
action: isClicked(insertType) ? _enums.ACTION.CLICKED : _enums.ACTION.PRESSED,
|
|
122
|
+
actionSubject: _enums.ACTION_SUBJECT.MENTION_TYPEAHEAD,
|
|
123
|
+
eventType: _enums.EVENT_TYPE.UI,
|
|
124
124
|
containerId: containerId,
|
|
125
125
|
objectId: objectId,
|
|
126
126
|
childObjectId: childObjectId,
|
|
@@ -157,16 +157,16 @@ var buildTypeAheadRenderedPayload = exports.buildTypeAheadRenderedPayload = func
|
|
|
157
157
|
var _extractAttributesFro4 = extractAttributesFromQuery(query),
|
|
158
158
|
queryLength = _extractAttributesFro4.queryLength,
|
|
159
159
|
spaceInQuery = _extractAttributesFro4.spaceInQuery;
|
|
160
|
-
var actionSubject = userIds ?
|
|
160
|
+
var actionSubject = userIds ? _enums.ACTION_SUBJECT.MENTION_TYPEAHEAD : _enums.ACTION_SUBJECT.TEAM_MENTION_TYPEAHEAD;
|
|
161
161
|
var agentAnalyticsAttributes = agentAnalytics ? {
|
|
162
162
|
agentCount: agentAnalytics.agentCount,
|
|
163
163
|
agentsShown: agentAnalytics.agentCount > 0,
|
|
164
164
|
agentSectioningEnabled: agentAnalytics.agentSectioningEnabled
|
|
165
165
|
} : {};
|
|
166
166
|
return {
|
|
167
|
-
action:
|
|
167
|
+
action: _enums.ACTION.RENDERED,
|
|
168
168
|
actionSubject: actionSubject,
|
|
169
|
-
eventType:
|
|
169
|
+
eventType: _enums.EVENT_TYPE.OPERATIONAL,
|
|
170
170
|
attributes: _objectSpread({
|
|
171
171
|
componentName: componentName,
|
|
172
172
|
duration: duration,
|
|
@@ -12,7 +12,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
12
12
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
13
13
|
var _react = _interopRequireDefault(require("react"));
|
|
14
14
|
var _uuid = require("uuid");
|
|
15
|
-
var
|
|
15
|
+
var _mentions = require("@atlaskit/editor-common/messages/mentions");
|
|
16
16
|
var _typeAhead = require("@atlaskit/editor-common/type-ahead");
|
|
17
17
|
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
18
18
|
var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
@@ -499,7 +499,7 @@ var createTypeAheadConfig = exports.createTypeAheadConfig = function createTypeA
|
|
|
499
499
|
var applySearchOrder = shouldApplyMentionSearchOrder(lastTypeAheadQuery);
|
|
500
500
|
return [{
|
|
501
501
|
id: 'people',
|
|
502
|
-
title: intl.formatMessage(
|
|
502
|
+
title: intl.formatMessage(_mentions.mentionMessages.typeAheadSectionPeople),
|
|
503
503
|
filter: applySearchOrder ? isSearchOrderedPersonTypeAheadItem : function (item) {
|
|
504
504
|
if (isAgentTypeAheadItem(item)) {
|
|
505
505
|
return false;
|
|
@@ -520,7 +520,7 @@ var createTypeAheadConfig = exports.createTypeAheadConfig = function createTypeA
|
|
|
520
520
|
}
|
|
521
521
|
}, {
|
|
522
522
|
id: 'agents',
|
|
523
|
-
title: intl.formatMessage(
|
|
523
|
+
title: intl.formatMessage(_mentions.mentionMessages.typeAheadSectionAgents),
|
|
524
524
|
filter: applySearchOrder ? isSearchOrderedAgentTypeAheadItem : isAgentTypeAheadItem,
|
|
525
525
|
limit: 5,
|
|
526
526
|
sectionTitleDisplay: {
|
|
@@ -529,7 +529,7 @@ var createTypeAheadConfig = exports.createTypeAheadConfig = function createTypeA
|
|
|
529
529
|
},
|
|
530
530
|
lozenge: !(0, _fg.fg)('platform_editor_agent_mentions_hide_labs_lozenge') && (!(0, _fg.fg)('platform_editor_agent_mentions_drop_one_fixes') || showAgentMentionsLabsLozenge) ? /*#__PURE__*/_react.default.createElement(_lozenge.default, {
|
|
531
531
|
appearance: "discovery"
|
|
532
|
-
}, intl.formatMessage(
|
|
532
|
+
}, intl.formatMessage(_mentions.mentionMessages.typeAheadSectionAgentsLabsLozengeLabel)) : null
|
|
533
533
|
}];
|
|
534
534
|
},
|
|
535
535
|
onOpen: function onOpen() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
2
2
|
import { v4 as uuid } from 'uuid';
|
|
3
|
-
import { getAnnotationMarksForPos } from '@atlaskit/editor-common/utils';
|
|
3
|
+
import { getAnnotationMarksForPos } from '@atlaskit/editor-common/utils/annotation';
|
|
4
4
|
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
5
5
|
import { isResolvingMentionProvider } from '@atlaskit/mention/is-resolving-mention-provider';
|
|
6
6
|
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
@@ -2,10 +2,11 @@ import React, { useEffect, useMemo } from 'react';
|
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
3
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
4
4
|
import { v4 as uuid } from 'uuid';
|
|
5
|
-
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
5
|
+
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
6
6
|
import { IconMention } from '@atlaskit/editor-common/assets';
|
|
7
|
-
import { toolbarInsertBlockMessages as messages
|
|
8
|
-
import {
|
|
7
|
+
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages/insert-block';
|
|
8
|
+
import { mentionMessages } from '@atlaskit/editor-common/messages/mentions';
|
|
9
|
+
import { WithProviders } from '@atlaskit/editor-common/provider-factory/with-providers';
|
|
9
10
|
import { isPromise } from '@atlaskit/mention/is-promise';
|
|
10
11
|
import { isResolvingMentionProvider } from '@atlaskit/mention/is-resolving-mention-provider';
|
|
11
12
|
import { MentionNameStatus } from '@atlaskit/mention/types';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { mention } from '@atlaskit/adf-schema/mention';
|
|
2
|
-
import { convertToInlineCss } from '@atlaskit/editor-common/
|
|
2
|
+
import { convertToInlineCss } from '@atlaskit/editor-common/css-helper';
|
|
3
3
|
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
4
4
|
const isSSR = Boolean(process.env.REACT_SSR);
|
|
5
5
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import { bind } from 'bind-event-listener';
|
|
3
3
|
import { getBrowserInfo } from '@atlaskit/editor-common/browser';
|
|
4
|
-
import { isSSR } from '@atlaskit/editor-common/
|
|
4
|
+
import { isSSR } from '@atlaskit/editor-common/is-ssr';
|
|
5
5
|
import { VANILLA_TOOLTIP_DEFAULT_CLASS, VanillaTooltip } from '@atlaskit/editor-common/vanilla-tooltip';
|
|
6
|
-
import { ZERO_WIDTH_SPACE } from '@atlaskit/editor-common/whitespace';
|
|
6
|
+
import { ZERO_WIDTH_SPACE } from '@atlaskit/editor-common/whitespace/whitespace';
|
|
7
7
|
import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
|
|
8
8
|
// oxlint-disable-next-line import/no-duplicates
|
|
9
9
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
1
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics/types/enums';
|
|
2
2
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
|
-
import { insm } from '@atlaskit/insm';
|
|
3
|
+
import { insm } from '@atlaskit/insm/api';
|
|
4
4
|
import { SLI_EVENT_TYPE, SMART_EVENT_TYPE } from '@atlaskit/mention/analytics';
|
|
5
5
|
import { ComponentNames } from '@atlaskit/mention/types';
|
|
6
6
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
@@ -34,7 +34,7 @@ export const ACTIONS = {
|
|
|
34
34
|
CLEAR_PENDING_PASTED_AGENT_MENTION: 'CLEAR_PENDING_PASTED_AGENT_MENTION'
|
|
35
35
|
};
|
|
36
36
|
const PACKAGE_NAME = "@atlaskit/editor-plugin-mentions";
|
|
37
|
-
const PACKAGE_VERSION = "28.1.
|
|
37
|
+
const PACKAGE_VERSION = "28.1.4";
|
|
38
38
|
const setProvider = provider => (state, dispatch) => {
|
|
39
39
|
if (dispatch) {
|
|
40
40
|
dispatch(state.tr.setMeta(mentionPluginKey, {
|
|
@@ -4,7 +4,7 @@ import "./InviteItemWithEmailDomain.compiled.css";
|
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
6
6
|
import { FormattedMessage, injectIntl } from 'react-intl';
|
|
7
|
-
import { mentionMessages as messages } from '@atlaskit/editor-common/messages';
|
|
7
|
+
import { mentionMessages as messages } from '@atlaskit/editor-common/messages/mentions';
|
|
8
8
|
import EmailIcon from '@atlaskit/icon/core/email';
|
|
9
9
|
import StatusErrorIcon from '@atlaskit/icon/core/status-error';
|
|
10
10
|
import { isValidEmail } from '@atlaskit/user-picker/components/email-validation';
|
|
@@ -4,7 +4,7 @@ import "./index.compiled.css";
|
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import React, { useCallback, useEffect } from 'react';
|
|
6
6
|
import { FormattedMessage, injectIntl } from 'react-intl';
|
|
7
|
-
import { mentionMessages as messages } from '@atlaskit/editor-common/messages';
|
|
7
|
+
import { mentionMessages as messages } from '@atlaskit/editor-common/messages/mentions';
|
|
8
8
|
import AddIcon from '@atlaskit/icon/core/add';
|
|
9
9
|
const mentionItemStyle = null;
|
|
10
10
|
const mentionItemSelectedStyle = null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
|
-
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
3
|
-
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/
|
|
2
|
+
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
3
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
|
|
4
4
|
import ToolbarMention from './ToolbarMention';
|
|
5
5
|
const selector = states => {
|
|
6
6
|
var _states$mentionState;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import React, { PureComponent } from 'react';
|
|
3
3
|
import { injectIntl } from 'react-intl';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { TOOLBAR_ACTION_SUBJECT_ID as TOOLBAR_BUTTON } from '@atlaskit/editor-common/analytics/types/toolbar-button';
|
|
5
|
+
import { mentionMessages as messages } from '@atlaskit/editor-common/messages/mentions';
|
|
6
|
+
import ToolbarButton from '@atlaskit/editor-common/ui-menu/ToolbarButton';
|
|
6
7
|
import MentionIcon from '@atlaskit/icon/core/mention';
|
|
7
8
|
// Ignored via go/ees005
|
|
8
9
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useCallback, useMemo } from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
|
-
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
|
-
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
3
|
+
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
4
|
+
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages/insert-block';
|
|
5
5
|
import { QuickInsertMenuItem } from '@atlaskit/editor-common/quick-insert/menu-item';
|
|
6
6
|
import { messages as quickInsertMessages } from '@atlaskit/editor-common/quick-insert/messages';
|
|
7
7
|
import MentionIcon from '@atlaskit/icon/core/mention';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
2
|
+
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages/insert-block';
|
|
3
3
|
import { createQuickInsertMatcher } from '@atlaskit/editor-common/quick-insert/create-quick-insert-matcher';
|
|
4
4
|
import { MENTION_MENU_ITEM, STRUCTURE_SECTION } from '@atlaskit/editor-common/quick-insert/keys';
|
|
5
5
|
import { STRUCTURE_SECTION_RANK } from '@atlaskit/editor-common/quick-insert/rank';
|
|
@@ -4,7 +4,7 @@ import * as React from 'react';
|
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { useCallback } from 'react';
|
|
6
6
|
import { useIntl } from 'react-intl';
|
|
7
|
-
import { mentionMessages } from '@atlaskit/editor-common/messages';
|
|
7
|
+
import { mentionMessages } from '@atlaskit/editor-common/messages/mentions';
|
|
8
8
|
import StatusErrorIcon from '@atlaskit/icon/core/status-error';
|
|
9
9
|
import { Inline, Text } from '@atlaskit/primitives/compiled';
|
|
10
10
|
const styles = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
1
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics/types/enums';
|
|
2
2
|
import { isSpecialMention } from '@atlaskit/mention/is-special-mention';
|
|
3
3
|
import { isTeamType } from './utils';
|
|
4
4
|
const componentName = 'mention';
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
|
|
3
3
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
4
4
|
import { v4 as uuid } from 'uuid';
|
|
5
|
-
import { mentionMessages } from '@atlaskit/editor-common/messages';
|
|
5
|
+
import { mentionMessages } from '@atlaskit/editor-common/messages/mentions';
|
|
6
6
|
import { TypeAheadAvailableNodes } from '@atlaskit/editor-common/type-ahead';
|
|
7
7
|
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
8
8
|
import { findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
2
2
|
import { v4 as uuid } from 'uuid';
|
|
3
|
-
import { getAnnotationMarksForPos } from '@atlaskit/editor-common/utils';
|
|
3
|
+
import { getAnnotationMarksForPos } from '@atlaskit/editor-common/utils/annotation';
|
|
4
4
|
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
5
5
|
import { isResolvingMentionProvider } from '@atlaskit/mention/is-resolving-mention-provider';
|
|
6
6
|
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
@@ -9,10 +9,11 @@ import React, { useEffect, useMemo } from 'react';
|
|
|
9
9
|
import { useIntl } from 'react-intl';
|
|
10
10
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
11
11
|
import { v4 as uuid } from 'uuid';
|
|
12
|
-
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
12
|
+
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
13
13
|
import { IconMention } from '@atlaskit/editor-common/assets';
|
|
14
|
-
import { toolbarInsertBlockMessages as messages
|
|
15
|
-
import {
|
|
14
|
+
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages/insert-block';
|
|
15
|
+
import { mentionMessages } from '@atlaskit/editor-common/messages/mentions';
|
|
16
|
+
import { WithProviders } from '@atlaskit/editor-common/provider-factory/with-providers';
|
|
16
17
|
import { isPromise } from '@atlaskit/mention/is-promise';
|
|
17
18
|
import { isResolvingMentionProvider } from '@atlaskit/mention/is-resolving-mention-provider';
|
|
18
19
|
import { MentionNameStatus } from '@atlaskit/mention/types';
|
|
@@ -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 { mention } from '@atlaskit/adf-schema/mention';
|
|
5
|
-
import { convertToInlineCss } from '@atlaskit/editor-common/
|
|
5
|
+
import { convertToInlineCss } from '@atlaskit/editor-common/css-helper';
|
|
6
6
|
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
7
7
|
var isSSR = Boolean(process.env.REACT_SSR);
|
|
8
8
|
|
|
@@ -7,9 +7,9 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
7
7
|
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; }
|
|
8
8
|
import { bind } from 'bind-event-listener';
|
|
9
9
|
import { getBrowserInfo } from '@atlaskit/editor-common/browser';
|
|
10
|
-
import { isSSR } from '@atlaskit/editor-common/
|
|
10
|
+
import { isSSR } from '@atlaskit/editor-common/is-ssr';
|
|
11
11
|
import { VANILLA_TOOLTIP_DEFAULT_CLASS, VanillaTooltip } from '@atlaskit/editor-common/vanilla-tooltip';
|
|
12
|
-
import { ZERO_WIDTH_SPACE } from '@atlaskit/editor-common/whitespace';
|
|
12
|
+
import { ZERO_WIDTH_SPACE } from '@atlaskit/editor-common/whitespace/whitespace';
|
|
13
13
|
import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
|
|
14
14
|
// oxlint-disable-next-line import/no-duplicates
|
|
15
15
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
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
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
4
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics/types/enums';
|
|
5
5
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
6
|
-
import { insm } from '@atlaskit/insm';
|
|
6
|
+
import { insm } from '@atlaskit/insm/api';
|
|
7
7
|
import { SLI_EVENT_TYPE, SMART_EVENT_TYPE } from '@atlaskit/mention/analytics';
|
|
8
8
|
import { ComponentNames } from '@atlaskit/mention/types';
|
|
9
9
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
@@ -37,7 +37,7 @@ export var ACTIONS = {
|
|
|
37
37
|
CLEAR_PENDING_PASTED_AGENT_MENTION: 'CLEAR_PENDING_PASTED_AGENT_MENTION'
|
|
38
38
|
};
|
|
39
39
|
var PACKAGE_NAME = "@atlaskit/editor-plugin-mentions";
|
|
40
|
-
var PACKAGE_VERSION = "28.1.
|
|
40
|
+
var PACKAGE_VERSION = "28.1.4";
|
|
41
41
|
var setProvider = function setProvider(provider) {
|
|
42
42
|
return function (state, dispatch) {
|
|
43
43
|
if (dispatch) {
|
|
@@ -5,7 +5,7 @@ import "./InviteItemWithEmailDomain.compiled.css";
|
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
6
|
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
7
7
|
import { FormattedMessage, injectIntl } from 'react-intl';
|
|
8
|
-
import { mentionMessages as messages } from '@atlaskit/editor-common/messages';
|
|
8
|
+
import { mentionMessages as messages } from '@atlaskit/editor-common/messages/mentions';
|
|
9
9
|
import EmailIcon from '@atlaskit/icon/core/email';
|
|
10
10
|
import StatusErrorIcon from '@atlaskit/icon/core/status-error';
|
|
11
11
|
import { isValidEmail } from '@atlaskit/user-picker/components/email-validation';
|
|
@@ -4,7 +4,7 @@ import "./index.compiled.css";
|
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import React, { useCallback, useEffect } from 'react';
|
|
6
6
|
import { FormattedMessage, injectIntl } from 'react-intl';
|
|
7
|
-
import { mentionMessages as messages } from '@atlaskit/editor-common/messages';
|
|
7
|
+
import { mentionMessages as messages } from '@atlaskit/editor-common/messages/mentions';
|
|
8
8
|
import AddIcon from '@atlaskit/icon/core/add';
|
|
9
9
|
var mentionItemStyle = null;
|
|
10
10
|
var mentionItemSelectedStyle = null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
|
-
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
3
|
-
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/
|
|
2
|
+
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
3
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
|
|
4
4
|
import ToolbarMention from './ToolbarMention';
|
|
5
5
|
var selector = function selector(states) {
|
|
6
6
|
var _states$mentionState;
|
|
@@ -8,8 +8,9 @@ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstruct
|
|
|
8
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
9
9
|
import React, { PureComponent } from 'react';
|
|
10
10
|
import { injectIntl } from 'react-intl';
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
11
|
+
import { TOOLBAR_ACTION_SUBJECT_ID as TOOLBAR_BUTTON } from '@atlaskit/editor-common/analytics/types/toolbar-button';
|
|
12
|
+
import { mentionMessages as messages } from '@atlaskit/editor-common/messages/mentions';
|
|
13
|
+
import ToolbarButton from '@atlaskit/editor-common/ui-menu/ToolbarButton';
|
|
13
14
|
import MentionIcon from '@atlaskit/icon/core/mention';
|
|
14
15
|
// Ignored via go/ees005
|
|
15
16
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useCallback, useMemo } from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
|
-
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
|
-
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
3
|
+
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
4
|
+
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages/insert-block';
|
|
5
5
|
import { QuickInsertMenuItem } from '@atlaskit/editor-common/quick-insert/menu-item';
|
|
6
6
|
import { messages as quickInsertMessages } from '@atlaskit/editor-common/quick-insert/messages';
|
|
7
7
|
import MentionIcon from '@atlaskit/icon/core/mention';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
2
|
+
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages/insert-block';
|
|
3
3
|
import { createQuickInsertMatcher } from '@atlaskit/editor-common/quick-insert/create-quick-insert-matcher';
|
|
4
4
|
import { MENTION_MENU_ITEM, STRUCTURE_SECTION } from '@atlaskit/editor-common/quick-insert/keys';
|
|
5
5
|
import { STRUCTURE_SECTION_RANK } from '@atlaskit/editor-common/quick-insert/rank';
|
|
@@ -4,7 +4,7 @@ import * as React from 'react';
|
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { useCallback } from 'react';
|
|
6
6
|
import { useIntl } from 'react-intl';
|
|
7
|
-
import { mentionMessages } from '@atlaskit/editor-common/messages';
|
|
7
|
+
import { mentionMessages } from '@atlaskit/editor-common/messages/mentions';
|
|
8
8
|
import StatusErrorIcon from '@atlaskit/icon/core/status-error';
|
|
9
9
|
import { Inline, Text } from '@atlaskit/primitives/compiled';
|
|
10
10
|
var styles = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
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
|
-
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
4
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics/types/enums';
|
|
5
5
|
import { isSpecialMention } from '@atlaskit/mention/is-special-mention';
|
|
6
6
|
import { isTeamType } from './utils';
|
|
7
7
|
var componentName = 'mention';
|
|
@@ -9,7 +9,7 @@ import React from 'react';
|
|
|
9
9
|
|
|
10
10
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
11
11
|
import { v4 as uuid } from 'uuid';
|
|
12
|
-
import { mentionMessages } from '@atlaskit/editor-common/messages';
|
|
12
|
+
import { mentionMessages } from '@atlaskit/editor-common/messages/mentions';
|
|
13
13
|
import { TypeAheadAvailableNodes } from '@atlaskit/editor-common/type-ahead';
|
|
14
14
|
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
15
15
|
import { findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { EditorCommand } from '@atlaskit/editor-common/types/editor-command';
|
|
2
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
2
3
|
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
3
4
|
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
4
5
|
import type { MentionProvider, MentionDescription } from '@atlaskit/mention/types';
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
import type {
|
|
1
|
+
import type { EditorCommand } from '@atlaskit/editor-common/types/editor-command';
|
|
2
|
+
import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
3
|
+
import type { TypeAheadSectionTitleUpdate } from '@atlaskit/editor-common/types/type-ahead';
|
|
4
|
+
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics/analyticsPluginType';
|
|
5
|
+
import type { BasePlugin } from '@atlaskit/editor-plugin-base/basePluginType';
|
|
6
|
+
import type { ContextIdentifierPlugin } from '@atlaskit/editor-plugin-context-identifier/contextIdentifierPluginType';
|
|
7
|
+
import type { SelectionPlugin } from '@atlaskit/editor-plugin-selection/selection-plugin-type';
|
|
6
8
|
import type { TypeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead/type-ahead-plugin-type';
|
|
7
9
|
import type { TypeAheadInputMethod } from '@atlaskit/editor-plugin-type-ahead/types';
|
|
8
|
-
import type { UiControlRegistryPlugin } from '@atlaskit/editor-plugin-ui-control-registry';
|
|
10
|
+
import type { UiControlRegistryPlugin } from '@atlaskit/editor-plugin-ui-control-registry/ui-control-registry-plugin-type';
|
|
9
11
|
import type { MentionProvider } from '@atlaskit/mention/types';
|
|
10
12
|
import type { InsertMentionParameters } from './editor-commands';
|
|
11
13
|
import type { AgentRunStateByLocalId, MentionChange, MentionPluginOptions, MentionSharedState } from './types';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PortalProviderAPI } from '@atlaskit/editor-common/
|
|
1
|
+
import type { PortalProviderAPI } from '@atlaskit/editor-common/common';
|
|
2
2
|
/**
|
|
3
3
|
* Anchors an ADS `<Tooltip>` to a ProseMirror chip element that is **not** a
|
|
4
4
|
* React child of the tooltip. The chip itself stays in the PM document; this
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { PortalProviderAPI } from '@atlaskit/editor-common/
|
|
2
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
1
|
+
import type { PortalProviderAPI } from '@atlaskit/editor-common/common';
|
|
2
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
3
3
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
4
4
|
import type { EditorView, NodeView } from '@atlaskit/editor-prosemirror/view';
|
|
5
5
|
import type { MentionsPlugin } from '../mentionsPluginType';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { PortalProviderAPI } from '@atlaskit/editor-common/
|
|
2
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
1
|
+
import type { PortalProviderAPI } from '@atlaskit/editor-common/common';
|
|
2
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
3
3
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
4
4
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
5
5
|
import type { MentionsPlugin } from '../mentionsPluginType';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
import type { PMPluginFactoryParams } from '@atlaskit/editor-common/types';
|
|
2
|
+
import type { PMPluginFactoryParams } from '@atlaskit/editor-common/types/plugin-factory';
|
|
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';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
import type { ExtractInjectionAPI
|
|
2
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
3
|
+
import type { PMPluginFactoryParams } from '@atlaskit/editor-common/types/plugin-factory';
|
|
3
4
|
import type { MentionsPlugin } from '../mentionsPluginType';
|
|
4
5
|
import type { FireElementsChannelEvent, MentionPluginOptions, MentionPluginState } from '../types';
|
|
5
6
|
export declare const ACTIONS: {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { DocNode } from '@atlaskit/adf-schema/doc';
|
|
2
|
-
import type { AnalyticsEventPayload } from '@atlaskit/editor-common/analytics';
|
|
2
|
+
import type { AnalyticsEventPayload } from '@atlaskit/editor-common/analytics/types/events';
|
|
3
3
|
import type { MentionNodeDataProvider } from '@atlaskit/editor-common/mention';
|
|
4
|
-
import type {
|
|
5
|
-
import type {
|
|
4
|
+
import type { ProfilecardProvider } from '@atlaskit/editor-common/provider-factory/profile-card-provider';
|
|
5
|
+
import type { Providers } from '@atlaskit/editor-common/provider-factory/types';
|
|
6
|
+
import type { TypeAheadHandler } from '@atlaskit/editor-common/types/type-ahead';
|
|
6
7
|
import type { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
7
8
|
import type { MentionDescription, MentionProvider } from '@atlaskit/mention/types';
|
|
8
9
|
export declare const MENTION_PROVIDER_REJECTED = "REJECTED";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
1
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
2
2
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
3
|
import type { MentionProvider } from '@atlaskit/mention/types';
|
|
4
4
|
import type { MentionsPlugin } from '../mentionsPluginType';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { DocNode } from '@atlaskit/adf-schema/doc';
|
|
2
2
|
import type { MentionAttributes } from '@atlaskit/adf-schema/mention';
|
|
3
|
-
import type { ProfilecardProvider } from '@atlaskit/editor-common/provider-factory';
|
|
3
|
+
import type { ProfilecardProvider } from '@atlaskit/editor-common/provider-factory/profile-card-provider';
|
|
4
4
|
import type { Placement } from '@atlaskit/popper/main';
|
|
5
5
|
import type { ProfileCardClientData, TeamCentralReportingLinesData } from '@atlaskit/profilecard/types';
|
|
6
6
|
interface ProfileCardStateProps {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { ExtractInjectionAPI
|
|
2
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
3
|
+
import type { TypeAheadHandler } from '@atlaskit/editor-common/types/type-ahead';
|
|
3
4
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
4
5
|
import type { MentionsPlugin } from '../mentionsPluginType';
|
|
5
6
|
interface SecondaryToolbarComponentProps {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type QuickInsertMenuItemProps } from '@atlaskit/editor-common/quick-insert/menu-item';
|
|
3
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
4
|
-
import type { TypeAheadHandler } from '@atlaskit/editor-
|
|
3
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
4
|
+
import type { TypeAheadHandler } from '@atlaskit/editor-common/types/type-ahead';
|
|
5
5
|
import type { MentionsPlugin } from '../../mentionsPluginType';
|
|
6
6
|
type Props = {
|
|
7
7
|
api: ExtractInjectionAPI<MentionsPlugin> | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
2
|
-
import type { TypeAheadHandler } from '@atlaskit/editor-
|
|
1
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
2
|
+
import type { TypeAheadHandler } from '@atlaskit/editor-common/types/type-ahead';
|
|
3
3
|
import type { RegisterMenuItem } from '@atlaskit/editor-ui-control-model/types';
|
|
4
4
|
import type { MentionsPlugin } from '../../mentionsPluginType';
|
|
5
5
|
export declare const getMentionQuickInsertComponents: ({ api, canOpenMentionTypeAhead, typeAhead, }: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ProfilecardProvider } from '@atlaskit/editor-common/provider-factory';
|
|
1
|
+
import type { ProfilecardProvider } from '@atlaskit/editor-common/provider-factory/profile-card-provider';
|
|
2
2
|
import type { MentionDescription } from '@atlaskit/mention/types';
|
|
3
3
|
type Props = {
|
|
4
4
|
height?: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { AnalyticsEventPayload } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
|
|
1
|
+
import type { AnalyticsEventPayload } from '@atlaskit/editor-common/analytics/types/events';
|
|
2
|
+
import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory/context-identifier-provider';
|
|
3
3
|
import type { SelectItemMode } from '@atlaskit/editor-common/type-ahead';
|
|
4
4
|
import type { UserRole, MentionDescription } from '@atlaskit/mention/types';
|
|
5
5
|
import type { TeamInfoAttrAnalytics } from '../../types';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { ProfilecardProvider } from '@atlaskit/editor-common/provider-factory';
|
|
3
|
-
import type { ExtractInjectionAPI
|
|
2
|
+
import type { ProfilecardProvider } from '@atlaskit/editor-common/provider-factory/profile-card-provider';
|
|
3
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
4
|
+
import type { TypeAheadHandler, TypeAheadItem } from '@atlaskit/editor-common/types/type-ahead';
|
|
4
5
|
import type { MentionDescription } from '@atlaskit/mention/types';
|
|
5
6
|
import type { MentionsPlugin } from '../../mentionsPluginType';
|
|
6
7
|
import type { FireElementsChannelEvent, MentionChange } from '../../types';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-mentions",
|
|
3
|
-
"version": "28.1.
|
|
3
|
+
"version": "28.1.5",
|
|
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": "^17.0.0",
|
|
38
|
-
"@atlaskit/mention": "^30.
|
|
38
|
+
"@atlaskit/mention": "^30.2.0",
|
|
39
39
|
"@atlaskit/node-data-provider": "^27.0.0",
|
|
40
40
|
"@atlaskit/platform-feature-experiments": "^0.3.0",
|
|
41
41
|
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
@@ -47,10 +47,10 @@
|
|
|
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": "^234.0.0",
|
|
51
51
|
"@atlaskit/tokens": "^20.4.0",
|
|
52
52
|
"@atlaskit/tooltip": "^24.4.0",
|
|
53
|
-
"@atlaskit/user-picker": "^14.
|
|
53
|
+
"@atlaskit/user-picker": "^14.2.0",
|
|
54
54
|
"@babel/runtime": "^7.0.0",
|
|
55
55
|
"@compiled/react": "^1.0.2",
|
|
56
56
|
"bind-event-listener": "^3.0.0",
|
|
@@ -60,14 +60,14 @@
|
|
|
60
60
|
"uuid": "^11.1.1"
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
|
-
"@atlaskit/editor-common": "^130.
|
|
63
|
+
"@atlaskit/editor-common": "^130.5.0",
|
|
64
64
|
"react": "^18.2.0 || ^19.2.0",
|
|
65
65
|
"react-dom": "^18.2.0 || ^19.2.0",
|
|
66
66
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"@atlaskit/button": "^25.4.0",
|
|
70
|
-
"@atlaskit/editor-core": "^236.
|
|
70
|
+
"@atlaskit/editor-core": "^236.1.0",
|
|
71
71
|
"@atlassian/workbench": "workspace:*",
|
|
72
72
|
"@testing-library/react": "^16.3.0",
|
|
73
73
|
"react": "^19.2.0",
|