pb-sxp-ui 1.3.8 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +111 -111
  3. package/dist/index.cjs +197 -72
  4. package/dist/index.cjs.map +1 -1
  5. package/dist/index.css +0 -4
  6. package/dist/index.js +197 -72
  7. package/dist/index.js.map +1 -1
  8. package/dist/index.min.cjs +3 -3
  9. package/dist/index.min.cjs.map +1 -1
  10. package/dist/index.min.js +3 -3
  11. package/dist/index.min.js.map +1 -1
  12. package/dist/pb-ui.js +197 -72
  13. package/dist/pb-ui.js.map +1 -1
  14. package/dist/pb-ui.min.js +3 -3
  15. package/dist/pb-ui.min.js.map +1 -1
  16. package/es/core/components/SxpPageRender/Modal/index.js +10 -4
  17. package/es/core/components/SxpPageRender/PictureGroup/index.js +11 -5
  18. package/es/core/components/SxpPageRender/index.d.ts +3 -0
  19. package/es/core/components/SxpPageRender/index.js +14 -9
  20. package/es/core/context/SxpDataSourceProvider.d.ts +2 -1
  21. package/es/core/context/SxpDataSourceProvider.js +22 -15
  22. package/es/core/hooks/useEventReport.js +9 -16
  23. package/es/materials/sxp/popup/AppointForm/Form.js +1 -1
  24. package/es/materials/sxp/popup/AppointForm/index.js +31 -8
  25. package/es/materials/sxp/popup/CommodityDetail/index.d.ts +3 -0
  26. package/es/materials/sxp/popup/CommodityDetail/index.js +15 -5
  27. package/es/materials/sxp/popup/CommodityDetail/settingRender.d.ts +13 -0
  28. package/es/materials/sxp/popup/CommodityDetail/settingRender.js +31 -0
  29. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +3 -0
  30. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +15 -4
  31. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +13 -0
  32. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +31 -0
  33. package/lib/core/components/SxpPageRender/Modal/index.js +10 -4
  34. package/lib/core/components/SxpPageRender/PictureGroup/index.js +11 -5
  35. package/lib/core/components/SxpPageRender/index.d.ts +3 -0
  36. package/lib/core/components/SxpPageRender/index.js +14 -9
  37. package/lib/core/context/SxpDataSourceProvider.d.ts +2 -1
  38. package/lib/core/context/SxpDataSourceProvider.js +22 -15
  39. package/lib/core/hooks/useEventReport.js +9 -16
  40. package/lib/materials/sxp/popup/AppointForm/Form.js +1 -1
  41. package/lib/materials/sxp/popup/AppointForm/index.js +30 -7
  42. package/lib/materials/sxp/popup/CommodityDetail/index.d.ts +3 -0
  43. package/lib/materials/sxp/popup/CommodityDetail/index.js +15 -5
  44. package/lib/materials/sxp/popup/CommodityDetail/settingRender.d.ts +13 -0
  45. package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +31 -0
  46. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +3 -0
  47. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +15 -4
  48. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +13 -0
  49. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +31 -0
  50. package/package.json +111 -111
package/dist/pb-ui.js CHANGED
@@ -650,6 +650,7 @@
650
650
  const [selectTag, setSelectTag] = React.useState(DEFAULT_TAG);
651
651
  const checkCommodityIndexRef = React.useRef(-1);
652
652
  const popupCurTimeRef = React.useRef(null);
653
+ const [isNoMoreData, setIsNoMoreData] = React.useState(false);
653
654
  const isShowConsent = React.useMemo(() => {
654
655
  var _a, _b, _c, _d;
655
656
  return (((_d = (_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) === null || _d === void 0 ? void 0 : _d.privacy_necessity) && !isAgreePolicy && !isEditor) || isOpenConsent;
@@ -711,7 +712,7 @@
711
712
  }, [bffDataSource]);
712
713
  // 获取推荐视频数据
713
714
  const getRecommendVideos = React.useCallback((query) => __awaiter(void 0, void 0, void 0, function* () {
714
- var _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
715
+ var _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
715
716
  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 });
716
717
  if (utmVal) {
717
718
  const val = (_h = (_g = (_f = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _f === void 0 ? void 0 : _f.filter((val) => {
@@ -721,9 +722,6 @@
721
722
  })) === null || _g === void 0 ? void 0 : _g.join('&')) !== null && _h !== void 0 ? _h : '';
722
723
  query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(val) });
723
724
  }
724
- if (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) {
725
- 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 });
726
- }
727
725
  if (isEditor) {
728
726
  let pageNum = 1;
729
727
  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] }));
@@ -734,15 +732,15 @@
734
732
  let list = [];
735
733
  let result = null;
736
734
  const recurveRecList = (query) => __awaiter(void 0, void 0, void 0, function* () {
737
- var _r, _s, _t, _u, _v, _w;
735
+ var _t, _u, _v, _w, _x, _y;
738
736
  query.pageNum = pageNum;
739
737
  result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/list', { method: 'GET', query }));
740
738
  if (!(result === null || result === void 0 ? void 0 : result.success)) {
741
739
  return undefined;
742
740
  }
743
741
  setLoading(false);
744
- 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));
745
742
  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 : []);
743
+ const isNotNullList = (_y = (_x = result === null || result === void 0 ? void 0 : result.data) === null || _x === void 0 ? void 0 : _x.recList) === null || _y === void 0 ? void 0 : _y.some((item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video));
746
744
  if (isNotNullList) {
747
745
  pageNum = pageNum + 1;
748
746
  yield recurveRecList(query);
@@ -750,9 +748,12 @@
750
748
  });
751
749
  yield recurveRecList(query);
752
750
  if (!(query === null || query === void 0 ? void 0 : query.hashTag) && result)
753
- 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 });
751
+ 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 });
754
752
  return Object.assign(Object.assign({}, result.data), { recList: list });
755
753
  }
754
+ if (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) {
755
+ query = Object.assign(Object.assign({}, query), { directPage: true, level: 1, pageNum: (_l = query === null || query === void 0 ? void 0 : query.pageNum) !== null && _l !== void 0 ? _l : 1 });
756
+ }
756
757
  const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/list', { method: 'GET', query }));
757
758
  if (!(result === null || result === void 0 ? void 0 : result.success)) {
758
759
  return undefined;
@@ -762,19 +763,24 @@
762
763
  if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) && !isEditor) {
763
764
  let list = [];
764
765
  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 : []);
766
+ 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.some((item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video));
767
+ if (!isNotNullList) {
768
+ setIsNoMoreData(true);
769
+ }
765
770
  return Object.assign(Object.assign({}, result.data), { recList: list });
766
771
  }
767
772
  return result === null || result === void 0 ? void 0 : result.data;
768
773
  }), [bffFetch, utmVal, maxSize, defaultSize, channelQueryList]);
769
774
  const loadVideos = React.useCallback((pageNum) => __awaiter(void 0, void 0, void 0, function* () {
770
- var _x, _y, _z, _0;
775
+ var _z, _0, _1, _2;
771
776
  if (rtcList.length <= 0) {
772
777
  return;
773
778
  }
774
779
  const lastItem = rtcList === null || rtcList === void 0 ? void 0 : rtcList[(rtcList === null || rtcList === void 0 ? void 0 : rtcList.length) - 1];
775
- 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 })));
780
+ const data = yield getRecommendVideos(Object.assign(Object.assign(Object.assign(Object.assign({ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag }, (((_z = lastItem === null || lastItem === void 0 ? void 0 : lastItem.product) === null || _z === void 0 ? void 0 : _z.itemId) && { productFilter: (_0 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.product) === null || _0 === void 0 ? void 0 : _0.itemId })), (((_1 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.video) === null || _1 === void 0 ? void 0 : _1.itemId) && { contentFilter: (_2 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.video) === null || _2 === void 0 ? void 0 : _2.itemId })), { themeTag: themeTag.current }), ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) && !isEditor && { pageNum })));
776
781
  setRtcList(rtcList.concat(getFilterRecList(data)));
777
782
  setCacheRtcList(cacheRtcList.concat(getFilterRecList(data)));
783
+ return data;
778
784
  }), [getRecommendVideos, rtcList, waterFallData, cacheRtcList]);
779
785
  const bffEventReport = React.useCallback(({ userInfo, eventInfo }) => {
780
786
  // 关闭 BFF 事件上报
@@ -819,7 +825,7 @@
819
825
  eventName,
820
826
  actionSource,
821
827
  eventSourceUrl,
822
- 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 : '' })
828
+ 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')}` })), { clientUserAgent: (_d = (_c = window === null || window === void 0 ? void 0 : window.navigator) === null || _c === void 0 ? void 0 : _c.userAgent) !== null && _d !== void 0 ? _d : '' })
823
829
  },
824
830
  type: 'beacon'
825
831
  });
@@ -838,17 +844,17 @@
838
844
  }), [bffFetch]);
839
845
  // 获取 Tag
840
846
  const bffGetTagList = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
841
- var _1, _2, _3, _4, _5;
847
+ var _3, _4, _5, _6, _7;
842
848
  if (!utmVal || !isShowTag)
843
849
  return;
844
850
  try {
845
- const val = (_3 = (_2 = (_1 = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _1 === void 0 ? void 0 : _1.filter((val) => {
851
+ const val = (_5 = (_4 = (_3 = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _3 === void 0 ? void 0 : _3.filter((val) => {
846
852
  var _a, _b;
847
853
  const key = val.split('=')[0];
848
854
  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);
849
- })) === null || _2 === void 0 ? void 0 : _2.join('&')) !== null && _3 !== void 0 ? _3 : '';
855
+ })) === null || _4 === void 0 ? void 0 : _4.join('&')) !== null && _5 !== void 0 ? _5 : '';
850
856
  const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/tag/list', { method: 'GET', query: { channel: decodeURIComponent(val) } }));
851
- 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 : []);
857
+ setTagList((_7 = (_6 = result === null || result === void 0 ? void 0 : result.data) === null || _6 === void 0 ? void 0 : _6.tags) !== null && _7 !== void 0 ? _7 : []);
852
858
  }
853
859
  catch (e) {
854
860
  console.log('e', e);
@@ -995,7 +1001,8 @@
995
1001
  globalConfig,
996
1002
  popupCurTimeRef,
997
1003
  checkCommodityIndexRef,
998
- isEditor
1004
+ isEditor,
1005
+ isNoMoreData
999
1006
  } }, 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({
1000
1007
  rtcList,
1001
1008
  mutateLike: bffMutateLike,
@@ -1438,14 +1445,14 @@
1438
1445
  * @Author: binruan@chatlabs.com
1439
1446
  * @Date: 2024-03-12 10:59:06
1440
1447
  * @LastEditors: binruan@chatlabs.com
1441
- * @LastEditTime: 2024-08-22 17:43:04
1448
+ * @LastEditTime: 2024-08-28 17:51:37
1442
1449
  * @FilePath: \pb-sxp-ui\src\core\hooks\useEventReport.ts
1443
1450
  *
1444
1451
  */
1445
1452
  function useEventReport() {
1446
1453
  const { bffEventReport, popupDetailData, waterFallData, isFromHashtag } = useSxpDataSource();
1447
1454
  const jumpToWeb = React.useCallback((data, product, cta, position, traceInfo) => {
1448
- 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;
1455
+ 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, _12, _13;
1449
1456
  let fromKName = '';
1450
1457
  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))) {
1451
1458
  fromKName = 'pdpPage';
@@ -1463,22 +1470,15 @@
1463
1470
  fromKName = 'productPage';
1464
1471
  }
1465
1472
  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;
1473
+ let contentFormat = null;
1474
+ if ((_r = data === null || data === void 0 ? void 0 : data.video) === null || _r === void 0 ? void 0 : _r.url) {
1475
+ contentFormat = 'video';
1476
+ }
1477
+ else if (((_s = data === null || data === void 0 ? void 0 : data.video) === null || _s === void 0 ? void 0 : _s.imgUrls) && ((_u = (_t = data === null || data === void 0 ? void 0 : data.video) === null || _t === void 0 ? void 0 : _t.imgUrls) === null || _u === void 0 ? void 0 : _u.length)) {
1478
+ contentFormat = 'image';
1479
+ }
1466
1480
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
1467
- eventInfo: {
1468
- eventSubject: 'jumpToWeb',
1469
- eventDescription: 'User jumped to website',
1470
- productId: (_r = product === null || product === void 0 ? void 0 : product.itemId) !== null && _r !== void 0 ? _r : '',
1471
- productName: (_s = product === null || product === void 0 ? void 0 : product.title) !== null && _s !== void 0 ? _s : '',
1472
- price: (product === null || product === void 0 ? void 0 : product.price) ? (product === null || product === void 0 ? void 0 : product.price) + '' : '0',
1473
- productCollection: (_t = product === null || product === void 0 ? void 0 : product.collection) !== null && _t !== void 0 ? _t : '',
1474
- fromKName,
1475
- fromKPage: location === null || location === void 0 ? void 0 : location.href,
1476
- contentTags: contentTags ? JSON.stringify(contentTags) : '',
1477
- position: position + '',
1478
- 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 : '',
1479
- ctatId: (_w = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _w !== void 0 ? _w : '',
1480
- traceInfo: (_9 = (_6 = (_4 = (_0 = (_x = traceInfo !== null && traceInfo !== void 0 ? traceInfo : product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _x !== void 0 ? _x : (_z = (_y = data === null || data === void 0 ? void 0 : data.video) === null || _y === void 0 ? void 0 : _y.bindProduct) === null || _z === void 0 ? void 0 : _z.traceInfo) !== null && _0 !== void 0 ? _0 : (_3 = (_2 = (_1 = data === null || data === void 0 ? void 0 : data.video) === null || _1 === void 0 ? void 0 : _1.bindProducts) === null || _2 === void 0 ? void 0 : _2[0]) === null || _3 === void 0 ? void 0 : _3.traceInfo) !== null && _4 !== void 0 ? _4 : (_5 = data === null || data === void 0 ? void 0 : data.product) === null || _5 === void 0 ? void 0 : _5.traceInfo) !== null && _6 !== void 0 ? _6 : (_8 = (_7 = data === null || data === void 0 ? void 0 : data.video) === null || _7 === void 0 ? void 0 : _7.bindCta) === null || _8 === void 0 ? void 0 : _8.traceInfo) !== null && _9 !== void 0 ? _9 : ''
1481
- }
1481
+ eventInfo: Object.assign({ eventSubject: 'jumpToWeb', eventDescription: 'User jumped to website', productId: (_v = product === null || product === void 0 ? void 0 : product.itemId) !== null && _v !== void 0 ? _v : '', productName: (_w = product === null || product === void 0 ? void 0 : product.title) !== null && _w !== void 0 ? _w : '', price: (product === null || product === void 0 ? void 0 : product.price) ? (product === null || product === void 0 ? void 0 : product.price) + '' : '0', productCollection: (_x = product === null || product === void 0 ? void 0 : product.collection) !== null && _x !== void 0 ? _x : '', fromKName, fromKPage: location === null || location === void 0 ? void 0 : location.href, contentTags: contentTags ? JSON.stringify(contentTags) : '', position: position + '', contentId: (_z = (_y = data === null || data === void 0 ? void 0 : data.video) === null || _y === void 0 ? void 0 : _y.itemId) !== null && _z !== void 0 ? _z : '', ctatId: (_0 = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _0 !== void 0 ? _0 : '', traceInfo: (_13 = (_10 = (_8 = (_4 = (_1 = traceInfo !== null && traceInfo !== void 0 ? traceInfo : product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _1 !== void 0 ? _1 : (_3 = (_2 = data === null || data === void 0 ? void 0 : data.video) === null || _2 === void 0 ? void 0 : _2.bindProduct) === null || _3 === void 0 ? void 0 : _3.traceInfo) !== null && _4 !== void 0 ? _4 : (_7 = (_6 = (_5 = data === null || data === void 0 ? void 0 : data.video) === null || _5 === void 0 ? void 0 : _5.bindProducts) === null || _6 === void 0 ? void 0 : _6[0]) === null || _7 === void 0 ? void 0 : _7.traceInfo) !== null && _8 !== void 0 ? _8 : (_9 = data === null || data === void 0 ? void 0 : data.product) === null || _9 === void 0 ? void 0 : _9.traceInfo) !== null && _10 !== void 0 ? _10 : (_12 = (_11 = data === null || data === void 0 ? void 0 : data.video) === null || _11 === void 0 ? void 0 : _11.bindCta) === null || _12 === void 0 ? void 0 : _12.traceInfo) !== null && _13 !== void 0 ? _13 : '' }, (contentFormat && { contentFormat }))
1482
1482
  });
1483
1483
  }, [bffEventReport, popupDetailData, isFromHashtag]);
1484
1484
  const productView = React.useCallback((data, product, cta, viewTime, position) => {
@@ -1533,22 +1533,25 @@
1533
1533
  * @Author: binruan@chatlabs.com
1534
1534
  * @Date: 2024-06-27 16:22:34
1535
1535
  * @LastEditors: binruan@chatlabs.com
1536
- * @LastEditTime: 2024-07-05 14:55:25
1536
+ * @LastEditTime: 2024-08-27 16:59:46
1537
1537
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\AppointForm\Form.tsx
1538
1538
  *
1539
1539
  */
1540
1540
  const Form = ({ layout, columns, onChange }) => {
1541
1541
  return (React.createElement(React.Fragment, null, columns === null || columns === void 0 ? void 0 : columns.map((item, index) => (React.createElement("div", { key: index, className: 'pb-appoint-form-container-item', style: { flexDirection: layout === 'horizontal' ? 'row' : 'column' } },
1542
1542
  layout !== 'inline' && React.createElement("label", { className: 'pb-appoint-form-container-label' }, item === null || item === void 0 ? void 0 : item.title),
1543
- (item === null || item === void 0 ? void 0 : item.valueType) === 'text' && (React.createElement("input", Object.assign({ className: 'pb-appoint-form-container-input', type: 'text', placeholder: layout === 'inline' ? item === null || item === void 0 ? void 0 : item.title : '请输入', name: item === null || item === void 0 ? void 0 : item.dataIndex }, (onChange && { onChange: onChange })))))))));
1543
+ (item === null || item === void 0 ? void 0 : item.valueType) === 'text' && (React.createElement("input", Object.assign({ className: 'pb-appoint-form-container-input', type: 'text', placeholder: layout === 'inline' ? item === null || item === void 0 ? void 0 : item.title : '请输入', name: item === null || item === void 0 ? void 0 : item.dataIndex }, (onChange && { onChange })))))))));
1544
1544
  };
1545
1545
  var Form$1 = React.memo(Form);
1546
1546
 
1547
1547
  const AppointForm$1 = (_a) => {
1548
+ var _b, _c;
1548
1549
  var { columns, style, title, textStyle, submitBgColor, submitColor, submitText, layoutType = 'inline', isExternalLink, isPopup, onClick, onClose, submitButtonStyle } = _a, props = __rest(_a, ["columns", "style", "title", "textStyle", "submitBgColor", "submitColor", "submitText", "layoutType", "isExternalLink", "isPopup", "onClick", "onClose", "submitButtonStyle"]);
1549
1550
  const { submitForm, popupDetailData } = useSxpDataSource();
1550
1551
  const { jumpToWeb } = useEventReport();
1551
1552
  const [loading, setLoading] = React.useState(false);
1553
+ const [formData, setFormData] = React.useState({});
1554
+ const [marginTop, setMarginTop] = React.useState(0);
1552
1555
  const defaultColumns = React.useMemo(() => [
1553
1556
  {
1554
1557
  title: '',
@@ -1575,7 +1578,7 @@
1575
1578
  key: '4'
1576
1579
  }
1577
1580
  ], []);
1578
- const [formData, setFormData] = React.useState({});
1581
+ const originalHeight = ((_b = document === null || document === void 0 ? void 0 : document.documentElement) === null || _b === void 0 ? void 0 : _b.clientHeight) || ((_c = document === null || document === void 0 ? void 0 : document.body) === null || _c === void 0 ? void 0 : _c.clientHeight);
1579
1582
  const columnsData = React.useMemo(() => {
1580
1583
  return lodash.cloneDeep(columns) || defaultColumns;
1581
1584
  }, [columns, defaultColumns]);
@@ -1584,17 +1587,17 @@
1584
1587
  setFormData(Object.assign(Object.assign({}, formData), { [name]: value }));
1585
1588
  }, [formData]);
1586
1589
  const handleSubmit = lodash.debounce(() => __awaiter(void 0, void 0, void 0, function* () {
1587
- var _b, _c, _d, _e, _f;
1590
+ var _d, _e, _f, _g, _h;
1588
1591
  const vals = formData;
1589
1592
  if (!vals)
1590
1593
  return;
1591
- const arr = (_c = (_b = Object.keys(vals)) === null || _b === void 0 ? void 0 : _b.map((key) => {
1594
+ const arr = (_e = (_d = Object.keys(vals)) === null || _d === void 0 ? void 0 : _d.map((key) => {
1592
1595
  var _a;
1593
1596
  return ({
1594
1597
  name: key,
1595
1598
  value: (_a = vals[key]) !== null && _a !== void 0 ? _a : ''
1596
1599
  });
1597
- })) === null || _c === void 0 ? void 0 : _c.filter((item) => item === null || item === void 0 ? void 0 : item.value);
1600
+ })) === null || _e === void 0 ? void 0 : _e.filter((item) => item === null || item === void 0 ? void 0 : item.value);
1598
1601
  if (!arr || !(arr === null || arr === void 0 ? void 0 : arr.length))
1599
1602
  return;
1600
1603
  setLoading(true);
@@ -1603,8 +1606,8 @@
1603
1606
  if (res) {
1604
1607
  if (isExternalLink) {
1605
1608
  const data = popupDetailData;
1606
- const product = (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.bindProduct;
1607
- const cta = (_f = (_e = data === null || data === void 0 ? void 0 : data.video) === null || _e === void 0 ? void 0 : _e.bindProduct) === null || _f === void 0 ? void 0 : _f.bindCta;
1609
+ const product = (_f = data === null || data === void 0 ? void 0 : data.video) === null || _f === void 0 ? void 0 : _f.bindProduct;
1610
+ const cta = (_h = (_g = data === null || data === void 0 ? void 0 : data.video) === null || _g === void 0 ? void 0 : _g.bindProduct) === null || _h === void 0 ? void 0 : _h.bindCta;
1608
1611
  const position = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
1609
1612
  jumpToWeb(data, product, cta, position);
1610
1613
  }
@@ -1614,11 +1617,33 @@
1614
1617
  onClick === null || onClick === void 0 ? void 0 : onClick();
1615
1618
  }
1616
1619
  }), 1000);
1620
+ React.useEffect(() => {
1621
+ const handleScroll = () => {
1622
+ var _a, _b;
1623
+ // 获取用户代理字符串
1624
+ const userAgent = navigator.userAgent;
1625
+ // 判断是否是安卓设备
1626
+ const isAndroid = userAgent.toLowerCase().includes('android');
1627
+ if (!isAndroid)
1628
+ return;
1629
+ const resizeHeight = ((_a = document === null || document === void 0 ? void 0 : document.documentElement) === null || _a === void 0 ? void 0 : _a.clientHeight) || ((_b = document === null || document === void 0 ? void 0 : document.body) === null || _b === void 0 ? void 0 : _b.clientHeight);
1630
+ if (resizeHeight < originalHeight) {
1631
+ setMarginTop(50);
1632
+ }
1633
+ else {
1634
+ setMarginTop(0);
1635
+ }
1636
+ };
1637
+ window.addEventListener('resize', handleScroll);
1638
+ return () => {
1639
+ window.removeEventListener('resize', handleScroll);
1640
+ };
1641
+ }, []);
1617
1642
  return (React.createElement("div", { className: 'pb-appoint-form' },
1618
1643
  React.createElement("div", { className: `pb-appoint-form-title ${css.css(Object.assign({}, textStyle))}`, dangerouslySetInnerHTML: {
1619
1644
  __html: setFontForText(title, textStyle)
1620
1645
  } }),
1621
- React.createElement("div", Object.assign({ className: css.css(Object.assign({}, style)) }, props),
1646
+ React.createElement("div", Object.assign({ className: css.css(Object.assign(Object.assign({}, style), { marginTop })) }, props),
1622
1647
  React.createElement("div", { className: 'pb-appoint-form-container' },
1623
1648
  React.createElement(Form$1, { columns: columnsData, layout: layoutType, onChange: handleChange }))),
1624
1649
  React.createElement("div", { className: 'pb-appoint-form-btn-wrapper' },
@@ -2000,6 +2025,37 @@
2000
2025
  name: ['props', 'iframeBgColor']
2001
2026
  }
2002
2027
  ]
2028
+ },
2029
+ {
2030
+ title: '轮播指示器',
2031
+ child: [
2032
+ {
2033
+ label: '背景色',
2034
+ name: ['props', 'swiper', 'dotsBgColor'],
2035
+ type: 'Color'
2036
+ },
2037
+ {
2038
+ label: '选中色',
2039
+ name: ['props', 'swiper', 'dotsActiveColor'],
2040
+ type: 'Color'
2041
+ },
2042
+ {
2043
+ label: '底边距',
2044
+ name: ['props', 'swiper', 'dotsMarginBottom'],
2045
+ type: 'Number',
2046
+ addonAfter: 'px'
2047
+ }
2048
+ ]
2049
+ },
2050
+ {
2051
+ title: '关闭按钮',
2052
+ child: [
2053
+ {
2054
+ label: '跟随弹窗滚动',
2055
+ type: 'Switch',
2056
+ name: ['props', 'enableFixedCloseButton']
2057
+ }
2058
+ ]
2003
2059
  }
2004
2060
  ];
2005
2061
 
@@ -8829,13 +8885,13 @@
8829
8885
  * @Author: binruan@chatlabs.com
8830
8886
  * @Date: 2023-11-02 18:34:34
8831
8887
  * @LastEditors: binruan@chatlabs.com
8832
- * @LastEditTime: 2024-08-22 18:48:44
8888
+ * @LastEditTime: 2024-08-29 16:40:25
8833
8889
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Modal\index.tsx
8834
8890
  *
8835
8891
  */
8836
8892
  const closeIcon$1 = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII=';
8837
8893
  const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema, fullHeight = window.innerHeight, isFullScreen = false }) => {
8838
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
8894
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
8839
8895
  const touchRef = React.useRef(null);
8840
8896
  const fTouchRef = React.useRef(null);
8841
8897
  const touchMoveRef = React.useRef(null);
@@ -8847,6 +8903,7 @@
8847
8903
  const modalEleRef = React.useRef(null);
8848
8904
  const { globalConfig, popupDetailData } = useSxpDataSource();
8849
8905
  const { schema: _schema } = useEditor();
8906
+ const [scrollTop, setScrollTop] = React.useState(15);
8850
8907
  React.useEffect(() => {
8851
8908
  const parentNode = document.getElementById('sxp-render');
8852
8909
  const node = document.getElementById('pb-modal');
@@ -8957,12 +9014,17 @@
8957
9014
  onTouchStart: handleTouchStart,
8958
9015
  onTouchEnd: handleTouchEnd
8959
9016
  })),
8960
- React.createElement("div", { onClick: onClose, className: 'modal-icon-wrapper' },
9017
+ React.createElement("div", { className: 'modal-icon-wrapper', onClick: onClose, style: { top: scrollTop } },
8961
9018
  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' })),
8962
- React.createElement("div", { ref: ref, style: {
9019
+ React.createElement("div", Object.assign({ ref: ref, style: {
8963
9020
  height: isScrollFullScreen ? fullHeight : MODAL_DEF_CON_H,
8964
9021
  overflow: (isScrollFullScreen && modalTrans <= 0) || !isScrollFullScreen ? 'auto' : 'hidden'
8965
- } }, children)))))), modalEleRef.current);
9022
+ } }, (((_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.enableFixedCloseButton) && {
9023
+ onScroll: (e) => {
9024
+ var _a;
9025
+ setScrollTop(15 - ((_a = e === null || e === void 0 ? void 0 : e.target) === null || _a === void 0 ? void 0 : _a.scrollTop));
9026
+ }
9027
+ })), children)))))), modalEleRef.current);
8966
9028
  };
8967
9029
  var Modal$1 = React.memo(Modal);
8968
9030
 
@@ -9207,10 +9269,10 @@
9207
9269
  __html: setFontForText((_c = product === null || product === void 0 ? void 0 : product.taxInfo) !== null && _c !== void 0 ? _c : '税费', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.taxInfo)
9208
9270
  } }),
9209
9271
  React.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
9210
- React.createElement(ExpandableText$1, { foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, onClick: () => setShowModal(true), isPost: isPost, text: (_d = product === null || product === void 0 ? void 0 : product.info) !== null && _d !== void 0 ? _d : `The design inspiration of Tiffany Lock series comes from the power of connection and inclusiveness, and the
9211
- bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
9212
- collection is unisex and is inspired by the padlock pattern found in the Tiffany Antique Collection. This
9213
- necklace features a stylish and eye-catching oval clasp chain decorated with a lock pattern. Crafted from
9272
+ React.createElement(ExpandableText$1, { foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, onClick: () => setShowModal(true), isPost: isPost, text: (_d = product === null || product === void 0 ? void 0 : product.info) !== null && _d !== void 0 ? _d : `The design inspiration of Tiffany Lock series comes from the power of connection and inclusiveness, and the
9273
+ bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
9274
+ collection is unisex and is inspired by the padlock pattern found in the Tiffany Antique Collection. This
9275
+ necklace features a stylish and eye-catching oval clasp chain decorated with a lock pattern. Crafted from
9214
9276
  18-karat gold, this necklace is embellished with hand-set diamonds.`, maxStr: 79, className: 'pb-commondity-content-info', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.info }))));
9215
9277
  };
9216
9278
  const renderBtn = () => {
@@ -9259,7 +9321,17 @@
9259
9321
  clickableClass: getDotsAlign
9260
9322
  }, loop: true, autoplay: {
9261
9323
  delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
9262
- }, ref: ref },
9324
+ }, ref: ref, className: css.css(Object.assign(Object.assign({ '.swiper-pagination': Object.assign(Object.assign({}, ((swiper === null || swiper === void 0 ? void 0 : swiper.dotsMarginBottom) && { bottom: swiper === null || swiper === void 0 ? void 0 : swiper.dotsMarginBottom })), { fontSize: '14px' }) }, ((swiper === null || swiper === void 0 ? void 0 : swiper.dotsBgColor) && {
9325
+ '.swiper-pagination-bullet': {
9326
+ backgroundColor: swiper === null || swiper === void 0 ? void 0 : swiper.dotsBgColor,
9327
+ opacity: 1
9328
+ }
9329
+ })), ((swiper === null || swiper === void 0 ? void 0 : swiper.dotsActiveColor) && {
9330
+ '.swipe-item-active-bullet': {
9331
+ backgroundColor: `${swiper === null || swiper === void 0 ? void 0 : swiper.dotsActiveColor}!important`,
9332
+ opacity: 1
9333
+ }
9334
+ }))) },
9263
9335
  React.createElement(React.Fragment, null, (_x = product === null || product === void 0 ? void 0 : product.homePage) === null || _x === void 0 ? void 0 : _x.map((src) => {
9264
9336
  var _a;
9265
9337
  return (React.createElement(SwiperSlide, { key: src },
@@ -9648,7 +9720,7 @@
9648
9720
  * @Author: binruan@chatlabs.com
9649
9721
  * @Date: 2024-03-26 16:50:25
9650
9722
  * @LastEditors: binruan@chatlabs.com
9651
- * @LastEditTime: 2024-08-23 10:58:38
9723
+ * @LastEditTime: 2024-08-29 16:45:54
9652
9724
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetailDiroNew\settingRender.tsx
9653
9725
  *
9654
9726
  */
@@ -9963,6 +10035,37 @@
9963
10035
  name: ['props', 'iframeBgColor']
9964
10036
  }
9965
10037
  ]
10038
+ },
10039
+ {
10040
+ title: '轮播指示器',
10041
+ child: [
10042
+ {
10043
+ label: '背景色',
10044
+ name: ['props', 'swiper', 'dotsBgColor'],
10045
+ type: 'Color'
10046
+ },
10047
+ {
10048
+ label: '选中色',
10049
+ name: ['props', 'swiper', 'dotsActiveColor'],
10050
+ type: 'Color'
10051
+ },
10052
+ {
10053
+ label: '底边距',
10054
+ name: ['props', 'swiper', 'dotsMarginBottom'],
10055
+ type: 'Number',
10056
+ addonAfter: 'px'
10057
+ }
10058
+ ]
10059
+ },
10060
+ {
10061
+ title: '关闭按钮',
10062
+ child: [
10063
+ {
10064
+ label: '跟随弹窗滚动',
10065
+ type: 'Switch',
10066
+ name: ['props', 'enableFixedCloseButton']
10067
+ }
10068
+ ]
9966
10069
  }
9967
10070
  ];
9968
10071
 
@@ -10087,7 +10190,7 @@
10087
10190
  const productInfoText = ({ isPost }) => {
10088
10191
  return (React.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
10089
10192
  React.createElement(ExpandableText$1, { isPost: isPost, onClick: () => setShowModal(true), className: 'pb-commondityDiroNew-info', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.info, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (product === null || product === void 0 ? void 0 : product.info) ||
10090
- `Unveiled at the Spring-Summer 2023 fashion show, the Dior Toujours bag is distinguished by a casual and practical design. Crafted in black calfskin with Macrocannage topstitching, it showcases a spacious interior compartment with a matching pouch to organize essentials. Its leather strap closure keeps items secure while the D of the CD Lock closure twists to adjust the sides and enhance the bag's silhouette. The leather handles can be adjusted using the small notches in order to be able to carry the large bag by hand or wear it over the shoulder. CD Lock and strap closures D.I.O.R. charms Removable interior pouch Adjustable leather handles Dust bag included
10193
+ `Unveiled at the Spring-Summer 2023 fashion show, the Dior Toujours bag is distinguished by a casual and practical design. Crafted in black calfskin with Macrocannage topstitching, it showcases a spacious interior compartment with a matching pouch to organize essentials. Its leather strap closure keeps items secure while the D of the CD Lock closure twists to adjust the sides and enhance the bag's silhouette. The leather handles can be adjusted using the small notches in order to be able to carry the large bag by hand or wear it over the shoulder. CD Lock and strap closures D.I.O.R. charms Removable interior pouch Adjustable leather handles Dust bag included
10091
10194
  Made in Italy` })));
10092
10195
  };
10093
10196
  const getStyle = React.useCallback((style) => {
@@ -10125,11 +10228,21 @@ Made in Italy` })));
10125
10228
  React.createElement("div", { style: { position: 'relative' } },
10126
10229
  product && ((_w = product === null || product === void 0 ? void 0 : product.homePage) === null || _w === void 0 ? void 0 : _w.length) > 0 && (React.createElement(Swiper, { height: height, modules: [Pagination, Autoplay], pagination: {
10127
10230
  clickable: true,
10128
- bulletActiveClass: 'commondityDiroNew-swipe-item-active-bullet',
10231
+ bulletActiveClass: 'swipe-item-active-bullet',
10129
10232
  clickableClass: getDotsAlign
10130
10233
  }, loop: true, autoplay: {
10131
10234
  delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
10132
- }, ref: ref }, (_x = product === null || product === void 0 ? void 0 : product.homePage) === null || _x === void 0 ? void 0 : _x.map((src) => {
10235
+ }, ref: ref, className: css.css(Object.assign(Object.assign({ '.swiper-pagination': Object.assign(Object.assign({}, ((swiper === null || swiper === void 0 ? void 0 : swiper.dotsMarginBottom) && { bottom: swiper === null || swiper === void 0 ? void 0 : swiper.dotsMarginBottom })), { fontSize: '14px' }) }, ((swiper === null || swiper === void 0 ? void 0 : swiper.dotsBgColor) && {
10236
+ '.swiper-pagination-bullet': {
10237
+ backgroundColor: swiper === null || swiper === void 0 ? void 0 : swiper.dotsBgColor,
10238
+ opacity: 1
10239
+ }
10240
+ })), ((swiper === null || swiper === void 0 ? void 0 : swiper.dotsActiveColor) && {
10241
+ '.swipe-item-active-bullet': {
10242
+ backgroundColor: `${swiper === null || swiper === void 0 ? void 0 : swiper.dotsActiveColor}!important`,
10243
+ opacity: 1
10244
+ }
10245
+ }))) }, (_x = product === null || product === void 0 ? void 0 : product.homePage) === null || _x === void 0 ? void 0 : _x.map((src) => {
10133
10246
  var _a;
10134
10247
  return (React.createElement(SwiperSlide, { key: src },
10135
10248
  React.createElement("div", { style: {
@@ -10187,7 +10300,8 @@ Made in Italy` })));
10187
10300
  __html: setFontForText((_3 = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _3 !== void 0 ? _3 : 'Shop now', buttonStyle)
10188
10301
  } }))),
10189
10302
  productInfoText({ isPost }))),
10190
- React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) }, productInfoText({ isPost: false })),
10303
+ React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) },
10304
+ React.createElement("div", { style: { paddingTop: '20px' } }, productInfoText({ isPost: false }))),
10191
10305
  React.createElement(Modal$1, { visible: show3DModal, padding: 0, isFullScreen: true, onClose: () => setShow3DModal(false) },
10192
10306
  React.createElement("div", { style: { backgroundColor: iframeBgColor, height: '100%' } },
10193
10307
  React.createElement("iframe", { src: iframeUrl, style: {
@@ -15737,11 +15851,11 @@ Made in Italy` })));
15737
15851
  * @Author: lewinlu@chatlabs.com
15738
15852
  * @Date: 2024-01-03 14:39:09
15739
15853
  * @LastEditors: binruan@chatlabs.com
15740
- * @LastEditTime: 2024-07-02 18:25:17
15854
+ * @LastEditTime: 2024-08-29 18:03:12
15741
15855
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\PictureGroup\index.tsx
15742
15856
  */
15743
15857
  const PictureGroup$2 = ({ imgUrls, width, height, rec, index, onReportViewImageEnd, onViewImageStartEvent, imgUrlsPostConfig }) => {
15744
- var _a, _b;
15858
+ var _a;
15745
15859
  const ref = React.useRef();
15746
15860
  const { isActive } = useSwiperSlide();
15747
15861
  const { sxpParameter, openHashtag } = useSxpDataSource();
@@ -15771,11 +15885,17 @@ Made in Italy` })));
15771
15885
  return (React.createElement(Swiper, { ref: ref, defaultValue: 0, direction: 'horizontal', modules: [Pagination, Autoplay], pagination: {
15772
15886
  clickable: true,
15773
15887
  bulletActiveClass: 'swipe-item-active-bullet'
15774
- }, className: css.css(Object.assign({}, ((imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.marginBottom) && {
15775
- '.swiper-pagination': {
15776
- bottom: (_a = imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.marginBottom) !== null && _a !== void 0 ? _a : 0
15888
+ }, className: css.css(Object.assign(Object.assign({ '.swiper-pagination': Object.assign(Object.assign({}, ((imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.marginBottom) && { bottom: imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.marginBottom })), { fontSize: '14px' }) }, ((imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.dotsBgColor) && {
15889
+ '.swiper-pagination-bullet': {
15890
+ backgroundColor: imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.dotsBgColor,
15891
+ opacity: 1
15777
15892
  }
15778
- }))), height: height, loop: true, autoplay: { delay: ((_b = imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.delay) !== null && _b !== void 0 ? _b : 3) * 1000 } }, imgUrls === null || imgUrls === void 0 ? void 0 : imgUrls.map((url, index) => {
15893
+ })), ((imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.dotsActiveColor) && {
15894
+ '.swipe-item-active-bullet': {
15895
+ backgroundColor: `${imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.dotsActiveColor}!important`,
15896
+ opacity: 1
15897
+ }
15898
+ }))), height: height, loop: true, autoplay: { delay: ((_a = imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.delay) !== null && _a !== void 0 ? _a : 3) * 1000 } }, imgUrls === null || imgUrls === void 0 ? void 0 : imgUrls.map((url, index) => {
15779
15899
  return (React.createElement(SwiperSlide, { key: index },
15780
15900
  React.createElement(Picture, { src: !isLoad && index > 0 ? '' : url, height: height, imgUrlsPostConfig: imgUrlsPostConfig, onShowFirstImage: showFirstImageFn })));
15781
15901
  })));
@@ -16029,12 +16149,12 @@ Made in Italy` })));
16029
16149
  * @Author: binruan@chatlabs.com
16030
16150
  * @Date: 2024-01-15 19:03:09
16031
16151
  * @LastEditors: binruan@chatlabs.com
16032
- * @LastEditTime: 2024-08-23 14:04:14
16152
+ * @LastEditTime: 2024-08-29 11:23:41
16033
16153
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
16034
16154
  *
16035
16155
  */
16036
16156
  const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.innerHeight, containerWidth = window.innerWidth, tempMap, resolver, data = [], ctaType, tipText, nudge, _schema, hashTagStyle, tagList = [], licenseUrl }) => {
16037
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
16157
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
16038
16158
  const mutedIcon = useIconLink('/pb_static/5beaaa5ce7f3477b99db3838619cc471.png');
16039
16159
  const unmutedIcon = useIconLink('/pb_static/fea8668a8a894e4aa3a86bcc775e895e.png');
16040
16160
  const { schema } = useEditor();
@@ -16046,7 +16166,8 @@ Made in Italy` })));
16046
16166
  const [isShowMore, setIsShowMore] = React.useState(false);
16047
16167
  const [isReload, setIsReload] = React.useState(new Date().getTime());
16048
16168
  const skipLinkRef = React.useRef(false);
16049
- const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport, curTime, h5EnterLink, isShowConsent, selectTag, isPreview, isEditor, cacheRtcList, setRtcList, cacheActiveIndex, rtcList } = useSxpDataSource();
16169
+ const [pageNum, setPageNum] = React.useState(2);
16170
+ const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport, curTime, h5EnterLink, isShowConsent, selectTag, isPreview, isEditor, cacheRtcList, setRtcList, cacheActiveIndex, rtcList, isNoMoreData } = useSxpDataSource();
16050
16171
  const { backMainFeed, productView, jumpToWeb } = useEventReport();
16051
16172
  const isShowFingerTip = React.useMemo(() => {
16052
16173
  return data.length > 0 && !loading && (getFeUserId() || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enableSwiperTip));
@@ -16205,8 +16326,8 @@ Made in Italy` })));
16205
16326
  return null;
16206
16327
  }
16207
16328
  });
16208
- return !waterFallData ? list.concat([{ loading: true }]) : list;
16209
- }, [data, activeIndex, waterFallData, isEditor]);
16329
+ return !waterFallData && !isNoMoreData ? list.concat([{ loading: true }]) : list;
16330
+ }, [data, activeIndex, waterFallData, isEditor, isNoMoreData]);
16210
16331
  const renderLogo = React.useMemo(() => {
16211
16332
  var _a, _b, _c, _d;
16212
16333
  if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
@@ -16495,8 +16616,8 @@ Made in Italy` })));
16495
16616
  isReload,
16496
16617
  renderToggleButton
16497
16618
  ]);
16498
- return (React.createElement("div", { id: 'sxp-render', className: 'clc-sxp-container' },
16499
- 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: () => {
16619
+ return (React.createElement("div", { id: 'sxp-render', className: 'clc-sxp-container', style: { textUnderlineOffset: `${(_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.textUnderlineOffset) !== null && _a !== void 0 ? _a : 0}px` } },
16620
+ waterFallData && (React.createElement(Navbar$1, { icon: img, styles: { background: 'rgba(0,0,0,.3)', color: '#fff' }, textStyle: Object.assign(Object.assign({}, (_f = (_e = (_d = (_c = (_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.hashTag) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.item) === null || _d === void 0 ? void 0 : _d.props) === null || _e === void 0 ? void 0 : _e.textStyles) === null || _f === void 0 ? void 0 : _f.hashTagTitle), { color: '#fff' }), onClose: () => {
16500
16621
  const isEq = lodash.isEqual(rtcList, cacheRtcList);
16501
16622
  if (!isEq && cacheRtcList && (cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.length)) {
16502
16623
  setRtcList === null || setRtcList === void 0 ? void 0 : setRtcList(cacheRtcList);
@@ -16507,7 +16628,7 @@ Made in Italy` })));
16507
16628
  React.createElement(Tagbar$1, { tagList: tagList, setActiveIndex: setActiveIndex, style: {
16508
16629
  top: minusHeight
16509
16630
  } }),
16510
- 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,
16631
+ isShowFingerTip ? (React.createElement(FingerSwipeTip, { imageUrl: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipIcon, style: { top: `${50 - ((_g = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipOffset) !== null && _g !== void 0 ? _g : 0)}%` }, duration: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swiperTipAniDur })) : null,
16511
16632
  React.createElement(Swiper, { style: {
16512
16633
  marginTop: tagHeight
16513
16634
  }, ref: swiperRef, onSlideChange: () => {
@@ -16526,8 +16647,12 @@ Made in Italy` })));
16526
16647
  if ((swiper === null || swiper === void 0 ? void 0 : swiper.activeIndex) + 1 >= (data === null || data === void 0 ? void 0 : data.length)) {
16527
16648
  if (!isLoadMore) {
16528
16649
  setIsLoadMore(true);
16529
- loadVideos === null || loadVideos === void 0 ? void 0 : loadVideos(Math.ceil(activeIndex / 10) + 1).then(() => {
16650
+ loadVideos === null || loadVideos === void 0 ? void 0 : loadVideos(pageNum).then((res) => {
16651
+ var _a;
16530
16652
  setIsLoadMore(false);
16653
+ if (res && ((_a = res === null || res === void 0 ? void 0 : res.recList) === null || _a === void 0 ? void 0 : _a.length) > 0) {
16654
+ setPageNum((pageNum + 1));
16655
+ }
16531
16656
  });
16532
16657
  }
16533
16658
  }
@@ -16535,7 +16660,7 @@ Made in Italy` })));
16535
16660
  renderLikeButton(visList[activeIndex], activeIndex, !!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconFixed)),
16536
16661
  renderToggleButton(!!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed)),
16537
16662
  renderView),
16538
- 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))));
16663
+ 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))));
16539
16664
  };
16540
16665
 
16541
16666
  const PictureGroup = ({ imgUrls, width, height, imgUrlsPostConfig, rec, index }) => {