pb-sxp-ui 1.2.5 → 1.2.7

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.
Files changed (42) hide show
  1. package/dist/index.cjs +102 -58
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.css +10 -4
  4. package/dist/index.js +102 -58
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.min.cjs +3 -3
  7. package/dist/index.min.cjs.map +1 -1
  8. package/dist/index.min.js +3 -3
  9. package/dist/index.min.js.map +1 -1
  10. package/dist/pb-ui.js +102 -58
  11. package/dist/pb-ui.js.map +1 -1
  12. package/dist/pb-ui.min.js +3 -3
  13. package/dist/pb-ui.min.js.map +1 -1
  14. package/es/core/components/SxpPageRender/FormatImage.js +7 -3
  15. package/es/core/components/SxpPageRender/Popup/index.js +8 -6
  16. package/es/core/components/SxpPageRender/index.js +5 -5
  17. package/es/core/context/SxpDataSourceProvider.js +26 -16
  18. package/es/core/hooks/useEventReport.js +4 -4
  19. package/es/materials/sxp/popup/CommodityDetail/index.d.ts +1 -0
  20. package/es/materials/sxp/popup/CommodityDetail/index.js +11 -6
  21. package/es/materials/sxp/popup/CommodityDetail/material.js +6 -0
  22. package/es/materials/sxp/popup/CommodityDetail/settingRender.js +4 -0
  23. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +5 -2
  24. package/es/materials/sxp/popup/CommodityList/index.d.ts +0 -1
  25. package/es/materials/sxp/popup/CommodityList/index.js +12 -11
  26. package/es/materials/sxp/template/components/CommodityGroup.d.ts +1 -1
  27. package/es/materials/sxp/template/components/CommodityGroup.js +12 -1
  28. package/lib/core/components/SxpPageRender/FormatImage.js +7 -3
  29. package/lib/core/components/SxpPageRender/Popup/index.js +8 -6
  30. package/lib/core/components/SxpPageRender/index.js +5 -5
  31. package/lib/core/context/SxpDataSourceProvider.js +26 -16
  32. package/lib/core/hooks/useEventReport.js +4 -4
  33. package/lib/materials/sxp/popup/CommodityDetail/index.d.ts +1 -0
  34. package/lib/materials/sxp/popup/CommodityDetail/index.js +10 -5
  35. package/lib/materials/sxp/popup/CommodityDetail/material.js +6 -0
  36. package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +4 -0
  37. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +5 -2
  38. package/lib/materials/sxp/popup/CommodityList/index.d.ts +0 -1
  39. package/lib/materials/sxp/popup/CommodityList/index.js +12 -11
  40. package/lib/materials/sxp/template/components/CommodityGroup.d.ts +1 -1
  41. package/lib/materials/sxp/template/components/CommodityGroup.js +12 -1
  42. package/package.json +1 -1
package/dist/pb-ui.js CHANGED
@@ -567,12 +567,25 @@
567
567
  const themeTag = React.useRef();
568
568
  const curTime = React.useRef();
569
569
  const [selectTag, setSelectTag] = React.useState(DEFAULT_TAG);
570
- const checkCommodityIndexRef = React.useRef();
570
+ const checkCommodityIndexRef = React.useRef(-1);
571
571
  const popupCurTimeRef = React.useRef(null);
572
572
  const isShowConsent = React.useMemo(() => {
573
573
  var _a, _b, _c, _d;
574
574
  return (((_d = (_c = (_b = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.consent) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.item) === null || _c === void 0 ? void 0 : _c.props) === null || _d === void 0 ? void 0 : _d.privacy_necessity) && !isAgreePolicy && !isEditor) || isOpenConsent;
575
575
  }, [isAgreePolicy, globalConfig, isOpenConsent, isEditor]);
576
+ const getFilterRecList = React.useCallback((data) => {
577
+ var _a;
578
+ const recList = data === null || data === void 0 ? void 0 : data.recList;
579
+ const nList = (_a = recList === null || recList === void 0 ? void 0 : recList.map((item) => {
580
+ var _a, _b, _c, _d, _e, _f;
581
+ if (((_a = item === null || item === void 0 ? void 0 : item.video) === null || _a === void 0 ? void 0 : _a.bindProducts) && ((_c = (_b = item === null || item === void 0 ? void 0 : item.video) === null || _b === void 0 ? void 0 : _b.bindProducts) === null || _c === void 0 ? void 0 : _c.length) > 0) {
582
+ const bindProducts = (_f = (_e = (_d = item === null || item === void 0 ? void 0 : item.video) === null || _d === void 0 ? void 0 : _d.bindProducts) === null || _e === void 0 ? void 0 : _e.filter((item) => !!(item === null || item === void 0 ? void 0 : item.bindCta))) !== null && _f !== void 0 ? _f : [];
583
+ return Object.assign(Object.assign({}, item), { video: Object.assign(Object.assign({}, item === null || item === void 0 ? void 0 : item.video), { bindProducts }) });
584
+ }
585
+ return item;
586
+ })) !== null && _a !== void 0 ? _a : [];
587
+ return nList;
588
+ }, []);
576
589
  React.useEffect(() => {
577
590
  const handleChangeThemeTag = (tag) => {
578
591
  themeTag.current = tag;
@@ -644,7 +657,6 @@
644
657
  return result === null || result === void 0 ? void 0 : result.data;
645
658
  }), [bffFetch, utmVal, maxSize, defaultSize]);
646
659
  const loadVideos = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
647
- var _j, _k;
648
660
  if (rtcList.length <= 0) {
649
661
  return;
650
662
  }
@@ -654,8 +666,8 @@
654
666
  'itemFilter.itemType': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemType,
655
667
  themeTag: themeTag.current
656
668
  });
657
- setRtcList(rtcList.concat((_j = data === null || data === void 0 ? void 0 : data.recList) !== null && _j !== void 0 ? _j : []));
658
- setCacheRtcList(cacheRtcList.concat((_k = data === null || data === void 0 ? void 0 : data.recList) !== null && _k !== void 0 ? _k : []));
669
+ setRtcList(getFilterRecList(data));
670
+ setCacheRtcList(getFilterRecList(data));
659
671
  }), [getRecommendVideos, rtcList, waterFallData, cacheRtcList]);
660
672
  const bffEventReport = React.useCallback(({ userInfo, eventInfo }) => {
661
673
  // 关闭 BFF 事件上报
@@ -719,24 +731,24 @@
719
731
  }), [bffFetch]);
720
732
  // 获取 Tag
721
733
  const bffGetTagList = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
722
- var _l, _m, _o, _p, _q;
734
+ var _j, _k, _l, _m, _o;
723
735
  if (!utmVal || !isShowTag)
724
736
  return;
725
737
  try {
726
- const val = (_o = (_m = (_l = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _l === void 0 ? void 0 : _l.filter((val) => {
738
+ const val = (_l = (_k = (_j = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _j === void 0 ? void 0 : _j.filter((val) => {
727
739
  var _a, _b;
728
740
  const key = val.split('=')[0];
729
741
  return (_b = ((_a = utmParameter === null || utmParameter === void 0 ? void 0 : utmParameter.channels) !== null && _a !== void 0 ? _a : [])) === null || _b === void 0 ? void 0 : _b.includes(key);
730
- })) === null || _m === void 0 ? void 0 : _m.join('&')) !== null && _o !== void 0 ? _o : '';
742
+ })) === null || _k === void 0 ? void 0 : _k.join('&')) !== null && _l !== void 0 ? _l : '';
731
743
  const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/tag/list', { method: 'GET', query: { channel: decodeURIComponent(val) } }));
732
- setTagList((_q = (_p = result === null || result === void 0 ? void 0 : result.data) === null || _p === void 0 ? void 0 : _p.tags) !== null && _q !== void 0 ? _q : []);
744
+ setTagList((_o = (_m = result === null || result === void 0 ? void 0 : result.data) === null || _m === void 0 ? void 0 : _m.tags) !== null && _o !== void 0 ? _o : []);
733
745
  }
734
746
  catch (e) {
735
747
  console.log('e', e);
736
748
  }
737
749
  }), [bffFetch, utmVal, isShowTag]);
738
750
  const ctaEvent = React.useCallback((eventInfo, rec, product, position) => {
739
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
751
+ var _a, _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;
740
752
  const cta = product === null || product === void 0 ? void 0 : product.bindCta;
741
753
  const isProd = ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.bindProduct) || (((_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.bindProducts) && ((_d = (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProducts) === null || _d === void 0 ? void 0 : _d.length) > 0);
742
754
  let fromKName = '';
@@ -750,7 +762,7 @@
750
762
  fromKName = 'imagePage';
751
763
  }
752
764
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
753
- 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, fromKPage: (_o = location === null || location === void 0 ? void 0 : location.href) !== null && _o !== void 0 ? _o : '' })
765
+ 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: (_2 = (_z = (_u = (_q = (_m = cta === null || cta === void 0 ? void 0 : cta.traceInfo) !== null && _m !== void 0 ? _m : (_p = (_o = rec === null || rec === void 0 ? void 0 : rec.video) === null || _o === void 0 ? void 0 : _o.bindCta) === null || _p === void 0 ? void 0 : _p.traceInfo) !== null && _q !== void 0 ? _q : (_t = (_s = (_r = rec === null || rec === void 0 ? void 0 : rec.video) === null || _r === void 0 ? void 0 : _r.bindProduct) === null || _s === void 0 ? void 0 : _s.bindCta) === null || _t === void 0 ? void 0 : _t.traceInfo) !== null && _u !== void 0 ? _u : (_y = (_x = (_w = (_v = rec === null || rec === void 0 ? void 0 : rec.video) === null || _v === void 0 ? void 0 : _v.bindProducts) === null || _w === void 0 ? void 0 : _w[0]) === null || _x === void 0 ? void 0 : _x.bindCta) === null || _y === void 0 ? void 0 : _y.traceInfo) !== null && _z !== void 0 ? _z : (_1 = (_0 = rec === null || rec === void 0 ? void 0 : rec.product) === null || _0 === void 0 ? void 0 : _0.bindCta) === null || _1 === void 0 ? void 0 : _1.traceInfo) !== null && _2 !== void 0 ? _2 : '', fromKName, fromKPage: (_3 = location === null || location === void 0 ? void 0 : location.href) !== null && _3 !== void 0 ? _3 : '' })
754
766
  });
755
767
  }, [bffEventReport, isFromHashtag]);
756
768
  const h5EnterLink = React.useCallback(() => {
@@ -790,9 +802,8 @@
790
802
  bffGetTagList();
791
803
  getRecommendVideos()
792
804
  .then((data) => {
793
- var _a, _b;
794
- setRtcList((_a = data === null || data === void 0 ? void 0 : data.recList) !== null && _a !== void 0 ? _a : []);
795
- setCacheRtcList((_b = data === null || data === void 0 ? void 0 : data.recList) !== null && _b !== void 0 ? _b : []);
805
+ setRtcList(getFilterRecList(data));
806
+ setCacheRtcList(getFilterRecList(data));
796
807
  })
797
808
  .finally(() => {
798
809
  bffEventReport({
@@ -812,9 +823,8 @@
812
823
  bffGetTagList();
813
824
  getRecommendVideos()
814
825
  .then((data) => {
815
- var _a, _b;
816
- setRtcList((_a = data === null || data === void 0 ? void 0 : data.recList) !== null && _a !== void 0 ? _a : []);
817
- setCacheRtcList((_b = data === null || data === void 0 ? void 0 : data.recList) !== null && _b !== void 0 ? _b : []);
826
+ setRtcList(getFilterRecList(data));
827
+ setCacheRtcList(getFilterRecList(data));
818
828
  })
819
829
  .finally(() => {
820
830
  setLoading(false);
@@ -1282,14 +1292,14 @@
1282
1292
  * @Author: binruan@chatlabs.com
1283
1293
  * @Date: 2024-03-12 10:59:06
1284
1294
  * @LastEditors: binruan@chatlabs.com
1285
- * @LastEditTime: 2024-06-20 13:39:07
1295
+ * @LastEditTime: 2024-08-01 17:36:34
1286
1296
  * @FilePath: \pb-sxp-ui\src\core\hooks\useEventReport.ts
1287
1297
  *
1288
1298
  */
1289
1299
  function useEventReport() {
1290
1300
  const { bffEventReport, popupDetailData, waterFallData, isFromHashtag } = useSxpDataSource();
1291
1301
  const jumpToWeb = React.useCallback((data, product, cta, position) => {
1292
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
1302
+ var _a, _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;
1293
1303
  let fromKName = '';
1294
1304
  if (popupDetailData && (((_b = (_a = data === null || data === void 0 ? void 0 : data.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b.length) || ((_c = data === null || data === void 0 ? void 0 : data.video) === null || _c === void 0 ? void 0 : _c.bindProduct))) {
1295
1305
  fromKName = 'pdpPage';
@@ -1320,12 +1330,12 @@
1320
1330
  position: position + '',
1321
1331
  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 : '',
1322
1332
  ctatId: (_o = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _o !== void 0 ? _o : '',
1323
- traceInfo: (_p = product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _p !== void 0 ? _p : ''
1333
+ traceInfo: (_1 = (_y = (_w = (_s = (_p = product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _p !== void 0 ? _p : (_r = (_q = data === null || data === void 0 ? void 0 : data.video) === null || _q === void 0 ? void 0 : _q.bindProduct) === null || _r === void 0 ? void 0 : _r.traceInfo) !== null && _s !== void 0 ? _s : (_v = (_u = (_t = data === null || data === void 0 ? void 0 : data.video) === null || _t === void 0 ? void 0 : _t.bindProducts) === null || _u === void 0 ? void 0 : _u[0]) === null || _v === void 0 ? void 0 : _v.traceInfo) !== null && _w !== void 0 ? _w : (_x = data === null || data === void 0 ? void 0 : data.product) === null || _x === void 0 ? void 0 : _x.traceInfo) !== null && _y !== void 0 ? _y : (_0 = (_z = data === null || data === void 0 ? void 0 : data.video) === null || _z === void 0 ? void 0 : _z.bindCta) === null || _0 === void 0 ? void 0 : _0.traceInfo) !== null && _1 !== void 0 ? _1 : ''
1324
1334
  }
1325
1335
  });
1326
1336
  }, [bffEventReport, popupDetailData, isFromHashtag]);
1327
1337
  const productView = React.useCallback((data, product, cta, viewTime, position) => {
1328
- var _a, _b, _c, _d;
1338
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
1329
1339
  let fromKName = '';
1330
1340
  if (popupDetailData && (((_b = (_a = data === null || data === void 0 ? void 0 : data.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b.length) || ((_c = data === null || data === void 0 ? void 0 : data.video) === null || _c === void 0 ? void 0 : _c.bindProduct))) {
1331
1341
  fromKName = 'pdpPage';
@@ -1345,7 +1355,7 @@
1345
1355
  position: position + '',
1346
1356
  contentId: (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.itemId,
1347
1357
  ctatId: cta === null || cta === void 0 ? void 0 : cta.itemId,
1348
- traceInfo: product === null || product === void 0 ? void 0 : product.traceInfo,
1358
+ traceInfo: (_p = (_m = (_h = (_e = product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _e !== void 0 ? _e : (_g = (_f = data === null || data === void 0 ? void 0 : data.video) === null || _f === void 0 ? void 0 : _f.bindProduct) === null || _g === void 0 ? void 0 : _g.traceInfo) !== null && _h !== void 0 ? _h : (_l = (_k = (_j = data === null || data === void 0 ? void 0 : data.video) === null || _j === void 0 ? void 0 : _j.bindProducts) === null || _k === void 0 ? void 0 : _k[0]) === null || _l === void 0 ? void 0 : _l.traceInfo) !== null && _m !== void 0 ? _m : (_o = data === null || data === void 0 ? void 0 : data.product) === null || _o === void 0 ? void 0 : _o.traceInfo) !== null && _p !== void 0 ? _p : '',
1349
1359
  timeOnSite: Math.floor((new Date() - viewTime) / 1000) + '',
1350
1360
  eventSubject: 'productView',
1351
1361
  eventDescription: 'User browsed the product'
@@ -1621,6 +1631,10 @@
1621
1631
  {
1622
1632
  label: '商品描述',
1623
1633
  value: 'info'
1634
+ },
1635
+ {
1636
+ label: '税费说明',
1637
+ value: 'taxInfo'
1624
1638
  }
1625
1639
  ],
1626
1640
  name: ['props', 'commodityStyles', 'field'],
@@ -8795,13 +8809,14 @@
8795
8809
  * @Author: binruan@chatlabs.com
8796
8810
  * @Date: 2024-03-20 10:27:31
8797
8811
  * @LastEditors: binruan@chatlabs.com
8798
- * @LastEditTime: 2024-06-20 18:56:52
8812
+ * @LastEditTime: 2024-07-31 17:54:50
8799
8813
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\FormatImage.tsx
8800
8814
  *
8801
8815
  */
8802
8816
  const FormatImage = React.forwardRef((props, ref) => {
8803
8817
  const { src, onLoad, style, className, loading } = props;
8804
8818
  const [imgSrc, setImgSrc] = React.useState();
8819
+ const imgRef = React.useRef(null);
8805
8820
  React.useImperativeHandle(ref, () => ({
8806
8821
  setSrc: (v) => {
8807
8822
  setImgSrc(v);
@@ -8810,7 +8825,6 @@
8810
8825
  React.useEffect(() => {
8811
8826
  setImgSrc(src);
8812
8827
  }, [src]);
8813
- React.useRef(null);
8814
8828
  // useEffect(() => {
8815
8829
  // let observer: any = null;
8816
8830
  // const { current } = imgRef;
@@ -8838,9 +8852,13 @@
8838
8852
  React.createElement("source", { type: 'image/avif', srcSet: imgSrc }),
8839
8853
  React.createElement("source", { type: 'image/webp', srcSet: `${imgSrc}?imageMogr2/format/webp` }),
8840
8854
  React.createElement("source", { type: 'image/jpeg', srcSet: `${imgSrc}?imageMogr2/format/jpg` }),
8841
- React.createElement("img", { className: className, src: imgSrc, style: style, loading: loading, onLoad: (e) => {
8855
+ React.createElement("img", { ref: imgRef, className: className, src: imgSrc, style: Object.assign(Object.assign({}, style), { display: 'none' }), loading: loading, onLoad: (e) => {
8856
+ if (imgRef.current)
8857
+ imgRef.current.style.display = 'block';
8842
8858
  onLoad === null || onLoad === void 0 ? void 0 : onLoad(e.target);
8843
- }, alt: 'image' }))) : (React.createElement("img", { className: className, src: imgSrc, style: style, loading: loading, onLoad: (e) => {
8859
+ }, alt: 'image' }))) : (React.createElement("img", { ref: imgRef, className: className, src: imgSrc, style: Object.assign(Object.assign({}, style), { display: 'none' }), loading: loading, onLoad: (e) => {
8860
+ if (imgRef.current)
8861
+ imgRef.current.style.display = 'block';
8844
8862
  onLoad === null || onLoad === void 0 ? void 0 : onLoad(e.target);
8845
8863
  }, alt: 'image' }))));
8846
8864
  });
@@ -8868,6 +8886,15 @@
8868
8886
 
8869
8887
  const CommodityGroup = ({ products, data, defImg, style, onCLick, popupDetailData, check }) => {
8870
8888
  var _a;
8889
+ const { productView } = useEventReport();
8890
+ const { popupCurTimeRef } = useSxpDataSource();
8891
+ const handleClick = (item, index) => {
8892
+ if (check === index)
8893
+ return;
8894
+ const prevItem = products === null || products === void 0 ? void 0 : products[check];
8895
+ productView(popupDetailData, prevItem, prevItem === null || prevItem === void 0 ? void 0 : prevItem.bindCta, popupCurTimeRef.current, popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index);
8896
+ onCLick === null || onCLick === void 0 ? void 0 : onCLick(index);
8897
+ };
8871
8898
  return (React.createElement(React.Fragment, null, (data === null || data === void 0 ? void 0 : data.open) && ((products && (products === null || products === void 0 ? void 0 : products.length) > 1) || !popupDetailData) && (React.createElement(Scroll$1, { enableSlideActive: true, isPadding: false, style: Object.assign(Object.assign({}, style), data === null || data === void 0 ? void 0 : data.style) }, (_a = (popupDetailData ? products : [0, 1, 2, 3])) === null || _a === void 0 ? void 0 : _a.map((item, index) => {
8872
8899
  var _a, _b, _c;
8873
8900
  return (React.createElement(React.Fragment, null, (item === null || item === void 0 ? void 0 : item.bindCta) ? (React.createElement(SwiperSlide, { className: css.css({
@@ -8875,7 +8902,7 @@
8875
8902
  height: '50px',
8876
8903
  marginRight: '10px'
8877
8904
  }), onClick: () => {
8878
- onCLick === null || onCLick === void 0 ? void 0 : onCLick(index);
8905
+ handleClick(item, index);
8879
8906
  }, key: index },
8880
8907
  React.createElement(FormatImage$1, { style: {
8881
8908
  height: '100%',
@@ -8893,8 +8920,7 @@
8893
8920
  const CommodityDetail$1 = (_a) => {
8894
8921
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
8895
8922
  var { content, style, bgImg, onClick, schema, isDefault, bottom_image, tipText, isPost, viewTime, rec, swiper, commodityStyles, buttonStyle, index, commodityGroup } = _a, props = __rest(_a, ["content", "style", "bgImg", "onClick", "schema", "isDefault", "bottom_image", "tipText", "isPost", "viewTime", "rec", "swiper", "commodityStyles", "buttonStyle", "index", "commodityGroup"]);
8896
- const { sxpParameter, popupDetailData, isPreview, bffFbReport, popupCurTimeRef } = useSxpDataSource();
8897
- useEditor();
8923
+ const { sxpParameter, popupDetailData, isPreview, bffFbReport, popupCurTimeRef, checkCommodityIndexRef } = useSxpDataSource();
8898
8924
  const { jumpToWeb, productView } = useEventReport();
8899
8925
  const curTimeRef = React.useRef(null);
8900
8926
  const [showModal, setShowModal] = React.useState(false);
@@ -8907,6 +8933,7 @@
8907
8933
  : (_k = (_j = (_h = data === null || data === void 0 ? void 0 : data.video) === null || _h === void 0 ? void 0 : _h.bindProduct) === null || _j === void 0 ? void 0 : _j.bindCta) !== null && _k !== void 0 ? _k : (_o = (_m = (_l = data === null || data === void 0 ? void 0 : data.video) === null || _l === void 0 ? void 0 : _l.bindProducts) === null || _m === void 0 ? void 0 : _m[0]) === null || _o === void 0 ? void 0 : _o.bindCta;
8908
8934
  const position = isPost ? index : popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
8909
8935
  if (!isPost && (commodityGroup === null || commodityGroup === void 0 ? void 0 : commodityGroup.open) && ((_p = data === null || data === void 0 ? void 0 : data.video) === null || _p === void 0 ? void 0 : _p.bindProducts) && ((_r = (_q = data === null || data === void 0 ? void 0 : data.video) === null || _q === void 0 ? void 0 : _q.bindProducts) === null || _r === void 0 ? void 0 : _r.length) > 0) {
8936
+ checkCommodityIndexRef.current = checkCommodityIndex;
8910
8937
  const p = (_s = data === null || data === void 0 ? void 0 : data.video) === null || _s === void 0 ? void 0 : _s.bindProducts[checkCommodityIndex];
8911
8938
  product = p;
8912
8939
  cta = p === null || p === void 0 ? void 0 : p.bindCta;
@@ -8950,7 +8977,7 @@
8950
8977
  }, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency]);
8951
8978
  const width = isPreview ? 375 : (_t = style === null || style === void 0 ? void 0 : style.width) !== null && _t !== void 0 ? _t : window.innerWidth;
8952
8979
  const renderContent = ({ isPost }) => {
8953
- var _a, _b, _c;
8980
+ var _a, _b, _c, _d;
8954
8981
  return (React.createElement("div", null,
8955
8982
  React.createElement("div", { className: 'pb-commondity-content-collection', style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection), hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.collection) || (product === null || product === void 0 ? void 0 : product.collection) === ''), dangerouslySetInnerHTML: {
8956
8983
  __html: setFontForText((_a = product === null || product === void 0 ? void 0 : product.collection) !== null && _a !== void 0 ? _a : 'Tiffany Lock', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection)
@@ -8961,8 +8988,11 @@
8961
8988
  React.createElement("div", { className: 'pb-commondity-content-price', style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price), hidden: !!product && !(product === null || product === void 0 ? void 0 : product.price), dangerouslySetInnerHTML: {
8962
8989
  __html: setFontForText(priceText, commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price)
8963
8990
  } }),
8991
+ React.createElement("div", { hidden: !!product && !(product === null || product === void 0 ? void 0 : product.taxInfo), style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.taxInfo), dangerouslySetInnerHTML: {
8992
+ __html: setFontForText((_c = product === null || product === void 0 ? void 0 : product.taxInfo) !== null && _c !== void 0 ? _c : '税费', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.taxInfo)
8993
+ } }),
8964
8994
  React.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
8965
- React.createElement(ExpandableText$1, { foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, onClick: () => setShowModal(true), isPost: isPost, text: (_c = product === null || product === void 0 ? void 0 : product.info) !== null && _c !== void 0 ? _c : `The design inspiration of Tiffany Lock series comes from the power of connection and inclusiveness, and the
8995
+ React.createElement(ExpandableText$1, { foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, onClick: () => setShowModal(true), isPost: isPost, text: (_d = product === null || product === void 0 ? void 0 : product.info) !== null && _d !== void 0 ? _d : `The design inspiration of Tiffany Lock series comes from the power of connection and inclusiveness, and the
8966
8996
  bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
8967
8997
  collection is unisex and is inspired by the padlock pattern found in the Tiffany Antique Collection. This
8968
8998
  necklace features a stylish and eye-catching oval clasp chain decorated with a lock pattern. Crafted from
@@ -8984,6 +9014,7 @@
8984
9014
  const handleClick = React.useCallback((index) => {
8985
9015
  popupCurTimeRef.current = new Date();
8986
9016
  setCheckCommodityIndex(index);
9017
+ checkCommodityIndexRef.current = index;
8987
9018
  }, []);
8988
9019
  const renderCommodityGroup = React.useCallback(() => {
8989
9020
  var _a, _b, _c;
@@ -9004,6 +9035,7 @@
9004
9035
  delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
9005
9036
  } },
9006
9037
  React.createElement(React.Fragment, null, (_v = product === null || product === void 0 ? void 0 : product.homePage) === null || _v === void 0 ? void 0 : _v.map((src) => {
9038
+ var _a;
9007
9039
  return (React.createElement(SwiperSlide, { key: src },
9008
9040
  React.createElement("div", { style: {
9009
9041
  overflow: 'hidden',
@@ -9016,7 +9048,7 @@
9016
9048
  objectFit: 'cover',
9017
9049
  display: 'block',
9018
9050
  objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
9019
- }, src: src }))));
9051
+ }, src: (_a = src !== null && src !== void 0 ? src : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _a !== void 0 ? _a : bottom_image }))));
9020
9052
  }))))),
9021
9053
  !((_w = product === null || product === void 0 ? void 0 : product.homePage) === null || _w === void 0 ? void 0 : _w.length) && (React.createElement("div", { className: css.css({
9022
9054
  position: 'relative',
@@ -9080,7 +9112,7 @@
9080
9112
  * @Author: binruan@chatlabs.com
9081
9113
  * @Date: 2023-07-28 18:29:57
9082
9114
  * @LastEditors: binruan@chatlabs.com
9083
- * @LastEditTime: 2024-07-12 17:40:06
9115
+ * @LastEditTime: 2024-07-31 13:58:45
9084
9116
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetail\material.tsx
9085
9117
  *
9086
9118
  */
@@ -9118,6 +9150,12 @@
9118
9150
  info: {
9119
9151
  color: 'gray',
9120
9152
  fontSize: 12
9153
+ },
9154
+ taxInfo: {
9155
+ color: '#000',
9156
+ fontSize: 13,
9157
+ textAlign: 'left',
9158
+ marginBottom: '10px'
9121
9159
  }
9122
9160
  },
9123
9161
  buttonStyle: {
@@ -9603,7 +9641,7 @@
9603
9641
  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;
9604
9642
  var { style, isDefault, rec, viewTime, isPost, bottom_image, tipText, swiper, commodityStyles, buttonStyle, index, commodityGroup } = _a, props = __rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "tipText", "swiper", "commodityStyles", "buttonStyle", "index", "commodityGroup"]);
9605
9643
  React.useState(true);
9606
- const { sxpParameter, popupCurTimeRef, popupDetailData, isPreview, bffFbReport } = useSxpDataSource();
9644
+ const { sxpParameter, popupCurTimeRef, popupDetailData, isPreview, bffFbReport, checkCommodityIndexRef } = useSxpDataSource();
9607
9645
  const { jumpToWeb, productView } = useEventReport();
9608
9646
  React.useState(false);
9609
9647
  React.useState(false);
@@ -9618,6 +9656,7 @@
9618
9656
  : (_k = (_j = (_h = data === null || data === void 0 ? void 0 : data.video) === null || _h === void 0 ? void 0 : _h.bindProduct) === null || _j === void 0 ? void 0 : _j.bindCta) !== null && _k !== void 0 ? _k : (_o = (_m = (_l = data === null || data === void 0 ? void 0 : data.video) === null || _l === void 0 ? void 0 : _l.bindProducts) === null || _m === void 0 ? void 0 : _m[0]) === null || _o === void 0 ? void 0 : _o.bindCta;
9619
9657
  const position = isPost ? index : popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
9620
9658
  if (!isPost && (commodityGroup === null || commodityGroup === void 0 ? void 0 : commodityGroup.open) && ((_p = data === null || data === void 0 ? void 0 : data.video) === null || _p === void 0 ? void 0 : _p.bindProducts) && ((_r = (_q = data === null || data === void 0 ? void 0 : data.video) === null || _q === void 0 ? void 0 : _q.bindProducts) === null || _r === void 0 ? void 0 : _r.length) > 0) {
9659
+ checkCommodityIndexRef.current = checkCommodityIndex;
9621
9660
  const p = (_s = data === null || data === void 0 ? void 0 : data.video) === null || _s === void 0 ? void 0 : _s.bindProducts[checkCommodityIndex];
9622
9661
  product = p;
9623
9662
  cta = p === null || p === void 0 ? void 0 : p.bindCta;
@@ -9725,6 +9764,7 @@ Made in Italy` })));
9725
9764
  const handleClick = React.useCallback((index) => {
9726
9765
  popupCurTimeRef.current = new Date();
9727
9766
  setCheckCommodityIndex(index);
9767
+ checkCommodityIndexRef.current = index;
9728
9768
  }, []);
9729
9769
  const renderCommodityGroup = React.useCallback(() => {
9730
9770
  var _a, _b, _c;
@@ -9743,6 +9783,7 @@ Made in Italy` })));
9743
9783
  }, loop: true, autoplay: {
9744
9784
  delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
9745
9785
  } }, (_v = product === null || product === void 0 ? void 0 : product.homePage) === null || _v === void 0 ? void 0 : _v.map((src) => {
9786
+ var _a;
9746
9787
  return (React.createElement(SwiperSlide, { key: src },
9747
9788
  React.createElement("div", { style: {
9748
9789
  overflow: 'hidden',
@@ -9755,7 +9796,7 @@ Made in Italy` })));
9755
9796
  objectFit: 'cover',
9756
9797
  display: 'block',
9757
9798
  objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
9758
- }, src: src }))));
9799
+ }, src: (_a = src !== null && src !== void 0 ? src : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _a !== void 0 ? _a : bottom_image }))));
9759
9800
  }))),
9760
9801
  !((_w = product === null || product === void 0 ? void 0 : product.homePage) === null || _w === void 0 ? void 0 : _w.length) && (React.createElement("div", { className: css.css({
9761
9802
  position: 'relative',
@@ -10172,12 +10213,13 @@ Made in Italy` })));
10172
10213
 
10173
10214
  const CommodityList$1 = (_a) => {
10174
10215
  var _b, _c;
10175
- var { style, isDefault, rec, viewTime, isPost, bottom_image, commodityStyles, buttonStyle, index, translateY = 0, commodityPicture, isExternalLink, onClick } = _a, props = __rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "commodityStyles", "buttonStyle", "index", "translateY", "commodityPicture", "isExternalLink", "onClick"]);
10216
+ var { style, isDefault, rec, viewTime, isPost, bottom_image, commodityStyles, buttonStyle, translateY = 0, commodityPicture, isExternalLink, onClick } = _a, props = __rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "commodityStyles", "buttonStyle", "translateY", "commodityPicture", "isExternalLink", "onClick"]);
10176
10217
  const { sxpParameter, popupDetailData, setPopupDetailData, ctaEvent } = useSxpDataSource();
10177
10218
  const { jumpToWeb } = useEventReport();
10178
10219
  const { popup } = useEditor();
10179
10220
  const recData = isPost ? rec : popupDetailData;
10180
10221
  const product = (_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [null, null, null, null];
10222
+ const index = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
10181
10223
  const priceText = React.useCallback((product) => {
10182
10224
  var _a, _b, _c, _d, _e;
10183
10225
  if ((product === null || product === void 0 ? void 0 : product.currency) && (product === null || product === void 0 ? void 0 : product.price)) {
@@ -10205,25 +10247,24 @@ Made in Italy` })));
10205
10247
  onClick === null || onClick === void 0 ? void 0 : onClick();
10206
10248
  }
10207
10249
  }, popup === null || popup === void 0 ? void 0 : popup.duration);
10208
- return (React.createElement("div", { className: css.css(Object.assign(Object.assign({}, style), { display: 'flex', flexDirection: 'column', gap: '10px', padding: '0 20px', marginTop: '50px' })) }, product === null || product === void 0 ? void 0 : product.map((item, index) => {
10209
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
10250
+ return (React.createElement("div", { className: css.css(Object.assign(Object.assign({}, style), { display: 'flex', flexDirection: 'column', gap: '10px', padding: '0 20px', marginTop: '50px', boxSizing: 'border-box' })) }, product === null || product === void 0 ? void 0 : product.map((item, index) => {
10251
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
10210
10252
  return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement("div", Object.assign({ key: index }, props, { className: css.css({
10211
10253
  display: 'flex'
10212
10254
  }), onClick: () => handleClick(item, index) }),
10213
10255
  React.createElement(Img$1, { src: (_d = (_c = (_a = item === null || item === void 0 ? void 0 : item.cover) !== null && _a !== void 0 ? _a : (_b = item === null || item === void 0 ? void 0 : item.homePage) === null || _b === void 0 ? void 0 : _b[0]) !== null && _c !== void 0 ? _c : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _d !== void 0 ? _d : bottom_image, rec: recData, item: item, index: index, translateY: translateY, imgStyle: commodityPicture, enableEventReport: false }),
10214
10256
  React.createElement("div", { style: {
10215
- flex: 1,
10216
- width: `calc(100% - ${(_e = commodityPicture === null || commodityPicture === void 0 ? void 0 : commodityPicture.width) !== null && _e !== void 0 ? _e : 0}px - ${(_f = commodityPicture === null || commodityPicture === void 0 ? void 0 : commodityPicture.marginRight) !== null && _f !== void 0 ? _f : 0}px - ${(_g = style === null || style === void 0 ? void 0 : style.padding) !== null && _g !== void 0 ? _g : 0}px)`,
10257
+ width: `calc(100% - ${(_e = commodityPicture === null || commodityPicture === void 0 ? void 0 : commodityPicture.width) !== null && _e !== void 0 ? _e : 0}px - ${(_f = commodityPicture === null || commodityPicture === void 0 ? void 0 : commodityPicture.marginRight) !== null && _f !== void 0 ? _f : 0}px)`,
10217
10258
  display: 'flex',
10218
10259
  flexDirection: 'column',
10219
10260
  justifyContent: 'space-between'
10220
10261
  } },
10221
10262
  React.createElement("div", null,
10222
10263
  React.createElement("div", { className: 'one-line-ellipsis', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title, hidden: !!item && !(item === null || item === void 0 ? void 0 : item.title), dangerouslySetInnerHTML: {
10223
- __html: setFontForText((_h = item === null || item === void 0 ? void 0 : item.title) !== null && _h !== void 0 ? _h : 'Pendant in Yellow Gold with Diamonds, Medium', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title)
10264
+ __html: setFontForText((_g = item === null || item === void 0 ? void 0 : item.title) !== null && _g !== void 0 ? _g : 'Pendant in Yellow Gold with Diamonds, Medium', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title)
10224
10265
  } }),
10225
10266
  React.createElement("div", { className: 'two-line-ellipsis', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection, hidden: !!item && (!(item === null || item === void 0 ? void 0 : item.collection) || (item === null || item === void 0 ? void 0 : item.collection) === ''), dangerouslySetInnerHTML: {
10226
- __html: setFontForText((_j = item === null || item === void 0 ? void 0 : item.collection) !== null && _j !== void 0 ? _j : 'Tiffany Lock', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection)
10267
+ __html: setFontForText((_h = item === null || item === void 0 ? void 0 : item.collection) !== null && _h !== void 0 ? _h : 'Tiffany Lock', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection)
10227
10268
  } })),
10228
10269
  React.createElement("div", { className: css.css({
10229
10270
  display: 'flex',
@@ -10232,11 +10273,12 @@ Made in Italy` })));
10232
10273
  width: '100%',
10233
10274
  overflow: 'hidden'
10234
10275
  }) },
10235
- React.createElement("div", { style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price, hidden: !!item && !(item === null || item === void 0 ? void 0 : item.price), dangerouslySetInnerHTML: {
10236
- __html: setFontForText(priceText(item), commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price)
10237
- } }),
10276
+ React.createElement("div", null,
10277
+ React.createElement("div", { style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price, hidden: !!item && !(item === null || item === void 0 ? void 0 : item.price), dangerouslySetInnerHTML: {
10278
+ __html: setFontForText(priceText(item), commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price)
10279
+ } })),
10238
10280
  React.createElement("div", { className: 'one-line-ellipsis', style: Object.assign(Object.assign({}, buttonStyle), { padding: '0 15px' }), dangerouslySetInnerHTML: {
10239
- __html: setFontForText((_l = (_k = item === null || item === void 0 ? void 0 : item.bindCta) === null || _k === void 0 ? void 0 : _k.enTitle) !== null && _l !== void 0 ? _l : 'Shop Now', buttonStyle)
10281
+ __html: setFontForText((_k = (_j = item === null || item === void 0 ? void 0 : item.bindCta) === null || _j === void 0 ? void 0 : _j.enTitle) !== null && _k !== void 0 ? _k : 'Shop Now', buttonStyle)
10240
10282
  } })))))));
10241
10283
  })));
10242
10284
  };
@@ -15495,7 +15537,7 @@ Made in Italy` })));
15495
15537
  * @Author: binruan@chatlabs.com
15496
15538
  * @Date: 2024-01-15 19:03:09
15497
15539
  * @LastEditors: binruan@chatlabs.com
15498
- * @LastEditTime: 2024-07-29 10:02:52
15540
+ * @LastEditTime: 2024-08-01 17:42:09
15499
15541
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
15500
15542
  *
15501
15543
  */
@@ -15556,7 +15598,7 @@ Made in Italy` })));
15556
15598
  React.useEffect(() => {
15557
15599
  const item = data === null || data === void 0 ? void 0 : data[activeIndex];
15558
15600
  const visibleChange = () => {
15559
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
15601
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
15560
15602
  const repCond = !openHashtag && !isShowConsent;
15561
15603
  if (document.visibilityState === 'hidden') {
15562
15604
  // 当用户导航到新页面、切换标签页、关闭标签页、最小化或关闭浏览器、刷新原页面(即离开原页面时),或者在移动设备上从浏览器切换到不同的应用程序时
@@ -15596,7 +15638,7 @@ Made in Italy` })));
15596
15638
  fromKName,
15597
15639
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
15598
15640
  ctatId: (_r = (_q = (_p = item === null || item === void 0 ? void 0 : item.video) === null || _p === void 0 ? void 0 : _p.bindCta) === null || _q === void 0 ? void 0 : _q.itemId) !== null && _r !== void 0 ? _r : '',
15599
- traceInfo: (_t = (_s = item === null || item === void 0 ? void 0 : item.video) === null || _s === void 0 ? void 0 : _s.traceInfo) !== null && _t !== void 0 ? _t : ''
15641
+ traceInfo: (_v = (_t = (_s = item === null || item === void 0 ? void 0 : item.video) === null || _s === void 0 ? void 0 : _s.traceInfo) !== null && _t !== void 0 ? _t : (_u = item === null || item === void 0 ? void 0 : item.product) === null || _u === void 0 ? void 0 : _u.traceInfo) !== null && _v !== void 0 ? _v : ''
15600
15642
  }
15601
15643
  });
15602
15644
  }
@@ -15641,7 +15683,7 @@ Made in Italy` })));
15641
15683
  const minusHeight = React.useMemo(() => {
15642
15684
  let minusHeight = 0;
15643
15685
  if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
15644
- minusHeight += 45;
15686
+ minusHeight += 56;
15645
15687
  }
15646
15688
  return minusHeight;
15647
15689
  }, []);
@@ -15767,7 +15809,7 @@ Made in Italy` })));
15767
15809
  }
15768
15810
  };
15769
15811
  const handleSlideSkip = (item, position) => {
15770
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
15812
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
15771
15813
  if (isPreview || waterFallData)
15772
15814
  return;
15773
15815
  const t = new Date() - curTime.current;
@@ -15786,7 +15828,7 @@ Made in Italy` })));
15786
15828
  contentTags: (product === null || product === void 0 ? void 0 : product.tags) ? JSON.stringify(product === null || product === void 0 ? void 0 : product.tags) : '',
15787
15829
  position: position + '',
15788
15830
  contentId: (_q = (_p = item === null || item === void 0 ? void 0 : item.video) === null || _p === void 0 ? void 0 : _p.itemId) !== null && _q !== void 0 ? _q : '',
15789
- traceInfo: (_r = product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _r !== void 0 ? _r : ''
15831
+ traceInfo: (_u = (_s = (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.traceInfo) !== null && _s !== void 0 ? _s : (_t = item === null || item === void 0 ? void 0 : item.product) === null || _t === void 0 ? void 0 : _t.traceInfo) !== null && _u !== void 0 ? _u : ''
15790
15832
  }
15791
15833
  });
15792
15834
  setSlideSkipState();
@@ -16317,7 +16359,7 @@ Made in Italy` })));
16317
16359
  * @Author: binruan@chatlabs.com
16318
16360
  * @Date: 2023-10-31 10:56:01
16319
16361
  * @LastEditors: binruan@chatlabs.com
16320
- * @LastEditTime: 2024-07-29 18:06:11
16362
+ * @LastEditTime: 2024-08-01 15:23:51
16321
16363
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Popup\index.tsx
16322
16364
  *
16323
16365
  */
@@ -16343,7 +16385,7 @@ Made in Italy` })));
16343
16385
  }
16344
16386
  }, [popup]);
16345
16387
  const handleClose = () => {
16346
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
16388
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
16347
16389
  if (!popup ||
16348
16390
  (popup === null || popup === void 0 ? void 0 : popup.id) === '' ||
16349
16391
  !visible ||
@@ -16354,12 +16396,14 @@ Made in Italy` })));
16354
16396
  const value = (_d = (_c = (_b = schema === null || schema === void 0 ? void 0 : schema.sxpPageConf) === null || _b === void 0 ? void 0 : _b.globalConfig) === null || _c === void 0 ? void 0 : _c.popupList) === null || _d === void 0 ? void 0 : _d.find((item) => (item === null || item === void 0 ? void 0 : item.id) === (popup === null || popup === void 0 ? void 0 : popup.id));
16355
16397
  if (((_e = value === null || value === void 0 ? void 0 : value.item) === null || _e === void 0 ? void 0 : _e.type) === 'CommodityDetail' || ((_f = value === null || value === void 0 ? void 0 : value.item) === null || _f === void 0 ? void 0 : _f.type) === 'CommodityDetailDiroNew') {
16356
16398
  const data = popupDetailData;
16357
- let product = (_g = data === null || data === void 0 ? void 0 : data.video) === null || _g === void 0 ? void 0 : _g.bindProduct;
16358
- let cta = (_j = (_h = data === null || data === void 0 ? void 0 : data.video) === null || _h === void 0 ? void 0 : _h.bindProduct) === null || _j === void 0 ? void 0 : _j.bindCta;
16399
+ let product = (_h = (_g = data === null || data === void 0 ? void 0 : data.video) === null || _g === void 0 ? void 0 : _g.bindProduct) !== null && _h !== void 0 ? _h : (_k = (_j = data === null || data === void 0 ? void 0 : data.video) === null || _j === void 0 ? void 0 : _j.bindProducts) === null || _k === void 0 ? void 0 : _k[0];
16400
+ let cta = (_o = (_m = (_l = data === null || data === void 0 ? void 0 : data.video) === null || _l === void 0 ? void 0 : _l.bindProduct) === null || _m === void 0 ? void 0 : _m.bindCta) !== null && _o !== void 0 ? _o : (_r = (_q = (_p = data === null || data === void 0 ? void 0 : data.video) === null || _p === void 0 ? void 0 : _p.bindProducts) === null || _q === void 0 ? void 0 : _q[0]) === null || _r === void 0 ? void 0 : _r.bindCta;
16359
16401
  if ((checkCommodityIndexRef === null || checkCommodityIndexRef === void 0 ? void 0 : checkCommodityIndexRef.current) >= 0) {
16360
- const p = (_k = data === null || data === void 0 ? void 0 : data.video) === null || _k === void 0 ? void 0 : _k.bindProducts[checkCommodityIndexRef === null || checkCommodityIndexRef === void 0 ? void 0 : checkCommodityIndexRef.current];
16361
- product = p;
16362
- cta = p === null || p === void 0 ? void 0 : p.bindCta;
16402
+ const p = (_t = (_s = data === null || data === void 0 ? void 0 : data.video) === null || _s === void 0 ? void 0 : _s.bindProducts) === null || _t === void 0 ? void 0 : _t[checkCommodityIndexRef === null || checkCommodityIndexRef === void 0 ? void 0 : checkCommodityIndexRef.current];
16403
+ if (p) {
16404
+ product = p;
16405
+ cta = p === null || p === void 0 ? void 0 : p.bindCta;
16406
+ }
16363
16407
  }
16364
16408
  if (product && cta) {
16365
16409
  productView(data, product, cta, popupCurTimeRef.current, popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index);