pb-sxp-ui 1.15.28 → 1.15.30
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 +14 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +14 -6
- 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 +14 -6
- 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/components/SxpPageRender/VideoWidget/index.js +2 -2
- package/es/core/components/SxpPageRender/index.d.ts +2 -0
- package/es/core/context/SxpDataSourceProvider.js +12 -4
- package/lib/core/components/SxpPageRender/VideoWidget/index.js +2 -2
- package/lib/core/components/SxpPageRender/index.d.ts +2 -0
- package/lib/core/context/SxpDataSourceProvider.js +12 -4
- package/package.json +1 -1
@@ -327,7 +327,7 @@ const VideoWidget = forwardRef(({ rec, index, height, data, muted, activeIndex,
|
|
327
327
|
if (!videoPoster || isLoadFinish) {
|
328
328
|
return null;
|
329
329
|
}
|
330
|
-
return (React.createElement(
|
330
|
+
return (React.createElement(FormatImage, { style: {
|
331
331
|
position: 'absolute',
|
332
332
|
left: 0,
|
333
333
|
top: 0,
|
@@ -339,7 +339,7 @@ const VideoWidget = forwardRef(({ rec, index, height, data, muted, activeIndex,
|
|
339
339
|
const renderLoading = useMemo(() => {
|
340
340
|
if (!waiting || !isLoadFinish)
|
341
341
|
return;
|
342
|
-
return (React.createElement(
|
342
|
+
return (React.createElement("img", { style: {
|
343
343
|
position: 'absolute',
|
344
344
|
top: '50%',
|
345
345
|
left: 0,
|
@@ -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;
|
383
|
+
var _a, _b, _c, _d, _e, _f;
|
384
384
|
if (!enableReportEvent || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview)) {
|
385
385
|
return;
|
386
386
|
}
|
@@ -412,18 +412,26 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
412
412
|
else if (eventName === 'PageView' && typeof (window === null || window === void 0 ? void 0 : window.gtag) === 'function') {
|
413
413
|
window === null || window === void 0 ? void 0 : window.gtag('event', 'page_view');
|
414
414
|
}
|
415
|
-
const
|
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) && typeof (window === null || window === void 0 ? void 0 : window.ttq) === 'function') {
|
417
|
+
window === null || window === void 0 ? void 0 : window.ttq.track(tiktokPixelEventParamsJson === null || tiktokPixelEventParamsJson === void 0 ? void 0 : tiktokPixelEventParamsJson.event_name, tiktokPixelEventParamsJson);
|
418
|
+
}
|
419
|
+
const snapchatPixelEventParamsJson = (_c = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.tiktokPixel) === null || _c === void 0 ? void 0 : _c[eventName];
|
420
|
+
if ((snapchatPixelEventParamsJson === null || snapchatPixelEventParamsJson === void 0 ? void 0 : snapchatPixelEventParamsJson.event_name) && typeof (window === null || window === void 0 ? void 0 : window.snaptr) === 'function') {
|
421
|
+
window === null || window === void 0 ? void 0 : window.snaptr('track', snapchatPixelEventParamsJson === null || snapchatPixelEventParamsJson === void 0 ? void 0 : snapchatPixelEventParamsJson.event_name, snapchatPixelEventParamsJson);
|
422
|
+
}
|
423
|
+
const converApiEventParamsJson = (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.converApi) === null || _d === void 0 ? void 0 : _d[eventName];
|
416
424
|
if (enabledMetaConversionApi && converApiEventParamsJson) {
|
417
425
|
const body = getEventParamsByJson(converApiEventParamsJson, product);
|
418
426
|
const params = {};
|
419
427
|
const queryString = location.search.slice(1);
|
420
|
-
(
|
428
|
+
(_e = splitUrlParams(queryString)) === null || _e === void 0 ? void 0 : _e.forEach((val) => {
|
421
429
|
const key = val.split('=')[0];
|
422
430
|
const value = val.split('=')[1];
|
423
431
|
params[key] = value;
|
424
432
|
});
|
425
433
|
const cl_source = params === null || params === void 0 ? void 0 : params.cl_source;
|
426
|
-
bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch(`v2/fb/${(
|
434
|
+
bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch(`v2/fb/${(_f = bffDataSource === null || bffDataSource === void 0 ? void 0 : bffDataSource.headers) === null || _f === void 0 ? void 0 : _f['x-app-id']}/${eventName}${cl_source ? `/${decodeURIComponent(cl_source)}` : ''}`, {
|
427
435
|
method: 'POST',
|
428
436
|
body,
|
429
437
|
type: 'beacon'
|
@@ -329,7 +329,7 @@ const VideoWidget = (0, react_1.forwardRef)(({ rec, index, height, data, muted,
|
|
329
329
|
if (!videoPoster || isLoadFinish) {
|
330
330
|
return null;
|
331
331
|
}
|
332
|
-
return (react_1.default.createElement(
|
332
|
+
return (react_1.default.createElement(FormatImage_1.default, { style: {
|
333
333
|
position: 'absolute',
|
334
334
|
left: 0,
|
335
335
|
top: 0,
|
@@ -341,7 +341,7 @@ const VideoWidget = (0, react_1.forwardRef)(({ rec, index, height, data, muted,
|
|
341
341
|
const renderLoading = (0, react_1.useMemo)(() => {
|
342
342
|
if (!waiting || !isLoadFinish)
|
343
343
|
return;
|
344
|
-
return (react_1.default.createElement(
|
344
|
+
return (react_1.default.createElement("img", { style: {
|
345
345
|
position: 'absolute',
|
346
346
|
top: '50%',
|
347
347
|
left: 0,
|
@@ -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;
|
386
|
+
var _a, _b, _c, _d, _e, _f;
|
387
387
|
if (!enableReportEvent || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview)) {
|
388
388
|
return;
|
389
389
|
}
|
@@ -415,18 +415,26 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
415
415
|
else if (eventName === 'PageView' && typeof (window === null || window === void 0 ? void 0 : window.gtag) === 'function') {
|
416
416
|
window === null || window === void 0 ? void 0 : window.gtag('event', 'page_view');
|
417
417
|
}
|
418
|
-
const
|
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) && typeof (window === null || window === void 0 ? void 0 : window.ttq) === 'function') {
|
420
|
+
window === null || window === void 0 ? void 0 : window.ttq.track(tiktokPixelEventParamsJson === null || tiktokPixelEventParamsJson === void 0 ? void 0 : tiktokPixelEventParamsJson.event_name, tiktokPixelEventParamsJson);
|
421
|
+
}
|
422
|
+
const snapchatPixelEventParamsJson = (_c = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.tiktokPixel) === null || _c === void 0 ? void 0 : _c[eventName];
|
423
|
+
if ((snapchatPixelEventParamsJson === null || snapchatPixelEventParamsJson === void 0 ? void 0 : snapchatPixelEventParamsJson.event_name) && typeof (window === null || window === void 0 ? void 0 : window.snaptr) === 'function') {
|
424
|
+
window === null || window === void 0 ? void 0 : window.snaptr('track', snapchatPixelEventParamsJson === null || snapchatPixelEventParamsJson === void 0 ? void 0 : snapchatPixelEventParamsJson.event_name, snapchatPixelEventParamsJson);
|
425
|
+
}
|
426
|
+
const converApiEventParamsJson = (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.converApi) === null || _d === void 0 ? void 0 : _d[eventName];
|
419
427
|
if (enabledMetaConversionApi && converApiEventParamsJson) {
|
420
428
|
const body = getEventParamsByJson(converApiEventParamsJson, product);
|
421
429
|
const params = {};
|
422
430
|
const queryString = location.search.slice(1);
|
423
|
-
(
|
431
|
+
(_e = (0, tool_1.splitUrlParams)(queryString)) === null || _e === void 0 ? void 0 : _e.forEach((val) => {
|
424
432
|
const key = val.split('=')[0];
|
425
433
|
const value = val.split('=')[1];
|
426
434
|
params[key] = value;
|
427
435
|
});
|
428
436
|
const cl_source = params === null || params === void 0 ? void 0 : params.cl_source;
|
429
|
-
bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch(`v2/fb/${(
|
437
|
+
bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch(`v2/fb/${(_f = bffDataSource === null || bffDataSource === void 0 ? void 0 : bffDataSource.headers) === null || _f === void 0 ? void 0 : _f['x-app-id']}/${eventName}${cl_source ? `/${decodeURIComponent(cl_source)}` : ''}`, {
|
430
438
|
method: 'POST',
|
431
439
|
body,
|
432
440
|
type: 'beacon'
|