pb-sxp-ui 1.2.10 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/dist/index.cjs +700 -284
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.css +62 -2
  4. package/dist/index.js +700 -284
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.min.cjs +3 -3
  7. package/dist/index.min.cjs.map +1 -1
  8. package/dist/index.min.js +3 -3
  9. package/dist/index.min.js.map +1 -1
  10. package/dist/pb-ui.js +700 -284
  11. package/dist/pb-ui.js.map +1 -1
  12. package/dist/pb-ui.min.js +3 -3
  13. package/dist/pb-ui.min.js.map +1 -1
  14. package/es/core/components/SxpPageRender/FormatImage.js +1 -1
  15. package/es/core/components/SxpPageRender/Modal/index.js +34 -20
  16. package/es/core/components/SxpPageRender/Popup/index.js +2 -2
  17. package/es/core/components/SxpPageRender/ToggleButton/index.js +4 -1
  18. package/es/core/components/SxpPageRender/WaterFall/List.js +13 -18
  19. package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +12 -17
  20. package/es/core/components/SxpPageRender/index.d.ts +6 -1
  21. package/es/core/components/SxpPageRender/index.js +73 -42
  22. package/es/core/components/SxpPageRender/typing.d.ts +2 -0
  23. package/es/core/context/EditorContext.js +2 -0
  24. package/es/core/context/SxpDataSourceProvider.d.ts +3 -2
  25. package/es/core/context/SxpDataSourceProvider.js +53 -33
  26. package/es/core/hooks/useEventReport.d.ts +1 -1
  27. package/es/core/hooks/useEventReport.js +10 -9
  28. package/es/core/utils/tool.d.ts +5 -1
  29. package/es/core/utils/tool.js +69 -1
  30. package/es/materials/sxp/popup/AppointForm/settingRender.js +15 -0
  31. package/es/materials/sxp/popup/CommodityDetail/index.d.ts +13 -2
  32. package/es/materials/sxp/popup/CommodityDetail/index.js +60 -34
  33. package/es/materials/sxp/popup/CommodityDetail/material.js +4 -0
  34. package/es/materials/sxp/popup/CommodityDetail/settingRender.d.ts +28 -2
  35. package/es/materials/sxp/popup/CommodityDetail/settingRender.js +52 -0
  36. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +13 -2
  37. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +85 -51
  38. package/es/materials/sxp/popup/CommodityDetailDiroNew/material.js +4 -0
  39. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +28 -2
  40. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +52 -0
  41. package/es/materials/sxp/popup/CommodityList/settingRender.js +15 -0
  42. package/es/materials/sxp/popup/Iframe/index.d.ts +16 -0
  43. package/es/materials/sxp/popup/Iframe/index.js +18 -0
  44. package/es/materials/sxp/popup/Iframe/material.d.ts +2 -0
  45. package/es/materials/sxp/popup/Iframe/material.js +21 -0
  46. package/es/materials/sxp/popup/Iframe/settingRender.d.ts +9 -0
  47. package/es/materials/sxp/popup/Iframe/settingRender.js +12 -0
  48. package/es/materials/sxp/popup/Prompt/settingRender.js +16 -1
  49. package/es/materials/sxp/popup/index.d.ts +1 -0
  50. package/es/materials/sxp/popup/index.js +1 -0
  51. package/es/materials/sxp/template/Link/index.js +5 -11
  52. package/es/materials/sxp/template/Link/interactionRender.d.ts +8 -0
  53. package/es/materials/sxp/template/Link/interactionRender.js +11 -0
  54. package/es/materials/sxp/template/Link/material.js +3 -1
  55. package/es/materials/sxp/template/components/EventProvider.d.ts +3 -2
  56. package/es/materials/sxp/template/components/EventProvider.js +3 -3
  57. package/lib/core/components/SxpPageRender/FormatImage.js +1 -1
  58. package/lib/core/components/SxpPageRender/Modal/index.js +34 -20
  59. package/lib/core/components/SxpPageRender/Popup/index.js +2 -2
  60. package/lib/core/components/SxpPageRender/ToggleButton/index.js +3 -0
  61. package/lib/core/components/SxpPageRender/WaterFall/List.js +13 -18
  62. package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +12 -17
  63. package/lib/core/components/SxpPageRender/index.d.ts +6 -1
  64. package/lib/core/components/SxpPageRender/index.js +72 -41
  65. package/lib/core/components/SxpPageRender/typing.d.ts +2 -0
  66. package/lib/core/context/EditorContext.js +2 -0
  67. package/lib/core/context/SxpDataSourceProvider.d.ts +3 -2
  68. package/lib/core/context/SxpDataSourceProvider.js +53 -33
  69. package/lib/core/hooks/useEventReport.d.ts +1 -1
  70. package/lib/core/hooks/useEventReport.js +10 -9
  71. package/lib/core/utils/tool.d.ts +5 -1
  72. package/lib/core/utils/tool.js +73 -1
  73. package/lib/materials/sxp/popup/AppointForm/settingRender.js +15 -0
  74. package/lib/materials/sxp/popup/CommodityDetail/index.d.ts +13 -2
  75. package/lib/materials/sxp/popup/CommodityDetail/index.js +60 -34
  76. package/lib/materials/sxp/popup/CommodityDetail/material.js +4 -0
  77. package/lib/materials/sxp/popup/CommodityDetail/settingRender.d.ts +28 -2
  78. package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +52 -0
  79. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +13 -2
  80. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +85 -51
  81. package/lib/materials/sxp/popup/CommodityDetailDiroNew/material.js +4 -0
  82. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +28 -2
  83. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +52 -0
  84. package/lib/materials/sxp/popup/CommodityList/settingRender.js +15 -0
  85. package/lib/materials/sxp/popup/Iframe/index.d.ts +16 -0
  86. package/lib/materials/sxp/popup/Iframe/index.js +20 -0
  87. package/lib/materials/sxp/popup/Iframe/material.d.ts +2 -0
  88. package/lib/materials/sxp/popup/Iframe/material.js +25 -0
  89. package/lib/materials/sxp/popup/Iframe/settingRender.d.ts +9 -0
  90. package/lib/materials/sxp/popup/Iframe/settingRender.js +14 -0
  91. package/lib/materials/sxp/popup/Prompt/settingRender.js +16 -1
  92. package/lib/materials/sxp/popup/index.d.ts +1 -0
  93. package/lib/materials/sxp/popup/index.js +1 -0
  94. package/lib/materials/sxp/template/Link/index.js +5 -11
  95. package/lib/materials/sxp/template/Link/interactionRender.d.ts +8 -0
  96. package/lib/materials/sxp/template/Link/interactionRender.js +13 -0
  97. package/lib/materials/sxp/template/Link/material.js +3 -1
  98. package/lib/materials/sxp/template/components/EventProvider.d.ts +3 -2
  99. package/lib/materials/sxp/template/components/EventProvider.js +3 -3
  100. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -217,6 +217,87 @@ const setFontForText = (textContent, style) => {
217
217
  }
218
218
  return content;
219
219
  };
220
+ function getBrowserInfo() {
221
+ var _a, _b, _c, _d, _e, _f, _g;
222
+ let userAgent = self.navigator.userAgent;
223
+ if (!userAgent)
224
+ return 'Unknown';
225
+ if (/edge\/([\d\.]+)/i.exec(userAgent))
226
+ return `Edge ${(_a = /edge\/([\d\.]+)/i.exec(userAgent)) === null || _a === void 0 ? void 0 : _a[1]}`;
227
+ if (/edg\/([\d\.]+)/i.exec(userAgent))
228
+ return `Edge(Chromium) ${(_b = /edge\/([\d\.]+)/i.exec(userAgent)) === null || _b === void 0 ? void 0 : _b[1]}`;
229
+ if (/msie/i.test(userAgent))
230
+ return `Internet Explorer ${(_c = /msie ([\d\.]+)/i.exec(userAgent)) === null || _c === void 0 ? void 0 : _c[1]}`;
231
+ if (/Trident/i.test(userAgent))
232
+ return `Internet Explorer ${(_d = /rv:([\d\.]+)/i.exec(userAgent)) === null || _d === void 0 ? void 0 : _d[1]}`;
233
+ if (/chrome/i.test(userAgent))
234
+ return `Chrome ${(_e = /chrome\/([\d\.]+)/i.exec(userAgent)) === null || _e === void 0 ? void 0 : _e[1]}`;
235
+ if (/firefox/i.test(userAgent))
236
+ return `Firefox ${(_f = /firefox\/([\d\.]+)/i.exec(userAgent)) === null || _f === void 0 ? void 0 : _f[1]}`;
237
+ if (/safari/i.test(userAgent))
238
+ return `Safari ${(_g = /version\/([\d\.]+)/i.exec(userAgent)) === null || _g === void 0 ? void 0 : _g[1]}`;
239
+ return 'Unknown';
240
+ }
241
+ function getSystem() {
242
+ var _a, _b, _c;
243
+ let userAgent = self.navigator.userAgent;
244
+ if (!userAgent)
245
+ return 'Unknown';
246
+ if (/iphone/i.test(userAgent))
247
+ return `IOS ${(_a = userAgent.match(/OS\s(.*?)\slike/)) === null || _a === void 0 ? void 0 : _a[1]}`;
248
+ if (/android/i.test(userAgent))
249
+ return `Android ${(_b = userAgent.match(/Android\s(.*?)\;/)) === null || _b === void 0 ? void 0 : _b[1]}`;
250
+ if (/windows/i.test(userAgent))
251
+ return `Windows ${(_c = userAgent.match(/Windows\s(.*?)\;/)) === null || _c === void 0 ? void 0 : _c[1]}`;
252
+ if (/mac/i.test(userAgent))
253
+ return `Mac OS`;
254
+ return 'Unknown';
255
+ }
256
+ function getDevice$1() {
257
+ let userAgent = self.navigator.userAgent;
258
+ if (!userAgent)
259
+ return 'Unknown';
260
+ if (/iphone/i.test(userAgent))
261
+ return `iPhone`;
262
+ if (/android/i.test(userAgent)) {
263
+ // var index1 = userAgent.indexOf(';');
264
+ // var index2 = userAgent.indexOf(';', index1 + 1);
265
+ // var index3 = userAgent.indexOf(';', index2 + 1);
266
+ // var index4 = userAgent.indexOf(';', index3 + 1);
267
+ // if (index2 !== -1 && index3 !== -1) {
268
+ // var value1 = userAgent.substring(index3 + 1, index4);
269
+ // return `${value1}`;
270
+ // }
271
+ var index1 = userAgent.indexOf('(');
272
+ var index2 = userAgent.indexOf(')');
273
+ if (index1 !== -1 && index2 !== -1) {
274
+ var value = userAgent.substring(index1 + 1, index2);
275
+ return `${value}`;
276
+ }
277
+ }
278
+ if (/windows/i.test(userAgent))
279
+ return `Windows`;
280
+ if (/mac/i.test(userAgent))
281
+ return `Mac`;
282
+ return 'Unknown';
283
+ }
284
+ function getCookie(val) {
285
+ // const expirationDate = new Date();
286
+ // expirationDate.setDate(expirationDate.getDate() + 100);
287
+ // document.cookie = `_fbc=IwAR2F4-dbP0l7Mn1IawQQGCINEz7PYXQvwjNwB_qa2ofrHyiLjcbCRxTDGrc; expires=${expirationDate.toUTCString()}; path=/`;
288
+ const cookies = document.cookie;
289
+ // 将cookie字符串拆分成数组
290
+ const cookieArray = cookies.split(';');
291
+ let value = null;
292
+ // 遍历cookie数组,查找名为_fbc的cookie
293
+ cookieArray.forEach((cookie) => {
294
+ const [cookieName, cookieValue] = cookie.trim().split('=');
295
+ if (cookieName === val) {
296
+ value = cookieValue;
297
+ }
298
+ });
299
+ return value !== null && value !== void 0 ? value : '';
300
+ }
220
301
 
221
302
  function unzip(b64Data) {
222
303
  const strData = atob(b64Data);
@@ -532,7 +613,7 @@ var DataSourceType;
532
613
  DataSourceType[DataSourceType["BFF"] = 5] = "BFF";
533
614
  })(DataSourceType || (DataSourceType = {}));
534
615
  const DEFAULT_TAG = 'FOR U';
535
- 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 }) => {
616
+ 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 }) => {
536
617
  var _a, _b, _c;
537
618
  const [rtcList, setRtcList] = useState([]);
538
619
  const [tagList, setTagList] = useState([]);
@@ -615,16 +696,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
615
696
  }, [bffDataSource]);
616
697
  // 获取推荐视频数据
617
698
  const getRecommendVideos = useCallback((query) => __awaiter(void 0, void 0, void 0, function* () {
618
- var _d, _e, _f, _g, _h;
619
- query = {
620
- maxSize: (_d = query === null || query === void 0 ? void 0 : query.maxSize) !== null && _d !== void 0 ? _d : maxSize,
621
- defaultSize: (_e = query === null || query === void 0 ? void 0 : query.defaultSize) !== null && _e !== void 0 ? _e : defaultSize,
622
- 'itemFilter.itemId': query === null || query === void 0 ? void 0 : query['itemFilter.itemId'],
623
- 'itemFilter.itemType': query === null || query === void 0 ? void 0 : query['itemFilter.itemType'],
624
- hashTag: query === null || query === void 0 ? void 0 : query.hashTag,
625
- traceInfo: query === null || query === void 0 ? void 0 : query.traceInfo,
626
- themeTag: query === null || query === void 0 ? void 0 : query.themeTag
627
- };
699
+ var _d, _e, _f, _g, _h, _j, _k;
700
+ 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}]` }));
628
701
  if (utmVal) {
629
702
  const val = (_h = (_g = (_f = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _f === void 0 ? void 0 : _f.filter((val) => {
630
703
  var _a, _b;
@@ -633,6 +706,32 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
633
706
  })) === null || _g === void 0 ? void 0 : _g.join('&')) !== null && _h !== void 0 ? _h : '';
634
707
  query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(val) });
635
708
  }
709
+ if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) || isEditor) {
710
+ 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] }));
711
+ if (!(query === null || query === void 0 ? void 0 : query.channel))
712
+ return;
713
+ let list = [];
714
+ let result = null;
715
+ let pageNum = 1;
716
+ const recurveRecList = (query) => __awaiter(void 0, void 0, void 0, function* () {
717
+ var _l, _m, _o, _p;
718
+ query.pageNum = pageNum;
719
+ result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/list', { method: 'GET', query }));
720
+ if (!(result === null || result === void 0 ? void 0 : result.success)) {
721
+ return undefined;
722
+ }
723
+ 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];
724
+ 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 : []);
725
+ if ((rec === null || rec === void 0 ? void 0 : rec.product) || (rec === null || rec === void 0 ? void 0 : rec.video)) {
726
+ pageNum = pageNum + 1;
727
+ yield recurveRecList(query);
728
+ }
729
+ });
730
+ yield recurveRecList(query);
731
+ if (!(query === null || query === void 0 ? void 0 : query.hashTag) && result)
732
+ 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 });
733
+ return Object.assign(Object.assign({}, result.data), { recList: list });
734
+ }
636
735
  const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/list', { method: 'GET', query }));
637
736
  if (!(result === null || result === void 0 ? void 0 : result.success)) {
638
737
  return undefined;
@@ -640,23 +739,20 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
640
739
  if (!(query === null || query === void 0 ? void 0 : query.hashTag))
641
740
  setCurReqInfo({ rtc: result.data.rtc, requestId: result.data.requestId });
642
741
  return result === null || result === void 0 ? void 0 : result.data;
643
- }), [bffFetch, utmVal, maxSize, defaultSize]);
742
+ }), [bffFetch, utmVal, maxSize, defaultSize, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview, channelQueryList, isEditor]);
644
743
  const loadVideos = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
744
+ var _q, _r, _s, _t;
645
745
  if (rtcList.length <= 0) {
646
746
  return;
647
747
  }
648
- const data = yield getRecommendVideos({
649
- hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag,
650
- 'itemFilter.itemId': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId,
651
- 'itemFilter.itemType': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemType,
652
- themeTag: themeTag.current
653
- });
748
+ const lastItem = rtcList === null || rtcList === void 0 ? void 0 : rtcList[(rtcList === null || rtcList === void 0 ? void 0 : rtcList.length) - 1];
749
+ 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 }));
654
750
  setRtcList(rtcList.concat(getFilterRecList(data)));
655
751
  setCacheRtcList(cacheRtcList.concat(getFilterRecList(data)));
656
752
  }), [getRecommendVideos, rtcList, waterFallData, cacheRtcList]);
657
753
  const bffEventReport = useCallback(({ userInfo, eventInfo }) => {
658
754
  // 关闭 BFF 事件上报
659
- if (!enableReportEvent) {
755
+ if (!enableReportEvent || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview)) {
660
756
  return;
661
757
  }
662
758
  // 用户信息都是公共的
@@ -667,7 +763,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
667
763
  };
668
764
  }
669
765
  const sessionID = storeAndLoadFeSessionId();
670
- const ef = Object.assign({ sessionID, rtc: curReqInfo.rtc, requestId: curReqInfo.requestId }, eventInfo);
766
+ const ef = Object.assign(Object.assign({ sessionID, rtc: curReqInfo.rtc, requestId: curReqInfo.requestId }, eventInfo), { sxpDevice: getDevice$1(), sxpSystem: getSystem(), sxpBrowser: getBrowserInfo() });
671
767
  const realUserInfo = Object.entries(userInfo).map(([k, v]) => ({ name: k, value: v }));
672
768
  const realEventInfo = Object.entries(ef)
673
769
  .map(([k, v]) => v && { name: k, value: v })
@@ -681,11 +777,11 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
681
777
  body: { userInfo: realUserInfo, eventInfo: realEventInfo },
682
778
  type: 'beacon'
683
779
  });
684
- }, [bffFetch, curReqInfo, enableReportEvent]);
780
+ }, [bffFetch, curReqInfo, enableReportEvent, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview]);
685
781
  const bffFbReport = useCallback((_a) => {
686
- var _b;
782
+ var _b, _c;
687
783
  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;
688
- if (!enableReportEvent || !enabledMetaConversionApi) {
784
+ if (!enableReportEvent || !enabledMetaConversionApi || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview)) {
689
785
  return;
690
786
  }
691
787
  const fakeUserId = storeAndLoadFeUserId();
@@ -696,12 +792,15 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
696
792
  actionSource,
697
793
  eventSourceUrl,
698
794
  userData: {
699
- externalId: fakeUserId
795
+ externalId: fakeUserId,
796
+ fbc: `fb.2.${new Date().getTime()}.${getCookie('_fbc')}`,
797
+ fbp: `fb.2.${new Date().getTime()}.${getCookie('_fbp')}`,
798
+ client_user_agent: (_c = window === null || window === void 0 ? void 0 : window.navigator) === null || _c === void 0 ? void 0 : _c.userAgent
700
799
  }
701
800
  },
702
801
  type: 'beacon'
703
802
  });
704
- }, [bffFetch, enableReportEvent, enabledMetaConversionApi]);
803
+ }, [bffFetch, enableReportEvent, enabledMetaConversionApi, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview]);
705
804
  const bffMutateLike = useCallback((body) => __awaiter(void 0, void 0, void 0, function* () {
706
805
  const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/like', { method: 'POST', body }));
707
806
  return res === null || res === void 0 ? void 0 : res.success;
@@ -716,24 +815,24 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
716
815
  }), [bffFetch]);
717
816
  // 获取 Tag
718
817
  const bffGetTagList = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
719
- var _j, _k, _l, _m, _o;
818
+ var _u, _v, _w, _x, _y;
720
819
  if (!utmVal || !isShowTag)
721
820
  return;
722
821
  try {
723
- const val = (_l = (_k = (_j = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _j === void 0 ? void 0 : _j.filter((val) => {
822
+ const val = (_w = (_v = (_u = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _u === void 0 ? void 0 : _u.filter((val) => {
724
823
  var _a, _b;
725
824
  const key = val.split('=')[0];
726
825
  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);
727
- })) === null || _k === void 0 ? void 0 : _k.join('&')) !== null && _l !== void 0 ? _l : '';
826
+ })) === null || _v === void 0 ? void 0 : _v.join('&')) !== null && _w !== void 0 ? _w : '';
728
827
  const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/tag/list', { method: 'GET', query: { channel: decodeURIComponent(val) } }));
729
- setTagList((_o = (_m = result === null || result === void 0 ? void 0 : result.data) === null || _m === void 0 ? void 0 : _m.tags) !== null && _o !== void 0 ? _o : []);
828
+ 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 : []);
730
829
  }
731
830
  catch (e) {
732
831
  console.log('e', e);
733
832
  }
734
833
  }), [bffFetch, utmVal, isShowTag]);
735
834
  const ctaEvent = useCallback((eventInfo, rec, product, position) => {
736
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3;
835
+ 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;
737
836
  const cta = product === null || product === void 0 ? void 0 : product.bindCta;
738
837
  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);
739
838
  let fromKName = '';
@@ -746,8 +845,9 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
746
845
  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) {
747
846
  fromKName = 'imagePage';
748
847
  }
848
+ 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;
749
849
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
750
- eventInfo: Object.assign(Object.assign({}, eventInfo), { ctaId: (_h = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _h !== void 0 ? _h : '', ctaName: (_j = cta === null || cta === void 0 ? void 0 : cta.title) !== null && _j !== void 0 ? _j : '', contentTags: JSON.stringify(cta === null || cta === void 0 ? void 0 : cta.tags), position: position + '', contentId: (_l = (_k = rec === null || rec === void 0 ? void 0 : rec.video) === null || _k === void 0 ? void 0 : _k.itemId) !== null && _l !== void 0 ? _l : '', productId: isProd ? product === null || product === void 0 ? void 0 : product.itemId : '', traceInfo: (_2 = (_z = (_u = (_q = (_m = cta === null || cta === void 0 ? void 0 : cta.traceInfo) !== null && _m !== void 0 ? _m : (_p = (_o = rec === null || rec === void 0 ? void 0 : rec.video) === null || _o === void 0 ? void 0 : _o.bindCta) === null || _p === void 0 ? void 0 : _p.traceInfo) !== null && _q !== void 0 ? _q : (_t = (_s = (_r = rec === null || rec === void 0 ? void 0 : rec.video) === null || _r === void 0 ? void 0 : _r.bindProduct) === null || _s === void 0 ? void 0 : _s.bindCta) === null || _t === void 0 ? void 0 : _t.traceInfo) !== null && _u !== void 0 ? _u : (_y = (_x = (_w = (_v = rec === null || rec === void 0 ? void 0 : rec.video) === null || _v === void 0 ? void 0 : _v.bindProducts) === null || _w === void 0 ? void 0 : _w[0]) === null || _x === void 0 ? void 0 : _x.bindCta) === null || _y === void 0 ? void 0 : _y.traceInfo) !== null && _z !== void 0 ? _z : (_1 = (_0 = rec === null || rec === void 0 ? void 0 : rec.product) === null || _0 === void 0 ? void 0 : _0.bindCta) === null || _1 === void 0 ? void 0 : _1.traceInfo) !== null && _2 !== void 0 ? _2 : '', fromKName, fromKPage: (_3 = location === null || location === void 0 ? void 0 : location.href) !== null && _3 !== void 0 ? _3 : '' })
850
+ 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 : '' })
751
851
  });
752
852
  }, [bffEventReport, isFromHashtag]);
753
853
  const h5EnterLink = useCallback(() => {
@@ -802,7 +902,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
802
902
  });
803
903
  }, [isShowConsent]);
804
904
  useEffect(() => {
805
- if (!isInit.current)
905
+ if (!isInit.current && !isEditor)
806
906
  return;
807
907
  setLoading(true);
808
908
  bffGetTagList();
@@ -814,7 +914,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
814
914
  .finally(() => {
815
915
  setLoading(false);
816
916
  });
817
- }, [getRecommendVideos, bffGetTagList]);
917
+ }, [bffGetTagList, isEditor, getRecommendVideos]);
818
918
  const defaultLoadingImage = useIconLink('/pb_static/a65d23c5893c49d7aaaa81681d3179e2.gif', appDomain);
819
919
  return (React.createElement(SxpDataSourceContext.Provider, { value: {
820
920
  rtcList,
@@ -1017,6 +1117,7 @@ const EditorCore = forwardRef(({ children, resolver, isSsr, schema, enableDataSo
1017
1117
  });
1018
1118
  typeof window !== 'undefined' &&
1019
1119
  (window.getJointUtmLink = (url) => {
1120
+ setSlideSkipState();
1020
1121
  if ((url === null || url === void 0 ? void 0 : url.indexOf('?')) !== -1) {
1021
1122
  return url + (utmVal ? '&' + utmVal : '');
1022
1123
  }
@@ -1099,7 +1200,7 @@ var index$2 = /*#__PURE__*/Object.freeze({
1099
1200
  EditorCore: EditorCore
1100
1201
  });
1101
1202
 
1102
- var interactionRender$d = [
1203
+ var interactionRender$e = [
1103
1204
  {
1104
1205
  title: '点击事件',
1105
1206
  child: [
@@ -1115,11 +1216,26 @@ var interactionRender$d = [
1115
1216
  * @Author: binruan@chatlabs.com
1116
1217
  * @Date: 2023-07-28 18:29:57
1117
1218
  * @LastEditors: binruan@chatlabs.com
1118
- * @LastEditTime: 2024-08-06 14:13:47
1219
+ * @LastEditTime: 2024-08-06 15:35:25
1119
1220
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\AppointForm\settingRender.tsx
1120
1221
  *
1121
1222
  */
1122
- var settingRender$9 = [
1223
+ var settingRender$a = [
1224
+ {
1225
+ title: '弹窗背景',
1226
+ child: [
1227
+ {
1228
+ type: 'Number',
1229
+ label: '左右边距',
1230
+ name: ['props', 'popupBg', 'horizontalMargin']
1231
+ },
1232
+ {
1233
+ type: 'Number',
1234
+ label: '下边距',
1235
+ name: ['props', 'popupBg', 'bottomMargin']
1236
+ }
1237
+ ]
1238
+ },
1123
1239
  {
1124
1240
  type: 'Text',
1125
1241
  label: '组件名称',
@@ -1289,14 +1405,14 @@ var settingRender$9 = [
1289
1405
  * @Author: binruan@chatlabs.com
1290
1406
  * @Date: 2024-03-12 10:59:06
1291
1407
  * @LastEditors: binruan@chatlabs.com
1292
- * @LastEditTime: 2024-08-01 17:36:34
1408
+ * @LastEditTime: 2024-08-14 17:02:53
1293
1409
  * @FilePath: \pb-sxp-ui\src\core\hooks\useEventReport.ts
1294
1410
  *
1295
1411
  */
1296
1412
  function useEventReport() {
1297
1413
  const { bffEventReport, popupDetailData, waterFallData, isFromHashtag } = useSxpDataSource();
1298
- const jumpToWeb = useCallback((data, product, cta, position) => {
1299
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1;
1414
+ const jumpToWeb = useCallback((data, product, cta, position, traceInfo) => {
1415
+ 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;
1300
1416
  let fromKName = '';
1301
1417
  if (popupDetailData && (((_b = (_a = data === null || data === void 0 ? void 0 : data.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b.length) || ((_c = data === null || data === void 0 ? void 0 : data.video) === null || _c === void 0 ? void 0 : _c.bindProduct))) {
1302
1418
  fromKName = 'pdpPage';
@@ -1313,21 +1429,22 @@ function useEventReport() {
1313
1429
  else if (data === null || data === void 0 ? void 0 : data.product) {
1314
1430
  fromKName = 'productPage';
1315
1431
  }
1432
+ 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;
1316
1433
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
1317
1434
  eventInfo: {
1318
1435
  eventSubject: 'jumpToWeb',
1319
1436
  eventDescription: 'User jumped to website',
1320
- productId: (_h = product === null || product === void 0 ? void 0 : product.itemId) !== null && _h !== void 0 ? _h : '',
1321
- productName: (_j = product === null || product === void 0 ? void 0 : product.title) !== null && _j !== void 0 ? _j : '',
1437
+ productId: (_r = product === null || product === void 0 ? void 0 : product.itemId) !== null && _r !== void 0 ? _r : '',
1438
+ productName: (_s = product === null || product === void 0 ? void 0 : product.title) !== null && _s !== void 0 ? _s : '',
1322
1439
  price: (product === null || product === void 0 ? void 0 : product.price) ? (product === null || product === void 0 ? void 0 : product.price) + '' : '0',
1323
- productCollection: (_k = product === null || product === void 0 ? void 0 : product.collection) !== null && _k !== void 0 ? _k : '',
1440
+ productCollection: (_t = product === null || product === void 0 ? void 0 : product.collection) !== null && _t !== void 0 ? _t : '',
1324
1441
  fromKName,
1325
1442
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
1326
- contentTags: (product === null || product === void 0 ? void 0 : product.tags) ? JSON.stringify(product === null || product === void 0 ? void 0 : product.tags) : '',
1443
+ contentTags: contentTags ? JSON.stringify(contentTags) : '',
1327
1444
  position: position + '',
1328
- contentId: (_m = (_l = data === null || data === void 0 ? void 0 : data.video) === null || _l === void 0 ? void 0 : _l.itemId) !== null && _m !== void 0 ? _m : '',
1329
- ctatId: (_o = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _o !== void 0 ? _o : '',
1330
- 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 : ''
1445
+ 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 : '',
1446
+ ctatId: (_w = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _w !== void 0 ? _w : '',
1447
+ 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 : ''
1331
1448
  }
1332
1449
  });
1333
1450
  }, [bffEventReport, popupDetailData, isFromHashtag]);
@@ -1497,9 +1614,9 @@ const AppointForm = createMaterial(AppointFormComponent, {
1497
1614
  category: 'popup',
1498
1615
  type: 'AppointForm',
1499
1616
  related: {
1500
- settingRender: settingRender$9,
1617
+ settingRender: settingRender$a,
1501
1618
  bindableProps: [],
1502
- interactionRender: interactionRender$d
1619
+ interactionRender: interactionRender$e
1503
1620
  },
1504
1621
  defaulSetting: {
1505
1622
  name: '表单',
@@ -1522,10 +1639,41 @@ const AppointForm = createMaterial(AppointFormComponent, {
1522
1639
  sort: 2
1523
1640
  });
1524
1641
 
1525
- var settingRender$8 = [
1642
+ var settingRender$9 = [
1643
+ {
1644
+ title: '弹窗背景',
1645
+ child: [
1646
+ {
1647
+ type: 'Number',
1648
+ label: '左右边距',
1649
+ name: ['props', 'popupBg', 'horizontalMargin']
1650
+ },
1651
+ {
1652
+ type: 'Number',
1653
+ label: '下边距',
1654
+ name: ['props', 'popupBg', 'bottomMargin']
1655
+ }
1656
+ ]
1657
+ },
1526
1658
  {
1527
1659
  title: '商品图片',
1528
1660
  child: [
1661
+ {
1662
+ type: 'Group',
1663
+ label: '宽高比',
1664
+ child: [
1665
+ {
1666
+ type: 'Number',
1667
+ name: ['props', 'commodityImgRatio', 'w'],
1668
+ addonAfter: 'w'
1669
+ },
1670
+ {
1671
+ type: 'Number',
1672
+ name: ['props', 'commodityImgRatio', 'h'],
1673
+ addonAfter: 'h'
1674
+ }
1675
+ ]
1676
+ },
1529
1677
  {
1530
1678
  type: 'Radius',
1531
1679
  label: '轮播指示器',
@@ -1537,6 +1685,10 @@ var settingRender$8 = [
1537
1685
  {
1538
1686
  label: '居中',
1539
1687
  value: 'center'
1688
+ },
1689
+ {
1690
+ label: '居右',
1691
+ value: 'right'
1540
1692
  }
1541
1693
  ],
1542
1694
  name: ['props', 'swiper', 'dotsAlign']
@@ -1701,6 +1853,12 @@ var settingRender$8 = [
1701
1853
  {
1702
1854
  label: '间距',
1703
1855
  type: 'TextSpace'
1856
+ },
1857
+ {
1858
+ label: '价格千分符展示',
1859
+ type: 'Switch',
1860
+ name: ['enableFormattedPrice'],
1861
+ initialValue: true
1704
1862
  }
1705
1863
  ]
1706
1864
  }
@@ -1793,6 +1951,17 @@ var settingRender$8 = [
1793
1951
  name: ['props', 'buttonStyle']
1794
1952
  }
1795
1953
  ]
1954
+ },
1955
+ {
1956
+ title: 'Iframe商品弹窗',
1957
+ child: [
1958
+ {
1959
+ label: '弹窗按钮',
1960
+ type: 'Upload',
1961
+ name: ['props', 'iframeIcon'],
1962
+ text: '建议尺寸:106 * 41'
1963
+ }
1964
+ ]
1796
1965
  }
1797
1966
  ];
1798
1967
 
@@ -8622,13 +8791,13 @@ SwiperSlide.displayName = 'SwiperSlide';
8622
8791
  * @Author: binruan@chatlabs.com
8623
8792
  * @Date: 2023-11-02 18:34:34
8624
8793
  * @LastEditors: binruan@chatlabs.com
8625
- * @LastEditTime: 2024-07-29 16:20:40
8794
+ * @LastEditTime: 2024-08-16 17:58:56
8626
8795
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Modal\index.tsx
8627
8796
  *
8628
8797
  */
8629
8798
  const closeIcon$1 = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII=';
8630
8799
  const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema, fullHeight = window.innerHeight, isFullScreen = false }) => {
8631
- var _a, _b;
8800
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
8632
8801
  const touchRef = useRef(null);
8633
8802
  const fTouchRef = useRef(null);
8634
8803
  const touchMoveRef = useRef(null);
@@ -8655,12 +8824,16 @@ const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema,
8655
8824
  const isOpen = useMemo(() => {
8656
8825
  return ((popup === null || popup === void 0 ? void 0 : popup.id) && (popup === null || popup === void 0 ? void 0 : popup.id) !== '') || visible;
8657
8826
  }, [visible, popup]);
8658
- const isScrollFullScreen = useMemo(() => {
8659
- var _a, _b, _c, _d, _e;
8827
+ const getPopupById = useMemo(() => {
8828
+ var _a, _b, _c;
8660
8829
  const schemaData = schema !== null && schema !== void 0 ? schema : _schema;
8661
8830
  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));
8662
- 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;
8831
+ return value;
8663
8832
  }, [popup, schema, _schema]);
8833
+ const isScrollFullScreen = useMemo(() => {
8834
+ var _a, _b;
8835
+ 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;
8836
+ }, [getPopupById]);
8664
8837
  useEffect(() => {
8665
8838
  if (isOpen) {
8666
8839
  setIsShow(true);
@@ -8727,22 +8900,32 @@ const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema,
8727
8900
  touchMoveRef.current = false;
8728
8901
  };
8729
8902
  return ReactDOM.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 },
8730
- 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 && {
8731
- transform: `translateY(${modalTrans}px)`
8732
- })), onClick: (e) => {
8733
- e.stopPropagation();
8734
- e.preventDefault();
8735
- } }, (isScrollFullScreen && {
8736
- onTouchMove: handleTouchMove,
8737
- onTouchStart: handleTouchStart,
8738
- onTouchEnd: handleTouchEnd
8739
- })),
8740
- React.createElement("div", { onClick: onClose, className: 'modal-icon-wrapper' },
8741
- 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' })),
8742
- React.createElement("div", { ref: ref, style: {
8743
- height: isScrollFullScreen ? fullHeight : MODAL_DEF_CON_H,
8744
- overflow: (isScrollFullScreen && modalTrans <= 0) || !isScrollFullScreen ? 'auto' : 'hidden'
8745
- } }, children))))), modalEleRef.current);
8903
+ React.createElement("div", { style: {
8904
+ position: 'relative',
8905
+ 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`,
8906
+ 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`,
8907
+ 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`,
8908
+ overflow: 'hidden',
8909
+ 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)`,
8910
+ height: '100%'
8911
+ } },
8912
+ 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 && {
8913
+ transform: `translateY(${modalTrans}px)`
8914
+ })), onClick: (e) => {
8915
+ e.stopPropagation();
8916
+ e.preventDefault();
8917
+ } }, (isScrollFullScreen && {
8918
+ onTouchMove: handleTouchMove,
8919
+ onTouchStart: handleTouchStart,
8920
+ onTouchEnd: handleTouchEnd
8921
+ })),
8922
+ React.createElement("div", { onClick: onClose, className: 'modal-icon-wrapper' },
8923
+ 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' })),
8924
+ React.createElement("div", { ref: ref, style: {
8925
+ height: (isScrollFullScreen ? fullHeight : MODAL_DEF_CON_H) -
8926
+ ((_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),
8927
+ overflow: (isScrollFullScreen && modalTrans <= 0) || !isScrollFullScreen ? 'auto' : 'hidden'
8928
+ } }, children)))))), modalEleRef.current);
8746
8929
  };
8747
8930
  var Modal$1 = memo(Modal);
8748
8931
 
@@ -8828,7 +9011,7 @@ const FormatImage = forwardRef((props, ref) => {
8828
9011
  }, [src]);
8829
9012
  useEffect(() => {
8830
9013
  const onShow = () => {
8831
- if (src && !visible) {
9014
+ if (src && !visible && imgRef.current) {
8832
9015
  imgRef.current.src = '';
8833
9016
  imgRef.current.src = src;
8834
9017
  }
@@ -8908,14 +9091,15 @@ const CommodityGroup = ({ products, data, defImg, style, onCLick, popupDetailDat
8908
9091
  var CommodityGroup$1 = memo(CommodityGroup);
8909
9092
 
8910
9093
  const CommodityDetail$1 = (_a) => {
8911
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
8912
- 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"]);
9094
+ 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;
9095
+ 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"]);
8913
9096
  const { sxpParameter, popupDetailData, isPreview, bffFbReport, popupCurTimeRef, checkCommodityIndexRef } = useSxpDataSource();
8914
9097
  const { jumpToWeb, productView } = useEventReport();
8915
9098
  const curTimeRef = useRef(null);
8916
9099
  const [showModal, setShowModal] = useState(false);
8917
9100
  const [show3DModal, setShow3DModal] = useState(false);
8918
9101
  const [checkCommodityIndex, setCheckCommodityIndex] = useState((_b = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.multiCheckIndex) !== null && _b !== void 0 ? _b : 0);
9102
+ const ref = useRef();
8919
9103
  const data = isPost ? rec : popupDetailData;
8920
9104
  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];
8921
9105
  let cta = isPost
@@ -8955,17 +9139,21 @@ const CommodityDetail$1 = (_a) => {
8955
9139
  };
8956
9140
  }, []);
8957
9141
  const priceText = useMemo(() => {
8958
- var _a, _b, _c, _d, _e;
9142
+ var _a, _b, _c, _d, _e, _f, _g;
9143
+ 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);
8959
9144
  if ((product === null || product === void 0 ? void 0 : product.currency) && (product === null || product === void 0 ? void 0 : product.price)) {
8960
- 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', {
8961
- minimumFractionDigits: 0
8962
- })) !== null && _e !== void 0 ? _e : ''}`;
9145
+ 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
9146
+ ? (_g = (_f = product === null || product === void 0 ? void 0 : product.price) === null || _f === void 0 ? void 0 : _f.toLocaleString('zh', {
9147
+ minimumFractionDigits: 0
9148
+ })) !== null && _g !== void 0 ? _g : ''
9149
+ : product === null || product === void 0 ? void 0 : product.price}`;
8963
9150
  }
8964
9151
  else {
8965
9152
  return '$7,000';
8966
9153
  }
8967
- }, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency]);
8968
- const width = isPreview ? 375 : (_t = style === null || style === void 0 ? void 0 : style.width) !== null && _t !== void 0 ? _t : window.innerWidth;
9154
+ }, [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]);
9155
+ 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;
9156
+ const height = commodityImgRatio ? width * (commodityImgRatio.h / commodityImgRatio.w) : width;
8969
9157
  const renderContent = ({ isPost }) => {
8970
9158
  var _a, _b, _c, _d;
8971
9159
  return (React.createElement("div", null,
@@ -9005,6 +9193,10 @@ const CommodityDetail$1 = (_a) => {
9005
9193
  popupCurTimeRef.current = new Date();
9006
9194
  setCheckCommodityIndex(index);
9007
9195
  checkCommodityIndexRef.current = index;
9196
+ if (ref === null || ref === void 0 ? void 0 : ref.current) {
9197
+ ref.current.swiper.slideTo(0);
9198
+ ref.current.swiper.autoplay.start();
9199
+ }
9008
9200
  }, []);
9009
9201
  const renderCommodityGroup = useCallback(() => {
9010
9202
  var _a, _b, _c;
@@ -9012,25 +9204,32 @@ const CommodityDetail$1 = (_a) => {
9012
9204
  return;
9013
9205
  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 }));
9014
9206
  }, [checkCommodityIndex]);
9207
+ const getDotsAlign = useMemo(() => {
9208
+ const dotsAlignClass = {
9209
+ left: 'commondityDetail-swiper-clickable-left',
9210
+ center: 'commondityDetail-swiper-clickable-center',
9211
+ right: 'commondityDetail-swiper-clickable-right'
9212
+ };
9213
+ return dotsAlignClass === null || dotsAlignClass === void 0 ? void 0 : dotsAlignClass[swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign];
9214
+ }, [swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign]);
9215
+ 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);
9015
9216
  return (React.createElement(React.Fragment, null,
9016
9217
  React.createElement("div", Object.assign({ className: css(Object.assign({}, style)) }, props),
9017
- 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' } },
9018
- React.createElement(Swiper, { height: width, modules: [Pagination, Autoplay], pagination: {
9218
+ React.createElement("div", { style: { position: 'relative' } },
9219
+ 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: {
9019
9220
  clickable: true,
9020
9221
  bulletActiveClass: 'swipe-item-active-bullet',
9021
- clickableClass: (swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign) === 'left'
9022
- ? 'commondityDetail-swiper-clickable-left'
9023
- : 'commondityDetail-swiper-clickable-center'
9222
+ clickableClass: getDotsAlign
9024
9223
  }, loop: true, autoplay: {
9025
9224
  delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
9026
- } },
9027
- React.createElement(React.Fragment, null, (_v = product === null || product === void 0 ? void 0 : product.homePage) === null || _v === void 0 ? void 0 : _v.map((src) => {
9225
+ }, ref: ref },
9226
+ React.createElement(React.Fragment, null, (_3 = product === null || product === void 0 ? void 0 : product.homePage) === null || _3 === void 0 ? void 0 : _3.map((src) => {
9028
9227
  var _a;
9029
9228
  return (React.createElement(SwiperSlide, { key: src },
9030
9229
  React.createElement("div", { style: {
9031
9230
  overflow: 'hidden',
9032
9231
  width,
9033
- height: width
9232
+ height
9034
9233
  } },
9035
9234
  React.createElement(FormatImage$1, { style: {
9036
9235
  height: '100%',
@@ -9039,21 +9238,30 @@ const CommodityDetail$1 = (_a) => {
9039
9238
  display: 'block',
9040
9239
  objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
9041
9240
  }, 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 }))));
9042
- }))))),
9043
- !((_w = product === null || product === void 0 ? void 0 : product.homePage) === null || _w === void 0 ? void 0 : _w.length) && (React.createElement("div", { className: css({
9044
- position: 'relative',
9045
- height: 0,
9046
- width: '100%',
9047
- paddingBottom: '100%',
9048
- overflow: 'hidden'
9049
- }) },
9050
- React.createElement("img", { className: css({
9051
- position: 'absolute',
9052
- left: 0,
9053
- top: 0,
9054
- objectFit: 'cover',
9055
- width: '100%'
9056
- }), src: (_x = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _x !== void 0 ? _x : bottom_image, alt: 'pdp image' }))),
9241
+ })))),
9242
+ !((_4 = product === null || product === void 0 ? void 0 : product.homePage) === null || _4 === void 0 ? void 0 : _4.length) && (React.createElement("div", { className: css({
9243
+ height,
9244
+ width
9245
+ }) },
9246
+ React.createElement("img", { className: css({
9247
+ objectFit: 'cover',
9248
+ width: '100%',
9249
+ height: '100%'
9250
+ }), src: (_5 = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _5 !== void 0 ? _5 : bottom_image, alt: 'pdp image' }))),
9251
+ (iframeUrl && iframeIcon) ||
9252
+ (!product && iframeIcon && (React.createElement("div", { style: {
9253
+ padding: '5px 10px',
9254
+ display: 'flex',
9255
+ alignItems: 'center',
9256
+ position: 'absolute',
9257
+ right: '10px',
9258
+ bottom: '10px',
9259
+ zIndex: 1,
9260
+ background: '#fff',
9261
+ borderRadius: '3px'
9262
+ }, onClick: () => setShow3DModal(true) },
9263
+ React.createElement("img", { src: iframeIcon, alt: '3d', width: '20px', height: '20px', style: { marginRight: '5px' } }),
9264
+ React.createElement("span", { style: { fontSize: '12px' } }, "Try in 3D"))))),
9057
9265
  renderCommodityGroup(),
9058
9266
  React.createElement("div", { className: 'pb-commondity-content' }, renderContent({ isPost }))),
9059
9267
  renderBtn(),
@@ -9061,10 +9269,11 @@ const CommodityDetail$1 = (_a) => {
9061
9269
  React.createElement("div", { style: { paddingBottom: '80px' } }, renderContent({ isPost: false })),
9062
9270
  renderBtn()),
9063
9271
  React.createElement(Modal$1, { visible: show3DModal, padding: 0, isFullScreen: true, onClose: () => setShow3DModal(false) },
9064
- React.createElement("iframe", { src: 'https://rimowa.threedium.co.uk/product-experience/latest/?sku=92573974&lang=en', style: {
9272
+ React.createElement("iframe", { src: iframeUrl, style: {
9065
9273
  width: '100%',
9066
- height: 'calc(100% - 40px)',
9067
- marginTop: '40px'
9274
+ height: 'calc(100% - 50px)',
9275
+ marginTop: '40px',
9276
+ border: 'none'
9068
9277
  } }))));
9069
9278
  };
9070
9279
  var CommodityDetailComponent = memo(CommodityDetail$1);
@@ -9085,7 +9294,7 @@ var CommodityDetailComponent = memo(CommodityDetail$1);
9085
9294
  * @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLink\interactionRender.tsx
9086
9295
  *
9087
9296
  */
9088
- var interactionRender$c = [
9297
+ var interactionRender$d = [
9089
9298
  {
9090
9299
  title: '滑动事件',
9091
9300
  child: [
@@ -9102,7 +9311,7 @@ var interactionRender$c = [
9102
9311
  * @Author: binruan@chatlabs.com
9103
9312
  * @Date: 2023-07-28 18:29:57
9104
9313
  * @LastEditors: binruan@chatlabs.com
9105
- * @LastEditTime: 2024-07-31 13:58:45
9314
+ * @LastEditTime: 2024-08-08 18:30:20
9106
9315
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetail\material.tsx
9107
9316
  *
9108
9317
  */
@@ -9112,8 +9321,8 @@ const CommodityDetail = createMaterial(CommodityDetailComponent, {
9112
9321
  category: 'popup',
9113
9322
  type: 'CommodityDetail',
9114
9323
  related: {
9115
- settingRender: settingRender$8,
9116
- interactionRender: interactionRender$c
9324
+ settingRender: settingRender$9,
9325
+ interactionRender: interactionRender$d
9117
9326
  },
9118
9327
  defaulSetting: {
9119
9328
  props: {
@@ -9155,6 +9364,10 @@ const CommodityDetail = createMaterial(CommodityDetailComponent, {
9155
9364
  fontWeight: 'bold',
9156
9365
  textAlign: 'center',
9157
9366
  color: 'rgba(255, 255, 255, 0.9)'
9367
+ },
9368
+ commodityImgRatio: {
9369
+ w: 1,
9370
+ h: 1
9158
9371
  }
9159
9372
  },
9160
9373
  style: {}
@@ -9164,7 +9377,7 @@ const CommodityDetail = createMaterial(CommodityDetailComponent, {
9164
9377
  sort: 1
9165
9378
  });
9166
9379
 
9167
- var interactionRender$b = [
9380
+ var interactionRender$c = [
9168
9381
  {
9169
9382
  title: '点击事件',
9170
9383
  child: [
@@ -9180,13 +9393,28 @@ var interactionRender$b = [
9180
9393
  * @Author: binruan@chatlabs.com
9181
9394
  * @Date: 2023-10-27 14:06:35
9182
9395
  * @LastEditors: binruan@chatlabs.com
9183
- * @LastEditTime: 2024-08-06 14:23:11
9396
+ * @LastEditTime: 2024-08-20 14:01:21
9184
9397
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\Prompt\settingRender.tsx
9185
9398
  *
9186
9399
  */
9187
- var settingRender$7 = [
9400
+ var settingRender$8 = [
9401
+ {
9402
+ title: '弹窗背景',
9403
+ child: [
9404
+ {
9405
+ type: 'Number',
9406
+ label: '左右边距',
9407
+ name: ['props', 'popupBg', 'horizontalMargin']
9408
+ },
9409
+ {
9410
+ type: 'Number',
9411
+ label: '下边距',
9412
+ name: ['props', 'popupBg', 'bottomMargin']
9413
+ }
9414
+ ]
9415
+ },
9188
9416
  {
9189
- title: '',
9417
+ title: '内容',
9190
9418
  child: [
9191
9419
  {
9192
9420
  type: 'Media',
@@ -9364,9 +9592,9 @@ const Prompt = createMaterial(PromptComponent, {
9364
9592
  category: 'popup',
9365
9593
  type: 'Prompt',
9366
9594
  related: {
9367
- settingRender: settingRender$7,
9595
+ settingRender: settingRender$8,
9368
9596
  bindableProps: [],
9369
- interactionRender: interactionRender$b
9597
+ interactionRender: interactionRender$c
9370
9598
  },
9371
9599
  defaulSetting: {
9372
9600
  props: {
@@ -9385,14 +9613,45 @@ const Prompt = createMaterial(PromptComponent, {
9385
9613
  * @Author: binruan@chatlabs.com
9386
9614
  * @Date: 2024-03-26 16:50:25
9387
9615
  * @LastEditors: binruan@chatlabs.com
9388
- * @LastEditTime: 2024-08-06 14:06:03
9616
+ * @LastEditTime: 2024-08-20 15:50:06
9389
9617
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetailDiroNew\settingRender.tsx
9390
9618
  *
9391
9619
  */
9392
- var settingRender$6 = [
9620
+ var settingRender$7 = [
9621
+ {
9622
+ title: '弹窗背景',
9623
+ child: [
9624
+ {
9625
+ type: 'Number',
9626
+ label: '左右边距',
9627
+ name: ['props', 'popupBg', 'horizontalMargin']
9628
+ },
9629
+ {
9630
+ type: 'Number',
9631
+ label: '下边距',
9632
+ name: ['props', 'popupBg', 'bottomMargin']
9633
+ }
9634
+ ]
9635
+ },
9393
9636
  {
9394
9637
  title: '商品图片',
9395
9638
  child: [
9639
+ {
9640
+ type: 'Group',
9641
+ label: '宽高比',
9642
+ child: [
9643
+ {
9644
+ type: 'Number',
9645
+ name: ['props', 'commodityImgRatio', 'w'],
9646
+ addonAfter: 'w'
9647
+ },
9648
+ {
9649
+ type: 'Number',
9650
+ name: ['props', 'commodityImgRatio', 'h'],
9651
+ addonAfter: 'h'
9652
+ }
9653
+ ]
9654
+ },
9396
9655
  {
9397
9656
  type: 'Radius',
9398
9657
  label: '轮播指示器',
@@ -9404,6 +9663,10 @@ var settingRender$6 = [
9404
9663
  {
9405
9664
  label: '居中',
9406
9665
  value: 'center'
9666
+ },
9667
+ {
9668
+ label: '居右',
9669
+ value: 'right'
9407
9670
  }
9408
9671
  ],
9409
9672
  name: ['props', 'swiper', 'dotsAlign']
@@ -9551,6 +9814,12 @@ var settingRender$6 = [
9551
9814
  {
9552
9815
  label: '间距',
9553
9816
  type: 'TextSpace'
9817
+ },
9818
+ {
9819
+ label: '价格千分符展示',
9820
+ type: 'Switch',
9821
+ name: ['enableFormattedPrice'],
9822
+ initialValue: true
9554
9823
  }
9555
9824
  ]
9556
9825
  }
@@ -9643,12 +9912,23 @@ var settingRender$6 = [
9643
9912
  name: ['props', 'buttonStyle']
9644
9913
  }
9645
9914
  ]
9915
+ },
9916
+ {
9917
+ title: 'Iframe商品弹窗',
9918
+ child: [
9919
+ {
9920
+ label: '弹窗按钮',
9921
+ type: 'Upload',
9922
+ name: ['props', 'iframeIcon'],
9923
+ text: '建议尺寸:106 * 41'
9924
+ }
9925
+ ]
9646
9926
  }
9647
9927
  ];
9648
9928
 
9649
9929
  const CommodityDetailDiroNew$1 = (_a) => {
9650
- 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;
9651
- 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"]);
9930
+ 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;
9931
+ 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"]);
9652
9932
  useState(true);
9653
9933
  const { sxpParameter, popupCurTimeRef, popupDetailData, isPreview, bffFbReport, checkCommodityIndexRef } = useSxpDataSource();
9654
9934
  const { jumpToWeb, productView } = useEventReport();
@@ -9657,7 +9937,9 @@ const CommodityDetailDiroNew$1 = (_a) => {
9657
9937
  useState(true);
9658
9938
  const [showModal, setShowModal] = useState(false);
9659
9939
  const curTimeRef = useRef(null);
9940
+ const [show3DModal, setShow3DModal] = useState(false);
9660
9941
  const [checkCommodityIndex, setCheckCommodityIndex] = useState((_b = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.multiCheckIndex) !== null && _b !== void 0 ? _b : 0);
9942
+ const ref = useRef();
9661
9943
  const data = isPost ? rec : popupDetailData;
9662
9944
  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];
9663
9945
  let cta = isPost
@@ -9697,17 +9979,21 @@ const CommodityDetailDiroNew$1 = (_a) => {
9697
9979
  };
9698
9980
  }, []);
9699
9981
  const priceText = useMemo(() => {
9700
- var _a, _b, _c, _d, _e;
9982
+ var _a, _b, _c, _d, _e, _f, _g;
9983
+ 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);
9701
9984
  if ((product === null || product === void 0 ? void 0 : product.currency) && (product === null || product === void 0 ? void 0 : product.price)) {
9702
- 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', {
9703
- minimumFractionDigits: 0
9704
- })) !== null && _e !== void 0 ? _e : ''}`;
9985
+ 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
9986
+ ? (_g = (_f = product === null || product === void 0 ? void 0 : product.price) === null || _f === void 0 ? void 0 : _f.toLocaleString('zh', {
9987
+ minimumFractionDigits: 0
9988
+ })) !== null && _g !== void 0 ? _g : ''
9989
+ : product === null || product === void 0 ? void 0 : product.price}`;
9705
9990
  }
9706
9991
  else {
9707
9992
  return '£102,300.00';
9708
9993
  }
9709
- }, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency]);
9710
- const width = isPreview ? 375 : (_t = style === null || style === void 0 ? void 0 : style.width) !== null && _t !== void 0 ? _t : window.innerWidth;
9994
+ }, [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]);
9995
+ 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;
9996
+ const height = commodityImgRatio ? width * (commodityImgRatio.h / commodityImgRatio.w) : width;
9711
9997
  // useEffect(() => {
9712
9998
  // console.log(scrollRef?.current?.scrollHeight, window.innerHeight);
9713
9999
  // if (scrollRef?.current && scrollRef?.current?.scrollHeight > window.innerHeight) {
@@ -9774,6 +10060,10 @@ Made in Italy` })));
9774
10060
  popupCurTimeRef.current = new Date();
9775
10061
  setCheckCommodityIndex(index);
9776
10062
  checkCommodityIndexRef.current = index;
10063
+ if (ref === null || ref === void 0 ? void 0 : ref.current) {
10064
+ ref.current.swiper.slideTo(0);
10065
+ ref.current.swiper.autoplay.start();
10066
+ }
9777
10067
  }, []);
9778
10068
  const renderCommodityGroup = useCallback(() => {
9779
10069
  var _a, _b, _c;
@@ -9781,52 +10071,69 @@ Made in Italy` })));
9781
10071
  return;
9782
10072
  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 }));
9783
10073
  }, [checkCommodityIndex]);
10074
+ const getDotsAlign = useMemo(() => {
10075
+ const dotsAlignClass = {
10076
+ left: 'commondityDetail-swiper-clickable-left',
10077
+ center: 'commondityDetail-swiper-clickable-center',
10078
+ right: 'commondityDetail-swiper-clickable-right'
10079
+ };
10080
+ return dotsAlignClass === null || dotsAlignClass === void 0 ? void 0 : dotsAlignClass[swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign];
10081
+ }, [swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign]);
10082
+ 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);
9784
10083
  return (React.createElement("div", { className: 'pb-commondityDiroNew' },
9785
10084
  React.createElement("div", Object.assign({ className: css(Object.assign(Object.assign({}, style), { transform: 'translate3d(0px, 0px, 0px)' })) }, props),
9786
- 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: {
9787
- clickable: true,
9788
- bulletActiveClass: 'commondityDiroNew-swipe-item-active-bullet',
9789
- clickableClass: (swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign) === 'left'
9790
- ? 'commondityDiroNew-swiper-clickable-left'
9791
- : 'commondityDiroNew-swiper-clickable-center'
9792
- }, loop: true, autoplay: {
9793
- delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
9794
- } }, (_v = product === null || product === void 0 ? void 0 : product.homePage) === null || _v === void 0 ? void 0 : _v.map((src) => {
9795
- var _a;
9796
- return (React.createElement(SwiperSlide, { key: src },
9797
- React.createElement("div", { style: {
9798
- overflow: 'hidden',
9799
- width,
9800
- height: width
9801
- } },
9802
- React.createElement(FormatImage$1, { style: {
9803
- height: '100%',
9804
- width: '100%',
9805
- objectFit: 'cover',
9806
- display: 'block',
9807
- objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
9808
- }, 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 }))));
9809
- }))),
9810
- !((_w = product === null || product === void 0 ? void 0 : product.homePage) === null || _w === void 0 ? void 0 : _w.length) && (React.createElement("div", { className: css({
9811
- position: 'relative',
9812
- height: 0,
9813
- width: '100%',
9814
- paddingBottom: '100%',
9815
- overflow: 'hidden'
9816
- }) },
9817
- React.createElement("img", { className: css({
9818
- position: 'absolute',
9819
- left: 0,
9820
- top: 0,
9821
- objectFit: 'cover',
9822
- width: '100%'
9823
- }), src: (_x = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _x !== void 0 ? _x : bottom_image, alt: 'pdp image' }))),
10085
+ React.createElement("div", { style: { position: 'relative' } },
10086
+ 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: {
10087
+ clickable: true,
10088
+ bulletActiveClass: 'commondityDiroNew-swipe-item-active-bullet',
10089
+ clickableClass: getDotsAlign
10090
+ }, loop: true, autoplay: {
10091
+ delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
10092
+ }, ref: ref }, (_3 = product === null || product === void 0 ? void 0 : product.homePage) === null || _3 === void 0 ? void 0 : _3.map((src) => {
10093
+ var _a;
10094
+ return (React.createElement(SwiperSlide, { key: src },
10095
+ React.createElement("div", { style: {
10096
+ overflow: 'hidden',
10097
+ width,
10098
+ height
10099
+ } },
10100
+ React.createElement(FormatImage$1, { style: {
10101
+ height: '100%',
10102
+ width: '100%',
10103
+ objectFit: 'cover',
10104
+ display: 'block',
10105
+ objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
10106
+ }, 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 }))));
10107
+ }))),
10108
+ !((_4 = product === null || product === void 0 ? void 0 : product.homePage) === null || _4 === void 0 ? void 0 : _4.length) && (React.createElement("div", { className: css({
10109
+ height,
10110
+ width
10111
+ }) },
10112
+ React.createElement("img", { className: css({
10113
+ objectFit: 'cover',
10114
+ width: '100%',
10115
+ height: '100%'
10116
+ }), src: (_5 = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _5 !== void 0 ? _5 : bottom_image, alt: 'pdp image' }))),
10117
+ (iframeUrl && iframeIcon) ||
10118
+ (!product && iframeIcon && (React.createElement("div", { style: {
10119
+ padding: '5px 10px',
10120
+ display: 'flex',
10121
+ alignItems: 'center',
10122
+ position: 'absolute',
10123
+ right: '10px',
10124
+ bottom: '10px',
10125
+ zIndex: 1,
10126
+ background: '#fff',
10127
+ borderRadius: '3px'
10128
+ }, onClick: () => setShow3DModal(true) },
10129
+ React.createElement("img", { src: iframeIcon, alt: '3d', width: '20px', height: '20px', style: { marginRight: '5px' } }),
10130
+ React.createElement("span", { style: { fontSize: '12px' } }, "Try in 3D"))))),
9824
10131
  renderCommodityGroup(),
9825
10132
  React.createElement("div", { className: 'pb-commondityDiroNew-content' },
9826
10133
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top' },
9827
10134
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top-left' },
9828
10135
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top-left-title', style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title), dangerouslySetInnerHTML: {
9829
- __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)
10136
+ __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)
9830
10137
  } }),
9831
10138
  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: {
9832
10139
  __html: setFontForText((product === null || product === void 0 ? void 0 : product.collection) || 'Black Macrocannage CalfskinLarge', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection)
@@ -9836,14 +10143,21 @@ Made in Italy` })));
9836
10143
  __html: setFontForText(priceText, commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price)
9837
10144
  } }),
9838
10145
  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: {
9839
- __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)
10146
+ __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)
9840
10147
  } }))),
9841
- (!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 },
10148
+ (!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 },
9842
10149
  React.createElement("span", { dangerouslySetInnerHTML: {
9843
- __html: setFontForText((_1 = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _1 !== void 0 ? _1 : 'Shop now', buttonStyle)
10150
+ __html: setFontForText((_9 = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _9 !== void 0 ? _9 : 'Shop now', buttonStyle)
9844
10151
  } }))),
9845
10152
  productInfoText({ isPost }))),
9846
- React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) }, productInfoText({ isPost: false }))));
10153
+ React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) }, productInfoText({ isPost: false })),
10154
+ React.createElement(Modal$1, { visible: show3DModal, padding: 0, isFullScreen: true, onClose: () => setShow3DModal(false) },
10155
+ React.createElement("iframe", { src: iframeUrl, style: {
10156
+ width: '100%',
10157
+ height: 'calc(100% - 50px)',
10158
+ marginTop: '40px',
10159
+ border: 'none'
10160
+ } }))));
9847
10161
  };
9848
10162
  var CommodityDetailDiroNewComponent = memo(CommodityDetailDiroNew$1);
9849
10163
 
@@ -9863,7 +10177,7 @@ var CommodityDetailDiroNewComponent = memo(CommodityDetailDiroNew$1);
9863
10177
  * @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLink\interactionRender.tsx
9864
10178
  *
9865
10179
  */
9866
- var interactionRender$a = [
10180
+ var interactionRender$b = [
9867
10181
  {
9868
10182
  title: '滑动事件',
9869
10183
  child: [
@@ -9890,8 +10204,8 @@ const CommodityDetailDiroNew = createMaterial(CommodityDetailDiroNewComponent, {
9890
10204
  category: 'popup',
9891
10205
  type: 'CommodityDetailDiroNew',
9892
10206
  related: {
9893
- settingRender: settingRender$6,
9894
- interactionRender: interactionRender$a
10207
+ settingRender: settingRender$7,
10208
+ interactionRender: interactionRender$b
9895
10209
  },
9896
10210
  defaulSetting: {
9897
10211
  props: {
@@ -9934,6 +10248,10 @@ const CommodityDetailDiroNew = createMaterial(CommodityDetailDiroNewComponent, {
9934
10248
  borderRadius: 25,
9935
10249
  marginTop: 16,
9936
10250
  marginBottom: 16
10251
+ },
10252
+ commodityImgRatio: {
10253
+ w: 1,
10254
+ h: 1
9937
10255
  }
9938
10256
  },
9939
10257
  style: {}
@@ -9951,7 +10269,22 @@ const CommodityDetailDiroNew = createMaterial(CommodityDetailDiroNewComponent, {
9951
10269
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityList\settingRender.tsx
9952
10270
  *
9953
10271
  */
9954
- var settingRender$5 = [
10272
+ var settingRender$6 = [
10273
+ {
10274
+ title: '弹窗背景',
10275
+ child: [
10276
+ {
10277
+ type: 'Number',
10278
+ label: '左右边距',
10279
+ name: ['props', 'popupBg', 'horizontalMargin']
10280
+ },
10281
+ {
10282
+ type: 'Number',
10283
+ label: '下边距',
10284
+ name: ['props', 'popupBg', 'bottomMargin']
10285
+ }
10286
+ ]
10287
+ },
9955
10288
  {
9956
10289
  title: '商品图片',
9957
10290
  child: [
@@ -10313,7 +10646,7 @@ var CommodityListComponent = memo(CommodityList$1);
10313
10646
  * @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLink\interactionRender.tsx
10314
10647
  *
10315
10648
  */
10316
- var interactionRender$9 = [
10649
+ var interactionRender$a = [
10317
10650
  {
10318
10651
  title: '点击事件',
10319
10652
  child: [
@@ -10339,8 +10672,8 @@ const CommodityList = createMaterial(CommodityListComponent, {
10339
10672
  category: 'popup',
10340
10673
  type: 'CommodityList',
10341
10674
  related: {
10342
- settingRender: settingRender$5,
10343
- interactionRender: interactionRender$9
10675
+ settingRender: settingRender$6,
10676
+ interactionRender: interactionRender$a
10344
10677
  },
10345
10678
  defaulSetting: {
10346
10679
  props: {
@@ -10381,6 +10714,59 @@ const CommodityList = createMaterial(CommodityListComponent, {
10381
10714
  sort: 1
10382
10715
  });
10383
10716
 
10717
+ /*
10718
+ * @Author: binruan@chatlabs.com
10719
+ * @Date: 2023-10-27 14:06:35
10720
+ * @LastEditors: binruan@chatlabs.com
10721
+ * @LastEditTime: 2024-08-08 17:32:11
10722
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\Iframe\settingRender.tsx
10723
+ *
10724
+ */
10725
+ var settingRender$5 = [
10726
+ {
10727
+ title: '背景样式',
10728
+ child: [
10729
+ {
10730
+ type: 'Color',
10731
+ label: '背景色',
10732
+ name: ['style', 'backgroundColor']
10733
+ }
10734
+ ]
10735
+ }
10736
+ ];
10737
+
10738
+ const Iframe$1 = (_a) => {
10739
+ var _b, _c;
10740
+ 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"]);
10741
+ const { popupDetailData } = useSxpDataSource();
10742
+ 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;
10743
+ return (React.createElement("div", Object.assign({ className: `${css(Object.assign({}, style))}` }, props), iframeUrl && (React.createElement("iframe", { src: iframeUrl, style: {
10744
+ width: '100%',
10745
+ height: 'calc(100% - 50px)',
10746
+ marginTop: '40px',
10747
+ border: 'none'
10748
+ } }))));
10749
+ };
10750
+ var IframeComponent = memo(Iframe$1);
10751
+
10752
+ const Iframe = createMaterial(IframeComponent, {
10753
+ displayName: 'Iframe弹窗',
10754
+ icon: '',
10755
+ category: 'popup',
10756
+ type: 'Iframe',
10757
+ related: {
10758
+ settingRender: settingRender$5,
10759
+ bindableProps: []
10760
+ },
10761
+ defaulSetting: {
10762
+ props: {},
10763
+ style: {}
10764
+ },
10765
+ w: 100,
10766
+ h: 40,
10767
+ sort: 3
10768
+ });
10769
+
10384
10770
  /*
10385
10771
  * @Author: binruan@chatlabs.com
10386
10772
  * @Date: 2024-03-26 16:50:25
@@ -10640,7 +11026,7 @@ var settingRender$4 = [
10640
11026
  }
10641
11027
  ];
10642
11028
 
10643
- var interactionRender$8 = [
11029
+ var interactionRender$9 = [
10644
11030
  {
10645
11031
  title: '点击事件',
10646
11032
  child: [
@@ -10653,7 +11039,7 @@ var interactionRender$8 = [
10653
11039
  ];
10654
11040
 
10655
11041
  const EventProvider = (_a) => {
10656
- var { rec, children, className, onClick, style, isExternalLink = false, index } = _a; __rest(_a, ["rec", "children", "className", "onClick", "style", "isExternalLink", "index"]);
11042
+ var { rec, children, className, onClick, style, isExternalLink = false, index, jumpLink } = _a; __rest(_a, ["rec", "children", "className", "onClick", "style", "isExternalLink", "index", "jumpLink"]);
10657
11043
  const ref = useRef(null);
10658
11044
  const { popup } = useEditor();
10659
11045
  const { setPopupDetailData, ctaEvent } = useSxpDataSource();
@@ -10667,11 +11053,11 @@ const EventProvider = (_a) => {
10667
11053
  }, rec, item, index);
10668
11054
  setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, rec), { index }));
10669
11055
  if (isExternalLink) {
10670
- 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) {
11056
+ 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)) {
10671
11057
  const cta = (_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.bindCta;
10672
11058
  const product = (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.bindProduct;
10673
11059
  jumpToWeb(rec, product, cta, index);
10674
- 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);
11060
+ 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) || '');
10675
11061
  }
10676
11062
  }
10677
11063
  else {
@@ -10723,7 +11109,7 @@ const Commodity = createMaterial(CommodityComponent, {
10723
11109
  category: 'template',
10724
11110
  type: 'Commodity',
10725
11111
  related: {
10726
- interactionRender: interactionRender$8,
11112
+ interactionRender: interactionRender$9,
10727
11113
  bindableProps: [],
10728
11114
  settingRender: settingRender$4
10729
11115
  },
@@ -10765,7 +11151,7 @@ const Commodity = createMaterial(CommodityComponent, {
10765
11151
  sort: 1
10766
11152
  });
10767
11153
 
10768
- var interactionRender$7 = [
11154
+ var interactionRender$8 = [
10769
11155
  {
10770
11156
  title: '点击事件',
10771
11157
  child: [
@@ -10805,7 +11191,7 @@ const Appoint = createMaterial(AppointComponent, {
10805
11191
  category: 'template',
10806
11192
  type: 'Appoint',
10807
11193
  related: {
10808
- interactionRender: interactionRender$7,
11194
+ interactionRender: interactionRender$8,
10809
11195
  settingRender: settingRender$4 === null || settingRender$4 === void 0 ? void 0 : settingRender$4.filter((i) => i.type !== 'commodityTitle'),
10810
11196
  bindableProps: []
10811
11197
  },
@@ -10960,21 +11346,15 @@ var linkSettingRender = [
10960
11346
  var styles$7 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__nkBlU","one-line-ellipsis":"index-module_one-line-ellipsis__buFw1"};
10961
11347
 
10962
11348
  const Link$1 = (_a) => {
10963
- var _b, _c, _d, _e, _f, _g, _h, _j;
11349
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k;
10964
11350
  var { content, style, bgImg, recData, bottom_image, ctaTempStyles, index, customTitle } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "index", "customTitle"]);
10965
11351
  const { sxpParameter, bffEventReport } = useSxpDataSource();
10966
- const { jumpToWeb } = useEventReport();
11352
+ useEventReport();
10967
11353
  const cta = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindCta;
10968
- const product = (_c = recData === null || recData === void 0 ? void 0 : recData.video) === null || _c === void 0 ? void 0 : _c.bindProduct;
10969
- const handleTo = () => {
10970
- if (cta === null || cta === void 0 ? void 0 : cta.link) {
10971
- jumpToWeb(recData, product, cta, index);
10972
- window.location.href = window.getJointUtmLink(cta.link);
10973
- }
10974
- };
11354
+ (_c = recData === null || recData === void 0 ? void 0 : recData.video) === null || _c === void 0 ? void 0 : _c.bindProduct;
10975
11355
  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;
10976
- return (React.createElement(EventProvider$1, Object.assign({ index: index, rec: recData, className: css(Object.assign({ alignItems: 'center' }, style)), style: { display: 'flex' } }, props, { onClick: handleTo }),
10977
- 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 }),
11356
+ return (React.createElement(EventProvider$1, Object.assign({ index: index, rec: recData, className: 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 : '' }),
11357
+ 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 }),
10978
11358
  React.createElement("div", { className: css({
10979
11359
  display: 'flex',
10980
11360
  alignItems: 'center',
@@ -10983,14 +11363,34 @@ const Link$1 = (_a) => {
10983
11363
  }) },
10984
11364
  React.createElement("div", null,
10985
11365
  React.createElement("div", { className: styles$7['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle, dangerouslySetInnerHTML: {
10986
- __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)
11366
+ __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)
10987
11367
  } }),
10988
- (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: {
11368
+ (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: {
10989
11369
  __html: setFontForText(customTitle === null || customTitle === void 0 ? void 0 : customTitle.text, customTitle === null || customTitle === void 0 ? void 0 : customTitle.style)
10990
11370
  } }))))));
10991
11371
  };
10992
11372
  var LinkComponent = memo(Link$1);
10993
11373
 
11374
+ /*
11375
+ * @Author: binruan@chatlabs.com
11376
+ * @Date: 2024-08-09 16:59:38
11377
+ * @LastEditors: binruan@chatlabs.com
11378
+ * @LastEditTime: 2024-08-09 16:59:44
11379
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\template\Link\interactionRender.tsx
11380
+ *
11381
+ */
11382
+ var interactionRender$7 = [
11383
+ {
11384
+ title: '点击事件',
11385
+ child: [
11386
+ {
11387
+ type: 'link',
11388
+ name: 'onClick'
11389
+ }
11390
+ ]
11391
+ }
11392
+ ];
11393
+
10994
11394
  var _a;
10995
11395
  const Link = createMaterial(LinkComponent, {
10996
11396
  displayName: '跳转指引',
@@ -10999,7 +11399,8 @@ const Link = createMaterial(LinkComponent, {
10999
11399
  type: 'Link',
11000
11400
  related: {
11001
11401
  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),
11002
- bindableProps: []
11402
+ bindableProps: [],
11403
+ interactionRender: interactionRender$7
11003
11404
  },
11004
11405
  defaulSetting: {
11005
11406
  props: {
@@ -13227,7 +13628,8 @@ const WaterfallFlowItem$1 = (props) => {
13227
13628
  function WaterfallList$1(_a) {
13228
13629
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
13229
13630
  var { reportTagsView, showBanner } = _a, props = __rest(_a, ["reportTagsView", "showBanner"]);
13230
- const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag } = useSxpDataSource();
13631
+ const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag, cacheActiveIndex } = useSxpDataSource();
13632
+ const { jumpToWeb } = useEventReport();
13231
13633
  /** 滚动的父元素 */
13232
13634
  const scrollParent = useRef(null);
13233
13635
  /** 向上滚动的距离 */
@@ -13343,16 +13745,10 @@ function WaterfallList$1(_a) {
13343
13745
  }, [unitWidth, rowsNum, list]); /* 增加getStyleList依赖项会导致在admin预览编辑时无限刷新 */
13344
13746
  /** 初始化请求数据 */
13345
13747
  useEffect(() => {
13346
- var _a, _b;
13748
+ var _a, _b, _c, _d, _e, _f;
13347
13749
  setIsLoadingData(true);
13348
13750
  waterFallData &&
13349
- (getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({
13350
- hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag,
13351
- 'itemFilter.itemId': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId,
13352
- 'itemFilter.itemType': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemType,
13353
- defaultSize: hashTagSize,
13354
- maxSize: hashTagSize
13355
- }).then((res) => {
13751
+ (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) => {
13356
13752
  var _a, _b;
13357
13753
  setData(res);
13358
13754
  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 : []);
@@ -13361,7 +13757,7 @@ function WaterfallList$1(_a) {
13361
13757
  if (isOpenHashTag) {
13362
13758
  const res = previewData;
13363
13759
  setData(res);
13364
- 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 : []);
13760
+ 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 : []);
13365
13761
  setIsLoadingData(false);
13366
13762
  }
13367
13763
  }, [waterFallData, getRecommendVideos, hashTagSize, isOpenHashTag]);
@@ -13387,13 +13783,10 @@ function WaterfallList$1(_a) {
13387
13783
  };
13388
13784
  }, [onResize]);
13389
13785
  useCallback(() => {
13786
+ var _a, _b, _c, _d;
13390
13787
  setIsLoadingData(true);
13391
13788
  waterFallData &&
13392
- (getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({
13393
- hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag,
13394
- 'itemFilter.itemId': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId,
13395
- 'itemFilter.itemType': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemType
13396
- }).then((res) => {
13789
+ (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) => {
13397
13790
  var _a, _b;
13398
13791
  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 : []));
13399
13792
  setIsLoadingData(false);
@@ -13420,10 +13813,12 @@ function WaterfallList$1(_a) {
13420
13813
  };
13421
13814
  }, [onScroll, scrollParent]);
13422
13815
  const handleClickLink = () => {
13423
- var _a, _b;
13816
+ var _a, _b, _c, _d, _e;
13424
13817
  if ((_a = data === null || data === void 0 ? void 0 : data.tag) === null || _a === void 0 ? void 0 : _a.link) {
13425
13818
  reportTagsView();
13426
- window.location.href = window.getJointUtmLink((_b = data === null || data === void 0 ? void 0 : data.tag) === null || _b === void 0 ? void 0 : _b.link);
13819
+ const rec = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec;
13820
+ 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);
13821
+ window.location.href = window.getJointUtmLink((_e = data === null || data === void 0 ? void 0 : data.tag) === null || _e === void 0 ? void 0 : _e.link);
13427
13822
  }
13428
13823
  };
13429
13824
  return (React.createElement(React.Fragment, null, isLoadingData ? (React.createElement("div", { style: { height: '100%', width: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' } },
@@ -13466,7 +13861,7 @@ var img$2 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeA
13466
13861
 
13467
13862
  const WaterfallFlowItem = (props) => {
13468
13863
  const { rec, index, list, reportTagsView, textStyles, space } = props;
13469
- const { swiperRef, setRtcList, setOpenHashtag, bffEventReport, sxpParameter } = useSxpDataSource();
13864
+ const { swiperRef, setRtcList, setOpenHashtag, sxpParameter } = useSxpDataSource();
13470
13865
  const [showVideo, setShowVideo] = useState(false);
13471
13866
  const imgDom = useRef(null);
13472
13867
  const ref = useRef(null);
@@ -13594,38 +13989,30 @@ const WaterfallFlowItem = (props) => {
13594
13989
  function WaterfallList(_a) {
13595
13990
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
13596
13991
  var { reportTagsView, showBanner } = _a, props = __rest(_a, ["reportTagsView", "showBanner"]);
13597
- const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag } = useSxpDataSource();
13992
+ const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag, cacheActiveIndex } = useSxpDataSource();
13993
+ const { jumpToWeb } = useEventReport();
13598
13994
  const [list, setList] = useState();
13599
13995
  const [data, setData] = useState();
13600
13996
  const [isLoadingData, setIsLoadingData] = useState(false);
13601
13997
  const containerRef = useRef(null);
13602
13998
  const [isLoadMore, setIsLoadMore] = useState(false);
13603
13999
  useCallback(() => {
14000
+ var _a, _b, _c, _d;
13604
14001
  if (isLoadMore)
13605
14002
  return;
13606
14003
  setIsLoadMore(true);
13607
14004
  waterFallData &&
13608
- (getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({
13609
- hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag,
13610
- 'itemFilter.itemId': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId,
13611
- 'itemFilter.itemType': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemType
13612
- }).then((res) => {
14005
+ (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) => {
13613
14006
  var _a;
13614
14007
  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 : []));
13615
14008
  setIsLoadMore(false);
13616
14009
  }));
13617
14010
  }, [waterFallData, getRecommendVideos, list, isLoadMore]);
13618
14011
  useEffect(() => {
13619
- var _a, _b;
14012
+ var _a, _b, _c, _d, _e, _f;
13620
14013
  setIsLoadingData(true);
13621
14014
  waterFallData &&
13622
- (getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({
13623
- hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag,
13624
- 'itemFilter.itemId': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId,
13625
- 'itemFilter.itemType': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemType,
13626
- defaultSize: hashTagSize,
13627
- maxSize: hashTagSize
13628
- }).then((res) => {
14015
+ (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) => {
13629
14016
  var _a, _b;
13630
14017
  setData(res);
13631
14018
  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 : []);
@@ -13634,7 +14021,7 @@ function WaterfallList(_a) {
13634
14021
  if (isOpenHashTag) {
13635
14022
  const res = previewData;
13636
14023
  setData(res);
13637
- 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 : []);
14024
+ 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 : []);
13638
14025
  setIsLoadingData(false);
13639
14026
  }
13640
14027
  }, [waterFallData, getRecommendVideos, hashTagSize, isOpenHashTag]);
@@ -13655,10 +14042,12 @@ function WaterfallList(_a) {
13655
14042
  // };
13656
14043
  // }, [isLoadingData, containerRef, loadMoreData]);
13657
14044
  const handleClickLink = () => {
13658
- var _a, _b;
14045
+ var _a, _b, _c, _d, _e;
13659
14046
  if ((_a = data === null || data === void 0 ? void 0 : data.tag) === null || _a === void 0 ? void 0 : _a.link) {
13660
14047
  reportTagsView();
13661
- window.location.href = window.getJointUtmLink((_b = data === null || data === void 0 ? void 0 : data.tag) === null || _b === void 0 ? void 0 : _b.link);
14048
+ const rec = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec;
14049
+ 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);
14050
+ window.location.href = window.getJointUtmLink((_e = data === null || data === void 0 ? void 0 : data.tag) === null || _e === void 0 ? void 0 : _e.link);
13662
14051
  }
13663
14052
  };
13664
14053
  return (React.createElement(React.Fragment, null, isLoadingData ? (React.createElement("div", { style: { height: '100%', width: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' } },
@@ -14725,6 +15114,7 @@ var _materials_ = /*#__PURE__*/Object.freeze({
14725
15114
  CommodityList: CommodityList,
14726
15115
  Consent: Consent,
14727
15116
  HashTag: HashTag,
15117
+ Iframe: Iframe,
14728
15118
  Link: Link,
14729
15119
  MultiCommodity: MultiCommodity,
14730
15120
  MultiCommodityDiro: MultiCommodityDiro,
@@ -15183,14 +15573,6 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
15183
15573
  };
15184
15574
  var VideoWidget$3 = memo(VideoWidget$2);
15185
15575
 
15186
- /*
15187
- * @Author: binruan@chatlabs.com
15188
- * @Date: 2023-12-27 19:02:59
15189
- * @LastEditors: binruan@chatlabs.com
15190
- * @LastEditTime: 2024-01-24 10:30:13
15191
- * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\ToggleButton\index.tsx
15192
- *
15193
- */
15194
15576
  const ToggleButton = ({ defaultValue, activeIcon, unactiveIcon, onChange, style }) => {
15195
15577
  const [isTrue, setIsTure] = useState(defaultValue);
15196
15578
  const handleClick = (e) => {
@@ -15199,6 +15581,9 @@ const ToggleButton = ({ defaultValue, activeIcon, unactiveIcon, onChange, style
15199
15581
  setIsTure(result);
15200
15582
  onChange === null || onChange === void 0 ? void 0 : onChange(result);
15201
15583
  };
15584
+ useEffect(() => {
15585
+ setIsTure(defaultValue);
15586
+ }, [defaultValue]);
15202
15587
  return (React.createElement("button", { style: style, "aria-label": 'toggle button', className: 'pb-toggle-button', onClick: handleClick },
15203
15588
  React.createElement("img", { className: 'pb-toggle-button-icon', alt: 'toggle image', src: isTrue ? activeIcon : unactiveIcon })));
15204
15589
  };
@@ -15577,12 +15962,14 @@ var Tagbar$1 = memo(Tagbar);
15577
15962
  * @Author: binruan@chatlabs.com
15578
15963
  * @Date: 2024-01-15 19:03:09
15579
15964
  * @LastEditors: binruan@chatlabs.com
15580
- * @LastEditTime: 2024-08-02 18:34:27
15965
+ * @LastEditTime: 2024-08-16 11:47:58
15581
15966
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
15582
15967
  *
15583
15968
  */
15584
15969
  const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.innerHeight, containerWidth = window.innerWidth, tempMap, resolver, data = [], ctaType, tipText, nudge, _schema, hashTagStyle, tagList = [], licenseUrl }) => {
15585
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
15970
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
15971
+ const mutedIcon = useIconLink('/pb_static/5beaaa5ce7f3477b99db3838619cc471.png');
15972
+ const unmutedIcon = useIconLink('/pb_static/fea8668a8a894e4aa3a86bcc775e895e.png');
15586
15973
  const { schema } = useEditor();
15587
15974
  const [activeIndex, setActiveIndex] = useState(0);
15588
15975
  const viewImageStartTime = useRef(0);
@@ -15593,11 +15980,10 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
15593
15980
  const [isReload, setIsReload] = useState(new Date().getTime());
15594
15981
  const skipLinkRef = useRef(false);
15595
15982
  const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport, curTime, h5EnterLink, isShowConsent, selectTag, isPreview } = useSxpDataSource();
15596
- const { backMainFeed } = useEventReport();
15597
- const { productView } = useEventReport();
15983
+ const { backMainFeed, productView, jumpToWeb } = useEventReport();
15598
15984
  const isShowFingerTip = useMemo(() => {
15599
- return data.length > 0 && !loading && getFeUserId();
15600
- }, [data, loading]);
15985
+ return data.length > 0 && !loading && (getFeUserId() || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enableSwiperTip));
15986
+ }, [data, loading, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enableSwiperTip]);
15601
15987
  useEffect(() => {
15602
15988
  refreshFeSessionId();
15603
15989
  }, []);
@@ -15625,14 +16011,15 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
15625
16011
  var _a;
15626
16012
  const index = (data === null || data === void 0 ? void 0 : data.findIndex((item) => {
15627
16013
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
15628
- if (ctaType === '多商品CTA') {
16014
+ const ctaType0 = ctaType === null || ctaType === void 0 ? void 0 : ctaType[0];
16015
+ if (ctaType0 === '多商品CTA') {
15629
16016
  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;
15630
16017
  }
15631
- else if (ctaType === '商品CTA') {
16018
+ else if (ctaType0 === '商品CTA') {
15632
16019
  return (_d = item === null || item === void 0 ? void 0 : item.video) === null || _d === void 0 ? void 0 : _d.bindProduct;
15633
16020
  }
15634
16021
  else {
15635
- 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));
16022
+ 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));
15636
16023
  }
15637
16024
  })) || 0;
15638
16025
  (_a = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper.slideTo(index);
@@ -15736,13 +16123,39 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
15736
16123
  const height = useMemo(() => {
15737
16124
  return containerHeight - minusHeight - tagHeight;
15738
16125
  }, [globalConfig, containerHeight, tagHeight]);
16126
+ const visList = useMemo(() => {
16127
+ var _a;
16128
+ const list = activeIndex === 0 && !waterFallData
16129
+ ? [(_a = data === null || data === void 0 ? void 0 : data[0]) !== null && _a !== void 0 ? _a : null]
16130
+ : data === null || data === void 0 ? void 0 : data.map((item, index) => {
16131
+ if (activeIndex === index || index - 1 === activeIndex || index + 1 === activeIndex) {
16132
+ return item;
16133
+ }
16134
+ else {
16135
+ return null;
16136
+ }
16137
+ });
16138
+ return !waterFallData ? list.concat([{ loading: true }]) : list;
16139
+ }, [data, activeIndex, waterFallData]);
15739
16140
  const renderLogo = useMemo(() => {
16141
+ var _a, _b, _c, _d;
15740
16142
  if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
15741
- return (React.createElement("div", { className: 'clc-sxp-logo-banner', style: { backgroundColor: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.color } },
16143
+ 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;
16144
+ 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';
16145
+ const rec = visList[activeIndex];
16146
+ return (React.createElement("div", Object.assign({ className: 'clc-sxp-logo-banner', style: { backgroundColor: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.color } }, (link && {
16147
+ onClick: () => {
16148
+ var _a, _b, _c, _d;
16149
+ if (isExternalLink) {
16150
+ 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));
16151
+ }
16152
+ new Function(link)();
16153
+ }
16154
+ })),
15742
16155
  React.createElement("img", { src: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl, alt: 'logo' })));
15743
16156
  }
15744
16157
  return null;
15745
- }, [globalConfig]);
16158
+ }, [globalConfig, activeIndex, visList]);
15746
16159
  const renderContent = useCallback((rec, index) => {
15747
16160
  var _a, _b, _c, _d;
15748
16161
  if ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.url) {
@@ -15818,9 +16231,9 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
15818
16231
  isShowMore,
15819
16232
  lineGradStyle
15820
16233
  ]);
15821
- const renderLikeButton = useCallback((rec, index) => {
16234
+ const renderLikeButton = useCallback((rec, index, visible) => {
15822
16235
  var _a, _b, _c, _d;
15823
- if (!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLike))
16236
+ if (!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLike) || !visible)
15824
16237
  return;
15825
16238
  let top = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconY) !== null && _a !== void 0 ? _a : 400;
15826
16239
  if (waterFallData && top < 40) {
@@ -15828,6 +16241,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
15828
16241
  }
15829
16242
  if (rec === null || rec === void 0 ? void 0 : rec.video) {
15830
16243
  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: {
16244
+ position: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconFixed) ? 'fixed' : 'absolute',
15831
16245
  [(_b = globalConfig.likeIconXPosit) !== null && _b !== void 0 ? _b : 'right']: (_c = globalConfig.likeIconX) !== null && _c !== void 0 ? _c : 0,
15832
16246
  [(_d = globalConfig.likeIconYPosit) !== null && _d !== void 0 ? _d : 'bottom']: top
15833
16247
  }, position: index }));
@@ -15878,7 +16292,6 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
15878
16292
  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 : ''
15879
16293
  }
15880
16294
  });
15881
- setSlideSkipState();
15882
16295
  skipLinkRef.current = true;
15883
16296
  window.location.href = window.getJointUtmLink(link);
15884
16297
  }
@@ -15964,20 +16377,18 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
15964
16377
  });
15965
16378
  }
15966
16379
  };
15967
- const visList = useMemo(() => {
15968
- var _a;
15969
- const list = activeIndex === 0 && !waterFallData
15970
- ? [(_a = data === null || data === void 0 ? void 0 : data[0]) !== null && _a !== void 0 ? _a : null]
15971
- : data === null || data === void 0 ? void 0 : data.map((item, index) => {
15972
- if (activeIndex === index || index - 1 === activeIndex || index + 1 === activeIndex) {
15973
- return item;
15974
- }
15975
- else {
15976
- return null;
15977
- }
15978
- });
15979
- return !waterFallData ? list.concat([{ loading: true }]) : list;
15980
- }, [data, activeIndex, waterFallData]);
16380
+ const renderToggleButton = useCallback((visible) => {
16381
+ var _a, _b, _c, _d, _e, _f;
16382
+ if (!visible)
16383
+ return;
16384
+ 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: {
16385
+ position: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed) ? 'fixed' : 'absolute',
16386
+ 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',
16387
+ zIndex: 999,
16388
+ [(_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,
16389
+ [(_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
16390
+ }, 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 })));
16391
+ }, [globalConfig, visList, activeIndex, isMuted]);
15981
16392
  const renderView = useMemo(() => {
15982
16393
  if (loading) {
15983
16394
  return (React.createElement("div", { style: { height, width: containerWidth, display: 'flex', justifyContent: 'center', alignItems: 'center' } },
@@ -15994,20 +16405,30 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
15994
16405
  React.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } }))) : (React.createElement(React.Fragment, null,
15995
16406
  renderContent(rec, index),
15996
16407
  renderBottom(rec, index),
15997
- renderLikeButton(rec, index)))))));
16408
+ renderLikeButton(rec, index, !(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconFixed)),
16409
+ renderToggleButton(!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed))))))));
15998
16410
  });
15999
- }, [containerWidth, data, height, loading, renderBottom, renderContent, visList, loadingImage, isReload]);
16000
- const mutedIcon = useIconLink('/pb_static/5beaaa5ce7f3477b99db3838619cc471.png');
16001
- const unmutedIcon = useIconLink('/pb_static/fea8668a8a894e4aa3a86bcc775e895e.png');
16411
+ }, [
16412
+ containerWidth,
16413
+ data,
16414
+ height,
16415
+ loading,
16416
+ renderBottom,
16417
+ renderContent,
16418
+ visList,
16419
+ loadingImage,
16420
+ isReload,
16421
+ renderToggleButton
16422
+ ]);
16002
16423
  return (React.createElement("div", { id: 'sxp-render', className: 'clc-sxp-container' },
16003
- waterFallData && (React.createElement(Navbar$1, { icon: img, styles: { background: 'rgba(0,0,0,.3)', color: '#fff' }, onClose: () => {
16424
+ 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: () => {
16004
16425
  setOpenHashtag === null || setOpenHashtag === void 0 ? void 0 : setOpenHashtag(true);
16005
16426
  } })),
16006
16427
  renderLogo,
16007
16428
  React.createElement(Tagbar$1, { tagList: tagList, setActiveIndex: setActiveIndex, style: {
16008
16429
  top: minusHeight
16009
16430
  } }),
16010
- 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,
16431
+ 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,
16011
16432
  React.createElement(Swiper, { style: {
16012
16433
  marginTop: tagHeight
16013
16434
  }, ref: swiperRef, onSlideChange: () => {
@@ -16032,15 +16453,10 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
16032
16453
  }
16033
16454
  }
16034
16455
  }, direction: 'vertical', height: height },
16035
- ((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: {
16036
- position: 'fixed',
16037
- 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',
16038
- zIndex: 999,
16039
- [(_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,
16040
- [(_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
16041
- }, 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 })),
16456
+ renderLikeButton(visList[activeIndex], activeIndex, !!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconFixed)),
16457
+ renderToggleButton(!!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed)),
16042
16458
  renderView),
16043
- 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))));
16459
+ 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))));
16044
16460
  };
16045
16461
 
16046
16462
  const PictureGroup = ({ imgUrls, width, height, imgUrlsPostConfig, rec, index }) => {
@@ -16407,7 +16823,7 @@ var index$1 = memo(DiyPortalPreview);
16407
16823
  * @Author: binruan@chatlabs.com
16408
16824
  * @Date: 2023-10-31 10:56:01
16409
16825
  * @LastEditors: binruan@chatlabs.com
16410
- * @LastEditTime: 2024-08-01 15:23:51
16826
+ * @LastEditTime: 2024-08-06 17:15:56
16411
16827
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Popup\index.tsx
16412
16828
  *
16413
16829
  */
@@ -16466,14 +16882,14 @@ const Popup = () => {
16466
16882
  const renderPopupDetail = useMemo(() => {
16467
16883
  var _a, _b, _c;
16468
16884
  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) => {
16469
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
16885
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
16470
16886
  if ((value === null || value === void 0 ? void 0 : value.id) === (popup === null || popup === void 0 ? void 0 : popup.id)) {
16471
16887
  const t = resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type];
16472
16888
  const Component = withBindDataSource(t);
16473
16889
  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';
16474
16890
  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';
16475
16891
  const defaulSetting = (_h = t === null || t === void 0 ? void 0 : t.extend) === null || _h === void 0 ? void 0 : _h.defaulSetting;
16476
- 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 })));
16892
+ 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 })));
16477
16893
  }
16478
16894
  else {
16479
16895
  return React.createElement(React.Fragment, null);