@atlaskit/react-ufo 3.1.0 → 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 +19 -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/cjs/vc/vc-observer/revisions/fy25_01.js +42 -32
- package/dist/cjs/vc/vc-observer/revisions/fy25_02.js +68 -0
- package/dist/cjs/vc/vc-observer/revisions/revisions.js +4 -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/es2019/vc/vc-observer/revisions/fy25_01.js +37 -24
- package/dist/es2019/vc/vc-observer/revisions/fy25_02.js +44 -0
- package/dist/es2019/vc/vc-observer/revisions/revisions.js +4 -4
- 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/esm/vc/vc-observer/revisions/fy25_01.js +42 -32
- package/dist/esm/vc/vc-observer/revisions/fy25_02.js +61 -0
- package/dist/esm/vc/vc-observer/revisions/revisions.js +4 -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/vc/vc-observer/revisions/fy25_01.d.ts +4 -7
- package/dist/types/vc/vc-observer/revisions/fy25_02.d.ts +16 -0
- 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/dist/types-ts4.5/vc/vc-observer/revisions/fy25_01.d.ts +4 -7
- package/dist/types-ts4.5/vc/vc-observer/revisions/fy25_02.d.ts +16 -0
- package/package.json +1 -1
- package/dist/cjs/vc/vc-observer/revisions/fy24_01.js +0 -78
- package/dist/es2019/vc/vc-observer/revisions/fy24_01.js +0 -57
- package/dist/esm/vc/vc-observer/revisions/fy24_01.js +0 -71
- package/dist/types/vc/vc-observer/revisions/fy24_01.d.ts +0 -13
- package/dist/types-ts4.5/vc/vc-observer/revisions/fy24_01.d.ts +0 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @atlaskit/ufo-interaction-ignore
|
|
2
2
|
|
|
3
|
+
## 3.1.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#119178](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/119178)
|
|
8
|
+
[`f0b97fc480d38`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f0b97fc480d38) -
|
|
9
|
+
dedupe DOM element selectors within VC debug data
|
|
10
|
+
- [#119697](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/119697)
|
|
11
|
+
[`62268803ec9e6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/62268803ec9e6) -
|
|
12
|
+
refactor logic to get react ufo version
|
|
13
|
+
|
|
14
|
+
## 3.1.1
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- [#119087](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/119087)
|
|
19
|
+
[`24baefc255cbc`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/24baefc255cbc) -
|
|
20
|
+
Rename revision name
|
|
21
|
+
|
|
3
22
|
## 3.1.0
|
|
4
23
|
|
|
5
24
|
### Minor Changes
|
|
@@ -3,7 +3,16 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.getReactUFOVersion = void 0;
|
|
7
7
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
var getReactUFOVersion = exports.getReactUFOVersion = function getReactUFOVersion(interactionType) {
|
|
9
|
+
if (interactionType !== 'page_load' && interactionType !== 'transition') {
|
|
10
|
+
return '1.0.1';
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
14
|
+
if (!(0, _platformFeatureFlags.fg)('enable-react-ufo-payload-segment-compressed')) {
|
|
15
|
+
return '1.0.1';
|
|
16
|
+
}
|
|
17
|
+
return '2.0.0';
|
|
18
|
+
};
|
|
@@ -11,9 +11,8 @@ exports.optimizeLabelStack = optimizeLabelStack;
|
|
|
11
11
|
exports.sanitizeUfoName = void 0;
|
|
12
12
|
exports.stringifyLabelStackFully = stringifyLabelStackFully;
|
|
13
13
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
14
|
-
var _constants = require("../../../common/constants");
|
|
15
14
|
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; }
|
|
16
|
-
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) { (0, _defineProperty2.default)(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; }
|
|
15
|
+
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) { (0, _defineProperty2.default)(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; }
|
|
17
16
|
var sanitizeUfoName = exports.sanitizeUfoName = function sanitizeUfoName(name) {
|
|
18
17
|
return name.replace(/_/g, '-');
|
|
19
18
|
};
|
|
@@ -62,8 +61,8 @@ function getLabelStackReference(labelStack) {
|
|
|
62
61
|
function labelStackStartWith(labelStack, startWith) {
|
|
63
62
|
return stringifyLabelStackFully(labelStack).startsWith(stringifyLabelStackFully(startWith));
|
|
64
63
|
}
|
|
65
|
-
function optimizeLabelStack(labelStack) {
|
|
66
|
-
return
|
|
64
|
+
function optimizeLabelStack(labelStack, reactUFOVersion) {
|
|
65
|
+
return reactUFOVersion ? getLabelStackReference(labelStack) : labelStack.map(function (ls) {
|
|
67
66
|
return _objectSpread({
|
|
68
67
|
n: ls.name
|
|
69
68
|
}, ls.segmentId ? {
|
|
@@ -393,7 +393,7 @@ function optimizeCustomData(interaction) {
|
|
|
393
393
|
var label = (0, _utils.stringifyLabelStackFully)(labelStack);
|
|
394
394
|
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 : {};
|
|
395
395
|
result.set(label, {
|
|
396
|
-
labelStack: (0, _utils.optimizeLabelStack)(labelStack),
|
|
396
|
+
labelStack: (0, _utils.optimizeLabelStack)(labelStack, (0, _constants.getReactUFOVersion)(interaction.type)),
|
|
397
397
|
data: Object.assign(value, data)
|
|
398
398
|
});
|
|
399
399
|
return result;
|
|
@@ -410,7 +410,7 @@ function optimizeCustomData(interaction) {
|
|
|
410
410
|
var label = (0, _utils.stringifyLabelStackFully)([]);
|
|
411
411
|
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 : {};
|
|
412
412
|
result.set(label, {
|
|
413
|
-
labelStack: (0, _utils.optimizeLabelStack)([]),
|
|
413
|
+
labelStack: (0, _utils.optimizeLabelStack)([], (0, _constants.getReactUFOVersion)(interaction.type)),
|
|
414
414
|
data: Object.assign(labelValue, (0, _defineProperty2.default)({}, _key, value))
|
|
415
415
|
});
|
|
416
416
|
}
|
|
@@ -420,7 +420,7 @@ function optimizeCustomData(interaction) {
|
|
|
420
420
|
}
|
|
421
421
|
return (0, _toConsumableArray2.default)(customDataMap.values());
|
|
422
422
|
}
|
|
423
|
-
function optimizeReactProfilerTimings(reactProfilerTimings, interactionStart) {
|
|
423
|
+
function optimizeReactProfilerTimings(reactProfilerTimings, interactionStart, reactUFOVersion) {
|
|
424
424
|
var reactProfilerTimingsMap = reactProfilerTimings.reduce(function (result, _ref3) {
|
|
425
425
|
var labelStack = _ref3.labelStack,
|
|
426
426
|
startTime = _ref3.startTime,
|
|
@@ -432,7 +432,7 @@ function optimizeReactProfilerTimings(reactProfilerTimings, interactionStart) {
|
|
|
432
432
|
var start = Math.round(startTime);
|
|
433
433
|
var end = Math.round(commitTime);
|
|
434
434
|
var timing = result.get(label) || {
|
|
435
|
-
labelStack: (0, _utils.optimizeLabelStack)(labelStack),
|
|
435
|
+
labelStack: (0, _utils.optimizeLabelStack)(labelStack, reactUFOVersion),
|
|
436
436
|
startTime: start,
|
|
437
437
|
endTime: end,
|
|
438
438
|
mountCount: 0,
|
|
@@ -479,7 +479,7 @@ function optimizeRedirects(redirects, interactionStart) {
|
|
|
479
479
|
}, []);
|
|
480
480
|
return updatedRedirects;
|
|
481
481
|
}
|
|
482
|
-
function optimizeHoldInfo(holdInfo, interactionStart) {
|
|
482
|
+
function optimizeHoldInfo(holdInfo, interactionStart, reactUFOVersion) {
|
|
483
483
|
var holdInfoMap = holdInfo.reduce(function (result, hold) {
|
|
484
484
|
var labelStack = hold.labelStack,
|
|
485
485
|
name = hold.name,
|
|
@@ -495,7 +495,7 @@ function optimizeHoldInfo(holdInfo, interactionStart) {
|
|
|
495
495
|
var timing = result.get(label) || {
|
|
496
496
|
labelStack: (0, _utils.optimizeLabelStack)([].concat((0, _toConsumableArray2.default)(labelStack), [{
|
|
497
497
|
name: name
|
|
498
|
-
}])),
|
|
498
|
+
}]), reactUFOVersion),
|
|
499
499
|
startTime: startTime,
|
|
500
500
|
endTime: endTime
|
|
501
501
|
};
|
|
@@ -511,7 +511,7 @@ function optimizeHoldInfo(holdInfo, interactionStart) {
|
|
|
511
511
|
}, new Map());
|
|
512
512
|
return (0, _toConsumableArray2.default)(holdInfoMap.values());
|
|
513
513
|
}
|
|
514
|
-
function optimizeSpans(spans, interactionStart) {
|
|
514
|
+
function optimizeSpans(spans, interactionStart, reactUFOVersion) {
|
|
515
515
|
var updatedSpans = spans.reduce(function (result, span) {
|
|
516
516
|
var labelStack = span.labelStack,
|
|
517
517
|
type = span.type,
|
|
@@ -522,7 +522,7 @@ function optimizeSpans(spans, interactionStart) {
|
|
|
522
522
|
result.push({
|
|
523
523
|
labelStack: (0, _utils.optimizeLabelStack)([].concat((0, _toConsumableArray2.default)(labelStack), [{
|
|
524
524
|
name: name
|
|
525
|
-
}])),
|
|
525
|
+
}]), reactUFOVersion),
|
|
526
526
|
startTime: Math.round(start),
|
|
527
527
|
endTime: Math.round(end),
|
|
528
528
|
type: type
|
|
@@ -532,7 +532,7 @@ function optimizeSpans(spans, interactionStart) {
|
|
|
532
532
|
}, []);
|
|
533
533
|
return updatedSpans;
|
|
534
534
|
}
|
|
535
|
-
function optimizeRequestInfo(requestInfo, interactionStart) {
|
|
535
|
+
function optimizeRequestInfo(requestInfo, interactionStart, reactUFOVersion) {
|
|
536
536
|
var updatedRequestInfo = requestInfo.reduce(function (result, reqInfo) {
|
|
537
537
|
var labelStack = reqInfo.labelStack,
|
|
538
538
|
name = reqInfo.name,
|
|
@@ -546,7 +546,7 @@ function optimizeRequestInfo(requestInfo, interactionStart) {
|
|
|
546
546
|
result.push({
|
|
547
547
|
labelStack: (0, _utils.optimizeLabelStack)([].concat((0, _toConsumableArray2.default)(labelStack), [{
|
|
548
548
|
name: name
|
|
549
|
-
}])),
|
|
549
|
+
}]), reactUFOVersion),
|
|
550
550
|
startTime: Math.round(startTime),
|
|
551
551
|
endTime: Math.round(endTime)
|
|
552
552
|
});
|
|
@@ -571,18 +571,18 @@ function optimizeCustomTimings(customTimings, interactionStart) {
|
|
|
571
571
|
return result;
|
|
572
572
|
}, []);
|
|
573
573
|
}
|
|
574
|
-
function optimizeMarks(marks) {
|
|
574
|
+
function optimizeMarks(marks, reactUFOVersion) {
|
|
575
575
|
return marks.map(function (_ref4) {
|
|
576
576
|
var labelStack = _ref4.labelStack,
|
|
577
577
|
time = _ref4.time,
|
|
578
578
|
others = (0, _objectWithoutProperties2.default)(_ref4, _excluded);
|
|
579
579
|
return _objectSpread(_objectSpread({}, others), {}, {
|
|
580
|
-
labelStack: labelStack && (0, _utils.optimizeLabelStack)(labelStack),
|
|
580
|
+
labelStack: labelStack && (0, _utils.optimizeLabelStack)(labelStack, reactUFOVersion),
|
|
581
581
|
time: Math.round(time)
|
|
582
582
|
});
|
|
583
583
|
});
|
|
584
584
|
}
|
|
585
|
-
function optimizeApdex(apdex) {
|
|
585
|
+
function optimizeApdex(apdex, reactUFOVersion) {
|
|
586
586
|
return apdex.map(function (_ref5) {
|
|
587
587
|
var stopTime = _ref5.stopTime,
|
|
588
588
|
labelStack = _ref5.labelStack,
|
|
@@ -590,7 +590,7 @@ function optimizeApdex(apdex) {
|
|
|
590
590
|
return _objectSpread(_objectSpread({}, others), {}, {
|
|
591
591
|
stopTime: Math.round(stopTime)
|
|
592
592
|
}, labelStack ? {
|
|
593
|
-
labelStack: (0, _utils.optimizeLabelStack)(labelStack)
|
|
593
|
+
labelStack: (0, _utils.optimizeLabelStack)(labelStack, reactUFOVersion)
|
|
594
594
|
} : {});
|
|
595
595
|
});
|
|
596
596
|
}
|
|
@@ -726,7 +726,7 @@ function createInteractionMetricsPayload(interaction, interactionId, experimenta
|
|
|
726
726
|
var pageVisibilityAtTTI = getPageVisibilityUpToTTI(interaction);
|
|
727
727
|
var pageVisibilityAtTTAI = getPageVisibilityUpToTTAI(interaction);
|
|
728
728
|
var segments = config.killswitchNestedSegments ? [] : knownSegments;
|
|
729
|
-
var segmentTree = _constants.
|
|
729
|
+
var segmentTree = (0, _constants.getReactUFOVersion)(interaction.type) === '2.0.0' ? (0, _utils.buildSegmentTree)(segments.map(function (segment) {
|
|
730
730
|
return segment.labelStack;
|
|
731
731
|
})) : {};
|
|
732
732
|
var isDetailedPayload = pageVisibilityAtTTAI === 'visible';
|
|
@@ -735,7 +735,7 @@ function createInteractionMetricsPayload(interaction, interactionId, experimenta
|
|
|
735
735
|
var moreAccuratePageVisibilityAtTTI = calculatePageVisibilityFromTheStartOfPageLoad ? getMoreAccuratePageVisibilityUpToTTI(interaction) : null;
|
|
736
736
|
var moreAccuratePageVisibilityAtTTAI = calculatePageVisibilityFromTheStartOfPageLoad ? getMoreAccuratePageVisibilityUpToTTAI(interaction) : null;
|
|
737
737
|
var labelStack = interaction.labelStack ? {
|
|
738
|
-
labelStack: (0, _utils.optimizeLabelStack)(interaction.labelStack)
|
|
738
|
+
labelStack: (0, _utils.optimizeLabelStack)(interaction.labelStack, (0, _constants.getReactUFOVersion)(interaction.type))
|
|
739
739
|
} : {};
|
|
740
740
|
// Page Load
|
|
741
741
|
var getPageLoadInteractionMetrics = function getPageLoadInteractionMetrics() {
|
|
@@ -765,14 +765,14 @@ function createInteractionMetricsPayload(interaction, interactionId, experimenta
|
|
|
765
765
|
var labelStack = _ref6.labelStack,
|
|
766
766
|
others = (0, _objectWithoutProperties2.default)(_ref6, _excluded3);
|
|
767
767
|
return _objectSpread(_objectSpread({}, others), {}, {
|
|
768
|
-
labelStack: labelStack && (0, _utils.optimizeLabelStack)(labelStack)
|
|
768
|
+
labelStack: labelStack && (0, _utils.optimizeLabelStack)(labelStack, (0, _constants.getReactUFOVersion)(interaction.type))
|
|
769
769
|
});
|
|
770
770
|
}),
|
|
771
771
|
holdActive: (0, _toConsumableArray2.default)(interaction.holdActive.values()),
|
|
772
772
|
redirects: optimizeRedirects(interaction.redirects, start),
|
|
773
|
-
holdInfo: optimizeHoldInfo(experimental ? interaction.holdExpInfo : interaction.holdInfo, start),
|
|
774
|
-
spans: optimizeSpans(spans, start),
|
|
775
|
-
requestInfo: optimizeRequestInfo(interaction.requestInfo, start),
|
|
773
|
+
holdInfo: optimizeHoldInfo(experimental ? interaction.holdExpInfo : interaction.holdInfo, start, (0, _constants.getReactUFOVersion)(interaction.type)),
|
|
774
|
+
spans: optimizeSpans(spans, start, (0, _constants.getReactUFOVersion)(interaction.type)),
|
|
775
|
+
requestInfo: optimizeRequestInfo(interaction.requestInfo, start, (0, _constants.getReactUFOVersion)(interaction.type)),
|
|
776
776
|
customTimings: optimizeCustomTimings(interaction.customTimings, start),
|
|
777
777
|
bundleEvalTimings: objectToArray(getBundleEvalTimings(start)),
|
|
778
778
|
resourceTimings: objectToArray(resourceTimings)
|
|
@@ -812,8 +812,7 @@ function createInteractionMetricsPayload(interaction, interactionId, experimenta
|
|
|
812
812
|
'event:sizeInKb': 0,
|
|
813
813
|
'event:source': {
|
|
814
814
|
name: 'react-ufo/web',
|
|
815
|
-
version: _constants.
|
|
816
|
-
payloadSource: 'platform'
|
|
815
|
+
version: (0, _constants.getReactUFOVersion)(interaction.type)
|
|
817
816
|
},
|
|
818
817
|
'event:region': config.region || 'unknown',
|
|
819
818
|
'experience:key': experimental ? 'custom.experimental-interaction-metrics' : 'custom.interaction-metrics',
|
|
@@ -837,19 +836,19 @@ function createInteractionMetricsPayload(interaction, interactionId, experimenta
|
|
|
837
836
|
isPreviousInteractionAborted: isPreviousInteractionAborted,
|
|
838
837
|
abortedByInteractionName: abortedByInteractionName,
|
|
839
838
|
// performance
|
|
840
|
-
apdex: optimizeApdex(interaction.apdex),
|
|
839
|
+
apdex: optimizeApdex(interaction.apdex, (0, _constants.getReactUFOVersion)(interaction.type)),
|
|
841
840
|
end: Math.round(end),
|
|
842
841
|
start: Math.round(start),
|
|
843
|
-
segments: _constants.
|
|
842
|
+
segments: (0, _constants.getReactUFOVersion)(interaction.type) === '2.0.0' ? segmentTree : segments.map(function (_ref7) {
|
|
844
843
|
var labelStack = _ref7.labelStack,
|
|
845
844
|
others = (0, _objectWithoutProperties2.default)(_ref7, _excluded4);
|
|
846
845
|
return _objectSpread(_objectSpread({}, others), {}, {
|
|
847
|
-
labelStack: (0, _utils.optimizeLabelStack)(labelStack)
|
|
846
|
+
labelStack: (0, _utils.optimizeLabelStack)(labelStack, (0, _constants.getReactUFOVersion)(interaction.type))
|
|
848
847
|
});
|
|
849
848
|
}),
|
|
850
|
-
marks: optimizeMarks(interaction.marks),
|
|
849
|
+
marks: optimizeMarks(interaction.marks, (0, _constants.getReactUFOVersion)(interaction.type)),
|
|
851
850
|
customData: optimizeCustomData(interaction),
|
|
852
|
-
reactProfilerTimings: optimizeReactProfilerTimings(interaction.reactProfilerTimings, start)
|
|
851
|
+
reactProfilerTimings: optimizeReactProfilerTimings(interaction.reactProfilerTimings, start, (0, _constants.getReactUFOVersion)(interaction.type))
|
|
853
852
|
}, labelStack), getPageLoadInteractionMetrics()), getDetailedInteractionMetrics(resourceTimings)), getPageLoadDetailedInteractionMetrics()), getBm3TrackerTimings(interaction)), {}, {
|
|
854
853
|
'metric:ttai': experimental ? regularTTAI || expTTAI : undefined,
|
|
855
854
|
'metric:experimental:ttai': expTTAI
|
|
@@ -188,7 +188,7 @@ function createPostInteractionLogPayload(_ref2) {
|
|
|
188
188
|
'event:schema': '1.0.0',
|
|
189
189
|
'event:source': {
|
|
190
190
|
name: 'react-ufo/web',
|
|
191
|
-
version: _constants.
|
|
191
|
+
version: (0, _constants.getReactUFOVersion)(lastInteractionFinish.type),
|
|
192
192
|
payloadSource: 'platform'
|
|
193
193
|
},
|
|
194
194
|
'event:region': config.region || 'unknown',
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.VCObserver = void 0;
|
|
8
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
8
9
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
9
10
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
11
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
@@ -660,9 +661,9 @@ var VCObserver = exports.VCObserver = /*#__PURE__*/function () {
|
|
|
660
661
|
if ((VC[key] === null || VC[key] === undefined) && VCRatio >= value / 100) {
|
|
661
662
|
var _componentsLog$time;
|
|
662
663
|
VC[key] = time;
|
|
663
|
-
VCBox[key] = (_componentsLog$time = componentsLog[time]) === null || _componentsLog$time === void 0 ? void 0 : _componentsLog$time.map(function (v) {
|
|
664
|
+
VCBox[key] = (0, _toConsumableArray2.default)(new Set((_componentsLog$time = componentsLog[time]) === null || _componentsLog$time === void 0 ? void 0 : _componentsLog$time.map(function (v) {
|
|
664
665
|
return v.targetName;
|
|
665
|
-
});
|
|
666
|
+
})));
|
|
666
667
|
}
|
|
667
668
|
});
|
|
668
669
|
return VCRatio;
|
|
@@ -674,9 +675,9 @@ var VCObserver = exports.VCObserver = /*#__PURE__*/function () {
|
|
|
674
675
|
entryPainted = _ref19[1];
|
|
675
676
|
var currentlyPainted = entryPainted + (((_acc$abs = acc.abs[i - 1]) === null || _acc$abs === void 0 ? void 0 : _acc$abs[1]) || 0);
|
|
676
677
|
var currentlyPaintedRatio = Math.round(currentlyPainted / totalPainted * 1000) / 10;
|
|
677
|
-
var logEntry = (_componentsLog$timest = componentsLog[timestamp]) === null || _componentsLog$timest === void 0 ? void 0 : _componentsLog$timest.map(function (v) {
|
|
678
|
+
var logEntry = (0, _toConsumableArray2.default)(new Set((_componentsLog$timest = componentsLog[timestamp]) === null || _componentsLog$timest === void 0 ? void 0 : _componentsLog$timest.map(function (v) {
|
|
678
679
|
return v.targetName;
|
|
679
|
-
});
|
|
680
|
+
})));
|
|
680
681
|
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;
|
|
681
682
|
if (isCalcSpeedIndexEnabled) {
|
|
682
683
|
var speedIndex = timestamp * ratioDelta;
|
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.revFY25_01Classifier = exports.FY25_01Classifier = void 0;
|
|
8
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
9
8
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
10
9
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
11
10
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
@@ -13,56 +12,67 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
|
13
12
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
14
13
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
15
14
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
|
-
var
|
|
17
|
-
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; }
|
|
18
|
-
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) { (0, _defineProperty2.default)(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; }
|
|
15
|
+
var _ViewportUpdateClassifier = require("./ViewportUpdateClassifier");
|
|
19
16
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
20
17
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
21
|
-
var
|
|
18
|
+
var legacyIgnoreReasons = ['image', 'ssr-hydration', 'editor-lazy-node-view', 'editor-container-mutation'];
|
|
19
|
+
var FY25_01Classifier = exports.FY25_01Classifier = /*#__PURE__*/function (_ViewportUpdateClassi) {
|
|
22
20
|
function FY25_01Classifier() {
|
|
23
21
|
var _this;
|
|
24
22
|
(0, _classCallCheck2.default)(this, FY25_01Classifier);
|
|
25
23
|
_this = _callSuper(this, FY25_01Classifier);
|
|
26
24
|
(0, _defineProperty2.default)(_this, "revision", 'fy25.01');
|
|
27
|
-
(0, _defineProperty2.default)(_this, "types", ['
|
|
25
|
+
(0, _defineProperty2.default)(_this, "types", ['html', 'text']);
|
|
28
26
|
(0, _defineProperty2.default)(_this, "filters", [{
|
|
29
|
-
name: '
|
|
27
|
+
name: 'default-ignore-reasons',
|
|
30
28
|
filter: function filter(_ref) {
|
|
31
29
|
var type = _ref.type,
|
|
32
30
|
ignoreReason = _ref.ignoreReason;
|
|
33
|
-
return !
|
|
31
|
+
return !ignoreReason || !legacyIgnoreReasons.includes(ignoreReason);
|
|
34
32
|
}
|
|
35
33
|
}]);
|
|
36
|
-
(0, _defineProperty2.default)(_this, "removedFilters", []);
|
|
37
34
|
_this.mergeConfig();
|
|
38
35
|
return _this;
|
|
39
36
|
}
|
|
40
|
-
(0, _inherits2.default)(FY25_01Classifier,
|
|
37
|
+
(0, _inherits2.default)(FY25_01Classifier, _ViewportUpdateClassi);
|
|
41
38
|
return (0, _createClass2.default)(FY25_01Classifier, [{
|
|
42
|
-
key: "
|
|
43
|
-
value:
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
var
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
39
|
+
key: "VCCalculationMethod",
|
|
40
|
+
value: function VCCalculationMethod(_ref2) {
|
|
41
|
+
var VCParts = _ref2.VCParts,
|
|
42
|
+
entries = _ref2.entries,
|
|
43
|
+
totalPainted = _ref2.totalPainted,
|
|
44
|
+
componentsLog = _ref2.componentsLog;
|
|
45
|
+
var VC = {};
|
|
46
|
+
var VCBox = {};
|
|
47
|
+
entries.reduce(function () {
|
|
48
|
+
var acc = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
49
|
+
var v = arguments.length > 1 ? arguments[1] : undefined;
|
|
50
|
+
var VCRatio = v[1] / totalPainted + acc;
|
|
51
|
+
var time = v[0];
|
|
52
|
+
if ((0, _platformFeatureFlags.fg)('platform_ufo_fix_vc_observer_rounding_error')) {
|
|
53
|
+
// @todo apply fix to include small changes into accumulator
|
|
54
|
+
var preciseCurrRatio = Math.round(100 * (v[1] / totalPainted));
|
|
55
|
+
var preciseAccRatio = Math.round(acc * 100);
|
|
56
|
+
VCRatio = (preciseCurrRatio + preciseAccRatio) / 100;
|
|
57
|
+
}
|
|
58
|
+
VCParts.forEach(function (value) {
|
|
59
|
+
if ((VC[value] === null || VC[value] === undefined) && VCRatio >= value / 100) {
|
|
60
|
+
var _componentsLog$time;
|
|
61
|
+
VC[value] = time;
|
|
62
|
+
VCBox[value] = new Set();
|
|
63
|
+
(_componentsLog$time = componentsLog[time]) === null || _componentsLog$time === void 0 || _componentsLog$time.forEach(function (v) {
|
|
64
|
+
var _VCBox$value;
|
|
65
|
+
return (_VCBox$value = VCBox[value]) === null || _VCBox$value === void 0 ? void 0 : _VCBox$value.add(v.targetName);
|
|
66
|
+
});
|
|
59
67
|
}
|
|
60
68
|
});
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
69
|
+
return VCRatio;
|
|
70
|
+
}, 0);
|
|
71
|
+
return {
|
|
72
|
+
VC: VC,
|
|
73
|
+
VCBox: VCBox
|
|
74
|
+
};
|
|
65
75
|
}
|
|
66
76
|
}]);
|
|
67
|
-
}(
|
|
77
|
+
}(_ViewportUpdateClassifier.ViewportUpdateClassifier);
|
|
68
78
|
var revFY25_01Classifier = exports.revFY25_01Classifier = new FY25_01Classifier();
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.revFY25_02Classifier = exports.FY25_02Classifier = void 0;
|
|
8
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
9
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
10
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
11
|
+
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
12
|
+
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
13
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
14
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
15
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
|
+
var _fy25_ = require("./fy25_01");
|
|
17
|
+
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; }
|
|
18
|
+
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) { (0, _defineProperty2.default)(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; }
|
|
19
|
+
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
20
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
21
|
+
var FY25_02Classifier = exports.FY25_02Classifier = /*#__PURE__*/function (_FY25_01Classifier) {
|
|
22
|
+
function FY25_02Classifier() {
|
|
23
|
+
var _this;
|
|
24
|
+
(0, _classCallCheck2.default)(this, FY25_02Classifier);
|
|
25
|
+
_this = _callSuper(this, FY25_02Classifier);
|
|
26
|
+
(0, _defineProperty2.default)(_this, "revision", 'fy25.02');
|
|
27
|
+
(0, _defineProperty2.default)(_this, "types", ['attr']);
|
|
28
|
+
(0, _defineProperty2.default)(_this, "filters", [{
|
|
29
|
+
name: 'not-visible',
|
|
30
|
+
filter: function filter(_ref) {
|
|
31
|
+
var type = _ref.type,
|
|
32
|
+
ignoreReason = _ref.ignoreReason;
|
|
33
|
+
return !(ignoreReason !== null && ignoreReason !== void 0 && ignoreReason.includes('not-visible'));
|
|
34
|
+
}
|
|
35
|
+
}]);
|
|
36
|
+
(0, _defineProperty2.default)(_this, "removedFilters", []);
|
|
37
|
+
_this.mergeConfig();
|
|
38
|
+
return _this;
|
|
39
|
+
}
|
|
40
|
+
(0, _inherits2.default)(FY25_02Classifier, _FY25_01Classifier);
|
|
41
|
+
return (0, _createClass2.default)(FY25_02Classifier, [{
|
|
42
|
+
key: "filterComponentsLog",
|
|
43
|
+
value:
|
|
44
|
+
// @todo remove it once fixed as described: https://product-fabric.atlassian.net/browse/AFO-3443
|
|
45
|
+
function filterComponentsLog(_ref2) {
|
|
46
|
+
var componentsLog = _ref2.componentsLog,
|
|
47
|
+
ttai = _ref2.ttai;
|
|
48
|
+
var _componentsLog = {};
|
|
49
|
+
|
|
50
|
+
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
51
|
+
if ((0, _platformFeatureFlags.fg)('ufo-remove-vc-component-observations-after-ttai')) {
|
|
52
|
+
Object.entries(componentsLog).forEach(function (_ref3) {
|
|
53
|
+
var _ref4 = (0, _slicedToArray2.default)(_ref3, 2),
|
|
54
|
+
_timestamp = _ref4[0],
|
|
55
|
+
value = _ref4[1];
|
|
56
|
+
var timestamp = Number(_timestamp);
|
|
57
|
+
if (ttai > timestamp) {
|
|
58
|
+
_componentsLog[timestamp] = value;
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
} else {
|
|
62
|
+
_componentsLog = _objectSpread({}, componentsLog);
|
|
63
|
+
}
|
|
64
|
+
return _componentsLog;
|
|
65
|
+
}
|
|
66
|
+
}]);
|
|
67
|
+
}(_fy25_.FY25_01Classifier);
|
|
68
|
+
var revFY25_02Classifier = exports.revFY25_02Classifier = new FY25_02Classifier();
|
|
@@ -4,14 +4,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.getRevisions = void 0;
|
|
7
|
-
var _fy24_ = require("./fy24_01");
|
|
8
7
|
var _fy25_ = require("./fy25_01");
|
|
8
|
+
var _fy25_2 = require("./fy25_02");
|
|
9
9
|
var Revisions = [{
|
|
10
|
-
name: 'fy24.01',
|
|
11
|
-
classifier: _fy24_.revFY24_01Classifier
|
|
12
|
-
}, {
|
|
13
10
|
name: 'fy25.01',
|
|
14
11
|
classifier: _fy25_.revFY25_01Classifier
|
|
12
|
+
}, {
|
|
13
|
+
name: 'fy25.02',
|
|
14
|
+
classifier: _fy25_2.revFY25_02Classifier
|
|
15
15
|
}];
|
|
16
16
|
var revisionResultCache = null;
|
|
17
17
|
var getRevisions = exports.getRevisions = function getRevisions() {
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
|
+
export const getReactUFOVersion = interactionType => {
|
|
3
|
+
if (interactionType !== 'page_load' && interactionType !== 'transition') {
|
|
4
|
+
return '1.0.1';
|
|
5
|
+
}
|
|
2
6
|
|
|
3
|
-
// eslint-disable-next-line @atlaskit/platform/
|
|
4
|
-
|
|
7
|
+
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
8
|
+
if (!fg('enable-react-ufo-payload-segment-compressed')) {
|
|
9
|
+
return '1.0.1';
|
|
10
|
+
}
|
|
11
|
+
return '2.0.0';
|
|
12
|
+
};
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-non-null-asserted-optional-chain */
|
|
2
|
-
import { REACT_UFO_VERSION } from '../../../common/constants';
|
|
3
1
|
export const sanitizeUfoName = name => {
|
|
4
2
|
return name.replace(/_/g, '-');
|
|
5
3
|
};
|
|
@@ -46,8 +44,8 @@ function getLabelStackReference(labelStack) {
|
|
|
46
44
|
export function labelStackStartWith(labelStack, startWith) {
|
|
47
45
|
return stringifyLabelStackFully(labelStack).startsWith(stringifyLabelStackFully(startWith));
|
|
48
46
|
}
|
|
49
|
-
export function optimizeLabelStack(labelStack) {
|
|
50
|
-
return
|
|
47
|
+
export function optimizeLabelStack(labelStack, reactUFOVersion) {
|
|
48
|
+
return reactUFOVersion ? getLabelStackReference(labelStack) : labelStack.map(ls => ({
|
|
51
49
|
n: ls.name,
|
|
52
50
|
...(ls.segmentId ? {
|
|
53
51
|
s: ls.segmentId
|