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/pb-ui.js CHANGED
@@ -232,6 +232,87 @@
232
232
  }
233
233
  return content;
234
234
  };
235
+ function getBrowserInfo() {
236
+ var _a, _b, _c, _d, _e, _f, _g;
237
+ let userAgent = self.navigator.userAgent;
238
+ if (!userAgent)
239
+ return 'Unknown';
240
+ if (/edge\/([\d\.]+)/i.exec(userAgent))
241
+ return `Edge ${(_a = /edge\/([\d\.]+)/i.exec(userAgent)) === null || _a === void 0 ? void 0 : _a[1]}`;
242
+ if (/edg\/([\d\.]+)/i.exec(userAgent))
243
+ return `Edge(Chromium) ${(_b = /edge\/([\d\.]+)/i.exec(userAgent)) === null || _b === void 0 ? void 0 : _b[1]}`;
244
+ if (/msie/i.test(userAgent))
245
+ return `Internet Explorer ${(_c = /msie ([\d\.]+)/i.exec(userAgent)) === null || _c === void 0 ? void 0 : _c[1]}`;
246
+ if (/Trident/i.test(userAgent))
247
+ return `Internet Explorer ${(_d = /rv:([\d\.]+)/i.exec(userAgent)) === null || _d === void 0 ? void 0 : _d[1]}`;
248
+ if (/chrome/i.test(userAgent))
249
+ return `Chrome ${(_e = /chrome\/([\d\.]+)/i.exec(userAgent)) === null || _e === void 0 ? void 0 : _e[1]}`;
250
+ if (/firefox/i.test(userAgent))
251
+ return `Firefox ${(_f = /firefox\/([\d\.]+)/i.exec(userAgent)) === null || _f === void 0 ? void 0 : _f[1]}`;
252
+ if (/safari/i.test(userAgent))
253
+ return `Safari ${(_g = /version\/([\d\.]+)/i.exec(userAgent)) === null || _g === void 0 ? void 0 : _g[1]}`;
254
+ return 'Unknown';
255
+ }
256
+ function getSystem() {
257
+ var _a, _b, _c;
258
+ let userAgent = self.navigator.userAgent;
259
+ if (!userAgent)
260
+ return 'Unknown';
261
+ if (/iphone/i.test(userAgent))
262
+ return `IOS ${(_a = userAgent.match(/OS\s(.*?)\slike/)) === null || _a === void 0 ? void 0 : _a[1]}`;
263
+ if (/android/i.test(userAgent))
264
+ return `Android ${(_b = userAgent.match(/Android\s(.*?)\;/)) === null || _b === void 0 ? void 0 : _b[1]}`;
265
+ if (/windows/i.test(userAgent))
266
+ return `Windows ${(_c = userAgent.match(/Windows\s(.*?)\;/)) === null || _c === void 0 ? void 0 : _c[1]}`;
267
+ if (/mac/i.test(userAgent))
268
+ return `Mac OS`;
269
+ return 'Unknown';
270
+ }
271
+ function getDevice$1() {
272
+ let userAgent = self.navigator.userAgent;
273
+ if (!userAgent)
274
+ return 'Unknown';
275
+ if (/iphone/i.test(userAgent))
276
+ return `iPhone`;
277
+ if (/android/i.test(userAgent)) {
278
+ // var index1 = userAgent.indexOf(';');
279
+ // var index2 = userAgent.indexOf(';', index1 + 1);
280
+ // var index3 = userAgent.indexOf(';', index2 + 1);
281
+ // var index4 = userAgent.indexOf(';', index3 + 1);
282
+ // if (index2 !== -1 && index3 !== -1) {
283
+ // var value1 = userAgent.substring(index3 + 1, index4);
284
+ // return `${value1}`;
285
+ // }
286
+ var index1 = userAgent.indexOf('(');
287
+ var index2 = userAgent.indexOf(')');
288
+ if (index1 !== -1 && index2 !== -1) {
289
+ var value = userAgent.substring(index1 + 1, index2);
290
+ return `${value}`;
291
+ }
292
+ }
293
+ if (/windows/i.test(userAgent))
294
+ return `Windows`;
295
+ if (/mac/i.test(userAgent))
296
+ return `Mac`;
297
+ return 'Unknown';
298
+ }
299
+ function getCookie(val) {
300
+ // const expirationDate = new Date();
301
+ // expirationDate.setDate(expirationDate.getDate() + 100);
302
+ // document.cookie = `_fbc=IwAR2F4-dbP0l7Mn1IawQQGCINEz7PYXQvwjNwB_qa2ofrHyiLjcbCRxTDGrc; expires=${expirationDate.toUTCString()}; path=/`;
303
+ const cookies = document.cookie;
304
+ // 将cookie字符串拆分成数组
305
+ const cookieArray = cookies.split(';');
306
+ let value = null;
307
+ // 遍历cookie数组,查找名为_fbc的cookie
308
+ cookieArray.forEach((cookie) => {
309
+ const [cookieName, cookieValue] = cookie.trim().split('=');
310
+ if (cookieName === val) {
311
+ value = cookieValue;
312
+ }
313
+ });
314
+ return value !== null && value !== void 0 ? value : '';
315
+ }
235
316
 
236
317
  function unzip(b64Data) {
237
318
  const strData = atob(b64Data);
@@ -547,7 +628,7 @@
547
628
  DataSourceType[DataSourceType["BFF"] = 5] = "BFF";
548
629
  })(DataSourceType || (DataSourceType = {}));
549
630
  const DEFAULT_TAG = 'FOR U';
550
- 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 }) => {
631
+ 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 }) => {
551
632
  var _a, _b, _c;
552
633
  const [rtcList, setRtcList] = React.useState([]);
553
634
  const [tagList, setTagList] = React.useState([]);
@@ -630,16 +711,8 @@
630
711
  }, [bffDataSource]);
631
712
  // 获取推荐视频数据
632
713
  const getRecommendVideos = React.useCallback((query) => __awaiter(void 0, void 0, void 0, function* () {
633
- var _d, _e, _f, _g, _h;
634
- query = {
635
- maxSize: (_d = query === null || query === void 0 ? void 0 : query.maxSize) !== null && _d !== void 0 ? _d : maxSize,
636
- defaultSize: (_e = query === null || query === void 0 ? void 0 : query.defaultSize) !== null && _e !== void 0 ? _e : defaultSize,
637
- 'itemFilter.itemId': query === null || query === void 0 ? void 0 : query['itemFilter.itemId'],
638
- 'itemFilter.itemType': query === null || query === void 0 ? void 0 : query['itemFilter.itemType'],
639
- hashTag: query === null || query === void 0 ? void 0 : query.hashTag,
640
- traceInfo: query === null || query === void 0 ? void 0 : query.traceInfo,
641
- themeTag: query === null || query === void 0 ? void 0 : query.themeTag
642
- };
714
+ var _d, _e, _f, _g, _h, _j, _k;
715
+ 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}]` }));
643
716
  if (utmVal) {
644
717
  const val = (_h = (_g = (_f = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _f === void 0 ? void 0 : _f.filter((val) => {
645
718
  var _a, _b;
@@ -648,6 +721,32 @@
648
721
  })) === null || _g === void 0 ? void 0 : _g.join('&')) !== null && _h !== void 0 ? _h : '';
649
722
  query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(val) });
650
723
  }
724
+ if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) || isEditor) {
725
+ 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] }));
726
+ if (!(query === null || query === void 0 ? void 0 : query.channel))
727
+ return;
728
+ let list = [];
729
+ let result = null;
730
+ let pageNum = 1;
731
+ const recurveRecList = (query) => __awaiter(void 0, void 0, void 0, function* () {
732
+ var _l, _m, _o, _p;
733
+ query.pageNum = pageNum;
734
+ result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/list', { method: 'GET', query }));
735
+ if (!(result === null || result === void 0 ? void 0 : result.success)) {
736
+ return undefined;
737
+ }
738
+ 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];
739
+ 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 : []);
740
+ if ((rec === null || rec === void 0 ? void 0 : rec.product) || (rec === null || rec === void 0 ? void 0 : rec.video)) {
741
+ pageNum = pageNum + 1;
742
+ yield recurveRecList(query);
743
+ }
744
+ });
745
+ yield recurveRecList(query);
746
+ if (!(query === null || query === void 0 ? void 0 : query.hashTag) && result)
747
+ 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 });
748
+ return Object.assign(Object.assign({}, result.data), { recList: list });
749
+ }
651
750
  const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/list', { method: 'GET', query }));
652
751
  if (!(result === null || result === void 0 ? void 0 : result.success)) {
653
752
  return undefined;
@@ -655,23 +754,20 @@
655
754
  if (!(query === null || query === void 0 ? void 0 : query.hashTag))
656
755
  setCurReqInfo({ rtc: result.data.rtc, requestId: result.data.requestId });
657
756
  return result === null || result === void 0 ? void 0 : result.data;
658
- }), [bffFetch, utmVal, maxSize, defaultSize]);
757
+ }), [bffFetch, utmVal, maxSize, defaultSize, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview, channelQueryList, isEditor]);
659
758
  const loadVideos = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
759
+ var _q, _r, _s, _t;
660
760
  if (rtcList.length <= 0) {
661
761
  return;
662
762
  }
663
- const data = yield getRecommendVideos({
664
- hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag,
665
- 'itemFilter.itemId': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId,
666
- 'itemFilter.itemType': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemType,
667
- themeTag: themeTag.current
668
- });
763
+ const lastItem = rtcList === null || rtcList === void 0 ? void 0 : rtcList[(rtcList === null || rtcList === void 0 ? void 0 : rtcList.length) - 1];
764
+ 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 }));
669
765
  setRtcList(rtcList.concat(getFilterRecList(data)));
670
766
  setCacheRtcList(cacheRtcList.concat(getFilterRecList(data)));
671
767
  }), [getRecommendVideos, rtcList, waterFallData, cacheRtcList]);
672
768
  const bffEventReport = React.useCallback(({ userInfo, eventInfo }) => {
673
769
  // 关闭 BFF 事件上报
674
- if (!enableReportEvent) {
770
+ if (!enableReportEvent || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview)) {
675
771
  return;
676
772
  }
677
773
  // 用户信息都是公共的
@@ -682,7 +778,7 @@
682
778
  };
683
779
  }
684
780
  const sessionID = storeAndLoadFeSessionId();
685
- const ef = Object.assign({ sessionID, rtc: curReqInfo.rtc, requestId: curReqInfo.requestId }, eventInfo);
781
+ const ef = Object.assign(Object.assign({ sessionID, rtc: curReqInfo.rtc, requestId: curReqInfo.requestId }, eventInfo), { sxpDevice: getDevice$1(), sxpSystem: getSystem(), sxpBrowser: getBrowserInfo() });
686
782
  const realUserInfo = Object.entries(userInfo).map(([k, v]) => ({ name: k, value: v }));
687
783
  const realEventInfo = Object.entries(ef)
688
784
  .map(([k, v]) => v && { name: k, value: v })
@@ -696,11 +792,11 @@
696
792
  body: { userInfo: realUserInfo, eventInfo: realEventInfo },
697
793
  type: 'beacon'
698
794
  });
699
- }, [bffFetch, curReqInfo, enableReportEvent]);
795
+ }, [bffFetch, curReqInfo, enableReportEvent, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview]);
700
796
  const bffFbReport = React.useCallback((_a) => {
701
- var _b;
797
+ var _b, _c;
702
798
  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;
703
- if (!enableReportEvent || !enabledMetaConversionApi) {
799
+ if (!enableReportEvent || !enabledMetaConversionApi || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview)) {
704
800
  return;
705
801
  }
706
802
  const fakeUserId = storeAndLoadFeUserId();
@@ -711,12 +807,15 @@
711
807
  actionSource,
712
808
  eventSourceUrl,
713
809
  userData: {
714
- externalId: fakeUserId
810
+ externalId: fakeUserId,
811
+ fbc: `fb.2.${new Date().getTime()}.${getCookie('_fbc')}`,
812
+ fbp: `fb.2.${new Date().getTime()}.${getCookie('_fbp')}`,
813
+ client_user_agent: (_c = window === null || window === void 0 ? void 0 : window.navigator) === null || _c === void 0 ? void 0 : _c.userAgent
715
814
  }
716
815
  },
717
816
  type: 'beacon'
718
817
  });
719
- }, [bffFetch, enableReportEvent, enabledMetaConversionApi]);
818
+ }, [bffFetch, enableReportEvent, enabledMetaConversionApi, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview]);
720
819
  const bffMutateLike = React.useCallback((body) => __awaiter(void 0, void 0, void 0, function* () {
721
820
  const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/like', { method: 'POST', body }));
722
821
  return res === null || res === void 0 ? void 0 : res.success;
@@ -731,24 +830,24 @@
731
830
  }), [bffFetch]);
732
831
  // 获取 Tag
733
832
  const bffGetTagList = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
734
- var _j, _k, _l, _m, _o;
833
+ var _u, _v, _w, _x, _y;
735
834
  if (!utmVal || !isShowTag)
736
835
  return;
737
836
  try {
738
- const val = (_l = (_k = (_j = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _j === void 0 ? void 0 : _j.filter((val) => {
837
+ const val = (_w = (_v = (_u = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _u === void 0 ? void 0 : _u.filter((val) => {
739
838
  var _a, _b;
740
839
  const key = val.split('=')[0];
741
840
  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);
742
- })) === null || _k === void 0 ? void 0 : _k.join('&')) !== null && _l !== void 0 ? _l : '';
841
+ })) === null || _v === void 0 ? void 0 : _v.join('&')) !== null && _w !== void 0 ? _w : '';
743
842
  const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/tag/list', { method: 'GET', query: { channel: decodeURIComponent(val) } }));
744
- setTagList((_o = (_m = result === null || result === void 0 ? void 0 : result.data) === null || _m === void 0 ? void 0 : _m.tags) !== null && _o !== void 0 ? _o : []);
843
+ 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 : []);
745
844
  }
746
845
  catch (e) {
747
846
  console.log('e', e);
748
847
  }
749
848
  }), [bffFetch, utmVal, isShowTag]);
750
849
  const ctaEvent = React.useCallback((eventInfo, rec, product, position) => {
751
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3;
850
+ 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;
752
851
  const cta = product === null || product === void 0 ? void 0 : product.bindCta;
753
852
  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);
754
853
  let fromKName = '';
@@ -761,8 +860,9 @@
761
860
  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) {
762
861
  fromKName = 'imagePage';
763
862
  }
863
+ 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;
764
864
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
765
- eventInfo: Object.assign(Object.assign({}, eventInfo), { ctaId: (_h = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _h !== void 0 ? _h : '', ctaName: (_j = cta === null || cta === void 0 ? void 0 : cta.title) !== null && _j !== void 0 ? _j : '', contentTags: JSON.stringify(cta === null || cta === void 0 ? void 0 : cta.tags), position: position + '', contentId: (_l = (_k = rec === null || rec === void 0 ? void 0 : rec.video) === null || _k === void 0 ? void 0 : _k.itemId) !== null && _l !== void 0 ? _l : '', productId: isProd ? product === null || product === void 0 ? void 0 : product.itemId : '', traceInfo: (_2 = (_z = (_u = (_q = (_m = cta === null || cta === void 0 ? void 0 : cta.traceInfo) !== null && _m !== void 0 ? _m : (_p = (_o = rec === null || rec === void 0 ? void 0 : rec.video) === null || _o === void 0 ? void 0 : _o.bindCta) === null || _p === void 0 ? void 0 : _p.traceInfo) !== null && _q !== void 0 ? _q : (_t = (_s = (_r = rec === null || rec === void 0 ? void 0 : rec.video) === null || _r === void 0 ? void 0 : _r.bindProduct) === null || _s === void 0 ? void 0 : _s.bindCta) === null || _t === void 0 ? void 0 : _t.traceInfo) !== null && _u !== void 0 ? _u : (_y = (_x = (_w = (_v = rec === null || rec === void 0 ? void 0 : rec.video) === null || _v === void 0 ? void 0 : _v.bindProducts) === null || _w === void 0 ? void 0 : _w[0]) === null || _x === void 0 ? void 0 : _x.bindCta) === null || _y === void 0 ? void 0 : _y.traceInfo) !== null && _z !== void 0 ? _z : (_1 = (_0 = rec === null || rec === void 0 ? void 0 : rec.product) === null || _0 === void 0 ? void 0 : _0.bindCta) === null || _1 === void 0 ? void 0 : _1.traceInfo) !== null && _2 !== void 0 ? _2 : '', fromKName, fromKPage: (_3 = location === null || location === void 0 ? void 0 : location.href) !== null && _3 !== void 0 ? _3 : '' })
865
+ 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 : '' })
766
866
  });
767
867
  }, [bffEventReport, isFromHashtag]);
768
868
  const h5EnterLink = React.useCallback(() => {
@@ -817,7 +917,7 @@
817
917
  });
818
918
  }, [isShowConsent]);
819
919
  React.useEffect(() => {
820
- if (!isInit.current)
920
+ if (!isInit.current && !isEditor)
821
921
  return;
822
922
  setLoading(true);
823
923
  bffGetTagList();
@@ -829,7 +929,7 @@
829
929
  .finally(() => {
830
930
  setLoading(false);
831
931
  });
832
- }, [getRecommendVideos, bffGetTagList]);
932
+ }, [bffGetTagList, isEditor, getRecommendVideos]);
833
933
  const defaultLoadingImage = useIconLink('/pb_static/a65d23c5893c49d7aaaa81681d3179e2.gif', appDomain);
834
934
  return (React.createElement(SxpDataSourceContext.Provider, { value: {
835
935
  rtcList,
@@ -1032,6 +1132,7 @@
1032
1132
  });
1033
1133
  typeof window !== 'undefined' &&
1034
1134
  (window.getJointUtmLink = (url) => {
1135
+ setSlideSkipState();
1035
1136
  if ((url === null || url === void 0 ? void 0 : url.indexOf('?')) !== -1) {
1036
1137
  return url + (utmVal ? '&' + utmVal : '');
1037
1138
  }
@@ -1114,7 +1215,7 @@
1114
1215
  EditorCore: EditorCore
1115
1216
  });
1116
1217
 
1117
- var interactionRender$d = [
1218
+ var interactionRender$e = [
1118
1219
  {
1119
1220
  title: '点击事件',
1120
1221
  child: [
@@ -1130,11 +1231,26 @@
1130
1231
  * @Author: binruan@chatlabs.com
1131
1232
  * @Date: 2023-07-28 18:29:57
1132
1233
  * @LastEditors: binruan@chatlabs.com
1133
- * @LastEditTime: 2024-08-06 14:13:47
1234
+ * @LastEditTime: 2024-08-06 15:35:25
1134
1235
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\AppointForm\settingRender.tsx
1135
1236
  *
1136
1237
  */
1137
- var settingRender$9 = [
1238
+ var settingRender$a = [
1239
+ {
1240
+ title: '弹窗背景',
1241
+ child: [
1242
+ {
1243
+ type: 'Number',
1244
+ label: '左右边距',
1245
+ name: ['props', 'popupBg', 'horizontalMargin']
1246
+ },
1247
+ {
1248
+ type: 'Number',
1249
+ label: '下边距',
1250
+ name: ['props', 'popupBg', 'bottomMargin']
1251
+ }
1252
+ ]
1253
+ },
1138
1254
  {
1139
1255
  type: 'Text',
1140
1256
  label: '组件名称',
@@ -1304,14 +1420,14 @@
1304
1420
  * @Author: binruan@chatlabs.com
1305
1421
  * @Date: 2024-03-12 10:59:06
1306
1422
  * @LastEditors: binruan@chatlabs.com
1307
- * @LastEditTime: 2024-08-01 17:36:34
1423
+ * @LastEditTime: 2024-08-14 17:02:53
1308
1424
  * @FilePath: \pb-sxp-ui\src\core\hooks\useEventReport.ts
1309
1425
  *
1310
1426
  */
1311
1427
  function useEventReport() {
1312
1428
  const { bffEventReport, popupDetailData, waterFallData, isFromHashtag } = useSxpDataSource();
1313
- const jumpToWeb = React.useCallback((data, product, cta, position) => {
1314
- 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;
1429
+ const jumpToWeb = React.useCallback((data, product, cta, position, traceInfo) => {
1430
+ 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;
1315
1431
  let fromKName = '';
1316
1432
  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))) {
1317
1433
  fromKName = 'pdpPage';
@@ -1328,21 +1444,22 @@
1328
1444
  else if (data === null || data === void 0 ? void 0 : data.product) {
1329
1445
  fromKName = 'productPage';
1330
1446
  }
1447
+ 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;
1331
1448
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
1332
1449
  eventInfo: {
1333
1450
  eventSubject: 'jumpToWeb',
1334
1451
  eventDescription: 'User jumped to website',
1335
- productId: (_h = product === null || product === void 0 ? void 0 : product.itemId) !== null && _h !== void 0 ? _h : '',
1336
- productName: (_j = product === null || product === void 0 ? void 0 : product.title) !== null && _j !== void 0 ? _j : '',
1452
+ productId: (_r = product === null || product === void 0 ? void 0 : product.itemId) !== null && _r !== void 0 ? _r : '',
1453
+ productName: (_s = product === null || product === void 0 ? void 0 : product.title) !== null && _s !== void 0 ? _s : '',
1337
1454
  price: (product === null || product === void 0 ? void 0 : product.price) ? (product === null || product === void 0 ? void 0 : product.price) + '' : '0',
1338
- productCollection: (_k = product === null || product === void 0 ? void 0 : product.collection) !== null && _k !== void 0 ? _k : '',
1455
+ productCollection: (_t = product === null || product === void 0 ? void 0 : product.collection) !== null && _t !== void 0 ? _t : '',
1339
1456
  fromKName,
1340
1457
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
1341
- contentTags: (product === null || product === void 0 ? void 0 : product.tags) ? JSON.stringify(product === null || product === void 0 ? void 0 : product.tags) : '',
1458
+ contentTags: contentTags ? JSON.stringify(contentTags) : '',
1342
1459
  position: position + '',
1343
- 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 : '',
1344
- ctatId: (_o = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _o !== void 0 ? _o : '',
1345
- 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 : ''
1460
+ 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 : '',
1461
+ ctatId: (_w = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _w !== void 0 ? _w : '',
1462
+ 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 : ''
1346
1463
  }
1347
1464
  });
1348
1465
  }, [bffEventReport, popupDetailData, isFromHashtag]);
@@ -1512,9 +1629,9 @@
1512
1629
  category: 'popup',
1513
1630
  type: 'AppointForm',
1514
1631
  related: {
1515
- settingRender: settingRender$9,
1632
+ settingRender: settingRender$a,
1516
1633
  bindableProps: [],
1517
- interactionRender: interactionRender$d
1634
+ interactionRender: interactionRender$e
1518
1635
  },
1519
1636
  defaulSetting: {
1520
1637
  name: '表单',
@@ -1537,10 +1654,41 @@
1537
1654
  sort: 2
1538
1655
  });
1539
1656
 
1540
- var settingRender$8 = [
1657
+ var settingRender$9 = [
1658
+ {
1659
+ title: '弹窗背景',
1660
+ child: [
1661
+ {
1662
+ type: 'Number',
1663
+ label: '左右边距',
1664
+ name: ['props', 'popupBg', 'horizontalMargin']
1665
+ },
1666
+ {
1667
+ type: 'Number',
1668
+ label: '下边距',
1669
+ name: ['props', 'popupBg', 'bottomMargin']
1670
+ }
1671
+ ]
1672
+ },
1541
1673
  {
1542
1674
  title: '商品图片',
1543
1675
  child: [
1676
+ {
1677
+ type: 'Group',
1678
+ label: '宽高比',
1679
+ child: [
1680
+ {
1681
+ type: 'Number',
1682
+ name: ['props', 'commodityImgRatio', 'w'],
1683
+ addonAfter: 'w'
1684
+ },
1685
+ {
1686
+ type: 'Number',
1687
+ name: ['props', 'commodityImgRatio', 'h'],
1688
+ addonAfter: 'h'
1689
+ }
1690
+ ]
1691
+ },
1544
1692
  {
1545
1693
  type: 'Radius',
1546
1694
  label: '轮播指示器',
@@ -1552,6 +1700,10 @@
1552
1700
  {
1553
1701
  label: '居中',
1554
1702
  value: 'center'
1703
+ },
1704
+ {
1705
+ label: '居右',
1706
+ value: 'right'
1555
1707
  }
1556
1708
  ],
1557
1709
  name: ['props', 'swiper', 'dotsAlign']
@@ -1716,6 +1868,12 @@
1716
1868
  {
1717
1869
  label: '间距',
1718
1870
  type: 'TextSpace'
1871
+ },
1872
+ {
1873
+ label: '价格千分符展示',
1874
+ type: 'Switch',
1875
+ name: ['enableFormattedPrice'],
1876
+ initialValue: true
1719
1877
  }
1720
1878
  ]
1721
1879
  }
@@ -1808,6 +1966,17 @@
1808
1966
  name: ['props', 'buttonStyle']
1809
1967
  }
1810
1968
  ]
1969
+ },
1970
+ {
1971
+ title: 'Iframe商品弹窗',
1972
+ child: [
1973
+ {
1974
+ label: '弹窗按钮',
1975
+ type: 'Upload',
1976
+ name: ['props', 'iframeIcon'],
1977
+ text: '建议尺寸:106 * 41'
1978
+ }
1979
+ ]
1811
1980
  }
1812
1981
  ];
1813
1982
 
@@ -8637,13 +8806,13 @@
8637
8806
  * @Author: binruan@chatlabs.com
8638
8807
  * @Date: 2023-11-02 18:34:34
8639
8808
  * @LastEditors: binruan@chatlabs.com
8640
- * @LastEditTime: 2024-07-29 16:20:40
8809
+ * @LastEditTime: 2024-08-16 17:58:56
8641
8810
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Modal\index.tsx
8642
8811
  *
8643
8812
  */
8644
8813
  const closeIcon$1 = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII=';
8645
8814
  const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema, fullHeight = window.innerHeight, isFullScreen = false }) => {
8646
- var _a, _b;
8815
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
8647
8816
  const touchRef = React.useRef(null);
8648
8817
  const fTouchRef = React.useRef(null);
8649
8818
  const touchMoveRef = React.useRef(null);
@@ -8670,12 +8839,16 @@
8670
8839
  const isOpen = React.useMemo(() => {
8671
8840
  return ((popup === null || popup === void 0 ? void 0 : popup.id) && (popup === null || popup === void 0 ? void 0 : popup.id) !== '') || visible;
8672
8841
  }, [visible, popup]);
8673
- const isScrollFullScreen = React.useMemo(() => {
8674
- var _a, _b, _c, _d, _e;
8842
+ const getPopupById = React.useMemo(() => {
8843
+ var _a, _b, _c;
8675
8844
  const schemaData = schema !== null && schema !== void 0 ? schema : _schema;
8676
8845
  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));
8677
- 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;
8846
+ return value;
8678
8847
  }, [popup, schema, _schema]);
8848
+ const isScrollFullScreen = React.useMemo(() => {
8849
+ var _a, _b;
8850
+ 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;
8851
+ }, [getPopupById]);
8679
8852
  React.useEffect(() => {
8680
8853
  if (isOpen) {
8681
8854
  setIsShow(true);
@@ -8742,22 +8915,32 @@
8742
8915
  touchMoveRef.current = false;
8743
8916
  };
8744
8917
  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 },
8745
- 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 && {
8746
- transform: `translateY(${modalTrans}px)`
8747
- })), onClick: (e) => {
8748
- e.stopPropagation();
8749
- e.preventDefault();
8750
- } }, (isScrollFullScreen && {
8751
- onTouchMove: handleTouchMove,
8752
- onTouchStart: handleTouchStart,
8753
- onTouchEnd: handleTouchEnd
8754
- })),
8755
- React.createElement("div", { onClick: onClose, className: 'modal-icon-wrapper' },
8756
- 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' })),
8757
- React.createElement("div", { ref: ref, style: {
8758
- height: isScrollFullScreen ? fullHeight : MODAL_DEF_CON_H,
8759
- overflow: (isScrollFullScreen && modalTrans <= 0) || !isScrollFullScreen ? 'auto' : 'hidden'
8760
- } }, children))))), modalEleRef.current);
8918
+ React.createElement("div", { style: {
8919
+ position: 'relative',
8920
+ 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`,
8921
+ 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`,
8922
+ 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`,
8923
+ overflow: 'hidden',
8924
+ 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)`,
8925
+ height: '100%'
8926
+ } },
8927
+ 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 && {
8928
+ transform: `translateY(${modalTrans}px)`
8929
+ })), onClick: (e) => {
8930
+ e.stopPropagation();
8931
+ e.preventDefault();
8932
+ } }, (isScrollFullScreen && {
8933
+ onTouchMove: handleTouchMove,
8934
+ onTouchStart: handleTouchStart,
8935
+ onTouchEnd: handleTouchEnd
8936
+ })),
8937
+ React.createElement("div", { onClick: onClose, className: 'modal-icon-wrapper' },
8938
+ 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' })),
8939
+ React.createElement("div", { ref: ref, style: {
8940
+ height: (isScrollFullScreen ? fullHeight : MODAL_DEF_CON_H) -
8941
+ ((_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),
8942
+ overflow: (isScrollFullScreen && modalTrans <= 0) || !isScrollFullScreen ? 'auto' : 'hidden'
8943
+ } }, children)))))), modalEleRef.current);
8761
8944
  };
8762
8945
  var Modal$1 = React.memo(Modal);
8763
8946
 
@@ -8843,7 +9026,7 @@
8843
9026
  }, [src]);
8844
9027
  React.useEffect(() => {
8845
9028
  const onShow = () => {
8846
- if (src && !visible) {
9029
+ if (src && !visible && imgRef.current) {
8847
9030
  imgRef.current.src = '';
8848
9031
  imgRef.current.src = src;
8849
9032
  }
@@ -8923,14 +9106,15 @@
8923
9106
  var CommodityGroup$1 = React.memo(CommodityGroup);
8924
9107
 
8925
9108
  const CommodityDetail$1 = (_a) => {
8926
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
8927
- 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"]);
9109
+ 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;
9110
+ 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"]);
8928
9111
  const { sxpParameter, popupDetailData, isPreview, bffFbReport, popupCurTimeRef, checkCommodityIndexRef } = useSxpDataSource();
8929
9112
  const { jumpToWeb, productView } = useEventReport();
8930
9113
  const curTimeRef = React.useRef(null);
8931
9114
  const [showModal, setShowModal] = React.useState(false);
8932
9115
  const [show3DModal, setShow3DModal] = React.useState(false);
8933
9116
  const [checkCommodityIndex, setCheckCommodityIndex] = React.useState((_b = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.multiCheckIndex) !== null && _b !== void 0 ? _b : 0);
9117
+ const ref = React.useRef();
8934
9118
  const data = isPost ? rec : popupDetailData;
8935
9119
  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];
8936
9120
  let cta = isPost
@@ -8970,17 +9154,21 @@
8970
9154
  };
8971
9155
  }, []);
8972
9156
  const priceText = React.useMemo(() => {
8973
- var _a, _b, _c, _d, _e;
9157
+ var _a, _b, _c, _d, _e, _f, _g;
9158
+ 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);
8974
9159
  if ((product === null || product === void 0 ? void 0 : product.currency) && (product === null || product === void 0 ? void 0 : product.price)) {
8975
- 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', {
8976
- minimumFractionDigits: 0
8977
- })) !== null && _e !== void 0 ? _e : ''}`;
9160
+ 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
9161
+ ? (_g = (_f = product === null || product === void 0 ? void 0 : product.price) === null || _f === void 0 ? void 0 : _f.toLocaleString('zh', {
9162
+ minimumFractionDigits: 0
9163
+ })) !== null && _g !== void 0 ? _g : ''
9164
+ : product === null || product === void 0 ? void 0 : product.price}`;
8978
9165
  }
8979
9166
  else {
8980
9167
  return '$7,000';
8981
9168
  }
8982
- }, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency]);
8983
- const width = isPreview ? 375 : (_t = style === null || style === void 0 ? void 0 : style.width) !== null && _t !== void 0 ? _t : window.innerWidth;
9169
+ }, [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]);
9170
+ 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;
9171
+ const height = commodityImgRatio ? width * (commodityImgRatio.h / commodityImgRatio.w) : width;
8984
9172
  const renderContent = ({ isPost }) => {
8985
9173
  var _a, _b, _c, _d;
8986
9174
  return (React.createElement("div", null,
@@ -9020,6 +9208,10 @@
9020
9208
  popupCurTimeRef.current = new Date();
9021
9209
  setCheckCommodityIndex(index);
9022
9210
  checkCommodityIndexRef.current = index;
9211
+ if (ref === null || ref === void 0 ? void 0 : ref.current) {
9212
+ ref.current.swiper.slideTo(0);
9213
+ ref.current.swiper.autoplay.start();
9214
+ }
9023
9215
  }, []);
9024
9216
  const renderCommodityGroup = React.useCallback(() => {
9025
9217
  var _a, _b, _c;
@@ -9027,25 +9219,32 @@
9027
9219
  return;
9028
9220
  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 }));
9029
9221
  }, [checkCommodityIndex]);
9222
+ const getDotsAlign = React.useMemo(() => {
9223
+ const dotsAlignClass = {
9224
+ left: 'commondityDetail-swiper-clickable-left',
9225
+ center: 'commondityDetail-swiper-clickable-center',
9226
+ right: 'commondityDetail-swiper-clickable-right'
9227
+ };
9228
+ return dotsAlignClass === null || dotsAlignClass === void 0 ? void 0 : dotsAlignClass[swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign];
9229
+ }, [swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign]);
9230
+ 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);
9030
9231
  return (React.createElement(React.Fragment, null,
9031
9232
  React.createElement("div", Object.assign({ className: css.css(Object.assign({}, style)) }, props),
9032
- 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' } },
9033
- React.createElement(Swiper, { height: width, modules: [Pagination, Autoplay], pagination: {
9233
+ React.createElement("div", { style: { position: 'relative' } },
9234
+ 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: {
9034
9235
  clickable: true,
9035
9236
  bulletActiveClass: 'swipe-item-active-bullet',
9036
- clickableClass: (swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign) === 'left'
9037
- ? 'commondityDetail-swiper-clickable-left'
9038
- : 'commondityDetail-swiper-clickable-center'
9237
+ clickableClass: getDotsAlign
9039
9238
  }, loop: true, autoplay: {
9040
9239
  delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
9041
- } },
9042
- React.createElement(React.Fragment, null, (_v = product === null || product === void 0 ? void 0 : product.homePage) === null || _v === void 0 ? void 0 : _v.map((src) => {
9240
+ }, ref: ref },
9241
+ React.createElement(React.Fragment, null, (_3 = product === null || product === void 0 ? void 0 : product.homePage) === null || _3 === void 0 ? void 0 : _3.map((src) => {
9043
9242
  var _a;
9044
9243
  return (React.createElement(SwiperSlide, { key: src },
9045
9244
  React.createElement("div", { style: {
9046
9245
  overflow: 'hidden',
9047
9246
  width,
9048
- height: width
9247
+ height
9049
9248
  } },
9050
9249
  React.createElement(FormatImage$1, { style: {
9051
9250
  height: '100%',
@@ -9054,21 +9253,30 @@
9054
9253
  display: 'block',
9055
9254
  objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
9056
9255
  }, 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 }))));
9057
- }))))),
9058
- !((_w = product === null || product === void 0 ? void 0 : product.homePage) === null || _w === void 0 ? void 0 : _w.length) && (React.createElement("div", { className: css.css({
9059
- position: 'relative',
9060
- height: 0,
9061
- width: '100%',
9062
- paddingBottom: '100%',
9063
- overflow: 'hidden'
9064
- }) },
9065
- React.createElement("img", { className: css.css({
9066
- position: 'absolute',
9067
- left: 0,
9068
- top: 0,
9069
- objectFit: 'cover',
9070
- width: '100%'
9071
- }), src: (_x = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _x !== void 0 ? _x : bottom_image, alt: 'pdp image' }))),
9256
+ })))),
9257
+ !((_4 = product === null || product === void 0 ? void 0 : product.homePage) === null || _4 === void 0 ? void 0 : _4.length) && (React.createElement("div", { className: css.css({
9258
+ height,
9259
+ width
9260
+ }) },
9261
+ React.createElement("img", { className: css.css({
9262
+ objectFit: 'cover',
9263
+ width: '100%',
9264
+ height: '100%'
9265
+ }), src: (_5 = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _5 !== void 0 ? _5 : bottom_image, alt: 'pdp image' }))),
9266
+ (iframeUrl && iframeIcon) ||
9267
+ (!product && iframeIcon && (React.createElement("div", { style: {
9268
+ padding: '5px 10px',
9269
+ display: 'flex',
9270
+ alignItems: 'center',
9271
+ position: 'absolute',
9272
+ right: '10px',
9273
+ bottom: '10px',
9274
+ zIndex: 1,
9275
+ background: '#fff',
9276
+ borderRadius: '3px'
9277
+ }, onClick: () => setShow3DModal(true) },
9278
+ React.createElement("img", { src: iframeIcon, alt: '3d', width: '20px', height: '20px', style: { marginRight: '5px' } }),
9279
+ React.createElement("span", { style: { fontSize: '12px' } }, "Try in 3D"))))),
9072
9280
  renderCommodityGroup(),
9073
9281
  React.createElement("div", { className: 'pb-commondity-content' }, renderContent({ isPost }))),
9074
9282
  renderBtn(),
@@ -9076,10 +9284,11 @@
9076
9284
  React.createElement("div", { style: { paddingBottom: '80px' } }, renderContent({ isPost: false })),
9077
9285
  renderBtn()),
9078
9286
  React.createElement(Modal$1, { visible: show3DModal, padding: 0, isFullScreen: true, onClose: () => setShow3DModal(false) },
9079
- React.createElement("iframe", { src: 'https://rimowa.threedium.co.uk/product-experience/latest/?sku=92573974&lang=en', style: {
9287
+ React.createElement("iframe", { src: iframeUrl, style: {
9080
9288
  width: '100%',
9081
- height: 'calc(100% - 40px)',
9082
- marginTop: '40px'
9289
+ height: 'calc(100% - 50px)',
9290
+ marginTop: '40px',
9291
+ border: 'none'
9083
9292
  } }))));
9084
9293
  };
9085
9294
  var CommodityDetailComponent = React.memo(CommodityDetail$1);
@@ -9100,7 +9309,7 @@
9100
9309
  * @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLink\interactionRender.tsx
9101
9310
  *
9102
9311
  */
9103
- var interactionRender$c = [
9312
+ var interactionRender$d = [
9104
9313
  {
9105
9314
  title: '滑动事件',
9106
9315
  child: [
@@ -9117,7 +9326,7 @@
9117
9326
  * @Author: binruan@chatlabs.com
9118
9327
  * @Date: 2023-07-28 18:29:57
9119
9328
  * @LastEditors: binruan@chatlabs.com
9120
- * @LastEditTime: 2024-07-31 13:58:45
9329
+ * @LastEditTime: 2024-08-08 18:30:20
9121
9330
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetail\material.tsx
9122
9331
  *
9123
9332
  */
@@ -9127,8 +9336,8 @@
9127
9336
  category: 'popup',
9128
9337
  type: 'CommodityDetail',
9129
9338
  related: {
9130
- settingRender: settingRender$8,
9131
- interactionRender: interactionRender$c
9339
+ settingRender: settingRender$9,
9340
+ interactionRender: interactionRender$d
9132
9341
  },
9133
9342
  defaulSetting: {
9134
9343
  props: {
@@ -9170,6 +9379,10 @@
9170
9379
  fontWeight: 'bold',
9171
9380
  textAlign: 'center',
9172
9381
  color: 'rgba(255, 255, 255, 0.9)'
9382
+ },
9383
+ commodityImgRatio: {
9384
+ w: 1,
9385
+ h: 1
9173
9386
  }
9174
9387
  },
9175
9388
  style: {}
@@ -9179,7 +9392,7 @@
9179
9392
  sort: 1
9180
9393
  });
9181
9394
 
9182
- var interactionRender$b = [
9395
+ var interactionRender$c = [
9183
9396
  {
9184
9397
  title: '点击事件',
9185
9398
  child: [
@@ -9195,13 +9408,28 @@
9195
9408
  * @Author: binruan@chatlabs.com
9196
9409
  * @Date: 2023-10-27 14:06:35
9197
9410
  * @LastEditors: binruan@chatlabs.com
9198
- * @LastEditTime: 2024-08-06 14:23:11
9411
+ * @LastEditTime: 2024-08-20 14:01:21
9199
9412
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\Prompt\settingRender.tsx
9200
9413
  *
9201
9414
  */
9202
- var settingRender$7 = [
9415
+ var settingRender$8 = [
9416
+ {
9417
+ title: '弹窗背景',
9418
+ child: [
9419
+ {
9420
+ type: 'Number',
9421
+ label: '左右边距',
9422
+ name: ['props', 'popupBg', 'horizontalMargin']
9423
+ },
9424
+ {
9425
+ type: 'Number',
9426
+ label: '下边距',
9427
+ name: ['props', 'popupBg', 'bottomMargin']
9428
+ }
9429
+ ]
9430
+ },
9203
9431
  {
9204
- title: '',
9432
+ title: '内容',
9205
9433
  child: [
9206
9434
  {
9207
9435
  type: 'Media',
@@ -9379,9 +9607,9 @@
9379
9607
  category: 'popup',
9380
9608
  type: 'Prompt',
9381
9609
  related: {
9382
- settingRender: settingRender$7,
9610
+ settingRender: settingRender$8,
9383
9611
  bindableProps: [],
9384
- interactionRender: interactionRender$b
9612
+ interactionRender: interactionRender$c
9385
9613
  },
9386
9614
  defaulSetting: {
9387
9615
  props: {
@@ -9400,14 +9628,45 @@
9400
9628
  * @Author: binruan@chatlabs.com
9401
9629
  * @Date: 2024-03-26 16:50:25
9402
9630
  * @LastEditors: binruan@chatlabs.com
9403
- * @LastEditTime: 2024-08-06 14:06:03
9631
+ * @LastEditTime: 2024-08-20 15:50:06
9404
9632
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetailDiroNew\settingRender.tsx
9405
9633
  *
9406
9634
  */
9407
- var settingRender$6 = [
9635
+ var settingRender$7 = [
9636
+ {
9637
+ title: '弹窗背景',
9638
+ child: [
9639
+ {
9640
+ type: 'Number',
9641
+ label: '左右边距',
9642
+ name: ['props', 'popupBg', 'horizontalMargin']
9643
+ },
9644
+ {
9645
+ type: 'Number',
9646
+ label: '下边距',
9647
+ name: ['props', 'popupBg', 'bottomMargin']
9648
+ }
9649
+ ]
9650
+ },
9408
9651
  {
9409
9652
  title: '商品图片',
9410
9653
  child: [
9654
+ {
9655
+ type: 'Group',
9656
+ label: '宽高比',
9657
+ child: [
9658
+ {
9659
+ type: 'Number',
9660
+ name: ['props', 'commodityImgRatio', 'w'],
9661
+ addonAfter: 'w'
9662
+ },
9663
+ {
9664
+ type: 'Number',
9665
+ name: ['props', 'commodityImgRatio', 'h'],
9666
+ addonAfter: 'h'
9667
+ }
9668
+ ]
9669
+ },
9411
9670
  {
9412
9671
  type: 'Radius',
9413
9672
  label: '轮播指示器',
@@ -9419,6 +9678,10 @@
9419
9678
  {
9420
9679
  label: '居中',
9421
9680
  value: 'center'
9681
+ },
9682
+ {
9683
+ label: '居右',
9684
+ value: 'right'
9422
9685
  }
9423
9686
  ],
9424
9687
  name: ['props', 'swiper', 'dotsAlign']
@@ -9566,6 +9829,12 @@
9566
9829
  {
9567
9830
  label: '间距',
9568
9831
  type: 'TextSpace'
9832
+ },
9833
+ {
9834
+ label: '价格千分符展示',
9835
+ type: 'Switch',
9836
+ name: ['enableFormattedPrice'],
9837
+ initialValue: true
9569
9838
  }
9570
9839
  ]
9571
9840
  }
@@ -9658,12 +9927,23 @@
9658
9927
  name: ['props', 'buttonStyle']
9659
9928
  }
9660
9929
  ]
9930
+ },
9931
+ {
9932
+ title: 'Iframe商品弹窗',
9933
+ child: [
9934
+ {
9935
+ label: '弹窗按钮',
9936
+ type: 'Upload',
9937
+ name: ['props', 'iframeIcon'],
9938
+ text: '建议尺寸:106 * 41'
9939
+ }
9940
+ ]
9661
9941
  }
9662
9942
  ];
9663
9943
 
9664
9944
  const CommodityDetailDiroNew$1 = (_a) => {
9665
- 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;
9666
- 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"]);
9945
+ 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;
9946
+ 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"]);
9667
9947
  React.useState(true);
9668
9948
  const { sxpParameter, popupCurTimeRef, popupDetailData, isPreview, bffFbReport, checkCommodityIndexRef } = useSxpDataSource();
9669
9949
  const { jumpToWeb, productView } = useEventReport();
@@ -9672,7 +9952,9 @@
9672
9952
  React.useState(true);
9673
9953
  const [showModal, setShowModal] = React.useState(false);
9674
9954
  const curTimeRef = React.useRef(null);
9955
+ const [show3DModal, setShow3DModal] = React.useState(false);
9675
9956
  const [checkCommodityIndex, setCheckCommodityIndex] = React.useState((_b = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.multiCheckIndex) !== null && _b !== void 0 ? _b : 0);
9957
+ const ref = React.useRef();
9676
9958
  const data = isPost ? rec : popupDetailData;
9677
9959
  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];
9678
9960
  let cta = isPost
@@ -9712,17 +9994,21 @@
9712
9994
  };
9713
9995
  }, []);
9714
9996
  const priceText = React.useMemo(() => {
9715
- var _a, _b, _c, _d, _e;
9997
+ var _a, _b, _c, _d, _e, _f, _g;
9998
+ 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);
9716
9999
  if ((product === null || product === void 0 ? void 0 : product.currency) && (product === null || product === void 0 ? void 0 : product.price)) {
9717
- 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', {
9718
- minimumFractionDigits: 0
9719
- })) !== null && _e !== void 0 ? _e : ''}`;
10000
+ 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
10001
+ ? (_g = (_f = product === null || product === void 0 ? void 0 : product.price) === null || _f === void 0 ? void 0 : _f.toLocaleString('zh', {
10002
+ minimumFractionDigits: 0
10003
+ })) !== null && _g !== void 0 ? _g : ''
10004
+ : product === null || product === void 0 ? void 0 : product.price}`;
9720
10005
  }
9721
10006
  else {
9722
10007
  return '£102,300.00';
9723
10008
  }
9724
- }, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency]);
9725
- const width = isPreview ? 375 : (_t = style === null || style === void 0 ? void 0 : style.width) !== null && _t !== void 0 ? _t : window.innerWidth;
10009
+ }, [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]);
10010
+ 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;
10011
+ const height = commodityImgRatio ? width * (commodityImgRatio.h / commodityImgRatio.w) : width;
9726
10012
  // useEffect(() => {
9727
10013
  // console.log(scrollRef?.current?.scrollHeight, window.innerHeight);
9728
10014
  // if (scrollRef?.current && scrollRef?.current?.scrollHeight > window.innerHeight) {
@@ -9789,6 +10075,10 @@ Made in Italy` })));
9789
10075
  popupCurTimeRef.current = new Date();
9790
10076
  setCheckCommodityIndex(index);
9791
10077
  checkCommodityIndexRef.current = index;
10078
+ if (ref === null || ref === void 0 ? void 0 : ref.current) {
10079
+ ref.current.swiper.slideTo(0);
10080
+ ref.current.swiper.autoplay.start();
10081
+ }
9792
10082
  }, []);
9793
10083
  const renderCommodityGroup = React.useCallback(() => {
9794
10084
  var _a, _b, _c;
@@ -9796,52 +10086,69 @@ Made in Italy` })));
9796
10086
  return;
9797
10087
  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 }));
9798
10088
  }, [checkCommodityIndex]);
10089
+ const getDotsAlign = React.useMemo(() => {
10090
+ const dotsAlignClass = {
10091
+ left: 'commondityDetail-swiper-clickable-left',
10092
+ center: 'commondityDetail-swiper-clickable-center',
10093
+ right: 'commondityDetail-swiper-clickable-right'
10094
+ };
10095
+ return dotsAlignClass === null || dotsAlignClass === void 0 ? void 0 : dotsAlignClass[swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign];
10096
+ }, [swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign]);
10097
+ 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);
9799
10098
  return (React.createElement("div", { className: 'pb-commondityDiroNew' },
9800
10099
  React.createElement("div", Object.assign({ className: css.css(Object.assign(Object.assign({}, style), { transform: 'translate3d(0px, 0px, 0px)' })) }, props),
9801
- 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: {
9802
- clickable: true,
9803
- bulletActiveClass: 'commondityDiroNew-swipe-item-active-bullet',
9804
- clickableClass: (swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign) === 'left'
9805
- ? 'commondityDiroNew-swiper-clickable-left'
9806
- : 'commondityDiroNew-swiper-clickable-center'
9807
- }, loop: true, autoplay: {
9808
- delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
9809
- } }, (_v = product === null || product === void 0 ? void 0 : product.homePage) === null || _v === void 0 ? void 0 : _v.map((src) => {
9810
- var _a;
9811
- return (React.createElement(SwiperSlide, { key: src },
9812
- React.createElement("div", { style: {
9813
- overflow: 'hidden',
9814
- width,
9815
- height: width
9816
- } },
9817
- React.createElement(FormatImage$1, { style: {
9818
- height: '100%',
9819
- width: '100%',
9820
- objectFit: 'cover',
9821
- display: 'block',
9822
- objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
9823
- }, 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 }))));
9824
- }))),
9825
- !((_w = product === null || product === void 0 ? void 0 : product.homePage) === null || _w === void 0 ? void 0 : _w.length) && (React.createElement("div", { className: css.css({
9826
- position: 'relative',
9827
- height: 0,
9828
- width: '100%',
9829
- paddingBottom: '100%',
9830
- overflow: 'hidden'
9831
- }) },
9832
- React.createElement("img", { className: css.css({
9833
- position: 'absolute',
9834
- left: 0,
9835
- top: 0,
9836
- objectFit: 'cover',
9837
- width: '100%'
9838
- }), src: (_x = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _x !== void 0 ? _x : bottom_image, alt: 'pdp image' }))),
10100
+ React.createElement("div", { style: { position: 'relative' } },
10101
+ 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: {
10102
+ clickable: true,
10103
+ bulletActiveClass: 'commondityDiroNew-swipe-item-active-bullet',
10104
+ clickableClass: getDotsAlign
10105
+ }, loop: true, autoplay: {
10106
+ delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
10107
+ }, ref: ref }, (_3 = product === null || product === void 0 ? void 0 : product.homePage) === null || _3 === void 0 ? void 0 : _3.map((src) => {
10108
+ var _a;
10109
+ return (React.createElement(SwiperSlide, { key: src },
10110
+ React.createElement("div", { style: {
10111
+ overflow: 'hidden',
10112
+ width,
10113
+ height
10114
+ } },
10115
+ React.createElement(FormatImage$1, { style: {
10116
+ height: '100%',
10117
+ width: '100%',
10118
+ objectFit: 'cover',
10119
+ display: 'block',
10120
+ objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
10121
+ }, 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 }))));
10122
+ }))),
10123
+ !((_4 = product === null || product === void 0 ? void 0 : product.homePage) === null || _4 === void 0 ? void 0 : _4.length) && (React.createElement("div", { className: css.css({
10124
+ height,
10125
+ width
10126
+ }) },
10127
+ React.createElement("img", { className: css.css({
10128
+ objectFit: 'cover',
10129
+ width: '100%',
10130
+ height: '100%'
10131
+ }), src: (_5 = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _5 !== void 0 ? _5 : bottom_image, alt: 'pdp image' }))),
10132
+ (iframeUrl && iframeIcon) ||
10133
+ (!product && iframeIcon && (React.createElement("div", { style: {
10134
+ padding: '5px 10px',
10135
+ display: 'flex',
10136
+ alignItems: 'center',
10137
+ position: 'absolute',
10138
+ right: '10px',
10139
+ bottom: '10px',
10140
+ zIndex: 1,
10141
+ background: '#fff',
10142
+ borderRadius: '3px'
10143
+ }, onClick: () => setShow3DModal(true) },
10144
+ React.createElement("img", { src: iframeIcon, alt: '3d', width: '20px', height: '20px', style: { marginRight: '5px' } }),
10145
+ React.createElement("span", { style: { fontSize: '12px' } }, "Try in 3D"))))),
9839
10146
  renderCommodityGroup(),
9840
10147
  React.createElement("div", { className: 'pb-commondityDiroNew-content' },
9841
10148
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top' },
9842
10149
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top-left' },
9843
10150
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top-left-title', style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title), dangerouslySetInnerHTML: {
9844
- __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)
10151
+ __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)
9845
10152
  } }),
9846
10153
  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: {
9847
10154
  __html: setFontForText((product === null || product === void 0 ? void 0 : product.collection) || 'Black Macrocannage CalfskinLarge', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection)
@@ -9851,14 +10158,21 @@ Made in Italy` })));
9851
10158
  __html: setFontForText(priceText, commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price)
9852
10159
  } }),
9853
10160
  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: {
9854
- __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)
10161
+ __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)
9855
10162
  } }))),
9856
- (!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 },
10163
+ (!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 },
9857
10164
  React.createElement("span", { dangerouslySetInnerHTML: {
9858
- __html: setFontForText((_1 = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _1 !== void 0 ? _1 : 'Shop now', buttonStyle)
10165
+ __html: setFontForText((_9 = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _9 !== void 0 ? _9 : 'Shop now', buttonStyle)
9859
10166
  } }))),
9860
10167
  productInfoText({ isPost }))),
9861
- React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) }, productInfoText({ isPost: false }))));
10168
+ React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) }, productInfoText({ isPost: false })),
10169
+ React.createElement(Modal$1, { visible: show3DModal, padding: 0, isFullScreen: true, onClose: () => setShow3DModal(false) },
10170
+ React.createElement("iframe", { src: iframeUrl, style: {
10171
+ width: '100%',
10172
+ height: 'calc(100% - 50px)',
10173
+ marginTop: '40px',
10174
+ border: 'none'
10175
+ } }))));
9862
10176
  };
9863
10177
  var CommodityDetailDiroNewComponent = React.memo(CommodityDetailDiroNew$1);
9864
10178
 
@@ -9878,7 +10192,7 @@ Made in Italy` })));
9878
10192
  * @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLink\interactionRender.tsx
9879
10193
  *
9880
10194
  */
9881
- var interactionRender$a = [
10195
+ var interactionRender$b = [
9882
10196
  {
9883
10197
  title: '滑动事件',
9884
10198
  child: [
@@ -9905,8 +10219,8 @@ Made in Italy` })));
9905
10219
  category: 'popup',
9906
10220
  type: 'CommodityDetailDiroNew',
9907
10221
  related: {
9908
- settingRender: settingRender$6,
9909
- interactionRender: interactionRender$a
10222
+ settingRender: settingRender$7,
10223
+ interactionRender: interactionRender$b
9910
10224
  },
9911
10225
  defaulSetting: {
9912
10226
  props: {
@@ -9949,6 +10263,10 @@ Made in Italy` })));
9949
10263
  borderRadius: 25,
9950
10264
  marginTop: 16,
9951
10265
  marginBottom: 16
10266
+ },
10267
+ commodityImgRatio: {
10268
+ w: 1,
10269
+ h: 1
9952
10270
  }
9953
10271
  },
9954
10272
  style: {}
@@ -9966,7 +10284,22 @@ Made in Italy` })));
9966
10284
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityList\settingRender.tsx
9967
10285
  *
9968
10286
  */
9969
- var settingRender$5 = [
10287
+ var settingRender$6 = [
10288
+ {
10289
+ title: '弹窗背景',
10290
+ child: [
10291
+ {
10292
+ type: 'Number',
10293
+ label: '左右边距',
10294
+ name: ['props', 'popupBg', 'horizontalMargin']
10295
+ },
10296
+ {
10297
+ type: 'Number',
10298
+ label: '下边距',
10299
+ name: ['props', 'popupBg', 'bottomMargin']
10300
+ }
10301
+ ]
10302
+ },
9970
10303
  {
9971
10304
  title: '商品图片',
9972
10305
  child: [
@@ -10328,7 +10661,7 @@ Made in Italy` })));
10328
10661
  * @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLink\interactionRender.tsx
10329
10662
  *
10330
10663
  */
10331
- var interactionRender$9 = [
10664
+ var interactionRender$a = [
10332
10665
  {
10333
10666
  title: '点击事件',
10334
10667
  child: [
@@ -10354,8 +10687,8 @@ Made in Italy` })));
10354
10687
  category: 'popup',
10355
10688
  type: 'CommodityList',
10356
10689
  related: {
10357
- settingRender: settingRender$5,
10358
- interactionRender: interactionRender$9
10690
+ settingRender: settingRender$6,
10691
+ interactionRender: interactionRender$a
10359
10692
  },
10360
10693
  defaulSetting: {
10361
10694
  props: {
@@ -10396,6 +10729,59 @@ Made in Italy` })));
10396
10729
  sort: 1
10397
10730
  });
10398
10731
 
10732
+ /*
10733
+ * @Author: binruan@chatlabs.com
10734
+ * @Date: 2023-10-27 14:06:35
10735
+ * @LastEditors: binruan@chatlabs.com
10736
+ * @LastEditTime: 2024-08-08 17:32:11
10737
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\Iframe\settingRender.tsx
10738
+ *
10739
+ */
10740
+ var settingRender$5 = [
10741
+ {
10742
+ title: '背景样式',
10743
+ child: [
10744
+ {
10745
+ type: 'Color',
10746
+ label: '背景色',
10747
+ name: ['style', 'backgroundColor']
10748
+ }
10749
+ ]
10750
+ }
10751
+ ];
10752
+
10753
+ const Iframe$1 = (_a) => {
10754
+ var _b, _c;
10755
+ 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"]);
10756
+ const { popupDetailData } = useSxpDataSource();
10757
+ 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;
10758
+ return (React.createElement("div", Object.assign({ className: `${css.css(Object.assign({}, style))}` }, props), iframeUrl && (React.createElement("iframe", { src: iframeUrl, style: {
10759
+ width: '100%',
10760
+ height: 'calc(100% - 50px)',
10761
+ marginTop: '40px',
10762
+ border: 'none'
10763
+ } }))));
10764
+ };
10765
+ var IframeComponent = React.memo(Iframe$1);
10766
+
10767
+ const Iframe = createMaterial(IframeComponent, {
10768
+ displayName: 'Iframe弹窗',
10769
+ icon: '',
10770
+ category: 'popup',
10771
+ type: 'Iframe',
10772
+ related: {
10773
+ settingRender: settingRender$5,
10774
+ bindableProps: []
10775
+ },
10776
+ defaulSetting: {
10777
+ props: {},
10778
+ style: {}
10779
+ },
10780
+ w: 100,
10781
+ h: 40,
10782
+ sort: 3
10783
+ });
10784
+
10399
10785
  /*
10400
10786
  * @Author: binruan@chatlabs.com
10401
10787
  * @Date: 2024-03-26 16:50:25
@@ -10655,7 +11041,7 @@ Made in Italy` })));
10655
11041
  }
10656
11042
  ];
10657
11043
 
10658
- var interactionRender$8 = [
11044
+ var interactionRender$9 = [
10659
11045
  {
10660
11046
  title: '点击事件',
10661
11047
  child: [
@@ -10668,7 +11054,7 @@ Made in Italy` })));
10668
11054
  ];
10669
11055
 
10670
11056
  const EventProvider = (_a) => {
10671
- var { rec, children, className, onClick, style, isExternalLink = false, index } = _a; __rest(_a, ["rec", "children", "className", "onClick", "style", "isExternalLink", "index"]);
11057
+ var { rec, children, className, onClick, style, isExternalLink = false, index, jumpLink } = _a; __rest(_a, ["rec", "children", "className", "onClick", "style", "isExternalLink", "index", "jumpLink"]);
10672
11058
  const ref = React.useRef(null);
10673
11059
  const { popup } = useEditor();
10674
11060
  const { setPopupDetailData, ctaEvent } = useSxpDataSource();
@@ -10682,11 +11068,11 @@ Made in Italy` })));
10682
11068
  }, rec, item, index);
10683
11069
  setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, rec), { index }));
10684
11070
  if (isExternalLink) {
10685
- 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) {
11071
+ 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)) {
10686
11072
  const cta = (_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.bindCta;
10687
11073
  const product = (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.bindProduct;
10688
11074
  jumpToWeb(rec, product, cta, index);
10689
- 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);
11075
+ 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) || '');
10690
11076
  }
10691
11077
  }
10692
11078
  else {
@@ -10738,7 +11124,7 @@ Made in Italy` })));
10738
11124
  category: 'template',
10739
11125
  type: 'Commodity',
10740
11126
  related: {
10741
- interactionRender: interactionRender$8,
11127
+ interactionRender: interactionRender$9,
10742
11128
  bindableProps: [],
10743
11129
  settingRender: settingRender$4
10744
11130
  },
@@ -10780,7 +11166,7 @@ Made in Italy` })));
10780
11166
  sort: 1
10781
11167
  });
10782
11168
 
10783
- var interactionRender$7 = [
11169
+ var interactionRender$8 = [
10784
11170
  {
10785
11171
  title: '点击事件',
10786
11172
  child: [
@@ -10820,7 +11206,7 @@ Made in Italy` })));
10820
11206
  category: 'template',
10821
11207
  type: 'Appoint',
10822
11208
  related: {
10823
- interactionRender: interactionRender$7,
11209
+ interactionRender: interactionRender$8,
10824
11210
  settingRender: settingRender$4 === null || settingRender$4 === void 0 ? void 0 : settingRender$4.filter((i) => i.type !== 'commodityTitle'),
10825
11211
  bindableProps: []
10826
11212
  },
@@ -10975,21 +11361,15 @@ Made in Italy` })));
10975
11361
  var styles$7 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__nkBlU","one-line-ellipsis":"index-module_one-line-ellipsis__buFw1"};
10976
11362
 
10977
11363
  const Link$1 = (_a) => {
10978
- var _b, _c, _d, _e, _f, _g, _h, _j;
11364
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k;
10979
11365
  var { content, style, bgImg, recData, bottom_image, ctaTempStyles, index, customTitle } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "index", "customTitle"]);
10980
11366
  const { sxpParameter, bffEventReport } = useSxpDataSource();
10981
- const { jumpToWeb } = useEventReport();
11367
+ useEventReport();
10982
11368
  const cta = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindCta;
10983
- const product = (_c = recData === null || recData === void 0 ? void 0 : recData.video) === null || _c === void 0 ? void 0 : _c.bindProduct;
10984
- const handleTo = () => {
10985
- if (cta === null || cta === void 0 ? void 0 : cta.link) {
10986
- jumpToWeb(recData, product, cta, index);
10987
- window.location.href = window.getJointUtmLink(cta.link);
10988
- }
10989
- };
11369
+ (_c = recData === null || recData === void 0 ? void 0 : recData.video) === null || _c === void 0 ? void 0 : _c.bindProduct;
10990
11370
  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;
10991
- 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 }),
10992
- 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 }),
11371
+ 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 : '' }),
11372
+ 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 }),
10993
11373
  React.createElement("div", { className: css.css({
10994
11374
  display: 'flex',
10995
11375
  alignItems: 'center',
@@ -10998,14 +11378,34 @@ Made in Italy` })));
10998
11378
  }) },
10999
11379
  React.createElement("div", null,
11000
11380
  React.createElement("div", { className: styles$7['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle, dangerouslySetInnerHTML: {
11001
- __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)
11381
+ __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)
11002
11382
  } }),
11003
- (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: {
11383
+ (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: {
11004
11384
  __html: setFontForText(customTitle === null || customTitle === void 0 ? void 0 : customTitle.text, customTitle === null || customTitle === void 0 ? void 0 : customTitle.style)
11005
11385
  } }))))));
11006
11386
  };
11007
11387
  var LinkComponent = React.memo(Link$1);
11008
11388
 
11389
+ /*
11390
+ * @Author: binruan@chatlabs.com
11391
+ * @Date: 2024-08-09 16:59:38
11392
+ * @LastEditors: binruan@chatlabs.com
11393
+ * @LastEditTime: 2024-08-09 16:59:44
11394
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\template\Link\interactionRender.tsx
11395
+ *
11396
+ */
11397
+ var interactionRender$7 = [
11398
+ {
11399
+ title: '点击事件',
11400
+ child: [
11401
+ {
11402
+ type: 'link',
11403
+ name: 'onClick'
11404
+ }
11405
+ ]
11406
+ }
11407
+ ];
11408
+
11009
11409
  var _a;
11010
11410
  const Link = createMaterial(LinkComponent, {
11011
11411
  displayName: '跳转指引',
@@ -11014,7 +11414,8 @@ Made in Italy` })));
11014
11414
  type: 'Link',
11015
11415
  related: {
11016
11416
  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),
11017
- bindableProps: []
11417
+ bindableProps: [],
11418
+ interactionRender: interactionRender$7
11018
11419
  },
11019
11420
  defaulSetting: {
11020
11421
  props: {
@@ -13242,7 +13643,8 @@ Made in Italy` })));
13242
13643
  function WaterfallList$1(_a) {
13243
13644
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
13244
13645
  var { reportTagsView, showBanner } = _a, props = __rest(_a, ["reportTagsView", "showBanner"]);
13245
- const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag } = useSxpDataSource();
13646
+ const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag, cacheActiveIndex } = useSxpDataSource();
13647
+ const { jumpToWeb } = useEventReport();
13246
13648
  /** 滚动的父元素 */
13247
13649
  const scrollParent = React.useRef(null);
13248
13650
  /** 向上滚动的距离 */
@@ -13358,16 +13760,10 @@ Made in Italy` })));
13358
13760
  }, [unitWidth, rowsNum, list]); /* 增加getStyleList依赖项会导致在admin预览编辑时无限刷新 */
13359
13761
  /** 初始化请求数据 */
13360
13762
  React.useEffect(() => {
13361
- var _a, _b;
13763
+ var _a, _b, _c, _d, _e, _f;
13362
13764
  setIsLoadingData(true);
13363
13765
  waterFallData &&
13364
- (getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({
13365
- hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag,
13366
- 'itemFilter.itemId': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId,
13367
- 'itemFilter.itemType': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemType,
13368
- defaultSize: hashTagSize,
13369
- maxSize: hashTagSize
13370
- }).then((res) => {
13766
+ (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) => {
13371
13767
  var _a, _b;
13372
13768
  setData(res);
13373
13769
  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 : []);
@@ -13376,7 +13772,7 @@ Made in Italy` })));
13376
13772
  if (isOpenHashTag) {
13377
13773
  const res = previewData;
13378
13774
  setData(res);
13379
- 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 : []);
13775
+ 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 : []);
13380
13776
  setIsLoadingData(false);
13381
13777
  }
13382
13778
  }, [waterFallData, getRecommendVideos, hashTagSize, isOpenHashTag]);
@@ -13402,13 +13798,10 @@ Made in Italy` })));
13402
13798
  };
13403
13799
  }, [onResize]);
13404
13800
  React.useCallback(() => {
13801
+ var _a, _b, _c, _d;
13405
13802
  setIsLoadingData(true);
13406
13803
  waterFallData &&
13407
- (getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({
13408
- hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag,
13409
- 'itemFilter.itemId': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId,
13410
- 'itemFilter.itemType': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemType
13411
- }).then((res) => {
13804
+ (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) => {
13412
13805
  var _a, _b;
13413
13806
  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 : []));
13414
13807
  setIsLoadingData(false);
@@ -13435,10 +13828,12 @@ Made in Italy` })));
13435
13828
  };
13436
13829
  }, [onScroll, scrollParent]);
13437
13830
  const handleClickLink = () => {
13438
- var _a, _b;
13831
+ var _a, _b, _c, _d, _e;
13439
13832
  if ((_a = data === null || data === void 0 ? void 0 : data.tag) === null || _a === void 0 ? void 0 : _a.link) {
13440
13833
  reportTagsView();
13441
- window.location.href = window.getJointUtmLink((_b = data === null || data === void 0 ? void 0 : data.tag) === null || _b === void 0 ? void 0 : _b.link);
13834
+ const rec = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec;
13835
+ 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);
13836
+ window.location.href = window.getJointUtmLink((_e = data === null || data === void 0 ? void 0 : data.tag) === null || _e === void 0 ? void 0 : _e.link);
13442
13837
  }
13443
13838
  };
13444
13839
  return (React.createElement(React.Fragment, null, isLoadingData ? (React.createElement("div", { style: { height: '100%', width: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' } },
@@ -13481,7 +13876,7 @@ Made in Italy` })));
13481
13876
 
13482
13877
  const WaterfallFlowItem = (props) => {
13483
13878
  const { rec, index, list, reportTagsView, textStyles, space } = props;
13484
- const { swiperRef, setRtcList, setOpenHashtag, bffEventReport, sxpParameter } = useSxpDataSource();
13879
+ const { swiperRef, setRtcList, setOpenHashtag, sxpParameter } = useSxpDataSource();
13485
13880
  const [showVideo, setShowVideo] = React.useState(false);
13486
13881
  const imgDom = React.useRef(null);
13487
13882
  const ref = React.useRef(null);
@@ -13609,38 +14004,30 @@ Made in Italy` })));
13609
14004
  function WaterfallList(_a) {
13610
14005
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
13611
14006
  var { reportTagsView, showBanner } = _a, props = __rest(_a, ["reportTagsView", "showBanner"]);
13612
- const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag } = useSxpDataSource();
14007
+ const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag, cacheActiveIndex } = useSxpDataSource();
14008
+ const { jumpToWeb } = useEventReport();
13613
14009
  const [list, setList] = React.useState();
13614
14010
  const [data, setData] = React.useState();
13615
14011
  const [isLoadingData, setIsLoadingData] = React.useState(false);
13616
14012
  const containerRef = React.useRef(null);
13617
14013
  const [isLoadMore, setIsLoadMore] = React.useState(false);
13618
14014
  React.useCallback(() => {
14015
+ var _a, _b, _c, _d;
13619
14016
  if (isLoadMore)
13620
14017
  return;
13621
14018
  setIsLoadMore(true);
13622
14019
  waterFallData &&
13623
- (getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({
13624
- hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag,
13625
- 'itemFilter.itemId': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId,
13626
- 'itemFilter.itemType': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemType
13627
- }).then((res) => {
14020
+ (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) => {
13628
14021
  var _a;
13629
14022
  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 : []));
13630
14023
  setIsLoadMore(false);
13631
14024
  }));
13632
14025
  }, [waterFallData, getRecommendVideos, list, isLoadMore]);
13633
14026
  React.useEffect(() => {
13634
- var _a, _b;
14027
+ var _a, _b, _c, _d, _e, _f;
13635
14028
  setIsLoadingData(true);
13636
14029
  waterFallData &&
13637
- (getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({
13638
- hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag,
13639
- 'itemFilter.itemId': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId,
13640
- 'itemFilter.itemType': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemType,
13641
- defaultSize: hashTagSize,
13642
- maxSize: hashTagSize
13643
- }).then((res) => {
14030
+ (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) => {
13644
14031
  var _a, _b;
13645
14032
  setData(res);
13646
14033
  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 : []);
@@ -13649,7 +14036,7 @@ Made in Italy` })));
13649
14036
  if (isOpenHashTag) {
13650
14037
  const res = previewData;
13651
14038
  setData(res);
13652
- 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 : []);
14039
+ 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 : []);
13653
14040
  setIsLoadingData(false);
13654
14041
  }
13655
14042
  }, [waterFallData, getRecommendVideos, hashTagSize, isOpenHashTag]);
@@ -13670,10 +14057,12 @@ Made in Italy` })));
13670
14057
  // };
13671
14058
  // }, [isLoadingData, containerRef, loadMoreData]);
13672
14059
  const handleClickLink = () => {
13673
- var _a, _b;
14060
+ var _a, _b, _c, _d, _e;
13674
14061
  if ((_a = data === null || data === void 0 ? void 0 : data.tag) === null || _a === void 0 ? void 0 : _a.link) {
13675
14062
  reportTagsView();
13676
- window.location.href = window.getJointUtmLink((_b = data === null || data === void 0 ? void 0 : data.tag) === null || _b === void 0 ? void 0 : _b.link);
14063
+ const rec = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec;
14064
+ 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);
14065
+ window.location.href = window.getJointUtmLink((_e = data === null || data === void 0 ? void 0 : data.tag) === null || _e === void 0 ? void 0 : _e.link);
13677
14066
  }
13678
14067
  };
13679
14068
  return (React.createElement(React.Fragment, null, isLoadingData ? (React.createElement("div", { style: { height: '100%', width: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' } },
@@ -14740,6 +15129,7 @@ Made in Italy` })));
14740
15129
  CommodityList: CommodityList,
14741
15130
  Consent: Consent,
14742
15131
  HashTag: HashTag,
15132
+ Iframe: Iframe,
14743
15133
  Link: Link,
14744
15134
  MultiCommodity: MultiCommodity,
14745
15135
  MultiCommodityDiro: MultiCommodityDiro,
@@ -15198,14 +15588,6 @@ Made in Italy` })));
15198
15588
  };
15199
15589
  var VideoWidget$3 = React.memo(VideoWidget$2);
15200
15590
 
15201
- /*
15202
- * @Author: binruan@chatlabs.com
15203
- * @Date: 2023-12-27 19:02:59
15204
- * @LastEditors: binruan@chatlabs.com
15205
- * @LastEditTime: 2024-01-24 10:30:13
15206
- * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\ToggleButton\index.tsx
15207
- *
15208
- */
15209
15591
  const ToggleButton = ({ defaultValue, activeIcon, unactiveIcon, onChange, style }) => {
15210
15592
  const [isTrue, setIsTure] = React.useState(defaultValue);
15211
15593
  const handleClick = (e) => {
@@ -15214,6 +15596,9 @@ Made in Italy` })));
15214
15596
  setIsTure(result);
15215
15597
  onChange === null || onChange === void 0 ? void 0 : onChange(result);
15216
15598
  };
15599
+ React.useEffect(() => {
15600
+ setIsTure(defaultValue);
15601
+ }, [defaultValue]);
15217
15602
  return (React.createElement("button", { style: style, "aria-label": 'toggle button', className: 'pb-toggle-button', onClick: handleClick },
15218
15603
  React.createElement("img", { className: 'pb-toggle-button-icon', alt: 'toggle image', src: isTrue ? activeIcon : unactiveIcon })));
15219
15604
  };
@@ -15592,12 +15977,14 @@ Made in Italy` })));
15592
15977
  * @Author: binruan@chatlabs.com
15593
15978
  * @Date: 2024-01-15 19:03:09
15594
15979
  * @LastEditors: binruan@chatlabs.com
15595
- * @LastEditTime: 2024-08-02 18:34:27
15980
+ * @LastEditTime: 2024-08-16 11:47:58
15596
15981
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
15597
15982
  *
15598
15983
  */
15599
15984
  const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.innerHeight, containerWidth = window.innerWidth, tempMap, resolver, data = [], ctaType, tipText, nudge, _schema, hashTagStyle, tagList = [], licenseUrl }) => {
15600
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
15985
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
15986
+ const mutedIcon = useIconLink('/pb_static/5beaaa5ce7f3477b99db3838619cc471.png');
15987
+ const unmutedIcon = useIconLink('/pb_static/fea8668a8a894e4aa3a86bcc775e895e.png');
15601
15988
  const { schema } = useEditor();
15602
15989
  const [activeIndex, setActiveIndex] = React.useState(0);
15603
15990
  const viewImageStartTime = React.useRef(0);
@@ -15608,11 +15995,10 @@ Made in Italy` })));
15608
15995
  const [isReload, setIsReload] = React.useState(new Date().getTime());
15609
15996
  const skipLinkRef = React.useRef(false);
15610
15997
  const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport, curTime, h5EnterLink, isShowConsent, selectTag, isPreview } = useSxpDataSource();
15611
- const { backMainFeed } = useEventReport();
15612
- const { productView } = useEventReport();
15998
+ const { backMainFeed, productView, jumpToWeb } = useEventReport();
15613
15999
  const isShowFingerTip = React.useMemo(() => {
15614
- return data.length > 0 && !loading && getFeUserId();
15615
- }, [data, loading]);
16000
+ return data.length > 0 && !loading && (getFeUserId() || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enableSwiperTip));
16001
+ }, [data, loading, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enableSwiperTip]);
15616
16002
  React.useEffect(() => {
15617
16003
  refreshFeSessionId();
15618
16004
  }, []);
@@ -15640,14 +16026,15 @@ Made in Italy` })));
15640
16026
  var _a;
15641
16027
  const index = (data === null || data === void 0 ? void 0 : data.findIndex((item) => {
15642
16028
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
15643
- if (ctaType === '多商品CTA') {
16029
+ const ctaType0 = ctaType === null || ctaType === void 0 ? void 0 : ctaType[0];
16030
+ if (ctaType0 === '多商品CTA') {
15644
16031
  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;
15645
16032
  }
15646
- else if (ctaType === '商品CTA') {
16033
+ else if (ctaType0 === '商品CTA') {
15647
16034
  return (_d = item === null || item === void 0 ? void 0 : item.video) === null || _d === void 0 ? void 0 : _d.bindProduct;
15648
16035
  }
15649
16036
  else {
15650
- 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));
16037
+ 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));
15651
16038
  }
15652
16039
  })) || 0;
15653
16040
  (_a = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper.slideTo(index);
@@ -15751,13 +16138,39 @@ Made in Italy` })));
15751
16138
  const height = React.useMemo(() => {
15752
16139
  return containerHeight - minusHeight - tagHeight;
15753
16140
  }, [globalConfig, containerHeight, tagHeight]);
16141
+ const visList = React.useMemo(() => {
16142
+ var _a;
16143
+ const list = activeIndex === 0 && !waterFallData
16144
+ ? [(_a = data === null || data === void 0 ? void 0 : data[0]) !== null && _a !== void 0 ? _a : null]
16145
+ : data === null || data === void 0 ? void 0 : data.map((item, index) => {
16146
+ if (activeIndex === index || index - 1 === activeIndex || index + 1 === activeIndex) {
16147
+ return item;
16148
+ }
16149
+ else {
16150
+ return null;
16151
+ }
16152
+ });
16153
+ return !waterFallData ? list.concat([{ loading: true }]) : list;
16154
+ }, [data, activeIndex, waterFallData]);
15754
16155
  const renderLogo = React.useMemo(() => {
16156
+ var _a, _b, _c, _d;
15755
16157
  if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
15756
- return (React.createElement("div", { className: 'clc-sxp-logo-banner', style: { backgroundColor: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.color } },
16158
+ 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;
16159
+ 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';
16160
+ const rec = visList[activeIndex];
16161
+ return (React.createElement("div", Object.assign({ className: 'clc-sxp-logo-banner', style: { backgroundColor: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.color } }, (link && {
16162
+ onClick: () => {
16163
+ var _a, _b, _c, _d;
16164
+ if (isExternalLink) {
16165
+ 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));
16166
+ }
16167
+ new Function(link)();
16168
+ }
16169
+ })),
15757
16170
  React.createElement("img", { src: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl, alt: 'logo' })));
15758
16171
  }
15759
16172
  return null;
15760
- }, [globalConfig]);
16173
+ }, [globalConfig, activeIndex, visList]);
15761
16174
  const renderContent = React.useCallback((rec, index) => {
15762
16175
  var _a, _b, _c, _d;
15763
16176
  if ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.url) {
@@ -15833,9 +16246,9 @@ Made in Italy` })));
15833
16246
  isShowMore,
15834
16247
  lineGradStyle
15835
16248
  ]);
15836
- const renderLikeButton = React.useCallback((rec, index) => {
16249
+ const renderLikeButton = React.useCallback((rec, index, visible) => {
15837
16250
  var _a, _b, _c, _d;
15838
- if (!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLike))
16251
+ if (!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLike) || !visible)
15839
16252
  return;
15840
16253
  let top = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconY) !== null && _a !== void 0 ? _a : 400;
15841
16254
  if (waterFallData && top < 40) {
@@ -15843,6 +16256,7 @@ Made in Italy` })));
15843
16256
  }
15844
16257
  if (rec === null || rec === void 0 ? void 0 : rec.video) {
15845
16258
  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: {
16259
+ position: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconFixed) ? 'fixed' : 'absolute',
15846
16260
  [(_b = globalConfig.likeIconXPosit) !== null && _b !== void 0 ? _b : 'right']: (_c = globalConfig.likeIconX) !== null && _c !== void 0 ? _c : 0,
15847
16261
  [(_d = globalConfig.likeIconYPosit) !== null && _d !== void 0 ? _d : 'bottom']: top
15848
16262
  }, position: index }));
@@ -15893,7 +16307,6 @@ Made in Italy` })));
15893
16307
  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 : ''
15894
16308
  }
15895
16309
  });
15896
- setSlideSkipState();
15897
16310
  skipLinkRef.current = true;
15898
16311
  window.location.href = window.getJointUtmLink(link);
15899
16312
  }
@@ -15979,20 +16392,18 @@ Made in Italy` })));
15979
16392
  });
15980
16393
  }
15981
16394
  };
15982
- const visList = React.useMemo(() => {
15983
- var _a;
15984
- const list = activeIndex === 0 && !waterFallData
15985
- ? [(_a = data === null || data === void 0 ? void 0 : data[0]) !== null && _a !== void 0 ? _a : null]
15986
- : data === null || data === void 0 ? void 0 : data.map((item, index) => {
15987
- if (activeIndex === index || index - 1 === activeIndex || index + 1 === activeIndex) {
15988
- return item;
15989
- }
15990
- else {
15991
- return null;
15992
- }
15993
- });
15994
- return !waterFallData ? list.concat([{ loading: true }]) : list;
15995
- }, [data, activeIndex, waterFallData]);
16395
+ const renderToggleButton = React.useCallback((visible) => {
16396
+ var _a, _b, _c, _d, _e, _f;
16397
+ if (!visible)
16398
+ return;
16399
+ 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: {
16400
+ position: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed) ? 'fixed' : 'absolute',
16401
+ 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',
16402
+ zIndex: 999,
16403
+ [(_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,
16404
+ [(_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
16405
+ }, 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 })));
16406
+ }, [globalConfig, visList, activeIndex, isMuted]);
15996
16407
  const renderView = React.useMemo(() => {
15997
16408
  if (loading) {
15998
16409
  return (React.createElement("div", { style: { height, width: containerWidth, display: 'flex', justifyContent: 'center', alignItems: 'center' } },
@@ -16009,20 +16420,30 @@ Made in Italy` })));
16009
16420
  React.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } }))) : (React.createElement(React.Fragment, null,
16010
16421
  renderContent(rec, index),
16011
16422
  renderBottom(rec, index),
16012
- renderLikeButton(rec, index)))))));
16423
+ renderLikeButton(rec, index, !(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconFixed)),
16424
+ renderToggleButton(!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed))))))));
16013
16425
  });
16014
- }, [containerWidth, data, height, loading, renderBottom, renderContent, visList, loadingImage, isReload]);
16015
- const mutedIcon = useIconLink('/pb_static/5beaaa5ce7f3477b99db3838619cc471.png');
16016
- const unmutedIcon = useIconLink('/pb_static/fea8668a8a894e4aa3a86bcc775e895e.png');
16426
+ }, [
16427
+ containerWidth,
16428
+ data,
16429
+ height,
16430
+ loading,
16431
+ renderBottom,
16432
+ renderContent,
16433
+ visList,
16434
+ loadingImage,
16435
+ isReload,
16436
+ renderToggleButton
16437
+ ]);
16017
16438
  return (React.createElement("div", { id: 'sxp-render', className: 'clc-sxp-container' },
16018
- waterFallData && (React.createElement(Navbar$1, { icon: img, styles: { background: 'rgba(0,0,0,.3)', color: '#fff' }, onClose: () => {
16439
+ 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: () => {
16019
16440
  setOpenHashtag === null || setOpenHashtag === void 0 ? void 0 : setOpenHashtag(true);
16020
16441
  } })),
16021
16442
  renderLogo,
16022
16443
  React.createElement(Tagbar$1, { tagList: tagList, setActiveIndex: setActiveIndex, style: {
16023
16444
  top: minusHeight
16024
16445
  } }),
16025
- 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,
16446
+ 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,
16026
16447
  React.createElement(Swiper, { style: {
16027
16448
  marginTop: tagHeight
16028
16449
  }, ref: swiperRef, onSlideChange: () => {
@@ -16047,15 +16468,10 @@ Made in Italy` })));
16047
16468
  }
16048
16469
  }
16049
16470
  }, direction: 'vertical', height: height },
16050
- ((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: {
16051
- position: 'fixed',
16052
- 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',
16053
- zIndex: 999,
16054
- [(_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,
16055
- [(_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
16056
- }, 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 })),
16471
+ renderLikeButton(visList[activeIndex], activeIndex, !!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconFixed)),
16472
+ renderToggleButton(!!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed)),
16057
16473
  renderView),
16058
- 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))));
16474
+ 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))));
16059
16475
  };
16060
16476
 
16061
16477
  const PictureGroup = ({ imgUrls, width, height, imgUrlsPostConfig, rec, index }) => {
@@ -16422,7 +16838,7 @@ Made in Italy` })));
16422
16838
  * @Author: binruan@chatlabs.com
16423
16839
  * @Date: 2023-10-31 10:56:01
16424
16840
  * @LastEditors: binruan@chatlabs.com
16425
- * @LastEditTime: 2024-08-01 15:23:51
16841
+ * @LastEditTime: 2024-08-06 17:15:56
16426
16842
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Popup\index.tsx
16427
16843
  *
16428
16844
  */
@@ -16481,14 +16897,14 @@ Made in Italy` })));
16481
16897
  const renderPopupDetail = React.useMemo(() => {
16482
16898
  var _a, _b, _c;
16483
16899
  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) => {
16484
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
16900
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
16485
16901
  if ((value === null || value === void 0 ? void 0 : value.id) === (popup === null || popup === void 0 ? void 0 : popup.id)) {
16486
16902
  const t = resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type];
16487
16903
  const Component = withBindDataSource(t);
16488
16904
  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';
16489
16905
  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';
16490
16906
  const defaulSetting = (_h = t === null || t === void 0 ? void 0 : t.extend) === null || _h === void 0 ? void 0 : _h.defaulSetting;
16491
- 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 })));
16907
+ 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 })));
16492
16908
  }
16493
16909
  else {
16494
16910
  return React.createElement(React.Fragment, null);