@atlaskit/editor-plugin-mentions 2.9.1 → 2.10.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,26 @@
1
1
  # @atlaskit/editor-plugin-mentions
2
2
 
3
+ ## 2.10.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#154569](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/154569)
8
+ [`344239dfc7745`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/344239dfc7745) -
9
+ Use smart links for team mentions
10
+
11
+ ### Patch Changes
12
+
13
+ - [#154186](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/154186)
14
+ [`5c316170d29dd`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/5c316170d29dd) -
15
+ Bump @atlaskit/adf-schema to 42.3.1
16
+ - Updated dependencies
17
+
18
+ ## 2.9.2
19
+
20
+ ### Patch Changes
21
+
22
+ - Updated dependencies
23
+
3
24
  ## 2.9.1
4
25
 
5
26
  ### Patch Changes
@@ -23,7 +23,7 @@ var ACTIONS = {
23
23
  SET_PROVIDER: 'SET_PROVIDER'
24
24
  };
25
25
  var PACKAGE_NAME = "@atlaskit/editor-plugin-mentions";
26
- var PACKAGE_VERSION = "2.9.1";
26
+ var PACKAGE_VERSION = "2.10.0";
27
27
  var setProvider = function setProvider(provider) {
28
28
  return function (state, dispatch) {
29
29
  if (dispatch) {
@@ -160,7 +160,9 @@ var buildNodesForTeamMention = function buildNodesForTeamMention(schema, selecte
160
160
  // build team link
161
161
  var defaultTeamLink = "".concat(window.location.origin, "/people/team/").concat(teamId);
162
162
  var teamLink = context && context.teamLink ? context.teamLink : defaultTeamLink;
163
- var teamLinkNode = schema.text(name, [marks.link.create({
163
+ var teamLinkNode = (0, _platformFeatureFlags.fg)('team-mention-inline-smartlink') ? schema.nodes.inlineCard.create({
164
+ url: teamLink
165
+ }) : schema.text(name, [marks.link.create({
164
166
  href: teamLink
165
167
  })]);
166
168
  var openBracketText = schema.text('(');
@@ -13,7 +13,7 @@ const ACTIONS = {
13
13
  SET_PROVIDER: 'SET_PROVIDER'
14
14
  };
15
15
  const PACKAGE_NAME = "@atlaskit/editor-plugin-mentions";
16
- const PACKAGE_VERSION = "2.9.1";
16
+ const PACKAGE_VERSION = "2.10.0";
17
17
  const setProvider = provider => (state, dispatch) => {
18
18
  if (dispatch) {
19
19
  dispatch(state.tr.setMeta(mentionPluginKey, {
@@ -134,7 +134,9 @@ const buildNodesForTeamMention = (schema, selectedMention, mentionProvider, sani
134
134
  // build team link
135
135
  const defaultTeamLink = `${window.location.origin}/people/team/${teamId}`;
136
136
  const teamLink = context && context.teamLink ? context.teamLink : defaultTeamLink;
137
- const teamLinkNode = schema.text(name, [marks.link.create({
137
+ const teamLinkNode = fg('team-mention-inline-smartlink') ? schema.nodes.inlineCard.create({
138
+ url: teamLink
139
+ }) : schema.text(name, [marks.link.create({
138
140
  href: teamLink
139
141
  })]);
140
142
  const openBracketText = schema.text('(');
@@ -16,7 +16,7 @@ var ACTIONS = {
16
16
  SET_PROVIDER: 'SET_PROVIDER'
17
17
  };
18
18
  var PACKAGE_NAME = "@atlaskit/editor-plugin-mentions";
19
- var PACKAGE_VERSION = "2.9.1";
19
+ var PACKAGE_VERSION = "2.10.0";
20
20
  var setProvider = function setProvider(provider) {
21
21
  return function (state, dispatch) {
22
22
  if (dispatch) {
@@ -148,7 +148,9 @@ var buildNodesForTeamMention = function buildNodesForTeamMention(schema, selecte
148
148
  // build team link
149
149
  var defaultTeamLink = "".concat(window.location.origin, "/people/team/").concat(teamId);
150
150
  var teamLink = context && context.teamLink ? context.teamLink : defaultTeamLink;
151
- var teamLinkNode = schema.text(name, [marks.link.create({
151
+ var teamLinkNode = fg('team-mention-inline-smartlink') ? schema.nodes.inlineCard.create({
152
+ url: teamLink
153
+ }) : schema.text(name, [marks.link.create({
152
154
  href: teamLink
153
155
  })]);
154
156
  var openBracketText = schema.text('(');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-mentions",
3
- "version": "2.9.1",
3
+ "version": "2.10.0",
4
4
  "description": "Mentions plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -31,16 +31,16 @@
31
31
  ".": "./src/index.ts"
32
32
  },
33
33
  "dependencies": {
34
- "@atlaskit/adf-schema": "^42.0.2",
35
- "@atlaskit/editor-common": "^93.5.0",
34
+ "@atlaskit/adf-schema": "^42.3.1",
35
+ "@atlaskit/editor-common": "^94.0.0",
36
36
  "@atlaskit/editor-plugin-analytics": "^1.10.0",
37
37
  "@atlaskit/editor-plugin-context-identifier": "^1.3.0",
38
38
  "@atlaskit/editor-plugin-type-ahead": "^1.10.0",
39
39
  "@atlaskit/editor-prosemirror": "6.0.0",
40
- "@atlaskit/icon": "^22.22.0",
40
+ "@atlaskit/icon": "^22.23.0",
41
41
  "@atlaskit/mention": "^23.3.0",
42
42
  "@atlaskit/platform-feature-flags": "^0.3.0",
43
- "@atlaskit/theme": "^13.1.0",
43
+ "@atlaskit/theme": "^14.0.0",
44
44
  "@atlaskit/tokens": "^2.0.0",
45
45
  "@babel/runtime": "^7.0.0",
46
46
  "@emotion/react": "^11.7.1",
@@ -104,6 +104,9 @@
104
104
  },
105
105
  "confluence_updated_mentions_livepages": {
106
106
  "type": "boolean"
107
+ },
108
+ "team-mention-inline-smartlink": {
109
+ "type": "boolean"
107
110
  }
108
111
  }
109
112
  }