pb-sxp-ui 1.15.31 → 1.15.32
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/dist/index.cjs +9 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -7
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +4 -4
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +4 -4
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +9 -7
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +4 -4
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/context/SxpDataSourceProvider.js +9 -7
- package/lib/core/context/SxpDataSourceProvider.js +9 -7
- package/package.json +1 -1
@@ -380,7 +380,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
380
380
|
return jsonParams;
|
381
381
|
}, [fakeUserId]);
|
382
382
|
const bffFbReport = useCallback(({ eventName, product }) => {
|
383
|
-
var _a, _b, _c, _d, _e, _f;
|
383
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
384
384
|
if (!enableReportEvent || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview)) {
|
385
385
|
return;
|
386
386
|
}
|
@@ -413,25 +413,27 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
413
413
|
window === null || window === void 0 ? void 0 : window.gtag('event', 'page_view');
|
414
414
|
}
|
415
415
|
const tiktokPixelEventParamsJson = (_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.tiktokPixel) === null || _b === void 0 ? void 0 : _b[eventName];
|
416
|
-
if ((tiktokPixelEventParamsJson === null || tiktokPixelEventParamsJson === void 0 ? void 0 : tiktokPixelEventParamsJson.event_name) &&
|
417
|
-
window === null || window === void 0 ? void 0 : window.ttq
|
416
|
+
if ((tiktokPixelEventParamsJson === null || tiktokPixelEventParamsJson === void 0 ? void 0 : tiktokPixelEventParamsJson.event_name) &&
|
417
|
+
typeof (window === null || window === void 0 ? void 0 : window.ttq) === 'object' &&
|
418
|
+
typeof ((_c = window === null || window === void 0 ? void 0 : window.ttq) === null || _c === void 0 ? void 0 : _c.track) === 'function') {
|
419
|
+
(_d = window === null || window === void 0 ? void 0 : window.ttq) === null || _d === void 0 ? void 0 : _d.track(tiktokPixelEventParamsJson === null || tiktokPixelEventParamsJson === void 0 ? void 0 : tiktokPixelEventParamsJson.event_name, tiktokPixelEventParamsJson);
|
418
420
|
}
|
419
|
-
const snapchatPixelEventParamsJson = (
|
421
|
+
const snapchatPixelEventParamsJson = (_e = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.snapchatPixel) === null || _e === void 0 ? void 0 : _e[eventName];
|
420
422
|
if ((snapchatPixelEventParamsJson === null || snapchatPixelEventParamsJson === void 0 ? void 0 : snapchatPixelEventParamsJson.event_name) && typeof (window === null || window === void 0 ? void 0 : window.snaptr) === 'function') {
|
421
423
|
window === null || window === void 0 ? void 0 : window.snaptr('track', snapchatPixelEventParamsJson === null || snapchatPixelEventParamsJson === void 0 ? void 0 : snapchatPixelEventParamsJson.event_name, snapchatPixelEventParamsJson);
|
422
424
|
}
|
423
|
-
const converApiEventParamsJson = (
|
425
|
+
const converApiEventParamsJson = (_f = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.converApi) === null || _f === void 0 ? void 0 : _f[eventName];
|
424
426
|
if (enabledMetaConversionApi && converApiEventParamsJson) {
|
425
427
|
const body = getEventParamsByJson(converApiEventParamsJson, product);
|
426
428
|
const params = {};
|
427
429
|
const queryString = location.search.slice(1);
|
428
|
-
(
|
430
|
+
(_g = splitUrlParams(queryString)) === null || _g === void 0 ? void 0 : _g.forEach((val) => {
|
429
431
|
const key = val.split('=')[0];
|
430
432
|
const value = val.split('=')[1];
|
431
433
|
params[key] = value;
|
432
434
|
});
|
433
435
|
const cl_source = params === null || params === void 0 ? void 0 : params.cl_source;
|
434
|
-
bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch(`v2/fb/${(
|
436
|
+
bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch(`v2/fb/${(_h = bffDataSource === null || bffDataSource === void 0 ? void 0 : bffDataSource.headers) === null || _h === void 0 ? void 0 : _h['x-app-id']}/${eventName}${cl_source ? `/${decodeURIComponent(cl_source)}` : ''}`, {
|
435
437
|
method: 'POST',
|
436
438
|
body,
|
437
439
|
type: 'beacon'
|
@@ -383,7 +383,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
383
383
|
return jsonParams;
|
384
384
|
}, [fakeUserId]);
|
385
385
|
const bffFbReport = (0, react_1.useCallback)(({ eventName, product }) => {
|
386
|
-
var _a, _b, _c, _d, _e, _f;
|
386
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
387
387
|
if (!enableReportEvent || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview)) {
|
388
388
|
return;
|
389
389
|
}
|
@@ -416,25 +416,27 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
416
416
|
window === null || window === void 0 ? void 0 : window.gtag('event', 'page_view');
|
417
417
|
}
|
418
418
|
const tiktokPixelEventParamsJson = (_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.tiktokPixel) === null || _b === void 0 ? void 0 : _b[eventName];
|
419
|
-
if ((tiktokPixelEventParamsJson === null || tiktokPixelEventParamsJson === void 0 ? void 0 : tiktokPixelEventParamsJson.event_name) &&
|
420
|
-
window === null || window === void 0 ? void 0 : window.ttq
|
419
|
+
if ((tiktokPixelEventParamsJson === null || tiktokPixelEventParamsJson === void 0 ? void 0 : tiktokPixelEventParamsJson.event_name) &&
|
420
|
+
typeof (window === null || window === void 0 ? void 0 : window.ttq) === 'object' &&
|
421
|
+
typeof ((_c = window === null || window === void 0 ? void 0 : window.ttq) === null || _c === void 0 ? void 0 : _c.track) === 'function') {
|
422
|
+
(_d = window === null || window === void 0 ? void 0 : window.ttq) === null || _d === void 0 ? void 0 : _d.track(tiktokPixelEventParamsJson === null || tiktokPixelEventParamsJson === void 0 ? void 0 : tiktokPixelEventParamsJson.event_name, tiktokPixelEventParamsJson);
|
421
423
|
}
|
422
|
-
const snapchatPixelEventParamsJson = (
|
424
|
+
const snapchatPixelEventParamsJson = (_e = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.snapchatPixel) === null || _e === void 0 ? void 0 : _e[eventName];
|
423
425
|
if ((snapchatPixelEventParamsJson === null || snapchatPixelEventParamsJson === void 0 ? void 0 : snapchatPixelEventParamsJson.event_name) && typeof (window === null || window === void 0 ? void 0 : window.snaptr) === 'function') {
|
424
426
|
window === null || window === void 0 ? void 0 : window.snaptr('track', snapchatPixelEventParamsJson === null || snapchatPixelEventParamsJson === void 0 ? void 0 : snapchatPixelEventParamsJson.event_name, snapchatPixelEventParamsJson);
|
425
427
|
}
|
426
|
-
const converApiEventParamsJson = (
|
428
|
+
const converApiEventParamsJson = (_f = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.converApi) === null || _f === void 0 ? void 0 : _f[eventName];
|
427
429
|
if (enabledMetaConversionApi && converApiEventParamsJson) {
|
428
430
|
const body = getEventParamsByJson(converApiEventParamsJson, product);
|
429
431
|
const params = {};
|
430
432
|
const queryString = location.search.slice(1);
|
431
|
-
(
|
433
|
+
(_g = (0, tool_1.splitUrlParams)(queryString)) === null || _g === void 0 ? void 0 : _g.forEach((val) => {
|
432
434
|
const key = val.split('=')[0];
|
433
435
|
const value = val.split('=')[1];
|
434
436
|
params[key] = value;
|
435
437
|
});
|
436
438
|
const cl_source = params === null || params === void 0 ? void 0 : params.cl_source;
|
437
|
-
bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch(`v2/fb/${(
|
439
|
+
bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch(`v2/fb/${(_h = bffDataSource === null || bffDataSource === void 0 ? void 0 : bffDataSource.headers) === null || _h === void 0 ? void 0 : _h['x-app-id']}/${eventName}${cl_source ? `/${decodeURIComponent(cl_source)}` : ''}`, {
|
438
440
|
method: 'POST',
|
439
441
|
body,
|
440
442
|
type: 'beacon'
|