@atlaskit/editor-plugin-mentions 8.2.9 → 8.2.10
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,13 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-mentions
|
|
2
2
|
|
|
3
|
+
## 8.2.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`4cab7924c4af0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4cab7924c4af0) -
|
|
8
|
+
[ux] Clean up editor_inline_comments_paste_insert_nodes
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 8.2.9
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -9,7 +9,6 @@ var _uuid = _interopRequireDefault(require("uuid"));
|
|
|
9
9
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
10
10
|
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
11
11
|
var _resource = require("@atlaskit/mention/resource");
|
|
12
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
12
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
14
13
|
|
|
15
14
|
var createSingleMentionFragment = exports.createSingleMentionFragment = function createSingleMentionFragment(_ref) {
|
|
@@ -38,7 +37,7 @@ var createSingleMentionFragment = exports.createSingleMentionFragment = function
|
|
|
38
37
|
// Cache (locally) for later rendering
|
|
39
38
|
mentionProvider.cacheMentionName(id, renderName);
|
|
40
39
|
}
|
|
41
|
-
var annotationMarksForPos = (0,
|
|
40
|
+
var annotationMarksForPos = (0, _utils.getAnnotationMarksForPos)(tr.selection.$head);
|
|
42
41
|
var mentionNode = schema.nodes.mention.createChecked({
|
|
43
42
|
text: text,
|
|
44
43
|
id: id,
|
|
@@ -46,8 +45,8 @@ var createSingleMentionFragment = exports.createSingleMentionFragment = function
|
|
|
46
45
|
userType: userType === 'DEFAULT' ? null : userType,
|
|
47
46
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
48
47
|
localId: localId !== null && localId !== void 0 ? localId : (0, _uuid.default)()
|
|
49
|
-
}, null,
|
|
50
|
-
var space = schema.text(' ',
|
|
48
|
+
}, null, annotationMarksForPos);
|
|
49
|
+
var space = schema.text(' ', annotationMarksForPos);
|
|
51
50
|
return _model.Fragment.from([mentionNode, space]);
|
|
52
51
|
};
|
|
53
52
|
};
|
|
@@ -3,7 +3,6 @@ import uuid from 'uuid';
|
|
|
3
3
|
import { getAnnotationMarksForPos } from '@atlaskit/editor-common/utils';
|
|
4
4
|
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
5
5
|
import { isResolvingMentionProvider } from '@atlaskit/mention/resource';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
6
|
export const createSingleMentionFragment = ({
|
|
8
7
|
mentionInsertDisplayName,
|
|
9
8
|
mentionProvider,
|
|
@@ -31,7 +30,7 @@ export const createSingleMentionFragment = ({
|
|
|
31
30
|
// Cache (locally) for later rendering
|
|
32
31
|
mentionProvider.cacheMentionName(id, renderName);
|
|
33
32
|
}
|
|
34
|
-
const annotationMarksForPos =
|
|
33
|
+
const annotationMarksForPos = getAnnotationMarksForPos(tr.selection.$head);
|
|
35
34
|
const mentionNode = schema.nodes.mention.createChecked({
|
|
36
35
|
text,
|
|
37
36
|
id,
|
|
@@ -39,8 +38,8 @@ export const createSingleMentionFragment = ({
|
|
|
39
38
|
userType: userType === 'DEFAULT' ? null : userType,
|
|
40
39
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
41
40
|
localId: localId !== null && localId !== void 0 ? localId : uuid()
|
|
42
|
-
}, null,
|
|
43
|
-
const space = schema.text(' ',
|
|
41
|
+
}, null, annotationMarksForPos);
|
|
42
|
+
const space = schema.text(' ', annotationMarksForPos);
|
|
44
43
|
return Fragment.from([mentionNode, space]);
|
|
45
44
|
};
|
|
46
45
|
export const insertMention = ({
|
|
@@ -3,7 +3,6 @@ import uuid from 'uuid';
|
|
|
3
3
|
import { getAnnotationMarksForPos } from '@atlaskit/editor-common/utils';
|
|
4
4
|
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
5
5
|
import { isResolvingMentionProvider } from '@atlaskit/mention/resource';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
6
|
export var createSingleMentionFragment = function createSingleMentionFragment(_ref) {
|
|
8
7
|
var mentionInsertDisplayName = _ref.mentionInsertDisplayName,
|
|
9
8
|
mentionProvider = _ref.mentionProvider,
|
|
@@ -30,7 +29,7 @@ export var createSingleMentionFragment = function createSingleMentionFragment(_r
|
|
|
30
29
|
// Cache (locally) for later rendering
|
|
31
30
|
mentionProvider.cacheMentionName(id, renderName);
|
|
32
31
|
}
|
|
33
|
-
var annotationMarksForPos =
|
|
32
|
+
var annotationMarksForPos = getAnnotationMarksForPos(tr.selection.$head);
|
|
34
33
|
var mentionNode = schema.nodes.mention.createChecked({
|
|
35
34
|
text: text,
|
|
36
35
|
id: id,
|
|
@@ -38,8 +37,8 @@ export var createSingleMentionFragment = function createSingleMentionFragment(_r
|
|
|
38
37
|
userType: userType === 'DEFAULT' ? null : userType,
|
|
39
38
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
40
39
|
localId: localId !== null && localId !== void 0 ? localId : uuid()
|
|
41
|
-
}, null,
|
|
42
|
-
var space = schema.text(' ',
|
|
40
|
+
}, null, annotationMarksForPos);
|
|
41
|
+
var space = schema.text(' ', annotationMarksForPos);
|
|
43
42
|
return Fragment.from([mentionNode, space]);
|
|
44
43
|
};
|
|
45
44
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-mentions",
|
|
3
|
-
"version": "8.2.
|
|
3
|
+
"version": "8.2.10",
|
|
4
4
|
"description": "Mentions plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@atlaskit/portal": "^5.1.0",
|
|
47
47
|
"@atlaskit/profilecard": "^24.21.0",
|
|
48
48
|
"@atlaskit/theme": "^21.0.0",
|
|
49
|
-
"@atlaskit/tmp-editor-statsig": "^13.
|
|
49
|
+
"@atlaskit/tmp-editor-statsig": "^13.38.0",
|
|
50
50
|
"@atlaskit/tokens": "^8.0.0",
|
|
51
51
|
"@babel/runtime": "^7.0.0",
|
|
52
52
|
"@compiled/react": "^0.18.6",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"uuid": "^3.1.0"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
|
-
"@atlaskit/editor-common": "^110.
|
|
58
|
+
"@atlaskit/editor-common": "^110.29.0",
|
|
59
59
|
"react": "^18.2.0",
|
|
60
60
|
"react-dom": "^18.2.0",
|
|
61
61
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
@@ -104,9 +104,6 @@
|
|
|
104
104
|
]
|
|
105
105
|
},
|
|
106
106
|
"platform-feature-flags": {
|
|
107
|
-
"editor_inline_comments_paste_insert_nodes": {
|
|
108
|
-
"type": "boolean"
|
|
109
|
-
},
|
|
110
107
|
"team-mention-inline-smartlink": {
|
|
111
108
|
"type": "boolean"
|
|
112
109
|
},
|