@atlaskit/editor-plugin-mentions 14.2.3 → 14.3.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 CHANGED
@@ -1,5 +1,16 @@
1
1
  # @atlaskit/editor-plugin-mentions
2
2
 
3
+ ## 14.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`cf7797df5ff1e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/cf7797df5ff1e) -
8
+ [ux] Add a Labs lozenge to the agent mention typeahead section.
9
+
10
+ ### Patch Changes
11
+
12
+ - Updated dependencies
13
+
3
14
  ## 14.2.3
4
15
 
5
16
  ### Patch Changes
@@ -39,7 +39,7 @@ var isAgentUserType = function isAgentUserType(userType) {
39
39
  var AI_STREAMING_TRANSFORMATION_META_KEY = 'isAIStreamingTransformation';
40
40
  var AGENT_MENTION_INACTIVITY_MS = 3000;
41
41
  var PACKAGE_NAME = "@atlaskit/editor-plugin-mentions";
42
- var PACKAGE_VERSION = "14.2.2";
42
+ var PACKAGE_VERSION = "14.2.3";
43
43
  var setProvider = function setProvider(provider) {
44
44
  return function (state, dispatch) {
45
45
  if (dispatch) {
@@ -16,6 +16,7 @@ var _messages = require("@atlaskit/editor-common/messages");
16
16
  var _typeAhead = require("@atlaskit/editor-common/type-ahead");
17
17
  var _model = require("@atlaskit/editor-prosemirror/model");
18
18
  var _utils = require("@atlaskit/editor-prosemirror/utils");
19
+ var _lozenge = _interopRequireDefault(require("@atlaskit/lozenge"));
19
20
  var _item = require("@atlaskit/mention/item");
20
21
  var _resource = require("@atlaskit/mention/resource");
21
22
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
@@ -343,7 +344,7 @@ var createTypeAheadConfig = exports.createTypeAheadConfig = function createTypeA
343
344
  showWhenQueryPresent: false,
344
345
  showWhenOnlySection: true
345
346
  }
346
- } : {}), _objectSpread({
347
+ } : {}), _objectSpread(_objectSpread({
347
348
  id: 'agents',
348
349
  title: intl.formatMessage(_messages.mentionMessages.typeAheadSectionAgents),
349
350
  filter: function filter(item) {
@@ -355,6 +356,10 @@ var createTypeAheadConfig = exports.createTypeAheadConfig = function createTypeA
355
356
  showWhenQueryPresent: false,
356
357
  showWhenOnlySection: true
357
358
  }
359
+ } : {}), (0, _expVal.expVal)('platform_editor_agent_mentions', 'isEnabled', false) ? {
360
+ lozenge: /*#__PURE__*/_react.default.createElement(_lozenge.default, {
361
+ appearance: "new"
362
+ }, intl.formatMessage(_messages.mentionMessages.typeAheadSectionAgentsLabs))
358
363
  } : {})];
359
364
  },
360
365
  onOpen: function onOpen() {
@@ -24,7 +24,7 @@ const isAgentUserType = userType => {
24
24
  const AI_STREAMING_TRANSFORMATION_META_KEY = 'isAIStreamingTransformation';
25
25
  const AGENT_MENTION_INACTIVITY_MS = 3000;
26
26
  const PACKAGE_NAME = "@atlaskit/editor-plugin-mentions";
27
- const PACKAGE_VERSION = "14.2.2";
27
+ const PACKAGE_VERSION = "14.2.3";
28
28
  const setProvider = provider => (state, dispatch) => {
29
29
  if (dispatch) {
30
30
  dispatch(state.tr.setMeta(mentionPluginKey, {
@@ -6,6 +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 Lozenge from '@atlaskit/lozenge';
9
10
  import { MENTION_ITEM_HEIGHT, MENTION_ITEM_HEIGHT_REFRESHED, MentionItem } from '@atlaskit/mention/item';
10
11
  import { isResolvingMentionProvider } from '@atlaskit/mention/resource';
11
12
  import { fg } from '@atlaskit/platform-feature-flags';
@@ -328,6 +329,11 @@ export const createTypeAheadConfig = ({
328
329
  showWhenQueryPresent: false,
329
330
  showWhenOnlySection: true
330
331
  }
332
+ } : {}),
333
+ ...(expVal('platform_editor_agent_mentions', 'isEnabled', false) ? {
334
+ lozenge: /*#__PURE__*/React.createElement(Lozenge, {
335
+ appearance: "new"
336
+ }, intl.formatMessage(mentionMessages.typeAheadSectionAgentsLabs))
331
337
  } : {})
332
338
  }];
333
339
  },
@@ -31,7 +31,7 @@ var isAgentUserType = function isAgentUserType(userType) {
31
31
  var AI_STREAMING_TRANSFORMATION_META_KEY = 'isAIStreamingTransformation';
32
32
  var AGENT_MENTION_INACTIVITY_MS = 3000;
33
33
  var PACKAGE_NAME = "@atlaskit/editor-plugin-mentions";
34
- var PACKAGE_VERSION = "14.2.2";
34
+ var PACKAGE_VERSION = "14.2.3";
35
35
  var setProvider = function setProvider(provider) {
36
36
  return function (state, dispatch) {
37
37
  if (dispatch) {
@@ -13,6 +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 Lozenge from '@atlaskit/lozenge';
16
17
  import { MENTION_ITEM_HEIGHT, MENTION_ITEM_HEIGHT_REFRESHED, MentionItem } from '@atlaskit/mention/item';
17
18
  import { isResolvingMentionProvider } from '@atlaskit/mention/resource';
18
19
  import { fg } from '@atlaskit/platform-feature-flags';
@@ -334,7 +335,7 @@ export var createTypeAheadConfig = function createTypeAheadConfig(_ref6) {
334
335
  showWhenQueryPresent: false,
335
336
  showWhenOnlySection: true
336
337
  }
337
- } : {}), _objectSpread({
338
+ } : {}), _objectSpread(_objectSpread({
338
339
  id: 'agents',
339
340
  title: intl.formatMessage(mentionMessages.typeAheadSectionAgents),
340
341
  filter: function filter(item) {
@@ -346,6 +347,10 @@ export var createTypeAheadConfig = function createTypeAheadConfig(_ref6) {
346
347
  showWhenQueryPresent: false,
347
348
  showWhenOnlySection: true
348
349
  }
350
+ } : {}), expVal('platform_editor_agent_mentions', 'isEnabled', false) ? {
351
+ lozenge: /*#__PURE__*/React.createElement(Lozenge, {
352
+ appearance: "new"
353
+ }, intl.formatMessage(mentionMessages.typeAheadSectionAgentsLabs))
349
354
  } : {})];
350
355
  },
351
356
  onOpen: function onOpen() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-mentions",
3
- "version": "14.2.3",
3
+ "version": "14.3.0",
4
4
  "description": "Mentions plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -32,7 +32,8 @@
32
32
  "@atlaskit/icon": "^36.0.0",
33
33
  "@atlaskit/insm": "^1.0.0",
34
34
  "@atlaskit/link": "^4.0.0",
35
- "@atlaskit/mention": "^27.1.0",
35
+ "@atlaskit/lozenge": "^14.0.0",
36
+ "@atlaskit/mention": "^27.2.0",
36
37
  "@atlaskit/platform-feature-flags": "^2.0.0",
37
38
  "@atlaskit/popper": "^8.0.0",
38
39
  "@atlaskit/portal": "^6.0.0",
@@ -40,10 +41,10 @@
40
41
  "@atlaskit/profilecard": "^26.1.0",
41
42
  "@atlaskit/teams-app-config": "^2.0.0",
42
43
  "@atlaskit/theme": "^26.0.0",
43
- "@atlaskit/tmp-editor-statsig": "^109.0.0",
44
+ "@atlaskit/tmp-editor-statsig": "^109.2.0",
44
45
  "@atlaskit/tokens": "^14.0.0",
45
46
  "@atlaskit/tooltip": "^23.0.0",
46
- "@atlaskit/user-picker": "^13.1.0",
47
+ "@atlaskit/user-picker": "^13.2.0",
47
48
  "@babel/runtime": "^7.0.0",
48
49
  "@compiled/react": "^0.20.0",
49
50
  "bind-event-listener": "^3.0.0",
@@ -52,7 +53,7 @@
52
53
  "uuid": "^3.1.0"
53
54
  },
54
55
  "peerDependencies": {
55
- "@atlaskit/editor-common": "^116.6.0",
56
+ "@atlaskit/editor-common": "^116.10.0",
56
57
  "react": "^18.2.0",
57
58
  "react-dom": "^18.2.0",
58
59
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
@@ -61,7 +62,7 @@
61
62
  "@testing-library/react": "^16.3.0",
62
63
  "react": "^18.2.0",
63
64
  "react-dom": "^18.2.0",
64
- "react-intl": "^6.6.2",
65
+ "react-intl": "^7.0.0",
65
66
  "wait-for-expect": "^1.2.0"
66
67
  },
67
68
  "techstack": {