@atlaskit/editor-plugin-mentions 8.2.7 → 8.2.8
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 +6 -0
- package/dist/cjs/editor-commands/index.js +3 -0
- package/dist/cjs/mentionsPlugin.js +2 -1
- package/dist/cjs/nodeviews/profileCardRenderer.js +3 -0
- package/dist/cjs/pm-plugins/main.js +1 -1
- package/dist/cjs/ui/type-ahead/index.js +10 -1
- package/dist/es2019/editor-commands/index.js +2 -0
- package/dist/es2019/mentionsPlugin.js +2 -0
- package/dist/es2019/nodeviews/profileCardRenderer.js +2 -0
- package/dist/es2019/pm-plugins/main.js +1 -1
- package/dist/es2019/ui/type-ahead/index.js +11 -0
- package/dist/esm/editor-commands/index.js +2 -0
- package/dist/esm/mentionsPlugin.js +2 -0
- package/dist/esm/nodeviews/profileCardRenderer.js +2 -0
- package/dist/esm/pm-plugins/main.js +1 -1
- package/dist/esm/ui/type-ahead/index.js +11 -0
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,8 @@ var _utils = require("@atlaskit/editor-common/utils");
|
|
|
10
10
|
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
11
11
|
var _resource = require("@atlaskit/mention/resource");
|
|
12
12
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
14
|
+
|
|
13
15
|
var createSingleMentionFragment = exports.createSingleMentionFragment = function createSingleMentionFragment(_ref) {
|
|
14
16
|
var mentionInsertDisplayName = _ref.mentionInsertDisplayName,
|
|
15
17
|
mentionProvider = _ref.mentionProvider,
|
|
@@ -42,6 +44,7 @@ var createSingleMentionFragment = exports.createSingleMentionFragment = function
|
|
|
42
44
|
id: id,
|
|
43
45
|
accessLevel: accessLevel,
|
|
44
46
|
userType: userType === 'DEFAULT' ? null : userType,
|
|
47
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
45
48
|
localId: localId !== null && localId !== void 0 ? localId : (0, _uuid.default)()
|
|
46
49
|
}, null, (0, _platformFeatureFlags.fg)('editor_inline_comments_paste_insert_nodes') ? annotationMarksForPos : undefined);
|
|
47
50
|
var space = schema.text(' ', (0, _platformFeatureFlags.fg)('editor_inline_comments_paste_insert_nodes') ? annotationMarksForPos : undefined);
|
|
@@ -27,7 +27,7 @@ var _SecondaryToolbarComponent = require("./ui/SecondaryToolbarComponent");
|
|
|
27
27
|
var _typeAhead = require("./ui/type-ahead");
|
|
28
28
|
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); }
|
|
29
29
|
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; }
|
|
30
|
-
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; }
|
|
30
|
+
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; } // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
31
31
|
var processName = function processName(name, intl) {
|
|
32
32
|
var unknownLabel = intl.formatMessage(_messages.mentionMessages.unknownLabel);
|
|
33
33
|
if (name.status === _types.MentionNameStatus.OK) {
|
|
@@ -83,6 +83,7 @@ var mentionsPlugin = exports.mentionsPlugin = function mentionsPlugin(_ref3) {
|
|
|
83
83
|
var _options$sanitizePriv, _options$insertDispla;
|
|
84
84
|
var options = _ref3.config,
|
|
85
85
|
api = _ref3.api;
|
|
86
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
86
87
|
var sessionId = (0, _uuid.default)();
|
|
87
88
|
var previousMediaProvider;
|
|
88
89
|
var fireEvent = function fireEvent(payload, channel) {
|
|
@@ -10,6 +10,8 @@ var _bindEventListener = require("bind-event-listener");
|
|
|
10
10
|
var _v = _interopRequireDefault(require("uuid/v4"));
|
|
11
11
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
12
12
|
var _ProfileCardComponent = require("../ui/ProfileCardComponent");
|
|
13
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
14
|
+
|
|
13
15
|
var profileCardRenderer = exports.profileCardRenderer = function profileCardRenderer(_ref) {
|
|
14
16
|
var dom = _ref.dom,
|
|
15
17
|
options = _ref.options,
|
|
@@ -17,6 +19,7 @@ var profileCardRenderer = exports.profileCardRenderer = function profileCardRend
|
|
|
17
19
|
node = _ref.node,
|
|
18
20
|
api = _ref.api;
|
|
19
21
|
var renderingProfileCard = false;
|
|
22
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
20
23
|
var key = (0, _v.default)();
|
|
21
24
|
var cleanupSelection;
|
|
22
25
|
var removeProfileCard = function removeProfileCard() {
|
|
@@ -25,7 +25,7 @@ var ACTIONS = exports.ACTIONS = {
|
|
|
25
25
|
SET_PROVIDER: 'SET_PROVIDER'
|
|
26
26
|
};
|
|
27
27
|
var PACKAGE_NAME = "@atlaskit/editor-plugin-mentions";
|
|
28
|
-
var PACKAGE_VERSION = "
|
|
28
|
+
var PACKAGE_VERSION = "8.2.7";
|
|
29
29
|
var setProvider = function setProvider(provider) {
|
|
30
30
|
return function (state, dispatch) {
|
|
31
31
|
if (dispatch) {
|
|
@@ -29,7 +29,7 @@ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol
|
|
|
29
29
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
30
30
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
31
31
|
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; }
|
|
32
|
-
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; }
|
|
32
|
+
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; } // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
33
33
|
var createInviteItem = function createInviteItem(_ref) {
|
|
34
34
|
var mentionProvider = _ref.mentionProvider,
|
|
35
35
|
onInviteItemMount = _ref.onInviteItemMount;
|
|
@@ -196,6 +196,7 @@ var buildNodesForTeamMention = function buildNodesForTeamMention(schema, selecte
|
|
|
196
196
|
id: member.id,
|
|
197
197
|
accessLevel: accessLevel,
|
|
198
198
|
userType: 'DEFAULT',
|
|
199
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
199
200
|
localId: (0, _uuid.default)()
|
|
200
201
|
});
|
|
201
202
|
inlineNodes.push(userMentionNode);
|
|
@@ -214,6 +215,7 @@ var createTypeAheadConfig = exports.createTypeAheadConfig = function createTypeA
|
|
|
214
215
|
HighlightComponent = _ref6.HighlightComponent,
|
|
215
216
|
api = _ref6.api,
|
|
216
217
|
handleMentionsChanged = _ref6.handleMentionsChanged;
|
|
218
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
217
219
|
var sessionId = (0, _uuid.default)();
|
|
218
220
|
var firstQueryWithoutResults = null;
|
|
219
221
|
var subscriptionKeys = new Set();
|
|
@@ -242,6 +244,7 @@ var createTypeAheadConfig = exports.createTypeAheadConfig = function createTypeA
|
|
|
242
244
|
var _ref8 = (_api$contextIdentifie = api === null || api === void 0 || (_api$contextIdentifie2 = api.contextIdentifier) === null || _api$contextIdentifie2 === void 0 ? void 0 : _api$contextIdentifie2.sharedState.currentState()) !== null && _api$contextIdentifie !== void 0 ? _api$contextIdentifie : {},
|
|
243
245
|
contextIdentifierProvider = _ref8.contextIdentifierProvider;
|
|
244
246
|
return new Promise(function (resolve, reject) {
|
|
247
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
245
248
|
var key = "loadingMentionsForTypeAhead_".concat((0, _uuid.default)());
|
|
246
249
|
var mentionsSubscribeCallback = function mentionsSubscribeCallback(mentions) {
|
|
247
250
|
var resultQuery = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
@@ -338,6 +341,8 @@ var createTypeAheadConfig = exports.createTypeAheadConfig = function createTypeA
|
|
|
338
341
|
taskItemId = taskItem.node.attrs.localId;
|
|
339
342
|
}
|
|
340
343
|
}
|
|
344
|
+
|
|
345
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
341
346
|
var mentionLocalId = (0, _uuid.default)();
|
|
342
347
|
if (handleMentionsChanged) {
|
|
343
348
|
if (taskItemId) {
|
|
@@ -360,6 +365,8 @@ var createTypeAheadConfig = exports.createTypeAheadConfig = function createTypeA
|
|
|
360
365
|
fireEvent((0, _analytics.buildTypeAheadInsertedPayload)(pickerElapsedTime, stats.keyCount.arrowUp, stats.keyCount.arrowDown, sessionId, mode, item.mention, mentionLocalId, sourceListItem.map(function (x) {
|
|
361
366
|
return x.mention;
|
|
362
367
|
}), query, contextIdentifierProvider, taskListId, taskItemId));
|
|
368
|
+
|
|
369
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
363
370
|
sessionId = (0, _uuid.default)();
|
|
364
371
|
if (mentionProvider && (0, _utils3.isTeamType)(userType)) {
|
|
365
372
|
return insert(buildNodesForTeamMention(schema, item.mention, mentionProvider, sanitizePrivateContent));
|
|
@@ -409,6 +416,8 @@ var createTypeAheadConfig = exports.createTypeAheadConfig = function createTypeA
|
|
|
409
416
|
}
|
|
410
417
|
}
|
|
411
418
|
subscriptionKeys.clear();
|
|
419
|
+
|
|
420
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
412
421
|
sessionId = (0, _uuid.default)();
|
|
413
422
|
}
|
|
414
423
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
1
2
|
import uuid from 'uuid';
|
|
2
3
|
import { getAnnotationMarksForPos } from '@atlaskit/editor-common/utils';
|
|
3
4
|
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
@@ -36,6 +37,7 @@ export const createSingleMentionFragment = ({
|
|
|
36
37
|
id,
|
|
37
38
|
accessLevel,
|
|
38
39
|
userType: userType === 'DEFAULT' ? null : userType,
|
|
40
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
39
41
|
localId: localId !== null && localId !== void 0 ? localId : uuid()
|
|
40
42
|
}, null, fg('editor_inline_comments_paste_insert_nodes') ? annotationMarksForPos : undefined);
|
|
41
43
|
const space = schema.text(' ', fg('editor_inline_comments_paste_insert_nodes') ? annotationMarksForPos : undefined);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { useEffect, useMemo } from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl-next';
|
|
3
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
3
4
|
import uuid from 'uuid';
|
|
4
5
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
5
6
|
import { toolbarInsertBlockMessages as messages, mentionMessages } from '@atlaskit/editor-common/messages';
|
|
@@ -80,6 +81,7 @@ const mentionsPlugin = ({
|
|
|
80
81
|
api
|
|
81
82
|
}) => {
|
|
82
83
|
var _options$sanitizePriv, _options$insertDispla;
|
|
84
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
83
85
|
const sessionId = uuid();
|
|
84
86
|
let previousMediaProvider;
|
|
85
87
|
const fireEvent = (payload, channel) => {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { bind } from 'bind-event-listener';
|
|
3
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
3
4
|
import uuid from 'uuid/v4';
|
|
4
5
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
5
6
|
import { ProfileCardComponent } from '../ui/ProfileCardComponent';
|
|
@@ -11,6 +12,7 @@ export const profileCardRenderer = ({
|
|
|
11
12
|
api
|
|
12
13
|
}) => {
|
|
13
14
|
let renderingProfileCard = false;
|
|
15
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
14
16
|
const key = uuid();
|
|
15
17
|
let cleanupSelection;
|
|
16
18
|
const removeProfileCard = () => {
|
|
@@ -14,7 +14,7 @@ export const ACTIONS = {
|
|
|
14
14
|
SET_PROVIDER: 'SET_PROVIDER'
|
|
15
15
|
};
|
|
16
16
|
const PACKAGE_NAME = "@atlaskit/editor-plugin-mentions";
|
|
17
|
-
const PACKAGE_VERSION = "
|
|
17
|
+
const PACKAGE_VERSION = "8.2.7";
|
|
18
18
|
const setProvider = provider => (state, dispatch) => {
|
|
19
19
|
if (dispatch) {
|
|
20
20
|
dispatch(state.tr.setMeta(mentionPluginKey, {
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
|
|
3
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
2
4
|
import uuid from 'uuid';
|
|
3
5
|
import { TypeAheadAvailableNodes } from '@atlaskit/editor-common/type-ahead';
|
|
4
6
|
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
@@ -171,6 +173,7 @@ const buildNodesForTeamMention = (schema, selectedMention, mentionProvider, sani
|
|
|
171
173
|
id: member.id,
|
|
172
174
|
accessLevel,
|
|
173
175
|
userType: 'DEFAULT',
|
|
176
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
174
177
|
localId: uuid()
|
|
175
178
|
});
|
|
176
179
|
inlineNodes.push(userMentionNode);
|
|
@@ -190,6 +193,7 @@ export const createTypeAheadConfig = ({
|
|
|
190
193
|
api,
|
|
191
194
|
handleMentionsChanged
|
|
192
195
|
}) => {
|
|
196
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
193
197
|
let sessionId = uuid();
|
|
194
198
|
let firstQueryWithoutResults = null;
|
|
195
199
|
const subscriptionKeys = new Set();
|
|
@@ -222,6 +226,7 @@ export const createTypeAheadConfig = ({
|
|
|
222
226
|
contextIdentifierProvider
|
|
223
227
|
} = (_api$contextIdentifie = api === null || api === void 0 ? void 0 : (_api$contextIdentifie2 = api.contextIdentifier) === null || _api$contextIdentifie2 === void 0 ? void 0 : _api$contextIdentifie2.sharedState.currentState()) !== null && _api$contextIdentifie !== void 0 ? _api$contextIdentifie : {};
|
|
224
228
|
return new Promise((resolve, reject) => {
|
|
229
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
225
230
|
const key = `loadingMentionsForTypeAhead_${uuid()}`;
|
|
226
231
|
const mentionsSubscribeCallback = (mentions, resultQuery = '', stats) => {
|
|
227
232
|
if (query !== resultQuery) {
|
|
@@ -323,6 +328,8 @@ export const createTypeAheadConfig = ({
|
|
|
323
328
|
taskItemId = taskItem.node.attrs.localId;
|
|
324
329
|
}
|
|
325
330
|
}
|
|
331
|
+
|
|
332
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
326
333
|
const mentionLocalId = uuid();
|
|
327
334
|
if (handleMentionsChanged) {
|
|
328
335
|
if (taskItemId) {
|
|
@@ -343,6 +350,8 @@ export const createTypeAheadConfig = ({
|
|
|
343
350
|
}
|
|
344
351
|
}
|
|
345
352
|
fireEvent(buildTypeAheadInsertedPayload(pickerElapsedTime, stats.keyCount.arrowUp, stats.keyCount.arrowDown, sessionId, mode, item.mention, mentionLocalId, sourceListItem.map(x => x.mention), query, contextIdentifierProvider, taskListId, taskItemId));
|
|
353
|
+
|
|
354
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
346
355
|
sessionId = uuid();
|
|
347
356
|
if (mentionProvider && isTeamType(userType)) {
|
|
348
357
|
return insert(buildNodesForTeamMention(schema, item.mention, mentionProvider, sanitizePrivateContent));
|
|
@@ -384,6 +393,8 @@ export const createTypeAheadConfig = ({
|
|
|
384
393
|
}
|
|
385
394
|
}
|
|
386
395
|
subscriptionKeys.clear();
|
|
396
|
+
|
|
397
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
387
398
|
sessionId = uuid();
|
|
388
399
|
}
|
|
389
400
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
1
2
|
import uuid from 'uuid';
|
|
2
3
|
import { getAnnotationMarksForPos } from '@atlaskit/editor-common/utils';
|
|
3
4
|
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
@@ -35,6 +36,7 @@ export var createSingleMentionFragment = function createSingleMentionFragment(_r
|
|
|
35
36
|
id: id,
|
|
36
37
|
accessLevel: accessLevel,
|
|
37
38
|
userType: userType === 'DEFAULT' ? null : userType,
|
|
39
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
38
40
|
localId: localId !== null && localId !== void 0 ? localId : uuid()
|
|
39
41
|
}, null, fg('editor_inline_comments_paste_insert_nodes') ? annotationMarksForPos : undefined);
|
|
40
42
|
var space = schema.text(' ', fg('editor_inline_comments_paste_insert_nodes') ? annotationMarksForPos : undefined);
|
|
@@ -5,6 +5,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
5
5
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
6
6
|
import React, { useEffect, useMemo } from 'react';
|
|
7
7
|
import { useIntl } from 'react-intl-next';
|
|
8
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
8
9
|
import uuid from 'uuid';
|
|
9
10
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
10
11
|
import { toolbarInsertBlockMessages as messages, mentionMessages } from '@atlaskit/editor-common/messages';
|
|
@@ -74,6 +75,7 @@ var mentionsPlugin = function mentionsPlugin(_ref3) {
|
|
|
74
75
|
var _options$sanitizePriv, _options$insertDispla;
|
|
75
76
|
var options = _ref3.config,
|
|
76
77
|
api = _ref3.api;
|
|
78
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
77
79
|
var sessionId = uuid();
|
|
78
80
|
var previousMediaProvider;
|
|
79
81
|
var fireEvent = function fireEvent(payload, channel) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { bind } from 'bind-event-listener';
|
|
3
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
3
4
|
import uuid from 'uuid/v4';
|
|
4
5
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
5
6
|
import { ProfileCardComponent } from '../ui/ProfileCardComponent';
|
|
@@ -10,6 +11,7 @@ export var profileCardRenderer = function profileCardRenderer(_ref) {
|
|
|
10
11
|
node = _ref.node,
|
|
11
12
|
api = _ref.api;
|
|
12
13
|
var renderingProfileCard = false;
|
|
14
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
13
15
|
var key = uuid();
|
|
14
16
|
var cleanupSelection;
|
|
15
17
|
var removeProfileCard = function removeProfileCard() {
|
|
@@ -17,7 +17,7 @@ export var ACTIONS = {
|
|
|
17
17
|
SET_PROVIDER: 'SET_PROVIDER'
|
|
18
18
|
};
|
|
19
19
|
var PACKAGE_NAME = "@atlaskit/editor-plugin-mentions";
|
|
20
|
-
var PACKAGE_VERSION = "
|
|
20
|
+
var PACKAGE_VERSION = "8.2.7";
|
|
21
21
|
var setProvider = function setProvider(provider) {
|
|
22
22
|
return function (state, dispatch) {
|
|
23
23
|
if (dispatch) {
|
|
@@ -6,6 +6,8 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
|
|
|
6
6
|
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; }
|
|
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 React from 'react';
|
|
9
|
+
|
|
10
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
9
11
|
import uuid from 'uuid';
|
|
10
12
|
import { TypeAheadAvailableNodes } from '@atlaskit/editor-common/type-ahead';
|
|
11
13
|
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
@@ -185,6 +187,7 @@ var buildNodesForTeamMention = function buildNodesForTeamMention(schema, selecte
|
|
|
185
187
|
id: member.id,
|
|
186
188
|
accessLevel: accessLevel,
|
|
187
189
|
userType: 'DEFAULT',
|
|
190
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
188
191
|
localId: uuid()
|
|
189
192
|
});
|
|
190
193
|
inlineNodes.push(userMentionNode);
|
|
@@ -203,6 +206,7 @@ export var createTypeAheadConfig = function createTypeAheadConfig(_ref6) {
|
|
|
203
206
|
HighlightComponent = _ref6.HighlightComponent,
|
|
204
207
|
api = _ref6.api,
|
|
205
208
|
handleMentionsChanged = _ref6.handleMentionsChanged;
|
|
209
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
206
210
|
var sessionId = uuid();
|
|
207
211
|
var firstQueryWithoutResults = null;
|
|
208
212
|
var subscriptionKeys = new Set();
|
|
@@ -231,6 +235,7 @@ export var createTypeAheadConfig = function createTypeAheadConfig(_ref6) {
|
|
|
231
235
|
var _ref8 = (_api$contextIdentifie = api === null || api === void 0 || (_api$contextIdentifie2 = api.contextIdentifier) === null || _api$contextIdentifie2 === void 0 ? void 0 : _api$contextIdentifie2.sharedState.currentState()) !== null && _api$contextIdentifie !== void 0 ? _api$contextIdentifie : {},
|
|
232
236
|
contextIdentifierProvider = _ref8.contextIdentifierProvider;
|
|
233
237
|
return new Promise(function (resolve, reject) {
|
|
238
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
234
239
|
var key = "loadingMentionsForTypeAhead_".concat(uuid());
|
|
235
240
|
var mentionsSubscribeCallback = function mentionsSubscribeCallback(mentions) {
|
|
236
241
|
var resultQuery = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
@@ -327,6 +332,8 @@ export var createTypeAheadConfig = function createTypeAheadConfig(_ref6) {
|
|
|
327
332
|
taskItemId = taskItem.node.attrs.localId;
|
|
328
333
|
}
|
|
329
334
|
}
|
|
335
|
+
|
|
336
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
330
337
|
var mentionLocalId = uuid();
|
|
331
338
|
if (handleMentionsChanged) {
|
|
332
339
|
if (taskItemId) {
|
|
@@ -349,6 +356,8 @@ export var createTypeAheadConfig = function createTypeAheadConfig(_ref6) {
|
|
|
349
356
|
fireEvent(buildTypeAheadInsertedPayload(pickerElapsedTime, stats.keyCount.arrowUp, stats.keyCount.arrowDown, sessionId, mode, item.mention, mentionLocalId, sourceListItem.map(function (x) {
|
|
350
357
|
return x.mention;
|
|
351
358
|
}), query, contextIdentifierProvider, taskListId, taskItemId));
|
|
359
|
+
|
|
360
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
352
361
|
sessionId = uuid();
|
|
353
362
|
if (mentionProvider && isTeamType(userType)) {
|
|
354
363
|
return insert(buildNodesForTeamMention(schema, item.mention, mentionProvider, sanitizePrivateContent));
|
|
@@ -398,6 +407,8 @@ export var createTypeAheadConfig = function createTypeAheadConfig(_ref6) {
|
|
|
398
407
|
}
|
|
399
408
|
}
|
|
400
409
|
subscriptionKeys.clear();
|
|
410
|
+
|
|
411
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
401
412
|
sessionId = uuid();
|
|
402
413
|
}
|
|
403
414
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-mentions",
|
|
3
|
-
"version": "8.2.
|
|
3
|
+
"version": "8.2.8",
|
|
4
4
|
"description": "Mentions plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"@atlaskit/portal": "^5.1.0",
|
|
47
47
|
"@atlaskit/profilecard": "^24.20.0",
|
|
48
48
|
"@atlaskit/theme": "^21.0.0",
|
|
49
|
-
"@atlaskit/tmp-editor-statsig": "^13.
|
|
50
|
-
"@atlaskit/tokens": "^
|
|
49
|
+
"@atlaskit/tmp-editor-statsig": "^13.32.0",
|
|
50
|
+
"@atlaskit/tokens": "^8.0.0",
|
|
51
51
|
"@babel/runtime": "^7.0.0",
|
|
52
52
|
"@compiled/react": "^0.18.6",
|
|
53
53
|
"bind-event-listener": "^3.0.0",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"uuid": "^3.1.0"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
|
-
"@atlaskit/editor-common": "^110.
|
|
58
|
+
"@atlaskit/editor-common": "^110.24.0",
|
|
59
59
|
"react": "^18.2.0",
|
|
60
60
|
"react-dom": "^18.2.0",
|
|
61
61
|
"react-intl-next": "npm:react-intl@^5.18.1"
|