@atlaskit/editor-plugin-mentions 14.8.0 → 14.9.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 +17 -0
- package/dist/cjs/mentionsPlugin.js +1 -0
- package/dist/cjs/pm-plugins/main.js +1 -1
- package/dist/cjs/ui/InviteItem/InviteItemWithEmailDomain.js +1 -0
- package/dist/cjs/ui/type-ahead/index.js +5 -3
- package/dist/es2019/mentionsPlugin.js +1 -0
- package/dist/es2019/pm-plugins/main.js +1 -1
- package/dist/es2019/ui/InviteItem/InviteItemWithEmailDomain.js +1 -0
- package/dist/es2019/ui/type-ahead/index.js +4 -3
- package/dist/esm/mentionsPlugin.js +1 -0
- package/dist/esm/pm-plugins/main.js +1 -1
- package/dist/esm/ui/InviteItem/InviteItemWithEmailDomain.js +1 -0
- package/dist/esm/ui/type-ahead/index.js +5 -3
- package/dist/types/types/index.d.ts +4 -0
- package/dist/types/ui/type-ahead/index.d.ts +2 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-mentions
|
|
2
2
|
|
|
3
|
+
## 14.9.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`554b23dd7f5e7`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/554b23dd7f5e7) -
|
|
8
|
+
[ux] Make Labs Lozenge Opt-In
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
14
|
+
## 14.8.1
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 14.8.0
|
|
4
21
|
|
|
5
22
|
### Minor Changes
|
|
@@ -107,6 +107,7 @@ var mentionsPlugin = exports.mentionsPlugin = function mentionsPlugin(_ref3) {
|
|
|
107
107
|
HighlightComponent: options === null || options === void 0 ? void 0 : options.HighlightComponent,
|
|
108
108
|
handleMentionsChanged: options === null || options === void 0 ? void 0 : options.handleMentionsChanged,
|
|
109
109
|
enableAgentSectioning: options === null || options === void 0 ? void 0 : options.enableAgentSectioning,
|
|
110
|
+
showAgentMentionsLabsLozenge: options === null || options === void 0 ? void 0 : options.showAgentMentionsLabsLozenge,
|
|
110
111
|
fireEvent: fireEvent,
|
|
111
112
|
api: api
|
|
112
113
|
});
|
|
@@ -66,7 +66,7 @@ var AI_STREAMING_TRANSFORMATION_META_KEY = 'isAIStreamingTransformation';
|
|
|
66
66
|
var AGENT_MENTION_INACTIVITY_MS = 3000;
|
|
67
67
|
var MAX_PENDING_TYPED_AGENT_MENTION_FOCUS_DEFERS = 20;
|
|
68
68
|
var PACKAGE_NAME = "@atlaskit/editor-plugin-mentions";
|
|
69
|
-
var PACKAGE_VERSION = "14.
|
|
69
|
+
var PACKAGE_VERSION = "14.8.1";
|
|
70
70
|
var setProvider = function setProvider(provider) {
|
|
71
71
|
return function (state, dispatch) {
|
|
72
72
|
if (dispatch) {
|
|
@@ -19,6 +19,7 @@ var _statusError = _interopRequireDefault(require("@atlaskit/icon/core/status-er
|
|
|
19
19
|
var _pressable = _interopRequireDefault(require("@atlaskit/primitives/pressable"));
|
|
20
20
|
var _userPicker = require("@atlaskit/user-picker");
|
|
21
21
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
22
|
+
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- TODO: migrate to @atlaskit/primitives/compiled
|
|
22
23
|
var mentionItemStyle = null;
|
|
23
24
|
var mentionItemSelectedStyle = null;
|
|
24
25
|
var displayNameStyles = {
|
|
@@ -336,7 +336,9 @@ var createTypeAheadConfig = exports.createTypeAheadConfig = function createTypeA
|
|
|
336
336
|
api = _ref8.api,
|
|
337
337
|
handleMentionsChanged = _ref8.handleMentionsChanged,
|
|
338
338
|
_ref8$enableAgentSect = _ref8.enableAgentSectioning,
|
|
339
|
-
enableAgentSectioning = _ref8$enableAgentSect === void 0 ? false : _ref8$enableAgentSect
|
|
339
|
+
enableAgentSectioning = _ref8$enableAgentSect === void 0 ? false : _ref8$enableAgentSect,
|
|
340
|
+
_ref8$showAgentMentio = _ref8.showAgentMentionsLabsLozenge,
|
|
341
|
+
showAgentMentionsLabsLozenge = _ref8$showAgentMentio === void 0 ? false : _ref8$showAgentMentio;
|
|
340
342
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
341
343
|
var sessionId = (0, _uuid.default)();
|
|
342
344
|
var firstQueryWithoutResults = null;
|
|
@@ -437,9 +439,9 @@ var createTypeAheadConfig = exports.createTypeAheadConfig = function createTypeA
|
|
|
437
439
|
showWhenQueryPresent: false,
|
|
438
440
|
showWhenOnlySection: true
|
|
439
441
|
},
|
|
440
|
-
lozenge: /*#__PURE__*/_react.default.createElement(_lozenge.default, {
|
|
442
|
+
lozenge: !(0, _platformFeatureFlags.fg)('platform_editor_agent_mentions_drop_one_fixes') || showAgentMentionsLabsLozenge ? /*#__PURE__*/_react.default.createElement(_lozenge.default, {
|
|
441
443
|
appearance: "discovery"
|
|
442
|
-
}, intl.formatMessage(_messages.mentionMessages.typeAheadSectionAgentsLabsLozengeLabel))
|
|
444
|
+
}, intl.formatMessage(_messages.mentionMessages.typeAheadSectionAgentsLabsLozengeLabel)) : null
|
|
443
445
|
}];
|
|
444
446
|
},
|
|
445
447
|
onOpen: function onOpen() {
|
|
@@ -103,6 +103,7 @@ const mentionsPlugin = ({
|
|
|
103
103
|
HighlightComponent: options === null || options === void 0 ? void 0 : options.HighlightComponent,
|
|
104
104
|
handleMentionsChanged: options === null || options === void 0 ? void 0 : options.handleMentionsChanged,
|
|
105
105
|
enableAgentSectioning: options === null || options === void 0 ? void 0 : options.enableAgentSectioning,
|
|
106
|
+
showAgentMentionsLabsLozenge: options === null || options === void 0 ? void 0 : options.showAgentMentionsLabsLozenge,
|
|
106
107
|
fireEvent,
|
|
107
108
|
api
|
|
108
109
|
});
|
|
@@ -50,7 +50,7 @@ const AI_STREAMING_TRANSFORMATION_META_KEY = 'isAIStreamingTransformation';
|
|
|
50
50
|
const AGENT_MENTION_INACTIVITY_MS = 3000;
|
|
51
51
|
const MAX_PENDING_TYPED_AGENT_MENTION_FOCUS_DEFERS = 20;
|
|
52
52
|
const PACKAGE_NAME = "@atlaskit/editor-plugin-mentions";
|
|
53
|
-
const PACKAGE_VERSION = "14.
|
|
53
|
+
const PACKAGE_VERSION = "14.8.1";
|
|
54
54
|
const setProvider = provider => (state, dispatch) => {
|
|
55
55
|
if (dispatch) {
|
|
56
56
|
dispatch(state.tr.setMeta(mentionPluginKey, {
|
|
@@ -7,6 +7,7 @@ import { FormattedMessage, injectIntl } from 'react-intl';
|
|
|
7
7
|
import { mentionMessages as messages } from '@atlaskit/editor-common/messages';
|
|
8
8
|
import EmailIcon from '@atlaskit/icon/core/email';
|
|
9
9
|
import StatusErrorIcon from '@atlaskit/icon/core/status-error';
|
|
10
|
+
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- TODO: migrate to @atlaskit/primitives/compiled
|
|
10
11
|
import Pressable from '@atlaskit/primitives/pressable';
|
|
11
12
|
import { isValidEmail } from '@atlaskit/user-picker';
|
|
12
13
|
const mentionItemStyle = null;
|
|
@@ -300,7 +300,8 @@ export const createTypeAheadConfig = ({
|
|
|
300
300
|
HighlightComponent,
|
|
301
301
|
api,
|
|
302
302
|
handleMentionsChanged,
|
|
303
|
-
enableAgentSectioning = false
|
|
303
|
+
enableAgentSectioning = false,
|
|
304
|
+
showAgentMentionsLabsLozenge = false
|
|
304
305
|
}) => {
|
|
305
306
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
306
307
|
let sessionId = uuid();
|
|
@@ -400,9 +401,9 @@ export const createTypeAheadConfig = ({
|
|
|
400
401
|
showWhenQueryPresent: false,
|
|
401
402
|
showWhenOnlySection: true
|
|
402
403
|
},
|
|
403
|
-
lozenge: /*#__PURE__*/React.createElement(Lozenge, {
|
|
404
|
+
lozenge: !fg('platform_editor_agent_mentions_drop_one_fixes') || showAgentMentionsLabsLozenge ? /*#__PURE__*/React.createElement(Lozenge, {
|
|
404
405
|
appearance: "discovery"
|
|
405
|
-
}, intl.formatMessage(mentionMessages.typeAheadSectionAgentsLabsLozengeLabel))
|
|
406
|
+
}, intl.formatMessage(mentionMessages.typeAheadSectionAgentsLabsLozengeLabel)) : null
|
|
406
407
|
}];
|
|
407
408
|
},
|
|
408
409
|
onOpen: () => {
|
|
@@ -99,6 +99,7 @@ var mentionsPlugin = function mentionsPlugin(_ref3) {
|
|
|
99
99
|
HighlightComponent: options === null || options === void 0 ? void 0 : options.HighlightComponent,
|
|
100
100
|
handleMentionsChanged: options === null || options === void 0 ? void 0 : options.handleMentionsChanged,
|
|
101
101
|
enableAgentSectioning: options === null || options === void 0 ? void 0 : options.enableAgentSectioning,
|
|
102
|
+
showAgentMentionsLabsLozenge: options === null || options === void 0 ? void 0 : options.showAgentMentionsLabsLozenge,
|
|
102
103
|
fireEvent: fireEvent,
|
|
103
104
|
api: api
|
|
104
105
|
});
|
|
@@ -57,7 +57,7 @@ var AI_STREAMING_TRANSFORMATION_META_KEY = 'isAIStreamingTransformation';
|
|
|
57
57
|
var AGENT_MENTION_INACTIVITY_MS = 3000;
|
|
58
58
|
var MAX_PENDING_TYPED_AGENT_MENTION_FOCUS_DEFERS = 20;
|
|
59
59
|
var PACKAGE_NAME = "@atlaskit/editor-plugin-mentions";
|
|
60
|
-
var PACKAGE_VERSION = "14.
|
|
60
|
+
var PACKAGE_VERSION = "14.8.1";
|
|
61
61
|
var setProvider = function setProvider(provider) {
|
|
62
62
|
return function (state, dispatch) {
|
|
63
63
|
if (dispatch) {
|
|
@@ -8,6 +8,7 @@ import { FormattedMessage, injectIntl } from 'react-intl';
|
|
|
8
8
|
import { mentionMessages as messages } from '@atlaskit/editor-common/messages';
|
|
9
9
|
import EmailIcon from '@atlaskit/icon/core/email';
|
|
10
10
|
import StatusErrorIcon from '@atlaskit/icon/core/status-error';
|
|
11
|
+
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- TODO: migrate to @atlaskit/primitives/compiled
|
|
11
12
|
import Pressable from '@atlaskit/primitives/pressable';
|
|
12
13
|
import { isValidEmail } from '@atlaskit/user-picker';
|
|
13
14
|
var mentionItemStyle = null;
|
|
@@ -327,7 +327,9 @@ export var createTypeAheadConfig = function createTypeAheadConfig(_ref8) {
|
|
|
327
327
|
api = _ref8.api,
|
|
328
328
|
handleMentionsChanged = _ref8.handleMentionsChanged,
|
|
329
329
|
_ref8$enableAgentSect = _ref8.enableAgentSectioning,
|
|
330
|
-
enableAgentSectioning = _ref8$enableAgentSect === void 0 ? false : _ref8$enableAgentSect
|
|
330
|
+
enableAgentSectioning = _ref8$enableAgentSect === void 0 ? false : _ref8$enableAgentSect,
|
|
331
|
+
_ref8$showAgentMentio = _ref8.showAgentMentionsLabsLozenge,
|
|
332
|
+
showAgentMentionsLabsLozenge = _ref8$showAgentMentio === void 0 ? false : _ref8$showAgentMentio;
|
|
331
333
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
332
334
|
var sessionId = uuid();
|
|
333
335
|
var firstQueryWithoutResults = null;
|
|
@@ -428,9 +430,9 @@ export var createTypeAheadConfig = function createTypeAheadConfig(_ref8) {
|
|
|
428
430
|
showWhenQueryPresent: false,
|
|
429
431
|
showWhenOnlySection: true
|
|
430
432
|
},
|
|
431
|
-
lozenge: /*#__PURE__*/React.createElement(Lozenge, {
|
|
433
|
+
lozenge: !fg('platform_editor_agent_mentions_drop_one_fixes') || showAgentMentionsLabsLozenge ? /*#__PURE__*/React.createElement(Lozenge, {
|
|
432
434
|
appearance: "discovery"
|
|
433
|
-
}, intl.formatMessage(mentionMessages.typeAheadSectionAgentsLabsLozengeLabel))
|
|
435
|
+
}, intl.formatMessage(mentionMessages.typeAheadSectionAgentsLabsLozengeLabel)) : null
|
|
434
436
|
}];
|
|
435
437
|
},
|
|
436
438
|
onOpen: function onOpen() {
|
|
@@ -50,6 +50,10 @@ export interface MentionsPluginOptions extends MentionPluginConfig {
|
|
|
50
50
|
handleMentionsChanged?: MentionsChangedHandler;
|
|
51
51
|
mentionProvider?: Providers['mentionProvider'];
|
|
52
52
|
sanitizePrivateContent?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Shows the experimental Labs label beside the agent mentions section when the agent mentions experiment is enabled.
|
|
55
|
+
*/
|
|
56
|
+
showAgentMentionsLabsLozenge?: boolean;
|
|
53
57
|
}
|
|
54
58
|
/**
|
|
55
59
|
* @private
|
|
@@ -19,6 +19,7 @@ type Props = {
|
|
|
19
19
|
HighlightComponent?: React.ComponentType<React.PropsWithChildren<unknown>>;
|
|
20
20
|
mentionInsertDisplayName?: boolean;
|
|
21
21
|
sanitizePrivateContent?: boolean;
|
|
22
|
+
showAgentMentionsLabsLozenge?: boolean;
|
|
22
23
|
};
|
|
23
|
-
export declare const createTypeAheadConfig: ({ sanitizePrivateContent, mentionInsertDisplayName, fireEvent, HighlightComponent, api, handleMentionsChanged, enableAgentSectioning, }: Props) => TypeAheadHandler;
|
|
24
|
+
export declare const createTypeAheadConfig: ({ sanitizePrivateContent, mentionInsertDisplayName, fireEvent, HighlightComponent, api, handleMentionsChanged, enableAgentSectioning, showAgentMentionsLabsLozenge, }: Props) => TypeAheadHandler;
|
|
24
25
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-mentions",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.9.0",
|
|
4
4
|
"description": "Mentions plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -37,12 +37,12 @@
|
|
|
37
37
|
"@atlaskit/platform-feature-flags": "^2.0.0",
|
|
38
38
|
"@atlaskit/popper": "^8.3.0",
|
|
39
39
|
"@atlaskit/portal": "^6.1.0",
|
|
40
|
-
"@atlaskit/primitives": "^
|
|
41
|
-
"@atlaskit/profilecard": "^26.
|
|
40
|
+
"@atlaskit/primitives": "^22.0.0",
|
|
41
|
+
"@atlaskit/profilecard": "^26.10.0",
|
|
42
42
|
"@atlaskit/teams-app-config": "^2.1.0",
|
|
43
43
|
"@atlaskit/theme": "^26.1.0",
|
|
44
|
-
"@atlaskit/tmp-editor-statsig": "^126.
|
|
45
|
-
"@atlaskit/tokens": "^
|
|
44
|
+
"@atlaskit/tmp-editor-statsig": "^126.2.0",
|
|
45
|
+
"@atlaskit/tokens": "^16.0.0",
|
|
46
46
|
"@atlaskit/tooltip": "^23.1.0",
|
|
47
47
|
"@atlaskit/user-picker": "^13.4.0",
|
|
48
48
|
"@babel/runtime": "^7.0.0",
|