@atlaskit/editor-plugin-mentions 1.6.0 → 1.7.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/.eslintrc.js +1 -1
- package/CHANGELOG.md +22 -0
- package/dist/cjs/plugin.js +2 -1
- package/dist/cjs/ui/InviteItem/index.js +6 -1
- package/dist/cjs/ui/InviteItem/styles.js +13 -0
- package/dist/es2019/plugin.js +24 -21
- package/dist/es2019/ui/InviteItem/index.js +6 -1
- package/dist/es2019/ui/InviteItem/styles.js +12 -0
- package/dist/esm/plugin.js +2 -1
- package/dist/esm/ui/InviteItem/index.js +6 -1
- package/dist/esm/ui/InviteItem/styles.js +12 -0
- package/dist/types/types.d.ts +2 -1
- package/dist/types-ts4.5/types.d.ts +2 -1
- package/package.json +111 -111
package/.eslintrc.js
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-mentions
|
|
2
2
|
|
|
3
|
+
## 1.7.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#114156](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/114156)
|
|
8
|
+
[`bc6a63af2d1d0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/bc6a63af2d1d0) -
|
|
9
|
+
Bump adf-schema to 37.0.0 and adf-schema-json to 1.16.0
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
15
|
+
## 1.6.1
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [#110390](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/110390)
|
|
20
|
+
[`bead123202369`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/bead123202369) -
|
|
21
|
+
[ux] [ED-23642] Reordering the typeahead so that date, status, code block & info panel are above
|
|
22
|
+
the fold (in the top 5 results)
|
|
23
|
+
- Updated dependencies
|
|
24
|
+
|
|
3
25
|
## 1.6.0
|
|
4
26
|
|
|
5
27
|
### 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);
|
|
@@ -18,6 +18,8 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
18
18
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
19
19
|
/** @jsx jsx */
|
|
20
20
|
|
|
21
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
22
|
+
|
|
21
23
|
var INVITE_ITEM_DESCRIPTION = exports.INVITE_ITEM_DESCRIPTION = {
|
|
22
24
|
id: 'invite-teammate'
|
|
23
25
|
};
|
|
@@ -49,6 +51,7 @@ var InviteItem = function InviteItem(_ref) {
|
|
|
49
51
|
}
|
|
50
52
|
}, [onMount]);
|
|
51
53
|
return (0, _react2.jsx)("div", {
|
|
54
|
+
// 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
55
|
css: [_styles.mentionItemStyle, selected && _styles.mentionItemSelectedStyle],
|
|
53
56
|
onMouseDown: onSelected,
|
|
54
57
|
onMouseEnter: onItemMouseEnter,
|
|
@@ -66,7 +69,9 @@ var InviteItem = function InviteItem(_ref) {
|
|
|
66
69
|
}, (0, _react2.jsx)(_reactIntlNext.FormattedMessage, (0, _extends2.default)({}, _messages.mentionMessages.inviteItemTitle, {
|
|
67
70
|
values: {
|
|
68
71
|
userRole: userRole || 'basic',
|
|
69
|
-
productName:
|
|
72
|
+
productName:
|
|
73
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
74
|
+
(0, _react2.jsx)("span", {
|
|
70
75
|
css: _styles.capitalizedStyle,
|
|
71
76
|
"data-testid": "capitalized-message"
|
|
72
77
|
}, productName)
|
|
@@ -6,7 +6,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.rowStyle = exports.nameSectionStyle = exports.mentionItemStyle = exports.mentionItemSelectedStyle = exports.capitalizedStyle = exports.avatarStyle = exports.ROW_SIDE_PADDING = exports.AVATAR_HEIGHT = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
8
|
var _colors = require("@atlaskit/theme/colors");
|
|
9
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
|
+
|
|
9
11
|
var ROW_SIDE_PADDING = exports.ROW_SIDE_PADDING = 14;
|
|
12
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
10
13
|
var rowStyle = exports.rowStyle = (0, _react.css)({
|
|
11
14
|
alignItems: 'center',
|
|
12
15
|
display: 'flex',
|
|
@@ -18,18 +21,22 @@ var rowStyle = exports.rowStyle = (0, _react.css)({
|
|
|
18
21
|
verticalAlign: 'middle'
|
|
19
22
|
});
|
|
20
23
|
var AVATAR_HEIGHT = exports.AVATAR_HEIGHT = 36;
|
|
24
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
21
25
|
var avatarStyle = exports.avatarStyle = (0, _react.css)({
|
|
22
26
|
position: 'relative',
|
|
23
27
|
flex: 'initial',
|
|
24
28
|
opacity: 'inherit',
|
|
25
29
|
width: '36px',
|
|
26
30
|
height: "".concat(AVATAR_HEIGHT, "px"),
|
|
31
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
27
32
|
'> span': {
|
|
28
33
|
width: '24px',
|
|
29
34
|
height: '24px',
|
|
30
35
|
padding: "var(--ds-space-075, 6px)"
|
|
31
36
|
}
|
|
32
37
|
});
|
|
38
|
+
|
|
39
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
33
40
|
var nameSectionStyle = exports.nameSectionStyle = (0, _react.css)({
|
|
34
41
|
flex: 1,
|
|
35
42
|
minWidth: 0,
|
|
@@ -38,6 +45,8 @@ var nameSectionStyle = exports.nameSectionStyle = (0, _react.css)({
|
|
|
38
45
|
color: "var(--ds-text-subtle, ".concat(_colors.N300, ")"),
|
|
39
46
|
opacity: 'inherit'
|
|
40
47
|
});
|
|
48
|
+
|
|
49
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
41
50
|
var mentionItemStyle = exports.mentionItemStyle = (0, _react.css)({
|
|
42
51
|
backgroundColor: 'transparent',
|
|
43
52
|
display: 'block',
|
|
@@ -45,9 +54,13 @@ var mentionItemStyle = exports.mentionItemStyle = (0, _react.css)({
|
|
|
45
54
|
listStyleType: 'none',
|
|
46
55
|
cursor: 'pointer'
|
|
47
56
|
});
|
|
57
|
+
|
|
58
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
48
59
|
var mentionItemSelectedStyle = exports.mentionItemSelectedStyle = (0, _react.css)({
|
|
49
60
|
backgroundColor: "var(--ds-background-neutral-subtle-hovered, ".concat(_colors.N30, ")")
|
|
50
61
|
});
|
|
62
|
+
|
|
63
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
51
64
|
var capitalizedStyle = exports.capitalizedStyle = (0, _react.css)({
|
|
52
65
|
textTransform: 'capitalize'
|
|
53
66
|
});
|
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
|
};
|
|
@@ -2,6 +2,8 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
/** @jsx jsx */
|
|
3
3
|
|
|
4
4
|
import React, { useCallback, useEffect } from 'react';
|
|
5
|
+
|
|
6
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
5
7
|
import { jsx } from '@emotion/react';
|
|
6
8
|
import { FormattedMessage, injectIntl } from 'react-intl-next';
|
|
7
9
|
import { mentionMessages as messages } from '@atlaskit/editor-common/messages';
|
|
@@ -40,6 +42,7 @@ const InviteItem = ({
|
|
|
40
42
|
}
|
|
41
43
|
}, [onMount]);
|
|
42
44
|
return jsx("div", {
|
|
45
|
+
// 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
46
|
css: [mentionItemStyle, selected && mentionItemSelectedStyle],
|
|
44
47
|
onMouseDown: onSelected,
|
|
45
48
|
onMouseEnter: onItemMouseEnter,
|
|
@@ -57,7 +60,9 @@ const InviteItem = ({
|
|
|
57
60
|
}, jsx(FormattedMessage, _extends({}, messages.inviteItemTitle, {
|
|
58
61
|
values: {
|
|
59
62
|
userRole: userRole || 'basic',
|
|
60
|
-
productName:
|
|
63
|
+
productName:
|
|
64
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
65
|
+
jsx("span", {
|
|
61
66
|
css: capitalizedStyle,
|
|
62
67
|
"data-testid": "capitalized-message"
|
|
63
68
|
}, productName)
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
1
2
|
import { css } from '@emotion/react';
|
|
2
3
|
import { N30, N300 } from '@atlaskit/theme/colors';
|
|
3
4
|
export const ROW_SIDE_PADDING = 14;
|
|
5
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
4
6
|
export const rowStyle = css({
|
|
5
7
|
alignItems: 'center',
|
|
6
8
|
display: 'flex',
|
|
@@ -12,18 +14,22 @@ export const rowStyle = css({
|
|
|
12
14
|
verticalAlign: 'middle'
|
|
13
15
|
});
|
|
14
16
|
export const AVATAR_HEIGHT = 36;
|
|
17
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
15
18
|
export const avatarStyle = css({
|
|
16
19
|
position: 'relative',
|
|
17
20
|
flex: 'initial',
|
|
18
21
|
opacity: 'inherit',
|
|
19
22
|
width: '36px',
|
|
20
23
|
height: `${AVATAR_HEIGHT}px`,
|
|
24
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
21
25
|
'> span': {
|
|
22
26
|
width: '24px',
|
|
23
27
|
height: '24px',
|
|
24
28
|
padding: "var(--ds-space-075, 6px)"
|
|
25
29
|
}
|
|
26
30
|
});
|
|
31
|
+
|
|
32
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
27
33
|
export const nameSectionStyle = css({
|
|
28
34
|
flex: 1,
|
|
29
35
|
minWidth: 0,
|
|
@@ -32,6 +38,8 @@ export const nameSectionStyle = css({
|
|
|
32
38
|
color: `var(--ds-text-subtle, ${N300})`,
|
|
33
39
|
opacity: 'inherit'
|
|
34
40
|
});
|
|
41
|
+
|
|
42
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
35
43
|
export const mentionItemStyle = css({
|
|
36
44
|
backgroundColor: 'transparent',
|
|
37
45
|
display: 'block',
|
|
@@ -39,9 +47,13 @@ export const mentionItemStyle = css({
|
|
|
39
47
|
listStyleType: 'none',
|
|
40
48
|
cursor: 'pointer'
|
|
41
49
|
});
|
|
50
|
+
|
|
51
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
42
52
|
export const mentionItemSelectedStyle = css({
|
|
43
53
|
backgroundColor: `var(--ds-background-neutral-subtle-hovered, ${N30})`
|
|
44
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
|
|
45
57
|
export const capitalizedStyle = css({
|
|
46
58
|
textTransform: 'capitalize'
|
|
47
59
|
});
|
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);
|
|
@@ -2,6 +2,8 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
/** @jsx jsx */
|
|
3
3
|
|
|
4
4
|
import React, { useCallback, useEffect } from 'react';
|
|
5
|
+
|
|
6
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
5
7
|
import { jsx } from '@emotion/react';
|
|
6
8
|
import { FormattedMessage, injectIntl } from 'react-intl-next';
|
|
7
9
|
import { mentionMessages as messages } from '@atlaskit/editor-common/messages';
|
|
@@ -39,6 +41,7 @@ var InviteItem = function InviteItem(_ref) {
|
|
|
39
41
|
}
|
|
40
42
|
}, [onMount]);
|
|
41
43
|
return jsx("div", {
|
|
44
|
+
// 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
45
|
css: [mentionItemStyle, selected && mentionItemSelectedStyle],
|
|
43
46
|
onMouseDown: onSelected,
|
|
44
47
|
onMouseEnter: onItemMouseEnter,
|
|
@@ -56,7 +59,9 @@ var InviteItem = function InviteItem(_ref) {
|
|
|
56
59
|
}, jsx(FormattedMessage, _extends({}, messages.inviteItemTitle, {
|
|
57
60
|
values: {
|
|
58
61
|
userRole: userRole || 'basic',
|
|
59
|
-
productName:
|
|
62
|
+
productName:
|
|
63
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
64
|
+
jsx("span", {
|
|
60
65
|
css: capitalizedStyle,
|
|
61
66
|
"data-testid": "capitalized-message"
|
|
62
67
|
}, productName)
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
1
2
|
import { css } from '@emotion/react';
|
|
2
3
|
import { N30, N300 } from '@atlaskit/theme/colors';
|
|
3
4
|
export var ROW_SIDE_PADDING = 14;
|
|
5
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
4
6
|
export var rowStyle = css({
|
|
5
7
|
alignItems: 'center',
|
|
6
8
|
display: 'flex',
|
|
@@ -12,18 +14,22 @@ export var rowStyle = css({
|
|
|
12
14
|
verticalAlign: 'middle'
|
|
13
15
|
});
|
|
14
16
|
export var AVATAR_HEIGHT = 36;
|
|
17
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
15
18
|
export var avatarStyle = css({
|
|
16
19
|
position: 'relative',
|
|
17
20
|
flex: 'initial',
|
|
18
21
|
opacity: 'inherit',
|
|
19
22
|
width: '36px',
|
|
20
23
|
height: "".concat(AVATAR_HEIGHT, "px"),
|
|
24
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
21
25
|
'> span': {
|
|
22
26
|
width: '24px',
|
|
23
27
|
height: '24px',
|
|
24
28
|
padding: "var(--ds-space-075, 6px)"
|
|
25
29
|
}
|
|
26
30
|
});
|
|
31
|
+
|
|
32
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
27
33
|
export var nameSectionStyle = css({
|
|
28
34
|
flex: 1,
|
|
29
35
|
minWidth: 0,
|
|
@@ -32,6 +38,8 @@ export var nameSectionStyle = css({
|
|
|
32
38
|
color: "var(--ds-text-subtle, ".concat(N300, ")"),
|
|
33
39
|
opacity: 'inherit'
|
|
34
40
|
});
|
|
41
|
+
|
|
42
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
35
43
|
export var mentionItemStyle = css({
|
|
36
44
|
backgroundColor: 'transparent',
|
|
37
45
|
display: 'block',
|
|
@@ -39,9 +47,13 @@ export var mentionItemStyle = css({
|
|
|
39
47
|
listStyleType: 'none',
|
|
40
48
|
cursor: 'pointer'
|
|
41
49
|
});
|
|
50
|
+
|
|
51
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
42
52
|
export var mentionItemSelectedStyle = css({
|
|
43
53
|
backgroundColor: "var(--ds-background-neutral-subtle-hovered, ".concat(N30, ")")
|
|
44
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
|
|
45
57
|
export var capitalizedStyle = css({
|
|
46
58
|
textTransform: 'capitalize'
|
|
47
59
|
});
|
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,112 @@
|
|
|
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
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
}
|
|
2
|
+
"name": "@atlaskit/editor-plugin-mentions",
|
|
3
|
+
"version": "1.7.0",
|
|
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
|
+
"*": [
|
|
25
|
+
"dist/types-ts4.5/*",
|
|
26
|
+
"dist/types-ts4.5/index.d.ts"
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"sideEffects": false,
|
|
31
|
+
"atlaskit:src": "src/index.ts",
|
|
32
|
+
"af:exports": {
|
|
33
|
+
".": "./src/index.ts"
|
|
34
|
+
},
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"@atlaskit/adf-schema": "^37.0.0",
|
|
37
|
+
"@atlaskit/analytics-gas-types": "^5.1.0",
|
|
38
|
+
"@atlaskit/editor-common": "^82.12.0",
|
|
39
|
+
"@atlaskit/editor-plugin-analytics": "^1.3.0",
|
|
40
|
+
"@atlaskit/editor-plugin-context-identifier": "^1.1.0",
|
|
41
|
+
"@atlaskit/editor-plugin-type-ahead": "^1.3.0",
|
|
42
|
+
"@atlaskit/editor-prosemirror": "4.0.1",
|
|
43
|
+
"@atlaskit/icon": "^22.4.0",
|
|
44
|
+
"@atlaskit/mention": "^23.2.0",
|
|
45
|
+
"@atlaskit/platform-feature-flags": "^0.2.5",
|
|
46
|
+
"@atlaskit/theme": "^12.11.0",
|
|
47
|
+
"@atlaskit/tokens": "^1.53.0",
|
|
48
|
+
"@babel/runtime": "^7.0.0",
|
|
49
|
+
"@emotion/react": "^11.7.1",
|
|
50
|
+
"uuid": "^3.1.0"
|
|
51
|
+
},
|
|
52
|
+
"peerDependencies": {
|
|
53
|
+
"react": "^16.8.0",
|
|
54
|
+
"react-dom": "^16.8.0",
|
|
55
|
+
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
56
|
+
},
|
|
57
|
+
"devDependencies": {
|
|
58
|
+
"@af/visual-regression": "*",
|
|
59
|
+
"@atlaskit/ssr": "*",
|
|
60
|
+
"@atlaskit/visual-regression": "*",
|
|
61
|
+
"@testing-library/react": "^12.1.5",
|
|
62
|
+
"react-dom": "^16.8.0",
|
|
63
|
+
"typescript": "~5.4.2",
|
|
64
|
+
"wait-for-expect": "^1.2.0"
|
|
65
|
+
},
|
|
66
|
+
"techstack": {
|
|
67
|
+
"@atlassian/frontend": {
|
|
68
|
+
"code-structure": [
|
|
69
|
+
"tangerine-next"
|
|
70
|
+
],
|
|
71
|
+
"import-structure": [
|
|
72
|
+
"atlassian-conventions"
|
|
73
|
+
],
|
|
74
|
+
"circular-dependencies": [
|
|
75
|
+
"file-and-folder-level"
|
|
76
|
+
]
|
|
77
|
+
},
|
|
78
|
+
"@repo/internal": {
|
|
79
|
+
"dom-events": "use-bind-event-listener",
|
|
80
|
+
"analytics": [
|
|
81
|
+
"analytics-next"
|
|
82
|
+
],
|
|
83
|
+
"design-tokens": [
|
|
84
|
+
"color"
|
|
85
|
+
],
|
|
86
|
+
"theming": [
|
|
87
|
+
"react-context"
|
|
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
|
+
}
|