@atlaskit/react-ufo 4.5.5 → 4.5.6
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 +7 -0
- package/dist/cjs/create-payload/utils/get-vc-metrics.js +11 -24
- package/dist/cjs/interaction-metrics/index.js +1 -1
- package/dist/es2019/create-payload/utils/get-vc-metrics.js +2 -8
- package/dist/es2019/interaction-metrics/index.js +1 -1
- package/dist/esm/create-payload/utils/get-vc-metrics.js +11 -24
- package/dist/esm/interaction-metrics/index.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -47,42 +47,29 @@ function _getVCMetrics() {
|
|
|
47
47
|
}
|
|
48
48
|
return _context.abrupt("return", {});
|
|
49
49
|
case 4:
|
|
50
|
-
if (!(0, _platformFeatureFlags.fg)('platform_ufo_enable_vc_press_interactions')) {
|
|
51
|
-
_context.next = 9;
|
|
52
|
-
break;
|
|
53
|
-
}
|
|
54
50
|
if (!(interaction.type !== 'page_load' && interaction.type !== 'transition' && interaction.type !== 'press')) {
|
|
55
|
-
_context.next =
|
|
56
|
-
break;
|
|
57
|
-
}
|
|
58
|
-
return _context.abrupt("return", {});
|
|
59
|
-
case 7:
|
|
60
|
-
_context.next = 11;
|
|
61
|
-
break;
|
|
62
|
-
case 9:
|
|
63
|
-
if (!(interaction.type !== 'page_load' && interaction.type !== 'transition')) {
|
|
64
|
-
_context.next = 11;
|
|
51
|
+
_context.next = 6;
|
|
65
52
|
break;
|
|
66
53
|
}
|
|
67
54
|
return _context.abrupt("return", {});
|
|
68
|
-
case
|
|
55
|
+
case 6:
|
|
69
56
|
interactionStatus = (0, _getInteractionStatus.default)(interaction);
|
|
70
57
|
pageVisibilityUpToTTAI = (0, _getPageVisibilityUpToTtai.default)(interaction);
|
|
71
58
|
shouldReportVCMetrics = interactionStatus.originalInteractionStatus === 'SUCCEEDED' && pageVisibilityUpToTTAI === 'visible'; // Use per-interaction VC observer if available, otherwise fall back to global
|
|
72
59
|
observer = interaction.vcObserver;
|
|
73
60
|
if (observer) {
|
|
74
|
-
_context.next =
|
|
61
|
+
_context.next = 12;
|
|
75
62
|
break;
|
|
76
63
|
}
|
|
77
64
|
return _context.abrupt("return", {});
|
|
78
|
-
case
|
|
65
|
+
case 12:
|
|
79
66
|
if (!(!shouldReportVCMetrics && (0, _platformFeatureFlags.fg)('platform_ufo_no_vc_on_aborted'))) {
|
|
80
|
-
_context.next =
|
|
67
|
+
_context.next = 15;
|
|
81
68
|
break;
|
|
82
69
|
}
|
|
83
70
|
observer.stop(interaction.ufoName);
|
|
84
71
|
return _context.abrupt("return", {});
|
|
85
|
-
case
|
|
72
|
+
case 15:
|
|
86
73
|
isSSREnabled = interaction.type === 'page_load' && ((config === null || config === void 0 ? void 0 : config.ssr) || (config === null || config === void 0 || (_config$vc$ssrWhiteli = config.vc.ssrWhitelist) === null || _config$vc$ssrWhiteli === void 0 ? void 0 : _config$vc$ssrWhiteli.includes(interaction.ufoName)));
|
|
87
74
|
ssr = interaction.type === 'page_load' && isSSREnabled ? {
|
|
88
75
|
ssr: (0, _getSsrDoneTimeValue.default)(config)
|
|
@@ -90,7 +77,7 @@ function _getVCMetrics() {
|
|
|
90
77
|
_interactionMetrics.postInteractionLog.setVCObserverSSRConfig(ssr);
|
|
91
78
|
tti = (_interaction$apdex = interaction.apdex) === null || _interaction$apdex === void 0 || (_interaction$apdex = _interaction$apdex[0]) === null || _interaction$apdex === void 0 ? void 0 : _interaction$apdex.stopTime;
|
|
92
79
|
prefix = 'ufo';
|
|
93
|
-
_context.next =
|
|
80
|
+
_context.next = 22;
|
|
94
81
|
return observer.getVCResult(_objectSpread(_objectSpread({
|
|
95
82
|
start: interaction.start,
|
|
96
83
|
stop: interaction.end,
|
|
@@ -105,7 +92,7 @@ function _getVCMetrics() {
|
|
|
105
92
|
}, ssr), {}, {
|
|
106
93
|
include3p: include3p
|
|
107
94
|
}));
|
|
108
|
-
case
|
|
95
|
+
case 22:
|
|
109
96
|
result = _context.sent;
|
|
110
97
|
observer.stop(interaction.ufoName);
|
|
111
98
|
if (!include3p) {
|
|
@@ -118,15 +105,15 @@ function _getVCMetrics() {
|
|
|
118
105
|
return revision === mostRecentVCRevision;
|
|
119
106
|
});
|
|
120
107
|
if (!(!shouldReportVCMetrics || !(mostRecentVCRevisionPayload !== null && mostRecentVCRevisionPayload !== void 0 && mostRecentVCRevisionPayload.clean))) {
|
|
121
|
-
_context.next =
|
|
108
|
+
_context.next = 29;
|
|
122
109
|
break;
|
|
123
110
|
}
|
|
124
111
|
return _context.abrupt("return", result);
|
|
125
|
-
case
|
|
112
|
+
case 29:
|
|
126
113
|
return _context.abrupt("return", _objectSpread(_objectSpread({}, result), {}, {
|
|
127
114
|
'metric:vc90': mostRecentVCRevisionPayload['metric:vc90']
|
|
128
115
|
}));
|
|
129
|
-
case
|
|
116
|
+
case 30:
|
|
130
117
|
case "end":
|
|
131
118
|
return _context.stop();
|
|
132
119
|
}
|
|
@@ -1155,7 +1155,7 @@ function addNewInteraction(interactionId, ufoName, type, startTime, rate, labelS
|
|
|
1155
1155
|
}, interactionId);
|
|
1156
1156
|
}
|
|
1157
1157
|
}
|
|
1158
|
-
if (type === 'press'
|
|
1158
|
+
if (type === 'press') {
|
|
1159
1159
|
// Use per-interaction VC observer if available, otherwise fall back to global
|
|
1160
1160
|
var _observer = vcObserver;
|
|
1161
1161
|
if (_observer) {
|
|
@@ -10,14 +10,8 @@ async function getVCMetrics(interaction, include3p = false) {
|
|
|
10
10
|
if (!(config !== null && config !== void 0 && (_config$vc = config.vc) !== null && _config$vc !== void 0 && _config$vc.enabled)) {
|
|
11
11
|
return {};
|
|
12
12
|
}
|
|
13
|
-
if (
|
|
14
|
-
|
|
15
|
-
return {};
|
|
16
|
-
}
|
|
17
|
-
} else {
|
|
18
|
-
if (interaction.type !== 'page_load' && interaction.type !== 'transition') {
|
|
19
|
-
return {};
|
|
20
|
-
}
|
|
13
|
+
if (interaction.type !== 'page_load' && interaction.type !== 'transition' && interaction.type !== 'press') {
|
|
14
|
+
return {};
|
|
21
15
|
}
|
|
22
16
|
const interactionStatus = getInteractionStatus(interaction);
|
|
23
17
|
const pageVisibilityUpToTTAI = getPageVisibilityUpToTTAI(interaction);
|
|
@@ -1033,7 +1033,7 @@ export function addNewInteraction(interactionId, ufoName, type, startTime, rate,
|
|
|
1033
1033
|
}, interactionId);
|
|
1034
1034
|
}
|
|
1035
1035
|
}
|
|
1036
|
-
if (type === 'press'
|
|
1036
|
+
if (type === 'press') {
|
|
1037
1037
|
// Use per-interaction VC observer if available, otherwise fall back to global
|
|
1038
1038
|
const observer = vcObserver;
|
|
1039
1039
|
if (observer) {
|
|
@@ -40,42 +40,29 @@ function _getVCMetrics() {
|
|
|
40
40
|
}
|
|
41
41
|
return _context.abrupt("return", {});
|
|
42
42
|
case 4:
|
|
43
|
-
if (!fg('platform_ufo_enable_vc_press_interactions')) {
|
|
44
|
-
_context.next = 9;
|
|
45
|
-
break;
|
|
46
|
-
}
|
|
47
43
|
if (!(interaction.type !== 'page_load' && interaction.type !== 'transition' && interaction.type !== 'press')) {
|
|
48
|
-
_context.next =
|
|
49
|
-
break;
|
|
50
|
-
}
|
|
51
|
-
return _context.abrupt("return", {});
|
|
52
|
-
case 7:
|
|
53
|
-
_context.next = 11;
|
|
54
|
-
break;
|
|
55
|
-
case 9:
|
|
56
|
-
if (!(interaction.type !== 'page_load' && interaction.type !== 'transition')) {
|
|
57
|
-
_context.next = 11;
|
|
44
|
+
_context.next = 6;
|
|
58
45
|
break;
|
|
59
46
|
}
|
|
60
47
|
return _context.abrupt("return", {});
|
|
61
|
-
case
|
|
48
|
+
case 6:
|
|
62
49
|
interactionStatus = getInteractionStatus(interaction);
|
|
63
50
|
pageVisibilityUpToTTAI = getPageVisibilityUpToTTAI(interaction);
|
|
64
51
|
shouldReportVCMetrics = interactionStatus.originalInteractionStatus === 'SUCCEEDED' && pageVisibilityUpToTTAI === 'visible'; // Use per-interaction VC observer if available, otherwise fall back to global
|
|
65
52
|
observer = interaction.vcObserver;
|
|
66
53
|
if (observer) {
|
|
67
|
-
_context.next =
|
|
54
|
+
_context.next = 12;
|
|
68
55
|
break;
|
|
69
56
|
}
|
|
70
57
|
return _context.abrupt("return", {});
|
|
71
|
-
case
|
|
58
|
+
case 12:
|
|
72
59
|
if (!(!shouldReportVCMetrics && fg('platform_ufo_no_vc_on_aborted'))) {
|
|
73
|
-
_context.next =
|
|
60
|
+
_context.next = 15;
|
|
74
61
|
break;
|
|
75
62
|
}
|
|
76
63
|
observer.stop(interaction.ufoName);
|
|
77
64
|
return _context.abrupt("return", {});
|
|
78
|
-
case
|
|
65
|
+
case 15:
|
|
79
66
|
isSSREnabled = interaction.type === 'page_load' && ((config === null || config === void 0 ? void 0 : config.ssr) || (config === null || config === void 0 || (_config$vc$ssrWhiteli = config.vc.ssrWhitelist) === null || _config$vc$ssrWhiteli === void 0 ? void 0 : _config$vc$ssrWhiteli.includes(interaction.ufoName)));
|
|
80
67
|
ssr = interaction.type === 'page_load' && isSSREnabled ? {
|
|
81
68
|
ssr: getSSRDoneTimeValue(config)
|
|
@@ -83,7 +70,7 @@ function _getVCMetrics() {
|
|
|
83
70
|
postInteractionLog.setVCObserverSSRConfig(ssr);
|
|
84
71
|
tti = (_interaction$apdex = interaction.apdex) === null || _interaction$apdex === void 0 || (_interaction$apdex = _interaction$apdex[0]) === null || _interaction$apdex === void 0 ? void 0 : _interaction$apdex.stopTime;
|
|
85
72
|
prefix = 'ufo';
|
|
86
|
-
_context.next =
|
|
73
|
+
_context.next = 22;
|
|
87
74
|
return observer.getVCResult(_objectSpread(_objectSpread({
|
|
88
75
|
start: interaction.start,
|
|
89
76
|
stop: interaction.end,
|
|
@@ -98,7 +85,7 @@ function _getVCMetrics() {
|
|
|
98
85
|
}, ssr), {}, {
|
|
99
86
|
include3p: include3p
|
|
100
87
|
}));
|
|
101
|
-
case
|
|
88
|
+
case 22:
|
|
102
89
|
result = _context.sent;
|
|
103
90
|
observer.stop(interaction.ufoName);
|
|
104
91
|
if (!include3p) {
|
|
@@ -111,15 +98,15 @@ function _getVCMetrics() {
|
|
|
111
98
|
return revision === mostRecentVCRevision;
|
|
112
99
|
});
|
|
113
100
|
if (!(!shouldReportVCMetrics || !(mostRecentVCRevisionPayload !== null && mostRecentVCRevisionPayload !== void 0 && mostRecentVCRevisionPayload.clean))) {
|
|
114
|
-
_context.next =
|
|
101
|
+
_context.next = 29;
|
|
115
102
|
break;
|
|
116
103
|
}
|
|
117
104
|
return _context.abrupt("return", result);
|
|
118
|
-
case
|
|
105
|
+
case 29:
|
|
119
106
|
return _context.abrupt("return", _objectSpread(_objectSpread({}, result), {}, {
|
|
120
107
|
'metric:vc90': mostRecentVCRevisionPayload['metric:vc90']
|
|
121
108
|
}));
|
|
122
|
-
case
|
|
109
|
+
case 30:
|
|
123
110
|
case "end":
|
|
124
111
|
return _context.stop();
|
|
125
112
|
}
|
|
@@ -1109,7 +1109,7 @@ export function addNewInteraction(interactionId, ufoName, type, startTime, rate,
|
|
|
1109
1109
|
}, interactionId);
|
|
1110
1110
|
}
|
|
1111
1111
|
}
|
|
1112
|
-
if (type === 'press'
|
|
1112
|
+
if (type === 'press') {
|
|
1113
1113
|
// Use per-interaction VC observer if available, otherwise fall back to global
|
|
1114
1114
|
var _observer = vcObserver;
|
|
1115
1115
|
if (_observer) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/react-ufo",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.6",
|
|
4
4
|
"description": "Parts of React UFO that are publicly available",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
"platform_ufo_exclude_3p_elements_from_ttvc": {
|
|
124
124
|
"type": "boolean"
|
|
125
125
|
},
|
|
126
|
-
"
|
|
126
|
+
"platform_ufo_add_type_for_3p_segments": {
|
|
127
127
|
"type": "boolean"
|
|
128
128
|
},
|
|
129
129
|
"platform_ufo_segment_critical_metrics": {
|