@atlaskit/editor-plugin-mentions 15.0.0 → 15.0.2

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,19 @@
1
1
  # @atlaskit/editor-plugin-mentions
2
2
 
3
+ ## 15.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 15.0.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [`bfcdbf97bab93`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/bfcdbf97bab93) -
14
+ Consolidate editor agent-mention rollout controls under the rovo_chat_mention_agents experiment.
15
+ - Updated dependencies
16
+
3
17
  ## 15.0.0
4
18
 
5
19
  ### Patch Changes
@@ -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.11.4";
69
+ var PACKAGE_VERSION = "15.0.1";
70
70
  var setProvider = function setProvider(provider) {
71
71
  return function (state, dispatch) {
72
72
  if (dispatch) {
@@ -16,7 +16,7 @@ var _reactIntl = require("react-intl");
16
16
  var _messages = require("@atlaskit/editor-common/messages");
17
17
  var _email = _interopRequireDefault(require("@atlaskit/icon/core/email"));
18
18
  var _statusError = _interopRequireDefault(require("@atlaskit/icon/core/status-error"));
19
- var _pressable = _interopRequireDefault(require("@atlaskit/primitives/pressable"));
19
+ var _pressable = 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
22
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- TODO: migrate to @atlaskit/primitives/compiled
@@ -230,7 +230,7 @@ var InviteItemWithEmailDomain = function InviteItemWithEmailDomain(_ref2) {
230
230
  name: displayName
231
231
  }), /*#__PURE__*/_react.default.createElement("div", {
232
232
  className: (0, _runtime.ax)([style.byline])
233
- }, getByline())), /*#__PURE__*/_react.default.createElement(_pressable.default, {
233
+ }, getByline())), /*#__PURE__*/_react.default.createElement(_pressable.Pressable, {
234
234
  onClick: onInviteButtonClick,
235
235
  xcss: style.inviteButton,
236
236
  isDisabled: showErrorIcon
@@ -19,6 +19,7 @@ var _utils = require("@atlaskit/editor-prosemirror/utils");
19
19
  var _lozenge = _interopRequireDefault(require("@atlaskit/lozenge"));
20
20
  var _item = require("@atlaskit/mention/item");
21
21
  var _resource = require("@atlaskit/mention/resource");
22
+ var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
22
23
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
23
24
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
24
25
  var _expVal = require("@atlaskit/tmp-editor-statsig/expVal");
@@ -630,7 +631,8 @@ var createTypeAheadConfig = exports.createTypeAheadConfig = function createTypeA
630
631
  * people + agents to the dropdown without the typeahead dropping
631
632
  * the second emission on the floor.
632
633
  *
633
- * Gated behind `rovo_chat_agent_selection` (the same gate that drives
634
+ * Gated behind the `rovo_chat_mention_agents` experiment (the same control
635
+ * that drives
634
636
  * agent mentions in the Rovo chat input). The generic type-ahead hook
635
637
  * opts a handler into streaming purely by the presence of this method,
636
638
  * so we only attach it when the gate is on — otherwise the proven
@@ -734,8 +736,8 @@ var createTypeAheadConfig = exports.createTypeAheadConfig = function createTypeA
734
736
 
735
737
  // Presence of `subscribeToItemsUpdates` is how the type-ahead hook
736
738
  // opts a handler into the multi-emit path, so only expose it when the
737
- // agent-selection gate is on.
738
- if ((0, _platformFeatureFlags.fg)('rovo_chat_agent_selection')) {
739
+ // agent-mentions experiment is enabled.
740
+ if ((0, _isExperimentEnabled.isExperimentEnabled)('rovo_chat_mention_agents')) {
739
741
  typeAhead.subscribeToItemsUpdates = subscribeToItemsUpdates;
740
742
  }
741
743
  return typeAhead;
@@ -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.11.4";
53
+ const PACKAGE_VERSION = "15.0.1";
54
54
  const setProvider = provider => (state, dispatch) => {
55
55
  if (dispatch) {
56
56
  dispatch(state.tr.setMeta(mentionPluginKey, {
@@ -8,7 +8,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
10
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- TODO: migrate to @atlaskit/primitives/compiled
11
- import Pressable from '@atlaskit/primitives/pressable';
11
+ import { Pressable } from '@atlaskit/primitives/pressable';
12
12
  import { isValidEmail } from '@atlaskit/user-picker';
13
13
  const mentionItemStyle = null;
14
14
  const mentionItemSelectedStyle = null;
@@ -9,6 +9,7 @@ import { findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
9
9
  import Lozenge from '@atlaskit/lozenge';
10
10
  import { MENTION_ITEM_HEIGHT, MENTION_ITEM_HEIGHT_REFRESHED, MentionItem } from '@atlaskit/mention/item';
11
11
  import { isResolvingMentionProvider } from '@atlaskit/mention/resource';
12
+ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
12
13
  import { fg } from '@atlaskit/platform-feature-flags';
13
14
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
14
15
  import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
@@ -594,7 +595,8 @@ export const createTypeAheadConfig = ({
594
595
  * people + agents to the dropdown without the typeahead dropping
595
596
  * the second emission on the floor.
596
597
  *
597
- * Gated behind `rovo_chat_agent_selection` (the same gate that drives
598
+ * Gated behind the `rovo_chat_mention_agents` experiment (the same control
599
+ * that drives
598
600
  * agent mentions in the Rovo chat input). The generic type-ahead hook
599
601
  * opts a handler into streaming purely by the presence of this method,
600
602
  * so we only attach it when the gate is on — otherwise the proven
@@ -699,8 +701,8 @@ export const createTypeAheadConfig = ({
699
701
 
700
702
  // Presence of `subscribeToItemsUpdates` is how the type-ahead hook
701
703
  // opts a handler into the multi-emit path, so only expose it when the
702
- // agent-selection gate is on.
703
- if (fg('rovo_chat_agent_selection')) {
704
+ // agent-mentions experiment is enabled.
705
+ if (isExperimentEnabled('rovo_chat_mention_agents')) {
704
706
  typeAhead.subscribeToItemsUpdates = subscribeToItemsUpdates;
705
707
  }
706
708
  return typeAhead;
@@ -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.11.4";
60
+ var PACKAGE_VERSION = "15.0.1";
61
61
  var setProvider = function setProvider(provider) {
62
62
  return function (state, dispatch) {
63
63
  if (dispatch) {
@@ -9,7 +9,7 @@ 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
11
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- TODO: migrate to @atlaskit/primitives/compiled
12
- import Pressable from '@atlaskit/primitives/pressable';
12
+ import { Pressable } from '@atlaskit/primitives/pressable';
13
13
  import { isValidEmail } from '@atlaskit/user-picker';
14
14
  var mentionItemStyle = null;
15
15
  var mentionItemSelectedStyle = null;
@@ -16,6 +16,7 @@ import { findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
16
16
  import Lozenge from '@atlaskit/lozenge';
17
17
  import { MENTION_ITEM_HEIGHT, MENTION_ITEM_HEIGHT_REFRESHED, MentionItem } from '@atlaskit/mention/item';
18
18
  import { isResolvingMentionProvider } from '@atlaskit/mention/resource';
19
+ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
19
20
  import { fg } from '@atlaskit/platform-feature-flags';
20
21
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
21
22
  import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
@@ -621,7 +622,8 @@ export var createTypeAheadConfig = function createTypeAheadConfig(_ref8) {
621
622
  * people + agents to the dropdown without the typeahead dropping
622
623
  * the second emission on the floor.
623
624
  *
624
- * Gated behind `rovo_chat_agent_selection` (the same gate that drives
625
+ * Gated behind the `rovo_chat_mention_agents` experiment (the same control
626
+ * that drives
625
627
  * agent mentions in the Rovo chat input). The generic type-ahead hook
626
628
  * opts a handler into streaming purely by the presence of this method,
627
629
  * so we only attach it when the gate is on — otherwise the proven
@@ -725,8 +727,8 @@ export var createTypeAheadConfig = function createTypeAheadConfig(_ref8) {
725
727
 
726
728
  // Presence of `subscribeToItemsUpdates` is how the type-ahead hook
727
729
  // opts a handler into the multi-emit path, so only expose it when the
728
- // agent-selection gate is on.
729
- if (fg('rovo_chat_agent_selection')) {
730
+ // agent-mentions experiment is enabled.
731
+ if (isExperimentEnabled('rovo_chat_mention_agents')) {
730
732
  typeAhead.subscribeToItemsUpdates = subscribeToItemsUpdates;
731
733
  }
732
734
  return typeAhead;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-mentions",
3
- "version": "15.0.0",
3
+ "version": "15.0.2",
4
4
  "description": "Mentions plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -29,19 +29,21 @@
29
29
  "@atlaskit/editor-plugin-selection": "^13.0.0",
30
30
  "@atlaskit/editor-plugin-type-ahead": "^14.0.0",
31
31
  "@atlaskit/editor-prosemirror": "^8.0.0",
32
+ "@atlaskit/feature-gate-js-client": "^6.0.0",
32
33
  "@atlaskit/icon": "^37.2.0",
33
34
  "@atlaskit/insm": "^1.2.0",
34
35
  "@atlaskit/link": "^5.0.0",
35
36
  "@atlaskit/lozenge": "^15.0.0",
36
37
  "@atlaskit/mention": "^27.12.0",
38
+ "@atlaskit/platform-feature-experiments": "^0.3.0",
37
39
  "@atlaskit/platform-feature-flags": "^2.1.0",
38
- "@atlaskit/popper": "^8.5.0",
40
+ "@atlaskit/popper": "^9.0.0",
39
41
  "@atlaskit/portal": "^6.1.0",
40
42
  "@atlaskit/primitives": "^22.2.0",
41
43
  "@atlaskit/profilecard": "^26.14.0",
42
44
  "@atlaskit/teams-app-config": "^2.1.0",
43
45
  "@atlaskit/theme": "^26.1.0",
44
- "@atlaskit/tmp-editor-statsig": "^138.0.0",
46
+ "@atlaskit/tmp-editor-statsig": "^139.0.0",
45
47
  "@atlaskit/tokens": "^16.3.0",
46
48
  "@atlaskit/tooltip": "^24.0.0",
47
49
  "@atlaskit/user-picker": "^13.8.0",
@@ -118,8 +120,9 @@
118
120
  "people-teams_migrate-user-profile-card": {
119
121
  "type": "boolean"
120
122
  },
121
- "rovo_chat_agent_selection": {
122
- "type": "boolean"
123
+ "rovo_chat_mention_agents": {
124
+ "type": "experiment",
125
+ "referenceOnly": true
123
126
  },
124
127
  "platform_editor_agent_mentions_drop_one_fixes": {
125
128
  "type": "boolean"