pb-sxp-ui 1.16.11 → 1.16.13

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/pb-ui.js CHANGED
@@ -1311,7 +1311,8 @@
1311
1311
  refreshFeSession,
1312
1312
  getAccount,
1313
1313
  accountSonsent,
1314
- isDiyH5
1314
+ isDiyH5,
1315
+ firstRtcList
1315
1316
  } }, isShowConsent ? (React.createElement(Consent$4, Object.assign({}, (_e = (_d = (_c = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.consent) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.item) === null || _e === void 0 ? void 0 : _e.props))) : (render({
1316
1317
  rtcList,
1317
1318
  mutateLike: bffMutateLike,
@@ -10389,7 +10390,7 @@
10389
10390
  const CommodityDetail$1 = (_a) => {
10390
10391
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
10391
10392
  var { content, style, bgImg, onClick, schema, isDefault, bottom_image, tipText, isPost, viewTime, rec, swiper, commodityStyles, buttonStyle, index, commodityGroup, popupBg, iframeIcon, commodityImgRatio, isTel, iframeBgColor, isActive = true } = _a, props = __rest(_a, ["content", "style", "bgImg", "onClick", "schema", "isDefault", "bottom_image", "tipText", "isPost", "viewTime", "rec", "swiper", "commodityStyles", "buttonStyle", "index", "commodityGroup", "popupBg", "iframeIcon", "commodityImgRatio", "isTel", "iframeBgColor", "isActive"]);
10392
- const { sxpParameter, popupDetailData, isPreview, bffFbReport, popupCurTimeRef, checkCommodityIndexRef, globalConfig } = useSxpDataSource();
10393
+ const { sxpParameter, popupDetailData, isPreview, bffFbReport, popupCurTimeRef, checkCommodityIndexRef, globalConfig, ctaEvent } = useSxpDataSource();
10393
10394
  const { jumpToWeb, productView } = useEventReport();
10394
10395
  const curTimeRef = React.useRef(null);
10395
10396
  const [showModal, setShowModal] = React.useState(false);
@@ -10415,6 +10416,12 @@
10415
10416
  if (!isPost) {
10416
10417
  productView(data, product, cta, viewTime || curTimeRef.current, position);
10417
10418
  }
10419
+ else {
10420
+ ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
10421
+ eventSubject: 'clickCta',
10422
+ eventDescription: 'User clicked the CTA'
10423
+ }, data, product, position);
10424
+ }
10418
10425
  window.location.href = window.getJointUtmLink(product.link);
10419
10426
  }
10420
10427
  };
@@ -11317,7 +11324,7 @@
11317
11324
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4;
11318
11325
  var { style, isDefault, rec, viewTime, isPost, bottom_image, tipText, swiper, commodityStyles, buttonStyle, index, commodityGroup, popupBg, iframeIcon, commodityImgRatio, isTel, iframeBgColor, isActive = true } = _a, props = __rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "tipText", "swiper", "commodityStyles", "buttonStyle", "index", "commodityGroup", "popupBg", "iframeIcon", "commodityImgRatio", "isTel", "iframeBgColor", "isActive"]);
11319
11326
  React.useState(true);
11320
- const { sxpParameter, popupCurTimeRef, popupDetailData, isPreview, bffFbReport, checkCommodityIndexRef, globalConfig } = useSxpDataSource();
11327
+ const { sxpParameter, popupCurTimeRef, popupDetailData, isPreview, bffFbReport, checkCommodityIndexRef, globalConfig, ctaEvent } = useSxpDataSource();
11321
11328
  const { jumpToWeb, productView } = useEventReport();
11322
11329
  React.useState(false);
11323
11330
  React.useState(false);
@@ -11346,6 +11353,12 @@
11346
11353
  if (!isPost) {
11347
11354
  productView(data, product, cta, viewTime || curTimeRef.current, position);
11348
11355
  }
11356
+ else {
11357
+ ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
11358
+ eventSubject: 'clickCta',
11359
+ eventDescription: 'User clicked the CTA'
11360
+ }, data, product, position);
11361
+ }
11349
11362
  window.location.href = window.getJointUtmLink(product.link);
11350
11363
  }
11351
11364
  };
@@ -17877,7 +17890,7 @@ Made in Italy` })));
17877
17890
  const VideoWidget$4 = React.forwardRef(({ rec, index, height, data, muted, activeIndex, videoPostConfig, videoPlayIcon, loopPlay, swiperRef }, ref) => {
17878
17891
  var _a, _b;
17879
17892
  const [isPauseVideo, setIsPauseVideo] = React.useState(false);
17880
- const { bffEventReport, sxpParameter, waterFallData, openHashtag, bffFbReport, isDiyH5 } = useSxpDataSource();
17893
+ const { bffEventReport, sxpParameter, firstRtcList, openHashtag, bffFbReport, isDiyH5 } = useSxpDataSource();
17881
17894
  const videoStartTime = React.useRef(0);
17882
17895
  const [isLoadFinish, setIsLoadFinish] = React.useState(false);
17883
17896
  const { isActive } = useSwiperSlide();
@@ -17951,8 +17964,7 @@ Made in Italy` })));
17951
17964
  (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.pause();
17952
17965
  if (!loopPlayRef.current)
17953
17966
  return;
17954
- if (index === (data === null || data === void 0 ? void 0 : data.length) - 1) ;
17955
- else {
17967
+ if (firstRtcList && index < (firstRtcList === null || firstRtcList === void 0 ? void 0 : firstRtcList.length) - 1) {
17956
17968
  const i = (_c = (_b = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _b === void 0 ? void 0 : _b.swiper) === null || _c === void 0 ? void 0 : _c.activeIndex;
17957
17969
  (_e = (_d = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _d === void 0 ? void 0 : _d.swiper) === null || _e === void 0 ? void 0 : _e.slideTo(i + 1);
17958
17970
  }
@@ -18344,7 +18356,7 @@ Made in Italy` })));
18344
18356
  const PictureGroup$4 = React.forwardRef(({ imgUrls, data, height, rec, index, onViewImageEndEvent, onViewImageStartEvent, imgUrlsPostConfig, swiperRef }, ref) => {
18345
18357
  var _a, _b;
18346
18358
  const { isActive } = useSwiperSlide();
18347
- const { sxpParameter, openHashtag, isDiyH5 } = useSxpDataSource();
18359
+ const { firstRtcList, openHashtag, isDiyH5 } = useSxpDataSource();
18348
18360
  const [isLoad, setIsLoad] = React.useState(false);
18349
18361
  const [imgInfo, setImgInfo] = React.useState();
18350
18362
  const [swiperActiveIndex, setSwiperActiveIndex] = React.useState(0);
@@ -18366,8 +18378,7 @@ Made in Italy` })));
18366
18378
  var _a, _b, _c, _d;
18367
18379
  if (!loopPlayRef.current)
18368
18380
  return;
18369
- if (index === (data === null || data === void 0 ? void 0 : data.length) - 1) ;
18370
- else {
18381
+ if (firstRtcList && index < (firstRtcList === null || firstRtcList === void 0 ? void 0 : firstRtcList.length) - 1) {
18371
18382
  const i = (_b = (_a = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper) === null || _b === void 0 ? void 0 : _b.activeIndex;
18372
18383
  (_d = (_c = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _c === void 0 ? void 0 : _c.swiper) === null || _d === void 0 ? void 0 : _d.slideTo(i + 1);
18373
18384
  }
@@ -18377,7 +18388,7 @@ Made in Italy` })));
18377
18388
  if (timerId)
18378
18389
  clearTimeout(timerId);
18379
18390
  };
18380
- }, [isLoad, isActive, isDiyH5, index, swiperRef]);
18391
+ }, [isLoad, isActive, isDiyH5, index, swiperRef, firstRtcList]);
18381
18392
  React.useEffect(() => {
18382
18393
  if (isLoad && isActive) {
18383
18394
  (imgsSwiperRef === null || imgsSwiperRef === void 0 ? void 0 : imgsSwiperRef.current) && imgsSwiperRef.current.swiper.autoplay.start();