@atlaskit/editor-plugin-mentions 2.7.0 → 2.7.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 +9 -0
- package/dist/cjs/pm-plugins/main.js +14 -1
- package/dist/cjs/types.js +4 -1
- package/dist/es2019/pm-plugins/main.js +14 -1
- package/dist/es2019/types.js +2 -1
- package/dist/esm/pm-plugins/main.js +14 -1
- package/dist/esm/types.js +2 -1
- package/dist/types/pm-plugins/main.d.ts +1 -1
- package/dist/types/types.d.ts +2 -0
- package/dist/types-ts4.5/pm-plugins/main.d.ts +1 -1
- package/dist/types-ts4.5/types.d.ts +2 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-mentions
|
|
2
2
|
|
|
3
|
+
## 2.7.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#149581](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/149581)
|
|
8
|
+
[`e98d687b864ab`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/e98d687b864ab) -
|
|
9
|
+
[ED-23460] Track when mention providers are undefined
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 2.7.0
|
|
4
13
|
|
|
5
14
|
### Minor Changes
|
|
@@ -13,6 +13,7 @@ var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
|
13
13
|
var _resource = require("@atlaskit/mention/resource");
|
|
14
14
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
15
|
var _mention = require("../nodeviews/mention");
|
|
16
|
+
var _types = require("../types");
|
|
16
17
|
var _key = require("./key");
|
|
17
18
|
var _utils2 = require("./utils");
|
|
18
19
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -96,6 +97,15 @@ function createMentionPlugin(pmPluginFactoryParams, fireEvent, options) {
|
|
|
96
97
|
switch (name) {
|
|
97
98
|
case 'mentionProvider':
|
|
98
99
|
if (!providerPromise) {
|
|
100
|
+
fireEvent({
|
|
101
|
+
action: _analytics.ACTION.ERRORED,
|
|
102
|
+
actionSubject: _analytics.ACTION_SUBJECT.MENTION,
|
|
103
|
+
actionSubjectId: _analytics.ACTION_SUBJECT_ID.MENTION_PROVIDER,
|
|
104
|
+
eventType: _analytics.EVENT_TYPE.OPERATIONAL,
|
|
105
|
+
attributes: {
|
|
106
|
+
reason: _types.MENTION_PROVIDER_UNDEFINED
|
|
107
|
+
}
|
|
108
|
+
});
|
|
99
109
|
return setProvider(undefined)(editorView.state, editorView.dispatch);
|
|
100
110
|
}
|
|
101
111
|
providerPromise.then(function (provider) {
|
|
@@ -110,7 +120,10 @@ function createMentionPlugin(pmPluginFactoryParams, fireEvent, options) {
|
|
|
110
120
|
action: _analytics.ACTION.ERRORED,
|
|
111
121
|
actionSubject: _analytics.ACTION_SUBJECT.MENTION,
|
|
112
122
|
actionSubjectId: _analytics.ACTION_SUBJECT_ID.MENTION_PROVIDER,
|
|
113
|
-
eventType: _analytics.EVENT_TYPE.OPERATIONAL
|
|
123
|
+
eventType: _analytics.EVENT_TYPE.OPERATIONAL,
|
|
124
|
+
attributes: {
|
|
125
|
+
reason: _types.MENTION_PROVIDER_REJECTED
|
|
126
|
+
}
|
|
114
127
|
});
|
|
115
128
|
return setProvider(undefined)(editorView.state, editorView.dispatch);
|
|
116
129
|
});
|
package/dist/cjs/types.js
CHANGED
|
@@ -2,4 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
|
-
});
|
|
5
|
+
});
|
|
6
|
+
exports.MENTION_PROVIDER_UNDEFINED = exports.MENTION_PROVIDER_REJECTED = void 0;
|
|
7
|
+
var MENTION_PROVIDER_REJECTED = exports.MENTION_PROVIDER_REJECTED = 'REJECTED';
|
|
8
|
+
var MENTION_PROVIDER_UNDEFINED = exports.MENTION_PROVIDER_UNDEFINED = 'UNDEFINED';
|
|
@@ -5,6 +5,7 @@ import { findChildrenByType } from '@atlaskit/editor-prosemirror/utils';
|
|
|
5
5
|
import { buildSliPayload, SLI_EVENT_TYPE, SMART_EVENT_TYPE } from '@atlaskit/mention/resource';
|
|
6
6
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
7
|
import { MentionNodeView } from '../nodeviews/mention';
|
|
8
|
+
import { MENTION_PROVIDER_REJECTED, MENTION_PROVIDER_UNDEFINED } from '../types';
|
|
8
9
|
import { mentionPluginKey } from './key';
|
|
9
10
|
import { canMentionBeCreatedInRange } from './utils';
|
|
10
11
|
const ACTIONS = {
|
|
@@ -87,6 +88,15 @@ export function createMentionPlugin(pmPluginFactoryParams, fireEvent, options) {
|
|
|
87
88
|
switch (name) {
|
|
88
89
|
case 'mentionProvider':
|
|
89
90
|
if (!providerPromise) {
|
|
91
|
+
fireEvent({
|
|
92
|
+
action: ACTION.ERRORED,
|
|
93
|
+
actionSubject: ACTION_SUBJECT.MENTION,
|
|
94
|
+
actionSubjectId: ACTION_SUBJECT_ID.MENTION_PROVIDER,
|
|
95
|
+
eventType: EVENT_TYPE.OPERATIONAL,
|
|
96
|
+
attributes: {
|
|
97
|
+
reason: MENTION_PROVIDER_UNDEFINED
|
|
98
|
+
}
|
|
99
|
+
});
|
|
90
100
|
return setProvider(undefined)(editorView.state, editorView.dispatch);
|
|
91
101
|
}
|
|
92
102
|
providerPromise.then(provider => {
|
|
@@ -101,7 +111,10 @@ export function createMentionPlugin(pmPluginFactoryParams, fireEvent, options) {
|
|
|
101
111
|
action: ACTION.ERRORED,
|
|
102
112
|
actionSubject: ACTION_SUBJECT.MENTION,
|
|
103
113
|
actionSubjectId: ACTION_SUBJECT_ID.MENTION_PROVIDER,
|
|
104
|
-
eventType: EVENT_TYPE.OPERATIONAL
|
|
114
|
+
eventType: EVENT_TYPE.OPERATIONAL,
|
|
115
|
+
attributes: {
|
|
116
|
+
reason: MENTION_PROVIDER_REJECTED
|
|
117
|
+
}
|
|
105
118
|
});
|
|
106
119
|
return setProvider(undefined)(editorView.state, editorView.dispatch);
|
|
107
120
|
});
|
package/dist/es2019/types.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export const MENTION_PROVIDER_REJECTED = 'REJECTED';
|
|
2
|
+
export const MENTION_PROVIDER_UNDEFINED = 'UNDEFINED';
|
|
@@ -8,6 +8,7 @@ import { findChildrenByType } from '@atlaskit/editor-prosemirror/utils';
|
|
|
8
8
|
import { buildSliPayload, SLI_EVENT_TYPE, SMART_EVENT_TYPE } from '@atlaskit/mention/resource';
|
|
9
9
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
10
|
import { MentionNodeView } from '../nodeviews/mention';
|
|
11
|
+
import { MENTION_PROVIDER_REJECTED, MENTION_PROVIDER_UNDEFINED } from '../types';
|
|
11
12
|
import { mentionPluginKey } from './key';
|
|
12
13
|
import { canMentionBeCreatedInRange } from './utils';
|
|
13
14
|
var ACTIONS = {
|
|
@@ -89,6 +90,15 @@ export function createMentionPlugin(pmPluginFactoryParams, fireEvent, options) {
|
|
|
89
90
|
switch (name) {
|
|
90
91
|
case 'mentionProvider':
|
|
91
92
|
if (!providerPromise) {
|
|
93
|
+
fireEvent({
|
|
94
|
+
action: ACTION.ERRORED,
|
|
95
|
+
actionSubject: ACTION_SUBJECT.MENTION,
|
|
96
|
+
actionSubjectId: ACTION_SUBJECT_ID.MENTION_PROVIDER,
|
|
97
|
+
eventType: EVENT_TYPE.OPERATIONAL,
|
|
98
|
+
attributes: {
|
|
99
|
+
reason: MENTION_PROVIDER_UNDEFINED
|
|
100
|
+
}
|
|
101
|
+
});
|
|
92
102
|
return setProvider(undefined)(editorView.state, editorView.dispatch);
|
|
93
103
|
}
|
|
94
104
|
providerPromise.then(function (provider) {
|
|
@@ -103,7 +113,10 @@ export function createMentionPlugin(pmPluginFactoryParams, fireEvent, options) {
|
|
|
103
113
|
action: ACTION.ERRORED,
|
|
104
114
|
actionSubject: ACTION_SUBJECT.MENTION,
|
|
105
115
|
actionSubjectId: ACTION_SUBJECT_ID.MENTION_PROVIDER,
|
|
106
|
-
eventType: EVENT_TYPE.OPERATIONAL
|
|
116
|
+
eventType: EVENT_TYPE.OPERATIONAL,
|
|
117
|
+
attributes: {
|
|
118
|
+
reason: MENTION_PROVIDER_REJECTED
|
|
119
|
+
}
|
|
107
120
|
});
|
|
108
121
|
return setProvider(undefined)(editorView.state, editorView.dispatch);
|
|
109
122
|
});
|
package/dist/esm/types.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export var MENTION_PROVIDER_REJECTED = 'REJECTED';
|
|
2
|
+
export var MENTION_PROVIDER_UNDEFINED = 'UNDEFINED';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { GasPayload } from '@atlaskit/analytics-gas-types';
|
|
2
2
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
3
|
import type { PMPluginFactoryParams } from '@atlaskit/editor-common/types';
|
|
4
|
-
import type
|
|
4
|
+
import { type MentionPluginOptions, type MentionPluginState } from '../types';
|
|
5
5
|
export declare function createMentionPlugin(pmPluginFactoryParams: PMPluginFactoryParams, fireEvent: (payload: GasPayload) => void, options?: MentionPluginOptions): SafePlugin<MentionPluginState>;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
|
6
6
|
import type { ContextIdentifierPlugin } from '@atlaskit/editor-plugin-context-identifier';
|
|
7
7
|
import type { TypeAheadInputMethod, TypeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead';
|
|
8
8
|
import type { MentionDescription, MentionProvider } from '@atlaskit/mention';
|
|
9
|
+
export declare const MENTION_PROVIDER_REJECTED = "REJECTED";
|
|
10
|
+
export declare const MENTION_PROVIDER_UNDEFINED = "UNDEFINED";
|
|
9
11
|
export interface TeamInfoAttrAnalytics {
|
|
10
12
|
teamId: string;
|
|
11
13
|
includesYou: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { GasPayload } from '@atlaskit/analytics-gas-types';
|
|
2
2
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
3
|
import type { PMPluginFactoryParams } from '@atlaskit/editor-common/types';
|
|
4
|
-
import type
|
|
4
|
+
import { type MentionPluginOptions, type MentionPluginState } from '../types';
|
|
5
5
|
export declare function createMentionPlugin(pmPluginFactoryParams: PMPluginFactoryParams, fireEvent: (payload: GasPayload) => void, options?: MentionPluginOptions): SafePlugin<MentionPluginState>;
|
|
@@ -6,6 +6,8 @@ import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
|
6
6
|
import type { ContextIdentifierPlugin } from '@atlaskit/editor-plugin-context-identifier';
|
|
7
7
|
import type { TypeAheadInputMethod, TypeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead';
|
|
8
8
|
import type { MentionDescription, MentionProvider } from '@atlaskit/mention';
|
|
9
|
+
export declare const MENTION_PROVIDER_REJECTED = "REJECTED";
|
|
10
|
+
export declare const MENTION_PROVIDER_UNDEFINED = "UNDEFINED";
|
|
9
11
|
export interface TeamInfoAttrAnalytics {
|
|
10
12
|
teamId: string;
|
|
11
13
|
includesYou: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-mentions",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.1",
|
|
4
4
|
"description": "Mentions plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@atlaskit/editor-plugin-context-identifier": "^1.3.0",
|
|
39
39
|
"@atlaskit/editor-plugin-type-ahead": "^1.8.0",
|
|
40
40
|
"@atlaskit/editor-prosemirror": "6.0.0",
|
|
41
|
-
"@atlaskit/icon": "^22.
|
|
41
|
+
"@atlaskit/icon": "^22.21.0",
|
|
42
42
|
"@atlaskit/mention": "^23.3.0",
|
|
43
43
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
44
44
|
"@atlaskit/theme": "^13.0.0",
|