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/index.css CHANGED
@@ -1825,16 +1825,22 @@ button.swiper-pagination-bullet {
1825
1825
  transform: translate3d(0px, 0px, 0px);
1826
1826
  }
1827
1827
  .clc-sxp-logo-banner {
1828
- height: 45px;
1828
+ height: 56px;
1829
1829
  width: 100%;
1830
1830
  overflow: hidden;
1831
- text-align: center;
1831
+ display: -webkit-box;
1832
+ display: -webkit-flex;
1833
+ display: -ms-flexbox;
1834
+ display: flex;
1835
+ -webkit-box-pack: center;
1836
+ -webkit-justify-content: center;
1837
+ -ms-flex-pack: center;
1838
+ justify-content: center;
1832
1839
  }
1833
1840
  .clc-sxp-logo-banner img {
1834
- height: 100%;
1835
- width: 50%;
1836
1841
  -o-object-fit: cover;
1837
1842
  object-fit: cover;
1843
+ display: block;
1838
1844
  }
1839
1845
  .clc-sxp-bottom {
1840
1846
  z-index: 10;
package/dist/index.js CHANGED
@@ -552,12 +552,25 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
552
552
  const themeTag = useRef();
553
553
  const curTime = useRef();
554
554
  const [selectTag, setSelectTag] = useState(DEFAULT_TAG);
555
- const checkCommodityIndexRef = useRef();
555
+ const checkCommodityIndexRef = useRef(-1);
556
556
  const popupCurTimeRef = useRef(null);
557
557
  const isShowConsent = useMemo(() => {
558
558
  var _a, _b, _c, _d;
559
559
  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;
560
560
  }, [isAgreePolicy, globalConfig, isOpenConsent, isEditor]);
561
+ const getFilterRecList = useCallback((data) => {
562
+ var _a;
563
+ const recList = data === null || data === void 0 ? void 0 : data.recList;
564
+ const nList = (_a = recList === null || recList === void 0 ? void 0 : recList.map((item) => {
565
+ var _a, _b, _c, _d, _e, _f;
566
+ 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) {
567
+ 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 : [];
568
+ return Object.assign(Object.assign({}, item), { video: Object.assign(Object.assign({}, item === null || item === void 0 ? void 0 : item.video), { bindProducts }) });
569
+ }
570
+ return item;
571
+ })) !== null && _a !== void 0 ? _a : [];
572
+ return nList;
573
+ }, []);
561
574
  useEffect(() => {
562
575
  const handleChangeThemeTag = (tag) => {
563
576
  themeTag.current = tag;
@@ -629,7 +642,6 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
629
642
  return result === null || result === void 0 ? void 0 : result.data;
630
643
  }), [bffFetch, utmVal, maxSize, defaultSize]);
631
644
  const loadVideos = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
632
- var _j, _k;
633
645
  if (rtcList.length <= 0) {
634
646
  return;
635
647
  }
@@ -639,8 +651,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
639
651
  'itemFilter.itemType': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemType,
640
652
  themeTag: themeTag.current
641
653
  });
642
- setRtcList(rtcList.concat((_j = data === null || data === void 0 ? void 0 : data.recList) !== null && _j !== void 0 ? _j : []));
643
- setCacheRtcList(cacheRtcList.concat((_k = data === null || data === void 0 ? void 0 : data.recList) !== null && _k !== void 0 ? _k : []));
654
+ setRtcList(getFilterRecList(data));
655
+ setCacheRtcList(getFilterRecList(data));
644
656
  }), [getRecommendVideos, rtcList, waterFallData, cacheRtcList]);
645
657
  const bffEventReport = useCallback(({ userInfo, eventInfo }) => {
646
658
  // 关闭 BFF 事件上报
@@ -704,24 +716,24 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
704
716
  }), [bffFetch]);
705
717
  // 获取 Tag
706
718
  const bffGetTagList = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
707
- var _l, _m, _o, _p, _q;
719
+ var _j, _k, _l, _m, _o;
708
720
  if (!utmVal || !isShowTag)
709
721
  return;
710
722
  try {
711
- const val = (_o = (_m = (_l = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _l === void 0 ? void 0 : _l.filter((val) => {
723
+ const val = (_l = (_k = (_j = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _j === void 0 ? void 0 : _j.filter((val) => {
712
724
  var _a, _b;
713
725
  const key = val.split('=')[0];
714
726
  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);
715
- })) === null || _m === void 0 ? void 0 : _m.join('&')) !== null && _o !== void 0 ? _o : '';
727
+ })) === null || _k === void 0 ? void 0 : _k.join('&')) !== null && _l !== void 0 ? _l : '';
716
728
  const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/tag/list', { method: 'GET', query: { channel: decodeURIComponent(val) } }));
717
- 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 : []);
729
+ 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 : []);
718
730
  }
719
731
  catch (e) {
720
732
  console.log('e', e);
721
733
  }
722
734
  }), [bffFetch, utmVal, isShowTag]);
723
735
  const ctaEvent = useCallback((eventInfo, rec, product, position) => {
724
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
736
+ 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;
725
737
  const cta = product === null || product === void 0 ? void 0 : product.bindCta;
726
738
  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);
727
739
  let fromKName = '';
@@ -735,7 +747,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
735
747
  fromKName = 'imagePage';
736
748
  }
737
749
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
738
- 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 : '' })
750
+ 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 : '' })
739
751
  });
740
752
  }, [bffEventReport, isFromHashtag]);
741
753
  const h5EnterLink = useCallback(() => {
@@ -775,9 +787,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
775
787
  bffGetTagList();
776
788
  getRecommendVideos()
777
789
  .then((data) => {
778
- var _a, _b;
779
- setRtcList((_a = data === null || data === void 0 ? void 0 : data.recList) !== null && _a !== void 0 ? _a : []);
780
- setCacheRtcList((_b = data === null || data === void 0 ? void 0 : data.recList) !== null && _b !== void 0 ? _b : []);
790
+ setRtcList(getFilterRecList(data));
791
+ setCacheRtcList(getFilterRecList(data));
781
792
  })
782
793
  .finally(() => {
783
794
  bffEventReport({
@@ -797,9 +808,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
797
808
  bffGetTagList();
798
809
  getRecommendVideos()
799
810
  .then((data) => {
800
- var _a, _b;
801
- setRtcList((_a = data === null || data === void 0 ? void 0 : data.recList) !== null && _a !== void 0 ? _a : []);
802
- setCacheRtcList((_b = data === null || data === void 0 ? void 0 : data.recList) !== null && _b !== void 0 ? _b : []);
811
+ setRtcList(getFilterRecList(data));
812
+ setCacheRtcList(getFilterRecList(data));
803
813
  })
804
814
  .finally(() => {
805
815
  setLoading(false);
@@ -1267,14 +1277,14 @@ var settingRender$9 = [
1267
1277
  * @Author: binruan@chatlabs.com
1268
1278
  * @Date: 2024-03-12 10:59:06
1269
1279
  * @LastEditors: binruan@chatlabs.com
1270
- * @LastEditTime: 2024-06-20 13:39:07
1280
+ * @LastEditTime: 2024-08-01 17:36:34
1271
1281
  * @FilePath: \pb-sxp-ui\src\core\hooks\useEventReport.ts
1272
1282
  *
1273
1283
  */
1274
1284
  function useEventReport() {
1275
1285
  const { bffEventReport, popupDetailData, waterFallData, isFromHashtag } = useSxpDataSource();
1276
1286
  const jumpToWeb = useCallback((data, product, cta, position) => {
1277
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
1287
+ 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;
1278
1288
  let fromKName = '';
1279
1289
  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))) {
1280
1290
  fromKName = 'pdpPage';
@@ -1305,12 +1315,12 @@ function useEventReport() {
1305
1315
  position: position + '',
1306
1316
  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 : '',
1307
1317
  ctatId: (_o = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _o !== void 0 ? _o : '',
1308
- traceInfo: (_p = product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _p !== void 0 ? _p : ''
1318
+ 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 : ''
1309
1319
  }
1310
1320
  });
1311
1321
  }, [bffEventReport, popupDetailData, isFromHashtag]);
1312
1322
  const productView = useCallback((data, product, cta, viewTime, position) => {
1313
- var _a, _b, _c, _d;
1323
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
1314
1324
  let fromKName = '';
1315
1325
  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))) {
1316
1326
  fromKName = 'pdpPage';
@@ -1330,7 +1340,7 @@ function useEventReport() {
1330
1340
  position: position + '',
1331
1341
  contentId: (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.itemId,
1332
1342
  ctatId: cta === null || cta === void 0 ? void 0 : cta.itemId,
1333
- traceInfo: product === null || product === void 0 ? void 0 : product.traceInfo,
1343
+ 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 : '',
1334
1344
  timeOnSite: Math.floor((new Date() - viewTime) / 1000) + '',
1335
1345
  eventSubject: 'productView',
1336
1346
  eventDescription: 'User browsed the product'
@@ -1606,6 +1616,10 @@ var settingRender$8 = [
1606
1616
  {
1607
1617
  label: '商品描述',
1608
1618
  value: 'info'
1619
+ },
1620
+ {
1621
+ label: '税费说明',
1622
+ value: 'taxInfo'
1609
1623
  }
1610
1624
  ],
1611
1625
  name: ['props', 'commodityStyles', 'field'],
@@ -8780,13 +8794,14 @@ var ExpandableText$1 = memo(ExpandableText);
8780
8794
  * @Author: binruan@chatlabs.com
8781
8795
  * @Date: 2024-03-20 10:27:31
8782
8796
  * @LastEditors: binruan@chatlabs.com
8783
- * @LastEditTime: 2024-06-20 18:56:52
8797
+ * @LastEditTime: 2024-07-31 17:54:50
8784
8798
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\FormatImage.tsx
8785
8799
  *
8786
8800
  */
8787
8801
  const FormatImage = forwardRef((props, ref) => {
8788
8802
  const { src, onLoad, style, className, loading } = props;
8789
8803
  const [imgSrc, setImgSrc] = useState();
8804
+ const imgRef = useRef(null);
8790
8805
  useImperativeHandle(ref, () => ({
8791
8806
  setSrc: (v) => {
8792
8807
  setImgSrc(v);
@@ -8795,7 +8810,6 @@ const FormatImage = forwardRef((props, ref) => {
8795
8810
  useEffect(() => {
8796
8811
  setImgSrc(src);
8797
8812
  }, [src]);
8798
- useRef(null);
8799
8813
  // useEffect(() => {
8800
8814
  // let observer: any = null;
8801
8815
  // const { current } = imgRef;
@@ -8823,9 +8837,13 @@ const FormatImage = forwardRef((props, ref) => {
8823
8837
  React.createElement("source", { type: 'image/avif', srcSet: imgSrc }),
8824
8838
  React.createElement("source", { type: 'image/webp', srcSet: `${imgSrc}?imageMogr2/format/webp` }),
8825
8839
  React.createElement("source", { type: 'image/jpeg', srcSet: `${imgSrc}?imageMogr2/format/jpg` }),
8826
- React.createElement("img", { className: className, src: imgSrc, style: style, loading: loading, onLoad: (e) => {
8840
+ React.createElement("img", { ref: imgRef, className: className, src: imgSrc, style: Object.assign(Object.assign({}, style), { display: 'none' }), loading: loading, onLoad: (e) => {
8841
+ if (imgRef.current)
8842
+ imgRef.current.style.display = 'block';
8827
8843
  onLoad === null || onLoad === void 0 ? void 0 : onLoad(e.target);
8828
- }, alt: 'image' }))) : (React.createElement("img", { className: className, src: imgSrc, style: style, loading: loading, onLoad: (e) => {
8844
+ }, alt: 'image' }))) : (React.createElement("img", { ref: imgRef, className: className, src: imgSrc, style: Object.assign(Object.assign({}, style), { display: 'none' }), loading: loading, onLoad: (e) => {
8845
+ if (imgRef.current)
8846
+ imgRef.current.style.display = 'block';
8829
8847
  onLoad === null || onLoad === void 0 ? void 0 : onLoad(e.target);
8830
8848
  }, alt: 'image' }))));
8831
8849
  });
@@ -8853,6 +8871,15 @@ var Scroll$1 = memo(Scroll);
8853
8871
 
8854
8872
  const CommodityGroup = ({ products, data, defImg, style, onCLick, popupDetailData, check }) => {
8855
8873
  var _a;
8874
+ const { productView } = useEventReport();
8875
+ const { popupCurTimeRef } = useSxpDataSource();
8876
+ const handleClick = (item, index) => {
8877
+ if (check === index)
8878
+ return;
8879
+ const prevItem = products === null || products === void 0 ? void 0 : products[check];
8880
+ productView(popupDetailData, prevItem, prevItem === null || prevItem === void 0 ? void 0 : prevItem.bindCta, popupCurTimeRef.current, popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index);
8881
+ onCLick === null || onCLick === void 0 ? void 0 : onCLick(index);
8882
+ };
8856
8883
  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) => {
8857
8884
  var _a, _b, _c;
8858
8885
  return (React.createElement(React.Fragment, null, (item === null || item === void 0 ? void 0 : item.bindCta) ? (React.createElement(SwiperSlide, { className: css({
@@ -8860,7 +8887,7 @@ const CommodityGroup = ({ products, data, defImg, style, onCLick, popupDetailDat
8860
8887
  height: '50px',
8861
8888
  marginRight: '10px'
8862
8889
  }), onClick: () => {
8863
- onCLick === null || onCLick === void 0 ? void 0 : onCLick(index);
8890
+ handleClick(item, index);
8864
8891
  }, key: index },
8865
8892
  React.createElement(FormatImage$1, { style: {
8866
8893
  height: '100%',
@@ -8878,8 +8905,7 @@ var CommodityGroup$1 = memo(CommodityGroup);
8878
8905
  const CommodityDetail$1 = (_a) => {
8879
8906
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
8880
8907
  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"]);
8881
- const { sxpParameter, popupDetailData, isPreview, bffFbReport, popupCurTimeRef } = useSxpDataSource();
8882
- useEditor();
8908
+ const { sxpParameter, popupDetailData, isPreview, bffFbReport, popupCurTimeRef, checkCommodityIndexRef } = useSxpDataSource();
8883
8909
  const { jumpToWeb, productView } = useEventReport();
8884
8910
  const curTimeRef = useRef(null);
8885
8911
  const [showModal, setShowModal] = useState(false);
@@ -8892,6 +8918,7 @@ const CommodityDetail$1 = (_a) => {
8892
8918
  : (_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;
8893
8919
  const position = isPost ? index : popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
8894
8920
  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) {
8921
+ checkCommodityIndexRef.current = checkCommodityIndex;
8895
8922
  const p = (_s = data === null || data === void 0 ? void 0 : data.video) === null || _s === void 0 ? void 0 : _s.bindProducts[checkCommodityIndex];
8896
8923
  product = p;
8897
8924
  cta = p === null || p === void 0 ? void 0 : p.bindCta;
@@ -8935,7 +8962,7 @@ const CommodityDetail$1 = (_a) => {
8935
8962
  }, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency]);
8936
8963
  const width = isPreview ? 375 : (_t = style === null || style === void 0 ? void 0 : style.width) !== null && _t !== void 0 ? _t : window.innerWidth;
8937
8964
  const renderContent = ({ isPost }) => {
8938
- var _a, _b, _c;
8965
+ var _a, _b, _c, _d;
8939
8966
  return (React.createElement("div", null,
8940
8967
  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: {
8941
8968
  __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)
@@ -8946,8 +8973,11 @@ const CommodityDetail$1 = (_a) => {
8946
8973
  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: {
8947
8974
  __html: setFontForText(priceText, commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price)
8948
8975
  } }),
8976
+ 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: {
8977
+ __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)
8978
+ } }),
8949
8979
  React.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
8950
- 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
8980
+ 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
8951
8981
  bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
8952
8982
  collection is unisex and is inspired by the padlock pattern found in the Tiffany Antique Collection. This
8953
8983
  necklace features a stylish and eye-catching oval clasp chain decorated with a lock pattern. Crafted from
@@ -8969,6 +8999,7 @@ const CommodityDetail$1 = (_a) => {
8969
8999
  const handleClick = useCallback((index) => {
8970
9000
  popupCurTimeRef.current = new Date();
8971
9001
  setCheckCommodityIndex(index);
9002
+ checkCommodityIndexRef.current = index;
8972
9003
  }, []);
8973
9004
  const renderCommodityGroup = useCallback(() => {
8974
9005
  var _a, _b, _c;
@@ -8989,6 +9020,7 @@ const CommodityDetail$1 = (_a) => {
8989
9020
  delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
8990
9021
  } },
8991
9022
  React.createElement(React.Fragment, null, (_v = product === null || product === void 0 ? void 0 : product.homePage) === null || _v === void 0 ? void 0 : _v.map((src) => {
9023
+ var _a;
8992
9024
  return (React.createElement(SwiperSlide, { key: src },
8993
9025
  React.createElement("div", { style: {
8994
9026
  overflow: 'hidden',
@@ -9001,7 +9033,7 @@ const CommodityDetail$1 = (_a) => {
9001
9033
  objectFit: 'cover',
9002
9034
  display: 'block',
9003
9035
  objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
9004
- }, src: src }))));
9036
+ }, 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 }))));
9005
9037
  }))))),
9006
9038
  !((_w = product === null || product === void 0 ? void 0 : product.homePage) === null || _w === void 0 ? void 0 : _w.length) && (React.createElement("div", { className: css({
9007
9039
  position: 'relative',
@@ -9065,7 +9097,7 @@ var interactionRender$c = [
9065
9097
  * @Author: binruan@chatlabs.com
9066
9098
  * @Date: 2023-07-28 18:29:57
9067
9099
  * @LastEditors: binruan@chatlabs.com
9068
- * @LastEditTime: 2024-07-12 17:40:06
9100
+ * @LastEditTime: 2024-07-31 13:58:45
9069
9101
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetail\material.tsx
9070
9102
  *
9071
9103
  */
@@ -9103,6 +9135,12 @@ const CommodityDetail = createMaterial(CommodityDetailComponent, {
9103
9135
  info: {
9104
9136
  color: 'gray',
9105
9137
  fontSize: 12
9138
+ },
9139
+ taxInfo: {
9140
+ color: '#000',
9141
+ fontSize: 13,
9142
+ textAlign: 'left',
9143
+ marginBottom: '10px'
9106
9144
  }
9107
9145
  },
9108
9146
  buttonStyle: {
@@ -9588,7 +9626,7 @@ const CommodityDetailDiroNew$1 = (_a) => {
9588
9626
  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;
9589
9627
  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"]);
9590
9628
  useState(true);
9591
- const { sxpParameter, popupCurTimeRef, popupDetailData, isPreview, bffFbReport } = useSxpDataSource();
9629
+ const { sxpParameter, popupCurTimeRef, popupDetailData, isPreview, bffFbReport, checkCommodityIndexRef } = useSxpDataSource();
9592
9630
  const { jumpToWeb, productView } = useEventReport();
9593
9631
  useState(false);
9594
9632
  useState(false);
@@ -9603,6 +9641,7 @@ const CommodityDetailDiroNew$1 = (_a) => {
9603
9641
  : (_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;
9604
9642
  const position = isPost ? index : popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
9605
9643
  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) {
9644
+ checkCommodityIndexRef.current = checkCommodityIndex;
9606
9645
  const p = (_s = data === null || data === void 0 ? void 0 : data.video) === null || _s === void 0 ? void 0 : _s.bindProducts[checkCommodityIndex];
9607
9646
  product = p;
9608
9647
  cta = p === null || p === void 0 ? void 0 : p.bindCta;
@@ -9710,6 +9749,7 @@ Made in Italy` })));
9710
9749
  const handleClick = useCallback((index) => {
9711
9750
  popupCurTimeRef.current = new Date();
9712
9751
  setCheckCommodityIndex(index);
9752
+ checkCommodityIndexRef.current = index;
9713
9753
  }, []);
9714
9754
  const renderCommodityGroup = useCallback(() => {
9715
9755
  var _a, _b, _c;
@@ -9728,6 +9768,7 @@ Made in Italy` })));
9728
9768
  }, loop: true, autoplay: {
9729
9769
  delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
9730
9770
  } }, (_v = product === null || product === void 0 ? void 0 : product.homePage) === null || _v === void 0 ? void 0 : _v.map((src) => {
9771
+ var _a;
9731
9772
  return (React.createElement(SwiperSlide, { key: src },
9732
9773
  React.createElement("div", { style: {
9733
9774
  overflow: 'hidden',
@@ -9740,7 +9781,7 @@ Made in Italy` })));
9740
9781
  objectFit: 'cover',
9741
9782
  display: 'block',
9742
9783
  objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
9743
- }, src: src }))));
9784
+ }, 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 }))));
9744
9785
  }))),
9745
9786
  !((_w = product === null || product === void 0 ? void 0 : product.homePage) === null || _w === void 0 ? void 0 : _w.length) && (React.createElement("div", { className: css({
9746
9787
  position: 'relative',
@@ -10157,12 +10198,13 @@ var Img$1 = memo(Img);
10157
10198
 
10158
10199
  const CommodityList$1 = (_a) => {
10159
10200
  var _b, _c;
10160
- 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"]);
10201
+ 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"]);
10161
10202
  const { sxpParameter, popupDetailData, setPopupDetailData, ctaEvent } = useSxpDataSource();
10162
10203
  const { jumpToWeb } = useEventReport();
10163
10204
  const { popup } = useEditor();
10164
10205
  const recData = isPost ? rec : popupDetailData;
10165
10206
  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];
10207
+ const index = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
10166
10208
  const priceText = useCallback((product) => {
10167
10209
  var _a, _b, _c, _d, _e;
10168
10210
  if ((product === null || product === void 0 ? void 0 : product.currency) && (product === null || product === void 0 ? void 0 : product.price)) {
@@ -10190,25 +10232,24 @@ const CommodityList$1 = (_a) => {
10190
10232
  onClick === null || onClick === void 0 ? void 0 : onClick();
10191
10233
  }
10192
10234
  }, popup === null || popup === void 0 ? void 0 : popup.duration);
10193
- return (React.createElement("div", { className: 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) => {
10194
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
10235
+ return (React.createElement("div", { className: 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) => {
10236
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
10195
10237
  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({
10196
10238
  display: 'flex'
10197
10239
  }), onClick: () => handleClick(item, index) }),
10198
10240
  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 }),
10199
10241
  React.createElement("div", { style: {
10200
- flex: 1,
10201
- 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)`,
10242
+ 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)`,
10202
10243
  display: 'flex',
10203
10244
  flexDirection: 'column',
10204
10245
  justifyContent: 'space-between'
10205
10246
  } },
10206
10247
  React.createElement("div", null,
10207
10248
  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: {
10208
- __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)
10249
+ __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)
10209
10250
  } }),
10210
10251
  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: {
10211
- __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)
10252
+ __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)
10212
10253
  } })),
10213
10254
  React.createElement("div", { className: css({
10214
10255
  display: 'flex',
@@ -10217,11 +10258,12 @@ const CommodityList$1 = (_a) => {
10217
10258
  width: '100%',
10218
10259
  overflow: 'hidden'
10219
10260
  }) },
10220
- 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: {
10221
- __html: setFontForText(priceText(item), commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price)
10222
- } }),
10261
+ React.createElement("div", null,
10262
+ 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: {
10263
+ __html: setFontForText(priceText(item), commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price)
10264
+ } })),
10223
10265
  React.createElement("div", { className: 'one-line-ellipsis', style: Object.assign(Object.assign({}, buttonStyle), { padding: '0 15px' }), dangerouslySetInnerHTML: {
10224
- __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)
10266
+ __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)
10225
10267
  } })))))));
10226
10268
  })));
10227
10269
  };
@@ -15480,7 +15522,7 @@ var Tagbar$1 = memo(Tagbar);
15480
15522
  * @Author: binruan@chatlabs.com
15481
15523
  * @Date: 2024-01-15 19:03:09
15482
15524
  * @LastEditors: binruan@chatlabs.com
15483
- * @LastEditTime: 2024-07-29 10:02:52
15525
+ * @LastEditTime: 2024-08-01 17:42:09
15484
15526
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
15485
15527
  *
15486
15528
  */
@@ -15541,7 +15583,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
15541
15583
  useEffect(() => {
15542
15584
  const item = data === null || data === void 0 ? void 0 : data[activeIndex];
15543
15585
  const visibleChange = () => {
15544
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
15586
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
15545
15587
  const repCond = !openHashtag && !isShowConsent;
15546
15588
  if (document.visibilityState === 'hidden') {
15547
15589
  // 当用户导航到新页面、切换标签页、关闭标签页、最小化或关闭浏览器、刷新原页面(即离开原页面时),或者在移动设备上从浏览器切换到不同的应用程序时
@@ -15581,7 +15623,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
15581
15623
  fromKName,
15582
15624
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
15583
15625
  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 : '',
15584
- 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 : ''
15626
+ 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 : ''
15585
15627
  }
15586
15628
  });
15587
15629
  }
@@ -15626,7 +15668,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
15626
15668
  const minusHeight = useMemo(() => {
15627
15669
  let minusHeight = 0;
15628
15670
  if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
15629
- minusHeight += 45;
15671
+ minusHeight += 56;
15630
15672
  }
15631
15673
  return minusHeight;
15632
15674
  }, []);
@@ -15752,7 +15794,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
15752
15794
  }
15753
15795
  };
15754
15796
  const handleSlideSkip = (item, position) => {
15755
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
15797
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
15756
15798
  if (isPreview || waterFallData)
15757
15799
  return;
15758
15800
  const t = new Date() - curTime.current;
@@ -15771,7 +15813,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
15771
15813
  contentTags: (product === null || product === void 0 ? void 0 : product.tags) ? JSON.stringify(product === null || product === void 0 ? void 0 : product.tags) : '',
15772
15814
  position: position + '',
15773
15815
  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 : '',
15774
- traceInfo: (_r = product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _r !== void 0 ? _r : ''
15816
+ 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 : ''
15775
15817
  }
15776
15818
  });
15777
15819
  setSlideSkipState();
@@ -16302,7 +16344,7 @@ var index$1 = memo(DiyPortalPreview);
16302
16344
  * @Author: binruan@chatlabs.com
16303
16345
  * @Date: 2023-10-31 10:56:01
16304
16346
  * @LastEditors: binruan@chatlabs.com
16305
- * @LastEditTime: 2024-07-29 18:06:11
16347
+ * @LastEditTime: 2024-08-01 15:23:51
16306
16348
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Popup\index.tsx
16307
16349
  *
16308
16350
  */
@@ -16328,7 +16370,7 @@ const Popup = () => {
16328
16370
  }
16329
16371
  }, [popup]);
16330
16372
  const handleClose = () => {
16331
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
16373
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
16332
16374
  if (!popup ||
16333
16375
  (popup === null || popup === void 0 ? void 0 : popup.id) === '' ||
16334
16376
  !visible ||
@@ -16339,12 +16381,14 @@ const Popup = () => {
16339
16381
  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));
16340
16382
  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') {
16341
16383
  const data = popupDetailData;
16342
- let product = (_g = data === null || data === void 0 ? void 0 : data.video) === null || _g === void 0 ? void 0 : _g.bindProduct;
16343
- 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;
16384
+ 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];
16385
+ 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;
16344
16386
  if ((checkCommodityIndexRef === null || checkCommodityIndexRef === void 0 ? void 0 : checkCommodityIndexRef.current) >= 0) {
16345
- 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];
16346
- product = p;
16347
- cta = p === null || p === void 0 ? void 0 : p.bindCta;
16387
+ 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];
16388
+ if (p) {
16389
+ product = p;
16390
+ cta = p === null || p === void 0 ? void 0 : p.bindCta;
16391
+ }
16348
16392
  }
16349
16393
  if (product && cta) {
16350
16394
  productView(data, product, cta, popupCurTimeRef.current, popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index);