@atlaskit/editor-common 99.3.5 → 99.4.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 +17 -0
- package/dist/cjs/analytics/types/ai-unified-events.js +5 -0
- package/dist/cjs/analytics/types/enums.js +1 -0
- package/dist/cjs/media-inline/media-inline-image-card.js +3 -1
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/utils/median.js +15 -0
- package/dist/es2019/analytics/types/ai-unified-events.js +1 -0
- package/dist/es2019/analytics/types/enums.js +1 -0
- package/dist/es2019/media-inline/media-inline-image-card.js +3 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/utils/median.js +5 -0
- package/dist/esm/analytics/types/ai-unified-events.js +1 -0
- package/dist/esm/analytics/types/enums.js +1 -0
- package/dist/esm/media-inline/media-inline-image-card.js +3 -1
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/utils/median.js +8 -0
- package/dist/types/analytics/index.d.ts +1 -0
- package/dist/types/analytics/types/ai-unified-events.d.ts +34 -0
- package/dist/types/analytics/types/enums.d.ts +1 -0
- package/dist/types/analytics/types/events.d.ts +2 -1
- package/dist/types/utils/median.d.ts +1 -0
- package/dist/types-ts4.5/analytics/index.d.ts +1 -0
- package/dist/types-ts4.5/analytics/types/ai-unified-events.d.ts +34 -0
- package/dist/types-ts4.5/analytics/types/enums.d.ts +1 -0
- package/dist/types-ts4.5/analytics/types/events.d.ts +2 -1
- package/dist/types-ts4.5/utils/median.d.ts +1 -0
- package/median/package.json +15 -0
- package/package.json +7 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 99.4.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#102527](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/102527)
|
|
8
|
+
[`a36b902aac28b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a36b902aac28b) -
|
|
9
|
+
Updated Inline Image error handling
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 99.4.0
|
|
13
|
+
|
|
14
|
+
### Minor Changes
|
|
15
|
+
|
|
16
|
+
- [#103786](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/103786)
|
|
17
|
+
[`0fa650275b900`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/0fa650275b900) -
|
|
18
|
+
EDF-2197: Add common utils from editor-plugin-ai to relevant packages.
|
|
19
|
+
|
|
3
20
|
## 99.3.5
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -103,6 +103,7 @@ var ACTION = exports.ACTION = /*#__PURE__*/function (ACTION) {
|
|
|
103
103
|
ACTION["SLOW_INPUT"] = "slowInput";
|
|
104
104
|
ACTION["STARTED"] = "started";
|
|
105
105
|
ACTION["STOPPED"] = "stopped";
|
|
106
|
+
ACTION["SUBMITTED"] = "submitted";
|
|
106
107
|
ACTION["SUBSTITUTED"] = "autoSubstituted";
|
|
107
108
|
ACTION["SYNCHRONY_DISCONNECTED"] = "synchronyDisconnected";
|
|
108
109
|
ACTION["SYNCHRONY_ENTITY_ERROR"] = "synchronyEntityError";
|
|
@@ -126,7 +126,9 @@ var MediaInlineImageCardInternal = exports.MediaInlineImageCardInternal = functi
|
|
|
126
126
|
message: formatMessage(_mediaInlineCard.messages.unableToLoadContent)
|
|
127
127
|
});
|
|
128
128
|
} else if (!fileState.name) {
|
|
129
|
-
fireFailedOperationalEvent(new _mediaCard.MediaCardError('metadata-fetch', new _mediaClient.FileFetcherError('emptyFileName',
|
|
129
|
+
fireFailedOperationalEvent(new _mediaCard.MediaCardError('metadata-fetch', new _mediaClient.FileFetcherError('emptyFileName', {
|
|
130
|
+
id: fileState.id
|
|
131
|
+
})));
|
|
130
132
|
return (0, _react2.jsx)(_errorView.InlineImageCardErrorView, {
|
|
131
133
|
message: formatMessage(_mediaInlineCard.messages.unableToLoadContent)
|
|
132
134
|
});
|
|
@@ -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.4.1";
|
|
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.4.1";
|
|
27
27
|
var halfFocusRing = 1;
|
|
28
28
|
var dropOffset = '0, 8';
|
|
29
29
|
// Ignored via go/ees005
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.median = median;
|
|
8
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
9
|
+
function median(array) {
|
|
10
|
+
var middle = Math.floor(array.length / 2);
|
|
11
|
+
var sortedArray = (0, _toConsumableArray2.default)(array).sort(function (a, b) {
|
|
12
|
+
return a - b;
|
|
13
|
+
});
|
|
14
|
+
return array.length % 2 !== 0 ? sortedArray[middle] : (sortedArray[middle - 1] + sortedArray[middle]) / 2;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -97,6 +97,7 @@ export let ACTION = /*#__PURE__*/function (ACTION) {
|
|
|
97
97
|
ACTION["SLOW_INPUT"] = "slowInput";
|
|
98
98
|
ACTION["STARTED"] = "started";
|
|
99
99
|
ACTION["STOPPED"] = "stopped";
|
|
100
|
+
ACTION["SUBMITTED"] = "submitted";
|
|
100
101
|
ACTION["SUBSTITUTED"] = "autoSubstituted";
|
|
101
102
|
ACTION["SYNCHRONY_DISCONNECTED"] = "synchronyDisconnected";
|
|
102
103
|
ACTION["SYNCHRONY_ENTITY_ERROR"] = "synchronyEntityError";
|
|
@@ -104,7 +104,9 @@ export const MediaInlineImageCardInternal = ({
|
|
|
104
104
|
message: formatMessage(messages.unableToLoadContent)
|
|
105
105
|
});
|
|
106
106
|
} else if (!fileState.name) {
|
|
107
|
-
fireFailedOperationalEvent(new MediaCardError('metadata-fetch', new FileFetcherError('emptyFileName',
|
|
107
|
+
fireFailedOperationalEvent(new MediaCardError('metadata-fetch', new FileFetcherError('emptyFileName', {
|
|
108
|
+
id: fileState.id
|
|
109
|
+
})));
|
|
108
110
|
return jsx(InlineImageCardErrorView, {
|
|
109
111
|
message: formatMessage(messages.unableToLoadContent)
|
|
110
112
|
});
|
|
@@ -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.4.1";
|
|
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.4.1";
|
|
17
17
|
const halfFocusRing = 1;
|
|
18
18
|
const dropOffset = '0, 8';
|
|
19
19
|
// Ignored via go/ees005
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -97,6 +97,7 @@ export var ACTION = /*#__PURE__*/function (ACTION) {
|
|
|
97
97
|
ACTION["SLOW_INPUT"] = "slowInput";
|
|
98
98
|
ACTION["STARTED"] = "started";
|
|
99
99
|
ACTION["STOPPED"] = "stopped";
|
|
100
|
+
ACTION["SUBMITTED"] = "submitted";
|
|
100
101
|
ACTION["SUBSTITUTED"] = "autoSubstituted";
|
|
101
102
|
ACTION["SYNCHRONY_DISCONNECTED"] = "synchronyDisconnected";
|
|
102
103
|
ACTION["SYNCHRONY_ENTITY_ERROR"] = "synchronyEntityError";
|
|
@@ -122,7 +122,9 @@ export var MediaInlineImageCardInternal = function MediaInlineImageCardInternal(
|
|
|
122
122
|
message: formatMessage(messages.unableToLoadContent)
|
|
123
123
|
});
|
|
124
124
|
} else if (!fileState.name) {
|
|
125
|
-
fireFailedOperationalEvent(new MediaCardError('metadata-fetch', new FileFetcherError('emptyFileName',
|
|
125
|
+
fireFailedOperationalEvent(new MediaCardError('metadata-fetch', new FileFetcherError('emptyFileName', {
|
|
126
|
+
id: fileState.id
|
|
127
|
+
})));
|
|
126
128
|
return jsx(InlineImageCardErrorView, {
|
|
127
129
|
message: formatMessage(messages.unableToLoadContent)
|
|
128
130
|
});
|
|
@@ -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.4.1";
|
|
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.4.1";
|
|
24
24
|
var halfFocusRing = 1;
|
|
25
25
|
var dropOffset = '0, 8';
|
|
26
26
|
// Ignored via go/ees005
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
|
+
export function median(array) {
|
|
3
|
+
var middle = Math.floor(array.length / 2);
|
|
4
|
+
var sortedArray = _toConsumableArray(array).sort(function (a, b) {
|
|
5
|
+
return a - b;
|
|
6
|
+
});
|
|
7
|
+
return array.length % 2 !== 0 ? sortedArray[middle] : (sortedArray[middle - 1] + sortedArray[middle]) / 2;
|
|
8
|
+
}
|
|
@@ -44,3 +44,4 @@ 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';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unified events are used to measure the MAU of AI features globally
|
|
3
|
+
* https://hello.atlassian.net/wiki/spaces/AAI/pages/3770721410/Unified+Event+Instrumentation+For+AI+Features
|
|
4
|
+
*/
|
|
5
|
+
import type { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID } from './enums';
|
|
6
|
+
import type { TrackAEP } from './utils';
|
|
7
|
+
type CommonAttributes = {
|
|
8
|
+
singleInstrumentationID: string;
|
|
9
|
+
aiInteractionID: string;
|
|
10
|
+
aiFeatureName: string;
|
|
11
|
+
proactiveAIGenerated: 0 | 1;
|
|
12
|
+
userGeneratedAI: 0 | 1;
|
|
13
|
+
isAIFeature: 1;
|
|
14
|
+
aiExperienceName?: string;
|
|
15
|
+
};
|
|
16
|
+
export type AIInteractionInitiatedAEP = TrackAEP<ACTION.INITIATED, ACTION_SUBJECT.AI_INTERACTION, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, CommonAttributes, undefined>;
|
|
17
|
+
export type AIInteractionDismissedAEP = TrackAEP<ACTION.DISMISSED, ACTION_SUBJECT.AI_INTERACTION, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, CommonAttributes, undefined>;
|
|
18
|
+
export type AIResultViewedAEP = TrackAEP<ACTION.VIEWED, ACTION_SUBJECT.AI_RESULT, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, CommonAttributes, undefined>;
|
|
19
|
+
export type AIResultActionedAEP = TrackAEP<ACTION.ACTIONED, ACTION_SUBJECT.AI_RESULT, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, CommonAttributes & {
|
|
20
|
+
promptType?: string;
|
|
21
|
+
refinementCount?: number;
|
|
22
|
+
aiResultAction: string;
|
|
23
|
+
}, undefined>;
|
|
24
|
+
export type AIResultErrorAEP = TrackAEP<ACTION.ERROR, ACTION_SUBJECT.AI_RESULT, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, CommonAttributes & {
|
|
25
|
+
aiErrorMessage?: string;
|
|
26
|
+
aiErrorCode?: number;
|
|
27
|
+
aiExperienceName?: string;
|
|
28
|
+
}, undefined>;
|
|
29
|
+
export type AIFeedbackSubmittedAEP = TrackAEP<ACTION.SUBMITTED, ACTION_SUBJECT.AI_FEEDBACK, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, CommonAttributes & {
|
|
30
|
+
aiExperienceName?: string;
|
|
31
|
+
aiFeedbackResult: 'up' | 'down';
|
|
32
|
+
}, undefined>;
|
|
33
|
+
export type AIUnifiedEventPayload = AIInteractionInitiatedAEP | AIResultViewedAEP | AIResultErrorAEP | AIInteractionDismissedAEP | AIResultActionedAEP | AIFeedbackSubmittedAEP;
|
|
34
|
+
export {};
|
|
@@ -101,6 +101,7 @@ export declare enum ACTION {
|
|
|
101
101
|
SLOW_INPUT = "slowInput",
|
|
102
102
|
STARTED = "started",
|
|
103
103
|
STOPPED = "stopped",
|
|
104
|
+
SUBMITTED = "submitted",
|
|
104
105
|
SUBSTITUTED = "autoSubstituted",
|
|
105
106
|
SYNCHRONY_DISCONNECTED = "synchronyDisconnected",
|
|
106
107
|
SYNCHRONY_ENTITY_ERROR = "synchronyEntityError",
|
|
@@ -6,6 +6,7 @@ import type { UnsupportedContentPayload, UnsupportedContentTooltipPayload, UserB
|
|
|
6
6
|
import { type AICommandPaletteEventPayload } from './ai-command-palette-events';
|
|
7
7
|
import { type AIDefinitionsEventPayload } from './ai-definitions-events';
|
|
8
8
|
import { type AIProactiveEventPayload } from './ai-proactive-events';
|
|
9
|
+
import type { AIUnifiedEventPayload } from './ai-unified-events';
|
|
9
10
|
import type { AvatarEventPayload } from './avatar';
|
|
10
11
|
import { type BreakoutEventPayload } from './breakout-events';
|
|
11
12
|
import type { ConfigPanelEventPayload } from './config-panel-events';
|
|
@@ -51,7 +52,7 @@ export type SimplifiedNode = {
|
|
|
51
52
|
marks?: string[];
|
|
52
53
|
content?: SimplifiedNode[];
|
|
53
54
|
};
|
|
54
|
-
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 | BreakoutEventPayload;
|
|
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;
|
|
55
56
|
type CustomPanelEventPayload = TrackAEP<ACTION.CHANGED_BACKGROUND_COLOR | ACTION.CHANGED_ICON | ACTION.REMOVE_ICON, ACTION_SUBJECT.PANEL, ACTION_SUBJECT_ID.PANEL, {
|
|
56
57
|
previousColor: string;
|
|
57
58
|
newColor: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function median(array: number[]): number;
|
|
@@ -44,3 +44,4 @@ 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';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unified events are used to measure the MAU of AI features globally
|
|
3
|
+
* https://hello.atlassian.net/wiki/spaces/AAI/pages/3770721410/Unified+Event+Instrumentation+For+AI+Features
|
|
4
|
+
*/
|
|
5
|
+
import type { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID } from './enums';
|
|
6
|
+
import type { TrackAEP } from './utils';
|
|
7
|
+
type CommonAttributes = {
|
|
8
|
+
singleInstrumentationID: string;
|
|
9
|
+
aiInteractionID: string;
|
|
10
|
+
aiFeatureName: string;
|
|
11
|
+
proactiveAIGenerated: 0 | 1;
|
|
12
|
+
userGeneratedAI: 0 | 1;
|
|
13
|
+
isAIFeature: 1;
|
|
14
|
+
aiExperienceName?: string;
|
|
15
|
+
};
|
|
16
|
+
export type AIInteractionInitiatedAEP = TrackAEP<ACTION.INITIATED, ACTION_SUBJECT.AI_INTERACTION, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, CommonAttributes, undefined>;
|
|
17
|
+
export type AIInteractionDismissedAEP = TrackAEP<ACTION.DISMISSED, ACTION_SUBJECT.AI_INTERACTION, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, CommonAttributes, undefined>;
|
|
18
|
+
export type AIResultViewedAEP = TrackAEP<ACTION.VIEWED, ACTION_SUBJECT.AI_RESULT, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, CommonAttributes, undefined>;
|
|
19
|
+
export type AIResultActionedAEP = TrackAEP<ACTION.ACTIONED, ACTION_SUBJECT.AI_RESULT, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, CommonAttributes & {
|
|
20
|
+
promptType?: string;
|
|
21
|
+
refinementCount?: number;
|
|
22
|
+
aiResultAction: string;
|
|
23
|
+
}, undefined>;
|
|
24
|
+
export type AIResultErrorAEP = TrackAEP<ACTION.ERROR, ACTION_SUBJECT.AI_RESULT, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, CommonAttributes & {
|
|
25
|
+
aiErrorMessage?: string;
|
|
26
|
+
aiErrorCode?: number;
|
|
27
|
+
aiExperienceName?: string;
|
|
28
|
+
}, undefined>;
|
|
29
|
+
export type AIFeedbackSubmittedAEP = TrackAEP<ACTION.SUBMITTED, ACTION_SUBJECT.AI_FEEDBACK, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, CommonAttributes & {
|
|
30
|
+
aiExperienceName?: string;
|
|
31
|
+
aiFeedbackResult: 'up' | 'down';
|
|
32
|
+
}, undefined>;
|
|
33
|
+
export type AIUnifiedEventPayload = AIInteractionInitiatedAEP | AIResultViewedAEP | AIResultErrorAEP | AIInteractionDismissedAEP | AIResultActionedAEP | AIFeedbackSubmittedAEP;
|
|
34
|
+
export {};
|
|
@@ -101,6 +101,7 @@ export declare enum ACTION {
|
|
|
101
101
|
SLOW_INPUT = "slowInput",
|
|
102
102
|
STARTED = "started",
|
|
103
103
|
STOPPED = "stopped",
|
|
104
|
+
SUBMITTED = "submitted",
|
|
104
105
|
SUBSTITUTED = "autoSubstituted",
|
|
105
106
|
SYNCHRONY_DISCONNECTED = "synchronyDisconnected",
|
|
106
107
|
SYNCHRONY_ENTITY_ERROR = "synchronyEntityError",
|
|
@@ -6,6 +6,7 @@ import type { UnsupportedContentPayload, UnsupportedContentTooltipPayload, UserB
|
|
|
6
6
|
import { type AICommandPaletteEventPayload } from './ai-command-palette-events';
|
|
7
7
|
import { type AIDefinitionsEventPayload } from './ai-definitions-events';
|
|
8
8
|
import { type AIProactiveEventPayload } from './ai-proactive-events';
|
|
9
|
+
import type { AIUnifiedEventPayload } from './ai-unified-events';
|
|
9
10
|
import type { AvatarEventPayload } from './avatar';
|
|
10
11
|
import { type BreakoutEventPayload } from './breakout-events';
|
|
11
12
|
import type { ConfigPanelEventPayload } from './config-panel-events';
|
|
@@ -51,7 +52,7 @@ export type SimplifiedNode = {
|
|
|
51
52
|
marks?: string[];
|
|
52
53
|
content?: SimplifiedNode[];
|
|
53
54
|
};
|
|
54
|
-
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 | BreakoutEventPayload;
|
|
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;
|
|
55
56
|
type CustomPanelEventPayload = TrackAEP<ACTION.CHANGED_BACKGROUND_COLOR | ACTION.CHANGED_ICON | ACTION.REMOVE_ICON, ACTION_SUBJECT.PANEL, ACTION_SUBJECT_ID.PANEL, {
|
|
56
57
|
previousColor: string;
|
|
57
58
|
newColor: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function median(array: number[]): number;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/editor-common/median",
|
|
3
|
+
"main": "../dist/cjs/utils/median.js",
|
|
4
|
+
"module": "../dist/esm/utils/median.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/utils/median.js",
|
|
6
|
+
"sideEffects": false,
|
|
7
|
+
"types": "../dist/types/utils/median.d.ts",
|
|
8
|
+
"typesVersions": {
|
|
9
|
+
">=4.5 <5.4": {
|
|
10
|
+
"*": [
|
|
11
|
+
"../dist/types-ts4.5/utils/median.d.ts"
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "99.
|
|
3
|
+
"version": "99.4.1",
|
|
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/"
|
|
@@ -108,7 +108,8 @@
|
|
|
108
108
|
"./use-shared-plugin-state-selector": "./src/hooks/useSharedPluginStateSelector/index.ts",
|
|
109
109
|
"./lazy-node-view": "./src/lazy-node-view/index.ts",
|
|
110
110
|
"./nesting": "./src/nesting/utilities.ts",
|
|
111
|
-
"./UNSAFE_do_not_use_editor_context": "./src/ui/EditorContext/index.ts"
|
|
111
|
+
"./UNSAFE_do_not_use_editor_context": "./src/ui/EditorContext/index.ts",
|
|
112
|
+
"./median": "./src/utils/median.ts"
|
|
112
113
|
},
|
|
113
114
|
"dependencies": {
|
|
114
115
|
"@atlaskit/activity-provider": "^2.5.0",
|
|
@@ -134,13 +135,13 @@
|
|
|
134
135
|
"@atlaskit/link-datasource": "^3.15.0",
|
|
135
136
|
"@atlaskit/link-picker": "^1.47.0",
|
|
136
137
|
"@atlaskit/media-card": "^78.18.0",
|
|
137
|
-
"@atlaskit/media-client": "^
|
|
138
|
+
"@atlaskit/media-client": "^30.0.0",
|
|
138
139
|
"@atlaskit/media-client-react": "^2.6.0",
|
|
139
140
|
"@atlaskit/media-common": "^11.7.0",
|
|
140
141
|
"@atlaskit/media-file-preview": "^0.9.0",
|
|
141
142
|
"@atlaskit/media-picker": "^67.0.0",
|
|
142
143
|
"@atlaskit/media-ui": "^27.3.0",
|
|
143
|
-
"@atlaskit/media-viewer": "49.6.
|
|
144
|
+
"@atlaskit/media-viewer": "49.6.2",
|
|
144
145
|
"@atlaskit/mention": "^23.9.0",
|
|
145
146
|
"@atlaskit/menu": "^2.13.0",
|
|
146
147
|
"@atlaskit/onboarding": "^12.2.0",
|
|
@@ -149,12 +150,12 @@
|
|
|
149
150
|
"@atlaskit/primitives": "^13.3.0",
|
|
150
151
|
"@atlaskit/profilecard": "^21.1.0",
|
|
151
152
|
"@atlaskit/section-message": "^6.8.0",
|
|
152
|
-
"@atlaskit/smart-card": "^34.
|
|
153
|
+
"@atlaskit/smart-card": "^34.5.0",
|
|
153
154
|
"@atlaskit/smart-user-picker": "^6.11.0",
|
|
154
155
|
"@atlaskit/spinner": "^16.3.0",
|
|
155
156
|
"@atlaskit/task-decision": "^17.11.0",
|
|
156
157
|
"@atlaskit/textfield": "^6.7.0",
|
|
157
|
-
"@atlaskit/tmp-editor-statsig": "^2.
|
|
158
|
+
"@atlaskit/tmp-editor-statsig": "^2.38.0",
|
|
158
159
|
"@atlaskit/tokens": "^3.1.0",
|
|
159
160
|
"@atlaskit/tooltip": "^19.0.0",
|
|
160
161
|
"@atlaskit/width-detector": "^4.3.0",
|