@atlaskit/editor-plugin-mentions 1.1.6 → 1.1.7
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 +8 -0
- package/dist/cjs/analytics.js +5 -19
- package/dist/cjs/type-ahead/index.js +0 -7
- package/dist/es2019/analytics.js +0 -15
- package/dist/es2019/type-ahead/index.js +1 -10
- package/dist/esm/analytics.js +4 -18
- package/dist/esm/type-ahead/index.js +1 -8
- package/dist/types/analytics.d.ts +1 -2
- package/dist/types-ts4.5/analytics.d.ts +1 -2
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-mentions
|
|
2
2
|
|
|
3
|
+
## 1.1.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#98103](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/98103)
|
|
8
|
+
[`14c055a65f67`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/14c055a65f67) -
|
|
9
|
+
removed invite from mention experiment check
|
|
10
|
+
|
|
3
11
|
## 1.1.6
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
package/dist/cjs/analytics.js
CHANGED
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.buildTypeAheadRenderedPayload = exports.buildTypeAheadInviteItemViewedPayload = exports.buildTypeAheadInviteItemClickedPayload = exports.
|
|
7
|
+
exports.buildTypeAheadRenderedPayload = exports.buildTypeAheadInviteItemViewedPayload = exports.buildTypeAheadInviteItemClickedPayload = exports.buildTypeAheadInsertedPayload = exports.buildTypeAheadCancelPayload = exports.buildAnalyticsPayload = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _analyticsGasTypes = require("@atlaskit/analytics-gas-types");
|
|
10
10
|
var _resource = require("@atlaskit/mention/resource");
|
|
@@ -75,28 +75,14 @@ var buildTypeAheadInviteItemViewedPayload = exports.buildTypeAheadInviteItemView
|
|
|
75
75
|
userRole: userRole
|
|
76
76
|
});
|
|
77
77
|
};
|
|
78
|
-
var buildTypeAheadInviteExposurePayload = exports.buildTypeAheadInviteExposurePayload = function buildTypeAheadInviteExposurePayload(sessionId, contextIdentifierProvider, inviteExperimentCohort, userRole) {
|
|
79
|
-
var _ref2 = contextIdentifierProvider || {},
|
|
80
|
-
containerId = _ref2.containerId,
|
|
81
|
-
objectId = _ref2.objectId,
|
|
82
|
-
childObjectId = _ref2.childObjectId;
|
|
83
|
-
return buildAnalyticsPayload('feature', 'exposed', _analyticsGasTypes.OPERATIONAL_EVENT_TYPE, sessionId, {
|
|
84
|
-
flagKey: 'confluence.frontend.invite.from.mention',
|
|
85
|
-
value: inviteExperimentCohort || 'not-enrolled',
|
|
86
|
-
containerId: containerId,
|
|
87
|
-
objectId: objectId,
|
|
88
|
-
childObjectId: childObjectId,
|
|
89
|
-
userRole: userRole
|
|
90
|
-
}, ['measurement', 'hasCustomAttributes']);
|
|
91
|
-
};
|
|
92
78
|
var buildTypeAheadInviteItemClickedPayload = exports.buildTypeAheadInviteItemClickedPayload = function buildTypeAheadInviteItemClickedPayload(duration, upKeyCount, downKeyCount, sessionId, insertType, query, contextIdentifierProvider, userRole) {
|
|
93
79
|
var _extractAttributesFro2 = extractAttributesFromQuery(query),
|
|
94
80
|
queryLength = _extractAttributesFro2.queryLength,
|
|
95
81
|
spaceInQuery = _extractAttributesFro2.spaceInQuery;
|
|
96
|
-
var
|
|
97
|
-
containerId =
|
|
98
|
-
objectId =
|
|
99
|
-
childObjectId =
|
|
82
|
+
var _ref2 = contextIdentifierProvider || {},
|
|
83
|
+
containerId = _ref2.containerId,
|
|
84
|
+
objectId = _ref2.objectId,
|
|
85
|
+
childObjectId = _ref2.childObjectId;
|
|
100
86
|
return buildAnalyticsPayload('inviteItem', isClicked(insertType) ? 'clicked' : 'pressed', _analyticsGasTypes.UI_EVENT_TYPE, sessionId, {
|
|
101
87
|
duration: duration,
|
|
102
88
|
queryLength: queryLength,
|
|
@@ -243,13 +243,6 @@ var createTypeAheadConfig = exports.createTypeAheadConfig = function createTypeA
|
|
|
243
243
|
if (mentions.length === 0 && firstQueryWithoutResults === null) {
|
|
244
244
|
firstQueryWithoutResults = query;
|
|
245
245
|
}
|
|
246
|
-
|
|
247
|
-
// Growth (El-dorado) experiment design hard requirement
|
|
248
|
-
if (mentionItems.length <= 2) {
|
|
249
|
-
var inviteExperimentCohort = mentionProvider.inviteExperimentCohort,
|
|
250
|
-
userRole = mentionProvider.userRole;
|
|
251
|
-
fireEvent((0, _analytics.buildTypeAheadInviteExposurePayload)(sessionId, contextIdentifierProvider, inviteExperimentCohort, userRole));
|
|
252
|
-
}
|
|
253
246
|
if (!mentionProvider.shouldEnableInvite || mentionItems.length > 2) {
|
|
254
247
|
resolve(mentionItems);
|
|
255
248
|
} else {
|
package/dist/es2019/analytics.js
CHANGED
|
@@ -60,21 +60,6 @@ export const buildTypeAheadInviteItemViewedPayload = (sessionId, contextIdentifi
|
|
|
60
60
|
userRole
|
|
61
61
|
});
|
|
62
62
|
};
|
|
63
|
-
export const buildTypeAheadInviteExposurePayload = (sessionId, contextIdentifierProvider, inviteExperimentCohort, userRole) => {
|
|
64
|
-
const {
|
|
65
|
-
containerId,
|
|
66
|
-
objectId,
|
|
67
|
-
childObjectId
|
|
68
|
-
} = contextIdentifierProvider || {};
|
|
69
|
-
return buildAnalyticsPayload('feature', 'exposed', OPERATIONAL_EVENT_TYPE, sessionId, {
|
|
70
|
-
flagKey: 'confluence.frontend.invite.from.mention',
|
|
71
|
-
value: inviteExperimentCohort || 'not-enrolled',
|
|
72
|
-
containerId,
|
|
73
|
-
objectId,
|
|
74
|
-
childObjectId,
|
|
75
|
-
userRole
|
|
76
|
-
}, ['measurement', 'hasCustomAttributes']);
|
|
77
|
-
};
|
|
78
63
|
export const buildTypeAheadInviteItemClickedPayload = (duration, upKeyCount, downKeyCount, sessionId, insertType, query, contextIdentifierProvider, userRole) => {
|
|
79
64
|
const {
|
|
80
65
|
queryLength,
|
|
@@ -5,7 +5,7 @@ import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
|
5
5
|
import { findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
6
6
|
import { MENTION_ITEM_HEIGHT, MentionItem } from '@atlaskit/mention/item';
|
|
7
7
|
import { isResolvingMentionProvider } from '@atlaskit/mention/resource';
|
|
8
|
-
import { buildTypeAheadCancelPayload, buildTypeAheadInsertedPayload,
|
|
8
|
+
import { buildTypeAheadCancelPayload, buildTypeAheadInsertedPayload, buildTypeAheadInviteItemClickedPayload, buildTypeAheadInviteItemViewedPayload, buildTypeAheadRenderedPayload } from '../analytics';
|
|
9
9
|
import { getMentionPluginState } from '../pm-plugins/utils';
|
|
10
10
|
import InviteItem, { INVITE_ITEM_DESCRIPTION } from '../ui/InviteItem';
|
|
11
11
|
import { isInviteItem, isTeamStats, isTeamType, shouldKeepInviteItem } from '../utils';
|
|
@@ -220,15 +220,6 @@ export const createTypeAheadConfig = ({
|
|
|
220
220
|
if (mentions.length === 0 && firstQueryWithoutResults === null) {
|
|
221
221
|
firstQueryWithoutResults = query;
|
|
222
222
|
}
|
|
223
|
-
|
|
224
|
-
// Growth (El-dorado) experiment design hard requirement
|
|
225
|
-
if (mentionItems.length <= 2) {
|
|
226
|
-
const {
|
|
227
|
-
inviteExperimentCohort,
|
|
228
|
-
userRole
|
|
229
|
-
} = mentionProvider;
|
|
230
|
-
fireEvent(buildTypeAheadInviteExposurePayload(sessionId, contextIdentifierProvider, inviteExperimentCohort, userRole));
|
|
231
|
-
}
|
|
232
223
|
if (!mentionProvider.shouldEnableInvite || mentionItems.length > 2) {
|
|
233
224
|
resolve(mentionItems);
|
|
234
225
|
} else {
|
package/dist/esm/analytics.js
CHANGED
|
@@ -68,28 +68,14 @@ export var buildTypeAheadInviteItemViewedPayload = function buildTypeAheadInvite
|
|
|
68
68
|
userRole: userRole
|
|
69
69
|
});
|
|
70
70
|
};
|
|
71
|
-
export var buildTypeAheadInviteExposurePayload = function buildTypeAheadInviteExposurePayload(sessionId, contextIdentifierProvider, inviteExperimentCohort, userRole) {
|
|
72
|
-
var _ref2 = contextIdentifierProvider || {},
|
|
73
|
-
containerId = _ref2.containerId,
|
|
74
|
-
objectId = _ref2.objectId,
|
|
75
|
-
childObjectId = _ref2.childObjectId;
|
|
76
|
-
return buildAnalyticsPayload('feature', 'exposed', OPERATIONAL_EVENT_TYPE, sessionId, {
|
|
77
|
-
flagKey: 'confluence.frontend.invite.from.mention',
|
|
78
|
-
value: inviteExperimentCohort || 'not-enrolled',
|
|
79
|
-
containerId: containerId,
|
|
80
|
-
objectId: objectId,
|
|
81
|
-
childObjectId: childObjectId,
|
|
82
|
-
userRole: userRole
|
|
83
|
-
}, ['measurement', 'hasCustomAttributes']);
|
|
84
|
-
};
|
|
85
71
|
export var buildTypeAheadInviteItemClickedPayload = function buildTypeAheadInviteItemClickedPayload(duration, upKeyCount, downKeyCount, sessionId, insertType, query, contextIdentifierProvider, userRole) {
|
|
86
72
|
var _extractAttributesFro2 = extractAttributesFromQuery(query),
|
|
87
73
|
queryLength = _extractAttributesFro2.queryLength,
|
|
88
74
|
spaceInQuery = _extractAttributesFro2.spaceInQuery;
|
|
89
|
-
var
|
|
90
|
-
containerId =
|
|
91
|
-
objectId =
|
|
92
|
-
childObjectId =
|
|
75
|
+
var _ref2 = contextIdentifierProvider || {},
|
|
76
|
+
containerId = _ref2.containerId,
|
|
77
|
+
objectId = _ref2.objectId,
|
|
78
|
+
childObjectId = _ref2.childObjectId;
|
|
93
79
|
return buildAnalyticsPayload('inviteItem', isClicked(insertType) ? 'clicked' : 'pressed', UI_EVENT_TYPE, sessionId, {
|
|
94
80
|
duration: duration,
|
|
95
81
|
queryLength: queryLength,
|
|
@@ -12,7 +12,7 @@ import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
|
12
12
|
import { findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
13
13
|
import { MENTION_ITEM_HEIGHT, MentionItem } from '@atlaskit/mention/item';
|
|
14
14
|
import { isResolvingMentionProvider } from '@atlaskit/mention/resource';
|
|
15
|
-
import { buildTypeAheadCancelPayload, buildTypeAheadInsertedPayload,
|
|
15
|
+
import { buildTypeAheadCancelPayload, buildTypeAheadInsertedPayload, buildTypeAheadInviteItemClickedPayload, buildTypeAheadInviteItemViewedPayload, buildTypeAheadRenderedPayload } from '../analytics';
|
|
16
16
|
import { getMentionPluginState } from '../pm-plugins/utils';
|
|
17
17
|
import InviteItem, { INVITE_ITEM_DESCRIPTION } from '../ui/InviteItem';
|
|
18
18
|
import { isInviteItem, isTeamStats, isTeamType, shouldKeepInviteItem } from '../utils';
|
|
@@ -231,13 +231,6 @@ export var createTypeAheadConfig = function createTypeAheadConfig(_ref6) {
|
|
|
231
231
|
if (mentions.length === 0 && firstQueryWithoutResults === null) {
|
|
232
232
|
firstQueryWithoutResults = query;
|
|
233
233
|
}
|
|
234
|
-
|
|
235
|
-
// Growth (El-dorado) experiment design hard requirement
|
|
236
|
-
if (mentionItems.length <= 2) {
|
|
237
|
-
var inviteExperimentCohort = mentionProvider.inviteExperimentCohort,
|
|
238
|
-
userRole = mentionProvider.userRole;
|
|
239
|
-
fireEvent(buildTypeAheadInviteExposurePayload(sessionId, contextIdentifierProvider, inviteExperimentCohort, userRole));
|
|
240
|
-
}
|
|
241
234
|
if (!mentionProvider.shouldEnableInvite || mentionItems.length > 2) {
|
|
242
235
|
resolve(mentionItems);
|
|
243
236
|
} else {
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import type { EventType, GasPayload } from '@atlaskit/analytics-gas-types';
|
|
2
2
|
import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
|
|
3
3
|
import type { SelectItemMode } from '@atlaskit/editor-common/type-ahead';
|
|
4
|
-
import type {
|
|
4
|
+
import type { UserRole } from '@atlaskit/mention';
|
|
5
5
|
import type { MentionDescription } from '@atlaskit/mention/resource';
|
|
6
6
|
import type { TeamInfoAttrAnalytics } from './types';
|
|
7
7
|
export declare const buildAnalyticsPayload: (actionSubject: string, action: string, eventType: EventType, sessionId: string, otherAttributes?: {}, tags?: Array<string>) => GasPayload;
|
|
8
8
|
export declare const buildTypeAheadCancelPayload: (duration: number, upKeyCount: number, downKeyCount: number, sessionId: string, query?: string) => GasPayload;
|
|
9
9
|
export declare const buildTypeAheadInviteItemViewedPayload: (sessionId: string, contextIdentifierProvider?: ContextIdentifierProvider, userRole?: UserRole) => GasPayload;
|
|
10
|
-
export declare const buildTypeAheadInviteExposurePayload: (sessionId: string, contextIdentifierProvider?: ContextIdentifierProvider, inviteExperimentCohort?: InviteExperimentCohort, userRole?: UserRole) => GasPayload;
|
|
11
10
|
export declare const buildTypeAheadInviteItemClickedPayload: (duration: number, upKeyCount: number, downKeyCount: number, sessionId: string, insertType: SelectItemMode, query?: string, contextIdentifierProvider?: ContextIdentifierProvider, userRole?: UserRole) => GasPayload;
|
|
12
11
|
export declare const buildTypeAheadInsertedPayload: (duration: number, upKeyCount: number, downKeyCount: number, sessionId: string, insertType: SelectItemMode, mention: MentionDescription, mentionList?: MentionDescription[], query?: string, contextIdentifierProvider?: ContextIdentifierProvider, taskListId?: string, taskItemId?: string) => GasPayload;
|
|
13
12
|
export declare const buildTypeAheadRenderedPayload: (duration: number, userIds: Array<string> | null, query: string, teams: TeamInfoAttrAnalytics[] | null) => GasPayload;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import type { EventType, GasPayload } from '@atlaskit/analytics-gas-types';
|
|
2
2
|
import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
|
|
3
3
|
import type { SelectItemMode } from '@atlaskit/editor-common/type-ahead';
|
|
4
|
-
import type {
|
|
4
|
+
import type { UserRole } from '@atlaskit/mention';
|
|
5
5
|
import type { MentionDescription } from '@atlaskit/mention/resource';
|
|
6
6
|
import type { TeamInfoAttrAnalytics } from './types';
|
|
7
7
|
export declare const buildAnalyticsPayload: (actionSubject: string, action: string, eventType: EventType, sessionId: string, otherAttributes?: {}, tags?: Array<string>) => GasPayload;
|
|
8
8
|
export declare const buildTypeAheadCancelPayload: (duration: number, upKeyCount: number, downKeyCount: number, sessionId: string, query?: string) => GasPayload;
|
|
9
9
|
export declare const buildTypeAheadInviteItemViewedPayload: (sessionId: string, contextIdentifierProvider?: ContextIdentifierProvider, userRole?: UserRole) => GasPayload;
|
|
10
|
-
export declare const buildTypeAheadInviteExposurePayload: (sessionId: string, contextIdentifierProvider?: ContextIdentifierProvider, inviteExperimentCohort?: InviteExperimentCohort, userRole?: UserRole) => GasPayload;
|
|
11
10
|
export declare const buildTypeAheadInviteItemClickedPayload: (duration: number, upKeyCount: number, downKeyCount: number, sessionId: string, insertType: SelectItemMode, query?: string, contextIdentifierProvider?: ContextIdentifierProvider, userRole?: UserRole) => GasPayload;
|
|
12
11
|
export declare const buildTypeAheadInsertedPayload: (duration: number, upKeyCount: number, downKeyCount: number, sessionId: string, insertType: SelectItemMode, mention: MentionDescription, mentionList?: MentionDescription[], query?: string, contextIdentifierProvider?: ContextIdentifierProvider, taskListId?: string, taskItemId?: string) => GasPayload;
|
|
13
12
|
export declare const buildTypeAheadRenderedPayload: (duration: number, userIds: Array<string> | null, query: string, teams: TeamInfoAttrAnalytics[] | null) => GasPayload;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-mentions",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.7",
|
|
4
4
|
"description": "Mentions plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@atlaskit/adf-schema": "^36.1.0",
|
|
37
37
|
"@atlaskit/analytics-gas-types": "^5.1.0",
|
|
38
|
-
"@atlaskit/editor-common": "^79.
|
|
38
|
+
"@atlaskit/editor-common": "^79.3.0",
|
|
39
39
|
"@atlaskit/editor-plugin-analytics": "^1.1.0",
|
|
40
40
|
"@atlaskit/editor-plugin-context-identifier": "^1.1.0",
|
|
41
41
|
"@atlaskit/editor-plugin-type-ahead": "^1.1.0",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@atlaskit/icon": "^22.1.0",
|
|
44
44
|
"@atlaskit/mention": "^23.0.0",
|
|
45
45
|
"@atlaskit/theme": "^12.8.0",
|
|
46
|
-
"@atlaskit/tokens": "^1.
|
|
46
|
+
"@atlaskit/tokens": "^1.48.0",
|
|
47
47
|
"@babel/runtime": "^7.0.0",
|
|
48
48
|
"@emotion/react": "^11.7.1",
|
|
49
49
|
"uuid": "^3.1.0"
|