@atlaskit/react-ufo 3.7.0 → 3.9.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 +16 -0
- package/dist/cjs/config/index.js +0 -9
- package/dist/cjs/create-payload/utils/get-vc-metrics.js +2 -2
- package/dist/cjs/vc/index.js +1 -1
- package/dist/cjs/vc/vc-observer/getVCRevisionsData.js +5 -2
- package/dist/cjs/vc/vc-observer/index.js +16 -9
- package/dist/cjs/vc/vc-observer/observers/index.js +4 -18
- package/dist/cjs/vc/vc-observer/revisions/fy25_01.js +1 -1
- package/dist/cjs/vc/vc-observer/revisions/revisions.js +3 -2
- package/dist/es2019/config/index.js +0 -8
- package/dist/es2019/create-payload/utils/get-vc-metrics.js +2 -2
- package/dist/es2019/vc/index.js +2 -2
- package/dist/es2019/vc/vc-observer/getVCRevisionsData.js +5 -2
- package/dist/es2019/vc/vc-observer/index.js +14 -7
- package/dist/es2019/vc/vc-observer/observers/index.js +0 -15
- package/dist/es2019/vc/vc-observer/revisions/fy25_01.js +1 -1
- package/dist/es2019/vc/vc-observer/revisions/revisions.js +3 -2
- package/dist/esm/config/index.js +0 -8
- package/dist/esm/create-payload/utils/get-vc-metrics.js +2 -2
- package/dist/esm/vc/index.js +1 -1
- package/dist/esm/vc/vc-observer/getVCRevisionsData.js +5 -2
- package/dist/esm/vc/vc-observer/index.js +16 -9
- package/dist/esm/vc/vc-observer/observers/index.js +4 -18
- package/dist/esm/vc/vc-observer/revisions/fy25_01.js +1 -1
- package/dist/esm/vc/vc-observer/revisions/revisions.js +3 -2
- package/dist/types/common/vc/types.d.ts +1 -1
- package/dist/types/config/index.d.ts +2 -3
- package/dist/types/vc/vc-observer/observers/index.d.ts +0 -1
- package/dist/types-ts4.5/common/vc/types.d.ts +1 -1
- package/dist/types-ts4.5/config/index.d.ts +2 -3
- package/dist/types-ts4.5/vc/vc-observer/observers/index.d.ts +0 -1
- package/package.json +1 -4
- package/dist/cjs/vc/vc-observer/observers/editor-lnv/index.js +0 -186
- package/dist/cjs/vc/vc-observer/observers/editor-lnv/test-utils.js +0 -68
- package/dist/es2019/vc/vc-observer/observers/editor-lnv/index.js +0 -140
- package/dist/es2019/vc/vc-observer/observers/editor-lnv/test-utils.js +0 -41
- package/dist/esm/vc/vc-observer/observers/editor-lnv/index.js +0 -180
- package/dist/esm/vc/vc-observer/observers/editor-lnv/test-utils.js +0 -58
- package/dist/types/vc/vc-observer/observers/editor-lnv/index.d.ts +0 -24
- package/dist/types/vc/vc-observer/observers/editor-lnv/test-utils.d.ts +0 -35
- package/dist/types-ts4.5/vc/vc-observer/observers/editor-lnv/index.d.ts +0 -24
- package/dist/types-ts4.5/vc/vc-observer/observers/editor-lnv/test-utils.d.ts +0 -35
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/ufo-interaction-ignore
|
|
2
2
|
|
|
3
|
+
## 3.9.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#147017](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/147017)
|
|
8
|
+
[`cd0798d2a9a3d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/cd0798d2a9a3d) -
|
|
9
|
+
Enable VC revisions by UFO config
|
|
10
|
+
|
|
11
|
+
## 3.8.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- [#146843](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/146843)
|
|
16
|
+
[`34bd7506b5f71`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/34bd7506b5f71) -
|
|
17
|
+
remove editor LNV handling, since we already have TTVC v3
|
|
18
|
+
|
|
3
19
|
## 3.7.0
|
|
4
20
|
|
|
5
21
|
### Minor Changes
|
package/dist/cjs/config/index.js
CHANGED
|
@@ -16,7 +16,6 @@ exports.getRemovePageSegmentsUFOPrefixes = getRemovePageSegmentsUFOPrefixes;
|
|
|
16
16
|
exports.getTypingPerformanceTracingMethod = getTypingPerformanceTracingMethod;
|
|
17
17
|
exports.getUfoNameOverrides = getUfoNameOverrides;
|
|
18
18
|
exports.setUFOConfig = setUFOConfig;
|
|
19
|
-
exports.shouldHandleEditorLnv = shouldHandleEditorLnv;
|
|
20
19
|
var config;
|
|
21
20
|
|
|
22
21
|
// Defensively typed, since this is directly user-editable
|
|
@@ -264,12 +263,4 @@ function getDoNotAbortActivePressInteractionOnTransition() {
|
|
|
264
263
|
} catch (e) {
|
|
265
264
|
return undefined;
|
|
266
265
|
}
|
|
267
|
-
}
|
|
268
|
-
function shouldHandleEditorLnv() {
|
|
269
|
-
try {
|
|
270
|
-
var _config$enableEditorL, _config12;
|
|
271
|
-
return (_config$enableEditorL = (_config12 = config) === null || _config12 === void 0 ? void 0 : _config12.enableEditorLnvHandler) !== null && _config$enableEditorL !== void 0 ? _config$enableEditorL : false;
|
|
272
|
-
} catch (e) {
|
|
273
|
-
return false;
|
|
274
|
-
}
|
|
275
266
|
}
|
|
@@ -22,7 +22,7 @@ function getVCMetrics(_x) {
|
|
|
22
22
|
}
|
|
23
23
|
function _getVCMetrics() {
|
|
24
24
|
_getVCMetrics = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(interaction) {
|
|
25
|
-
var _config$vc, _config$vc$ssrWhiteli, _interaction$apdex, _config$experimentalI;
|
|
25
|
+
var _config$vc, _config$vc$ssrWhiteli, _interaction$apdex, _config$experimentalI, _config$vc2;
|
|
26
26
|
var config, interactionStatus, pageVisibilityUpToTTAI, isSSREnabled, ssr, tti, prefix, result, _result$ufoVcRev, ttvcV2Revision, VC;
|
|
27
27
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
28
28
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -70,7 +70,7 @@ function _getVCMetrics() {
|
|
|
70
70
|
(0, _vc.getVCObserver)().stop();
|
|
71
71
|
}
|
|
72
72
|
_interactionMetrics.postInteractionLog.setLastInteractionFinishVCResult(result);
|
|
73
|
-
if (
|
|
73
|
+
if (config !== null && config !== void 0 && (_config$vc2 = config.vc) !== null && _config$vc2 !== void 0 && (_config$vc2 = _config$vc2.enabledVCRevisions) !== null && _config$vc2 !== void 0 && _config$vc2.includes('fy25.01')) {
|
|
74
74
|
_context.next = 26;
|
|
75
75
|
break;
|
|
76
76
|
}
|
package/dist/cjs/vc/index.js
CHANGED
|
@@ -26,7 +26,7 @@ var VCObserverWrapper = /*#__PURE__*/function () {
|
|
|
26
26
|
var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
27
27
|
(0, _classCallCheck2.default)(this, VCObserverWrapper);
|
|
28
28
|
this.newVCObserver = null;
|
|
29
|
-
var isNewVCObserverEnabled = (0, _platformFeatureFlags.fg)('platform_ufo_vc_observer_new') || ((_getConfig = (0, _config.getConfig)()) === null || _getConfig === void 0 || (_getConfig = _getConfig.vc) === null || _getConfig === void 0 ? void 0 : _getConfig.
|
|
29
|
+
var isNewVCObserverEnabled = (0, _platformFeatureFlags.fg)('platform_ufo_vc_observer_new') || ((_getConfig = (0, _config.getConfig)()) === null || _getConfig === void 0 || (_getConfig = _getConfig.vc) === null || _getConfig === void 0 || (_getConfig = _getConfig.enabledVCRevisions) === null || _getConfig === void 0 ? void 0 : _getConfig.includes('fy25.03'));
|
|
30
30
|
if (isNewVCObserverEnabled) {
|
|
31
31
|
this.newVCObserver = new _vcObserverNew.default({
|
|
32
32
|
selectorConfig: opts.selectorConfig
|
|
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.getVCRevisionsData = getVCRevisionsData;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
10
|
+
var _config = require("../../config");
|
|
10
11
|
var _hiddenTiming = require("../../hidden-timing");
|
|
11
12
|
var _revisions = require("./revisions/revisions");
|
|
12
13
|
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
@@ -45,6 +46,7 @@ function createVCDetails(calculatedVC, shouldHaveVCmetric) {
|
|
|
45
46
|
|
|
46
47
|
// Optimized implementation (current one)
|
|
47
48
|
function getVCRevisionsData(_ref) {
|
|
49
|
+
var _ufoConfig$vc, _ufoConfig$vc2;
|
|
48
50
|
var fullPrefix = _ref.fullPrefix,
|
|
49
51
|
interaction = _ref.interaction,
|
|
50
52
|
isVCClean = _ref.isVCClean,
|
|
@@ -53,7 +55,8 @@ function getVCRevisionsData(_ref) {
|
|
|
53
55
|
ssr = _ref.ssr,
|
|
54
56
|
calculatedVC = _ref.calculatedVC,
|
|
55
57
|
calculatedVCNext = _ref.calculatedVCNext;
|
|
56
|
-
|
|
58
|
+
var ufoConfig = (0, _config.getConfig)();
|
|
59
|
+
if (!(0, _platformFeatureFlags.fg)('platform_ufo_vc_observer_new') && !(ufoConfig !== null && ufoConfig !== void 0 && (_ufoConfig$vc = ufoConfig.vc) !== null && _ufoConfig$vc !== void 0 && (_ufoConfig$vc = _ufoConfig$vc.enabledVCRevisions) !== null && _ufoConfig$vc !== void 0 && _ufoConfig$vc.includes('fy25.03'))) {
|
|
57
60
|
if (!multiHeatmap) {
|
|
58
61
|
return null;
|
|
59
62
|
}
|
|
@@ -89,7 +92,7 @@ function getVCRevisionsData(_ref) {
|
|
|
89
92
|
'metric:vc90': shouldHaveVCmetric ? calculatedVCNext.VC['90'] : null,
|
|
90
93
|
vcDetails: createVCDetails(calculatedVCNext, shouldHaveVCmetric)
|
|
91
94
|
};
|
|
92
|
-
if ((0
|
|
95
|
+
if (!(ufoConfig !== null && ufoConfig !== void 0 && (_ufoConfig$vc2 = ufoConfig.vc) !== null && _ufoConfig$vc2 !== void 0 && (_ufoConfig$vc2 = _ufoConfig$vc2.enabledVCRevisions) !== null && _ufoConfig$vc2 !== void 0 && _ufoConfig$vc2.includes('fy25.01'))) {
|
|
93
96
|
return (0, _defineProperty2.default)({}, "".concat(fullPrefix, "vc:rev"), [ttvcV2Revision]);
|
|
94
97
|
}
|
|
95
98
|
|
|
@@ -14,6 +14,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
14
14
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
15
15
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
16
16
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
|
+
var _config = require("../../config");
|
|
17
18
|
var _attachAbortListeners = require("./attachAbortListeners");
|
|
18
19
|
var _getVCRevisionsData = require("./getVCRevisionsData");
|
|
19
20
|
var _getViewport = require("./getViewport");
|
|
@@ -44,7 +45,8 @@ function filterComponentsLog(log) {
|
|
|
44
45
|
}
|
|
45
46
|
var VCObserver = exports.VCObserver = /*#__PURE__*/function () {
|
|
46
47
|
function VCObserver(options) {
|
|
47
|
-
var _this = this
|
|
48
|
+
var _this = this,
|
|
49
|
+
_getConfig5;
|
|
48
50
|
(0, _classCallCheck2.default)(this, VCObserver);
|
|
49
51
|
/* abort logic */
|
|
50
52
|
(0, _defineProperty2.default)(this, "abortReason", {
|
|
@@ -104,7 +106,8 @@ var VCObserver = exports.VCObserver = /*#__PURE__*/function () {
|
|
|
104
106
|
});
|
|
105
107
|
(0, _defineProperty2.default)(this, "getVCResult", /*#__PURE__*/function () {
|
|
106
108
|
var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(_ref3) {
|
|
107
|
-
var
|
|
109
|
+
var _getConfig, _getConfig2;
|
|
110
|
+
var start, stop, tti, prefix, ssr, vc, isEventAborted, startTime, fullPrefix, rawData, abortReason, abortReasonInfo, heatmap, heatmapNext, outOfBoundaryInfo, totalTime, componentsLog, viewport, devToolsEnabled, ratios, multiHeatmap, isTTVCv1Disabled, ttvcV1Result, VC, VCBox, VCEntries, totalPainted, _componentsLog, vcNext, outOfBoundary, stopTime, ttvcV1DevToolInfo, ttvcV2DevToolInfo, isVCClean, revisionsData, isCalcSpeedIndexEnabled, speedIndex, isTTVCv3Enabled;
|
|
108
111
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
109
112
|
while (1) switch (_context.prev = _context.next) {
|
|
110
113
|
case 0:
|
|
@@ -131,7 +134,7 @@ var VCObserver = exports.VCObserver = /*#__PURE__*/function () {
|
|
|
131
134
|
} catch (e) {}
|
|
132
135
|
return _context.abrupt("return", (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(fullPrefix, "vc:state"), false), "".concat(fullPrefix, "vc:abort:reason"), abortReasonInfo), "".concat(fullPrefix, "vc:abort:timestamp"), abortReason.timestamp));
|
|
133
136
|
case 10:
|
|
134
|
-
isTTVCv1Disabled = (0,
|
|
137
|
+
isTTVCv1Disabled = !((_getConfig = (0, _config.getConfig)()) !== null && _getConfig !== void 0 && (_getConfig = _getConfig.vc) !== null && _getConfig !== void 0 && (_getConfig = _getConfig.enabledVCRevisions) !== null && _getConfig !== void 0 && _getConfig.includes('fy25.01'));
|
|
135
138
|
ttvcV1Result = isTTVCv1Disabled ? {
|
|
136
139
|
VC: {},
|
|
137
140
|
VCBox: {},
|
|
@@ -289,10 +292,11 @@ var VCObserver = exports.VCObserver = /*#__PURE__*/function () {
|
|
|
289
292
|
}
|
|
290
293
|
return _context.abrupt("return", _objectSpread(_objectSpread(_objectSpread((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(fullPrefix, "vc:size"), viewport), "".concat(fullPrefix, "vc:time"), Math.round(totalTime + (stopTime - startTime))), "".concat(fullPrefix, "vc:ratios"), ratios), outOfBoundary), {}, (0, _defineProperty2.default)({}, "".concat(fullPrefix, "vc:ignored"), _this.getIgnoredElements(componentsLog)), revisionsData), isCalcSpeedIndexEnabled ? speedIndex : {}));
|
|
291
294
|
case 26:
|
|
295
|
+
isTTVCv3Enabled = (0, _platformFeatureFlags.fg)('platform_ufo_vc_observer_new') || ((_getConfig2 = (0, _config.getConfig)()) === null || _getConfig2 === void 0 || (_getConfig2 = _getConfig2.vc) === null || _getConfig2 === void 0 || (_getConfig2 = _getConfig2.enabledVCRevisions) === null || _getConfig2 === void 0 ? void 0 : _getConfig2.includes('fy25.03'));
|
|
292
296
|
return _context.abrupt("return", _objectSpread(_objectSpread(_objectSpread((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({
|
|
293
297
|
'metrics:vc': VC
|
|
294
|
-
}, "".concat(fullPrefix, "vc:state"), true), "".concat(fullPrefix, "vc:clean"), isVCClean), "".concat(fullPrefix, "vc:dom"), VCBox), "".concat(fullPrefix, "vc:updates"),
|
|
295
|
-
case
|
|
298
|
+
}, "".concat(fullPrefix, "vc:state"), true), "".concat(fullPrefix, "vc:clean"), isVCClean), "".concat(fullPrefix, "vc:dom"), VCBox), "".concat(fullPrefix, "vc:updates"), isTTVCv3Enabled ? undefined : VCEntries.rel.slice(0, 50)), "".concat(fullPrefix, "vc:size"), viewport), "".concat(fullPrefix, "vc:time"), Math.round(totalTime + (stopTime - startTime))), "".concat(fullPrefix, "vc:total"), totalPainted), "".concat(fullPrefix, "vc:ratios"), ratios), outOfBoundary), {}, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(fullPrefix, "vc:next"), vcNext.VC), "".concat(fullPrefix, "vc:next:updates"), isTTVCv3Enabled ? undefined : vcNext.VCEntries.rel.slice(0, 50)), "".concat(fullPrefix, "vc:next:dom"), vcNext.VCBox), "".concat(fullPrefix, "vc:ignored"), _this.getIgnoredElements(componentsLog)), revisionsData), isCalcSpeedIndexEnabled ? speedIndex : {}));
|
|
299
|
+
case 28:
|
|
296
300
|
case "end":
|
|
297
301
|
return _context.stop();
|
|
298
302
|
}
|
|
@@ -303,9 +307,10 @@ var VCObserver = exports.VCObserver = /*#__PURE__*/function () {
|
|
|
303
307
|
};
|
|
304
308
|
}());
|
|
305
309
|
(0, _defineProperty2.default)(this, "handleUpdate", function (rawTime, intersectionRect, targetName, element, type, ignoreReason, attributeName, oldValue, newValue) {
|
|
310
|
+
var _getConfig3;
|
|
306
311
|
_this.measureStart();
|
|
307
312
|
_this.legacyHandleUpdate(rawTime, intersectionRect, targetName, element, type, ignoreReason, attributeName, oldValue, newValue);
|
|
308
|
-
if (!(0, _platformFeatureFlags.fg)('platform_ufo_vc_observer_new')) {
|
|
313
|
+
if (!(0, _platformFeatureFlags.fg)('platform_ufo_vc_observer_new') && !((_getConfig3 = (0, _config.getConfig)()) !== null && _getConfig3 !== void 0 && (_getConfig3 = _getConfig3.vc) !== null && _getConfig3 !== void 0 && (_getConfig3 = _getConfig3.enabledVCRevisions) !== null && _getConfig3 !== void 0 && _getConfig3.includes('fy25.03'))) {
|
|
309
314
|
_this.onViewportChangeDetected({
|
|
310
315
|
timestamp: rawTime,
|
|
311
316
|
intersectionRect: intersectionRect,
|
|
@@ -322,13 +327,14 @@ var VCObserver = exports.VCObserver = /*#__PURE__*/function () {
|
|
|
322
327
|
});
|
|
323
328
|
(0, _defineProperty2.default)(this, "legacyHandleUpdate", function (rawTime, intersectionRect, targetName, element, type, ignoreReason, attributeName, oldValue, newValue) {
|
|
324
329
|
if (_this.abortReason.reason === null || _this.abortReason.blocking === false) {
|
|
330
|
+
var _getConfig4;
|
|
325
331
|
var time = Math.round(rawTime - _this.startTime);
|
|
326
332
|
var mappedValues = _this.mapPixelsToHeatmap(intersectionRect.left, intersectionRect.top, intersectionRect.width, intersectionRect.height);
|
|
327
333
|
_this.vcRatios[targetName] = _this.getElementRatio(mappedValues);
|
|
328
334
|
if (!ignoreReason) {
|
|
329
335
|
_this.applyChangesToHeatMap(mappedValues, time, _this.heatmapNext);
|
|
330
336
|
}
|
|
331
|
-
var isTTVCv1Disabled = (0,
|
|
337
|
+
var isTTVCv1Disabled = !((_getConfig4 = (0, _config.getConfig)()) !== null && _getConfig4 !== void 0 && (_getConfig4 = _getConfig4.vc) !== null && _getConfig4 !== void 0 && (_getConfig4 = _getConfig4.enabledVCRevisions) !== null && _getConfig4 !== void 0 && _getConfig4.includes('fy25.01'));
|
|
332
338
|
if (!isTTVCv1Disabled && (!ignoreReason || ignoreReason === 'not-visible') && type !== 'attr') {
|
|
333
339
|
_this.applyChangesToHeatMap(mappedValues, time, _this.heatmap);
|
|
334
340
|
}
|
|
@@ -466,7 +472,7 @@ var VCObserver = exports.VCObserver = /*#__PURE__*/function () {
|
|
|
466
472
|
dataVC: true
|
|
467
473
|
}
|
|
468
474
|
});
|
|
469
|
-
this.heatmap = (0,
|
|
475
|
+
this.heatmap = !((_getConfig5 = (0, _config.getConfig)()) !== null && _getConfig5 !== void 0 && (_getConfig5 = _getConfig5.vc) !== null && _getConfig5 !== void 0 && (_getConfig5 = _getConfig5.enabledVCRevisions) !== null && _getConfig5 !== void 0 && _getConfig5.includes('fy25.01')) ? [] : this.getCleanHeatmap();
|
|
470
476
|
this.heatmapNext = this.getCleanHeatmap();
|
|
471
477
|
this.multiHeatmap = new _heatmap.MultiRevisionHeatmap({
|
|
472
478
|
viewport: this.viewport,
|
|
@@ -546,6 +552,7 @@ var VCObserver = exports.VCObserver = /*#__PURE__*/function () {
|
|
|
546
552
|
}, {
|
|
547
553
|
key: "resetState",
|
|
548
554
|
value: function resetState() {
|
|
555
|
+
var _getConfig6;
|
|
549
556
|
this.abortReason = {
|
|
550
557
|
reason: null,
|
|
551
558
|
info: '',
|
|
@@ -553,7 +560,7 @@ var VCObserver = exports.VCObserver = /*#__PURE__*/function () {
|
|
|
553
560
|
blocking: false
|
|
554
561
|
};
|
|
555
562
|
this.detachAbortListeners();
|
|
556
|
-
this.heatmap = (0,
|
|
563
|
+
this.heatmap = !((_getConfig6 = (0, _config.getConfig)()) !== null && _getConfig6 !== void 0 && (_getConfig6 = _getConfig6.vc) !== null && _getConfig6 !== void 0 && (_getConfig6 = _getConfig6.enabledVCRevisions) !== null && _getConfig6 !== void 0 && _getConfig6.includes('fy25.01')) ? [] : this.getCleanHeatmap();
|
|
557
564
|
this.heatmapNext = this.getCleanHeatmap();
|
|
558
565
|
this.multiHeatmap = new _heatmap.MultiRevisionHeatmap({
|
|
559
566
|
viewport: this.viewport,
|
|
@@ -9,9 +9,7 @@ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/cl
|
|
|
9
9
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
11
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
|
-
var _config = require("../../../config");
|
|
13
12
|
var _vcUtils = require("../media-wrapper/vc-utils");
|
|
14
|
-
var _editorLnv = require("./editor-lnv");
|
|
15
13
|
var _isNonVisualStyleMutation = _interopRequireDefault(require("./non-visual-styles/is-non-visual-style-mutation"));
|
|
16
14
|
var _ssrPlaceholders = require("./ssr-placeholders");
|
|
17
15
|
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; }
|
|
@@ -83,7 +81,6 @@ var Observers = exports.Observers = /*#__PURE__*/function () {
|
|
|
83
81
|
this.intersectionObserver = this.getIntersectionObserver();
|
|
84
82
|
this.mutationObserver = this.getMutationObserver();
|
|
85
83
|
this.ssrPlaceholderHandler = new _ssrPlaceholders.SSRPlaceholderHandlers();
|
|
86
|
-
this.editorLnvHandler = new _editorLnv.EditorLnvHandler();
|
|
87
84
|
}
|
|
88
85
|
return (0, _createClass2.default)(Observers, [{
|
|
89
86
|
key: "isBrowserSupported",
|
|
@@ -120,7 +117,6 @@ var Observers = exports.Observers = /*#__PURE__*/function () {
|
|
|
120
117
|
this.callbacks = new Set();
|
|
121
118
|
this.ssr.reactRootElement = null;
|
|
122
119
|
this.ssrPlaceholderHandler.clear();
|
|
123
|
-
this.editorLnvHandler.clear();
|
|
124
120
|
}
|
|
125
121
|
}, {
|
|
126
122
|
key: "getTotalTime",
|
|
@@ -152,7 +148,6 @@ var Observers = exports.Observers = /*#__PURE__*/function () {
|
|
|
152
148
|
if (!this.isBrowserSupported()) {
|
|
153
149
|
return null;
|
|
154
150
|
}
|
|
155
|
-
var shouldHandleEditorLnvLocal = (0, _config.shouldHandleEditorLnv)();
|
|
156
151
|
return new MutationObserver(function (mutations) {
|
|
157
152
|
_this2.measureStart();
|
|
158
153
|
mutations.forEach(function (mutation) {
|
|
@@ -198,15 +193,6 @@ var Observers = exports.Observers = /*#__PURE__*/function () {
|
|
|
198
193
|
});
|
|
199
194
|
return;
|
|
200
195
|
}
|
|
201
|
-
if (shouldHandleEditorLnvLocal) {
|
|
202
|
-
if (_this2.editorLnvHandler.shouldHandleAddedNode(node)) {
|
|
203
|
-
_this2.editorLnvHandler.handleAddedNode(node).then(function (_ref) {
|
|
204
|
-
var shouldIgnore = _ref.shouldIgnore;
|
|
205
|
-
_this2.observeElement(node, mutation, 'html', shouldIgnore ? 'editor-lazy-node-view' : ignoreReason);
|
|
206
|
-
});
|
|
207
|
-
return;
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
196
|
_this2.observeElement(node, mutation, 'html', ignoreReason);
|
|
211
197
|
}
|
|
212
198
|
if (node instanceof Text && node.parentElement != null) {
|
|
@@ -284,10 +270,10 @@ var Observers = exports.Observers = /*#__PURE__*/function () {
|
|
|
284
270
|
}
|
|
285
271
|
return new IntersectionObserver(function (entries) {
|
|
286
272
|
_this3.measureStart();
|
|
287
|
-
entries.forEach(function (
|
|
288
|
-
var isIntersecting =
|
|
289
|
-
ir =
|
|
290
|
-
target =
|
|
273
|
+
entries.forEach(function (_ref) {
|
|
274
|
+
var isIntersecting = _ref.isIntersecting,
|
|
275
|
+
ir = _ref.intersectionRect,
|
|
276
|
+
target = _ref.target;
|
|
291
277
|
var data = _this3.observedMutations.get(target);
|
|
292
278
|
_this3.observedMutations.delete(target);
|
|
293
279
|
if (isIntersecting && ir.width > 0 && ir.height > 0) {
|
|
@@ -14,7 +14,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
14
14
|
var _ViewportUpdateClassifier = require("./ViewportUpdateClassifier");
|
|
15
15
|
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
16
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
17
|
-
var legacyIgnoreReasons = ['image', 'ssr-hydration'
|
|
17
|
+
var legacyIgnoreReasons = ['image', 'ssr-hydration'];
|
|
18
18
|
var FY25_01Classifier = exports.FY25_01Classifier = /*#__PURE__*/function (_ViewportUpdateClassi) {
|
|
19
19
|
function FY25_01Classifier() {
|
|
20
20
|
var _this;
|
|
@@ -4,11 +4,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.getRevisions = getRevisions;
|
|
7
|
-
var
|
|
7
|
+
var _config = require("../../../config");
|
|
8
8
|
var _fy25_ = require("./fy25_01");
|
|
9
9
|
var _fy25_2 = require("./fy25_02");
|
|
10
10
|
function getRevisions() {
|
|
11
|
-
|
|
11
|
+
var _getConfig;
|
|
12
|
+
if (!((_getConfig = (0, _config.getConfig)()) !== null && _getConfig !== void 0 && (_getConfig = _getConfig.vc) !== null && _getConfig !== void 0 && (_getConfig = _getConfig.enabledVCRevisions) !== null && _getConfig !== void 0 && _getConfig.includes('fy25.01'))) {
|
|
12
13
|
return [{
|
|
13
14
|
name: 'fy25.02',
|
|
14
15
|
classifier: _fy25_2.revFY25_02Classifier
|
|
@@ -256,12 +256,4 @@ export function getDoNotAbortActivePressInteractionOnTransition() {
|
|
|
256
256
|
} catch (e) {
|
|
257
257
|
return undefined;
|
|
258
258
|
}
|
|
259
|
-
}
|
|
260
|
-
export function shouldHandleEditorLnv() {
|
|
261
|
-
try {
|
|
262
|
-
var _config$enableEditorL, _config;
|
|
263
|
-
return (_config$enableEditorL = (_config = config) === null || _config === void 0 ? void 0 : _config.enableEditorLnvHandler) !== null && _config$enableEditorL !== void 0 ? _config$enableEditorL : false;
|
|
264
|
-
} catch (e) {
|
|
265
|
-
return false;
|
|
266
|
-
}
|
|
267
259
|
}
|
|
@@ -6,7 +6,7 @@ import getInteractionStatus from './get-interaction-status';
|
|
|
6
6
|
import getPageVisibilityUpToTTAI from './get-page-visibility-up-to-ttai';
|
|
7
7
|
import getSSRDoneTimeValue from './get-ssr-done-time-value';
|
|
8
8
|
async function getVCMetrics(interaction) {
|
|
9
|
-
var _config$vc, _config$vc$ssrWhiteli, _interaction$apdex, _interaction$apdex$, _config$experimentalI;
|
|
9
|
+
var _config$vc, _config$vc$ssrWhiteli, _interaction$apdex, _interaction$apdex$, _config$experimentalI, _config$vc2, _config$vc2$enabledVC;
|
|
10
10
|
const config = getConfig();
|
|
11
11
|
if (!(config !== null && config !== void 0 && (_config$vc = config.vc) !== null && _config$vc !== void 0 && _config$vc.enabled)) {
|
|
12
12
|
return {};
|
|
@@ -39,7 +39,7 @@ async function getVCMetrics(interaction) {
|
|
|
39
39
|
getVCObserver().stop();
|
|
40
40
|
}
|
|
41
41
|
postInteractionLog.setLastInteractionFinishVCResult(result);
|
|
42
|
-
if (
|
|
42
|
+
if (!(config !== null && config !== void 0 && (_config$vc2 = config.vc) !== null && _config$vc2 !== void 0 && (_config$vc2$enabledVC = _config$vc2.enabledVCRevisions) !== null && _config$vc2$enabledVC !== void 0 && _config$vc2$enabledVC.includes('fy25.01'))) {
|
|
43
43
|
var _result$ufoVcRev;
|
|
44
44
|
const ttvcV2Revision = result === null || result === void 0 ? void 0 : (_result$ufoVcRev = result['ufo:vc:rev']) === null || _result$ufoVcRev === void 0 ? void 0 : _result$ufoVcRev.find(({
|
|
45
45
|
revision
|
package/dist/es2019/vc/index.js
CHANGED
|
@@ -6,9 +6,9 @@ import { VCObserver } from './vc-observer';
|
|
|
6
6
|
import VCObserverNew from './vc-observer-new';
|
|
7
7
|
class VCObserverWrapper {
|
|
8
8
|
constructor(opts = {}) {
|
|
9
|
-
var _getConfig, _getConfig$vc;
|
|
9
|
+
var _getConfig, _getConfig$vc, _getConfig$vc$enabled;
|
|
10
10
|
this.newVCObserver = null;
|
|
11
|
-
const isNewVCObserverEnabled = fg('platform_ufo_vc_observer_new') || ((_getConfig = getConfig()) === null || _getConfig === void 0 ? void 0 : (_getConfig$vc = _getConfig.vc) === null || _getConfig$vc === void 0 ? void 0 : _getConfig$vc.
|
|
11
|
+
const isNewVCObserverEnabled = fg('platform_ufo_vc_observer_new') || ((_getConfig = getConfig()) === null || _getConfig === void 0 ? void 0 : (_getConfig$vc = _getConfig.vc) === null || _getConfig$vc === void 0 ? void 0 : (_getConfig$vc$enabled = _getConfig$vc.enabledVCRevisions) === null || _getConfig$vc$enabled === void 0 ? void 0 : _getConfig$vc$enabled.includes('fy25.03'));
|
|
12
12
|
if (isNewVCObserverEnabled) {
|
|
13
13
|
this.newVCObserver = new VCObserverNew({
|
|
14
14
|
selectorConfig: opts.selectorConfig
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
|
+
import { getConfig } from '../../config';
|
|
2
3
|
import { getPageVisibilityState } from '../../hidden-timing';
|
|
3
4
|
import { getRevisions } from './revisions/revisions';
|
|
4
5
|
const VCParts = ['25', '50', '75', '80', '85', '90', '95', '98', '99'];
|
|
@@ -37,7 +38,9 @@ export function getVCRevisionsData({
|
|
|
37
38
|
calculatedVC,
|
|
38
39
|
calculatedVCNext
|
|
39
40
|
}) {
|
|
40
|
-
|
|
41
|
+
var _ufoConfig$vc, _ufoConfig$vc$enabled, _ufoConfig$vc2, _ufoConfig$vc2$enable;
|
|
42
|
+
const ufoConfig = getConfig();
|
|
43
|
+
if (!fg('platform_ufo_vc_observer_new') && !(ufoConfig !== null && ufoConfig !== void 0 && (_ufoConfig$vc = ufoConfig.vc) !== null && _ufoConfig$vc !== void 0 && (_ufoConfig$vc$enabled = _ufoConfig$vc.enabledVCRevisions) !== null && _ufoConfig$vc$enabled !== void 0 && _ufoConfig$vc$enabled.includes('fy25.03'))) {
|
|
41
44
|
if (!multiHeatmap) {
|
|
42
45
|
return null;
|
|
43
46
|
}
|
|
@@ -71,7 +74,7 @@ export function getVCRevisionsData({
|
|
|
71
74
|
'metric:vc90': shouldHaveVCmetric ? calculatedVCNext.VC['90'] : null,
|
|
72
75
|
vcDetails: createVCDetails(calculatedVCNext, shouldHaveVCmetric)
|
|
73
76
|
};
|
|
74
|
-
if (
|
|
77
|
+
if (!(ufoConfig !== null && ufoConfig !== void 0 && (_ufoConfig$vc2 = ufoConfig.vc) !== null && _ufoConfig$vc2 !== void 0 && (_ufoConfig$vc2$enable = _ufoConfig$vc2.enabledVCRevisions) !== null && _ufoConfig$vc2$enable !== void 0 && _ufoConfig$vc2$enable.includes('fy25.01'))) {
|
|
75
78
|
return {
|
|
76
79
|
[`${fullPrefix}vc:rev`]: [ttvcV2Revision]
|
|
77
80
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
|
+
import { getConfig } from '../../config';
|
|
3
4
|
import { attachAbortListeners } from './attachAbortListeners';
|
|
4
5
|
import { getVCRevisionsData } from './getVCRevisionsData';
|
|
5
6
|
import { getViewportHeight, getViewportWidth } from './getViewport';
|
|
@@ -24,6 +25,7 @@ function filterComponentsLog(log) {
|
|
|
24
25
|
}
|
|
25
26
|
export class VCObserver {
|
|
26
27
|
constructor(options) {
|
|
28
|
+
var _getConfig5, _getConfig5$vc, _getConfig5$vc$enable;
|
|
27
29
|
/* abort logic */
|
|
28
30
|
_defineProperty(this, "abortReason", {
|
|
29
31
|
reason: null,
|
|
@@ -95,6 +97,7 @@ export class VCObserver {
|
|
|
95
97
|
vc,
|
|
96
98
|
isEventAborted
|
|
97
99
|
}) => {
|
|
100
|
+
var _getConfig, _getConfig$vc, _getConfig$vc$enabled, _getConfig2, _getConfig2$vc, _getConfig2$vc$enable;
|
|
98
101
|
const startTime = performance.now();
|
|
99
102
|
// add local measurement
|
|
100
103
|
const fullPrefix = prefix !== undefined && prefix !== '' ? `${prefix}:` : '';
|
|
@@ -128,7 +131,7 @@ export class VCObserver {
|
|
|
128
131
|
[`${fullPrefix}vc:abort:timestamp`]: abortReason.timestamp
|
|
129
132
|
};
|
|
130
133
|
}
|
|
131
|
-
const isTTVCv1Disabled =
|
|
134
|
+
const isTTVCv1Disabled = !((_getConfig = getConfig()) !== null && _getConfig !== void 0 && (_getConfig$vc = _getConfig.vc) !== null && _getConfig$vc !== void 0 && (_getConfig$vc$enabled = _getConfig$vc.enabledVCRevisions) !== null && _getConfig$vc$enabled !== void 0 && _getConfig$vc$enabled.includes('fy25.01'));
|
|
132
135
|
const ttvcV1Result = isTTVCv1Disabled ? {
|
|
133
136
|
VC: {},
|
|
134
137
|
VCBox: {},
|
|
@@ -305,12 +308,13 @@ export class VCObserver {
|
|
|
305
308
|
...(isCalcSpeedIndexEnabled ? speedIndex : {})
|
|
306
309
|
};
|
|
307
310
|
}
|
|
311
|
+
const isTTVCv3Enabled = fg('platform_ufo_vc_observer_new') || ((_getConfig2 = getConfig()) === null || _getConfig2 === void 0 ? void 0 : (_getConfig2$vc = _getConfig2.vc) === null || _getConfig2$vc === void 0 ? void 0 : (_getConfig2$vc$enable = _getConfig2$vc.enabledVCRevisions) === null || _getConfig2$vc$enable === void 0 ? void 0 : _getConfig2$vc$enable.includes('fy25.03'));
|
|
308
312
|
return {
|
|
309
313
|
'metrics:vc': VC,
|
|
310
314
|
[`${fullPrefix}vc:state`]: true,
|
|
311
315
|
[`${fullPrefix}vc:clean`]: isVCClean,
|
|
312
316
|
[`${fullPrefix}vc:dom`]: VCBox,
|
|
313
|
-
[`${fullPrefix}vc:updates`]:
|
|
317
|
+
[`${fullPrefix}vc:updates`]: isTTVCv3Enabled ? undefined : VCEntries.rel.slice(0, 50),
|
|
314
318
|
// max 50
|
|
315
319
|
[`${fullPrefix}vc:size`]: viewport,
|
|
316
320
|
[`${fullPrefix}vc:time`]: Math.round(totalTime + (stopTime - startTime)),
|
|
@@ -318,7 +322,7 @@ export class VCObserver {
|
|
|
318
322
|
[`${fullPrefix}vc:ratios`]: ratios,
|
|
319
323
|
...outOfBoundary,
|
|
320
324
|
[`${fullPrefix}vc:next`]: vcNext.VC,
|
|
321
|
-
[`${fullPrefix}vc:next:updates`]:
|
|
325
|
+
[`${fullPrefix}vc:next:updates`]: isTTVCv3Enabled ? undefined : vcNext.VCEntries.rel.slice(0, 50),
|
|
322
326
|
// max 50
|
|
323
327
|
[`${fullPrefix}vc:next:dom`]: vcNext.VCBox,
|
|
324
328
|
[`${fullPrefix}vc:ignored`]: this.getIgnoredElements(componentsLog),
|
|
@@ -327,9 +331,10 @@ export class VCObserver {
|
|
|
327
331
|
};
|
|
328
332
|
});
|
|
329
333
|
_defineProperty(this, "handleUpdate", (rawTime, intersectionRect, targetName, element, type, ignoreReason, attributeName, oldValue, newValue) => {
|
|
334
|
+
var _getConfig3, _getConfig3$vc, _getConfig3$vc$enable;
|
|
330
335
|
this.measureStart();
|
|
331
336
|
this.legacyHandleUpdate(rawTime, intersectionRect, targetName, element, type, ignoreReason, attributeName, oldValue, newValue);
|
|
332
|
-
if (!fg('platform_ufo_vc_observer_new')) {
|
|
337
|
+
if (!fg('platform_ufo_vc_observer_new') && !((_getConfig3 = getConfig()) !== null && _getConfig3 !== void 0 && (_getConfig3$vc = _getConfig3.vc) !== null && _getConfig3$vc !== void 0 && (_getConfig3$vc$enable = _getConfig3$vc.enabledVCRevisions) !== null && _getConfig3$vc$enable !== void 0 && _getConfig3$vc$enable.includes('fy25.03'))) {
|
|
333
338
|
this.onViewportChangeDetected({
|
|
334
339
|
timestamp: rawTime,
|
|
335
340
|
intersectionRect,
|
|
@@ -346,13 +351,14 @@ export class VCObserver {
|
|
|
346
351
|
});
|
|
347
352
|
_defineProperty(this, "legacyHandleUpdate", (rawTime, intersectionRect, targetName, element, type, ignoreReason, attributeName, oldValue, newValue) => {
|
|
348
353
|
if (this.abortReason.reason === null || this.abortReason.blocking === false) {
|
|
354
|
+
var _getConfig4, _getConfig4$vc, _getConfig4$vc$enable;
|
|
349
355
|
const time = Math.round(rawTime - this.startTime);
|
|
350
356
|
const mappedValues = this.mapPixelsToHeatmap(intersectionRect.left, intersectionRect.top, intersectionRect.width, intersectionRect.height);
|
|
351
357
|
this.vcRatios[targetName] = this.getElementRatio(mappedValues);
|
|
352
358
|
if (!ignoreReason) {
|
|
353
359
|
this.applyChangesToHeatMap(mappedValues, time, this.heatmapNext);
|
|
354
360
|
}
|
|
355
|
-
const isTTVCv1Disabled =
|
|
361
|
+
const isTTVCv1Disabled = !((_getConfig4 = getConfig()) !== null && _getConfig4 !== void 0 && (_getConfig4$vc = _getConfig4.vc) !== null && _getConfig4$vc !== void 0 && (_getConfig4$vc$enable = _getConfig4$vc.enabledVCRevisions) !== null && _getConfig4$vc$enable !== void 0 && _getConfig4$vc$enable.includes('fy25.01'));
|
|
356
362
|
if (!isTTVCv1Disabled && (!ignoreReason || ignoreReason === 'not-visible') && type !== 'attr') {
|
|
357
363
|
this.applyChangesToHeatMap(mappedValues, time, this.heatmap);
|
|
358
364
|
}
|
|
@@ -491,7 +497,7 @@ export class VCObserver {
|
|
|
491
497
|
dataVC: true
|
|
492
498
|
}
|
|
493
499
|
});
|
|
494
|
-
this.heatmap =
|
|
500
|
+
this.heatmap = !((_getConfig5 = getConfig()) !== null && _getConfig5 !== void 0 && (_getConfig5$vc = _getConfig5.vc) !== null && _getConfig5$vc !== void 0 && (_getConfig5$vc$enable = _getConfig5$vc.enabledVCRevisions) !== null && _getConfig5$vc$enable !== void 0 && _getConfig5$vc$enable.includes('fy25.01')) ? [] : this.getCleanHeatmap();
|
|
495
501
|
this.heatmapNext = this.getCleanHeatmap();
|
|
496
502
|
this.multiHeatmap = new MultiRevisionHeatmap({
|
|
497
503
|
viewport: this.viewport,
|
|
@@ -645,6 +651,7 @@ export class VCObserver {
|
|
|
645
651
|
}
|
|
646
652
|
}
|
|
647
653
|
resetState() {
|
|
654
|
+
var _getConfig6, _getConfig6$vc, _getConfig6$vc$enable;
|
|
648
655
|
this.abortReason = {
|
|
649
656
|
reason: null,
|
|
650
657
|
info: '',
|
|
@@ -652,7 +659,7 @@ export class VCObserver {
|
|
|
652
659
|
blocking: false
|
|
653
660
|
};
|
|
654
661
|
this.detachAbortListeners();
|
|
655
|
-
this.heatmap =
|
|
662
|
+
this.heatmap = !((_getConfig6 = getConfig()) !== null && _getConfig6 !== void 0 && (_getConfig6$vc = _getConfig6.vc) !== null && _getConfig6$vc !== void 0 && (_getConfig6$vc$enable = _getConfig6$vc.enabledVCRevisions) !== null && _getConfig6$vc$enable !== void 0 && _getConfig6$vc$enable.includes('fy25.01')) ? [] : this.getCleanHeatmap();
|
|
656
663
|
this.heatmapNext = this.getCleanHeatmap();
|
|
657
664
|
this.multiHeatmap = new MultiRevisionHeatmap({
|
|
658
665
|
viewport: this.viewport,
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
|
-
import { shouldHandleEditorLnv } from '../../../config';
|
|
4
3
|
import { isContainedWithinMediaWrapper } from '../media-wrapper/vc-utils';
|
|
5
|
-
import { EditorLnvHandler } from './editor-lnv';
|
|
6
4
|
import isNonVisualStyleMutation from './non-visual-styles/is-non-visual-style-mutation';
|
|
7
5
|
import { SSRPlaceholderHandlers } from './ssr-placeholders';
|
|
8
6
|
const state = {
|
|
@@ -71,7 +69,6 @@ export class Observers {
|
|
|
71
69
|
this.intersectionObserver = this.getIntersectionObserver();
|
|
72
70
|
this.mutationObserver = this.getMutationObserver();
|
|
73
71
|
this.ssrPlaceholderHandler = new SSRPlaceholderHandlers();
|
|
74
|
-
this.editorLnvHandler = new EditorLnvHandler();
|
|
75
72
|
}
|
|
76
73
|
isBrowserSupported() {
|
|
77
74
|
return typeof window.IntersectionObserver === 'function' && typeof window.MutationObserver === 'function';
|
|
@@ -102,7 +99,6 @@ export class Observers {
|
|
|
102
99
|
this.callbacks = new Set();
|
|
103
100
|
this.ssr.reactRootElement = null;
|
|
104
101
|
this.ssrPlaceholderHandler.clear();
|
|
105
|
-
this.editorLnvHandler.clear();
|
|
106
102
|
}
|
|
107
103
|
getTotalTime() {
|
|
108
104
|
return this.totalTime;
|
|
@@ -121,7 +117,6 @@ export class Observers {
|
|
|
121
117
|
if (!this.isBrowserSupported()) {
|
|
122
118
|
return null;
|
|
123
119
|
}
|
|
124
|
-
const shouldHandleEditorLnvLocal = shouldHandleEditorLnv();
|
|
125
120
|
return new MutationObserver(mutations => {
|
|
126
121
|
this.measureStart();
|
|
127
122
|
mutations.forEach(mutation => {
|
|
@@ -167,16 +162,6 @@ export class Observers {
|
|
|
167
162
|
});
|
|
168
163
|
return;
|
|
169
164
|
}
|
|
170
|
-
if (shouldHandleEditorLnvLocal) {
|
|
171
|
-
if (this.editorLnvHandler.shouldHandleAddedNode(node)) {
|
|
172
|
-
this.editorLnvHandler.handleAddedNode(node).then(({
|
|
173
|
-
shouldIgnore
|
|
174
|
-
}) => {
|
|
175
|
-
this.observeElement(node, mutation, 'html', shouldIgnore ? 'editor-lazy-node-view' : ignoreReason);
|
|
176
|
-
});
|
|
177
|
-
return;
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
165
|
this.observeElement(node, mutation, 'html', ignoreReason);
|
|
181
166
|
}
|
|
182
167
|
if (node instanceof Text && node.parentElement != null) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import { ViewportUpdateClassifier } from './ViewportUpdateClassifier';
|
|
3
|
-
const legacyIgnoreReasons = ['image', 'ssr-hydration'
|
|
3
|
+
const legacyIgnoreReasons = ['image', 'ssr-hydration'];
|
|
4
4
|
export class FY25_01Classifier extends ViewportUpdateClassifier {
|
|
5
5
|
VCCalculationMethod({
|
|
6
6
|
VCParts,
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getConfig } from '../../../config';
|
|
2
2
|
import { revFY25_01Classifier } from './fy25_01';
|
|
3
3
|
import { revFY25_02Classifier } from './fy25_02';
|
|
4
4
|
export function getRevisions() {
|
|
5
|
-
|
|
5
|
+
var _getConfig, _getConfig$vc, _getConfig$vc$enabled;
|
|
6
|
+
if (!((_getConfig = getConfig()) !== null && _getConfig !== void 0 && (_getConfig$vc = _getConfig.vc) !== null && _getConfig$vc !== void 0 && (_getConfig$vc$enabled = _getConfig$vc.enabledVCRevisions) !== null && _getConfig$vc$enabled !== void 0 && _getConfig$vc$enabled.includes('fy25.01'))) {
|
|
6
7
|
return [{
|
|
7
8
|
name: 'fy25.02',
|
|
8
9
|
classifier: revFY25_02Classifier
|
package/dist/esm/config/index.js
CHANGED
|
@@ -245,12 +245,4 @@ export function getDoNotAbortActivePressInteractionOnTransition() {
|
|
|
245
245
|
} catch (e) {
|
|
246
246
|
return undefined;
|
|
247
247
|
}
|
|
248
|
-
}
|
|
249
|
-
export function shouldHandleEditorLnv() {
|
|
250
|
-
try {
|
|
251
|
-
var _config$enableEditorL, _config12;
|
|
252
|
-
return (_config$enableEditorL = (_config12 = config) === null || _config12 === void 0 ? void 0 : _config12.enableEditorLnvHandler) !== null && _config$enableEditorL !== void 0 ? _config$enableEditorL : false;
|
|
253
|
-
} catch (e) {
|
|
254
|
-
return false;
|
|
255
|
-
}
|
|
256
248
|
}
|
|
@@ -15,7 +15,7 @@ function getVCMetrics(_x) {
|
|
|
15
15
|
}
|
|
16
16
|
function _getVCMetrics() {
|
|
17
17
|
_getVCMetrics = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(interaction) {
|
|
18
|
-
var _config$vc, _config$vc$ssrWhiteli, _interaction$apdex, _config$experimentalI;
|
|
18
|
+
var _config$vc, _config$vc$ssrWhiteli, _interaction$apdex, _config$experimentalI, _config$vc2;
|
|
19
19
|
var config, interactionStatus, pageVisibilityUpToTTAI, isSSREnabled, ssr, tti, prefix, result, _result$ufoVcRev, ttvcV2Revision, VC;
|
|
20
20
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
21
21
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -63,7 +63,7 @@ function _getVCMetrics() {
|
|
|
63
63
|
getVCObserver().stop();
|
|
64
64
|
}
|
|
65
65
|
postInteractionLog.setLastInteractionFinishVCResult(result);
|
|
66
|
-
if (
|
|
66
|
+
if (config !== null && config !== void 0 && (_config$vc2 = config.vc) !== null && _config$vc2 !== void 0 && (_config$vc2 = _config$vc2.enabledVCRevisions) !== null && _config$vc2 !== void 0 && _config$vc2.includes('fy25.01')) {
|
|
67
67
|
_context.next = 26;
|
|
68
68
|
break;
|
|
69
69
|
}
|
package/dist/esm/vc/index.js
CHANGED
|
@@ -18,7 +18,7 @@ var VCObserverWrapper = /*#__PURE__*/function () {
|
|
|
18
18
|
var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
19
19
|
_classCallCheck(this, VCObserverWrapper);
|
|
20
20
|
this.newVCObserver = null;
|
|
21
|
-
var isNewVCObserverEnabled = fg('platform_ufo_vc_observer_new') || ((_getConfig = getConfig()) === null || _getConfig === void 0 || (_getConfig = _getConfig.vc) === null || _getConfig === void 0 ? void 0 : _getConfig.
|
|
21
|
+
var isNewVCObserverEnabled = fg('platform_ufo_vc_observer_new') || ((_getConfig = getConfig()) === null || _getConfig === void 0 || (_getConfig = _getConfig.vc) === null || _getConfig === void 0 || (_getConfig = _getConfig.enabledVCRevisions) === null || _getConfig === void 0 ? void 0 : _getConfig.includes('fy25.03'));
|
|
22
22
|
if (isNewVCObserverEnabled) {
|
|
23
23
|
this.newVCObserver = new VCObserverNew({
|
|
24
24
|
selectorConfig: opts.selectorConfig
|