pb-sxp-ui 1.2.10 → 1.3.0

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 (108) hide show
  1. package/dist/index.cjs +595 -308
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.css +62 -2
  4. package/dist/index.js +595 -308
  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 +595 -308
  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 +33 -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 +5 -14
  19. package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +5 -14
  20. package/es/core/components/SxpPageRender/index.d.ts +6 -1
  21. package/es/core/components/SxpPageRender/index.js +46 -23
  22. package/es/core/components/SxpPageRender/typing.d.ts +2 -0
  23. package/es/core/context/SxpDataSourceProvider.d.ts +3 -2
  24. package/es/core/context/SxpDataSourceProvider.js +27 -30
  25. package/es/core/hooks/useEventReport.js +9 -8
  26. package/es/core/utils/tool.d.ts +5 -1
  27. package/es/core/utils/tool.js +69 -1
  28. package/es/materials/sxp/HashTag/settingRender.d.ts +7 -6
  29. package/es/materials/sxp/HashTag/settingRender.js +0 -9
  30. package/es/materials/sxp/cta/AniLink/settingRender.d.ts +0 -5
  31. package/es/materials/sxp/cta/AniLink/settingRender.js +0 -4
  32. package/es/materials/sxp/popup/AppointForm/settingRender.d.ts +5 -8
  33. package/es/materials/sxp/popup/AppointForm/settingRender.js +15 -12
  34. package/es/materials/sxp/popup/CommodityDetail/index.d.ts +10 -1
  35. package/es/materials/sxp/popup/CommodityDetail/index.js +46 -28
  36. package/es/materials/sxp/popup/CommodityDetail/material.js +4 -0
  37. package/es/materials/sxp/popup/CommodityDetail/settingRender.d.ts +19 -6
  38. package/es/materials/sxp/popup/CommodityDetail/settingRender.js +45 -8
  39. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +10 -1
  40. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +72 -46
  41. package/es/materials/sxp/popup/CommodityDetailDiroNew/material.js +4 -0
  42. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +19 -6
  43. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +45 -8
  44. package/es/materials/sxp/popup/CommodityList/settingRender.js +15 -4
  45. package/es/materials/sxp/popup/Iframe/index.d.ts +16 -0
  46. package/es/materials/sxp/popup/Iframe/index.js +18 -0
  47. package/es/materials/sxp/popup/Iframe/material.d.ts +2 -0
  48. package/es/materials/sxp/popup/Iframe/material.js +21 -0
  49. package/es/materials/sxp/popup/Iframe/settingRender.d.ts +9 -0
  50. package/es/materials/sxp/popup/Iframe/settingRender.js +12 -0
  51. package/es/materials/sxp/popup/Prompt/settingRender.js +16 -11
  52. package/es/materials/sxp/popup/index.d.ts +1 -0
  53. package/es/materials/sxp/popup/index.js +1 -0
  54. package/es/materials/sxp/template/Link/index.js +5 -11
  55. package/es/materials/sxp/template/Link/interactionRender.d.ts +8 -0
  56. package/es/materials/sxp/template/Link/interactionRender.js +11 -0
  57. package/es/materials/sxp/template/Link/material.js +3 -1
  58. package/es/materials/sxp/template/Link/settingRender.js +0 -5
  59. package/es/materials/sxp/template/components/EventProvider.d.ts +3 -2
  60. package/es/materials/sxp/template/components/EventProvider.js +3 -3
  61. package/lib/core/components/SxpPageRender/FormatImage.js +1 -1
  62. package/lib/core/components/SxpPageRender/Modal/index.js +33 -20
  63. package/lib/core/components/SxpPageRender/Popup/index.js +2 -2
  64. package/lib/core/components/SxpPageRender/ToggleButton/index.js +3 -0
  65. package/lib/core/components/SxpPageRender/WaterFall/List.js +5 -14
  66. package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +5 -14
  67. package/lib/core/components/SxpPageRender/index.d.ts +6 -1
  68. package/lib/core/components/SxpPageRender/index.js +46 -23
  69. package/lib/core/components/SxpPageRender/typing.d.ts +2 -0
  70. package/lib/core/context/SxpDataSourceProvider.d.ts +3 -2
  71. package/lib/core/context/SxpDataSourceProvider.js +27 -30
  72. package/lib/core/hooks/useEventReport.js +9 -8
  73. package/lib/core/utils/tool.d.ts +5 -1
  74. package/lib/core/utils/tool.js +73 -1
  75. package/lib/materials/sxp/HashTag/settingRender.d.ts +7 -6
  76. package/lib/materials/sxp/HashTag/settingRender.js +0 -9
  77. package/lib/materials/sxp/cta/AniLink/settingRender.d.ts +0 -5
  78. package/lib/materials/sxp/cta/AniLink/settingRender.js +0 -4
  79. package/lib/materials/sxp/popup/AppointForm/settingRender.d.ts +5 -8
  80. package/lib/materials/sxp/popup/AppointForm/settingRender.js +15 -12
  81. package/lib/materials/sxp/popup/CommodityDetail/index.d.ts +10 -1
  82. package/lib/materials/sxp/popup/CommodityDetail/index.js +46 -28
  83. package/lib/materials/sxp/popup/CommodityDetail/material.js +4 -0
  84. package/lib/materials/sxp/popup/CommodityDetail/settingRender.d.ts +19 -6
  85. package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +45 -8
  86. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +10 -1
  87. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +72 -46
  88. package/lib/materials/sxp/popup/CommodityDetailDiroNew/material.js +4 -0
  89. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +19 -6
  90. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +45 -8
  91. package/lib/materials/sxp/popup/CommodityList/settingRender.js +15 -4
  92. package/lib/materials/sxp/popup/Iframe/index.d.ts +16 -0
  93. package/lib/materials/sxp/popup/Iframe/index.js +20 -0
  94. package/lib/materials/sxp/popup/Iframe/material.d.ts +2 -0
  95. package/lib/materials/sxp/popup/Iframe/material.js +25 -0
  96. package/lib/materials/sxp/popup/Iframe/settingRender.d.ts +9 -0
  97. package/lib/materials/sxp/popup/Iframe/settingRender.js +14 -0
  98. package/lib/materials/sxp/popup/Prompt/settingRender.js +16 -11
  99. package/lib/materials/sxp/popup/index.d.ts +1 -0
  100. package/lib/materials/sxp/popup/index.js +1 -0
  101. package/lib/materials/sxp/template/Link/index.js +5 -11
  102. package/lib/materials/sxp/template/Link/interactionRender.d.ts +8 -0
  103. package/lib/materials/sxp/template/Link/interactionRender.js +13 -0
  104. package/lib/materials/sxp/template/Link/material.js +3 -1
  105. package/lib/materials/sxp/template/Link/settingRender.js +0 -5
  106. package/lib/materials/sxp/template/components/EventProvider.d.ts +3 -2
  107. package/lib/materials/sxp/template/components/EventProvider.js +3 -3
  108. package/package.json +1 -1
package/dist/pb-ui.js CHANGED
@@ -232,6 +232,87 @@
232
232
  }
233
233
  return content;
234
234
  };
235
+ function getBrowserInfo() {
236
+ var _a, _b, _c, _d, _e, _f, _g;
237
+ let userAgent = self.navigator.userAgent;
238
+ if (!userAgent)
239
+ return 'Unknown';
240
+ if (/edge\/([\d\.]+)/i.exec(userAgent))
241
+ return `Edge ${(_a = /edge\/([\d\.]+)/i.exec(userAgent)) === null || _a === void 0 ? void 0 : _a[1]}`;
242
+ if (/edg\/([\d\.]+)/i.exec(userAgent))
243
+ return `Edge(Chromium) ${(_b = /edge\/([\d\.]+)/i.exec(userAgent)) === null || _b === void 0 ? void 0 : _b[1]}`;
244
+ if (/msie/i.test(userAgent))
245
+ return `Internet Explorer ${(_c = /msie ([\d\.]+)/i.exec(userAgent)) === null || _c === void 0 ? void 0 : _c[1]}`;
246
+ if (/Trident/i.test(userAgent))
247
+ return `Internet Explorer ${(_d = /rv:([\d\.]+)/i.exec(userAgent)) === null || _d === void 0 ? void 0 : _d[1]}`;
248
+ if (/chrome/i.test(userAgent))
249
+ return `Chrome ${(_e = /chrome\/([\d\.]+)/i.exec(userAgent)) === null || _e === void 0 ? void 0 : _e[1]}`;
250
+ if (/firefox/i.test(userAgent))
251
+ return `Firefox ${(_f = /firefox\/([\d\.]+)/i.exec(userAgent)) === null || _f === void 0 ? void 0 : _f[1]}`;
252
+ if (/safari/i.test(userAgent))
253
+ return `Safari ${(_g = /version\/([\d\.]+)/i.exec(userAgent)) === null || _g === void 0 ? void 0 : _g[1]}`;
254
+ return 'Unknown';
255
+ }
256
+ function getSystem() {
257
+ var _a, _b, _c;
258
+ let userAgent = self.navigator.userAgent;
259
+ if (!userAgent)
260
+ return 'Unknown';
261
+ if (/iphone/i.test(userAgent))
262
+ return `IOS ${(_a = userAgent.match(/OS\s(.*?)\slike/)) === null || _a === void 0 ? void 0 : _a[1]}`;
263
+ if (/android/i.test(userAgent))
264
+ return `Android ${(_b = userAgent.match(/Android\s(.*?)\;/)) === null || _b === void 0 ? void 0 : _b[1]}`;
265
+ if (/windows/i.test(userAgent))
266
+ return `Windows ${(_c = userAgent.match(/Windows\s(.*?)\;/)) === null || _c === void 0 ? void 0 : _c[1]}`;
267
+ if (/mac/i.test(userAgent))
268
+ return `Mac OS`;
269
+ return 'Unknown';
270
+ }
271
+ function getDevice$1() {
272
+ let userAgent = self.navigator.userAgent;
273
+ if (!userAgent)
274
+ return 'Unknown';
275
+ if (/iphone/i.test(userAgent))
276
+ return `iPhone`;
277
+ if (/android/i.test(userAgent)) {
278
+ // var index1 = userAgent.indexOf(';');
279
+ // var index2 = userAgent.indexOf(';', index1 + 1);
280
+ // var index3 = userAgent.indexOf(';', index2 + 1);
281
+ // var index4 = userAgent.indexOf(';', index3 + 1);
282
+ // if (index2 !== -1 && index3 !== -1) {
283
+ // var value1 = userAgent.substring(index3 + 1, index4);
284
+ // return `${value1}`;
285
+ // }
286
+ var index1 = userAgent.indexOf('(');
287
+ var index2 = userAgent.indexOf(')');
288
+ if (index1 !== -1 && index2 !== -1) {
289
+ var value = userAgent.substring(index1 + 1, index2);
290
+ return `${value}`;
291
+ }
292
+ }
293
+ if (/windows/i.test(userAgent))
294
+ return `Windows`;
295
+ if (/mac/i.test(userAgent))
296
+ return `Mac`;
297
+ return 'Unknown';
298
+ }
299
+ function getCookie(val) {
300
+ // const expirationDate = new Date();
301
+ // expirationDate.setDate(expirationDate.getDate() + 100);
302
+ // document.cookie = `_fbc=IwAR2F4-dbP0l7Mn1IawQQGCINEz7PYXQvwjNwB_qa2ofrHyiLjcbCRxTDGrc; expires=${expirationDate.toUTCString()}; path=/`;
303
+ const cookies = document.cookie;
304
+ // 将cookie字符串拆分成数组
305
+ const cookieArray = cookies.split(';');
306
+ let value = null;
307
+ // 遍历cookie数组,查找名为_fbc的cookie
308
+ cookieArray.forEach((cookie) => {
309
+ const [cookieName, cookieValue] = cookie.trim().split('=');
310
+ if (cookieName === val) {
311
+ value = cookieValue;
312
+ }
313
+ });
314
+ return value !== null && value !== void 0 ? value : '';
315
+ }
235
316
 
236
317
  function unzip(b64Data) {
237
318
  const strData = atob(b64Data);
@@ -547,7 +628,7 @@
547
628
  DataSourceType[DataSourceType["BFF"] = 5] = "BFF";
548
629
  })(DataSourceType || (DataSourceType = {}));
549
630
  const DEFAULT_TAG = 'FOR U';
550
- const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false, enabledMetaConversionApi = false, consentHeight, consentWidth, isShowTag = true, isOpenConsent = false, globalConfig, isEditor = false, utmParameter }) => {
631
+ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false, enabledMetaConversionApi = false, consentHeight, consentWidth, isShowTag = true, isOpenConsent = false, globalConfig, isEditor = false, utmParameter, channelQueryList }) => {
551
632
  var _a, _b, _c;
552
633
  const [rtcList, setRtcList] = React.useState([]);
553
634
  const [tagList, setTagList] = React.useState([]);
@@ -631,15 +712,7 @@
631
712
  // 获取推荐视频数据
632
713
  const getRecommendVideos = React.useCallback((query) => __awaiter(void 0, void 0, void 0, function* () {
633
714
  var _d, _e, _f, _g, _h;
634
- query = {
635
- maxSize: (_d = query === null || query === void 0 ? void 0 : query.maxSize) !== null && _d !== void 0 ? _d : maxSize,
636
- defaultSize: (_e = query === null || query === void 0 ? void 0 : query.defaultSize) !== null && _e !== void 0 ? _e : defaultSize,
637
- 'itemFilter.itemId': query === null || query === void 0 ? void 0 : query['itemFilter.itemId'],
638
- 'itemFilter.itemType': query === null || query === void 0 ? void 0 : query['itemFilter.itemType'],
639
- hashTag: query === null || query === void 0 ? void 0 : query.hashTag,
640
- traceInfo: query === null || query === void 0 ? void 0 : query.traceInfo,
641
- themeTag: query === null || query === void 0 ? void 0 : query.themeTag
642
- };
715
+ query = Object.assign(Object.assign({ maxSize: (_d = query === null || query === void 0 ? void 0 : query.maxSize) !== null && _d !== void 0 ? _d : maxSize, defaultSize: (_e = query === null || query === void 0 ? void 0 : query.defaultSize) !== null && _e !== void 0 ? _e : defaultSize, hashTag: query === null || query === void 0 ? void 0 : query.hashTag, traceInfo: query === null || query === void 0 ? void 0 : query.traceInfo, themeTag: query === null || query === void 0 ? void 0 : query.themeTag }, ((query === null || query === void 0 ? void 0 : query.contentFilter) && { contentFilter: `[${query === null || query === void 0 ? void 0 : query.contentFilter}]` })), ((query === null || query === void 0 ? void 0 : query.productFilter) && { productFilter: `[${query === null || query === void 0 ? void 0 : query.productFilter}]` }));
643
716
  if (utmVal) {
644
717
  const val = (_h = (_g = (_f = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _f === void 0 ? void 0 : _f.filter((val) => {
645
718
  var _a, _b;
@@ -648,6 +721,9 @@
648
721
  })) === null || _g === void 0 ? void 0 : _g.join('&')) !== null && _h !== void 0 ? _h : '';
649
722
  query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(val) });
650
723
  }
724
+ if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) || isEditor) {
725
+ query = Object.assign(Object.assign(Object.assign({}, query), { directPage: true, level: 1, pageNum: 1 }), (!utmVal && channelQueryList && (channelQueryList === null || channelQueryList === void 0 ? void 0 : channelQueryList.length) > 0 && { channel: channelQueryList === null || channelQueryList === void 0 ? void 0 : channelQueryList.join('&') }));
726
+ }
651
727
  const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/list', { method: 'GET', query }));
652
728
  if (!(result === null || result === void 0 ? void 0 : result.success)) {
653
729
  return undefined;
@@ -655,23 +731,20 @@
655
731
  if (!(query === null || query === void 0 ? void 0 : query.hashTag))
656
732
  setCurReqInfo({ rtc: result.data.rtc, requestId: result.data.requestId });
657
733
  return result === null || result === void 0 ? void 0 : result.data;
658
- }), [bffFetch, utmVal, maxSize, defaultSize]);
734
+ }), [bffFetch, utmVal, maxSize, defaultSize, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview, channelQueryList, isEditor]);
659
735
  const loadVideos = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
736
+ var _j, _k, _l, _m;
660
737
  if (rtcList.length <= 0) {
661
738
  return;
662
739
  }
663
- const data = yield getRecommendVideos({
664
- hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag,
665
- 'itemFilter.itemId': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId,
666
- 'itemFilter.itemType': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemType,
667
- themeTag: themeTag.current
668
- });
740
+ const lastItem = rtcList === null || rtcList === void 0 ? void 0 : rtcList[(rtcList === null || rtcList === void 0 ? void 0 : rtcList.length) - 1];
741
+ const data = yield getRecommendVideos(Object.assign(Object.assign(Object.assign({ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag }, (((_j = lastItem === null || lastItem === void 0 ? void 0 : lastItem.product) === null || _j === void 0 ? void 0 : _j.itemId) && { productFilter: (_k = lastItem === null || lastItem === void 0 ? void 0 : lastItem.product) === null || _k === void 0 ? void 0 : _k.itemId })), (((_l = lastItem === null || lastItem === void 0 ? void 0 : lastItem.video) === null || _l === void 0 ? void 0 : _l.itemId) && { contentFilter: (_m = lastItem === null || lastItem === void 0 ? void 0 : lastItem.video) === null || _m === void 0 ? void 0 : _m.itemId })), { themeTag: themeTag.current }));
669
742
  setRtcList(rtcList.concat(getFilterRecList(data)));
670
743
  setCacheRtcList(cacheRtcList.concat(getFilterRecList(data)));
671
744
  }), [getRecommendVideos, rtcList, waterFallData, cacheRtcList]);
672
745
  const bffEventReport = React.useCallback(({ userInfo, eventInfo }) => {
673
746
  // 关闭 BFF 事件上报
674
- if (!enableReportEvent) {
747
+ if (!enableReportEvent || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview)) {
675
748
  return;
676
749
  }
677
750
  // 用户信息都是公共的
@@ -682,7 +755,7 @@
682
755
  };
683
756
  }
684
757
  const sessionID = storeAndLoadFeSessionId();
685
- const ef = Object.assign({ sessionID, rtc: curReqInfo.rtc, requestId: curReqInfo.requestId }, eventInfo);
758
+ const ef = Object.assign(Object.assign({ sessionID, rtc: curReqInfo.rtc, requestId: curReqInfo.requestId }, eventInfo), { sxpDevice: getDevice$1(), sxpSystem: getSystem(), sxpBrowser: getBrowserInfo() });
686
759
  const realUserInfo = Object.entries(userInfo).map(([k, v]) => ({ name: k, value: v }));
687
760
  const realEventInfo = Object.entries(ef)
688
761
  .map(([k, v]) => v && { name: k, value: v })
@@ -696,11 +769,11 @@
696
769
  body: { userInfo: realUserInfo, eventInfo: realEventInfo },
697
770
  type: 'beacon'
698
771
  });
699
- }, [bffFetch, curReqInfo, enableReportEvent]);
772
+ }, [bffFetch, curReqInfo, enableReportEvent, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview]);
700
773
  const bffFbReport = React.useCallback((_a) => {
701
- var _b;
774
+ var _b, _c;
702
775
  var { eventName, actionSource = 'website', eventSourceUrl = (_b = window === null || window === void 0 ? void 0 : window.location) === null || _b === void 0 ? void 0 : _b.href, externalId } = _a;
703
- if (!enableReportEvent || !enabledMetaConversionApi) {
776
+ if (!enableReportEvent || !enabledMetaConversionApi || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview)) {
704
777
  return;
705
778
  }
706
779
  const fakeUserId = storeAndLoadFeUserId();
@@ -711,12 +784,15 @@
711
784
  actionSource,
712
785
  eventSourceUrl,
713
786
  userData: {
714
- externalId: fakeUserId
787
+ externalId: fakeUserId,
788
+ fbc: `fb.2.${new Date().getTime()}.${getCookie('_fbc')}`,
789
+ fbp: `fb.2.${new Date().getTime()}.${getCookie('_fbp')}`,
790
+ client_user_agent: (_c = window === null || window === void 0 ? void 0 : window.navigator) === null || _c === void 0 ? void 0 : _c.userAgent
715
791
  }
716
792
  },
717
793
  type: 'beacon'
718
794
  });
719
- }, [bffFetch, enableReportEvent, enabledMetaConversionApi]);
795
+ }, [bffFetch, enableReportEvent, enabledMetaConversionApi, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview]);
720
796
  const bffMutateLike = React.useCallback((body) => __awaiter(void 0, void 0, void 0, function* () {
721
797
  const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/like', { method: 'POST', body }));
722
798
  return res === null || res === void 0 ? void 0 : res.success;
@@ -731,24 +807,24 @@
731
807
  }), [bffFetch]);
732
808
  // 获取 Tag
733
809
  const bffGetTagList = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
734
- var _j, _k, _l, _m, _o;
810
+ var _o, _p, _q, _r, _s;
735
811
  if (!utmVal || !isShowTag)
736
812
  return;
737
813
  try {
738
- const val = (_l = (_k = (_j = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _j === void 0 ? void 0 : _j.filter((val) => {
814
+ const val = (_q = (_p = (_o = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _o === void 0 ? void 0 : _o.filter((val) => {
739
815
  var _a, _b;
740
816
  const key = val.split('=')[0];
741
817
  return (_b = ((_a = utmParameter === null || utmParameter === void 0 ? void 0 : utmParameter.channels) !== null && _a !== void 0 ? _a : [])) === null || _b === void 0 ? void 0 : _b.includes(key);
742
- })) === null || _k === void 0 ? void 0 : _k.join('&')) !== null && _l !== void 0 ? _l : '';
818
+ })) === null || _p === void 0 ? void 0 : _p.join('&')) !== null && _q !== void 0 ? _q : '';
743
819
  const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/tag/list', { method: 'GET', query: { channel: decodeURIComponent(val) } }));
744
- setTagList((_o = (_m = result === null || result === void 0 ? void 0 : result.data) === null || _m === void 0 ? void 0 : _m.tags) !== null && _o !== void 0 ? _o : []);
820
+ setTagList((_s = (_r = result === null || result === void 0 ? void 0 : result.data) === null || _r === void 0 ? void 0 : _r.tags) !== null && _s !== void 0 ? _s : []);
745
821
  }
746
822
  catch (e) {
747
823
  console.log('e', e);
748
824
  }
749
825
  }), [bffFetch, utmVal, isShowTag]);
750
826
  const ctaEvent = React.useCallback((eventInfo, rec, product, position) => {
751
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3;
827
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11;
752
828
  const cta = product === null || product === void 0 ? void 0 : product.bindCta;
753
829
  const isProd = ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.bindProduct) || (((_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.bindProducts) && ((_d = (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProducts) === null || _d === void 0 ? void 0 : _d.length) > 0);
754
830
  let fromKName = '';
@@ -761,8 +837,9 @@
761
837
  else if ((_g = (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.imgUrls) === null || _g === void 0 ? void 0 : _g.length) {
762
838
  fromKName = 'imagePage';
763
839
  }
840
+ const contentTags = (_p = (_m = (_h = product === null || product === void 0 ? void 0 : product.tags) !== null && _h !== void 0 ? _h : (_l = (_k = (_j = rec === null || rec === void 0 ? void 0 : rec.video) === null || _j === void 0 ? void 0 : _j.bindProducts) === null || _k === void 0 ? void 0 : _k[0]) === null || _l === void 0 ? void 0 : _l.tags) !== null && _m !== void 0 ? _m : (_o = rec === null || rec === void 0 ? void 0 : rec.video) === null || _o === void 0 ? void 0 : _o.tags) !== null && _p !== void 0 ? _p : (_q = rec === null || rec === void 0 ? void 0 : rec.product) === null || _q === void 0 ? void 0 : _q.tags;
764
841
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
765
- eventInfo: Object.assign(Object.assign({}, eventInfo), { ctaId: (_h = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _h !== void 0 ? _h : '', ctaName: (_j = cta === null || cta === void 0 ? void 0 : cta.title) !== null && _j !== void 0 ? _j : '', contentTags: JSON.stringify(cta === null || cta === void 0 ? void 0 : cta.tags), position: position + '', contentId: (_l = (_k = rec === null || rec === void 0 ? void 0 : rec.video) === null || _k === void 0 ? void 0 : _k.itemId) !== null && _l !== void 0 ? _l : '', productId: isProd ? product === null || product === void 0 ? void 0 : product.itemId : '', traceInfo: (_2 = (_z = (_u = (_q = (_m = cta === null || cta === void 0 ? void 0 : cta.traceInfo) !== null && _m !== void 0 ? _m : (_p = (_o = rec === null || rec === void 0 ? void 0 : rec.video) === null || _o === void 0 ? void 0 : _o.bindCta) === null || _p === void 0 ? void 0 : _p.traceInfo) !== null && _q !== void 0 ? _q : (_t = (_s = (_r = rec === null || rec === void 0 ? void 0 : rec.video) === null || _r === void 0 ? void 0 : _r.bindProduct) === null || _s === void 0 ? void 0 : _s.bindCta) === null || _t === void 0 ? void 0 : _t.traceInfo) !== null && _u !== void 0 ? _u : (_y = (_x = (_w = (_v = rec === null || rec === void 0 ? void 0 : rec.video) === null || _v === void 0 ? void 0 : _v.bindProducts) === null || _w === void 0 ? void 0 : _w[0]) === null || _x === void 0 ? void 0 : _x.bindCta) === null || _y === void 0 ? void 0 : _y.traceInfo) !== null && _z !== void 0 ? _z : (_1 = (_0 = rec === null || rec === void 0 ? void 0 : rec.product) === null || _0 === void 0 ? void 0 : _0.bindCta) === null || _1 === void 0 ? void 0 : _1.traceInfo) !== null && _2 !== void 0 ? _2 : '', fromKName, fromKPage: (_3 = location === null || location === void 0 ? void 0 : location.href) !== null && _3 !== void 0 ? _3 : '' })
842
+ eventInfo: Object.assign(Object.assign({}, eventInfo), { ctaId: (_r = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _r !== void 0 ? _r : '', ctaName: (_s = cta === null || cta === void 0 ? void 0 : cta.title) !== null && _s !== void 0 ? _s : '', contentTags: contentTags ? JSON.stringify(contentTags) : '', position: position + '', contentId: (_u = (_t = rec === null || rec === void 0 ? void 0 : rec.video) === null || _t === void 0 ? void 0 : _t.itemId) !== null && _u !== void 0 ? _u : '', productId: isProd ? product === null || product === void 0 ? void 0 : product.itemId : '', traceInfo: (_10 = (_7 = (_2 = (_y = (_v = cta === null || cta === void 0 ? void 0 : cta.traceInfo) !== null && _v !== void 0 ? _v : (_x = (_w = rec === null || rec === void 0 ? void 0 : rec.video) === null || _w === void 0 ? void 0 : _w.bindCta) === null || _x === void 0 ? void 0 : _x.traceInfo) !== null && _y !== void 0 ? _y : (_1 = (_0 = (_z = rec === null || rec === void 0 ? void 0 : rec.video) === null || _z === void 0 ? void 0 : _z.bindProduct) === null || _0 === void 0 ? void 0 : _0.bindCta) === null || _1 === void 0 ? void 0 : _1.traceInfo) !== null && _2 !== void 0 ? _2 : (_6 = (_5 = (_4 = (_3 = rec === null || rec === void 0 ? void 0 : rec.video) === null || _3 === void 0 ? void 0 : _3.bindProducts) === null || _4 === void 0 ? void 0 : _4[0]) === null || _5 === void 0 ? void 0 : _5.bindCta) === null || _6 === void 0 ? void 0 : _6.traceInfo) !== null && _7 !== void 0 ? _7 : (_9 = (_8 = rec === null || rec === void 0 ? void 0 : rec.product) === null || _8 === void 0 ? void 0 : _8.bindCta) === null || _9 === void 0 ? void 0 : _9.traceInfo) !== null && _10 !== void 0 ? _10 : '', fromKName, fromKPage: (_11 = location === null || location === void 0 ? void 0 : location.href) !== null && _11 !== void 0 ? _11 : '' })
766
843
  });
767
844
  }, [bffEventReport, isFromHashtag]);
768
845
  const h5EnterLink = React.useCallback(() => {
@@ -1114,7 +1191,7 @@
1114
1191
  EditorCore: EditorCore
1115
1192
  });
1116
1193
 
1117
- var interactionRender$d = [
1194
+ var interactionRender$e = [
1118
1195
  {
1119
1196
  title: '点击事件',
1120
1197
  child: [
@@ -1130,11 +1207,26 @@
1130
1207
  * @Author: binruan@chatlabs.com
1131
1208
  * @Date: 2023-07-28 18:29:57
1132
1209
  * @LastEditors: binruan@chatlabs.com
1133
- * @LastEditTime: 2024-08-06 14:13:47
1210
+ * @LastEditTime: 2024-08-06 15:35:25
1134
1211
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\AppointForm\settingRender.tsx
1135
1212
  *
1136
1213
  */
1137
- var settingRender$9 = [
1214
+ var settingRender$a = [
1215
+ {
1216
+ title: '弹窗背景',
1217
+ child: [
1218
+ {
1219
+ type: 'Number',
1220
+ label: '左右边距',
1221
+ name: ['props', 'popupBg', 'horizontalMargin']
1222
+ },
1223
+ {
1224
+ type: 'Number',
1225
+ label: '下边距',
1226
+ name: ['props', 'popupBg', 'bottomMargin']
1227
+ }
1228
+ ]
1229
+ },
1138
1230
  {
1139
1231
  type: 'Text',
1140
1232
  label: '组件名称',
@@ -1189,11 +1281,6 @@
1189
1281
  type: 'TextAlign',
1190
1282
  name: ['textStyle']
1191
1283
  },
1192
- {
1193
- label: '标题间距',
1194
- type: 'TextSpace',
1195
- name: ['textStyle']
1196
- },
1197
1284
  {
1198
1285
  label: '表单布局',
1199
1286
  type: 'Radius',
@@ -1252,12 +1339,10 @@
1252
1339
  ]
1253
1340
  },
1254
1341
  {
1255
- label: '提交按钮文本样式',
1256
1342
  type: 'TextStyle',
1257
1343
  name: ['props', 'submitButtonStyle']
1258
1344
  },
1259
1345
  {
1260
- label: '提交按钮对齐',
1261
1346
  type: 'TextAlign',
1262
1347
  name: ['props', 'submitButtonStyle']
1263
1348
  },
@@ -1265,11 +1350,6 @@
1265
1350
  label: '提交按钮颜色',
1266
1351
  type: 'Color',
1267
1352
  name: ['props', 'submitBgColor']
1268
- },
1269
- {
1270
- label: '提交按钮间距',
1271
- type: 'TextSpace',
1272
- name: ['props', 'submitButtonStyle']
1273
1353
  }
1274
1354
  // {
1275
1355
  // label: '接收内容接口地址',
@@ -1304,14 +1384,14 @@
1304
1384
  * @Author: binruan@chatlabs.com
1305
1385
  * @Date: 2024-03-12 10:59:06
1306
1386
  * @LastEditors: binruan@chatlabs.com
1307
- * @LastEditTime: 2024-08-01 17:36:34
1387
+ * @LastEditTime: 2024-08-14 17:02:53
1308
1388
  * @FilePath: \pb-sxp-ui\src\core\hooks\useEventReport.ts
1309
1389
  *
1310
1390
  */
1311
1391
  function useEventReport() {
1312
1392
  const { bffEventReport, popupDetailData, waterFallData, isFromHashtag } = useSxpDataSource();
1313
1393
  const jumpToWeb = React.useCallback((data, product, cta, position) => {
1314
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1;
1394
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9;
1315
1395
  let fromKName = '';
1316
1396
  if (popupDetailData && (((_b = (_a = data === null || data === void 0 ? void 0 : data.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b.length) || ((_c = data === null || data === void 0 ? void 0 : data.video) === null || _c === void 0 ? void 0 : _c.bindProduct))) {
1317
1397
  fromKName = 'pdpPage';
@@ -1328,21 +1408,22 @@
1328
1408
  else if (data === null || data === void 0 ? void 0 : data.product) {
1329
1409
  fromKName = 'productPage';
1330
1410
  }
1411
+ const contentTags = (_p = (_m = (_h = product === null || product === void 0 ? void 0 : product.tags) !== null && _h !== void 0 ? _h : (_l = (_k = (_j = data === null || data === void 0 ? void 0 : data.video) === null || _j === void 0 ? void 0 : _j.bindProducts) === null || _k === void 0 ? void 0 : _k[0]) === null || _l === void 0 ? void 0 : _l.tags) !== null && _m !== void 0 ? _m : (_o = data === null || data === void 0 ? void 0 : data.video) === null || _o === void 0 ? void 0 : _o.tags) !== null && _p !== void 0 ? _p : (_q = data === null || data === void 0 ? void 0 : data.product) === null || _q === void 0 ? void 0 : _q.tags;
1331
1412
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
1332
1413
  eventInfo: {
1333
1414
  eventSubject: 'jumpToWeb',
1334
1415
  eventDescription: 'User jumped to website',
1335
- productId: (_h = product === null || product === void 0 ? void 0 : product.itemId) !== null && _h !== void 0 ? _h : '',
1336
- productName: (_j = product === null || product === void 0 ? void 0 : product.title) !== null && _j !== void 0 ? _j : '',
1416
+ productId: (_r = product === null || product === void 0 ? void 0 : product.itemId) !== null && _r !== void 0 ? _r : '',
1417
+ productName: (_s = product === null || product === void 0 ? void 0 : product.title) !== null && _s !== void 0 ? _s : '',
1337
1418
  price: (product === null || product === void 0 ? void 0 : product.price) ? (product === null || product === void 0 ? void 0 : product.price) + '' : '0',
1338
- productCollection: (_k = product === null || product === void 0 ? void 0 : product.collection) !== null && _k !== void 0 ? _k : '',
1419
+ productCollection: (_t = product === null || product === void 0 ? void 0 : product.collection) !== null && _t !== void 0 ? _t : '',
1339
1420
  fromKName,
1340
1421
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
1341
- contentTags: (product === null || product === void 0 ? void 0 : product.tags) ? JSON.stringify(product === null || product === void 0 ? void 0 : product.tags) : '',
1422
+ contentTags: contentTags ? JSON.stringify(contentTags) : '',
1342
1423
  position: position + '',
1343
- contentId: (_m = (_l = data === null || data === void 0 ? void 0 : data.video) === null || _l === void 0 ? void 0 : _l.itemId) !== null && _m !== void 0 ? _m : '',
1344
- ctatId: (_o = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _o !== void 0 ? _o : '',
1345
- traceInfo: (_1 = (_y = (_w = (_s = (_p = product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _p !== void 0 ? _p : (_r = (_q = data === null || data === void 0 ? void 0 : data.video) === null || _q === void 0 ? void 0 : _q.bindProduct) === null || _r === void 0 ? void 0 : _r.traceInfo) !== null && _s !== void 0 ? _s : (_v = (_u = (_t = data === null || data === void 0 ? void 0 : data.video) === null || _t === void 0 ? void 0 : _t.bindProducts) === null || _u === void 0 ? void 0 : _u[0]) === null || _v === void 0 ? void 0 : _v.traceInfo) !== null && _w !== void 0 ? _w : (_x = data === null || data === void 0 ? void 0 : data.product) === null || _x === void 0 ? void 0 : _x.traceInfo) !== null && _y !== void 0 ? _y : (_0 = (_z = data === null || data === void 0 ? void 0 : data.video) === null || _z === void 0 ? void 0 : _z.bindCta) === null || _0 === void 0 ? void 0 : _0.traceInfo) !== null && _1 !== void 0 ? _1 : ''
1424
+ 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 : '',
1425
+ ctatId: (_w = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _w !== void 0 ? _w : '',
1426
+ traceInfo: (_9 = (_6 = (_4 = (_0 = (_x = product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _x !== void 0 ? _x : (_z = (_y = data === null || data === void 0 ? void 0 : data.video) === null || _y === void 0 ? void 0 : _y.bindProduct) === null || _z === void 0 ? void 0 : _z.traceInfo) !== null && _0 !== void 0 ? _0 : (_3 = (_2 = (_1 = data === null || data === void 0 ? void 0 : data.video) === null || _1 === void 0 ? void 0 : _1.bindProducts) === null || _2 === void 0 ? void 0 : _2[0]) === null || _3 === void 0 ? void 0 : _3.traceInfo) !== null && _4 !== void 0 ? _4 : (_5 = data === null || data === void 0 ? void 0 : data.product) === null || _5 === void 0 ? void 0 : _5.traceInfo) !== null && _6 !== void 0 ? _6 : (_8 = (_7 = data === null || data === void 0 ? void 0 : data.video) === null || _7 === void 0 ? void 0 : _7.bindCta) === null || _8 === void 0 ? void 0 : _8.traceInfo) !== null && _9 !== void 0 ? _9 : ''
1346
1427
  }
1347
1428
  });
1348
1429
  }, [bffEventReport, popupDetailData, isFromHashtag]);
@@ -1512,9 +1593,9 @@
1512
1593
  category: 'popup',
1513
1594
  type: 'AppointForm',
1514
1595
  related: {
1515
- settingRender: settingRender$9,
1596
+ settingRender: settingRender$a,
1516
1597
  bindableProps: [],
1517
- interactionRender: interactionRender$d
1598
+ interactionRender: interactionRender$e
1518
1599
  },
1519
1600
  defaulSetting: {
1520
1601
  name: '表单',
@@ -1537,10 +1618,41 @@
1537
1618
  sort: 2
1538
1619
  });
1539
1620
 
1540
- var settingRender$8 = [
1621
+ var settingRender$9 = [
1622
+ {
1623
+ title: '弹窗背景',
1624
+ child: [
1625
+ {
1626
+ type: 'Number',
1627
+ label: '左右边距',
1628
+ name: ['props', 'popupBg', 'horizontalMargin']
1629
+ },
1630
+ {
1631
+ type: 'Number',
1632
+ label: '下边距',
1633
+ name: ['props', 'popupBg', 'bottomMargin']
1634
+ }
1635
+ ]
1636
+ },
1541
1637
  {
1542
1638
  title: '商品图片',
1543
1639
  child: [
1640
+ {
1641
+ type: 'Group',
1642
+ label: '宽高比',
1643
+ child: [
1644
+ {
1645
+ type: 'Number',
1646
+ name: ['props', 'commodityImgRatio', 'w'],
1647
+ addonAfter: 'w'
1648
+ },
1649
+ {
1650
+ type: 'Number',
1651
+ name: ['props', 'commodityImgRatio', 'h'],
1652
+ addonAfter: 'h'
1653
+ }
1654
+ ]
1655
+ },
1544
1656
  {
1545
1657
  type: 'Radius',
1546
1658
  label: '轮播指示器',
@@ -1552,6 +1664,10 @@
1552
1664
  {
1553
1665
  label: '居中',
1554
1666
  value: 'center'
1667
+ },
1668
+ {
1669
+ label: '居右',
1670
+ value: 'right'
1555
1671
  }
1556
1672
  ],
1557
1673
  name: ['props', 'swiper', 'dotsAlign']
@@ -1712,10 +1828,6 @@
1712
1828
  label: '默认行数',
1713
1829
  type: 'Number',
1714
1830
  name: ['lineClamp']
1715
- },
1716
- {
1717
- label: '间距',
1718
- type: 'TextSpace'
1719
1831
  }
1720
1832
  ]
1721
1833
  }
@@ -1801,11 +1913,17 @@
1801
1913
  {
1802
1914
  type: 'TextAlign',
1803
1915
  name: ['props', 'buttonStyle']
1804
- },
1916
+ }
1917
+ ]
1918
+ },
1919
+ {
1920
+ title: 'Iframe商品弹窗',
1921
+ child: [
1805
1922
  {
1806
- label: '间距',
1807
- type: 'TextSpace',
1808
- name: ['props', 'buttonStyle']
1923
+ label: '弹窗按钮',
1924
+ type: 'Upload',
1925
+ name: ['props', 'iframeIcon'],
1926
+ text: '建议尺寸:106 * 41'
1809
1927
  }
1810
1928
  ]
1811
1929
  }
@@ -8637,13 +8755,13 @@
8637
8755
  * @Author: binruan@chatlabs.com
8638
8756
  * @Date: 2023-11-02 18:34:34
8639
8757
  * @LastEditors: binruan@chatlabs.com
8640
- * @LastEditTime: 2024-07-29 16:20:40
8758
+ * @LastEditTime: 2024-08-06 16:35:43
8641
8759
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Modal\index.tsx
8642
8760
  *
8643
8761
  */
8644
8762
  const closeIcon$1 = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII=';
8645
8763
  const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema, fullHeight = window.innerHeight, isFullScreen = false }) => {
8646
- var _a, _b;
8764
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
8647
8765
  const touchRef = React.useRef(null);
8648
8766
  const fTouchRef = React.useRef(null);
8649
8767
  const touchMoveRef = React.useRef(null);
@@ -8670,12 +8788,16 @@
8670
8788
  const isOpen = React.useMemo(() => {
8671
8789
  return ((popup === null || popup === void 0 ? void 0 : popup.id) && (popup === null || popup === void 0 ? void 0 : popup.id) !== '') || visible;
8672
8790
  }, [visible, popup]);
8673
- const isScrollFullScreen = React.useMemo(() => {
8674
- var _a, _b, _c, _d, _e;
8791
+ const getPopupById = React.useMemo(() => {
8792
+ var _a, _b, _c;
8675
8793
  const schemaData = schema !== null && schema !== void 0 ? schema : _schema;
8676
8794
  const value = (_c = (_b = (_a = schemaData === null || schemaData === void 0 ? void 0 : schemaData.sxpPageConf) === null || _a === void 0 ? void 0 : _a.globalConfig) === null || _b === void 0 ? void 0 : _b.popupList) === null || _c === void 0 ? void 0 : _c.find((value) => (value === null || value === void 0 ? void 0 : value.id) === (popup === null || popup === void 0 ? void 0 : popup.id));
8677
- return ((_e = (_d = value === null || value === void 0 ? void 0 : value.item) === null || _d === void 0 ? void 0 : _d.event) === null || _e === void 0 ? void 0 : _e.isScrollFullScreen) || false;
8795
+ return value;
8678
8796
  }, [popup, schema, _schema]);
8797
+ const isScrollFullScreen = React.useMemo(() => {
8798
+ var _a, _b;
8799
+ 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;
8800
+ }, [getPopupById]);
8679
8801
  React.useEffect(() => {
8680
8802
  if (isOpen) {
8681
8803
  setIsShow(true);
@@ -8742,22 +8864,31 @@
8742
8864
  touchMoveRef.current = false;
8743
8865
  };
8744
8866
  return ReactDOM__namespace.createPortal(React.createElement(React.Fragment, null, isShow && (React.createElement("div", { className: 'modal-bg', style: Object.assign({ display: 'flex', backgroundColor: isOpen ? 'rgba(0, 0, 0, 0.7)' : 'rgba(0, 0, 0, 0)' }, modalStyle), onClick: handleClose },
8745
- React.createElement("div", Object.assign({ className: `modal-container ${isOpen ? 'modal-popIn' : 'modal-popOut'}`, style: Object.assign({ padding, animationDuration: ((_a = popup === null || popup === void 0 ? void 0 : popup.duration) !== null && _a !== void 0 ? _a : 0) / 1000 + 's' }, (isScrollFullScreen && {
8746
- transform: `translateY(${modalTrans}px)`
8747
- })), onClick: (e) => {
8748
- e.stopPropagation();
8749
- e.preventDefault();
8750
- } }, (isScrollFullScreen && {
8751
- onTouchMove: handleTouchMove,
8752
- onTouchStart: handleTouchStart,
8753
- onTouchEnd: handleTouchEnd
8754
- })),
8755
- React.createElement("div", { onClick: onClose, className: 'modal-icon-wrapper' },
8756
- React.createElement("img", { src: (_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.popupCloseIcon) !== null && _b !== void 0 ? _b : closeIcon$1, alt: 'close', className: 'modal-icon' })),
8757
- React.createElement("div", { ref: ref, style: {
8758
- height: isScrollFullScreen ? fullHeight : MODAL_DEF_CON_H,
8759
- overflow: (isScrollFullScreen && modalTrans <= 0) || !isScrollFullScreen ? 'auto' : 'hidden'
8760
- } }, children))))), modalEleRef.current);
8867
+ React.createElement("div", { style: {
8868
+ position: 'relative',
8869
+ 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`,
8870
+ 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`,
8871
+ 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`,
8872
+ overflow: 'hidden',
8873
+ 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)`,
8874
+ height: '100%'
8875
+ } },
8876
+ 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 && {
8877
+ transform: `translateY(${modalTrans}px)`
8878
+ })), onClick: (e) => {
8879
+ e.stopPropagation();
8880
+ e.preventDefault();
8881
+ } }, (isScrollFullScreen && {
8882
+ onTouchMove: handleTouchMove,
8883
+ onTouchStart: handleTouchStart,
8884
+ onTouchEnd: handleTouchEnd
8885
+ })),
8886
+ React.createElement("div", { onClick: onClose, className: 'modal-icon-wrapper' },
8887
+ 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' })),
8888
+ React.createElement("div", { ref: ref, style: {
8889
+ height: isScrollFullScreen ? fullHeight : MODAL_DEF_CON_H,
8890
+ overflow: (isScrollFullScreen && modalTrans <= 0) || !isScrollFullScreen ? 'auto' : 'hidden'
8891
+ } }, children)))))), modalEleRef.current);
8761
8892
  };
8762
8893
  var Modal$1 = React.memo(Modal);
8763
8894
 
@@ -8843,7 +8974,7 @@
8843
8974
  }, [src]);
8844
8975
  React.useEffect(() => {
8845
8976
  const onShow = () => {
8846
- if (src && !visible) {
8977
+ if (src && !visible && imgRef.current) {
8847
8978
  imgRef.current.src = '';
8848
8979
  imgRef.current.src = src;
8849
8980
  }
@@ -8923,8 +9054,8 @@
8923
9054
  var CommodityGroup$1 = React.memo(CommodityGroup);
8924
9055
 
8925
9056
  const CommodityDetail$1 = (_a) => {
8926
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
8927
- var { content, style, bgImg, onClick, schema, isDefault, bottom_image, tipText, isPost, viewTime, rec, swiper, commodityStyles, buttonStyle, index, commodityGroup } = _a, props = __rest(_a, ["content", "style", "bgImg", "onClick", "schema", "isDefault", "bottom_image", "tipText", "isPost", "viewTime", "rec", "swiper", "commodityStyles", "buttonStyle", "index", "commodityGroup"]);
9057
+ 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;
9058
+ var { content, style, bgImg, onClick, schema, isDefault, bottom_image, tipText, isPost, viewTime, rec, swiper, commodityStyles, buttonStyle, index, commodityGroup, popupBg, iframeIcon, commodityImgRatio } = _a, props = __rest(_a, ["content", "style", "bgImg", "onClick", "schema", "isDefault", "bottom_image", "tipText", "isPost", "viewTime", "rec", "swiper", "commodityStyles", "buttonStyle", "index", "commodityGroup", "popupBg", "iframeIcon", "commodityImgRatio"]);
8928
9059
  const { sxpParameter, popupDetailData, isPreview, bffFbReport, popupCurTimeRef, checkCommodityIndexRef } = useSxpDataSource();
8929
9060
  const { jumpToWeb, productView } = useEventReport();
8930
9061
  const curTimeRef = React.useRef(null);
@@ -8980,7 +9111,8 @@
8980
9111
  return '$7,000';
8981
9112
  }
8982
9113
  }, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency]);
8983
- const width = isPreview ? 375 : (_t = style === null || style === void 0 ? void 0 : style.width) !== null && _t !== void 0 ? _t : window.innerWidth;
9114
+ const width = (isPreview ? 375 : (_t = style === null || style === void 0 ? void 0 : style.width) !== null && _t !== void 0 ? _t : window.innerWidth) - ((_u = popupBg === null || popupBg === void 0 ? void 0 : popupBg.horizontalMargin) !== null && _u !== void 0 ? _u : 0) * 2;
9115
+ const height = commodityImgRatio ? width * (commodityImgRatio.h / commodityImgRatio.w) : width;
8984
9116
  const renderContent = ({ isPost }) => {
8985
9117
  var _a, _b, _c, _d;
8986
9118
  return (React.createElement("div", null,
@@ -9027,25 +9159,32 @@
9027
9159
  return;
9028
9160
  return (React.createElement(CommodityGroup$1, { products: (_a = data === null || data === void 0 ? void 0 : data.video) === null || _a === void 0 ? void 0 : _a.bindProducts, data: commodityGroup, defImg: (_c = (_b = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _b !== void 0 ? _b : bottom_image) !== null && _c !== void 0 ? _c : '', style: { padding: '0 19px' }, onCLick: handleClick, popupDetailData: popupDetailData, check: checkCommodityIndex }));
9029
9161
  }, [checkCommodityIndex]);
9162
+ const getDotsAlign = React.useMemo(() => {
9163
+ const dotsAlignClass = {
9164
+ left: 'commondityDetail-swiper-clickable-left',
9165
+ center: 'commondityDetail-swiper-clickable-center',
9166
+ right: 'commondityDetail-swiper-clickable-right'
9167
+ };
9168
+ return dotsAlignClass === null || dotsAlignClass === void 0 ? void 0 : dotsAlignClass[swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign];
9169
+ }, [swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign]);
9170
+ const iframeUrl = ((_w = (_v = data === null || data === void 0 ? void 0 : data.video) === null || _v === void 0 ? void 0 : _v.bindProduct) === null || _w === void 0 ? void 0 : _w.remark) || ((_z = (_y = (_x = data === null || data === void 0 ? void 0 : data.video) === null || _x === void 0 ? void 0 : _x.bindProducts) === null || _y === void 0 ? void 0 : _y[0]) === null || _z === void 0 ? void 0 : _z.remark) || ((_0 = data === null || data === void 0 ? void 0 : data.product) === null || _0 === void 0 ? void 0 : _0.remark);
9030
9171
  return (React.createElement(React.Fragment, null,
9031
9172
  React.createElement("div", Object.assign({ className: css.css(Object.assign({}, style)) }, props),
9032
- product && ((_u = product === null || product === void 0 ? void 0 : product.homePage) === null || _u === void 0 ? void 0 : _u.length) > 0 && (React.createElement("div", { style: { position: 'relative' } },
9033
- React.createElement(Swiper, { height: width, modules: [Pagination, Autoplay], pagination: {
9173
+ React.createElement("div", { style: { position: 'relative' } },
9174
+ product && ((_1 = product === null || product === void 0 ? void 0 : product.homePage) === null || _1 === void 0 ? void 0 : _1.length) > 0 && (React.createElement(Swiper, { height: height, modules: [Pagination, Autoplay], pagination: {
9034
9175
  clickable: true,
9035
9176
  bulletActiveClass: 'swipe-item-active-bullet',
9036
- clickableClass: (swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign) === 'left'
9037
- ? 'commondityDetail-swiper-clickable-left'
9038
- : 'commondityDetail-swiper-clickable-center'
9177
+ clickableClass: getDotsAlign
9039
9178
  }, loop: true, autoplay: {
9040
9179
  delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
9041
9180
  } },
9042
- React.createElement(React.Fragment, null, (_v = product === null || product === void 0 ? void 0 : product.homePage) === null || _v === void 0 ? void 0 : _v.map((src) => {
9181
+ React.createElement(React.Fragment, null, (_2 = product === null || product === void 0 ? void 0 : product.homePage) === null || _2 === void 0 ? void 0 : _2.map((src) => {
9043
9182
  var _a;
9044
9183
  return (React.createElement(SwiperSlide, { key: src },
9045
9184
  React.createElement("div", { style: {
9046
9185
  overflow: 'hidden',
9047
9186
  width,
9048
- height: width
9187
+ height
9049
9188
  } },
9050
9189
  React.createElement(FormatImage$1, { style: {
9051
9190
  height: '100%',
@@ -9054,21 +9193,30 @@
9054
9193
  display: 'block',
9055
9194
  objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
9056
9195
  }, src: (_a = src !== null && src !== void 0 ? src : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _a !== void 0 ? _a : bottom_image }))));
9057
- }))))),
9058
- !((_w = product === null || product === void 0 ? void 0 : product.homePage) === null || _w === void 0 ? void 0 : _w.length) && (React.createElement("div", { className: css.css({
9059
- position: 'relative',
9060
- height: 0,
9061
- width: '100%',
9062
- paddingBottom: '100%',
9063
- overflow: 'hidden'
9064
- }) },
9065
- React.createElement("img", { className: css.css({
9066
- position: 'absolute',
9067
- left: 0,
9068
- top: 0,
9069
- objectFit: 'cover',
9070
- width: '100%'
9071
- }), src: (_x = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _x !== void 0 ? _x : bottom_image, alt: 'pdp image' }))),
9196
+ })))),
9197
+ !((_3 = product === null || product === void 0 ? void 0 : product.homePage) === null || _3 === void 0 ? void 0 : _3.length) && (React.createElement("div", { className: css.css({
9198
+ height,
9199
+ width
9200
+ }) },
9201
+ React.createElement("img", { className: css.css({
9202
+ objectFit: 'cover',
9203
+ width: '100%',
9204
+ height: '100%'
9205
+ }), src: (_4 = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _4 !== void 0 ? _4 : bottom_image, alt: 'pdp image' }))),
9206
+ (iframeUrl && iframeIcon) ||
9207
+ (!product && iframeIcon && (React.createElement("div", { style: {
9208
+ padding: '5px 10px',
9209
+ display: 'flex',
9210
+ alignItems: 'center',
9211
+ position: 'absolute',
9212
+ right: '10px',
9213
+ bottom: '10px',
9214
+ zIndex: 1,
9215
+ background: '#fff',
9216
+ borderRadius: '3px'
9217
+ }, onClick: () => setShow3DModal(true) },
9218
+ React.createElement("img", { src: iframeIcon, alt: '3d', width: '20px', height: '20px', style: { marginRight: '5px' } }),
9219
+ React.createElement("span", { style: { fontSize: '12px' } }, "Try in 3D"))))),
9072
9220
  renderCommodityGroup(),
9073
9221
  React.createElement("div", { className: 'pb-commondity-content' }, renderContent({ isPost }))),
9074
9222
  renderBtn(),
@@ -9076,10 +9224,11 @@
9076
9224
  React.createElement("div", { style: { paddingBottom: '80px' } }, renderContent({ isPost: false })),
9077
9225
  renderBtn()),
9078
9226
  React.createElement(Modal$1, { visible: show3DModal, padding: 0, isFullScreen: true, onClose: () => setShow3DModal(false) },
9079
- React.createElement("iframe", { src: 'https://rimowa.threedium.co.uk/product-experience/latest/?sku=92573974&lang=en', style: {
9227
+ React.createElement("iframe", { src: iframeUrl, style: {
9080
9228
  width: '100%',
9081
- height: 'calc(100% - 40px)',
9082
- marginTop: '40px'
9229
+ height: 'calc(100% - 50px)',
9230
+ marginTop: '40px',
9231
+ border: 'none'
9083
9232
  } }))));
9084
9233
  };
9085
9234
  var CommodityDetailComponent = React.memo(CommodityDetail$1);
@@ -9100,7 +9249,7 @@
9100
9249
  * @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLink\interactionRender.tsx
9101
9250
  *
9102
9251
  */
9103
- var interactionRender$c = [
9252
+ var interactionRender$d = [
9104
9253
  {
9105
9254
  title: '滑动事件',
9106
9255
  child: [
@@ -9117,7 +9266,7 @@
9117
9266
  * @Author: binruan@chatlabs.com
9118
9267
  * @Date: 2023-07-28 18:29:57
9119
9268
  * @LastEditors: binruan@chatlabs.com
9120
- * @LastEditTime: 2024-07-31 13:58:45
9269
+ * @LastEditTime: 2024-08-08 18:30:20
9121
9270
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetail\material.tsx
9122
9271
  *
9123
9272
  */
@@ -9127,8 +9276,8 @@
9127
9276
  category: 'popup',
9128
9277
  type: 'CommodityDetail',
9129
9278
  related: {
9130
- settingRender: settingRender$8,
9131
- interactionRender: interactionRender$c
9279
+ settingRender: settingRender$9,
9280
+ interactionRender: interactionRender$d
9132
9281
  },
9133
9282
  defaulSetting: {
9134
9283
  props: {
@@ -9170,6 +9319,10 @@
9170
9319
  fontWeight: 'bold',
9171
9320
  textAlign: 'center',
9172
9321
  color: 'rgba(255, 255, 255, 0.9)'
9322
+ },
9323
+ commodityImgRatio: {
9324
+ w: 1,
9325
+ h: 1
9173
9326
  }
9174
9327
  },
9175
9328
  style: {}
@@ -9179,7 +9332,7 @@
9179
9332
  sort: 1
9180
9333
  });
9181
9334
 
9182
- var interactionRender$b = [
9335
+ var interactionRender$c = [
9183
9336
  {
9184
9337
  title: '点击事件',
9185
9338
  child: [
@@ -9195,13 +9348,28 @@
9195
9348
  * @Author: binruan@chatlabs.com
9196
9349
  * @Date: 2023-10-27 14:06:35
9197
9350
  * @LastEditors: binruan@chatlabs.com
9198
- * @LastEditTime: 2024-08-06 14:23:11
9351
+ * @LastEditTime: 2024-08-06 16:15:08
9199
9352
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\Prompt\settingRender.tsx
9200
9353
  *
9201
9354
  */
9202
- var settingRender$7 = [
9355
+ var settingRender$8 = [
9203
9356
  {
9204
- title: '',
9357
+ title: '弹窗背景',
9358
+ child: [
9359
+ {
9360
+ type: 'Number',
9361
+ label: '左右边距',
9362
+ name: ['props', 'popupBg', 'horizontalMargin']
9363
+ },
9364
+ {
9365
+ type: 'Number',
9366
+ label: '下边距',
9367
+ name: ['props', 'popupBg', 'bottomMargin']
9368
+ }
9369
+ ]
9370
+ },
9371
+ {
9372
+ title: '内容',
9205
9373
  child: [
9206
9374
  {
9207
9375
  type: 'Media',
@@ -9247,11 +9415,6 @@
9247
9415
  }
9248
9416
  ]
9249
9417
  },
9250
- {
9251
- label: '内容字体间距',
9252
- type: 'TextSpace',
9253
- name: ['props', 'contentStyle']
9254
- },
9255
9418
  {
9256
9419
  type: 'Group',
9257
9420
  label: '提交按钮字体',
@@ -9285,11 +9448,6 @@
9285
9448
  }
9286
9449
  ]
9287
9450
  },
9288
- {
9289
- label: '提交按钮间距',
9290
- type: 'TextSpace',
9291
- name: ['props', 'submitButtonStyle']
9292
- },
9293
9451
  {
9294
9452
  type: 'TextStyle',
9295
9453
  name: ['props', 'submitButtonStyle']
@@ -9379,9 +9537,9 @@
9379
9537
  category: 'popup',
9380
9538
  type: 'Prompt',
9381
9539
  related: {
9382
- settingRender: settingRender$7,
9540
+ settingRender: settingRender$8,
9383
9541
  bindableProps: [],
9384
- interactionRender: interactionRender$b
9542
+ interactionRender: interactionRender$c
9385
9543
  },
9386
9544
  defaulSetting: {
9387
9545
  props: {
@@ -9400,14 +9558,45 @@
9400
9558
  * @Author: binruan@chatlabs.com
9401
9559
  * @Date: 2024-03-26 16:50:25
9402
9560
  * @LastEditors: binruan@chatlabs.com
9403
- * @LastEditTime: 2024-08-06 14:06:03
9561
+ * @LastEditTime: 2024-08-08 18:34:06
9404
9562
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetailDiroNew\settingRender.tsx
9405
9563
  *
9406
9564
  */
9407
- var settingRender$6 = [
9565
+ var settingRender$7 = [
9566
+ {
9567
+ title: '弹窗背景',
9568
+ child: [
9569
+ {
9570
+ type: 'Number',
9571
+ label: '左右边距',
9572
+ name: ['props', 'popupBg', 'horizontalMargin']
9573
+ },
9574
+ {
9575
+ type: 'Number',
9576
+ label: '下边距',
9577
+ name: ['props', 'popupBg', 'bottomMargin']
9578
+ }
9579
+ ]
9580
+ },
9408
9581
  {
9409
9582
  title: '商品图片',
9410
9583
  child: [
9584
+ {
9585
+ type: 'Group',
9586
+ label: '宽高比',
9587
+ child: [
9588
+ {
9589
+ type: 'Number',
9590
+ name: ['props', 'commodityImgRatio', 'w'],
9591
+ addonAfter: 'w'
9592
+ },
9593
+ {
9594
+ type: 'Number',
9595
+ name: ['props', 'commodityImgRatio', 'h'],
9596
+ addonAfter: 'h'
9597
+ }
9598
+ ]
9599
+ },
9411
9600
  {
9412
9601
  type: 'Radius',
9413
9602
  label: '轮播指示器',
@@ -9419,6 +9608,10 @@
9419
9608
  {
9420
9609
  label: '居中',
9421
9610
  value: 'center'
9611
+ },
9612
+ {
9613
+ label: '居右',
9614
+ value: 'right'
9422
9615
  }
9423
9616
  ],
9424
9617
  name: ['props', 'swiper', 'dotsAlign']
@@ -9562,10 +9755,6 @@
9562
9755
  label: '默认行数',
9563
9756
  type: 'Number',
9564
9757
  name: ['lineClamp']
9565
- },
9566
- {
9567
- label: '间距',
9568
- type: 'TextSpace'
9569
9758
  }
9570
9759
  ]
9571
9760
  }
@@ -9651,19 +9840,25 @@
9651
9840
  {
9652
9841
  type: 'TextAlign',
9653
9842
  name: ['props', 'buttonStyle']
9654
- },
9843
+ }
9844
+ ]
9845
+ },
9846
+ {
9847
+ title: 'Iframe商品弹窗',
9848
+ child: [
9655
9849
  {
9656
- label: '间距',
9657
- type: 'TextSpace',
9658
- name: ['props', 'buttonStyle']
9850
+ label: '弹窗按钮',
9851
+ type: 'Upload',
9852
+ name: ['props', 'iframeIcon'],
9853
+ text: '建议尺寸:106 * 41'
9659
9854
  }
9660
9855
  ]
9661
9856
  }
9662
9857
  ];
9663
9858
 
9664
9859
  const CommodityDetailDiroNew$1 = (_a) => {
9665
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1;
9666
- var { style, isDefault, rec, viewTime, isPost, bottom_image, tipText, swiper, commodityStyles, buttonStyle, index, commodityGroup } = _a, props = __rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "tipText", "swiper", "commodityStyles", "buttonStyle", "index", "commodityGroup"]);
9860
+ 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;
9861
+ var { style, isDefault, rec, viewTime, isPost, bottom_image, tipText, swiper, commodityStyles, buttonStyle, index, commodityGroup, popupBg, iframeIcon, commodityImgRatio } = _a, props = __rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "tipText", "swiper", "commodityStyles", "buttonStyle", "index", "commodityGroup", "popupBg", "iframeIcon", "commodityImgRatio"]);
9667
9862
  React.useState(true);
9668
9863
  const { sxpParameter, popupCurTimeRef, popupDetailData, isPreview, bffFbReport, checkCommodityIndexRef } = useSxpDataSource();
9669
9864
  const { jumpToWeb, productView } = useEventReport();
@@ -9672,6 +9867,7 @@
9672
9867
  React.useState(true);
9673
9868
  const [showModal, setShowModal] = React.useState(false);
9674
9869
  const curTimeRef = React.useRef(null);
9870
+ const [show3DModal, setShow3DModal] = React.useState(false);
9675
9871
  const [checkCommodityIndex, setCheckCommodityIndex] = React.useState((_b = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.multiCheckIndex) !== null && _b !== void 0 ? _b : 0);
9676
9872
  const data = isPost ? rec : popupDetailData;
9677
9873
  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];
@@ -9722,7 +9918,8 @@
9722
9918
  return '£102,300.00';
9723
9919
  }
9724
9920
  }, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency]);
9725
- const width = isPreview ? 375 : (_t = style === null || style === void 0 ? void 0 : style.width) !== null && _t !== void 0 ? _t : window.innerWidth;
9921
+ const width = (isPreview ? 375 : (_t = style === null || style === void 0 ? void 0 : style.width) !== null && _t !== void 0 ? _t : window.innerWidth) - ((_u = popupBg === null || popupBg === void 0 ? void 0 : popupBg.horizontalMargin) !== null && _u !== void 0 ? _u : 0) * 2;
9922
+ const height = commodityImgRatio ? width * (commodityImgRatio.h / commodityImgRatio.w) : width;
9726
9923
  // useEffect(() => {
9727
9924
  // console.log(scrollRef?.current?.scrollHeight, window.innerHeight);
9728
9925
  // if (scrollRef?.current && scrollRef?.current?.scrollHeight > window.innerHeight) {
@@ -9796,52 +9993,69 @@ Made in Italy` })));
9796
9993
  return;
9797
9994
  return (React.createElement(CommodityGroup$1, { products: (_a = data === null || data === void 0 ? void 0 : data.video) === null || _a === void 0 ? void 0 : _a.bindProducts, data: commodityGroup, defImg: (_c = (_b = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _b !== void 0 ? _b : bottom_image) !== null && _c !== void 0 ? _c : '', style: { padding: '0 19px' }, onCLick: handleClick, popupDetailData: popupDetailData, check: checkCommodityIndex }));
9798
9995
  }, [checkCommodityIndex]);
9996
+ const getDotsAlign = React.useMemo(() => {
9997
+ const dotsAlignClass = {
9998
+ left: 'commondityDetail-swiper-clickable-left',
9999
+ center: 'commondityDetail-swiper-clickable-center',
10000
+ right: 'commondityDetail-swiper-clickable-right'
10001
+ };
10002
+ return dotsAlignClass === null || dotsAlignClass === void 0 ? void 0 : dotsAlignClass[swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign];
10003
+ }, [swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign]);
10004
+ const iframeUrl = ((_w = (_v = data === null || data === void 0 ? void 0 : data.video) === null || _v === void 0 ? void 0 : _v.bindProduct) === null || _w === void 0 ? void 0 : _w.remark) || ((_z = (_y = (_x = data === null || data === void 0 ? void 0 : data.video) === null || _x === void 0 ? void 0 : _x.bindProducts) === null || _y === void 0 ? void 0 : _y[0]) === null || _z === void 0 ? void 0 : _z.remark) || ((_0 = data === null || data === void 0 ? void 0 : data.product) === null || _0 === void 0 ? void 0 : _0.remark);
9799
10005
  return (React.createElement("div", { className: 'pb-commondityDiroNew' },
9800
10006
  React.createElement("div", Object.assign({ className: css.css(Object.assign(Object.assign({}, style), { transform: 'translate3d(0px, 0px, 0px)' })) }, props),
9801
- product && ((_u = product === null || product === void 0 ? void 0 : product.homePage) === null || _u === void 0 ? void 0 : _u.length) > 0 && (React.createElement(Swiper, { height: width, modules: [Pagination, Autoplay], pagination: {
9802
- clickable: true,
9803
- bulletActiveClass: 'commondityDiroNew-swipe-item-active-bullet',
9804
- clickableClass: (swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign) === 'left'
9805
- ? 'commondityDiroNew-swiper-clickable-left'
9806
- : 'commondityDiroNew-swiper-clickable-center'
9807
- }, loop: true, autoplay: {
9808
- delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
9809
- } }, (_v = product === null || product === void 0 ? void 0 : product.homePage) === null || _v === void 0 ? void 0 : _v.map((src) => {
9810
- var _a;
9811
- return (React.createElement(SwiperSlide, { key: src },
9812
- React.createElement("div", { style: {
9813
- overflow: 'hidden',
9814
- width,
9815
- height: width
9816
- } },
9817
- React.createElement(FormatImage$1, { style: {
9818
- height: '100%',
9819
- width: '100%',
9820
- objectFit: 'cover',
9821
- display: 'block',
9822
- objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
9823
- }, src: (_a = src !== null && src !== void 0 ? src : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _a !== void 0 ? _a : bottom_image }))));
9824
- }))),
9825
- !((_w = product === null || product === void 0 ? void 0 : product.homePage) === null || _w === void 0 ? void 0 : _w.length) && (React.createElement("div", { className: css.css({
9826
- position: 'relative',
9827
- height: 0,
9828
- width: '100%',
9829
- paddingBottom: '100%',
9830
- overflow: 'hidden'
9831
- }) },
9832
- React.createElement("img", { className: css.css({
9833
- position: 'absolute',
9834
- left: 0,
9835
- top: 0,
9836
- objectFit: 'cover',
9837
- width: '100%'
9838
- }), src: (_x = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _x !== void 0 ? _x : bottom_image, alt: 'pdp image' }))),
10007
+ React.createElement("div", { style: { position: 'relative' } },
10008
+ product && ((_1 = product === null || product === void 0 ? void 0 : product.homePage) === null || _1 === void 0 ? void 0 : _1.length) > 0 && (React.createElement(Swiper, { height: height, modules: [Pagination, Autoplay], pagination: {
10009
+ clickable: true,
10010
+ bulletActiveClass: 'commondityDiroNew-swipe-item-active-bullet',
10011
+ clickableClass: getDotsAlign
10012
+ }, loop: true, autoplay: {
10013
+ delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
10014
+ } }, (_2 = product === null || product === void 0 ? void 0 : product.homePage) === null || _2 === void 0 ? void 0 : _2.map((src) => {
10015
+ var _a;
10016
+ return (React.createElement(SwiperSlide, { key: src },
10017
+ React.createElement("div", { style: {
10018
+ overflow: 'hidden',
10019
+ width,
10020
+ height
10021
+ } },
10022
+ React.createElement(FormatImage$1, { style: {
10023
+ height: '100%',
10024
+ width: '100%',
10025
+ objectFit: 'cover',
10026
+ display: 'block',
10027
+ objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
10028
+ }, 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 }))));
10029
+ }))),
10030
+ !((_3 = product === null || product === void 0 ? void 0 : product.homePage) === null || _3 === void 0 ? void 0 : _3.length) && (React.createElement("div", { className: css.css({
10031
+ height,
10032
+ width
10033
+ }) },
10034
+ React.createElement("img", { className: css.css({
10035
+ objectFit: 'cover',
10036
+ width: '100%',
10037
+ height: '100%'
10038
+ }), src: (_4 = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _4 !== void 0 ? _4 : bottom_image, alt: 'pdp image' }))),
10039
+ (iframeUrl && iframeIcon) ||
10040
+ (!product && iframeIcon && (React.createElement("div", { style: {
10041
+ padding: '5px 10px',
10042
+ display: 'flex',
10043
+ alignItems: 'center',
10044
+ position: 'absolute',
10045
+ right: '10px',
10046
+ bottom: '10px',
10047
+ zIndex: 1,
10048
+ background: '#fff',
10049
+ borderRadius: '3px'
10050
+ }, onClick: () => setShow3DModal(true) },
10051
+ React.createElement("img", { src: iframeIcon, alt: '3d', width: '20px', height: '20px', style: { marginRight: '5px' } }),
10052
+ React.createElement("span", { style: { fontSize: '12px' } }, "Try in 3D"))))),
9839
10053
  renderCommodityGroup(),
9840
10054
  React.createElement("div", { className: 'pb-commondityDiroNew-content' },
9841
10055
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top' },
9842
10056
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top-left' },
9843
10057
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top-left-title', style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title), dangerouslySetInnerHTML: {
9844
- __html: setFontForText((_y = product === null || product === void 0 ? void 0 : product.title) !== null && _y !== void 0 ? _y : 'Large Dior Toujours BagLarge', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title)
10058
+ __html: setFontForText((_5 = product === null || product === void 0 ? void 0 : product.title) !== null && _5 !== void 0 ? _5 : 'Large Dior Toujours BagLarge', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title)
9845
10059
  } }),
9846
10060
  React.createElement("div", { className: 'pb-commondityDiroNew-content-collection', hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.collection) || (product === null || product === void 0 ? void 0 : product.collection) === ''), style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection), dangerouslySetInnerHTML: {
9847
10061
  __html: setFontForText((product === null || product === void 0 ? void 0 : product.collection) || 'Black Macrocannage CalfskinLarge', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection)
@@ -9851,14 +10065,21 @@ Made in Italy` })));
9851
10065
  __html: setFontForText(priceText, commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price)
9852
10066
  } }),
9853
10067
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top-right-price', hidden: !!product && !(product === null || product === void 0 ? void 0 : product.taxInfo), style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.taxInfo), dangerouslySetInnerHTML: {
9854
- __html: setFontForText((_z = product === null || product === void 0 ? void 0 : product.taxInfo) !== null && _z !== void 0 ? _z : '税费', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.taxInfo)
10068
+ __html: setFontForText((_6 = product === null || product === void 0 ? void 0 : product.taxInfo) !== null && _6 !== void 0 ? _6 : '税费', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.taxInfo)
9855
10069
  } }))),
9856
- (!product || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("button", { "aria-label": (_0 = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _0 !== void 0 ? _0 : 'Shop now', onClick: handleLink, className: 'pb-commondityDiroNew-btn', style: buttonStyle },
10070
+ (!product || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("button", { "aria-label": (_7 = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _7 !== void 0 ? _7 : 'Shop now', onClick: handleLink, className: 'pb-commondityDiroNew-btn', style: buttonStyle },
9857
10071
  React.createElement("span", { dangerouslySetInnerHTML: {
9858
- __html: setFontForText((_1 = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _1 !== void 0 ? _1 : 'Shop now', buttonStyle)
10072
+ __html: setFontForText((_8 = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _8 !== void 0 ? _8 : 'Shop now', buttonStyle)
9859
10073
  } }))),
9860
10074
  productInfoText({ isPost }))),
9861
- React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) }, productInfoText({ isPost: false }))));
10075
+ React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) }, productInfoText({ isPost: false })),
10076
+ React.createElement(Modal$1, { visible: show3DModal, padding: 0, isFullScreen: true, onClose: () => setShow3DModal(false) },
10077
+ React.createElement("iframe", { src: iframeUrl, style: {
10078
+ width: '100%',
10079
+ height: 'calc(100% - 50px)',
10080
+ marginTop: '40px',
10081
+ border: 'none'
10082
+ } }))));
9862
10083
  };
9863
10084
  var CommodityDetailDiroNewComponent = React.memo(CommodityDetailDiroNew$1);
9864
10085
 
@@ -9878,7 +10099,7 @@ Made in Italy` })));
9878
10099
  * @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLink\interactionRender.tsx
9879
10100
  *
9880
10101
  */
9881
- var interactionRender$a = [
10102
+ var interactionRender$b = [
9882
10103
  {
9883
10104
  title: '滑动事件',
9884
10105
  child: [
@@ -9905,8 +10126,8 @@ Made in Italy` })));
9905
10126
  category: 'popup',
9906
10127
  type: 'CommodityDetailDiroNew',
9907
10128
  related: {
9908
- settingRender: settingRender$6,
9909
- interactionRender: interactionRender$a
10129
+ settingRender: settingRender$7,
10130
+ interactionRender: interactionRender$b
9910
10131
  },
9911
10132
  defaulSetting: {
9912
10133
  props: {
@@ -9949,6 +10170,10 @@ Made in Italy` })));
9949
10170
  borderRadius: 25,
9950
10171
  marginTop: 16,
9951
10172
  marginBottom: 16
10173
+ },
10174
+ commodityImgRatio: {
10175
+ w: 1,
10176
+ h: 1
9952
10177
  }
9953
10178
  },
9954
10179
  style: {}
@@ -9962,11 +10187,26 @@ Made in Italy` })));
9962
10187
  * @Author: binruan@chatlabs.com
9963
10188
  * @Date: 2024-03-26 16:50:25
9964
10189
  * @LastEditors: binruan@chatlabs.com
9965
- * @LastEditTime: 2024-08-06 14:09:52
10190
+ * @LastEditTime: 2024-07-09 10:37:45
9966
10191
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityList\settingRender.tsx
9967
10192
  *
9968
10193
  */
9969
- var settingRender$5 = [
10194
+ var settingRender$6 = [
10195
+ {
10196
+ title: '弹窗背景',
10197
+ child: [
10198
+ {
10199
+ type: 'Number',
10200
+ label: '左右边距',
10201
+ name: ['props', 'popupBg', 'horizontalMargin']
10202
+ },
10203
+ {
10204
+ type: 'Number',
10205
+ label: '下边距',
10206
+ name: ['props', 'popupBg', 'bottomMargin']
10207
+ }
10208
+ ]
10209
+ },
9970
10210
  {
9971
10211
  title: '商品图片',
9972
10212
  child: [
@@ -10084,10 +10324,6 @@ Made in Italy` })));
10084
10324
  {
10085
10325
  label: '标题对齐',
10086
10326
  type: 'TextAlign'
10087
- },
10088
- {
10089
- label: '间距',
10090
- type: 'TextSpace'
10091
10327
  }
10092
10328
  ]
10093
10329
  }
@@ -10328,7 +10564,7 @@ Made in Italy` })));
10328
10564
  * @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLink\interactionRender.tsx
10329
10565
  *
10330
10566
  */
10331
- var interactionRender$9 = [
10567
+ var interactionRender$a = [
10332
10568
  {
10333
10569
  title: '点击事件',
10334
10570
  child: [
@@ -10354,8 +10590,8 @@ Made in Italy` })));
10354
10590
  category: 'popup',
10355
10591
  type: 'CommodityList',
10356
10592
  related: {
10357
- settingRender: settingRender$5,
10358
- interactionRender: interactionRender$9
10593
+ settingRender: settingRender$6,
10594
+ interactionRender: interactionRender$a
10359
10595
  },
10360
10596
  defaulSetting: {
10361
10597
  props: {
@@ -10396,6 +10632,59 @@ Made in Italy` })));
10396
10632
  sort: 1
10397
10633
  });
10398
10634
 
10635
+ /*
10636
+ * @Author: binruan@chatlabs.com
10637
+ * @Date: 2023-10-27 14:06:35
10638
+ * @LastEditors: binruan@chatlabs.com
10639
+ * @LastEditTime: 2024-08-08 17:32:11
10640
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\Iframe\settingRender.tsx
10641
+ *
10642
+ */
10643
+ var settingRender$5 = [
10644
+ {
10645
+ title: '背景样式',
10646
+ child: [
10647
+ {
10648
+ type: 'Color',
10649
+ label: '背景色',
10650
+ name: ['style', 'backgroundColor']
10651
+ }
10652
+ ]
10653
+ }
10654
+ ];
10655
+
10656
+ const Iframe$1 = (_a) => {
10657
+ var _b, _c;
10658
+ 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"]);
10659
+ const { popupDetailData } = useSxpDataSource();
10660
+ 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;
10661
+ return (React.createElement("div", Object.assign({ className: `${css.css(Object.assign({}, style))}` }, props), iframeUrl && (React.createElement("iframe", { src: iframeUrl, style: {
10662
+ width: '100%',
10663
+ height: 'calc(100% - 50px)',
10664
+ marginTop: '40px',
10665
+ border: 'none'
10666
+ } }))));
10667
+ };
10668
+ var IframeComponent = React.memo(Iframe$1);
10669
+
10670
+ const Iframe = createMaterial(IframeComponent, {
10671
+ displayName: 'Iframe弹窗',
10672
+ icon: '',
10673
+ category: 'popup',
10674
+ type: 'Iframe',
10675
+ related: {
10676
+ settingRender: settingRender$5,
10677
+ bindableProps: []
10678
+ },
10679
+ defaulSetting: {
10680
+ props: {},
10681
+ style: {}
10682
+ },
10683
+ w: 100,
10684
+ h: 40,
10685
+ sort: 3
10686
+ });
10687
+
10399
10688
  /*
10400
10689
  * @Author: binruan@chatlabs.com
10401
10690
  * @Date: 2024-03-26 16:50:25
@@ -10655,7 +10944,7 @@ Made in Italy` })));
10655
10944
  }
10656
10945
  ];
10657
10946
 
10658
- var interactionRender$8 = [
10947
+ var interactionRender$9 = [
10659
10948
  {
10660
10949
  title: '点击事件',
10661
10950
  child: [
@@ -10668,7 +10957,7 @@ Made in Italy` })));
10668
10957
  ];
10669
10958
 
10670
10959
  const EventProvider = (_a) => {
10671
- var { rec, children, className, onClick, style, isExternalLink = false, index } = _a; __rest(_a, ["rec", "children", "className", "onClick", "style", "isExternalLink", "index"]);
10960
+ var { rec, children, className, onClick, style, isExternalLink = false, index, jumpLink } = _a; __rest(_a, ["rec", "children", "className", "onClick", "style", "isExternalLink", "index", "jumpLink"]);
10672
10961
  const ref = React.useRef(null);
10673
10962
  const { popup } = useEditor();
10674
10963
  const { setPopupDetailData, ctaEvent } = useSxpDataSource();
@@ -10682,11 +10971,11 @@ Made in Italy` })));
10682
10971
  }, rec, item, index);
10683
10972
  setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, rec), { index }));
10684
10973
  if (isExternalLink) {
10685
- if ((_d = (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProduct) === null || _d === void 0 ? void 0 : _d.link) {
10974
+ if (jumpLink || ((_d = (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProduct) === null || _d === void 0 ? void 0 : _d.link)) {
10686
10975
  const cta = (_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.bindCta;
10687
10976
  const product = (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.bindProduct;
10688
10977
  jumpToWeb(rec, product, cta, index);
10689
- window.location.href = window.getJointUtmLink((_h = (_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.bindProduct) === null || _h === void 0 ? void 0 : _h.link);
10978
+ window.location.href = window.getJointUtmLink(jumpLink || ((_h = (_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.bindProduct) === null || _h === void 0 ? void 0 : _h.link) || '');
10690
10979
  }
10691
10980
  }
10692
10981
  else {
@@ -10738,7 +11027,7 @@ Made in Italy` })));
10738
11027
  category: 'template',
10739
11028
  type: 'Commodity',
10740
11029
  related: {
10741
- interactionRender: interactionRender$8,
11030
+ interactionRender: interactionRender$9,
10742
11031
  bindableProps: [],
10743
11032
  settingRender: settingRender$4
10744
11033
  },
@@ -10780,7 +11069,7 @@ Made in Italy` })));
10780
11069
  sort: 1
10781
11070
  });
10782
11071
 
10783
- var interactionRender$7 = [
11072
+ var interactionRender$8 = [
10784
11073
  {
10785
11074
  title: '点击事件',
10786
11075
  child: [
@@ -10820,7 +11109,7 @@ Made in Italy` })));
10820
11109
  category: 'template',
10821
11110
  type: 'Appoint',
10822
11111
  related: {
10823
- interactionRender: interactionRender$7,
11112
+ interactionRender: interactionRender$8,
10824
11113
  settingRender: settingRender$4 === null || settingRender$4 === void 0 ? void 0 : settingRender$4.filter((i) => i.type !== 'commodityTitle'),
10825
11114
  bindableProps: []
10826
11115
  },
@@ -10860,7 +11149,7 @@ Made in Italy` })));
10860
11149
  * @Author: binruan@chatlabs.com
10861
11150
  * @Date: 2024-07-02 14:51:32
10862
11151
  * @LastEditors: binruan@chatlabs.com
10863
- * @LastEditTime: 2024-08-06 14:51:18
11152
+ * @LastEditTime: 2024-07-02 16:44:34
10864
11153
  * @FilePath: \pb-sxp-ui\src\materials\sxp\template\Link\settingRender.tsx
10865
11154
  *
10866
11155
  */
@@ -10957,11 +11246,6 @@ Made in Italy` })));
10957
11246
  type: 'TextAlign',
10958
11247
  name: ['props', 'customTitle', 'style']
10959
11248
  },
10960
- {
10961
- label: '间距',
10962
- type: 'TextSpace',
10963
- name: ['props', 'customTitle', 'style']
10964
- },
10965
11249
  {
10966
11250
  label: '上边距',
10967
11251
  type: 'Number',
@@ -10975,21 +11259,15 @@ Made in Italy` })));
10975
11259
  var styles$7 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__nkBlU","one-line-ellipsis":"index-module_one-line-ellipsis__buFw1"};
10976
11260
 
10977
11261
  const Link$1 = (_a) => {
10978
- var _b, _c, _d, _e, _f, _g, _h, _j;
11262
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k;
10979
11263
  var { content, style, bgImg, recData, bottom_image, ctaTempStyles, index, customTitle } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "index", "customTitle"]);
10980
11264
  const { sxpParameter, bffEventReport } = useSxpDataSource();
10981
- const { jumpToWeb } = useEventReport();
11265
+ useEventReport();
10982
11266
  const cta = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindCta;
10983
- const product = (_c = recData === null || recData === void 0 ? void 0 : recData.video) === null || _c === void 0 ? void 0 : _c.bindProduct;
10984
- const handleTo = () => {
10985
- if (cta === null || cta === void 0 ? void 0 : cta.link) {
10986
- jumpToWeb(recData, product, cta, index);
10987
- window.location.href = window.getJointUtmLink(cta.link);
10988
- }
10989
- };
11267
+ (_c = recData === null || recData === void 0 ? void 0 : recData.video) === null || _c === void 0 ? void 0 : _c.bindProduct;
10990
11268
  const src = (_e = (_d = cta === null || cta === void 0 ? void 0 : cta.icon) !== null && _d !== void 0 ? _d : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _e !== void 0 ? _e : bottom_image;
10991
- return (React.createElement(EventProvider$1, Object.assign({ index: index, rec: recData, className: css.css(Object.assign({ alignItems: 'center' }, style)), style: { display: 'flex' } }, props, { onClick: handleTo }),
10992
- React.createElement(Img$1, { src: src, rec: recData, item: (_g = (_f = recData === null || recData === void 0 ? void 0 : recData.video) === null || _f === void 0 ? void 0 : _f.bindProduct) !== null && _g !== void 0 ? _g : recData === null || recData === void 0 ? void 0 : recData.video, index: index, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img }),
11269
+ return (React.createElement(EventProvider$1, Object.assign({ index: index, rec: recData, className: css.css(Object.assign({ alignItems: 'center' }, style)), style: { display: 'flex' } }, props, { jumpLink: (_f = cta === null || cta === void 0 ? void 0 : cta.link) !== null && _f !== void 0 ? _f : '' }),
11270
+ React.createElement(Img$1, { src: src, rec: recData, item: (_h = (_g = recData === null || recData === void 0 ? void 0 : recData.video) === null || _g === void 0 ? void 0 : _g.bindProduct) !== null && _h !== void 0 ? _h : recData === null || recData === void 0 ? void 0 : recData.video, index: index, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img }),
10993
11271
  React.createElement("div", { className: css.css({
10994
11272
  display: 'flex',
10995
11273
  alignItems: 'center',
@@ -10998,14 +11276,34 @@ Made in Italy` })));
10998
11276
  }) },
10999
11277
  React.createElement("div", null,
11000
11278
  React.createElement("div", { className: styles$7['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle, dangerouslySetInnerHTML: {
11001
- __html: setFontForText((_h = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _h !== void 0 ? _h : 'Product Name', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
11279
+ __html: setFontForText((_j = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _j !== void 0 ? _j : 'Product Name', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
11002
11280
  } }),
11003
- (customTitle === null || customTitle === void 0 ? void 0 : customTitle.display) && (React.createElement("div", { style: Object.assign(Object.assign({}, customTitle === null || customTitle === void 0 ? void 0 : customTitle.style), { lineHeight: ((_j = customTitle === null || customTitle === void 0 ? void 0 : customTitle.style) === null || _j === void 0 ? void 0 : _j.height) + 'px' }), className: styles$7['one-line-ellipsis'], dangerouslySetInnerHTML: {
11281
+ (customTitle === null || customTitle === void 0 ? void 0 : customTitle.display) && (React.createElement("div", { style: Object.assign(Object.assign({}, customTitle === null || customTitle === void 0 ? void 0 : customTitle.style), { lineHeight: ((_k = customTitle === null || customTitle === void 0 ? void 0 : customTitle.style) === null || _k === void 0 ? void 0 : _k.height) + 'px' }), className: styles$7['one-line-ellipsis'], dangerouslySetInnerHTML: {
11004
11282
  __html: setFontForText(customTitle === null || customTitle === void 0 ? void 0 : customTitle.text, customTitle === null || customTitle === void 0 ? void 0 : customTitle.style)
11005
11283
  } }))))));
11006
11284
  };
11007
11285
  var LinkComponent = React.memo(Link$1);
11008
11286
 
11287
+ /*
11288
+ * @Author: binruan@chatlabs.com
11289
+ * @Date: 2024-08-09 16:59:38
11290
+ * @LastEditors: binruan@chatlabs.com
11291
+ * @LastEditTime: 2024-08-09 16:59:44
11292
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\template\Link\interactionRender.tsx
11293
+ *
11294
+ */
11295
+ var interactionRender$7 = [
11296
+ {
11297
+ title: '点击事件',
11298
+ child: [
11299
+ {
11300
+ type: 'link',
11301
+ name: 'onClick'
11302
+ }
11303
+ ]
11304
+ }
11305
+ ];
11306
+
11009
11307
  var _a;
11010
11308
  const Link = createMaterial(LinkComponent, {
11011
11309
  displayName: '跳转指引',
@@ -11014,7 +11312,8 @@ Made in Italy` })));
11014
11312
  type: 'Link',
11015
11313
  related: {
11016
11314
  settingRender: (_a = settingRender$4 === null || settingRender$4 === void 0 ? void 0 : settingRender$4.filter((i) => i.type !== 'commodityTitle')) === null || _a === void 0 ? void 0 : _a.concat(linkSettingRender),
11017
- bindableProps: []
11315
+ bindableProps: [],
11316
+ interactionRender: interactionRender$7
11018
11317
  },
11019
11318
  defaulSetting: {
11020
11319
  props: {
@@ -11604,7 +11903,7 @@ Made in Italy` })));
11604
11903
  * @Author: binruan@chatlabs.com
11605
11904
  * @Date: 2024-04-07 14:07:12
11606
11905
  * @LastEditors: binruan@chatlabs.com
11607
- * @LastEditTime: 2024-08-06 14:00:36
11906
+ * @LastEditTime: 2024-06-27 09:49:19
11608
11907
  * @FilePath: \pb-sxp-ui\src\materials\sxp\HashTag\settingRender.tsx
11609
11908
  *
11610
11909
  */
@@ -11709,10 +12008,6 @@ Made in Italy` })));
11709
12008
  {
11710
12009
  label: '标题对齐',
11711
12010
  type: 'TextAlign'
11712
- },
11713
- {
11714
- label: '间距',
11715
- type: 'TextSpace'
11716
12011
  }
11717
12012
  ]
11718
12013
  }
@@ -11798,11 +12093,6 @@ Made in Italy` })));
11798
12093
  {
11799
12094
  type: 'TextAlign',
11800
12095
  name: ['props', 'buttonStyle']
11801
- },
11802
- {
11803
- label: '间距',
11804
- type: 'TextSpace',
11805
- name: ['props', 'buttonStyle']
11806
12096
  }
11807
12097
  ]
11808
12098
  },
@@ -13358,16 +13648,10 @@ Made in Italy` })));
13358
13648
  }, [unitWidth, rowsNum, list]); /* 增加getStyleList依赖项会导致在admin预览编辑时无限刷新 */
13359
13649
  /** 初始化请求数据 */
13360
13650
  React.useEffect(() => {
13361
- var _a, _b;
13651
+ var _a, _b, _c, _d, _e, _f;
13362
13652
  setIsLoadingData(true);
13363
13653
  waterFallData &&
13364
- (getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({
13365
- hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag,
13366
- 'itemFilter.itemId': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId,
13367
- 'itemFilter.itemType': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemType,
13368
- defaultSize: hashTagSize,
13369
- maxSize: hashTagSize
13370
- }).then((res) => {
13654
+ (getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos(Object.assign(Object.assign({ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag, defaultSize: hashTagSize, maxSize: hashTagSize }, (((_b = (_a = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec) === null || _a === void 0 ? void 0 : _a.product) === null || _b === void 0 ? void 0 : _b.itemId) && { productFilter: (_d = (_c = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec) === null || _c === void 0 ? void 0 : _c.product) === null || _d === void 0 ? void 0 : _d.itemId })), ((waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId) && { contentFilter: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId }))).then((res) => {
13371
13655
  var _a, _b;
13372
13656
  setData(res);
13373
13657
  setList((_b = (_a = res === null || res === void 0 ? void 0 : res.recList) === null || _a === void 0 ? void 0 : _a.filter((item) => (item === null || item === void 0 ? void 0 : item.video) !== null || (item === null || item === void 0 ? void 0 : item.product) !== null)) !== null && _b !== void 0 ? _b : []);
@@ -13376,7 +13660,7 @@ Made in Italy` })));
13376
13660
  if (isOpenHashTag) {
13377
13661
  const res = previewData;
13378
13662
  setData(res);
13379
- setList((_b = (_a = res === null || res === void 0 ? void 0 : res.recList) === null || _a === void 0 ? void 0 : _a.filter((item) => (item === null || item === void 0 ? void 0 : item.video) !== null || (item === null || item === void 0 ? void 0 : item.product) !== null)) !== null && _b !== void 0 ? _b : []);
13663
+ setList((_f = (_e = res === null || res === void 0 ? void 0 : res.recList) === null || _e === void 0 ? void 0 : _e.filter((item) => (item === null || item === void 0 ? void 0 : item.video) !== null || (item === null || item === void 0 ? void 0 : item.product) !== null)) !== null && _f !== void 0 ? _f : []);
13380
13664
  setIsLoadingData(false);
13381
13665
  }
13382
13666
  }, [waterFallData, getRecommendVideos, hashTagSize, isOpenHashTag]);
@@ -13402,13 +13686,10 @@ Made in Italy` })));
13402
13686
  };
13403
13687
  }, [onResize]);
13404
13688
  React.useCallback(() => {
13689
+ var _a, _b, _c, _d;
13405
13690
  setIsLoadingData(true);
13406
13691
  waterFallData &&
13407
- (getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({
13408
- hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag,
13409
- 'itemFilter.itemId': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId,
13410
- 'itemFilter.itemType': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemType
13411
- }).then((res) => {
13692
+ (getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos(Object.assign(Object.assign({ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag }, (((_b = (_a = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec) === null || _a === void 0 ? void 0 : _a.product) === null || _b === void 0 ? void 0 : _b.itemId) && { productFilter: (_d = (_c = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec) === null || _c === void 0 ? void 0 : _c.product) === null || _d === void 0 ? void 0 : _d.itemId })), ((waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId) && { contentFilter: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId }))).then((res) => {
13412
13693
  var _a, _b;
13413
13694
  setList(list === null || list === void 0 ? void 0 : list.concat((_b = (_a = res === null || res === void 0 ? void 0 : res.recList) === null || _a === void 0 ? void 0 : _a.filter((item) => !(item === null || item === void 0 ? void 0 : item.video))) !== null && _b !== void 0 ? _b : []));
13414
13695
  setIsLoadingData(false);
@@ -13616,31 +13897,22 @@ Made in Italy` })));
13616
13897
  const containerRef = React.useRef(null);
13617
13898
  const [isLoadMore, setIsLoadMore] = React.useState(false);
13618
13899
  React.useCallback(() => {
13900
+ var _a, _b, _c, _d;
13619
13901
  if (isLoadMore)
13620
13902
  return;
13621
13903
  setIsLoadMore(true);
13622
13904
  waterFallData &&
13623
- (getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({
13624
- hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag,
13625
- 'itemFilter.itemId': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId,
13626
- 'itemFilter.itemType': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemType
13627
- }).then((res) => {
13905
+ (getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos(Object.assign(Object.assign({ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag }, (((_b = (_a = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec) === null || _a === void 0 ? void 0 : _a.product) === null || _b === void 0 ? void 0 : _b.itemId) && { productFilter: (_d = (_c = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec) === null || _c === void 0 ? void 0 : _c.product) === null || _d === void 0 ? void 0 : _d.itemId })), ((waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId) && { contentFilter: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId }))).then((res) => {
13628
13906
  var _a;
13629
13907
  setList(list === null || list === void 0 ? void 0 : list.concat((_a = res === null || res === void 0 ? void 0 : res.recList) !== null && _a !== void 0 ? _a : []));
13630
13908
  setIsLoadMore(false);
13631
13909
  }));
13632
13910
  }, [waterFallData, getRecommendVideos, list, isLoadMore]);
13633
13911
  React.useEffect(() => {
13634
- var _a, _b;
13912
+ var _a, _b, _c, _d, _e, _f;
13635
13913
  setIsLoadingData(true);
13636
13914
  waterFallData &&
13637
- (getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({
13638
- hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag,
13639
- 'itemFilter.itemId': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId,
13640
- 'itemFilter.itemType': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemType,
13641
- defaultSize: hashTagSize,
13642
- maxSize: hashTagSize
13643
- }).then((res) => {
13915
+ (getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos(Object.assign(Object.assign(Object.assign({ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag }, (((_b = (_a = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec) === null || _a === void 0 ? void 0 : _a.product) === null || _b === void 0 ? void 0 : _b.itemId) && { productFilter: (_d = (_c = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec) === null || _c === void 0 ? void 0 : _c.product) === null || _d === void 0 ? void 0 : _d.itemId })), ((waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId) && { contentFilter: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId })), { defaultSize: hashTagSize, maxSize: hashTagSize })).then((res) => {
13644
13916
  var _a, _b;
13645
13917
  setData(res);
13646
13918
  setList((_b = (_a = res === null || res === void 0 ? void 0 : res.recList) === null || _a === void 0 ? void 0 : _a.filter((item) => (item === null || item === void 0 ? void 0 : item.video) !== null || (item === null || item === void 0 ? void 0 : item.product) !== null)) !== null && _b !== void 0 ? _b : []);
@@ -13649,7 +13921,7 @@ Made in Italy` })));
13649
13921
  if (isOpenHashTag) {
13650
13922
  const res = previewData;
13651
13923
  setData(res);
13652
- setList((_b = (_a = res === null || res === void 0 ? void 0 : res.recList) === null || _a === void 0 ? void 0 : _a.filter((item) => (item === null || item === void 0 ? void 0 : item.video) !== null || (item === null || item === void 0 ? void 0 : item.product) !== null)) !== null && _b !== void 0 ? _b : []);
13924
+ setList((_f = (_e = res === null || res === void 0 ? void 0 : res.recList) === null || _e === void 0 ? void 0 : _e.filter((item) => (item === null || item === void 0 ? void 0 : item.video) !== null || (item === null || item === void 0 ? void 0 : item.product) !== null)) !== null && _f !== void 0 ? _f : []);
13653
13925
  setIsLoadingData(false);
13654
13926
  }
13655
13927
  }, [waterFallData, getRecommendVideos, hashTagSize, isOpenHashTag]);
@@ -13976,7 +14248,7 @@ Made in Italy` })));
13976
14248
  * @Author: binruan@chatlabs.com
13977
14249
  * @Date: 2024-07-02 14:51:32
13978
14250
  * @LastEditors: binruan@chatlabs.com
13979
- * @LastEditTime: 2024-08-06 14:28:34
14251
+ * @LastEditTime: 2024-07-05 19:09:41
13980
14252
  * @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLink\settingRender.tsx
13981
14253
  *
13982
14254
  */
@@ -14079,10 +14351,6 @@ Made in Italy` })));
14079
14351
  label: '对齐',
14080
14352
  type: 'TextAlign',
14081
14353
  name: ['props', 'ctaTempStyles', 'ctaTitle']
14082
- },
14083
- {
14084
- type: 'TextSpace',
14085
- name: ['props', 'ctaTempStyles', 'ctaTitle']
14086
14354
  }
14087
14355
  ]
14088
14356
  }
@@ -14740,6 +15008,7 @@ Made in Italy` })));
14740
15008
  CommodityList: CommodityList,
14741
15009
  Consent: Consent,
14742
15010
  HashTag: HashTag,
15011
+ Iframe: Iframe,
14743
15012
  Link: Link,
14744
15013
  MultiCommodity: MultiCommodity,
14745
15014
  MultiCommodityDiro: MultiCommodityDiro,
@@ -15198,14 +15467,6 @@ Made in Italy` })));
15198
15467
  };
15199
15468
  var VideoWidget$3 = React.memo(VideoWidget$2);
15200
15469
 
15201
- /*
15202
- * @Author: binruan@chatlabs.com
15203
- * @Date: 2023-12-27 19:02:59
15204
- * @LastEditors: binruan@chatlabs.com
15205
- * @LastEditTime: 2024-01-24 10:30:13
15206
- * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\ToggleButton\index.tsx
15207
- *
15208
- */
15209
15470
  const ToggleButton = ({ defaultValue, activeIcon, unactiveIcon, onChange, style }) => {
15210
15471
  const [isTrue, setIsTure] = React.useState(defaultValue);
15211
15472
  const handleClick = (e) => {
@@ -15214,6 +15475,9 @@ Made in Italy` })));
15214
15475
  setIsTure(result);
15215
15476
  onChange === null || onChange === void 0 ? void 0 : onChange(result);
15216
15477
  };
15478
+ React.useEffect(() => {
15479
+ setIsTure(defaultValue);
15480
+ }, [defaultValue]);
15217
15481
  return (React.createElement("button", { style: style, "aria-label": 'toggle button', className: 'pb-toggle-button', onClick: handleClick },
15218
15482
  React.createElement("img", { className: 'pb-toggle-button-icon', alt: 'toggle image', src: isTrue ? activeIcon : unactiveIcon })));
15219
15483
  };
@@ -15592,12 +15856,14 @@ Made in Italy` })));
15592
15856
  * @Author: binruan@chatlabs.com
15593
15857
  * @Date: 2024-01-15 19:03:09
15594
15858
  * @LastEditors: binruan@chatlabs.com
15595
- * @LastEditTime: 2024-08-02 18:34:27
15859
+ * @LastEditTime: 2024-08-14 19:09:32
15596
15860
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
15597
15861
  *
15598
15862
  */
15599
15863
  const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.innerHeight, containerWidth = window.innerWidth, tempMap, resolver, data = [], ctaType, tipText, nudge, _schema, hashTagStyle, tagList = [], licenseUrl }) => {
15600
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
15864
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
15865
+ const mutedIcon = useIconLink('/pb_static/5beaaa5ce7f3477b99db3838619cc471.png');
15866
+ const unmutedIcon = useIconLink('/pb_static/fea8668a8a894e4aa3a86bcc775e895e.png');
15601
15867
  const { schema } = useEditor();
15602
15868
  const [activeIndex, setActiveIndex] = React.useState(0);
15603
15869
  const viewImageStartTime = React.useRef(0);
@@ -15611,8 +15877,8 @@ Made in Italy` })));
15611
15877
  const { backMainFeed } = useEventReport();
15612
15878
  const { productView } = useEventReport();
15613
15879
  const isShowFingerTip = React.useMemo(() => {
15614
- return data.length > 0 && !loading && getFeUserId();
15615
- }, [data, loading]);
15880
+ return data.length > 0 && !loading && (getFeUserId() || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enableSwiperTip));
15881
+ }, [data, loading, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enableSwiperTip]);
15616
15882
  React.useEffect(() => {
15617
15883
  refreshFeSessionId();
15618
15884
  }, []);
@@ -15640,14 +15906,15 @@ Made in Italy` })));
15640
15906
  var _a;
15641
15907
  const index = (data === null || data === void 0 ? void 0 : data.findIndex((item) => {
15642
15908
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
15643
- if (ctaType === '多商品CTA') {
15909
+ const ctaType0 = ctaType === null || ctaType === void 0 ? void 0 : ctaType[0];
15910
+ if (ctaType0 === '多商品CTA') {
15644
15911
  return ((_a = item === null || item === void 0 ? void 0 : item.video) === null || _a === void 0 ? void 0 : _a.bindProducts) && ((_c = (_b = item === null || item === void 0 ? void 0 : item.video) === null || _b === void 0 ? void 0 : _b.bindProducts) === null || _c === void 0 ? void 0 : _c.length) > 0;
15645
15912
  }
15646
- else if (ctaType === '商品CTA') {
15913
+ else if (ctaType0 === '商品CTA') {
15647
15914
  return (_d = item === null || item === void 0 ? void 0 : item.video) === null || _d === void 0 ? void 0 : _d.bindProduct;
15648
15915
  }
15649
15916
  else {
15650
- return ((_f = (_e = item === null || item === void 0 ? void 0 : item.video) === null || _e === void 0 ? void 0 : _e.bindCta) === null || _f === void 0 ? void 0 : _f.itemId) === ctaType && (((_g = item === null || item === void 0 ? void 0 : item.video) === null || _g === void 0 ? void 0 : _g.url) || ((_j = (_h = item === null || item === void 0 ? void 0 : item.video) === null || _h === void 0 ? void 0 : _h.imgUrls) === null || _j === void 0 ? void 0 : _j.length));
15917
+ return ((_f = (_e = item === null || item === void 0 ? void 0 : item.video) === null || _e === void 0 ? void 0 : _e.bindCta) === null || _f === void 0 ? void 0 : _f.itemId) === ctaType0 && (((_g = item === null || item === void 0 ? void 0 : item.video) === null || _g === void 0 ? void 0 : _g.url) || ((_j = (_h = item === null || item === void 0 ? void 0 : item.video) === null || _h === void 0 ? void 0 : _h.imgUrls) === null || _j === void 0 ? void 0 : _j.length));
15651
15918
  }
15652
15919
  })) || 0;
15653
15920
  (_a = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper.slideTo(index);
@@ -15752,8 +16019,10 @@ Made in Italy` })));
15752
16019
  return containerHeight - minusHeight - tagHeight;
15753
16020
  }, [globalConfig, containerHeight, tagHeight]);
15754
16021
  const renderLogo = React.useMemo(() => {
16022
+ var _a, _b;
15755
16023
  if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
15756
- return (React.createElement("div", { className: 'clc-sxp-logo-banner', style: { backgroundColor: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.color } },
16024
+ 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;
16025
+ return (React.createElement("div", Object.assign({ className: 'clc-sxp-logo-banner', style: { backgroundColor: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.color } }, (link && { onClick: () => new Function(link)() })),
15757
16026
  React.createElement("img", { src: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl, alt: 'logo' })));
15758
16027
  }
15759
16028
  return null;
@@ -15833,9 +16102,9 @@ Made in Italy` })));
15833
16102
  isShowMore,
15834
16103
  lineGradStyle
15835
16104
  ]);
15836
- const renderLikeButton = React.useCallback((rec, index) => {
16105
+ const renderLikeButton = React.useCallback((rec, index, visible) => {
15837
16106
  var _a, _b, _c, _d;
15838
- if (!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLike))
16107
+ if (!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLike) || !visible)
15839
16108
  return;
15840
16109
  let top = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconY) !== null && _a !== void 0 ? _a : 400;
15841
16110
  if (waterFallData && top < 40) {
@@ -15843,6 +16112,7 @@ Made in Italy` })));
15843
16112
  }
15844
16113
  if (rec === null || rec === void 0 ? void 0 : rec.video) {
15845
16114
  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: {
16115
+ position: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconFixed) ? 'fixed' : 'absolute',
15846
16116
  [(_b = globalConfig.likeIconXPosit) !== null && _b !== void 0 ? _b : 'right']: (_c = globalConfig.likeIconX) !== null && _c !== void 0 ? _c : 0,
15847
16117
  [(_d = globalConfig.likeIconYPosit) !== null && _d !== void 0 ? _d : 'bottom']: top
15848
16118
  }, position: index }));
@@ -15993,6 +16263,18 @@ Made in Italy` })));
15993
16263
  });
15994
16264
  return !waterFallData ? list.concat([{ loading: true }]) : list;
15995
16265
  }, [data, activeIndex, waterFallData]);
16266
+ const renderToggleButton = React.useCallback((visible) => {
16267
+ var _a, _b, _c, _d, _e, _f;
16268
+ if (!visible)
16269
+ return;
16270
+ 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: {
16271
+ position: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed) ? 'fixed' : 'absolute',
16272
+ 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',
16273
+ zIndex: 999,
16274
+ [(_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,
16275
+ [(_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
16276
+ }, 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 })));
16277
+ }, [globalConfig, visList, activeIndex, isMuted]);
15996
16278
  const renderView = React.useMemo(() => {
15997
16279
  if (loading) {
15998
16280
  return (React.createElement("div", { style: { height, width: containerWidth, display: 'flex', justifyContent: 'center', alignItems: 'center' } },
@@ -16009,20 +16291,30 @@ Made in Italy` })));
16009
16291
  React.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } }))) : (React.createElement(React.Fragment, null,
16010
16292
  renderContent(rec, index),
16011
16293
  renderBottom(rec, index),
16012
- renderLikeButton(rec, index)))))));
16294
+ renderLikeButton(rec, index, !(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconFixed)),
16295
+ renderToggleButton(!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed))))))));
16013
16296
  });
16014
- }, [containerWidth, data, height, loading, renderBottom, renderContent, visList, loadingImage, isReload]);
16015
- const mutedIcon = useIconLink('/pb_static/5beaaa5ce7f3477b99db3838619cc471.png');
16016
- const unmutedIcon = useIconLink('/pb_static/fea8668a8a894e4aa3a86bcc775e895e.png');
16297
+ }, [
16298
+ containerWidth,
16299
+ data,
16300
+ height,
16301
+ loading,
16302
+ renderBottom,
16303
+ renderContent,
16304
+ visList,
16305
+ loadingImage,
16306
+ isReload,
16307
+ renderToggleButton
16308
+ ]);
16017
16309
  return (React.createElement("div", { id: 'sxp-render', className: 'clc-sxp-container' },
16018
- waterFallData && (React.createElement(Navbar$1, { icon: img, styles: { background: 'rgba(0,0,0,.3)', color: '#fff' }, onClose: () => {
16310
+ waterFallData && (React.createElement(Navbar$1, { icon: img, styles: { background: 'rgba(0,0,0,.3)', color: '#fff' }, textStyle: Object.assign(Object.assign({}, (_e = (_d = (_c = (_b = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.hashTag) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.item) === null || _c === void 0 ? void 0 : _c.props) === null || _d === void 0 ? void 0 : _d.textStyles) === null || _e === void 0 ? void 0 : _e.hashTagTitle), { color: '#fff' }), onClose: () => {
16019
16311
  setOpenHashtag === null || setOpenHashtag === void 0 ? void 0 : setOpenHashtag(true);
16020
16312
  } })),
16021
16313
  renderLogo,
16022
16314
  React.createElement(Tagbar$1, { tagList: tagList, setActiveIndex: setActiveIndex, style: {
16023
16315
  top: minusHeight
16024
16316
  } }),
16025
- isShowFingerTip ? (React.createElement(FingerSwipeTip, { imageUrl: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipIcon, style: { top: `${50 - ((_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipOffset) !== null && _a !== void 0 ? _a : 0)}%` }, duration: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swiperTipAniDur })) : null,
16317
+ isShowFingerTip ? (React.createElement(FingerSwipeTip, { imageUrl: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipIcon, style: { top: `${50 - ((_f = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipOffset) !== null && _f !== void 0 ? _f : 0)}%` }, duration: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swiperTipAniDur })) : null,
16026
16318
  React.createElement(Swiper, { style: {
16027
16319
  marginTop: tagHeight
16028
16320
  }, ref: swiperRef, onSlideChange: () => {
@@ -16047,15 +16339,10 @@ Made in Italy` })));
16047
16339
  }
16048
16340
  }
16049
16341
  }, direction: 'vertical', height: height },
16050
- ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowMute) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowMute) === true) && (React.createElement(ToggleButton$1, { style: {
16051
- position: 'fixed',
16052
- visibility: ((_c = (_b = data === null || data === void 0 ? void 0 : data[activeIndex]) === null || _b === void 0 ? void 0 : _b.video) === null || _c === void 0 ? void 0 : _c.url) ? 'visible' : 'hidden',
16053
- zIndex: 999,
16054
- [(_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconXPosit) !== null && _d !== void 0 ? _d : 'right']: (_e = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconX) !== null && _e !== void 0 ? _e : 0,
16055
- [(_f = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconYPosit) !== null && _f !== void 0 ? _f : 'bottom']: (_g = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconY) !== null && _g !== void 0 ? _g : 23
16056
- }, defaultValue: isMuted, activeIcon: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unMuteIcon) ? globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unMuteIcon : mutedIcon, unactiveIcon: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIcon) ? globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIcon : unmutedIcon, onChange: setIsMuted })),
16342
+ renderLikeButton(visList[activeIndex], activeIndex, !!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconFixed)),
16343
+ renderToggleButton(!!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed)),
16057
16344
  renderView),
16058
- React.createElement(WaterFall$1, Object.assign({}, (_k = (_j = (_h = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.hashTag) === null || _h === void 0 ? void 0 : _h[0]) === null || _j === void 0 ? void 0 : _j.item) === null || _k === void 0 ? void 0 : _k.props))));
16345
+ React.createElement(WaterFall$1, Object.assign({}, (_j = (_h = (_g = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.hashTag) === null || _g === void 0 ? void 0 : _g[0]) === null || _h === void 0 ? void 0 : _h.item) === null || _j === void 0 ? void 0 : _j.props))));
16059
16346
  };
16060
16347
 
16061
16348
  const PictureGroup = ({ imgUrls, width, height, imgUrlsPostConfig, rec, index }) => {
@@ -16422,7 +16709,7 @@ Made in Italy` })));
16422
16709
  * @Author: binruan@chatlabs.com
16423
16710
  * @Date: 2023-10-31 10:56:01
16424
16711
  * @LastEditors: binruan@chatlabs.com
16425
- * @LastEditTime: 2024-08-01 15:23:51
16712
+ * @LastEditTime: 2024-08-06 17:15:56
16426
16713
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Popup\index.tsx
16427
16714
  *
16428
16715
  */
@@ -16481,14 +16768,14 @@ Made in Italy` })));
16481
16768
  const renderPopupDetail = React.useMemo(() => {
16482
16769
  var _a, _b, _c;
16483
16770
  return (_c = (_b = (_a = schema === null || schema === void 0 ? void 0 : schema.sxpPageConf) === null || _a === void 0 ? void 0 : _a.globalConfig) === null || _b === void 0 ? void 0 : _b.popupList) === null || _c === void 0 ? void 0 : _c.map((value, index) => {
16484
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
16771
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
16485
16772
  if ((value === null || value === void 0 ? void 0 : value.id) === (popup === null || popup === void 0 ? void 0 : popup.id)) {
16486
16773
  const t = resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type];
16487
16774
  const Component = withBindDataSource(t);
16488
16775
  const isExternalLink = ((_d = (_c = (_b = value === null || value === void 0 ? void 0 : value.item) === null || _b === void 0 ? void 0 : _b.event) === null || _c === void 0 ? void 0 : _c.onClick) === null || _d === void 0 ? void 0 : _d.linkType) === 'externalLink';
16489
16776
  const isPopup = ((_g = (_f = (_e = value === null || value === void 0 ? void 0 : value.item) === null || _e === void 0 ? void 0 : _e.event) === null || _f === void 0 ? void 0 : _f.onClick) === null || _g === void 0 ? void 0 : _g.linkType) === 'popup';
16490
16777
  const defaulSetting = (_h = t === null || t === void 0 ? void 0 : t.extend) === null || _h === void 0 ? void 0 : _h.defaulSetting;
16491
- return (React.createElement(Component, Object.assign({ key: index, style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_j = value === null || value === void 0 ? void 0 : value.item) === null || _j === void 0 ? void 0 : _j.style), { width: (_k = window.innerWidth) !== null && _k !== void 0 ? _k : '100vw', height: '100%' }), textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_l = value === null || value === void 0 ? void 0 : value.item) === null || _l === void 0 ? void 0 : _l.textStyle), bindDatas: (_o = (_m = value === null || value === void 0 ? void 0 : value.item) === null || _m === void 0 ? void 0 : _m.bindDatas) !== null && _o !== void 0 ? _o : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_p = value === null || value === void 0 ? void 0 : value.item) === null || _p === void 0 ? void 0 : _p.props, { event: ((_q = value === null || value === void 0 ? void 0 : value.item) === null || _q === void 0 ? void 0 : _q.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, isExternalLink: isExternalLink, isPopup: isPopup, onClose: handleClose })));
16778
+ return (React.createElement(Component, Object.assign({ key: index, style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_j = value === null || value === void 0 ? void 0 : value.item) === null || _j === void 0 ? void 0 : _j.style), { height: '100%' }), textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_k = value === null || value === void 0 ? void 0 : value.item) === null || _k === void 0 ? void 0 : _k.textStyle), bindDatas: (_m = (_l = value === null || value === void 0 ? void 0 : value.item) === null || _l === void 0 ? void 0 : _l.bindDatas) !== null && _m !== void 0 ? _m : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_o = value === null || value === void 0 ? void 0 : value.item) === null || _o === void 0 ? void 0 : _o.props, { event: ((_p = value === null || value === void 0 ? void 0 : value.item) === null || _p === void 0 ? void 0 : _p.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, isExternalLink: isExternalLink, isPopup: isPopup, onClose: handleClose })));
16492
16779
  }
16493
16780
  else {
16494
16781
  return React.createElement(React.Fragment, null);