@atlaskit/react-ufo 2.16.1 → 3.0.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 +21 -0
- package/dist/cjs/create-payload/index.js +2 -3
- package/dist/cjs/vc/vc-observer/heatmap/heatmap.js +9 -1
- package/dist/cjs/vc/vc-observer/index.js +40 -28
- package/dist/cjs/vc/vc-observer/revisions/ViewportUpdateClassifier.js +16 -8
- package/dist/cjs/vc/vc-observer/revisions/fy24_01.js +7 -0
- package/dist/cjs/vc/vc-observer/revisions/fy25_01.js +31 -2
- package/dist/es2019/create-payload/index.js +2 -3
- package/dist/es2019/vc/vc-observer/heatmap/heatmap.js +9 -1
- package/dist/es2019/vc/vc-observer/index.js +11 -0
- package/dist/es2019/vc/vc-observer/revisions/ViewportUpdateClassifier.js +7 -0
- package/dist/es2019/vc/vc-observer/revisions/fy24_01.js +8 -1
- package/dist/es2019/vc/vc-observer/revisions/fy25_01.js +23 -0
- package/dist/esm/create-payload/index.js +2 -3
- package/dist/esm/vc/vc-observer/heatmap/heatmap.js +9 -1
- package/dist/esm/vc/vc-observer/index.js +40 -28
- package/dist/esm/vc/vc-observer/revisions/ViewportUpdateClassifier.js +16 -8
- package/dist/esm/vc/vc-observer/revisions/fy24_01.js +7 -0
- package/dist/esm/vc/vc-observer/revisions/fy25_01.js +31 -2
- package/dist/types/vc/vc-observer/heatmap/heatmap.d.ts +6 -4
- package/dist/types/vc/vc-observer/revisions/ViewportUpdateClassifier.d.ts +2 -1
- package/dist/types/vc/vc-observer/revisions/fy25_01.d.ts +4 -1
- package/dist/types/vc/vc-observer/revisions/types.d.ts +5 -0
- package/dist/types-ts4.5/vc/vc-observer/heatmap/heatmap.d.ts +6 -4
- package/dist/types-ts4.5/vc/vc-observer/revisions/ViewportUpdateClassifier.d.ts +2 -1
- package/dist/types-ts4.5/vc/vc-observer/revisions/fy25_01.d.ts +4 -1
- package/dist/types-ts4.5/vc/vc-observer/revisions/types.d.ts +5 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @atlaskit/ufo-interaction-ignore
|
|
2
2
|
|
|
3
|
+
## 3.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [#117363](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/117363)
|
|
8
|
+
[`10a0f7f6c2027`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/10a0f7f6c2027) -
|
|
9
|
+
This package's `peerDependencies` have been adjusted for `react` and/or `react-dom` to reflect the
|
|
10
|
+
status of only supporting React 18 going forward. No explicit breaking change to React support has
|
|
11
|
+
been made in this release, but this is to signify going forward, breaking changes for React 16 or
|
|
12
|
+
React 17 may come via non-major semver releases.
|
|
13
|
+
|
|
14
|
+
Please refer this community post for more details:
|
|
15
|
+
https://community.developer.atlassian.com/t/rfc-78-dropping-support-for-react-16-and-rendering-in-a-react-18-concurrent-root-in-jira-and-confluence/87026
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [#117324](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/117324)
|
|
20
|
+
[`921179f5ee66d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/921179f5ee66d) -
|
|
21
|
+
Remove FG from CHR API
|
|
22
|
+
- Updated dependencies
|
|
23
|
+
|
|
3
24
|
## 2.16.1
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
|
@@ -320,11 +320,10 @@ var getAssetsMetrics = function getAssetsMetrics(interaction, resourceTimings) {
|
|
|
320
320
|
try {
|
|
321
321
|
var config = (0, _config.getConfig)();
|
|
322
322
|
var type = interaction.type;
|
|
323
|
-
var isCHREnabled = (0, _platformFeatureFlags.fg)('ufo_chr_config');
|
|
324
323
|
var allowedTypes = ['page_load', 'transition'];
|
|
325
324
|
var assetsClassification = config === null || config === void 0 ? void 0 : config.assetsClassification;
|
|
326
|
-
if (!
|
|
327
|
-
// Skip if:
|
|
325
|
+
if (!allowedTypes.includes(type) || !assetsClassification) {
|
|
326
|
+
// Skip if: type not allowed or assetsClassification isn't configured
|
|
328
327
|
return {};
|
|
329
328
|
}
|
|
330
329
|
var reporter = new _assets.CHRReporter();
|
|
@@ -131,6 +131,8 @@ var MultiRevisionHeatmap = exports.MultiRevisionHeatmap = /*#__PURE__*/function
|
|
|
131
131
|
var _this3 = this;
|
|
132
132
|
var VCParts = _ref4.VCParts,
|
|
133
133
|
VCCalculationMethods = _ref4.VCCalculationMethods,
|
|
134
|
+
filterComponentsLog = _ref4.filterComponentsLog,
|
|
135
|
+
ttai = _ref4.ttai,
|
|
134
136
|
_ref4$ssr = _ref4.ssr,
|
|
135
137
|
ssr = _ref4$ssr === void 0 ? UNUSED_SECTOR : _ref4$ssr;
|
|
136
138
|
return this.heatmaps.map(function (heatmap, i) {
|
|
@@ -173,6 +175,12 @@ var MultiRevisionHeatmap = exports.MultiRevisionHeatmap = /*#__PURE__*/function
|
|
|
173
175
|
}).sort(function (a, b) {
|
|
174
176
|
return a[0] > b[0] ? 1 : -1;
|
|
175
177
|
});
|
|
178
|
+
|
|
179
|
+
// @todo remove it once fixed as described: https://product-fabric.atlassian.net/browse/AFO-3443
|
|
180
|
+
componentsLog = filterComponentsLog[i]({
|
|
181
|
+
componentsLog: componentsLog,
|
|
182
|
+
ttai: ttai
|
|
183
|
+
});
|
|
176
184
|
var _VCCalculationMethods = VCCalculationMethods[i]({
|
|
177
185
|
VCParts: VCParts,
|
|
178
186
|
componentsLog: componentsLog,
|
|
@@ -249,7 +257,7 @@ var MultiRevisionHeatmap = exports.MultiRevisionHeatmap = /*#__PURE__*/function
|
|
|
249
257
|
}, {
|
|
250
258
|
key: "getCleanHeatmap",
|
|
251
259
|
value: function getCleanHeatmap() {
|
|
252
|
-
return new
|
|
260
|
+
return new Int32Array(this.arraySize.w * this.arraySize.h);
|
|
253
261
|
}
|
|
254
262
|
}], [{
|
|
255
263
|
key: "makeVCReturnObj",
|
|
@@ -260,6 +260,11 @@ var VCObserver = exports.VCObserver = /*#__PURE__*/function () {
|
|
|
260
260
|
var classifier = _ref8.classifier;
|
|
261
261
|
return classifier.VCCalculationMethod;
|
|
262
262
|
}),
|
|
263
|
+
filterComponentsLog: (0, _revisions.getRevisions)().map(function (_ref9) {
|
|
264
|
+
var classifier = _ref9.classifier;
|
|
265
|
+
return classifier.filterComponentsLog;
|
|
266
|
+
}),
|
|
267
|
+
ttai: stop,
|
|
263
268
|
ssr: ssr,
|
|
264
269
|
clean: !abortReasonInfo
|
|
265
270
|
})) : null;
|
|
@@ -306,13 +311,13 @@ var VCObserver = exports.VCObserver = /*#__PURE__*/function () {
|
|
|
306
311
|
});
|
|
307
312
|
}
|
|
308
313
|
});
|
|
309
|
-
(0, _defineProperty2.default)(this, "onViewportChangeDetected", function (
|
|
310
|
-
var element =
|
|
311
|
-
type =
|
|
312
|
-
ignoreReason =
|
|
313
|
-
timestamp =
|
|
314
|
-
targetName =
|
|
315
|
-
intersectionRect =
|
|
314
|
+
(0, _defineProperty2.default)(this, "onViewportChangeDetected", function (_ref11) {
|
|
315
|
+
var element = _ref11.element,
|
|
316
|
+
type = _ref11.type,
|
|
317
|
+
ignoreReason = _ref11.ignoreReason,
|
|
318
|
+
timestamp = _ref11.timestamp,
|
|
319
|
+
targetName = _ref11.targetName,
|
|
320
|
+
intersectionRect = _ref11.intersectionRect;
|
|
316
321
|
if (_this.multiHeatmap === null) {
|
|
317
322
|
return;
|
|
318
323
|
}
|
|
@@ -394,10 +399,10 @@ var VCObserver = exports.VCObserver = /*#__PURE__*/function () {
|
|
|
394
399
|
var unbinds = (0, _attachAbortListeners.attachAbortListeners)(window, _this.viewport, _this.abortReasonCallback);
|
|
395
400
|
if ((_window = window) !== null && _window !== void 0 && _window.__SSR_ABORT_LISTENERS__) {
|
|
396
401
|
var _window2;
|
|
397
|
-
Object.entries(window.__SSR_ABORT_LISTENERS__.aborts).forEach(function (
|
|
398
|
-
var
|
|
399
|
-
key =
|
|
400
|
-
time =
|
|
402
|
+
Object.entries(window.__SSR_ABORT_LISTENERS__.aborts).forEach(function (_ref12) {
|
|
403
|
+
var _ref13 = (0, _slicedToArray2.default)(_ref12, 2),
|
|
404
|
+
key = _ref13[0],
|
|
405
|
+
time = _ref13[1];
|
|
401
406
|
if (time) {
|
|
402
407
|
_this.abortReasonCallback(key, time);
|
|
403
408
|
}
|
|
@@ -432,8 +437,8 @@ var VCObserver = exports.VCObserver = /*#__PURE__*/function () {
|
|
|
432
437
|
}
|
|
433
438
|
return (0, _createClass2.default)(VCObserver, [{
|
|
434
439
|
key: "start",
|
|
435
|
-
value: function start(
|
|
436
|
-
var startTime =
|
|
440
|
+
value: function start(_ref14) {
|
|
441
|
+
var startTime = _ref14.startTime;
|
|
437
442
|
this.active = true;
|
|
438
443
|
if (this.observers.isBrowserSupported()) {
|
|
439
444
|
this.setViewportSize();
|
|
@@ -455,12 +460,12 @@ var VCObserver = exports.VCObserver = /*#__PURE__*/function () {
|
|
|
455
460
|
}, {
|
|
456
461
|
key: "getIgnoredElements",
|
|
457
462
|
value: function getIgnoredElements(componentsLog) {
|
|
458
|
-
return Object.values(componentsLog).flat().filter(function (
|
|
459
|
-
var ignoreReason =
|
|
463
|
+
return Object.values(componentsLog).flat().filter(function (_ref15) {
|
|
464
|
+
var ignoreReason = _ref15.ignoreReason;
|
|
460
465
|
return Boolean(ignoreReason);
|
|
461
|
-
}).map(function (
|
|
462
|
-
var targetName =
|
|
463
|
-
ignoreReason =
|
|
466
|
+
}).map(function (_ref16) {
|
|
467
|
+
var targetName = _ref16.targetName,
|
|
468
|
+
ignoreReason = _ref16.ignoreReason;
|
|
464
469
|
return {
|
|
465
470
|
targetName: targetName,
|
|
466
471
|
ignoreReason: ignoreReason
|
|
@@ -516,6 +521,13 @@ var VCObserver = exports.VCObserver = /*#__PURE__*/function () {
|
|
|
516
521
|
this.detachAbortListeners();
|
|
517
522
|
this.heatmap = this.getCleanHeatmap();
|
|
518
523
|
this.heatmapNext = this.getCleanHeatmap();
|
|
524
|
+
if ((0, _platformFeatureFlags.fg)('ufo_vc_multiheatmap')) {
|
|
525
|
+
this.multiHeatmap = new _heatmap.MultiRevisionHeatmap({
|
|
526
|
+
viewport: this.viewport,
|
|
527
|
+
revisions: (0, _revisions.getRevisions)(),
|
|
528
|
+
devToolsEnabled: this.devToolsEnabled
|
|
529
|
+
});
|
|
530
|
+
}
|
|
519
531
|
this.totalTime = 0;
|
|
520
532
|
this.componentsLog = {};
|
|
521
533
|
this.vcRatios = {};
|
|
@@ -581,12 +593,12 @@ var VCObserver = exports.VCObserver = /*#__PURE__*/function () {
|
|
|
581
593
|
}
|
|
582
594
|
}], [{
|
|
583
595
|
key: "calculateVC",
|
|
584
|
-
value: function calculateVC(
|
|
585
|
-
var heatmap =
|
|
586
|
-
|
|
587
|
-
ssr =
|
|
588
|
-
componentsLog =
|
|
589
|
-
viewport =
|
|
596
|
+
value: function calculateVC(_ref17) {
|
|
597
|
+
var heatmap = _ref17.heatmap,
|
|
598
|
+
_ref17$ssr = _ref17.ssr,
|
|
599
|
+
ssr = _ref17$ssr === void 0 ? UNUSED_SECTOR : _ref17$ssr,
|
|
600
|
+
componentsLog = _ref17.componentsLog,
|
|
601
|
+
viewport = _ref17.viewport;
|
|
590
602
|
var lastUpdate = {};
|
|
591
603
|
var totalPainted = 0;
|
|
592
604
|
if (ssr !== UNUSED_SECTOR) {
|
|
@@ -655,11 +667,11 @@ var VCObserver = exports.VCObserver = /*#__PURE__*/function () {
|
|
|
655
667
|
});
|
|
656
668
|
return VCRatio;
|
|
657
669
|
}, 0);
|
|
658
|
-
var VCEntries = entries.reduce(function (acc,
|
|
670
|
+
var VCEntries = entries.reduce(function (acc, _ref18, i) {
|
|
659
671
|
var _acc$abs, _componentsLog$timest, _acc$rel$vc, _acc$rel;
|
|
660
|
-
var
|
|
661
|
-
timestamp =
|
|
662
|
-
entryPainted =
|
|
672
|
+
var _ref19 = (0, _slicedToArray2.default)(_ref18, 2),
|
|
673
|
+
timestamp = _ref19[0],
|
|
674
|
+
entryPainted = _ref19[1];
|
|
663
675
|
var currentlyPainted = entryPainted + (((_acc$abs = acc.abs[i - 1]) === null || _acc$abs === void 0 ? void 0 : _acc$abs[1]) || 0);
|
|
664
676
|
var currentlyPaintedRatio = Math.round(currentlyPainted / totalPainted * 1000) / 10;
|
|
665
677
|
var logEntry = (_componentsLog$timest = componentsLog[timestamp]) === null || _componentsLog$timest === void 0 ? void 0 : _componentsLog$timest.map(function (v) {
|
|
@@ -26,6 +26,14 @@ var ViewportUpdateClassifier = exports.ViewportUpdateClassifier = /*#__PURE__*/f
|
|
|
26
26
|
VCBox: {}
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
|
+
|
|
30
|
+
// @todo remove it once fixed as described: https://product-fabric.atlassian.net/browse/AFO-3443
|
|
31
|
+
}, {
|
|
32
|
+
key: "filterComponentsLog",
|
|
33
|
+
value: function filterComponentsLog(_ref) {
|
|
34
|
+
var componentsLog = _ref.componentsLog;
|
|
35
|
+
return componentsLog;
|
|
36
|
+
}
|
|
29
37
|
}, {
|
|
30
38
|
key: "mergeConfig",
|
|
31
39
|
value: function mergeConfig() {
|
|
@@ -38,17 +46,17 @@ var ViewportUpdateClassifier = exports.ViewportUpdateClassifier = /*#__PURE__*/f
|
|
|
38
46
|
}
|
|
39
47
|
}, {
|
|
40
48
|
key: "classifyUpdate",
|
|
41
|
-
value: function classifyUpdate(
|
|
42
|
-
var element =
|
|
43
|
-
type =
|
|
44
|
-
tags =
|
|
45
|
-
ignoreReason =
|
|
49
|
+
value: function classifyUpdate(_ref2) {
|
|
50
|
+
var element = _ref2.element,
|
|
51
|
+
type = _ref2.type,
|
|
52
|
+
tags = _ref2.tags,
|
|
53
|
+
ignoreReason = _ref2.ignoreReason;
|
|
46
54
|
if (!this.__combinedTypes.includes(type)) {
|
|
47
55
|
return false;
|
|
48
56
|
}
|
|
49
|
-
return this.__combinedFilters.every(function (
|
|
50
|
-
var filter =
|
|
51
|
-
name =
|
|
57
|
+
return this.__combinedFilters.every(function (_ref3) {
|
|
58
|
+
var filter = _ref3.filter,
|
|
59
|
+
name = _ref3.name;
|
|
52
60
|
return filter({
|
|
53
61
|
type: type,
|
|
54
62
|
tags: tags,
|
|
@@ -11,6 +11,7 @@ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime
|
|
|
11
11
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
12
12
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
13
13
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
14
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
14
15
|
var _ViewportUpdateClassifier = require("./ViewportUpdateClassifier");
|
|
15
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)); }
|
|
16
17
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
@@ -48,6 +49,12 @@ var FY24_01Classifier = exports.FY24_01Classifier = /*#__PURE__*/function (_View
|
|
|
48
49
|
var v = arguments.length > 1 ? arguments[1] : undefined;
|
|
49
50
|
var VCRatio = v[1] / totalPainted + acc;
|
|
50
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
|
+
}
|
|
51
58
|
VCParts.forEach(function (value) {
|
|
52
59
|
if ((VC[value] === null || VC[value] === undefined) && VCRatio >= value / 100) {
|
|
53
60
|
var _componentsLog$time;
|
|
@@ -5,13 +5,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.revFY25_01Classifier = exports.FY25_01Classifier = void 0;
|
|
8
|
-
var
|
|
8
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
9
9
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
10
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
11
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
11
12
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
12
13
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
13
14
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
15
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
14
16
|
var _fy24_ = require("./fy24_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; }
|
|
15
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)); }
|
|
16
20
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
17
21
|
var FY25_01Classifier = exports.FY25_01Classifier = /*#__PURE__*/function (_FY24_01Classifier) {
|
|
@@ -34,6 +38,31 @@ var FY25_01Classifier = exports.FY25_01Classifier = /*#__PURE__*/function (_FY24
|
|
|
34
38
|
return _this;
|
|
35
39
|
}
|
|
36
40
|
(0, _inherits2.default)(FY25_01Classifier, _FY24_01Classifier);
|
|
37
|
-
return (0, _createClass2.default)(FY25_01Classifier
|
|
41
|
+
return (0, _createClass2.default)(FY25_01Classifier, [{
|
|
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
|
+
}]);
|
|
38
67
|
}(_fy24_.FY24_01Classifier);
|
|
39
68
|
var revFY25_01Classifier = exports.revFY25_01Classifier = new FY25_01Classifier();
|
|
@@ -305,11 +305,10 @@ const getAssetsMetrics = (interaction, resourceTimings) => {
|
|
|
305
305
|
const {
|
|
306
306
|
type
|
|
307
307
|
} = interaction;
|
|
308
|
-
const isCHREnabled = fg('ufo_chr_config');
|
|
309
308
|
const allowedTypes = ['page_load', 'transition'];
|
|
310
309
|
const assetsClassification = config === null || config === void 0 ? void 0 : config.assetsClassification;
|
|
311
|
-
if (!
|
|
312
|
-
// Skip if:
|
|
310
|
+
if (!allowedTypes.includes(type) || !assetsClassification) {
|
|
311
|
+
// Skip if: type not allowed or assetsClassification isn't configured
|
|
313
312
|
return {};
|
|
314
313
|
}
|
|
315
314
|
const reporter = new CHRReporter();
|
|
@@ -112,6 +112,8 @@ export class MultiRevisionHeatmap {
|
|
|
112
112
|
processData({
|
|
113
113
|
VCParts,
|
|
114
114
|
VCCalculationMethods,
|
|
115
|
+
filterComponentsLog,
|
|
116
|
+
ttai,
|
|
115
117
|
ssr = UNUSED_SECTOR
|
|
116
118
|
}) {
|
|
117
119
|
return this.heatmaps.map((heatmap, i) => {
|
|
@@ -150,6 +152,12 @@ export class MultiRevisionHeatmap {
|
|
|
150
152
|
}
|
|
151
153
|
}
|
|
152
154
|
const entries = Object.entries(lastUpdate).map(a => [parseInt(a[0], 10), a[1]]).sort((a, b) => a[0] > b[0] ? 1 : -1);
|
|
155
|
+
|
|
156
|
+
// @todo remove it once fixed as described: https://product-fabric.atlassian.net/browse/AFO-3443
|
|
157
|
+
componentsLog = filterComponentsLog[i]({
|
|
158
|
+
componentsLog,
|
|
159
|
+
ttai
|
|
160
|
+
});
|
|
153
161
|
const {
|
|
154
162
|
VC,
|
|
155
163
|
VCBox
|
|
@@ -218,7 +226,7 @@ export class MultiRevisionHeatmap {
|
|
|
218
226
|
return x + this.arraySize.w * y;
|
|
219
227
|
}
|
|
220
228
|
getCleanHeatmap() {
|
|
221
|
-
return new
|
|
229
|
+
return new Int32Array(this.arraySize.w * this.arraySize.h);
|
|
222
230
|
}
|
|
223
231
|
static makeVCReturnObj(VCParts) {
|
|
224
232
|
const vc = {};
|
|
@@ -256,6 +256,10 @@ export class VCObserver {
|
|
|
256
256
|
VCCalculationMethods: getRevisions().map(({
|
|
257
257
|
classifier
|
|
258
258
|
}) => classifier.VCCalculationMethod),
|
|
259
|
+
filterComponentsLog: getRevisions().map(({
|
|
260
|
+
classifier
|
|
261
|
+
}) => classifier.filterComponentsLog),
|
|
262
|
+
ttai: stop,
|
|
259
263
|
ssr,
|
|
260
264
|
clean: !abortReasonInfo
|
|
261
265
|
})
|
|
@@ -605,6 +609,13 @@ export class VCObserver {
|
|
|
605
609
|
this.detachAbortListeners();
|
|
606
610
|
this.heatmap = this.getCleanHeatmap();
|
|
607
611
|
this.heatmapNext = this.getCleanHeatmap();
|
|
612
|
+
if (fg('ufo_vc_multiheatmap')) {
|
|
613
|
+
this.multiHeatmap = new MultiRevisionHeatmap({
|
|
614
|
+
viewport: this.viewport,
|
|
615
|
+
revisions: getRevisions(),
|
|
616
|
+
devToolsEnabled: this.devToolsEnabled
|
|
617
|
+
});
|
|
618
|
+
}
|
|
608
619
|
this.totalTime = 0;
|
|
609
620
|
this.componentsLog = {};
|
|
610
621
|
this.vcRatios = {};
|
|
@@ -13,6 +13,13 @@ export class ViewportUpdateClassifier {
|
|
|
13
13
|
VCBox: {}
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
|
+
|
|
17
|
+
// @todo remove it once fixed as described: https://product-fabric.atlassian.net/browse/AFO-3443
|
|
18
|
+
filterComponentsLog({
|
|
19
|
+
componentsLog
|
|
20
|
+
}) {
|
|
21
|
+
return componentsLog;
|
|
22
|
+
}
|
|
16
23
|
mergeConfig() {
|
|
17
24
|
this.__combinedTypes = [...this.types, ...((this === null || this === void 0 ? void 0 : this.__combinedTypes) || [])];
|
|
18
25
|
const previousFilters = this.removedFilters.length === 0 ? this.__combinedFilters : this.__combinedFilters.filter(filter => !this.removedFilters.includes(filter.name));
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
3
|
import { ViewportUpdateClassifier } from './ViewportUpdateClassifier';
|
|
3
4
|
const legacyIgnoreReasons = ['image', 'ssr-hydration', 'editor-lazy-node-view', 'editor-container-mutation'];
|
|
4
5
|
export class FY24_01Classifier extends ViewportUpdateClassifier {
|
|
@@ -11,8 +12,14 @@ export class FY24_01Classifier extends ViewportUpdateClassifier {
|
|
|
11
12
|
const VC = {};
|
|
12
13
|
const VCBox = {};
|
|
13
14
|
entries.reduce((acc = 0, v) => {
|
|
14
|
-
|
|
15
|
+
let VCRatio = v[1] / totalPainted + acc;
|
|
15
16
|
const time = v[0];
|
|
17
|
+
if (fg('platform_ufo_fix_vc_observer_rounding_error')) {
|
|
18
|
+
// @todo apply fix to include small changes into accumulator
|
|
19
|
+
const preciseCurrRatio = Math.round(100 * (v[1] / totalPainted));
|
|
20
|
+
const preciseAccRatio = Math.round(acc * 100);
|
|
21
|
+
VCRatio = (preciseCurrRatio + preciseAccRatio) / 100;
|
|
22
|
+
}
|
|
16
23
|
VCParts.forEach(value => {
|
|
17
24
|
if ((VC[value] === null || VC[value] === undefined) && VCRatio >= value / 100) {
|
|
18
25
|
var _componentsLog$time;
|
|
@@ -1,6 +1,29 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
3
|
import { FY24_01Classifier } from './fy24_01';
|
|
3
4
|
export class FY25_01Classifier extends FY24_01Classifier {
|
|
5
|
+
// @todo remove it once fixed as described: https://product-fabric.atlassian.net/browse/AFO-3443
|
|
6
|
+
filterComponentsLog({
|
|
7
|
+
componentsLog,
|
|
8
|
+
ttai
|
|
9
|
+
}) {
|
|
10
|
+
let _componentsLog = {};
|
|
11
|
+
|
|
12
|
+
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
13
|
+
if (fg('ufo-remove-vc-component-observations-after-ttai')) {
|
|
14
|
+
Object.entries(componentsLog).forEach(([_timestamp, value]) => {
|
|
15
|
+
const timestamp = Number(_timestamp);
|
|
16
|
+
if (ttai > timestamp) {
|
|
17
|
+
_componentsLog[timestamp] = value;
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
} else {
|
|
21
|
+
_componentsLog = {
|
|
22
|
+
...componentsLog
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
return _componentsLog;
|
|
26
|
+
}
|
|
4
27
|
constructor() {
|
|
5
28
|
super();
|
|
6
29
|
_defineProperty(this, "revision", 'fy25.01');
|
|
@@ -309,11 +309,10 @@ var getAssetsMetrics = function getAssetsMetrics(interaction, resourceTimings) {
|
|
|
309
309
|
try {
|
|
310
310
|
var config = getConfig();
|
|
311
311
|
var type = interaction.type;
|
|
312
|
-
var isCHREnabled = fg('ufo_chr_config');
|
|
313
312
|
var allowedTypes = ['page_load', 'transition'];
|
|
314
313
|
var assetsClassification = config === null || config === void 0 ? void 0 : config.assetsClassification;
|
|
315
|
-
if (!
|
|
316
|
-
// Skip if:
|
|
314
|
+
if (!allowedTypes.includes(type) || !assetsClassification) {
|
|
315
|
+
// Skip if: type not allowed or assetsClassification isn't configured
|
|
317
316
|
return {};
|
|
318
317
|
}
|
|
319
318
|
var reporter = new CHRReporter();
|
|
@@ -124,6 +124,8 @@ export var MultiRevisionHeatmap = /*#__PURE__*/function () {
|
|
|
124
124
|
var _this3 = this;
|
|
125
125
|
var VCParts = _ref4.VCParts,
|
|
126
126
|
VCCalculationMethods = _ref4.VCCalculationMethods,
|
|
127
|
+
filterComponentsLog = _ref4.filterComponentsLog,
|
|
128
|
+
ttai = _ref4.ttai,
|
|
127
129
|
_ref4$ssr = _ref4.ssr,
|
|
128
130
|
ssr = _ref4$ssr === void 0 ? UNUSED_SECTOR : _ref4$ssr;
|
|
129
131
|
return this.heatmaps.map(function (heatmap, i) {
|
|
@@ -166,6 +168,12 @@ export var MultiRevisionHeatmap = /*#__PURE__*/function () {
|
|
|
166
168
|
}).sort(function (a, b) {
|
|
167
169
|
return a[0] > b[0] ? 1 : -1;
|
|
168
170
|
});
|
|
171
|
+
|
|
172
|
+
// @todo remove it once fixed as described: https://product-fabric.atlassian.net/browse/AFO-3443
|
|
173
|
+
componentsLog = filterComponentsLog[i]({
|
|
174
|
+
componentsLog: componentsLog,
|
|
175
|
+
ttai: ttai
|
|
176
|
+
});
|
|
169
177
|
var _VCCalculationMethods = VCCalculationMethods[i]({
|
|
170
178
|
VCParts: VCParts,
|
|
171
179
|
componentsLog: componentsLog,
|
|
@@ -242,7 +250,7 @@ export var MultiRevisionHeatmap = /*#__PURE__*/function () {
|
|
|
242
250
|
}, {
|
|
243
251
|
key: "getCleanHeatmap",
|
|
244
252
|
value: function getCleanHeatmap() {
|
|
245
|
-
return new
|
|
253
|
+
return new Int32Array(this.arraySize.w * this.arraySize.h);
|
|
246
254
|
}
|
|
247
255
|
}], [{
|
|
248
256
|
key: "makeVCReturnObj",
|
|
@@ -253,6 +253,11 @@ export var VCObserver = /*#__PURE__*/function () {
|
|
|
253
253
|
var classifier = _ref8.classifier;
|
|
254
254
|
return classifier.VCCalculationMethod;
|
|
255
255
|
}),
|
|
256
|
+
filterComponentsLog: getRevisions().map(function (_ref9) {
|
|
257
|
+
var classifier = _ref9.classifier;
|
|
258
|
+
return classifier.filterComponentsLog;
|
|
259
|
+
}),
|
|
260
|
+
ttai: stop,
|
|
256
261
|
ssr: ssr,
|
|
257
262
|
clean: !abortReasonInfo
|
|
258
263
|
})) : null;
|
|
@@ -299,13 +304,13 @@ export var VCObserver = /*#__PURE__*/function () {
|
|
|
299
304
|
});
|
|
300
305
|
}
|
|
301
306
|
});
|
|
302
|
-
_defineProperty(this, "onViewportChangeDetected", function (
|
|
303
|
-
var element =
|
|
304
|
-
type =
|
|
305
|
-
ignoreReason =
|
|
306
|
-
timestamp =
|
|
307
|
-
targetName =
|
|
308
|
-
intersectionRect =
|
|
307
|
+
_defineProperty(this, "onViewportChangeDetected", function (_ref11) {
|
|
308
|
+
var element = _ref11.element,
|
|
309
|
+
type = _ref11.type,
|
|
310
|
+
ignoreReason = _ref11.ignoreReason,
|
|
311
|
+
timestamp = _ref11.timestamp,
|
|
312
|
+
targetName = _ref11.targetName,
|
|
313
|
+
intersectionRect = _ref11.intersectionRect;
|
|
309
314
|
if (_this.multiHeatmap === null) {
|
|
310
315
|
return;
|
|
311
316
|
}
|
|
@@ -387,10 +392,10 @@ export var VCObserver = /*#__PURE__*/function () {
|
|
|
387
392
|
var unbinds = attachAbortListeners(window, _this.viewport, _this.abortReasonCallback);
|
|
388
393
|
if ((_window = window) !== null && _window !== void 0 && _window.__SSR_ABORT_LISTENERS__) {
|
|
389
394
|
var _window2;
|
|
390
|
-
Object.entries(window.__SSR_ABORT_LISTENERS__.aborts).forEach(function (
|
|
391
|
-
var
|
|
392
|
-
key =
|
|
393
|
-
time =
|
|
395
|
+
Object.entries(window.__SSR_ABORT_LISTENERS__.aborts).forEach(function (_ref12) {
|
|
396
|
+
var _ref13 = _slicedToArray(_ref12, 2),
|
|
397
|
+
key = _ref13[0],
|
|
398
|
+
time = _ref13[1];
|
|
394
399
|
if (time) {
|
|
395
400
|
_this.abortReasonCallback(key, time);
|
|
396
401
|
}
|
|
@@ -425,8 +430,8 @@ export var VCObserver = /*#__PURE__*/function () {
|
|
|
425
430
|
}
|
|
426
431
|
return _createClass(VCObserver, [{
|
|
427
432
|
key: "start",
|
|
428
|
-
value: function start(
|
|
429
|
-
var startTime =
|
|
433
|
+
value: function start(_ref14) {
|
|
434
|
+
var startTime = _ref14.startTime;
|
|
430
435
|
this.active = true;
|
|
431
436
|
if (this.observers.isBrowserSupported()) {
|
|
432
437
|
this.setViewportSize();
|
|
@@ -448,12 +453,12 @@ export var VCObserver = /*#__PURE__*/function () {
|
|
|
448
453
|
}, {
|
|
449
454
|
key: "getIgnoredElements",
|
|
450
455
|
value: function getIgnoredElements(componentsLog) {
|
|
451
|
-
return Object.values(componentsLog).flat().filter(function (
|
|
452
|
-
var ignoreReason =
|
|
456
|
+
return Object.values(componentsLog).flat().filter(function (_ref15) {
|
|
457
|
+
var ignoreReason = _ref15.ignoreReason;
|
|
453
458
|
return Boolean(ignoreReason);
|
|
454
|
-
}).map(function (
|
|
455
|
-
var targetName =
|
|
456
|
-
ignoreReason =
|
|
459
|
+
}).map(function (_ref16) {
|
|
460
|
+
var targetName = _ref16.targetName,
|
|
461
|
+
ignoreReason = _ref16.ignoreReason;
|
|
457
462
|
return {
|
|
458
463
|
targetName: targetName,
|
|
459
464
|
ignoreReason: ignoreReason
|
|
@@ -509,6 +514,13 @@ export var VCObserver = /*#__PURE__*/function () {
|
|
|
509
514
|
this.detachAbortListeners();
|
|
510
515
|
this.heatmap = this.getCleanHeatmap();
|
|
511
516
|
this.heatmapNext = this.getCleanHeatmap();
|
|
517
|
+
if (fg('ufo_vc_multiheatmap')) {
|
|
518
|
+
this.multiHeatmap = new MultiRevisionHeatmap({
|
|
519
|
+
viewport: this.viewport,
|
|
520
|
+
revisions: getRevisions(),
|
|
521
|
+
devToolsEnabled: this.devToolsEnabled
|
|
522
|
+
});
|
|
523
|
+
}
|
|
512
524
|
this.totalTime = 0;
|
|
513
525
|
this.componentsLog = {};
|
|
514
526
|
this.vcRatios = {};
|
|
@@ -574,12 +586,12 @@ export var VCObserver = /*#__PURE__*/function () {
|
|
|
574
586
|
}
|
|
575
587
|
}], [{
|
|
576
588
|
key: "calculateVC",
|
|
577
|
-
value: function calculateVC(
|
|
578
|
-
var heatmap =
|
|
579
|
-
|
|
580
|
-
ssr =
|
|
581
|
-
componentsLog =
|
|
582
|
-
viewport =
|
|
589
|
+
value: function calculateVC(_ref17) {
|
|
590
|
+
var heatmap = _ref17.heatmap,
|
|
591
|
+
_ref17$ssr = _ref17.ssr,
|
|
592
|
+
ssr = _ref17$ssr === void 0 ? UNUSED_SECTOR : _ref17$ssr,
|
|
593
|
+
componentsLog = _ref17.componentsLog,
|
|
594
|
+
viewport = _ref17.viewport;
|
|
583
595
|
var lastUpdate = {};
|
|
584
596
|
var totalPainted = 0;
|
|
585
597
|
if (ssr !== UNUSED_SECTOR) {
|
|
@@ -648,11 +660,11 @@ export var VCObserver = /*#__PURE__*/function () {
|
|
|
648
660
|
});
|
|
649
661
|
return VCRatio;
|
|
650
662
|
}, 0);
|
|
651
|
-
var VCEntries = entries.reduce(function (acc,
|
|
663
|
+
var VCEntries = entries.reduce(function (acc, _ref18, i) {
|
|
652
664
|
var _acc$abs, _componentsLog$timest, _acc$rel$vc, _acc$rel;
|
|
653
|
-
var
|
|
654
|
-
timestamp =
|
|
655
|
-
entryPainted =
|
|
665
|
+
var _ref19 = _slicedToArray(_ref18, 2),
|
|
666
|
+
timestamp = _ref19[0],
|
|
667
|
+
entryPainted = _ref19[1];
|
|
656
668
|
var currentlyPainted = entryPainted + (((_acc$abs = acc.abs[i - 1]) === null || _acc$abs === void 0 ? void 0 : _acc$abs[1]) || 0);
|
|
657
669
|
var currentlyPaintedRatio = Math.round(currentlyPainted / totalPainted * 1000) / 10;
|
|
658
670
|
var logEntry = (_componentsLog$timest = componentsLog[timestamp]) === null || _componentsLog$timest === void 0 ? void 0 : _componentsLog$timest.map(function (v) {
|
|
@@ -19,6 +19,14 @@ export var ViewportUpdateClassifier = /*#__PURE__*/function () {
|
|
|
19
19
|
VCBox: {}
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
|
+
|
|
23
|
+
// @todo remove it once fixed as described: https://product-fabric.atlassian.net/browse/AFO-3443
|
|
24
|
+
}, {
|
|
25
|
+
key: "filterComponentsLog",
|
|
26
|
+
value: function filterComponentsLog(_ref) {
|
|
27
|
+
var componentsLog = _ref.componentsLog;
|
|
28
|
+
return componentsLog;
|
|
29
|
+
}
|
|
22
30
|
}, {
|
|
23
31
|
key: "mergeConfig",
|
|
24
32
|
value: function mergeConfig() {
|
|
@@ -31,17 +39,17 @@ export var ViewportUpdateClassifier = /*#__PURE__*/function () {
|
|
|
31
39
|
}
|
|
32
40
|
}, {
|
|
33
41
|
key: "classifyUpdate",
|
|
34
|
-
value: function classifyUpdate(
|
|
35
|
-
var element =
|
|
36
|
-
type =
|
|
37
|
-
tags =
|
|
38
|
-
ignoreReason =
|
|
42
|
+
value: function classifyUpdate(_ref2) {
|
|
43
|
+
var element = _ref2.element,
|
|
44
|
+
type = _ref2.type,
|
|
45
|
+
tags = _ref2.tags,
|
|
46
|
+
ignoreReason = _ref2.ignoreReason;
|
|
39
47
|
if (!this.__combinedTypes.includes(type)) {
|
|
40
48
|
return false;
|
|
41
49
|
}
|
|
42
|
-
return this.__combinedFilters.every(function (
|
|
43
|
-
var filter =
|
|
44
|
-
name =
|
|
50
|
+
return this.__combinedFilters.every(function (_ref3) {
|
|
51
|
+
var filter = _ref3.filter,
|
|
52
|
+
name = _ref3.name;
|
|
45
53
|
return filter({
|
|
46
54
|
type: type,
|
|
47
55
|
tags: tags,
|
|
@@ -6,6 +6,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
6
6
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
7
7
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
8
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
9
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
10
|
import { ViewportUpdateClassifier } from './ViewportUpdateClassifier';
|
|
10
11
|
var legacyIgnoreReasons = ['image', 'ssr-hydration', 'editor-lazy-node-view', 'editor-container-mutation'];
|
|
11
12
|
export var FY24_01Classifier = /*#__PURE__*/function (_ViewportUpdateClassi) {
|
|
@@ -41,6 +42,12 @@ export var FY24_01Classifier = /*#__PURE__*/function (_ViewportUpdateClassi) {
|
|
|
41
42
|
var v = arguments.length > 1 ? arguments[1] : undefined;
|
|
42
43
|
var VCRatio = v[1] / totalPainted + acc;
|
|
43
44
|
var time = v[0];
|
|
45
|
+
if (fg('platform_ufo_fix_vc_observer_rounding_error')) {
|
|
46
|
+
// @todo apply fix to include small changes into accumulator
|
|
47
|
+
var preciseCurrRatio = Math.round(100 * (v[1] / totalPainted));
|
|
48
|
+
var preciseAccRatio = Math.round(acc * 100);
|
|
49
|
+
VCRatio = (preciseCurrRatio + preciseAccRatio) / 100;
|
|
50
|
+
}
|
|
44
51
|
VCParts.forEach(function (value) {
|
|
45
52
|
if ((VC[value] === null || VC[value] === undefined) && VCRatio >= value / 100) {
|
|
46
53
|
var _componentsLog$time;
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
|
+
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
4
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
5
6
|
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
7
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
|
+
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; }
|
|
9
|
+
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; }
|
|
7
10
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
8
11
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
12
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
13
|
import { FY24_01Classifier } from './fy24_01';
|
|
10
14
|
export var FY25_01Classifier = /*#__PURE__*/function (_FY24_01Classifier) {
|
|
11
15
|
function FY25_01Classifier() {
|
|
@@ -27,6 +31,31 @@ export var FY25_01Classifier = /*#__PURE__*/function (_FY24_01Classifier) {
|
|
|
27
31
|
return _this;
|
|
28
32
|
}
|
|
29
33
|
_inherits(FY25_01Classifier, _FY24_01Classifier);
|
|
30
|
-
return _createClass(FY25_01Classifier
|
|
34
|
+
return _createClass(FY25_01Classifier, [{
|
|
35
|
+
key: "filterComponentsLog",
|
|
36
|
+
value:
|
|
37
|
+
// @todo remove it once fixed as described: https://product-fabric.atlassian.net/browse/AFO-3443
|
|
38
|
+
function filterComponentsLog(_ref2) {
|
|
39
|
+
var componentsLog = _ref2.componentsLog,
|
|
40
|
+
ttai = _ref2.ttai;
|
|
41
|
+
var _componentsLog = {};
|
|
42
|
+
|
|
43
|
+
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
44
|
+
if (fg('ufo-remove-vc-component-observations-after-ttai')) {
|
|
45
|
+
Object.entries(componentsLog).forEach(function (_ref3) {
|
|
46
|
+
var _ref4 = _slicedToArray(_ref3, 2),
|
|
47
|
+
_timestamp = _ref4[0],
|
|
48
|
+
value = _ref4[1];
|
|
49
|
+
var timestamp = Number(_timestamp);
|
|
50
|
+
if (ttai > timestamp) {
|
|
51
|
+
_componentsLog[timestamp] = value;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
} else {
|
|
55
|
+
_componentsLog = _objectSpread({}, componentsLog);
|
|
56
|
+
}
|
|
57
|
+
return _componentsLog;
|
|
58
|
+
}
|
|
59
|
+
}]);
|
|
31
60
|
}(FY24_01Classifier);
|
|
32
61
|
export var revFY25_01Classifier = new FY25_01Classifier();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ComponentsLogType, MultiHeatmapPayload, VCEntryType, VCIgnoreReason, VCRatioType } from '../../../common/vc/types';
|
|
2
2
|
import type { ObservedMutationType } from '../observers/types';
|
|
3
|
-
import type { RevisionEntry, VCCalculationMethodType } from '../revisions/types';
|
|
3
|
+
import type { FilterComponentsLogType, RevisionEntry, VCCalculationMethodType } from '../revisions/types';
|
|
4
4
|
type Viewport = {
|
|
5
5
|
w: number;
|
|
6
6
|
h: number;
|
|
@@ -15,11 +15,13 @@ type HeatmapAttrs = {
|
|
|
15
15
|
arraySize?: ArraySize;
|
|
16
16
|
devToolsEnabled?: boolean;
|
|
17
17
|
};
|
|
18
|
-
type Heatmap =
|
|
18
|
+
type Heatmap = Int32Array;
|
|
19
19
|
type ProcessDataArgs = {
|
|
20
20
|
VCParts: number[];
|
|
21
21
|
VCCalculationMethods: VCCalculationMethodType[];
|
|
22
22
|
clean: boolean;
|
|
23
|
+
ttai: number;
|
|
24
|
+
filterComponentsLog: FilterComponentsLogType[];
|
|
23
25
|
ssr?: number;
|
|
24
26
|
};
|
|
25
27
|
type PerRevision<T> = T[];
|
|
@@ -48,10 +50,10 @@ export declare class MultiRevisionHeatmap {
|
|
|
48
50
|
constructor({ viewport, revisions, arraySize, devToolsEnabled }: HeatmapAttrs);
|
|
49
51
|
handleUpdate({ time, type, classification, intersectionRect, element, targetName, ignoreReason, onError, }: HandleUpdateArgs): void;
|
|
50
52
|
getData(): {
|
|
51
|
-
heatmaps:
|
|
53
|
+
heatmaps: Int32Array[];
|
|
52
54
|
};
|
|
53
55
|
getPayloadShapedData(args: ProcessDataArgs): MultiHeatmapPayload;
|
|
54
|
-
processData({ VCParts, VCCalculationMethods, ssr }: ProcessDataArgs): {
|
|
56
|
+
processData({ VCParts, VCCalculationMethods, filterComponentsLog, ttai, ssr, }: ProcessDataArgs): {
|
|
55
57
|
VC: import("../revisions/types").VCType;
|
|
56
58
|
VCBox: import("../revisions/types").VCBoxType;
|
|
57
59
|
VCEntries: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { VCCalculationMethodArgs } from './types';
|
|
1
|
+
import type { FilterComponentsLogArgs, VCCalculationMethodArgs } from './types';
|
|
2
2
|
export type FilterArgs = {
|
|
3
3
|
type: string;
|
|
4
4
|
tags?: string[];
|
|
@@ -22,6 +22,7 @@ export declare class ViewportUpdateClassifier {
|
|
|
22
22
|
VC: {};
|
|
23
23
|
VCBox: {};
|
|
24
24
|
};
|
|
25
|
+
filterComponentsLog({ componentsLog }: FilterComponentsLogArgs): import("../../../common/vc/types").ComponentsLogType;
|
|
25
26
|
protected __combinedTypes: string[];
|
|
26
27
|
protected __combinedFilters: Filter[];
|
|
27
28
|
mergeConfig(): void;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import type { ComponentsLogType } from '../../../common/vc/types';
|
|
1
2
|
import { FY24_01Classifier } from './fy24_01';
|
|
2
|
-
import {
|
|
3
|
+
import type { FilterComponentsLogArgs } from './types';
|
|
4
|
+
import type { FilterArgs } from './ViewportUpdateClassifier';
|
|
3
5
|
export declare class FY25_01Classifier extends FY24_01Classifier {
|
|
4
6
|
revision: string;
|
|
5
7
|
types: string[];
|
|
@@ -8,6 +10,7 @@ export declare class FY25_01Classifier extends FY24_01Classifier {
|
|
|
8
10
|
filter: ({ type, ignoreReason }: FilterArgs) => boolean;
|
|
9
11
|
}[];
|
|
10
12
|
removedFilters: never[];
|
|
13
|
+
filterComponentsLog({ componentsLog, ttai }: FilterComponentsLogArgs): ComponentsLogType;
|
|
11
14
|
constructor();
|
|
12
15
|
}
|
|
13
16
|
export declare const revFY25_01Classifier: FY25_01Classifier;
|
|
@@ -21,3 +21,8 @@ export type VCCalculationMethodReturn = {
|
|
|
21
21
|
VCBox: VCBoxType;
|
|
22
22
|
};
|
|
23
23
|
export type VCCalculationMethodType = (args: VCCalculationMethodArgs) => VCCalculationMethodReturn;
|
|
24
|
+
export type FilterComponentsLogArgs = {
|
|
25
|
+
componentsLog: ComponentsLogType;
|
|
26
|
+
ttai: number;
|
|
27
|
+
};
|
|
28
|
+
export type FilterComponentsLogType = (args: FilterComponentsLogArgs) => ComponentsLogType;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ComponentsLogType, MultiHeatmapPayload, VCEntryType, VCIgnoreReason, VCRatioType } from '../../../common/vc/types';
|
|
2
2
|
import type { ObservedMutationType } from '../observers/types';
|
|
3
|
-
import type { RevisionEntry, VCCalculationMethodType } from '../revisions/types';
|
|
3
|
+
import type { FilterComponentsLogType, RevisionEntry, VCCalculationMethodType } from '../revisions/types';
|
|
4
4
|
type Viewport = {
|
|
5
5
|
w: number;
|
|
6
6
|
h: number;
|
|
@@ -15,11 +15,13 @@ type HeatmapAttrs = {
|
|
|
15
15
|
arraySize?: ArraySize;
|
|
16
16
|
devToolsEnabled?: boolean;
|
|
17
17
|
};
|
|
18
|
-
type Heatmap =
|
|
18
|
+
type Heatmap = Int32Array;
|
|
19
19
|
type ProcessDataArgs = {
|
|
20
20
|
VCParts: number[];
|
|
21
21
|
VCCalculationMethods: VCCalculationMethodType[];
|
|
22
22
|
clean: boolean;
|
|
23
|
+
ttai: number;
|
|
24
|
+
filterComponentsLog: FilterComponentsLogType[];
|
|
23
25
|
ssr?: number;
|
|
24
26
|
};
|
|
25
27
|
type PerRevision<T> = T[];
|
|
@@ -48,10 +50,10 @@ export declare class MultiRevisionHeatmap {
|
|
|
48
50
|
constructor({ viewport, revisions, arraySize, devToolsEnabled }: HeatmapAttrs);
|
|
49
51
|
handleUpdate({ time, type, classification, intersectionRect, element, targetName, ignoreReason, onError, }: HandleUpdateArgs): void;
|
|
50
52
|
getData(): {
|
|
51
|
-
heatmaps:
|
|
53
|
+
heatmaps: Int32Array[];
|
|
52
54
|
};
|
|
53
55
|
getPayloadShapedData(args: ProcessDataArgs): MultiHeatmapPayload;
|
|
54
|
-
processData({ VCParts, VCCalculationMethods, ssr }: ProcessDataArgs): {
|
|
56
|
+
processData({ VCParts, VCCalculationMethods, filterComponentsLog, ttai, ssr, }: ProcessDataArgs): {
|
|
55
57
|
VC: import("../revisions/types").VCType;
|
|
56
58
|
VCBox: import("../revisions/types").VCBoxType;
|
|
57
59
|
VCEntries: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { VCCalculationMethodArgs } from './types';
|
|
1
|
+
import type { FilterComponentsLogArgs, VCCalculationMethodArgs } from './types';
|
|
2
2
|
export type FilterArgs = {
|
|
3
3
|
type: string;
|
|
4
4
|
tags?: string[];
|
|
@@ -22,6 +22,7 @@ export declare class ViewportUpdateClassifier {
|
|
|
22
22
|
VC: {};
|
|
23
23
|
VCBox: {};
|
|
24
24
|
};
|
|
25
|
+
filterComponentsLog({ componentsLog }: FilterComponentsLogArgs): import("../../../common/vc/types").ComponentsLogType;
|
|
25
26
|
protected __combinedTypes: string[];
|
|
26
27
|
protected __combinedFilters: Filter[];
|
|
27
28
|
mergeConfig(): void;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import type { ComponentsLogType } from '../../../common/vc/types';
|
|
1
2
|
import { FY24_01Classifier } from './fy24_01';
|
|
2
|
-
import {
|
|
3
|
+
import type { FilterComponentsLogArgs } from './types';
|
|
4
|
+
import type { FilterArgs } from './ViewportUpdateClassifier';
|
|
3
5
|
export declare class FY25_01Classifier extends FY24_01Classifier {
|
|
4
6
|
revision: string;
|
|
5
7
|
types: string[];
|
|
@@ -8,6 +10,7 @@ export declare class FY25_01Classifier extends FY24_01Classifier {
|
|
|
8
10
|
filter: ({ type, ignoreReason }: FilterArgs) => boolean;
|
|
9
11
|
}[];
|
|
10
12
|
removedFilters: never[];
|
|
13
|
+
filterComponentsLog({ componentsLog, ttai }: FilterComponentsLogArgs): ComponentsLogType;
|
|
11
14
|
constructor();
|
|
12
15
|
}
|
|
13
16
|
export declare const revFY25_01Classifier: FY25_01Classifier;
|
|
@@ -21,3 +21,8 @@ export type VCCalculationMethodReturn = {
|
|
|
21
21
|
VCBox: VCBoxType;
|
|
22
22
|
};
|
|
23
23
|
export type VCCalculationMethodType = (args: VCCalculationMethodArgs) => VCCalculationMethodReturn;
|
|
24
|
+
export type FilterComponentsLogArgs = {
|
|
25
|
+
componentsLog: ComponentsLogType;
|
|
26
|
+
ttai: number;
|
|
27
|
+
};
|
|
28
|
+
export type FilterComponentsLogType = (args: FilterComponentsLogArgs) => ComponentsLogType;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/react-ufo",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "Parts of React UFO that are publicly available",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
".": "./src/index.ts"
|
|
75
75
|
},
|
|
76
76
|
"dependencies": {
|
|
77
|
-
"@atlaskit/interaction-context": "^
|
|
77
|
+
"@atlaskit/interaction-context": "^3.0.0",
|
|
78
78
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
79
79
|
"@babel/runtime": "^7.0.0",
|
|
80
80
|
"bind-event-listener": "^3.0.0",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"uuid": "^3.1.0"
|
|
84
84
|
},
|
|
85
85
|
"peerDependencies": {
|
|
86
|
-
"react": "^
|
|
86
|
+
"react": "^18.2.0"
|
|
87
87
|
},
|
|
88
88
|
"devDependencies": {
|
|
89
89
|
"@af/integration-testing": "*",
|