@atlaskit/editor-plugin-mentions 32.1.9 → 32.2.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 CHANGED
@@ -1,5 +1,28 @@
1
1
  # @atlaskit/editor-plugin-mentions
2
2
 
3
+ ## 32.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`01bc5e31dd709`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/01bc5e31dd709) -
8
+ Clean up the `platform_editor_team_mention_link_analytics` feature gate. Team mention insertions
9
+ now always attach link metadata to the insert transaction.
10
+ - Updated dependencies
11
+
12
+ ## 32.2.0
13
+
14
+ ### Minor Changes
15
+
16
+ - [`059477aa93f45`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/059477aa93f45) -
17
+ Add an optimistic-toolbar opt-out to plugin configuration. Exclude Live pages from
18
+ platform_editor_ssr_toolbar_optimistic, including early editor-state exposure, toolbar rendering,
19
+ and asynchronous media and mention provider initialization. Preserve the experiment for Edit pages
20
+ regardless of toolbar docking position.
21
+
22
+ ### Patch Changes
23
+
24
+ - Updated dependencies
25
+
3
26
  ## 32.1.9
4
27
 
5
28
  ### Patch Changes
package/compass.yml CHANGED
@@ -35,7 +35,7 @@ customFields:
35
35
  value: true
36
36
  - name: Reviewer Selection Mechanism
37
37
  type: text
38
- value: random(2)
38
+ value: randomTZIgnored(2)
39
39
  - name: Required Reviewer Approvals
40
40
  type: number
41
41
  value: 1
@@ -45,7 +45,7 @@ var ACTIONS = exports.ACTIONS = {
45
45
  CLEAR_PENDING_PASTED_AGENT_MENTION: 'CLEAR_PENDING_PASTED_AGENT_MENTION'
46
46
  };
47
47
  var PACKAGE_NAME = "@atlaskit/editor-plugin-mentions";
48
- var PACKAGE_VERSION = "32.1.8";
48
+ var PACKAGE_VERSION = "32.2.0";
49
49
  var setProvider = function setProvider(provider) {
50
50
  return function (state, dispatch) {
51
51
  if (dispatch) {
@@ -195,7 +195,7 @@ function createMentionPlugin(_ref) {
195
195
  },
196
196
  view: function view(editorView) {
197
197
  var destroyed = false;
198
- var optimistic = (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_ssr_toolbar_optimistic');
198
+ var optimistic = !(options !== null && options !== void 0 && options.disableOptimisticToolbar) && (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_ssr_toolbar_optimistic');
199
199
  var currentProviderPromise;
200
200
  var providerHandler = function providerHandler(name, providerPromise) {
201
201
  switch (name) {
@@ -1,4 +1,4 @@
1
- /* InlineInvitePopupContainer.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* InlineInvitePopupContainer.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1,4 +1,4 @@
1
- /* InviteItemWithEmailDomain.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* InviteItemWithEmailDomain.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* index.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1,4 +1,4 @@
1
- /* ProfileCardComponent.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* ProfileCardComponent.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1,4 +1,4 @@
1
- /* AgentMentionLoadErrorItem.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* AgentMentionLoadErrorItem.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1,4 +1,4 @@
1
- /* MentionItemWithProfileCard.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* MentionItemWithProfileCard.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -673,13 +673,10 @@ var createTypeAheadConfig = exports.createTypeAheadConfig = function createTypeA
673
673
  sessionId = (0, _uuid.v4)();
674
674
  if (mentionProvider && (0, _utils3.isTeamType)(userType)) {
675
675
  var teamMentionTr = insert(buildNodesForTeamMention(schema, item.mention, mentionProvider, sanitizePrivateContent));
676
- if ((0, _fg.fg)('platform_editor_team_mention_link_analytics')) {
677
- return (0, _card.addLinkMetadata)(state.selection, teamMentionTr, {
678
- action: _enums.ACTION.INSERTED,
679
- inputMethod: _enums.INPUT_METHOD.MENTION_TYPEAHEAD
680
- });
681
- }
682
- return teamMentionTr;
676
+ return (0, _card.addLinkMetadata)(state.selection, teamMentionTr, {
677
+ action: _enums.ACTION.INSERTED,
678
+ inputMethod: _enums.INPUT_METHOD.MENTION_TYPEAHEAD
679
+ });
683
680
  }
684
681
  if (!isAgentMentionInsertion && isXProductUser && mentionProvider && mentionProvider.inviteXProductUser) {
685
682
  mentionProvider.inviteXProductUser(id, name);
@@ -34,7 +34,7 @@ export const ACTIONS = {
34
34
  CLEAR_PENDING_PASTED_AGENT_MENTION: 'CLEAR_PENDING_PASTED_AGENT_MENTION'
35
35
  };
36
36
  const PACKAGE_NAME = "@atlaskit/editor-plugin-mentions";
37
- const PACKAGE_VERSION = "32.1.8";
37
+ const PACKAGE_VERSION = "32.2.0";
38
38
  const setProvider = provider => (state, dispatch) => {
39
39
  if (dispatch) {
40
40
  dispatch(state.tr.setMeta(mentionPluginKey, {
@@ -183,7 +183,7 @@ export function createMentionPlugin({
183
183
  },
184
184
  view(editorView) {
185
185
  let destroyed = false;
186
- const optimistic = isExperimentEnabled('platform_editor_ssr_toolbar_optimistic');
186
+ const optimistic = !(options !== null && options !== void 0 && options.disableOptimisticToolbar) && isExperimentEnabled('platform_editor_ssr_toolbar_optimistic');
187
187
  let currentProviderPromise;
188
188
  const providerHandler = (name, providerPromise) => {
189
189
  switch (name) {
@@ -1,4 +1,4 @@
1
- /* InlineInvitePopupContainer.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* InlineInvitePopupContainer.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import { ax, ix } from "@compiled/react/runtime";
3
3
  import React, { useCallback, useEffect, useRef, useState } from 'react';
4
4
  const findMentionRange = (doc, localId) => {
@@ -1,4 +1,4 @@
1
- /* InviteItemWithEmailDomain.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* InviteItemWithEmailDomain.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./InviteItemWithEmailDomain.compiled.css";
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* index.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./index.compiled.css";
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* ProfileCardComponent.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* ProfileCardComponent.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./ProfileCardComponent.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* AgentMentionLoadErrorItem.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* AgentMentionLoadErrorItem.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./AgentMentionLoadErrorItem.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* MentionItemWithProfileCard.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* MentionItemWithProfileCard.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./MentionItemWithProfileCard.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
@@ -638,13 +638,10 @@ export const createTypeAheadConfig = ({
638
638
  sessionId = uuid();
639
639
  if (mentionProvider && isTeamType(userType)) {
640
640
  const teamMentionTr = insert(buildNodesForTeamMention(schema, item.mention, mentionProvider, sanitizePrivateContent));
641
- if (fg('platform_editor_team_mention_link_analytics')) {
642
- return addLinkMetadata(state.selection, teamMentionTr, {
643
- action: ACTION.INSERTED,
644
- inputMethod: INPUT_METHOD.MENTION_TYPEAHEAD
645
- });
646
- }
647
- return teamMentionTr;
641
+ return addLinkMetadata(state.selection, teamMentionTr, {
642
+ action: ACTION.INSERTED,
643
+ inputMethod: INPUT_METHOD.MENTION_TYPEAHEAD
644
+ });
648
645
  }
649
646
  if (!isAgentMentionInsertion && isXProductUser && mentionProvider && mentionProvider.inviteXProductUser) {
650
647
  mentionProvider.inviteXProductUser(id, name);
@@ -37,7 +37,7 @@ export var ACTIONS = {
37
37
  CLEAR_PENDING_PASTED_AGENT_MENTION: 'CLEAR_PENDING_PASTED_AGENT_MENTION'
38
38
  };
39
39
  var PACKAGE_NAME = "@atlaskit/editor-plugin-mentions";
40
- var PACKAGE_VERSION = "32.1.8";
40
+ var PACKAGE_VERSION = "32.2.0";
41
41
  var setProvider = function setProvider(provider) {
42
42
  return function (state, dispatch) {
43
43
  if (dispatch) {
@@ -187,7 +187,7 @@ export function createMentionPlugin(_ref) {
187
187
  },
188
188
  view: function view(editorView) {
189
189
  var destroyed = false;
190
- var optimistic = isExperimentEnabled('platform_editor_ssr_toolbar_optimistic');
190
+ var optimistic = !(options !== null && options !== void 0 && options.disableOptimisticToolbar) && isExperimentEnabled('platform_editor_ssr_toolbar_optimistic');
191
191
  var currentProviderPromise;
192
192
  var providerHandler = function providerHandler(name, providerPromise) {
193
193
  switch (name) {
@@ -1,4 +1,4 @@
1
- /* InlineInvitePopupContainer.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* InlineInvitePopupContainer.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { useCallback, useEffect, useRef, useState } from 'react';
@@ -1,4 +1,4 @@
1
- /* InviteItemWithEmailDomain.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* InviteItemWithEmailDomain.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
4
  import "./InviteItemWithEmailDomain.compiled.css";
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* index.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./index.compiled.css";
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* ProfileCardComponent.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* ProfileCardComponent.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
3
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
4
  import "./ProfileCardComponent.compiled.css";
@@ -1,4 +1,4 @@
1
- /* AgentMentionLoadErrorItem.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* AgentMentionLoadErrorItem.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./AgentMentionLoadErrorItem.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* MentionItemWithProfileCard.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* MentionItemWithProfileCard.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  import "./MentionItemWithProfileCard.compiled.css";
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -664,13 +664,10 @@ export var createTypeAheadConfig = function createTypeAheadConfig(_ref1) {
664
664
  sessionId = uuid();
665
665
  if (mentionProvider && isTeamType(userType)) {
666
666
  var teamMentionTr = insert(buildNodesForTeamMention(schema, item.mention, mentionProvider, sanitizePrivateContent));
667
- if (fg('platform_editor_team_mention_link_analytics')) {
668
- return addLinkMetadata(state.selection, teamMentionTr, {
669
- action: ACTION.INSERTED,
670
- inputMethod: INPUT_METHOD.MENTION_TYPEAHEAD
671
- });
672
- }
673
- return teamMentionTr;
667
+ return addLinkMetadata(state.selection, teamMentionTr, {
668
+ action: ACTION.INSERTED,
669
+ inputMethod: INPUT_METHOD.MENTION_TYPEAHEAD
670
+ });
674
671
  }
675
672
  if (!isAgentMentionInsertion && isXProductUser && mentionProvider && mentionProvider.inviteXProductUser) {
676
673
  mentionProvider.inviteXProductUser(id, name);
@@ -44,6 +44,8 @@ export interface MentionsPluginOptions extends MentionPluginConfig {
44
44
  * Takes priority over `MentionProvider.shouldHighlightMention()` if both are present.
45
45
  */
46
46
  currentUserId?: string;
47
+ /** Opt this editor surface out of the optimistic SSR toolbar experiment. */
48
+ disableOptimisticToolbar?: boolean;
47
49
  /**
48
50
  * Enables People / Agents sectioning in the mentions typeahead.
49
51
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-mentions",
3
- "version": "32.1.9",
3
+ "version": "32.2.1",
4
4
  "description": "Mentions plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -34,7 +34,7 @@
34
34
  "@atlaskit/insm": "^3.0.0",
35
35
  "@atlaskit/link": "^5.1.0",
36
36
  "@atlaskit/lozenge": "^17.0.0",
37
- "@atlaskit/mention": "^30.7.0",
37
+ "@atlaskit/mention": "^30.9.0",
38
38
  "@atlaskit/node-data-provider": "^31.0.0",
39
39
  "@atlaskit/platform-feature-experiments": "^0.3.0",
40
40
  "@atlaskit/platform-feature-flags": "^2.2.0",
@@ -42,14 +42,14 @@
42
42
  "@atlaskit/popup": "^10.2.0",
43
43
  "@atlaskit/portal": "^7.1.0",
44
44
  "@atlaskit/primitives": "^22.7.0",
45
- "@atlaskit/profilecard": "^27.6.0",
45
+ "@atlaskit/profilecard": "^27.8.0",
46
46
  "@atlaskit/section-message": "^10.2.0",
47
47
  "@atlaskit/teams-app-config": "^3.1.0",
48
48
  "@atlaskit/theme": "^28.2.0",
49
- "@atlaskit/tmp-editor-statsig": "^259.0.0",
50
- "@atlaskit/tokens": "^20.10.0",
49
+ "@atlaskit/tmp-editor-statsig": "^260.0.0",
50
+ "@atlaskit/tokens": "^20.11.0",
51
51
  "@atlaskit/tooltip": "^24.4.0",
52
- "@atlaskit/user-picker": "^14.5.0",
52
+ "@atlaskit/user-picker": "^14.8.0",
53
53
  "@babel/runtime": "^7.0.0",
54
54
  "@compiled/react": "^1.0.2",
55
55
  "bind-event-listener": "^3.0.0",
@@ -59,15 +59,15 @@
59
59
  "uuid": "^11.1.1"
60
60
  },
61
61
  "peerDependencies": {
62
- "@atlaskit/editor-common": "^134.9.0",
62
+ "@atlaskit/editor-common": "^134.16.0",
63
63
  "react": "^18.2.0 || ^19.2.0",
64
64
  "react-dom": "^18.2.0 || ^19.2.0",
65
65
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
66
66
  },
67
67
  "devDependencies": {
68
- "@atlaskit/button": "^25.7.0",
69
- "@atlaskit/editor-common": "^134.9.0",
70
- "@atlaskit/editor-core": "^242.1.0",
68
+ "@atlaskit/button": "^25.8.0",
69
+ "@atlaskit/editor-common": "^134.16.0",
70
+ "@atlaskit/editor-core": "^242.3.0",
71
71
  "@atlassian/workbench": "workspace:*",
72
72
  "react": "^19.2.0",
73
73
  "react-dom": "^19.2.0",
@@ -85,9 +85,6 @@
85
85
  "team-mention-inline-smartlink": {
86
86
  "type": "boolean"
87
87
  },
88
- "platform_editor_team_mention_link_analytics": {
89
- "type": "boolean"
90
- },
91
88
  "platform_editor_mention_provider_via_plugin_config": {
92
89
  "type": "boolean"
93
90
  },