pb-sxp-ui 1.0.31 → 1.0.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.js CHANGED
@@ -555,7 +555,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
555
555
  fromKName = 'imagePage';
556
556
  }
557
557
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
558
- eventInfo: Object.assign(Object.assign({}, eventInfo), { ctaId: (_h = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _h !== void 0 ? _h : '', ctaName: (_j = cta === null || cta === void 0 ? void 0 : cta.title) !== null && _j !== void 0 ? _j : '', contentTags: JSON.stringify(cta === null || cta === void 0 ? void 0 : cta.tags), position: position + '', relatedContentId: (_l = (_k = rec === null || rec === void 0 ? void 0 : rec.video) === null || _k === void 0 ? void 0 : _k.itemId) !== null && _l !== void 0 ? _l : '', relatedProductId: isProd ? product === null || product === void 0 ? void 0 : product.itemId : '', traceInfo: (_m = cta === null || cta === void 0 ? void 0 : cta.traceInfo) !== null && _m !== void 0 ? _m : '', fromKName })
558
+ eventInfo: Object.assign(Object.assign({}, eventInfo), { ctaId: (_h = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _h !== void 0 ? _h : '', ctaName: (_j = cta === null || cta === void 0 ? void 0 : cta.title) !== null && _j !== void 0 ? _j : '', contentTags: JSON.stringify(cta === null || cta === void 0 ? void 0 : cta.tags), position: position + '', contentId: (_l = (_k = rec === null || rec === void 0 ? void 0 : rec.video) === null || _k === void 0 ? void 0 : _k.itemId) !== null && _l !== void 0 ? _l : '', productId: isProd ? product === null || product === void 0 ? void 0 : product.itemId : '', traceInfo: (_m = cta === null || cta === void 0 ? void 0 : cta.traceInfo) !== null && _m !== void 0 ? _m : '', fromKName })
559
559
  });
560
560
  }, [bffEventReport, isFromHashtag]);
561
561
  useEffect(() => {
@@ -8128,8 +8128,8 @@ function useEventReport() {
8128
8128
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
8129
8129
  contentTags: (product === null || product === void 0 ? void 0 : product.tags) ? JSON.stringify(product === null || product === void 0 ? void 0 : product.tags) : '',
8130
8130
  position: position + '',
8131
- relatedContentId: (_m = (_l = data === null || data === void 0 ? void 0 : data.video) === null || _l === void 0 ? void 0 : _l.itemId) !== null && _m !== void 0 ? _m : '',
8132
- relatedCtatId: (_o = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _o !== void 0 ? _o : '',
8131
+ contentId: (_m = (_l = data === null || data === void 0 ? void 0 : data.video) === null || _l === void 0 ? void 0 : _l.itemId) !== null && _m !== void 0 ? _m : '',
8132
+ ctatId: (_o = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _o !== void 0 ? _o : '',
8133
8133
  traceInfo: (_p = product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _p !== void 0 ? _p : ''
8134
8134
  }
8135
8135
  });
@@ -8153,8 +8153,8 @@ function useEventReport() {
8153
8153
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
8154
8154
  contentTags: JSON.stringify(product === null || product === void 0 ? void 0 : product.tags),
8155
8155
  position: position + '',
8156
- relatedContentId: (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.itemId,
8157
- relatedCtatId: cta === null || cta === void 0 ? void 0 : cta.itemId,
8156
+ contentId: (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.itemId,
8157
+ ctatId: cta === null || cta === void 0 ? void 0 : cta.itemId,
8158
8158
  traceInfo: product === null || product === void 0 ? void 0 : product.traceInfo,
8159
8159
  timeOnSite: Math.floor((new Date() - viewTime) / 1000) + '',
8160
8160
  eventSubject: 'productView',
@@ -11772,7 +11772,7 @@ const WaterFall = (props) => {
11772
11772
  }
11773
11773
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
11774
11774
  eventInfo: {
11775
- relatedContentId: (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.itemId,
11775
+ contentId: (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.itemId,
11776
11776
  position: cacheActiveIndex + '',
11777
11777
  contentTags: JSON.stringify((_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.tags),
11778
11778
  traceInfo: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.traceInfo,
@@ -12543,7 +12543,7 @@ const Nudge = ({ nudge }) => {
12543
12543
  * @Author: binruan@chatlabs.com
12544
12544
  * @Date: 2024-01-15 19:03:09
12545
12545
  * @LastEditors: binruan@chatlabs.com
12546
- * @LastEditTime: 2024-04-18 19:27:03
12546
+ * @LastEditTime: 2024-04-23 15:48:32
12547
12547
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
12548
12548
  *
12549
12549
  */
@@ -12625,8 +12625,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12625
12625
  // sessionDuration: Math.floor(((new Date() as any) - curTime) / 1000) + '',
12626
12626
  // eventSubject: 'sessionCompleted',
12627
12627
  // eventDescription: 'Session completed',
12628
- // relatedContentId: item?.video?.itemId,
12629
- // relatedProductId: item?.product?.itemId,
12628
+ // contentId: item?.video?.itemId,
12629
+ // productId: item?.product?.itemId,
12630
12630
  // position: item?.position
12631
12631
  // }
12632
12632
  // });
@@ -12670,12 +12670,12 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12670
12670
  sessionDuration: Math.floor((new Date() - curTime.current) / 1000) + '',
12671
12671
  eventSubject: 'sessionCompleted',
12672
12672
  eventDescription: 'Session completed',
12673
- relatedContentId: (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.itemId,
12674
- relatedProductId: (_m = item === null || item === void 0 ? void 0 : item.product) === null || _m === void 0 ? void 0 : _m.itemId,
12673
+ contentId: (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.itemId,
12674
+ productId: (_m = item === null || item === void 0 ? void 0 : item.product) === null || _m === void 0 ? void 0 : _m.itemId,
12675
12675
  position: activeIndex + '',
12676
12676
  fromKName,
12677
12677
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
12678
- relatedCtatId: (_q = (_p = (_o = item.video) === null || _o === void 0 ? void 0 : _o.bindCta) === null || _p === void 0 ? void 0 : _p.itemId) !== null && _q !== void 0 ? _q : ''
12678
+ ctatId: (_q = (_p = (_o = item.video) === null || _o === void 0 ? void 0 : _o.bindCta) === null || _p === void 0 ? void 0 : _p.itemId) !== null && _q !== void 0 ? _q : ''
12679
12679
  }
12680
12680
  });
12681
12681
  }
@@ -12809,8 +12809,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12809
12809
  eventInfo: {
12810
12810
  eventSubject: 'scrollDown',
12811
12811
  eventDescription: 'User scroll down',
12812
- relatedContentId: (_b = (_a = item.video) === null || _a === void 0 ? void 0 : _a.itemId) !== null && _b !== void 0 ? _b : '',
12813
- relatedProductId: (_d = (_c = item.product) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '',
12812
+ contentId: (_b = (_a = item.video) === null || _a === void 0 ? void 0 : _a.itemId) !== null && _b !== void 0 ? _b : '',
12813
+ productId: (_d = (_c = item.product) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '',
12814
12814
  requestId: null
12815
12815
  }
12816
12816
  });
@@ -12822,8 +12822,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12822
12822
  eventInfo: {
12823
12823
  eventSubject: 'scrollUp',
12824
12824
  eventDescription: 'User scroll up',
12825
- relatedContentId: (_f = (_e = item.video) === null || _e === void 0 ? void 0 : _e.itemId) !== null && _f !== void 0 ? _f : '',
12826
- relatedProductId: (_h = (_g = item.product) === null || _g === void 0 ? void 0 : _g.itemId) !== null && _h !== void 0 ? _h : '',
12825
+ contentId: (_f = (_e = item.video) === null || _e === void 0 ? void 0 : _e.itemId) !== null && _f !== void 0 ? _f : '',
12826
+ productId: (_h = (_g = item.product) === null || _g === void 0 ? void 0 : _g.itemId) !== null && _h !== void 0 ? _h : '',
12827
12827
  requestId: null
12828
12828
  }
12829
12829
  });