@atlaskit/react-ufo 3.12.5 → 3.13.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/config/index.js +15 -20
- package/dist/cjs/create-payload/utils/get-vc-metrics.js +5 -44
- package/dist/cjs/vc/index.js +49 -101
- package/dist/cjs/vc/vc-observer/getVCRevisionsData.js +13 -67
- package/dist/cjs/vc/vc-observer/index.js +31 -107
- package/dist/cjs/vc/vc-observer/observers/index.js +3 -2
- package/dist/cjs/vc/vc-observer/observers/ssr-placeholders/index.js +38 -12
- package/dist/cjs/vc/vc-observer/observers/ssr-placeholders/ssr-scripts/collectSSRPlaceholderDimensions.js +9 -0
- package/dist/es2019/config/index.js +18 -23
- package/dist/es2019/create-payload/utils/get-vc-metrics.js +12 -41
- package/dist/es2019/vc/index.js +44 -88
- package/dist/es2019/vc/vc-observer/getVCRevisionsData.js +15 -71
- package/dist/es2019/vc/vc-observer/index.js +11 -87
- package/dist/es2019/vc/vc-observer/observers/index.js +2 -1
- package/dist/es2019/vc/vc-observer/observers/ssr-placeholders/index.js +38 -13
- package/dist/es2019/vc/vc-observer/observers/ssr-placeholders/ssr-scripts/collectSSRPlaceholderDimensions.js +9 -1
- package/dist/esm/config/index.js +15 -20
- package/dist/esm/create-payload/utils/get-vc-metrics.js +6 -45
- package/dist/esm/vc/index.js +49 -101
- package/dist/esm/vc/vc-observer/getVCRevisionsData.js +13 -67
- package/dist/esm/vc/vc-observer/index.js +31 -107
- package/dist/esm/vc/vc-observer/observers/index.js +3 -2
- package/dist/esm/vc/vc-observer/observers/ssr-placeholders/index.js +38 -12
- package/dist/esm/vc/vc-observer/observers/ssr-placeholders/ssr-scripts/collectSSRPlaceholderDimensions.js +9 -0
- package/dist/types/common/vc/types.d.ts +0 -2
- package/dist/types/config/index.d.ts +1 -0
- package/dist/types/create-post-interaction-log-payload/index.d.ts +1 -1
- package/dist/types/vc/types.d.ts +1 -0
- package/dist/types/vc/vc-observer/getVCRevisionsData.d.ts +2 -17
- package/dist/types/vc/vc-observer/index.d.ts +0 -4
- package/dist/types/vc/vc-observer/observers/index.d.ts +3 -0
- package/dist/types/vc/vc-observer/observers/ssr-placeholders/index.d.ts +4 -1
- package/dist/types/vc/vc-observer/observers/ssr-placeholders/ssr-scripts/collectSSRPlaceholderDimensions.d.ts +1 -1
- package/dist/types-ts4.5/common/vc/types.d.ts +0 -2
- package/dist/types-ts4.5/config/index.d.ts +1 -0
- package/dist/types-ts4.5/create-post-interaction-log-payload/index.d.ts +1 -1
- package/dist/types-ts4.5/vc/types.d.ts +1 -0
- package/dist/types-ts4.5/vc/vc-observer/getVCRevisionsData.d.ts +2 -17
- package/dist/types-ts4.5/vc/vc-observer/index.d.ts +0 -4
- package/dist/types-ts4.5/vc/vc-observer/observers/index.d.ts +3 -0
- package/dist/types-ts4.5/vc/vc-observer/observers/ssr-placeholders/index.d.ts +4 -1
- package/dist/types-ts4.5/vc/vc-observer/observers/ssr-placeholders/ssr-scripts/collectSSRPlaceholderDimensions.d.ts +1 -1
- package/package.json +1 -4
- package/dist/cjs/vc/vc-observer/heatmap/heatmap.js +0 -281
- package/dist/cjs/vc/vc-observer/revisions/ViewportUpdateClassifier.js +0 -68
- package/dist/cjs/vc/vc-observer/revisions/fy25_01.js +0 -76
- package/dist/cjs/vc/vc-observer/revisions/fy25_02.js +0 -59
- package/dist/cjs/vc/vc-observer/revisions/revisions.js +0 -24
- package/dist/cjs/vc/vc-observer/revisions/types.js +0 -5
- package/dist/es2019/vc/vc-observer/heatmap/heatmap.js +0 -247
- package/dist/es2019/vc/vc-observer/revisions/ViewportUpdateClassifier.js +0 -48
- package/dist/es2019/vc/vc-observer/revisions/fy25_01.js +0 -55
- package/dist/es2019/vc/vc-observer/revisions/fy25_02.js +0 -35
- package/dist/es2019/vc/vc-observer/revisions/revisions.js +0 -18
- package/dist/es2019/vc/vc-observer/revisions/types.js +0 -1
- package/dist/esm/vc/vc-observer/heatmap/heatmap.js +0 -274
- package/dist/esm/vc/vc-observer/revisions/ViewportUpdateClassifier.js +0 -61
- package/dist/esm/vc/vc-observer/revisions/fy25_01.js +0 -69
- package/dist/esm/vc/vc-observer/revisions/fy25_02.js +0 -52
- package/dist/esm/vc/vc-observer/revisions/revisions.js +0 -18
- package/dist/esm/vc/vc-observer/revisions/types.js +0 -1
- package/dist/types/vc/vc-observer/heatmap/heatmap.d.ts +0 -79
- package/dist/types/vc/vc-observer/revisions/ViewportUpdateClassifier.d.ts +0 -31
- package/dist/types/vc/vc-observer/revisions/fy25_01.d.ts +0 -13
- package/dist/types/vc/vc-observer/revisions/fy25_02.d.ts +0 -16
- package/dist/types/vc/vc-observer/revisions/revisions.d.ts +0 -2
- package/dist/types/vc/vc-observer/revisions/types.d.ts +0 -28
- package/dist/types-ts4.5/vc/vc-observer/heatmap/heatmap.d.ts +0 -79
- package/dist/types-ts4.5/vc/vc-observer/revisions/ViewportUpdateClassifier.d.ts +0 -31
- package/dist/types-ts4.5/vc/vc-observer/revisions/fy25_01.d.ts +0 -13
- package/dist/types-ts4.5/vc/vc-observer/revisions/fy25_02.d.ts +0 -16
- package/dist/types-ts4.5/vc/vc-observer/revisions/revisions.d.ts +0 -2
- package/dist/types-ts4.5/vc/vc-observer/revisions/types.d.ts +0 -28
|
@@ -16,9 +16,7 @@ import { attachAbortListeners } from './attachAbortListeners';
|
|
|
16
16
|
import { getVCRevisionDebugDetails } from './getVCRevisionDebugDetails';
|
|
17
17
|
import { getVCRevisionsData } from './getVCRevisionsData';
|
|
18
18
|
import { getViewportHeight, getViewportWidth } from './getViewport';
|
|
19
|
-
import { MultiRevisionHeatmap } from './heatmap/heatmap';
|
|
20
19
|
import { Observers } from './observers';
|
|
21
|
-
import { getRevisions } from './revisions/revisions';
|
|
22
20
|
var abortReason = {
|
|
23
21
|
scroll: 'scroll',
|
|
24
22
|
keypress: 'keypress',
|
|
@@ -56,7 +54,6 @@ export var VCObserver = /*#__PURE__*/function () {
|
|
|
56
54
|
});
|
|
57
55
|
/* heatmap */
|
|
58
56
|
_defineProperty(this, "arraySize", 0);
|
|
59
|
-
_defineProperty(this, "multiHeatmap", null);
|
|
60
57
|
_defineProperty(this, "componentsLog", {});
|
|
61
58
|
_defineProperty(this, "vcRatios", {});
|
|
62
59
|
_defineProperty(this, "active", false);
|
|
@@ -88,7 +85,6 @@ export var VCObserver = /*#__PURE__*/function () {
|
|
|
88
85
|
abortReason: _objectSpread({}, _this.abortReason),
|
|
89
86
|
heatmap: _this.heatmap,
|
|
90
87
|
heatmapNext: _this.heatmapNext,
|
|
91
|
-
multiHeatmap: _this.multiHeatmap,
|
|
92
88
|
outOfBoundaryInfo: _this.outOfBoundaryInfo,
|
|
93
89
|
totalTime: Math.round(_this.totalTime + _this.observers.getTotalTime()),
|
|
94
90
|
componentsLog: _objectSpread({}, _this.componentsLog),
|
|
@@ -100,7 +96,7 @@ export var VCObserver = /*#__PURE__*/function () {
|
|
|
100
96
|
});
|
|
101
97
|
_defineProperty(this, "getVCResult", /*#__PURE__*/function () {
|
|
102
98
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref3) {
|
|
103
|
-
var start, stop, tti, prefix, ssr, vc, isEventAborted, experienceKey, interactionId, startTime, fullPrefix, rawData, abortReason, abortReasonInfo, heatmap, heatmapNext, outOfBoundaryInfo, totalTime, componentsLog, viewport, devToolsEnabled, ratios,
|
|
99
|
+
var start, stop, tti, prefix, ssr, vc, isEventAborted, experienceKey, interactionId, startTime, fullPrefix, rawData, abortReason, abortReasonInfo, heatmap, heatmapNext, outOfBoundaryInfo, totalTime, componentsLog, viewport, devToolsEnabled, ratios, isTTVCv1Disabled, vcAbortedResultWithRevisions, ttvcV1Result, VC, VCBox, VCEntries, totalPainted, _componentsLog, vcNext, outOfBoundary, stopTime, ttvcV1DevToolInfo, ttvcV2DevToolInfo, _ufo_devtool_onVCRev2, _ref10, _ufo_devtool_onVCRev, _ref9, isVCClean, revisionsData, speedIndex, isTTVCv3Enabled;
|
|
104
100
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
105
101
|
while (1) switch (_context.prev = _context.next) {
|
|
106
102
|
case 0:
|
|
@@ -114,8 +110,8 @@ export var VCObserver = /*#__PURE__*/function () {
|
|
|
114
110
|
}
|
|
115
111
|
return _context.abrupt("return", {});
|
|
116
112
|
case 6:
|
|
117
|
-
abortReason = rawData.abortReason, abortReasonInfo = rawData.abortReasonInfo, heatmap = rawData.heatmap, heatmapNext = rawData.heatmapNext, outOfBoundaryInfo = rawData.outOfBoundaryInfo, totalTime = rawData.totalTime, componentsLog = rawData.componentsLog, viewport = rawData.viewport, devToolsEnabled = rawData.devToolsEnabled, ratios = rawData.ratios
|
|
118
|
-
isTTVCv1Disabled =
|
|
113
|
+
abortReason = rawData.abortReason, abortReasonInfo = rawData.abortReasonInfo, heatmap = rawData.heatmap, heatmapNext = rawData.heatmapNext, outOfBoundaryInfo = rawData.outOfBoundaryInfo, totalTime = rawData.totalTime, componentsLog = rawData.componentsLog, viewport = rawData.viewport, devToolsEnabled = rawData.devToolsEnabled, ratios = rawData.ratios;
|
|
114
|
+
isTTVCv1Disabled = !isVCRevisionEnabled('fy25.01', experienceKey); // NOTE: as part of platform_ufo_add_vc_abort_reason_by_revisions feature,
|
|
119
115
|
// we want to report abort by scroll events the same way as other abort reasons
|
|
120
116
|
// i.e. not have the concept of `abortReason.blocking` anymore
|
|
121
117
|
if (!(abortReasonInfo !== null && fg('platform_ufo_add_vc_abort_reason_by_revisions'))) {
|
|
@@ -318,8 +314,6 @@ export var VCObserver = /*#__PURE__*/function () {
|
|
|
318
314
|
end: stop
|
|
319
315
|
},
|
|
320
316
|
isVCClean: isVCClean,
|
|
321
|
-
multiHeatmap: multiHeatmap,
|
|
322
|
-
ssr: ssr,
|
|
323
317
|
calculatedVC: {
|
|
324
318
|
VC: VC,
|
|
325
319
|
VCBox: VCBox
|
|
@@ -338,7 +332,7 @@ export var VCObserver = /*#__PURE__*/function () {
|
|
|
338
332
|
}
|
|
339
333
|
return _context.abrupt("return", _objectSpread(_objectSpread(_objectSpread(_defineProperty(_defineProperty(_defineProperty({}, "".concat(fullPrefix, "vc:size"), viewport), "".concat(fullPrefix, "vc:time"), Math.round(totalTime + (stopTime - startTime))), "".concat(fullPrefix, "vc:ratios"), ratios), outOfBoundary), {}, _defineProperty({}, "".concat(fullPrefix, "vc:ignored"), _this.getIgnoredElements(componentsLog)), revisionsData), speedIndex));
|
|
340
334
|
case 32:
|
|
341
|
-
isTTVCv3Enabled =
|
|
335
|
+
isTTVCv3Enabled = isVCRevisionEnabled('fy25.03', experienceKey);
|
|
342
336
|
return _context.abrupt("return", _objectSpread(_objectSpread(_objectSpread(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
|
|
343
337
|
'metrics:vc': VC
|
|
344
338
|
}, "".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), {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".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), speedIndex));
|
|
@@ -353,29 +347,6 @@ export var VCObserver = /*#__PURE__*/function () {
|
|
|
353
347
|
};
|
|
354
348
|
}());
|
|
355
349
|
_defineProperty(this, "handleUpdate", function (rawTime, intersectionRect, targetName, element, type, ignoreReason, attributeName, oldValue, newValue) {
|
|
356
|
-
_this.measureStart();
|
|
357
|
-
_this.legacyHandleUpdate(rawTime, intersectionRect, targetName, element, type, ignoreReason, attributeName, oldValue, newValue);
|
|
358
|
-
var isTTVCv3Disabled = !isVCRevisionEnabled('fy25.03');
|
|
359
|
-
if (fg('platform_ufo_vc_enable_revisions_by_experience')) {
|
|
360
|
-
var interaction = getActiveInteraction();
|
|
361
|
-
isTTVCv3Disabled = !isVCRevisionEnabled('fy25.03', interaction === null || interaction === void 0 ? void 0 : interaction.ufoName);
|
|
362
|
-
}
|
|
363
|
-
if (isTTVCv3Disabled) {
|
|
364
|
-
_this.onViewportChangeDetected({
|
|
365
|
-
timestamp: rawTime,
|
|
366
|
-
intersectionRect: intersectionRect,
|
|
367
|
-
targetName: targetName,
|
|
368
|
-
element: element,
|
|
369
|
-
type: type,
|
|
370
|
-
ignoreReason: ignoreReason,
|
|
371
|
-
attributeName: attributeName,
|
|
372
|
-
oldValue: oldValue,
|
|
373
|
-
newValue: newValue
|
|
374
|
-
});
|
|
375
|
-
}
|
|
376
|
-
_this.measureStop();
|
|
377
|
-
});
|
|
378
|
-
_defineProperty(this, "legacyHandleUpdate", function (rawTime, intersectionRect, targetName, element, type, ignoreReason, attributeName, oldValue, newValue) {
|
|
379
350
|
if (_this.abortReason.reason === null || _this.abortReason.blocking === false) {
|
|
380
351
|
var time = Math.round(rawTime - _this.startTime);
|
|
381
352
|
var mappedValues = _this.mapPixelsToHeatmap(intersectionRect.left, intersectionRect.top, intersectionRect.width, intersectionRect.height);
|
|
@@ -383,11 +354,8 @@ export var VCObserver = /*#__PURE__*/function () {
|
|
|
383
354
|
if (!ignoreReason) {
|
|
384
355
|
_this.applyChangesToHeatMap(mappedValues, time, _this.heatmapNext);
|
|
385
356
|
}
|
|
386
|
-
var
|
|
387
|
-
|
|
388
|
-
var interaction = getActiveInteraction();
|
|
389
|
-
isTTVCv1Disabled = !isVCRevisionEnabled('fy25.01', interaction === null || interaction === void 0 ? void 0 : interaction.ufoName);
|
|
390
|
-
}
|
|
357
|
+
var interaction = getActiveInteraction();
|
|
358
|
+
var isTTVCv1Disabled = !isVCRevisionEnabled('fy25.01', interaction === null || interaction === void 0 ? void 0 : interaction.ufoName);
|
|
391
359
|
if (!isTTVCv1Disabled && (!ignoreReason || ignoreReason === 'not-visible') && type !== 'attr') {
|
|
392
360
|
_this.applyChangesToHeatMap(mappedValues, time, _this.heatmap);
|
|
393
361
|
}
|
|
@@ -406,44 +374,6 @@ export var VCObserver = /*#__PURE__*/function () {
|
|
|
406
374
|
});
|
|
407
375
|
}
|
|
408
376
|
});
|
|
409
|
-
_defineProperty(this, "onViewportChangeDetected", function (_ref11) {
|
|
410
|
-
var element = _ref11.element,
|
|
411
|
-
type = _ref11.type,
|
|
412
|
-
ignoreReason = _ref11.ignoreReason,
|
|
413
|
-
timestamp = _ref11.timestamp,
|
|
414
|
-
targetName = _ref11.targetName,
|
|
415
|
-
intersectionRect = _ref11.intersectionRect,
|
|
416
|
-
attributeName = _ref11.attributeName,
|
|
417
|
-
oldValue = _ref11.oldValue,
|
|
418
|
-
newValue = _ref11.newValue;
|
|
419
|
-
if (_this.multiHeatmap === null) {
|
|
420
|
-
return;
|
|
421
|
-
}
|
|
422
|
-
// @todo add abort reason handling
|
|
423
|
-
var time = Math.round(timestamp - _this.startTime);
|
|
424
|
-
var revisions = getRevisions();
|
|
425
|
-
var revisionsClassification = revisions.map(function (revision) {
|
|
426
|
-
return revision.classifier.classifyUpdate({
|
|
427
|
-
element: element,
|
|
428
|
-
type: type,
|
|
429
|
-
ignoreReason: ignoreReason
|
|
430
|
-
});
|
|
431
|
-
}, []);
|
|
432
|
-
_this.multiHeatmap.handleUpdate({
|
|
433
|
-
time: time,
|
|
434
|
-
targetName: targetName,
|
|
435
|
-
intersectionRect: intersectionRect,
|
|
436
|
-
type: type,
|
|
437
|
-
element: element,
|
|
438
|
-
classification: revisionsClassification,
|
|
439
|
-
onError: function onError(error) {
|
|
440
|
-
_this.setAbortReason(abortReason.error, error.time, error.error);
|
|
441
|
-
},
|
|
442
|
-
attributeName: attributeName,
|
|
443
|
-
oldValue: oldValue,
|
|
444
|
-
newValue: newValue
|
|
445
|
-
});
|
|
446
|
-
});
|
|
447
377
|
_defineProperty(this, "mapPixelsToHeatmap", function (left, top, width, height) {
|
|
448
378
|
var _this$viewport = _this.viewport,
|
|
449
379
|
w = _this$viewport.w,
|
|
@@ -500,10 +430,10 @@ export var VCObserver = /*#__PURE__*/function () {
|
|
|
500
430
|
var unbinds = attachAbortListeners(window, _this.viewport, _this.abortReasonCallback);
|
|
501
431
|
if ((_window = window) !== null && _window !== void 0 && _window.__SSR_ABORT_LISTENERS__) {
|
|
502
432
|
var _window2;
|
|
503
|
-
Object.entries(window.__SSR_ABORT_LISTENERS__.aborts).forEach(function (
|
|
504
|
-
var
|
|
505
|
-
key =
|
|
506
|
-
time =
|
|
433
|
+
Object.entries(window.__SSR_ABORT_LISTENERS__.aborts).forEach(function (_ref11) {
|
|
434
|
+
var _ref12 = _slicedToArray(_ref11, 2),
|
|
435
|
+
key = _ref12[0],
|
|
436
|
+
time = _ref12[1];
|
|
507
437
|
if (time) {
|
|
508
438
|
_this.abortReasonCallback(key, time);
|
|
509
439
|
}
|
|
@@ -516,6 +446,7 @@ export var VCObserver = /*#__PURE__*/function () {
|
|
|
516
446
|
this.arraySize = options.heatmapSize || 200;
|
|
517
447
|
this.devToolsEnabled = options.devToolsEnabled || false;
|
|
518
448
|
this.oldDomUpdatesEnabled = options.oldDomUpdates || false;
|
|
449
|
+
var ssrEnablePageLayoutPlaceholder = options.ssrEnablePageLayoutPlaceholder;
|
|
519
450
|
this.observers = new Observers({
|
|
520
451
|
selectorConfig: options.selectorConfig || {
|
|
521
452
|
id: false,
|
|
@@ -523,21 +454,19 @@ export var VCObserver = /*#__PURE__*/function () {
|
|
|
523
454
|
role: false,
|
|
524
455
|
className: true,
|
|
525
456
|
dataVC: true
|
|
457
|
+
},
|
|
458
|
+
SSRConfig: {
|
|
459
|
+
enablePageLayoutPlaceholder: ssrEnablePageLayoutPlaceholder || false
|
|
526
460
|
}
|
|
527
461
|
});
|
|
528
462
|
this.heatmap = !isVCRevisionEnabled('fy25.01') ? [] : this.getCleanHeatmap();
|
|
529
463
|
this.heatmapNext = this.getCleanHeatmap();
|
|
530
|
-
this.multiHeatmap = new MultiRevisionHeatmap({
|
|
531
|
-
viewport: this.viewport,
|
|
532
|
-
revisions: getRevisions(),
|
|
533
|
-
devToolsEnabled: this.devToolsEnabled
|
|
534
|
-
});
|
|
535
464
|
this.isPostInteraction = options.isPostInteraction || false;
|
|
536
465
|
}
|
|
537
466
|
return _createClass(VCObserver, [{
|
|
538
467
|
key: "start",
|
|
539
|
-
value: function start(
|
|
540
|
-
var startTime =
|
|
468
|
+
value: function start(_ref13) {
|
|
469
|
+
var startTime = _ref13.startTime;
|
|
541
470
|
this.active = true;
|
|
542
471
|
if (this.observers.isBrowserSupported()) {
|
|
543
472
|
this.setViewportSize();
|
|
@@ -559,12 +488,12 @@ export var VCObserver = /*#__PURE__*/function () {
|
|
|
559
488
|
}, {
|
|
560
489
|
key: "getIgnoredElements",
|
|
561
490
|
value: function getIgnoredElements(componentsLog) {
|
|
562
|
-
return Object.values(componentsLog).flat().filter(function (
|
|
563
|
-
var ignoreReason =
|
|
491
|
+
return Object.values(componentsLog).flat().filter(function (_ref14) {
|
|
492
|
+
var ignoreReason = _ref14.ignoreReason;
|
|
564
493
|
return Boolean(ignoreReason);
|
|
565
|
-
}).map(function (
|
|
566
|
-
var targetName =
|
|
567
|
-
ignoreReason =
|
|
494
|
+
}).map(function (_ref15) {
|
|
495
|
+
var targetName = _ref15.targetName,
|
|
496
|
+
ignoreReason = _ref15.ignoreReason;
|
|
568
497
|
return {
|
|
569
498
|
targetName: targetName,
|
|
570
499
|
ignoreReason: ignoreReason
|
|
@@ -614,11 +543,6 @@ export var VCObserver = /*#__PURE__*/function () {
|
|
|
614
543
|
this.detachAbortListeners();
|
|
615
544
|
this.heatmap = !isVCRevisionEnabled('fy25.01') ? [] : this.getCleanHeatmap();
|
|
616
545
|
this.heatmapNext = this.getCleanHeatmap();
|
|
617
|
-
this.multiHeatmap = new MultiRevisionHeatmap({
|
|
618
|
-
viewport: this.viewport,
|
|
619
|
-
revisions: getRevisions(),
|
|
620
|
-
devToolsEnabled: this.devToolsEnabled
|
|
621
|
-
});
|
|
622
546
|
this.totalTime = 0;
|
|
623
547
|
this.componentsLog = {};
|
|
624
548
|
this.vcRatios = {};
|
|
@@ -687,12 +611,12 @@ export var VCObserver = /*#__PURE__*/function () {
|
|
|
687
611
|
}
|
|
688
612
|
}], [{
|
|
689
613
|
key: "calculateVC",
|
|
690
|
-
value: function calculateVC(
|
|
691
|
-
var heatmap =
|
|
692
|
-
|
|
693
|
-
ssr =
|
|
694
|
-
componentsLog =
|
|
695
|
-
viewport =
|
|
614
|
+
value: function calculateVC(_ref16) {
|
|
615
|
+
var heatmap = _ref16.heatmap,
|
|
616
|
+
_ref16$ssr = _ref16.ssr,
|
|
617
|
+
ssr = _ref16$ssr === void 0 ? UNUSED_SECTOR : _ref16$ssr,
|
|
618
|
+
componentsLog = _ref16.componentsLog,
|
|
619
|
+
viewport = _ref16.viewport;
|
|
696
620
|
var lastUpdate = {};
|
|
697
621
|
var totalPainted = 0;
|
|
698
622
|
if (ssr !== UNUSED_SECTOR) {
|
|
@@ -758,11 +682,11 @@ export var VCObserver = /*#__PURE__*/function () {
|
|
|
758
682
|
});
|
|
759
683
|
return VCRatio;
|
|
760
684
|
}, 0);
|
|
761
|
-
var VCEntries = entries.reduce(function (acc,
|
|
685
|
+
var VCEntries = entries.reduce(function (acc, _ref17, i) {
|
|
762
686
|
var _acc$abs, _componentsLog$timest, _acc$rel$vc, _acc$rel;
|
|
763
|
-
var
|
|
764
|
-
timestamp =
|
|
765
|
-
entryPainted =
|
|
687
|
+
var _ref18 = _slicedToArray(_ref17, 2),
|
|
688
|
+
timestamp = _ref18[0],
|
|
689
|
+
entryPainted = _ref18[1];
|
|
766
690
|
var currentlyPainted = entryPainted + (((_acc$abs = acc.abs[i - 1]) === null || _acc$abs === void 0 ? void 0 : _acc$abs[1]) || 0);
|
|
767
691
|
var currentlyPaintedRatio = Math.round(currentlyPainted / totalPainted * 1000) / 10;
|
|
768
692
|
var logEntry = _toConsumableArray(new Set((_componentsLog$timest = componentsLog[timestamp]) === null || _componentsLog$timest === void 0 ? void 0 : _componentsLog$timest.filter(function (v) {
|
|
@@ -24,7 +24,8 @@ function isElementVisible(target) {
|
|
|
24
24
|
}
|
|
25
25
|
export var Observers = /*#__PURE__*/function () {
|
|
26
26
|
function Observers(opts) {
|
|
27
|
-
var _this = this
|
|
27
|
+
var _this = this,
|
|
28
|
+
_opts$SSRConfig;
|
|
28
29
|
_classCallCheck(this, Observers);
|
|
29
30
|
_defineProperty(this, "observedMutations", new WeakMap());
|
|
30
31
|
_defineProperty(this, "elementsInView", new Set());
|
|
@@ -64,7 +65,7 @@ export var Observers = /*#__PURE__*/function () {
|
|
|
64
65
|
this.selectorConfig = _objectSpread(_objectSpread({}, this.selectorConfig), opts.selectorConfig);
|
|
65
66
|
this.intersectionObserver = this.getIntersectionObserver();
|
|
66
67
|
this.mutationObserver = this.getMutationObserver();
|
|
67
|
-
this.ssrPlaceholderHandler = new SSRPlaceholderHandlers();
|
|
68
|
+
this.ssrPlaceholderHandler = new SSRPlaceholderHandlers((_opts$SSRConfig = opts.SSRConfig) === null || _opts$SSRConfig === void 0 ? void 0 : _opts$SSRConfig.enablePageLayoutPlaceholder);
|
|
68
69
|
}
|
|
69
70
|
return _createClass(Observers, [{
|
|
70
71
|
key: "isBrowserSupported",
|
|
@@ -2,15 +2,39 @@ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
4
|
var ANCESTOR_LOOKUP_LIMIT = 10;
|
|
5
|
+
var PAGE_LAYOUT_ID = 'page-layout.root';
|
|
5
6
|
export var SSRPlaceholderHandlers = /*#__PURE__*/function () {
|
|
6
7
|
function SSRPlaceholderHandlers() {
|
|
7
8
|
var _this = this;
|
|
9
|
+
var enablePageLayoutPlaceholder = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
8
10
|
_classCallCheck(this, SSRPlaceholderHandlers);
|
|
9
11
|
_defineProperty(this, "staticPlaceholders", new Map());
|
|
10
12
|
_defineProperty(this, "callbacks", new Map());
|
|
11
13
|
_defineProperty(this, "getSizeCallbacks", new Map());
|
|
12
14
|
_defineProperty(this, "reactValidateCallbacks", new Map());
|
|
13
15
|
_defineProperty(this, "EQUALITY_THRESHOLD", 1);
|
|
16
|
+
_defineProperty(this, "getPlaceholderId", function (el) {
|
|
17
|
+
var _el$dataset;
|
|
18
|
+
var ssrPlaceholderId = el === null || el === void 0 || (_el$dataset = el.dataset) === null || _el$dataset === void 0 ? void 0 : _el$dataset.ssrPlaceholder;
|
|
19
|
+
if (!!ssrPlaceholderId) {
|
|
20
|
+
return ssrPlaceholderId;
|
|
21
|
+
}
|
|
22
|
+
if (_this.enablePageLayoutPlaceholder && (el === null || el === void 0 ? void 0 : el.dataset.testid) === PAGE_LAYOUT_ID) {
|
|
23
|
+
return PAGE_LAYOUT_ID;
|
|
24
|
+
}
|
|
25
|
+
return '';
|
|
26
|
+
});
|
|
27
|
+
_defineProperty(this, "getPlaceholderReplacementId", function (el) {
|
|
28
|
+
var _el$dataset2;
|
|
29
|
+
var ssrPlaceholderReplaceId = el === null || el === void 0 || (_el$dataset2 = el.dataset) === null || _el$dataset2 === void 0 ? void 0 : _el$dataset2.ssrPlaceholderReplace;
|
|
30
|
+
if (!!ssrPlaceholderReplaceId) {
|
|
31
|
+
return ssrPlaceholderReplaceId;
|
|
32
|
+
}
|
|
33
|
+
if (_this.enablePageLayoutPlaceholder && (el === null || el === void 0 ? void 0 : el.dataset.testid) === PAGE_LAYOUT_ID) {
|
|
34
|
+
return PAGE_LAYOUT_ID;
|
|
35
|
+
}
|
|
36
|
+
return '';
|
|
37
|
+
});
|
|
14
38
|
_defineProperty(this, "intersectionObserverCallback", function (_ref) {
|
|
15
39
|
var _this$intersectionObs;
|
|
16
40
|
var target = _ref.target,
|
|
@@ -20,7 +44,7 @@ export var SSRPlaceholderHandlers = /*#__PURE__*/function () {
|
|
|
20
44
|
// impossible case - keep typescript healthy
|
|
21
45
|
return;
|
|
22
46
|
}
|
|
23
|
-
var staticKey = target
|
|
47
|
+
var staticKey = _this.getPlaceholderId(target);
|
|
24
48
|
if (staticKey) {
|
|
25
49
|
if (_this.staticPlaceholders.has(staticKey) && _this.callbacks.has(staticKey)) {
|
|
26
50
|
// validation
|
|
@@ -42,7 +66,7 @@ export var SSRPlaceholderHandlers = /*#__PURE__*/function () {
|
|
|
42
66
|
_this.callbacks.delete(staticKey);
|
|
43
67
|
}
|
|
44
68
|
} else {
|
|
45
|
-
var key = target
|
|
69
|
+
var key = _this.getPlaceholderReplacementId(target);
|
|
46
70
|
var _resolve2 = _this.reactValidateCallbacks.get(key);
|
|
47
71
|
if (!_resolve2) {
|
|
48
72
|
return;
|
|
@@ -70,25 +94,27 @@ export var SSRPlaceholderHandlers = /*#__PURE__*/function () {
|
|
|
70
94
|
}).forEach(_this.intersectionObserverCallback);
|
|
71
95
|
});
|
|
72
96
|
}
|
|
97
|
+
this.enablePageLayoutPlaceholder = enablePageLayoutPlaceholder;
|
|
73
98
|
if (window.document) {
|
|
74
99
|
try {
|
|
75
|
-
var
|
|
100
|
+
var selector = this.enablePageLayoutPlaceholder ? '[data-ssr-placeholder],[data-testid="page-layout.root"]' : '[data-ssr-placeholder]';
|
|
101
|
+
var existingElements = document.querySelectorAll(selector);
|
|
76
102
|
existingElements.forEach(function (el) {
|
|
77
|
-
var
|
|
78
|
-
if (
|
|
103
|
+
var placeholderId = el instanceof HTMLElement && _this.getPlaceholderId(el);
|
|
104
|
+
if (placeholderId) {
|
|
79
105
|
var _window$__SSR_PLACEHO, _this$intersectionObs2;
|
|
80
106
|
var width = -1;
|
|
81
107
|
var height = -1;
|
|
82
108
|
var x = -1;
|
|
83
109
|
var y = -1;
|
|
84
|
-
var boundingClientRect = (_window$__SSR_PLACEHO = window.__SSR_PLACEHOLDERS_DIMENSIONS__) === null || _window$__SSR_PLACEHO === void 0 ? void 0 : _window$__SSR_PLACEHO[
|
|
110
|
+
var boundingClientRect = (_window$__SSR_PLACEHO = window.__SSR_PLACEHOLDERS_DIMENSIONS__) === null || _window$__SSR_PLACEHO === void 0 ? void 0 : _window$__SSR_PLACEHO[placeholderId];
|
|
85
111
|
if (boundingClientRect) {
|
|
86
112
|
width = boundingClientRect.width;
|
|
87
113
|
height = boundingClientRect.height;
|
|
88
114
|
x = boundingClientRect.x;
|
|
89
115
|
y = boundingClientRect.y;
|
|
90
116
|
}
|
|
91
|
-
_this.staticPlaceholders.set(
|
|
117
|
+
_this.staticPlaceholders.set(placeholderId, {
|
|
92
118
|
width: width,
|
|
93
119
|
height: height,
|
|
94
120
|
x: x,
|
|
@@ -113,12 +139,12 @@ export var SSRPlaceholderHandlers = /*#__PURE__*/function () {
|
|
|
113
139
|
}, {
|
|
114
140
|
key: "isPlaceholder",
|
|
115
141
|
value: function isPlaceholder(element) {
|
|
116
|
-
return Boolean(element
|
|
142
|
+
return Boolean(this.getPlaceholderId(element));
|
|
117
143
|
}
|
|
118
144
|
}, {
|
|
119
145
|
key: "isPlaceholderReplacement",
|
|
120
146
|
value: function isPlaceholderReplacement(element) {
|
|
121
|
-
return Boolean(element
|
|
147
|
+
return Boolean(this.getPlaceholderReplacementId(element));
|
|
122
148
|
}
|
|
123
149
|
}, {
|
|
124
150
|
key: "isPlaceholderIgnored",
|
|
@@ -148,7 +174,7 @@ export var SSRPlaceholderHandlers = /*#__PURE__*/function () {
|
|
|
148
174
|
value: function checkIfExistedAndSizeMatching(el) {
|
|
149
175
|
var _this2 = this;
|
|
150
176
|
el = this.findNearestPlaceholderContainerIfIgnored(el);
|
|
151
|
-
var id = el
|
|
177
|
+
var id = this.getPlaceholderId(el);
|
|
152
178
|
return new Promise(function (resolve) {
|
|
153
179
|
if (!_this2.staticPlaceholders.has(id)) {
|
|
154
180
|
resolve(false);
|
|
@@ -166,7 +192,7 @@ export var SSRPlaceholderHandlers = /*#__PURE__*/function () {
|
|
|
166
192
|
var _this3 = this;
|
|
167
193
|
return new Promise(function (resolve) {
|
|
168
194
|
var _this3$intersectionOb;
|
|
169
|
-
_this3.getSizeCallbacks.set(el
|
|
195
|
+
_this3.getSizeCallbacks.set(_this3.getPlaceholderId(el), resolve);
|
|
170
196
|
(_this3$intersectionOb = _this3.intersectionObserver) === null || _this3$intersectionOb === void 0 || _this3$intersectionOb.observe(el);
|
|
171
197
|
});
|
|
172
198
|
}
|
|
@@ -175,7 +201,7 @@ export var SSRPlaceholderHandlers = /*#__PURE__*/function () {
|
|
|
175
201
|
value: function validateReactComponentMatchToPlaceholder(el) {
|
|
176
202
|
var _this4 = this;
|
|
177
203
|
el = this.findNearestPlaceholderContainerIfIgnored(el);
|
|
178
|
-
var id = el
|
|
204
|
+
var id = this.getPlaceholderReplacementId(el);
|
|
179
205
|
return new Promise(function (resolve) {
|
|
180
206
|
if (!_this4.staticPlaceholders.has(id)) {
|
|
181
207
|
resolve(false);
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// and save their size/positions in a map __SSR_PLACEHOLDERS_DIMENSIONS__ on the Window object. Each placeholderId is
|
|
3
3
|
// unique and maps to its corresponding elements bounding client rectangle dimensions.
|
|
4
4
|
export function collectSSRPlaceholderDimensions(document, window) {
|
|
5
|
+
var enablePageLayoutPlaceholder = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
5
6
|
var ssrPlaceholders = document === null || document === void 0 ? void 0 : document.querySelectorAll('[data-ssr-placeholder]');
|
|
6
7
|
ssrPlaceholders.forEach(function (elem) {
|
|
7
8
|
var placeholderId = elem.getAttribute('data-ssr-placeholder');
|
|
@@ -11,4 +12,12 @@ export function collectSSRPlaceholderDimensions(document, window) {
|
|
|
11
12
|
window.__SSR_PLACEHOLDERS_DIMENSIONS__[placeholderId] = boundingClient;
|
|
12
13
|
}
|
|
13
14
|
});
|
|
15
|
+
if (enablePageLayoutPlaceholder) {
|
|
16
|
+
var pageLayoutRoot = document === null || document === void 0 ? void 0 : document.getElementById('unsafe-design-system-page-layout-root');
|
|
17
|
+
if (pageLayoutRoot) {
|
|
18
|
+
var boundingClient = pageLayoutRoot.getBoundingClientRect();
|
|
19
|
+
window.__SSR_PLACEHOLDERS_DIMENSIONS__ = window.__SSR_PLACEHOLDERS_DIMENSIONS__ || {};
|
|
20
|
+
window.__SSR_PLACEHOLDERS_DIMENSIONS__['page-layout.root'] = boundingClient;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
14
23
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { UnbindFn } from 'bind-event-listener';
|
|
2
|
-
import { MultiRevisionHeatmap } from '../../vc/vc-observer/heatmap/heatmap';
|
|
3
2
|
export declare const AbortEvent: {
|
|
4
3
|
readonly wheel: "wheel";
|
|
5
4
|
readonly keydown: "keydown";
|
|
@@ -30,7 +29,6 @@ export type VCRawDataType = {
|
|
|
30
29
|
oldDomUpdatesEnabled: boolean;
|
|
31
30
|
devToolsEnabled: boolean;
|
|
32
31
|
ratios: VCRatioType;
|
|
33
|
-
multiHeatmap: MultiRevisionHeatmap | null;
|
|
34
32
|
};
|
|
35
33
|
export type VCEntryType = {
|
|
36
34
|
time: number;
|
|
@@ -73,6 +73,7 @@ export type Config = {
|
|
|
73
73
|
readonly selectorConfig?: SelectorConfig;
|
|
74
74
|
readonly ssr?: boolean;
|
|
75
75
|
readonly ssrWhitelist?: string[];
|
|
76
|
+
readonly ssrEnablePageLayoutPlaceholder?: boolean;
|
|
76
77
|
readonly stopVCAtInteractionFinish?: boolean;
|
|
77
78
|
/**
|
|
78
79
|
* The revisions of TTVC that will be calculated
|
|
@@ -26,8 +26,8 @@ declare function createPostInteractionLogPayload({ lastInteractionFinish, reactP
|
|
|
26
26
|
vc90: number | null;
|
|
27
27
|
vcClean: boolean;
|
|
28
28
|
type: import("../common").InteractionType;
|
|
29
|
-
abortReason?: import("../common").AbortReasonType | undefined;
|
|
30
29
|
id: string;
|
|
30
|
+
abortReason?: import("../common").AbortReasonType | undefined;
|
|
31
31
|
abortedByInteractionName?: string | undefined;
|
|
32
32
|
routeName: string | null;
|
|
33
33
|
experimentalVC90?: number | undefined;
|
package/dist/types/vc/types.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export type VCObserverOptions = {
|
|
|
23
23
|
devToolsEnabled?: boolean | undefined;
|
|
24
24
|
selectorConfig?: SelectorConfig | undefined;
|
|
25
25
|
isPostInteraction?: boolean;
|
|
26
|
+
ssrEnablePageLayoutPlaceholder?: boolean;
|
|
26
27
|
};
|
|
27
28
|
export interface VCObserverInterface {
|
|
28
29
|
start(startArg: {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { InteractionMetrics } from '../../common/common/types';
|
|
2
2
|
import type { RevisionPayload } from '../../common/vc/types';
|
|
3
|
-
import type { MultiRevisionHeatmap } from './heatmap/heatmap';
|
|
4
3
|
type CalculatedVC = {
|
|
5
4
|
VC: {
|
|
6
5
|
[key: string]: number | null;
|
|
@@ -9,29 +8,15 @@ type CalculatedVC = {
|
|
|
9
8
|
[key: string]: string[] | null;
|
|
10
9
|
};
|
|
11
10
|
};
|
|
12
|
-
export declare function getVCRevisionsData({ fullPrefix, interaction, isVCClean, isEventAborted,
|
|
11
|
+
export declare function getVCRevisionsData({ fullPrefix, interaction, isVCClean, isEventAborted, calculatedVC, calculatedVCNext, experienceKey, }: {
|
|
13
12
|
fullPrefix?: string;
|
|
14
13
|
interaction: Pick<InteractionMetrics, 'start' | 'end'>;
|
|
15
14
|
isVCClean: boolean;
|
|
16
15
|
isEventAborted: boolean;
|
|
17
|
-
multiHeatmap: MultiRevisionHeatmap | null;
|
|
18
16
|
calculatedVC: CalculatedVC;
|
|
19
17
|
calculatedVCNext: CalculatedVC;
|
|
20
18
|
experienceKey: string;
|
|
21
|
-
ssr?: number;
|
|
22
19
|
}): {
|
|
23
20
|
[x: string]: RevisionPayload;
|
|
24
|
-
}
|
|
25
|
-
[x: string]: {
|
|
26
|
-
revision: string;
|
|
27
|
-
clean: boolean;
|
|
28
|
-
'metric:vc90': number | null;
|
|
29
|
-
vcDetails: {
|
|
30
|
-
[key: string]: {
|
|
31
|
-
t: number;
|
|
32
|
-
e: string[];
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
}[];
|
|
36
|
-
} | null;
|
|
21
|
+
};
|
|
37
22
|
export {};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { type UnbindFn } from 'bind-event-listener';
|
|
2
2
|
import type { ComponentsLogType, VCAbortReasonType, VCEntryType, VCIgnoreReason, VCRatioType, VCRawDataType, VCResult } from '../../common/vc/types';
|
|
3
3
|
import type { GetVCResultType, VCObserverInterface, VCObserverOptions } from '../types';
|
|
4
|
-
import { MultiRevisionHeatmap } from './heatmap/heatmap';
|
|
5
4
|
import { Observers } from './observers';
|
|
6
5
|
export declare class VCObserver implements VCObserverInterface {
|
|
7
6
|
abortReason: VCAbortReasonType;
|
|
@@ -15,7 +14,6 @@ export declare class VCObserver implements VCObserverInterface {
|
|
|
15
14
|
arraySize: number;
|
|
16
15
|
heatmap: number[][];
|
|
17
16
|
heatmapNext: number[][];
|
|
18
|
-
multiHeatmap: MultiRevisionHeatmap | null;
|
|
19
17
|
componentsLog: ComponentsLogType;
|
|
20
18
|
vcRatios: VCRatioType;
|
|
21
19
|
active: boolean;
|
|
@@ -68,8 +66,6 @@ export declare class VCObserver implements VCObserverInterface {
|
|
|
68
66
|
setReactRootRenderStart(startTime?: number): void;
|
|
69
67
|
setReactRootRenderStop(stopTime?: number): void;
|
|
70
68
|
private handleUpdate;
|
|
71
|
-
private legacyHandleUpdate;
|
|
72
|
-
private onViewportChangeDetected;
|
|
73
69
|
private setAbortReason;
|
|
74
70
|
private resetState;
|
|
75
71
|
private getCleanHeatmap;
|
|
@@ -9,6 +9,9 @@ export type SelectorConfig = {
|
|
|
9
9
|
};
|
|
10
10
|
type ConstructorOptions = {
|
|
11
11
|
selectorConfig: SelectorConfig;
|
|
12
|
+
SSRConfig?: {
|
|
13
|
+
enablePageLayoutPlaceholder: boolean;
|
|
14
|
+
};
|
|
12
15
|
};
|
|
13
16
|
export declare class Observers implements BrowserObservers {
|
|
14
17
|
private intersectionObserver;
|
|
@@ -11,7 +11,10 @@ export declare class SSRPlaceholderHandlers {
|
|
|
11
11
|
private reactValidateCallbacks;
|
|
12
12
|
private intersectionObserver;
|
|
13
13
|
private EQUALITY_THRESHOLD;
|
|
14
|
-
|
|
14
|
+
private enablePageLayoutPlaceholder;
|
|
15
|
+
constructor(enablePageLayoutPlaceholder?: boolean);
|
|
16
|
+
private getPlaceholderId;
|
|
17
|
+
private getPlaceholderReplacementId;
|
|
15
18
|
clear(): void;
|
|
16
19
|
isPlaceholder(element: HTMLElement): boolean;
|
|
17
20
|
isPlaceholderReplacement(element: HTMLElement): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function collectSSRPlaceholderDimensions(document: Document, window: Window): void;
|
|
1
|
+
export declare function collectSSRPlaceholderDimensions(document: Document, window: Window, enablePageLayoutPlaceholder?: boolean): void;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { UnbindFn } from 'bind-event-listener';
|
|
2
|
-
import { MultiRevisionHeatmap } from '../../vc/vc-observer/heatmap/heatmap';
|
|
3
2
|
export declare const AbortEvent: {
|
|
4
3
|
readonly wheel: "wheel";
|
|
5
4
|
readonly keydown: "keydown";
|
|
@@ -30,7 +29,6 @@ export type VCRawDataType = {
|
|
|
30
29
|
oldDomUpdatesEnabled: boolean;
|
|
31
30
|
devToolsEnabled: boolean;
|
|
32
31
|
ratios: VCRatioType;
|
|
33
|
-
multiHeatmap: MultiRevisionHeatmap | null;
|
|
34
32
|
};
|
|
35
33
|
export type VCEntryType = {
|
|
36
34
|
time: number;
|
|
@@ -73,6 +73,7 @@ export type Config = {
|
|
|
73
73
|
readonly selectorConfig?: SelectorConfig;
|
|
74
74
|
readonly ssr?: boolean;
|
|
75
75
|
readonly ssrWhitelist?: string[];
|
|
76
|
+
readonly ssrEnablePageLayoutPlaceholder?: boolean;
|
|
76
77
|
readonly stopVCAtInteractionFinish?: boolean;
|
|
77
78
|
/**
|
|
78
79
|
* The revisions of TTVC that will be calculated
|
|
@@ -26,8 +26,8 @@ declare function createPostInteractionLogPayload({ lastInteractionFinish, reactP
|
|
|
26
26
|
vc90: number | null;
|
|
27
27
|
vcClean: boolean;
|
|
28
28
|
type: import("../common").InteractionType;
|
|
29
|
-
abortReason?: import("../common").AbortReasonType | undefined;
|
|
30
29
|
id: string;
|
|
30
|
+
abortReason?: import("../common").AbortReasonType | undefined;
|
|
31
31
|
abortedByInteractionName?: string | undefined;
|
|
32
32
|
routeName: string | null;
|
|
33
33
|
experimentalVC90?: number | undefined;
|
|
@@ -23,6 +23,7 @@ export type VCObserverOptions = {
|
|
|
23
23
|
devToolsEnabled?: boolean | undefined;
|
|
24
24
|
selectorConfig?: SelectorConfig | undefined;
|
|
25
25
|
isPostInteraction?: boolean;
|
|
26
|
+
ssrEnablePageLayoutPlaceholder?: boolean;
|
|
26
27
|
};
|
|
27
28
|
export interface VCObserverInterface {
|
|
28
29
|
start(startArg: {
|