@atlaskit/editor-plugin-mentions 13.0.0 → 13.1.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 +7 -4
- package/dist/es2019/pm-plugins/main.js +1 -1
- package/dist/es2019/ui/type-ahead/index.js +8 -5
- package/dist/esm/pm-plugins/main.js +1 -1
- package/dist/esm/ui/type-ahead/index.js +8 -5
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-mentions
|
|
2
2
|
|
|
3
|
+
## 13.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`7567557c596c7`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7567557c596c7) -
|
|
8
|
+
[ux] Update mention item styling platform_editor_agent_mentions
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
3
14
|
## 13.0.0
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
|
@@ -32,7 +32,7 @@ var ACTIONS = exports.ACTIONS = {
|
|
|
32
32
|
var AGENT_USER_TYPES = new Set(['APP', 'AGENT']);
|
|
33
33
|
var AI_STREAMING_TRANSFORMATION_META_KEY = 'isAIStreamingTransformation';
|
|
34
34
|
var PACKAGE_NAME = "@atlaskit/editor-plugin-mentions";
|
|
35
|
-
var PACKAGE_VERSION = "
|
|
35
|
+
var PACKAGE_VERSION = "13.0.0";
|
|
36
36
|
var setProvider = function setProvider(provider) {
|
|
37
37
|
return function (state, dispatch) {
|
|
38
38
|
if (dispatch) {
|
|
@@ -96,6 +96,7 @@ var withInviteItem = function withInviteItem(_ref3) {
|
|
|
96
96
|
};
|
|
97
97
|
};
|
|
98
98
|
var mentionToTypeaheadItem = exports.mentionToTypeaheadItem = function mentionToTypeaheadItem(mention) {
|
|
99
|
+
var itemHeight = (0, _expVal.expVal)('platform_editor_agent_mentions', 'isEnabled', false) ? _item.MENTION_ITEM_HEIGHT_REFRESHED : _item.MENTION_ITEM_HEIGHT;
|
|
99
100
|
return {
|
|
100
101
|
title: mention.id,
|
|
101
102
|
render: function render(_ref4) {
|
|
@@ -106,11 +107,12 @@ var mentionToTypeaheadItem = exports.mentionToTypeaheadItem = function mentionTo
|
|
|
106
107
|
mention: mention,
|
|
107
108
|
selected: isSelected,
|
|
108
109
|
onMouseEnter: onHover,
|
|
109
|
-
onSelection: onClick
|
|
110
|
+
onSelection: onClick,
|
|
111
|
+
height: itemHeight
|
|
110
112
|
});
|
|
111
113
|
},
|
|
112
114
|
getCustomComponentHeight: function getCustomComponentHeight() {
|
|
113
|
-
return
|
|
115
|
+
return itemHeight;
|
|
114
116
|
},
|
|
115
117
|
mention: mention
|
|
116
118
|
};
|
|
@@ -331,14 +333,15 @@ var createTypeAheadConfig = exports.createTypeAheadConfig = function createTypeA
|
|
|
331
333
|
var _item$mention;
|
|
332
334
|
return !isAgentUserType(((_item$mention = item.mention) === null || _item$mention === void 0 ? void 0 : _item$mention.userType) || '');
|
|
333
335
|
},
|
|
334
|
-
limit: 6
|
|
336
|
+
limit: (0, _expVal.expVal)('platform_editor_agent_mentions', 'isEnabled', false) ? 5 : 6
|
|
335
337
|
}, {
|
|
336
338
|
id: 'agents',
|
|
337
339
|
title: intl.formatMessage(_messages.mentionMessages.typeAheadSectionAgents),
|
|
338
340
|
filter: function filter(item) {
|
|
339
341
|
var _item$mention2;
|
|
340
342
|
return isAgentUserType(((_item$mention2 = item.mention) === null || _item$mention2 === void 0 ? void 0 : _item$mention2.userType) || '');
|
|
341
|
-
}
|
|
343
|
+
},
|
|
344
|
+
limit: (0, _expVal.expVal)('platform_editor_agent_mentions', 'isEnabled', false) ? 5 : undefined
|
|
342
345
|
}];
|
|
343
346
|
},
|
|
344
347
|
onOpen: function onOpen() {
|
|
@@ -17,7 +17,7 @@ export const ACTIONS = {
|
|
|
17
17
|
const AGENT_USER_TYPES = new Set(['APP', 'AGENT']);
|
|
18
18
|
const AI_STREAMING_TRANSFORMATION_META_KEY = 'isAIStreamingTransformation';
|
|
19
19
|
const PACKAGE_NAME = "@atlaskit/editor-plugin-mentions";
|
|
20
|
-
const PACKAGE_VERSION = "
|
|
20
|
+
const PACKAGE_VERSION = "13.0.0";
|
|
21
21
|
const setProvider = provider => (state, dispatch) => {
|
|
22
22
|
if (dispatch) {
|
|
23
23
|
dispatch(state.tr.setMeta(mentionPluginKey, {
|
|
@@ -6,7 +6,7 @@ import { mentionMessages } from '@atlaskit/editor-common/messages';
|
|
|
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';
|
|
9
|
-
import { MENTION_ITEM_HEIGHT, MentionItem } from '@atlaskit/mention/item';
|
|
9
|
+
import { MENTION_ITEM_HEIGHT, MENTION_ITEM_HEIGHT_REFRESHED, MentionItem } from '@atlaskit/mention/item';
|
|
10
10
|
import { isResolvingMentionProvider } from '@atlaskit/mention/resource';
|
|
11
11
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
12
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
@@ -75,6 +75,7 @@ const withInviteItem = ({
|
|
|
75
75
|
inviteItem];
|
|
76
76
|
};
|
|
77
77
|
export const mentionToTypeaheadItem = mention => {
|
|
78
|
+
const itemHeight = expVal('platform_editor_agent_mentions', 'isEnabled', false) ? MENTION_ITEM_HEIGHT_REFRESHED : MENTION_ITEM_HEIGHT;
|
|
78
79
|
return {
|
|
79
80
|
title: mention.id,
|
|
80
81
|
render: ({
|
|
@@ -85,10 +86,11 @@ export const mentionToTypeaheadItem = mention => {
|
|
|
85
86
|
mention: mention,
|
|
86
87
|
selected: isSelected,
|
|
87
88
|
onMouseEnter: onHover,
|
|
88
|
-
onSelection: onClick
|
|
89
|
+
onSelection: onClick,
|
|
90
|
+
height: itemHeight
|
|
89
91
|
}),
|
|
90
92
|
getCustomComponentHeight: () => {
|
|
91
|
-
return
|
|
93
|
+
return itemHeight;
|
|
92
94
|
},
|
|
93
95
|
mention
|
|
94
96
|
};
|
|
@@ -309,14 +311,15 @@ export const createTypeAheadConfig = ({
|
|
|
309
311
|
var _item$mention;
|
|
310
312
|
return !isAgentUserType(((_item$mention = item.mention) === null || _item$mention === void 0 ? void 0 : _item$mention.userType) || '');
|
|
311
313
|
},
|
|
312
|
-
limit: 6
|
|
314
|
+
limit: expVal('platform_editor_agent_mentions', 'isEnabled', false) ? 5 : 6
|
|
313
315
|
}, {
|
|
314
316
|
id: 'agents',
|
|
315
317
|
title: intl.formatMessage(mentionMessages.typeAheadSectionAgents),
|
|
316
318
|
filter: item => {
|
|
317
319
|
var _item$mention2;
|
|
318
320
|
return isAgentUserType(((_item$mention2 = item.mention) === null || _item$mention2 === void 0 ? void 0 : _item$mention2.userType) || '');
|
|
319
|
-
}
|
|
321
|
+
},
|
|
322
|
+
limit: expVal('platform_editor_agent_mentions', 'isEnabled', false) ? 5 : undefined
|
|
320
323
|
}];
|
|
321
324
|
},
|
|
322
325
|
onOpen: () => {
|
|
@@ -24,7 +24,7 @@ export var ACTIONS = {
|
|
|
24
24
|
var AGENT_USER_TYPES = new Set(['APP', 'AGENT']);
|
|
25
25
|
var AI_STREAMING_TRANSFORMATION_META_KEY = 'isAIStreamingTransformation';
|
|
26
26
|
var PACKAGE_NAME = "@atlaskit/editor-plugin-mentions";
|
|
27
|
-
var PACKAGE_VERSION = "
|
|
27
|
+
var PACKAGE_VERSION = "13.0.0";
|
|
28
28
|
var setProvider = function setProvider(provider) {
|
|
29
29
|
return function (state, dispatch) {
|
|
30
30
|
if (dispatch) {
|
|
@@ -13,7 +13,7 @@ import { mentionMessages } from '@atlaskit/editor-common/messages';
|
|
|
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';
|
|
16
|
-
import { MENTION_ITEM_HEIGHT, MentionItem } from '@atlaskit/mention/item';
|
|
16
|
+
import { MENTION_ITEM_HEIGHT, MENTION_ITEM_HEIGHT_REFRESHED, MentionItem } from '@atlaskit/mention/item';
|
|
17
17
|
import { isResolvingMentionProvider } from '@atlaskit/mention/resource';
|
|
18
18
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
19
19
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
@@ -87,6 +87,7 @@ var withInviteItem = function withInviteItem(_ref3) {
|
|
|
87
87
|
};
|
|
88
88
|
};
|
|
89
89
|
export var mentionToTypeaheadItem = function mentionToTypeaheadItem(mention) {
|
|
90
|
+
var itemHeight = expVal('platform_editor_agent_mentions', 'isEnabled', false) ? MENTION_ITEM_HEIGHT_REFRESHED : MENTION_ITEM_HEIGHT;
|
|
90
91
|
return {
|
|
91
92
|
title: mention.id,
|
|
92
93
|
render: function render(_ref4) {
|
|
@@ -97,11 +98,12 @@ export var mentionToTypeaheadItem = function mentionToTypeaheadItem(mention) {
|
|
|
97
98
|
mention: mention,
|
|
98
99
|
selected: isSelected,
|
|
99
100
|
onMouseEnter: onHover,
|
|
100
|
-
onSelection: onClick
|
|
101
|
+
onSelection: onClick,
|
|
102
|
+
height: itemHeight
|
|
101
103
|
});
|
|
102
104
|
},
|
|
103
105
|
getCustomComponentHeight: function getCustomComponentHeight() {
|
|
104
|
-
return
|
|
106
|
+
return itemHeight;
|
|
105
107
|
},
|
|
106
108
|
mention: mention
|
|
107
109
|
};
|
|
@@ -322,14 +324,15 @@ export var createTypeAheadConfig = function createTypeAheadConfig(_ref6) {
|
|
|
322
324
|
var _item$mention;
|
|
323
325
|
return !isAgentUserType(((_item$mention = item.mention) === null || _item$mention === void 0 ? void 0 : _item$mention.userType) || '');
|
|
324
326
|
},
|
|
325
|
-
limit: 6
|
|
327
|
+
limit: expVal('platform_editor_agent_mentions', 'isEnabled', false) ? 5 : 6
|
|
326
328
|
}, {
|
|
327
329
|
id: 'agents',
|
|
328
330
|
title: intl.formatMessage(mentionMessages.typeAheadSectionAgents),
|
|
329
331
|
filter: function filter(item) {
|
|
330
332
|
var _item$mention2;
|
|
331
333
|
return isAgentUserType(((_item$mention2 = item.mention) === null || _item$mention2 === void 0 ? void 0 : _item$mention2.userType) || '');
|
|
332
|
-
}
|
|
334
|
+
},
|
|
335
|
+
limit: expVal('platform_editor_agent_mentions', 'isEnabled', false) ? 5 : undefined
|
|
333
336
|
}];
|
|
334
337
|
},
|
|
335
338
|
onOpen: function onOpen() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-mentions",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.1.0",
|
|
4
4
|
"description": "Mentions plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
],
|
|
30
30
|
"atlaskit:src": "src/index.ts",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@atlaskit/adf-schema": "^52.
|
|
32
|
+
"@atlaskit/adf-schema": "^52.16.0",
|
|
33
33
|
"@atlaskit/css": "^0.19.0",
|
|
34
34
|
"@atlaskit/editor-plugin-analytics": "^11.0.0",
|
|
35
35
|
"@atlaskit/editor-plugin-base": "^12.0.0",
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
"@atlaskit/editor-plugin-selection": "^11.0.0",
|
|
38
38
|
"@atlaskit/editor-plugin-type-ahead": "^11.0.0",
|
|
39
39
|
"@atlaskit/editor-prosemirror": "^7.3.0",
|
|
40
|
-
"@atlaskit/icon": "^35.
|
|
40
|
+
"@atlaskit/icon": "^35.4.0",
|
|
41
41
|
"@atlaskit/insm": "^0.4.0",
|
|
42
42
|
"@atlaskit/link": "^3.4.0",
|
|
43
|
-
"@atlaskit/mention": "^26.
|
|
43
|
+
"@atlaskit/mention": "^26.1.0",
|
|
44
44
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
45
45
|
"@atlaskit/popper": "^7.2.0",
|
|
46
46
|
"@atlaskit/portal": "^5.5.0",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@atlaskit/profilecard": "^25.8.0",
|
|
49
49
|
"@atlaskit/teams-app-config": "^1.12.0",
|
|
50
50
|
"@atlaskit/theme": "^25.0.0",
|
|
51
|
-
"@atlaskit/tmp-editor-statsig": "^88.
|
|
51
|
+
"@atlaskit/tmp-editor-statsig": "^88.4.0",
|
|
52
52
|
"@atlaskit/tokens": "^13.1.0",
|
|
53
53
|
"@atlaskit/user-picker": "^12.1.0",
|
|
54
54
|
"@babel/runtime": "^7.0.0",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"uuid": "^3.1.0"
|
|
60
60
|
},
|
|
61
61
|
"peerDependencies": {
|
|
62
|
-
"@atlaskit/editor-common": "^115.
|
|
62
|
+
"@atlaskit/editor-common": "^115.1.0",
|
|
63
63
|
"react": "^18.2.0",
|
|
64
64
|
"react-dom": "^18.2.0",
|
|
65
65
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|