@atlaskit/editor-plugin-mentions 12.1.17 → 12.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 +18 -0
- package/dist/cjs/entry-points/editor-commands.js +1 -0
- package/dist/cjs/entry-points/mentions-plugin-type.js +1 -0
- package/dist/cjs/entry-points/mentions-plugin.js +12 -0
- package/dist/cjs/entry-points/types.js +1 -0
- package/dist/cjs/nodeviews/profileCardRenderer.js +61 -3
- package/dist/cjs/pm-plugins/main.js +1 -1
- package/dist/es2019/entry-points/editor-commands.js +0 -0
- package/dist/es2019/entry-points/mentions-plugin-type.js +0 -0
- package/dist/es2019/entry-points/mentions-plugin.js +2 -0
- package/dist/es2019/entry-points/types.js +0 -0
- package/dist/es2019/nodeviews/profileCardRenderer.js +62 -2
- package/dist/es2019/pm-plugins/main.js +1 -1
- package/dist/esm/entry-points/editor-commands.js +0 -0
- package/dist/esm/entry-points/mentions-plugin-type.js +0 -0
- package/dist/esm/entry-points/mentions-plugin.js +2 -0
- package/dist/esm/entry-points/types.js +0 -0
- package/dist/esm/nodeviews/profileCardRenderer.js +61 -3
- package/dist/esm/pm-plugins/main.js +1 -1
- package/dist/types/entry-points/editor-commands.d.ts +1 -0
- package/dist/types/entry-points/mentions-plugin-type.d.ts +1 -0
- package/dist/types/entry-points/mentions-plugin.d.ts +1 -0
- package/dist/types/entry-points/types.d.ts +1 -0
- package/dist/types-ts4.5/entry-points/editor-commands.d.ts +1 -0
- package/dist/types-ts4.5/entry-points/mentions-plugin-type.d.ts +1 -0
- package/dist/types-ts4.5/entry-points/mentions-plugin.d.ts +1 -0
- package/dist/types-ts4.5/entry-points/types.d.ts +1 -0
- package/editor-commands/package.json +17 -0
- package/mentions-plugin/package.json +17 -0
- package/mentions-plugin-type/package.json +17 -0
- package/package.json +12 -8
- package/types/package.json +17 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-mentions
|
|
2
2
|
|
|
3
|
+
## 12.2.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`5a9b171d2d780`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5a9b171d2d780) -
|
|
8
|
+
Adds a feature-gated change to user mentions so clicking a user mention navigates to the user's
|
|
9
|
+
profile instead of showing the in-editor profile card. Consumers can optionally supply a custom
|
|
10
|
+
card renderer via `ProfilecardProvider.renderUserMentionCard` to inject their own profile card UI
|
|
11
|
+
in place of the default link, applied consistently when viewing or editing content.
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
14
|
+
## 12.2.0
|
|
15
|
+
|
|
16
|
+
### Minor Changes
|
|
17
|
+
|
|
18
|
+
- [`a94a013546f69`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a94a013546f69) -
|
|
19
|
+
Autofix: add explicit package exports (barrel removal)
|
|
20
|
+
|
|
3
21
|
## 12.1.17
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "mentionsPlugin", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _mentionsPlugin.mentionsPlugin;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
var _mentionsPlugin = require("../mentionsPlugin");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -9,6 +9,8 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
var _bindEventListener = require("bind-event-listener");
|
|
10
10
|
var _v = _interopRequireDefault(require("uuid/v4"));
|
|
11
11
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
12
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
|
+
var _navigation = require("@atlaskit/teams-app-config/navigation");
|
|
12
14
|
var _ProfileCardComponent = require("../ui/ProfileCardComponent");
|
|
13
15
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
14
16
|
|
|
@@ -19,6 +21,7 @@ var profileCardRenderer = exports.profileCardRenderer = function profileCardRend
|
|
|
19
21
|
node = _ref.node,
|
|
20
22
|
api = _ref.api;
|
|
21
23
|
var renderingProfileCard = false;
|
|
24
|
+
var navigatingToProfile = false;
|
|
22
25
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
23
26
|
var key = (0, _v.default)();
|
|
24
27
|
var cleanupSelection;
|
|
@@ -34,8 +37,63 @@ var profileCardRenderer = exports.profileCardRenderer = function profileCardRend
|
|
|
34
37
|
var listenerCleanup = (0, _bindEventListener.bind)(dom, {
|
|
35
38
|
type: 'click',
|
|
36
39
|
listener: function listener() {
|
|
40
|
+
if ((0, _platformFeatureFlags.fg)('people-teams_migrate-user-profile-card')) {
|
|
41
|
+
var _node$attrs;
|
|
42
|
+
var userId = (_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.id;
|
|
43
|
+
if (userId) {
|
|
44
|
+
var _options$profilecardP;
|
|
45
|
+
navigatingToProfile = false;
|
|
46
|
+
options === null || options === void 0 || (_options$profilecardP = options.profilecardProvider) === null || _options$profilecardP === void 0 || _options$profilecardP.then(function (provider) {
|
|
47
|
+
// If a consumer (e.g. Confluence) has supplied a custom profile card
|
|
48
|
+
// renderer, render it into the portal instead of navigating away. The
|
|
49
|
+
// consumer owns its own popup/positioning behavior - subsequent clicks
|
|
50
|
+
// while the card is already open are no-ops here so the card's own
|
|
51
|
+
// outside-click / toggle logic can take over.
|
|
52
|
+
if (provider.renderUserMentionCard) {
|
|
53
|
+
if (dom instanceof HTMLElement && !renderingProfileCard) {
|
|
54
|
+
var _api$selection;
|
|
55
|
+
dom.setAttribute('aria-expanded', 'true');
|
|
56
|
+
renderingProfileCard = true;
|
|
57
|
+
portalProviderAPI.render(function () {
|
|
58
|
+
var _provider$renderUserM;
|
|
59
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (_provider$renderUserM = provider.renderUserMentionCard) === null || _provider$renderUserM === void 0 ? void 0 : _provider$renderUserM.call(provider, {
|
|
60
|
+
userId: userId,
|
|
61
|
+
cloudId: provider.cloudId,
|
|
62
|
+
children: null,
|
|
63
|
+
referenceElement: dom
|
|
64
|
+
}));
|
|
65
|
+
}, dom, key);
|
|
66
|
+
cleanupSelection = api === null || api === void 0 || (_api$selection = api.selection) === null || _api$selection === void 0 ? void 0 : _api$selection.sharedState.onChange(function (_ref2) {
|
|
67
|
+
var nextSharedState = _ref2.nextSharedState;
|
|
68
|
+
var selection = nextSharedState === null || nextSharedState === void 0 ? void 0 : nextSharedState.selection;
|
|
69
|
+
if (selection instanceof _state.NodeSelection ? selection.node === node : false) {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
removeProfileCard === null || removeProfileCard === void 0 || removeProfileCard();
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
if (navigatingToProfile) {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
navigatingToProfile = true;
|
|
81
|
+
var _navigateToTeamsApp = (0, _navigation.navigateToTeamsApp)({
|
|
82
|
+
type: 'USER',
|
|
83
|
+
payload: {
|
|
84
|
+
userId: userId
|
|
85
|
+
},
|
|
86
|
+
cloudId: provider.cloudId
|
|
87
|
+
}),
|
|
88
|
+
href = _navigateToTeamsApp.href,
|
|
89
|
+
target = _navigateToTeamsApp.target;
|
|
90
|
+
window.open(href, target, 'noopener,noreferrer');
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
37
95
|
if (dom instanceof HTMLElement && options !== null && options !== void 0 && options.profilecardProvider && !renderingProfileCard) {
|
|
38
|
-
var _api$
|
|
96
|
+
var _api$selection2;
|
|
39
97
|
dom.setAttribute('aria-expanded', 'true');
|
|
40
98
|
renderingProfileCard = true;
|
|
41
99
|
portalProviderAPI.render(function () {
|
|
@@ -49,8 +107,8 @@ var profileCardRenderer = exports.profileCardRenderer = function profileCardRend
|
|
|
49
107
|
// If we change the selection we should also remove the profile card. The "deselectNode"
|
|
50
108
|
// should usually catch this, but it's possible (ie. on triple click) for this not to be called
|
|
51
109
|
// which means the profile card gets stuck open until you click + change selection
|
|
52
|
-
cleanupSelection = api === null || api === void 0 || (_api$
|
|
53
|
-
var nextSharedState =
|
|
110
|
+
cleanupSelection = api === null || api === void 0 || (_api$selection2 = api.selection) === null || _api$selection2 === void 0 ? void 0 : _api$selection2.sharedState.onChange(function (_ref3) {
|
|
111
|
+
var nextSharedState = _ref3.nextSharedState;
|
|
54
112
|
var selection = nextSharedState === null || nextSharedState === void 0 ? void 0 : nextSharedState.selection;
|
|
55
113
|
if (selection instanceof _state.NodeSelection ? selection.node === node : false) {
|
|
56
114
|
return;
|
|
@@ -23,7 +23,7 @@ var ACTIONS = exports.ACTIONS = {
|
|
|
23
23
|
SET_PROVIDER: 'SET_PROVIDER'
|
|
24
24
|
};
|
|
25
25
|
var PACKAGE_NAME = "@atlaskit/editor-plugin-mentions";
|
|
26
|
-
var PACKAGE_VERSION = "12.
|
|
26
|
+
var PACKAGE_VERSION = "12.2.0";
|
|
27
27
|
var setProvider = function setProvider(provider) {
|
|
28
28
|
return function (state, dispatch) {
|
|
29
29
|
if (dispatch) {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -3,6 +3,8 @@ import { bind } from 'bind-event-listener';
|
|
|
3
3
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
4
4
|
import uuid from 'uuid/v4';
|
|
5
5
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
6
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
|
+
import { navigateToTeamsApp } from '@atlaskit/teams-app-config/navigation';
|
|
6
8
|
import { ProfileCardComponent } from '../ui/ProfileCardComponent';
|
|
7
9
|
export const profileCardRenderer = ({
|
|
8
10
|
dom,
|
|
@@ -12,6 +14,7 @@ export const profileCardRenderer = ({
|
|
|
12
14
|
api
|
|
13
15
|
}) => {
|
|
14
16
|
let renderingProfileCard = false;
|
|
17
|
+
let navigatingToProfile = false;
|
|
15
18
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
16
19
|
const key = uuid();
|
|
17
20
|
let cleanupSelection;
|
|
@@ -27,8 +30,65 @@ export const profileCardRenderer = ({
|
|
|
27
30
|
const listenerCleanup = bind(dom, {
|
|
28
31
|
type: 'click',
|
|
29
32
|
listener: () => {
|
|
33
|
+
if (fg('people-teams_migrate-user-profile-card')) {
|
|
34
|
+
var _node$attrs;
|
|
35
|
+
const userId = (_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.id;
|
|
36
|
+
if (userId) {
|
|
37
|
+
var _options$profilecardP;
|
|
38
|
+
navigatingToProfile = false;
|
|
39
|
+
options === null || options === void 0 ? void 0 : (_options$profilecardP = options.profilecardProvider) === null || _options$profilecardP === void 0 ? void 0 : _options$profilecardP.then(provider => {
|
|
40
|
+
// If a consumer (e.g. Confluence) has supplied a custom profile card
|
|
41
|
+
// renderer, render it into the portal instead of navigating away. The
|
|
42
|
+
// consumer owns its own popup/positioning behavior - subsequent clicks
|
|
43
|
+
// while the card is already open are no-ops here so the card's own
|
|
44
|
+
// outside-click / toggle logic can take over.
|
|
45
|
+
if (provider.renderUserMentionCard) {
|
|
46
|
+
if (dom instanceof HTMLElement && !renderingProfileCard) {
|
|
47
|
+
var _api$selection;
|
|
48
|
+
dom.setAttribute('aria-expanded', 'true');
|
|
49
|
+
renderingProfileCard = true;
|
|
50
|
+
portalProviderAPI.render(() => {
|
|
51
|
+
var _provider$renderUserM;
|
|
52
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, (_provider$renderUserM = provider.renderUserMentionCard) === null || _provider$renderUserM === void 0 ? void 0 : _provider$renderUserM.call(provider, {
|
|
53
|
+
userId,
|
|
54
|
+
cloudId: provider.cloudId,
|
|
55
|
+
children: null,
|
|
56
|
+
referenceElement: dom
|
|
57
|
+
}));
|
|
58
|
+
}, dom, key);
|
|
59
|
+
cleanupSelection = api === null || api === void 0 ? void 0 : (_api$selection = api.selection) === null || _api$selection === void 0 ? void 0 : _api$selection.sharedState.onChange(({
|
|
60
|
+
nextSharedState
|
|
61
|
+
}) => {
|
|
62
|
+
const selection = nextSharedState === null || nextSharedState === void 0 ? void 0 : nextSharedState.selection;
|
|
63
|
+
if (selection instanceof NodeSelection ? selection.node === node : false) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
removeProfileCard === null || removeProfileCard === void 0 ? void 0 : removeProfileCard();
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
if (navigatingToProfile) {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
navigatingToProfile = true;
|
|
75
|
+
const {
|
|
76
|
+
href,
|
|
77
|
+
target
|
|
78
|
+
} = navigateToTeamsApp({
|
|
79
|
+
type: 'USER',
|
|
80
|
+
payload: {
|
|
81
|
+
userId
|
|
82
|
+
},
|
|
83
|
+
cloudId: provider.cloudId
|
|
84
|
+
});
|
|
85
|
+
window.open(href, target, 'noopener,noreferrer');
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
30
90
|
if (dom instanceof HTMLElement && options !== null && options !== void 0 && options.profilecardProvider && !renderingProfileCard) {
|
|
31
|
-
var _api$
|
|
91
|
+
var _api$selection2;
|
|
32
92
|
dom.setAttribute('aria-expanded', 'true');
|
|
33
93
|
renderingProfileCard = true;
|
|
34
94
|
portalProviderAPI.render(() => /*#__PURE__*/React.createElement(ProfileCardComponent, {
|
|
@@ -40,7 +100,7 @@ export const profileCardRenderer = ({
|
|
|
40
100
|
// If we change the selection we should also remove the profile card. The "deselectNode"
|
|
41
101
|
// should usually catch this, but it's possible (ie. on triple click) for this not to be called
|
|
42
102
|
// which means the profile card gets stuck open until you click + change selection
|
|
43
|
-
cleanupSelection = api === null || api === void 0 ? void 0 : (_api$
|
|
103
|
+
cleanupSelection = api === null || api === void 0 ? void 0 : (_api$selection2 = api.selection) === null || _api$selection2 === void 0 ? void 0 : _api$selection2.sharedState.onChange(({
|
|
44
104
|
nextSharedState
|
|
45
105
|
}) => {
|
|
46
106
|
const selection = nextSharedState === null || nextSharedState === void 0 ? void 0 : nextSharedState.selection;
|
|
@@ -12,7 +12,7 @@ export const ACTIONS = {
|
|
|
12
12
|
SET_PROVIDER: 'SET_PROVIDER'
|
|
13
13
|
};
|
|
14
14
|
const PACKAGE_NAME = "@atlaskit/editor-plugin-mentions";
|
|
15
|
-
const PACKAGE_VERSION = "12.
|
|
15
|
+
const PACKAGE_VERSION = "12.2.0";
|
|
16
16
|
const setProvider = provider => (state, dispatch) => {
|
|
17
17
|
if (dispatch) {
|
|
18
18
|
dispatch(state.tr.setMeta(mentionPluginKey, {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -3,6 +3,8 @@ import { bind } from 'bind-event-listener';
|
|
|
3
3
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
4
4
|
import uuid from 'uuid/v4';
|
|
5
5
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
6
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
|
+
import { navigateToTeamsApp } from '@atlaskit/teams-app-config/navigation';
|
|
6
8
|
import { ProfileCardComponent } from '../ui/ProfileCardComponent';
|
|
7
9
|
export var profileCardRenderer = function profileCardRenderer(_ref) {
|
|
8
10
|
var dom = _ref.dom,
|
|
@@ -11,6 +13,7 @@ export var profileCardRenderer = function profileCardRenderer(_ref) {
|
|
|
11
13
|
node = _ref.node,
|
|
12
14
|
api = _ref.api;
|
|
13
15
|
var renderingProfileCard = false;
|
|
16
|
+
var navigatingToProfile = false;
|
|
14
17
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
15
18
|
var key = uuid();
|
|
16
19
|
var cleanupSelection;
|
|
@@ -26,8 +29,63 @@ export var profileCardRenderer = function profileCardRenderer(_ref) {
|
|
|
26
29
|
var listenerCleanup = bind(dom, {
|
|
27
30
|
type: 'click',
|
|
28
31
|
listener: function listener() {
|
|
32
|
+
if (fg('people-teams_migrate-user-profile-card')) {
|
|
33
|
+
var _node$attrs;
|
|
34
|
+
var userId = (_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.id;
|
|
35
|
+
if (userId) {
|
|
36
|
+
var _options$profilecardP;
|
|
37
|
+
navigatingToProfile = false;
|
|
38
|
+
options === null || options === void 0 || (_options$profilecardP = options.profilecardProvider) === null || _options$profilecardP === void 0 || _options$profilecardP.then(function (provider) {
|
|
39
|
+
// If a consumer (e.g. Confluence) has supplied a custom profile card
|
|
40
|
+
// renderer, render it into the portal instead of navigating away. The
|
|
41
|
+
// consumer owns its own popup/positioning behavior - subsequent clicks
|
|
42
|
+
// while the card is already open are no-ops here so the card's own
|
|
43
|
+
// outside-click / toggle logic can take over.
|
|
44
|
+
if (provider.renderUserMentionCard) {
|
|
45
|
+
if (dom instanceof HTMLElement && !renderingProfileCard) {
|
|
46
|
+
var _api$selection;
|
|
47
|
+
dom.setAttribute('aria-expanded', 'true');
|
|
48
|
+
renderingProfileCard = true;
|
|
49
|
+
portalProviderAPI.render(function () {
|
|
50
|
+
var _provider$renderUserM;
|
|
51
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, (_provider$renderUserM = provider.renderUserMentionCard) === null || _provider$renderUserM === void 0 ? void 0 : _provider$renderUserM.call(provider, {
|
|
52
|
+
userId: userId,
|
|
53
|
+
cloudId: provider.cloudId,
|
|
54
|
+
children: null,
|
|
55
|
+
referenceElement: dom
|
|
56
|
+
}));
|
|
57
|
+
}, dom, key);
|
|
58
|
+
cleanupSelection = api === null || api === void 0 || (_api$selection = api.selection) === null || _api$selection === void 0 ? void 0 : _api$selection.sharedState.onChange(function (_ref2) {
|
|
59
|
+
var nextSharedState = _ref2.nextSharedState;
|
|
60
|
+
var selection = nextSharedState === null || nextSharedState === void 0 ? void 0 : nextSharedState.selection;
|
|
61
|
+
if (selection instanceof NodeSelection ? selection.node === node : false) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
removeProfileCard === null || removeProfileCard === void 0 || removeProfileCard();
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
if (navigatingToProfile) {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
navigatingToProfile = true;
|
|
73
|
+
var _navigateToTeamsApp = navigateToTeamsApp({
|
|
74
|
+
type: 'USER',
|
|
75
|
+
payload: {
|
|
76
|
+
userId: userId
|
|
77
|
+
},
|
|
78
|
+
cloudId: provider.cloudId
|
|
79
|
+
}),
|
|
80
|
+
href = _navigateToTeamsApp.href,
|
|
81
|
+
target = _navigateToTeamsApp.target;
|
|
82
|
+
window.open(href, target, 'noopener,noreferrer');
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
29
87
|
if (dom instanceof HTMLElement && options !== null && options !== void 0 && options.profilecardProvider && !renderingProfileCard) {
|
|
30
|
-
var _api$
|
|
88
|
+
var _api$selection2;
|
|
31
89
|
dom.setAttribute('aria-expanded', 'true');
|
|
32
90
|
renderingProfileCard = true;
|
|
33
91
|
portalProviderAPI.render(function () {
|
|
@@ -41,8 +99,8 @@ export var profileCardRenderer = function profileCardRenderer(_ref) {
|
|
|
41
99
|
// If we change the selection we should also remove the profile card. The "deselectNode"
|
|
42
100
|
// should usually catch this, but it's possible (ie. on triple click) for this not to be called
|
|
43
101
|
// which means the profile card gets stuck open until you click + change selection
|
|
44
|
-
cleanupSelection = api === null || api === void 0 || (_api$
|
|
45
|
-
var nextSharedState =
|
|
102
|
+
cleanupSelection = api === null || api === void 0 || (_api$selection2 = api.selection) === null || _api$selection2 === void 0 ? void 0 : _api$selection2.sharedState.onChange(function (_ref3) {
|
|
103
|
+
var nextSharedState = _ref3.nextSharedState;
|
|
46
104
|
var selection = nextSharedState === null || nextSharedState === void 0 ? void 0 : nextSharedState.selection;
|
|
47
105
|
if (selection instanceof NodeSelection ? selection.node === node : false) {
|
|
48
106
|
return;
|
|
@@ -15,7 +15,7 @@ export var ACTIONS = {
|
|
|
15
15
|
SET_PROVIDER: 'SET_PROVIDER'
|
|
16
16
|
};
|
|
17
17
|
var PACKAGE_NAME = "@atlaskit/editor-plugin-mentions";
|
|
18
|
-
var PACKAGE_VERSION = "12.
|
|
18
|
+
var PACKAGE_VERSION = "12.2.0";
|
|
19
19
|
var setProvider = function setProvider(provider) {
|
|
20
20
|
return function (state, dispatch) {
|
|
21
21
|
if (dispatch) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { InsertMentionParameters } from '../editor-commands/index';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { MentionsPlugin, MentionPluginDependencies, MentionActions, } from '../mentionsPluginType';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { mentionsPlugin } from '../mentionsPlugin';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { MentionPluginConfig, MentionPluginOptions, MentionsPluginOptions, MentionSharedState, MentionsChangedHandler, } from '../types/index';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { InsertMentionParameters } from '../editor-commands/index';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { MentionsPlugin, MentionPluginDependencies, MentionActions, } from '../mentionsPluginType';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { mentionsPlugin } from '../mentionsPlugin';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { MentionPluginConfig, MentionPluginOptions, MentionsPluginOptions, MentionSharedState, MentionsChangedHandler, } from '../types/index';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/editor-plugin-mentions/editor-commands",
|
|
3
|
+
"main": "../dist/cjs/entry-points/editor-commands.js",
|
|
4
|
+
"module": "../dist/esm/entry-points/editor-commands.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/entry-points/editor-commands.js",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"**/*.compiled.css"
|
|
8
|
+
],
|
|
9
|
+
"types": "../dist/types/entry-points/editor-commands.d.ts",
|
|
10
|
+
"typesVersions": {
|
|
11
|
+
">=4.5 <5.9": {
|
|
12
|
+
"*": [
|
|
13
|
+
"../dist/types-ts4.5/entry-points/editor-commands.d.ts"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/editor-plugin-mentions/mentions-plugin",
|
|
3
|
+
"main": "../dist/cjs/entry-points/mentions-plugin.js",
|
|
4
|
+
"module": "../dist/esm/entry-points/mentions-plugin.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/entry-points/mentions-plugin.js",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"**/*.compiled.css"
|
|
8
|
+
],
|
|
9
|
+
"types": "../dist/types/entry-points/mentions-plugin.d.ts",
|
|
10
|
+
"typesVersions": {
|
|
11
|
+
">=4.5 <5.9": {
|
|
12
|
+
"*": [
|
|
13
|
+
"../dist/types-ts4.5/entry-points/mentions-plugin.d.ts"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/editor-plugin-mentions/mentions-plugin-type",
|
|
3
|
+
"main": "../dist/cjs/entry-points/mentions-plugin-type.js",
|
|
4
|
+
"module": "../dist/esm/entry-points/mentions-plugin-type.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/entry-points/mentions-plugin-type.js",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"**/*.compiled.css"
|
|
8
|
+
],
|
|
9
|
+
"types": "../dist/types/entry-points/mentions-plugin-type.d.ts",
|
|
10
|
+
"typesVersions": {
|
|
11
|
+
">=4.5 <5.9": {
|
|
12
|
+
"*": [
|
|
13
|
+
"../dist/types-ts4.5/entry-points/mentions-plugin-type.d.ts"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-mentions",
|
|
3
|
-
"version": "12.1
|
|
3
|
+
"version": "12.2.1",
|
|
4
4
|
"description": "Mentions plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,22 +32,23 @@
|
|
|
32
32
|
"@atlaskit/adf-schema": "^52.11.0",
|
|
33
33
|
"@atlaskit/css": "^0.19.0",
|
|
34
34
|
"@atlaskit/editor-plugin-analytics": "^10.0.0",
|
|
35
|
-
"@atlaskit/editor-plugin-base": "^11.
|
|
36
|
-
"@atlaskit/editor-plugin-context-identifier": "^10.
|
|
37
|
-
"@atlaskit/editor-plugin-selection": "^10.
|
|
38
|
-
"@atlaskit/editor-plugin-type-ahead": "^10.
|
|
35
|
+
"@atlaskit/editor-plugin-base": "^11.1.0",
|
|
36
|
+
"@atlaskit/editor-plugin-context-identifier": "^10.1.0",
|
|
37
|
+
"@atlaskit/editor-plugin-selection": "^10.1.0",
|
|
38
|
+
"@atlaskit/editor-plugin-type-ahead": "^10.1.0",
|
|
39
39
|
"@atlaskit/editor-prosemirror": "^7.3.0",
|
|
40
40
|
"@atlaskit/icon": "^34.5.0",
|
|
41
41
|
"@atlaskit/insm": "^0.4.0",
|
|
42
42
|
"@atlaskit/link": "^3.4.0",
|
|
43
|
-
"@atlaskit/mention": "^25.
|
|
43
|
+
"@atlaskit/mention": "^25.1.0",
|
|
44
44
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
45
45
|
"@atlaskit/popper": "^7.2.0",
|
|
46
46
|
"@atlaskit/portal": "^5.5.0",
|
|
47
47
|
"@atlaskit/primitives": "^19.0.0",
|
|
48
|
-
"@atlaskit/profilecard": "^25.
|
|
48
|
+
"@atlaskit/profilecard": "^25.6.0",
|
|
49
|
+
"@atlaskit/teams-app-config": "^1.12.0",
|
|
49
50
|
"@atlaskit/theme": "^23.2.0",
|
|
50
|
-
"@atlaskit/tmp-editor-statsig": "^80.
|
|
51
|
+
"@atlaskit/tmp-editor-statsig": "^80.3.0",
|
|
51
52
|
"@atlaskit/tokens": "^13.0.0",
|
|
52
53
|
"@atlaskit/user-picker": "^12.0.0",
|
|
53
54
|
"@babel/runtime": "^7.0.0",
|
|
@@ -116,6 +117,9 @@
|
|
|
116
117
|
},
|
|
117
118
|
"jira_invites_auto_tag_new_user_in_mentions_fg": {
|
|
118
119
|
"type": "boolean"
|
|
120
|
+
},
|
|
121
|
+
"people-teams_migrate-user-profile-card": {
|
|
122
|
+
"type": "boolean"
|
|
119
123
|
}
|
|
120
124
|
}
|
|
121
125
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/editor-plugin-mentions/types",
|
|
3
|
+
"main": "../dist/cjs/entry-points/types.js",
|
|
4
|
+
"module": "../dist/esm/entry-points/types.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/entry-points/types.js",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"**/*.compiled.css"
|
|
8
|
+
],
|
|
9
|
+
"types": "../dist/types/entry-points/types.d.ts",
|
|
10
|
+
"typesVersions": {
|
|
11
|
+
">=4.5 <5.9": {
|
|
12
|
+
"*": [
|
|
13
|
+
"../dist/types-ts4.5/entry-points/types.d.ts"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|