@atlaskit/react-ufo 4.17.0 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/cjs/create-payload/index.js +2 -2
- package/dist/cjs/interaction-id-context/index.js +2 -2
- package/dist/cjs/typing-performance-tracing/index.js +29 -6
- package/dist/cjs/vc/index.js +1 -3
- package/dist/cjs/vc/vc-observer-new/index.js +55 -67
- package/dist/cjs/vc/vc-observer-new/metric-calculator/fy26_04/index.js +2 -1
- package/dist/cjs/vc/vc-observer-new/metric-calculator/vc-next/index.js +42 -0
- package/dist/es2019/create-payload/index.js +2 -2
- package/dist/es2019/interaction-id-context/index.js +2 -2
- package/dist/es2019/typing-performance-tracing/index.js +27 -6
- package/dist/es2019/vc/index.js +1 -3
- package/dist/es2019/vc/vc-observer-new/index.js +59 -81
- package/dist/es2019/vc/vc-observer-new/metric-calculator/fy26_04/index.js +2 -2
- package/dist/es2019/vc/vc-observer-new/metric-calculator/vc-next/index.js +21 -0
- package/dist/esm/create-payload/index.js +2 -2
- package/dist/esm/interaction-id-context/index.js +2 -2
- package/dist/esm/typing-performance-tracing/index.js +29 -6
- package/dist/esm/vc/index.js +1 -3
- package/dist/esm/vc/vc-observer-new/index.js +53 -65
- package/dist/esm/vc/vc-observer-new/metric-calculator/fy26_04/index.js +2 -1
- package/dist/esm/vc/vc-observer-new/metric-calculator/vc-next/index.js +36 -0
- package/dist/types/interaction-id-context/index.d.ts +2 -2
- package/dist/types/vc/vc-observer-new/metric-calculator/fy26_04/index.d.ts +1 -1
- package/dist/types/vc/vc-observer-new/metric-calculator/vc-next/index.d.ts +6 -0
- package/dist/types-ts4.5/interaction-id-context/index.d.ts +2 -2
- package/dist/types-ts4.5/vc/vc-observer-new/metric-calculator/fy26_04/index.d.ts +1 -1
- package/dist/types-ts4.5/vc/vc-observer-new/metric-calculator/vc-next/index.d.ts +6 -0
- package/package.json +5 -5
|
@@ -9,6 +9,7 @@ import VCCalculator_FY25_03 from './metric-calculator/fy25_03';
|
|
|
9
9
|
import VCCalculator_FY26_04 from './metric-calculator/fy26_04';
|
|
10
10
|
import getViewportHeight from './metric-calculator/utils/get-viewport-height';
|
|
11
11
|
import getViewportWidth from './metric-calculator/utils/get-viewport-width';
|
|
12
|
+
import VCCalculator_Next from './metric-calculator/vc-next';
|
|
12
13
|
import RawDataHandler from './raw-data-handler';
|
|
13
14
|
import ViewportObserver from './viewport-observer';
|
|
14
15
|
import WindowEventObserver from './window-event-observer';
|
|
@@ -228,90 +229,67 @@ export default class VCObserverNew {
|
|
|
228
229
|
start,
|
|
229
230
|
stop
|
|
230
231
|
});
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
}
|
|
232
|
+
const fy25_03 = isVCRevisionEnabled('fy25.03') ? await calculator_fy25_03.calculate({
|
|
233
|
+
orderedEntries,
|
|
234
|
+
startTime: start,
|
|
235
|
+
stopTime: stop,
|
|
236
|
+
interactionId,
|
|
237
|
+
interactionType,
|
|
238
|
+
isPostInteraction: this.isPostInteraction,
|
|
239
|
+
include3p,
|
|
240
|
+
excludeSmartAnswersInSearch,
|
|
241
|
+
includeSSRRatio,
|
|
242
|
+
isPageVisible,
|
|
243
|
+
interactionAbortReason
|
|
244
|
+
}) : null;
|
|
245
|
+
if (fy25_03) {
|
|
246
|
+
results.push(fy25_03);
|
|
247
|
+
}
|
|
248
248
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
249
|
+
// From TTVC v4 onwards, ensuring that SSR entry is always auto-added, whenever it is configured.
|
|
250
|
+
// From the next major version release (where TTVC v4 becomes the default TTVC version), the config for `includeSSRInV3` will be deprecated
|
|
251
|
+
if (param.ssr && !param.includeSSRInV3 && fg('platform_ufo_auto_add_ssr_entry_in_ttvc_v4')) {
|
|
252
|
+
this.addSSR(param.ssr);
|
|
253
|
+
}
|
|
254
|
+
const calculator_fy26_04 = new VCCalculator_FY26_04();
|
|
255
|
+
const fy26_04 = isVCRevisionEnabled('fy26.04') ? await calculator_fy26_04.calculate({
|
|
256
|
+
orderedEntries,
|
|
257
|
+
startTime: start,
|
|
258
|
+
stopTime: stop,
|
|
259
|
+
interactionId,
|
|
260
|
+
interactionType,
|
|
261
|
+
isPostInteraction: this.isPostInteraction,
|
|
262
|
+
include3p,
|
|
263
|
+
excludeSmartAnswersInSearch,
|
|
264
|
+
includeSSRRatio,
|
|
265
|
+
isPageVisible,
|
|
266
|
+
interactionAbortReason
|
|
267
|
+
}) : null;
|
|
268
|
+
if (fy26_04) {
|
|
269
|
+
results.push(fy26_04);
|
|
270
|
+
if (fg('platform_ufo_vcnext_for_ttvc_v5')) {
|
|
271
|
+
const calculator_next = new VCCalculator_Next();
|
|
272
|
+
const vcNext = isVCRevisionEnabled('next') ? await calculator_next.calculate({
|
|
273
|
+
orderedEntries,
|
|
274
|
+
startTime: start,
|
|
275
|
+
stopTime: stop,
|
|
276
|
+
interactionId,
|
|
277
|
+
interactionType,
|
|
278
|
+
isPostInteraction: this.isPostInteraction,
|
|
279
|
+
include3p,
|
|
280
|
+
excludeSmartAnswersInSearch,
|
|
281
|
+
includeSSRRatio,
|
|
282
|
+
isPageVisible,
|
|
283
|
+
interactionAbortReason
|
|
284
|
+
}) : null;
|
|
285
|
+
if (vcNext) {
|
|
286
|
+
results.push(vcNext);
|
|
287
|
+
}
|
|
288
|
+
} else {
|
|
269
289
|
const vcNext = {
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
clean: fy26_04['clean']
|
|
290
|
+
...fy26_04,
|
|
291
|
+
revision: 'next'
|
|
273
292
|
};
|
|
274
|
-
results.push(fy26_04);
|
|
275
|
-
results.push(vcNext);
|
|
276
|
-
}
|
|
277
|
-
} else {
|
|
278
|
-
const fy25_03 = await calculator_fy25_03.calculate({
|
|
279
|
-
orderedEntries,
|
|
280
|
-
startTime: start,
|
|
281
|
-
stopTime: stop,
|
|
282
|
-
interactionId,
|
|
283
|
-
interactionType,
|
|
284
|
-
isPostInteraction: this.isPostInteraction,
|
|
285
|
-
include3p,
|
|
286
|
-
excludeSmartAnswersInSearch,
|
|
287
|
-
includeSSRRatio,
|
|
288
|
-
isPageVisible,
|
|
289
|
-
interactionAbortReason
|
|
290
|
-
});
|
|
291
|
-
if (fy25_03) {
|
|
292
|
-
results.push(fy25_03);
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
// From TTVC v4 onwards, ensuring that SSR entry is always auto-added, whenever it is configured.
|
|
296
|
-
// From the next major version release (where TTVC v4 becomes the default TTVC version), the config for `includeSSRInV3` will be deprecated
|
|
297
|
-
if (param.ssr && !param.includeSSRInV3 && fg('platform_ufo_auto_add_ssr_entry_in_ttvc_v4')) {
|
|
298
|
-
this.addSSR(param.ssr);
|
|
299
|
-
}
|
|
300
|
-
const calculator_next = new VCCalculator_FY26_04();
|
|
301
|
-
const vcNext = await calculator_next.calculate({
|
|
302
|
-
orderedEntries,
|
|
303
|
-
startTime: start,
|
|
304
|
-
stopTime: stop,
|
|
305
|
-
interactionId,
|
|
306
|
-
interactionType,
|
|
307
|
-
isPostInteraction: this.isPostInteraction,
|
|
308
|
-
include3p,
|
|
309
|
-
includeSSRRatio,
|
|
310
|
-
isPageVisible,
|
|
311
|
-
interactionAbortReason
|
|
312
|
-
});
|
|
313
|
-
if (vcNext) {
|
|
314
|
-
vcNext.revision = 'next';
|
|
315
293
|
results.push(vcNext);
|
|
316
294
|
}
|
|
317
295
|
}
|
|
@@ -16,8 +16,8 @@ const getExcludedEntryTypes = () => {
|
|
|
16
16
|
const fy26_04_excluded_attributes = ['data-is-hovered' // non-visual attribute
|
|
17
17
|
];
|
|
18
18
|
export default class VCCalculator_FY26_04 extends VCCalculator_FY25_03 {
|
|
19
|
-
constructor() {
|
|
20
|
-
super(
|
|
19
|
+
constructor(revisionNo = 'fy26.04') {
|
|
20
|
+
super(revisionNo);
|
|
21
21
|
}
|
|
22
22
|
isEntryIncluded(entry, include3p, excludeSmartAnswersInSearch) {
|
|
23
23
|
const isEntryIncludedInV3 = super.isEntryIncluded(entry, include3p, excludeSmartAnswersInSearch);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import VCCalculator_FY26_04 from "../fy26_04";
|
|
2
|
+
const getConsideredEntryTypes = () => {
|
|
3
|
+
const consideredEntryTypes = [];
|
|
4
|
+
return consideredEntryTypes;
|
|
5
|
+
};
|
|
6
|
+
const getExcludedEntryTypes = () => {
|
|
7
|
+
const excludedEntryTypes = [];
|
|
8
|
+
return excludedEntryTypes;
|
|
9
|
+
};
|
|
10
|
+
export default class VCCalculator_Next extends VCCalculator_FY26_04 {
|
|
11
|
+
constructor() {
|
|
12
|
+
super('next');
|
|
13
|
+
}
|
|
14
|
+
isEntryIncluded(entry, include3p, excludeSmartAnswersInSearch) {
|
|
15
|
+
const isEntryIncludedInV4 = super.isEntryIncluded(entry, include3p, excludeSmartAnswersInSearch);
|
|
16
|
+
if (isEntryIncludedInV4 && !getExcludedEntryTypes().includes(entry.data.type)) {
|
|
17
|
+
return true;
|
|
18
|
+
}
|
|
19
|
+
return getConsideredEntryTypes().includes(entry.data.type);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -13,9 +13,9 @@ getPageLoadDetailedInteractionMetrics=function getPageLoadDetailedInteractionMet
|
|
|
13
13
|
'event:hostname':((_window$location=window.location)===null||_window$location===void 0?void 0:_window$location.hostname)||'unknown','event:product':config.product,'event:population':config.population,'event:schema':'1.0.0','event:sizeInKb':0,'event:source':{name:'react-ufo/web',version:getReactUFOPayloadVersion(interaction.type)},'event:region':config.region||'unknown','experience:key':experimental?'custom.experimental-interaction-metrics':'custom.interaction-metrics','experience:name':newUFOName,// Include CPU usage monitoring data
|
|
14
14
|
'event:cpu:usage':createPressureStateReport(interaction.start,interaction.end),'event:memory:usage':createMemoryStateReport(interaction.start,interaction.end)},criticalPayloadCount!==undefined?{'ufo:multipayload':true,'ufo:criticalPayloadCount':criticalPayloadCount}:{}),getBrowserMetadataToLegacyFormat()),batteryInfo),getSSRProperties(type)),getAssetsMetrics(interaction,pageLoadInteractionMetrics===null||pageLoadInteractionMetrics===void 0?void 0:pageLoadInteractionMetrics.SSRDoneTime)),getPPSMetrics(interaction)),paintMetrics),getNavigationMetricsToLegacyFormat(type)),finalVCMetrics),experimentalMetrics),(_config$additionalPay=config.additionalPayloadData)===null||_config$additionalPay===void 0?void 0:_config$additionalPay.call(config,interaction)),getTracingContextData(interaction)),getStylesheetMetrics()),getErrorCounts(interaction)),getReactHydrationStats()),{},{interactionMetrics:_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({namePrefix:config.namePrefix||'',segmentPrefix:config.segmentPrefix||'',interactionId:interactionId,pageVisibilityAtTTI:pageVisibilityAtTTI,pageVisibilityAtTTAI:pageVisibilityAtTTAI,experimental__pageVisibilityAtTTI:moreAccuratePageVisibilityAtTTI,experimental__pageVisibilityAtTTAI:moreAccuratePageVisibilityAtTTAI,// raw interaction metrics
|
|
15
15
|
rate:rate,routeName:routeName,type:type,abortReason:abortReason,featureFlags:featureFlags,previousInteractionName:previousInteractionName,isPreviousInteractionAborted:isPreviousInteractionAborted,abortedByInteractionName:abortedByInteractionName,// performance
|
|
16
|
-
apdex:optimizeApdex(interaction.apdex,getReactUFOPayloadVersion(interaction.type)),end:Math.round(end)},interaction.end3p?{end3p:Math.round(interaction.end3p)}:{}),{},{start:Math.round(start),segments:getReactUFOPayloadVersion(interaction.type)==='2.0.0'?segmentTree:getOldSegmentsLabelStack(segments,interaction.type),marks:optimizeMarks(interaction.marks,getReactUFOPayloadVersion(interaction.type)),customData:optimizeCustomData(interaction),reactProfilerTimings:optimizeReactProfilerTimings(interaction.reactProfilerTimings,start,getReactUFOPayloadVersion(interaction.type)),minorInteractions:interaction.minorInteractions},responsiveness?{responsiveness:responsiveness}:{}),labelStack),pageLoadInteractionMetrics),getDetailedInteractionMetrics(resourceTimings)),getPageLoadDetailedInteractionMetrics()),getBm3TrackerTimings(interaction)),{},{'metric:ttai':experimental?regularTTAI||expTTAI:undefined,'metric:experimental:ttai':expTTAI},unknownElementName?{unknownElementName:unknownElementName}:{}),unknownElementHierarchy?{unknownElementHierarchy:unknownElementHierarchy}:{}),'ufo:payloadTime':roundEpsilon(performance.now()-interactionPayloadStart)})}};if(experimental){regularTTAI=undefined;expTTAI=undefined;}if(fg('platform_ufo_enable_vc_raw_data')){size=getPayloadSize(payload.attributes.properties);vcRev=payload.attributes.properties['ufo:vc:rev'];rawData=vcRev.find(function(item){return item.revision==='raw-handler';});if(rawData){rawDataSize=getPayloadSize(rawData);payload.attributes.properties['ufo:vc:raw:size']=rawDataSize;if(size>MAX_PAYLOAD_SIZE&&Array.isArray(vcRev)&&vcRev.length>0){payload.attributes.properties['ufo:vc:rev']=vcRev.filter(function(item){return item.revision!=='raw-handler';});payload.attributes.properties['ufo:vc:raw:removed']=true;}}payload.attributes.properties['event:sizeInKb']=getPayloadSize(payload.attributes.properties);}else{payload.attributes.properties['event:sizeInKb']=getPayloadSize(payload.attributes.properties);}
|
|
16
|
+
apdex:optimizeApdex(interaction.apdex,getReactUFOPayloadVersion(interaction.type)),end:Math.round(end)},interaction.end3p?{end3p:Math.round(interaction.end3p)}:{}),{},{start:Math.round(start),segments:getReactUFOPayloadVersion(interaction.type)==='2.0.0'?segmentTree:getOldSegmentsLabelStack(segments,interaction.type),marks:optimizeMarks(interaction.marks,getReactUFOPayloadVersion(interaction.type)),customData:optimizeCustomData(interaction),reactProfilerTimings:optimizeReactProfilerTimings(interaction.reactProfilerTimings,start,getReactUFOPayloadVersion(interaction.type)),minorInteractions:interaction.minorInteractions},responsiveness?{responsiveness:responsiveness}:{}),labelStack),pageLoadInteractionMetrics),getDetailedInteractionMetrics(resourceTimings)),getPageLoadDetailedInteractionMetrics()),getBm3TrackerTimings(interaction)),{},{'metric:ttai':experimental?regularTTAI||expTTAI:undefined,'metric:experimental:ttai':expTTAI},unknownElementName?{unknownElementName:unknownElementName}:{}),unknownElementHierarchy?{unknownElementHierarchy:unknownElementHierarchy}:{}),'ufo:payloadTime':roundEpsilon(performance.now()-interactionPayloadStart)})}};if(experimental){regularTTAI=undefined;expTTAI=undefined;}if(fg('platform_ufo_enable_vc_raw_data')){size=getPayloadSize(payload.attributes.properties);vcRev=payload.attributes.properties['ufo:vc:rev'];rawData=vcRev.find(function(item){return item.revision==='raw-handler';});if(rawData){rawDataSize=getPayloadSize(rawData);payload.attributes.properties['ufo:vc:raw:size']=rawDataSize;if(size>MAX_PAYLOAD_SIZE&&Array.isArray(vcRev)&&vcRev.length>0){payload.attributes.properties['ufo:vc:rev']=vcRev.filter(function(item){return item.revision!=='raw-handler';});payload.attributes.properties['ufo:vc:raw:removed']=true;}}payload.attributes.properties['event:sizeInKb']=getPayloadSize(payload.attributes.properties);}else{payload.attributes.properties['event:sizeInKb']=getPayloadSize(payload.attributes.properties);}// in order of importance, first one being least important
|
|
17
17
|
// we can add more fields as necessary
|
|
18
|
-
interactionMetricsFieldsToTrim=['requestInfo','featureFlags','resourceTimings'];properties=payload.attributes.properties;interactionMetrics=properties.interactionMetrics;if(!interactionMetrics){_context.next=
|
|
18
|
+
interactionMetricsFieldsToTrim=['requestInfo','featureFlags','resourceTimings'];properties=payload.attributes.properties;interactionMetrics=properties.interactionMetrics;if(!interactionMetrics){_context.next=74;break;}_iterator=_createForOfIteratorHelper(interactionMetricsFieldsToTrim);_context.prev=52;_iterator.s();case 54:if((_step=_iterator.n()).done){_context.next=66;break;}field=_step.value;if(!(getPayloadSize(properties)<=MAX_PAYLOAD_SIZE)){_context.next=58;break;}return _context.abrupt("continue",64);case 58:interactionMetrics[field]=undefined;properties['event:isTrimmed']=true;trimmedFields=properties['event:trimmedFields'];if(!Array.isArray(trimmedFields)){trimmedFields=[];}trimmedFields.push("interactionMetrics.".concat(field));properties['event:trimmedFields']=trimmedFields;case 64:_context.next=54;break;case 66:_context.next=71;break;case 68:_context.prev=68;_context.t7=_context["catch"](52);_iterator.e(_context.t7);case 71:_context.prev=71;_iterator.f();return _context.finish(71);case 74:return _context.abrupt("return",payload);case 75:case"end":return _context.stop();}},_callee,null,[[52,68,71,74]]);}));return _createInteractionMetricsPayload.apply(this,arguments);}export function createPayloads(_x6,_x7){return _createPayloads.apply(this,arguments);}function _createPayloads(){_createPayloads=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(interactionId,interaction){var ufoNameOverride,modifiedInteraction,payloads,isCriticalMetricsEnabled,vcMetrics,criticalMetricsPayloads,criticalPayloadCount,interactionMetricsPayload;return _regeneratorRuntime.wrap(function _callee2$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:ufoNameOverride=getUfoNameOverride(interaction);modifiedInteraction=_objectSpread(_objectSpread({},interaction),{},{ufoName:ufoNameOverride});payloads=[];isCriticalMetricsEnabled=fg('platform_ufo_critical_metrics_payload');// Calculate VC metrics once to avoid duplicate expensive calculations
|
|
19
19
|
_context2.next=6;return getVCMetrics(interaction);case 6:vcMetrics=_context2.sent;if(!isCriticalMetricsEnabled){_context2.next=13;break;}_context2.next=10;return createCriticalMetricsPayloads(interactionId,interaction,vcMetrics);case 10:_context2.t0=_context2.sent;_context2.next=14;break;case 13:_context2.t0=[];case 14:criticalMetricsPayloads=_context2.t0;payloads.push.apply(payloads,_toConsumableArray(criticalMetricsPayloads));criticalPayloadCount=isCriticalMetricsEnabled?criticalMetricsPayloads.length:undefined;_context2.next=19;return createInteractionMetricsPayload(modifiedInteraction,interactionId,undefined,criticalPayloadCount,vcMetrics);case 19:interactionMetricsPayload=_context2.sent;payloads.push(interactionMetricsPayload);return _context2.abrupt("return",payloads.filter(Boolean));case 22:case"end":return _context2.stop();}},_callee2);}));return _createPayloads.apply(this,arguments);}export function createExperimentalMetricsPayload(_x8,_x9){return _createExperimentalMetricsPayload.apply(this,arguments);}function _createExperimentalMetricsPayload(){_createExperimentalMetricsPayload=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(interactionId,interaction){var config,ufoName,rate,pageVisibilityState,result;return _regeneratorRuntime.wrap(function _callee3$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:config=getConfig();if(config){_context3.next=3;break;}throw Error('UFO Configuration not provided');case 3:ufoName=sanitizeUfoName(interaction.ufoName);rate=getExperimentalInteractionRate(ufoName,interaction.type);if(coinflip(rate)){_context3.next=7;break;}return _context3.abrupt("return",null);case 7:pageVisibilityState=getPageVisibilityState(interaction.start,interaction.end);if(!(pageVisibilityState!=='visible')){_context3.next=10;break;}return _context3.abrupt("return",null);case 10:_context3.next=12;return createInteractionMetricsPayload(interaction,interactionId,true);case 12:result=_context3.sent;return _context3.abrupt("return",result);case 14:case"end":return _context3.stop();}},_callee3);}));return _createExperimentalMetricsPayload.apply(this,arguments);}export function createExtraSearchPageInteractionPayload(_x0,_x1){return _createExtraSearchPageInteractionPayload.apply(this,arguments);}function _createExtraSearchPageInteractionPayload(){_createExtraSearchPageInteractionPayload=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(interactionId,interaction){var SAIN_HOLD_NAMES,NAME_OVERRIDE,SEARCH_PAGE_SMART_ANSWERS_SEGMENT_LABEL,newInteractionId,newEnd,holdInfo,reactProfilerTimings,lastHold,isLastHoldSAIN,lastFilteredTime,filteredReactProfilerTimings,lastTiming,modifiedInteraction,payloads,vcMetrics,interactionMetricsPayload;return _regeneratorRuntime.wrap(function _callee4$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:SAIN_HOLD_NAMES=['search-ai-dialog-visible-text-loading','search-ai-dialog-all-text-loading'];NAME_OVERRIDE='search-page-ignoring-smart-answers';SEARCH_PAGE_SMART_ANSWERS_SEGMENT_LABEL='search-page-smart-answers';newInteractionId="".concat(interactionId,"-ignoring-smart-answers");// Calculate a new end time which excludes SAIN holds
|
|
20
20
|
holdInfo=interaction.holdInfo,reactProfilerTimings=interaction.reactProfilerTimings;lastHold=holdInfo.at(-1);isLastHoldSAIN=Boolean(lastHold&&SAIN_HOLD_NAMES.includes(lastHold.name));// A new end time is only calculated if the last hold is a SAIN hold
|
|
21
21
|
if(isLastHoldSAIN){lastFilteredTime=null;filteredReactProfilerTimings=reactProfilerTimings.filter(function(timing){if(timing.commitTime===lastFilteredTime){return false;}var isTimingSmartAnswersInSearch=timing.labelStack.some(function(label){return label.name===SEARCH_PAGE_SMART_ANSWERS_SEGMENT_LABEL;});if(isTimingSmartAnswersInSearch){lastFilteredTime=timing.commitTime;return false;}return true;});lastTiming=filteredReactProfilerTimings.at(-1);if(lastTiming){newEnd=lastTiming.commitTime;}}modifiedInteraction=_objectSpread(_objectSpread({},interaction),{},{end:newEnd!==null&&newEnd!==void 0?newEnd:interaction.end,holdInfo:[],knownSegments:[],reactProfilerTimings:[],ufoName:NAME_OVERRIDE});payloads=[];_context4.next=12;return getVCMetrics(interaction,false,true);case 12:vcMetrics=_context4.sent;_context4.next=15;return createInteractionMetricsPayload(modifiedInteraction,newInteractionId,undefined,undefined,vcMetrics);case 15:interactionMetricsPayload=_context4.sent;payloads.push(interactionMetricsPayload);return _context4.abrupt("return",payloads.filter(Boolean));case 18:case"end":return _context4.stop();}},_callee4);}));return _createExtraSearchPageInteractionPayload.apply(this,arguments);}
|
|
@@ -63,8 +63,8 @@ export var subscribeToInteractionIdChanges = function subscribeToInteractionIdCh
|
|
|
63
63
|
};
|
|
64
64
|
|
|
65
65
|
// We use a context to allow modals to have their own lifecycle
|
|
66
|
-
var
|
|
67
|
-
export default
|
|
66
|
+
var interactionContext = /*#__PURE__*/createContext(DefaultInteractionID);
|
|
67
|
+
export default interactionContext;
|
|
68
68
|
export var getInteractionId = function getInteractionId() {
|
|
69
69
|
return DefaultInteractionID;
|
|
70
70
|
};
|
|
@@ -2,6 +2,7 @@ import { useEffect, useRef } from 'react';
|
|
|
2
2
|
import { unstable_IdlePriority as idlePriority, unstable_scheduleCallback as scheduleCallback } from 'scheduler';
|
|
3
3
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
4
4
|
import { v4 as createUUID } from 'uuid';
|
|
5
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
6
|
import coinflip from '../coinflip';
|
|
6
7
|
import { getInteractionRate, getTypingPerformanceTracingMethod } from '../config';
|
|
7
8
|
import { addMetadata, addNewInteraction, tryComplete } from '../interaction-metrics';
|
|
@@ -72,10 +73,15 @@ function typingPerformanceTracingTimeout(element, name, rate) {
|
|
|
72
73
|
tsubmit = setTimeout(end, 2000); // debounce
|
|
73
74
|
}, 0);
|
|
74
75
|
};
|
|
75
|
-
|
|
76
|
+
if (typeof (element === null || element === void 0 ? void 0 : element.addEventListener) !== 'function' && fg('jfp-magma-ufo-event-listener-error')) {
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
76
79
|
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
77
80
|
element.addEventListener('keypress', onKeyPressHandler);
|
|
78
81
|
return function () {
|
|
82
|
+
if (typeof (element === null || element === void 0 ? void 0 : element.removeEventListener) !== 'function' && fg('jfp-magma-ufo-event-listener-error')) {
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
79
85
|
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
80
86
|
element.removeEventListener('keypress', onKeyPressHandler);
|
|
81
87
|
};
|
|
@@ -144,10 +150,15 @@ function typingPerformanceTracingTimeoutNoAlloc(element, name, rate) {
|
|
|
144
150
|
tsubmit = setTimeout(end, 2000); // debounce
|
|
145
151
|
}, 0);
|
|
146
152
|
};
|
|
147
|
-
|
|
153
|
+
if (typeof (element === null || element === void 0 ? void 0 : element.addEventListener) !== 'function' && fg('jfp-magma-ufo-event-listener-error')) {
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
148
156
|
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
149
157
|
element.addEventListener('keypress', onKeyPressHandler);
|
|
150
158
|
return function () {
|
|
159
|
+
if (typeof (element === null || element === void 0 ? void 0 : element.removeEventListener) !== 'function' && fg('jfp-magma-ufo-event-listener-error')) {
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
151
162
|
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
152
163
|
element.removeEventListener('keypress', onKeyPressHandler);
|
|
153
164
|
};
|
|
@@ -232,13 +243,25 @@ function typingPerformanceTracingMutationObserver(element, name, rate) {
|
|
|
232
243
|
childList: true,
|
|
233
244
|
subtree: true
|
|
234
245
|
});
|
|
235
|
-
|
|
246
|
+
if (typeof (element === null || element === void 0 ? void 0 : element.addEventListener) !== 'function' && fg('jfp-magma-ufo-event-listener-error')) {
|
|
247
|
+
return function () {
|
|
248
|
+
return mo.disconnect();
|
|
249
|
+
};
|
|
250
|
+
}
|
|
236
251
|
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
237
252
|
element.addEventListener('keypress', onKeyPressHandler);
|
|
238
253
|
return function () {
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
254
|
+
if (fg('jfp-magma-ufo-event-listener-error')) {
|
|
255
|
+
if (typeof (element === null || element === void 0 ? void 0 : element.removeEventListener) === 'function') {
|
|
256
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
257
|
+
element.removeEventListener('keypress', onKeyPressHandler);
|
|
258
|
+
}
|
|
259
|
+
mo.disconnect();
|
|
260
|
+
} else {
|
|
261
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
262
|
+
element.removeEventListener('keypress', onKeyPressHandler);
|
|
263
|
+
mo.disconnect();
|
|
264
|
+
}
|
|
242
265
|
};
|
|
243
266
|
}
|
|
244
267
|
var typingPerformanceTracingMethods = {
|
package/dist/esm/vc/index.js
CHANGED
|
@@ -7,7 +7,6 @@ var _process;
|
|
|
7
7
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
8
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
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
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
10
|
import { isVCRevisionEnabled } from '../config';
|
|
12
11
|
import { VCObserverNOOP } from './no-op-vc-observer';
|
|
13
12
|
import { VCObserver } from './vc-observer';
|
|
@@ -26,8 +25,7 @@ export var VCObserverWrapper = /*#__PURE__*/function () {
|
|
|
26
25
|
this.ssrPlaceholderHandler = new SSRPlaceholderHandlers({
|
|
27
26
|
enablePageLayoutPlaceholder: (_opts$ssrEnablePageLa = opts.ssrEnablePageLayoutPlaceholder) !== null && _opts$ssrEnablePageLa !== void 0 ? _opts$ssrEnablePageLa : false
|
|
28
27
|
});
|
|
29
|
-
|
|
30
|
-
if (isVCRevisionEnabled('fy25.03') || isVCRevisionEnabled(ttvcV4RevisionName)) {
|
|
28
|
+
if (isVCRevisionEnabled('fy25.03') || isVCRevisionEnabled('fy26.04')) {
|
|
31
29
|
var _opts$ssrEnablePageLa2;
|
|
32
30
|
this.newVCObserver = new VCObserverNew({
|
|
33
31
|
selectorConfig: opts.selectorConfig,
|
|
@@ -5,6 +5,8 @@ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
|
5
5
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
6
6
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
7
7
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
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; }
|
|
8
10
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
11
|
import { isVCRevisionEnabled } from '../../config';
|
|
10
12
|
import { getActiveInteraction } from '../../interaction-metrics';
|
|
@@ -15,6 +17,7 @@ import VCCalculator_FY25_03 from './metric-calculator/fy25_03';
|
|
|
15
17
|
import VCCalculator_FY26_04 from './metric-calculator/fy26_04';
|
|
16
18
|
import getViewportHeight from './metric-calculator/utils/get-viewport-height';
|
|
17
19
|
import getViewportWidth from './metric-calculator/utils/get-viewport-width';
|
|
20
|
+
import VCCalculator_Next from './metric-calculator/vc-next';
|
|
18
21
|
import RawDataHandler from './raw-data-handler';
|
|
19
22
|
import ViewportObserver from './viewport-observer';
|
|
20
23
|
import WindowEventObserver from './window-event-observer';
|
|
@@ -243,7 +246,7 @@ var VCObserverNew = /*#__PURE__*/function () {
|
|
|
243
246
|
key: "getVCResult",
|
|
244
247
|
value: function () {
|
|
245
248
|
var _getVCResult = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(param) {
|
|
246
|
-
var start, stop, interactionId, interactionType, interactionAbortReason, isPageVisible, include3p, includeSSRRatio, excludeSmartAnswersInSearch, includeRawData, rawDataStopTime, results, feVCCalculationStartTime, calculator_fy25_03, orderedEntries, fy25_03, calculator_fy26_04, fy26_04,
|
|
249
|
+
var start, stop, interactionId, interactionType, interactionAbortReason, isPageVisible, include3p, includeSSRRatio, excludeSmartAnswersInSearch, includeRawData, rawDataStopTime, results, feVCCalculationStartTime, calculator_fy25_03, orderedEntries, fy25_03, calculator_fy26_04, fy26_04, calculator_next, vcNext, _vcNext, feVCCalculationEndTime, rawVCCalculationStartTime, rawHandler, rawStopTime, rawOrderedEntries, raw;
|
|
247
250
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
248
251
|
while (1) switch (_context.prev = _context.next) {
|
|
249
252
|
case 0:
|
|
@@ -259,15 +262,11 @@ var VCObserverNew = /*#__PURE__*/function () {
|
|
|
259
262
|
start: start,
|
|
260
263
|
stop: stop
|
|
261
264
|
});
|
|
262
|
-
if (!fg('platform_ufo_vcnext_to_fy26_04_revision_update')) {
|
|
263
|
-
_context.next = 30;
|
|
264
|
-
break;
|
|
265
|
-
}
|
|
266
265
|
if (!isVCRevisionEnabled('fy25.03')) {
|
|
267
|
-
_context.next =
|
|
266
|
+
_context.next = 13;
|
|
268
267
|
break;
|
|
269
268
|
}
|
|
270
|
-
_context.next =
|
|
269
|
+
_context.next = 10;
|
|
271
270
|
return calculator_fy25_03.calculate({
|
|
272
271
|
orderedEntries: orderedEntries,
|
|
273
272
|
startTime: start,
|
|
@@ -281,13 +280,13 @@ var VCObserverNew = /*#__PURE__*/function () {
|
|
|
281
280
|
isPageVisible: isPageVisible,
|
|
282
281
|
interactionAbortReason: interactionAbortReason
|
|
283
282
|
});
|
|
284
|
-
case
|
|
283
|
+
case 10:
|
|
285
284
|
_context.t0 = _context.sent;
|
|
286
|
-
_context.next =
|
|
285
|
+
_context.next = 14;
|
|
287
286
|
break;
|
|
288
|
-
case
|
|
287
|
+
case 13:
|
|
289
288
|
_context.t0 = null;
|
|
290
|
-
case
|
|
289
|
+
case 14:
|
|
291
290
|
fy25_03 = _context.t0;
|
|
292
291
|
if (fy25_03) {
|
|
293
292
|
results.push(fy25_03);
|
|
@@ -299,11 +298,11 @@ var VCObserverNew = /*#__PURE__*/function () {
|
|
|
299
298
|
this.addSSR(param.ssr);
|
|
300
299
|
}
|
|
301
300
|
calculator_fy26_04 = new VCCalculator_FY26_04();
|
|
302
|
-
if (!
|
|
303
|
-
_context.next =
|
|
301
|
+
if (!isVCRevisionEnabled('fy26.04')) {
|
|
302
|
+
_context.next = 24;
|
|
304
303
|
break;
|
|
305
304
|
}
|
|
306
|
-
_context.next =
|
|
305
|
+
_context.next = 21;
|
|
307
306
|
return calculator_fy26_04.calculate({
|
|
308
307
|
orderedEntries: orderedEntries,
|
|
309
308
|
startTime: start,
|
|
@@ -317,53 +316,29 @@ var VCObserverNew = /*#__PURE__*/function () {
|
|
|
317
316
|
isPageVisible: isPageVisible,
|
|
318
317
|
interactionAbortReason: interactionAbortReason
|
|
319
318
|
});
|
|
320
|
-
case
|
|
319
|
+
case 21:
|
|
321
320
|
_context.t1 = _context.sent;
|
|
322
|
-
_context.next =
|
|
321
|
+
_context.next = 25;
|
|
323
322
|
break;
|
|
324
|
-
case
|
|
323
|
+
case 24:
|
|
325
324
|
_context.t1 = null;
|
|
326
|
-
case
|
|
325
|
+
case 25:
|
|
327
326
|
fy26_04 = _context.t1;
|
|
328
|
-
if (fy26_04) {
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
'metric:vc90': fy26_04['metric:vc90'],
|
|
332
|
-
clean: fy26_04['clean']
|
|
333
|
-
};
|
|
334
|
-
results.push(fy26_04);
|
|
335
|
-
results.push(vcNext);
|
|
327
|
+
if (!fy26_04) {
|
|
328
|
+
_context.next = 43;
|
|
329
|
+
break;
|
|
336
330
|
}
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
return calculator_fy25_03.calculate({
|
|
342
|
-
orderedEntries: orderedEntries,
|
|
343
|
-
startTime: start,
|
|
344
|
-
stopTime: stop,
|
|
345
|
-
interactionId: interactionId,
|
|
346
|
-
interactionType: interactionType,
|
|
347
|
-
isPostInteraction: this.isPostInteraction,
|
|
348
|
-
include3p: include3p,
|
|
349
|
-
excludeSmartAnswersInSearch: excludeSmartAnswersInSearch,
|
|
350
|
-
includeSSRRatio: includeSSRRatio,
|
|
351
|
-
isPageVisible: isPageVisible,
|
|
352
|
-
interactionAbortReason: interactionAbortReason
|
|
353
|
-
});
|
|
354
|
-
case 32:
|
|
355
|
-
_fy25_ = _context.sent;
|
|
356
|
-
if (_fy25_) {
|
|
357
|
-
results.push(_fy25_);
|
|
331
|
+
results.push(fy26_04);
|
|
332
|
+
if (!fg('platform_ufo_vcnext_for_ttvc_v5')) {
|
|
333
|
+
_context.next = 41;
|
|
334
|
+
break;
|
|
358
335
|
}
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
this.addSSR(param.ssr);
|
|
336
|
+
calculator_next = new VCCalculator_Next();
|
|
337
|
+
if (!isVCRevisionEnabled('next')) {
|
|
338
|
+
_context.next = 36;
|
|
339
|
+
break;
|
|
364
340
|
}
|
|
365
|
-
|
|
366
|
-
_context.next = 38;
|
|
341
|
+
_context.next = 33;
|
|
367
342
|
return calculator_next.calculate({
|
|
368
343
|
orderedEntries: orderedEntries,
|
|
369
344
|
startTime: start,
|
|
@@ -372,20 +347,33 @@ var VCObserverNew = /*#__PURE__*/function () {
|
|
|
372
347
|
interactionType: interactionType,
|
|
373
348
|
isPostInteraction: this.isPostInteraction,
|
|
374
349
|
include3p: include3p,
|
|
350
|
+
excludeSmartAnswersInSearch: excludeSmartAnswersInSearch,
|
|
375
351
|
includeSSRRatio: includeSSRRatio,
|
|
376
352
|
isPageVisible: isPageVisible,
|
|
377
353
|
interactionAbortReason: interactionAbortReason
|
|
378
354
|
});
|
|
379
|
-
case
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
355
|
+
case 33:
|
|
356
|
+
_context.t2 = _context.sent;
|
|
357
|
+
_context.next = 37;
|
|
358
|
+
break;
|
|
359
|
+
case 36:
|
|
360
|
+
_context.t2 = null;
|
|
361
|
+
case 37:
|
|
362
|
+
vcNext = _context.t2;
|
|
363
|
+
if (vcNext) {
|
|
364
|
+
results.push(vcNext);
|
|
384
365
|
}
|
|
385
|
-
|
|
366
|
+
_context.next = 43;
|
|
367
|
+
break;
|
|
368
|
+
case 41:
|
|
369
|
+
_vcNext = _objectSpread(_objectSpread({}, fy26_04), {}, {
|
|
370
|
+
revision: 'next'
|
|
371
|
+
});
|
|
372
|
+
results.push(_vcNext);
|
|
373
|
+
case 43:
|
|
386
374
|
feVCCalculationEndTime = performance.now();
|
|
387
375
|
if (!(includeRawData && fg('platform_ufo_enable_vc_raw_data'))) {
|
|
388
|
-
_context.next =
|
|
376
|
+
_context.next = 54;
|
|
389
377
|
break;
|
|
390
378
|
}
|
|
391
379
|
rawVCCalculationStartTime = performance.now();
|
|
@@ -395,14 +383,14 @@ var VCObserverNew = /*#__PURE__*/function () {
|
|
|
395
383
|
start: start,
|
|
396
384
|
stop: rawStopTime
|
|
397
385
|
}) : orderedEntries;
|
|
398
|
-
_context.next =
|
|
386
|
+
_context.next = 51;
|
|
399
387
|
return rawHandler.getRawData({
|
|
400
388
|
entries: rawOrderedEntries,
|
|
401
389
|
startTime: start,
|
|
402
390
|
stopTime: rawStopTime,
|
|
403
391
|
isPageVisible: isPageVisible
|
|
404
392
|
});
|
|
405
|
-
case
|
|
393
|
+
case 51:
|
|
406
394
|
raw = _context.sent;
|
|
407
395
|
results.forEach(function (result) {
|
|
408
396
|
delete result.vcDetails;
|
|
@@ -413,9 +401,9 @@ var VCObserverNew = /*#__PURE__*/function () {
|
|
|
413
401
|
raw.feVCTime = Number((feVCCalculationEndTime - feVCCalculationStartTime).toFixed(2));
|
|
414
402
|
results.push(raw);
|
|
415
403
|
}
|
|
416
|
-
case
|
|
404
|
+
case 54:
|
|
417
405
|
return _context.abrupt("return", results);
|
|
418
|
-
case
|
|
406
|
+
case 55:
|
|
419
407
|
case "end":
|
|
420
408
|
return _context.stop();
|
|
421
409
|
}
|
|
@@ -26,8 +26,9 @@ var fy26_04_excluded_attributes = ['data-is-hovered' // non-visual attribute
|
|
|
26
26
|
];
|
|
27
27
|
var VCCalculator_FY26_04 = /*#__PURE__*/function (_VCCalculator_FY25_) {
|
|
28
28
|
function VCCalculator_FY26_04() {
|
|
29
|
+
var revisionNo = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'fy26.04';
|
|
29
30
|
_classCallCheck(this, VCCalculator_FY26_04);
|
|
30
|
-
return _callSuper(this, VCCalculator_FY26_04, [
|
|
31
|
+
return _callSuper(this, VCCalculator_FY26_04, [revisionNo]);
|
|
31
32
|
}
|
|
32
33
|
_inherits(VCCalculator_FY26_04, _VCCalculator_FY25_);
|
|
33
34
|
return _createClass(VCCalculator_FY26_04, [{
|
|
@@ -0,0 +1,36 @@
|
|
|
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 _get from "@babel/runtime/helpers/get";
|
|
6
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
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
|
+
function _superPropGet(t, o, e, r) { var p = _get(_getPrototypeOf(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; }
|
|
10
|
+
import VCCalculator_FY26_04 from "../fy26_04";
|
|
11
|
+
var getConsideredEntryTypes = function getConsideredEntryTypes() {
|
|
12
|
+
var consideredEntryTypes = [];
|
|
13
|
+
return consideredEntryTypes;
|
|
14
|
+
};
|
|
15
|
+
var getExcludedEntryTypes = function getExcludedEntryTypes() {
|
|
16
|
+
var excludedEntryTypes = [];
|
|
17
|
+
return excludedEntryTypes;
|
|
18
|
+
};
|
|
19
|
+
var VCCalculator_Next = /*#__PURE__*/function (_VCCalculator_FY26_) {
|
|
20
|
+
function VCCalculator_Next() {
|
|
21
|
+
_classCallCheck(this, VCCalculator_Next);
|
|
22
|
+
return _callSuper(this, VCCalculator_Next, ['next']);
|
|
23
|
+
}
|
|
24
|
+
_inherits(VCCalculator_Next, _VCCalculator_FY26_);
|
|
25
|
+
return _createClass(VCCalculator_Next, [{
|
|
26
|
+
key: "isEntryIncluded",
|
|
27
|
+
value: function isEntryIncluded(entry, include3p, excludeSmartAnswersInSearch) {
|
|
28
|
+
var isEntryIncludedInV4 = _superPropGet(VCCalculator_Next, "isEntryIncluded", this, 3)([entry, include3p, excludeSmartAnswersInSearch]);
|
|
29
|
+
if (isEntryIncludedInV4 && !getExcludedEntryTypes().includes(entry.data.type)) {
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
return getConsideredEntryTypes().includes(entry.data.type);
|
|
33
|
+
}
|
|
34
|
+
}]);
|
|
35
|
+
}(VCCalculator_FY26_04);
|
|
36
|
+
export { VCCalculator_Next as default };
|
|
@@ -8,7 +8,7 @@ declare global {
|
|
|
8
8
|
}
|
|
9
9
|
export declare const DefaultInteractionID: InteractionIDContextType;
|
|
10
10
|
export declare const subscribeToInteractionIdChanges: (listener: InteractionIDListener) => (() => void);
|
|
11
|
-
declare const
|
|
12
|
-
export default
|
|
11
|
+
declare const interactionContext: Context<InteractionIDContextType>;
|
|
12
|
+
export default interactionContext;
|
|
13
13
|
export declare const getInteractionId: () => InteractionIDContextType;
|
|
14
14
|
export declare const useInteractionId: () => InteractionIDContextType;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { VCObserverEntry } from '../../types';
|
|
2
2
|
import VCCalculator_FY25_03 from '../fy25_03';
|
|
3
3
|
export default class VCCalculator_FY26_04 extends VCCalculator_FY25_03 {
|
|
4
|
-
constructor();
|
|
4
|
+
constructor(revisionNo?: string);
|
|
5
5
|
protected isEntryIncluded(entry: VCObserverEntry, include3p?: boolean, excludeSmartAnswersInSearch?: boolean): boolean;
|
|
6
6
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { VCObserverEntry } from "../../types";
|
|
2
|
+
import VCCalculator_FY26_04 from "../fy26_04";
|
|
3
|
+
export default class VCCalculator_Next extends VCCalculator_FY26_04 {
|
|
4
|
+
constructor();
|
|
5
|
+
protected isEntryIncluded(entry: VCObserverEntry, include3p?: boolean, excludeSmartAnswersInSearch?: boolean): boolean;
|
|
6
|
+
}
|
|
@@ -8,7 +8,7 @@ declare global {
|
|
|
8
8
|
}
|
|
9
9
|
export declare const DefaultInteractionID: InteractionIDContextType;
|
|
10
10
|
export declare const subscribeToInteractionIdChanges: (listener: InteractionIDListener) => (() => void);
|
|
11
|
-
declare const
|
|
12
|
-
export default
|
|
11
|
+
declare const interactionContext: Context<InteractionIDContextType>;
|
|
12
|
+
export default interactionContext;
|
|
13
13
|
export declare const getInteractionId: () => InteractionIDContextType;
|
|
14
14
|
export declare const useInteractionId: () => InteractionIDContextType;
|