@atlaskit/editor-plugin-mentions 1.6.0 → 1.6.1
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 +10 -0
- package/dist/cjs/plugin.js +2 -1
- package/dist/cjs/ui/InviteItem/index.js +4 -1
- package/dist/cjs/ui/InviteItem/styles.js +11 -0
- package/dist/es2019/plugin.js +24 -21
- package/dist/es2019/ui/InviteItem/index.js +4 -1
- package/dist/es2019/ui/InviteItem/styles.js +11 -0
- package/dist/esm/plugin.js +2 -1
- package/dist/esm/ui/InviteItem/index.js +4 -1
- package/dist/esm/ui/InviteItem/styles.js +11 -0
- package/dist/types/types.d.ts +2 -1
- package/dist/types-ts4.5/types.d.ts +2 -1
- package/package.json +87 -111
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-mentions
|
|
2
2
|
|
|
3
|
+
## 1.6.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#110390](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/110390)
|
|
8
|
+
[`bead123202369`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/bead123202369) -
|
|
9
|
+
[ux] [ED-23642] Reordering the typeahead so that date, status, code block & info panel are above
|
|
10
|
+
the fold (in the top 5 results)
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
3
13
|
## 1.6.0
|
|
4
14
|
|
|
5
15
|
### Minor Changes
|
package/dist/cjs/plugin.js
CHANGED
|
@@ -88,13 +88,14 @@ var mentionsPlugin = exports.mentionsPlugin = function mentionsPlugin(_ref) {
|
|
|
88
88
|
},
|
|
89
89
|
pluginsOptions: {
|
|
90
90
|
quickInsert: function quickInsert(_ref4) {
|
|
91
|
+
var _options$getEditorFea;
|
|
91
92
|
var formatMessage = _ref4.formatMessage;
|
|
92
93
|
return [{
|
|
93
94
|
id: 'mention',
|
|
94
95
|
title: formatMessage(_messages.toolbarInsertBlockMessages.mention),
|
|
95
96
|
description: formatMessage(_messages.toolbarInsertBlockMessages.mentionDescription),
|
|
96
97
|
keywords: ['team', 'user'],
|
|
97
|
-
priority: 400,
|
|
98
|
+
priority: options !== null && options !== void 0 && (_options$getEditorFea = options.getEditorFeatureFlags) !== null && _options$getEditorFea !== void 0 && _options$getEditorFea.call(options).platformEditorTypeaheadImprovedRelevancy ? 700 : 400,
|
|
98
99
|
keyshortcut: '@',
|
|
99
100
|
icon: function icon() {
|
|
100
101
|
return /*#__PURE__*/_react.default.createElement(_quickInsert.IconMention, null);
|
|
@@ -49,6 +49,7 @@ var InviteItem = function InviteItem(_ref) {
|
|
|
49
49
|
}
|
|
50
50
|
}, [onMount]);
|
|
51
51
|
return (0, _react2.jsx)("div", {
|
|
52
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
52
53
|
css: [_styles.mentionItemStyle, selected && _styles.mentionItemSelectedStyle],
|
|
53
54
|
onMouseDown: onSelected,
|
|
54
55
|
onMouseEnter: onItemMouseEnter,
|
|
@@ -66,7 +67,9 @@ var InviteItem = function InviteItem(_ref) {
|
|
|
66
67
|
}, (0, _react2.jsx)(_reactIntlNext.FormattedMessage, (0, _extends2.default)({}, _messages.mentionMessages.inviteItemTitle, {
|
|
67
68
|
values: {
|
|
68
69
|
userRole: userRole || 'basic',
|
|
69
|
-
productName:
|
|
70
|
+
productName:
|
|
71
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
72
|
+
(0, _react2.jsx)("span", {
|
|
70
73
|
css: _styles.capitalizedStyle,
|
|
71
74
|
"data-testid": "capitalized-message"
|
|
72
75
|
}, productName)
|
|
@@ -7,6 +7,7 @@ exports.rowStyle = exports.nameSectionStyle = exports.mentionItemStyle = exports
|
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
8
|
var _colors = require("@atlaskit/theme/colors");
|
|
9
9
|
var ROW_SIDE_PADDING = exports.ROW_SIDE_PADDING = 14;
|
|
10
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
10
11
|
var rowStyle = exports.rowStyle = (0, _react.css)({
|
|
11
12
|
alignItems: 'center',
|
|
12
13
|
display: 'flex',
|
|
@@ -18,18 +19,22 @@ var rowStyle = exports.rowStyle = (0, _react.css)({
|
|
|
18
19
|
verticalAlign: 'middle'
|
|
19
20
|
});
|
|
20
21
|
var AVATAR_HEIGHT = exports.AVATAR_HEIGHT = 36;
|
|
22
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
21
23
|
var avatarStyle = exports.avatarStyle = (0, _react.css)({
|
|
22
24
|
position: 'relative',
|
|
23
25
|
flex: 'initial',
|
|
24
26
|
opacity: 'inherit',
|
|
25
27
|
width: '36px',
|
|
26
28
|
height: "".concat(AVATAR_HEIGHT, "px"),
|
|
29
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
27
30
|
'> span': {
|
|
28
31
|
width: '24px',
|
|
29
32
|
height: '24px',
|
|
30
33
|
padding: "var(--ds-space-075, 6px)"
|
|
31
34
|
}
|
|
32
35
|
});
|
|
36
|
+
|
|
37
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
33
38
|
var nameSectionStyle = exports.nameSectionStyle = (0, _react.css)({
|
|
34
39
|
flex: 1,
|
|
35
40
|
minWidth: 0,
|
|
@@ -38,6 +43,8 @@ var nameSectionStyle = exports.nameSectionStyle = (0, _react.css)({
|
|
|
38
43
|
color: "var(--ds-text-subtle, ".concat(_colors.N300, ")"),
|
|
39
44
|
opacity: 'inherit'
|
|
40
45
|
});
|
|
46
|
+
|
|
47
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
41
48
|
var mentionItemStyle = exports.mentionItemStyle = (0, _react.css)({
|
|
42
49
|
backgroundColor: 'transparent',
|
|
43
50
|
display: 'block',
|
|
@@ -45,9 +52,13 @@ var mentionItemStyle = exports.mentionItemStyle = (0, _react.css)({
|
|
|
45
52
|
listStyleType: 'none',
|
|
46
53
|
cursor: 'pointer'
|
|
47
54
|
});
|
|
55
|
+
|
|
56
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
48
57
|
var mentionItemSelectedStyle = exports.mentionItemSelectedStyle = (0, _react.css)({
|
|
49
58
|
backgroundColor: "var(--ds-background-neutral-subtle-hovered, ".concat(_colors.N30, ")")
|
|
50
59
|
});
|
|
60
|
+
|
|
61
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
51
62
|
var capitalizedStyle = exports.capitalizedStyle = (0, _react.css)({
|
|
52
63
|
textTransform: 'capitalize'
|
|
53
64
|
});
|
package/dist/es2019/plugin.js
CHANGED
|
@@ -81,28 +81,31 @@ const mentionsPlugin = ({
|
|
|
81
81
|
pluginsOptions: {
|
|
82
82
|
quickInsert: ({
|
|
83
83
|
formatMessage
|
|
84
|
-
}) =>
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
84
|
+
}) => {
|
|
85
|
+
var _options$getEditorFea;
|
|
86
|
+
return [{
|
|
87
|
+
id: 'mention',
|
|
88
|
+
title: formatMessage(messages.mention),
|
|
89
|
+
description: formatMessage(messages.mentionDescription),
|
|
90
|
+
keywords: ['team', 'user'],
|
|
91
|
+
priority: options !== null && options !== void 0 && (_options$getEditorFea = options.getEditorFeatureFlags) !== null && _options$getEditorFea !== void 0 && _options$getEditorFea.call(options).platformEditorTypeaheadImprovedRelevancy ? 700 : 400,
|
|
92
|
+
keyshortcut: '@',
|
|
93
|
+
icon: () => /*#__PURE__*/React.createElement(IconMention, null),
|
|
94
|
+
action(insert, state) {
|
|
95
|
+
var _api$typeAhead2;
|
|
96
|
+
const tr = insert(undefined);
|
|
97
|
+
const pluginState = mentionPluginKey.getState(state);
|
|
98
|
+
if (pluginState && pluginState.canInsertMention === false) {
|
|
99
|
+
return false;
|
|
100
|
+
}
|
|
101
|
+
api === null || api === void 0 ? void 0 : (_api$typeAhead2 = api.typeAhead) === null || _api$typeAhead2 === void 0 ? void 0 : _api$typeAhead2.actions.openAtTransaction({
|
|
102
|
+
triggerHandler: typeAhead,
|
|
103
|
+
inputMethod: INPUT_METHOD.QUICK_INSERT
|
|
104
|
+
})(tr);
|
|
105
|
+
return tr;
|
|
98
106
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
inputMethod: INPUT_METHOD.QUICK_INSERT
|
|
102
|
-
})(tr);
|
|
103
|
-
return tr;
|
|
104
|
-
}
|
|
105
|
-
}],
|
|
107
|
+
}];
|
|
108
|
+
},
|
|
106
109
|
typeAhead
|
|
107
110
|
}
|
|
108
111
|
};
|
|
@@ -40,6 +40,7 @@ const InviteItem = ({
|
|
|
40
40
|
}
|
|
41
41
|
}, [onMount]);
|
|
42
42
|
return jsx("div", {
|
|
43
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
43
44
|
css: [mentionItemStyle, selected && mentionItemSelectedStyle],
|
|
44
45
|
onMouseDown: onSelected,
|
|
45
46
|
onMouseEnter: onItemMouseEnter,
|
|
@@ -57,7 +58,9 @@ const InviteItem = ({
|
|
|
57
58
|
}, jsx(FormattedMessage, _extends({}, messages.inviteItemTitle, {
|
|
58
59
|
values: {
|
|
59
60
|
userRole: userRole || 'basic',
|
|
60
|
-
productName:
|
|
61
|
+
productName:
|
|
62
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
63
|
+
jsx("span", {
|
|
61
64
|
css: capitalizedStyle,
|
|
62
65
|
"data-testid": "capitalized-message"
|
|
63
66
|
}, productName)
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
2
|
import { N30, N300 } from '@atlaskit/theme/colors';
|
|
3
3
|
export const ROW_SIDE_PADDING = 14;
|
|
4
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
4
5
|
export const rowStyle = css({
|
|
5
6
|
alignItems: 'center',
|
|
6
7
|
display: 'flex',
|
|
@@ -12,18 +13,22 @@ export const rowStyle = css({
|
|
|
12
13
|
verticalAlign: 'middle'
|
|
13
14
|
});
|
|
14
15
|
export const AVATAR_HEIGHT = 36;
|
|
16
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
15
17
|
export const avatarStyle = css({
|
|
16
18
|
position: 'relative',
|
|
17
19
|
flex: 'initial',
|
|
18
20
|
opacity: 'inherit',
|
|
19
21
|
width: '36px',
|
|
20
22
|
height: `${AVATAR_HEIGHT}px`,
|
|
23
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
21
24
|
'> span': {
|
|
22
25
|
width: '24px',
|
|
23
26
|
height: '24px',
|
|
24
27
|
padding: "var(--ds-space-075, 6px)"
|
|
25
28
|
}
|
|
26
29
|
});
|
|
30
|
+
|
|
31
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
27
32
|
export const nameSectionStyle = css({
|
|
28
33
|
flex: 1,
|
|
29
34
|
minWidth: 0,
|
|
@@ -32,6 +37,8 @@ export const nameSectionStyle = css({
|
|
|
32
37
|
color: `var(--ds-text-subtle, ${N300})`,
|
|
33
38
|
opacity: 'inherit'
|
|
34
39
|
});
|
|
40
|
+
|
|
41
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
35
42
|
export const mentionItemStyle = css({
|
|
36
43
|
backgroundColor: 'transparent',
|
|
37
44
|
display: 'block',
|
|
@@ -39,9 +46,13 @@ export const mentionItemStyle = css({
|
|
|
39
46
|
listStyleType: 'none',
|
|
40
47
|
cursor: 'pointer'
|
|
41
48
|
});
|
|
49
|
+
|
|
50
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
42
51
|
export const mentionItemSelectedStyle = css({
|
|
43
52
|
backgroundColor: `var(--ds-background-neutral-subtle-hovered, ${N30})`
|
|
44
53
|
});
|
|
54
|
+
|
|
55
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
45
56
|
export const capitalizedStyle = css({
|
|
46
57
|
textTransform: 'capitalize'
|
|
47
58
|
});
|
package/dist/esm/plugin.js
CHANGED
|
@@ -81,13 +81,14 @@ var mentionsPlugin = function mentionsPlugin(_ref) {
|
|
|
81
81
|
},
|
|
82
82
|
pluginsOptions: {
|
|
83
83
|
quickInsert: function quickInsert(_ref4) {
|
|
84
|
+
var _options$getEditorFea;
|
|
84
85
|
var formatMessage = _ref4.formatMessage;
|
|
85
86
|
return [{
|
|
86
87
|
id: 'mention',
|
|
87
88
|
title: formatMessage(messages.mention),
|
|
88
89
|
description: formatMessage(messages.mentionDescription),
|
|
89
90
|
keywords: ['team', 'user'],
|
|
90
|
-
priority: 400,
|
|
91
|
+
priority: options !== null && options !== void 0 && (_options$getEditorFea = options.getEditorFeatureFlags) !== null && _options$getEditorFea !== void 0 && _options$getEditorFea.call(options).platformEditorTypeaheadImprovedRelevancy ? 700 : 400,
|
|
91
92
|
keyshortcut: '@',
|
|
92
93
|
icon: function icon() {
|
|
93
94
|
return /*#__PURE__*/React.createElement(IconMention, null);
|
|
@@ -39,6 +39,7 @@ var InviteItem = function InviteItem(_ref) {
|
|
|
39
39
|
}
|
|
40
40
|
}, [onMount]);
|
|
41
41
|
return jsx("div", {
|
|
42
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
42
43
|
css: [mentionItemStyle, selected && mentionItemSelectedStyle],
|
|
43
44
|
onMouseDown: onSelected,
|
|
44
45
|
onMouseEnter: onItemMouseEnter,
|
|
@@ -56,7 +57,9 @@ var InviteItem = function InviteItem(_ref) {
|
|
|
56
57
|
}, jsx(FormattedMessage, _extends({}, messages.inviteItemTitle, {
|
|
57
58
|
values: {
|
|
58
59
|
userRole: userRole || 'basic',
|
|
59
|
-
productName:
|
|
60
|
+
productName:
|
|
61
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
62
|
+
jsx("span", {
|
|
60
63
|
css: capitalizedStyle,
|
|
61
64
|
"data-testid": "capitalized-message"
|
|
62
65
|
}, productName)
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
2
|
import { N30, N300 } from '@atlaskit/theme/colors';
|
|
3
3
|
export var ROW_SIDE_PADDING = 14;
|
|
4
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
4
5
|
export var rowStyle = css({
|
|
5
6
|
alignItems: 'center',
|
|
6
7
|
display: 'flex',
|
|
@@ -12,18 +13,22 @@ export var rowStyle = css({
|
|
|
12
13
|
verticalAlign: 'middle'
|
|
13
14
|
});
|
|
14
15
|
export var AVATAR_HEIGHT = 36;
|
|
16
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
15
17
|
export var avatarStyle = css({
|
|
16
18
|
position: 'relative',
|
|
17
19
|
flex: 'initial',
|
|
18
20
|
opacity: 'inherit',
|
|
19
21
|
width: '36px',
|
|
20
22
|
height: "".concat(AVATAR_HEIGHT, "px"),
|
|
23
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
21
24
|
'> span': {
|
|
22
25
|
width: '24px',
|
|
23
26
|
height: '24px',
|
|
24
27
|
padding: "var(--ds-space-075, 6px)"
|
|
25
28
|
}
|
|
26
29
|
});
|
|
30
|
+
|
|
31
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
27
32
|
export var nameSectionStyle = css({
|
|
28
33
|
flex: 1,
|
|
29
34
|
minWidth: 0,
|
|
@@ -32,6 +37,8 @@ export var nameSectionStyle = css({
|
|
|
32
37
|
color: "var(--ds-text-subtle, ".concat(N300, ")"),
|
|
33
38
|
opacity: 'inherit'
|
|
34
39
|
});
|
|
40
|
+
|
|
41
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
35
42
|
export var mentionItemStyle = css({
|
|
36
43
|
backgroundColor: 'transparent',
|
|
37
44
|
display: 'block',
|
|
@@ -39,9 +46,13 @@ export var mentionItemStyle = css({
|
|
|
39
46
|
listStyleType: 'none',
|
|
40
47
|
cursor: 'pointer'
|
|
41
48
|
});
|
|
49
|
+
|
|
50
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
42
51
|
export var mentionItemSelectedStyle = css({
|
|
43
52
|
backgroundColor: "var(--ds-background-neutral-subtle-hovered, ".concat(N30, ")")
|
|
44
53
|
});
|
|
54
|
+
|
|
55
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
45
56
|
export var capitalizedStyle = css({
|
|
46
57
|
textTransform: 'capitalize'
|
|
47
58
|
});
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { AnalyticsEventPayload } from '@atlaskit/analytics-next';
|
|
3
3
|
import { type ProfilecardProvider } from '@atlaskit/editor-common/src/provider-factory/profile-card-provider';
|
|
4
|
-
import type { NextEditorPlugin, OptionalPlugin, TypeAheadHandler } from '@atlaskit/editor-common/types';
|
|
4
|
+
import type { GetEditorFeatureFlags, NextEditorPlugin, OptionalPlugin, TypeAheadHandler } from '@atlaskit/editor-common/types';
|
|
5
5
|
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
6
6
|
import type { ContextIdentifierPlugin } from '@atlaskit/editor-plugin-context-identifier';
|
|
7
7
|
import type { TypeAheadInputMethod, TypeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead';
|
|
@@ -15,6 +15,7 @@ export interface MentionPluginConfig {
|
|
|
15
15
|
HighlightComponent?: React.ComponentType<React.PropsWithChildren<unknown>>;
|
|
16
16
|
insertDisplayName?: boolean;
|
|
17
17
|
profilecardProvider?: Promise<ProfilecardProvider>;
|
|
18
|
+
getEditorFeatureFlags?: GetEditorFeatureFlags;
|
|
18
19
|
}
|
|
19
20
|
export interface MentionPluginOptions extends MentionPluginConfig {
|
|
20
21
|
sanitizePrivateContent?: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { AnalyticsEventPayload } from '@atlaskit/analytics-next';
|
|
3
3
|
import { type ProfilecardProvider } from '@atlaskit/editor-common/src/provider-factory/profile-card-provider';
|
|
4
|
-
import type { NextEditorPlugin, OptionalPlugin, TypeAheadHandler } from '@atlaskit/editor-common/types';
|
|
4
|
+
import type { GetEditorFeatureFlags, NextEditorPlugin, OptionalPlugin, TypeAheadHandler } from '@atlaskit/editor-common/types';
|
|
5
5
|
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
6
6
|
import type { ContextIdentifierPlugin } from '@atlaskit/editor-plugin-context-identifier';
|
|
7
7
|
import type { TypeAheadInputMethod, TypeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead';
|
|
@@ -15,6 +15,7 @@ export interface MentionPluginConfig {
|
|
|
15
15
|
HighlightComponent?: React.ComponentType<React.PropsWithChildren<unknown>>;
|
|
16
16
|
insertDisplayName?: boolean;
|
|
17
17
|
profilecardProvider?: Promise<ProfilecardProvider>;
|
|
18
|
+
getEditorFeatureFlags?: GetEditorFeatureFlags;
|
|
18
19
|
}
|
|
19
20
|
export interface MentionPluginOptions extends MentionPluginConfig {
|
|
20
21
|
sanitizePrivateContent?: boolean;
|
package/package.json
CHANGED
|
@@ -1,112 +1,88 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
"ui-components": [
|
|
90
|
-
"lite-mode"
|
|
91
|
-
],
|
|
92
|
-
"deprecation": "no-deprecated-imports",
|
|
93
|
-
"styling": [
|
|
94
|
-
"emotion",
|
|
95
|
-
"emotion"
|
|
96
|
-
],
|
|
97
|
-
"imports": [
|
|
98
|
-
"import-no-extraneous-disable-for-examples-and-docs"
|
|
99
|
-
]
|
|
100
|
-
}
|
|
101
|
-
},
|
|
102
|
-
"techstackIgnore": {
|
|
103
|
-
"stricter": [
|
|
104
|
-
"@atlassian/tangerine/project-structure"
|
|
105
|
-
]
|
|
106
|
-
},
|
|
107
|
-
"platform-feature-flags": {
|
|
108
|
-
"platform.editor.mentions-in-editor-popup-on-click": {
|
|
109
|
-
"type": "boolean"
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
}
|
|
2
|
+
"name": "@atlaskit/editor-plugin-mentions",
|
|
3
|
+
"version": "1.6.1",
|
|
4
|
+
"description": "Mentions plugin for @atlaskit/editor-core",
|
|
5
|
+
"author": "Atlassian Pty Ltd",
|
|
6
|
+
"license": "Apache-2.0",
|
|
7
|
+
"publishConfig": {
|
|
8
|
+
"registry": "https://registry.npmjs.org/"
|
|
9
|
+
},
|
|
10
|
+
"atlassian": {
|
|
11
|
+
"team": "Editor: AI",
|
|
12
|
+
"singleton": true,
|
|
13
|
+
"inPublicMirror": false,
|
|
14
|
+
"releaseModel": "continuous",
|
|
15
|
+
"runReact18": false
|
|
16
|
+
},
|
|
17
|
+
"repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
|
|
18
|
+
"main": "dist/cjs/index.js",
|
|
19
|
+
"module": "dist/esm/index.js",
|
|
20
|
+
"module:es2019": "dist/es2019/index.js",
|
|
21
|
+
"types": "dist/types/index.d.ts",
|
|
22
|
+
"typesVersions": {
|
|
23
|
+
">=4.5 <4.9": {
|
|
24
|
+
"*": ["dist/types-ts4.5/*", "dist/types-ts4.5/index.d.ts"]
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"sideEffects": false,
|
|
28
|
+
"atlaskit:src": "src/index.ts",
|
|
29
|
+
"af:exports": {
|
|
30
|
+
".": "./src/index.ts"
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@atlaskit/adf-schema": "^36.10.7",
|
|
34
|
+
"@atlaskit/analytics-gas-types": "^5.1.0",
|
|
35
|
+
"@atlaskit/editor-common": "^82.6.0",
|
|
36
|
+
"@atlaskit/editor-plugin-analytics": "^1.2.0",
|
|
37
|
+
"@atlaskit/editor-plugin-context-identifier": "^1.1.0",
|
|
38
|
+
"@atlaskit/editor-plugin-type-ahead": "^1.2.0",
|
|
39
|
+
"@atlaskit/editor-prosemirror": "4.0.1",
|
|
40
|
+
"@atlaskit/icon": "^22.3.0",
|
|
41
|
+
"@atlaskit/mention": "^23.2.0",
|
|
42
|
+
"@atlaskit/platform-feature-flags": "^0.2.5",
|
|
43
|
+
"@atlaskit/theme": "^12.9.0",
|
|
44
|
+
"@atlaskit/tokens": "^1.50.0",
|
|
45
|
+
"@babel/runtime": "^7.0.0",
|
|
46
|
+
"@emotion/react": "^11.7.1",
|
|
47
|
+
"uuid": "^3.1.0"
|
|
48
|
+
},
|
|
49
|
+
"peerDependencies": {
|
|
50
|
+
"react": "^16.8.0",
|
|
51
|
+
"react-dom": "^16.8.0",
|
|
52
|
+
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
53
|
+
},
|
|
54
|
+
"devDependencies": {
|
|
55
|
+
"@af/visual-regression": "*",
|
|
56
|
+
"@atlaskit/ssr": "*",
|
|
57
|
+
"@atlaskit/visual-regression": "*",
|
|
58
|
+
"@testing-library/react": "^12.1.5",
|
|
59
|
+
"react-dom": "^16.8.0",
|
|
60
|
+
"typescript": "~5.4.2",
|
|
61
|
+
"wait-for-expect": "^1.2.0"
|
|
62
|
+
},
|
|
63
|
+
"techstack": {
|
|
64
|
+
"@atlassian/frontend": {
|
|
65
|
+
"code-structure": ["tangerine-next"],
|
|
66
|
+
"import-structure": ["atlassian-conventions"],
|
|
67
|
+
"circular-dependencies": ["file-and-folder-level"]
|
|
68
|
+
},
|
|
69
|
+
"@repo/internal": {
|
|
70
|
+
"dom-events": "use-bind-event-listener",
|
|
71
|
+
"analytics": ["analytics-next"],
|
|
72
|
+
"design-tokens": ["color"],
|
|
73
|
+
"theming": ["react-context"],
|
|
74
|
+
"ui-components": ["lite-mode"],
|
|
75
|
+
"deprecation": "no-deprecated-imports",
|
|
76
|
+
"styling": ["emotion", "emotion"],
|
|
77
|
+
"imports": ["import-no-extraneous-disable-for-examples-and-docs"]
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"techstackIgnore": {
|
|
81
|
+
"stricter": ["@atlassian/tangerine/project-structure"]
|
|
82
|
+
},
|
|
83
|
+
"platform-feature-flags": {
|
|
84
|
+
"platform.editor.mentions-in-editor-popup-on-click": {
|
|
85
|
+
"type": "boolean"
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|