@atlaskit/react-ufo 3.0.0 → 3.1.1
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 +16 -0
- package/dist/cjs/resource-timing/main.js +27 -7
- 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/resource-timing/main.js +27 -7
- 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/resource-timing/main.js +27 -7
- 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/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/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 +4 -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,21 @@
|
|
|
1
1
|
# @atlaskit/ufo-interaction-ignore
|
|
2
2
|
|
|
3
|
+
## 3.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#119087](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/119087)
|
|
8
|
+
[`24baefc255cbc`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/24baefc255cbc) -
|
|
9
|
+
Rename revision name
|
|
10
|
+
|
|
11
|
+
## 3.1.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- [#118212](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/118212)
|
|
16
|
+
[`7a1ec3e0fb496`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7a1ec3e0fb496) -
|
|
17
|
+
Updating logic to track resource timings to include 'other' type which includes '.js'
|
|
18
|
+
|
|
3
19
|
## 3.0.0
|
|
4
20
|
|
|
5
21
|
### Major Changes
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.getResourceTimings = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
9
10
|
var _config = require("../config");
|
|
10
11
|
var _roundNumber = require("../round-number");
|
|
11
12
|
var _config2 = require("./common/utils/config");
|
|
@@ -17,10 +18,19 @@ var resourceTypes = ['fetch', 'xmlhttprequest'];
|
|
|
17
18
|
var CACHE_NETWORK = 'network';
|
|
18
19
|
var CACHE_MEMORY = 'memory';
|
|
19
20
|
var CACHE_DISK = 'disk';
|
|
21
|
+
var isCacheableType = function isCacheableType(url, type) {
|
|
22
|
+
if (cacheableTypes.includes(type)) {
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
if (type === 'other' && url.includes('.js') && (0, _platformFeatureFlags.fg)('ufo_support_other_resource_type_js')) {
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
return false;
|
|
29
|
+
};
|
|
20
30
|
|
|
21
31
|
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
|
|
22
|
-
var calculateTransferType = function calculateTransferType(type, duration, size) {
|
|
23
|
-
if (!
|
|
32
|
+
var calculateTransferType = function calculateTransferType(name, type, duration, size) {
|
|
33
|
+
if (!isCacheableType(name, type)) {
|
|
24
34
|
return CACHE_NETWORK;
|
|
25
35
|
}
|
|
26
36
|
if ((size === undefined || size === 0) && duration === 0) {
|
|
@@ -38,15 +48,22 @@ var getWindowObject = function getWindowObject() {
|
|
|
38
48
|
return typeof window !== 'undefined' && !!window ? window : undefined;
|
|
39
49
|
};
|
|
40
50
|
var hasAccessToResourceSize = function hasAccessToResourceSize(url, type, entry, hasTimingHeaders) {
|
|
41
|
-
return !
|
|
51
|
+
return !isCacheableType(url, type) || url.includes('localhost') || !!getWindowObject() && url.includes(window.location.hostname) || hasTimingHeaders(url, entry);
|
|
42
52
|
};
|
|
43
53
|
var getReportedInitiatorTypes = function getReportedInitiatorTypes(xhrEnabled) {
|
|
44
54
|
var ufoConfig = (0, _config.getConfig)();
|
|
45
55
|
if (!(ufoConfig !== null && ufoConfig !== void 0 && ufoConfig.allowedResources)) {
|
|
46
|
-
if (
|
|
47
|
-
|
|
56
|
+
if ((0, _platformFeatureFlags.fg)('ufo_support_other_resource_type_js')) {
|
|
57
|
+
if (xhrEnabled) {
|
|
58
|
+
return ['script', 'link', 'fetch', 'other', 'xmlhttprequest'];
|
|
59
|
+
}
|
|
60
|
+
return ['script', 'link', 'fetch', 'other'];
|
|
61
|
+
} else {
|
|
62
|
+
if (xhrEnabled) {
|
|
63
|
+
return ['script', 'link', 'fetch', 'xmlhttprequest'];
|
|
64
|
+
}
|
|
65
|
+
return ['script', 'link', 'fetch'];
|
|
48
66
|
}
|
|
49
|
-
return ['script', 'link', 'fetch'];
|
|
50
67
|
}
|
|
51
68
|
return ufoConfig.allowedResources;
|
|
52
69
|
};
|
|
@@ -77,7 +94,7 @@ var getNetworkData = function getNetworkData(item, eventStart) {
|
|
|
77
94
|
return {};
|
|
78
95
|
}
|
|
79
96
|
if (cacheableTypes.includes(initiatorType)) {
|
|
80
|
-
var transferType = calculateTransferType(initiatorType, duration, transferSize);
|
|
97
|
+
var transferType = calculateTransferType(name, initiatorType, duration, transferSize);
|
|
81
98
|
return _objectSpread({
|
|
82
99
|
ttfb: ttfb,
|
|
83
100
|
transferType: transferType,
|
|
@@ -125,6 +142,9 @@ var getResourceTimings = exports.getResourceTimings = function getResourceTiming
|
|
|
125
142
|
if (initiatorType === 'xmlhttprequest' && (xhrFilter === undefined || xhrFilter(name) === false)) {
|
|
126
143
|
return;
|
|
127
144
|
}
|
|
145
|
+
if (initiatorType === 'other' && !name.includes('.js') && (0, _platformFeatureFlags.fg)('ufo_support_other_resource_type_js')) {
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
128
148
|
var url = resourceTypes.includes(initiatorType) ? sanitiseEndpoints(name) : mapResources(name);
|
|
129
149
|
if (!url) {
|
|
130
150
|
return;
|
|
@@ -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,3 +1,4 @@
|
|
|
1
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
1
2
|
import { getConfig as getConfigUFO } from '../config';
|
|
2
3
|
import { roundEpsilon } from '../round-number';
|
|
3
4
|
import { getConfig } from './common/utils/config';
|
|
@@ -7,10 +8,19 @@ const resourceTypes = ['fetch', 'xmlhttprequest'];
|
|
|
7
8
|
const CACHE_NETWORK = 'network';
|
|
8
9
|
const CACHE_MEMORY = 'memory';
|
|
9
10
|
const CACHE_DISK = 'disk';
|
|
11
|
+
const isCacheableType = (url, type) => {
|
|
12
|
+
if (cacheableTypes.includes(type)) {
|
|
13
|
+
return true;
|
|
14
|
+
}
|
|
15
|
+
if (type === 'other' && url.includes('.js') && fg('ufo_support_other_resource_type_js')) {
|
|
16
|
+
return true;
|
|
17
|
+
}
|
|
18
|
+
return false;
|
|
19
|
+
};
|
|
10
20
|
|
|
11
21
|
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
|
|
12
|
-
const calculateTransferType = (type, duration, size) => {
|
|
13
|
-
if (!
|
|
22
|
+
const calculateTransferType = (name, type, duration, size) => {
|
|
23
|
+
if (!isCacheableType(name, type)) {
|
|
14
24
|
return CACHE_NETWORK;
|
|
15
25
|
}
|
|
16
26
|
if ((size === undefined || size === 0) && duration === 0) {
|
|
@@ -25,14 +35,21 @@ const calculateTransferType = (type, duration, size) => {
|
|
|
25
35
|
return CACHE_NETWORK;
|
|
26
36
|
};
|
|
27
37
|
const getWindowObject = () => typeof window !== 'undefined' && !!window ? window : undefined;
|
|
28
|
-
const hasAccessToResourceSize = (url, type, entry, hasTimingHeaders) => !
|
|
38
|
+
const hasAccessToResourceSize = (url, type, entry, hasTimingHeaders) => !isCacheableType(url, type) || url.includes('localhost') || !!getWindowObject() && url.includes(window.location.hostname) || hasTimingHeaders(url, entry);
|
|
29
39
|
const getReportedInitiatorTypes = xhrEnabled => {
|
|
30
40
|
const ufoConfig = getConfigUFO();
|
|
31
41
|
if (!(ufoConfig !== null && ufoConfig !== void 0 && ufoConfig.allowedResources)) {
|
|
32
|
-
if (
|
|
33
|
-
|
|
42
|
+
if (fg('ufo_support_other_resource_type_js')) {
|
|
43
|
+
if (xhrEnabled) {
|
|
44
|
+
return ['script', 'link', 'fetch', 'other', 'xmlhttprequest'];
|
|
45
|
+
}
|
|
46
|
+
return ['script', 'link', 'fetch', 'other'];
|
|
47
|
+
} else {
|
|
48
|
+
if (xhrEnabled) {
|
|
49
|
+
return ['script', 'link', 'fetch', 'xmlhttprequest'];
|
|
50
|
+
}
|
|
51
|
+
return ['script', 'link', 'fetch'];
|
|
34
52
|
}
|
|
35
|
-
return ['script', 'link', 'fetch'];
|
|
36
53
|
}
|
|
37
54
|
return ufoConfig.allowedResources;
|
|
38
55
|
};
|
|
@@ -60,7 +77,7 @@ const getNetworkData = (item, eventStart, hasTimingHeaders = evaluateAccessToRes
|
|
|
60
77
|
return {};
|
|
61
78
|
}
|
|
62
79
|
if (cacheableTypes.includes(initiatorType)) {
|
|
63
|
-
const transferType = calculateTransferType(initiatorType, duration, transferSize);
|
|
80
|
+
const transferType = calculateTransferType(name, initiatorType, duration, transferSize);
|
|
64
81
|
return {
|
|
65
82
|
ttfb,
|
|
66
83
|
transferType,
|
|
@@ -113,6 +130,9 @@ export const getResourceTimings = (interactionStart, interactionEnd) => {
|
|
|
113
130
|
if (initiatorType === 'xmlhttprequest' && (xhrFilter === undefined || xhrFilter(name) === false)) {
|
|
114
131
|
return;
|
|
115
132
|
}
|
|
133
|
+
if (initiatorType === 'other' && !name.includes('.js') && fg('ufo_support_other_resource_type_js')) {
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
116
136
|
const url = resourceTypes.includes(initiatorType) ? sanitiseEndpoints(name) : mapResources(name);
|
|
117
137
|
if (!url) {
|
|
118
138
|
return;
|
|
@@ -1,43 +1,56 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
import { ViewportUpdateClassifier } from './ViewportUpdateClassifier';
|
|
4
|
+
const legacyIgnoreReasons = ['image', 'ssr-hydration', 'editor-lazy-node-view', 'editor-container-mutation'];
|
|
5
|
+
export class FY25_01Classifier extends ViewportUpdateClassifier {
|
|
6
|
+
VCCalculationMethod({
|
|
7
|
+
VCParts,
|
|
8
|
+
entries,
|
|
9
|
+
totalPainted,
|
|
10
|
+
componentsLog
|
|
9
11
|
}) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
const VC = {};
|
|
13
|
+
const VCBox = {};
|
|
14
|
+
entries.reduce((acc = 0, v) => {
|
|
15
|
+
let VCRatio = v[1] / totalPainted + acc;
|
|
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
|
+
}
|
|
23
|
+
VCParts.forEach(value => {
|
|
24
|
+
if ((VC[value] === null || VC[value] === undefined) && VCRatio >= value / 100) {
|
|
25
|
+
var _componentsLog$time;
|
|
26
|
+
VC[value] = time;
|
|
27
|
+
VCBox[value] = new Set();
|
|
28
|
+
(_componentsLog$time = componentsLog[time]) === null || _componentsLog$time === void 0 ? void 0 : _componentsLog$time.forEach(v => {
|
|
29
|
+
var _VCBox$value;
|
|
30
|
+
return (_VCBox$value = VCBox[value]) === null || _VCBox$value === void 0 ? void 0 : _VCBox$value.add(v.targetName);
|
|
31
|
+
});
|
|
18
32
|
}
|
|
19
33
|
});
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
34
|
+
return VCRatio;
|
|
35
|
+
}, 0);
|
|
36
|
+
return {
|
|
37
|
+
VC,
|
|
38
|
+
VCBox
|
|
39
|
+
};
|
|
26
40
|
}
|
|
27
41
|
constructor() {
|
|
28
42
|
super();
|
|
29
43
|
_defineProperty(this, "revision", 'fy25.01');
|
|
30
|
-
_defineProperty(this, "types", ['
|
|
44
|
+
_defineProperty(this, "types", ['html', 'text']);
|
|
31
45
|
_defineProperty(this, "filters", [{
|
|
32
|
-
name: '
|
|
46
|
+
name: 'default-ignore-reasons',
|
|
33
47
|
filter: ({
|
|
34
48
|
type,
|
|
35
49
|
ignoreReason
|
|
36
50
|
}) => {
|
|
37
|
-
return !
|
|
51
|
+
return !ignoreReason || !legacyIgnoreReasons.includes(ignoreReason);
|
|
38
52
|
}
|
|
39
53
|
}]);
|
|
40
|
-
_defineProperty(this, "removedFilters", []);
|
|
41
54
|
this.mergeConfig();
|
|
42
55
|
}
|
|
43
56
|
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
|
+
import { FY25_01Classifier } from './fy25_01';
|
|
4
|
+
export class FY25_02Classifier extends FY25_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
|
+
}
|
|
27
|
+
constructor() {
|
|
28
|
+
super();
|
|
29
|
+
_defineProperty(this, "revision", 'fy25.02');
|
|
30
|
+
_defineProperty(this, "types", ['attr']);
|
|
31
|
+
_defineProperty(this, "filters", [{
|
|
32
|
+
name: 'not-visible',
|
|
33
|
+
filter: ({
|
|
34
|
+
type,
|
|
35
|
+
ignoreReason
|
|
36
|
+
}) => {
|
|
37
|
+
return !(ignoreReason !== null && ignoreReason !== void 0 && ignoreReason.includes('not-visible'));
|
|
38
|
+
}
|
|
39
|
+
}]);
|
|
40
|
+
_defineProperty(this, "removedFilters", []);
|
|
41
|
+
this.mergeConfig();
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
export const revFY25_02Classifier = new FY25_02Classifier();
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { revFY24_01Classifier } from './fy24_01';
|
|
2
1
|
import { revFY25_01Classifier } from './fy25_01';
|
|
2
|
+
import { revFY25_02Classifier } from './fy25_02';
|
|
3
3
|
const Revisions = [{
|
|
4
|
-
name: 'fy24.01',
|
|
5
|
-
classifier: revFY24_01Classifier
|
|
6
|
-
}, {
|
|
7
4
|
name: 'fy25.01',
|
|
8
5
|
classifier: revFY25_01Classifier
|
|
6
|
+
}, {
|
|
7
|
+
name: 'fy25.02',
|
|
8
|
+
classifier: revFY25_02Classifier
|
|
9
9
|
}];
|
|
10
10
|
let revisionResultCache = null;
|
|
11
11
|
export const getRevisions = () => {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
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; }
|
|
3
3
|
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; }
|
|
4
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
5
|
import { getConfig as getConfigUFO } from '../config';
|
|
5
6
|
import { roundEpsilon } from '../round-number';
|
|
6
7
|
import { getConfig } from './common/utils/config';
|
|
@@ -10,10 +11,19 @@ var resourceTypes = ['fetch', 'xmlhttprequest'];
|
|
|
10
11
|
var CACHE_NETWORK = 'network';
|
|
11
12
|
var CACHE_MEMORY = 'memory';
|
|
12
13
|
var CACHE_DISK = 'disk';
|
|
14
|
+
var isCacheableType = function isCacheableType(url, type) {
|
|
15
|
+
if (cacheableTypes.includes(type)) {
|
|
16
|
+
return true;
|
|
17
|
+
}
|
|
18
|
+
if (type === 'other' && url.includes('.js') && fg('ufo_support_other_resource_type_js')) {
|
|
19
|
+
return true;
|
|
20
|
+
}
|
|
21
|
+
return false;
|
|
22
|
+
};
|
|
13
23
|
|
|
14
24
|
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
|
|
15
|
-
var calculateTransferType = function calculateTransferType(type, duration, size) {
|
|
16
|
-
if (!
|
|
25
|
+
var calculateTransferType = function calculateTransferType(name, type, duration, size) {
|
|
26
|
+
if (!isCacheableType(name, type)) {
|
|
17
27
|
return CACHE_NETWORK;
|
|
18
28
|
}
|
|
19
29
|
if ((size === undefined || size === 0) && duration === 0) {
|
|
@@ -31,15 +41,22 @@ var getWindowObject = function getWindowObject() {
|
|
|
31
41
|
return typeof window !== 'undefined' && !!window ? window : undefined;
|
|
32
42
|
};
|
|
33
43
|
var hasAccessToResourceSize = function hasAccessToResourceSize(url, type, entry, hasTimingHeaders) {
|
|
34
|
-
return !
|
|
44
|
+
return !isCacheableType(url, type) || url.includes('localhost') || !!getWindowObject() && url.includes(window.location.hostname) || hasTimingHeaders(url, entry);
|
|
35
45
|
};
|
|
36
46
|
var getReportedInitiatorTypes = function getReportedInitiatorTypes(xhrEnabled) {
|
|
37
47
|
var ufoConfig = getConfigUFO();
|
|
38
48
|
if (!(ufoConfig !== null && ufoConfig !== void 0 && ufoConfig.allowedResources)) {
|
|
39
|
-
if (
|
|
40
|
-
|
|
49
|
+
if (fg('ufo_support_other_resource_type_js')) {
|
|
50
|
+
if (xhrEnabled) {
|
|
51
|
+
return ['script', 'link', 'fetch', 'other', 'xmlhttprequest'];
|
|
52
|
+
}
|
|
53
|
+
return ['script', 'link', 'fetch', 'other'];
|
|
54
|
+
} else {
|
|
55
|
+
if (xhrEnabled) {
|
|
56
|
+
return ['script', 'link', 'fetch', 'xmlhttprequest'];
|
|
57
|
+
}
|
|
58
|
+
return ['script', 'link', 'fetch'];
|
|
41
59
|
}
|
|
42
|
-
return ['script', 'link', 'fetch'];
|
|
43
60
|
}
|
|
44
61
|
return ufoConfig.allowedResources;
|
|
45
62
|
};
|
|
@@ -70,7 +87,7 @@ var getNetworkData = function getNetworkData(item, eventStart) {
|
|
|
70
87
|
return {};
|
|
71
88
|
}
|
|
72
89
|
if (cacheableTypes.includes(initiatorType)) {
|
|
73
|
-
var transferType = calculateTransferType(initiatorType, duration, transferSize);
|
|
90
|
+
var transferType = calculateTransferType(name, initiatorType, duration, transferSize);
|
|
74
91
|
return _objectSpread({
|
|
75
92
|
ttfb: ttfb,
|
|
76
93
|
transferType: transferType,
|
|
@@ -118,6 +135,9 @@ export var getResourceTimings = function getResourceTimings(interactionStart, in
|
|
|
118
135
|
if (initiatorType === 'xmlhttprequest' && (xhrFilter === undefined || xhrFilter(name) === false)) {
|
|
119
136
|
return;
|
|
120
137
|
}
|
|
138
|
+
if (initiatorType === 'other' && !name.includes('.js') && fg('ufo_support_other_resource_type_js')) {
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
121
141
|
var url = resourceTypes.includes(initiatorType) ? sanitiseEndpoints(name) : mapResources(name);
|
|
122
142
|
if (!url) {
|
|
123
143
|
return;
|
|
@@ -1,61 +1,71 @@
|
|
|
1
|
-
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
3
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
4
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
5
|
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
6
|
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; }
|
|
10
7
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
11
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
12
9
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
|
-
import {
|
|
14
|
-
|
|
10
|
+
import { ViewportUpdateClassifier } from './ViewportUpdateClassifier';
|
|
11
|
+
var legacyIgnoreReasons = ['image', 'ssr-hydration', 'editor-lazy-node-view', 'editor-container-mutation'];
|
|
12
|
+
export var FY25_01Classifier = /*#__PURE__*/function (_ViewportUpdateClassi) {
|
|
15
13
|
function FY25_01Classifier() {
|
|
16
14
|
var _this;
|
|
17
15
|
_classCallCheck(this, FY25_01Classifier);
|
|
18
16
|
_this = _callSuper(this, FY25_01Classifier);
|
|
19
17
|
_defineProperty(_this, "revision", 'fy25.01');
|
|
20
|
-
_defineProperty(_this, "types", ['
|
|
18
|
+
_defineProperty(_this, "types", ['html', 'text']);
|
|
21
19
|
_defineProperty(_this, "filters", [{
|
|
22
|
-
name: '
|
|
20
|
+
name: 'default-ignore-reasons',
|
|
23
21
|
filter: function filter(_ref) {
|
|
24
22
|
var type = _ref.type,
|
|
25
23
|
ignoreReason = _ref.ignoreReason;
|
|
26
|
-
return !
|
|
24
|
+
return !ignoreReason || !legacyIgnoreReasons.includes(ignoreReason);
|
|
27
25
|
}
|
|
28
26
|
}]);
|
|
29
|
-
_defineProperty(_this, "removedFilters", []);
|
|
30
27
|
_this.mergeConfig();
|
|
31
28
|
return _this;
|
|
32
29
|
}
|
|
33
|
-
_inherits(FY25_01Classifier,
|
|
30
|
+
_inherits(FY25_01Classifier, _ViewportUpdateClassi);
|
|
34
31
|
return _createClass(FY25_01Classifier, [{
|
|
35
|
-
key: "
|
|
36
|
-
value:
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
var
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
32
|
+
key: "VCCalculationMethod",
|
|
33
|
+
value: function VCCalculationMethod(_ref2) {
|
|
34
|
+
var VCParts = _ref2.VCParts,
|
|
35
|
+
entries = _ref2.entries,
|
|
36
|
+
totalPainted = _ref2.totalPainted,
|
|
37
|
+
componentsLog = _ref2.componentsLog;
|
|
38
|
+
var VC = {};
|
|
39
|
+
var VCBox = {};
|
|
40
|
+
entries.reduce(function () {
|
|
41
|
+
var acc = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
42
|
+
var v = arguments.length > 1 ? arguments[1] : undefined;
|
|
43
|
+
var VCRatio = v[1] / totalPainted + acc;
|
|
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
|
+
}
|
|
51
|
+
VCParts.forEach(function (value) {
|
|
52
|
+
if ((VC[value] === null || VC[value] === undefined) && VCRatio >= value / 100) {
|
|
53
|
+
var _componentsLog$time;
|
|
54
|
+
VC[value] = time;
|
|
55
|
+
VCBox[value] = new Set();
|
|
56
|
+
(_componentsLog$time = componentsLog[time]) === null || _componentsLog$time === void 0 || _componentsLog$time.forEach(function (v) {
|
|
57
|
+
var _VCBox$value;
|
|
58
|
+
return (_VCBox$value = VCBox[value]) === null || _VCBox$value === void 0 ? void 0 : _VCBox$value.add(v.targetName);
|
|
59
|
+
});
|
|
52
60
|
}
|
|
53
61
|
});
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
62
|
+
return VCRatio;
|
|
63
|
+
}, 0);
|
|
64
|
+
return {
|
|
65
|
+
VC: VC,
|
|
66
|
+
VCBox: VCBox
|
|
67
|
+
};
|
|
58
68
|
}
|
|
59
69
|
}]);
|
|
60
|
-
}(
|
|
70
|
+
}(ViewportUpdateClassifier);
|
|
61
71
|
export var revFY25_01Classifier = new FY25_01Classifier();
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
+
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
|
+
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
|
+
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
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; }
|
|
10
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
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';
|
|
13
|
+
import { FY25_01Classifier } from './fy25_01';
|
|
14
|
+
export var FY25_02Classifier = /*#__PURE__*/function (_FY25_01Classifier) {
|
|
15
|
+
function FY25_02Classifier() {
|
|
16
|
+
var _this;
|
|
17
|
+
_classCallCheck(this, FY25_02Classifier);
|
|
18
|
+
_this = _callSuper(this, FY25_02Classifier);
|
|
19
|
+
_defineProperty(_this, "revision", 'fy25.02');
|
|
20
|
+
_defineProperty(_this, "types", ['attr']);
|
|
21
|
+
_defineProperty(_this, "filters", [{
|
|
22
|
+
name: 'not-visible',
|
|
23
|
+
filter: function filter(_ref) {
|
|
24
|
+
var type = _ref.type,
|
|
25
|
+
ignoreReason = _ref.ignoreReason;
|
|
26
|
+
return !(ignoreReason !== null && ignoreReason !== void 0 && ignoreReason.includes('not-visible'));
|
|
27
|
+
}
|
|
28
|
+
}]);
|
|
29
|
+
_defineProperty(_this, "removedFilters", []);
|
|
30
|
+
_this.mergeConfig();
|
|
31
|
+
return _this;
|
|
32
|
+
}
|
|
33
|
+
_inherits(FY25_02Classifier, _FY25_01Classifier);
|
|
34
|
+
return _createClass(FY25_02Classifier, [{
|
|
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
|
+
}]);
|
|
60
|
+
}(FY25_01Classifier);
|
|
61
|
+
export var revFY25_02Classifier = new FY25_02Classifier();
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { revFY24_01Classifier } from './fy24_01';
|
|
2
1
|
import { revFY25_01Classifier } from './fy25_01';
|
|
2
|
+
import { revFY25_02Classifier } from './fy25_02';
|
|
3
3
|
var Revisions = [{
|
|
4
|
-
name: 'fy24.01',
|
|
5
|
-
classifier: revFY24_01Classifier
|
|
6
|
-
}, {
|
|
7
4
|
name: 'fy25.01',
|
|
8
5
|
classifier: revFY25_01Classifier
|
|
6
|
+
}, {
|
|
7
|
+
name: 'fy25.02',
|
|
8
|
+
classifier: revFY25_02Classifier
|
|
9
9
|
}];
|
|
10
10
|
var revisionResultCache = null;
|
|
11
11
|
export var getRevisions = function getRevisions() {
|
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import type { FilterArgs } from './ViewportUpdateClassifier';
|
|
5
|
-
export declare class FY25_01Classifier extends FY24_01Classifier {
|
|
1
|
+
import type { VCCalculationMethodArgs, VCCalculationMethodReturn } from './types';
|
|
2
|
+
import { type FilterArgs, ViewportUpdateClassifier } from './ViewportUpdateClassifier';
|
|
3
|
+
export declare class FY25_01Classifier extends ViewportUpdateClassifier {
|
|
6
4
|
revision: string;
|
|
7
5
|
types: string[];
|
|
8
6
|
filters: {
|
|
9
7
|
name: string;
|
|
10
8
|
filter: ({ type, ignoreReason }: FilterArgs) => boolean;
|
|
11
9
|
}[];
|
|
12
|
-
|
|
13
|
-
filterComponentsLog({ componentsLog, ttai }: FilterComponentsLogArgs): ComponentsLogType;
|
|
10
|
+
VCCalculationMethod({ VCParts, entries, totalPainted, componentsLog, }: VCCalculationMethodArgs): VCCalculationMethodReturn;
|
|
14
11
|
constructor();
|
|
15
12
|
}
|
|
16
13
|
export declare const revFY25_01Classifier: FY25_01Classifier;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ComponentsLogType } from '../../../common/vc/types';
|
|
2
|
+
import { FY25_01Classifier } from './fy25_01';
|
|
3
|
+
import type { FilterComponentsLogArgs } from './types';
|
|
4
|
+
import type { FilterArgs } from './ViewportUpdateClassifier';
|
|
5
|
+
export declare class FY25_02Classifier extends FY25_01Classifier {
|
|
6
|
+
revision: string;
|
|
7
|
+
types: string[];
|
|
8
|
+
filters: {
|
|
9
|
+
name: string;
|
|
10
|
+
filter: ({ type, ignoreReason }: FilterArgs) => boolean;
|
|
11
|
+
}[];
|
|
12
|
+
removedFilters: never[];
|
|
13
|
+
filterComponentsLog({ componentsLog, ttai }: FilterComponentsLogArgs): ComponentsLogType;
|
|
14
|
+
constructor();
|
|
15
|
+
}
|
|
16
|
+
export declare const revFY25_02Classifier: FY25_02Classifier;
|
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import type { FilterArgs } from './ViewportUpdateClassifier';
|
|
5
|
-
export declare class FY25_01Classifier extends FY24_01Classifier {
|
|
1
|
+
import type { VCCalculationMethodArgs, VCCalculationMethodReturn } from './types';
|
|
2
|
+
import { type FilterArgs, ViewportUpdateClassifier } from './ViewportUpdateClassifier';
|
|
3
|
+
export declare class FY25_01Classifier extends ViewportUpdateClassifier {
|
|
6
4
|
revision: string;
|
|
7
5
|
types: string[];
|
|
8
6
|
filters: {
|
|
9
7
|
name: string;
|
|
10
8
|
filter: ({ type, ignoreReason }: FilterArgs) => boolean;
|
|
11
9
|
}[];
|
|
12
|
-
|
|
13
|
-
filterComponentsLog({ componentsLog, ttai }: FilterComponentsLogArgs): ComponentsLogType;
|
|
10
|
+
VCCalculationMethod({ VCParts, entries, totalPainted, componentsLog, }: VCCalculationMethodArgs): VCCalculationMethodReturn;
|
|
14
11
|
constructor();
|
|
15
12
|
}
|
|
16
13
|
export declare const revFY25_01Classifier: FY25_01Classifier;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ComponentsLogType } from '../../../common/vc/types';
|
|
2
|
+
import { FY25_01Classifier } from './fy25_01';
|
|
3
|
+
import type { FilterComponentsLogArgs } from './types';
|
|
4
|
+
import type { FilterArgs } from './ViewportUpdateClassifier';
|
|
5
|
+
export declare class FY25_02Classifier extends FY25_01Classifier {
|
|
6
|
+
revision: string;
|
|
7
|
+
types: string[];
|
|
8
|
+
filters: {
|
|
9
|
+
name: string;
|
|
10
|
+
filter: ({ type, ignoreReason }: FilterArgs) => boolean;
|
|
11
|
+
}[];
|
|
12
|
+
removedFilters: never[];
|
|
13
|
+
filterComponentsLog({ componentsLog, ttai }: FilterComponentsLogArgs): ComponentsLogType;
|
|
14
|
+
constructor();
|
|
15
|
+
}
|
|
16
|
+
export declare const revFY25_02Classifier: FY25_02Classifier;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/react-ufo",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1.1",
|
|
4
4
|
"description": "Parts of React UFO that are publicly available",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -159,6 +159,9 @@
|
|
|
159
159
|
},
|
|
160
160
|
"ufo_chr_config": {
|
|
161
161
|
"type": "boolean"
|
|
162
|
+
},
|
|
163
|
+
"ufo_support_other_resource_type_js": {
|
|
164
|
+
"type": "boolean"
|
|
162
165
|
}
|
|
163
166
|
}
|
|
164
167
|
}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.revFY24_01Classifier = exports.FY24_01Classifier = void 0;
|
|
8
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
9
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
11
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
12
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
13
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
14
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
|
-
var _ViewportUpdateClassifier = require("./ViewportUpdateClassifier");
|
|
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)); }
|
|
17
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
18
|
-
var legacyIgnoreReasons = ['image', 'ssr-hydration', 'editor-lazy-node-view', 'editor-container-mutation'];
|
|
19
|
-
var FY24_01Classifier = exports.FY24_01Classifier = /*#__PURE__*/function (_ViewportUpdateClassi) {
|
|
20
|
-
function FY24_01Classifier() {
|
|
21
|
-
var _this;
|
|
22
|
-
(0, _classCallCheck2.default)(this, FY24_01Classifier);
|
|
23
|
-
_this = _callSuper(this, FY24_01Classifier);
|
|
24
|
-
(0, _defineProperty2.default)(_this, "revision", 'fy24.01');
|
|
25
|
-
(0, _defineProperty2.default)(_this, "types", ['html', 'text']);
|
|
26
|
-
(0, _defineProperty2.default)(_this, "filters", [{
|
|
27
|
-
name: 'default-ignore-reasons',
|
|
28
|
-
filter: function filter(_ref) {
|
|
29
|
-
var type = _ref.type,
|
|
30
|
-
ignoreReason = _ref.ignoreReason;
|
|
31
|
-
return !ignoreReason || !legacyIgnoreReasons.includes(ignoreReason);
|
|
32
|
-
}
|
|
33
|
-
}]);
|
|
34
|
-
_this.mergeConfig();
|
|
35
|
-
return _this;
|
|
36
|
-
}
|
|
37
|
-
(0, _inherits2.default)(FY24_01Classifier, _ViewportUpdateClassi);
|
|
38
|
-
return (0, _createClass2.default)(FY24_01Classifier, [{
|
|
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
|
-
});
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
return VCRatio;
|
|
70
|
-
}, 0);
|
|
71
|
-
return {
|
|
72
|
-
VC: VC,
|
|
73
|
-
VCBox: VCBox
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
}]);
|
|
77
|
-
}(_ViewportUpdateClassifier.ViewportUpdateClassifier);
|
|
78
|
-
var revFY24_01Classifier = exports.revFY24_01Classifier = new FY24_01Classifier();
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
|
-
import { ViewportUpdateClassifier } from './ViewportUpdateClassifier';
|
|
4
|
-
const legacyIgnoreReasons = ['image', 'ssr-hydration', 'editor-lazy-node-view', 'editor-container-mutation'];
|
|
5
|
-
export class FY24_01Classifier extends ViewportUpdateClassifier {
|
|
6
|
-
VCCalculationMethod({
|
|
7
|
-
VCParts,
|
|
8
|
-
entries,
|
|
9
|
-
totalPainted,
|
|
10
|
-
componentsLog
|
|
11
|
-
}) {
|
|
12
|
-
const VC = {};
|
|
13
|
-
const VCBox = {};
|
|
14
|
-
entries.reduce((acc = 0, v) => {
|
|
15
|
-
let VCRatio = v[1] / totalPainted + acc;
|
|
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
|
-
}
|
|
23
|
-
VCParts.forEach(value => {
|
|
24
|
-
if ((VC[value] === null || VC[value] === undefined) && VCRatio >= value / 100) {
|
|
25
|
-
var _componentsLog$time;
|
|
26
|
-
VC[value] = time;
|
|
27
|
-
VCBox[value] = new Set();
|
|
28
|
-
(_componentsLog$time = componentsLog[time]) === null || _componentsLog$time === void 0 ? void 0 : _componentsLog$time.forEach(v => {
|
|
29
|
-
var _VCBox$value;
|
|
30
|
-
return (_VCBox$value = VCBox[value]) === null || _VCBox$value === void 0 ? void 0 : _VCBox$value.add(v.targetName);
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
return VCRatio;
|
|
35
|
-
}, 0);
|
|
36
|
-
return {
|
|
37
|
-
VC,
|
|
38
|
-
VCBox
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
constructor() {
|
|
42
|
-
super();
|
|
43
|
-
_defineProperty(this, "revision", 'fy24.01');
|
|
44
|
-
_defineProperty(this, "types", ['html', 'text']);
|
|
45
|
-
_defineProperty(this, "filters", [{
|
|
46
|
-
name: 'default-ignore-reasons',
|
|
47
|
-
filter: ({
|
|
48
|
-
type,
|
|
49
|
-
ignoreReason
|
|
50
|
-
}) => {
|
|
51
|
-
return !ignoreReason || !legacyIgnoreReasons.includes(ignoreReason);
|
|
52
|
-
}
|
|
53
|
-
}]);
|
|
54
|
-
this.mergeConfig();
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
export const revFY24_01Classifier = new FY24_01Classifier();
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
4
|
-
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
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
|
-
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';
|
|
10
|
-
import { ViewportUpdateClassifier } from './ViewportUpdateClassifier';
|
|
11
|
-
var legacyIgnoreReasons = ['image', 'ssr-hydration', 'editor-lazy-node-view', 'editor-container-mutation'];
|
|
12
|
-
export var FY24_01Classifier = /*#__PURE__*/function (_ViewportUpdateClassi) {
|
|
13
|
-
function FY24_01Classifier() {
|
|
14
|
-
var _this;
|
|
15
|
-
_classCallCheck(this, FY24_01Classifier);
|
|
16
|
-
_this = _callSuper(this, FY24_01Classifier);
|
|
17
|
-
_defineProperty(_this, "revision", 'fy24.01');
|
|
18
|
-
_defineProperty(_this, "types", ['html', 'text']);
|
|
19
|
-
_defineProperty(_this, "filters", [{
|
|
20
|
-
name: 'default-ignore-reasons',
|
|
21
|
-
filter: function filter(_ref) {
|
|
22
|
-
var type = _ref.type,
|
|
23
|
-
ignoreReason = _ref.ignoreReason;
|
|
24
|
-
return !ignoreReason || !legacyIgnoreReasons.includes(ignoreReason);
|
|
25
|
-
}
|
|
26
|
-
}]);
|
|
27
|
-
_this.mergeConfig();
|
|
28
|
-
return _this;
|
|
29
|
-
}
|
|
30
|
-
_inherits(FY24_01Classifier, _ViewportUpdateClassi);
|
|
31
|
-
return _createClass(FY24_01Classifier, [{
|
|
32
|
-
key: "VCCalculationMethod",
|
|
33
|
-
value: function VCCalculationMethod(_ref2) {
|
|
34
|
-
var VCParts = _ref2.VCParts,
|
|
35
|
-
entries = _ref2.entries,
|
|
36
|
-
totalPainted = _ref2.totalPainted,
|
|
37
|
-
componentsLog = _ref2.componentsLog;
|
|
38
|
-
var VC = {};
|
|
39
|
-
var VCBox = {};
|
|
40
|
-
entries.reduce(function () {
|
|
41
|
-
var acc = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
42
|
-
var v = arguments.length > 1 ? arguments[1] : undefined;
|
|
43
|
-
var VCRatio = v[1] / totalPainted + acc;
|
|
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
|
-
}
|
|
51
|
-
VCParts.forEach(function (value) {
|
|
52
|
-
if ((VC[value] === null || VC[value] === undefined) && VCRatio >= value / 100) {
|
|
53
|
-
var _componentsLog$time;
|
|
54
|
-
VC[value] = time;
|
|
55
|
-
VCBox[value] = new Set();
|
|
56
|
-
(_componentsLog$time = componentsLog[time]) === null || _componentsLog$time === void 0 || _componentsLog$time.forEach(function (v) {
|
|
57
|
-
var _VCBox$value;
|
|
58
|
-
return (_VCBox$value = VCBox[value]) === null || _VCBox$value === void 0 ? void 0 : _VCBox$value.add(v.targetName);
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
return VCRatio;
|
|
63
|
-
}, 0);
|
|
64
|
-
return {
|
|
65
|
-
VC: VC,
|
|
66
|
-
VCBox: VCBox
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
}]);
|
|
70
|
-
}(ViewportUpdateClassifier);
|
|
71
|
-
export var revFY24_01Classifier = new FY24_01Classifier();
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { VCCalculationMethodArgs, VCCalculationMethodReturn } from './types';
|
|
2
|
-
import { type FilterArgs, ViewportUpdateClassifier } from './ViewportUpdateClassifier';
|
|
3
|
-
export declare class FY24_01Classifier extends ViewportUpdateClassifier {
|
|
4
|
-
revision: string;
|
|
5
|
-
types: string[];
|
|
6
|
-
filters: {
|
|
7
|
-
name: string;
|
|
8
|
-
filter: ({ type, ignoreReason }: FilterArgs) => boolean;
|
|
9
|
-
}[];
|
|
10
|
-
VCCalculationMethod({ VCParts, entries, totalPainted, componentsLog, }: VCCalculationMethodArgs): VCCalculationMethodReturn;
|
|
11
|
-
constructor();
|
|
12
|
-
}
|
|
13
|
-
export declare const revFY24_01Classifier: FY24_01Classifier;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { VCCalculationMethodArgs, VCCalculationMethodReturn } from './types';
|
|
2
|
-
import { type FilterArgs, ViewportUpdateClassifier } from './ViewportUpdateClassifier';
|
|
3
|
-
export declare class FY24_01Classifier extends ViewportUpdateClassifier {
|
|
4
|
-
revision: string;
|
|
5
|
-
types: string[];
|
|
6
|
-
filters: {
|
|
7
|
-
name: string;
|
|
8
|
-
filter: ({ type, ignoreReason }: FilterArgs) => boolean;
|
|
9
|
-
}[];
|
|
10
|
-
VCCalculationMethod({ VCParts, entries, totalPainted, componentsLog, }: VCCalculationMethodArgs): VCCalculationMethodReturn;
|
|
11
|
-
constructor();
|
|
12
|
-
}
|
|
13
|
-
export declare const revFY24_01Classifier: FY24_01Classifier;
|