@atlaskit/editor-common 99.4.2 → 99.5.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 +30 -0
- package/dist/cjs/analytics/fire-analytics-event.js +8 -3
- package/dist/cjs/analytics/types/activity-session-events.js +5 -0
- package/dist/cjs/analytics/types/enums.js +4 -0
- package/dist/cjs/messages/ai-proactive.js +14 -0
- package/dist/cjs/messages/index.js +7 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/analytics/fire-analytics-event.js +8 -3
- package/dist/es2019/analytics/types/activity-session-events.js +1 -0
- package/dist/es2019/analytics/types/enums.js +4 -0
- package/dist/es2019/messages/ai-proactive.js +8 -0
- package/dist/es2019/messages/index.js +1 -0
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/analytics/fire-analytics-event.js +8 -3
- package/dist/esm/analytics/types/activity-session-events.js +1 -0
- package/dist/esm/analytics/types/enums.js +4 -0
- package/dist/esm/messages/ai-proactive.js +8 -0
- package/dist/esm/messages/index.js +1 -0
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/analytics/api.d.ts +4 -1
- package/dist/types/analytics/index.d.ts +2 -1
- package/dist/types/analytics/types/activity-session-events.d.ts +24 -0
- package/dist/types/analytics/types/ai-proactive-events.d.ts +4 -12
- package/dist/types/analytics/types/ai-unified-events.d.ts +7 -9
- package/dist/types/analytics/types/enums.d.ts +10 -0
- package/dist/types/analytics/types/events.d.ts +5 -2
- package/dist/types/collab/index.d.ts +1 -0
- package/dist/types/messages/ai-proactive.d.ts +7 -0
- package/dist/types/messages/index.d.ts +1 -0
- package/dist/types/types/feature-flags.d.ts +0 -8
- package/dist/types-ts4.5/analytics/api.d.ts +4 -1
- package/dist/types-ts4.5/analytics/index.d.ts +2 -1
- package/dist/types-ts4.5/analytics/types/activity-session-events.d.ts +24 -0
- package/dist/types-ts4.5/analytics/types/ai-proactive-events.d.ts +4 -12
- package/dist/types-ts4.5/analytics/types/ai-unified-events.d.ts +7 -9
- package/dist/types-ts4.5/analytics/types/enums.d.ts +10 -0
- package/dist/types-ts4.5/analytics/types/events.d.ts +5 -2
- package/dist/types-ts4.5/collab/index.d.ts +1 -0
- package/dist/types-ts4.5/messages/ai-proactive.d.ts +7 -0
- package/dist/types-ts4.5/messages/index.d.ts +1 -0
- package/dist/types-ts4.5/types/feature-flags.d.ts +0 -8
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 99.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#104835](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/104835)
|
|
8
|
+
[`c9125a4a01da7`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c9125a4a01da7) -
|
|
9
|
+
[ux] Added the aiProactive primary toolbar placeholder. Also added the existing the suggested
|
|
10
|
+
edits toolbar button to the proactive ai plugin.
|
|
11
|
+
|
|
12
|
+
Also added a new configuration option to the ai plugin to hide the primary toolbar button.
|
|
13
|
+
|
|
14
|
+
- [#105175](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/105175)
|
|
15
|
+
[`6e108c69a21f1`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/6e108c69a21f1) -
|
|
16
|
+
EDF-2257: Clean up unused analytic event types and export common unified attributes types.
|
|
17
|
+
- [#104129](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/104129)
|
|
18
|
+
[`75414d4282d9a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/75414d4282d9a) -
|
|
19
|
+
[ux] EDF-2131: Trigger Proactive Feedback Dialog more frequently (on modal dismiss or thumbs down
|
|
20
|
+
click, and every 3rd dismissal from context panel buttons) behind fg
|
|
21
|
+
platform_editor_ai_aggressive_feedback_proactive
|
|
22
|
+
- [#105399](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/105399)
|
|
23
|
+
[`ed98e34b5912b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ed98e34b5912b) -
|
|
24
|
+
ED-26234 Fire analytics at end of editor session
|
|
25
|
+
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- [#105400](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/105400)
|
|
29
|
+
[`cb3c65a390b04`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/cb3c65a390b04) -
|
|
30
|
+
Removing onChangeCalled event as it is spamming GASV3.
|
|
31
|
+
- Updated dependencies
|
|
32
|
+
|
|
3
33
|
## 99.4.2
|
|
4
34
|
|
|
5
35
|
### Patch Changes
|
|
@@ -7,7 +7,7 @@ exports.fireAnalyticsEvent = exports.editorAnalyticsChannel = void 0;
|
|
|
7
7
|
var _types = require("@atlaskit/analytics-listeners/types");
|
|
8
8
|
var _analyticsQueue = require("./analytics-queue");
|
|
9
9
|
var editorAnalyticsChannel = exports.editorAnalyticsChannel = _types.FabricChannel.editor;
|
|
10
|
-
var fireAnalyticsEvent = exports.fireAnalyticsEvent = function fireAnalyticsEvent(createAnalyticsEvent) {
|
|
10
|
+
var fireAnalyticsEvent = exports.fireAnalyticsEvent = function fireAnalyticsEvent(createAnalyticsEvent, options) {
|
|
11
11
|
return function (_ref) {
|
|
12
12
|
var payload = _ref.payload,
|
|
13
13
|
_ref$channel = _ref.channel,
|
|
@@ -15,10 +15,15 @@ var fireAnalyticsEvent = exports.fireAnalyticsEvent = function fireAnalyticsEven
|
|
|
15
15
|
if (!createAnalyticsEvent) {
|
|
16
16
|
return;
|
|
17
17
|
}
|
|
18
|
+
if (options !== null && options !== void 0 && options.immediate) {
|
|
19
|
+
var _createAnalyticsEvent;
|
|
20
|
+
(_createAnalyticsEvent = createAnalyticsEvent(payload)) === null || _createAnalyticsEvent === void 0 || _createAnalyticsEvent.fire(channel);
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
18
23
|
var queue = _analyticsQueue.AnalyticsQueue.get();
|
|
19
24
|
queue.schedule(function () {
|
|
20
|
-
var
|
|
21
|
-
return (
|
|
25
|
+
var _createAnalyticsEvent2;
|
|
26
|
+
return (_createAnalyticsEvent2 = createAnalyticsEvent(payload)) === null || _createAnalyticsEvent2 === void 0 ? void 0 : _createAnalyticsEvent2.fire(channel);
|
|
22
27
|
});
|
|
23
28
|
};
|
|
24
29
|
};
|
|
@@ -55,6 +55,7 @@ var ACTION = exports.ACTION = /*#__PURE__*/function (ACTION) {
|
|
|
55
55
|
ACTION["EDITOR_TTI"] = "tti";
|
|
56
56
|
ACTION["EDITOR_CONTENT_RETRIEVAL_PERFORMED"] = "contentRetrievalPerformed";
|
|
57
57
|
ACTION["RE_RENDERED"] = "reRendered";
|
|
58
|
+
ACTION["ENDED"] = "ended";
|
|
58
59
|
ACTION["ENTERED"] = "entered";
|
|
59
60
|
ACTION["ERROR"] = "error";
|
|
60
61
|
ACTION["ERRORED"] = "errored";
|
|
@@ -229,6 +230,7 @@ var ACTION_SUBJECT = exports.ACTION_SUBJECT = /*#__PURE__*/function (ACTION_SUBJ
|
|
|
229
230
|
ACTION_SUBJECT["DATE_SEGMENT"] = "dateSegment";
|
|
230
231
|
ACTION_SUBJECT["DOCUMENT"] = "document";
|
|
231
232
|
ACTION_SUBJECT["EDITOR"] = "editor";
|
|
233
|
+
ACTION_SUBJECT["ACTIVITY_SESSION"] = "activitySession";
|
|
232
234
|
ACTION_SUBJECT["ELEMENT_BROWSER"] = "elementBrowser";
|
|
233
235
|
ACTION_SUBJECT["EMBEDS"] = "embeds";
|
|
234
236
|
ACTION_SUBJECT["EXPAND"] = "expand";
|
|
@@ -289,11 +291,13 @@ var ACTION_SUBJECT = exports.ACTION_SUBJECT = /*#__PURE__*/function (ACTION_SUBJ
|
|
|
289
291
|
}({});
|
|
290
292
|
var ACTION_SUBJECT_ID = exports.ACTION_SUBJECT_ID = /*#__PURE__*/function (ACTION_SUBJECT_ID) {
|
|
291
293
|
ACTION_SUBJECT_ID["ACTION"] = "action";
|
|
294
|
+
ACTION_SUBJECT_ID["ACTIVITY"] = "activity";
|
|
292
295
|
ACTION_SUBJECT_ID["AI_DEFINITIONS_DEFINE_BUTTON"] = "aiDefinitionsDefineButton";
|
|
293
296
|
ACTION_SUBJECT_ID["AI_DEFINITIONS_AUTO_HIGHLIGHT"] = "aiDefinitionsAutoHighlight";
|
|
294
297
|
ACTION_SUBJECT_ID["AI_PANELS_BODIED_EXTENSION"] = "aiPanelsBodiedExtension";
|
|
295
298
|
ACTION_SUBJECT_ID["AI_PROMPT_LINK_PICKER_BUTTON"] = "aiPromptLinkPickerButton";
|
|
296
299
|
ACTION_SUBJECT_ID["AI_PROMPT_MENTION_BUTTON"] = "aiPromptMentionButton";
|
|
300
|
+
ACTION_SUBJECT_ID["AI_PROACTIVE_FEEDBACK_DIALOG"] = "aiProactiveFeedbackDialog";
|
|
297
301
|
ACTION_SUBJECT_ID["ALL"] = "all";
|
|
298
302
|
ACTION_SUBJECT_ID["ALT_TEXT"] = "altText";
|
|
299
303
|
ACTION_SUBJECT_ID["ANNOTATE_BUTTON"] = "annotateButton";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.aiProactiveMessages = void 0;
|
|
7
|
+
var _reactIntlNext = require("react-intl-next");
|
|
8
|
+
var aiProactiveMessages = exports.aiProactiveMessages = (0, _reactIntlNext.defineMessages)({
|
|
9
|
+
loadingIconAltText: {
|
|
10
|
+
id: 'fabric.editor.ai.proactive.loading.iconAltText.non-final',
|
|
11
|
+
defaultMessage: 'Loading icon',
|
|
12
|
+
description: 'Icon alt text of the Loading icon'
|
|
13
|
+
}
|
|
14
|
+
});
|
|
@@ -9,6 +9,12 @@ Object.defineProperty(exports, "aiDefinitionsMessages", {
|
|
|
9
9
|
return _aiDefinitions.aiDefinitionsMessages;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
+
Object.defineProperty(exports, "aiProactiveMessages", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _aiProactive.aiProactiveMessages;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
12
18
|
Object.defineProperty(exports, "alignmentMessages", {
|
|
13
19
|
enumerable: true,
|
|
14
20
|
get: function get() {
|
|
@@ -204,6 +210,7 @@ Object.defineProperty(exports, "unsupportedContentMessages", {
|
|
|
204
210
|
});
|
|
205
211
|
var _reactIntlNext = require("react-intl-next");
|
|
206
212
|
var _aiDefinitions = require("./ai-definitions");
|
|
213
|
+
var _aiProactive = require("./ai-proactive");
|
|
207
214
|
var _alignment = require("./alignment");
|
|
208
215
|
var _annotation = require("./annotation");
|
|
209
216
|
var _blockType = require("./block-type");
|
|
@@ -17,7 +17,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
17
17
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
18
18
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
19
19
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
20
|
-
var packageVersion = "99.
|
|
20
|
+
var packageVersion = "99.5.0";
|
|
21
21
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
22
22
|
// Remove URL as it has UGC
|
|
23
23
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -23,7 +23,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
23
23
|
* @jsx jsx
|
|
24
24
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
25
25
|
var packageName = "@atlaskit/editor-common";
|
|
26
|
-
var packageVersion = "99.
|
|
26
|
+
var packageVersion = "99.5.0";
|
|
27
27
|
var halfFocusRing = 1;
|
|
28
28
|
var dropOffset = '0, 8';
|
|
29
29
|
// Ignored via go/ees005
|
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
import { FabricChannel } from '@atlaskit/analytics-listeners/types';
|
|
2
2
|
import { AnalyticsQueue } from './analytics-queue';
|
|
3
3
|
export const editorAnalyticsChannel = FabricChannel.editor;
|
|
4
|
-
export const fireAnalyticsEvent = createAnalyticsEvent => ({
|
|
4
|
+
export const fireAnalyticsEvent = (createAnalyticsEvent, options) => ({
|
|
5
5
|
payload,
|
|
6
6
|
channel = editorAnalyticsChannel
|
|
7
7
|
}) => {
|
|
8
8
|
if (!createAnalyticsEvent) {
|
|
9
9
|
return;
|
|
10
10
|
}
|
|
11
|
+
if (options !== null && options !== void 0 && options.immediate) {
|
|
12
|
+
var _createAnalyticsEvent;
|
|
13
|
+
(_createAnalyticsEvent = createAnalyticsEvent(payload)) === null || _createAnalyticsEvent === void 0 ? void 0 : _createAnalyticsEvent.fire(channel);
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
11
16
|
const queue = AnalyticsQueue.get();
|
|
12
17
|
queue.schedule(() => {
|
|
13
|
-
var
|
|
14
|
-
return (
|
|
18
|
+
var _createAnalyticsEvent2;
|
|
19
|
+
return (_createAnalyticsEvent2 = createAnalyticsEvent(payload)) === null || _createAnalyticsEvent2 === void 0 ? void 0 : _createAnalyticsEvent2.fire(channel);
|
|
15
20
|
});
|
|
16
21
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -49,6 +49,7 @@ export let ACTION = /*#__PURE__*/function (ACTION) {
|
|
|
49
49
|
ACTION["EDITOR_TTI"] = "tti";
|
|
50
50
|
ACTION["EDITOR_CONTENT_RETRIEVAL_PERFORMED"] = "contentRetrievalPerformed";
|
|
51
51
|
ACTION["RE_RENDERED"] = "reRendered";
|
|
52
|
+
ACTION["ENDED"] = "ended";
|
|
52
53
|
ACTION["ENTERED"] = "entered";
|
|
53
54
|
ACTION["ERROR"] = "error";
|
|
54
55
|
ACTION["ERRORED"] = "errored";
|
|
@@ -223,6 +224,7 @@ export let ACTION_SUBJECT = /*#__PURE__*/function (ACTION_SUBJECT) {
|
|
|
223
224
|
ACTION_SUBJECT["DATE_SEGMENT"] = "dateSegment";
|
|
224
225
|
ACTION_SUBJECT["DOCUMENT"] = "document";
|
|
225
226
|
ACTION_SUBJECT["EDITOR"] = "editor";
|
|
227
|
+
ACTION_SUBJECT["ACTIVITY_SESSION"] = "activitySession";
|
|
226
228
|
ACTION_SUBJECT["ELEMENT_BROWSER"] = "elementBrowser";
|
|
227
229
|
ACTION_SUBJECT["EMBEDS"] = "embeds";
|
|
228
230
|
ACTION_SUBJECT["EXPAND"] = "expand";
|
|
@@ -283,11 +285,13 @@ export let ACTION_SUBJECT = /*#__PURE__*/function (ACTION_SUBJECT) {
|
|
|
283
285
|
}({});
|
|
284
286
|
export let ACTION_SUBJECT_ID = /*#__PURE__*/function (ACTION_SUBJECT_ID) {
|
|
285
287
|
ACTION_SUBJECT_ID["ACTION"] = "action";
|
|
288
|
+
ACTION_SUBJECT_ID["ACTIVITY"] = "activity";
|
|
286
289
|
ACTION_SUBJECT_ID["AI_DEFINITIONS_DEFINE_BUTTON"] = "aiDefinitionsDefineButton";
|
|
287
290
|
ACTION_SUBJECT_ID["AI_DEFINITIONS_AUTO_HIGHLIGHT"] = "aiDefinitionsAutoHighlight";
|
|
288
291
|
ACTION_SUBJECT_ID["AI_PANELS_BODIED_EXTENSION"] = "aiPanelsBodiedExtension";
|
|
289
292
|
ACTION_SUBJECT_ID["AI_PROMPT_LINK_PICKER_BUTTON"] = "aiPromptLinkPickerButton";
|
|
290
293
|
ACTION_SUBJECT_ID["AI_PROMPT_MENTION_BUTTON"] = "aiPromptMentionButton";
|
|
294
|
+
ACTION_SUBJECT_ID["AI_PROACTIVE_FEEDBACK_DIALOG"] = "aiProactiveFeedbackDialog";
|
|
291
295
|
ACTION_SUBJECT_ID["ALL"] = "all";
|
|
292
296
|
ACTION_SUBJECT_ID["ALT_TEXT"] = "altText";
|
|
293
297
|
ACTION_SUBJECT_ID["ANNOTATE_BUTTON"] = "annotateButton";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { defineMessages } from 'react-intl-next';
|
|
2
|
+
export const aiProactiveMessages = defineMessages({
|
|
3
|
+
loadingIconAltText: {
|
|
4
|
+
id: 'fabric.editor.ai.proactive.loading.iconAltText.non-final',
|
|
5
|
+
defaultMessage: 'Loading icon',
|
|
6
|
+
description: 'Icon alt text of the Loading icon'
|
|
7
|
+
}
|
|
8
|
+
});
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
import { defineMessages } from 'react-intl-next';
|
|
5
5
|
export { aiDefinitionsMessages } from './ai-definitions';
|
|
6
|
+
export { aiProactiveMessages } from './ai-proactive';
|
|
6
7
|
export { alignmentMessages } from './alignment';
|
|
7
8
|
export { annotationMessages } from './annotation';
|
|
8
9
|
export { messages as blockTypeMessages } from './block-type';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isFedRamp } from './environment';
|
|
2
2
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
3
3
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
4
|
-
const packageVersion = "99.
|
|
4
|
+
const packageVersion = "99.5.0";
|
|
5
5
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
6
6
|
// Remove URL as it has UGC
|
|
7
7
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -13,7 +13,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
13
13
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
14
14
|
import Layer from '../Layer';
|
|
15
15
|
const packageName = "@atlaskit/editor-common";
|
|
16
|
-
const packageVersion = "99.
|
|
16
|
+
const packageVersion = "99.5.0";
|
|
17
17
|
const halfFocusRing = 1;
|
|
18
18
|
const dropOffset = '0, 8';
|
|
19
19
|
// Ignored via go/ees005
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FabricChannel } from '@atlaskit/analytics-listeners/types';
|
|
2
2
|
import { AnalyticsQueue } from './analytics-queue';
|
|
3
3
|
export var editorAnalyticsChannel = FabricChannel.editor;
|
|
4
|
-
export var fireAnalyticsEvent = function fireAnalyticsEvent(createAnalyticsEvent) {
|
|
4
|
+
export var fireAnalyticsEvent = function fireAnalyticsEvent(createAnalyticsEvent, options) {
|
|
5
5
|
return function (_ref) {
|
|
6
6
|
var payload = _ref.payload,
|
|
7
7
|
_ref$channel = _ref.channel,
|
|
@@ -9,10 +9,15 @@ export var fireAnalyticsEvent = function fireAnalyticsEvent(createAnalyticsEvent
|
|
|
9
9
|
if (!createAnalyticsEvent) {
|
|
10
10
|
return;
|
|
11
11
|
}
|
|
12
|
+
if (options !== null && options !== void 0 && options.immediate) {
|
|
13
|
+
var _createAnalyticsEvent;
|
|
14
|
+
(_createAnalyticsEvent = createAnalyticsEvent(payload)) === null || _createAnalyticsEvent === void 0 || _createAnalyticsEvent.fire(channel);
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
12
17
|
var queue = AnalyticsQueue.get();
|
|
13
18
|
queue.schedule(function () {
|
|
14
|
-
var
|
|
15
|
-
return (
|
|
19
|
+
var _createAnalyticsEvent2;
|
|
20
|
+
return (_createAnalyticsEvent2 = createAnalyticsEvent(payload)) === null || _createAnalyticsEvent2 === void 0 ? void 0 : _createAnalyticsEvent2.fire(channel);
|
|
16
21
|
});
|
|
17
22
|
};
|
|
18
23
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -49,6 +49,7 @@ export var ACTION = /*#__PURE__*/function (ACTION) {
|
|
|
49
49
|
ACTION["EDITOR_TTI"] = "tti";
|
|
50
50
|
ACTION["EDITOR_CONTENT_RETRIEVAL_PERFORMED"] = "contentRetrievalPerformed";
|
|
51
51
|
ACTION["RE_RENDERED"] = "reRendered";
|
|
52
|
+
ACTION["ENDED"] = "ended";
|
|
52
53
|
ACTION["ENTERED"] = "entered";
|
|
53
54
|
ACTION["ERROR"] = "error";
|
|
54
55
|
ACTION["ERRORED"] = "errored";
|
|
@@ -223,6 +224,7 @@ export var ACTION_SUBJECT = /*#__PURE__*/function (ACTION_SUBJECT) {
|
|
|
223
224
|
ACTION_SUBJECT["DATE_SEGMENT"] = "dateSegment";
|
|
224
225
|
ACTION_SUBJECT["DOCUMENT"] = "document";
|
|
225
226
|
ACTION_SUBJECT["EDITOR"] = "editor";
|
|
227
|
+
ACTION_SUBJECT["ACTIVITY_SESSION"] = "activitySession";
|
|
226
228
|
ACTION_SUBJECT["ELEMENT_BROWSER"] = "elementBrowser";
|
|
227
229
|
ACTION_SUBJECT["EMBEDS"] = "embeds";
|
|
228
230
|
ACTION_SUBJECT["EXPAND"] = "expand";
|
|
@@ -283,11 +285,13 @@ export var ACTION_SUBJECT = /*#__PURE__*/function (ACTION_SUBJECT) {
|
|
|
283
285
|
}({});
|
|
284
286
|
export var ACTION_SUBJECT_ID = /*#__PURE__*/function (ACTION_SUBJECT_ID) {
|
|
285
287
|
ACTION_SUBJECT_ID["ACTION"] = "action";
|
|
288
|
+
ACTION_SUBJECT_ID["ACTIVITY"] = "activity";
|
|
286
289
|
ACTION_SUBJECT_ID["AI_DEFINITIONS_DEFINE_BUTTON"] = "aiDefinitionsDefineButton";
|
|
287
290
|
ACTION_SUBJECT_ID["AI_DEFINITIONS_AUTO_HIGHLIGHT"] = "aiDefinitionsAutoHighlight";
|
|
288
291
|
ACTION_SUBJECT_ID["AI_PANELS_BODIED_EXTENSION"] = "aiPanelsBodiedExtension";
|
|
289
292
|
ACTION_SUBJECT_ID["AI_PROMPT_LINK_PICKER_BUTTON"] = "aiPromptLinkPickerButton";
|
|
290
293
|
ACTION_SUBJECT_ID["AI_PROMPT_MENTION_BUTTON"] = "aiPromptMentionButton";
|
|
294
|
+
ACTION_SUBJECT_ID["AI_PROACTIVE_FEEDBACK_DIALOG"] = "aiProactiveFeedbackDialog";
|
|
291
295
|
ACTION_SUBJECT_ID["ALL"] = "all";
|
|
292
296
|
ACTION_SUBJECT_ID["ALT_TEXT"] = "altText";
|
|
293
297
|
ACTION_SUBJECT_ID["ANNOTATE_BUTTON"] = "annotateButton";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { defineMessages } from 'react-intl-next';
|
|
2
|
+
export var aiProactiveMessages = defineMessages({
|
|
3
|
+
loadingIconAltText: {
|
|
4
|
+
id: 'fabric.editor.ai.proactive.loading.iconAltText.non-final',
|
|
5
|
+
defaultMessage: 'Loading icon',
|
|
6
|
+
description: 'Icon alt text of the Loading icon'
|
|
7
|
+
}
|
|
8
|
+
});
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
import { defineMessages } from 'react-intl-next';
|
|
5
5
|
export { aiDefinitionsMessages } from './ai-definitions';
|
|
6
|
+
export { aiProactiveMessages } from './ai-proactive';
|
|
6
7
|
export { alignmentMessages } from './alignment';
|
|
7
8
|
export { annotationMessages } from './annotation';
|
|
8
9
|
export { messages as blockTypeMessages } from './block-type';
|
|
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
7
7
|
import { isFedRamp } from './environment';
|
|
8
8
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
9
9
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
10
|
-
var packageVersion = "99.
|
|
10
|
+
var packageVersion = "99.5.0";
|
|
11
11
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
12
12
|
// Remove URL as it has UGC
|
|
13
13
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -20,7 +20,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
20
20
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
21
21
|
import Layer from '../Layer';
|
|
22
22
|
var packageName = "@atlaskit/editor-common";
|
|
23
|
-
var packageVersion = "99.
|
|
23
|
+
var packageVersion = "99.5.0";
|
|
24
24
|
var halfFocusRing = 1;
|
|
25
25
|
var dropOffset = '0, 8';
|
|
26
26
|
// Ignored via go/ees005
|
|
@@ -15,6 +15,9 @@ export type EditorAnalyticsAPI = {
|
|
|
15
15
|
*
|
|
16
16
|
* @param {AnalyticsEventPayload} payload - analytics payload
|
|
17
17
|
* @param {string} [channel="editor"] - optional channel identifier
|
|
18
|
+
* @param {object} [options] - optional options where immediate is true will fire event immediately
|
|
18
19
|
*/
|
|
19
|
-
fireAnalyticsEvent: (payload: AnalyticsEventPayload, channel?: string
|
|
20
|
+
fireAnalyticsEvent: (payload: AnalyticsEventPayload, channel?: string, options?: {
|
|
21
|
+
immediate?: boolean;
|
|
22
|
+
}) => void | undefined;
|
|
20
23
|
};
|
|
@@ -44,4 +44,5 @@ export type { LinkType } from './linking-utils';
|
|
|
44
44
|
export type { RequestToEditAEP } from './types/general-events';
|
|
45
45
|
export type { AIProactiveEventPayload } from './types/ai-proactive-events';
|
|
46
46
|
export type { AIDefinitionsEventPayload } from './types/ai-definitions-events';
|
|
47
|
-
export type { AIUnifiedEventPayload } from './types/ai-unified-events';
|
|
47
|
+
export type { AIUnifiedEventPayload, AIUnifiedCommonAttributes } from './types/ai-unified-events';
|
|
48
|
+
export type { ActiveSessionEventPayload, ActiveSessionEventAttributes, } from './types/activity-session-events';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID } from './enums';
|
|
2
|
+
import type { TrackAEP } from './utils';
|
|
3
|
+
export type ActiveSessionEventAttributes = {
|
|
4
|
+
efficiency: {
|
|
5
|
+
totalActiveTime: number;
|
|
6
|
+
totalActionCount: number;
|
|
7
|
+
actionByTypeCount?: {
|
|
8
|
+
textInputCount: number;
|
|
9
|
+
nodeInsertionCount: number;
|
|
10
|
+
nodeAttributeChangeCount: number;
|
|
11
|
+
contentMovedCount: number;
|
|
12
|
+
nodeDeletionCount: number;
|
|
13
|
+
undoCount: number;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
effectiveness: {
|
|
17
|
+
undoCount: number;
|
|
18
|
+
repeatedActionCount: number;
|
|
19
|
+
safeInsertCount: number;
|
|
20
|
+
};
|
|
21
|
+
contentSizeChanged: number;
|
|
22
|
+
};
|
|
23
|
+
export type ActiveSessionEventAEP = TrackAEP<ACTION.ENDED, ACTION_SUBJECT.ACTIVITY_SESSION, ACTION_SUBJECT_ID.ACTIVITY, ActiveSessionEventAttributes, undefined>;
|
|
24
|
+
export type ActiveSessionEventPayload = ActiveSessionEventAEP;
|
|
@@ -45,16 +45,8 @@ type AIProactiveApiErrorAEP = OperationalAEP<ACTION.API_ERROR, ACTION_SUBJECT.ED
|
|
|
45
45
|
reason: string;
|
|
46
46
|
statusCode: number;
|
|
47
47
|
}>;
|
|
48
|
-
type
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
aiExperienceName: string;
|
|
53
|
-
proactiveAIGenerated: number;
|
|
54
|
-
userGeneratedAI: number;
|
|
55
|
-
isAIFeature: number;
|
|
56
|
-
aiErrorMessage: string;
|
|
57
|
-
aiErrorCode: number;
|
|
58
|
-
}, undefined>;
|
|
59
|
-
export type AIProactiveEventPayload = AIProactiveApiReceivedAEP | AIProactiveSuggestionDisplayToggledAEP | AIProactiveSuggestionInsertedAEP | AIProactiveSuggestionDismissedAEP | AIProactiveSuggestionFeedbackClickedAEP | AIProactiveSuggestionCopiedAEP | AIProactiveApiPurgedAEP | AIProactiveApiErrorAEP | AIProactiveAIResultErrorAEP;
|
|
48
|
+
type AIProactiveFeedbackFailedAEP = OperationalAEP<ACTION.ERRORED, ACTION_SUBJECT.EDITOR, ACTION_SUBJECT_ID.AI_PROACTIVE_FEEDBACK_DIALOG, {
|
|
49
|
+
errorMessage?: string;
|
|
50
|
+
}>;
|
|
51
|
+
export type AIProactiveEventPayload = AIProactiveApiReceivedAEP | AIProactiveSuggestionDisplayToggledAEP | AIProactiveSuggestionInsertedAEP | AIProactiveSuggestionDismissedAEP | AIProactiveSuggestionFeedbackClickedAEP | AIProactiveSuggestionCopiedAEP | AIProactiveApiPurgedAEP | AIProactiveApiErrorAEP | AIProactiveApiErrorAEP | AIProactiveFeedbackFailedAEP;
|
|
60
52
|
export {};
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID } from './enums';
|
|
6
6
|
import type { TrackAEP } from './utils';
|
|
7
|
-
type
|
|
7
|
+
export type AIUnifiedCommonAttributes = {
|
|
8
8
|
singleInstrumentationID: string;
|
|
9
9
|
aiInteractionID: string;
|
|
10
10
|
aiFeatureName: string;
|
|
@@ -13,21 +13,19 @@ type CommonAttributes = {
|
|
|
13
13
|
isAIFeature: 1;
|
|
14
14
|
aiExperienceName?: string;
|
|
15
15
|
};
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
type AIInteractionInitiatedAEP = TrackAEP<ACTION.INITIATED, ACTION_SUBJECT.AI_INTERACTION, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, AIUnifiedCommonAttributes, undefined>;
|
|
17
|
+
type AIInteractionDismissedAEP = TrackAEP<ACTION.DISMISSED, ACTION_SUBJECT.AI_INTERACTION, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, AIUnifiedCommonAttributes, undefined>;
|
|
18
|
+
type AIResultViewedAEP = TrackAEP<ACTION.VIEWED, ACTION_SUBJECT.AI_RESULT, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, AIUnifiedCommonAttributes, undefined>;
|
|
19
|
+
type AIResultActionedAEP = TrackAEP<ACTION.ACTIONED, ACTION_SUBJECT.AI_RESULT, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, AIUnifiedCommonAttributes & {
|
|
20
20
|
promptType?: string;
|
|
21
21
|
refinementCount?: number;
|
|
22
22
|
aiResultAction: string;
|
|
23
23
|
}, undefined>;
|
|
24
|
-
|
|
24
|
+
type AIResultErrorAEP = TrackAEP<ACTION.ERROR, ACTION_SUBJECT.AI_RESULT, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, AIUnifiedCommonAttributes & {
|
|
25
25
|
aiErrorMessage?: string;
|
|
26
26
|
aiErrorCode?: number;
|
|
27
|
-
aiExperienceName?: string;
|
|
28
27
|
}, undefined>;
|
|
29
|
-
|
|
30
|
-
aiExperienceName?: string;
|
|
28
|
+
type AIFeedbackSubmittedAEP = TrackAEP<ACTION.SUBMITTED, ACTION_SUBJECT.AI_FEEDBACK, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, AIUnifiedCommonAttributes & {
|
|
31
29
|
aiFeedbackResult: 'up' | 'down';
|
|
32
30
|
}, undefined>;
|
|
33
31
|
export type AIUnifiedEventPayload = AIInteractionInitiatedAEP | AIResultViewedAEP | AIResultErrorAEP | AIInteractionDismissedAEP | AIResultActionedAEP | AIFeedbackSubmittedAEP;
|
|
@@ -51,6 +51,7 @@ export declare enum ACTION {
|
|
|
51
51
|
EDITOR_TTI = "tti",
|
|
52
52
|
EDITOR_CONTENT_RETRIEVAL_PERFORMED = "contentRetrievalPerformed",
|
|
53
53
|
RE_RENDERED = "reRendered",
|
|
54
|
+
ENDED = "ended",
|
|
54
55
|
ENTERED = "entered",
|
|
55
56
|
ERROR = "error",
|
|
56
57
|
ERRORED = "errored",
|
|
@@ -132,6 +133,12 @@ export declare enum ACTION {
|
|
|
132
133
|
WITH_PLUGIN_STATE_CALLED = "withPluginStateCalled",
|
|
133
134
|
RENDERED = "rendered",
|
|
134
135
|
ON_EDITOR_READY_CALLBACK = "onEditorReadyCallback",
|
|
136
|
+
/**
|
|
137
|
+
* @private
|
|
138
|
+
* @deprecated
|
|
139
|
+
*
|
|
140
|
+
* This is no longer used and can be removed at a later date
|
|
141
|
+
*/
|
|
135
142
|
ON_CHANGE_CALLBACK = "onChangeCalled",
|
|
136
143
|
NESTED_TABLE_TRANSFORMED = "nestedTableTransformed",
|
|
137
144
|
NEW_COLLAB_SYNC_UP_ERROR_NO_STEPS = "newCollabSyncUpErrorNoSteps",
|
|
@@ -226,6 +233,7 @@ export declare enum ACTION_SUBJECT {
|
|
|
226
233
|
DATE_SEGMENT = "dateSegment",
|
|
227
234
|
DOCUMENT = "document",
|
|
228
235
|
EDITOR = "editor",
|
|
236
|
+
ACTIVITY_SESSION = "activitySession",
|
|
229
237
|
ELEMENT_BROWSER = "elementBrowser",
|
|
230
238
|
EMBEDS = "embeds",
|
|
231
239
|
EXPAND = "expand",
|
|
@@ -285,11 +293,13 @@ export declare enum ACTION_SUBJECT {
|
|
|
285
293
|
}
|
|
286
294
|
export declare enum ACTION_SUBJECT_ID {
|
|
287
295
|
ACTION = "action",
|
|
296
|
+
ACTIVITY = "activity",
|
|
288
297
|
AI_DEFINITIONS_DEFINE_BUTTON = "aiDefinitionsDefineButton",
|
|
289
298
|
AI_DEFINITIONS_AUTO_HIGHLIGHT = "aiDefinitionsAutoHighlight",
|
|
290
299
|
AI_PANELS_BODIED_EXTENSION = "aiPanelsBodiedExtension",
|
|
291
300
|
AI_PROMPT_LINK_PICKER_BUTTON = "aiPromptLinkPickerButton",
|
|
292
301
|
AI_PROMPT_MENTION_BUTTON = "aiPromptMentionButton",
|
|
302
|
+
AI_PROACTIVE_FEEDBACK_DIALOG = "aiProactiveFeedbackDialog",
|
|
293
303
|
ALL = "all",
|
|
294
304
|
ALT_TEXT = "altText",
|
|
295
305
|
ANNOTATE_BUTTON = "annotateButton",
|
|
@@ -3,6 +3,7 @@ import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next/types';
|
|
|
3
3
|
import type { EditorState, PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import type { NewCollabSyncUpErrorAttributes } from '../../collab';
|
|
5
5
|
import type { UnsupportedContentPayload, UnsupportedContentTooltipPayload, UserBrowserExtensionResults } from '../../utils';
|
|
6
|
+
import type { ActiveSessionEventPayload } from './activity-session-events';
|
|
6
7
|
import { type AICommandPaletteEventPayload } from './ai-command-palette-events';
|
|
7
8
|
import { type AIDefinitionsEventPayload } from './ai-definitions-events';
|
|
8
9
|
import { type AIProactiveEventPayload } from './ai-proactive-events';
|
|
@@ -52,7 +53,7 @@ export type SimplifiedNode = {
|
|
|
52
53
|
marks?: string[];
|
|
53
54
|
content?: SimplifiedNode[];
|
|
54
55
|
};
|
|
55
|
-
export type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MoveContentEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | CutCopyEventPayload | ErrorEventPayload | ExperimentalEventPayload | FindReplaceEventPayload | DateEventPayload | SelectionEventPayload | ListEventPayload | ConfigPanelEventPayload | ElementBrowserEventPayload | CreateLinkInlineDialogEventPayload | HighlightActionsEventPayload | UnsupportedContentPayload | ExtensionEventPayload | TransactionEventPayload | TypeAheadPayload | UnlinkToolbarAEP | EditLinkToolbarAEP | OpenSettingsToolbarAEP | CustomPanelEventPayload | FeatureExposureAEP | NewCollabSyncUpErrorAEP | UnsupportedContentTooltipPayload | ReferentialityEventPayload | LoomEventPayload | MBEEventPayload | HighlightEventPayload | DatasourceClickedPayload | ElementEventPayload | ContextMenuEventPayload | VisitedLinkAEP | ViewEventPayload | MediaUploadEventPayload | MentionEventPayload | EngagementPlatformEventPayload | NestedTableActionsEventPayload | AICommandPaletteEventPayload | AIDefinitionsEventPayload | AIProactiveEventPayload | AIUnifiedEventPayload | BreakoutEventPayload;
|
|
56
|
+
export type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MoveContentEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | CutCopyEventPayload | ErrorEventPayload | ExperimentalEventPayload | FindReplaceEventPayload | DateEventPayload | SelectionEventPayload | ListEventPayload | ConfigPanelEventPayload | ElementBrowserEventPayload | CreateLinkInlineDialogEventPayload | HighlightActionsEventPayload | UnsupportedContentPayload | ExtensionEventPayload | TransactionEventPayload | TypeAheadPayload | UnlinkToolbarAEP | EditLinkToolbarAEP | OpenSettingsToolbarAEP | CustomPanelEventPayload | FeatureExposureAEP | NewCollabSyncUpErrorAEP | UnsupportedContentTooltipPayload | ReferentialityEventPayload | LoomEventPayload | MBEEventPayload | HighlightEventPayload | DatasourceClickedPayload | ElementEventPayload | ContextMenuEventPayload | VisitedLinkAEP | ViewEventPayload | MediaUploadEventPayload | MentionEventPayload | EngagementPlatformEventPayload | NestedTableActionsEventPayload | AICommandPaletteEventPayload | AIDefinitionsEventPayload | AIProactiveEventPayload | AIUnifiedEventPayload | BreakoutEventPayload | ActiveSessionEventPayload;
|
|
56
57
|
type CustomPanelEventPayload = TrackAEP<ACTION.CHANGED_BACKGROUND_COLOR | ACTION.CHANGED_ICON | ACTION.REMOVE_ICON, ACTION_SUBJECT.PANEL, ACTION_SUBJECT_ID.PANEL, {
|
|
57
58
|
previousColor: string;
|
|
58
59
|
newColor: string;
|
|
@@ -146,7 +147,9 @@ type SmartLinkErrorAEP = OperationalAEP<ACTION.ERRORED, ACTION_SUBJECT.SMART_LIN
|
|
|
146
147
|
export type ErrorEventPayload = InvalidTransactionErrorAEP | InvalidTransactionStepErrorAEP | FailedToUnmountErrorAEP | SynchronyErrorAEP | InvalidDocumentEncounteredAEP | SynchronyEntityErrorAEP | ContentComponentErrorAEP | PickerErrorAEP | ComponentCrashErrorAEP | ComponentCrashAdditionalInfoErrorAEP | SmartLinkErrorAEP;
|
|
147
148
|
export type AnalyticsEventPayloadCallback = (state: EditorState) => AnalyticsEventPayload | undefined;
|
|
148
149
|
export type FireAnalyticsCallback = <T>(payload: FireAnalyticsEventPayload<T>) => void | undefined;
|
|
149
|
-
export type FireAnalyticsEvent = (createAnalyticsEvent?: CreateUIAnalyticsEvent
|
|
150
|
+
export type FireAnalyticsEvent = (createAnalyticsEvent?: CreateUIAnalyticsEvent, options?: {
|
|
151
|
+
immediate?: boolean;
|
|
152
|
+
}) => FireAnalyticsCallback;
|
|
150
153
|
export type FireAnalyticsEventPayload<T = void> = {
|
|
151
154
|
payload: AnalyticsEventPayload<T>;
|
|
152
155
|
channel?: string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { aiDefinitionsMessages } from './ai-definitions';
|
|
2
|
+
export { aiProactiveMessages } from './ai-proactive';
|
|
2
3
|
export { alignmentMessages } from './alignment';
|
|
3
4
|
export { annotationMessages } from './annotation';
|
|
4
5
|
export { messages as blockTypeMessages } from './block-type';
|
|
@@ -222,14 +222,6 @@ export type FeatureFlags = {
|
|
|
222
222
|
* @default false
|
|
223
223
|
*/
|
|
224
224
|
commentsOnMediaAnalytics?: boolean;
|
|
225
|
-
/**
|
|
226
|
-
* @description
|
|
227
|
-
* Enables block elements drag and drop
|
|
228
|
-
*
|
|
229
|
-
* @see https://product-fabric.atlassian.net/browse/ED-22939
|
|
230
|
-
* @default false
|
|
231
|
-
*/
|
|
232
|
-
elementDragAndDrop?: boolean;
|
|
233
225
|
/**
|
|
234
226
|
* @description
|
|
235
227
|
* Enables fix for comment sidebar is not scrolled into view when adding/viewing a comment on media
|
|
@@ -15,6 +15,9 @@ export type EditorAnalyticsAPI = {
|
|
|
15
15
|
*
|
|
16
16
|
* @param {AnalyticsEventPayload} payload - analytics payload
|
|
17
17
|
* @param {string} [channel="editor"] - optional channel identifier
|
|
18
|
+
* @param {object} [options] - optional options where immediate is true will fire event immediately
|
|
18
19
|
*/
|
|
19
|
-
fireAnalyticsEvent: (payload: AnalyticsEventPayload, channel?: string
|
|
20
|
+
fireAnalyticsEvent: (payload: AnalyticsEventPayload, channel?: string, options?: {
|
|
21
|
+
immediate?: boolean;
|
|
22
|
+
}) => void | undefined;
|
|
20
23
|
};
|
|
@@ -44,4 +44,5 @@ export type { LinkType } from './linking-utils';
|
|
|
44
44
|
export type { RequestToEditAEP } from './types/general-events';
|
|
45
45
|
export type { AIProactiveEventPayload } from './types/ai-proactive-events';
|
|
46
46
|
export type { AIDefinitionsEventPayload } from './types/ai-definitions-events';
|
|
47
|
-
export type { AIUnifiedEventPayload } from './types/ai-unified-events';
|
|
47
|
+
export type { AIUnifiedEventPayload, AIUnifiedCommonAttributes } from './types/ai-unified-events';
|
|
48
|
+
export type { ActiveSessionEventPayload, ActiveSessionEventAttributes, } from './types/activity-session-events';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID } from './enums';
|
|
2
|
+
import type { TrackAEP } from './utils';
|
|
3
|
+
export type ActiveSessionEventAttributes = {
|
|
4
|
+
efficiency: {
|
|
5
|
+
totalActiveTime: number;
|
|
6
|
+
totalActionCount: number;
|
|
7
|
+
actionByTypeCount?: {
|
|
8
|
+
textInputCount: number;
|
|
9
|
+
nodeInsertionCount: number;
|
|
10
|
+
nodeAttributeChangeCount: number;
|
|
11
|
+
contentMovedCount: number;
|
|
12
|
+
nodeDeletionCount: number;
|
|
13
|
+
undoCount: number;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
effectiveness: {
|
|
17
|
+
undoCount: number;
|
|
18
|
+
repeatedActionCount: number;
|
|
19
|
+
safeInsertCount: number;
|
|
20
|
+
};
|
|
21
|
+
contentSizeChanged: number;
|
|
22
|
+
};
|
|
23
|
+
export type ActiveSessionEventAEP = TrackAEP<ACTION.ENDED, ACTION_SUBJECT.ACTIVITY_SESSION, ACTION_SUBJECT_ID.ACTIVITY, ActiveSessionEventAttributes, undefined>;
|
|
24
|
+
export type ActiveSessionEventPayload = ActiveSessionEventAEP;
|
|
@@ -45,16 +45,8 @@ type AIProactiveApiErrorAEP = OperationalAEP<ACTION.API_ERROR, ACTION_SUBJECT.ED
|
|
|
45
45
|
reason: string;
|
|
46
46
|
statusCode: number;
|
|
47
47
|
}>;
|
|
48
|
-
type
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
aiExperienceName: string;
|
|
53
|
-
proactiveAIGenerated: number;
|
|
54
|
-
userGeneratedAI: number;
|
|
55
|
-
isAIFeature: number;
|
|
56
|
-
aiErrorMessage: string;
|
|
57
|
-
aiErrorCode: number;
|
|
58
|
-
}, undefined>;
|
|
59
|
-
export type AIProactiveEventPayload = AIProactiveApiReceivedAEP | AIProactiveSuggestionDisplayToggledAEP | AIProactiveSuggestionInsertedAEP | AIProactiveSuggestionDismissedAEP | AIProactiveSuggestionFeedbackClickedAEP | AIProactiveSuggestionCopiedAEP | AIProactiveApiPurgedAEP | AIProactiveApiErrorAEP | AIProactiveAIResultErrorAEP;
|
|
48
|
+
type AIProactiveFeedbackFailedAEP = OperationalAEP<ACTION.ERRORED, ACTION_SUBJECT.EDITOR, ACTION_SUBJECT_ID.AI_PROACTIVE_FEEDBACK_DIALOG, {
|
|
49
|
+
errorMessage?: string;
|
|
50
|
+
}>;
|
|
51
|
+
export type AIProactiveEventPayload = AIProactiveApiReceivedAEP | AIProactiveSuggestionDisplayToggledAEP | AIProactiveSuggestionInsertedAEP | AIProactiveSuggestionDismissedAEP | AIProactiveSuggestionFeedbackClickedAEP | AIProactiveSuggestionCopiedAEP | AIProactiveApiPurgedAEP | AIProactiveApiErrorAEP | AIProactiveApiErrorAEP | AIProactiveFeedbackFailedAEP;
|
|
60
52
|
export {};
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID } from './enums';
|
|
6
6
|
import type { TrackAEP } from './utils';
|
|
7
|
-
type
|
|
7
|
+
export type AIUnifiedCommonAttributes = {
|
|
8
8
|
singleInstrumentationID: string;
|
|
9
9
|
aiInteractionID: string;
|
|
10
10
|
aiFeatureName: string;
|
|
@@ -13,21 +13,19 @@ type CommonAttributes = {
|
|
|
13
13
|
isAIFeature: 1;
|
|
14
14
|
aiExperienceName?: string;
|
|
15
15
|
};
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
type AIInteractionInitiatedAEP = TrackAEP<ACTION.INITIATED, ACTION_SUBJECT.AI_INTERACTION, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, AIUnifiedCommonAttributes, undefined>;
|
|
17
|
+
type AIInteractionDismissedAEP = TrackAEP<ACTION.DISMISSED, ACTION_SUBJECT.AI_INTERACTION, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, AIUnifiedCommonAttributes, undefined>;
|
|
18
|
+
type AIResultViewedAEP = TrackAEP<ACTION.VIEWED, ACTION_SUBJECT.AI_RESULT, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, AIUnifiedCommonAttributes, undefined>;
|
|
19
|
+
type AIResultActionedAEP = TrackAEP<ACTION.ACTIONED, ACTION_SUBJECT.AI_RESULT, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, AIUnifiedCommonAttributes & {
|
|
20
20
|
promptType?: string;
|
|
21
21
|
refinementCount?: number;
|
|
22
22
|
aiResultAction: string;
|
|
23
23
|
}, undefined>;
|
|
24
|
-
|
|
24
|
+
type AIResultErrorAEP = TrackAEP<ACTION.ERROR, ACTION_SUBJECT.AI_RESULT, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, AIUnifiedCommonAttributes & {
|
|
25
25
|
aiErrorMessage?: string;
|
|
26
26
|
aiErrorCode?: number;
|
|
27
|
-
aiExperienceName?: string;
|
|
28
27
|
}, undefined>;
|
|
29
|
-
|
|
30
|
-
aiExperienceName?: string;
|
|
28
|
+
type AIFeedbackSubmittedAEP = TrackAEP<ACTION.SUBMITTED, ACTION_SUBJECT.AI_FEEDBACK, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, AIUnifiedCommonAttributes & {
|
|
31
29
|
aiFeedbackResult: 'up' | 'down';
|
|
32
30
|
}, undefined>;
|
|
33
31
|
export type AIUnifiedEventPayload = AIInteractionInitiatedAEP | AIResultViewedAEP | AIResultErrorAEP | AIInteractionDismissedAEP | AIResultActionedAEP | AIFeedbackSubmittedAEP;
|
|
@@ -51,6 +51,7 @@ export declare enum ACTION {
|
|
|
51
51
|
EDITOR_TTI = "tti",
|
|
52
52
|
EDITOR_CONTENT_RETRIEVAL_PERFORMED = "contentRetrievalPerformed",
|
|
53
53
|
RE_RENDERED = "reRendered",
|
|
54
|
+
ENDED = "ended",
|
|
54
55
|
ENTERED = "entered",
|
|
55
56
|
ERROR = "error",
|
|
56
57
|
ERRORED = "errored",
|
|
@@ -132,6 +133,12 @@ export declare enum ACTION {
|
|
|
132
133
|
WITH_PLUGIN_STATE_CALLED = "withPluginStateCalled",
|
|
133
134
|
RENDERED = "rendered",
|
|
134
135
|
ON_EDITOR_READY_CALLBACK = "onEditorReadyCallback",
|
|
136
|
+
/**
|
|
137
|
+
* @private
|
|
138
|
+
* @deprecated
|
|
139
|
+
*
|
|
140
|
+
* This is no longer used and can be removed at a later date
|
|
141
|
+
*/
|
|
135
142
|
ON_CHANGE_CALLBACK = "onChangeCalled",
|
|
136
143
|
NESTED_TABLE_TRANSFORMED = "nestedTableTransformed",
|
|
137
144
|
NEW_COLLAB_SYNC_UP_ERROR_NO_STEPS = "newCollabSyncUpErrorNoSteps",
|
|
@@ -226,6 +233,7 @@ export declare enum ACTION_SUBJECT {
|
|
|
226
233
|
DATE_SEGMENT = "dateSegment",
|
|
227
234
|
DOCUMENT = "document",
|
|
228
235
|
EDITOR = "editor",
|
|
236
|
+
ACTIVITY_SESSION = "activitySession",
|
|
229
237
|
ELEMENT_BROWSER = "elementBrowser",
|
|
230
238
|
EMBEDS = "embeds",
|
|
231
239
|
EXPAND = "expand",
|
|
@@ -285,11 +293,13 @@ export declare enum ACTION_SUBJECT {
|
|
|
285
293
|
}
|
|
286
294
|
export declare enum ACTION_SUBJECT_ID {
|
|
287
295
|
ACTION = "action",
|
|
296
|
+
ACTIVITY = "activity",
|
|
288
297
|
AI_DEFINITIONS_DEFINE_BUTTON = "aiDefinitionsDefineButton",
|
|
289
298
|
AI_DEFINITIONS_AUTO_HIGHLIGHT = "aiDefinitionsAutoHighlight",
|
|
290
299
|
AI_PANELS_BODIED_EXTENSION = "aiPanelsBodiedExtension",
|
|
291
300
|
AI_PROMPT_LINK_PICKER_BUTTON = "aiPromptLinkPickerButton",
|
|
292
301
|
AI_PROMPT_MENTION_BUTTON = "aiPromptMentionButton",
|
|
302
|
+
AI_PROACTIVE_FEEDBACK_DIALOG = "aiProactiveFeedbackDialog",
|
|
293
303
|
ALL = "all",
|
|
294
304
|
ALT_TEXT = "altText",
|
|
295
305
|
ANNOTATE_BUTTON = "annotateButton",
|
|
@@ -3,6 +3,7 @@ import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next/types';
|
|
|
3
3
|
import type { EditorState, PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import type { NewCollabSyncUpErrorAttributes } from '../../collab';
|
|
5
5
|
import type { UnsupportedContentPayload, UnsupportedContentTooltipPayload, UserBrowserExtensionResults } from '../../utils';
|
|
6
|
+
import type { ActiveSessionEventPayload } from './activity-session-events';
|
|
6
7
|
import { type AICommandPaletteEventPayload } from './ai-command-palette-events';
|
|
7
8
|
import { type AIDefinitionsEventPayload } from './ai-definitions-events';
|
|
8
9
|
import { type AIProactiveEventPayload } from './ai-proactive-events';
|
|
@@ -52,7 +53,7 @@ export type SimplifiedNode = {
|
|
|
52
53
|
marks?: string[];
|
|
53
54
|
content?: SimplifiedNode[];
|
|
54
55
|
};
|
|
55
|
-
export type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MoveContentEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | CutCopyEventPayload | ErrorEventPayload | ExperimentalEventPayload | FindReplaceEventPayload | DateEventPayload | SelectionEventPayload | ListEventPayload | ConfigPanelEventPayload | ElementBrowserEventPayload | CreateLinkInlineDialogEventPayload | HighlightActionsEventPayload | UnsupportedContentPayload | ExtensionEventPayload | TransactionEventPayload | TypeAheadPayload | UnlinkToolbarAEP | EditLinkToolbarAEP | OpenSettingsToolbarAEP | CustomPanelEventPayload | FeatureExposureAEP | NewCollabSyncUpErrorAEP | UnsupportedContentTooltipPayload | ReferentialityEventPayload | LoomEventPayload | MBEEventPayload | HighlightEventPayload | DatasourceClickedPayload | ElementEventPayload | ContextMenuEventPayload | VisitedLinkAEP | ViewEventPayload | MediaUploadEventPayload | MentionEventPayload | EngagementPlatformEventPayload | NestedTableActionsEventPayload | AICommandPaletteEventPayload | AIDefinitionsEventPayload | AIProactiveEventPayload | AIUnifiedEventPayload | BreakoutEventPayload;
|
|
56
|
+
export type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MoveContentEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | CutCopyEventPayload | ErrorEventPayload | ExperimentalEventPayload | FindReplaceEventPayload | DateEventPayload | SelectionEventPayload | ListEventPayload | ConfigPanelEventPayload | ElementBrowserEventPayload | CreateLinkInlineDialogEventPayload | HighlightActionsEventPayload | UnsupportedContentPayload | ExtensionEventPayload | TransactionEventPayload | TypeAheadPayload | UnlinkToolbarAEP | EditLinkToolbarAEP | OpenSettingsToolbarAEP | CustomPanelEventPayload | FeatureExposureAEP | NewCollabSyncUpErrorAEP | UnsupportedContentTooltipPayload | ReferentialityEventPayload | LoomEventPayload | MBEEventPayload | HighlightEventPayload | DatasourceClickedPayload | ElementEventPayload | ContextMenuEventPayload | VisitedLinkAEP | ViewEventPayload | MediaUploadEventPayload | MentionEventPayload | EngagementPlatformEventPayload | NestedTableActionsEventPayload | AICommandPaletteEventPayload | AIDefinitionsEventPayload | AIProactiveEventPayload | AIUnifiedEventPayload | BreakoutEventPayload | ActiveSessionEventPayload;
|
|
56
57
|
type CustomPanelEventPayload = TrackAEP<ACTION.CHANGED_BACKGROUND_COLOR | ACTION.CHANGED_ICON | ACTION.REMOVE_ICON, ACTION_SUBJECT.PANEL, ACTION_SUBJECT_ID.PANEL, {
|
|
57
58
|
previousColor: string;
|
|
58
59
|
newColor: string;
|
|
@@ -146,7 +147,9 @@ type SmartLinkErrorAEP = OperationalAEP<ACTION.ERRORED, ACTION_SUBJECT.SMART_LIN
|
|
|
146
147
|
export type ErrorEventPayload = InvalidTransactionErrorAEP | InvalidTransactionStepErrorAEP | FailedToUnmountErrorAEP | SynchronyErrorAEP | InvalidDocumentEncounteredAEP | SynchronyEntityErrorAEP | ContentComponentErrorAEP | PickerErrorAEP | ComponentCrashErrorAEP | ComponentCrashAdditionalInfoErrorAEP | SmartLinkErrorAEP;
|
|
147
148
|
export type AnalyticsEventPayloadCallback = (state: EditorState) => AnalyticsEventPayload | undefined;
|
|
148
149
|
export type FireAnalyticsCallback = <T>(payload: FireAnalyticsEventPayload<T>) => void | undefined;
|
|
149
|
-
export type FireAnalyticsEvent = (createAnalyticsEvent?: CreateUIAnalyticsEvent
|
|
150
|
+
export type FireAnalyticsEvent = (createAnalyticsEvent?: CreateUIAnalyticsEvent, options?: {
|
|
151
|
+
immediate?: boolean;
|
|
152
|
+
}) => FireAnalyticsCallback;
|
|
150
153
|
export type FireAnalyticsEventPayload<T = void> = {
|
|
151
154
|
payload: AnalyticsEventPayload<T>;
|
|
152
155
|
channel?: string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { aiDefinitionsMessages } from './ai-definitions';
|
|
2
|
+
export { aiProactiveMessages } from './ai-proactive';
|
|
2
3
|
export { alignmentMessages } from './alignment';
|
|
3
4
|
export { annotationMessages } from './annotation';
|
|
4
5
|
export { messages as blockTypeMessages } from './block-type';
|
|
@@ -222,14 +222,6 @@ export type FeatureFlags = {
|
|
|
222
222
|
* @default false
|
|
223
223
|
*/
|
|
224
224
|
commentsOnMediaAnalytics?: boolean;
|
|
225
|
-
/**
|
|
226
|
-
* @description
|
|
227
|
-
* Enables block elements drag and drop
|
|
228
|
-
*
|
|
229
|
-
* @see https://product-fabric.atlassian.net/browse/ED-22939
|
|
230
|
-
* @default false
|
|
231
|
-
*/
|
|
232
|
-
elementDragAndDrop?: boolean;
|
|
233
225
|
/**
|
|
234
226
|
* @description
|
|
235
227
|
* Enables fix for comment sidebar is not scrolled into view when adding/viewing a comment on media
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "99.
|
|
3
|
+
"version": "99.5.0",
|
|
4
4
|
"description": "A package that contains common classes and components for editor and renderer",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
"@atlaskit/code": "^15.6.0",
|
|
124
124
|
"@atlaskit/codemod-utils": "^4.2.0",
|
|
125
125
|
"@atlaskit/custom-steps": "^0.9.0",
|
|
126
|
-
"@atlaskit/dropdown-menu": "^12.
|
|
126
|
+
"@atlaskit/dropdown-menu": "^12.25.0",
|
|
127
127
|
"@atlaskit/editor-json-transformer": "^8.21.0",
|
|
128
128
|
"@atlaskit/editor-palette": "1.6.4",
|
|
129
129
|
"@atlaskit/editor-prosemirror": "6.2.1",
|
|
@@ -132,16 +132,16 @@
|
|
|
132
132
|
"@atlaskit/emoji": "^67.12.0",
|
|
133
133
|
"@atlaskit/icon": "^23.4.0",
|
|
134
134
|
"@atlaskit/icon-object": "^6.9.0",
|
|
135
|
-
"@atlaskit/link-datasource": "^3.
|
|
135
|
+
"@atlaskit/link-datasource": "^3.16.0",
|
|
136
136
|
"@atlaskit/link-picker": "^1.47.0",
|
|
137
137
|
"@atlaskit/media-card": "^78.18.0",
|
|
138
|
-
"@atlaskit/media-client": "^
|
|
138
|
+
"@atlaskit/media-client": "^31.0.0",
|
|
139
139
|
"@atlaskit/media-client-react": "^2.6.0",
|
|
140
140
|
"@atlaskit/media-common": "^11.7.0",
|
|
141
141
|
"@atlaskit/media-file-preview": "^0.9.0",
|
|
142
142
|
"@atlaskit/media-picker": "^67.0.0",
|
|
143
143
|
"@atlaskit/media-ui": "^27.3.0",
|
|
144
|
-
"@atlaskit/media-viewer": "49.6.
|
|
144
|
+
"@atlaskit/media-viewer": "49.6.3",
|
|
145
145
|
"@atlaskit/mention": "^23.9.0",
|
|
146
146
|
"@atlaskit/menu": "^2.13.0",
|
|
147
147
|
"@atlaskit/onboarding": "^12.2.0",
|
|
@@ -150,13 +150,13 @@
|
|
|
150
150
|
"@atlaskit/primitives": "^13.3.0",
|
|
151
151
|
"@atlaskit/profilecard": "^21.1.0",
|
|
152
152
|
"@atlaskit/section-message": "^6.8.0",
|
|
153
|
-
"@atlaskit/smart-card": "^34.
|
|
153
|
+
"@atlaskit/smart-card": "^34.6.0",
|
|
154
154
|
"@atlaskit/smart-user-picker": "^6.11.0",
|
|
155
155
|
"@atlaskit/spinner": "^16.3.0",
|
|
156
156
|
"@atlaskit/task-decision": "^17.11.0",
|
|
157
157
|
"@atlaskit/textfield": "^6.7.0",
|
|
158
|
-
"@atlaskit/tmp-editor-statsig": "^2.
|
|
159
|
-
"@atlaskit/tokens": "^3.
|
|
158
|
+
"@atlaskit/tmp-editor-statsig": "^2.39.0",
|
|
159
|
+
"@atlaskit/tokens": "^3.2.0",
|
|
160
160
|
"@atlaskit/tooltip": "^19.0.0",
|
|
161
161
|
"@atlaskit/width-detector": "^4.3.0",
|
|
162
162
|
"@babel/runtime": "^7.0.0",
|