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.cjs CHANGED
@@ -578,7 +578,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
578
578
  fromKName = 'imagePage';
579
579
  }
580
580
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
581
- 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 })
581
+ 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 })
582
582
  });
583
583
  }, [bffEventReport, isFromHashtag]);
584
584
  React.useEffect(() => {
@@ -8151,8 +8151,8 @@ function useEventReport() {
8151
8151
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
8152
8152
  contentTags: (product === null || product === void 0 ? void 0 : product.tags) ? JSON.stringify(product === null || product === void 0 ? void 0 : product.tags) : '',
8153
8153
  position: position + '',
8154
- 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 : '',
8155
- relatedCtatId: (_o = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _o !== void 0 ? _o : '',
8154
+ 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 : '',
8155
+ ctatId: (_o = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _o !== void 0 ? _o : '',
8156
8156
  traceInfo: (_p = product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _p !== void 0 ? _p : ''
8157
8157
  }
8158
8158
  });
@@ -8176,8 +8176,8 @@ function useEventReport() {
8176
8176
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
8177
8177
  contentTags: JSON.stringify(product === null || product === void 0 ? void 0 : product.tags),
8178
8178
  position: position + '',
8179
- relatedContentId: (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.itemId,
8180
- relatedCtatId: cta === null || cta === void 0 ? void 0 : cta.itemId,
8179
+ contentId: (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.itemId,
8180
+ ctatId: cta === null || cta === void 0 ? void 0 : cta.itemId,
8181
8181
  traceInfo: product === null || product === void 0 ? void 0 : product.traceInfo,
8182
8182
  timeOnSite: Math.floor((new Date() - viewTime) / 1000) + '',
8183
8183
  eventSubject: 'productView',
@@ -11795,7 +11795,7 @@ const WaterFall = (props) => {
11795
11795
  }
11796
11796
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
11797
11797
  eventInfo: {
11798
- relatedContentId: (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.itemId,
11798
+ contentId: (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.itemId,
11799
11799
  position: cacheActiveIndex + '',
11800
11800
  contentTags: JSON.stringify((_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.tags),
11801
11801
  traceInfo: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.traceInfo,
@@ -12566,7 +12566,7 @@ const Nudge = ({ nudge }) => {
12566
12566
  * @Author: binruan@chatlabs.com
12567
12567
  * @Date: 2024-01-15 19:03:09
12568
12568
  * @LastEditors: binruan@chatlabs.com
12569
- * @LastEditTime: 2024-04-18 19:27:03
12569
+ * @LastEditTime: 2024-04-23 15:48:32
12570
12570
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
12571
12571
  *
12572
12572
  */
@@ -12648,8 +12648,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12648
12648
  // sessionDuration: Math.floor(((new Date() as any) - curTime) / 1000) + '',
12649
12649
  // eventSubject: 'sessionCompleted',
12650
12650
  // eventDescription: 'Session completed',
12651
- // relatedContentId: item?.video?.itemId,
12652
- // relatedProductId: item?.product?.itemId,
12651
+ // contentId: item?.video?.itemId,
12652
+ // productId: item?.product?.itemId,
12653
12653
  // position: item?.position
12654
12654
  // }
12655
12655
  // });
@@ -12693,12 +12693,12 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12693
12693
  sessionDuration: Math.floor((new Date() - curTime.current) / 1000) + '',
12694
12694
  eventSubject: 'sessionCompleted',
12695
12695
  eventDescription: 'Session completed',
12696
- relatedContentId: (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.itemId,
12697
- relatedProductId: (_m = item === null || item === void 0 ? void 0 : item.product) === null || _m === void 0 ? void 0 : _m.itemId,
12696
+ contentId: (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.itemId,
12697
+ productId: (_m = item === null || item === void 0 ? void 0 : item.product) === null || _m === void 0 ? void 0 : _m.itemId,
12698
12698
  position: activeIndex + '',
12699
12699
  fromKName,
12700
12700
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
12701
- 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 : ''
12701
+ 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 : ''
12702
12702
  }
12703
12703
  });
12704
12704
  }
@@ -12832,8 +12832,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12832
12832
  eventInfo: {
12833
12833
  eventSubject: 'scrollDown',
12834
12834
  eventDescription: 'User scroll down',
12835
- relatedContentId: (_b = (_a = item.video) === null || _a === void 0 ? void 0 : _a.itemId) !== null && _b !== void 0 ? _b : '',
12836
- relatedProductId: (_d = (_c = item.product) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '',
12835
+ contentId: (_b = (_a = item.video) === null || _a === void 0 ? void 0 : _a.itemId) !== null && _b !== void 0 ? _b : '',
12836
+ productId: (_d = (_c = item.product) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '',
12837
12837
  requestId: null
12838
12838
  }
12839
12839
  });
@@ -12845,8 +12845,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12845
12845
  eventInfo: {
12846
12846
  eventSubject: 'scrollUp',
12847
12847
  eventDescription: 'User scroll up',
12848
- relatedContentId: (_f = (_e = item.video) === null || _e === void 0 ? void 0 : _e.itemId) !== null && _f !== void 0 ? _f : '',
12849
- relatedProductId: (_h = (_g = item.product) === null || _g === void 0 ? void 0 : _g.itemId) !== null && _h !== void 0 ? _h : '',
12848
+ contentId: (_f = (_e = item.video) === null || _e === void 0 ? void 0 : _e.itemId) !== null && _f !== void 0 ? _f : '',
12849
+ productId: (_h = (_g = item.product) === null || _g === void 0 ? void 0 : _g.itemId) !== null && _h !== void 0 ? _h : '',
12850
12850
  requestId: null
12851
12851
  }
12852
12852
  });