@atlaskit/react-ufo 3.10.4 → 3.11.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 +8 -0
- package/dist/cjs/config/index.js +51 -5
- package/dist/cjs/create-experimental-interaction-metrics-payload/index.js +2 -1
- package/dist/cjs/create-payload/utils/get-vc-metrics.js +41 -20
- package/dist/cjs/interaction-metrics/index.js +2 -1
- package/dist/cjs/interaction-metrics/post-interaction-log.js +4 -2
- package/dist/cjs/vc/index.js +123 -35
- package/dist/cjs/vc/vc-observer/getVCRevisionsData.js +48 -23
- package/dist/cjs/vc/vc-observer/index.js +17 -6
- package/dist/es2019/config/index.js +49 -6
- package/dist/es2019/create-experimental-interaction-metrics-payload/index.js +2 -1
- package/dist/es2019/create-payload/utils/get-vc-metrics.js +36 -19
- package/dist/es2019/interaction-metrics/index.js +2 -1
- package/dist/es2019/interaction-metrics/post-interaction-log.js +2 -1
- package/dist/es2019/vc/index.js +98 -35
- package/dist/es2019/vc/vc-observer/getVCRevisionsData.js +52 -25
- package/dist/es2019/vc/vc-observer/index.js +18 -6
- package/dist/esm/config/index.js +49 -5
- package/dist/esm/create-experimental-interaction-metrics-payload/index.js +2 -1
- package/dist/esm/create-payload/utils/get-vc-metrics.js +42 -21
- package/dist/esm/interaction-metrics/index.js +2 -1
- package/dist/esm/interaction-metrics/post-interaction-log.js +4 -2
- package/dist/esm/vc/index.js +123 -35
- package/dist/esm/vc/vc-observer/getVCRevisionsData.js +48 -23
- package/dist/esm/vc/vc-observer/index.js +17 -6
- package/dist/types/config/index.d.ts +14 -3
- package/dist/types/create-post-interaction-log-payload/index.d.ts +2 -2
- package/dist/types/vc/types.d.ts +3 -1
- package/dist/types/vc/vc-observer/getVCRevisionsData.d.ts +5 -3
- package/dist/types/vc/vc-observer/index.d.ts +1 -1
- package/dist/types-ts4.5/config/index.d.ts +14 -3
- package/dist/types-ts4.5/create-post-interaction-log-payload/index.d.ts +2 -2
- package/dist/types-ts4.5/vc/types.d.ts +3 -1
- package/dist/types-ts4.5/vc/vc-observer/getVCRevisionsData.d.ts +5 -3
- package/dist/types-ts4.5/vc/vc-observer/index.d.ts +1 -1
- package/package.json +4 -1
|
@@ -11,6 +11,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
11
11
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
12
12
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
13
|
import { isVCRevisionEnabled } from '../../config';
|
|
14
|
+
import { getActiveInteraction } from '../../interaction-metrics';
|
|
14
15
|
import { attachAbortListeners } from './attachAbortListeners';
|
|
15
16
|
import { getVCRevisionsData } from './getVCRevisionsData';
|
|
16
17
|
import { getViewportHeight, getViewportWidth } from './getViewport';
|
|
@@ -98,11 +99,11 @@ export var VCObserver = /*#__PURE__*/function () {
|
|
|
98
99
|
});
|
|
99
100
|
_defineProperty(this, "getVCResult", /*#__PURE__*/function () {
|
|
100
101
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref3) {
|
|
101
|
-
var start, stop, tti, prefix, ssr, vc, isEventAborted, startTime, fullPrefix, rawData, abortReason, abortReasonInfo, heatmap, heatmapNext, outOfBoundaryInfo, totalTime, componentsLog, viewport, devToolsEnabled, ratios, multiHeatmap, isTTVCv1Disabled, vcAbortedResultWithRevisions, ttvcV1Result, VC, VCBox, VCEntries, totalPainted, _componentsLog, vcNext, outOfBoundary, stopTime, ttvcV1DevToolInfo, ttvcV2DevToolInfo, isVCClean, revisionsData, speedIndex, isTTVCv3Enabled;
|
|
102
|
+
var start, stop, tti, prefix, ssr, vc, isEventAborted, experienceKey, startTime, fullPrefix, rawData, abortReason, abortReasonInfo, heatmap, heatmapNext, outOfBoundaryInfo, totalTime, componentsLog, viewport, devToolsEnabled, ratios, multiHeatmap, isTTVCv1Disabled, vcAbortedResultWithRevisions, ttvcV1Result, VC, VCBox, VCEntries, totalPainted, _componentsLog, vcNext, outOfBoundary, stopTime, ttvcV1DevToolInfo, ttvcV2DevToolInfo, isVCClean, revisionsData, speedIndex, isTTVCv3Enabled;
|
|
102
103
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
103
104
|
while (1) switch (_context.prev = _context.next) {
|
|
104
105
|
case 0:
|
|
105
|
-
start = _ref3.start, stop = _ref3.stop, tti = _ref3.tti, prefix = _ref3.prefix, ssr = _ref3.ssr, vc = _ref3.vc, isEventAborted = _ref3.isEventAborted;
|
|
106
|
+
start = _ref3.start, stop = _ref3.stop, tti = _ref3.tti, prefix = _ref3.prefix, ssr = _ref3.ssr, vc = _ref3.vc, isEventAborted = _ref3.isEventAborted, experienceKey = _ref3.experienceKey;
|
|
106
107
|
startTime = performance.now(); // add local measurement
|
|
107
108
|
fullPrefix = prefix !== undefined && prefix !== '' ? "".concat(prefix, ":") : '';
|
|
108
109
|
rawData = vc !== undefined ? vc : _this.getVCRawData();
|
|
@@ -113,7 +114,7 @@ export var VCObserver = /*#__PURE__*/function () {
|
|
|
113
114
|
return _context.abrupt("return", {});
|
|
114
115
|
case 6:
|
|
115
116
|
abortReason = rawData.abortReason, abortReasonInfo = rawData.abortReasonInfo, heatmap = rawData.heatmap, heatmapNext = rawData.heatmapNext, outOfBoundaryInfo = rawData.outOfBoundaryInfo, totalTime = rawData.totalTime, componentsLog = rawData.componentsLog, viewport = rawData.viewport, devToolsEnabled = rawData.devToolsEnabled, ratios = rawData.ratios, multiHeatmap = rawData.multiHeatmap;
|
|
116
|
-
isTTVCv1Disabled = !isVCRevisionEnabled('fy25.01'); // NOTE: as part of platform_ufo_add_vc_abort_reason_by_revisions feature,
|
|
117
|
+
isTTVCv1Disabled = fg('platform_ufo_vc_enable_revisions_by_experience') ? !isVCRevisionEnabled('fy25.01', experienceKey) : !isVCRevisionEnabled('fy25.01'); // NOTE: as part of platform_ufo_add_vc_abort_reason_by_revisions feature,
|
|
117
118
|
// we want to report abort by scroll events the same way as other abort reasons
|
|
118
119
|
// i.e. not have the concept of `abortReason.blocking` anymore
|
|
119
120
|
if (!(abortReasonInfo !== null && fg('platform_ufo_add_vc_abort_reason_by_revisions'))) {
|
|
@@ -301,7 +302,8 @@ export var VCObserver = /*#__PURE__*/function () {
|
|
|
301
302
|
VC: vcNext.VC,
|
|
302
303
|
VCBox: vcNext.VCBox
|
|
303
304
|
},
|
|
304
|
-
isEventAborted: isEventAborted
|
|
305
|
+
isEventAborted: isEventAborted,
|
|
306
|
+
experienceKey: experienceKey
|
|
305
307
|
});
|
|
306
308
|
speedIndex = _defineProperty(_defineProperty({}, "ufo:speedIndex", isTTVCv1Disabled ? vcNext.VCEntries.speedIndex : VCEntries.speedIndex), "ufo:next:speedIndex", vcNext.VCEntries.speedIndex);
|
|
307
309
|
if (!isTTVCv1Disabled) {
|
|
@@ -310,7 +312,7 @@ export var VCObserver = /*#__PURE__*/function () {
|
|
|
310
312
|
}
|
|
311
313
|
return _context.abrupt("return", _objectSpread(_objectSpread(_objectSpread(_defineProperty(_defineProperty(_defineProperty({}, "".concat(fullPrefix, "vc:size"), viewport), "".concat(fullPrefix, "vc:time"), Math.round(totalTime + (stopTime - startTime))), "".concat(fullPrefix, "vc:ratios"), ratios), outOfBoundary), {}, _defineProperty({}, "".concat(fullPrefix, "vc:ignored"), _this.getIgnoredElements(componentsLog)), revisionsData), speedIndex));
|
|
312
314
|
case 32:
|
|
313
|
-
isTTVCv3Enabled = isVCRevisionEnabled('fy25.03');
|
|
315
|
+
isTTVCv3Enabled = fg('platform_ufo_vc_enable_revisions_by_experience') ? isVCRevisionEnabled('fy25.03', experienceKey) : isVCRevisionEnabled('fy25.03');
|
|
314
316
|
return _context.abrupt("return", _objectSpread(_objectSpread(_objectSpread(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
|
|
315
317
|
'metrics:vc': VC
|
|
316
318
|
}, "".concat(fullPrefix, "vc:state"), true), "".concat(fullPrefix, "vc:clean"), isVCClean), "".concat(fullPrefix, "vc:dom"), VCBox), "".concat(fullPrefix, "vc:updates"), isTTVCv3Enabled ? undefined : VCEntries.rel.slice(0, 50)), "".concat(fullPrefix, "vc:size"), viewport), "".concat(fullPrefix, "vc:time"), Math.round(totalTime + (stopTime - startTime))), "".concat(fullPrefix, "vc:total"), totalPainted), "".concat(fullPrefix, "vc:ratios"), ratios), outOfBoundary), {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(fullPrefix, "vc:next"), vcNext.VC), "".concat(fullPrefix, "vc:next:updates"), isTTVCv3Enabled ? undefined : vcNext.VCEntries.rel.slice(0, 50)), "".concat(fullPrefix, "vc:next:dom"), vcNext.VCBox), "".concat(fullPrefix, "vc:ignored"), _this.getIgnoredElements(componentsLog)), revisionsData), speedIndex));
|
|
@@ -327,7 +329,12 @@ export var VCObserver = /*#__PURE__*/function () {
|
|
|
327
329
|
_defineProperty(this, "handleUpdate", function (rawTime, intersectionRect, targetName, element, type, ignoreReason, attributeName, oldValue, newValue) {
|
|
328
330
|
_this.measureStart();
|
|
329
331
|
_this.legacyHandleUpdate(rawTime, intersectionRect, targetName, element, type, ignoreReason, attributeName, oldValue, newValue);
|
|
330
|
-
|
|
332
|
+
var isTTVCv3Disabled = !isVCRevisionEnabled('fy25.03');
|
|
333
|
+
if (fg('platform_ufo_vc_enable_revisions_by_experience')) {
|
|
334
|
+
var interaction = getActiveInteraction();
|
|
335
|
+
isTTVCv3Disabled = !isVCRevisionEnabled('fy25.03', interaction === null || interaction === void 0 ? void 0 : interaction.ufoName);
|
|
336
|
+
}
|
|
337
|
+
if (isTTVCv3Disabled) {
|
|
331
338
|
_this.onViewportChangeDetected({
|
|
332
339
|
timestamp: rawTime,
|
|
333
340
|
intersectionRect: intersectionRect,
|
|
@@ -351,6 +358,10 @@ export var VCObserver = /*#__PURE__*/function () {
|
|
|
351
358
|
_this.applyChangesToHeatMap(mappedValues, time, _this.heatmapNext);
|
|
352
359
|
}
|
|
353
360
|
var isTTVCv1Disabled = !isVCRevisionEnabled('fy25.01');
|
|
361
|
+
if (fg('platform_ufo_vc_enable_revisions_by_experience')) {
|
|
362
|
+
var interaction = getActiveInteraction();
|
|
363
|
+
isTTVCv1Disabled = !isVCRevisionEnabled('fy25.01', interaction === null || interaction === void 0 ? void 0 : interaction.ufoName);
|
|
364
|
+
}
|
|
354
365
|
if (!isTTVCv1Disabled && (!ignoreReason || ignoreReason === 'not-visible') && type !== 'attr') {
|
|
355
366
|
_this.applyChangesToHeatMap(mappedValues, time, _this.heatmap);
|
|
356
367
|
}
|
|
@@ -74,7 +74,17 @@ export type Config = {
|
|
|
74
74
|
readonly ssr?: boolean;
|
|
75
75
|
readonly ssrWhitelist?: string[];
|
|
76
76
|
readonly stopVCAtInteractionFinish?: boolean;
|
|
77
|
-
|
|
77
|
+
/**
|
|
78
|
+
* The revisions of TTVC that will be calculated
|
|
79
|
+
* - `all` is the TTVC revisions that are used on a product level
|
|
80
|
+
* - `byExperience` is the version that is used on an experience level.
|
|
81
|
+
* Note that an entry in the `byExperience` config should only be a SUBSET of the `all` config,
|
|
82
|
+
* i.e. every element for all `byExperience` entry configs should exist in the `all` config
|
|
83
|
+
*/
|
|
84
|
+
readonly enabledVCRevisions?: {
|
|
85
|
+
all: readonly TTVCRevisions[];
|
|
86
|
+
byExperience?: Record<string, readonly TTVCRevisions[]>;
|
|
87
|
+
};
|
|
78
88
|
};
|
|
79
89
|
readonly postInteractionLog?: {
|
|
80
90
|
readonly enabled?: boolean;
|
|
@@ -99,8 +109,9 @@ export type Config = {
|
|
|
99
109
|
};
|
|
100
110
|
export declare function setUFOConfig(newConfig: Config): void;
|
|
101
111
|
export declare function getConfig(): Config | undefined;
|
|
102
|
-
export declare function getEnabledVCRevisions(): TTVCRevisions[];
|
|
103
|
-
export declare function isVCRevisionEnabled(revision: TTVCRevisions): boolean;
|
|
112
|
+
export declare function getEnabledVCRevisions(experienceKey?: string): readonly TTVCRevisions[];
|
|
113
|
+
export declare function isVCRevisionEnabled(revision: TTVCRevisions, experienceKey?: string): boolean;
|
|
114
|
+
export declare function getMostRecentVCRevision(experienceKey?: string): TTVCRevisions;
|
|
104
115
|
export declare function getInteractionRate(name: string, interactionKind: InteractionKind): number;
|
|
105
116
|
export declare function getExperimentalInteractionRate(name: string, interactionType: InteractionType): number;
|
|
106
117
|
export declare function getPostInteractionRate(name: string, interactionType: InteractionType): number;
|
|
@@ -26,12 +26,12 @@ declare function createPostInteractionLogPayload({ lastInteractionFinish, reactP
|
|
|
26
26
|
vc90: number | null;
|
|
27
27
|
vcClean: boolean;
|
|
28
28
|
type: import("../common").InteractionType;
|
|
29
|
-
id: string;
|
|
30
29
|
abortReason?: import("../common").AbortReasonType | undefined;
|
|
30
|
+
id: string;
|
|
31
31
|
abortedByInteractionName?: string | undefined;
|
|
32
32
|
routeName: string | null;
|
|
33
|
-
experimentalTTAI?: number | undefined;
|
|
34
33
|
experimentalVC90?: number | undefined;
|
|
34
|
+
experimentalTTAI?: number | undefined;
|
|
35
35
|
};
|
|
36
36
|
revisedEndTime: number;
|
|
37
37
|
revisedTtai: number;
|
package/dist/types/vc/types.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export type GetVCResultType = {
|
|
|
7
7
|
prefix?: string;
|
|
8
8
|
ssr?: number;
|
|
9
9
|
vc?: VCRawDataType | null;
|
|
10
|
+
experienceKey: string;
|
|
10
11
|
};
|
|
11
12
|
export type SelectorConfig = {
|
|
12
13
|
id: boolean;
|
|
@@ -25,8 +26,9 @@ export type VCObserverOptions = {
|
|
|
25
26
|
export interface VCObserverInterface {
|
|
26
27
|
start(startArg: {
|
|
27
28
|
startTime: number;
|
|
29
|
+
experienceKey?: string;
|
|
28
30
|
}): void;
|
|
29
|
-
stop(): void;
|
|
31
|
+
stop(experienceKey?: string): void;
|
|
30
32
|
getVCRawData(): VCRawDataType | null;
|
|
31
33
|
getVCResult(param: GetVCResultType): Promise<VCResult>;
|
|
32
34
|
setSSRElement(element: HTMLElement): void;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { InteractionMetrics } from '../../common/common/types';
|
|
2
|
+
import { RevisionPayload } from '../../common/vc/types';
|
|
2
3
|
import type { MultiRevisionHeatmap } from './heatmap/heatmap';
|
|
3
4
|
type CalculatedVC = {
|
|
4
5
|
VC: {
|
|
@@ -8,7 +9,7 @@ type CalculatedVC = {
|
|
|
8
9
|
[key: string]: string[] | null;
|
|
9
10
|
};
|
|
10
11
|
};
|
|
11
|
-
export declare function getVCRevisionsData({ fullPrefix, interaction, isVCClean, isEventAborted, multiHeatmap, ssr, calculatedVC, calculatedVCNext, }: {
|
|
12
|
+
export declare function getVCRevisionsData({ fullPrefix, interaction, isVCClean, isEventAborted, multiHeatmap, ssr, calculatedVC, calculatedVCNext, experienceKey, }: {
|
|
12
13
|
fullPrefix?: string;
|
|
13
14
|
interaction: Pick<InteractionMetrics, 'start' | 'end'>;
|
|
14
15
|
isVCClean: boolean;
|
|
@@ -16,9 +17,10 @@ export declare function getVCRevisionsData({ fullPrefix, interaction, isVCClean,
|
|
|
16
17
|
multiHeatmap: MultiRevisionHeatmap | null;
|
|
17
18
|
calculatedVC: CalculatedVC;
|
|
18
19
|
calculatedVCNext: CalculatedVC;
|
|
20
|
+
experienceKey: string;
|
|
19
21
|
ssr?: number;
|
|
20
22
|
}): {
|
|
21
|
-
[x: string]:
|
|
23
|
+
[x: string]: RevisionPayload;
|
|
22
24
|
} | {
|
|
23
25
|
[x: string]: {
|
|
24
26
|
revision: string;
|
|
@@ -26,7 +28,7 @@ export declare function getVCRevisionsData({ fullPrefix, interaction, isVCClean,
|
|
|
26
28
|
'metric:vc90': number | null;
|
|
27
29
|
vcDetails: {
|
|
28
30
|
[key: string]: {
|
|
29
|
-
t: number
|
|
31
|
+
t: number;
|
|
30
32
|
e: string[];
|
|
31
33
|
};
|
|
32
34
|
};
|
|
@@ -41,7 +41,7 @@ export declare class VCObserver implements VCObserverInterface {
|
|
|
41
41
|
targetName: string;
|
|
42
42
|
ignoreReason: VCIgnoreReason | undefined;
|
|
43
43
|
}[];
|
|
44
|
-
getVCResult: ({ start, stop, tti, prefix, ssr, vc, isEventAborted, }: GetVCResultType) => Promise<VCResult>;
|
|
44
|
+
getVCResult: ({ start, stop, tti, prefix, ssr, vc, isEventAborted, experienceKey, }: GetVCResultType) => Promise<VCResult>;
|
|
45
45
|
static calculateVC({ heatmap, ssr, componentsLog, viewport, }: {
|
|
46
46
|
heatmap: number[][];
|
|
47
47
|
ssr?: number;
|
|
@@ -74,7 +74,17 @@ export type Config = {
|
|
|
74
74
|
readonly ssr?: boolean;
|
|
75
75
|
readonly ssrWhitelist?: string[];
|
|
76
76
|
readonly stopVCAtInteractionFinish?: boolean;
|
|
77
|
-
|
|
77
|
+
/**
|
|
78
|
+
* The revisions of TTVC that will be calculated
|
|
79
|
+
* - `all` is the TTVC revisions that are used on a product level
|
|
80
|
+
* - `byExperience` is the version that is used on an experience level.
|
|
81
|
+
* Note that an entry in the `byExperience` config should only be a SUBSET of the `all` config,
|
|
82
|
+
* i.e. every element for all `byExperience` entry configs should exist in the `all` config
|
|
83
|
+
*/
|
|
84
|
+
readonly enabledVCRevisions?: {
|
|
85
|
+
all: readonly TTVCRevisions[];
|
|
86
|
+
byExperience?: Record<string, readonly TTVCRevisions[]>;
|
|
87
|
+
};
|
|
78
88
|
};
|
|
79
89
|
readonly postInteractionLog?: {
|
|
80
90
|
readonly enabled?: boolean;
|
|
@@ -99,8 +109,9 @@ export type Config = {
|
|
|
99
109
|
};
|
|
100
110
|
export declare function setUFOConfig(newConfig: Config): void;
|
|
101
111
|
export declare function getConfig(): Config | undefined;
|
|
102
|
-
export declare function getEnabledVCRevisions(): TTVCRevisions[];
|
|
103
|
-
export declare function isVCRevisionEnabled(revision: TTVCRevisions): boolean;
|
|
112
|
+
export declare function getEnabledVCRevisions(experienceKey?: string): readonly TTVCRevisions[];
|
|
113
|
+
export declare function isVCRevisionEnabled(revision: TTVCRevisions, experienceKey?: string): boolean;
|
|
114
|
+
export declare function getMostRecentVCRevision(experienceKey?: string): TTVCRevisions;
|
|
104
115
|
export declare function getInteractionRate(name: string, interactionKind: InteractionKind): number;
|
|
105
116
|
export declare function getExperimentalInteractionRate(name: string, interactionType: InteractionType): number;
|
|
106
117
|
export declare function getPostInteractionRate(name: string, interactionType: InteractionType): number;
|
|
@@ -26,12 +26,12 @@ declare function createPostInteractionLogPayload({ lastInteractionFinish, reactP
|
|
|
26
26
|
vc90: number | null;
|
|
27
27
|
vcClean: boolean;
|
|
28
28
|
type: import("../common").InteractionType;
|
|
29
|
-
id: string;
|
|
30
29
|
abortReason?: import("../common").AbortReasonType | undefined;
|
|
30
|
+
id: string;
|
|
31
31
|
abortedByInteractionName?: string | undefined;
|
|
32
32
|
routeName: string | null;
|
|
33
|
-
experimentalTTAI?: number | undefined;
|
|
34
33
|
experimentalVC90?: number | undefined;
|
|
34
|
+
experimentalTTAI?: number | undefined;
|
|
35
35
|
};
|
|
36
36
|
revisedEndTime: number;
|
|
37
37
|
revisedTtai: number;
|
|
@@ -7,6 +7,7 @@ export type GetVCResultType = {
|
|
|
7
7
|
prefix?: string;
|
|
8
8
|
ssr?: number;
|
|
9
9
|
vc?: VCRawDataType | null;
|
|
10
|
+
experienceKey: string;
|
|
10
11
|
};
|
|
11
12
|
export type SelectorConfig = {
|
|
12
13
|
id: boolean;
|
|
@@ -25,8 +26,9 @@ export type VCObserverOptions = {
|
|
|
25
26
|
export interface VCObserverInterface {
|
|
26
27
|
start(startArg: {
|
|
27
28
|
startTime: number;
|
|
29
|
+
experienceKey?: string;
|
|
28
30
|
}): void;
|
|
29
|
-
stop(): void;
|
|
31
|
+
stop(experienceKey?: string): void;
|
|
30
32
|
getVCRawData(): VCRawDataType | null;
|
|
31
33
|
getVCResult(param: GetVCResultType): Promise<VCResult>;
|
|
32
34
|
setSSRElement(element: HTMLElement): void;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { InteractionMetrics } from '../../common/common/types';
|
|
2
|
+
import { RevisionPayload } from '../../common/vc/types';
|
|
2
3
|
import type { MultiRevisionHeatmap } from './heatmap/heatmap';
|
|
3
4
|
type CalculatedVC = {
|
|
4
5
|
VC: {
|
|
@@ -8,7 +9,7 @@ type CalculatedVC = {
|
|
|
8
9
|
[key: string]: string[] | null;
|
|
9
10
|
};
|
|
10
11
|
};
|
|
11
|
-
export declare function getVCRevisionsData({ fullPrefix, interaction, isVCClean, isEventAborted, multiHeatmap, ssr, calculatedVC, calculatedVCNext, }: {
|
|
12
|
+
export declare function getVCRevisionsData({ fullPrefix, interaction, isVCClean, isEventAborted, multiHeatmap, ssr, calculatedVC, calculatedVCNext, experienceKey, }: {
|
|
12
13
|
fullPrefix?: string;
|
|
13
14
|
interaction: Pick<InteractionMetrics, 'start' | 'end'>;
|
|
14
15
|
isVCClean: boolean;
|
|
@@ -16,9 +17,10 @@ export declare function getVCRevisionsData({ fullPrefix, interaction, isVCClean,
|
|
|
16
17
|
multiHeatmap: MultiRevisionHeatmap | null;
|
|
17
18
|
calculatedVC: CalculatedVC;
|
|
18
19
|
calculatedVCNext: CalculatedVC;
|
|
20
|
+
experienceKey: string;
|
|
19
21
|
ssr?: number;
|
|
20
22
|
}): {
|
|
21
|
-
[x: string]:
|
|
23
|
+
[x: string]: RevisionPayload;
|
|
22
24
|
} | {
|
|
23
25
|
[x: string]: {
|
|
24
26
|
revision: string;
|
|
@@ -26,7 +28,7 @@ export declare function getVCRevisionsData({ fullPrefix, interaction, isVCClean,
|
|
|
26
28
|
'metric:vc90': number | null;
|
|
27
29
|
vcDetails: {
|
|
28
30
|
[key: string]: {
|
|
29
|
-
t: number
|
|
31
|
+
t: number;
|
|
30
32
|
e: string[];
|
|
31
33
|
};
|
|
32
34
|
};
|
|
@@ -51,7 +51,7 @@ export declare class VCObserver implements VCObserverInterface {
|
|
|
51
51
|
targetName: string;
|
|
52
52
|
ignoreReason: VCIgnoreReason | undefined;
|
|
53
53
|
}[];
|
|
54
|
-
getVCResult: ({ start, stop, tti, prefix, ssr, vc, isEventAborted, }: GetVCResultType) => Promise<VCResult>;
|
|
54
|
+
getVCResult: ({ start, stop, tti, prefix, ssr, vc, isEventAborted, experienceKey, }: GetVCResultType) => Promise<VCResult>;
|
|
55
55
|
static calculateVC({ heatmap, ssr, componentsLog, viewport, }: {
|
|
56
56
|
heatmap: number[][];
|
|
57
57
|
ssr?: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/react-ufo",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.11.0",
|
|
4
4
|
"description": "Parts of React UFO that are publicly available",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -133,6 +133,9 @@
|
|
|
133
133
|
"platform_ufo_canvas_heatmap_full_precision": {
|
|
134
134
|
"type": "boolean"
|
|
135
135
|
},
|
|
136
|
+
"platform_ufo_vc_enable_revisions_by_experience": {
|
|
137
|
+
"type": "boolean"
|
|
138
|
+
},
|
|
136
139
|
"ufo_return_relative_request_start": {
|
|
137
140
|
"type": "boolean"
|
|
138
141
|
},
|