pb-sxp-ui 1.2.6 → 1.2.8

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 (52) hide show
  1. package/dist/index.cjs +119 -107
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.css +1 -3
  4. package/dist/index.js +119 -107
  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 +119 -107
  11. package/dist/pb-ui.js.map +1 -1
  12. package/dist/pb-ui.min.js +3 -3
  13. package/dist/pb-ui.min.js.map +1 -1
  14. package/es/core/components/SxpPageRender/FormatImage.d.ts +1 -0
  15. package/es/core/components/SxpPageRender/FormatImage.js +23 -5
  16. package/es/core/components/SxpPageRender/Popup/index.js +5 -5
  17. package/es/core/components/SxpPageRender/VideoWidget/index.js +2 -2
  18. package/es/core/components/SxpPageRender/index.js +12 -6
  19. package/es/core/context/SxpDataSourceProvider.js +25 -15
  20. package/es/core/hooks/useEventReport.js +4 -4
  21. package/es/materials/sxp/cta/AniLink/index.js +1 -1
  22. package/es/materials/sxp/cta/AniLink/interactionRender.d.ts +0 -3
  23. package/es/materials/sxp/cta/AniLink/interactionRender.js +1 -2
  24. package/es/materials/sxp/cta/AniLink/material.js +9 -1
  25. package/es/materials/sxp/cta/AniLinkPopup/index.js +2 -2
  26. package/es/materials/sxp/cta/AniLinkPopup/interactionRender.d.ts +0 -10
  27. package/es/materials/sxp/cta/AniLinkPopup/interactionRender.js +1 -7
  28. package/es/materials/sxp/cta/AniLinkPopup/material.js +17 -10
  29. package/es/materials/sxp/popup/CommodityList/index.d.ts +0 -1
  30. package/es/materials/sxp/popup/CommodityList/index.js +2 -1
  31. package/es/materials/sxp/template/components/CommodityGroup.d.ts +1 -1
  32. package/es/materials/sxp/template/components/CommodityGroup.js +2 -1
  33. package/lib/core/components/SxpPageRender/FormatImage.d.ts +1 -0
  34. package/lib/core/components/SxpPageRender/FormatImage.js +23 -5
  35. package/lib/core/components/SxpPageRender/Popup/index.js +5 -5
  36. package/lib/core/components/SxpPageRender/VideoWidget/index.js +2 -2
  37. package/lib/core/components/SxpPageRender/index.js +12 -6
  38. package/lib/core/context/SxpDataSourceProvider.js +25 -15
  39. package/lib/core/hooks/useEventReport.js +4 -4
  40. package/lib/materials/sxp/cta/AniLink/index.js +1 -1
  41. package/lib/materials/sxp/cta/AniLink/interactionRender.d.ts +0 -3
  42. package/lib/materials/sxp/cta/AniLink/interactionRender.js +1 -2
  43. package/lib/materials/sxp/cta/AniLink/material.js +9 -1
  44. package/lib/materials/sxp/cta/AniLinkPopup/index.js +2 -2
  45. package/lib/materials/sxp/cta/AniLinkPopup/interactionRender.d.ts +0 -10
  46. package/lib/materials/sxp/cta/AniLinkPopup/interactionRender.js +1 -7
  47. package/lib/materials/sxp/cta/AniLinkPopup/material.js +17 -10
  48. package/lib/materials/sxp/popup/CommodityList/index.d.ts +0 -1
  49. package/lib/materials/sxp/popup/CommodityList/index.js +2 -1
  50. package/lib/materials/sxp/template/components/CommodityGroup.d.ts +1 -1
  51. package/lib/materials/sxp/template/components/CommodityGroup.js +2 -1
  52. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -580,6 +580,19 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
580
580
  var _a, _b, _c, _d;
581
581
  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;
582
582
  }, [isAgreePolicy, globalConfig, isOpenConsent, isEditor]);
583
+ const getFilterRecList = React.useCallback((data) => {
584
+ var _a;
585
+ const recList = data === null || data === void 0 ? void 0 : data.recList;
586
+ const nList = (_a = recList === null || recList === void 0 ? void 0 : recList.map((item) => {
587
+ var _a, _b, _c, _d, _e, _f;
588
+ if (((_a = item === null || item === void 0 ? void 0 : item.video) === null || _a === void 0 ? void 0 : _a.bindProducts) && ((_c = (_b = item === null || item === void 0 ? void 0 : item.video) === null || _b === void 0 ? void 0 : _b.bindProducts) === null || _c === void 0 ? void 0 : _c.length) > 0) {
589
+ const bindProducts = (_f = (_e = (_d = item === null || item === void 0 ? void 0 : item.video) === null || _d === void 0 ? void 0 : _d.bindProducts) === null || _e === void 0 ? void 0 : _e.filter((item) => !!(item === null || item === void 0 ? void 0 : item.bindCta))) !== null && _f !== void 0 ? _f : [];
590
+ return Object.assign(Object.assign({}, item), { video: Object.assign(Object.assign({}, item === null || item === void 0 ? void 0 : item.video), { bindProducts }) });
591
+ }
592
+ return item;
593
+ })) !== null && _a !== void 0 ? _a : [];
594
+ return nList;
595
+ }, []);
583
596
  React.useEffect(() => {
584
597
  const handleChangeThemeTag = (tag) => {
585
598
  themeTag.current = tag;
@@ -651,7 +664,6 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
651
664
  return result === null || result === void 0 ? void 0 : result.data;
652
665
  }), [bffFetch, utmVal, maxSize, defaultSize]);
653
666
  const loadVideos = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
654
- var _j, _k;
655
667
  if (rtcList.length <= 0) {
656
668
  return;
657
669
  }
@@ -661,8 +673,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
661
673
  'itemFilter.itemType': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemType,
662
674
  themeTag: themeTag.current
663
675
  });
664
- setRtcList(rtcList.concat((_j = data === null || data === void 0 ? void 0 : data.recList) !== null && _j !== void 0 ? _j : []));
665
- setCacheRtcList(cacheRtcList.concat((_k = data === null || data === void 0 ? void 0 : data.recList) !== null && _k !== void 0 ? _k : []));
676
+ setRtcList(rtcList.concat(getFilterRecList(data)));
677
+ setCacheRtcList(cacheRtcList.concat(getFilterRecList(data)));
666
678
  }), [getRecommendVideos, rtcList, waterFallData, cacheRtcList]);
667
679
  const bffEventReport = React.useCallback(({ userInfo, eventInfo }) => {
668
680
  // 关闭 BFF 事件上报
@@ -726,24 +738,24 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
726
738
  }), [bffFetch]);
727
739
  // 获取 Tag
728
740
  const bffGetTagList = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
729
- var _l, _m, _o, _p, _q;
741
+ var _j, _k, _l, _m, _o;
730
742
  if (!utmVal || !isShowTag)
731
743
  return;
732
744
  try {
733
- const val = (_o = (_m = (_l = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _l === void 0 ? void 0 : _l.filter((val) => {
745
+ const val = (_l = (_k = (_j = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _j === void 0 ? void 0 : _j.filter((val) => {
734
746
  var _a, _b;
735
747
  const key = val.split('=')[0];
736
748
  return (_b = ((_a = utmParameter === null || utmParameter === void 0 ? void 0 : utmParameter.channels) !== null && _a !== void 0 ? _a : [])) === null || _b === void 0 ? void 0 : _b.includes(key);
737
- })) === null || _m === void 0 ? void 0 : _m.join('&')) !== null && _o !== void 0 ? _o : '';
749
+ })) === null || _k === void 0 ? void 0 : _k.join('&')) !== null && _l !== void 0 ? _l : '';
738
750
  const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/tag/list', { method: 'GET', query: { channel: decodeURIComponent(val) } }));
739
- setTagList((_q = (_p = result === null || result === void 0 ? void 0 : result.data) === null || _p === void 0 ? void 0 : _p.tags) !== null && _q !== void 0 ? _q : []);
751
+ setTagList((_o = (_m = result === null || result === void 0 ? void 0 : result.data) === null || _m === void 0 ? void 0 : _m.tags) !== null && _o !== void 0 ? _o : []);
740
752
  }
741
753
  catch (e) {
742
754
  console.log('e', e);
743
755
  }
744
756
  }), [bffFetch, utmVal, isShowTag]);
745
757
  const ctaEvent = React.useCallback((eventInfo, rec, product, position) => {
746
- 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;
758
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3;
747
759
  const cta = product === null || product === void 0 ? void 0 : product.bindCta;
748
760
  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);
749
761
  let fromKName = '';
@@ -757,7 +769,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
757
769
  fromKName = 'imagePage';
758
770
  }
759
771
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
760
- 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 : '' })
772
+ eventInfo: Object.assign(Object.assign({}, eventInfo), { ctaId: (_h = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _h !== void 0 ? _h : '', ctaName: (_j = cta === null || cta === void 0 ? void 0 : cta.title) !== null && _j !== void 0 ? _j : '', contentTags: JSON.stringify(cta === null || cta === void 0 ? void 0 : cta.tags), position: position + '', contentId: (_l = (_k = rec === null || rec === void 0 ? void 0 : rec.video) === null || _k === void 0 ? void 0 : _k.itemId) !== null && _l !== void 0 ? _l : '', productId: isProd ? product === null || product === void 0 ? void 0 : product.itemId : '', traceInfo: (_2 = (_z = (_u = (_q = (_m = cta === null || cta === void 0 ? void 0 : cta.traceInfo) !== null && _m !== void 0 ? _m : (_p = (_o = rec === null || rec === void 0 ? void 0 : rec.video) === null || _o === void 0 ? void 0 : _o.bindCta) === null || _p === void 0 ? void 0 : _p.traceInfo) !== null && _q !== void 0 ? _q : (_t = (_s = (_r = rec === null || rec === void 0 ? void 0 : rec.video) === null || _r === void 0 ? void 0 : _r.bindProduct) === null || _s === void 0 ? void 0 : _s.bindCta) === null || _t === void 0 ? void 0 : _t.traceInfo) !== null && _u !== void 0 ? _u : (_y = (_x = (_w = (_v = rec === null || rec === void 0 ? void 0 : rec.video) === null || _v === void 0 ? void 0 : _v.bindProducts) === null || _w === void 0 ? void 0 : _w[0]) === null || _x === void 0 ? void 0 : _x.bindCta) === null || _y === void 0 ? void 0 : _y.traceInfo) !== null && _z !== void 0 ? _z : (_1 = (_0 = rec === null || rec === void 0 ? void 0 : rec.product) === null || _0 === void 0 ? void 0 : _0.bindCta) === null || _1 === void 0 ? void 0 : _1.traceInfo) !== null && _2 !== void 0 ? _2 : '', fromKName, fromKPage: (_3 = location === null || location === void 0 ? void 0 : location.href) !== null && _3 !== void 0 ? _3 : '' })
761
773
  });
762
774
  }, [bffEventReport, isFromHashtag]);
763
775
  const h5EnterLink = React.useCallback(() => {
@@ -797,9 +809,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
797
809
  bffGetTagList();
798
810
  getRecommendVideos()
799
811
  .then((data) => {
800
- var _a, _b;
801
- setRtcList((_a = data === null || data === void 0 ? void 0 : data.recList) !== null && _a !== void 0 ? _a : []);
802
- setCacheRtcList((_b = data === null || data === void 0 ? void 0 : data.recList) !== null && _b !== void 0 ? _b : []);
812
+ setRtcList(getFilterRecList(data));
813
+ setCacheRtcList(getFilterRecList(data));
803
814
  })
804
815
  .finally(() => {
805
816
  bffEventReport({
@@ -819,9 +830,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
819
830
  bffGetTagList();
820
831
  getRecommendVideos()
821
832
  .then((data) => {
822
- var _a, _b;
823
- setRtcList((_a = data === null || data === void 0 ? void 0 : data.recList) !== null && _a !== void 0 ? _a : []);
824
- setCacheRtcList((_b = data === null || data === void 0 ? void 0 : data.recList) !== null && _b !== void 0 ? _b : []);
833
+ setRtcList(getFilterRecList(data));
834
+ setCacheRtcList(getFilterRecList(data));
825
835
  })
826
836
  .finally(() => {
827
837
  setLoading(false);
@@ -1289,14 +1299,14 @@ var settingRender$9 = [
1289
1299
  * @Author: binruan@chatlabs.com
1290
1300
  * @Date: 2024-03-12 10:59:06
1291
1301
  * @LastEditors: binruan@chatlabs.com
1292
- * @LastEditTime: 2024-07-31 11:41:47
1302
+ * @LastEditTime: 2024-08-01 17:36:34
1293
1303
  * @FilePath: \pb-sxp-ui\src\core\hooks\useEventReport.ts
1294
1304
  *
1295
1305
  */
1296
1306
  function useEventReport() {
1297
1307
  const { bffEventReport, popupDetailData, waterFallData, isFromHashtag } = useSxpDataSource();
1298
1308
  const jumpToWeb = React.useCallback((data, product, cta, position) => {
1299
- 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;
1309
+ 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;
1300
1310
  let fromKName = '';
1301
1311
  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))) {
1302
1312
  fromKName = 'pdpPage';
@@ -1327,12 +1337,12 @@ function useEventReport() {
1327
1337
  position: position + '',
1328
1338
  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 : '',
1329
1339
  ctatId: (_o = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _o !== void 0 ? _o : '',
1330
- 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 : ''
1340
+ traceInfo: (_1 = (_y = (_w = (_s = (_p = product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _p !== void 0 ? _p : (_r = (_q = data === null || data === void 0 ? void 0 : data.video) === null || _q === void 0 ? void 0 : _q.bindProduct) === null || _r === void 0 ? void 0 : _r.traceInfo) !== null && _s !== void 0 ? _s : (_v = (_u = (_t = data === null || data === void 0 ? void 0 : data.video) === null || _t === void 0 ? void 0 : _t.bindProducts) === null || _u === void 0 ? void 0 : _u[0]) === null || _v === void 0 ? void 0 : _v.traceInfo) !== null && _w !== void 0 ? _w : (_x = data === null || data === void 0 ? void 0 : data.product) === null || _x === void 0 ? void 0 : _x.traceInfo) !== null && _y !== void 0 ? _y : (_0 = (_z = data === null || data === void 0 ? void 0 : data.video) === null || _z === void 0 ? void 0 : _z.bindCta) === null || _0 === void 0 ? void 0 : _0.traceInfo) !== null && _1 !== void 0 ? _1 : ''
1331
1341
  }
1332
1342
  });
1333
1343
  }, [bffEventReport, popupDetailData, isFromHashtag]);
1334
1344
  const productView = React.useCallback((data, product, cta, viewTime, position) => {
1335
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
1345
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
1336
1346
  let fromKName = '';
1337
1347
  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))) {
1338
1348
  fromKName = 'pdpPage';
@@ -1352,7 +1362,7 @@ function useEventReport() {
1352
1362
  position: position + '',
1353
1363
  contentId: (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.itemId,
1354
1364
  ctatId: cta === null || cta === void 0 ? void 0 : cta.itemId,
1355
- 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 : '',
1365
+ traceInfo: (_p = (_m = (_h = (_e = product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _e !== void 0 ? _e : (_g = (_f = data === null || data === void 0 ? void 0 : data.video) === null || _f === void 0 ? void 0 : _f.bindProduct) === null || _g === void 0 ? void 0 : _g.traceInfo) !== null && _h !== void 0 ? _h : (_l = (_k = (_j = data === null || data === void 0 ? void 0 : data.video) === null || _j === void 0 ? void 0 : _j.bindProducts) === null || _k === void 0 ? void 0 : _k[0]) === null || _l === void 0 ? void 0 : _l.traceInfo) !== null && _m !== void 0 ? _m : (_o = data === null || data === void 0 ? void 0 : data.product) === null || _o === void 0 ? void 0 : _o.traceInfo) !== null && _p !== void 0 ? _p : '',
1356
1366
  timeOnSite: Math.floor((new Date() - viewTime) / 1000) + '',
1357
1367
  eventSubject: 'productView',
1358
1368
  eventDescription: 'User browsed the product'
@@ -8802,17 +8812,10 @@ const ExpandableText = ({ text, maxStr = 108, style, className, onClick, foldTex
8802
8812
  };
8803
8813
  var ExpandableText$1 = React.memo(ExpandableText);
8804
8814
 
8805
- /*
8806
- * @Author: binruan@chatlabs.com
8807
- * @Date: 2024-03-20 10:27:31
8808
- * @LastEditors: binruan@chatlabs.com
8809
- * @LastEditTime: 2024-07-31 17:54:50
8810
- * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\FormatImage.tsx
8811
- *
8812
- */
8813
8815
  const FormatImage = React.forwardRef((props, ref) => {
8814
- const { src, onLoad, style, className, loading } = props;
8816
+ const { src, onLoad, style, className, loading, alt = 'image' } = props;
8815
8817
  const [imgSrc, setImgSrc] = React.useState();
8818
+ const imgRef = React.useRef(null);
8816
8819
  React.useImperativeHandle(ref, () => ({
8817
8820
  setSrc: (v) => {
8818
8821
  setImgSrc(v);
@@ -8821,39 +8824,32 @@ const FormatImage = React.forwardRef((props, ref) => {
8821
8824
  React.useEffect(() => {
8822
8825
  setImgSrc(src);
8823
8826
  }, [src]);
8824
- React.useRef(null);
8825
- // useEffect(() => {
8826
- // let observer: any = null;
8827
- // const { current } = imgRef;
8828
- // if (current) {
8829
- // observer = new IntersectionObserver(
8830
- // (entries) => {
8831
- // entries.forEach((entry) => {
8832
- // if (entry.isIntersecting) {
8833
- // setImgSrc(src);
8834
- // observer.unobserve(current);
8835
- // }
8836
- // });
8837
- // },
8838
- // { threshold: 0.1 } // 触发阈值,可根据需要调整
8839
- // );
8840
- // observer.observe(current);
8841
- // }
8842
- // return () => {
8843
- // if (observer && current) {
8844
- // observer.unobserve(current);
8845
- // }
8846
- // };
8847
- // }, [src]);
8827
+ React.useEffect(() => {
8828
+ const onShow = () => {
8829
+ var _a, _b;
8830
+ if (src && ((_b = (_a = imgRef === null || imgRef === void 0 ? void 0 : imgRef.current) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.display) === 'none') {
8831
+ imgRef.current.src = '';
8832
+ imgRef.current.src = src;
8833
+ }
8834
+ };
8835
+ SXP_EVENT_BUS.on(SXP_EVENT_TYPE.PAGE_DID_SHOW, onShow);
8836
+ return () => {
8837
+ SXP_EVENT_BUS.off(SXP_EVENT_TYPE.PAGE_DID_SHOW, onShow);
8838
+ };
8839
+ }, [src]);
8848
8840
  return (React.createElement(React.Fragment, null, (imgSrc === null || imgSrc === void 0 ? void 0 : imgSrc.includes('.avif')) ? (React.createElement("picture", null,
8849
8841
  React.createElement("source", { type: 'image/avif', srcSet: imgSrc }),
8850
8842
  React.createElement("source", { type: 'image/webp', srcSet: `${imgSrc}?imageMogr2/format/webp` }),
8851
8843
  React.createElement("source", { type: 'image/jpeg', srcSet: `${imgSrc}?imageMogr2/format/jpg` }),
8852
- React.createElement("img", { className: className, src: imgSrc, style: style, loading: loading, onLoad: (e) => {
8844
+ React.createElement("img", { ref: imgRef, className: className, src: imgSrc, style: Object.assign(Object.assign({}, style), { display: 'none' }), loading: loading, onLoad: (e) => {
8845
+ if (imgRef.current)
8846
+ imgRef.current.style.display = 'block';
8853
8847
  onLoad === null || onLoad === void 0 ? void 0 : onLoad(e.target);
8854
- }, alt: 'image' }))) : (React.createElement("img", { className: className, src: imgSrc, style: style, loading: loading, onLoad: (e) => {
8848
+ }, alt: alt }))) : (React.createElement("img", { ref: imgRef, className: className, src: imgSrc, style: Object.assign(Object.assign({}, style), { display: 'none' }), loading: loading, onLoad: (e) => {
8849
+ if (imgRef.current)
8850
+ imgRef.current.style.display = 'block';
8855
8851
  onLoad === null || onLoad === void 0 ? void 0 : onLoad(e.target);
8856
- }, alt: 'image' }))));
8852
+ }, alt: alt }))));
8857
8853
  });
8858
8854
  var FormatImage$1 = React.memo(FormatImage);
8859
8855
 
@@ -8884,7 +8880,8 @@ const CommodityGroup = ({ products, data, defImg, style, onCLick, popupDetailDat
8884
8880
  const handleClick = (item, index) => {
8885
8881
  if (check === index)
8886
8882
  return;
8887
- productView(popupDetailData, item, item === null || item === void 0 ? void 0 : item.bindCta, popupCurTimeRef.current, popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index);
8883
+ const prevItem = products === null || products === void 0 ? void 0 : products[check];
8884
+ productView(popupDetailData, prevItem, prevItem === null || prevItem === void 0 ? void 0 : prevItem.bindCta, popupCurTimeRef.current, popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index);
8888
8885
  onCLick === null || onCLick === void 0 ? void 0 : onCLick(index);
8889
8886
  };
8890
8887
  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) => {
@@ -10205,12 +10202,13 @@ var Img$1 = React.memo(Img);
10205
10202
 
10206
10203
  const CommodityList$1 = (_a) => {
10207
10204
  var _b, _c;
10208
- 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"]);
10205
+ var { style, isDefault, rec, viewTime, isPost, bottom_image, commodityStyles, buttonStyle, translateY = 0, commodityPicture, isExternalLink, onClick } = _a, props = __rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "commodityStyles", "buttonStyle", "translateY", "commodityPicture", "isExternalLink", "onClick"]);
10209
10206
  const { sxpParameter, popupDetailData, setPopupDetailData, ctaEvent } = useSxpDataSource();
10210
10207
  const { jumpToWeb } = useEventReport();
10211
10208
  const { popup } = useEditor();
10212
10209
  const recData = isPost ? rec : popupDetailData;
10213
10210
  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];
10211
+ const index = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
10214
10212
  const priceText = React.useCallback((product) => {
10215
10213
  var _a, _b, _c, _d, _e;
10216
10214
  if ((product === null || product === void 0 ? void 0 : product.currency) && (product === null || product === void 0 ? void 0 : product.price)) {
@@ -14064,7 +14062,7 @@ const AniLink$1 = (_a) => {
14064
14062
  onClick === null || onClick === void 0 ? void 0 : onClick();
14065
14063
  }
14066
14064
  };
14067
- const title = (cta === null || cta === void 0 ? void 0 : cta.enTitle) || '查看详情 >';
14065
+ const title = (cta === null || cta === void 0 ? void 0 : cta.enTitle) || '查看详情';
14068
14066
  const aniTimStyle = React.useMemo(() => {
14069
14067
  var _a, _b;
14070
14068
  const ani = event === null || event === void 0 ? void 0 : event.animation;
@@ -14111,7 +14109,7 @@ var AniLinkComponent = React.memo(AniLink$1);
14111
14109
  * @Author: binruan@chatlabs.com
14112
14110
  * @Date: 2024-07-05 14:08:41
14113
14111
  * @LastEditors: binruan@chatlabs.com
14114
- * @LastEditTime: 2024-07-09 14:34:49
14112
+ * @LastEditTime: 2024-08-02 16:22:39
14115
14113
  * @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLink\interactionRender.tsx
14116
14114
  *
14117
14115
  */
@@ -14139,11 +14137,10 @@ var interactionRender$1 = [
14139
14137
  label: '动画',
14140
14138
  options: [
14141
14139
  {
14142
- label: '由左向右/中间扩散',
14140
+ label: '默认',
14143
14141
  value: 1
14144
14142
  }
14145
14143
  ],
14146
- initialValue: 1,
14147
14144
  fieldProps: {
14148
14145
  style: {
14149
14146
  width: '100%'
@@ -14170,7 +14167,7 @@ var interactionRender$1 = [
14170
14167
  * @Author: binruan@chatlabs.com
14171
14168
  * @Date: 2023-07-28 18:29:57
14172
14169
  * @LastEditors: binruan@chatlabs.com
14173
- * @LastEditTime: 2024-07-05 19:27:54
14170
+ * @LastEditTime: 2024-08-02 17:03:34
14174
14171
  * @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLink\material.tsx
14175
14172
  *
14176
14173
  */
@@ -14190,7 +14187,15 @@ const AniLink = createMaterial(AniLinkComponent, {
14190
14187
  ctaTitle: {
14191
14188
  fontSize: 15,
14192
14189
  color: '#fff',
14193
- textAlign: 'left'
14190
+ textAlign: 'center'
14191
+ }
14192
+ },
14193
+ event: {
14194
+ animation: {
14195
+ backgroundColor: '#F40082',
14196
+ name: 1,
14197
+ delay: 1000,
14198
+ duration: 2000
14194
14199
  }
14195
14200
  }
14196
14201
  },
@@ -14497,7 +14502,7 @@ const AniLinkPopup$1 = (_a) => {
14497
14502
  onClick === null || onClick === void 0 ? void 0 : onClick();
14498
14503
  }
14499
14504
  };
14500
- const title = (cta === null || cta === void 0 ? void 0 : cta.enTitle) || '查看详情 >';
14505
+ const title = (cta === null || cta === void 0 ? void 0 : cta.enTitle) || '查看详情';
14501
14506
  const aniTimStyle = React.useMemo(() => {
14502
14507
  const ani = event === null || event === void 0 ? void 0 : event.animation;
14503
14508
  if (ani) {
@@ -14529,7 +14534,7 @@ const AniLinkPopup$1 = (_a) => {
14529
14534
  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 } },
14530
14535
  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'] })),
14531
14536
  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 }),
14532
- (!recData || (product === null || product === void 0 ? void 0 : product.title)) && (React.createElement("div", { className: styles['two-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title, dangerouslySetInnerHTML: {
14537
+ (!recData || (product === null || product === void 0 ? void 0 : product.title)) && (React.createElement("div", { className: styles['one-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title, dangerouslySetInnerHTML: {
14533
14538
  __html: setFontForText((_z = product === null || product === void 0 ? void 0 : product.title) !== null && _z !== void 0 ? _z : 'Product Name', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title)
14534
14539
  } })),
14535
14540
  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: {
@@ -14538,14 +14543,6 @@ const AniLinkPopup$1 = (_a) => {
14538
14543
  };
14539
14544
  var AniLinkPopupComponent = React.memo(AniLinkPopup$1);
14540
14545
 
14541
- /*
14542
- * @Author: binruan@chatlabs.com
14543
- * @Date: 2024-07-04 15:28:39
14544
- * @LastEditors: binruan@chatlabs.com
14545
- * @LastEditTime: 2024-07-05 17:46:42
14546
- * @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLinkPopup\interactionRender.tsx
14547
- *
14548
- */
14549
14546
  var interactionRender = [
14550
14547
  {
14551
14548
  title: '点击事件',
@@ -14559,22 +14556,16 @@ var interactionRender = [
14559
14556
  {
14560
14557
  title: '动画效果',
14561
14558
  child: [
14562
- {
14563
- type: 'Color',
14564
- name: ['animation', 'backgroundColor'],
14565
- label: '动画颜色'
14566
- },
14567
14559
  {
14568
14560
  type: 'Select',
14569
14561
  name: ['animation', 'name'],
14570
14562
  label: '动画',
14571
14563
  options: [
14572
14564
  {
14573
- label: '由左向右/中间扩散',
14565
+ label: '默认',
14574
14566
  value: 1
14575
14567
  }
14576
14568
  ],
14577
- initialValue: 1,
14578
14569
  fieldProps: {
14579
14570
  style: {
14580
14571
  width: '100%'
@@ -14597,11 +14588,19 @@ var interactionRender = [
14597
14588
  }
14598
14589
  ];
14599
14590
 
14591
+ /*
14592
+ * @Author: binruan@chatlabs.com
14593
+ * @Date: 2024-07-24 14:58:40
14594
+ * @LastEditors: binruan@chatlabs.com
14595
+ * @LastEditTime: 2024-08-02 17:09:37
14596
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLinkPopup\material.tsx
14597
+ *
14598
+ */
14600
14599
  /*
14601
14600
  * @Author: binruan@chatlabs.com
14602
14601
  * @Date: 2023-07-28 18:29:57
14603
14602
  * @LastEditors: binruan@chatlabs.com
14604
- * @LastEditTime: 2024-07-08 14:36:05
14603
+ * @LastEditTime: 2024-08-02 17:09:14
14605
14604
  * @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLinkPopup\material.tsx
14606
14605
  *
14607
14606
  */
@@ -14620,32 +14619,39 @@ const AniLinkPopup = createMaterial(AniLinkPopupComponent, {
14620
14619
  ctaTempStyles: {
14621
14620
  img: {
14622
14621
  borderRadius: 3,
14623
- width: 76,
14624
- height: 76,
14625
- marginBottom: 10
14622
+ width: 108,
14623
+ height: 108,
14624
+ marginBottom: 0
14626
14625
  },
14627
14626
  title: {
14628
- fontSize: 12,
14627
+ fontSize: 14,
14629
14628
  color: '#000',
14630
14629
  textAlign: 'left'
14631
14630
  },
14632
14631
  ctaTitle: {
14633
- fontSize: 10,
14632
+ width: 108,
14633
+ height: 22,
14634
+ fontSize: 12,
14634
14635
  color: '#fff',
14635
14636
  textAlign: 'center',
14636
- width: 76,
14637
- height: 20,
14638
14637
  backgroundColor: 'rgba(0,0,0,1)'
14639
14638
  }
14639
+ },
14640
+ event: {
14641
+ animation: {
14642
+ name: 1,
14643
+ delay: 1000,
14644
+ duration: 2000
14645
+ }
14640
14646
  }
14641
14647
  },
14642
14648
  style: {
14643
- width: 90,
14644
- height: 160,
14649
+ width: 120,
14650
+ height: 185,
14645
14651
  borderRadius: 3,
14646
14652
  backgroundColor: 'rgba(255,255,255,1)',
14647
14653
  padding: 7,
14648
- margin: 10
14654
+ margin: 15
14649
14655
  }
14650
14656
  },
14651
14657
  w: 100,
@@ -15119,7 +15125,7 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
15119
15125
  } },
15120
15126
  React.createElement("div", { style: { position: 'relative', width: '100%', height: '100%' } },
15121
15127
  React.createElement("div", { className: 'n-full-screen', ref: videoEleRef, id: videoId, style: { width: '100%', height: '100%' } }),
15122
- React.createElement("img", { hidden: !isPauseVideo, className: 'clc-pb-video-pause', alt: 'pause', src: videoPlayIcon !== null && videoPlayIcon !== void 0 ? videoPlayIcon : PAUSE_ICON }))),
15128
+ isPauseVideo && (React.createElement(FormatImage$1, { className: 'clc-pb-video-pause', src: videoPlayIcon !== null && videoPlayIcon !== void 0 ? videoPlayIcon : PAUSE_ICON, alt: 'pause' })))),
15123
15129
  renderPoster,
15124
15130
  renderLoading)) : (React.createElement("div", { className: 'video-container', key: rec === null || rec === void 0 ? void 0 : rec.video.itemId, style: {
15125
15131
  position: 'relative',
@@ -15130,7 +15136,7 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
15130
15136
  React.createElement("div", { className: 'n-full-screen', ref: videoEleRef, id: videoId, style: { width: '100%', height: '100%' } }),
15131
15137
  renderPoster,
15132
15138
  renderLoading,
15133
- React.createElement("img", { hidden: !isPauseVideo, className: 'clc-pb-video-pause', src: videoPlayIcon !== null && videoPlayIcon !== void 0 ? videoPlayIcon : PAUSE_ICON, alt: 'pause' })))));
15139
+ isPauseVideo && React.createElement(FormatImage$1, { className: 'clc-pb-video-pause', src: videoPlayIcon !== null && videoPlayIcon !== void 0 ? videoPlayIcon : PAUSE_ICON, alt: 'pause' })))));
15134
15140
  };
15135
15141
  var VideoWidget$3 = React.memo(VideoWidget$2);
15136
15142
 
@@ -15528,7 +15534,7 @@ var Tagbar$1 = React.memo(Tagbar);
15528
15534
  * @Author: binruan@chatlabs.com
15529
15535
  * @Date: 2024-01-15 19:03:09
15530
15536
  * @LastEditors: binruan@chatlabs.com
15531
- * @LastEditTime: 2024-07-31 11:33:42
15537
+ * @LastEditTime: 2024-08-02 10:50:56
15532
15538
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
15533
15539
  *
15534
15540
  */
@@ -15541,6 +15547,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
15541
15547
  const viewTime = React.useRef();
15542
15548
  const [isLoadMore, setIsLoadMore] = React.useState(false);
15543
15549
  const [isShowMore, setIsShowMore] = React.useState(false);
15550
+ const [isReload, setIsReload] = React.useState(false);
15551
+ const skipLinkRef = React.useRef(false);
15544
15552
  const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport, curTime, h5EnterLink, isShowConsent, selectTag, isPreview } = useSxpDataSource();
15545
15553
  const { backMainFeed } = useEventReport();
15546
15554
  const { productView } = useEventReport();
@@ -15589,7 +15597,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
15589
15597
  React.useEffect(() => {
15590
15598
  const item = data === null || data === void 0 ? void 0 : data[activeIndex];
15591
15599
  const visibleChange = () => {
15592
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
15600
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
15593
15601
  const repCond = !openHashtag && !isShowConsent;
15594
15602
  if (document.visibilityState === 'hidden') {
15595
15603
  // 当用户导航到新页面、切换标签页、关闭标签页、最小化或关闭浏览器、刷新原页面(即离开原页面时),或者在移动设备上从浏览器切换到不同的应用程序时
@@ -15629,11 +15637,14 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
15629
15637
  fromKName,
15630
15638
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
15631
15639
  ctatId: (_r = (_q = (_p = item === null || item === void 0 ? void 0 : item.video) === null || _p === void 0 ? void 0 : _p.bindCta) === null || _q === void 0 ? void 0 : _q.itemId) !== null && _r !== void 0 ? _r : '',
15632
- traceInfo: (_t = (_s = item === null || item === void 0 ? void 0 : item.video) === null || _s === void 0 ? void 0 : _s.traceInfo) !== null && _t !== void 0 ? _t : ''
15640
+ traceInfo: (_v = (_t = (_s = item === null || item === void 0 ? void 0 : item.video) === null || _s === void 0 ? void 0 : _s.traceInfo) !== null && _t !== void 0 ? _t : (_u = item === null || item === void 0 ? void 0 : item.product) === null || _u === void 0 ? void 0 : _u.traceInfo) !== null && _v !== void 0 ? _v : ''
15633
15641
  }
15634
15642
  });
15635
15643
  }
15636
15644
  else if (document.visibilityState === 'visible') {
15645
+ if (skipLinkRef.current === true) {
15646
+ setIsReload(true);
15647
+ }
15637
15648
  // 页面可见时触发,注意页面初始化时不会触发
15638
15649
  handleH5EnterLink();
15639
15650
  if (repCond) {
@@ -15674,7 +15685,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
15674
15685
  const minusHeight = React.useMemo(() => {
15675
15686
  let minusHeight = 0;
15676
15687
  if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
15677
- minusHeight += 45;
15688
+ minusHeight += 56;
15678
15689
  }
15679
15690
  return minusHeight;
15680
15691
  }, []);
@@ -15800,7 +15811,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
15800
15811
  }
15801
15812
  };
15802
15813
  const handleSlideSkip = (item, position) => {
15803
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
15814
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
15804
15815
  if (isPreview || waterFallData)
15805
15816
  return;
15806
15817
  const t = new Date() - curTime.current;
@@ -15819,10 +15830,11 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
15819
15830
  contentTags: (product === null || product === void 0 ? void 0 : product.tags) ? JSON.stringify(product === null || product === void 0 ? void 0 : product.tags) : '',
15820
15831
  position: position + '',
15821
15832
  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 : '',
15822
- 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 : ''
15833
+ traceInfo: (_u = (_s = (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.traceInfo) !== null && _s !== void 0 ? _s : (_t = item === null || item === void 0 ? void 0 : item.product) === null || _t === void 0 ? void 0 : _t.traceInfo) !== null && _u !== void 0 ? _u : ''
15823
15834
  }
15824
15835
  });
15825
15836
  setSlideSkipState();
15837
+ skipLinkRef.current = true;
15826
15838
  window.location.href = window.getJointUtmLink(link);
15827
15839
  }
15828
15840
  }
@@ -15939,7 +15951,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
15939
15951
  renderBottom(rec, index),
15940
15952
  renderLikeButton(rec, index)))))));
15941
15953
  });
15942
- }, [containerWidth, data, height, loading, renderBottom, renderContent, visList, loadingImage]);
15954
+ }, [containerWidth, data, height, loading, renderBottom, renderContent, visList, loadingImage, isReload]);
15943
15955
  const mutedIcon = useIconLink('/pb_static/5beaaa5ce7f3477b99db3838619cc471.png');
15944
15956
  const unmutedIcon = useIconLink('/pb_static/fea8668a8a894e4aa3a86bcc775e895e.png');
15945
15957
  return (React.createElement("div", { id: 'sxp-render', className: 'clc-sxp-container' },
@@ -16350,7 +16362,7 @@ var index$1 = React.memo(DiyPortalPreview);
16350
16362
  * @Author: binruan@chatlabs.com
16351
16363
  * @Date: 2023-10-31 10:56:01
16352
16364
  * @LastEditors: binruan@chatlabs.com
16353
- * @LastEditTime: 2024-07-31 18:54:49
16365
+ * @LastEditTime: 2024-08-01 15:23:51
16354
16366
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Popup\index.tsx
16355
16367
  *
16356
16368
  */
@@ -16376,7 +16388,7 @@ const Popup = () => {
16376
16388
  }
16377
16389
  }, [popup]);
16378
16390
  const handleClose = () => {
16379
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
16391
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
16380
16392
  if (!popup ||
16381
16393
  (popup === null || popup === void 0 ? void 0 : popup.id) === '' ||
16382
16394
  !visible ||
@@ -16387,10 +16399,10 @@ const Popup = () => {
16387
16399
  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));
16388
16400
  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') {
16389
16401
  const data = popupDetailData;
16390
- let product = (_g = data === null || data === void 0 ? void 0 : data.video) === null || _g === void 0 ? void 0 : _g.bindProduct;
16391
- 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;
16402
+ let product = (_h = (_g = data === null || data === void 0 ? void 0 : data.video) === null || _g === void 0 ? void 0 : _g.bindProduct) !== null && _h !== void 0 ? _h : (_k = (_j = data === null || data === void 0 ? void 0 : data.video) === null || _j === void 0 ? void 0 : _j.bindProducts) === null || _k === void 0 ? void 0 : _k[0];
16403
+ let cta = (_o = (_m = (_l = data === null || data === void 0 ? void 0 : data.video) === null || _l === void 0 ? void 0 : _l.bindProduct) === null || _m === void 0 ? void 0 : _m.bindCta) !== null && _o !== void 0 ? _o : (_r = (_q = (_p = data === null || data === void 0 ? void 0 : data.video) === null || _p === void 0 ? void 0 : _p.bindProducts) === null || _q === void 0 ? void 0 : _q[0]) === null || _r === void 0 ? void 0 : _r.bindCta;
16392
16404
  if ((checkCommodityIndexRef === null || checkCommodityIndexRef === void 0 ? void 0 : checkCommodityIndexRef.current) >= 0) {
16393
- 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];
16405
+ const p = (_t = (_s = data === null || data === void 0 ? void 0 : data.video) === null || _s === void 0 ? void 0 : _s.bindProducts) === null || _t === void 0 ? void 0 : _t[checkCommodityIndexRef === null || checkCommodityIndexRef === void 0 ? void 0 : checkCommodityIndexRef.current];
16394
16406
  if (p) {
16395
16407
  product = p;
16396
16408
  cta = p === null || p === void 0 ? void 0 : p.bindCta;
@@ -16416,7 +16428,7 @@ const Popup = () => {
16416
16428
  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';
16417
16429
  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';
16418
16430
  const defaulSetting = (_h = t === null || t === void 0 ? void 0 : t.extend) === null || _h === void 0 ? void 0 : _h.defaulSetting;
16419
- 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 })));
16431
+ 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 })));
16420
16432
  }
16421
16433
  else {
16422
16434
  return React.createElement(React.Fragment, null);