@atlaskit/editor-plugin-mentions 8.0.0 → 8.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/cjs/editor-commands/index.js +3 -9
- package/dist/cjs/pm-plugins/main.js +1 -1
- package/dist/cjs/ui/InviteItem/index.js +3 -1
- package/dist/cjs/ui/type-ahead/index.js +3 -10
- package/dist/es2019/editor-commands/index.js +3 -9
- package/dist/es2019/pm-plugins/main.js +1 -1
- package/dist/es2019/ui/InviteItem/index.js +3 -1
- package/dist/es2019/ui/type-ahead/index.js +3 -10
- package/dist/esm/editor-commands/index.js +3 -9
- package/dist/esm/pm-plugins/main.js +1 -1
- package/dist/esm/ui/InviteItem/index.js +3 -1
- package/dist/esm/ui/type-ahead/index.js +3 -10
- package/package.json +12 -12
package/CHANGELOG.md
CHANGED
|
@@ -36,21 +36,15 @@ var createSingleMentionFragment = exports.createSingleMentionFragment = function
|
|
|
36
36
|
// Cache (locally) for later rendering
|
|
37
37
|
mentionProvider.cacheMentionName(id, renderName);
|
|
38
38
|
}
|
|
39
|
-
var annotationMarksForPos = (0, _platformFeatureFlags.fg)(
|
|
40
|
-
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
41
|
-
'editor_inline_comments_paste_insert_nodes') ? (0, _utils.getAnnotationMarksForPos)(tr.selection.$head) : undefined;
|
|
39
|
+
var annotationMarksForPos = (0, _platformFeatureFlags.fg)('editor_inline_comments_paste_insert_nodes') ? (0, _utils.getAnnotationMarksForPos)(tr.selection.$head) : undefined;
|
|
42
40
|
var mentionNode = schema.nodes.mention.createChecked({
|
|
43
41
|
text: text,
|
|
44
42
|
id: id,
|
|
45
43
|
accessLevel: accessLevel,
|
|
46
44
|
userType: userType === 'DEFAULT' ? null : userType,
|
|
47
45
|
localId: localId !== null && localId !== void 0 ? localId : (0, _uuid.default)()
|
|
48
|
-
}, null,
|
|
49
|
-
|
|
50
|
-
(0, _platformFeatureFlags.fg)('editor_inline_comments_paste_insert_nodes') ? annotationMarksForPos : undefined);
|
|
51
|
-
var space = schema.text(' ',
|
|
52
|
-
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
53
|
-
(0, _platformFeatureFlags.fg)('editor_inline_comments_paste_insert_nodes') ? annotationMarksForPos : undefined);
|
|
46
|
+
}, null, (0, _platformFeatureFlags.fg)('editor_inline_comments_paste_insert_nodes') ? annotationMarksForPos : undefined);
|
|
47
|
+
var space = schema.text(' ', (0, _platformFeatureFlags.fg)('editor_inline_comments_paste_insert_nodes') ? annotationMarksForPos : undefined);
|
|
54
48
|
return _model.Fragment.from([mentionNode, space]);
|
|
55
49
|
};
|
|
56
50
|
};
|
|
@@ -23,7 +23,7 @@ var ACTIONS = exports.ACTIONS = {
|
|
|
23
23
|
SET_PROVIDER: 'SET_PROVIDER'
|
|
24
24
|
};
|
|
25
25
|
var PACKAGE_NAME = "@atlaskit/editor-plugin-mentions";
|
|
26
|
-
var PACKAGE_VERSION = "
|
|
26
|
+
var PACKAGE_VERSION = "8.0.1";
|
|
27
27
|
var setProvider = function setProvider(provider) {
|
|
28
28
|
return function (state, dispatch) {
|
|
29
29
|
if (dispatch) {
|
|
@@ -62,7 +62,9 @@ var InviteItem = function InviteItem(_ref) {
|
|
|
62
62
|
}
|
|
63
63
|
}, [onMount]);
|
|
64
64
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
65
|
-
onMouseDown: onSelected
|
|
65
|
+
onMouseDown: onSelected
|
|
66
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
67
|
+
,
|
|
66
68
|
onMouseEnter: onItemMouseEnter,
|
|
67
69
|
"data-id": INVITE_ITEM_DESCRIPTION.id,
|
|
68
70
|
className: (0, _runtime.ax)(["_1reo15vq _18m915vq _bfhk1j28 _1e0c1ule _2mzuglyw _80omtlke", selected && "_bfhk2tgk"]),
|
|
@@ -171,7 +171,6 @@ var buildNodesForTeamMention = function buildNodesForTeamMention(schema, selecte
|
|
|
171
171
|
// build team link
|
|
172
172
|
var defaultTeamLink = "".concat(window.location.origin, "/people/team/").concat(teamId);
|
|
173
173
|
var teamLink = context && context.teamLink ? context.teamLink : defaultTeamLink;
|
|
174
|
-
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
175
174
|
var teamLinkNode = (0, _platformFeatureFlags.fg)('team-mention-inline-smartlink') ? schema.nodes.inlineCard.create({
|
|
176
175
|
url: teamLink
|
|
177
176
|
}) :
|
|
@@ -396,21 +395,15 @@ var createTypeAheadConfig = exports.createTypeAheadConfig = function createTypeA
|
|
|
396
395
|
// Cache (locally) for later rendering
|
|
397
396
|
mentionProvider.cacheMentionName(id, renderName);
|
|
398
397
|
}
|
|
399
|
-
var annotationMarksForPos = (0, _platformFeatureFlags.fg)(
|
|
400
|
-
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
401
|
-
'editor_inline_comments_paste_insert_nodes') ? (0, _utils.getAnnotationMarksForPos)(state.tr.selection.$head) : undefined;
|
|
398
|
+
var annotationMarksForPos = (0, _platformFeatureFlags.fg)('editor_inline_comments_paste_insert_nodes') ? (0, _utils.getAnnotationMarksForPos)(state.tr.selection.$head) : undefined;
|
|
402
399
|
var mentionNode = schema.nodes.mention.createChecked({
|
|
403
400
|
text: text,
|
|
404
401
|
id: id,
|
|
405
402
|
accessLevel: accessLevel,
|
|
406
403
|
userType: userType === 'DEFAULT' ? null : userType,
|
|
407
404
|
localId: mentionLocalId
|
|
408
|
-
}, null,
|
|
409
|
-
|
|
410
|
-
(0, _platformFeatureFlags.fg)('editor_inline_comments_paste_insert_nodes') ? annotationMarksForPos : undefined);
|
|
411
|
-
var space = schema.text(' ',
|
|
412
|
-
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
413
|
-
(0, _platformFeatureFlags.fg)('editor_inline_comments_paste_insert_nodes') ? annotationMarksForPos : undefined);
|
|
405
|
+
}, null, (0, _platformFeatureFlags.fg)('editor_inline_comments_paste_insert_nodes') ? annotationMarksForPos : undefined);
|
|
406
|
+
var space = schema.text(' ', (0, _platformFeatureFlags.fg)('editor_inline_comments_paste_insert_nodes') ? annotationMarksForPos : undefined);
|
|
414
407
|
return insert(_model.Fragment.from([mentionNode, space]));
|
|
415
408
|
},
|
|
416
409
|
dismiss: function dismiss(_ref1) {
|
|
@@ -30,21 +30,15 @@ export const createSingleMentionFragment = ({
|
|
|
30
30
|
// Cache (locally) for later rendering
|
|
31
31
|
mentionProvider.cacheMentionName(id, renderName);
|
|
32
32
|
}
|
|
33
|
-
const annotationMarksForPos = fg(
|
|
34
|
-
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
35
|
-
'editor_inline_comments_paste_insert_nodes') ? getAnnotationMarksForPos(tr.selection.$head) : undefined;
|
|
33
|
+
const annotationMarksForPos = fg('editor_inline_comments_paste_insert_nodes') ? getAnnotationMarksForPos(tr.selection.$head) : undefined;
|
|
36
34
|
const mentionNode = schema.nodes.mention.createChecked({
|
|
37
35
|
text,
|
|
38
36
|
id,
|
|
39
37
|
accessLevel,
|
|
40
38
|
userType: userType === 'DEFAULT' ? null : userType,
|
|
41
39
|
localId: localId !== null && localId !== void 0 ? localId : uuid()
|
|
42
|
-
}, null,
|
|
43
|
-
|
|
44
|
-
fg('editor_inline_comments_paste_insert_nodes') ? annotationMarksForPos : undefined);
|
|
45
|
-
const space = schema.text(' ',
|
|
46
|
-
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
47
|
-
fg('editor_inline_comments_paste_insert_nodes') ? annotationMarksForPos : undefined);
|
|
40
|
+
}, null, fg('editor_inline_comments_paste_insert_nodes') ? annotationMarksForPos : undefined);
|
|
41
|
+
const space = schema.text(' ', fg('editor_inline_comments_paste_insert_nodes') ? annotationMarksForPos : undefined);
|
|
48
42
|
return Fragment.from([mentionNode, space]);
|
|
49
43
|
};
|
|
50
44
|
export const insertMention = ({
|
|
@@ -12,7 +12,7 @@ export const ACTIONS = {
|
|
|
12
12
|
SET_PROVIDER: 'SET_PROVIDER'
|
|
13
13
|
};
|
|
14
14
|
const PACKAGE_NAME = "@atlaskit/editor-plugin-mentions";
|
|
15
|
-
const PACKAGE_VERSION = "
|
|
15
|
+
const PACKAGE_VERSION = "8.0.1";
|
|
16
16
|
const setProvider = provider => (state, dispatch) => {
|
|
17
17
|
if (dispatch) {
|
|
18
18
|
dispatch(state.tr.setMeta(mentionPluginKey, {
|
|
@@ -54,7 +54,9 @@ const InviteItem = ({
|
|
|
54
54
|
}
|
|
55
55
|
}, [onMount]);
|
|
56
56
|
return /*#__PURE__*/React.createElement("div", {
|
|
57
|
-
onMouseDown: onSelected
|
|
57
|
+
onMouseDown: onSelected
|
|
58
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
59
|
+
,
|
|
58
60
|
onMouseEnter: onItemMouseEnter,
|
|
59
61
|
"data-id": INVITE_ITEM_DESCRIPTION.id,
|
|
60
62
|
className: ax(["_1reo15vq _18m915vq _bfhk1j28 _1e0c1ule _2mzuglyw _80omtlke", selected && "_bfhk14ae"])
|
|
@@ -144,7 +144,6 @@ const buildNodesForTeamMention = (schema, selectedMention, mentionProvider, sani
|
|
|
144
144
|
// build team link
|
|
145
145
|
const defaultTeamLink = `${window.location.origin}/people/team/${teamId}`;
|
|
146
146
|
const teamLink = context && context.teamLink ? context.teamLink : defaultTeamLink;
|
|
147
|
-
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
148
147
|
const teamLinkNode = fg('team-mention-inline-smartlink') ? schema.nodes.inlineCard.create({
|
|
149
148
|
url: teamLink
|
|
150
149
|
}) :
|
|
@@ -379,21 +378,15 @@ export const createTypeAheadConfig = ({
|
|
|
379
378
|
// Cache (locally) for later rendering
|
|
380
379
|
mentionProvider.cacheMentionName(id, renderName);
|
|
381
380
|
}
|
|
382
|
-
const annotationMarksForPos = fg(
|
|
383
|
-
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
384
|
-
'editor_inline_comments_paste_insert_nodes') ? getAnnotationMarksForPos(state.tr.selection.$head) : undefined;
|
|
381
|
+
const annotationMarksForPos = fg('editor_inline_comments_paste_insert_nodes') ? getAnnotationMarksForPos(state.tr.selection.$head) : undefined;
|
|
385
382
|
const mentionNode = schema.nodes.mention.createChecked({
|
|
386
383
|
text,
|
|
387
384
|
id,
|
|
388
385
|
accessLevel,
|
|
389
386
|
userType: userType === 'DEFAULT' ? null : userType,
|
|
390
387
|
localId: mentionLocalId
|
|
391
|
-
}, null,
|
|
392
|
-
|
|
393
|
-
fg('editor_inline_comments_paste_insert_nodes') ? annotationMarksForPos : undefined);
|
|
394
|
-
const space = schema.text(' ',
|
|
395
|
-
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
396
|
-
fg('editor_inline_comments_paste_insert_nodes') ? annotationMarksForPos : undefined);
|
|
388
|
+
}, null, fg('editor_inline_comments_paste_insert_nodes') ? annotationMarksForPos : undefined);
|
|
389
|
+
const space = schema.text(' ', fg('editor_inline_comments_paste_insert_nodes') ? annotationMarksForPos : undefined);
|
|
397
390
|
return insert(Fragment.from([mentionNode, space]));
|
|
398
391
|
},
|
|
399
392
|
dismiss({
|
|
@@ -29,21 +29,15 @@ export var createSingleMentionFragment = function createSingleMentionFragment(_r
|
|
|
29
29
|
// Cache (locally) for later rendering
|
|
30
30
|
mentionProvider.cacheMentionName(id, renderName);
|
|
31
31
|
}
|
|
32
|
-
var annotationMarksForPos = fg(
|
|
33
|
-
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
34
|
-
'editor_inline_comments_paste_insert_nodes') ? getAnnotationMarksForPos(tr.selection.$head) : undefined;
|
|
32
|
+
var annotationMarksForPos = fg('editor_inline_comments_paste_insert_nodes') ? getAnnotationMarksForPos(tr.selection.$head) : undefined;
|
|
35
33
|
var mentionNode = schema.nodes.mention.createChecked({
|
|
36
34
|
text: text,
|
|
37
35
|
id: id,
|
|
38
36
|
accessLevel: accessLevel,
|
|
39
37
|
userType: userType === 'DEFAULT' ? null : userType,
|
|
40
38
|
localId: localId !== null && localId !== void 0 ? localId : uuid()
|
|
41
|
-
}, null,
|
|
42
|
-
|
|
43
|
-
fg('editor_inline_comments_paste_insert_nodes') ? annotationMarksForPos : undefined);
|
|
44
|
-
var space = schema.text(' ',
|
|
45
|
-
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
46
|
-
fg('editor_inline_comments_paste_insert_nodes') ? annotationMarksForPos : undefined);
|
|
39
|
+
}, null, fg('editor_inline_comments_paste_insert_nodes') ? annotationMarksForPos : undefined);
|
|
40
|
+
var space = schema.text(' ', fg('editor_inline_comments_paste_insert_nodes') ? annotationMarksForPos : undefined);
|
|
47
41
|
return Fragment.from([mentionNode, space]);
|
|
48
42
|
};
|
|
49
43
|
};
|
|
@@ -15,7 +15,7 @@ export var ACTIONS = {
|
|
|
15
15
|
SET_PROVIDER: 'SET_PROVIDER'
|
|
16
16
|
};
|
|
17
17
|
var PACKAGE_NAME = "@atlaskit/editor-plugin-mentions";
|
|
18
|
-
var PACKAGE_VERSION = "
|
|
18
|
+
var PACKAGE_VERSION = "8.0.1";
|
|
19
19
|
var setProvider = function setProvider(provider) {
|
|
20
20
|
return function (state, dispatch) {
|
|
21
21
|
if (dispatch) {
|
|
@@ -53,7 +53,9 @@ var InviteItem = function InviteItem(_ref) {
|
|
|
53
53
|
}
|
|
54
54
|
}, [onMount]);
|
|
55
55
|
return /*#__PURE__*/React.createElement("div", {
|
|
56
|
-
onMouseDown: onSelected
|
|
56
|
+
onMouseDown: onSelected
|
|
57
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
58
|
+
,
|
|
57
59
|
onMouseEnter: onItemMouseEnter,
|
|
58
60
|
"data-id": INVITE_ITEM_DESCRIPTION.id,
|
|
59
61
|
className: ax(["_1reo15vq _18m915vq _bfhk1j28 _1e0c1ule _2mzuglyw _80omtlke", selected && "_bfhk2tgk"]),
|
|
@@ -160,7 +160,6 @@ var buildNodesForTeamMention = function buildNodesForTeamMention(schema, selecte
|
|
|
160
160
|
// build team link
|
|
161
161
|
var defaultTeamLink = "".concat(window.location.origin, "/people/team/").concat(teamId);
|
|
162
162
|
var teamLink = context && context.teamLink ? context.teamLink : defaultTeamLink;
|
|
163
|
-
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
164
163
|
var teamLinkNode = fg('team-mention-inline-smartlink') ? schema.nodes.inlineCard.create({
|
|
165
164
|
url: teamLink
|
|
166
165
|
}) :
|
|
@@ -385,21 +384,15 @@ export var createTypeAheadConfig = function createTypeAheadConfig(_ref6) {
|
|
|
385
384
|
// Cache (locally) for later rendering
|
|
386
385
|
mentionProvider.cacheMentionName(id, renderName);
|
|
387
386
|
}
|
|
388
|
-
var annotationMarksForPos = fg(
|
|
389
|
-
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
390
|
-
'editor_inline_comments_paste_insert_nodes') ? getAnnotationMarksForPos(state.tr.selection.$head) : undefined;
|
|
387
|
+
var annotationMarksForPos = fg('editor_inline_comments_paste_insert_nodes') ? getAnnotationMarksForPos(state.tr.selection.$head) : undefined;
|
|
391
388
|
var mentionNode = schema.nodes.mention.createChecked({
|
|
392
389
|
text: text,
|
|
393
390
|
id: id,
|
|
394
391
|
accessLevel: accessLevel,
|
|
395
392
|
userType: userType === 'DEFAULT' ? null : userType,
|
|
396
393
|
localId: mentionLocalId
|
|
397
|
-
}, null,
|
|
398
|
-
|
|
399
|
-
fg('editor_inline_comments_paste_insert_nodes') ? annotationMarksForPos : undefined);
|
|
400
|
-
var space = schema.text(' ',
|
|
401
|
-
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
402
|
-
fg('editor_inline_comments_paste_insert_nodes') ? annotationMarksForPos : undefined);
|
|
394
|
+
}, null, fg('editor_inline_comments_paste_insert_nodes') ? annotationMarksForPos : undefined);
|
|
395
|
+
var space = schema.text(' ', fg('editor_inline_comments_paste_insert_nodes') ? annotationMarksForPos : undefined);
|
|
403
396
|
return insert(Fragment.from([mentionNode, space]));
|
|
404
397
|
},
|
|
405
398
|
dismiss: function dismiss(_ref1) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-mentions",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.2",
|
|
4
4
|
"description": "Mentions plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -30,23 +30,23 @@
|
|
|
30
30
|
"atlaskit:src": "src/index.ts",
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@atlaskit/adf-schema": "^51.2.0",
|
|
33
|
-
"@atlaskit/css": "^0.
|
|
34
|
-
"@atlaskit/editor-plugin-analytics": "^6.
|
|
35
|
-
"@atlaskit/editor-plugin-base": "^7.
|
|
33
|
+
"@atlaskit/css": "^0.15.0",
|
|
34
|
+
"@atlaskit/editor-plugin-analytics": "^6.1.0",
|
|
35
|
+
"@atlaskit/editor-plugin-base": "^7.1.0",
|
|
36
36
|
"@atlaskit/editor-plugin-context-identifier": "^6.0.0",
|
|
37
|
-
"@atlaskit/editor-plugin-selection": "^6.
|
|
38
|
-
"@atlaskit/editor-plugin-type-ahead": "^6.
|
|
37
|
+
"@atlaskit/editor-plugin-selection": "^6.1.0",
|
|
38
|
+
"@atlaskit/editor-plugin-type-ahead": "^6.4.0",
|
|
39
39
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
40
|
-
"@atlaskit/icon": "^28.
|
|
40
|
+
"@atlaskit/icon": "^28.5.0",
|
|
41
41
|
"@atlaskit/link": "^3.2.0",
|
|
42
|
-
"@atlaskit/mention": "^24.
|
|
42
|
+
"@atlaskit/mention": "^24.3.0",
|
|
43
43
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
44
44
|
"@atlaskit/popper": "^7.1.0",
|
|
45
45
|
"@atlaskit/portal": "^5.1.0",
|
|
46
|
-
"@atlaskit/profilecard": "^24.
|
|
46
|
+
"@atlaskit/profilecard": "^24.20.0",
|
|
47
47
|
"@atlaskit/theme": "^21.0.0",
|
|
48
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
49
|
-
"@atlaskit/tokens": "^6.
|
|
48
|
+
"@atlaskit/tmp-editor-statsig": "^13.10.0",
|
|
49
|
+
"@atlaskit/tokens": "^6.5.0",
|
|
50
50
|
"@babel/runtime": "^7.0.0",
|
|
51
51
|
"@compiled/react": "^0.18.3",
|
|
52
52
|
"bind-event-listener": "^3.0.0",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"uuid": "^3.1.0"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
|
-
"@atlaskit/editor-common": "^110.
|
|
57
|
+
"@atlaskit/editor-common": "^110.12.0",
|
|
58
58
|
"react": "^18.2.0",
|
|
59
59
|
"react-dom": "^18.2.0",
|
|
60
60
|
"react-intl-next": "npm:react-intl@^5.18.1"
|