@atlaskit/react-ufo 2.5.1 → 2.5.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 +8 -0
- package/dist/cjs/interaction-metrics/index.js +1 -1
- package/dist/cjs/vc/vc-observer/index.js +25 -25
- package/dist/es2019/interaction-metrics/index.js +1 -1
- package/dist/es2019/vc/vc-observer/index.js +19 -19
- package/dist/esm/interaction-metrics/index.js +1 -1
- package/dist/esm/vc/vc-observer/index.js +25 -25
- package/dist/types/vc/vc-observer/index.d.ts +1 -1
- package/dist/types-ts4.5/vc/vc-observer/index.d.ts +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/ufo-interaction-ignore
|
|
2
2
|
|
|
3
|
+
## 2.5.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#179378](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/179378)
|
|
8
|
+
[`0c54148687bda`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/0c54148687bda) -
|
|
9
|
+
move filtering of components log to allow for ufo:vc:next observation
|
|
10
|
+
|
|
3
11
|
## 2.5.1
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -482,7 +482,7 @@ var finishInteraction = function finishInteraction(id, data) {
|
|
|
482
482
|
(0, _experienceTraceIdContext.clearActiveTrace)();
|
|
483
483
|
callCleanUpCallbacks(data);
|
|
484
484
|
if ((_getConfig3 = (0, _config.getConfig)()) !== null && _getConfig3 !== void 0 && (_getConfig3 = _getConfig3.vc) !== null && _getConfig3 !== void 0 && _getConfig3.stopVCAtInteractionFinish) {
|
|
485
|
-
data.vc = (0, _vc.getVCObserver)().getVCRawData(
|
|
485
|
+
data.vc = (0, _vc.getVCObserver)().getVCRawData();
|
|
486
486
|
}
|
|
487
487
|
remove(id);
|
|
488
488
|
PreviousInteractionLog.name = data.ufoName || 'unknown';
|
|
@@ -71,7 +71,7 @@ var VCObserver = exports.VCObserver = /*#__PURE__*/function () {
|
|
|
71
71
|
var info = _this.abortReason.info !== '' ? " ".concat(_this.abortReason.info) : '';
|
|
72
72
|
return "".concat(_this.abortReason.reason).concat(info);
|
|
73
73
|
});
|
|
74
|
-
(0, _defineProperty2.default)(this, "getVCRawData", function (
|
|
74
|
+
(0, _defineProperty2.default)(this, "getVCRawData", function () {
|
|
75
75
|
_this.measureStart();
|
|
76
76
|
if (!_this.active) {
|
|
77
77
|
_this.measureStop();
|
|
@@ -80,20 +80,6 @@ var VCObserver = exports.VCObserver = /*#__PURE__*/function () {
|
|
|
80
80
|
_this.stop();
|
|
81
81
|
var abortReasonInfo = _this.getAbortReasonInfo();
|
|
82
82
|
_this.measureStop();
|
|
83
|
-
var componentsLog = {};
|
|
84
|
-
if (stopTime && (0, _platformFeatureFlags.fg)('ufo-remove-vc-component-observations-after-ttai')) {
|
|
85
|
-
Object.entries(_this.componentsLog).forEach(function (_ref3) {
|
|
86
|
-
var _ref4 = (0, _slicedToArray2.default)(_ref3, 2),
|
|
87
|
-
_timestamp = _ref4[0],
|
|
88
|
-
value = _ref4[1];
|
|
89
|
-
var timestamp = Number(_timestamp);
|
|
90
|
-
if (stopTime > timestamp) {
|
|
91
|
-
componentsLog[timestamp] = value;
|
|
92
|
-
}
|
|
93
|
-
});
|
|
94
|
-
} else {
|
|
95
|
-
componentsLog = _objectSpread({}, _this.componentsLog);
|
|
96
|
-
}
|
|
97
83
|
return {
|
|
98
84
|
abortReasonInfo: abortReasonInfo,
|
|
99
85
|
abortReason: _objectSpread({}, _this.abortReason),
|
|
@@ -101,24 +87,24 @@ var VCObserver = exports.VCObserver = /*#__PURE__*/function () {
|
|
|
101
87
|
heatmapNext: _this.heatmapNext,
|
|
102
88
|
outOfBoundaryInfo: _this.outOfBoundaryInfo,
|
|
103
89
|
totalTime: Math.round(_this.totalTime + _this.observers.getTotalTime()),
|
|
104
|
-
componentsLog: componentsLog,
|
|
90
|
+
componentsLog: _objectSpread({}, _this.componentsLog),
|
|
105
91
|
viewport: _objectSpread({}, _this.viewport),
|
|
106
92
|
oldDomUpdatesEnabled: _this.oldDomUpdatesEnabled,
|
|
107
93
|
devToolsEnabled: _this.devToolsEnabled,
|
|
108
94
|
ratios: _this.vcRatios
|
|
109
95
|
};
|
|
110
96
|
});
|
|
111
|
-
(0, _defineProperty2.default)(this, "getVCResult", function (
|
|
112
|
-
var start =
|
|
113
|
-
stop =
|
|
114
|
-
tti =
|
|
115
|
-
prefix =
|
|
116
|
-
ssr =
|
|
117
|
-
vc =
|
|
97
|
+
(0, _defineProperty2.default)(this, "getVCResult", function (_ref3) {
|
|
98
|
+
var start = _ref3.start,
|
|
99
|
+
stop = _ref3.stop,
|
|
100
|
+
tti = _ref3.tti,
|
|
101
|
+
prefix = _ref3.prefix,
|
|
102
|
+
ssr = _ref3.ssr,
|
|
103
|
+
vc = _ref3.vc;
|
|
118
104
|
var startTime = performance.now();
|
|
119
105
|
// add local measurement
|
|
120
106
|
var fullPrefix = prefix !== undefined && prefix !== '' ? "".concat(prefix, ":") : '';
|
|
121
|
-
var rawData = vc !== undefined ? vc : _this.getVCRawData(
|
|
107
|
+
var rawData = vc !== undefined ? vc : _this.getVCRawData();
|
|
122
108
|
if (rawData === null) {
|
|
123
109
|
return {};
|
|
124
110
|
}
|
|
@@ -166,10 +152,24 @@ var VCObserver = exports.VCObserver = /*#__PURE__*/function () {
|
|
|
166
152
|
} catch (e) {
|
|
167
153
|
/* empty */
|
|
168
154
|
}
|
|
155
|
+
var _componentsLog = {};
|
|
156
|
+
if ((0, _platformFeatureFlags.fg)('ufo-remove-vc-component-observations-after-ttai')) {
|
|
157
|
+
Object.entries(_this.componentsLog).forEach(function (_ref5) {
|
|
158
|
+
var _ref6 = (0, _slicedToArray2.default)(_ref5, 2),
|
|
159
|
+
_timestamp = _ref6[0],
|
|
160
|
+
value = _ref6[1];
|
|
161
|
+
var timestamp = Number(_timestamp);
|
|
162
|
+
if (stop > timestamp) {
|
|
163
|
+
_componentsLog[timestamp] = value;
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
} else {
|
|
167
|
+
_componentsLog = _objectSpread({}, componentsLog);
|
|
168
|
+
}
|
|
169
169
|
var vcNext = VCObserver.calculateVC({
|
|
170
170
|
heatmap: heatmapNext,
|
|
171
171
|
ssr: ssr,
|
|
172
|
-
componentsLog:
|
|
172
|
+
componentsLog: _componentsLog,
|
|
173
173
|
viewport: viewport
|
|
174
174
|
});
|
|
175
175
|
var outOfBoundary = outOfBoundaryInfo ? (0, _defineProperty2.default)({}, "".concat(fullPrefix, "vc:oob"), outOfBoundaryInfo) : {};
|
|
@@ -411,7 +411,7 @@ const finishInteraction = (id, data, endTime = performance.now()) => {
|
|
|
411
411
|
clearActiveTrace();
|
|
412
412
|
callCleanUpCallbacks(data);
|
|
413
413
|
if ((_getConfig3 = getConfig()) !== null && _getConfig3 !== void 0 && (_getConfig3$vc = _getConfig3.vc) !== null && _getConfig3$vc !== void 0 && _getConfig3$vc.stopVCAtInteractionFinish) {
|
|
414
|
-
data.vc = getVCObserver().getVCRawData(
|
|
414
|
+
data.vc = getVCObserver().getVCRawData();
|
|
415
415
|
}
|
|
416
416
|
remove(id);
|
|
417
417
|
PreviousInteractionLog.name = data.ufoName || 'unknown';
|
|
@@ -52,7 +52,7 @@ export class VCObserver {
|
|
|
52
52
|
const info = this.abortReason.info !== '' ? ` ${this.abortReason.info}` : '';
|
|
53
53
|
return `${this.abortReason.reason}${info}`;
|
|
54
54
|
});
|
|
55
|
-
_defineProperty(this, "getVCRawData",
|
|
55
|
+
_defineProperty(this, "getVCRawData", () => {
|
|
56
56
|
this.measureStart();
|
|
57
57
|
if (!this.active) {
|
|
58
58
|
this.measureStop();
|
|
@@ -61,19 +61,6 @@ export class VCObserver {
|
|
|
61
61
|
this.stop();
|
|
62
62
|
const abortReasonInfo = this.getAbortReasonInfo();
|
|
63
63
|
this.measureStop();
|
|
64
|
-
let componentsLog = {};
|
|
65
|
-
if (stopTime && fg('ufo-remove-vc-component-observations-after-ttai')) {
|
|
66
|
-
Object.entries(this.componentsLog).forEach(([_timestamp, value]) => {
|
|
67
|
-
const timestamp = Number(_timestamp);
|
|
68
|
-
if (stopTime > timestamp) {
|
|
69
|
-
componentsLog[timestamp] = value;
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
} else {
|
|
73
|
-
componentsLog = {
|
|
74
|
-
...this.componentsLog
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
64
|
return {
|
|
78
65
|
abortReasonInfo,
|
|
79
66
|
abortReason: {
|
|
@@ -83,7 +70,9 @@ export class VCObserver {
|
|
|
83
70
|
heatmapNext: this.heatmapNext,
|
|
84
71
|
outOfBoundaryInfo: this.outOfBoundaryInfo,
|
|
85
72
|
totalTime: Math.round(this.totalTime + this.observers.getTotalTime()),
|
|
86
|
-
componentsLog
|
|
73
|
+
componentsLog: {
|
|
74
|
+
...this.componentsLog
|
|
75
|
+
},
|
|
87
76
|
viewport: {
|
|
88
77
|
...this.viewport
|
|
89
78
|
},
|
|
@@ -103,7 +92,7 @@ export class VCObserver {
|
|
|
103
92
|
const startTime = performance.now();
|
|
104
93
|
// add local measurement
|
|
105
94
|
const fullPrefix = prefix !== undefined && prefix !== '' ? `${prefix}:` : '';
|
|
106
|
-
const rawData = vc !== undefined ? vc : this.getVCRawData(
|
|
95
|
+
const rawData = vc !== undefined ? vc : this.getVCRawData();
|
|
107
96
|
if (rawData === null) {
|
|
108
97
|
return {};
|
|
109
98
|
}
|
|
@@ -160,12 +149,23 @@ export class VCObserver {
|
|
|
160
149
|
} catch (e) {
|
|
161
150
|
/* empty */
|
|
162
151
|
}
|
|
152
|
+
let _componentsLog = {};
|
|
153
|
+
if (fg('ufo-remove-vc-component-observations-after-ttai')) {
|
|
154
|
+
Object.entries(this.componentsLog).forEach(([_timestamp, value]) => {
|
|
155
|
+
const timestamp = Number(_timestamp);
|
|
156
|
+
if (stop > timestamp) {
|
|
157
|
+
_componentsLog[timestamp] = value;
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
} else {
|
|
161
|
+
_componentsLog = {
|
|
162
|
+
...componentsLog
|
|
163
|
+
};
|
|
164
|
+
}
|
|
163
165
|
const vcNext = VCObserver.calculateVC({
|
|
164
166
|
heatmap: heatmapNext,
|
|
165
167
|
ssr,
|
|
166
|
-
componentsLog:
|
|
167
|
-
...componentsLog
|
|
168
|
-
},
|
|
168
|
+
componentsLog: _componentsLog,
|
|
169
169
|
viewport
|
|
170
170
|
});
|
|
171
171
|
const outOfBoundary = outOfBoundaryInfo ? {
|
|
@@ -439,7 +439,7 @@ var finishInteraction = function finishInteraction(id, data) {
|
|
|
439
439
|
clearActiveTrace();
|
|
440
440
|
callCleanUpCallbacks(data);
|
|
441
441
|
if ((_getConfig3 = getConfig()) !== null && _getConfig3 !== void 0 && (_getConfig3 = _getConfig3.vc) !== null && _getConfig3 !== void 0 && _getConfig3.stopVCAtInteractionFinish) {
|
|
442
|
-
data.vc = getVCObserver().getVCRawData(
|
|
442
|
+
data.vc = getVCObserver().getVCRawData();
|
|
443
443
|
}
|
|
444
444
|
remove(id);
|
|
445
445
|
PreviousInteractionLog.name = data.ufoName || 'unknown';
|
|
@@ -64,7 +64,7 @@ export var VCObserver = /*#__PURE__*/function () {
|
|
|
64
64
|
var info = _this.abortReason.info !== '' ? " ".concat(_this.abortReason.info) : '';
|
|
65
65
|
return "".concat(_this.abortReason.reason).concat(info);
|
|
66
66
|
});
|
|
67
|
-
_defineProperty(this, "getVCRawData", function (
|
|
67
|
+
_defineProperty(this, "getVCRawData", function () {
|
|
68
68
|
_this.measureStart();
|
|
69
69
|
if (!_this.active) {
|
|
70
70
|
_this.measureStop();
|
|
@@ -73,20 +73,6 @@ export var VCObserver = /*#__PURE__*/function () {
|
|
|
73
73
|
_this.stop();
|
|
74
74
|
var abortReasonInfo = _this.getAbortReasonInfo();
|
|
75
75
|
_this.measureStop();
|
|
76
|
-
var componentsLog = {};
|
|
77
|
-
if (stopTime && fg('ufo-remove-vc-component-observations-after-ttai')) {
|
|
78
|
-
Object.entries(_this.componentsLog).forEach(function (_ref3) {
|
|
79
|
-
var _ref4 = _slicedToArray(_ref3, 2),
|
|
80
|
-
_timestamp = _ref4[0],
|
|
81
|
-
value = _ref4[1];
|
|
82
|
-
var timestamp = Number(_timestamp);
|
|
83
|
-
if (stopTime > timestamp) {
|
|
84
|
-
componentsLog[timestamp] = value;
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
} else {
|
|
88
|
-
componentsLog = _objectSpread({}, _this.componentsLog);
|
|
89
|
-
}
|
|
90
76
|
return {
|
|
91
77
|
abortReasonInfo: abortReasonInfo,
|
|
92
78
|
abortReason: _objectSpread({}, _this.abortReason),
|
|
@@ -94,24 +80,24 @@ export var VCObserver = /*#__PURE__*/function () {
|
|
|
94
80
|
heatmapNext: _this.heatmapNext,
|
|
95
81
|
outOfBoundaryInfo: _this.outOfBoundaryInfo,
|
|
96
82
|
totalTime: Math.round(_this.totalTime + _this.observers.getTotalTime()),
|
|
97
|
-
componentsLog: componentsLog,
|
|
83
|
+
componentsLog: _objectSpread({}, _this.componentsLog),
|
|
98
84
|
viewport: _objectSpread({}, _this.viewport),
|
|
99
85
|
oldDomUpdatesEnabled: _this.oldDomUpdatesEnabled,
|
|
100
86
|
devToolsEnabled: _this.devToolsEnabled,
|
|
101
87
|
ratios: _this.vcRatios
|
|
102
88
|
};
|
|
103
89
|
});
|
|
104
|
-
_defineProperty(this, "getVCResult", function (
|
|
105
|
-
var start =
|
|
106
|
-
stop =
|
|
107
|
-
tti =
|
|
108
|
-
prefix =
|
|
109
|
-
ssr =
|
|
110
|
-
vc =
|
|
90
|
+
_defineProperty(this, "getVCResult", function (_ref3) {
|
|
91
|
+
var start = _ref3.start,
|
|
92
|
+
stop = _ref3.stop,
|
|
93
|
+
tti = _ref3.tti,
|
|
94
|
+
prefix = _ref3.prefix,
|
|
95
|
+
ssr = _ref3.ssr,
|
|
96
|
+
vc = _ref3.vc;
|
|
111
97
|
var startTime = performance.now();
|
|
112
98
|
// add local measurement
|
|
113
99
|
var fullPrefix = prefix !== undefined && prefix !== '' ? "".concat(prefix, ":") : '';
|
|
114
|
-
var rawData = vc !== undefined ? vc : _this.getVCRawData(
|
|
100
|
+
var rawData = vc !== undefined ? vc : _this.getVCRawData();
|
|
115
101
|
if (rawData === null) {
|
|
116
102
|
return {};
|
|
117
103
|
}
|
|
@@ -159,10 +145,24 @@ export var VCObserver = /*#__PURE__*/function () {
|
|
|
159
145
|
} catch (e) {
|
|
160
146
|
/* empty */
|
|
161
147
|
}
|
|
148
|
+
var _componentsLog = {};
|
|
149
|
+
if (fg('ufo-remove-vc-component-observations-after-ttai')) {
|
|
150
|
+
Object.entries(_this.componentsLog).forEach(function (_ref5) {
|
|
151
|
+
var _ref6 = _slicedToArray(_ref5, 2),
|
|
152
|
+
_timestamp = _ref6[0],
|
|
153
|
+
value = _ref6[1];
|
|
154
|
+
var timestamp = Number(_timestamp);
|
|
155
|
+
if (stop > timestamp) {
|
|
156
|
+
_componentsLog[timestamp] = value;
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
} else {
|
|
160
|
+
_componentsLog = _objectSpread({}, componentsLog);
|
|
161
|
+
}
|
|
162
162
|
var vcNext = VCObserver.calculateVC({
|
|
163
163
|
heatmap: heatmapNext,
|
|
164
164
|
ssr: ssr,
|
|
165
|
-
componentsLog:
|
|
165
|
+
componentsLog: _componentsLog,
|
|
166
166
|
viewport: viewport
|
|
167
167
|
});
|
|
168
168
|
var outOfBoundary = outOfBoundaryInfo ? _defineProperty({}, "".concat(fullPrefix, "vc:oob"), outOfBoundaryInfo) : {};
|
|
@@ -48,7 +48,7 @@ export declare class VCObserver {
|
|
|
48
48
|
}): void;
|
|
49
49
|
stop(): void;
|
|
50
50
|
getAbortReasonInfo: () => string | null;
|
|
51
|
-
getVCRawData: (
|
|
51
|
+
getVCRawData: () => VCRawDataType | null;
|
|
52
52
|
getIgnoredElements(componentsLog: ComponentsLogType): {
|
|
53
53
|
targetName: string;
|
|
54
54
|
ignoreReason: VCIgnoreReason | undefined;
|
|
@@ -48,7 +48,7 @@ export declare class VCObserver {
|
|
|
48
48
|
}): void;
|
|
49
49
|
stop(): void;
|
|
50
50
|
getAbortReasonInfo: () => string | null;
|
|
51
|
-
getVCRawData: (
|
|
51
|
+
getVCRawData: () => VCRawDataType | null;
|
|
52
52
|
getIgnoredElements(componentsLog: ComponentsLogType): {
|
|
53
53
|
targetName: string;
|
|
54
54
|
ignoreReason: VCIgnoreReason | undefined;
|