pb-sxp-ui 1.2.10 → 1.3.1

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 (100) hide show
  1. package/dist/index.cjs +700 -284
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.css +62 -2
  4. package/dist/index.js +700 -284
  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 +700 -284
  11. package/dist/pb-ui.js.map +1 -1
  12. package/dist/pb-ui.min.js +3 -3
  13. package/dist/pb-ui.min.js.map +1 -1
  14. package/es/core/components/SxpPageRender/FormatImage.js +1 -1
  15. package/es/core/components/SxpPageRender/Modal/index.js +34 -20
  16. package/es/core/components/SxpPageRender/Popup/index.js +2 -2
  17. package/es/core/components/SxpPageRender/ToggleButton/index.js +4 -1
  18. package/es/core/components/SxpPageRender/WaterFall/List.js +13 -18
  19. package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +12 -17
  20. package/es/core/components/SxpPageRender/index.d.ts +6 -1
  21. package/es/core/components/SxpPageRender/index.js +73 -42
  22. package/es/core/components/SxpPageRender/typing.d.ts +2 -0
  23. package/es/core/context/EditorContext.js +2 -0
  24. package/es/core/context/SxpDataSourceProvider.d.ts +3 -2
  25. package/es/core/context/SxpDataSourceProvider.js +53 -33
  26. package/es/core/hooks/useEventReport.d.ts +1 -1
  27. package/es/core/hooks/useEventReport.js +10 -9
  28. package/es/core/utils/tool.d.ts +5 -1
  29. package/es/core/utils/tool.js +69 -1
  30. package/es/materials/sxp/popup/AppointForm/settingRender.js +15 -0
  31. package/es/materials/sxp/popup/CommodityDetail/index.d.ts +13 -2
  32. package/es/materials/sxp/popup/CommodityDetail/index.js +60 -34
  33. package/es/materials/sxp/popup/CommodityDetail/material.js +4 -0
  34. package/es/materials/sxp/popup/CommodityDetail/settingRender.d.ts +28 -2
  35. package/es/materials/sxp/popup/CommodityDetail/settingRender.js +52 -0
  36. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +13 -2
  37. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +85 -51
  38. package/es/materials/sxp/popup/CommodityDetailDiroNew/material.js +4 -0
  39. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +28 -2
  40. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +52 -0
  41. package/es/materials/sxp/popup/CommodityList/settingRender.js +15 -0
  42. package/es/materials/sxp/popup/Iframe/index.d.ts +16 -0
  43. package/es/materials/sxp/popup/Iframe/index.js +18 -0
  44. package/es/materials/sxp/popup/Iframe/material.d.ts +2 -0
  45. package/es/materials/sxp/popup/Iframe/material.js +21 -0
  46. package/es/materials/sxp/popup/Iframe/settingRender.d.ts +9 -0
  47. package/es/materials/sxp/popup/Iframe/settingRender.js +12 -0
  48. package/es/materials/sxp/popup/Prompt/settingRender.js +16 -1
  49. package/es/materials/sxp/popup/index.d.ts +1 -0
  50. package/es/materials/sxp/popup/index.js +1 -0
  51. package/es/materials/sxp/template/Link/index.js +5 -11
  52. package/es/materials/sxp/template/Link/interactionRender.d.ts +8 -0
  53. package/es/materials/sxp/template/Link/interactionRender.js +11 -0
  54. package/es/materials/sxp/template/Link/material.js +3 -1
  55. package/es/materials/sxp/template/components/EventProvider.d.ts +3 -2
  56. package/es/materials/sxp/template/components/EventProvider.js +3 -3
  57. package/lib/core/components/SxpPageRender/FormatImage.js +1 -1
  58. package/lib/core/components/SxpPageRender/Modal/index.js +34 -20
  59. package/lib/core/components/SxpPageRender/Popup/index.js +2 -2
  60. package/lib/core/components/SxpPageRender/ToggleButton/index.js +3 -0
  61. package/lib/core/components/SxpPageRender/WaterFall/List.js +13 -18
  62. package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +12 -17
  63. package/lib/core/components/SxpPageRender/index.d.ts +6 -1
  64. package/lib/core/components/SxpPageRender/index.js +72 -41
  65. package/lib/core/components/SxpPageRender/typing.d.ts +2 -0
  66. package/lib/core/context/EditorContext.js +2 -0
  67. package/lib/core/context/SxpDataSourceProvider.d.ts +3 -2
  68. package/lib/core/context/SxpDataSourceProvider.js +53 -33
  69. package/lib/core/hooks/useEventReport.d.ts +1 -1
  70. package/lib/core/hooks/useEventReport.js +10 -9
  71. package/lib/core/utils/tool.d.ts +5 -1
  72. package/lib/core/utils/tool.js +73 -1
  73. package/lib/materials/sxp/popup/AppointForm/settingRender.js +15 -0
  74. package/lib/materials/sxp/popup/CommodityDetail/index.d.ts +13 -2
  75. package/lib/materials/sxp/popup/CommodityDetail/index.js +60 -34
  76. package/lib/materials/sxp/popup/CommodityDetail/material.js +4 -0
  77. package/lib/materials/sxp/popup/CommodityDetail/settingRender.d.ts +28 -2
  78. package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +52 -0
  79. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +13 -2
  80. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +85 -51
  81. package/lib/materials/sxp/popup/CommodityDetailDiroNew/material.js +4 -0
  82. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +28 -2
  83. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +52 -0
  84. package/lib/materials/sxp/popup/CommodityList/settingRender.js +15 -0
  85. package/lib/materials/sxp/popup/Iframe/index.d.ts +16 -0
  86. package/lib/materials/sxp/popup/Iframe/index.js +20 -0
  87. package/lib/materials/sxp/popup/Iframe/material.d.ts +2 -0
  88. package/lib/materials/sxp/popup/Iframe/material.js +25 -0
  89. package/lib/materials/sxp/popup/Iframe/settingRender.d.ts +9 -0
  90. package/lib/materials/sxp/popup/Iframe/settingRender.js +14 -0
  91. package/lib/materials/sxp/popup/Prompt/settingRender.js +16 -1
  92. package/lib/materials/sxp/popup/index.d.ts +1 -0
  93. package/lib/materials/sxp/popup/index.js +1 -0
  94. package/lib/materials/sxp/template/Link/index.js +5 -11
  95. package/lib/materials/sxp/template/Link/interactionRender.d.ts +8 -0
  96. package/lib/materials/sxp/template/Link/interactionRender.js +13 -0
  97. package/lib/materials/sxp/template/Link/material.js +3 -1
  98. package/lib/materials/sxp/template/components/EventProvider.d.ts +3 -2
  99. package/lib/materials/sxp/template/components/EventProvider.js +3 -3
  100. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -239,6 +239,87 @@ const setFontForText = (textContent, style) => {
239
239
  }
240
240
  return content;
241
241
  };
242
+ function getBrowserInfo() {
243
+ var _a, _b, _c, _d, _e, _f, _g;
244
+ let userAgent = self.navigator.userAgent;
245
+ if (!userAgent)
246
+ return 'Unknown';
247
+ if (/edge\/([\d\.]+)/i.exec(userAgent))
248
+ return `Edge ${(_a = /edge\/([\d\.]+)/i.exec(userAgent)) === null || _a === void 0 ? void 0 : _a[1]}`;
249
+ if (/edg\/([\d\.]+)/i.exec(userAgent))
250
+ return `Edge(Chromium) ${(_b = /edge\/([\d\.]+)/i.exec(userAgent)) === null || _b === void 0 ? void 0 : _b[1]}`;
251
+ if (/msie/i.test(userAgent))
252
+ return `Internet Explorer ${(_c = /msie ([\d\.]+)/i.exec(userAgent)) === null || _c === void 0 ? void 0 : _c[1]}`;
253
+ if (/Trident/i.test(userAgent))
254
+ return `Internet Explorer ${(_d = /rv:([\d\.]+)/i.exec(userAgent)) === null || _d === void 0 ? void 0 : _d[1]}`;
255
+ if (/chrome/i.test(userAgent))
256
+ return `Chrome ${(_e = /chrome\/([\d\.]+)/i.exec(userAgent)) === null || _e === void 0 ? void 0 : _e[1]}`;
257
+ if (/firefox/i.test(userAgent))
258
+ return `Firefox ${(_f = /firefox\/([\d\.]+)/i.exec(userAgent)) === null || _f === void 0 ? void 0 : _f[1]}`;
259
+ if (/safari/i.test(userAgent))
260
+ return `Safari ${(_g = /version\/([\d\.]+)/i.exec(userAgent)) === null || _g === void 0 ? void 0 : _g[1]}`;
261
+ return 'Unknown';
262
+ }
263
+ function getSystem() {
264
+ var _a, _b, _c;
265
+ let userAgent = self.navigator.userAgent;
266
+ if (!userAgent)
267
+ return 'Unknown';
268
+ if (/iphone/i.test(userAgent))
269
+ return `IOS ${(_a = userAgent.match(/OS\s(.*?)\slike/)) === null || _a === void 0 ? void 0 : _a[1]}`;
270
+ if (/android/i.test(userAgent))
271
+ return `Android ${(_b = userAgent.match(/Android\s(.*?)\;/)) === null || _b === void 0 ? void 0 : _b[1]}`;
272
+ if (/windows/i.test(userAgent))
273
+ return `Windows ${(_c = userAgent.match(/Windows\s(.*?)\;/)) === null || _c === void 0 ? void 0 : _c[1]}`;
274
+ if (/mac/i.test(userAgent))
275
+ return `Mac OS`;
276
+ return 'Unknown';
277
+ }
278
+ function getDevice$1() {
279
+ let userAgent = self.navigator.userAgent;
280
+ if (!userAgent)
281
+ return 'Unknown';
282
+ if (/iphone/i.test(userAgent))
283
+ return `iPhone`;
284
+ if (/android/i.test(userAgent)) {
285
+ // var index1 = userAgent.indexOf(';');
286
+ // var index2 = userAgent.indexOf(';', index1 + 1);
287
+ // var index3 = userAgent.indexOf(';', index2 + 1);
288
+ // var index4 = userAgent.indexOf(';', index3 + 1);
289
+ // if (index2 !== -1 && index3 !== -1) {
290
+ // var value1 = userAgent.substring(index3 + 1, index4);
291
+ // return `${value1}`;
292
+ // }
293
+ var index1 = userAgent.indexOf('(');
294
+ var index2 = userAgent.indexOf(')');
295
+ if (index1 !== -1 && index2 !== -1) {
296
+ var value = userAgent.substring(index1 + 1, index2);
297
+ return `${value}`;
298
+ }
299
+ }
300
+ if (/windows/i.test(userAgent))
301
+ return `Windows`;
302
+ if (/mac/i.test(userAgent))
303
+ return `Mac`;
304
+ return 'Unknown';
305
+ }
306
+ function getCookie(val) {
307
+ // const expirationDate = new Date();
308
+ // expirationDate.setDate(expirationDate.getDate() + 100);
309
+ // document.cookie = `_fbc=IwAR2F4-dbP0l7Mn1IawQQGCINEz7PYXQvwjNwB_qa2ofrHyiLjcbCRxTDGrc; expires=${expirationDate.toUTCString()}; path=/`;
310
+ const cookies = document.cookie;
311
+ // 将cookie字符串拆分成数组
312
+ const cookieArray = cookies.split(';');
313
+ let value = null;
314
+ // 遍历cookie数组,查找名为_fbc的cookie
315
+ cookieArray.forEach((cookie) => {
316
+ const [cookieName, cookieValue] = cookie.trim().split('=');
317
+ if (cookieName === val) {
318
+ value = cookieValue;
319
+ }
320
+ });
321
+ return value !== null && value !== void 0 ? value : '';
322
+ }
242
323
 
243
324
  function unzip(b64Data) {
244
325
  const strData = atob(b64Data);
@@ -554,7 +635,7 @@ var DataSourceType;
554
635
  DataSourceType[DataSourceType["BFF"] = 5] = "BFF";
555
636
  })(DataSourceType || (DataSourceType = {}));
556
637
  const DEFAULT_TAG = 'FOR U';
557
- const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false, enabledMetaConversionApi = false, consentHeight, consentWidth, isShowTag = true, isOpenConsent = false, globalConfig, isEditor = false, utmParameter }) => {
638
+ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false, enabledMetaConversionApi = false, consentHeight, consentWidth, isShowTag = true, isOpenConsent = false, globalConfig, isEditor = false, utmParameter, channelQueryList }) => {
558
639
  var _a, _b, _c;
559
640
  const [rtcList, setRtcList] = React.useState([]);
560
641
  const [tagList, setTagList] = React.useState([]);
@@ -637,16 +718,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
637
718
  }, [bffDataSource]);
638
719
  // 获取推荐视频数据
639
720
  const getRecommendVideos = React.useCallback((query) => __awaiter(void 0, void 0, void 0, function* () {
640
- var _d, _e, _f, _g, _h;
641
- query = {
642
- maxSize: (_d = query === null || query === void 0 ? void 0 : query.maxSize) !== null && _d !== void 0 ? _d : maxSize,
643
- defaultSize: (_e = query === null || query === void 0 ? void 0 : query.defaultSize) !== null && _e !== void 0 ? _e : defaultSize,
644
- 'itemFilter.itemId': query === null || query === void 0 ? void 0 : query['itemFilter.itemId'],
645
- 'itemFilter.itemType': query === null || query === void 0 ? void 0 : query['itemFilter.itemType'],
646
- hashTag: query === null || query === void 0 ? void 0 : query.hashTag,
647
- traceInfo: query === null || query === void 0 ? void 0 : query.traceInfo,
648
- themeTag: query === null || query === void 0 ? void 0 : query.themeTag
649
- };
721
+ var _d, _e, _f, _g, _h, _j, _k;
722
+ query = Object.assign(Object.assign({ maxSize: (_d = query === null || query === void 0 ? void 0 : query.maxSize) !== null && _d !== void 0 ? _d : maxSize, defaultSize: (_e = query === null || query === void 0 ? void 0 : query.defaultSize) !== null && _e !== void 0 ? _e : defaultSize, hashTag: query === null || query === void 0 ? void 0 : query.hashTag, traceInfo: query === null || query === void 0 ? void 0 : query.traceInfo, themeTag: query === null || query === void 0 ? void 0 : query.themeTag }, ((query === null || query === void 0 ? void 0 : query.contentFilter) && { contentFilter: `[${query === null || query === void 0 ? void 0 : query.contentFilter}]` })), ((query === null || query === void 0 ? void 0 : query.productFilter) && { productFilter: `[${query === null || query === void 0 ? void 0 : query.productFilter}]` }));
650
723
  if (utmVal) {
651
724
  const val = (_h = (_g = (_f = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _f === void 0 ? void 0 : _f.filter((val) => {
652
725
  var _a, _b;
@@ -655,6 +728,32 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
655
728
  })) === null || _g === void 0 ? void 0 : _g.join('&')) !== null && _h !== void 0 ? _h : '';
656
729
  query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(val) });
657
730
  }
731
+ if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) || isEditor) {
732
+ query = Object.assign(Object.assign(Object.assign({}, query), { directPage: true, level: 1 }), (!utmVal && channelQueryList && (channelQueryList === null || channelQueryList === void 0 ? void 0 : channelQueryList.length) > 0 && { channel: channelQueryList === null || channelQueryList === void 0 ? void 0 : channelQueryList[0] }));
733
+ if (!(query === null || query === void 0 ? void 0 : query.channel))
734
+ return;
735
+ let list = [];
736
+ let result = null;
737
+ let pageNum = 1;
738
+ const recurveRecList = (query) => __awaiter(void 0, void 0, void 0, function* () {
739
+ var _l, _m, _o, _p;
740
+ query.pageNum = pageNum;
741
+ result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/list', { method: 'GET', query }));
742
+ if (!(result === null || result === void 0 ? void 0 : result.success)) {
743
+ return undefined;
744
+ }
745
+ const rec = (_m = (_l = result === null || result === void 0 ? void 0 : result.data) === null || _l === void 0 ? void 0 : _l.recList) === null || _m === void 0 ? void 0 : _m[0];
746
+ list = list.concat((_p = (_o = result === null || result === void 0 ? void 0 : result.data) === null || _o === void 0 ? void 0 : _o.recList) !== null && _p !== void 0 ? _p : []);
747
+ if ((rec === null || rec === void 0 ? void 0 : rec.product) || (rec === null || rec === void 0 ? void 0 : rec.video)) {
748
+ pageNum = pageNum + 1;
749
+ yield recurveRecList(query);
750
+ }
751
+ });
752
+ yield recurveRecList(query);
753
+ if (!(query === null || query === void 0 ? void 0 : query.hashTag) && result)
754
+ setCurReqInfo({ rtc: (_j = result === null || result === void 0 ? void 0 : result.data) === null || _j === void 0 ? void 0 : _j.rtc, requestId: (_k = result === null || result === void 0 ? void 0 : result.data) === null || _k === void 0 ? void 0 : _k.requestId });
755
+ return Object.assign(Object.assign({}, result.data), { recList: list });
756
+ }
658
757
  const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/list', { method: 'GET', query }));
659
758
  if (!(result === null || result === void 0 ? void 0 : result.success)) {
660
759
  return undefined;
@@ -662,23 +761,20 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
662
761
  if (!(query === null || query === void 0 ? void 0 : query.hashTag))
663
762
  setCurReqInfo({ rtc: result.data.rtc, requestId: result.data.requestId });
664
763
  return result === null || result === void 0 ? void 0 : result.data;
665
- }), [bffFetch, utmVal, maxSize, defaultSize]);
764
+ }), [bffFetch, utmVal, maxSize, defaultSize, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview, channelQueryList, isEditor]);
666
765
  const loadVideos = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
766
+ var _q, _r, _s, _t;
667
767
  if (rtcList.length <= 0) {
668
768
  return;
669
769
  }
670
- const data = yield getRecommendVideos({
671
- hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag,
672
- 'itemFilter.itemId': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId,
673
- 'itemFilter.itemType': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemType,
674
- themeTag: themeTag.current
675
- });
770
+ const lastItem = rtcList === null || rtcList === void 0 ? void 0 : rtcList[(rtcList === null || rtcList === void 0 ? void 0 : rtcList.length) - 1];
771
+ const data = yield getRecommendVideos(Object.assign(Object.assign(Object.assign({ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag }, (((_q = lastItem === null || lastItem === void 0 ? void 0 : lastItem.product) === null || _q === void 0 ? void 0 : _q.itemId) && { productFilter: (_r = lastItem === null || lastItem === void 0 ? void 0 : lastItem.product) === null || _r === void 0 ? void 0 : _r.itemId })), (((_s = lastItem === null || lastItem === void 0 ? void 0 : lastItem.video) === null || _s === void 0 ? void 0 : _s.itemId) && { contentFilter: (_t = lastItem === null || lastItem === void 0 ? void 0 : lastItem.video) === null || _t === void 0 ? void 0 : _t.itemId })), { themeTag: themeTag.current }));
676
772
  setRtcList(rtcList.concat(getFilterRecList(data)));
677
773
  setCacheRtcList(cacheRtcList.concat(getFilterRecList(data)));
678
774
  }), [getRecommendVideos, rtcList, waterFallData, cacheRtcList]);
679
775
  const bffEventReport = React.useCallback(({ userInfo, eventInfo }) => {
680
776
  // 关闭 BFF 事件上报
681
- if (!enableReportEvent) {
777
+ if (!enableReportEvent || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview)) {
682
778
  return;
683
779
  }
684
780
  // 用户信息都是公共的
@@ -689,7 +785,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
689
785
  };
690
786
  }
691
787
  const sessionID = storeAndLoadFeSessionId();
692
- const ef = Object.assign({ sessionID, rtc: curReqInfo.rtc, requestId: curReqInfo.requestId }, eventInfo);
788
+ const ef = Object.assign(Object.assign({ sessionID, rtc: curReqInfo.rtc, requestId: curReqInfo.requestId }, eventInfo), { sxpDevice: getDevice$1(), sxpSystem: getSystem(), sxpBrowser: getBrowserInfo() });
693
789
  const realUserInfo = Object.entries(userInfo).map(([k, v]) => ({ name: k, value: v }));
694
790
  const realEventInfo = Object.entries(ef)
695
791
  .map(([k, v]) => v && { name: k, value: v })
@@ -703,11 +799,11 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
703
799
  body: { userInfo: realUserInfo, eventInfo: realEventInfo },
704
800
  type: 'beacon'
705
801
  });
706
- }, [bffFetch, curReqInfo, enableReportEvent]);
802
+ }, [bffFetch, curReqInfo, enableReportEvent, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview]);
707
803
  const bffFbReport = React.useCallback((_a) => {
708
- var _b;
804
+ var _b, _c;
709
805
  var { eventName, actionSource = 'website', eventSourceUrl = (_b = window === null || window === void 0 ? void 0 : window.location) === null || _b === void 0 ? void 0 : _b.href, externalId } = _a;
710
- if (!enableReportEvent || !enabledMetaConversionApi) {
806
+ if (!enableReportEvent || !enabledMetaConversionApi || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview)) {
711
807
  return;
712
808
  }
713
809
  const fakeUserId = storeAndLoadFeUserId();
@@ -718,12 +814,15 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
718
814
  actionSource,
719
815
  eventSourceUrl,
720
816
  userData: {
721
- externalId: fakeUserId
817
+ externalId: fakeUserId,
818
+ fbc: `fb.2.${new Date().getTime()}.${getCookie('_fbc')}`,
819
+ fbp: `fb.2.${new Date().getTime()}.${getCookie('_fbp')}`,
820
+ client_user_agent: (_c = window === null || window === void 0 ? void 0 : window.navigator) === null || _c === void 0 ? void 0 : _c.userAgent
722
821
  }
723
822
  },
724
823
  type: 'beacon'
725
824
  });
726
- }, [bffFetch, enableReportEvent, enabledMetaConversionApi]);
825
+ }, [bffFetch, enableReportEvent, enabledMetaConversionApi, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview]);
727
826
  const bffMutateLike = React.useCallback((body) => __awaiter(void 0, void 0, void 0, function* () {
728
827
  const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/like', { method: 'POST', body }));
729
828
  return res === null || res === void 0 ? void 0 : res.success;
@@ -738,24 +837,24 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
738
837
  }), [bffFetch]);
739
838
  // 获取 Tag
740
839
  const bffGetTagList = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
741
- var _j, _k, _l, _m, _o;
840
+ var _u, _v, _w, _x, _y;
742
841
  if (!utmVal || !isShowTag)
743
842
  return;
744
843
  try {
745
- const val = (_l = (_k = (_j = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _j === void 0 ? void 0 : _j.filter((val) => {
844
+ const val = (_w = (_v = (_u = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _u === void 0 ? void 0 : _u.filter((val) => {
746
845
  var _a, _b;
747
846
  const key = val.split('=')[0];
748
847
  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);
749
- })) === null || _k === void 0 ? void 0 : _k.join('&')) !== null && _l !== void 0 ? _l : '';
848
+ })) === null || _v === void 0 ? void 0 : _v.join('&')) !== null && _w !== void 0 ? _w : '';
750
849
  const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/tag/list', { method: 'GET', query: { channel: decodeURIComponent(val) } }));
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 : []);
850
+ setTagList((_y = (_x = result === null || result === void 0 ? void 0 : result.data) === null || _x === void 0 ? void 0 : _x.tags) !== null && _y !== void 0 ? _y : []);
752
851
  }
753
852
  catch (e) {
754
853
  console.log('e', e);
755
854
  }
756
855
  }), [bffFetch, utmVal, isShowTag]);
757
856
  const ctaEvent = React.useCallback((eventInfo, rec, product, position) => {
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;
857
+ 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, _4, _5, _6, _7, _8, _9, _10, _11;
759
858
  const cta = product === null || product === void 0 ? void 0 : product.bindCta;
760
859
  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);
761
860
  let fromKName = '';
@@ -768,8 +867,9 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
768
867
  else if ((_g = (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.imgUrls) === null || _g === void 0 ? void 0 : _g.length) {
769
868
  fromKName = 'imagePage';
770
869
  }
870
+ const contentTags = (_p = (_m = (_h = product === null || product === void 0 ? void 0 : product.tags) !== null && _h !== void 0 ? _h : (_l = (_k = (_j = rec === null || rec === void 0 ? void 0 : rec.video) === null || _j === void 0 ? void 0 : _j.bindProducts) === null || _k === void 0 ? void 0 : _k[0]) === null || _l === void 0 ? void 0 : _l.tags) !== null && _m !== void 0 ? _m : (_o = rec === null || rec === void 0 ? void 0 : rec.video) === null || _o === void 0 ? void 0 : _o.tags) !== null && _p !== void 0 ? _p : (_q = rec === null || rec === void 0 ? void 0 : rec.product) === null || _q === void 0 ? void 0 : _q.tags;
771
871
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
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 : '' })
872
+ eventInfo: Object.assign(Object.assign({}, eventInfo), { ctaId: (_r = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _r !== void 0 ? _r : '', ctaName: (_s = cta === null || cta === void 0 ? void 0 : cta.title) !== null && _s !== void 0 ? _s : '', contentTags: contentTags ? JSON.stringify(contentTags) : '', position: position + '', contentId: (_u = (_t = rec === null || rec === void 0 ? void 0 : rec.video) === null || _t === void 0 ? void 0 : _t.itemId) !== null && _u !== void 0 ? _u : '', productId: isProd ? product === null || product === void 0 ? void 0 : product.itemId : '', traceInfo: (_10 = (_7 = (_2 = (_y = (_v = cta === null || cta === void 0 ? void 0 : cta.traceInfo) !== null && _v !== void 0 ? _v : (_x = (_w = rec === null || rec === void 0 ? void 0 : rec.video) === null || _w === void 0 ? void 0 : _w.bindCta) === null || _x === void 0 ? void 0 : _x.traceInfo) !== null && _y !== void 0 ? _y : (_1 = (_0 = (_z = rec === null || rec === void 0 ? void 0 : rec.video) === null || _z === void 0 ? void 0 : _z.bindProduct) === null || _0 === void 0 ? void 0 : _0.bindCta) === null || _1 === void 0 ? void 0 : _1.traceInfo) !== null && _2 !== void 0 ? _2 : (_6 = (_5 = (_4 = (_3 = rec === null || rec === void 0 ? void 0 : rec.video) === null || _3 === void 0 ? void 0 : _3.bindProducts) === null || _4 === void 0 ? void 0 : _4[0]) === null || _5 === void 0 ? void 0 : _5.bindCta) === null || _6 === void 0 ? void 0 : _6.traceInfo) !== null && _7 !== void 0 ? _7 : (_9 = (_8 = rec === null || rec === void 0 ? void 0 : rec.product) === null || _8 === void 0 ? void 0 : _8.bindCta) === null || _9 === void 0 ? void 0 : _9.traceInfo) !== null && _10 !== void 0 ? _10 : '', fromKName, fromKPage: (_11 = location === null || location === void 0 ? void 0 : location.href) !== null && _11 !== void 0 ? _11 : '' })
773
873
  });
774
874
  }, [bffEventReport, isFromHashtag]);
775
875
  const h5EnterLink = React.useCallback(() => {
@@ -824,7 +924,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
824
924
  });
825
925
  }, [isShowConsent]);
826
926
  React.useEffect(() => {
827
- if (!isInit.current)
927
+ if (!isInit.current && !isEditor)
828
928
  return;
829
929
  setLoading(true);
830
930
  bffGetTagList();
@@ -836,7 +936,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
836
936
  .finally(() => {
837
937
  setLoading(false);
838
938
  });
839
- }, [getRecommendVideos, bffGetTagList]);
939
+ }, [bffGetTagList, isEditor, getRecommendVideos]);
840
940
  const defaultLoadingImage = useIconLink('/pb_static/a65d23c5893c49d7aaaa81681d3179e2.gif', appDomain);
841
941
  return (React.createElement(SxpDataSourceContext.Provider, { value: {
842
942
  rtcList,
@@ -1039,6 +1139,7 @@ const EditorCore = React.forwardRef(({ children, resolver, isSsr, schema, enable
1039
1139
  });
1040
1140
  typeof window !== 'undefined' &&
1041
1141
  (window.getJointUtmLink = (url) => {
1142
+ setSlideSkipState();
1042
1143
  if ((url === null || url === void 0 ? void 0 : url.indexOf('?')) !== -1) {
1043
1144
  return url + (utmVal ? '&' + utmVal : '');
1044
1145
  }
@@ -1121,7 +1222,7 @@ var index$2 = /*#__PURE__*/Object.freeze({
1121
1222
  EditorCore: EditorCore
1122
1223
  });
1123
1224
 
1124
- var interactionRender$d = [
1225
+ var interactionRender$e = [
1125
1226
  {
1126
1227
  title: '点击事件',
1127
1228
  child: [
@@ -1137,11 +1238,26 @@ var interactionRender$d = [
1137
1238
  * @Author: binruan@chatlabs.com
1138
1239
  * @Date: 2023-07-28 18:29:57
1139
1240
  * @LastEditors: binruan@chatlabs.com
1140
- * @LastEditTime: 2024-08-06 14:13:47
1241
+ * @LastEditTime: 2024-08-06 15:35:25
1141
1242
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\AppointForm\settingRender.tsx
1142
1243
  *
1143
1244
  */
1144
- var settingRender$9 = [
1245
+ var settingRender$a = [
1246
+ {
1247
+ title: '弹窗背景',
1248
+ child: [
1249
+ {
1250
+ type: 'Number',
1251
+ label: '左右边距',
1252
+ name: ['props', 'popupBg', 'horizontalMargin']
1253
+ },
1254
+ {
1255
+ type: 'Number',
1256
+ label: '下边距',
1257
+ name: ['props', 'popupBg', 'bottomMargin']
1258
+ }
1259
+ ]
1260
+ },
1145
1261
  {
1146
1262
  type: 'Text',
1147
1263
  label: '组件名称',
@@ -1311,14 +1427,14 @@ var settingRender$9 = [
1311
1427
  * @Author: binruan@chatlabs.com
1312
1428
  * @Date: 2024-03-12 10:59:06
1313
1429
  * @LastEditors: binruan@chatlabs.com
1314
- * @LastEditTime: 2024-08-01 17:36:34
1430
+ * @LastEditTime: 2024-08-14 17:02:53
1315
1431
  * @FilePath: \pb-sxp-ui\src\core\hooks\useEventReport.ts
1316
1432
  *
1317
1433
  */
1318
1434
  function useEventReport() {
1319
1435
  const { bffEventReport, popupDetailData, waterFallData, isFromHashtag } = useSxpDataSource();
1320
- const jumpToWeb = React.useCallback((data, product, cta, position) => {
1321
- 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;
1436
+ const jumpToWeb = React.useCallback((data, product, cta, position, traceInfo) => {
1437
+ 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, _4, _5, _6, _7, _8, _9;
1322
1438
  let fromKName = '';
1323
1439
  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))) {
1324
1440
  fromKName = 'pdpPage';
@@ -1335,21 +1451,22 @@ function useEventReport() {
1335
1451
  else if (data === null || data === void 0 ? void 0 : data.product) {
1336
1452
  fromKName = 'productPage';
1337
1453
  }
1454
+ const contentTags = (_p = (_m = (_h = product === null || product === void 0 ? void 0 : product.tags) !== 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.tags) !== null && _m !== void 0 ? _m : (_o = data === null || data === void 0 ? void 0 : data.video) === null || _o === void 0 ? void 0 : _o.tags) !== null && _p !== void 0 ? _p : (_q = data === null || data === void 0 ? void 0 : data.product) === null || _q === void 0 ? void 0 : _q.tags;
1338
1455
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
1339
1456
  eventInfo: {
1340
1457
  eventSubject: 'jumpToWeb',
1341
1458
  eventDescription: 'User jumped to website',
1342
- productId: (_h = product === null || product === void 0 ? void 0 : product.itemId) !== null && _h !== void 0 ? _h : '',
1343
- productName: (_j = product === null || product === void 0 ? void 0 : product.title) !== null && _j !== void 0 ? _j : '',
1459
+ productId: (_r = product === null || product === void 0 ? void 0 : product.itemId) !== null && _r !== void 0 ? _r : '',
1460
+ productName: (_s = product === null || product === void 0 ? void 0 : product.title) !== null && _s !== void 0 ? _s : '',
1344
1461
  price: (product === null || product === void 0 ? void 0 : product.price) ? (product === null || product === void 0 ? void 0 : product.price) + '' : '0',
1345
- productCollection: (_k = product === null || product === void 0 ? void 0 : product.collection) !== null && _k !== void 0 ? _k : '',
1462
+ productCollection: (_t = product === null || product === void 0 ? void 0 : product.collection) !== null && _t !== void 0 ? _t : '',
1346
1463
  fromKName,
1347
1464
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
1348
- contentTags: (product === null || product === void 0 ? void 0 : product.tags) ? JSON.stringify(product === null || product === void 0 ? void 0 : product.tags) : '',
1465
+ contentTags: contentTags ? JSON.stringify(contentTags) : '',
1349
1466
  position: position + '',
1350
- 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 : '',
1351
- ctatId: (_o = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _o !== void 0 ? _o : '',
1352
- 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 : ''
1467
+ contentId: (_v = (_u = data === null || data === void 0 ? void 0 : data.video) === null || _u === void 0 ? void 0 : _u.itemId) !== null && _v !== void 0 ? _v : '',
1468
+ ctatId: (_w = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _w !== void 0 ? _w : '',
1469
+ traceInfo: (_9 = (_6 = (_4 = (_0 = (_x = traceInfo !== null && traceInfo !== void 0 ? traceInfo : product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _x !== void 0 ? _x : (_z = (_y = data === null || data === void 0 ? void 0 : data.video) === null || _y === void 0 ? void 0 : _y.bindProduct) === null || _z === void 0 ? void 0 : _z.traceInfo) !== null && _0 !== void 0 ? _0 : (_3 = (_2 = (_1 = data === null || data === void 0 ? void 0 : data.video) === null || _1 === void 0 ? void 0 : _1.bindProducts) === null || _2 === void 0 ? void 0 : _2[0]) === null || _3 === void 0 ? void 0 : _3.traceInfo) !== null && _4 !== void 0 ? _4 : (_5 = data === null || data === void 0 ? void 0 : data.product) === null || _5 === void 0 ? void 0 : _5.traceInfo) !== null && _6 !== void 0 ? _6 : (_8 = (_7 = data === null || data === void 0 ? void 0 : data.video) === null || _7 === void 0 ? void 0 : _7.bindCta) === null || _8 === void 0 ? void 0 : _8.traceInfo) !== null && _9 !== void 0 ? _9 : ''
1353
1470
  }
1354
1471
  });
1355
1472
  }, [bffEventReport, popupDetailData, isFromHashtag]);
@@ -1519,9 +1636,9 @@ const AppointForm = createMaterial(AppointFormComponent, {
1519
1636
  category: 'popup',
1520
1637
  type: 'AppointForm',
1521
1638
  related: {
1522
- settingRender: settingRender$9,
1639
+ settingRender: settingRender$a,
1523
1640
  bindableProps: [],
1524
- interactionRender: interactionRender$d
1641
+ interactionRender: interactionRender$e
1525
1642
  },
1526
1643
  defaulSetting: {
1527
1644
  name: '表单',
@@ -1544,10 +1661,41 @@ const AppointForm = createMaterial(AppointFormComponent, {
1544
1661
  sort: 2
1545
1662
  });
1546
1663
 
1547
- var settingRender$8 = [
1664
+ var settingRender$9 = [
1665
+ {
1666
+ title: '弹窗背景',
1667
+ child: [
1668
+ {
1669
+ type: 'Number',
1670
+ label: '左右边距',
1671
+ name: ['props', 'popupBg', 'horizontalMargin']
1672
+ },
1673
+ {
1674
+ type: 'Number',
1675
+ label: '下边距',
1676
+ name: ['props', 'popupBg', 'bottomMargin']
1677
+ }
1678
+ ]
1679
+ },
1548
1680
  {
1549
1681
  title: '商品图片',
1550
1682
  child: [
1683
+ {
1684
+ type: 'Group',
1685
+ label: '宽高比',
1686
+ child: [
1687
+ {
1688
+ type: 'Number',
1689
+ name: ['props', 'commodityImgRatio', 'w'],
1690
+ addonAfter: 'w'
1691
+ },
1692
+ {
1693
+ type: 'Number',
1694
+ name: ['props', 'commodityImgRatio', 'h'],
1695
+ addonAfter: 'h'
1696
+ }
1697
+ ]
1698
+ },
1551
1699
  {
1552
1700
  type: 'Radius',
1553
1701
  label: '轮播指示器',
@@ -1559,6 +1707,10 @@ var settingRender$8 = [
1559
1707
  {
1560
1708
  label: '居中',
1561
1709
  value: 'center'
1710
+ },
1711
+ {
1712
+ label: '居右',
1713
+ value: 'right'
1562
1714
  }
1563
1715
  ],
1564
1716
  name: ['props', 'swiper', 'dotsAlign']
@@ -1723,6 +1875,12 @@ var settingRender$8 = [
1723
1875
  {
1724
1876
  label: '间距',
1725
1877
  type: 'TextSpace'
1878
+ },
1879
+ {
1880
+ label: '价格千分符展示',
1881
+ type: 'Switch',
1882
+ name: ['enableFormattedPrice'],
1883
+ initialValue: true
1726
1884
  }
1727
1885
  ]
1728
1886
  }
@@ -1815,6 +1973,17 @@ var settingRender$8 = [
1815
1973
  name: ['props', 'buttonStyle']
1816
1974
  }
1817
1975
  ]
1976
+ },
1977
+ {
1978
+ title: 'Iframe商品弹窗',
1979
+ child: [
1980
+ {
1981
+ label: '弹窗按钮',
1982
+ type: 'Upload',
1983
+ name: ['props', 'iframeIcon'],
1984
+ text: '建议尺寸:106 * 41'
1985
+ }
1986
+ ]
1818
1987
  }
1819
1988
  ];
1820
1989
 
@@ -8644,13 +8813,13 @@ SwiperSlide.displayName = 'SwiperSlide';
8644
8813
  * @Author: binruan@chatlabs.com
8645
8814
  * @Date: 2023-11-02 18:34:34
8646
8815
  * @LastEditors: binruan@chatlabs.com
8647
- * @LastEditTime: 2024-07-29 16:20:40
8816
+ * @LastEditTime: 2024-08-16 17:58:56
8648
8817
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Modal\index.tsx
8649
8818
  *
8650
8819
  */
8651
8820
  const closeIcon$1 = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII=';
8652
8821
  const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema, fullHeight = window.innerHeight, isFullScreen = false }) => {
8653
- var _a, _b;
8822
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
8654
8823
  const touchRef = React.useRef(null);
8655
8824
  const fTouchRef = React.useRef(null);
8656
8825
  const touchMoveRef = React.useRef(null);
@@ -8677,12 +8846,16 @@ const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema,
8677
8846
  const isOpen = React.useMemo(() => {
8678
8847
  return ((popup === null || popup === void 0 ? void 0 : popup.id) && (popup === null || popup === void 0 ? void 0 : popup.id) !== '') || visible;
8679
8848
  }, [visible, popup]);
8680
- const isScrollFullScreen = React.useMemo(() => {
8681
- var _a, _b, _c, _d, _e;
8849
+ const getPopupById = React.useMemo(() => {
8850
+ var _a, _b, _c;
8682
8851
  const schemaData = schema !== null && schema !== void 0 ? schema : _schema;
8683
8852
  const value = (_c = (_b = (_a = schemaData === null || schemaData === void 0 ? void 0 : schemaData.sxpPageConf) === null || _a === void 0 ? void 0 : _a.globalConfig) === null || _b === void 0 ? void 0 : _b.popupList) === null || _c === void 0 ? void 0 : _c.find((value) => (value === null || value === void 0 ? void 0 : value.id) === (popup === null || popup === void 0 ? void 0 : popup.id));
8684
- return ((_e = (_d = value === null || value === void 0 ? void 0 : value.item) === null || _d === void 0 ? void 0 : _d.event) === null || _e === void 0 ? void 0 : _e.isScrollFullScreen) || false;
8853
+ return value;
8685
8854
  }, [popup, schema, _schema]);
8855
+ const isScrollFullScreen = React.useMemo(() => {
8856
+ var _a, _b;
8857
+ return ((_b = (_a = getPopupById === null || getPopupById === void 0 ? void 0 : getPopupById.item) === null || _a === void 0 ? void 0 : _a.event) === null || _b === void 0 ? void 0 : _b.isScrollFullScreen) || false;
8858
+ }, [getPopupById]);
8686
8859
  React.useEffect(() => {
8687
8860
  if (isOpen) {
8688
8861
  setIsShow(true);
@@ -8749,22 +8922,32 @@ const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema,
8749
8922
  touchMoveRef.current = false;
8750
8923
  };
8751
8924
  return ReactDOM__namespace.createPortal(React.createElement(React.Fragment, null, isShow && (React.createElement("div", { className: 'modal-bg', style: Object.assign({ display: 'flex', backgroundColor: isOpen ? 'rgba(0, 0, 0, 0.7)' : 'rgba(0, 0, 0, 0)' }, modalStyle), onClick: handleClose },
8752
- React.createElement("div", Object.assign({ className: `modal-container ${isOpen ? 'modal-popIn' : 'modal-popOut'}`, style: Object.assign({ padding, animationDuration: ((_a = popup === null || popup === void 0 ? void 0 : popup.duration) !== null && _a !== void 0 ? _a : 0) / 1000 + 's' }, (isScrollFullScreen && {
8753
- transform: `translateY(${modalTrans}px)`
8754
- })), onClick: (e) => {
8755
- e.stopPropagation();
8756
- e.preventDefault();
8757
- } }, (isScrollFullScreen && {
8758
- onTouchMove: handleTouchMove,
8759
- onTouchStart: handleTouchStart,
8760
- onTouchEnd: handleTouchEnd
8761
- })),
8762
- React.createElement("div", { onClick: onClose, className: 'modal-icon-wrapper' },
8763
- React.createElement("img", { src: (_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.popupCloseIcon) !== null && _b !== void 0 ? _b : closeIcon$1, alt: 'close', className: 'modal-icon' })),
8764
- React.createElement("div", { ref: ref, style: {
8765
- height: isScrollFullScreen ? fullHeight : MODAL_DEF_CON_H,
8766
- overflow: (isScrollFullScreen && modalTrans <= 0) || !isScrollFullScreen ? 'auto' : 'hidden'
8767
- } }, children))))), modalEleRef.current);
8925
+ React.createElement("div", { style: {
8926
+ position: 'relative',
8927
+ left: `${(_d = (_c = (_b = (_a = getPopupById === null || getPopupById === void 0 ? void 0 : getPopupById.item) === null || _a === void 0 ? void 0 : _a.props) === null || _b === void 0 ? void 0 : _b.popupBg) === null || _c === void 0 ? void 0 : _c.horizontalMargin) !== null && _d !== void 0 ? _d : 0}px`,
8928
+ right: `${(_h = (_g = (_f = (_e = getPopupById === null || getPopupById === void 0 ? void 0 : getPopupById.item) === null || _e === void 0 ? void 0 : _e.props) === null || _f === void 0 ? void 0 : _f.popupBg) === null || _g === void 0 ? void 0 : _g.horizontalMargin) !== null && _h !== void 0 ? _h : 0}px`,
8929
+ bottom: `${(_m = (_l = (_k = (_j = getPopupById === null || getPopupById === void 0 ? void 0 : getPopupById.item) === null || _j === void 0 ? void 0 : _j.props) === null || _k === void 0 ? void 0 : _k.popupBg) === null || _l === void 0 ? void 0 : _l.bottomMargin) !== null && _m !== void 0 ? _m : 0}px`,
8930
+ overflow: 'hidden',
8931
+ width: `calc(100% - ${((_r = (_q = (_p = (_o = getPopupById === null || getPopupById === void 0 ? void 0 : getPopupById.item) === null || _o === void 0 ? void 0 : _o.props) === null || _p === void 0 ? void 0 : _p.popupBg) === null || _q === void 0 ? void 0 : _q.horizontalMargin) !== null && _r !== void 0 ? _r : 0) * 2}px)`,
8932
+ height: '100%'
8933
+ } },
8934
+ React.createElement("div", Object.assign({ className: `modal-container ${isOpen ? 'modal-popIn' : 'modal-popOut'}`, style: Object.assign({ padding, animationDuration: ((_s = popup === null || popup === void 0 ? void 0 : popup.duration) !== null && _s !== void 0 ? _s : 0) / 1000 + 's' }, (isScrollFullScreen && {
8935
+ transform: `translateY(${modalTrans}px)`
8936
+ })), onClick: (e) => {
8937
+ e.stopPropagation();
8938
+ e.preventDefault();
8939
+ } }, (isScrollFullScreen && {
8940
+ onTouchMove: handleTouchMove,
8941
+ onTouchStart: handleTouchStart,
8942
+ onTouchEnd: handleTouchEnd
8943
+ })),
8944
+ React.createElement("div", { onClick: onClose, className: 'modal-icon-wrapper' },
8945
+ React.createElement("img", { src: (_t = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.popupCloseIcon) !== null && _t !== void 0 ? _t : closeIcon$1, alt: 'close', className: 'modal-icon' })),
8946
+ React.createElement("div", { ref: ref, style: {
8947
+ height: (isScrollFullScreen ? fullHeight : MODAL_DEF_CON_H) -
8948
+ ((_w = (_v = (_u = getPopupById === null || getPopupById === void 0 ? void 0 : getPopupById.item) === null || _u === void 0 ? void 0 : _u.props) === null || _v === void 0 ? void 0 : _v.popupBg) === null || _w === void 0 ? void 0 : _w.bottomMargin),
8949
+ overflow: (isScrollFullScreen && modalTrans <= 0) || !isScrollFullScreen ? 'auto' : 'hidden'
8950
+ } }, children)))))), modalEleRef.current);
8768
8951
  };
8769
8952
  var Modal$1 = React.memo(Modal);
8770
8953
 
@@ -8850,7 +9033,7 @@ const FormatImage = React.forwardRef((props, ref) => {
8850
9033
  }, [src]);
8851
9034
  React.useEffect(() => {
8852
9035
  const onShow = () => {
8853
- if (src && !visible) {
9036
+ if (src && !visible && imgRef.current) {
8854
9037
  imgRef.current.src = '';
8855
9038
  imgRef.current.src = src;
8856
9039
  }
@@ -8930,14 +9113,15 @@ const CommodityGroup = ({ products, data, defImg, style, onCLick, popupDetailDat
8930
9113
  var CommodityGroup$1 = React.memo(CommodityGroup);
8931
9114
 
8932
9115
  const CommodityDetail$1 = (_a) => {
8933
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
8934
- 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"]);
9116
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5;
9117
+ var { content, style, bgImg, onClick, schema, isDefault, bottom_image, tipText, isPost, viewTime, rec, swiper, commodityStyles, buttonStyle, index, commodityGroup, popupBg, iframeIcon, commodityImgRatio } = _a, props = __rest(_a, ["content", "style", "bgImg", "onClick", "schema", "isDefault", "bottom_image", "tipText", "isPost", "viewTime", "rec", "swiper", "commodityStyles", "buttonStyle", "index", "commodityGroup", "popupBg", "iframeIcon", "commodityImgRatio"]);
8935
9118
  const { sxpParameter, popupDetailData, isPreview, bffFbReport, popupCurTimeRef, checkCommodityIndexRef } = useSxpDataSource();
8936
9119
  const { jumpToWeb, productView } = useEventReport();
8937
9120
  const curTimeRef = React.useRef(null);
8938
9121
  const [showModal, setShowModal] = React.useState(false);
8939
9122
  const [show3DModal, setShow3DModal] = React.useState(false);
8940
9123
  const [checkCommodityIndex, setCheckCommodityIndex] = React.useState((_b = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.multiCheckIndex) !== null && _b !== void 0 ? _b : 0);
9124
+ const ref = React.useRef();
8941
9125
  const data = isPost ? rec : popupDetailData;
8942
9126
  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];
8943
9127
  let cta = isPost
@@ -8977,17 +9161,21 @@ const CommodityDetail$1 = (_a) => {
8977
9161
  };
8978
9162
  }, []);
8979
9163
  const priceText = React.useMemo(() => {
8980
- var _a, _b, _c, _d, _e;
9164
+ var _a, _b, _c, _d, _e, _f, _g;
9165
+ const isToLocStr = ((_a = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice) === undefined || ((_b = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _b === void 0 ? void 0 : _b.enableFormattedPrice);
8981
9166
  if ((product === null || product === void 0 ? void 0 : product.currency) && (product === null || product === void 0 ? void 0 : product.price)) {
8982
- return `${(_c = (_b = (_a = product === null || product === void 0 ? void 0 : product.currency) === null || _a === void 0 ? void 0 : _a.split('-')[1]) === null || _b === void 0 ? void 0 : _b.toUpperCase()) !== null && _c !== void 0 ? _c : ''}${(_e = (_d = product === null || product === void 0 ? void 0 : product.price) === null || _d === void 0 ? void 0 : _d.toLocaleString('zh', {
8983
- minimumFractionDigits: 0
8984
- })) !== null && _e !== void 0 ? _e : ''}`;
9167
+ return `${(_e = (_d = (_c = product === null || product === void 0 ? void 0 : product.currency) === null || _c === void 0 ? void 0 : _c.split('-')[1]) === null || _d === void 0 ? void 0 : _d.toUpperCase()) !== null && _e !== void 0 ? _e : ''}${isToLocStr
9168
+ ? (_g = (_f = product === null || product === void 0 ? void 0 : product.price) === null || _f === void 0 ? void 0 : _f.toLocaleString('zh', {
9169
+ minimumFractionDigits: 0
9170
+ })) !== null && _g !== void 0 ? _g : ''
9171
+ : product === null || product === void 0 ? void 0 : product.price}`;
8985
9172
  }
8986
9173
  else {
8987
9174
  return '$7,000';
8988
9175
  }
8989
- }, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency]);
8990
- const width = isPreview ? 375 : (_t = style === null || style === void 0 ? void 0 : style.width) !== null && _t !== void 0 ? _t : window.innerWidth;
9176
+ }, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency, (_t = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _t === void 0 ? void 0 : _t.enableFormattedPrice]);
9177
+ const width = (isPreview ? 375 : (_u = style === null || style === void 0 ? void 0 : style.width) !== null && _u !== void 0 ? _u : window.innerWidth) - ((_v = popupBg === null || popupBg === void 0 ? void 0 : popupBg.horizontalMargin) !== null && _v !== void 0 ? _v : 0) * 2;
9178
+ const height = commodityImgRatio ? width * (commodityImgRatio.h / commodityImgRatio.w) : width;
8991
9179
  const renderContent = ({ isPost }) => {
8992
9180
  var _a, _b, _c, _d;
8993
9181
  return (React.createElement("div", null,
@@ -9027,6 +9215,10 @@ const CommodityDetail$1 = (_a) => {
9027
9215
  popupCurTimeRef.current = new Date();
9028
9216
  setCheckCommodityIndex(index);
9029
9217
  checkCommodityIndexRef.current = index;
9218
+ if (ref === null || ref === void 0 ? void 0 : ref.current) {
9219
+ ref.current.swiper.slideTo(0);
9220
+ ref.current.swiper.autoplay.start();
9221
+ }
9030
9222
  }, []);
9031
9223
  const renderCommodityGroup = React.useCallback(() => {
9032
9224
  var _a, _b, _c;
@@ -9034,25 +9226,32 @@ const CommodityDetail$1 = (_a) => {
9034
9226
  return;
9035
9227
  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 }));
9036
9228
  }, [checkCommodityIndex]);
9229
+ const getDotsAlign = React.useMemo(() => {
9230
+ const dotsAlignClass = {
9231
+ left: 'commondityDetail-swiper-clickable-left',
9232
+ center: 'commondityDetail-swiper-clickable-center',
9233
+ right: 'commondityDetail-swiper-clickable-right'
9234
+ };
9235
+ return dotsAlignClass === null || dotsAlignClass === void 0 ? void 0 : dotsAlignClass[swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign];
9236
+ }, [swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign]);
9237
+ const iframeUrl = ((_x = (_w = data === null || data === void 0 ? void 0 : data.video) === null || _w === void 0 ? void 0 : _w.bindProduct) === null || _x === void 0 ? void 0 : _x.remark) || ((_0 = (_z = (_y = data === null || data === void 0 ? void 0 : data.video) === null || _y === void 0 ? void 0 : _y.bindProducts) === null || _z === void 0 ? void 0 : _z[0]) === null || _0 === void 0 ? void 0 : _0.remark) || ((_1 = data === null || data === void 0 ? void 0 : data.product) === null || _1 === void 0 ? void 0 : _1.remark);
9037
9238
  return (React.createElement(React.Fragment, null,
9038
9239
  React.createElement("div", Object.assign({ className: css.css(Object.assign({}, style)) }, props),
9039
- 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' } },
9040
- React.createElement(Swiper, { height: width, modules: [Pagination, Autoplay], pagination: {
9240
+ React.createElement("div", { style: { position: 'relative' } },
9241
+ product && ((_2 = product === null || product === void 0 ? void 0 : product.homePage) === null || _2 === void 0 ? void 0 : _2.length) > 0 && (React.createElement(Swiper, { height: height, modules: [Pagination, Autoplay], pagination: {
9041
9242
  clickable: true,
9042
9243
  bulletActiveClass: 'swipe-item-active-bullet',
9043
- clickableClass: (swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign) === 'left'
9044
- ? 'commondityDetail-swiper-clickable-left'
9045
- : 'commondityDetail-swiper-clickable-center'
9244
+ clickableClass: getDotsAlign
9046
9245
  }, loop: true, autoplay: {
9047
9246
  delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
9048
- } },
9049
- React.createElement(React.Fragment, null, (_v = product === null || product === void 0 ? void 0 : product.homePage) === null || _v === void 0 ? void 0 : _v.map((src) => {
9247
+ }, ref: ref },
9248
+ React.createElement(React.Fragment, null, (_3 = product === null || product === void 0 ? void 0 : product.homePage) === null || _3 === void 0 ? void 0 : _3.map((src) => {
9050
9249
  var _a;
9051
9250
  return (React.createElement(SwiperSlide, { key: src },
9052
9251
  React.createElement("div", { style: {
9053
9252
  overflow: 'hidden',
9054
9253
  width,
9055
- height: width
9254
+ height
9056
9255
  } },
9057
9256
  React.createElement(FormatImage$1, { style: {
9058
9257
  height: '100%',
@@ -9061,21 +9260,30 @@ const CommodityDetail$1 = (_a) => {
9061
9260
  display: 'block',
9062
9261
  objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
9063
9262
  }, 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 }))));
9064
- }))))),
9065
- !((_w = product === null || product === void 0 ? void 0 : product.homePage) === null || _w === void 0 ? void 0 : _w.length) && (React.createElement("div", { className: css.css({
9066
- position: 'relative',
9067
- height: 0,
9068
- width: '100%',
9069
- paddingBottom: '100%',
9070
- overflow: 'hidden'
9071
- }) },
9072
- React.createElement("img", { className: css.css({
9073
- position: 'absolute',
9074
- left: 0,
9075
- top: 0,
9076
- objectFit: 'cover',
9077
- width: '100%'
9078
- }), src: (_x = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _x !== void 0 ? _x : bottom_image, alt: 'pdp image' }))),
9263
+ })))),
9264
+ !((_4 = product === null || product === void 0 ? void 0 : product.homePage) === null || _4 === void 0 ? void 0 : _4.length) && (React.createElement("div", { className: css.css({
9265
+ height,
9266
+ width
9267
+ }) },
9268
+ React.createElement("img", { className: css.css({
9269
+ objectFit: 'cover',
9270
+ width: '100%',
9271
+ height: '100%'
9272
+ }), src: (_5 = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _5 !== void 0 ? _5 : bottom_image, alt: 'pdp image' }))),
9273
+ (iframeUrl && iframeIcon) ||
9274
+ (!product && iframeIcon && (React.createElement("div", { style: {
9275
+ padding: '5px 10px',
9276
+ display: 'flex',
9277
+ alignItems: 'center',
9278
+ position: 'absolute',
9279
+ right: '10px',
9280
+ bottom: '10px',
9281
+ zIndex: 1,
9282
+ background: '#fff',
9283
+ borderRadius: '3px'
9284
+ }, onClick: () => setShow3DModal(true) },
9285
+ React.createElement("img", { src: iframeIcon, alt: '3d', width: '20px', height: '20px', style: { marginRight: '5px' } }),
9286
+ React.createElement("span", { style: { fontSize: '12px' } }, "Try in 3D"))))),
9079
9287
  renderCommodityGroup(),
9080
9288
  React.createElement("div", { className: 'pb-commondity-content' }, renderContent({ isPost }))),
9081
9289
  renderBtn(),
@@ -9083,10 +9291,11 @@ const CommodityDetail$1 = (_a) => {
9083
9291
  React.createElement("div", { style: { paddingBottom: '80px' } }, renderContent({ isPost: false })),
9084
9292
  renderBtn()),
9085
9293
  React.createElement(Modal$1, { visible: show3DModal, padding: 0, isFullScreen: true, onClose: () => setShow3DModal(false) },
9086
- React.createElement("iframe", { src: 'https://rimowa.threedium.co.uk/product-experience/latest/?sku=92573974&lang=en', style: {
9294
+ React.createElement("iframe", { src: iframeUrl, style: {
9087
9295
  width: '100%',
9088
- height: 'calc(100% - 40px)',
9089
- marginTop: '40px'
9296
+ height: 'calc(100% - 50px)',
9297
+ marginTop: '40px',
9298
+ border: 'none'
9090
9299
  } }))));
9091
9300
  };
9092
9301
  var CommodityDetailComponent = React.memo(CommodityDetail$1);
@@ -9107,7 +9316,7 @@ var CommodityDetailComponent = React.memo(CommodityDetail$1);
9107
9316
  * @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLink\interactionRender.tsx
9108
9317
  *
9109
9318
  */
9110
- var interactionRender$c = [
9319
+ var interactionRender$d = [
9111
9320
  {
9112
9321
  title: '滑动事件',
9113
9322
  child: [
@@ -9124,7 +9333,7 @@ var interactionRender$c = [
9124
9333
  * @Author: binruan@chatlabs.com
9125
9334
  * @Date: 2023-07-28 18:29:57
9126
9335
  * @LastEditors: binruan@chatlabs.com
9127
- * @LastEditTime: 2024-07-31 13:58:45
9336
+ * @LastEditTime: 2024-08-08 18:30:20
9128
9337
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetail\material.tsx
9129
9338
  *
9130
9339
  */
@@ -9134,8 +9343,8 @@ const CommodityDetail = createMaterial(CommodityDetailComponent, {
9134
9343
  category: 'popup',
9135
9344
  type: 'CommodityDetail',
9136
9345
  related: {
9137
- settingRender: settingRender$8,
9138
- interactionRender: interactionRender$c
9346
+ settingRender: settingRender$9,
9347
+ interactionRender: interactionRender$d
9139
9348
  },
9140
9349
  defaulSetting: {
9141
9350
  props: {
@@ -9177,6 +9386,10 @@ const CommodityDetail = createMaterial(CommodityDetailComponent, {
9177
9386
  fontWeight: 'bold',
9178
9387
  textAlign: 'center',
9179
9388
  color: 'rgba(255, 255, 255, 0.9)'
9389
+ },
9390
+ commodityImgRatio: {
9391
+ w: 1,
9392
+ h: 1
9180
9393
  }
9181
9394
  },
9182
9395
  style: {}
@@ -9186,7 +9399,7 @@ const CommodityDetail = createMaterial(CommodityDetailComponent, {
9186
9399
  sort: 1
9187
9400
  });
9188
9401
 
9189
- var interactionRender$b = [
9402
+ var interactionRender$c = [
9190
9403
  {
9191
9404
  title: '点击事件',
9192
9405
  child: [
@@ -9202,13 +9415,28 @@ var interactionRender$b = [
9202
9415
  * @Author: binruan@chatlabs.com
9203
9416
  * @Date: 2023-10-27 14:06:35
9204
9417
  * @LastEditors: binruan@chatlabs.com
9205
- * @LastEditTime: 2024-08-06 14:23:11
9418
+ * @LastEditTime: 2024-08-20 14:01:21
9206
9419
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\Prompt\settingRender.tsx
9207
9420
  *
9208
9421
  */
9209
- var settingRender$7 = [
9422
+ var settingRender$8 = [
9423
+ {
9424
+ title: '弹窗背景',
9425
+ child: [
9426
+ {
9427
+ type: 'Number',
9428
+ label: '左右边距',
9429
+ name: ['props', 'popupBg', 'horizontalMargin']
9430
+ },
9431
+ {
9432
+ type: 'Number',
9433
+ label: '下边距',
9434
+ name: ['props', 'popupBg', 'bottomMargin']
9435
+ }
9436
+ ]
9437
+ },
9210
9438
  {
9211
- title: '',
9439
+ title: '内容',
9212
9440
  child: [
9213
9441
  {
9214
9442
  type: 'Media',
@@ -9386,9 +9614,9 @@ const Prompt = createMaterial(PromptComponent, {
9386
9614
  category: 'popup',
9387
9615
  type: 'Prompt',
9388
9616
  related: {
9389
- settingRender: settingRender$7,
9617
+ settingRender: settingRender$8,
9390
9618
  bindableProps: [],
9391
- interactionRender: interactionRender$b
9619
+ interactionRender: interactionRender$c
9392
9620
  },
9393
9621
  defaulSetting: {
9394
9622
  props: {
@@ -9407,14 +9635,45 @@ const Prompt = createMaterial(PromptComponent, {
9407
9635
  * @Author: binruan@chatlabs.com
9408
9636
  * @Date: 2024-03-26 16:50:25
9409
9637
  * @LastEditors: binruan@chatlabs.com
9410
- * @LastEditTime: 2024-08-06 14:06:03
9638
+ * @LastEditTime: 2024-08-20 15:50:06
9411
9639
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetailDiroNew\settingRender.tsx
9412
9640
  *
9413
9641
  */
9414
- var settingRender$6 = [
9642
+ var settingRender$7 = [
9643
+ {
9644
+ title: '弹窗背景',
9645
+ child: [
9646
+ {
9647
+ type: 'Number',
9648
+ label: '左右边距',
9649
+ name: ['props', 'popupBg', 'horizontalMargin']
9650
+ },
9651
+ {
9652
+ type: 'Number',
9653
+ label: '下边距',
9654
+ name: ['props', 'popupBg', 'bottomMargin']
9655
+ }
9656
+ ]
9657
+ },
9415
9658
  {
9416
9659
  title: '商品图片',
9417
9660
  child: [
9661
+ {
9662
+ type: 'Group',
9663
+ label: '宽高比',
9664
+ child: [
9665
+ {
9666
+ type: 'Number',
9667
+ name: ['props', 'commodityImgRatio', 'w'],
9668
+ addonAfter: 'w'
9669
+ },
9670
+ {
9671
+ type: 'Number',
9672
+ name: ['props', 'commodityImgRatio', 'h'],
9673
+ addonAfter: 'h'
9674
+ }
9675
+ ]
9676
+ },
9418
9677
  {
9419
9678
  type: 'Radius',
9420
9679
  label: '轮播指示器',
@@ -9426,6 +9685,10 @@ var settingRender$6 = [
9426
9685
  {
9427
9686
  label: '居中',
9428
9687
  value: 'center'
9688
+ },
9689
+ {
9690
+ label: '居右',
9691
+ value: 'right'
9429
9692
  }
9430
9693
  ],
9431
9694
  name: ['props', 'swiper', 'dotsAlign']
@@ -9573,6 +9836,12 @@ var settingRender$6 = [
9573
9836
  {
9574
9837
  label: '间距',
9575
9838
  type: 'TextSpace'
9839
+ },
9840
+ {
9841
+ label: '价格千分符展示',
9842
+ type: 'Switch',
9843
+ name: ['enableFormattedPrice'],
9844
+ initialValue: true
9576
9845
  }
9577
9846
  ]
9578
9847
  }
@@ -9665,12 +9934,23 @@ var settingRender$6 = [
9665
9934
  name: ['props', 'buttonStyle']
9666
9935
  }
9667
9936
  ]
9937
+ },
9938
+ {
9939
+ title: 'Iframe商品弹窗',
9940
+ child: [
9941
+ {
9942
+ label: '弹窗按钮',
9943
+ type: 'Upload',
9944
+ name: ['props', 'iframeIcon'],
9945
+ text: '建议尺寸:106 * 41'
9946
+ }
9947
+ ]
9668
9948
  }
9669
9949
  ];
9670
9950
 
9671
9951
  const CommodityDetailDiroNew$1 = (_a) => {
9672
- 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;
9673
- 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"]);
9952
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9;
9953
+ var { style, isDefault, rec, viewTime, isPost, bottom_image, tipText, swiper, commodityStyles, buttonStyle, index, commodityGroup, popupBg, iframeIcon, commodityImgRatio } = _a, props = __rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "tipText", "swiper", "commodityStyles", "buttonStyle", "index", "commodityGroup", "popupBg", "iframeIcon", "commodityImgRatio"]);
9674
9954
  React.useState(true);
9675
9955
  const { sxpParameter, popupCurTimeRef, popupDetailData, isPreview, bffFbReport, checkCommodityIndexRef } = useSxpDataSource();
9676
9956
  const { jumpToWeb, productView } = useEventReport();
@@ -9679,7 +9959,9 @@ const CommodityDetailDiroNew$1 = (_a) => {
9679
9959
  React.useState(true);
9680
9960
  const [showModal, setShowModal] = React.useState(false);
9681
9961
  const curTimeRef = React.useRef(null);
9962
+ const [show3DModal, setShow3DModal] = React.useState(false);
9682
9963
  const [checkCommodityIndex, setCheckCommodityIndex] = React.useState((_b = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.multiCheckIndex) !== null && _b !== void 0 ? _b : 0);
9964
+ const ref = React.useRef();
9683
9965
  const data = isPost ? rec : popupDetailData;
9684
9966
  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];
9685
9967
  let cta = isPost
@@ -9719,17 +10001,21 @@ const CommodityDetailDiroNew$1 = (_a) => {
9719
10001
  };
9720
10002
  }, []);
9721
10003
  const priceText = React.useMemo(() => {
9722
- var _a, _b, _c, _d, _e;
10004
+ var _a, _b, _c, _d, _e, _f, _g;
10005
+ const isToLocStr = ((_a = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice) === undefined || ((_b = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _b === void 0 ? void 0 : _b.enableFormattedPrice);
9723
10006
  if ((product === null || product === void 0 ? void 0 : product.currency) && (product === null || product === void 0 ? void 0 : product.price)) {
9724
- return `${(_c = (_b = (_a = product === null || product === void 0 ? void 0 : product.currency) === null || _a === void 0 ? void 0 : _a.split('-')[1]) === null || _b === void 0 ? void 0 : _b.toUpperCase()) !== null && _c !== void 0 ? _c : ''}${(_e = (_d = product === null || product === void 0 ? void 0 : product.price) === null || _d === void 0 ? void 0 : _d.toLocaleString('zh', {
9725
- minimumFractionDigits: 0
9726
- })) !== null && _e !== void 0 ? _e : ''}`;
10007
+ return `${(_e = (_d = (_c = product === null || product === void 0 ? void 0 : product.currency) === null || _c === void 0 ? void 0 : _c.split('-')[1]) === null || _d === void 0 ? void 0 : _d.toUpperCase()) !== null && _e !== void 0 ? _e : ''}${isToLocStr
10008
+ ? (_g = (_f = product === null || product === void 0 ? void 0 : product.price) === null || _f === void 0 ? void 0 : _f.toLocaleString('zh', {
10009
+ minimumFractionDigits: 0
10010
+ })) !== null && _g !== void 0 ? _g : ''
10011
+ : product === null || product === void 0 ? void 0 : product.price}`;
9727
10012
  }
9728
10013
  else {
9729
10014
  return '£102,300.00';
9730
10015
  }
9731
- }, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency]);
9732
- const width = isPreview ? 375 : (_t = style === null || style === void 0 ? void 0 : style.width) !== null && _t !== void 0 ? _t : window.innerWidth;
10016
+ }, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency, (_t = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _t === void 0 ? void 0 : _t.enableFormattedPrice]);
10017
+ const width = (isPreview ? 375 : (_u = style === null || style === void 0 ? void 0 : style.width) !== null && _u !== void 0 ? _u : window.innerWidth) - ((_v = popupBg === null || popupBg === void 0 ? void 0 : popupBg.horizontalMargin) !== null && _v !== void 0 ? _v : 0) * 2;
10018
+ const height = commodityImgRatio ? width * (commodityImgRatio.h / commodityImgRatio.w) : width;
9733
10019
  // useEffect(() => {
9734
10020
  // console.log(scrollRef?.current?.scrollHeight, window.innerHeight);
9735
10021
  // if (scrollRef?.current && scrollRef?.current?.scrollHeight > window.innerHeight) {
@@ -9796,6 +10082,10 @@ Made in Italy` })));
9796
10082
  popupCurTimeRef.current = new Date();
9797
10083
  setCheckCommodityIndex(index);
9798
10084
  checkCommodityIndexRef.current = index;
10085
+ if (ref === null || ref === void 0 ? void 0 : ref.current) {
10086
+ ref.current.swiper.slideTo(0);
10087
+ ref.current.swiper.autoplay.start();
10088
+ }
9799
10089
  }, []);
9800
10090
  const renderCommodityGroup = React.useCallback(() => {
9801
10091
  var _a, _b, _c;
@@ -9803,52 +10093,69 @@ Made in Italy` })));
9803
10093
  return;
9804
10094
  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 }));
9805
10095
  }, [checkCommodityIndex]);
10096
+ const getDotsAlign = React.useMemo(() => {
10097
+ const dotsAlignClass = {
10098
+ left: 'commondityDetail-swiper-clickable-left',
10099
+ center: 'commondityDetail-swiper-clickable-center',
10100
+ right: 'commondityDetail-swiper-clickable-right'
10101
+ };
10102
+ return dotsAlignClass === null || dotsAlignClass === void 0 ? void 0 : dotsAlignClass[swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign];
10103
+ }, [swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign]);
10104
+ const iframeUrl = ((_x = (_w = data === null || data === void 0 ? void 0 : data.video) === null || _w === void 0 ? void 0 : _w.bindProduct) === null || _x === void 0 ? void 0 : _x.remark) || ((_0 = (_z = (_y = data === null || data === void 0 ? void 0 : data.video) === null || _y === void 0 ? void 0 : _y.bindProducts) === null || _z === void 0 ? void 0 : _z[0]) === null || _0 === void 0 ? void 0 : _0.remark) || ((_1 = data === null || data === void 0 ? void 0 : data.product) === null || _1 === void 0 ? void 0 : _1.remark);
9806
10105
  return (React.createElement("div", { className: 'pb-commondityDiroNew' },
9807
10106
  React.createElement("div", Object.assign({ className: css.css(Object.assign(Object.assign({}, style), { transform: 'translate3d(0px, 0px, 0px)' })) }, props),
9808
- 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: {
9809
- clickable: true,
9810
- bulletActiveClass: 'commondityDiroNew-swipe-item-active-bullet',
9811
- clickableClass: (swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign) === 'left'
9812
- ? 'commondityDiroNew-swiper-clickable-left'
9813
- : 'commondityDiroNew-swiper-clickable-center'
9814
- }, loop: true, autoplay: {
9815
- delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
9816
- } }, (_v = product === null || product === void 0 ? void 0 : product.homePage) === null || _v === void 0 ? void 0 : _v.map((src) => {
9817
- var _a;
9818
- return (React.createElement(SwiperSlide, { key: src },
9819
- React.createElement("div", { style: {
9820
- overflow: 'hidden',
9821
- width,
9822
- height: width
9823
- } },
9824
- React.createElement(FormatImage$1, { style: {
9825
- height: '100%',
9826
- width: '100%',
9827
- objectFit: 'cover',
9828
- display: 'block',
9829
- objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
9830
- }, 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 }))));
9831
- }))),
9832
- !((_w = product === null || product === void 0 ? void 0 : product.homePage) === null || _w === void 0 ? void 0 : _w.length) && (React.createElement("div", { className: css.css({
9833
- position: 'relative',
9834
- height: 0,
9835
- width: '100%',
9836
- paddingBottom: '100%',
9837
- overflow: 'hidden'
9838
- }) },
9839
- React.createElement("img", { className: css.css({
9840
- position: 'absolute',
9841
- left: 0,
9842
- top: 0,
9843
- objectFit: 'cover',
9844
- width: '100%'
9845
- }), src: (_x = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _x !== void 0 ? _x : bottom_image, alt: 'pdp image' }))),
10107
+ React.createElement("div", { style: { position: 'relative' } },
10108
+ product && ((_2 = product === null || product === void 0 ? void 0 : product.homePage) === null || _2 === void 0 ? void 0 : _2.length) > 0 && (React.createElement(Swiper, { height: height, modules: [Pagination, Autoplay], pagination: {
10109
+ clickable: true,
10110
+ bulletActiveClass: 'commondityDiroNew-swipe-item-active-bullet',
10111
+ clickableClass: getDotsAlign
10112
+ }, loop: true, autoplay: {
10113
+ delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
10114
+ }, ref: ref }, (_3 = product === null || product === void 0 ? void 0 : product.homePage) === null || _3 === void 0 ? void 0 : _3.map((src) => {
10115
+ var _a;
10116
+ return (React.createElement(SwiperSlide, { key: src },
10117
+ React.createElement("div", { style: {
10118
+ overflow: 'hidden',
10119
+ width,
10120
+ height
10121
+ } },
10122
+ React.createElement(FormatImage$1, { style: {
10123
+ height: '100%',
10124
+ width: '100%',
10125
+ objectFit: 'cover',
10126
+ display: 'block',
10127
+ objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
10128
+ }, 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 }))));
10129
+ }))),
10130
+ !((_4 = product === null || product === void 0 ? void 0 : product.homePage) === null || _4 === void 0 ? void 0 : _4.length) && (React.createElement("div", { className: css.css({
10131
+ height,
10132
+ width
10133
+ }) },
10134
+ React.createElement("img", { className: css.css({
10135
+ objectFit: 'cover',
10136
+ width: '100%',
10137
+ height: '100%'
10138
+ }), src: (_5 = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _5 !== void 0 ? _5 : bottom_image, alt: 'pdp image' }))),
10139
+ (iframeUrl && iframeIcon) ||
10140
+ (!product && iframeIcon && (React.createElement("div", { style: {
10141
+ padding: '5px 10px',
10142
+ display: 'flex',
10143
+ alignItems: 'center',
10144
+ position: 'absolute',
10145
+ right: '10px',
10146
+ bottom: '10px',
10147
+ zIndex: 1,
10148
+ background: '#fff',
10149
+ borderRadius: '3px'
10150
+ }, onClick: () => setShow3DModal(true) },
10151
+ React.createElement("img", { src: iframeIcon, alt: '3d', width: '20px', height: '20px', style: { marginRight: '5px' } }),
10152
+ React.createElement("span", { style: { fontSize: '12px' } }, "Try in 3D"))))),
9846
10153
  renderCommodityGroup(),
9847
10154
  React.createElement("div", { className: 'pb-commondityDiroNew-content' },
9848
10155
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top' },
9849
10156
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top-left' },
9850
10157
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top-left-title', style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title), dangerouslySetInnerHTML: {
9851
- __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)
10158
+ __html: setFontForText((_6 = product === null || product === void 0 ? void 0 : product.title) !== null && _6 !== void 0 ? _6 : 'Large Dior Toujours BagLarge', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title)
9852
10159
  } }),
9853
10160
  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: {
9854
10161
  __html: setFontForText((product === null || product === void 0 ? void 0 : product.collection) || 'Black Macrocannage CalfskinLarge', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection)
@@ -9858,14 +10165,21 @@ Made in Italy` })));
9858
10165
  __html: setFontForText(priceText, commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price)
9859
10166
  } }),
9860
10167
  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: {
9861
- __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)
10168
+ __html: setFontForText((_7 = product === null || product === void 0 ? void 0 : product.taxInfo) !== null && _7 !== void 0 ? _7 : '税费', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.taxInfo)
9862
10169
  } }))),
9863
- (!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 },
10170
+ (!product || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("button", { "aria-label": (_8 = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _8 !== void 0 ? _8 : 'Shop now', onClick: handleLink, className: 'pb-commondityDiroNew-btn', style: buttonStyle },
9864
10171
  React.createElement("span", { dangerouslySetInnerHTML: {
9865
- __html: setFontForText((_1 = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _1 !== void 0 ? _1 : 'Shop now', buttonStyle)
10172
+ __html: setFontForText((_9 = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _9 !== void 0 ? _9 : 'Shop now', buttonStyle)
9866
10173
  } }))),
9867
10174
  productInfoText({ isPost }))),
9868
- React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) }, productInfoText({ isPost: false }))));
10175
+ React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) }, productInfoText({ isPost: false })),
10176
+ React.createElement(Modal$1, { visible: show3DModal, padding: 0, isFullScreen: true, onClose: () => setShow3DModal(false) },
10177
+ React.createElement("iframe", { src: iframeUrl, style: {
10178
+ width: '100%',
10179
+ height: 'calc(100% - 50px)',
10180
+ marginTop: '40px',
10181
+ border: 'none'
10182
+ } }))));
9869
10183
  };
9870
10184
  var CommodityDetailDiroNewComponent = React.memo(CommodityDetailDiroNew$1);
9871
10185
 
@@ -9885,7 +10199,7 @@ var CommodityDetailDiroNewComponent = React.memo(CommodityDetailDiroNew$1);
9885
10199
  * @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLink\interactionRender.tsx
9886
10200
  *
9887
10201
  */
9888
- var interactionRender$a = [
10202
+ var interactionRender$b = [
9889
10203
  {
9890
10204
  title: '滑动事件',
9891
10205
  child: [
@@ -9912,8 +10226,8 @@ const CommodityDetailDiroNew = createMaterial(CommodityDetailDiroNewComponent, {
9912
10226
  category: 'popup',
9913
10227
  type: 'CommodityDetailDiroNew',
9914
10228
  related: {
9915
- settingRender: settingRender$6,
9916
- interactionRender: interactionRender$a
10229
+ settingRender: settingRender$7,
10230
+ interactionRender: interactionRender$b
9917
10231
  },
9918
10232
  defaulSetting: {
9919
10233
  props: {
@@ -9956,6 +10270,10 @@ const CommodityDetailDiroNew = createMaterial(CommodityDetailDiroNewComponent, {
9956
10270
  borderRadius: 25,
9957
10271
  marginTop: 16,
9958
10272
  marginBottom: 16
10273
+ },
10274
+ commodityImgRatio: {
10275
+ w: 1,
10276
+ h: 1
9959
10277
  }
9960
10278
  },
9961
10279
  style: {}
@@ -9973,7 +10291,22 @@ const CommodityDetailDiroNew = createMaterial(CommodityDetailDiroNewComponent, {
9973
10291
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityList\settingRender.tsx
9974
10292
  *
9975
10293
  */
9976
- var settingRender$5 = [
10294
+ var settingRender$6 = [
10295
+ {
10296
+ title: '弹窗背景',
10297
+ child: [
10298
+ {
10299
+ type: 'Number',
10300
+ label: '左右边距',
10301
+ name: ['props', 'popupBg', 'horizontalMargin']
10302
+ },
10303
+ {
10304
+ type: 'Number',
10305
+ label: '下边距',
10306
+ name: ['props', 'popupBg', 'bottomMargin']
10307
+ }
10308
+ ]
10309
+ },
9977
10310
  {
9978
10311
  title: '商品图片',
9979
10312
  child: [
@@ -10335,7 +10668,7 @@ var CommodityListComponent = React.memo(CommodityList$1);
10335
10668
  * @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLink\interactionRender.tsx
10336
10669
  *
10337
10670
  */
10338
- var interactionRender$9 = [
10671
+ var interactionRender$a = [
10339
10672
  {
10340
10673
  title: '点击事件',
10341
10674
  child: [
@@ -10361,8 +10694,8 @@ const CommodityList = createMaterial(CommodityListComponent, {
10361
10694
  category: 'popup',
10362
10695
  type: 'CommodityList',
10363
10696
  related: {
10364
- settingRender: settingRender$5,
10365
- interactionRender: interactionRender$9
10697
+ settingRender: settingRender$6,
10698
+ interactionRender: interactionRender$a
10366
10699
  },
10367
10700
  defaulSetting: {
10368
10701
  props: {
@@ -10403,6 +10736,59 @@ const CommodityList = createMaterial(CommodityListComponent, {
10403
10736
  sort: 1
10404
10737
  });
10405
10738
 
10739
+ /*
10740
+ * @Author: binruan@chatlabs.com
10741
+ * @Date: 2023-10-27 14:06:35
10742
+ * @LastEditors: binruan@chatlabs.com
10743
+ * @LastEditTime: 2024-08-08 17:32:11
10744
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\Iframe\settingRender.tsx
10745
+ *
10746
+ */
10747
+ var settingRender$5 = [
10748
+ {
10749
+ title: '背景样式',
10750
+ child: [
10751
+ {
10752
+ type: 'Color',
10753
+ label: '背景色',
10754
+ name: ['style', 'backgroundColor']
10755
+ }
10756
+ ]
10757
+ }
10758
+ ];
10759
+
10760
+ const Iframe$1 = (_a) => {
10761
+ var _b, _c;
10762
+ var { content, btnText, style, icon, isPopup, isExternalLink, onClose, onClick, submitButtonStyle, contentStyle } = _a, props = __rest(_a, ["content", "btnText", "style", "icon", "isPopup", "isExternalLink", "onClose", "onClick", "submitButtonStyle", "contentStyle"]);
10763
+ const { popupDetailData } = useSxpDataSource();
10764
+ const iframeUrl = (_c = (_b = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.video) === null || _b === void 0 ? void 0 : _b.bindCta) === null || _c === void 0 ? void 0 : _c.remark;
10765
+ return (React.createElement("div", Object.assign({ className: `${css.css(Object.assign({}, style))}` }, props), iframeUrl && (React.createElement("iframe", { src: iframeUrl, style: {
10766
+ width: '100%',
10767
+ height: 'calc(100% - 50px)',
10768
+ marginTop: '40px',
10769
+ border: 'none'
10770
+ } }))));
10771
+ };
10772
+ var IframeComponent = React.memo(Iframe$1);
10773
+
10774
+ const Iframe = createMaterial(IframeComponent, {
10775
+ displayName: 'Iframe弹窗',
10776
+ icon: '',
10777
+ category: 'popup',
10778
+ type: 'Iframe',
10779
+ related: {
10780
+ settingRender: settingRender$5,
10781
+ bindableProps: []
10782
+ },
10783
+ defaulSetting: {
10784
+ props: {},
10785
+ style: {}
10786
+ },
10787
+ w: 100,
10788
+ h: 40,
10789
+ sort: 3
10790
+ });
10791
+
10406
10792
  /*
10407
10793
  * @Author: binruan@chatlabs.com
10408
10794
  * @Date: 2024-03-26 16:50:25
@@ -10662,7 +11048,7 @@ var settingRender$4 = [
10662
11048
  }
10663
11049
  ];
10664
11050
 
10665
- var interactionRender$8 = [
11051
+ var interactionRender$9 = [
10666
11052
  {
10667
11053
  title: '点击事件',
10668
11054
  child: [
@@ -10675,7 +11061,7 @@ var interactionRender$8 = [
10675
11061
  ];
10676
11062
 
10677
11063
  const EventProvider = (_a) => {
10678
- var { rec, children, className, onClick, style, isExternalLink = false, index } = _a; __rest(_a, ["rec", "children", "className", "onClick", "style", "isExternalLink", "index"]);
11064
+ var { rec, children, className, onClick, style, isExternalLink = false, index, jumpLink } = _a; __rest(_a, ["rec", "children", "className", "onClick", "style", "isExternalLink", "index", "jumpLink"]);
10679
11065
  const ref = React.useRef(null);
10680
11066
  const { popup } = useEditor();
10681
11067
  const { setPopupDetailData, ctaEvent } = useSxpDataSource();
@@ -10689,11 +11075,11 @@ const EventProvider = (_a) => {
10689
11075
  }, rec, item, index);
10690
11076
  setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, rec), { index }));
10691
11077
  if (isExternalLink) {
10692
- 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) {
11078
+ if (jumpLink || ((_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)) {
10693
11079
  const cta = (_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.bindCta;
10694
11080
  const product = (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.bindProduct;
10695
11081
  jumpToWeb(rec, product, cta, index);
10696
- 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);
11082
+ window.location.href = window.getJointUtmLink(jumpLink || ((_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) || '');
10697
11083
  }
10698
11084
  }
10699
11085
  else {
@@ -10745,7 +11131,7 @@ const Commodity = createMaterial(CommodityComponent, {
10745
11131
  category: 'template',
10746
11132
  type: 'Commodity',
10747
11133
  related: {
10748
- interactionRender: interactionRender$8,
11134
+ interactionRender: interactionRender$9,
10749
11135
  bindableProps: [],
10750
11136
  settingRender: settingRender$4
10751
11137
  },
@@ -10787,7 +11173,7 @@ const Commodity = createMaterial(CommodityComponent, {
10787
11173
  sort: 1
10788
11174
  });
10789
11175
 
10790
- var interactionRender$7 = [
11176
+ var interactionRender$8 = [
10791
11177
  {
10792
11178
  title: '点击事件',
10793
11179
  child: [
@@ -10827,7 +11213,7 @@ const Appoint = createMaterial(AppointComponent, {
10827
11213
  category: 'template',
10828
11214
  type: 'Appoint',
10829
11215
  related: {
10830
- interactionRender: interactionRender$7,
11216
+ interactionRender: interactionRender$8,
10831
11217
  settingRender: settingRender$4 === null || settingRender$4 === void 0 ? void 0 : settingRender$4.filter((i) => i.type !== 'commodityTitle'),
10832
11218
  bindableProps: []
10833
11219
  },
@@ -10982,21 +11368,15 @@ var linkSettingRender = [
10982
11368
  var styles$7 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__nkBlU","one-line-ellipsis":"index-module_one-line-ellipsis__buFw1"};
10983
11369
 
10984
11370
  const Link$1 = (_a) => {
10985
- var _b, _c, _d, _e, _f, _g, _h, _j;
11371
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k;
10986
11372
  var { content, style, bgImg, recData, bottom_image, ctaTempStyles, index, customTitle } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "index", "customTitle"]);
10987
11373
  const { sxpParameter, bffEventReport } = useSxpDataSource();
10988
- const { jumpToWeb } = useEventReport();
11374
+ useEventReport();
10989
11375
  const cta = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindCta;
10990
- const product = (_c = recData === null || recData === void 0 ? void 0 : recData.video) === null || _c === void 0 ? void 0 : _c.bindProduct;
10991
- const handleTo = () => {
10992
- if (cta === null || cta === void 0 ? void 0 : cta.link) {
10993
- jumpToWeb(recData, product, cta, index);
10994
- window.location.href = window.getJointUtmLink(cta.link);
10995
- }
10996
- };
11376
+ (_c = recData === null || recData === void 0 ? void 0 : recData.video) === null || _c === void 0 ? void 0 : _c.bindProduct;
10997
11377
  const src = (_e = (_d = cta === null || cta === void 0 ? void 0 : cta.icon) !== null && _d !== void 0 ? _d : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _e !== void 0 ? _e : bottom_image;
10998
- return (React.createElement(EventProvider$1, Object.assign({ index: index, rec: recData, className: css.css(Object.assign({ alignItems: 'center' }, style)), style: { display: 'flex' } }, props, { onClick: handleTo }),
10999
- React.createElement(Img$1, { src: src, rec: recData, item: (_g = (_f = recData === null || recData === void 0 ? void 0 : recData.video) === null || _f === void 0 ? void 0 : _f.bindProduct) !== null && _g !== void 0 ? _g : recData === null || recData === void 0 ? void 0 : recData.video, index: index, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img }),
11378
+ return (React.createElement(EventProvider$1, Object.assign({ index: index, rec: recData, className: css.css(Object.assign({ alignItems: 'center' }, style)), style: { display: 'flex' } }, props, { jumpLink: (_f = cta === null || cta === void 0 ? void 0 : cta.link) !== null && _f !== void 0 ? _f : '' }),
11379
+ React.createElement(Img$1, { src: src, rec: recData, item: (_h = (_g = recData === null || recData === void 0 ? void 0 : recData.video) === null || _g === void 0 ? void 0 : _g.bindProduct) !== null && _h !== void 0 ? _h : recData === null || recData === void 0 ? void 0 : recData.video, index: index, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img }),
11000
11380
  React.createElement("div", { className: css.css({
11001
11381
  display: 'flex',
11002
11382
  alignItems: 'center',
@@ -11005,14 +11385,34 @@ const Link$1 = (_a) => {
11005
11385
  }) },
11006
11386
  React.createElement("div", null,
11007
11387
  React.createElement("div", { className: styles$7['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle, dangerouslySetInnerHTML: {
11008
- __html: setFontForText((_h = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _h !== void 0 ? _h : 'Product Name', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
11388
+ __html: setFontForText((_j = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _j !== void 0 ? _j : 'Product Name', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
11009
11389
  } }),
11010
- (customTitle === null || customTitle === void 0 ? void 0 : customTitle.display) && (React.createElement("div", { style: Object.assign(Object.assign({}, customTitle === null || customTitle === void 0 ? void 0 : customTitle.style), { lineHeight: ((_j = customTitle === null || customTitle === void 0 ? void 0 : customTitle.style) === null || _j === void 0 ? void 0 : _j.height) + 'px' }), className: styles$7['one-line-ellipsis'], dangerouslySetInnerHTML: {
11390
+ (customTitle === null || customTitle === void 0 ? void 0 : customTitle.display) && (React.createElement("div", { style: Object.assign(Object.assign({}, customTitle === null || customTitle === void 0 ? void 0 : customTitle.style), { lineHeight: ((_k = customTitle === null || customTitle === void 0 ? void 0 : customTitle.style) === null || _k === void 0 ? void 0 : _k.height) + 'px' }), className: styles$7['one-line-ellipsis'], dangerouslySetInnerHTML: {
11011
11391
  __html: setFontForText(customTitle === null || customTitle === void 0 ? void 0 : customTitle.text, customTitle === null || customTitle === void 0 ? void 0 : customTitle.style)
11012
11392
  } }))))));
11013
11393
  };
11014
11394
  var LinkComponent = React.memo(Link$1);
11015
11395
 
11396
+ /*
11397
+ * @Author: binruan@chatlabs.com
11398
+ * @Date: 2024-08-09 16:59:38
11399
+ * @LastEditors: binruan@chatlabs.com
11400
+ * @LastEditTime: 2024-08-09 16:59:44
11401
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\template\Link\interactionRender.tsx
11402
+ *
11403
+ */
11404
+ var interactionRender$7 = [
11405
+ {
11406
+ title: '点击事件',
11407
+ child: [
11408
+ {
11409
+ type: 'link',
11410
+ name: 'onClick'
11411
+ }
11412
+ ]
11413
+ }
11414
+ ];
11415
+
11016
11416
  var _a;
11017
11417
  const Link = createMaterial(LinkComponent, {
11018
11418
  displayName: '跳转指引',
@@ -11021,7 +11421,8 @@ const Link = createMaterial(LinkComponent, {
11021
11421
  type: 'Link',
11022
11422
  related: {
11023
11423
  settingRender: (_a = settingRender$4 === null || settingRender$4 === void 0 ? void 0 : settingRender$4.filter((i) => i.type !== 'commodityTitle')) === null || _a === void 0 ? void 0 : _a.concat(linkSettingRender),
11024
- bindableProps: []
11424
+ bindableProps: [],
11425
+ interactionRender: interactionRender$7
11025
11426
  },
11026
11427
  defaulSetting: {
11027
11428
  props: {
@@ -13249,7 +13650,8 @@ const WaterfallFlowItem$1 = (props) => {
13249
13650
  function WaterfallList$1(_a) {
13250
13651
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
13251
13652
  var { reportTagsView, showBanner } = _a, props = __rest(_a, ["reportTagsView", "showBanner"]);
13252
- const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag } = useSxpDataSource();
13653
+ const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag, cacheActiveIndex } = useSxpDataSource();
13654
+ const { jumpToWeb } = useEventReport();
13253
13655
  /** 滚动的父元素 */
13254
13656
  const scrollParent = React.useRef(null);
13255
13657
  /** 向上滚动的距离 */
@@ -13365,16 +13767,10 @@ function WaterfallList$1(_a) {
13365
13767
  }, [unitWidth, rowsNum, list]); /* 增加getStyleList依赖项会导致在admin预览编辑时无限刷新 */
13366
13768
  /** 初始化请求数据 */
13367
13769
  React.useEffect(() => {
13368
- var _a, _b;
13770
+ var _a, _b, _c, _d, _e, _f;
13369
13771
  setIsLoadingData(true);
13370
13772
  waterFallData &&
13371
- (getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({
13372
- hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag,
13373
- 'itemFilter.itemId': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId,
13374
- 'itemFilter.itemType': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemType,
13375
- defaultSize: hashTagSize,
13376
- maxSize: hashTagSize
13377
- }).then((res) => {
13773
+ (getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos(Object.assign(Object.assign({ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag, defaultSize: hashTagSize, maxSize: hashTagSize }, (((_b = (_a = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec) === null || _a === void 0 ? void 0 : _a.product) === null || _b === void 0 ? void 0 : _b.itemId) && { productFilter: (_d = (_c = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec) === null || _c === void 0 ? void 0 : _c.product) === null || _d === void 0 ? void 0 : _d.itemId })), ((waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId) && { contentFilter: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId }))).then((res) => {
13378
13774
  var _a, _b;
13379
13775
  setData(res);
13380
13776
  setList((_b = (_a = res === null || res === void 0 ? void 0 : res.recList) === null || _a === void 0 ? void 0 : _a.filter((item) => (item === null || item === void 0 ? void 0 : item.video) !== null || (item === null || item === void 0 ? void 0 : item.product) !== null)) !== null && _b !== void 0 ? _b : []);
@@ -13383,7 +13779,7 @@ function WaterfallList$1(_a) {
13383
13779
  if (isOpenHashTag) {
13384
13780
  const res = previewData;
13385
13781
  setData(res);
13386
- setList((_b = (_a = res === null || res === void 0 ? void 0 : res.recList) === null || _a === void 0 ? void 0 : _a.filter((item) => (item === null || item === void 0 ? void 0 : item.video) !== null || (item === null || item === void 0 ? void 0 : item.product) !== null)) !== null && _b !== void 0 ? _b : []);
13782
+ setList((_f = (_e = res === null || res === void 0 ? void 0 : res.recList) === null || _e === void 0 ? void 0 : _e.filter((item) => (item === null || item === void 0 ? void 0 : item.video) !== null || (item === null || item === void 0 ? void 0 : item.product) !== null)) !== null && _f !== void 0 ? _f : []);
13387
13783
  setIsLoadingData(false);
13388
13784
  }
13389
13785
  }, [waterFallData, getRecommendVideos, hashTagSize, isOpenHashTag]);
@@ -13409,13 +13805,10 @@ function WaterfallList$1(_a) {
13409
13805
  };
13410
13806
  }, [onResize]);
13411
13807
  React.useCallback(() => {
13808
+ var _a, _b, _c, _d;
13412
13809
  setIsLoadingData(true);
13413
13810
  waterFallData &&
13414
- (getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({
13415
- hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag,
13416
- 'itemFilter.itemId': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId,
13417
- 'itemFilter.itemType': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemType
13418
- }).then((res) => {
13811
+ (getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos(Object.assign(Object.assign({ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag }, (((_b = (_a = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec) === null || _a === void 0 ? void 0 : _a.product) === null || _b === void 0 ? void 0 : _b.itemId) && { productFilter: (_d = (_c = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec) === null || _c === void 0 ? void 0 : _c.product) === null || _d === void 0 ? void 0 : _d.itemId })), ((waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId) && { contentFilter: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId }))).then((res) => {
13419
13812
  var _a, _b;
13420
13813
  setList(list === null || list === void 0 ? void 0 : list.concat((_b = (_a = res === null || res === void 0 ? void 0 : res.recList) === null || _a === void 0 ? void 0 : _a.filter((item) => !(item === null || item === void 0 ? void 0 : item.video))) !== null && _b !== void 0 ? _b : []));
13421
13814
  setIsLoadingData(false);
@@ -13442,10 +13835,12 @@ function WaterfallList$1(_a) {
13442
13835
  };
13443
13836
  }, [onScroll, scrollParent]);
13444
13837
  const handleClickLink = () => {
13445
- var _a, _b;
13838
+ var _a, _b, _c, _d, _e;
13446
13839
  if ((_a = data === null || data === void 0 ? void 0 : data.tag) === null || _a === void 0 ? void 0 : _a.link) {
13447
13840
  reportTagsView();
13448
- window.location.href = window.getJointUtmLink((_b = data === null || data === void 0 ? void 0 : data.tag) === null || _b === void 0 ? void 0 : _b.link);
13841
+ const rec = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec;
13842
+ jumpToWeb(rec, (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.bindProduct, (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindCta, cacheActiveIndex, (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.traceInfo);
13843
+ window.location.href = window.getJointUtmLink((_e = data === null || data === void 0 ? void 0 : data.tag) === null || _e === void 0 ? void 0 : _e.link);
13449
13844
  }
13450
13845
  };
13451
13846
  return (React.createElement(React.Fragment, null, isLoadingData ? (React.createElement("div", { style: { height: '100%', width: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' } },
@@ -13488,7 +13883,7 @@ var img$2 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeA
13488
13883
 
13489
13884
  const WaterfallFlowItem = (props) => {
13490
13885
  const { rec, index, list, reportTagsView, textStyles, space } = props;
13491
- const { swiperRef, setRtcList, setOpenHashtag, bffEventReport, sxpParameter } = useSxpDataSource();
13886
+ const { swiperRef, setRtcList, setOpenHashtag, sxpParameter } = useSxpDataSource();
13492
13887
  const [showVideo, setShowVideo] = React.useState(false);
13493
13888
  const imgDom = React.useRef(null);
13494
13889
  const ref = React.useRef(null);
@@ -13616,38 +14011,30 @@ const WaterfallFlowItem = (props) => {
13616
14011
  function WaterfallList(_a) {
13617
14012
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
13618
14013
  var { reportTagsView, showBanner } = _a, props = __rest(_a, ["reportTagsView", "showBanner"]);
13619
- const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag } = useSxpDataSource();
14014
+ const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag, cacheActiveIndex } = useSxpDataSource();
14015
+ const { jumpToWeb } = useEventReport();
13620
14016
  const [list, setList] = React.useState();
13621
14017
  const [data, setData] = React.useState();
13622
14018
  const [isLoadingData, setIsLoadingData] = React.useState(false);
13623
14019
  const containerRef = React.useRef(null);
13624
14020
  const [isLoadMore, setIsLoadMore] = React.useState(false);
13625
14021
  React.useCallback(() => {
14022
+ var _a, _b, _c, _d;
13626
14023
  if (isLoadMore)
13627
14024
  return;
13628
14025
  setIsLoadMore(true);
13629
14026
  waterFallData &&
13630
- (getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({
13631
- hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag,
13632
- 'itemFilter.itemId': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId,
13633
- 'itemFilter.itemType': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemType
13634
- }).then((res) => {
14027
+ (getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos(Object.assign(Object.assign({ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag }, (((_b = (_a = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec) === null || _a === void 0 ? void 0 : _a.product) === null || _b === void 0 ? void 0 : _b.itemId) && { productFilter: (_d = (_c = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec) === null || _c === void 0 ? void 0 : _c.product) === null || _d === void 0 ? void 0 : _d.itemId })), ((waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId) && { contentFilter: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId }))).then((res) => {
13635
14028
  var _a;
13636
14029
  setList(list === null || list === void 0 ? void 0 : list.concat((_a = res === null || res === void 0 ? void 0 : res.recList) !== null && _a !== void 0 ? _a : []));
13637
14030
  setIsLoadMore(false);
13638
14031
  }));
13639
14032
  }, [waterFallData, getRecommendVideos, list, isLoadMore]);
13640
14033
  React.useEffect(() => {
13641
- var _a, _b;
14034
+ var _a, _b, _c, _d, _e, _f;
13642
14035
  setIsLoadingData(true);
13643
14036
  waterFallData &&
13644
- (getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({
13645
- hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag,
13646
- 'itemFilter.itemId': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId,
13647
- 'itemFilter.itemType': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemType,
13648
- defaultSize: hashTagSize,
13649
- maxSize: hashTagSize
13650
- }).then((res) => {
14037
+ (getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos(Object.assign(Object.assign(Object.assign({ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag }, (((_b = (_a = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec) === null || _a === void 0 ? void 0 : _a.product) === null || _b === void 0 ? void 0 : _b.itemId) && { productFilter: (_d = (_c = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec) === null || _c === void 0 ? void 0 : _c.product) === null || _d === void 0 ? void 0 : _d.itemId })), ((waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId) && { contentFilter: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId })), { defaultSize: hashTagSize, maxSize: hashTagSize })).then((res) => {
13651
14038
  var _a, _b;
13652
14039
  setData(res);
13653
14040
  setList((_b = (_a = res === null || res === void 0 ? void 0 : res.recList) === null || _a === void 0 ? void 0 : _a.filter((item) => (item === null || item === void 0 ? void 0 : item.video) !== null || (item === null || item === void 0 ? void 0 : item.product) !== null)) !== null && _b !== void 0 ? _b : []);
@@ -13656,7 +14043,7 @@ function WaterfallList(_a) {
13656
14043
  if (isOpenHashTag) {
13657
14044
  const res = previewData;
13658
14045
  setData(res);
13659
- setList((_b = (_a = res === null || res === void 0 ? void 0 : res.recList) === null || _a === void 0 ? void 0 : _a.filter((item) => (item === null || item === void 0 ? void 0 : item.video) !== null || (item === null || item === void 0 ? void 0 : item.product) !== null)) !== null && _b !== void 0 ? _b : []);
14046
+ setList((_f = (_e = res === null || res === void 0 ? void 0 : res.recList) === null || _e === void 0 ? void 0 : _e.filter((item) => (item === null || item === void 0 ? void 0 : item.video) !== null || (item === null || item === void 0 ? void 0 : item.product) !== null)) !== null && _f !== void 0 ? _f : []);
13660
14047
  setIsLoadingData(false);
13661
14048
  }
13662
14049
  }, [waterFallData, getRecommendVideos, hashTagSize, isOpenHashTag]);
@@ -13677,10 +14064,12 @@ function WaterfallList(_a) {
13677
14064
  // };
13678
14065
  // }, [isLoadingData, containerRef, loadMoreData]);
13679
14066
  const handleClickLink = () => {
13680
- var _a, _b;
14067
+ var _a, _b, _c, _d, _e;
13681
14068
  if ((_a = data === null || data === void 0 ? void 0 : data.tag) === null || _a === void 0 ? void 0 : _a.link) {
13682
14069
  reportTagsView();
13683
- window.location.href = window.getJointUtmLink((_b = data === null || data === void 0 ? void 0 : data.tag) === null || _b === void 0 ? void 0 : _b.link);
14070
+ const rec = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec;
14071
+ jumpToWeb(rec, (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.bindProduct, (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindCta, cacheActiveIndex, (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.traceInfo);
14072
+ window.location.href = window.getJointUtmLink((_e = data === null || data === void 0 ? void 0 : data.tag) === null || _e === void 0 ? void 0 : _e.link);
13684
14073
  }
13685
14074
  };
13686
14075
  return (React.createElement(React.Fragment, null, isLoadingData ? (React.createElement("div", { style: { height: '100%', width: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' } },
@@ -14747,6 +15136,7 @@ var _materials_ = /*#__PURE__*/Object.freeze({
14747
15136
  CommodityList: CommodityList,
14748
15137
  Consent: Consent,
14749
15138
  HashTag: HashTag,
15139
+ Iframe: Iframe,
14750
15140
  Link: Link,
14751
15141
  MultiCommodity: MultiCommodity,
14752
15142
  MultiCommodityDiro: MultiCommodityDiro,
@@ -15205,14 +15595,6 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
15205
15595
  };
15206
15596
  var VideoWidget$3 = React.memo(VideoWidget$2);
15207
15597
 
15208
- /*
15209
- * @Author: binruan@chatlabs.com
15210
- * @Date: 2023-12-27 19:02:59
15211
- * @LastEditors: binruan@chatlabs.com
15212
- * @LastEditTime: 2024-01-24 10:30:13
15213
- * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\ToggleButton\index.tsx
15214
- *
15215
- */
15216
15598
  const ToggleButton = ({ defaultValue, activeIcon, unactiveIcon, onChange, style }) => {
15217
15599
  const [isTrue, setIsTure] = React.useState(defaultValue);
15218
15600
  const handleClick = (e) => {
@@ -15221,6 +15603,9 @@ const ToggleButton = ({ defaultValue, activeIcon, unactiveIcon, onChange, style
15221
15603
  setIsTure(result);
15222
15604
  onChange === null || onChange === void 0 ? void 0 : onChange(result);
15223
15605
  };
15606
+ React.useEffect(() => {
15607
+ setIsTure(defaultValue);
15608
+ }, [defaultValue]);
15224
15609
  return (React.createElement("button", { style: style, "aria-label": 'toggle button', className: 'pb-toggle-button', onClick: handleClick },
15225
15610
  React.createElement("img", { className: 'pb-toggle-button-icon', alt: 'toggle image', src: isTrue ? activeIcon : unactiveIcon })));
15226
15611
  };
@@ -15599,12 +15984,14 @@ var Tagbar$1 = React.memo(Tagbar);
15599
15984
  * @Author: binruan@chatlabs.com
15600
15985
  * @Date: 2024-01-15 19:03:09
15601
15986
  * @LastEditors: binruan@chatlabs.com
15602
- * @LastEditTime: 2024-08-02 18:34:27
15987
+ * @LastEditTime: 2024-08-16 11:47:58
15603
15988
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
15604
15989
  *
15605
15990
  */
15606
15991
  const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.innerHeight, containerWidth = window.innerWidth, tempMap, resolver, data = [], ctaType, tipText, nudge, _schema, hashTagStyle, tagList = [], licenseUrl }) => {
15607
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
15992
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
15993
+ const mutedIcon = useIconLink('/pb_static/5beaaa5ce7f3477b99db3838619cc471.png');
15994
+ const unmutedIcon = useIconLink('/pb_static/fea8668a8a894e4aa3a86bcc775e895e.png');
15608
15995
  const { schema } = useEditor();
15609
15996
  const [activeIndex, setActiveIndex] = React.useState(0);
15610
15997
  const viewImageStartTime = React.useRef(0);
@@ -15615,11 +16002,10 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
15615
16002
  const [isReload, setIsReload] = React.useState(new Date().getTime());
15616
16003
  const skipLinkRef = React.useRef(false);
15617
16004
  const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport, curTime, h5EnterLink, isShowConsent, selectTag, isPreview } = useSxpDataSource();
15618
- const { backMainFeed } = useEventReport();
15619
- const { productView } = useEventReport();
16005
+ const { backMainFeed, productView, jumpToWeb } = useEventReport();
15620
16006
  const isShowFingerTip = React.useMemo(() => {
15621
- return data.length > 0 && !loading && getFeUserId();
15622
- }, [data, loading]);
16007
+ return data.length > 0 && !loading && (getFeUserId() || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enableSwiperTip));
16008
+ }, [data, loading, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enableSwiperTip]);
15623
16009
  React.useEffect(() => {
15624
16010
  refreshFeSessionId();
15625
16011
  }, []);
@@ -15647,14 +16033,15 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
15647
16033
  var _a;
15648
16034
  const index = (data === null || data === void 0 ? void 0 : data.findIndex((item) => {
15649
16035
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
15650
- if (ctaType === '多商品CTA') {
16036
+ const ctaType0 = ctaType === null || ctaType === void 0 ? void 0 : ctaType[0];
16037
+ if (ctaType0 === '多商品CTA') {
15651
16038
  return ((_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;
15652
16039
  }
15653
- else if (ctaType === '商品CTA') {
16040
+ else if (ctaType0 === '商品CTA') {
15654
16041
  return (_d = item === null || item === void 0 ? void 0 : item.video) === null || _d === void 0 ? void 0 : _d.bindProduct;
15655
16042
  }
15656
16043
  else {
15657
- return ((_f = (_e = item === null || item === void 0 ? void 0 : item.video) === null || _e === void 0 ? void 0 : _e.bindCta) === null || _f === void 0 ? void 0 : _f.itemId) === ctaType && (((_g = item === null || item === void 0 ? void 0 : item.video) === null || _g === void 0 ? void 0 : _g.url) || ((_j = (_h = item === null || item === void 0 ? void 0 : item.video) === null || _h === void 0 ? void 0 : _h.imgUrls) === null || _j === void 0 ? void 0 : _j.length));
16044
+ return ((_f = (_e = item === null || item === void 0 ? void 0 : item.video) === null || _e === void 0 ? void 0 : _e.bindCta) === null || _f === void 0 ? void 0 : _f.itemId) === ctaType0 && (((_g = item === null || item === void 0 ? void 0 : item.video) === null || _g === void 0 ? void 0 : _g.url) || ((_j = (_h = item === null || item === void 0 ? void 0 : item.video) === null || _h === void 0 ? void 0 : _h.imgUrls) === null || _j === void 0 ? void 0 : _j.length));
15658
16045
  }
15659
16046
  })) || 0;
15660
16047
  (_a = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper.slideTo(index);
@@ -15758,13 +16145,39 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
15758
16145
  const height = React.useMemo(() => {
15759
16146
  return containerHeight - minusHeight - tagHeight;
15760
16147
  }, [globalConfig, containerHeight, tagHeight]);
16148
+ const visList = React.useMemo(() => {
16149
+ var _a;
16150
+ const list = activeIndex === 0 && !waterFallData
16151
+ ? [(_a = data === null || data === void 0 ? void 0 : data[0]) !== null && _a !== void 0 ? _a : null]
16152
+ : data === null || data === void 0 ? void 0 : data.map((item, index) => {
16153
+ if (activeIndex === index || index - 1 === activeIndex || index + 1 === activeIndex) {
16154
+ return item;
16155
+ }
16156
+ else {
16157
+ return null;
16158
+ }
16159
+ });
16160
+ return !waterFallData ? list.concat([{ loading: true }]) : list;
16161
+ }, [data, activeIndex, waterFallData]);
15761
16162
  const renderLogo = React.useMemo(() => {
16163
+ var _a, _b, _c, _d;
15762
16164
  if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
15763
- return (React.createElement("div", { className: 'clc-sxp-logo-banner', style: { backgroundColor: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.color } },
16165
+ const link = (_b = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoBar) === null || _a === void 0 ? void 0 : _a.onClick) === null || _b === void 0 ? void 0 : _b.value;
16166
+ const isExternalLink = ((_d = (_c = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoBar) === null || _c === void 0 ? void 0 : _c.onClick) === null || _d === void 0 ? void 0 : _d.linkType) === 'externalLink';
16167
+ const rec = visList[activeIndex];
16168
+ return (React.createElement("div", Object.assign({ className: 'clc-sxp-logo-banner', style: { backgroundColor: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.color } }, (link && {
16169
+ onClick: () => {
16170
+ var _a, _b, _c, _d;
16171
+ if (isExternalLink) {
16172
+ jumpToWeb(rec, (_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.bindCta, activeIndex, ((_c = rec === null || rec === void 0 ? void 0 : rec.product) === null || _c === void 0 ? void 0 : _c.traceInfo) || ((_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.traceInfo));
16173
+ }
16174
+ new Function(link)();
16175
+ }
16176
+ })),
15764
16177
  React.createElement("img", { src: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl, alt: 'logo' })));
15765
16178
  }
15766
16179
  return null;
15767
- }, [globalConfig]);
16180
+ }, [globalConfig, activeIndex, visList]);
15768
16181
  const renderContent = React.useCallback((rec, index) => {
15769
16182
  var _a, _b, _c, _d;
15770
16183
  if ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.url) {
@@ -15840,9 +16253,9 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
15840
16253
  isShowMore,
15841
16254
  lineGradStyle
15842
16255
  ]);
15843
- const renderLikeButton = React.useCallback((rec, index) => {
16256
+ const renderLikeButton = React.useCallback((rec, index, visible) => {
15844
16257
  var _a, _b, _c, _d;
15845
- if (!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLike))
16258
+ if (!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLike) || !visible)
15846
16259
  return;
15847
16260
  let top = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconY) !== null && _a !== void 0 ? _a : 400;
15848
16261
  if (waterFallData && top < 40) {
@@ -15850,6 +16263,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
15850
16263
  }
15851
16264
  if (rec === null || rec === void 0 ? void 0 : rec.video) {
15852
16265
  return (React.createElement(LikeButton$1, { key: rec.position, activeIcon: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIcon, unActicveIcon: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unlikeIcon, active: rec.isCollected, recData: rec, className: 'clc-sxp-like-button', style: {
16266
+ position: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconFixed) ? 'fixed' : 'absolute',
15853
16267
  [(_b = globalConfig.likeIconXPosit) !== null && _b !== void 0 ? _b : 'right']: (_c = globalConfig.likeIconX) !== null && _c !== void 0 ? _c : 0,
15854
16268
  [(_d = globalConfig.likeIconYPosit) !== null && _d !== void 0 ? _d : 'bottom']: top
15855
16269
  }, position: index }));
@@ -15900,7 +16314,6 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
15900
16314
  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 : ''
15901
16315
  }
15902
16316
  });
15903
- setSlideSkipState();
15904
16317
  skipLinkRef.current = true;
15905
16318
  window.location.href = window.getJointUtmLink(link);
15906
16319
  }
@@ -15986,20 +16399,18 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
15986
16399
  });
15987
16400
  }
15988
16401
  };
15989
- const visList = React.useMemo(() => {
15990
- var _a;
15991
- const list = activeIndex === 0 && !waterFallData
15992
- ? [(_a = data === null || data === void 0 ? void 0 : data[0]) !== null && _a !== void 0 ? _a : null]
15993
- : data === null || data === void 0 ? void 0 : data.map((item, index) => {
15994
- if (activeIndex === index || index - 1 === activeIndex || index + 1 === activeIndex) {
15995
- return item;
15996
- }
15997
- else {
15998
- return null;
15999
- }
16000
- });
16001
- return !waterFallData ? list.concat([{ loading: true }]) : list;
16002
- }, [data, activeIndex, waterFallData]);
16402
+ const renderToggleButton = React.useCallback((visible) => {
16403
+ var _a, _b, _c, _d, _e, _f;
16404
+ if (!visible)
16405
+ return;
16406
+ return (((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowMute) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowMute) === true) && (React.createElement(ToggleButton$1, { style: {
16407
+ position: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed) ? 'fixed' : 'absolute',
16408
+ visibility: ((_b = (_a = visList === null || visList === void 0 ? void 0 : visList[activeIndex]) === null || _a === void 0 ? void 0 : _a.video) === null || _b === void 0 ? void 0 : _b.url) ? 'visible' : 'hidden',
16409
+ zIndex: 999,
16410
+ [(_c = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconXPosit) !== null && _c !== void 0 ? _c : 'right']: (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconX) !== null && _d !== void 0 ? _d : 0,
16411
+ [(_e = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconYPosit) !== null && _e !== void 0 ? _e : 'bottom']: (_f = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconY) !== null && _f !== void 0 ? _f : 23
16412
+ }, defaultValue: isMuted, activeIcon: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unMuteIcon) ? globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unMuteIcon : mutedIcon, unactiveIcon: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIcon) ? globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIcon : unmutedIcon, onChange: setIsMuted })));
16413
+ }, [globalConfig, visList, activeIndex, isMuted]);
16003
16414
  const renderView = React.useMemo(() => {
16004
16415
  if (loading) {
16005
16416
  return (React.createElement("div", { style: { height, width: containerWidth, display: 'flex', justifyContent: 'center', alignItems: 'center' } },
@@ -16016,20 +16427,30 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
16016
16427
  React.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } }))) : (React.createElement(React.Fragment, null,
16017
16428
  renderContent(rec, index),
16018
16429
  renderBottom(rec, index),
16019
- renderLikeButton(rec, index)))))));
16430
+ renderLikeButton(rec, index, !(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconFixed)),
16431
+ renderToggleButton(!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed))))))));
16020
16432
  });
16021
- }, [containerWidth, data, height, loading, renderBottom, renderContent, visList, loadingImage, isReload]);
16022
- const mutedIcon = useIconLink('/pb_static/5beaaa5ce7f3477b99db3838619cc471.png');
16023
- const unmutedIcon = useIconLink('/pb_static/fea8668a8a894e4aa3a86bcc775e895e.png');
16433
+ }, [
16434
+ containerWidth,
16435
+ data,
16436
+ height,
16437
+ loading,
16438
+ renderBottom,
16439
+ renderContent,
16440
+ visList,
16441
+ loadingImage,
16442
+ isReload,
16443
+ renderToggleButton
16444
+ ]);
16024
16445
  return (React.createElement("div", { id: 'sxp-render', className: 'clc-sxp-container' },
16025
- waterFallData && (React.createElement(Navbar$1, { icon: img, styles: { background: 'rgba(0,0,0,.3)', color: '#fff' }, onClose: () => {
16446
+ waterFallData && (React.createElement(Navbar$1, { icon: img, styles: { background: 'rgba(0,0,0,.3)', color: '#fff' }, textStyle: Object.assign(Object.assign({}, (_e = (_d = (_c = (_b = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.hashTag) === 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.textStyles) === null || _e === void 0 ? void 0 : _e.hashTagTitle), { color: '#fff' }), onClose: () => {
16026
16447
  setOpenHashtag === null || setOpenHashtag === void 0 ? void 0 : setOpenHashtag(true);
16027
16448
  } })),
16028
16449
  renderLogo,
16029
16450
  React.createElement(Tagbar$1, { tagList: tagList, setActiveIndex: setActiveIndex, style: {
16030
16451
  top: minusHeight
16031
16452
  } }),
16032
- isShowFingerTip ? (React.createElement(FingerSwipeTip, { imageUrl: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipIcon, style: { top: `${50 - ((_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipOffset) !== null && _a !== void 0 ? _a : 0)}%` }, duration: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swiperTipAniDur })) : null,
16453
+ isShowFingerTip ? (React.createElement(FingerSwipeTip, { imageUrl: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipIcon, style: { top: `${50 - ((_f = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipOffset) !== null && _f !== void 0 ? _f : 0)}%` }, duration: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swiperTipAniDur })) : null,
16033
16454
  React.createElement(Swiper, { style: {
16034
16455
  marginTop: tagHeight
16035
16456
  }, ref: swiperRef, onSlideChange: () => {
@@ -16054,15 +16475,10 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
16054
16475
  }
16055
16476
  }
16056
16477
  }, direction: 'vertical', height: height },
16057
- ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowMute) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowMute) === true) && (React.createElement(ToggleButton$1, { style: {
16058
- position: 'fixed',
16059
- visibility: ((_c = (_b = data === null || data === void 0 ? void 0 : data[activeIndex]) === null || _b === void 0 ? void 0 : _b.video) === null || _c === void 0 ? void 0 : _c.url) ? 'visible' : 'hidden',
16060
- zIndex: 999,
16061
- [(_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconXPosit) !== null && _d !== void 0 ? _d : 'right']: (_e = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconX) !== null && _e !== void 0 ? _e : 0,
16062
- [(_f = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconYPosit) !== null && _f !== void 0 ? _f : 'bottom']: (_g = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconY) !== null && _g !== void 0 ? _g : 23
16063
- }, defaultValue: isMuted, activeIcon: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unMuteIcon) ? globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unMuteIcon : mutedIcon, unactiveIcon: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIcon) ? globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIcon : unmutedIcon, onChange: setIsMuted })),
16478
+ renderLikeButton(visList[activeIndex], activeIndex, !!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconFixed)),
16479
+ renderToggleButton(!!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed)),
16064
16480
  renderView),
16065
- React.createElement(WaterFall$1, Object.assign({}, (_k = (_j = (_h = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.hashTag) === null || _h === void 0 ? void 0 : _h[0]) === null || _j === void 0 ? void 0 : _j.item) === null || _k === void 0 ? void 0 : _k.props))));
16481
+ React.createElement(WaterFall$1, Object.assign({}, (_j = (_h = (_g = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.hashTag) === null || _g === void 0 ? void 0 : _g[0]) === null || _h === void 0 ? void 0 : _h.item) === null || _j === void 0 ? void 0 : _j.props))));
16066
16482
  };
16067
16483
 
16068
16484
  const PictureGroup = ({ imgUrls, width, height, imgUrlsPostConfig, rec, index }) => {
@@ -16429,7 +16845,7 @@ var index$1 = React.memo(DiyPortalPreview);
16429
16845
  * @Author: binruan@chatlabs.com
16430
16846
  * @Date: 2023-10-31 10:56:01
16431
16847
  * @LastEditors: binruan@chatlabs.com
16432
- * @LastEditTime: 2024-08-01 15:23:51
16848
+ * @LastEditTime: 2024-08-06 17:15:56
16433
16849
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Popup\index.tsx
16434
16850
  *
16435
16851
  */
@@ -16488,14 +16904,14 @@ const Popup = () => {
16488
16904
  const renderPopupDetail = React.useMemo(() => {
16489
16905
  var _a, _b, _c;
16490
16906
  return (_c = (_b = (_a = schema === null || schema === void 0 ? void 0 : schema.sxpPageConf) === null || _a === void 0 ? void 0 : _a.globalConfig) === null || _b === void 0 ? void 0 : _b.popupList) === null || _c === void 0 ? void 0 : _c.map((value, index) => {
16491
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
16907
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
16492
16908
  if ((value === null || value === void 0 ? void 0 : value.id) === (popup === null || popup === void 0 ? void 0 : popup.id)) {
16493
16909
  const t = resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type];
16494
16910
  const Component = withBindDataSource(t);
16495
16911
  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';
16496
16912
  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';
16497
16913
  const defaulSetting = (_h = t === null || t === void 0 ? void 0 : t.extend) === null || _h === void 0 ? void 0 : _h.defaulSetting;
16498
- 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 })));
16914
+ 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), { height: '100%' }), textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_k = value === null || value === void 0 ? void 0 : value.item) === null || _k === void 0 ? void 0 : _k.textStyle), bindDatas: (_m = (_l = value === null || value === void 0 ? void 0 : value.item) === null || _l === void 0 ? void 0 : _l.bindDatas) !== null && _m !== void 0 ? _m : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_o = value === null || value === void 0 ? void 0 : value.item) === null || _o === void 0 ? void 0 : _o.props, { event: ((_p = value === null || value === void 0 ? void 0 : value.item) === null || _p === void 0 ? void 0 : _p.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, isExternalLink: isExternalLink, isPopup: isPopup, onClose: handleClose })));
16499
16915
  }
16500
16916
  else {
16501
16917
  return React.createElement(React.Fragment, null);