pb-sxp-ui 1.2.9 → 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 (96) hide show
  1. package/dist/index.cjs +611 -260
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.css +62 -2
  4. package/dist/index.js +611 -260
  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 +611 -260
  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 +19 -17
  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/popup/AppointForm/settingRender.js +15 -0
  29. package/es/materials/sxp/popup/CommodityDetail/index.d.ts +10 -1
  30. package/es/materials/sxp/popup/CommodityDetail/index.js +46 -28
  31. package/es/materials/sxp/popup/CommodityDetail/material.js +4 -0
  32. package/es/materials/sxp/popup/CommodityDetail/settingRender.d.ts +21 -2
  33. package/es/materials/sxp/popup/CommodityDetail/settingRender.js +46 -0
  34. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +10 -1
  35. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +72 -46
  36. package/es/materials/sxp/popup/CommodityDetailDiroNew/material.js +4 -0
  37. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +21 -2
  38. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +46 -0
  39. package/es/materials/sxp/popup/CommodityList/settingRender.js +15 -0
  40. package/es/materials/sxp/popup/Iframe/index.d.ts +16 -0
  41. package/es/materials/sxp/popup/Iframe/index.js +18 -0
  42. package/es/materials/sxp/popup/Iframe/material.d.ts +2 -0
  43. package/es/materials/sxp/popup/Iframe/material.js +21 -0
  44. package/es/materials/sxp/popup/Iframe/settingRender.d.ts +9 -0
  45. package/es/materials/sxp/popup/Iframe/settingRender.js +12 -0
  46. package/es/materials/sxp/popup/Prompt/settingRender.js +16 -1
  47. package/es/materials/sxp/popup/index.d.ts +1 -0
  48. package/es/materials/sxp/popup/index.js +1 -0
  49. package/es/materials/sxp/template/Link/index.js +5 -11
  50. package/es/materials/sxp/template/Link/interactionRender.d.ts +8 -0
  51. package/es/materials/sxp/template/Link/interactionRender.js +11 -0
  52. package/es/materials/sxp/template/Link/material.js +3 -1
  53. package/es/materials/sxp/template/components/EventProvider.d.ts +3 -2
  54. package/es/materials/sxp/template/components/EventProvider.js +3 -3
  55. package/lib/core/components/SxpPageRender/FormatImage.js +19 -17
  56. package/lib/core/components/SxpPageRender/Modal/index.js +33 -20
  57. package/lib/core/components/SxpPageRender/Popup/index.js +2 -2
  58. package/lib/core/components/SxpPageRender/ToggleButton/index.js +3 -0
  59. package/lib/core/components/SxpPageRender/WaterFall/List.js +5 -14
  60. package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +5 -14
  61. package/lib/core/components/SxpPageRender/index.d.ts +6 -1
  62. package/lib/core/components/SxpPageRender/index.js +46 -23
  63. package/lib/core/components/SxpPageRender/typing.d.ts +2 -0
  64. package/lib/core/context/SxpDataSourceProvider.d.ts +3 -2
  65. package/lib/core/context/SxpDataSourceProvider.js +27 -30
  66. package/lib/core/hooks/useEventReport.js +9 -8
  67. package/lib/core/utils/tool.d.ts +5 -1
  68. package/lib/core/utils/tool.js +73 -1
  69. package/lib/materials/sxp/popup/AppointForm/settingRender.js +15 -0
  70. package/lib/materials/sxp/popup/CommodityDetail/index.d.ts +10 -1
  71. package/lib/materials/sxp/popup/CommodityDetail/index.js +46 -28
  72. package/lib/materials/sxp/popup/CommodityDetail/material.js +4 -0
  73. package/lib/materials/sxp/popup/CommodityDetail/settingRender.d.ts +21 -2
  74. package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +46 -0
  75. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +10 -1
  76. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +72 -46
  77. package/lib/materials/sxp/popup/CommodityDetailDiroNew/material.js +4 -0
  78. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +21 -2
  79. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +46 -0
  80. package/lib/materials/sxp/popup/CommodityList/settingRender.js +15 -0
  81. package/lib/materials/sxp/popup/Iframe/index.d.ts +16 -0
  82. package/lib/materials/sxp/popup/Iframe/index.js +20 -0
  83. package/lib/materials/sxp/popup/Iframe/material.d.ts +2 -0
  84. package/lib/materials/sxp/popup/Iframe/material.js +25 -0
  85. package/lib/materials/sxp/popup/Iframe/settingRender.d.ts +9 -0
  86. package/lib/materials/sxp/popup/Iframe/settingRender.js +14 -0
  87. package/lib/materials/sxp/popup/Prompt/settingRender.js +16 -1
  88. package/lib/materials/sxp/popup/index.d.ts +1 -0
  89. package/lib/materials/sxp/popup/index.js +1 -0
  90. package/lib/materials/sxp/template/Link/index.js +5 -11
  91. package/lib/materials/sxp/template/Link/interactionRender.d.ts +8 -0
  92. package/lib/materials/sxp/template/Link/interactionRender.js +13 -0
  93. package/lib/materials/sxp/template/Link/material.js +3 -1
  94. package/lib/materials/sxp/template/components/EventProvider.d.ts +3 -2
  95. package/lib/materials/sxp/template/components/EventProvider.js +3 -3
  96. 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-07-02 10:01:21
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: '组件名称',
@@ -1292,14 +1384,14 @@
1292
1384
  * @Author: binruan@chatlabs.com
1293
1385
  * @Date: 2024-03-12 10:59:06
1294
1386
  * @LastEditors: binruan@chatlabs.com
1295
- * @LastEditTime: 2024-08-01 17:36:34
1387
+ * @LastEditTime: 2024-08-14 17:02:53
1296
1388
  * @FilePath: \pb-sxp-ui\src\core\hooks\useEventReport.ts
1297
1389
  *
1298
1390
  */
1299
1391
  function useEventReport() {
1300
1392
  const { bffEventReport, popupDetailData, waterFallData, isFromHashtag } = useSxpDataSource();
1301
1393
  const jumpToWeb = React.useCallback((data, product, cta, position) => {
1302
- 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;
1303
1395
  let fromKName = '';
1304
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))) {
1305
1397
  fromKName = 'pdpPage';
@@ -1316,21 +1408,22 @@
1316
1408
  else if (data === null || data === void 0 ? void 0 : data.product) {
1317
1409
  fromKName = 'productPage';
1318
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;
1319
1412
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
1320
1413
  eventInfo: {
1321
1414
  eventSubject: 'jumpToWeb',
1322
1415
  eventDescription: 'User jumped to website',
1323
- productId: (_h = product === null || product === void 0 ? void 0 : product.itemId) !== null && _h !== void 0 ? _h : '',
1324
- 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 : '',
1325
1418
  price: (product === null || product === void 0 ? void 0 : product.price) ? (product === null || product === void 0 ? void 0 : product.price) + '' : '0',
1326
- 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 : '',
1327
1420
  fromKName,
1328
1421
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
1329
- 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) : '',
1330
1423
  position: position + '',
1331
- 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 : '',
1332
- ctatId: (_o = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _o !== void 0 ? _o : '',
1333
- 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 : ''
1334
1427
  }
1335
1428
  });
1336
1429
  }, [bffEventReport, popupDetailData, isFromHashtag]);
@@ -1500,9 +1593,9 @@
1500
1593
  category: 'popup',
1501
1594
  type: 'AppointForm',
1502
1595
  related: {
1503
- settingRender: settingRender$9,
1596
+ settingRender: settingRender$a,
1504
1597
  bindableProps: [],
1505
- interactionRender: interactionRender$d
1598
+ interactionRender: interactionRender$e
1506
1599
  },
1507
1600
  defaulSetting: {
1508
1601
  name: '表单',
@@ -1525,10 +1618,41 @@
1525
1618
  sort: 2
1526
1619
  });
1527
1620
 
1528
- 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
+ },
1529
1637
  {
1530
1638
  title: '商品图片',
1531
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
+ },
1532
1656
  {
1533
1657
  type: 'Radius',
1534
1658
  label: '轮播指示器',
@@ -1540,6 +1664,10 @@
1540
1664
  {
1541
1665
  label: '居中',
1542
1666
  value: 'center'
1667
+ },
1668
+ {
1669
+ label: '居右',
1670
+ value: 'right'
1543
1671
  }
1544
1672
  ],
1545
1673
  name: ['props', 'swiper', 'dotsAlign']
@@ -1787,6 +1915,17 @@
1787
1915
  name: ['props', 'buttonStyle']
1788
1916
  }
1789
1917
  ]
1918
+ },
1919
+ {
1920
+ title: 'Iframe商品弹窗',
1921
+ child: [
1922
+ {
1923
+ label: '弹窗按钮',
1924
+ type: 'Upload',
1925
+ name: ['props', 'iframeIcon'],
1926
+ text: '建议尺寸:106 * 41'
1927
+ }
1928
+ ]
1790
1929
  }
1791
1930
  ];
1792
1931
 
@@ -8616,13 +8755,13 @@
8616
8755
  * @Author: binruan@chatlabs.com
8617
8756
  * @Date: 2023-11-02 18:34:34
8618
8757
  * @LastEditors: binruan@chatlabs.com
8619
- * @LastEditTime: 2024-07-29 16:20:40
8758
+ * @LastEditTime: 2024-08-06 16:35:43
8620
8759
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Modal\index.tsx
8621
8760
  *
8622
8761
  */
8623
8762
  const closeIcon$1 = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII=';
8624
8763
  const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema, fullHeight = window.innerHeight, isFullScreen = false }) => {
8625
- var _a, _b;
8764
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
8626
8765
  const touchRef = React.useRef(null);
8627
8766
  const fTouchRef = React.useRef(null);
8628
8767
  const touchMoveRef = React.useRef(null);
@@ -8649,12 +8788,16 @@
8649
8788
  const isOpen = React.useMemo(() => {
8650
8789
  return ((popup === null || popup === void 0 ? void 0 : popup.id) && (popup === null || popup === void 0 ? void 0 : popup.id) !== '') || visible;
8651
8790
  }, [visible, popup]);
8652
- const isScrollFullScreen = React.useMemo(() => {
8653
- var _a, _b, _c, _d, _e;
8791
+ const getPopupById = React.useMemo(() => {
8792
+ var _a, _b, _c;
8654
8793
  const schemaData = schema !== null && schema !== void 0 ? schema : _schema;
8655
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));
8656
- 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;
8657
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]);
8658
8801
  React.useEffect(() => {
8659
8802
  if (isOpen) {
8660
8803
  setIsShow(true);
@@ -8721,22 +8864,31 @@
8721
8864
  touchMoveRef.current = false;
8722
8865
  };
8723
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 },
8724
- 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 && {
8725
- transform: `translateY(${modalTrans}px)`
8726
- })), onClick: (e) => {
8727
- e.stopPropagation();
8728
- e.preventDefault();
8729
- } }, (isScrollFullScreen && {
8730
- onTouchMove: handleTouchMove,
8731
- onTouchStart: handleTouchStart,
8732
- onTouchEnd: handleTouchEnd
8733
- })),
8734
- React.createElement("div", { onClick: onClose, className: 'modal-icon-wrapper' },
8735
- 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' })),
8736
- React.createElement("div", { ref: ref, style: {
8737
- height: isScrollFullScreen ? fullHeight : MODAL_DEF_CON_H,
8738
- overflow: (isScrollFullScreen && modalTrans <= 0) || !isScrollFullScreen ? 'auto' : 'hidden'
8739
- } }, 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);
8740
8892
  };
8741
8893
  var Modal$1 = React.memo(Modal);
8742
8894
 
@@ -8809,18 +8961,20 @@
8809
8961
  const { src, onLoad, style, className, loading, alt = 'image' } = props;
8810
8962
  const [imgSrc, setImgSrc] = React.useState();
8811
8963
  const imgRef = React.useRef(null);
8964
+ const [visible, setVisible] = React.useState(false);
8812
8965
  React.useImperativeHandle(ref, () => ({
8813
8966
  setSrc: (v) => {
8814
- setImgSrc(v);
8967
+ if (v)
8968
+ setImgSrc(v);
8815
8969
  }
8816
8970
  }));
8817
8971
  React.useEffect(() => {
8818
- setImgSrc(src);
8972
+ if (src)
8973
+ setImgSrc(src);
8819
8974
  }, [src]);
8820
8975
  React.useEffect(() => {
8821
8976
  const onShow = () => {
8822
- var _a, _b;
8823
- if (src && ((_b = (_a = imgRef === null || imgRef === void 0 ? void 0 : imgRef.current) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.display) === 'none') {
8977
+ if (src && !visible && imgRef.current) {
8824
8978
  imgRef.current.src = '';
8825
8979
  imgRef.current.src = src;
8826
8980
  }
@@ -8829,20 +8983,20 @@
8829
8983
  return () => {
8830
8984
  SXP_EVENT_BUS.off(SXP_EVENT_TYPE.PAGE_DID_SHOW, onShow);
8831
8985
  };
8832
- }, [src]);
8833
- return (React.createElement(React.Fragment, null, (imgSrc === null || imgSrc === void 0 ? void 0 : imgSrc.includes('.avif')) ? (React.createElement("picture", null,
8834
- React.createElement("source", { type: 'image/avif', srcSet: imgSrc }),
8835
- React.createElement("source", { type: 'image/webp', srcSet: `${imgSrc}?imageMogr2/format/webp` }),
8836
- React.createElement("source", { type: 'image/jpeg', srcSet: `${imgSrc}?imageMogr2/format/jpg` }),
8837
- React.createElement("img", { ref: imgRef, className: className, src: imgSrc, style: Object.assign(Object.assign({}, style), { display: 'none' }), loading: loading, onLoad: (e) => {
8838
- if (imgRef.current)
8839
- imgRef.current.style.display = 'block';
8986
+ }, [src, visible]);
8987
+ return (React.createElement(React.Fragment, null,
8988
+ !visible && React.createElement("div", { style: { width: '100%', height: '100%', zIndex: 1, backgroundColor: '#fff' } }),
8989
+ (imgSrc === null || imgSrc === void 0 ? void 0 : imgSrc.includes('.avif')) ? (React.createElement("picture", null,
8990
+ React.createElement("source", { type: 'image/avif', srcSet: imgSrc }),
8991
+ React.createElement("source", { type: 'image/webp', srcSet: `${imgSrc}?imageMogr2/format/webp` }),
8992
+ React.createElement("source", { type: 'image/jpeg', srcSet: `${imgSrc}?imageMogr2/format/jpg` }),
8993
+ React.createElement("img", { ref: imgRef, className: className, src: imgSrc, style: Object.assign({}, style), loading: loading, onLoad: (e) => {
8994
+ setVisible(true);
8995
+ onLoad === null || onLoad === void 0 ? void 0 : onLoad(e.target);
8996
+ }, alt: alt }))) : (React.createElement("img", { ref: imgRef, className: className, src: imgSrc, style: Object.assign({}, style), loading: loading, onLoad: (e) => {
8997
+ setVisible(true);
8840
8998
  onLoad === null || onLoad === void 0 ? void 0 : onLoad(e.target);
8841
- }, alt: alt }))) : (React.createElement("img", { ref: imgRef, className: className, src: imgSrc, style: Object.assign(Object.assign({}, style), { display: 'none' }), loading: loading, onLoad: (e) => {
8842
- if (imgRef.current)
8843
- imgRef.current.style.display = 'block';
8844
- onLoad === null || onLoad === void 0 ? void 0 : onLoad(e.target);
8845
- }, alt: alt }))));
8999
+ }, alt: alt }))));
8846
9000
  });
8847
9001
  var FormatImage$1 = React.memo(FormatImage);
8848
9002
 
@@ -8900,8 +9054,8 @@
8900
9054
  var CommodityGroup$1 = React.memo(CommodityGroup);
8901
9055
 
8902
9056
  const CommodityDetail$1 = (_a) => {
8903
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
8904
- 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"]);
8905
9059
  const { sxpParameter, popupDetailData, isPreview, bffFbReport, popupCurTimeRef, checkCommodityIndexRef } = useSxpDataSource();
8906
9060
  const { jumpToWeb, productView } = useEventReport();
8907
9061
  const curTimeRef = React.useRef(null);
@@ -8957,7 +9111,8 @@
8957
9111
  return '$7,000';
8958
9112
  }
8959
9113
  }, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency]);
8960
- 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;
8961
9116
  const renderContent = ({ isPost }) => {
8962
9117
  var _a, _b, _c, _d;
8963
9118
  return (React.createElement("div", null,
@@ -9004,25 +9159,32 @@
9004
9159
  return;
9005
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 }));
9006
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);
9007
9171
  return (React.createElement(React.Fragment, null,
9008
9172
  React.createElement("div", Object.assign({ className: css.css(Object.assign({}, style)) }, props),
9009
- 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' } },
9010
- 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: {
9011
9175
  clickable: true,
9012
9176
  bulletActiveClass: 'swipe-item-active-bullet',
9013
- clickableClass: (swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign) === 'left'
9014
- ? 'commondityDetail-swiper-clickable-left'
9015
- : 'commondityDetail-swiper-clickable-center'
9177
+ clickableClass: getDotsAlign
9016
9178
  }, loop: true, autoplay: {
9017
9179
  delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
9018
9180
  } },
9019
- 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) => {
9020
9182
  var _a;
9021
9183
  return (React.createElement(SwiperSlide, { key: src },
9022
9184
  React.createElement("div", { style: {
9023
9185
  overflow: 'hidden',
9024
9186
  width,
9025
- height: width
9187
+ height
9026
9188
  } },
9027
9189
  React.createElement(FormatImage$1, { style: {
9028
9190
  height: '100%',
@@ -9031,21 +9193,30 @@
9031
9193
  display: 'block',
9032
9194
  objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
9033
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 }))));
9034
- }))))),
9035
- !((_w = product === null || product === void 0 ? void 0 : product.homePage) === null || _w === void 0 ? void 0 : _w.length) && (React.createElement("div", { className: css.css({
9036
- position: 'relative',
9037
- height: 0,
9038
- width: '100%',
9039
- paddingBottom: '100%',
9040
- overflow: 'hidden'
9041
- }) },
9042
- React.createElement("img", { className: css.css({
9043
- position: 'absolute',
9044
- left: 0,
9045
- top: 0,
9046
- objectFit: 'cover',
9047
- width: '100%'
9048
- }), 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"))))),
9049
9220
  renderCommodityGroup(),
9050
9221
  React.createElement("div", { className: 'pb-commondity-content' }, renderContent({ isPost }))),
9051
9222
  renderBtn(),
@@ -9053,10 +9224,11 @@
9053
9224
  React.createElement("div", { style: { paddingBottom: '80px' } }, renderContent({ isPost: false })),
9054
9225
  renderBtn()),
9055
9226
  React.createElement(Modal$1, { visible: show3DModal, padding: 0, isFullScreen: true, onClose: () => setShow3DModal(false) },
9056
- React.createElement("iframe", { src: 'https://rimowa.threedium.co.uk/product-experience/latest/?sku=92573974&lang=en', style: {
9227
+ React.createElement("iframe", { src: iframeUrl, style: {
9057
9228
  width: '100%',
9058
- height: 'calc(100% - 40px)',
9059
- marginTop: '40px'
9229
+ height: 'calc(100% - 50px)',
9230
+ marginTop: '40px',
9231
+ border: 'none'
9060
9232
  } }))));
9061
9233
  };
9062
9234
  var CommodityDetailComponent = React.memo(CommodityDetail$1);
@@ -9077,7 +9249,7 @@
9077
9249
  * @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLink\interactionRender.tsx
9078
9250
  *
9079
9251
  */
9080
- var interactionRender$c = [
9252
+ var interactionRender$d = [
9081
9253
  {
9082
9254
  title: '滑动事件',
9083
9255
  child: [
@@ -9094,7 +9266,7 @@
9094
9266
  * @Author: binruan@chatlabs.com
9095
9267
  * @Date: 2023-07-28 18:29:57
9096
9268
  * @LastEditors: binruan@chatlabs.com
9097
- * @LastEditTime: 2024-07-31 13:58:45
9269
+ * @LastEditTime: 2024-08-08 18:30:20
9098
9270
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetail\material.tsx
9099
9271
  *
9100
9272
  */
@@ -9104,8 +9276,8 @@
9104
9276
  category: 'popup',
9105
9277
  type: 'CommodityDetail',
9106
9278
  related: {
9107
- settingRender: settingRender$8,
9108
- interactionRender: interactionRender$c
9279
+ settingRender: settingRender$9,
9280
+ interactionRender: interactionRender$d
9109
9281
  },
9110
9282
  defaulSetting: {
9111
9283
  props: {
@@ -9147,6 +9319,10 @@
9147
9319
  fontWeight: 'bold',
9148
9320
  textAlign: 'center',
9149
9321
  color: 'rgba(255, 255, 255, 0.9)'
9322
+ },
9323
+ commodityImgRatio: {
9324
+ w: 1,
9325
+ h: 1
9150
9326
  }
9151
9327
  },
9152
9328
  style: {}
@@ -9156,7 +9332,7 @@
9156
9332
  sort: 1
9157
9333
  });
9158
9334
 
9159
- var interactionRender$b = [
9335
+ var interactionRender$c = [
9160
9336
  {
9161
9337
  title: '点击事件',
9162
9338
  child: [
@@ -9172,13 +9348,28 @@
9172
9348
  * @Author: binruan@chatlabs.com
9173
9349
  * @Date: 2023-10-27 14:06:35
9174
9350
  * @LastEditors: binruan@chatlabs.com
9175
- * @LastEditTime: 2024-07-02 09:58:06
9351
+ * @LastEditTime: 2024-08-06 16:15:08
9176
9352
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\Prompt\settingRender.tsx
9177
9353
  *
9178
9354
  */
9179
- var settingRender$7 = [
9355
+ var settingRender$8 = [
9180
9356
  {
9181
- 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: '内容',
9182
9373
  child: [
9183
9374
  {
9184
9375
  type: 'Media',
@@ -9346,9 +9537,9 @@
9346
9537
  category: 'popup',
9347
9538
  type: 'Prompt',
9348
9539
  related: {
9349
- settingRender: settingRender$7,
9540
+ settingRender: settingRender$8,
9350
9541
  bindableProps: [],
9351
- interactionRender: interactionRender$b
9542
+ interactionRender: interactionRender$c
9352
9543
  },
9353
9544
  defaulSetting: {
9354
9545
  props: {
@@ -9367,14 +9558,45 @@
9367
9558
  * @Author: binruan@chatlabs.com
9368
9559
  * @Date: 2024-03-26 16:50:25
9369
9560
  * @LastEditors: binruan@chatlabs.com
9370
- * @LastEditTime: 2024-07-12 14:44:50
9561
+ * @LastEditTime: 2024-08-08 18:34:06
9371
9562
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetailDiroNew\settingRender.tsx
9372
9563
  *
9373
9564
  */
9374
- 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
+ },
9375
9581
  {
9376
9582
  title: '商品图片',
9377
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
+ },
9378
9600
  {
9379
9601
  type: 'Radius',
9380
9602
  label: '轮播指示器',
@@ -9386,6 +9608,10 @@
9386
9608
  {
9387
9609
  label: '居中',
9388
9610
  value: 'center'
9611
+ },
9612
+ {
9613
+ label: '居右',
9614
+ value: 'right'
9389
9615
  }
9390
9616
  ],
9391
9617
  name: ['props', 'swiper', 'dotsAlign']
@@ -9616,12 +9842,23 @@
9616
9842
  name: ['props', 'buttonStyle']
9617
9843
  }
9618
9844
  ]
9845
+ },
9846
+ {
9847
+ title: 'Iframe商品弹窗',
9848
+ child: [
9849
+ {
9850
+ label: '弹窗按钮',
9851
+ type: 'Upload',
9852
+ name: ['props', 'iframeIcon'],
9853
+ text: '建议尺寸:106 * 41'
9854
+ }
9855
+ ]
9619
9856
  }
9620
9857
  ];
9621
9858
 
9622
9859
  const CommodityDetailDiroNew$1 = (_a) => {
9623
- 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;
9624
- 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"]);
9625
9862
  React.useState(true);
9626
9863
  const { sxpParameter, popupCurTimeRef, popupDetailData, isPreview, bffFbReport, checkCommodityIndexRef } = useSxpDataSource();
9627
9864
  const { jumpToWeb, productView } = useEventReport();
@@ -9630,6 +9867,7 @@
9630
9867
  React.useState(true);
9631
9868
  const [showModal, setShowModal] = React.useState(false);
9632
9869
  const curTimeRef = React.useRef(null);
9870
+ const [show3DModal, setShow3DModal] = React.useState(false);
9633
9871
  const [checkCommodityIndex, setCheckCommodityIndex] = React.useState((_b = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.multiCheckIndex) !== null && _b !== void 0 ? _b : 0);
9634
9872
  const data = isPost ? rec : popupDetailData;
9635
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];
@@ -9680,7 +9918,8 @@
9680
9918
  return '£102,300.00';
9681
9919
  }
9682
9920
  }, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency]);
9683
- 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;
9684
9923
  // useEffect(() => {
9685
9924
  // console.log(scrollRef?.current?.scrollHeight, window.innerHeight);
9686
9925
  // if (scrollRef?.current && scrollRef?.current?.scrollHeight > window.innerHeight) {
@@ -9754,52 +9993,69 @@ Made in Italy` })));
9754
9993
  return;
9755
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 }));
9756
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);
9757
10005
  return (React.createElement("div", { className: 'pb-commondityDiroNew' },
9758
10006
  React.createElement("div", Object.assign({ className: css.css(Object.assign(Object.assign({}, style), { transform: 'translate3d(0px, 0px, 0px)' })) }, props),
9759
- 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: {
9760
- clickable: true,
9761
- bulletActiveClass: 'commondityDiroNew-swipe-item-active-bullet',
9762
- clickableClass: (swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign) === 'left'
9763
- ? 'commondityDiroNew-swiper-clickable-left'
9764
- : 'commondityDiroNew-swiper-clickable-center'
9765
- }, loop: true, autoplay: {
9766
- delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
9767
- } }, (_v = product === null || product === void 0 ? void 0 : product.homePage) === null || _v === void 0 ? void 0 : _v.map((src) => {
9768
- var _a;
9769
- return (React.createElement(SwiperSlide, { key: src },
9770
- React.createElement("div", { style: {
9771
- overflow: 'hidden',
9772
- width,
9773
- height: width
9774
- } },
9775
- React.createElement(FormatImage$1, { style: {
9776
- height: '100%',
9777
- width: '100%',
9778
- objectFit: 'cover',
9779
- display: 'block',
9780
- objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
9781
- }, 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 }))));
9782
- }))),
9783
- !((_w = product === null || product === void 0 ? void 0 : product.homePage) === null || _w === void 0 ? void 0 : _w.length) && (React.createElement("div", { className: css.css({
9784
- position: 'relative',
9785
- height: 0,
9786
- width: '100%',
9787
- paddingBottom: '100%',
9788
- overflow: 'hidden'
9789
- }) },
9790
- React.createElement("img", { className: css.css({
9791
- position: 'absolute',
9792
- left: 0,
9793
- top: 0,
9794
- objectFit: 'cover',
9795
- width: '100%'
9796
- }), 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"))))),
9797
10053
  renderCommodityGroup(),
9798
10054
  React.createElement("div", { className: 'pb-commondityDiroNew-content' },
9799
10055
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top' },
9800
10056
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top-left' },
9801
10057
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top-left-title', style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title), dangerouslySetInnerHTML: {
9802
- __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)
9803
10059
  } }),
9804
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: {
9805
10061
  __html: setFontForText((product === null || product === void 0 ? void 0 : product.collection) || 'Black Macrocannage CalfskinLarge', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection)
@@ -9809,14 +10065,21 @@ Made in Italy` })));
9809
10065
  __html: setFontForText(priceText, commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price)
9810
10066
  } }),
9811
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: {
9812
- __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)
9813
10069
  } }))),
9814
- (!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 },
9815
10071
  React.createElement("span", { dangerouslySetInnerHTML: {
9816
- __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)
9817
10073
  } }))),
9818
10074
  productInfoText({ isPost }))),
9819
- 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
+ } }))));
9820
10083
  };
9821
10084
  var CommodityDetailDiroNewComponent = React.memo(CommodityDetailDiroNew$1);
9822
10085
 
@@ -9836,7 +10099,7 @@ Made in Italy` })));
9836
10099
  * @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLink\interactionRender.tsx
9837
10100
  *
9838
10101
  */
9839
- var interactionRender$a = [
10102
+ var interactionRender$b = [
9840
10103
  {
9841
10104
  title: '滑动事件',
9842
10105
  child: [
@@ -9863,8 +10126,8 @@ Made in Italy` })));
9863
10126
  category: 'popup',
9864
10127
  type: 'CommodityDetailDiroNew',
9865
10128
  related: {
9866
- settingRender: settingRender$6,
9867
- interactionRender: interactionRender$a
10129
+ settingRender: settingRender$7,
10130
+ interactionRender: interactionRender$b
9868
10131
  },
9869
10132
  defaulSetting: {
9870
10133
  props: {
@@ -9907,6 +10170,10 @@ Made in Italy` })));
9907
10170
  borderRadius: 25,
9908
10171
  marginTop: 16,
9909
10172
  marginBottom: 16
10173
+ },
10174
+ commodityImgRatio: {
10175
+ w: 1,
10176
+ h: 1
9910
10177
  }
9911
10178
  },
9912
10179
  style: {}
@@ -9924,7 +10191,22 @@ Made in Italy` })));
9924
10191
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityList\settingRender.tsx
9925
10192
  *
9926
10193
  */
9927
- 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
+ },
9928
10210
  {
9929
10211
  title: '商品图片',
9930
10212
  child: [
@@ -10282,7 +10564,7 @@ Made in Italy` })));
10282
10564
  * @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLink\interactionRender.tsx
10283
10565
  *
10284
10566
  */
10285
- var interactionRender$9 = [
10567
+ var interactionRender$a = [
10286
10568
  {
10287
10569
  title: '点击事件',
10288
10570
  child: [
@@ -10308,8 +10590,8 @@ Made in Italy` })));
10308
10590
  category: 'popup',
10309
10591
  type: 'CommodityList',
10310
10592
  related: {
10311
- settingRender: settingRender$5,
10312
- interactionRender: interactionRender$9
10593
+ settingRender: settingRender$6,
10594
+ interactionRender: interactionRender$a
10313
10595
  },
10314
10596
  defaulSetting: {
10315
10597
  props: {
@@ -10350,6 +10632,59 @@ Made in Italy` })));
10350
10632
  sort: 1
10351
10633
  });
10352
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
+
10353
10688
  /*
10354
10689
  * @Author: binruan@chatlabs.com
10355
10690
  * @Date: 2024-03-26 16:50:25
@@ -10609,7 +10944,7 @@ Made in Italy` })));
10609
10944
  }
10610
10945
  ];
10611
10946
 
10612
- var interactionRender$8 = [
10947
+ var interactionRender$9 = [
10613
10948
  {
10614
10949
  title: '点击事件',
10615
10950
  child: [
@@ -10622,7 +10957,7 @@ Made in Italy` })));
10622
10957
  ];
10623
10958
 
10624
10959
  const EventProvider = (_a) => {
10625
- 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"]);
10626
10961
  const ref = React.useRef(null);
10627
10962
  const { popup } = useEditor();
10628
10963
  const { setPopupDetailData, ctaEvent } = useSxpDataSource();
@@ -10636,11 +10971,11 @@ Made in Italy` })));
10636
10971
  }, rec, item, index);
10637
10972
  setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, rec), { index }));
10638
10973
  if (isExternalLink) {
10639
- 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)) {
10640
10975
  const cta = (_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.bindCta;
10641
10976
  const product = (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.bindProduct;
10642
10977
  jumpToWeb(rec, product, cta, index);
10643
- 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) || '');
10644
10979
  }
10645
10980
  }
10646
10981
  else {
@@ -10692,7 +11027,7 @@ Made in Italy` })));
10692
11027
  category: 'template',
10693
11028
  type: 'Commodity',
10694
11029
  related: {
10695
- interactionRender: interactionRender$8,
11030
+ interactionRender: interactionRender$9,
10696
11031
  bindableProps: [],
10697
11032
  settingRender: settingRender$4
10698
11033
  },
@@ -10734,7 +11069,7 @@ Made in Italy` })));
10734
11069
  sort: 1
10735
11070
  });
10736
11071
 
10737
- var interactionRender$7 = [
11072
+ var interactionRender$8 = [
10738
11073
  {
10739
11074
  title: '点击事件',
10740
11075
  child: [
@@ -10774,7 +11109,7 @@ Made in Italy` })));
10774
11109
  category: 'template',
10775
11110
  type: 'Appoint',
10776
11111
  related: {
10777
- interactionRender: interactionRender$7,
11112
+ interactionRender: interactionRender$8,
10778
11113
  settingRender: settingRender$4 === null || settingRender$4 === void 0 ? void 0 : settingRender$4.filter((i) => i.type !== 'commodityTitle'),
10779
11114
  bindableProps: []
10780
11115
  },
@@ -10924,21 +11259,15 @@ Made in Italy` })));
10924
11259
  var styles$7 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__nkBlU","one-line-ellipsis":"index-module_one-line-ellipsis__buFw1"};
10925
11260
 
10926
11261
  const Link$1 = (_a) => {
10927
- var _b, _c, _d, _e, _f, _g, _h, _j;
11262
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k;
10928
11263
  var { content, style, bgImg, recData, bottom_image, ctaTempStyles, index, customTitle } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "index", "customTitle"]);
10929
11264
  const { sxpParameter, bffEventReport } = useSxpDataSource();
10930
- const { jumpToWeb } = useEventReport();
11265
+ useEventReport();
10931
11266
  const cta = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindCta;
10932
- const product = (_c = recData === null || recData === void 0 ? void 0 : recData.video) === null || _c === void 0 ? void 0 : _c.bindProduct;
10933
- const handleTo = () => {
10934
- if (cta === null || cta === void 0 ? void 0 : cta.link) {
10935
- jumpToWeb(recData, product, cta, index);
10936
- window.location.href = window.getJointUtmLink(cta.link);
10937
- }
10938
- };
11267
+ (_c = recData === null || recData === void 0 ? void 0 : recData.video) === null || _c === void 0 ? void 0 : _c.bindProduct;
10939
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;
10940
- 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 }),
10941
- 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 }),
10942
11271
  React.createElement("div", { className: css.css({
10943
11272
  display: 'flex',
10944
11273
  alignItems: 'center',
@@ -10947,14 +11276,34 @@ Made in Italy` })));
10947
11276
  }) },
10948
11277
  React.createElement("div", null,
10949
11278
  React.createElement("div", { className: styles$7['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle, dangerouslySetInnerHTML: {
10950
- __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)
10951
11280
  } }),
10952
- (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: {
10953
11282
  __html: setFontForText(customTitle === null || customTitle === void 0 ? void 0 : customTitle.text, customTitle === null || customTitle === void 0 ? void 0 : customTitle.style)
10954
11283
  } }))))));
10955
11284
  };
10956
11285
  var LinkComponent = React.memo(Link$1);
10957
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
+
10958
11307
  var _a;
10959
11308
  const Link = createMaterial(LinkComponent, {
10960
11309
  displayName: '跳转指引',
@@ -10963,7 +11312,8 @@ Made in Italy` })));
10963
11312
  type: 'Link',
10964
11313
  related: {
10965
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),
10966
- bindableProps: []
11315
+ bindableProps: [],
11316
+ interactionRender: interactionRender$7
10967
11317
  },
10968
11318
  defaulSetting: {
10969
11319
  props: {
@@ -13298,16 +13648,10 @@ Made in Italy` })));
13298
13648
  }, [unitWidth, rowsNum, list]); /* 增加getStyleList依赖项会导致在admin预览编辑时无限刷新 */
13299
13649
  /** 初始化请求数据 */
13300
13650
  React.useEffect(() => {
13301
- var _a, _b;
13651
+ var _a, _b, _c, _d, _e, _f;
13302
13652
  setIsLoadingData(true);
13303
13653
  waterFallData &&
13304
- (getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({
13305
- hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag,
13306
- 'itemFilter.itemId': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId,
13307
- 'itemFilter.itemType': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemType,
13308
- defaultSize: hashTagSize,
13309
- maxSize: hashTagSize
13310
- }).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) => {
13311
13655
  var _a, _b;
13312
13656
  setData(res);
13313
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 : []);
@@ -13316,7 +13660,7 @@ Made in Italy` })));
13316
13660
  if (isOpenHashTag) {
13317
13661
  const res = previewData;
13318
13662
  setData(res);
13319
- 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 : []);
13320
13664
  setIsLoadingData(false);
13321
13665
  }
13322
13666
  }, [waterFallData, getRecommendVideos, hashTagSize, isOpenHashTag]);
@@ -13342,13 +13686,10 @@ Made in Italy` })));
13342
13686
  };
13343
13687
  }, [onResize]);
13344
13688
  React.useCallback(() => {
13689
+ var _a, _b, _c, _d;
13345
13690
  setIsLoadingData(true);
13346
13691
  waterFallData &&
13347
- (getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({
13348
- hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag,
13349
- 'itemFilter.itemId': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId,
13350
- 'itemFilter.itemType': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemType
13351
- }).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) => {
13352
13693
  var _a, _b;
13353
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 : []));
13354
13695
  setIsLoadingData(false);
@@ -13556,31 +13897,22 @@ Made in Italy` })));
13556
13897
  const containerRef = React.useRef(null);
13557
13898
  const [isLoadMore, setIsLoadMore] = React.useState(false);
13558
13899
  React.useCallback(() => {
13900
+ var _a, _b, _c, _d;
13559
13901
  if (isLoadMore)
13560
13902
  return;
13561
13903
  setIsLoadMore(true);
13562
13904
  waterFallData &&
13563
- (getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({
13564
- hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag,
13565
- 'itemFilter.itemId': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId,
13566
- 'itemFilter.itemType': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemType
13567
- }).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) => {
13568
13906
  var _a;
13569
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 : []));
13570
13908
  setIsLoadMore(false);
13571
13909
  }));
13572
13910
  }, [waterFallData, getRecommendVideos, list, isLoadMore]);
13573
13911
  React.useEffect(() => {
13574
- var _a, _b;
13912
+ var _a, _b, _c, _d, _e, _f;
13575
13913
  setIsLoadingData(true);
13576
13914
  waterFallData &&
13577
- (getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({
13578
- hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag,
13579
- 'itemFilter.itemId': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId,
13580
- 'itemFilter.itemType': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemType,
13581
- defaultSize: hashTagSize,
13582
- maxSize: hashTagSize
13583
- }).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) => {
13584
13916
  var _a, _b;
13585
13917
  setData(res);
13586
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 : []);
@@ -13589,7 +13921,7 @@ Made in Italy` })));
13589
13921
  if (isOpenHashTag) {
13590
13922
  const res = previewData;
13591
13923
  setData(res);
13592
- 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 : []);
13593
13925
  setIsLoadingData(false);
13594
13926
  }
13595
13927
  }, [waterFallData, getRecommendVideos, hashTagSize, isOpenHashTag]);
@@ -14676,6 +15008,7 @@ Made in Italy` })));
14676
15008
  CommodityList: CommodityList,
14677
15009
  Consent: Consent,
14678
15010
  HashTag: HashTag,
15011
+ Iframe: Iframe,
14679
15012
  Link: Link,
14680
15013
  MultiCommodity: MultiCommodity,
14681
15014
  MultiCommodityDiro: MultiCommodityDiro,
@@ -15134,14 +15467,6 @@ Made in Italy` })));
15134
15467
  };
15135
15468
  var VideoWidget$3 = React.memo(VideoWidget$2);
15136
15469
 
15137
- /*
15138
- * @Author: binruan@chatlabs.com
15139
- * @Date: 2023-12-27 19:02:59
15140
- * @LastEditors: binruan@chatlabs.com
15141
- * @LastEditTime: 2024-01-24 10:30:13
15142
- * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\ToggleButton\index.tsx
15143
- *
15144
- */
15145
15470
  const ToggleButton = ({ defaultValue, activeIcon, unactiveIcon, onChange, style }) => {
15146
15471
  const [isTrue, setIsTure] = React.useState(defaultValue);
15147
15472
  const handleClick = (e) => {
@@ -15150,6 +15475,9 @@ Made in Italy` })));
15150
15475
  setIsTure(result);
15151
15476
  onChange === null || onChange === void 0 ? void 0 : onChange(result);
15152
15477
  };
15478
+ React.useEffect(() => {
15479
+ setIsTure(defaultValue);
15480
+ }, [defaultValue]);
15153
15481
  return (React.createElement("button", { style: style, "aria-label": 'toggle button', className: 'pb-toggle-button', onClick: handleClick },
15154
15482
  React.createElement("img", { className: 'pb-toggle-button-icon', alt: 'toggle image', src: isTrue ? activeIcon : unactiveIcon })));
15155
15483
  };
@@ -15528,12 +15856,14 @@ Made in Italy` })));
15528
15856
  * @Author: binruan@chatlabs.com
15529
15857
  * @Date: 2024-01-15 19:03:09
15530
15858
  * @LastEditors: binruan@chatlabs.com
15531
- * @LastEditTime: 2024-08-02 18:34:27
15859
+ * @LastEditTime: 2024-08-14 19:09:32
15532
15860
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
15533
15861
  *
15534
15862
  */
15535
15863
  const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.innerHeight, containerWidth = window.innerWidth, tempMap, resolver, data = [], ctaType, tipText, nudge, _schema, hashTagStyle, tagList = [], licenseUrl }) => {
15536
- 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');
15537
15867
  const { schema } = useEditor();
15538
15868
  const [activeIndex, setActiveIndex] = React.useState(0);
15539
15869
  const viewImageStartTime = React.useRef(0);
@@ -15547,8 +15877,8 @@ Made in Italy` })));
15547
15877
  const { backMainFeed } = useEventReport();
15548
15878
  const { productView } = useEventReport();
15549
15879
  const isShowFingerTip = React.useMemo(() => {
15550
- return data.length > 0 && !loading && getFeUserId();
15551
- }, [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]);
15552
15882
  React.useEffect(() => {
15553
15883
  refreshFeSessionId();
15554
15884
  }, []);
@@ -15576,14 +15906,15 @@ Made in Italy` })));
15576
15906
  var _a;
15577
15907
  const index = (data === null || data === void 0 ? void 0 : data.findIndex((item) => {
15578
15908
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
15579
- if (ctaType === '多商品CTA') {
15909
+ const ctaType0 = ctaType === null || ctaType === void 0 ? void 0 : ctaType[0];
15910
+ if (ctaType0 === '多商品CTA') {
15580
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;
15581
15912
  }
15582
- else if (ctaType === '商品CTA') {
15913
+ else if (ctaType0 === '商品CTA') {
15583
15914
  return (_d = item === null || item === void 0 ? void 0 : item.video) === null || _d === void 0 ? void 0 : _d.bindProduct;
15584
15915
  }
15585
15916
  else {
15586
- 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));
15587
15918
  }
15588
15919
  })) || 0;
15589
15920
  (_a = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper.slideTo(index);
@@ -15688,8 +16019,10 @@ Made in Italy` })));
15688
16019
  return containerHeight - minusHeight - tagHeight;
15689
16020
  }, [globalConfig, containerHeight, tagHeight]);
15690
16021
  const renderLogo = React.useMemo(() => {
16022
+ var _a, _b;
15691
16023
  if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
15692
- 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)() })),
15693
16026
  React.createElement("img", { src: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl, alt: 'logo' })));
15694
16027
  }
15695
16028
  return null;
@@ -15769,9 +16102,9 @@ Made in Italy` })));
15769
16102
  isShowMore,
15770
16103
  lineGradStyle
15771
16104
  ]);
15772
- const renderLikeButton = React.useCallback((rec, index) => {
16105
+ const renderLikeButton = React.useCallback((rec, index, visible) => {
15773
16106
  var _a, _b, _c, _d;
15774
- if (!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLike))
16107
+ if (!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLike) || !visible)
15775
16108
  return;
15776
16109
  let top = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconY) !== null && _a !== void 0 ? _a : 400;
15777
16110
  if (waterFallData && top < 40) {
@@ -15779,6 +16112,7 @@ Made in Italy` })));
15779
16112
  }
15780
16113
  if (rec === null || rec === void 0 ? void 0 : rec.video) {
15781
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',
15782
16116
  [(_b = globalConfig.likeIconXPosit) !== null && _b !== void 0 ? _b : 'right']: (_c = globalConfig.likeIconX) !== null && _c !== void 0 ? _c : 0,
15783
16117
  [(_d = globalConfig.likeIconYPosit) !== null && _d !== void 0 ? _d : 'bottom']: top
15784
16118
  }, position: index }));
@@ -15929,6 +16263,18 @@ Made in Italy` })));
15929
16263
  });
15930
16264
  return !waterFallData ? list.concat([{ loading: true }]) : list;
15931
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]);
15932
16278
  const renderView = React.useMemo(() => {
15933
16279
  if (loading) {
15934
16280
  return (React.createElement("div", { style: { height, width: containerWidth, display: 'flex', justifyContent: 'center', alignItems: 'center' } },
@@ -15945,20 +16291,30 @@ Made in Italy` })));
15945
16291
  React.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } }))) : (React.createElement(React.Fragment, null,
15946
16292
  renderContent(rec, index),
15947
16293
  renderBottom(rec, index),
15948
- 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))))))));
15949
16296
  });
15950
- }, [containerWidth, data, height, loading, renderBottom, renderContent, visList, loadingImage, isReload]);
15951
- const mutedIcon = useIconLink('/pb_static/5beaaa5ce7f3477b99db3838619cc471.png');
15952
- 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
+ ]);
15953
16309
  return (React.createElement("div", { id: 'sxp-render', className: 'clc-sxp-container' },
15954
- 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: () => {
15955
16311
  setOpenHashtag === null || setOpenHashtag === void 0 ? void 0 : setOpenHashtag(true);
15956
16312
  } })),
15957
16313
  renderLogo,
15958
16314
  React.createElement(Tagbar$1, { tagList: tagList, setActiveIndex: setActiveIndex, style: {
15959
16315
  top: minusHeight
15960
16316
  } }),
15961
- 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,
15962
16318
  React.createElement(Swiper, { style: {
15963
16319
  marginTop: tagHeight
15964
16320
  }, ref: swiperRef, onSlideChange: () => {
@@ -15983,15 +16339,10 @@ Made in Italy` })));
15983
16339
  }
15984
16340
  }
15985
16341
  }, direction: 'vertical', height: height },
15986
- ((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: {
15987
- position: 'fixed',
15988
- 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',
15989
- zIndex: 999,
15990
- [(_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,
15991
- [(_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
15992
- }, 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)),
15993
16344
  renderView),
15994
- 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))));
15995
16346
  };
15996
16347
 
15997
16348
  const PictureGroup = ({ imgUrls, width, height, imgUrlsPostConfig, rec, index }) => {
@@ -16358,7 +16709,7 @@ Made in Italy` })));
16358
16709
  * @Author: binruan@chatlabs.com
16359
16710
  * @Date: 2023-10-31 10:56:01
16360
16711
  * @LastEditors: binruan@chatlabs.com
16361
- * @LastEditTime: 2024-08-01 15:23:51
16712
+ * @LastEditTime: 2024-08-06 17:15:56
16362
16713
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Popup\index.tsx
16363
16714
  *
16364
16715
  */
@@ -16417,14 +16768,14 @@ Made in Italy` })));
16417
16768
  const renderPopupDetail = React.useMemo(() => {
16418
16769
  var _a, _b, _c;
16419
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) => {
16420
- 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;
16421
16772
  if ((value === null || value === void 0 ? void 0 : value.id) === (popup === null || popup === void 0 ? void 0 : popup.id)) {
16422
16773
  const t = resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type];
16423
16774
  const Component = withBindDataSource(t);
16424
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';
16425
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';
16426
16777
  const defaulSetting = (_h = t === null || t === void 0 ? void 0 : t.extend) === null || _h === void 0 ? void 0 : _h.defaulSetting;
16427
- 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 })));
16428
16779
  }
16429
16780
  else {
16430
16781
  return React.createElement(React.Fragment, null);