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 CHANGED
@@ -1020,7 +1020,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1020
1020
  return jsonParams;
1021
1021
  }, [fakeUserId]);
1022
1022
  const bffFbReport = React.useCallback(({ eventName, product }) => {
1023
- var _a, _b, _c, _d;
1023
+ var _a, _b, _c, _d, _e, _f;
1024
1024
  if (!enableReportEvent || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview)) {
1025
1025
  return;
1026
1026
  }
@@ -1052,18 +1052,26 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1052
1052
  else if (eventName === 'PageView' && typeof (window === null || window === void 0 ? void 0 : window.gtag) === 'function') {
1053
1053
  window === null || window === void 0 ? void 0 : window.gtag('event', 'page_view');
1054
1054
  }
1055
- const converApiEventParamsJson = (_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.converApi) === null || _b === void 0 ? void 0 : _b[eventName];
1055
+ const tiktokPixelEventParamsJson = (_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.tiktokPixel) === null || _b === void 0 ? void 0 : _b[eventName];
1056
+ if ((tiktokPixelEventParamsJson === null || tiktokPixelEventParamsJson === void 0 ? void 0 : tiktokPixelEventParamsJson.event_name) && typeof (window === null || window === void 0 ? void 0 : window.ttq) === 'function') {
1057
+ window === null || window === void 0 ? void 0 : window.ttq.track(tiktokPixelEventParamsJson === null || tiktokPixelEventParamsJson === void 0 ? void 0 : tiktokPixelEventParamsJson.event_name, tiktokPixelEventParamsJson);
1058
+ }
1059
+ const snapchatPixelEventParamsJson = (_c = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.tiktokPixel) === null || _c === void 0 ? void 0 : _c[eventName];
1060
+ if ((snapchatPixelEventParamsJson === null || snapchatPixelEventParamsJson === void 0 ? void 0 : snapchatPixelEventParamsJson.event_name) && typeof (window === null || window === void 0 ? void 0 : window.snaptr) === 'function') {
1061
+ window === null || window === void 0 ? void 0 : window.snaptr('track', snapchatPixelEventParamsJson === null || snapchatPixelEventParamsJson === void 0 ? void 0 : snapchatPixelEventParamsJson.event_name, snapchatPixelEventParamsJson);
1062
+ }
1063
+ const converApiEventParamsJson = (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.converApi) === null || _d === void 0 ? void 0 : _d[eventName];
1056
1064
  if (enabledMetaConversionApi && converApiEventParamsJson) {
1057
1065
  const body = getEventParamsByJson(converApiEventParamsJson, product);
1058
1066
  const params = {};
1059
1067
  const queryString = location.search.slice(1);
1060
- (_c = splitUrlParams(queryString)) === null || _c === void 0 ? void 0 : _c.forEach((val) => {
1068
+ (_e = splitUrlParams(queryString)) === null || _e === void 0 ? void 0 : _e.forEach((val) => {
1061
1069
  const key = val.split('=')[0];
1062
1070
  const value = val.split('=')[1];
1063
1071
  params[key] = value;
1064
1072
  });
1065
1073
  const cl_source = params === null || params === void 0 ? void 0 : params.cl_source;
1066
- bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch(`v2/fb/${(_d = bffDataSource === null || bffDataSource === void 0 ? void 0 : bffDataSource.headers) === null || _d === void 0 ? void 0 : _d['x-app-id']}/${eventName}${cl_source ? `/${decodeURIComponent(cl_source)}` : ''}`, {
1074
+ 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)}` : ''}`, {
1067
1075
  method: 'POST',
1068
1076
  body,
1069
1077
  type: 'beacon'
@@ -18053,7 +18061,7 @@ const VideoWidget$4 = React.forwardRef(({ rec, index, height, data, muted, activ
18053
18061
  if (!videoPoster || isLoadFinish) {
18054
18062
  return null;
18055
18063
  }
18056
- return (React.createElement("img", { style: {
18064
+ return (React.createElement(FormatImage$1, { style: {
18057
18065
  position: 'absolute',
18058
18066
  left: 0,
18059
18067
  top: 0,
@@ -18065,7 +18073,7 @@ const VideoWidget$4 = React.forwardRef(({ rec, index, height, data, muted, activ
18065
18073
  const renderLoading = React.useMemo(() => {
18066
18074
  if (!waiting || !isLoadFinish)
18067
18075
  return;
18068
- return (React.createElement(FormatImage$1, { style: {
18076
+ return (React.createElement("img", { style: {
18069
18077
  position: 'absolute',
18070
18078
  top: '50%',
18071
18079
  left: 0,