pb-sxp-ui 1.3.1 → 1.3.2

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 (59) hide show
  1. package/dist/index.cjs +190 -146
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.js +190 -146
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.min.cjs +3 -3
  6. package/dist/index.min.cjs.map +1 -1
  7. package/dist/index.min.js +3 -3
  8. package/dist/index.min.js.map +1 -1
  9. package/dist/pb-ui.js +190 -146
  10. package/dist/pb-ui.js.map +1 -1
  11. package/dist/pb-ui.min.js +3 -3
  12. package/dist/pb-ui.min.js.map +1 -1
  13. package/es/core/components/SxpPageRender/Modal/index.js +3 -3
  14. package/es/core/components/SxpPageRender/RenderCard.d.ts +3 -3
  15. package/es/core/components/SxpPageRender/RenderCard.js +17 -27
  16. package/es/core/components/SxpPageRender/WaterFall/List.js +20 -11
  17. package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +20 -11
  18. package/es/core/components/SxpPageRender/index.js +14 -10
  19. package/es/core/context/EditorDataProvider.d.ts +3 -0
  20. package/es/core/context/EditorDataProvider.js +2 -1
  21. package/es/core/context/SxpDataSourceProvider.d.ts +1 -0
  22. package/es/core/context/SxpDataSourceProvider.js +43 -31
  23. package/es/core/utils/tool.d.ts +3 -3
  24. package/es/core/utils/tool.js +6 -6
  25. package/es/materials/sxp/HashTag/index.d.ts +3 -1
  26. package/es/materials/sxp/HashTag/settingRender.d.ts +7 -0
  27. package/es/materials/sxp/HashTag/settingRender.js +6 -0
  28. package/es/materials/sxp/popup/CommodityDetail/index.js +13 -14
  29. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +13 -14
  30. package/es/materials/sxp/popup/CommodityList/index.d.ts +3 -1
  31. package/es/materials/sxp/popup/CommodityList/index.js +11 -7
  32. package/es/materials/sxp/popup/CommodityList/settingRender.d.ts +7 -0
  33. package/es/materials/sxp/popup/CommodityList/settingRender.js +6 -0
  34. package/es/materials/sxp/popup/Iframe/index.d.ts +1 -0
  35. package/es/materials/sxp/popup/Iframe/index.js +8 -7
  36. package/lib/core/components/SxpPageRender/Modal/index.js +3 -3
  37. package/lib/core/components/SxpPageRender/RenderCard.d.ts +3 -3
  38. package/lib/core/components/SxpPageRender/RenderCard.js +16 -26
  39. package/lib/core/components/SxpPageRender/WaterFall/List.js +20 -11
  40. package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +20 -11
  41. package/lib/core/components/SxpPageRender/index.js +14 -10
  42. package/lib/core/context/EditorDataProvider.d.ts +3 -0
  43. package/lib/core/context/EditorDataProvider.js +2 -1
  44. package/lib/core/context/SxpDataSourceProvider.d.ts +1 -0
  45. package/lib/core/context/SxpDataSourceProvider.js +43 -31
  46. package/lib/core/utils/tool.d.ts +3 -3
  47. package/lib/core/utils/tool.js +6 -6
  48. package/lib/materials/sxp/HashTag/index.d.ts +3 -1
  49. package/lib/materials/sxp/HashTag/settingRender.d.ts +7 -0
  50. package/lib/materials/sxp/HashTag/settingRender.js +6 -0
  51. package/lib/materials/sxp/popup/CommodityDetail/index.js +13 -14
  52. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +13 -14
  53. package/lib/materials/sxp/popup/CommodityList/index.d.ts +3 -1
  54. package/lib/materials/sxp/popup/CommodityList/index.js +11 -7
  55. package/lib/materials/sxp/popup/CommodityList/settingRender.d.ts +7 -0
  56. package/lib/materials/sxp/popup/CommodityList/settingRender.js +6 -0
  57. package/lib/materials/sxp/popup/Iframe/index.d.ts +1 -0
  58. package/lib/materials/sxp/popup/Iframe/index.js +8 -7
  59. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -243,7 +243,7 @@ function getBrowserInfo() {
243
243
  var _a, _b, _c, _d, _e, _f, _g;
244
244
  let userAgent = self.navigator.userAgent;
245
245
  if (!userAgent)
246
- return 'Unknown';
246
+ return null;
247
247
  if (/edge\/([\d\.]+)/i.exec(userAgent))
248
248
  return `Edge ${(_a = /edge\/([\d\.]+)/i.exec(userAgent)) === null || _a === void 0 ? void 0 : _a[1]}`;
249
249
  if (/edg\/([\d\.]+)/i.exec(userAgent))
@@ -258,13 +258,13 @@ function getBrowserInfo() {
258
258
  return `Firefox ${(_f = /firefox\/([\d\.]+)/i.exec(userAgent)) === null || _f === void 0 ? void 0 : _f[1]}`;
259
259
  if (/safari/i.test(userAgent))
260
260
  return `Safari ${(_g = /version\/([\d\.]+)/i.exec(userAgent)) === null || _g === void 0 ? void 0 : _g[1]}`;
261
- return 'Unknown';
261
+ return null;
262
262
  }
263
263
  function getSystem() {
264
264
  var _a, _b, _c;
265
265
  let userAgent = self.navigator.userAgent;
266
266
  if (!userAgent)
267
- return 'Unknown';
267
+ return null;
268
268
  if (/iphone/i.test(userAgent))
269
269
  return `IOS ${(_a = userAgent.match(/OS\s(.*?)\slike/)) === null || _a === void 0 ? void 0 : _a[1]}`;
270
270
  if (/android/i.test(userAgent))
@@ -273,12 +273,12 @@ function getSystem() {
273
273
  return `Windows ${(_c = userAgent.match(/Windows\s(.*?)\;/)) === null || _c === void 0 ? void 0 : _c[1]}`;
274
274
  if (/mac/i.test(userAgent))
275
275
  return `Mac OS`;
276
- return 'Unknown';
276
+ return null;
277
277
  }
278
278
  function getDevice$1() {
279
279
  let userAgent = self.navigator.userAgent;
280
280
  if (!userAgent)
281
- return 'Unknown';
281
+ return null;
282
282
  if (/iphone/i.test(userAgent))
283
283
  return `iPhone`;
284
284
  if (/android/i.test(userAgent)) {
@@ -301,7 +301,7 @@ function getDevice$1() {
301
301
  return `Windows`;
302
302
  if (/mac/i.test(userAgent))
303
303
  return `Mac`;
304
- return 'Unknown';
304
+ return null;
305
305
  }
306
306
  function getCookie(val) {
307
307
  // const expirationDate = new Date();
@@ -718,8 +718,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
718
718
  }, [bffDataSource]);
719
719
  // 获取推荐视频数据
720
720
  const getRecommendVideos = React.useCallback((query) => __awaiter(void 0, void 0, void 0, function* () {
721
- var _d, _e, _f, _g, _h, _j, _k;
722
- query = Object.assign(Object.assign({ maxSize: (_d = query === null || query === void 0 ? void 0 : query.maxSize) !== null && _d !== void 0 ? _d : maxSize, defaultSize: (_e = query === null || query === void 0 ? void 0 : query.defaultSize) !== null && _e !== void 0 ? _e : defaultSize, hashTag: query === null || query === void 0 ? void 0 : query.hashTag, traceInfo: query === null || query === void 0 ? void 0 : query.traceInfo, themeTag: query === null || query === void 0 ? void 0 : query.themeTag }, ((query === null || query === void 0 ? void 0 : query.contentFilter) && { contentFilter: `[${query === null || query === void 0 ? void 0 : query.contentFilter}]` })), ((query === null || query === void 0 ? void 0 : query.productFilter) && { productFilter: `[${query === null || query === void 0 ? void 0 : query.productFilter}]` }));
721
+ var _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
722
+ query = Object.assign(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}]` })), { pageNum: query === null || query === void 0 ? void 0 : query.pageNum });
723
723
  if (utmVal) {
724
724
  const val = (_h = (_g = (_f = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _f === void 0 ? void 0 : _f.filter((val) => {
725
725
  var _a, _b;
@@ -728,30 +728,34 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
728
728
  })) === null || _g === void 0 ? void 0 : _g.join('&')) !== null && _h !== void 0 ? _h : '';
729
729
  query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(val) });
730
730
  }
731
- if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) || isEditor) {
732
- query = Object.assign(Object.assign(Object.assign({}, query), { directPage: true, level: 1 }), (!utmVal && channelQueryList && (channelQueryList === null || channelQueryList === void 0 ? void 0 : channelQueryList.length) > 0 && { channel: channelQueryList === null || channelQueryList === void 0 ? void 0 : channelQueryList[0] }));
733
- if (!(query === null || query === void 0 ? void 0 : query.channel))
731
+ if (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) {
732
+ query = Object.assign(Object.assign({}, query), { directPage: true, level: 1, pageNum: (_j = query === null || query === void 0 ? void 0 : query.pageNum) !== null && _j !== void 0 ? _j : 1 });
733
+ }
734
+ if (isEditor) {
735
+ let pageNum = 1;
736
+ query = Object.assign(Object.assign({}, query), (!utmVal && channelQueryList && (channelQueryList === null || channelQueryList === void 0 ? void 0 : channelQueryList.length) > 0 && { channel: channelQueryList === null || channelQueryList === void 0 ? void 0 : channelQueryList[0] }));
737
+ if (!(query === null || query === void 0 ? void 0 : query.channel) || isInit.current)
734
738
  return;
739
+ isInit.current = true;
735
740
  let list = [];
736
741
  let result = null;
737
- let pageNum = 1;
738
742
  const recurveRecList = (query) => __awaiter(void 0, void 0, void 0, function* () {
739
- var _l, _m, _o, _p;
743
+ var _r, _s, _t, _u, _v, _w;
740
744
  query.pageNum = pageNum;
741
745
  result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/list', { method: 'GET', query }));
742
746
  if (!(result === null || result === void 0 ? void 0 : result.success)) {
743
747
  return undefined;
744
748
  }
745
- const rec = (_m = (_l = result === null || result === void 0 ? void 0 : result.data) === null || _l === void 0 ? void 0 : _l.recList) === null || _m === void 0 ? void 0 : _m[0];
746
- list = list.concat((_p = (_o = result === null || result === void 0 ? void 0 : result.data) === null || _o === void 0 ? void 0 : _o.recList) !== null && _p !== void 0 ? _p : []);
747
- if ((rec === null || rec === void 0 ? void 0 : rec.product) || (rec === null || rec === void 0 ? void 0 : rec.video)) {
749
+ const isNotNullList = (_s = (_r = result === null || result === void 0 ? void 0 : result.data) === null || _r === void 0 ? void 0 : _r.recList) === null || _s === void 0 ? void 0 : _s.every((item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video));
750
+ list = list.concat((_w = (_v = (_u = (_t = result === null || result === void 0 ? void 0 : result.data) === null || _t === void 0 ? void 0 : _t.recList) === null || _u === void 0 ? void 0 : _u.filter) === null || _v === void 0 ? void 0 : _v.call(_u, (item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video))) !== null && _w !== void 0 ? _w : []);
751
+ if (isNotNullList) {
748
752
  pageNum = pageNum + 1;
749
753
  yield recurveRecList(query);
750
754
  }
751
755
  });
752
756
  yield recurveRecList(query);
753
757
  if (!(query === null || query === void 0 ? void 0 : query.hashTag) && result)
754
- setCurReqInfo({ rtc: (_j = result === null || result === void 0 ? void 0 : result.data) === null || _j === void 0 ? void 0 : _j.rtc, requestId: (_k = result === null || result === void 0 ? void 0 : result.data) === null || _k === void 0 ? void 0 : _k.requestId });
758
+ setCurReqInfo({ rtc: (_k = result === null || result === void 0 ? void 0 : result.data) === null || _k === void 0 ? void 0 : _k.rtc, requestId: (_l = result === null || result === void 0 ? void 0 : result.data) === null || _l === void 0 ? void 0 : _l.requestId });
755
759
  return Object.assign(Object.assign({}, result.data), { recList: list });
756
760
  }
757
761
  const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/list', { method: 'GET', query }));
@@ -760,15 +764,20 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
760
764
  }
761
765
  if (!(query === null || query === void 0 ? void 0 : query.hashTag))
762
766
  setCurReqInfo({ rtc: result.data.rtc, requestId: result.data.requestId });
767
+ if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) && !isEditor) {
768
+ let list = [];
769
+ list = list.concat((_q = (_p = (_o = (_m = result === null || result === void 0 ? void 0 : result.data) === null || _m === void 0 ? void 0 : _m.recList) === null || _o === void 0 ? void 0 : _o.filter) === null || _p === void 0 ? void 0 : _p.call(_o, (item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video))) !== null && _q !== void 0 ? _q : []);
770
+ return Object.assign(Object.assign({}, result.data), { recList: list });
771
+ }
763
772
  return result === null || result === void 0 ? void 0 : result.data;
764
- }), [bffFetch, utmVal, maxSize, defaultSize, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview, channelQueryList, isEditor]);
765
- const loadVideos = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
766
- var _q, _r, _s, _t;
773
+ }), [bffFetch, utmVal, maxSize, defaultSize, channelQueryList]);
774
+ const loadVideos = React.useCallback((pageNum) => __awaiter(void 0, void 0, void 0, function* () {
775
+ var _x, _y, _z, _0;
767
776
  if (rtcList.length <= 0) {
768
777
  return;
769
778
  }
770
779
  const lastItem = rtcList === null || rtcList === void 0 ? void 0 : rtcList[(rtcList === null || rtcList === void 0 ? void 0 : rtcList.length) - 1];
771
- const data = yield getRecommendVideos(Object.assign(Object.assign(Object.assign({ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag }, (((_q = lastItem === null || lastItem === void 0 ? void 0 : lastItem.product) === null || _q === void 0 ? void 0 : _q.itemId) && { productFilter: (_r = lastItem === null || lastItem === void 0 ? void 0 : lastItem.product) === null || _r === void 0 ? void 0 : _r.itemId })), (((_s = lastItem === null || lastItem === void 0 ? void 0 : lastItem.video) === null || _s === void 0 ? void 0 : _s.itemId) && { contentFilter: (_t = lastItem === null || lastItem === void 0 ? void 0 : lastItem.video) === null || _t === void 0 ? void 0 : _t.itemId })), { themeTag: themeTag.current }));
780
+ const data = yield getRecommendVideos(Object.assign(Object.assign(Object.assign(Object.assign({ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag }, (((_x = lastItem === null || lastItem === void 0 ? void 0 : lastItem.product) === null || _x === void 0 ? void 0 : _x.itemId) && { productFilter: (_y = lastItem === null || lastItem === void 0 ? void 0 : lastItem.product) === null || _y === void 0 ? void 0 : _y.itemId })), (((_z = lastItem === null || lastItem === void 0 ? void 0 : lastItem.video) === null || _z === void 0 ? void 0 : _z.itemId) && { contentFilter: (_0 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.video) === null || _0 === void 0 ? void 0 : _0.itemId })), { themeTag: themeTag.current }), ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) && !isEditor && { pageNum })));
772
781
  setRtcList(rtcList.concat(getFilterRecList(data)));
773
782
  setCacheRtcList(cacheRtcList.concat(getFilterRecList(data)));
774
783
  }), [getRecommendVideos, rtcList, waterFallData, cacheRtcList]);
@@ -785,7 +794,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
785
794
  };
786
795
  }
787
796
  const sessionID = storeAndLoadFeSessionId();
788
- const ef = Object.assign(Object.assign({ sessionID, rtc: curReqInfo.rtc, requestId: curReqInfo.requestId }, eventInfo), { sxpDevice: getDevice$1(), sxpSystem: getSystem(), sxpBrowser: getBrowserInfo() });
797
+ const ef = Object.assign(Object.assign(Object.assign(Object.assign({ sessionID, rtc: curReqInfo.rtc, requestId: curReqInfo.requestId }, eventInfo), (getDevice$1() && { sxpDevice: getDevice$1() })), (getSystem() && { sxpSystem: getSystem() })), (getBrowserInfo() && { sxpBrowser: getBrowserInfo() }));
789
798
  const realUserInfo = Object.entries(userInfo).map(([k, v]) => ({ name: k, value: v }));
790
799
  const realEventInfo = Object.entries(ef)
791
800
  .map(([k, v]) => v && { name: k, value: v })
@@ -801,24 +810,21 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
801
810
  });
802
811
  }, [bffFetch, curReqInfo, enableReportEvent, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview]);
803
812
  const bffFbReport = React.useCallback((_a) => {
804
- var _b, _c;
813
+ var _b, _c, _d;
805
814
  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;
806
815
  if (!enableReportEvent || !enabledMetaConversionApi || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview)) {
807
816
  return;
808
817
  }
809
818
  const fakeUserId = storeAndLoadFeUserId();
819
+ const urlParams = new URLSearchParams(window.location.search);
820
+ const fbclid = urlParams.get('fbclid');
810
821
  return bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/fb/events', {
811
822
  method: 'POST',
812
823
  body: {
813
824
  eventName,
814
825
  actionSource,
815
826
  eventSourceUrl,
816
- userData: {
817
- externalId: fakeUserId,
818
- fbc: `fb.2.${new Date().getTime()}.${getCookie('_fbc')}`,
819
- fbp: `fb.2.${new Date().getTime()}.${getCookie('_fbp')}`,
820
- client_user_agent: (_c = window === null || window === void 0 ? void 0 : window.navigator) === null || _c === void 0 ? void 0 : _c.userAgent
821
- }
827
+ userData: Object.assign(Object.assign(Object.assign({ externalId: fakeUserId }, (fbclid && { fbc: `fb.2.${new Date().getTime()}.${fbclid}` })), (getCookie('_fbp') && { fbp: `fb.2.${new Date().getTime()}.${getCookie('_fbp')}` })), { client_user_agent: (_d = (_c = window === null || window === void 0 ? void 0 : window.navigator) === null || _c === void 0 ? void 0 : _c.userAgent) !== null && _d !== void 0 ? _d : '' })
822
828
  },
823
829
  type: 'beacon'
824
830
  });
@@ -837,17 +843,17 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
837
843
  }), [bffFetch]);
838
844
  // 获取 Tag
839
845
  const bffGetTagList = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
840
- var _u, _v, _w, _x, _y;
846
+ var _1, _2, _3, _4, _5;
841
847
  if (!utmVal || !isShowTag)
842
848
  return;
843
849
  try {
844
- const val = (_w = (_v = (_u = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _u === void 0 ? void 0 : _u.filter((val) => {
850
+ const val = (_3 = (_2 = (_1 = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _1 === void 0 ? void 0 : _1.filter((val) => {
845
851
  var _a, _b;
846
852
  const key = val.split('=')[0];
847
853
  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);
848
- })) === null || _v === void 0 ? void 0 : _v.join('&')) !== null && _w !== void 0 ? _w : '';
854
+ })) === null || _2 === void 0 ? void 0 : _2.join('&')) !== null && _3 !== void 0 ? _3 : '';
849
855
  const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/tag/list', { method: 'GET', query: { channel: decodeURIComponent(val) } }));
850
- setTagList((_y = (_x = result === null || result === void 0 ? void 0 : result.data) === null || _x === void 0 ? void 0 : _x.tags) !== null && _y !== void 0 ? _y : []);
856
+ setTagList((_5 = (_4 = result === null || result === void 0 ? void 0 : result.data) === null || _4 === void 0 ? void 0 : _4.tags) !== null && _5 !== void 0 ? _5 : []);
851
857
  }
852
858
  catch (e) {
853
859
  console.log('e', e);
@@ -920,11 +926,10 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
920
926
  }
921
927
  });
922
928
  setLoading(false);
923
- isInit.current = true;
924
929
  });
925
930
  }, [isShowConsent]);
926
931
  React.useEffect(() => {
927
- if (!isInit.current && !isEditor)
932
+ if (!isPreview)
928
933
  return;
929
934
  setLoading(true);
930
935
  bffGetTagList();
@@ -934,9 +939,15 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
934
939
  setCacheRtcList(getFilterRecList(data));
935
940
  })
936
941
  .finally(() => {
942
+ bffEventReport({
943
+ eventInfo: {
944
+ eventSubject: 'apiRequest',
945
+ eventDescription: 'api request succeed'
946
+ }
947
+ });
937
948
  setLoading(false);
938
949
  });
939
- }, [bffGetTagList, isEditor, getRecommendVideos]);
950
+ }, [getRecommendVideos, bffGetTagList]);
940
951
  const defaultLoadingImage = useIconLink('/pb_static/a65d23c5893c49d7aaaa81681d3179e2.gif', appDomain);
941
952
  return (React.createElement(SxpDataSourceContext.Provider, { value: {
942
953
  rtcList,
@@ -984,7 +995,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
984
995
  setSelectTag,
985
996
  globalConfig,
986
997
  popupCurTimeRef,
987
- checkCommodityIndexRef
998
+ checkCommodityIndexRef,
999
+ isEditor
988
1000
  } }, isShowConsent ? (React.createElement(Consent$3, Object.assign({}, (_c = (_b = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.consent) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.item) === null || _c === void 0 ? void 0 : _c.props))) : (render({
989
1001
  rtcList,
990
1002
  mutateLike: bffMutateLike,
@@ -8813,13 +8825,13 @@ SwiperSlide.displayName = 'SwiperSlide';
8813
8825
  * @Author: binruan@chatlabs.com
8814
8826
  * @Date: 2023-11-02 18:34:34
8815
8827
  * @LastEditors: binruan@chatlabs.com
8816
- * @LastEditTime: 2024-08-16 17:58:56
8828
+ * @LastEditTime: 2024-08-20 18:29:11
8817
8829
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Modal\index.tsx
8818
8830
  *
8819
8831
  */
8820
8832
  const closeIcon$1 = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII=';
8821
8833
  const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema, fullHeight = window.innerHeight, isFullScreen = false }) => {
8822
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
8834
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
8823
8835
  const touchRef = React.useRef(null);
8824
8836
  const fTouchRef = React.useRef(null);
8825
8837
  const touchMoveRef = React.useRef(null);
@@ -8944,8 +8956,8 @@ const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema,
8944
8956
  React.createElement("div", { onClick: onClose, className: 'modal-icon-wrapper' },
8945
8957
  React.createElement("img", { src: (_t = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.popupCloseIcon) !== null && _t !== void 0 ? _t : closeIcon$1, alt: 'close', className: 'modal-icon' })),
8946
8958
  React.createElement("div", { ref: ref, style: {
8947
- height: (isScrollFullScreen ? fullHeight : MODAL_DEF_CON_H) -
8948
- ((_w = (_v = (_u = getPopupById === null || getPopupById === void 0 ? void 0 : getPopupById.item) === null || _u === void 0 ? void 0 : _u.props) === null || _v === void 0 ? void 0 : _v.popupBg) === null || _w === void 0 ? void 0 : _w.bottomMargin),
8959
+ height: (_x = (isScrollFullScreen ? fullHeight : MODAL_DEF_CON_H) -
8960
+ ((_w = (_v = (_u = getPopupById === null || getPopupById === void 0 ? void 0 : getPopupById.item) === null || _u === void 0 ? void 0 : _u.props) === null || _v === void 0 ? void 0 : _v.popupBg) === null || _w === void 0 ? void 0 : _w.bottomMargin)) !== null && _x !== void 0 ? _x : 0,
8949
8961
  overflow: (isScrollFullScreen && modalTrans <= 0) || !isScrollFullScreen ? 'auto' : 'hidden'
8950
8962
  } }, children)))))), modalEleRef.current);
8951
8963
  };
@@ -9270,20 +9282,19 @@ const CommodityDetail$1 = (_a) => {
9270
9282
  width: '100%',
9271
9283
  height: '100%'
9272
9284
  }), src: (_5 = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _5 !== void 0 ? _5 : bottom_image, alt: 'pdp image' }))),
9273
- (iframeUrl && iframeIcon) ||
9274
- (!product && iframeIcon && (React.createElement("div", { style: {
9275
- padding: '5px 10px',
9276
- display: 'flex',
9277
- alignItems: 'center',
9278
- position: 'absolute',
9279
- right: '10px',
9280
- bottom: '10px',
9281
- zIndex: 1,
9282
- background: '#fff',
9283
- borderRadius: '3px'
9284
- }, onClick: () => setShow3DModal(true) },
9285
- React.createElement("img", { src: iframeIcon, alt: '3d', width: '20px', height: '20px', style: { marginRight: '5px' } }),
9286
- React.createElement("span", { style: { fontSize: '12px' } }, "Try in 3D"))))),
9285
+ (iframeUrl || !product) && iframeIcon && (React.createElement("div", { style: {
9286
+ padding: '5px 10px',
9287
+ display: 'flex',
9288
+ alignItems: 'center',
9289
+ position: 'absolute',
9290
+ right: '10px',
9291
+ bottom: '10px',
9292
+ zIndex: 1,
9293
+ background: '#fff',
9294
+ borderRadius: '3px'
9295
+ }, onClick: () => setShow3DModal(true) },
9296
+ React.createElement("img", { src: iframeIcon, alt: '3d', width: '20px', height: '20px', style: { marginRight: '5px' } }),
9297
+ React.createElement("span", { style: { fontSize: '12px' } }, "Try in 3D")))),
9287
9298
  renderCommodityGroup(),
9288
9299
  React.createElement("div", { className: 'pb-commondity-content' }, renderContent({ isPost }))),
9289
9300
  renderBtn(),
@@ -10136,20 +10147,19 @@ Made in Italy` })));
10136
10147
  width: '100%',
10137
10148
  height: '100%'
10138
10149
  }), src: (_5 = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _5 !== void 0 ? _5 : bottom_image, alt: 'pdp image' }))),
10139
- (iframeUrl && iframeIcon) ||
10140
- (!product && iframeIcon && (React.createElement("div", { style: {
10141
- padding: '5px 10px',
10142
- display: 'flex',
10143
- alignItems: 'center',
10144
- position: 'absolute',
10145
- right: '10px',
10146
- bottom: '10px',
10147
- zIndex: 1,
10148
- background: '#fff',
10149
- borderRadius: '3px'
10150
- }, onClick: () => setShow3DModal(true) },
10151
- React.createElement("img", { src: iframeIcon, alt: '3d', width: '20px', height: '20px', style: { marginRight: '5px' } }),
10152
- React.createElement("span", { style: { fontSize: '12px' } }, "Try in 3D"))))),
10150
+ (iframeUrl || !product) && iframeIcon && (React.createElement("div", { style: {
10151
+ padding: '5px 10px',
10152
+ display: 'flex',
10153
+ alignItems: 'center',
10154
+ position: 'absolute',
10155
+ right: '10px',
10156
+ bottom: '10px',
10157
+ zIndex: 1,
10158
+ background: '#fff',
10159
+ borderRadius: '3px'
10160
+ }, onClick: () => setShow3DModal(true) },
10161
+ React.createElement("img", { src: iframeIcon, alt: '3d', width: '20px', height: '20px', style: { marginRight: '5px' } }),
10162
+ React.createElement("span", { style: { fontSize: '12px' } }, "Try in 3D")))),
10153
10163
  renderCommodityGroup(),
10154
10164
  React.createElement("div", { className: 'pb-commondityDiroNew-content' },
10155
10165
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top' },
@@ -10428,6 +10438,12 @@ var settingRender$6 = [
10428
10438
  {
10429
10439
  label: '间距',
10430
10440
  type: 'TextSpace'
10441
+ },
10442
+ {
10443
+ label: '价格千分符展示',
10444
+ type: 'Switch',
10445
+ name: ['enableFormattedPrice'],
10446
+ initialValue: true
10431
10447
  }
10432
10448
  ]
10433
10449
  }
@@ -10580,7 +10596,7 @@ const Img = ({ src, rec, item, index, style, translateY, imgStyle, enableEventRe
10580
10596
  var Img$1 = React.memo(Img);
10581
10597
 
10582
10598
  const CommodityList$1 = (_a) => {
10583
- var _b, _c;
10599
+ var _b, _c, _d;
10584
10600
  var { style, isDefault, rec, viewTime, isPost, bottom_image, commodityStyles, buttonStyle, translateY = 0, commodityPicture, isExternalLink, onClick } = _a, props = __rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "commodityStyles", "buttonStyle", "translateY", "commodityPicture", "isExternalLink", "onClick"]);
10585
10601
  const { sxpParameter, popupDetailData, setPopupDetailData, ctaEvent } = useSxpDataSource();
10586
10602
  const { jumpToWeb } = useEventReport();
@@ -10589,16 +10605,20 @@ const CommodityList$1 = (_a) => {
10589
10605
  const product = (_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [null, null, null, null];
10590
10606
  const index = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
10591
10607
  const priceText = React.useCallback((product) => {
10592
- var _a, _b, _c, _d, _e;
10608
+ var _a, _b, _c, _d, _e, _f, _g;
10609
+ const isToLocStr = ((_a = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice) === undefined || ((_b = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _b === void 0 ? void 0 : _b.enableFormattedPrice);
10593
10610
  if ((product === null || product === void 0 ? void 0 : product.currency) && (product === null || product === void 0 ? void 0 : product.price)) {
10594
- return `${(_c = (_b = (_a = product === null || product === void 0 ? void 0 : product.currency) === null || _a === void 0 ? void 0 : _a.split('-')[1]) === null || _b === void 0 ? void 0 : _b.toUpperCase()) !== null && _c !== void 0 ? _c : ''}${(_e = (_d = product === null || product === void 0 ? void 0 : product.price) === null || _d === void 0 ? void 0 : _d.toLocaleString('zh', {
10595
- minimumFractionDigits: 0
10596
- })) !== null && _e !== void 0 ? _e : ''}`;
10611
+ return `${(_e = (_d = (_c = product === null || product === void 0 ? void 0 : product.currency) === null || _c === void 0 ? void 0 : _c.split('-')[1]) === null || _d === void 0 ? void 0 : _d.toUpperCase()) !== null && _e !== void 0 ? _e : ''}${isToLocStr
10612
+ ? (_g = (_f = product === null || product === void 0 ? void 0 : product.price) === null || _f === void 0 ? void 0 : _f.toLocaleString('zh', {
10613
+ minimumFractionDigits: 0
10614
+ })) !== null && _g !== void 0 ? _g : ''
10615
+ : product === null || product === void 0 ? void 0 : product.price}`;
10597
10616
  }
10598
10617
  else {
10599
- return '$7,000';
10618
+ const p = 7000;
10619
+ return `$${isToLocStr ? p.toLocaleString() : p}`;
10600
10620
  }
10601
- }, []);
10621
+ }, [(_d = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _d === void 0 ? void 0 : _d.enableFormattedPrice]);
10602
10622
  const handleClick = lodash.throttle((item, multiCheckIndex) => {
10603
10623
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
10604
10624
  eventSubject: 'clickCta',
@@ -10759,15 +10779,16 @@ var settingRender$5 = [
10759
10779
 
10760
10780
  const Iframe$1 = (_a) => {
10761
10781
  var _b, _c;
10762
- var { content, btnText, style, icon, isPopup, isExternalLink, onClose, onClick, submitButtonStyle, contentStyle } = _a, props = __rest(_a, ["content", "btnText", "style", "icon", "isPopup", "isExternalLink", "onClose", "onClick", "submitButtonStyle", "contentStyle"]);
10782
+ var { content, btnText, style, icon, isPopup, isExternalLink, onClose, onClick, submitButtonStyle, contentStyle, isTel } = _a, props = __rest(_a, ["content", "btnText", "style", "icon", "isPopup", "isExternalLink", "onClose", "onClick", "submitButtonStyle", "contentStyle", "isTel"]);
10763
10783
  const { popupDetailData } = useSxpDataSource();
10764
10784
  const iframeUrl = (_c = (_b = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.video) === null || _b === void 0 ? void 0 : _b.bindCta) === null || _c === void 0 ? void 0 : _c.remark;
10765
- return (React.createElement("div", Object.assign({ className: `${css.css(Object.assign({}, style))}` }, props), iframeUrl && (React.createElement("iframe", { src: iframeUrl, style: {
10766
- width: '100%',
10767
- height: 'calc(100% - 50px)',
10768
- marginTop: '40px',
10769
- border: 'none'
10770
- } }))));
10785
+ return (React.createElement("div", Object.assign({ className: `${css.css(Object.assign(Object.assign({}, style), { height: isTel ? 664 : '100%' }))}` }, props),
10786
+ React.createElement("iframe", { src: iframeUrl, style: {
10787
+ width: '100%',
10788
+ height: 'calc(100% - 50px)',
10789
+ marginTop: '40px',
10790
+ border: 'none'
10791
+ } })));
10771
10792
  };
10772
10793
  var IframeComponent = React.memo(Iframe$1);
10773
10794
 
@@ -12012,7 +12033,7 @@ const MultiCommodityDiroNew = createMaterial(MultiCommodityDiroNewComponent, {
12012
12033
  * @Author: binruan@chatlabs.com
12013
12034
  * @Date: 2024-04-07 14:07:12
12014
12035
  * @LastEditors: binruan@chatlabs.com
12015
- * @LastEditTime: 2024-08-06 14:00:36
12036
+ * @LastEditTime: 2024-08-22 10:14:36
12016
12037
  * @FilePath: \pb-sxp-ui\src\materials\sxp\HashTag\settingRender.tsx
12017
12038
  *
12018
12039
  */
@@ -12121,6 +12142,12 @@ var settingRender$3 = [
12121
12142
  {
12122
12143
  label: '间距',
12123
12144
  type: 'TextSpace'
12145
+ },
12146
+ {
12147
+ label: '价格千分符展示',
12148
+ type: 'Switch',
12149
+ name: ['enableFormattedPrice'],
12150
+ initialValue: true
12124
12151
  }
12125
12152
  ]
12126
12153
  }
@@ -13541,6 +13568,7 @@ var previewData = {
13541
13568
  };
13542
13569
 
13543
13570
  const WaterfallFlowItem$1 = (props) => {
13571
+ var _a;
13544
13572
  const { rec, style = {}, sizeChange = () => { }, unitWidth, index, showBorder, list, reportTagsView, textStyles, space } = props;
13545
13573
  const { swiperRef, setRtcList, setOpenHashtag, sxpParameter } = useSxpDataSource();
13546
13574
  const [showVideo, setShowVideo] = React.useState(false);
@@ -13594,16 +13622,19 @@ const WaterfallFlowItem$1 = (props) => {
13594
13622
  }
13595
13623
  }, [top, showBorder]);
13596
13624
  const priceText = React.useMemo(() => {
13597
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
13598
- if (((_a = rec === null || rec === void 0 ? void 0 : rec.product) === null || _a === void 0 ? void 0 : _a.currency) && ((_b = rec === null || rec === void 0 ? void 0 : rec.product) === null || _b === void 0 ? void 0 : _b.price)) {
13599
- return `${(_f = (_e = (_d = (_c = rec === null || rec === void 0 ? void 0 : rec.product) === null || _c === void 0 ? void 0 : _c.currency) === null || _d === void 0 ? void 0 : _d.split('-')[1]) === null || _e === void 0 ? void 0 : _e.toUpperCase()) !== null && _f !== void 0 ? _f : ''}${(_j = (_h = (_g = rec === null || rec === void 0 ? void 0 : rec.product) === null || _g === void 0 ? void 0 : _g.price) === null || _h === void 0 ? void 0 : _h.toLocaleString('zh', {
13600
- minimumFractionDigits: 0
13601
- })) !== null && _j !== void 0 ? _j : ''}`;
13625
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
13626
+ const isToLocStr = ((_a = textStyles === null || textStyles === void 0 ? void 0 : textStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice) === undefined || ((_b = textStyles === null || textStyles === void 0 ? void 0 : textStyles.price) === null || _b === void 0 ? void 0 : _b.enableFormattedPrice);
13627
+ if (((_c = rec === null || rec === void 0 ? void 0 : rec.product) === null || _c === void 0 ? void 0 : _c.currency) && ((_d = rec === null || rec === void 0 ? void 0 : rec.product) === null || _d === void 0 ? void 0 : _d.price)) {
13628
+ return `${(_h = (_g = (_f = (_e = rec === null || rec === void 0 ? void 0 : rec.product) === null || _e === void 0 ? void 0 : _e.currency) === null || _f === void 0 ? void 0 : _f.split('-')[1]) === null || _g === void 0 ? void 0 : _g.toUpperCase()) !== null && _h !== void 0 ? _h : ''}${isToLocStr
13629
+ ? (_l = (_k = (_j = rec === null || rec === void 0 ? void 0 : rec.product) === null || _j === void 0 ? void 0 : _j.price) === null || _k === void 0 ? void 0 : _k.toLocaleString('zh', {
13630
+ minimumFractionDigits: 0
13631
+ })) !== null && _l !== void 0 ? _l : ''
13632
+ : (_m = rec === null || rec === void 0 ? void 0 : rec.product) === null || _m === void 0 ? void 0 : _m.price}`;
13602
13633
  }
13603
13634
  else {
13604
13635
  return null;
13605
13636
  }
13606
- }, [rec]);
13637
+ }, [rec, (_a = textStyles === null || textStyles === void 0 ? void 0 : textStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice]);
13607
13638
  React.useEffect(() => {
13608
13639
  if (imgDom.current === null || src === '') {
13609
13640
  return;
@@ -13767,10 +13798,14 @@ function WaterfallList$1(_a) {
13767
13798
  }, [unitWidth, rowsNum, list]); /* 增加getStyleList依赖项会导致在admin预览编辑时无限刷新 */
13768
13799
  /** 初始化请求数据 */
13769
13800
  React.useEffect(() => {
13770
- var _a, _b, _c, _d, _e, _f;
13801
+ var _a, _b;
13771
13802
  setIsLoadingData(true);
13772
13803
  waterFallData &&
13773
- (getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos(Object.assign(Object.assign({ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag, defaultSize: hashTagSize, maxSize: hashTagSize }, (((_b = (_a = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec) === null || _a === void 0 ? void 0 : _a.product) === null || _b === void 0 ? void 0 : _b.itemId) && { productFilter: (_d = (_c = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec) === null || _c === void 0 ? void 0 : _c.product) === null || _d === void 0 ? void 0 : _d.itemId })), ((waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId) && { contentFilter: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId }))).then((res) => {
13804
+ (getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({
13805
+ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag,
13806
+ defaultSize: hashTagSize,
13807
+ maxSize: hashTagSize
13808
+ }).then((res) => {
13774
13809
  var _a, _b;
13775
13810
  setData(res);
13776
13811
  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 : []);
@@ -13779,7 +13814,7 @@ function WaterfallList$1(_a) {
13779
13814
  if (isOpenHashTag) {
13780
13815
  const res = previewData;
13781
13816
  setData(res);
13782
- setList((_f = (_e = res === null || res === void 0 ? void 0 : res.recList) === null || _e === void 0 ? void 0 : _e.filter((item) => (item === null || item === void 0 ? void 0 : item.video) !== null || (item === null || item === void 0 ? void 0 : item.product) !== null)) !== null && _f !== void 0 ? _f : []);
13817
+ 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 : []);
13783
13818
  setIsLoadingData(false);
13784
13819
  }
13785
13820
  }, [waterFallData, getRecommendVideos, hashTagSize, isOpenHashTag]);
@@ -13805,10 +13840,11 @@ function WaterfallList$1(_a) {
13805
13840
  };
13806
13841
  }, [onResize]);
13807
13842
  React.useCallback(() => {
13808
- var _a, _b, _c, _d;
13809
13843
  setIsLoadingData(true);
13810
13844
  waterFallData &&
13811
- (getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos(Object.assign(Object.assign({ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag }, (((_b = (_a = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec) === null || _a === void 0 ? void 0 : _a.product) === null || _b === void 0 ? void 0 : _b.itemId) && { productFilter: (_d = (_c = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec) === null || _c === void 0 ? void 0 : _c.product) === null || _d === void 0 ? void 0 : _d.itemId })), ((waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId) && { contentFilter: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId }))).then((res) => {
13845
+ (getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({
13846
+ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag
13847
+ }).then((res) => {
13812
13848
  var _a, _b;
13813
13849
  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 : []));
13814
13850
  setIsLoadingData(false);
@@ -13882,6 +13918,7 @@ function WaterfallList$1(_a) {
13882
13918
  var img$2 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAAAaZJREFUeF7t2jFKBEEQRuG3mSJeQTARURDMTL2EqXfwAnoKD6FHMDEzNVIw2tzQC2gFggyDrExX1V92T7wz9PumFnqbXdH5teq8nwEwJqBzgfEVKDYAW8Ae8NZq3ZUm4Aa4AnaBR+C8BUIVAIu/ngSfAs9LESoAWLgB/LzWwP7SeLtfHWAu3tZ9Adz/dwD3eOUJCIlXBQiLVwQIjVcDCI9XAkiJVwFIi1cASI3PBpjb3jbd5GyyUcraCUrEZ02ATHwGgFR8NIBcfCSAZHwUgGx8BIB0vDeAfLwnQIl4L4Ay8R4ApeJbA2wD78DOZA/e7ABzk739Xz/T8rfAIfA6WYCd3BqA7NUSwCKfgLNKCK0BjoC7rzP74yoIrQGsuxSCB0ApBC+AMgieACUQvAHkESIApBGiAGQRIgEkEaIB5BAyAKQQsgBkEDIBJBCyAdIRFABSEVQA0hCUAFIQ1ADCERQBQhFUAcIQlAFCENQBfkOwg9eXpeftFQDmEOzv8ifARy8A3wiXwAHwANwujbf7q0xAi9bZZwwAN9oiDx4TUORFuS2z+wn4BAiAaEHnKChjAAAAAElFTkSuQmCC";
13883
13919
 
13884
13920
  const WaterfallFlowItem = (props) => {
13921
+ var _a;
13885
13922
  const { rec, index, list, reportTagsView, textStyles, space } = props;
13886
13923
  const { swiperRef, setRtcList, setOpenHashtag, sxpParameter } = useSxpDataSource();
13887
13924
  const [showVideo, setShowVideo] = React.useState(false);
@@ -13910,16 +13947,19 @@ const WaterfallFlowItem = (props) => {
13910
13947
  return ((_a = rec === null || rec === void 0 ? void 0 : rec.product) === null || _a === void 0 ? void 0 : _a.title) || ((_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.title) || null;
13911
13948
  }, [rec]);
13912
13949
  const priceText = React.useMemo(() => {
13913
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
13914
- if (((_a = rec === null || rec === void 0 ? void 0 : rec.product) === null || _a === void 0 ? void 0 : _a.currency) && ((_b = rec === null || rec === void 0 ? void 0 : rec.product) === null || _b === void 0 ? void 0 : _b.price)) {
13915
- return `${(_f = (_e = (_d = (_c = rec === null || rec === void 0 ? void 0 : rec.product) === null || _c === void 0 ? void 0 : _c.currency) === null || _d === void 0 ? void 0 : _d.split('-')[1]) === null || _e === void 0 ? void 0 : _e.toUpperCase()) !== null && _f !== void 0 ? _f : ''}${(_j = (_h = (_g = rec === null || rec === void 0 ? void 0 : rec.product) === null || _g === void 0 ? void 0 : _g.price) === null || _h === void 0 ? void 0 : _h.toLocaleString('zh', {
13916
- minimumFractionDigits: 0
13917
- })) !== null && _j !== void 0 ? _j : ''}`;
13950
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
13951
+ const isToLocStr = ((_a = textStyles === null || textStyles === void 0 ? void 0 : textStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice) === undefined || ((_b = textStyles === null || textStyles === void 0 ? void 0 : textStyles.price) === null || _b === void 0 ? void 0 : _b.enableFormattedPrice);
13952
+ if (((_c = rec === null || rec === void 0 ? void 0 : rec.product) === null || _c === void 0 ? void 0 : _c.currency) && ((_d = rec === null || rec === void 0 ? void 0 : rec.product) === null || _d === void 0 ? void 0 : _d.price)) {
13953
+ return `${(_h = (_g = (_f = (_e = rec === null || rec === void 0 ? void 0 : rec.product) === null || _e === void 0 ? void 0 : _e.currency) === null || _f === void 0 ? void 0 : _f.split('-')[1]) === null || _g === void 0 ? void 0 : _g.toUpperCase()) !== null && _h !== void 0 ? _h : ''}${isToLocStr
13954
+ ? (_l = (_k = (_j = rec === null || rec === void 0 ? void 0 : rec.product) === null || _j === void 0 ? void 0 : _j.price) === null || _k === void 0 ? void 0 : _k.toLocaleString('zh', {
13955
+ minimumFractionDigits: 0
13956
+ })) !== null && _l !== void 0 ? _l : ''
13957
+ : (_m = rec === null || rec === void 0 ? void 0 : rec.product) === null || _m === void 0 ? void 0 : _m.price}`;
13918
13958
  }
13919
13959
  else {
13920
13960
  return null;
13921
13961
  }
13922
- }, [rec]);
13962
+ }, [rec, (_a = textStyles === null || textStyles === void 0 ? void 0 : textStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice]);
13923
13963
  // useEffect(() => {
13924
13964
  // if (imgDom.current === null || src === '') {
13925
13965
  // return;
@@ -14019,22 +14059,27 @@ function WaterfallList(_a) {
14019
14059
  const containerRef = React.useRef(null);
14020
14060
  const [isLoadMore, setIsLoadMore] = React.useState(false);
14021
14061
  React.useCallback(() => {
14022
- var _a, _b, _c, _d;
14023
14062
  if (isLoadMore)
14024
14063
  return;
14025
14064
  setIsLoadMore(true);
14026
14065
  waterFallData &&
14027
- (getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos(Object.assign(Object.assign({ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag }, (((_b = (_a = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec) === null || _a === void 0 ? void 0 : _a.product) === null || _b === void 0 ? void 0 : _b.itemId) && { productFilter: (_d = (_c = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec) === null || _c === void 0 ? void 0 : _c.product) === null || _d === void 0 ? void 0 : _d.itemId })), ((waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId) && { contentFilter: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId }))).then((res) => {
14066
+ (getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({
14067
+ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag
14068
+ }).then((res) => {
14028
14069
  var _a;
14029
14070
  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 : []));
14030
14071
  setIsLoadMore(false);
14031
14072
  }));
14032
14073
  }, [waterFallData, getRecommendVideos, list, isLoadMore]);
14033
14074
  React.useEffect(() => {
14034
- var _a, _b, _c, _d, _e, _f;
14075
+ var _a, _b;
14035
14076
  setIsLoadingData(true);
14036
14077
  waterFallData &&
14037
- (getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos(Object.assign(Object.assign(Object.assign({ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag }, (((_b = (_a = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec) === null || _a === void 0 ? void 0 : _a.product) === null || _b === void 0 ? void 0 : _b.itemId) && { productFilter: (_d = (_c = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec) === null || _c === void 0 ? void 0 : _c.product) === null || _d === void 0 ? void 0 : _d.itemId })), ((waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId) && { contentFilter: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId })), { defaultSize: hashTagSize, maxSize: hashTagSize })).then((res) => {
14078
+ (getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({
14079
+ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag,
14080
+ defaultSize: hashTagSize,
14081
+ maxSize: hashTagSize
14082
+ }).then((res) => {
14038
14083
  var _a, _b;
14039
14084
  setData(res);
14040
14085
  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 : []);
@@ -14043,7 +14088,7 @@ function WaterfallList(_a) {
14043
14088
  if (isOpenHashTag) {
14044
14089
  const res = previewData;
14045
14090
  setData(res);
14046
- setList((_f = (_e = res === null || res === void 0 ? void 0 : res.recList) === null || _e === void 0 ? void 0 : _e.filter((item) => (item === null || item === void 0 ? void 0 : item.video) !== null || (item === null || item === void 0 ? void 0 : item.product) !== null)) !== null && _f !== void 0 ? _f : []);
14091
+ 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 : []);
14047
14092
  setIsLoadingData(false);
14048
14093
  }
14049
14094
  }, [waterFallData, getRecommendVideos, hashTagSize, isOpenHashTag]);
@@ -14209,7 +14254,7 @@ var WaterFall$1 = React.memo(WaterFall);
14209
14254
  * @Author: binruan@chatlabs.com
14210
14255
  * @Date: 2024-01-15 19:03:09
14211
14256
  * @LastEditors: binruan@chatlabs.com
14212
- * @LastEditTime: 2024-04-29 19:08:34
14257
+ * @LastEditTime: 2024-08-22 10:15:23
14213
14258
  * @FilePath: \pb-sxp-ui\src\materials\sxp\HashTag\index.tsx
14214
14259
  *
14215
14260
  */
@@ -15842,7 +15887,7 @@ function withBindDataSource(Component) {
15842
15887
  * @Author: binruan@chatlabs.com
15843
15888
  * @Date: 2023-12-26 16:11:34
15844
15889
  * @LastEditors: binruan@chatlabs.com
15845
- * @LastEditTime: 2024-07-29 10:07:08
15890
+ * @LastEditTime: 2024-08-21 15:46:07
15846
15891
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\RenderCard.tsx
15847
15892
  *
15848
15893
  */
@@ -15862,44 +15907,38 @@ const RenderCard = ({ rec, index, tempMap, resolver, includesCtaType, isActive }
15862
15907
  cta = (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.bindCta) === null || _e === void 0 ? void 0 : _e.itemId;
15863
15908
  }
15864
15909
  const value = tempMap === null || tempMap === void 0 ? void 0 : tempMap[cta];
15865
- const renderComp = React.useMemo(() => {
15866
- 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;
15910
+ const renderComp = React.useCallback(() => {
15911
+ 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;
15867
15912
  if (!(rec === null || rec === void 0 ? void 0 : rec.video))
15868
15913
  return null;
15869
- if ((_b = (_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b.length) ;
15870
- else if ((_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProduct) ;
15871
- else {
15872
- (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.bindCta) === null || _e === void 0 ? void 0 : _e.itemId;
15873
- }
15874
15914
  //如果includesCtaType有值,则只渲染includesCtaType包含的cta类型组件,用于在页面某处只显示某一组件
15875
- if (includesCtaType && !(includesCtaType === null || includesCtaType === void 0 ? void 0 : includesCtaType.includes((_f = value === null || value === void 0 ? void 0 : value.item) === null || _f === void 0 ? void 0 : _f.type)))
15915
+ if (includesCtaType && !(includesCtaType === null || includesCtaType === void 0 ? void 0 : includesCtaType.includes((_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type)))
15876
15916
  return;
15877
15917
  //默认不渲染category为cta类型的组件,该类型的组件只用于某一处
15878
- if (!includesCtaType && ((_g = value === null || value === void 0 ? void 0 : value.item) === null || _g === void 0 ? void 0 : _g.category) === 'cta')
15918
+ if (!includesCtaType && ((_b = value === null || value === void 0 ? void 0 : value.item) === null || _b === void 0 ? void 0 : _b.category) === 'cta')
15879
15919
  return;
15880
- if ((((_h = value === null || value === void 0 ? void 0 : value.item) === null || _h === void 0 ? void 0 : _h.type) === 'CommodityDiro' && !((_j = rec === null || rec === void 0 ? void 0 : rec.video) === null || _j === void 0 ? void 0 : _j.bindProduct)) ||
15881
- (((_k = value === null || value === void 0 ? void 0 : value.item) === null || _k === void 0 ? void 0 : _k.type) === 'Commodity' && !((_l = rec === null || rec === void 0 ? void 0 : rec.video) === null || _l === void 0 ? void 0 : _l.bindProduct)) ||
15882
- (((_m = value === null || value === void 0 ? void 0 : value.item) === null || _m === void 0 ? void 0 : _m.type) === 'CommodityDiroNew' && !((_o = rec === null || rec === void 0 ? void 0 : rec.video) === null || _o === void 0 ? void 0 : _o.bindProduct)) ||
15883
- (((_p = value === null || value === void 0 ? void 0 : value.item) === null || _p === void 0 ? void 0 : _p.type) === 'MultiCommodity' && !((_r = (_q = rec === null || rec === void 0 ? void 0 : rec.video) === null || _q === void 0 ? void 0 : _q.bindProducts) === null || _r === void 0 ? void 0 : _r.length)) ||
15884
- (((_s = value === null || value === void 0 ? void 0 : value.item) === null || _s === void 0 ? void 0 : _s.type) === 'MultiCommodityDiro' && !((_u = (_t = rec === null || rec === void 0 ? void 0 : rec.video) === null || _t === void 0 ? void 0 : _t.bindProducts) === null || _u === void 0 ? void 0 : _u.length)) ||
15885
- (((_v = value === null || value === void 0 ? void 0 : value.item) === null || _v === void 0 ? void 0 : _v.type) === 'MultiCommodityDiroNew' && !((_x = (_w = rec === null || rec === void 0 ? void 0 : rec.video) === null || _w === void 0 ? void 0 : _w.bindProducts) === null || _x === void 0 ? void 0 : _x.length))) {
15920
+ if ((((_c = value === null || value === void 0 ? void 0 : value.item) === null || _c === void 0 ? void 0 : _c.type) === 'CommodityDiro' && !((_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.bindProduct)) ||
15921
+ (((_e = value === null || value === void 0 ? void 0 : value.item) === null || _e === void 0 ? void 0 : _e.type) === 'Commodity' && !((_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.bindProduct)) ||
15922
+ (((_g = value === null || value === void 0 ? void 0 : value.item) === null || _g === void 0 ? void 0 : _g.type) === 'CommodityDiroNew' && !((_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.bindProduct)) ||
15923
+ (((_j = value === null || value === void 0 ? void 0 : value.item) === null || _j === void 0 ? void 0 : _j.type) === 'MultiCommodity' && !((_l = (_k = rec === null || rec === void 0 ? void 0 : rec.video) === null || _k === void 0 ? void 0 : _k.bindProducts) === null || _l === void 0 ? void 0 : _l.length)) ||
15924
+ (((_m = value === null || value === void 0 ? void 0 : value.item) === null || _m === void 0 ? void 0 : _m.type) === 'MultiCommodityDiro' && !((_p = (_o = rec === null || rec === void 0 ? void 0 : rec.video) === null || _o === void 0 ? void 0 : _o.bindProducts) === null || _p === void 0 ? void 0 : _p.length)) ||
15925
+ (((_q = value === null || value === void 0 ? void 0 : value.item) === null || _q === void 0 ? void 0 : _q.type) === 'MultiCommodityDiroNew' && !((_s = (_r = rec === null || rec === void 0 ? void 0 : rec.video) === null || _r === void 0 ? void 0 : _r.bindProducts) === null || _s === void 0 ? void 0 : _s.length))) {
15886
15926
  //
15887
15927
  return null;
15888
15928
  }
15889
15929
  if (value && resolver) {
15890
- const t = resolver[(_y = value === null || value === void 0 ? void 0 : value.item) === null || _y === void 0 ? void 0 : _y.type];
15930
+ const t = resolver[(_t = value === null || value === void 0 ? void 0 : value.item) === null || _t === void 0 ? void 0 : _t.type];
15891
15931
  const Component = withBindDataSource(t);
15892
- const defaulSetting = (_z = t === null || t === void 0 ? void 0 : t.extend) === null || _z === void 0 ? void 0 : _z.defaulSetting;
15893
- const isExternalLink = ((_2 = (_1 = (_0 = value === null || value === void 0 ? void 0 : value.item) === null || _0 === void 0 ? void 0 : _0.event) === null || _1 === void 0 ? void 0 : _1.onClick) === null || _2 === void 0 ? void 0 : _2.linkType) === 'externalLink';
15894
- return (React.createElement(Component, Object.assign({ style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_3 = value === null || value === void 0 ? void 0 : value.item) === null || _3 === void 0 ? void 0 : _3.style), { zIndex: 50, marginLeft: '20px', boxSizing: 'border-box', transform: 'translate3d(0px, 0px, 0px)' }), textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_4 = value === null || value === void 0 ? void 0 : value.item) === null || _4 === void 0 ? void 0 : _4.textStyle), bindDatas: (_6 = (_5 = value === null || value === void 0 ? void 0 : value.item) === null || _5 === void 0 ? void 0 : _5.bindDatas) !== null && _6 !== void 0 ? _6 : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_7 = value === null || value === void 0 ? void 0 : value.item) === null || _7 === void 0 ? void 0 : _7.props, { event: ((_8 = value === null || value === void 0 ? void 0 : value.item) === null || _8 === void 0 ? void 0 : _8.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, key: value === null || value === void 0 ? void 0 : value.id, recData: rec, isExternalLink: isExternalLink, index: index, isActive: isActive })));
15932
+ const defaulSetting = (_u = t === null || t === void 0 ? void 0 : t.extend) === null || _u === void 0 ? void 0 : _u.defaulSetting;
15933
+ const isExternalLink = ((_x = (_w = (_v = value === null || value === void 0 ? void 0 : value.item) === null || _v === void 0 ? void 0 : _v.event) === null || _w === void 0 ? void 0 : _w.onClick) === null || _x === void 0 ? void 0 : _x.linkType) === 'externalLink';
15934
+ return (React.createElement(Component, Object.assign({ style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_y = value === null || value === void 0 ? void 0 : value.item) === null || _y === void 0 ? void 0 : _y.style), { zIndex: 50, marginLeft: '20px', boxSizing: 'border-box', transform: 'translate3d(0px, 0px, 0px)' }), textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_z = value === null || value === void 0 ? void 0 : value.item) === null || _z === void 0 ? void 0 : _z.textStyle), bindDatas: (_1 = (_0 = value === null || value === void 0 ? void 0 : value.item) === null || _0 === void 0 ? void 0 : _0.bindDatas) !== null && _1 !== void 0 ? _1 : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_2 = value === null || value === void 0 ? void 0 : value.item) === null || _2 === void 0 ? void 0 : _2.props, { event: ((_3 = value === null || value === void 0 ? void 0 : value.item) === null || _3 === void 0 ? void 0 : _3.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, key: value === null || value === void 0 ? void 0 : value.id, recData: rec, isExternalLink: isExternalLink, index: index, isActive: isActive })));
15895
15935
  }
15896
15936
  else {
15897
15937
  return null;
15898
15938
  }
15899
15939
  }, [rec, resolver, tempMap, schema, value === null || value === void 0 ? void 0 : value.id, isActive]);
15900
- return React.createElement(React.Fragment, null, renderComp);
15940
+ return React.createElement(React.Fragment, null, renderComp());
15901
15941
  };
15902
- var RenderCard$1 = React.memo(RenderCard);
15903
15942
 
15904
15943
  /*
15905
15944
  * @Author: binruan@chatlabs.com
@@ -15984,7 +16023,7 @@ var Tagbar$1 = React.memo(Tagbar);
15984
16023
  * @Author: binruan@chatlabs.com
15985
16024
  * @Date: 2024-01-15 19:03:09
15986
16025
  * @LastEditors: binruan@chatlabs.com
15987
- * @LastEditTime: 2024-08-16 11:47:58
16026
+ * @LastEditTime: 2024-08-22 09:56:51
15988
16027
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
15989
16028
  *
15990
16029
  */
@@ -16001,7 +16040,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
16001
16040
  const [isShowMore, setIsShowMore] = React.useState(false);
16002
16041
  const [isReload, setIsReload] = React.useState(new Date().getTime());
16003
16042
  const skipLinkRef = React.useRef(false);
16004
- const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport, curTime, h5EnterLink, isShowConsent, selectTag, isPreview } = useSxpDataSource();
16043
+ const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport, curTime, h5EnterLink, isShowConsent, selectTag, isPreview, isEditor } = useSxpDataSource();
16005
16044
  const { backMainFeed, productView, jumpToWeb } = useEventReport();
16006
16045
  const isShowFingerTip = React.useMemo(() => {
16007
16046
  return data.length > 0 && !loading && (getFeUserId() || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enableSwiperTip));
@@ -16031,6 +16070,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
16031
16070
  }, [data.length, bffFbReport, h5EnterLink]);
16032
16071
  React.useEffect(() => {
16033
16072
  var _a;
16073
+ if (!ctaType || (ctaType === null || ctaType === void 0 ? void 0 : ctaType.length) < 1)
16074
+ return;
16034
16075
  const index = (data === null || data === void 0 ? void 0 : data.findIndex((item) => {
16035
16076
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
16036
16077
  const ctaType0 = ctaType === null || ctaType === void 0 ? void 0 : ctaType[0];
@@ -16044,8 +16085,9 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
16044
16085
  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));
16045
16086
  }
16046
16087
  })) || 0;
16047
- (_a = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper.slideTo(index);
16048
- }, [ctaType, swiperRef]);
16088
+ if (index !== -1)
16089
+ (_a = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper.slideTo(index);
16090
+ }, [data, ctaType, swiperRef]);
16049
16091
  React.useEffect(() => {
16050
16092
  const item = data === null || data === void 0 ? void 0 : data[activeIndex];
16051
16093
  const visibleChange = () => {
@@ -16147,7 +16189,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
16147
16189
  }, [globalConfig, containerHeight, tagHeight]);
16148
16190
  const visList = React.useMemo(() => {
16149
16191
  var _a;
16150
- const list = activeIndex === 0 && !waterFallData
16192
+ const list = activeIndex === 0 && !waterFallData && !isEditor
16151
16193
  ? [(_a = data === null || data === void 0 ? void 0 : data[0]) !== null && _a !== void 0 ? _a : null]
16152
16194
  : data === null || data === void 0 ? void 0 : data.map((item, index) => {
16153
16195
  if (activeIndex === index || index - 1 === activeIndex || index + 1 === activeIndex) {
@@ -16158,7 +16200,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
16158
16200
  }
16159
16201
  });
16160
16202
  return !waterFallData ? list.concat([{ loading: true }]) : list;
16161
- }, [data, activeIndex, waterFallData]);
16203
+ }, [data, activeIndex, waterFallData, isEditor]);
16162
16204
  const renderLogo = React.useMemo(() => {
16163
16205
  var _a, _b, _c, _d;
16164
16206
  if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
@@ -16232,12 +16274,12 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
16232
16274
  React.createElement("div", { className: 'clc-sxp-bottom', style: { paddingBottom: `${(_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.bottomInfoDist) !== null && _b !== void 0 ? _b : 40}px` } },
16233
16275
  React.createElement(Nudge, { nudge: nudge }),
16234
16276
  (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) ? (React.createElement("div", { className: 'clc-sxp-bottom-card' },
16235
- React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver }))) : null,
16277
+ React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: resolver }))) : null,
16236
16278
  React.createElement("div", null,
16237
16279
  React.createElement(ExpandableText$1, { className: 'clc-sxp-bottom-text', isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_d = (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.title) !== null && _d !== void 0 ? _d : '', style: Object.assign(Object.assign({}, descStyle), { textShadow: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isOpenTextShadow) ? '2px 2px 4px rgba(0, 0, 0, 0.5)' : 'none' }), onChange: onExpandableChange }),
16238
- React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLink'] }),
16280
+ React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLink'] }),
16239
16281
  React.createElement(Hashtag$1, { index: activeIndex, tags: (_f = (_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.hashTags) !== null && _f !== void 0 ? _f : [], itemId: (_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.itemId, itemType: ((_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.itemId) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle }))),
16240
- React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLinkPopup'], isActive: index === activeIndex })));
16282
+ React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLinkPopup'], isActive: index === activeIndex })));
16241
16283
  }
16242
16284
  return null;
16243
16285
  }, [
@@ -16407,6 +16449,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
16407
16449
  position: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed) ? 'fixed' : 'absolute',
16408
16450
  visibility: ((_b = (_a = visList === null || visList === void 0 ? void 0 : visList[activeIndex]) === null || _a === void 0 ? void 0 : _a.video) === null || _b === void 0 ? void 0 : _b.url) ? 'visible' : 'hidden',
16409
16451
  zIndex: 999,
16452
+ transform: 'translate3d(0px,0px,0px)',
16410
16453
  [(_c = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconXPosit) !== null && _c !== void 0 ? _c : 'right']: (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconX) !== null && _d !== void 0 ? _d : 0,
16411
16454
  [(_e = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconYPosit) !== null && _e !== void 0 ? _e : 'bottom']: (_f = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconY) !== null && _f !== void 0 ? _f : 23
16412
16455
  }, 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 })));
@@ -16425,10 +16468,10 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
16425
16468
  alignItems: 'center'
16426
16469
  } },
16427
16470
  React.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } }))) : (React.createElement(React.Fragment, null,
16428
- renderContent(rec, index),
16429
- renderBottom(rec, index),
16430
16471
  renderLikeButton(rec, index, !(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconFixed)),
16431
- renderToggleButton(!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed))))))));
16472
+ renderToggleButton(!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed)),
16473
+ renderBottom(rec, index),
16474
+ renderContent(rec, index)))))));
16432
16475
  });
16433
16476
  }, [
16434
16477
  containerWidth,
@@ -16464,9 +16507,9 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
16464
16507
  return;
16465
16508
  // 处理上滑下滑事件
16466
16509
  handleScrollEvent(swiper);
16467
- if (waterFallData)
16510
+ if (waterFallData || isEditor)
16468
16511
  return;
16469
- if ((swiper === null || swiper === void 0 ? void 0 : swiper.activeIndex) + 2 >= (data === null || data === void 0 ? void 0 : data.length)) {
16512
+ if ((swiper === null || swiper === void 0 ? void 0 : swiper.activeIndex) + 1 >= (data === null || data === void 0 ? void 0 : data.length)) {
16470
16513
  if (!isLoadMore) {
16471
16514
  setIsLoadMore(true);
16472
16515
  loadVideos === null || loadVideos === void 0 ? void 0 : loadVideos(Math.ceil(activeIndex / 10) + 1).then(() => {
@@ -16772,7 +16815,7 @@ const DiyPortalPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, de
16772
16815
  const CTA = (rec, index) => {
16773
16816
  if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA)) {
16774
16817
  return (React.createElement("div", { className: 'clc-sxp-bottom-card' },
16775
- React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$1 })));
16818
+ React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$1 })));
16776
16819
  }
16777
16820
  return null;
16778
16821
  };
@@ -16962,7 +17005,7 @@ var index = React.memo(SxpPageCore);
16962
17005
  * @Author: binruan@chatlabs.com
16963
17006
  * @Date: 2023-12-26 10:38:53
16964
17007
  * @LastEditors: binruan@chatlabs.com
16965
- * @LastEditTime: 2024-06-25 11:20:15
17008
+ * @LastEditTime: 2024-08-22 11:32:23
16966
17009
  * @FilePath: \pb-sxp-ui\src\core\context\EditorDataProvider.tsx
16967
17010
  *
16968
17011
  */
@@ -16992,7 +17035,8 @@ const EditorDataProvider = ({ children, data }) => {
16992
17035
  setOpenHashtag,
16993
17036
  openConsent,
16994
17037
  setOpenConsent,
16995
- sxpFontLinks: data === null || data === void 0 ? void 0 : data.sxpFontLinks
17038
+ sxpFontLinks: data === null || data === void 0 ? void 0 : data.sxpFontLinks,
17039
+ utmParameter: data === null || data === void 0 ? void 0 : data.utm_parameter
16996
17040
  } }, children));
16997
17041
  };
16998
17042
  function useEditorDataProvider() {