@atlaskit/editor-plugin-mentions 8.0.1 → 8.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -2
- package/dist/cjs/editor-commands/index.js +3 -9
- package/dist/cjs/ui/type-ahead/index.js +3 -10
- package/dist/es2019/editor-commands/index.js +3 -9
- package/dist/es2019/ui/type-ahead/index.js +3 -10
- package/dist/esm/editor-commands/index.js +3 -9
- package/dist/esm/ui/type-ahead/index.js +3 -10
- package/package.json +12 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-mentions
|
|
2
2
|
|
|
3
|
+
## 8.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 8.0.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
3
15
|
## 8.0.1
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -235,7 +247,6 @@
|
|
|
235
247
|
shared context or singletons.
|
|
236
248
|
|
|
237
249
|
**HOW TO ADJUST:**
|
|
238
|
-
|
|
239
250
|
- Consumers must now explicitly install `@atlaskit/editor-common` in their own project if they use
|
|
240
251
|
any of these editor plugins.
|
|
241
252
|
- Ensure the version you install matches the version required by the plugins.
|
|
@@ -823,7 +834,6 @@
|
|
|
823
834
|
[`30a69f02904da`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/30a69f02904da) -
|
|
824
835
|
[ED-23460] Make sure that error analytics in editor-plugin-mentions can fire by using actions from
|
|
825
836
|
editor-plugin-analytics
|
|
826
|
-
|
|
827
837
|
- **@atlaskit/editor-common**: Add types for `@atlaskit/editor-plugin-mentions` analytics
|
|
828
838
|
- **@atlaskit/editor-plugin-mentions**: Switch to using `@atlaskit/editor-plugin-analytics`
|
|
829
839
|
actions so that error events can be queued and fired consistently
|
|
@@ -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
|
};
|
|
@@ -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 = ({
|
|
@@ -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
|
};
|
|
@@ -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.3",
|
|
4
4
|
"description": "Mentions plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -30,31 +30,31 @@
|
|
|
30
30
|
"atlaskit:src": "src/index.ts",
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@atlaskit/adf-schema": "^51.2.0",
|
|
33
|
-
"@atlaskit/css": "^0.
|
|
33
|
+
"@atlaskit/css": "^0.15.0",
|
|
34
34
|
"@atlaskit/editor-plugin-analytics": "^6.1.0",
|
|
35
|
-
"@atlaskit/editor-plugin-base": "^7.
|
|
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": "^13.
|
|
49
|
-
"@atlaskit/tokens": "^
|
|
48
|
+
"@atlaskit/tmp-editor-statsig": "^13.13.0",
|
|
49
|
+
"@atlaskit/tokens": "^7.0.0",
|
|
50
50
|
"@babel/runtime": "^7.0.0",
|
|
51
|
-
"@compiled/react": "^0.18.
|
|
51
|
+
"@compiled/react": "^0.18.6",
|
|
52
52
|
"bind-event-listener": "^3.0.0",
|
|
53
53
|
"focus-trap": "^2.4.5",
|
|
54
54
|
"uuid": "^3.1.0"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
|
-
"@atlaskit/editor-common": "^110.
|
|
57
|
+
"@atlaskit/editor-common": "^110.13.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"
|