@atlaskit/editor-plugin-mentions 30.0.3 → 31.0.0
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 +11 -0
- package/dist/cjs/pm-plugins/main.js +1 -1
- package/dist/cjs/ui/type-ahead/index.js +10 -1
- package/dist/es2019/pm-plugins/main.js +1 -1
- package/dist/es2019/ui/type-ahead/index.js +10 -1
- package/dist/esm/pm-plugins/main.js +1 -1
- package/dist/esm/ui/type-ahead/index.js +10 -1
- package/package.json +13 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-mentions
|
|
2
2
|
|
|
3
|
+
## 31.0.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`cd47720f33219`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/cd47720f33219) -
|
|
8
|
+
Report team mentions as creationMethod 'linkpicker_searchResult' instead of 'unknown' on the link
|
|
9
|
+
created event, and add a linkCreationType attribute ('mention' | 'conventionalSmartLink' | 'link')
|
|
10
|
+
so mentions can be told apart from conventional smart links. The team mention change is behind the
|
|
11
|
+
`platform_editor_team_mention_link_analytics` gate.
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
3
14
|
## 30.0.3
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
|
@@ -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 = "30.0.
|
|
48
|
+
var PACKAGE_VERSION = "30.0.3";
|
|
49
49
|
var setProvider = function setProvider(provider) {
|
|
50
50
|
return function (state, dispatch) {
|
|
51
51
|
if (dispatch) {
|
|
@@ -12,6 +12,8 @@ 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 _enums = require("@atlaskit/editor-common/analytics/types/enums");
|
|
16
|
+
var _card = require("@atlaskit/editor-common/card");
|
|
15
17
|
var _mentions = require("@atlaskit/editor-common/messages/mentions");
|
|
16
18
|
var _typeAhead = require("@atlaskit/editor-common/type-ahead");
|
|
17
19
|
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
@@ -655,7 +657,14 @@ var createTypeAheadConfig = exports.createTypeAheadConfig = function createTypeA
|
|
|
655
657
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
656
658
|
sessionId = (0, _uuid.v4)();
|
|
657
659
|
if (mentionProvider && (0, _utils3.isTeamType)(userType)) {
|
|
658
|
-
|
|
660
|
+
var teamMentionTr = insert(buildNodesForTeamMention(schema, item.mention, mentionProvider, sanitizePrivateContent));
|
|
661
|
+
if ((0, _fg.fg)('platform_editor_team_mention_link_analytics')) {
|
|
662
|
+
return (0, _card.addLinkMetadata)(state.selection, teamMentionTr, {
|
|
663
|
+
action: _enums.ACTION.INSERTED,
|
|
664
|
+
inputMethod: _enums.INPUT_METHOD.MENTION_TYPEAHEAD
|
|
665
|
+
});
|
|
666
|
+
}
|
|
667
|
+
return teamMentionTr;
|
|
659
668
|
}
|
|
660
669
|
if (!isAgentMentionInsertion && isXProductUser && mentionProvider && mentionProvider.inviteXProductUser) {
|
|
661
670
|
mentionProvider.inviteXProductUser(id, name);
|
|
@@ -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 = "30.0.
|
|
37
|
+
const PACKAGE_VERSION = "30.0.3";
|
|
38
38
|
const setProvider = provider => (state, dispatch) => {
|
|
39
39
|
if (dispatch) {
|
|
40
40
|
dispatch(state.tr.setMeta(mentionPluginKey, {
|
|
@@ -2,6 +2,8 @@ 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 { ACTION, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
6
|
+
import { addLinkMetadata } from '@atlaskit/editor-common/card';
|
|
5
7
|
import { mentionMessages } from '@atlaskit/editor-common/messages/mentions';
|
|
6
8
|
import { TypeAheadAvailableNodes } from '@atlaskit/editor-common/type-ahead';
|
|
7
9
|
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
@@ -620,7 +622,14 @@ export const createTypeAheadConfig = ({
|
|
|
620
622
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
621
623
|
sessionId = uuid();
|
|
622
624
|
if (mentionProvider && isTeamType(userType)) {
|
|
623
|
-
|
|
625
|
+
const teamMentionTr = insert(buildNodesForTeamMention(schema, item.mention, mentionProvider, sanitizePrivateContent));
|
|
626
|
+
if (fg('platform_editor_team_mention_link_analytics')) {
|
|
627
|
+
return addLinkMetadata(state.selection, teamMentionTr, {
|
|
628
|
+
action: ACTION.INSERTED,
|
|
629
|
+
inputMethod: INPUT_METHOD.MENTION_TYPEAHEAD
|
|
630
|
+
});
|
|
631
|
+
}
|
|
632
|
+
return teamMentionTr;
|
|
624
633
|
}
|
|
625
634
|
if (!isAgentMentionInsertion && isXProductUser && mentionProvider && mentionProvider.inviteXProductUser) {
|
|
626
635
|
mentionProvider.inviteXProductUser(id, name);
|
|
@@ -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 = "30.0.
|
|
40
|
+
var PACKAGE_VERSION = "30.0.3";
|
|
41
41
|
var setProvider = function setProvider(provider) {
|
|
42
42
|
return function (state, dispatch) {
|
|
43
43
|
if (dispatch) {
|
|
@@ -9,6 +9,8 @@ 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 { ACTION, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
13
|
+
import { addLinkMetadata } from '@atlaskit/editor-common/card';
|
|
12
14
|
import { mentionMessages } from '@atlaskit/editor-common/messages/mentions';
|
|
13
15
|
import { TypeAheadAvailableNodes } from '@atlaskit/editor-common/type-ahead';
|
|
14
16
|
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
@@ -646,7 +648,14 @@ export var createTypeAheadConfig = function createTypeAheadConfig(_ref1) {
|
|
|
646
648
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
647
649
|
sessionId = uuid();
|
|
648
650
|
if (mentionProvider && isTeamType(userType)) {
|
|
649
|
-
|
|
651
|
+
var teamMentionTr = insert(buildNodesForTeamMention(schema, item.mention, mentionProvider, sanitizePrivateContent));
|
|
652
|
+
if (fg('platform_editor_team_mention_link_analytics')) {
|
|
653
|
+
return addLinkMetadata(state.selection, teamMentionTr, {
|
|
654
|
+
action: ACTION.INSERTED,
|
|
655
|
+
inputMethod: INPUT_METHOD.MENTION_TYPEAHEAD
|
|
656
|
+
});
|
|
657
|
+
}
|
|
658
|
+
return teamMentionTr;
|
|
650
659
|
}
|
|
651
660
|
if (!isAgentMentionInsertion && isXProductUser && mentionProvider && mentionProvider.inviteXProductUser) {
|
|
652
661
|
mentionProvider.inviteXProductUser(id, name);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-mentions",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "31.0.0",
|
|
4
4
|
"description": "Mentions plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -24,11 +24,11 @@
|
|
|
24
24
|
"@atlaskit/adf-schema": "^57.7.0",
|
|
25
25
|
"@atlaskit/css": "^1.1.0",
|
|
26
26
|
"@atlaskit/editor-json-transformer": "^10.0.0",
|
|
27
|
-
"@atlaskit/editor-plugin-analytics": "^
|
|
28
|
-
"@atlaskit/editor-plugin-base": "^
|
|
29
|
-
"@atlaskit/editor-plugin-context-identifier": "^
|
|
30
|
-
"@atlaskit/editor-plugin-selection": "^
|
|
31
|
-
"@atlaskit/editor-plugin-type-ahead": "^
|
|
27
|
+
"@atlaskit/editor-plugin-analytics": "^29.0.0",
|
|
28
|
+
"@atlaskit/editor-plugin-base": "^30.0.0",
|
|
29
|
+
"@atlaskit/editor-plugin-context-identifier": "^29.0.0",
|
|
30
|
+
"@atlaskit/editor-plugin-selection": "^29.0.0",
|
|
31
|
+
"@atlaskit/editor-plugin-type-ahead": "^30.0.0",
|
|
32
32
|
"@atlaskit/editor-prosemirror": "^9.0.0",
|
|
33
33
|
"@atlaskit/feature-gate-js-client": "^7.0.0",
|
|
34
34
|
"@atlaskit/icon": "^38.0.0",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@atlaskit/link": "^5.1.0",
|
|
37
37
|
"@atlaskit/lozenge": "^17.0.0",
|
|
38
38
|
"@atlaskit/mention": "^30.3.0",
|
|
39
|
-
"@atlaskit/node-data-provider": "^
|
|
39
|
+
"@atlaskit/node-data-provider": "^30.0.0",
|
|
40
40
|
"@atlaskit/platform-feature-experiments": "^0.3.0",
|
|
41
41
|
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
42
42
|
"@atlaskit/popper": "^9.4.0",
|
|
@@ -60,14 +60,14 @@
|
|
|
60
60
|
"uuid": "^11.1.1"
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
|
-
"@atlaskit/editor-common": "^
|
|
63
|
+
"@atlaskit/editor-common": "^133.0.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
|
-
"@atlaskit/button": "^25.
|
|
70
|
-
"@atlaskit/editor-core": "^
|
|
69
|
+
"@atlaskit/button": "^25.5.0",
|
|
70
|
+
"@atlaskit/editor-core": "^239.0.0",
|
|
71
71
|
"@atlassian/workbench": "workspace:*",
|
|
72
72
|
"@testing-library/react": "^16.3.0",
|
|
73
73
|
"react": "^19.2.0",
|
|
@@ -87,6 +87,9 @@
|
|
|
87
87
|
"team-mention-inline-smartlink": {
|
|
88
88
|
"type": "boolean"
|
|
89
89
|
},
|
|
90
|
+
"platform_editor_team_mention_link_analytics": {
|
|
91
|
+
"type": "boolean"
|
|
92
|
+
},
|
|
90
93
|
"platform_editor_mention_provider_via_plugin_config": {
|
|
91
94
|
"type": "boolean"
|
|
92
95
|
},
|