@atlaskit/react-ufo 3.1.1 → 3.1.2
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 +11 -0
- package/dist/cjs/common/constants.js +12 -3
- package/dist/cjs/create-payload/common/utils/index.js +3 -4
- package/dist/cjs/create-payload/index.js +26 -27
- package/dist/cjs/create-post-interaction-log-payload/index.js +1 -1
- package/dist/cjs/vc/vc-observer/index.js +5 -4
- package/dist/es2019/common/constants.js +10 -2
- package/dist/es2019/create-payload/common/utils/index.js +2 -4
- package/dist/es2019/create-payload/index.js +27 -28
- package/dist/es2019/create-post-interaction-log-payload/index.js +2 -2
- package/dist/es2019/vc/vc-observer/index.js +2 -2
- package/dist/esm/common/constants.js +10 -2
- package/dist/esm/create-payload/common/utils/index.js +2 -4
- package/dist/esm/create-payload/index.js +27 -28
- package/dist/esm/create-post-interaction-log-payload/index.js +2 -2
- package/dist/esm/vc/vc-observer/index.js +5 -4
- package/dist/types/common/constants.d.ts +2 -1
- package/dist/types/create-payload/common/utils/index.d.ts +2 -1
- package/dist/types/create-payload/index.d.ts +0 -32
- package/dist/types-ts4.5/common/constants.d.ts +2 -1
- package/dist/types-ts4.5/create-payload/common/utils/index.d.ts +2 -1
- package/dist/types-ts4.5/create-payload/index.d.ts +0 -32
- package/package.json +1 -1
|
@@ -14,7 +14,7 @@ import { getLighthouseMetrics } from '../additional-payload';
|
|
|
14
14
|
import { CHRReporter } from '../assets';
|
|
15
15
|
import * as bundleEvalTiming from '../bundle-eval-timing';
|
|
16
16
|
import coinflip from '../coinflip';
|
|
17
|
-
import {
|
|
17
|
+
import { getReactUFOVersion } from '../common/constants';
|
|
18
18
|
import { getConfig, getExperimentalInteractionRate, getUfoNameOverrides } from '../config';
|
|
19
19
|
import { getExperimentalVCMetrics } from '../create-experimental-interaction-metrics-payload';
|
|
20
20
|
import { getBm3Timings } from '../custom-timings';
|
|
@@ -382,7 +382,7 @@ function optimizeCustomData(interaction) {
|
|
|
382
382
|
var label = stringifyLabelStackFully(labelStack);
|
|
383
383
|
var value = (_result$get$data = (_result$get = result.get(label)) === null || _result$get === void 0 ? void 0 : _result$get.data) !== null && _result$get$data !== void 0 ? _result$get$data : {};
|
|
384
384
|
result.set(label, {
|
|
385
|
-
labelStack: optimizeLabelStack(labelStack),
|
|
385
|
+
labelStack: optimizeLabelStack(labelStack, getReactUFOVersion(interaction.type)),
|
|
386
386
|
data: Object.assign(value, data)
|
|
387
387
|
});
|
|
388
388
|
return result;
|
|
@@ -399,7 +399,7 @@ function optimizeCustomData(interaction) {
|
|
|
399
399
|
var label = stringifyLabelStackFully([]);
|
|
400
400
|
var labelValue = (_result$get$data2 = (_result$get2 = result.get(label)) === null || _result$get2 === void 0 ? void 0 : _result$get2.data) !== null && _result$get$data2 !== void 0 ? _result$get$data2 : {};
|
|
401
401
|
result.set(label, {
|
|
402
|
-
labelStack: optimizeLabelStack([]),
|
|
402
|
+
labelStack: optimizeLabelStack([], getReactUFOVersion(interaction.type)),
|
|
403
403
|
data: Object.assign(labelValue, _defineProperty({}, _key, value))
|
|
404
404
|
});
|
|
405
405
|
}
|
|
@@ -409,7 +409,7 @@ function optimizeCustomData(interaction) {
|
|
|
409
409
|
}
|
|
410
410
|
return _toConsumableArray(customDataMap.values());
|
|
411
411
|
}
|
|
412
|
-
function optimizeReactProfilerTimings(reactProfilerTimings, interactionStart) {
|
|
412
|
+
function optimizeReactProfilerTimings(reactProfilerTimings, interactionStart, reactUFOVersion) {
|
|
413
413
|
var reactProfilerTimingsMap = reactProfilerTimings.reduce(function (result, _ref3) {
|
|
414
414
|
var labelStack = _ref3.labelStack,
|
|
415
415
|
startTime = _ref3.startTime,
|
|
@@ -421,7 +421,7 @@ function optimizeReactProfilerTimings(reactProfilerTimings, interactionStart) {
|
|
|
421
421
|
var start = Math.round(startTime);
|
|
422
422
|
var end = Math.round(commitTime);
|
|
423
423
|
var timing = result.get(label) || {
|
|
424
|
-
labelStack: optimizeLabelStack(labelStack),
|
|
424
|
+
labelStack: optimizeLabelStack(labelStack, reactUFOVersion),
|
|
425
425
|
startTime: start,
|
|
426
426
|
endTime: end,
|
|
427
427
|
mountCount: 0,
|
|
@@ -468,7 +468,7 @@ function optimizeRedirects(redirects, interactionStart) {
|
|
|
468
468
|
}, []);
|
|
469
469
|
return updatedRedirects;
|
|
470
470
|
}
|
|
471
|
-
function optimizeHoldInfo(holdInfo, interactionStart) {
|
|
471
|
+
function optimizeHoldInfo(holdInfo, interactionStart, reactUFOVersion) {
|
|
472
472
|
var holdInfoMap = holdInfo.reduce(function (result, hold) {
|
|
473
473
|
var labelStack = hold.labelStack,
|
|
474
474
|
name = hold.name,
|
|
@@ -484,7 +484,7 @@ function optimizeHoldInfo(holdInfo, interactionStart) {
|
|
|
484
484
|
var timing = result.get(label) || {
|
|
485
485
|
labelStack: optimizeLabelStack([].concat(_toConsumableArray(labelStack), [{
|
|
486
486
|
name: name
|
|
487
|
-
}])),
|
|
487
|
+
}]), reactUFOVersion),
|
|
488
488
|
startTime: startTime,
|
|
489
489
|
endTime: endTime
|
|
490
490
|
};
|
|
@@ -500,7 +500,7 @@ function optimizeHoldInfo(holdInfo, interactionStart) {
|
|
|
500
500
|
}, new Map());
|
|
501
501
|
return _toConsumableArray(holdInfoMap.values());
|
|
502
502
|
}
|
|
503
|
-
function optimizeSpans(spans, interactionStart) {
|
|
503
|
+
function optimizeSpans(spans, interactionStart, reactUFOVersion) {
|
|
504
504
|
var updatedSpans = spans.reduce(function (result, span) {
|
|
505
505
|
var labelStack = span.labelStack,
|
|
506
506
|
type = span.type,
|
|
@@ -511,7 +511,7 @@ function optimizeSpans(spans, interactionStart) {
|
|
|
511
511
|
result.push({
|
|
512
512
|
labelStack: optimizeLabelStack([].concat(_toConsumableArray(labelStack), [{
|
|
513
513
|
name: name
|
|
514
|
-
}])),
|
|
514
|
+
}]), reactUFOVersion),
|
|
515
515
|
startTime: Math.round(start),
|
|
516
516
|
endTime: Math.round(end),
|
|
517
517
|
type: type
|
|
@@ -521,7 +521,7 @@ function optimizeSpans(spans, interactionStart) {
|
|
|
521
521
|
}, []);
|
|
522
522
|
return updatedSpans;
|
|
523
523
|
}
|
|
524
|
-
function optimizeRequestInfo(requestInfo, interactionStart) {
|
|
524
|
+
function optimizeRequestInfo(requestInfo, interactionStart, reactUFOVersion) {
|
|
525
525
|
var updatedRequestInfo = requestInfo.reduce(function (result, reqInfo) {
|
|
526
526
|
var labelStack = reqInfo.labelStack,
|
|
527
527
|
name = reqInfo.name,
|
|
@@ -535,7 +535,7 @@ function optimizeRequestInfo(requestInfo, interactionStart) {
|
|
|
535
535
|
result.push({
|
|
536
536
|
labelStack: optimizeLabelStack([].concat(_toConsumableArray(labelStack), [{
|
|
537
537
|
name: name
|
|
538
|
-
}])),
|
|
538
|
+
}]), reactUFOVersion),
|
|
539
539
|
startTime: Math.round(startTime),
|
|
540
540
|
endTime: Math.round(endTime)
|
|
541
541
|
});
|
|
@@ -560,18 +560,18 @@ function optimizeCustomTimings(customTimings, interactionStart) {
|
|
|
560
560
|
return result;
|
|
561
561
|
}, []);
|
|
562
562
|
}
|
|
563
|
-
function optimizeMarks(marks) {
|
|
563
|
+
function optimizeMarks(marks, reactUFOVersion) {
|
|
564
564
|
return marks.map(function (_ref4) {
|
|
565
565
|
var labelStack = _ref4.labelStack,
|
|
566
566
|
time = _ref4.time,
|
|
567
567
|
others = _objectWithoutProperties(_ref4, _excluded);
|
|
568
568
|
return _objectSpread(_objectSpread({}, others), {}, {
|
|
569
|
-
labelStack: labelStack && optimizeLabelStack(labelStack),
|
|
569
|
+
labelStack: labelStack && optimizeLabelStack(labelStack, reactUFOVersion),
|
|
570
570
|
time: Math.round(time)
|
|
571
571
|
});
|
|
572
572
|
});
|
|
573
573
|
}
|
|
574
|
-
function optimizeApdex(apdex) {
|
|
574
|
+
function optimizeApdex(apdex, reactUFOVersion) {
|
|
575
575
|
return apdex.map(function (_ref5) {
|
|
576
576
|
var stopTime = _ref5.stopTime,
|
|
577
577
|
labelStack = _ref5.labelStack,
|
|
@@ -579,7 +579,7 @@ function optimizeApdex(apdex) {
|
|
|
579
579
|
return _objectSpread(_objectSpread({}, others), {}, {
|
|
580
580
|
stopTime: Math.round(stopTime)
|
|
581
581
|
}, labelStack ? {
|
|
582
|
-
labelStack: optimizeLabelStack(labelStack)
|
|
582
|
+
labelStack: optimizeLabelStack(labelStack, reactUFOVersion)
|
|
583
583
|
} : {});
|
|
584
584
|
});
|
|
585
585
|
}
|
|
@@ -715,7 +715,7 @@ function createInteractionMetricsPayload(interaction, interactionId, experimenta
|
|
|
715
715
|
var pageVisibilityAtTTI = getPageVisibilityUpToTTI(interaction);
|
|
716
716
|
var pageVisibilityAtTTAI = getPageVisibilityUpToTTAI(interaction);
|
|
717
717
|
var segments = config.killswitchNestedSegments ? [] : knownSegments;
|
|
718
|
-
var segmentTree =
|
|
718
|
+
var segmentTree = getReactUFOVersion(interaction.type) === '2.0.0' ? buildSegmentTree(segments.map(function (segment) {
|
|
719
719
|
return segment.labelStack;
|
|
720
720
|
})) : {};
|
|
721
721
|
var isDetailedPayload = pageVisibilityAtTTAI === 'visible';
|
|
@@ -724,7 +724,7 @@ function createInteractionMetricsPayload(interaction, interactionId, experimenta
|
|
|
724
724
|
var moreAccuratePageVisibilityAtTTI = calculatePageVisibilityFromTheStartOfPageLoad ? getMoreAccuratePageVisibilityUpToTTI(interaction) : null;
|
|
725
725
|
var moreAccuratePageVisibilityAtTTAI = calculatePageVisibilityFromTheStartOfPageLoad ? getMoreAccuratePageVisibilityUpToTTAI(interaction) : null;
|
|
726
726
|
var labelStack = interaction.labelStack ? {
|
|
727
|
-
labelStack: optimizeLabelStack(interaction.labelStack)
|
|
727
|
+
labelStack: optimizeLabelStack(interaction.labelStack, getReactUFOVersion(interaction.type))
|
|
728
728
|
} : {};
|
|
729
729
|
// Page Load
|
|
730
730
|
var getPageLoadInteractionMetrics = function getPageLoadInteractionMetrics() {
|
|
@@ -754,14 +754,14 @@ function createInteractionMetricsPayload(interaction, interactionId, experimenta
|
|
|
754
754
|
var labelStack = _ref6.labelStack,
|
|
755
755
|
others = _objectWithoutProperties(_ref6, _excluded3);
|
|
756
756
|
return _objectSpread(_objectSpread({}, others), {}, {
|
|
757
|
-
labelStack: labelStack && optimizeLabelStack(labelStack)
|
|
757
|
+
labelStack: labelStack && optimizeLabelStack(labelStack, getReactUFOVersion(interaction.type))
|
|
758
758
|
});
|
|
759
759
|
}),
|
|
760
760
|
holdActive: _toConsumableArray(interaction.holdActive.values()),
|
|
761
761
|
redirects: optimizeRedirects(interaction.redirects, start),
|
|
762
|
-
holdInfo: optimizeHoldInfo(experimental ? interaction.holdExpInfo : interaction.holdInfo, start),
|
|
763
|
-
spans: optimizeSpans(spans, start),
|
|
764
|
-
requestInfo: optimizeRequestInfo(interaction.requestInfo, start),
|
|
762
|
+
holdInfo: optimizeHoldInfo(experimental ? interaction.holdExpInfo : interaction.holdInfo, start, getReactUFOVersion(interaction.type)),
|
|
763
|
+
spans: optimizeSpans(spans, start, getReactUFOVersion(interaction.type)),
|
|
764
|
+
requestInfo: optimizeRequestInfo(interaction.requestInfo, start, getReactUFOVersion(interaction.type)),
|
|
765
765
|
customTimings: optimizeCustomTimings(interaction.customTimings, start),
|
|
766
766
|
bundleEvalTimings: objectToArray(getBundleEvalTimings(start)),
|
|
767
767
|
resourceTimings: objectToArray(resourceTimings)
|
|
@@ -801,8 +801,7 @@ function createInteractionMetricsPayload(interaction, interactionId, experimenta
|
|
|
801
801
|
'event:sizeInKb': 0,
|
|
802
802
|
'event:source': {
|
|
803
803
|
name: 'react-ufo/web',
|
|
804
|
-
version:
|
|
805
|
-
payloadSource: 'platform'
|
|
804
|
+
version: getReactUFOVersion(interaction.type)
|
|
806
805
|
},
|
|
807
806
|
'event:region': config.region || 'unknown',
|
|
808
807
|
'experience:key': experimental ? 'custom.experimental-interaction-metrics' : 'custom.interaction-metrics',
|
|
@@ -826,19 +825,19 @@ function createInteractionMetricsPayload(interaction, interactionId, experimenta
|
|
|
826
825
|
isPreviousInteractionAborted: isPreviousInteractionAborted,
|
|
827
826
|
abortedByInteractionName: abortedByInteractionName,
|
|
828
827
|
// performance
|
|
829
|
-
apdex: optimizeApdex(interaction.apdex),
|
|
828
|
+
apdex: optimizeApdex(interaction.apdex, getReactUFOVersion(interaction.type)),
|
|
830
829
|
end: Math.round(end),
|
|
831
830
|
start: Math.round(start),
|
|
832
|
-
segments:
|
|
831
|
+
segments: getReactUFOVersion(interaction.type) === '2.0.0' ? segmentTree : segments.map(function (_ref7) {
|
|
833
832
|
var labelStack = _ref7.labelStack,
|
|
834
833
|
others = _objectWithoutProperties(_ref7, _excluded4);
|
|
835
834
|
return _objectSpread(_objectSpread({}, others), {}, {
|
|
836
|
-
labelStack: optimizeLabelStack(labelStack)
|
|
835
|
+
labelStack: optimizeLabelStack(labelStack, getReactUFOVersion(interaction.type))
|
|
837
836
|
});
|
|
838
837
|
}),
|
|
839
|
-
marks: optimizeMarks(interaction.marks),
|
|
838
|
+
marks: optimizeMarks(interaction.marks, getReactUFOVersion(interaction.type)),
|
|
840
839
|
customData: optimizeCustomData(interaction),
|
|
841
|
-
reactProfilerTimings: optimizeReactProfilerTimings(interaction.reactProfilerTimings, start)
|
|
840
|
+
reactProfilerTimings: optimizeReactProfilerTimings(interaction.reactProfilerTimings, start, getReactUFOVersion(interaction.type))
|
|
842
841
|
}, labelStack), getPageLoadInteractionMetrics()), getDetailedInteractionMetrics(resourceTimings)), getPageLoadDetailedInteractionMetrics()), getBm3TrackerTimings(interaction)), {}, {
|
|
843
842
|
'metric:ttai': experimental ? regularTTAI || expTTAI : undefined,
|
|
844
843
|
'metric:experimental:ttai': expTTAI
|
|
@@ -3,7 +3,7 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
4
|
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; }
|
|
5
5
|
import coinflip from '../coinflip';
|
|
6
|
-
import {
|
|
6
|
+
import { getReactUFOVersion } from '../common/constants';
|
|
7
7
|
import { getConfig, getPostInteractionRate } from '../config';
|
|
8
8
|
import { isSegmentLabel, sanitizeUfoName } from '../create-payload/common/utils';
|
|
9
9
|
import { getPageVisibilityState } from '../hidden-timing';
|
|
@@ -181,7 +181,7 @@ export default function createPostInteractionLogPayload(_ref2) {
|
|
|
181
181
|
'event:schema': '1.0.0',
|
|
182
182
|
'event:source': {
|
|
183
183
|
name: 'react-ufo/web',
|
|
184
|
-
version:
|
|
184
|
+
version: getReactUFOVersion(lastInteractionFinish.type),
|
|
185
185
|
payloadSource: 'platform'
|
|
186
186
|
},
|
|
187
187
|
'event:region': config.region || 'unknown',
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
1
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
4
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
@@ -653,9 +654,9 @@ export var VCObserver = /*#__PURE__*/function () {
|
|
|
653
654
|
if ((VC[key] === null || VC[key] === undefined) && VCRatio >= value / 100) {
|
|
654
655
|
var _componentsLog$time;
|
|
655
656
|
VC[key] = time;
|
|
656
|
-
VCBox[key] = (_componentsLog$time = componentsLog[time]) === null || _componentsLog$time === void 0 ? void 0 : _componentsLog$time.map(function (v) {
|
|
657
|
+
VCBox[key] = _toConsumableArray(new Set((_componentsLog$time = componentsLog[time]) === null || _componentsLog$time === void 0 ? void 0 : _componentsLog$time.map(function (v) {
|
|
657
658
|
return v.targetName;
|
|
658
|
-
});
|
|
659
|
+
})));
|
|
659
660
|
}
|
|
660
661
|
});
|
|
661
662
|
return VCRatio;
|
|
@@ -667,9 +668,9 @@ export var VCObserver = /*#__PURE__*/function () {
|
|
|
667
668
|
entryPainted = _ref19[1];
|
|
668
669
|
var currentlyPainted = entryPainted + (((_acc$abs = acc.abs[i - 1]) === null || _acc$abs === void 0 ? void 0 : _acc$abs[1]) || 0);
|
|
669
670
|
var currentlyPaintedRatio = Math.round(currentlyPainted / totalPainted * 1000) / 10;
|
|
670
|
-
var logEntry = (_componentsLog$timest = componentsLog[timestamp]) === null || _componentsLog$timest === void 0 ? void 0 : _componentsLog$timest.map(function (v) {
|
|
671
|
+
var logEntry = _toConsumableArray(new Set((_componentsLog$timest = componentsLog[timestamp]) === null || _componentsLog$timest === void 0 ? void 0 : _componentsLog$timest.map(function (v) {
|
|
671
672
|
return v.targetName;
|
|
672
|
-
});
|
|
673
|
+
})));
|
|
673
674
|
var ratioDelta = (currentlyPaintedRatio - ((_acc$rel$vc = (_acc$rel = acc.rel[i - 1]) === null || _acc$rel === void 0 ? void 0 : _acc$rel.vc) !== null && _acc$rel$vc !== void 0 ? _acc$rel$vc : 0)) / 100;
|
|
674
675
|
if (isCalcSpeedIndexEnabled) {
|
|
675
676
|
var speedIndex = timestamp * ratioDelta;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import type { InteractionType } from '../interaction-metrics';
|
|
2
|
+
export declare const getReactUFOVersion: (interactionType: InteractionType) => "1.0.1" | "2.0.0";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { getReactUFOVersion } from '../../../common/constants';
|
|
1
2
|
import type { LabelStack, SegmentLabel } from '../../../interaction-context';
|
|
2
3
|
export type SegmentItem = {
|
|
3
4
|
n: string;
|
|
@@ -11,7 +12,7 @@ export declare function isSegmentLabel(obj: any): obj is SegmentLabel;
|
|
|
11
12
|
export declare function buildSegmentTree(labelStacks: LabelStack[]): SegmentTree;
|
|
12
13
|
export declare function stringifyLabelStackFully(labelStack: LabelStack): string;
|
|
13
14
|
export declare function labelStackStartWith(labelStack: LabelStack, startWith: LabelStack): boolean;
|
|
14
|
-
export declare function optimizeLabelStack(labelStack: LabelStack): string | {
|
|
15
|
+
export declare function optimizeLabelStack(labelStack: LabelStack, reactUFOVersion: ReturnType<typeof getReactUFOVersion>): string | {
|
|
15
16
|
s?: string | undefined;
|
|
16
17
|
n: string;
|
|
17
18
|
}[];
|
|
@@ -716,7 +716,6 @@ export declare function createPayloads(interactionId: string, interaction: Inter
|
|
|
716
716
|
'event:source': {
|
|
717
717
|
name: string;
|
|
718
718
|
version: string;
|
|
719
|
-
payloadSource: string;
|
|
720
719
|
};
|
|
721
720
|
'event:region': string;
|
|
722
721
|
'experience:key': string;
|
|
@@ -1429,7 +1428,6 @@ export declare function createPayloads(interactionId: string, interaction: Inter
|
|
|
1429
1428
|
'event:source': {
|
|
1430
1429
|
name: string;
|
|
1431
1430
|
version: string;
|
|
1432
|
-
payloadSource: string;
|
|
1433
1431
|
};
|
|
1434
1432
|
'event:region': string;
|
|
1435
1433
|
'experience:key': string;
|
|
@@ -2163,7 +2161,6 @@ export declare function createPayloads(interactionId: string, interaction: Inter
|
|
|
2163
2161
|
'event:source': {
|
|
2164
2162
|
name: string;
|
|
2165
2163
|
version: string;
|
|
2166
|
-
payloadSource: string;
|
|
2167
2164
|
};
|
|
2168
2165
|
'event:region': string;
|
|
2169
2166
|
'experience:key': string;
|
|
@@ -2897,7 +2894,6 @@ export declare function createPayloads(interactionId: string, interaction: Inter
|
|
|
2897
2894
|
'event:source': {
|
|
2898
2895
|
name: string;
|
|
2899
2896
|
version: string;
|
|
2900
|
-
payloadSource: string;
|
|
2901
2897
|
};
|
|
2902
2898
|
'event:region': string;
|
|
2903
2899
|
'experience:key': string;
|
|
@@ -3613,7 +3609,6 @@ export declare function createPayloads(interactionId: string, interaction: Inter
|
|
|
3613
3609
|
'event:source': {
|
|
3614
3610
|
name: string;
|
|
3615
3611
|
version: string;
|
|
3616
|
-
payloadSource: string;
|
|
3617
3612
|
};
|
|
3618
3613
|
'event:region': string;
|
|
3619
3614
|
'experience:key': string;
|
|
@@ -4329,7 +4324,6 @@ export declare function createPayloads(interactionId: string, interaction: Inter
|
|
|
4329
4324
|
'event:source': {
|
|
4330
4325
|
name: string;
|
|
4331
4326
|
version: string;
|
|
4332
|
-
payloadSource: string;
|
|
4333
4327
|
};
|
|
4334
4328
|
'event:region': string;
|
|
4335
4329
|
'experience:key': string;
|
|
@@ -5066,7 +5060,6 @@ export declare function createPayloads(interactionId: string, interaction: Inter
|
|
|
5066
5060
|
'event:source': {
|
|
5067
5061
|
name: string;
|
|
5068
5062
|
version: string;
|
|
5069
|
-
payloadSource: string;
|
|
5070
5063
|
};
|
|
5071
5064
|
'event:region': string;
|
|
5072
5065
|
'experience:key': string;
|
|
@@ -5803,7 +5796,6 @@ export declare function createPayloads(interactionId: string, interaction: Inter
|
|
|
5803
5796
|
'event:source': {
|
|
5804
5797
|
name: string;
|
|
5805
5798
|
version: string;
|
|
5806
|
-
payloadSource: string;
|
|
5807
5799
|
};
|
|
5808
5800
|
'event:region': string;
|
|
5809
5801
|
'experience:key': string;
|
|
@@ -6516,7 +6508,6 @@ export declare function createPayloads(interactionId: string, interaction: Inter
|
|
|
6516
6508
|
'event:source': {
|
|
6517
6509
|
name: string;
|
|
6518
6510
|
version: string;
|
|
6519
|
-
payloadSource: string;
|
|
6520
6511
|
};
|
|
6521
6512
|
'event:region': string;
|
|
6522
6513
|
'experience:key': string;
|
|
@@ -7229,7 +7220,6 @@ export declare function createPayloads(interactionId: string, interaction: Inter
|
|
|
7229
7220
|
'event:source': {
|
|
7230
7221
|
name: string;
|
|
7231
7222
|
version: string;
|
|
7232
|
-
payloadSource: string;
|
|
7233
7223
|
};
|
|
7234
7224
|
'event:region': string;
|
|
7235
7225
|
'experience:key': string;
|
|
@@ -7963,7 +7953,6 @@ export declare function createPayloads(interactionId: string, interaction: Inter
|
|
|
7963
7953
|
'event:source': {
|
|
7964
7954
|
name: string;
|
|
7965
7955
|
version: string;
|
|
7966
|
-
payloadSource: string;
|
|
7967
7956
|
};
|
|
7968
7957
|
'event:region': string;
|
|
7969
7958
|
'experience:key': string;
|
|
@@ -8697,7 +8686,6 @@ export declare function createPayloads(interactionId: string, interaction: Inter
|
|
|
8697
8686
|
'event:source': {
|
|
8698
8687
|
name: string;
|
|
8699
8688
|
version: string;
|
|
8700
|
-
payloadSource: string;
|
|
8701
8689
|
};
|
|
8702
8690
|
'event:region': string;
|
|
8703
8691
|
'experience:key': string;
|
|
@@ -9413,7 +9401,6 @@ export declare function createPayloads(interactionId: string, interaction: Inter
|
|
|
9413
9401
|
'event:source': {
|
|
9414
9402
|
name: string;
|
|
9415
9403
|
version: string;
|
|
9416
|
-
payloadSource: string;
|
|
9417
9404
|
};
|
|
9418
9405
|
'event:region': string;
|
|
9419
9406
|
'experience:key': string;
|
|
@@ -10129,7 +10116,6 @@ export declare function createPayloads(interactionId: string, interaction: Inter
|
|
|
10129
10116
|
'event:source': {
|
|
10130
10117
|
name: string;
|
|
10131
10118
|
version: string;
|
|
10132
|
-
payloadSource: string;
|
|
10133
10119
|
};
|
|
10134
10120
|
'event:region': string;
|
|
10135
10121
|
'experience:key': string;
|
|
@@ -10866,7 +10852,6 @@ export declare function createPayloads(interactionId: string, interaction: Inter
|
|
|
10866
10852
|
'event:source': {
|
|
10867
10853
|
name: string;
|
|
10868
10854
|
version: string;
|
|
10869
|
-
payloadSource: string;
|
|
10870
10855
|
};
|
|
10871
10856
|
'event:region': string;
|
|
10872
10857
|
'experience:key': string;
|
|
@@ -11603,7 +11588,6 @@ export declare function createPayloads(interactionId: string, interaction: Inter
|
|
|
11603
11588
|
'event:source': {
|
|
11604
11589
|
name: string;
|
|
11605
11590
|
version: string;
|
|
11606
|
-
payloadSource: string;
|
|
11607
11591
|
};
|
|
11608
11592
|
'event:region': string;
|
|
11609
11593
|
'experience:key': string;
|
|
@@ -12326,7 +12310,6 @@ export declare function createExperimentalMetricsPayload(interactionId: string,
|
|
|
12326
12310
|
'event:source': {
|
|
12327
12311
|
name: string;
|
|
12328
12312
|
version: string;
|
|
12329
|
-
payloadSource: string;
|
|
12330
12313
|
};
|
|
12331
12314
|
'event:region': string;
|
|
12332
12315
|
'experience:key': string;
|
|
@@ -13039,7 +13022,6 @@ export declare function createExperimentalMetricsPayload(interactionId: string,
|
|
|
13039
13022
|
'event:source': {
|
|
13040
13023
|
name: string;
|
|
13041
13024
|
version: string;
|
|
13042
|
-
payloadSource: string;
|
|
13043
13025
|
};
|
|
13044
13026
|
'event:region': string;
|
|
13045
13027
|
'experience:key': string;
|
|
@@ -13773,7 +13755,6 @@ export declare function createExperimentalMetricsPayload(interactionId: string,
|
|
|
13773
13755
|
'event:source': {
|
|
13774
13756
|
name: string;
|
|
13775
13757
|
version: string;
|
|
13776
|
-
payloadSource: string;
|
|
13777
13758
|
};
|
|
13778
13759
|
'event:region': string;
|
|
13779
13760
|
'experience:key': string;
|
|
@@ -14507,7 +14488,6 @@ export declare function createExperimentalMetricsPayload(interactionId: string,
|
|
|
14507
14488
|
'event:source': {
|
|
14508
14489
|
name: string;
|
|
14509
14490
|
version: string;
|
|
14510
|
-
payloadSource: string;
|
|
14511
14491
|
};
|
|
14512
14492
|
'event:region': string;
|
|
14513
14493
|
'experience:key': string;
|
|
@@ -15223,7 +15203,6 @@ export declare function createExperimentalMetricsPayload(interactionId: string,
|
|
|
15223
15203
|
'event:source': {
|
|
15224
15204
|
name: string;
|
|
15225
15205
|
version: string;
|
|
15226
|
-
payloadSource: string;
|
|
15227
15206
|
};
|
|
15228
15207
|
'event:region': string;
|
|
15229
15208
|
'experience:key': string;
|
|
@@ -15939,7 +15918,6 @@ export declare function createExperimentalMetricsPayload(interactionId: string,
|
|
|
15939
15918
|
'event:source': {
|
|
15940
15919
|
name: string;
|
|
15941
15920
|
version: string;
|
|
15942
|
-
payloadSource: string;
|
|
15943
15921
|
};
|
|
15944
15922
|
'event:region': string;
|
|
15945
15923
|
'experience:key': string;
|
|
@@ -16676,7 +16654,6 @@ export declare function createExperimentalMetricsPayload(interactionId: string,
|
|
|
16676
16654
|
'event:source': {
|
|
16677
16655
|
name: string;
|
|
16678
16656
|
version: string;
|
|
16679
|
-
payloadSource: string;
|
|
16680
16657
|
};
|
|
16681
16658
|
'event:region': string;
|
|
16682
16659
|
'experience:key': string;
|
|
@@ -17413,7 +17390,6 @@ export declare function createExperimentalMetricsPayload(interactionId: string,
|
|
|
17413
17390
|
'event:source': {
|
|
17414
17391
|
name: string;
|
|
17415
17392
|
version: string;
|
|
17416
|
-
payloadSource: string;
|
|
17417
17393
|
};
|
|
17418
17394
|
'event:region': string;
|
|
17419
17395
|
'experience:key': string;
|
|
@@ -18126,7 +18102,6 @@ export declare function createExperimentalMetricsPayload(interactionId: string,
|
|
|
18126
18102
|
'event:source': {
|
|
18127
18103
|
name: string;
|
|
18128
18104
|
version: string;
|
|
18129
|
-
payloadSource: string;
|
|
18130
18105
|
};
|
|
18131
18106
|
'event:region': string;
|
|
18132
18107
|
'experience:key': string;
|
|
@@ -18839,7 +18814,6 @@ export declare function createExperimentalMetricsPayload(interactionId: string,
|
|
|
18839
18814
|
'event:source': {
|
|
18840
18815
|
name: string;
|
|
18841
18816
|
version: string;
|
|
18842
|
-
payloadSource: string;
|
|
18843
18817
|
};
|
|
18844
18818
|
'event:region': string;
|
|
18845
18819
|
'experience:key': string;
|
|
@@ -19573,7 +19547,6 @@ export declare function createExperimentalMetricsPayload(interactionId: string,
|
|
|
19573
19547
|
'event:source': {
|
|
19574
19548
|
name: string;
|
|
19575
19549
|
version: string;
|
|
19576
|
-
payloadSource: string;
|
|
19577
19550
|
};
|
|
19578
19551
|
'event:region': string;
|
|
19579
19552
|
'experience:key': string;
|
|
@@ -20307,7 +20280,6 @@ export declare function createExperimentalMetricsPayload(interactionId: string,
|
|
|
20307
20280
|
'event:source': {
|
|
20308
20281
|
name: string;
|
|
20309
20282
|
version: string;
|
|
20310
|
-
payloadSource: string;
|
|
20311
20283
|
};
|
|
20312
20284
|
'event:region': string;
|
|
20313
20285
|
'experience:key': string;
|
|
@@ -21023,7 +20995,6 @@ export declare function createExperimentalMetricsPayload(interactionId: string,
|
|
|
21023
20995
|
'event:source': {
|
|
21024
20996
|
name: string;
|
|
21025
20997
|
version: string;
|
|
21026
|
-
payloadSource: string;
|
|
21027
20998
|
};
|
|
21028
20999
|
'event:region': string;
|
|
21029
21000
|
'experience:key': string;
|
|
@@ -21739,7 +21710,6 @@ export declare function createExperimentalMetricsPayload(interactionId: string,
|
|
|
21739
21710
|
'event:source': {
|
|
21740
21711
|
name: string;
|
|
21741
21712
|
version: string;
|
|
21742
|
-
payloadSource: string;
|
|
21743
21713
|
};
|
|
21744
21714
|
'event:region': string;
|
|
21745
21715
|
'experience:key': string;
|
|
@@ -22476,7 +22446,6 @@ export declare function createExperimentalMetricsPayload(interactionId: string,
|
|
|
22476
22446
|
'event:source': {
|
|
22477
22447
|
name: string;
|
|
22478
22448
|
version: string;
|
|
22479
|
-
payloadSource: string;
|
|
22480
22449
|
};
|
|
22481
22450
|
'event:region': string;
|
|
22482
22451
|
'experience:key': string;
|
|
@@ -23213,7 +23182,6 @@ export declare function createExperimentalMetricsPayload(interactionId: string,
|
|
|
23213
23182
|
'event:source': {
|
|
23214
23183
|
name: string;
|
|
23215
23184
|
version: string;
|
|
23216
|
-
payloadSource: string;
|
|
23217
23185
|
};
|
|
23218
23186
|
'event:region': string;
|
|
23219
23187
|
'experience:key': string;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import type { InteractionType } from '../interaction-metrics';
|
|
2
|
+
export declare const getReactUFOVersion: (interactionType: InteractionType) => "1.0.1" | "2.0.0";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { getReactUFOVersion } from '../../../common/constants';
|
|
1
2
|
import type { LabelStack, SegmentLabel } from '../../../interaction-context';
|
|
2
3
|
export type SegmentItem = {
|
|
3
4
|
n: string;
|
|
@@ -11,7 +12,7 @@ export declare function isSegmentLabel(obj: any): obj is SegmentLabel;
|
|
|
11
12
|
export declare function buildSegmentTree(labelStacks: LabelStack[]): SegmentTree;
|
|
12
13
|
export declare function stringifyLabelStackFully(labelStack: LabelStack): string;
|
|
13
14
|
export declare function labelStackStartWith(labelStack: LabelStack, startWith: LabelStack): boolean;
|
|
14
|
-
export declare function optimizeLabelStack(labelStack: LabelStack): string | {
|
|
15
|
+
export declare function optimizeLabelStack(labelStack: LabelStack, reactUFOVersion: ReturnType<typeof getReactUFOVersion>): string | {
|
|
15
16
|
s?: string | undefined;
|
|
16
17
|
n: string;
|
|
17
18
|
}[];
|