pb-sxp-ui 1.2.4 → 1.2.6

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 (70) hide show
  1. package/dist/index.cjs +283 -175
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.css +11 -3
  4. package/dist/index.js +283 -175
  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 +283 -175
  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/LikeButton/index.js +34 -15
  15. package/es/core/components/SxpPageRender/Popup/index.js +26 -13
  16. package/es/core/components/SxpPageRender/RenderCard.d.ts +1 -0
  17. package/es/core/components/SxpPageRender/RenderCard.js +3 -3
  18. package/es/core/components/SxpPageRender/index.js +4 -4
  19. package/es/core/components/SxpPageRender/typing.d.ts +1 -0
  20. package/es/core/context/SxpDataSourceProvider.d.ts +3 -3
  21. package/es/core/context/SxpDataSourceProvider.js +7 -3
  22. package/es/core/hooks/useEventReport.js +4 -4
  23. package/es/materials/sxp/cta/AniLink/index.js +2 -1
  24. package/es/materials/sxp/cta/AniLinkPopup/index.d.ts +1 -0
  25. package/es/materials/sxp/cta/AniLinkPopup/index.js +11 -20
  26. package/es/materials/sxp/popup/CommodityDetail/index.d.ts +1 -0
  27. package/es/materials/sxp/popup/CommodityDetail/index.js +32 -15
  28. package/es/materials/sxp/popup/CommodityDetail/material.js +6 -0
  29. package/es/materials/sxp/popup/CommodityDetail/settingRender.js +4 -0
  30. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +32 -18
  31. package/es/materials/sxp/popup/CommodityList/index.js +38 -20
  32. package/es/materials/sxp/popup/CommodityList/material.js +1 -0
  33. package/es/materials/sxp/popup/CommodityList/settingRender.js +5 -0
  34. package/es/materials/sxp/template/MultiCommodity/index.js +3 -3
  35. package/es/materials/sxp/template/MultiCommodityDiro/index.js +3 -3
  36. package/es/materials/sxp/template/components/CommodityGroup.d.ts +4 -0
  37. package/es/materials/sxp/template/components/CommodityGroup.js +21 -14
  38. package/es/materials/sxp/template/components/Img.d.ts +1 -0
  39. package/es/materials/sxp/template/components/Img.js +3 -3
  40. package/es/materials/sxp/template/components/Scroll.d.ts +1 -0
  41. package/es/materials/sxp/template/components/Scroll.js +5 -4
  42. package/lib/core/components/SxpPageRender/LikeButton/index.js +34 -15
  43. package/lib/core/components/SxpPageRender/Popup/index.js +25 -12
  44. package/lib/core/components/SxpPageRender/RenderCard.d.ts +1 -0
  45. package/lib/core/components/SxpPageRender/RenderCard.js +3 -3
  46. package/lib/core/components/SxpPageRender/index.js +4 -4
  47. package/lib/core/components/SxpPageRender/typing.d.ts +1 -0
  48. package/lib/core/context/SxpDataSourceProvider.d.ts +3 -3
  49. package/lib/core/context/SxpDataSourceProvider.js +7 -3
  50. package/lib/core/hooks/useEventReport.js +4 -4
  51. package/lib/materials/sxp/cta/AniLink/index.js +2 -1
  52. package/lib/materials/sxp/cta/AniLinkPopup/index.d.ts +1 -0
  53. package/lib/materials/sxp/cta/AniLinkPopup/index.js +10 -19
  54. package/lib/materials/sxp/popup/CommodityDetail/index.d.ts +1 -0
  55. package/lib/materials/sxp/popup/CommodityDetail/index.js +32 -15
  56. package/lib/materials/sxp/popup/CommodityDetail/material.js +6 -0
  57. package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +4 -0
  58. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +32 -18
  59. package/lib/materials/sxp/popup/CommodityList/index.js +37 -19
  60. package/lib/materials/sxp/popup/CommodityList/material.js +1 -0
  61. package/lib/materials/sxp/popup/CommodityList/settingRender.js +5 -0
  62. package/lib/materials/sxp/template/MultiCommodity/index.js +3 -3
  63. package/lib/materials/sxp/template/MultiCommodityDiro/index.js +3 -3
  64. package/lib/materials/sxp/template/components/CommodityGroup.d.ts +4 -0
  65. package/lib/materials/sxp/template/components/CommodityGroup.js +20 -13
  66. package/lib/materials/sxp/template/components/Img.d.ts +1 -0
  67. package/lib/materials/sxp/template/components/Img.js +3 -3
  68. package/lib/materials/sxp/template/components/Scroll.d.ts +1 -0
  69. package/lib/materials/sxp/template/components/Scroll.js +5 -4
  70. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -552,6 +552,8 @@ 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(-1);
556
+ const popupCurTimeRef = useRef(null);
555
557
  const isShowConsent = useMemo(() => {
556
558
  var _a, _b, _c, _d;
557
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;
@@ -719,7 +721,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
719
721
  }
720
722
  }), [bffFetch, utmVal, isShowTag]);
721
723
  const ctaEvent = useCallback((eventInfo, rec, product, position) => {
722
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
724
+ 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;
723
725
  const cta = product === null || product === void 0 ? void 0 : product.bindCta;
724
726
  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);
725
727
  let fromKName = '';
@@ -733,7 +735,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
733
735
  fromKName = 'imagePage';
734
736
  }
735
737
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
736
- 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 })
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: (_1 = (_y = (_t = (_p = (_o = (_m = rec === null || rec === void 0 ? void 0 : rec.video) === null || _m === void 0 ? void 0 : _m.bindCta) === null || _o === void 0 ? void 0 : _o.traceInfo) !== null && _p !== void 0 ? _p : (_s = (_r = (_q = rec === null || rec === void 0 ? void 0 : rec.video) === null || _q === void 0 ? void 0 : _q.bindProduct) === null || _r === void 0 ? void 0 : _r.bindCta) === null || _s === void 0 ? void 0 : _s.traceInfo) !== null && _t !== void 0 ? _t : (_x = (_w = (_v = (_u = rec === null || rec === void 0 ? void 0 : rec.video) === null || _u === void 0 ? void 0 : _u.bindProducts) === null || _v === void 0 ? void 0 : _v[0]) === null || _w === void 0 ? void 0 : _w.bindCta) === null || _x === void 0 ? void 0 : _x.traceInfo) !== null && _y !== void 0 ? _y : (_0 = (_z = rec === null || rec === void 0 ? void 0 : rec.product) === null || _z === void 0 ? void 0 : _z.bindCta) === null || _0 === void 0 ? void 0 : _0.traceInfo) !== null && _1 !== void 0 ? _1 : '', fromKName, fromKPage: (_2 = location === null || location === void 0 ? void 0 : location.href) !== null && _2 !== void 0 ? _2 : '' })
737
739
  });
738
740
  }, [bffEventReport, isFromHashtag]);
739
741
  const h5EnterLink = useCallback(() => {
@@ -848,7 +850,9 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
848
850
  isShowConsent,
849
851
  selectTag,
850
852
  setSelectTag,
851
- globalConfig
853
+ globalConfig,
854
+ popupCurTimeRef,
855
+ checkCommodityIndexRef
852
856
  } }, isShowConsent ? (React.createElement(Consent$3, Object.assign({}, (_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))) : (render({
853
857
  rtcList,
854
858
  mutateLike: bffMutateLike,
@@ -1263,14 +1267,14 @@ var settingRender$9 = [
1263
1267
  * @Author: binruan@chatlabs.com
1264
1268
  * @Date: 2024-03-12 10:59:06
1265
1269
  * @LastEditors: binruan@chatlabs.com
1266
- * @LastEditTime: 2024-06-20 13:39:07
1270
+ * @LastEditTime: 2024-07-31 11:41:47
1267
1271
  * @FilePath: \pb-sxp-ui\src\core\hooks\useEventReport.ts
1268
1272
  *
1269
1273
  */
1270
1274
  function useEventReport() {
1271
1275
  const { bffEventReport, popupDetailData, waterFallData, isFromHashtag } = useSxpDataSource();
1272
1276
  const jumpToWeb = useCallback((data, product, cta, position) => {
1273
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
1277
+ 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;
1274
1278
  let fromKName = '';
1275
1279
  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))) {
1276
1280
  fromKName = 'pdpPage';
@@ -1301,12 +1305,12 @@ function useEventReport() {
1301
1305
  position: position + '',
1302
1306
  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 : '',
1303
1307
  ctatId: (_o = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _o !== void 0 ? _o : '',
1304
- traceInfo: (_p = product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _p !== void 0 ? _p : ''
1308
+ traceInfo: (_0 = (_x = (_v = (_r = (_q = (_p = data === null || data === void 0 ? void 0 : data.video) === null || _p === void 0 ? void 0 : _p.bindProduct) === null || _q === void 0 ? void 0 : _q.traceInfo) !== null && _r !== void 0 ? _r : (_u = (_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[0]) === null || _u === void 0 ? void 0 : _u.traceInfo) !== null && _v !== void 0 ? _v : (_w = data === null || data === void 0 ? void 0 : data.product) === null || _w === void 0 ? void 0 : _w.traceInfo) !== null && _x !== void 0 ? _x : (_z = (_y = data === null || data === void 0 ? void 0 : data.video) === null || _y === void 0 ? void 0 : _y.bindCta) === null || _z === void 0 ? void 0 : _z.traceInfo) !== null && _0 !== void 0 ? _0 : ''
1305
1309
  }
1306
1310
  });
1307
1311
  }, [bffEventReport, popupDetailData, isFromHashtag]);
1308
1312
  const productView = useCallback((data, product, cta, viewTime, position) => {
1309
- var _a, _b, _c, _d;
1313
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
1310
1314
  let fromKName = '';
1311
1315
  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))) {
1312
1316
  fromKName = 'pdpPage';
@@ -1326,7 +1330,7 @@ function useEventReport() {
1326
1330
  position: position + '',
1327
1331
  contentId: (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.itemId,
1328
1332
  ctatId: cta === null || cta === void 0 ? void 0 : cta.itemId,
1329
- traceInfo: product === null || product === void 0 ? void 0 : product.traceInfo,
1333
+ traceInfo: (_o = (_l = (_g = (_f = (_e = data === null || data === void 0 ? void 0 : data.video) === null || _e === void 0 ? void 0 : _e.bindProduct) === null || _f === void 0 ? void 0 : _f.traceInfo) !== null && _g !== void 0 ? _g : (_k = (_j = (_h = data === null || data === void 0 ? void 0 : data.video) === null || _h === void 0 ? void 0 : _h.bindProducts) === null || _j === void 0 ? void 0 : _j[0]) === null || _k === void 0 ? void 0 : _k.traceInfo) !== null && _l !== void 0 ? _l : (_m = data === null || data === void 0 ? void 0 : data.product) === null || _m === void 0 ? void 0 : _m.traceInfo) !== null && _o !== void 0 ? _o : '',
1330
1334
  timeOnSite: Math.floor((new Date() - viewTime) / 1000) + '',
1331
1335
  eventSubject: 'productView',
1332
1336
  eventDescription: 'User browsed the product'
@@ -1602,6 +1606,10 @@ var settingRender$8 = [
1602
1606
  {
1603
1607
  label: '商品描述',
1604
1608
  value: 'info'
1609
+ },
1610
+ {
1611
+ label: '税费说明',
1612
+ value: 'taxInfo'
1605
1613
  }
1606
1614
  ],
1607
1615
  name: ['props', 'commodityStyles', 'field'],
@@ -8583,7 +8591,7 @@ SwiperSlide.displayName = 'SwiperSlide';
8583
8591
  * @Author: binruan@chatlabs.com
8584
8592
  * @Date: 2023-11-02 18:34:34
8585
8593
  * @LastEditors: binruan@chatlabs.com
8586
- * @LastEditTime: 2024-07-25 17:05:20
8594
+ * @LastEditTime: 2024-07-29 16:20:40
8587
8595
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Modal\index.tsx
8588
8596
  *
8589
8597
  */
@@ -8776,7 +8784,7 @@ var ExpandableText$1 = memo(ExpandableText);
8776
8784
  * @Author: binruan@chatlabs.com
8777
8785
  * @Date: 2024-03-20 10:27:31
8778
8786
  * @LastEditors: binruan@chatlabs.com
8779
- * @LastEditTime: 2024-06-20 18:56:52
8787
+ * @LastEditTime: 2024-07-31 17:54:50
8780
8788
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\FormatImage.tsx
8781
8789
  *
8782
8790
  */
@@ -8827,56 +8835,79 @@ const FormatImage = forwardRef((props, ref) => {
8827
8835
  });
8828
8836
  var FormatImage$1 = memo(FormatImage);
8829
8837
 
8830
- const Scroll = ({ children, isPadding = true, style }) => {
8838
+ /*
8839
+ * @Author: binruan@chatlabs.com
8840
+ * @Date: 2024-03-20 10:27:32
8841
+ * @LastEditors: binruan@chatlabs.com
8842
+ * @LastEditTime: 2024-07-30 11:46:32
8843
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\template\components\Scroll.tsx
8844
+ *
8845
+ */
8846
+ const Scroll = ({ children, isPadding = true, style, enableSlideActive = false }) => {
8831
8847
  const ref = useRef();
8832
8848
  const { popupDetailData } = useSxpDataSource();
8833
8849
  useEffect(() => {
8834
- var _a;
8835
- (_a = ref === null || ref === void 0 ? void 0 : ref.current) === null || _a === void 0 ? void 0 : _a.swiper.slideTo(popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.multiCheckIndex);
8836
- }, [popupDetailData]);
8850
+ var _a, _b;
8851
+ if (enableSlideActive)
8852
+ (_a = ref === null || ref === void 0 ? void 0 : ref.current) === null || _a === void 0 ? void 0 : _a.swiper.slideTo((_b = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.multiCheckIndex) !== null && _b !== void 0 ? _b : 0);
8853
+ }, [popupDetailData, enableSlideActive]);
8837
8854
  return (React.createElement(Swiper, { ref: ref, direction: 'horizontal', slidesPerView: 'auto', freeMode: true, mousewheel: true, modules: [freeMode, Scrollbar, Mousewheel], style: Object.assign({ padding: isPadding ? '0 12px 0 20px' : 0 }, style) }, children));
8838
8855
  };
8839
8856
  var Scroll$1 = memo(Scroll);
8840
8857
 
8841
- const CommodityGroup = ({ products, data, defImg, style }) => {
8842
- var _a, _b;
8843
- const { setPopupDetailData, popupDetailData } = useSxpDataSource();
8844
- const [check, setCheck] = useState((_a = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.multiCheckIndex) !== null && _a !== void 0 ? _a : 0);
8845
- const handleClick = useCallback((index) => {
8846
- setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData((val) => (Object.assign(Object.assign({}, val), { video: Object.assign(Object.assign({}, val === null || val === void 0 ? void 0 : val.video), { bindProduct: products === null || products === void 0 ? void 0 : products[index] }), multiCheckIndex: index })));
8847
- }, []);
8848
- 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) > 0) || !popupDetailData) && (React.createElement(Scroll$1, { isPadding: false, style: Object.assign(Object.assign({}, style), data === null || data === void 0 ? void 0 : data.style) }, (_b = (popupDetailData ? products : [0, 1, 2, 3])) === null || _b === void 0 ? void 0 : _b.map((item, index) => {
8858
+ const CommodityGroup = ({ products, data, defImg, style, onCLick, popupDetailData, check }) => {
8859
+ var _a;
8860
+ const { productView } = useEventReport();
8861
+ const { popupCurTimeRef } = useSxpDataSource();
8862
+ const handleClick = (item, index) => {
8863
+ if (check === index)
8864
+ return;
8865
+ productView(popupDetailData, item, item === null || item === void 0 ? void 0 : item.bindCta, popupCurTimeRef.current, popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index);
8866
+ onCLick === null || onCLick === void 0 ? void 0 : onCLick(index);
8867
+ };
8868
+ 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) => {
8849
8869
  var _a, _b, _c;
8850
- return (React.createElement(SwiperSlide, { className: css({
8870
+ return (React.createElement(React.Fragment, null, (item === null || item === void 0 ? void 0 : item.bindCta) ? (React.createElement(SwiperSlide, { className: css({
8851
8871
  width: '50px',
8852
8872
  height: '50px',
8853
8873
  marginRight: '10px'
8854
- }), onClick: () => handleClick(index), key: index },
8874
+ }), onClick: () => {
8875
+ handleClick(item, index);
8876
+ }, key: index },
8855
8877
  React.createElement(FormatImage$1, { style: {
8856
8878
  height: '100%',
8857
8879
  width: '100%',
8858
8880
  objectFit: 'cover',
8859
8881
  display: 'block',
8860
- objectPosition: `50% ${(data === null || data === void 0 ? void 0 : data.translateY) ? -(data === null || data === void 0 ? void 0 : data.translateY) + 50 : 50}%`,
8861
- border: check === index ? '1px solid #000' : '1px solid #f2f2f2'
8862
- }, src: (_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 : defImg })));
8882
+ objectPosition: `50% ${(data === null || data === void 0 ? void 0 : data.translateY) ? (data === null || data === void 0 ? void 0 : data.translateY) + 50 : 50}%`,
8883
+ border: check === index ? '1px solid #000' : '1px solid #f2f2f2',
8884
+ boxSizing: 'border-box'
8885
+ }, src: (_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 : defImg }))) : null));
8863
8886
  })))));
8864
8887
  };
8865
8888
  var CommodityGroup$1 = memo(CommodityGroup);
8866
8889
 
8867
8890
  const CommodityDetail$1 = (_a) => {
8868
- var _b, _c, _d, _e, _f, _g, _h, _j, _k;
8891
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
8869
8892
  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"]);
8870
- const { sxpParameter } = useSxpDataSource();
8871
- const { popupDetailData, bffEventReport, isPreview, bffFbReport } = useSxpDataSource();
8893
+ const { sxpParameter, popupDetailData, isPreview, bffFbReport, popupCurTimeRef, checkCommodityIndexRef } = useSxpDataSource();
8872
8894
  const { jumpToWeb, productView } = useEventReport();
8873
8895
  const curTimeRef = useRef(null);
8874
8896
  const [showModal, setShowModal] = useState(false);
8875
8897
  const [show3DModal, setShow3DModal] = useState(false);
8898
+ const [checkCommodityIndex, setCheckCommodityIndex] = useState((_b = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.multiCheckIndex) !== null && _b !== void 0 ? _b : 0);
8876
8899
  const data = isPost ? rec : popupDetailData;
8877
- const product = isPost ? data === null || data === void 0 ? void 0 : data.product : (_b = data === null || data === void 0 ? void 0 : data.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
8878
- const cta = isPost ? (_c = data === null || data === void 0 ? void 0 : data.product) === null || _c === void 0 ? void 0 : _c.bindCta : (_e = (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.bindProduct) === null || _e === void 0 ? void 0 : _e.bindCta;
8900
+ let product = isPost ? data === null || data === void 0 ? void 0 : data.product : (_d = (_c = data === null || data === void 0 ? void 0 : data.video) === null || _c === void 0 ? void 0 : _c.bindProduct) !== null && _d !== void 0 ? _d : (_f = (_e = data === null || data === void 0 ? void 0 : data.video) === null || _e === void 0 ? void 0 : _e.bindProducts) === null || _f === void 0 ? void 0 : _f[0];
8901
+ let cta = isPost
8902
+ ? (_g = data === null || data === void 0 ? void 0 : data.product) === null || _g === void 0 ? void 0 : _g.bindCta
8903
+ : (_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;
8879
8904
  const position = isPost ? index : popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
8905
+ 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) {
8906
+ checkCommodityIndexRef.current = checkCommodityIndex;
8907
+ const p = (_s = data === null || data === void 0 ? void 0 : data.video) === null || _s === void 0 ? void 0 : _s.bindProducts[checkCommodityIndex];
8908
+ product = p;
8909
+ cta = p === null || p === void 0 ? void 0 : p.bindCta;
8910
+ }
8880
8911
  const handleLink = () => {
8881
8912
  if (product === null || product === void 0 ? void 0 : product.link) {
8882
8913
  jumpToWeb(data, product, cta, position);
@@ -8914,9 +8945,9 @@ const CommodityDetail$1 = (_a) => {
8914
8945
  return '$7,000';
8915
8946
  }
8916
8947
  }, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency]);
8917
- const width = isPreview ? 375 : (_f = style === null || style === void 0 ? void 0 : style.width) !== null && _f !== void 0 ? _f : window.innerWidth;
8948
+ const width = isPreview ? 375 : (_t = style === null || style === void 0 ? void 0 : style.width) !== null && _t !== void 0 ? _t : window.innerWidth;
8918
8949
  const renderContent = ({ isPost }) => {
8919
- var _a, _b, _c;
8950
+ var _a, _b, _c, _d;
8920
8951
  return (React.createElement("div", null,
8921
8952
  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: {
8922
8953
  __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)
@@ -8927,8 +8958,11 @@ const CommodityDetail$1 = (_a) => {
8927
8958
  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: {
8928
8959
  __html: setFontForText(priceText, commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price)
8929
8960
  } }),
8961
+ 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: {
8962
+ __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)
8963
+ } }),
8930
8964
  React.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
8931
- 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
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: (_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
8932
8966
  bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
8933
8967
  collection is unisex and is inspired by the padlock pattern found in the Tiffany Antique Collection. This
8934
8968
  necklace features a stylish and eye-catching oval clasp chain decorated with a lock pattern. Crafted from
@@ -8947,15 +8981,20 @@ const CommodityDetail$1 = (_a) => {
8947
8981
  }
8948
8982
  return style;
8949
8983
  }, []);
8984
+ const handleClick = useCallback((index) => {
8985
+ popupCurTimeRef.current = new Date();
8986
+ setCheckCommodityIndex(index);
8987
+ checkCommodityIndexRef.current = index;
8988
+ }, []);
8950
8989
  const renderCommodityGroup = useCallback(() => {
8951
8990
  var _a, _b, _c;
8952
8991
  if (isPost)
8953
8992
  return;
8954
- return (React.createElement(CommodityGroup$1, { products: (_a = data === null || data === void 0 ? void 0 : data.video) === null || _a === void 0 ? void 0 : _a.bindProducts, data: commodityGroup, defImg: (_c = (_b = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _b !== void 0 ? _b : bottom_image) !== null && _c !== void 0 ? _c : '', style: { padding: '0 19px' } }));
8955
- }, []);
8993
+ return (React.createElement(CommodityGroup$1, { products: (_a = data === null || data === void 0 ? void 0 : data.video) === null || _a === void 0 ? void 0 : _a.bindProducts, data: commodityGroup, defImg: (_c = (_b = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _b !== void 0 ? _b : bottom_image) !== null && _c !== void 0 ? _c : '', style: { padding: '0 19px' }, onCLick: handleClick, popupDetailData: popupDetailData, check: checkCommodityIndex }));
8994
+ }, [checkCommodityIndex]);
8956
8995
  return (React.createElement(React.Fragment, null,
8957
8996
  React.createElement("div", Object.assign({ className: css(Object.assign({}, style)) }, props),
8958
- product && ((_g = product === null || product === void 0 ? void 0 : product.homePage) === null || _g === void 0 ? void 0 : _g.length) > 0 && (React.createElement("div", { style: { position: 'relative' } },
8997
+ product && ((_u = product === null || product === void 0 ? void 0 : product.homePage) === null || _u === void 0 ? void 0 : _u.length) > 0 && (React.createElement("div", { style: { position: 'relative' } },
8959
8998
  React.createElement(Swiper, { height: width, modules: [Pagination, Autoplay], pagination: {
8960
8999
  clickable: true,
8961
9000
  bulletActiveClass: 'swipe-item-active-bullet',
@@ -8965,7 +9004,8 @@ const CommodityDetail$1 = (_a) => {
8965
9004
  }, loop: true, autoplay: {
8966
9005
  delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
8967
9006
  } },
8968
- React.createElement(React.Fragment, null, (_h = product === null || product === void 0 ? void 0 : product.homePage) === null || _h === void 0 ? void 0 : _h.map((src) => {
9007
+ React.createElement(React.Fragment, null, (_v = product === null || product === void 0 ? void 0 : product.homePage) === null || _v === void 0 ? void 0 : _v.map((src) => {
9008
+ var _a;
8969
9009
  return (React.createElement(SwiperSlide, { key: src },
8970
9010
  React.createElement("div", { style: {
8971
9011
  overflow: 'hidden',
@@ -8978,9 +9018,9 @@ const CommodityDetail$1 = (_a) => {
8978
9018
  objectFit: 'cover',
8979
9019
  display: 'block',
8980
9020
  objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
8981
- }, src: src }))));
9021
+ }, 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 }))));
8982
9022
  }))))),
8983
- !((_j = product === null || product === void 0 ? void 0 : product.homePage) === null || _j === void 0 ? void 0 : _j.length) && (React.createElement("div", { className: css({
9023
+ !((_w = product === null || product === void 0 ? void 0 : product.homePage) === null || _w === void 0 ? void 0 : _w.length) && (React.createElement("div", { className: css({
8984
9024
  position: 'relative',
8985
9025
  height: 0,
8986
9026
  width: '100%',
@@ -8993,7 +9033,7 @@ const CommodityDetail$1 = (_a) => {
8993
9033
  top: 0,
8994
9034
  objectFit: 'cover',
8995
9035
  width: '100%'
8996
- }), src: (_k = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _k !== void 0 ? _k : bottom_image, alt: 'pdp image' }))),
9036
+ }), src: (_x = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _x !== void 0 ? _x : bottom_image, alt: 'pdp image' }))),
8997
9037
  renderCommodityGroup(),
8998
9038
  React.createElement("div", { className: 'pb-commondity-content' }, renderContent({ isPost }))),
8999
9039
  renderBtn(),
@@ -9042,7 +9082,7 @@ var interactionRender$c = [
9042
9082
  * @Author: binruan@chatlabs.com
9043
9083
  * @Date: 2023-07-28 18:29:57
9044
9084
  * @LastEditors: binruan@chatlabs.com
9045
- * @LastEditTime: 2024-07-12 17:40:06
9085
+ * @LastEditTime: 2024-07-31 13:58:45
9046
9086
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetail\material.tsx
9047
9087
  *
9048
9088
  */
@@ -9080,6 +9120,12 @@ const CommodityDetail = createMaterial(CommodityDetailComponent, {
9080
9120
  info: {
9081
9121
  color: 'gray',
9082
9122
  fontSize: 12
9123
+ },
9124
+ taxInfo: {
9125
+ color: '#000',
9126
+ fontSize: 13,
9127
+ textAlign: 'left',
9128
+ marginBottom: '10px'
9083
9129
  }
9084
9130
  },
9085
9131
  buttonStyle: {
@@ -9562,21 +9608,29 @@ var settingRender$6 = [
9562
9608
  ];
9563
9609
 
9564
9610
  const CommodityDetailDiroNew$1 = (_a) => {
9565
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
9611
+ 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;
9566
9612
  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"]);
9567
9613
  useState(true);
9568
- const { sxpParameter } = useSxpDataSource();
9569
- const { popupDetailData, bffEventReport, isPreview, swiperRef, bffFbReport } = useSxpDataSource();
9614
+ const { sxpParameter, popupCurTimeRef, popupDetailData, isPreview, bffFbReport, checkCommodityIndexRef } = useSxpDataSource();
9570
9615
  const { jumpToWeb, productView } = useEventReport();
9571
9616
  useState(false);
9572
9617
  useState(false);
9573
9618
  useState(true);
9574
9619
  const [showModal, setShowModal] = useState(false);
9575
9620
  const curTimeRef = useRef(null);
9621
+ const [checkCommodityIndex, setCheckCommodityIndex] = useState((_b = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.multiCheckIndex) !== null && _b !== void 0 ? _b : 0);
9576
9622
  const data = isPost ? rec : popupDetailData;
9577
- const product = isPost ? data === null || data === void 0 ? void 0 : data.product : (_b = data === null || data === void 0 ? void 0 : data.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
9578
- const cta = isPost ? (_c = data === null || data === void 0 ? void 0 : data.product) === null || _c === void 0 ? void 0 : _c.bindCta : (_e = (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.bindProduct) === null || _e === void 0 ? void 0 : _e.bindCta;
9623
+ let product = isPost ? data === null || data === void 0 ? void 0 : data.product : (_d = (_c = data === null || data === void 0 ? void 0 : data.video) === null || _c === void 0 ? void 0 : _c.bindProduct) !== null && _d !== void 0 ? _d : (_f = (_e = data === null || data === void 0 ? void 0 : data.video) === null || _e === void 0 ? void 0 : _e.bindProducts) === null || _f === void 0 ? void 0 : _f[0];
9624
+ let cta = isPost
9625
+ ? (_g = data === null || data === void 0 ? void 0 : data.product) === null || _g === void 0 ? void 0 : _g.bindCta
9626
+ : (_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;
9579
9627
  const position = isPost ? index : popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
9628
+ 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) {
9629
+ checkCommodityIndexRef.current = checkCommodityIndex;
9630
+ const p = (_s = data === null || data === void 0 ? void 0 : data.video) === null || _s === void 0 ? void 0 : _s.bindProducts[checkCommodityIndex];
9631
+ product = p;
9632
+ cta = p === null || p === void 0 ? void 0 : p.bindCta;
9633
+ }
9580
9634
  const handleLink = () => {
9581
9635
  if (product === null || product === void 0 ? void 0 : product.link) {
9582
9636
  jumpToWeb(data, product, cta, position);
@@ -9614,7 +9668,7 @@ const CommodityDetailDiroNew$1 = (_a) => {
9614
9668
  return '£102,300.00';
9615
9669
  }
9616
9670
  }, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency]);
9617
- const width = isPreview ? 375 : (_f = style === null || style === void 0 ? void 0 : style.width) !== null && _f !== void 0 ? _f : window.innerWidth;
9671
+ const width = isPreview ? 375 : (_t = style === null || style === void 0 ? void 0 : style.width) !== null && _t !== void 0 ? _t : window.innerWidth;
9618
9672
  // useEffect(() => {
9619
9673
  // console.log(scrollRef?.current?.scrollHeight, window.innerHeight);
9620
9674
  // if (scrollRef?.current && scrollRef?.current?.scrollHeight > window.innerHeight) {
@@ -9677,15 +9731,20 @@ Made in Italy` })));
9677
9731
  }
9678
9732
  return style;
9679
9733
  }, []);
9734
+ const handleClick = useCallback((index) => {
9735
+ popupCurTimeRef.current = new Date();
9736
+ setCheckCommodityIndex(index);
9737
+ checkCommodityIndexRef.current = index;
9738
+ }, []);
9680
9739
  const renderCommodityGroup = useCallback(() => {
9681
9740
  var _a, _b, _c;
9682
9741
  if (isPost)
9683
9742
  return;
9684
- return (React.createElement(CommodityGroup$1, { products: (_a = data === null || data === void 0 ? void 0 : data.video) === null || _a === void 0 ? void 0 : _a.bindProducts, data: commodityGroup, defImg: (_c = (_b = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _b !== void 0 ? _b : bottom_image) !== null && _c !== void 0 ? _c : '', style: { padding: '0 19px' } }));
9685
- }, []);
9743
+ return (React.createElement(CommodityGroup$1, { products: (_a = data === null || data === void 0 ? void 0 : data.video) === null || _a === void 0 ? void 0 : _a.bindProducts, data: commodityGroup, defImg: (_c = (_b = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _b !== void 0 ? _b : bottom_image) !== null && _c !== void 0 ? _c : '', style: { padding: '0 19px' }, onCLick: handleClick, popupDetailData: popupDetailData, check: checkCommodityIndex }));
9744
+ }, [checkCommodityIndex]);
9686
9745
  return (React.createElement("div", { className: 'pb-commondityDiroNew' },
9687
- React.createElement("div", Object.assign({ className: css(Object.assign({}, style)) }, props),
9688
- product && ((_g = product === null || product === void 0 ? void 0 : product.homePage) === null || _g === void 0 ? void 0 : _g.length) > 0 && (React.createElement(Swiper, { height: width, modules: [Pagination, Autoplay], pagination: {
9746
+ React.createElement("div", Object.assign({ className: css(Object.assign(Object.assign({}, style), { transform: 'translate3d(0px, 0px, 0px)' })) }, props),
9747
+ product && ((_u = product === null || product === void 0 ? void 0 : product.homePage) === null || _u === void 0 ? void 0 : _u.length) > 0 && (React.createElement(Swiper, { height: width, modules: [Pagination, Autoplay], pagination: {
9689
9748
  clickable: true,
9690
9749
  bulletActiveClass: 'commondityDiroNew-swipe-item-active-bullet',
9691
9750
  clickableClass: (swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign) === 'left'
@@ -9693,7 +9752,8 @@ Made in Italy` })));
9693
9752
  : 'commondityDiroNew-swiper-clickable-center'
9694
9753
  }, loop: true, autoplay: {
9695
9754
  delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
9696
- } }, (_h = product === null || product === void 0 ? void 0 : product.homePage) === null || _h === void 0 ? void 0 : _h.map((src) => {
9755
+ } }, (_v = product === null || product === void 0 ? void 0 : product.homePage) === null || _v === void 0 ? void 0 : _v.map((src) => {
9756
+ var _a;
9697
9757
  return (React.createElement(SwiperSlide, { key: src },
9698
9758
  React.createElement("div", { style: {
9699
9759
  overflow: 'hidden',
@@ -9706,9 +9766,9 @@ Made in Italy` })));
9706
9766
  objectFit: 'cover',
9707
9767
  display: 'block',
9708
9768
  objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
9709
- }, src: src }))));
9769
+ }, 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 }))));
9710
9770
  }))),
9711
- !((_j = product === null || product === void 0 ? void 0 : product.homePage) === null || _j === void 0 ? void 0 : _j.length) && (React.createElement("div", { className: css({
9771
+ !((_w = product === null || product === void 0 ? void 0 : product.homePage) === null || _w === void 0 ? void 0 : _w.length) && (React.createElement("div", { className: css({
9712
9772
  position: 'relative',
9713
9773
  height: 0,
9714
9774
  width: '100%',
@@ -9721,13 +9781,13 @@ Made in Italy` })));
9721
9781
  top: 0,
9722
9782
  objectFit: 'cover',
9723
9783
  width: '100%'
9724
- }), src: (_k = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _k !== void 0 ? _k : bottom_image, alt: 'pdp image' }))),
9784
+ }), src: (_x = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _x !== void 0 ? _x : bottom_image, alt: 'pdp image' }))),
9725
9785
  renderCommodityGroup(),
9726
9786
  React.createElement("div", { className: 'pb-commondityDiroNew-content' },
9727
9787
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top' },
9728
9788
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top-left' },
9729
9789
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top-left-title', style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title), dangerouslySetInnerHTML: {
9730
- __html: setFontForText((_l = product === null || product === void 0 ? void 0 : product.title) !== null && _l !== void 0 ? _l : 'Large Dior Toujours BagLarge', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title)
9790
+ __html: setFontForText((_y = product === null || product === void 0 ? void 0 : product.title) !== null && _y !== void 0 ? _y : 'Large Dior Toujours BagLarge', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title)
9731
9791
  } }),
9732
9792
  React.createElement("div", { className: 'pb-commondityDiroNew-content-collection', hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.collection) || (product === null || product === void 0 ? void 0 : product.collection) === ''), style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection), dangerouslySetInnerHTML: {
9733
9793
  __html: setFontForText((product === null || product === void 0 ? void 0 : product.collection) || 'Black Macrocannage CalfskinLarge', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection)
@@ -9737,11 +9797,11 @@ Made in Italy` })));
9737
9797
  __html: setFontForText(priceText, commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price)
9738
9798
  } }),
9739
9799
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top-right-price', hidden: !!product && !(product === null || product === void 0 ? void 0 : product.taxInfo), style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.taxInfo), dangerouslySetInnerHTML: {
9740
- __html: setFontForText((_m = product === null || product === void 0 ? void 0 : product.taxInfo) !== null && _m !== void 0 ? _m : '税费', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.taxInfo)
9800
+ __html: setFontForText((_z = product === null || product === void 0 ? void 0 : product.taxInfo) !== null && _z !== void 0 ? _z : '税费', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.taxInfo)
9741
9801
  } }))),
9742
- (!product || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("button", { "aria-label": (_o = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _o !== void 0 ? _o : 'Shop now', onClick: handleLink, className: 'pb-commondityDiroNew-btn', style: buttonStyle },
9802
+ (!product || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("button", { "aria-label": (_0 = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _0 !== void 0 ? _0 : 'Shop now', onClick: handleLink, className: 'pb-commondityDiroNew-btn', style: buttonStyle },
9743
9803
  React.createElement("span", { dangerouslySetInnerHTML: {
9744
- __html: setFontForText((_p = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _p !== void 0 ? _p : 'Shop now', buttonStyle)
9804
+ __html: setFontForText((_1 = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _1 !== void 0 ? _1 : 'Shop now', buttonStyle)
9745
9805
  } }))),
9746
9806
  productInfoText({ isPost }))),
9747
9807
  React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) }, productInfoText({ isPost: false }))));
@@ -9987,6 +10047,11 @@ var settingRender$5 = [
9987
10047
  type: 'Group',
9988
10048
  label: '尺寸',
9989
10049
  child: [
10050
+ {
10051
+ type: 'Number',
10052
+ name: ['props', 'buttonStyle', 'width'],
10053
+ addonAfter: 'W'
10054
+ },
9990
10055
  {
9991
10056
  type: 'Number',
9992
10057
  name: ['props', 'buttonStyle', 'height'],
@@ -10095,18 +10160,18 @@ function useOnScreen(ref) {
10095
10160
  * @FilePath: \pb-sxp-ui\src\materials\sxp\template\components\Img.tsx
10096
10161
  *
10097
10162
  */
10098
- const Img = ({ src, rec, item, index, style, translateY, imgStyle }) => {
10163
+ const Img = ({ src, rec, item, index, style, translateY, imgStyle, enableEventReport = true }) => {
10099
10164
  const ref = useRef(null);
10100
10165
  const isOnScreen = useOnScreen(ref);
10101
10166
  const { ctaEvent } = useSxpDataSource();
10102
10167
  useEffect(() => {
10103
- if (isOnScreen && src && (ref === null || ref === void 0 ? void 0 : ref.current)) {
10168
+ if (isOnScreen && src && (ref === null || ref === void 0 ? void 0 : ref.current) && enableEventReport) {
10104
10169
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
10105
10170
  eventSubject: 'ctaExposure',
10106
10171
  eventDescription: 'The cta was shown to the user'
10107
10172
  }, rec, item, index);
10108
10173
  }
10109
- }, [isOnScreen, src, ref, rec, ctaEvent, item, index]);
10174
+ }, [isOnScreen, src, ref, rec, ctaEvent, item, index, enableEventReport]);
10110
10175
  useMemo(() => {
10111
10176
  return (src === null || src === void 0 ? void 0 : src.includes('.avif')) ? src : `${src}?imrquality/rquality/20`;
10112
10177
  }, [src]);
@@ -10116,41 +10181,12 @@ const Img = ({ src, rec, item, index, style, translateY, imgStyle }) => {
10116
10181
  };
10117
10182
  var Img$1 = memo(Img);
10118
10183
 
10119
- const EventProvider = (_a) => {
10120
- var { rec, children, className, onClick, style, isExternalLink = false, index } = _a; __rest(_a, ["rec", "children", "className", "onClick", "style", "isExternalLink", "index"]);
10121
- const ref = useRef(null);
10122
- const { popup } = useEditor();
10123
- const { setPopupDetailData, ctaEvent } = useSxpDataSource();
10124
- const { jumpToWeb } = useEventReport();
10125
- const handleClick = throttle(() => {
10126
- var _a, _b, _c, _d, _e, _f, _g, _h;
10127
- const item = (_b = (_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.bindProduct) !== null && _b !== void 0 ? _b : rec === null || rec === void 0 ? void 0 : rec.video;
10128
- ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
10129
- eventSubject: 'clickCta',
10130
- eventDescription: 'User clicked the CTA'
10131
- }, rec, item, index);
10132
- setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, rec), { index }));
10133
- if (isExternalLink) {
10134
- if ((_d = (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProduct) === null || _d === void 0 ? void 0 : _d.link) {
10135
- const cta = (_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.bindCta;
10136
- const product = (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.bindProduct;
10137
- jumpToWeb(rec, product, cta, index);
10138
- window.location.href = window.getJointUtmLink((_h = (_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.bindProduct) === null || _h === void 0 ? void 0 : _h.link);
10139
- }
10140
- }
10141
- else {
10142
- onClick === null || onClick === void 0 ? void 0 : onClick();
10143
- }
10144
- }, popup === null || popup === void 0 ? void 0 : popup.duration);
10145
- return (React.createElement("div", { ref: ref, className: className, style: style, onClick: handleClick }, children));
10146
- };
10147
- var EventProvider$1 = memo(EventProvider);
10148
-
10149
10184
  const CommodityList$1 = (_a) => {
10150
10185
  var _b, _c;
10151
- var { style, isDefault, rec, viewTime, isPost, bottom_image, commodityStyles, buttonStyle, index, translateY = 0, commodityPicture, isExternalLink } = _a, props = __rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "commodityStyles", "buttonStyle", "index", "translateY", "commodityPicture", "isExternalLink"]);
10152
- const { sxpParameter } = useSxpDataSource();
10153
- const { popupDetailData, bffEventReport, isPreview, swiperRef, bffFbReport } = useSxpDataSource();
10186
+ 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"]);
10187
+ const { sxpParameter, popupDetailData, setPopupDetailData, ctaEvent } = useSxpDataSource();
10188
+ const { jumpToWeb } = useEventReport();
10189
+ const { popup } = useEditor();
10154
10190
  const recData = isPost ? rec : popupDetailData;
10155
10191
  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];
10156
10192
  const priceText = useCallback((product) => {
@@ -10164,25 +10200,40 @@ const CommodityList$1 = (_a) => {
10164
10200
  return '$7,000';
10165
10201
  }
10166
10202
  }, []);
10167
- 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) => {
10168
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
10169
- return (React.createElement(EventProvider$1, Object.assign({ key: index, isExternalLink: isExternalLink, rec: recData, index: index }, props, { className: css({
10203
+ const handleClick = throttle((item, multiCheckIndex) => {
10204
+ ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
10205
+ eventSubject: 'clickCta',
10206
+ eventDescription: 'User clicked the CTA'
10207
+ }, recData, item, index);
10208
+ setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, recData), { video: Object.assign(Object.assign({}, recData === null || recData === void 0 ? void 0 : recData.video), { bindProduct: item }), index, multiCheckIndex }));
10209
+ if (isExternalLink) {
10210
+ if (item === null || item === void 0 ? void 0 : item.link) {
10211
+ jumpToWeb(recData, item, item.bindCta, index);
10212
+ window.location.href = window.getJointUtmLink(item.link);
10213
+ }
10214
+ }
10215
+ else {
10216
+ onClick === null || onClick === void 0 ? void 0 : onClick();
10217
+ }
10218
+ }, popup === null || popup === void 0 ? void 0 : popup.duration);
10219
+ 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) => {
10220
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
10221
+ 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({
10170
10222
  display: 'flex'
10171
- }) }),
10172
- 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 }),
10223
+ }), onClick: () => handleClick(item, index) }),
10224
+ 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 }),
10173
10225
  React.createElement("div", { style: {
10174
- flex: 1,
10175
- 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)`,
10226
+ 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)`,
10176
10227
  display: 'flex',
10177
10228
  flexDirection: 'column',
10178
10229
  justifyContent: 'space-between'
10179
10230
  } },
10180
10231
  React.createElement("div", null,
10181
10232
  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: {
10182
- __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)
10233
+ __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)
10183
10234
  } }),
10184
10235
  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: {
10185
- __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)
10236
+ __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)
10186
10237
  } })),
10187
10238
  React.createElement("div", { className: css({
10188
10239
  display: 'flex',
@@ -10191,12 +10242,13 @@ const CommodityList$1 = (_a) => {
10191
10242
  width: '100%',
10192
10243
  overflow: 'hidden'
10193
10244
  }) },
10194
- 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: {
10195
- __html: setFontForText(priceText(item), commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price)
10196
- } }),
10197
- React.createElement("div", { className: 'one-line-ellipsis', style: Object.assign(Object.assign({}, buttonStyle), { padding: '0 15px', maxWidth: '100px' }), dangerouslySetInnerHTML: {
10198
- __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)
10199
- } })))));
10245
+ React.createElement("div", null,
10246
+ 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: {
10247
+ __html: setFontForText(priceText(item), commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price)
10248
+ } })),
10249
+ React.createElement("div", { className: 'one-line-ellipsis', style: Object.assign(Object.assign({}, buttonStyle), { padding: '0 15px' }), dangerouslySetInnerHTML: {
10250
+ __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)
10251
+ } })))))));
10200
10252
  })));
10201
10253
  };
10202
10254
  var CommodityListComponent = memo(CommodityList$1);
@@ -10233,7 +10285,7 @@ var interactionRender$9 = [
10233
10285
  * @Author: binruan@chatlabs.com
10234
10286
  * @Date: 2024-03-20 10:27:31
10235
10287
  * @LastEditors: binruan@chatlabs.com
10236
- * @LastEditTime: 2024-07-09 16:04:28
10288
+ * @LastEditTime: 2024-07-26 17:33:03
10237
10289
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityList\material.tsx
10238
10290
  *
10239
10291
  */
@@ -10272,6 +10324,7 @@ const CommodityList = createMaterial(CommodityListComponent, {
10272
10324
  backgroundColor: '#000',
10273
10325
  fontSize: 12,
10274
10326
  height: 30,
10327
+ width: 100,
10275
10328
  textAlign: 'center',
10276
10329
  color: '#fff',
10277
10330
  lineHeight: 2.5
@@ -10555,6 +10608,36 @@ var interactionRender$8 = [
10555
10608
  }
10556
10609
  ];
10557
10610
 
10611
+ const EventProvider = (_a) => {
10612
+ var { rec, children, className, onClick, style, isExternalLink = false, index } = _a; __rest(_a, ["rec", "children", "className", "onClick", "style", "isExternalLink", "index"]);
10613
+ const ref = useRef(null);
10614
+ const { popup } = useEditor();
10615
+ const { setPopupDetailData, ctaEvent } = useSxpDataSource();
10616
+ const { jumpToWeb } = useEventReport();
10617
+ const handleClick = throttle(() => {
10618
+ var _a, _b, _c, _d, _e, _f, _g, _h;
10619
+ const item = (_b = (_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.bindProduct) !== null && _b !== void 0 ? _b : rec === null || rec === void 0 ? void 0 : rec.video;
10620
+ ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
10621
+ eventSubject: 'clickCta',
10622
+ eventDescription: 'User clicked the CTA'
10623
+ }, rec, item, index);
10624
+ setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, rec), { index }));
10625
+ if (isExternalLink) {
10626
+ if ((_d = (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProduct) === null || _d === void 0 ? void 0 : _d.link) {
10627
+ const cta = (_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.bindCta;
10628
+ const product = (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.bindProduct;
10629
+ jumpToWeb(rec, product, cta, index);
10630
+ window.location.href = window.getJointUtmLink((_h = (_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.bindProduct) === null || _h === void 0 ? void 0 : _h.link);
10631
+ }
10632
+ }
10633
+ else {
10634
+ onClick === null || onClick === void 0 ? void 0 : onClick();
10635
+ }
10636
+ }, popup === null || popup === void 0 ? void 0 : popup.duration);
10637
+ return (React.createElement("div", { ref: ref, className: className, style: style, onClick: handleClick }, children));
10638
+ };
10639
+ var EventProvider$1 = memo(EventProvider);
10640
+
10558
10641
  var styles$8 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__3bKKx"};
10559
10642
 
10560
10643
  const Commodity$1 = (_a) => {
@@ -11125,12 +11208,12 @@ const MultiCommodityDiro$1 = (_a) => {
11125
11208
  const { popup } = useEditor();
11126
11209
  const { jumpToWeb } = useEventReport();
11127
11210
  const [products, setProducts] = useState((_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [1, 2]);
11128
- const handleClick = throttle((item) => {
11211
+ const handleClick = throttle((item, multiCheckIndex) => {
11129
11212
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
11130
11213
  eventSubject: 'clickCta',
11131
11214
  eventDescription: 'User clicked the CTA'
11132
11215
  }, recData, item, index);
11133
- setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, recData), { video: Object.assign(Object.assign({}, recData === null || recData === void 0 ? void 0 : recData.video), { bindProduct: item }), index }));
11216
+ setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, recData), { video: Object.assign(Object.assign({}, recData === null || recData === void 0 ? void 0 : recData.video), { bindProduct: item }), index, multiCheckIndex }));
11134
11217
  if (isExternalLink) {
11135
11218
  if (item === null || item === void 0 ? void 0 : item.link) {
11136
11219
  jumpToWeb(recData, item, item.bindCta, index);
@@ -11143,7 +11226,7 @@ const MultiCommodityDiro$1 = (_a) => {
11143
11226
  }, popup === null || popup === void 0 ? void 0 : popup.duration);
11144
11227
  return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item, index) => {
11145
11228
  var _a, _b, _c, _d, _e, _f, _g, _h;
11146
- return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, Object.assign({ key: index, className: css(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item) }),
11229
+ return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, Object.assign({ key: index, className: css(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item, index) }),
11147
11230
  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: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img }),
11148
11231
  React.createElement("div", { className: css({
11149
11232
  color: '#000',
@@ -11241,12 +11324,12 @@ const MultiCommodity$1 = (_a) => {
11241
11324
  const { popup } = useEditor();
11242
11325
  const [products, setProducts] = useState((_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [1, 2]);
11243
11326
  const { jumpToWeb } = useEventReport();
11244
- const handleClick = throttle((item) => {
11327
+ const handleClick = throttle((item, multiCheckIndex) => {
11245
11328
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
11246
11329
  eventSubject: 'clickCta',
11247
11330
  eventDescription: 'User clicked the CTA'
11248
11331
  }, recData, item, index);
11249
- setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, recData), { video: Object.assign(Object.assign({}, recData === null || recData === void 0 ? void 0 : recData.video), { bindProduct: item }), index }));
11332
+ setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, recData), { video: Object.assign(Object.assign({}, recData === null || recData === void 0 ? void 0 : recData.video), { bindProduct: item }), index, multiCheckIndex }));
11250
11333
  if (isExternalLink) {
11251
11334
  if (item === null || item === void 0 ? void 0 : item.link) {
11252
11335
  jumpToWeb(recData, item, item.bindCta, index);
@@ -11259,7 +11342,7 @@ const MultiCommodity$1 = (_a) => {
11259
11342
  }, popup === null || popup === void 0 ? void 0 : popup.duration);
11260
11343
  return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item, index) => {
11261
11344
  var _a, _b, _c, _d, _e, _f, _g, _h;
11262
- return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, Object.assign({ key: index, className: css(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item) }),
11345
+ return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, Object.assign({ key: index, className: css(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item, index) }),
11263
11346
  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: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img }),
11264
11347
  React.createElement("div", { className: css({
11265
11348
  color: '#fff',
@@ -13975,11 +14058,12 @@ const AniLink$1 = (_a) => {
13975
14058
  }
13976
14059
  }, [event === null || event === void 0 ? void 0 : event.animation]);
13977
14060
  useEffect(() => {
14061
+ var _a, _b, _c;
13978
14062
  if (isOnScreen && (ref === null || ref === void 0 ? void 0 : ref.current)) {
13979
14063
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
13980
14064
  eventSubject: 'ctaExposure',
13981
14065
  eventDescription: 'The cta was shown to the user'
13982
- }, recData, product, index);
14066
+ }, recData, ((_b = (_a = recData === null || recData === void 0 ? void 0 : recData.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b[0]) || ((_c = recData === null || recData === void 0 ? void 0 : recData.video) === null || _c === void 0 ? void 0 : _c.bindProduct) || (recData === null || recData === void 0 ? void 0 : recData.video), index);
13983
14067
  }
13984
14068
  }, [isOnScreen]);
13985
14069
  useEffect(() => {
@@ -14365,14 +14449,11 @@ var styles = {"aniLinkPopup":"index-module_aniLinkPopup__YT7kj","animated-fadeIn
14365
14449
  const closeIcon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII=';
14366
14450
  const AniLinkPopup$1 = (_a) => {
14367
14451
  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;
14368
- var { style, recData, ctaTempStyles, index, event, bottom_image, translateY, isTel, onClick, isExternalLink = false } = _a, props = __rest(_a, ["style", "recData", "ctaTempStyles", "index", "event", "bottom_image", "translateY", "isTel", "onClick", "isExternalLink"]);
14452
+ var { style, recData, ctaTempStyles, index, event, bottom_image, translateY, isTel, onClick, isExternalLink = false, isActive } = _a, props = __rest(_a, ["style", "recData", "ctaTempStyles", "index", "event", "bottom_image", "translateY", "isTel", "onClick", "isExternalLink", "isActive"]);
14369
14453
  style === null || style === void 0 ? true : delete style.transform;
14370
14454
  const { sxpParameter, globalConfig, ctaEvent, setPopupDetailData } = useSxpDataSource();
14371
14455
  const { jumpToWeb } = useEventReport();
14372
- const ref = useRef(null);
14373
- const isOnScreen = useOnScreen(ref);
14374
- const [visible, setVisible] = useState(false);
14375
- const [startAni, setStartAni] = useState(true);
14456
+ const [visible, setVisible] = useState(true);
14376
14457
  const cta = ((_d = (_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.bindCta) || ((_f = (_e = recData === null || recData === void 0 ? void 0 : recData.video) === null || _e === void 0 ? void 0 : _e.bindProduct) === null || _f === void 0 ? void 0 : _f.bindCta) || ((_g = recData === null || recData === void 0 ? void 0 : recData.video) === null || _g === void 0 ? void 0 : _g.bindCta);
14377
14458
  const product = ((_j = (_h = recData === null || recData === void 0 ? void 0 : recData.video) === null || _h === void 0 ? void 0 : _h.bindProducts) === null || _j === void 0 ? void 0 : _j[0]) || ((_k = recData === null || recData === void 0 ? void 0 : recData.video) === null || _k === void 0 ? void 0 : _k.bindProduct);
14378
14459
  const handleTo = () => {
@@ -14408,26 +14489,21 @@ const AniLinkPopup$1 = (_a) => {
14408
14489
  const src = (_q = (_p = (_o = (_l = product === null || product === void 0 ? void 0 : product.cover) !== null && _l !== void 0 ? _l : (_m = product === null || product === void 0 ? void 0 : product.homePage) === null || _m === void 0 ? void 0 : _m[0]) !== null && _o !== void 0 ? _o : cta === null || cta === void 0 ? void 0 : cta.icon) !== null && _p !== void 0 ? _p : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _q !== void 0 ? _q : bottom_image;
14409
14490
  const onClose = (event) => {
14410
14491
  event.stopPropagation();
14411
- setStartAni(false);
14492
+ setVisible(false);
14412
14493
  };
14413
14494
  useEffect(() => {
14414
- if (isOnScreen) {
14415
- setVisible(true);
14416
- }
14417
- else {
14418
- setVisible(false);
14419
- }
14420
- }, [isOnScreen]);
14495
+ setVisible(true);
14496
+ }, [isActive]);
14421
14497
  const aniNamStyle = useMemo(() => {
14422
- if (!visible)
14498
+ if (!isActive)
14423
14499
  return null;
14424
- return startAni ? styles['animated-fadeIn'] : null;
14425
- }, [visible, startAni]);
14500
+ return visible ? styles['animated-fadeIn'] : null;
14501
+ }, [isActive, visible]);
14426
14502
  return (React.createElement(React.Fragment, null, isTel ? (React.createElement("div", { style: {
14427
14503
  height: '40px',
14428
14504
  lineHeight: '40px',
14429
14505
  paddingLeft: '6px'
14430
- } }, "Cta Title")) : (React.createElement(React.Fragment, null, aniNamStyle ? (React.createElement("div", Object.assign({ ref: ref }, props, { className: `${css(Object.assign(Object.assign({}, style), { '--transY': `translateY(calc(100% + ${(_r = style === null || style === void 0 ? void 0 : style.margin) !== null && _r !== void 0 ? _r : 0}px))` }))} ${styles['aniLinkPopup']} ${aniNamStyle} ${css(aniTimStyle)}`, onClick: handleTo }),
14506
+ } }, "Cta Title")) : (React.createElement("div", Object.assign({}, props, { className: `${css(Object.assign(Object.assign({}, style), { '--transY': `translateY(calc(100% + ${(_r = style === null || style === void 0 ? void 0 : style.margin) !== null && _r !== void 0 ? _r : 0}px))` }))} ${styles['aniLinkPopup']} ${aniNamStyle} ${css(aniTimStyle)}`, onClick: handleTo }),
14431
14507
  React.createElement("div", { onClick: onClose, className: styles['modal-icon-wrapper'], style: { padding: (_s = style === null || style === void 0 ? void 0 : style['padding']) !== null && _s !== void 0 ? _s : 0 } },
14432
14508
  React.createElement("img", { src: (_t = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.popupCloseIcon) !== null && _t !== void 0 ? _t : closeIcon, alt: 'close', className: styles['modal-icon-wrapper-img'] })),
14433
14509
  React.createElement(Img$1, { src: src, rec: recData, item: (_y = (_w = (_v = (_u = recData === null || recData === void 0 ? void 0 : recData.video) === null || _u === void 0 ? void 0 : _u.bindProducts) === null || _v === void 0 ? void 0 : _v[0]) !== null && _w !== void 0 ? _w : (_x = recData === null || recData === void 0 ? void 0 : recData.video) === null || _x === void 0 ? void 0 : _x.bindProduct) !== null && _y !== void 0 ? _y : recData === null || recData === void 0 ? void 0 : recData.video, index: index, translateY: translateY, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img }),
@@ -14436,7 +14512,7 @@ const AniLinkPopup$1 = (_a) => {
14436
14512
  } })),
14437
14513
  React.createElement("div", { className: styles['one-line-ellipsis'], style: Object.assign(Object.assign({}, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle), { lineHeight: ((_0 = ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle) === null || _0 === void 0 ? void 0 : _0.height) + 'px' }), dangerouslySetInnerHTML: {
14438
14514
  __html: setFontForText(title, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
14439
- } }))) : (React.createElement("div", { ref: ref, style: { position: 'absolute', height: '50px', width: '50px', bottom: 0, right: 0, zIndex: 1000 } }))))));
14515
+ } })))));
14440
14516
  };
14441
14517
  var AniLinkPopupComponent = memo(AniLinkPopup$1);
14442
14518
 
@@ -14588,52 +14664,71 @@ var _materials_ = /*#__PURE__*/Object.freeze({
14588
14664
  const defaultUnLikeIconPath$1 = '/pb_static/f71266d2c64446c5ae6a5a7f5489cc0a.png';
14589
14665
  const defaultLikeIconPath$1 = '/pb_static/f07900fe3f0f4ae188ea1611d4801a44.png';
14590
14666
  const LikeButton = (_a) => {
14667
+ var _b;
14591
14668
  var { active, activeIcon, unActicveIcon, recData, position } = _a, props = __rest(_a, ["active", "activeIcon", "unActicveIcon", "recData", "position"]);
14592
- const { mutateLike, mutateUnlike, bffEventReport } = useSxpDataSource();
14593
- const [state, setState] = useState(active);
14669
+ const { mutateLike, mutateUnlike, bffEventReport, setCacheRtcList, cacheRtcList } = useSxpDataSource();
14670
+ const [state, setState] = useState((_b = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList[position]) === null || _b === void 0 ? void 0 : _b.isCollected);
14594
14671
  const likeIcon = useIconLink(defaultLikeIconPath$1);
14595
14672
  const unlikeIcon = useIconLink(defaultUnLikeIconPath$1);
14596
14673
  const handleClick = debounce(() => __awaiter(void 0, void 0, void 0, function* () {
14597
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
14674
+ var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
14598
14675
  if (state) {
14599
14676
  // 先设置状态
14600
14677
  setState(false);
14601
- const result = (_d = (yield (mutateUnlike === null || mutateUnlike === void 0 ? void 0 : mutateUnlike({ videoItemId: (_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.itemId) !== null && _c !== void 0 ? _c : '' })))) !== null && _d !== void 0 ? _d : false;
14678
+ const result = (_e = (yield (mutateUnlike === null || mutateUnlike === void 0 ? void 0 : mutateUnlike({ videoItemId: (_d = (_c = recData === null || recData === void 0 ? void 0 : recData.video) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '' })))) !== null && _e !== void 0 ? _e : false;
14602
14679
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
14603
14680
  eventInfo: {
14604
14681
  eventSubject: 'favoriteContentCanceled',
14605
14682
  eventDescription: 'This content was unfavorite by the user',
14606
- contentId: (_f = (_e = recData === null || recData === void 0 ? void 0 : recData.video) === null || _e === void 0 ? void 0 : _e.itemId) !== null && _f !== void 0 ? _f : '',
14607
- contentName: (_h = (_g = recData === null || recData === void 0 ? void 0 : recData.video) === null || _g === void 0 ? void 0 : _g.title) !== null && _h !== void 0 ? _h : '',
14608
- contentTags: JSON.stringify((_k = (_j = recData === null || recData === void 0 ? void 0 : recData.video) === null || _j === void 0 ? void 0 : _j.tags) !== null && _k !== void 0 ? _k : []),
14683
+ contentId: (_g = (_f = recData === null || recData === void 0 ? void 0 : recData.video) === null || _f === void 0 ? void 0 : _f.itemId) !== null && _g !== void 0 ? _g : '',
14684
+ contentName: (_j = (_h = recData === null || recData === void 0 ? void 0 : recData.video) === null || _h === void 0 ? void 0 : _h.title) !== null && _j !== void 0 ? _j : '',
14685
+ contentTags: JSON.stringify((_l = (_k = recData === null || recData === void 0 ? void 0 : recData.video) === null || _k === void 0 ? void 0 : _k.tags) !== null && _l !== void 0 ? _l : []),
14609
14686
  position: position + '',
14610
- contentFormat: ((_l = recData === null || recData === void 0 ? void 0 : recData.video) === null || _l === void 0 ? void 0 : _l.url) ? 'video' : 'image',
14611
- traceInfo: (_m = recData === null || recData === void 0 ? void 0 : recData.video) === null || _m === void 0 ? void 0 : _m.traceInfo
14687
+ contentFormat: ((_m = recData === null || recData === void 0 ? void 0 : recData.video) === null || _m === void 0 ? void 0 : _m.url) ? 'video' : 'image',
14688
+ traceInfo: (_o = recData === null || recData === void 0 ? void 0 : recData.video) === null || _o === void 0 ? void 0 : _o.traceInfo
14612
14689
  }
14613
14690
  });
14614
14691
  // 如果接口调用失败,则回滚状态
14615
14692
  if (!result) {
14616
14693
  setState(true);
14617
14694
  }
14695
+ else {
14696
+ const nRtcList = (_p = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
14697
+ if (index === position) {
14698
+ item.isCollected = false;
14699
+ }
14700
+ return item;
14701
+ })) !== null && _p !== void 0 ? _p : [];
14702
+ setCacheRtcList === null || setCacheRtcList === void 0 ? void 0 : setCacheRtcList(nRtcList);
14703
+ }
14618
14704
  }
14619
14705
  else {
14620
14706
  setState(true);
14621
- const result = (_o = (yield (mutateLike === null || mutateLike === void 0 ? void 0 : mutateLike({ content: JSON.stringify(recData) })))) !== null && _o !== void 0 ? _o : false;
14707
+ const result = (_q = (yield (mutateLike === null || mutateLike === void 0 ? void 0 : mutateLike({ content: JSON.stringify(recData) })))) !== null && _q !== void 0 ? _q : false;
14622
14708
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
14623
14709
  eventInfo: {
14624
14710
  eventSubject: 'favoriteContent',
14625
14711
  eventDescription: 'This content was favorite by the user',
14626
- contentId: (_q = (_p = recData === null || recData === void 0 ? void 0 : recData.video) === null || _p === void 0 ? void 0 : _p.itemId) !== null && _q !== void 0 ? _q : '',
14627
- contentName: (_s = (_r = recData === null || recData === void 0 ? void 0 : recData.video) === null || _r === void 0 ? void 0 : _r.title) !== null && _s !== void 0 ? _s : '',
14628
- contentTags: JSON.stringify((_u = (_t = recData === null || recData === void 0 ? void 0 : recData.video) === null || _t === void 0 ? void 0 : _t.tags) !== null && _u !== void 0 ? _u : []),
14712
+ contentId: (_s = (_r = recData === null || recData === void 0 ? void 0 : recData.video) === null || _r === void 0 ? void 0 : _r.itemId) !== null && _s !== void 0 ? _s : '',
14713
+ contentName: (_u = (_t = recData === null || recData === void 0 ? void 0 : recData.video) === null || _t === void 0 ? void 0 : _t.title) !== null && _u !== void 0 ? _u : '',
14714
+ contentTags: JSON.stringify((_w = (_v = recData === null || recData === void 0 ? void 0 : recData.video) === null || _v === void 0 ? void 0 : _v.tags) !== null && _w !== void 0 ? _w : []),
14629
14715
  position: position + '',
14630
- contentFormat: ((_v = recData === null || recData === void 0 ? void 0 : recData.video) === null || _v === void 0 ? void 0 : _v.url) ? 'video' : 'image',
14631
- traceInfo: (_w = recData === null || recData === void 0 ? void 0 : recData.video) === null || _w === void 0 ? void 0 : _w.traceInfo
14716
+ contentFormat: ((_x = recData === null || recData === void 0 ? void 0 : recData.video) === null || _x === void 0 ? void 0 : _x.url) ? 'video' : 'image',
14717
+ traceInfo: (_y = recData === null || recData === void 0 ? void 0 : recData.video) === null || _y === void 0 ? void 0 : _y.traceInfo
14632
14718
  }
14633
14719
  });
14634
14720
  if (!result) {
14635
14721
  setState(false);
14636
14722
  }
14723
+ else {
14724
+ const nRtcList = (_z = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
14725
+ if (index === position) {
14726
+ item.isCollected = true;
14727
+ }
14728
+ return item;
14729
+ })) !== null && _z !== void 0 ? _z : [];
14730
+ setCacheRtcList === null || setCacheRtcList === void 0 ? void 0 : setCacheRtcList(nRtcList);
14731
+ }
14637
14732
  }
14638
14733
  }), 200);
14639
14734
  return (React.createElement("button", Object.assign({}, props, { "aria-label": 'like', onClick: handleClick }),
@@ -15269,11 +15364,11 @@ function withBindDataSource(Component) {
15269
15364
  * @Author: binruan@chatlabs.com
15270
15365
  * @Date: 2023-12-26 16:11:34
15271
15366
  * @LastEditors: binruan@chatlabs.com
15272
- * @LastEditTime: 2024-07-25 18:47:37
15367
+ * @LastEditTime: 2024-07-29 10:07:08
15273
15368
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\RenderCard.tsx
15274
15369
  *
15275
15370
  */
15276
- const RenderCard = ({ rec, index, tempMap, resolver, includesCtaType }) => {
15371
+ const RenderCard = ({ rec, index, tempMap, resolver, includesCtaType, isActive }) => {
15277
15372
  var _a, _b, _c, _d, _e;
15278
15373
  const { schema } = useEditor();
15279
15374
  if (!(rec === null || rec === void 0 ? void 0 : rec.video))
@@ -15318,12 +15413,12 @@ const RenderCard = ({ rec, index, tempMap, resolver, includesCtaType }) => {
15318
15413
  const Component = withBindDataSource(t);
15319
15414
  const defaulSetting = (_z = t === null || t === void 0 ? void 0 : t.extend) === null || _z === void 0 ? void 0 : _z.defaulSetting;
15320
15415
  const isExternalLink = ((_2 = (_1 = (_0 = value === null || value === void 0 ? void 0 : value.item) === null || _0 === void 0 ? void 0 : _0.event) === null || _1 === void 0 ? void 0 : _1.onClick) === null || _2 === void 0 ? void 0 : _2.linkType) === 'externalLink';
15321
- return (React.createElement(Component, Object.assign({ style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_3 = value === null || value === void 0 ? void 0 : value.item) === null || _3 === void 0 ? void 0 : _3.style), { zIndex: 50, marginLeft: '20px', boxSizing: 'border-box', transform: 'translate3d(0px, 0px, 0px)' }), textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_4 = value === null || value === void 0 ? void 0 : value.item) === null || _4 === void 0 ? void 0 : _4.textStyle), bindDatas: (_6 = (_5 = value === null || value === void 0 ? void 0 : value.item) === null || _5 === void 0 ? void 0 : _5.bindDatas) !== null && _6 !== void 0 ? _6 : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_7 = value === null || value === void 0 ? void 0 : value.item) === null || _7 === void 0 ? void 0 : _7.props, { event: ((_8 = value === null || value === void 0 ? void 0 : value.item) === null || _8 === void 0 ? void 0 : _8.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, key: value === null || value === void 0 ? void 0 : value.id, recData: rec, isExternalLink: isExternalLink, index: index })));
15416
+ return (React.createElement(Component, Object.assign({ style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_3 = value === null || value === void 0 ? void 0 : value.item) === null || _3 === void 0 ? void 0 : _3.style), { zIndex: 50, marginLeft: '20px', boxSizing: 'border-box', transform: 'translate3d(0px, 0px, 0px)' }), textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_4 = value === null || value === void 0 ? void 0 : value.item) === null || _4 === void 0 ? void 0 : _4.textStyle), bindDatas: (_6 = (_5 = value === null || value === void 0 ? void 0 : value.item) === null || _5 === void 0 ? void 0 : _5.bindDatas) !== null && _6 !== void 0 ? _6 : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_7 = value === null || value === void 0 ? void 0 : value.item) === null || _7 === void 0 ? void 0 : _7.props, { event: ((_8 = value === null || value === void 0 ? void 0 : value.item) === null || _8 === void 0 ? void 0 : _8.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, key: value === null || value === void 0 ? void 0 : value.id, recData: rec, isExternalLink: isExternalLink, index: index, isActive: isActive })));
15322
15417
  }
15323
15418
  else {
15324
15419
  return null;
15325
15420
  }
15326
- }, [rec, resolver, tempMap, schema, value === null || value === void 0 ? void 0 : value.id]);
15421
+ }, [rec, resolver, tempMap, schema, value === null || value === void 0 ? void 0 : value.id, isActive]);
15327
15422
  return React.createElement(React.Fragment, null, renderComp);
15328
15423
  };
15329
15424
  var RenderCard$1 = memo(RenderCard);
@@ -15411,7 +15506,7 @@ var Tagbar$1 = memo(Tagbar);
15411
15506
  * @Author: binruan@chatlabs.com
15412
15507
  * @Date: 2024-01-15 19:03:09
15413
15508
  * @LastEditors: binruan@chatlabs.com
15414
- * @LastEditTime: 2024-07-25 17:10:01
15509
+ * @LastEditTime: 2024-07-31 11:33:42
15415
15510
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
15416
15511
  *
15417
15512
  */
@@ -15629,7 +15724,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
15629
15724
  React.createElement(ExpandableText$1, { className: 'clc-sxp-bottom-text', isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_d = (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.title) !== null && _d !== void 0 ? _d : '', style: Object.assign(Object.assign({}, descStyle), { textShadow: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isOpenTextShadow) ? '2px 2px 4px rgba(0, 0, 0, 0.5)' : 'none' }), onChange: onExpandableChange }),
15630
15725
  React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLink'] }),
15631
15726
  React.createElement(Hashtag$1, { index: activeIndex, tags: (_f = (_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.hashTags) !== null && _f !== void 0 ? _f : [], itemId: (_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.itemId, itemType: ((_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.itemId) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle }))),
15632
- React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLinkPopup'] })));
15727
+ React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLinkPopup'], isActive: index === activeIndex })));
15633
15728
  }
15634
15729
  return null;
15635
15730
  }, [
@@ -15683,8 +15778,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
15683
15778
  }
15684
15779
  };
15685
15780
  const handleSlideSkip = (item, position) => {
15686
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
15687
- if (isPreview)
15781
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
15782
+ if (isPreview || waterFallData)
15688
15783
  return;
15689
15784
  const t = new Date() - curTime.current;
15690
15785
  if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.openSlideSkip) && t >= ((_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.slideSkipStartTime) !== null && _a !== void 0 ? _a : 0) && getSlideSkipState() && item) {
@@ -15702,7 +15797,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
15702
15797
  contentTags: (product === null || product === void 0 ? void 0 : product.tags) ? JSON.stringify(product === null || product === void 0 ? void 0 : product.tags) : '',
15703
15798
  position: position + '',
15704
15799
  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 : '',
15705
- traceInfo: (_r = product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _r !== void 0 ? _r : ''
15800
+ traceInfo: (_s = (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.traceInfo) !== null && _s !== void 0 ? _s : ''
15706
15801
  }
15707
15802
  });
15708
15803
  setSlideSkipState();
@@ -16233,19 +16328,18 @@ var index$1 = memo(DiyPortalPreview);
16233
16328
  * @Author: binruan@chatlabs.com
16234
16329
  * @Date: 2023-10-31 10:56:01
16235
16330
  * @LastEditors: binruan@chatlabs.com
16236
- * @LastEditTime: 2024-07-25 17:15:36
16331
+ * @LastEditTime: 2024-07-31 18:54:49
16237
16332
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Popup\index.tsx
16238
16333
  *
16239
16334
  */
16240
16335
  const Popup = () => {
16241
16336
  const { schema, resolver, popup } = useEditor();
16242
- const { setPopupDetailData, popupDetailData, bffEventReport } = useSxpDataSource();
16337
+ const { setPopupDetailData, popupDetailData, popupCurTimeRef, checkCommodityIndexRef } = useSxpDataSource();
16243
16338
  const { productView } = useEventReport();
16244
16339
  const [visible, setVisible] = useState();
16245
- const curTimeRef = useRef(null);
16246
16340
  useEffect(() => {
16247
16341
  const initTime = () => {
16248
- curTimeRef.current = new Date();
16342
+ popupCurTimeRef.current = new Date();
16249
16343
  };
16250
16344
  initTime();
16251
16345
  window.addEventListener('pageshow', initTime);
@@ -16255,25 +16349,39 @@ const Popup = () => {
16255
16349
  }, []);
16256
16350
  useEffect(() => {
16257
16351
  if (popup && (popup === null || popup === void 0 ? void 0 : popup.id) && (popup === null || popup === void 0 ? void 0 : popup.id) !== '') {
16258
- curTimeRef.current = new Date();
16352
+ popupCurTimeRef.current = new Date();
16259
16353
  setVisible(popup);
16260
16354
  }
16261
16355
  }, [popup]);
16262
16356
  const handleClose = () => {
16263
- var _a, _b, _c, _d;
16264
- if (!popup || (popup === null || popup === void 0 ? void 0 : popup.id) === '' || !visible || new Date() - curTimeRef.current < ((_a = popup === null || popup === void 0 ? void 0 : popup.duration) !== null && _a !== void 0 ? _a : 0)) {
16357
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
16358
+ if (!popup ||
16359
+ (popup === null || popup === void 0 ? void 0 : popup.id) === '' ||
16360
+ !visible ||
16361
+ new Date() - popupCurTimeRef.current < ((_a = popup === null || popup === void 0 ? void 0 : popup.duration) !== null && _a !== void 0 ? _a : 0)) {
16265
16362
  return;
16266
16363
  }
16267
16364
  setVisible(Object.assign(Object.assign({}, popup), { id: '' }));
16268
- const data = popupDetailData;
16269
- const product = (_b = data === null || data === void 0 ? void 0 : data.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
16270
- const cta = (_d = (_c = data === null || data === void 0 ? void 0 : data.video) === null || _c === void 0 ? void 0 : _c.bindProduct) === null || _d === void 0 ? void 0 : _d.bindCta;
16271
- if (product && cta) {
16272
- productView(data, product, cta, curTimeRef.current, popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index);
16365
+ 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));
16366
+ 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') {
16367
+ const data = popupDetailData;
16368
+ let product = (_g = data === null || data === void 0 ? void 0 : data.video) === null || _g === void 0 ? void 0 : _g.bindProduct;
16369
+ 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;
16370
+ if ((checkCommodityIndexRef === null || checkCommodityIndexRef === void 0 ? void 0 : checkCommodityIndexRef.current) >= 0) {
16371
+ const p = (_l = (_k = data === null || data === void 0 ? void 0 : data.video) === null || _k === void 0 ? void 0 : _k.bindProducts) === null || _l === void 0 ? void 0 : _l[checkCommodityIndexRef === null || checkCommodityIndexRef === void 0 ? void 0 : checkCommodityIndexRef.current];
16372
+ if (p) {
16373
+ product = p;
16374
+ cta = p === null || p === void 0 ? void 0 : p.bindCta;
16375
+ }
16376
+ }
16377
+ if (product && cta) {
16378
+ productView(data, product, cta, popupCurTimeRef.current, popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index);
16379
+ }
16273
16380
  }
16274
16381
  setTimeout(() => {
16275
16382
  window === null || window === void 0 ? void 0 : window.sxpPopup('');
16276
16383
  setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(null);
16384
+ checkCommodityIndexRef.current = -1;
16277
16385
  }, popup === null || popup === void 0 ? void 0 : popup.duration);
16278
16386
  };
16279
16387
  const renderPopupDetail = useMemo(() => {
@@ -16286,7 +16394,7 @@ const Popup = () => {
16286
16394
  const isExternalLink = ((_d = (_c = (_b = value === null || value === void 0 ? void 0 : value.item) === null || _b === void 0 ? void 0 : _b.event) === null || _c === void 0 ? void 0 : _c.onClick) === null || _d === void 0 ? void 0 : _d.linkType) === 'externalLink';
16287
16395
  const isPopup = ((_g = (_f = (_e = value === null || value === void 0 ? void 0 : value.item) === null || _e === void 0 ? void 0 : _e.event) === null || _f === void 0 ? void 0 : _f.onClick) === null || _g === void 0 ? void 0 : _g.linkType) === 'popup';
16288
16396
  const defaulSetting = (_h = t === null || t === void 0 ? void 0 : t.extend) === null || _h === void 0 ? void 0 : _h.defaulSetting;
16289
- return (React.createElement(Component, Object.assign({ key: index, style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_j = value === null || value === void 0 ? void 0 : value.item) === null || _j === void 0 ? void 0 : _j.style), { width: (_k = window.innerWidth) !== null && _k !== void 0 ? _k : '100vw', height: '100%' }), textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_l = value === null || value === void 0 ? void 0 : value.item) === null || _l === void 0 ? void 0 : _l.textStyle), bindDatas: (_o = (_m = value === null || value === void 0 ? void 0 : value.item) === null || _m === void 0 ? void 0 : _m.bindDatas) !== null && _o !== void 0 ? _o : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_p = value === null || value === void 0 ? void 0 : value.item) === null || _p === void 0 ? void 0 : _p.props, { event: ((_q = value === null || value === void 0 ? void 0 : value.item) === null || _q === void 0 ? void 0 : _q.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, isExternalLink: isExternalLink, isPopup: isPopup, onClose: handleClose })));
16397
+ return (React.createElement(Component, Object.assign({ key: index, style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_j = value === null || value === void 0 ? void 0 : value.item) === null || _j === void 0 ? void 0 : _j.style), { width: (_k = window.innerWidth) !== null && _k !== void 0 ? _k : '100vw', height: '100%' }), textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_l = value === null || value === void 0 ? void 0 : value.item) === null || _l === void 0 ? void 0 : _l.textStyle), bindDatas: (_o = (_m = value === null || value === void 0 ? void 0 : value.item) === null || _m === void 0 ? void 0 : _m.bindDatas) !== null && _o !== void 0 ? _o : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_p = value === null || value === void 0 ? void 0 : value.item) === null || _p === void 0 ? void 0 : _p.props, { event: ((_q = value === null || value === void 0 ? void 0 : value.item) === null || _q === void 0 ? void 0 : _q.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, isExternalLink: isExternalLink, isPopup: isPopup, onClose: handleClose, index: index })));
16290
16398
  }
16291
16399
  else {
16292
16400
  return React.createElement(React.Fragment, null);