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/index.cjs CHANGED
@@ -657,6 +657,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
657
657
  const [selectTag, setSelectTag] = React.useState(DEFAULT_TAG);
658
658
  const checkCommodityIndexRef = React.useRef(-1);
659
659
  const popupCurTimeRef = React.useRef(null);
660
+ const [isNoMoreData, setIsNoMoreData] = React.useState(false);
660
661
  const isShowConsent = React.useMemo(() => {
661
662
  var _a, _b, _c, _d;
662
663
  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;
@@ -718,7 +719,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
718
719
  }, [bffDataSource]);
719
720
  // 获取推荐视频数据
720
721
  const getRecommendVideos = React.useCallback((query) => __awaiter(void 0, void 0, void 0, function* () {
721
- var _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
722
+ var _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
722
723
  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
724
  if (utmVal) {
724
725
  const val = (_h = (_g = (_f = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _f === void 0 ? void 0 : _f.filter((val) => {
@@ -728,9 +729,6 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
728
729
  })) === null || _g === void 0 ? void 0 : _g.join('&')) !== null && _h !== void 0 ? _h : '';
729
730
  query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(val) });
730
731
  }
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
732
  if (isEditor) {
735
733
  let pageNum = 1;
736
734
  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] }));
@@ -741,15 +739,15 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
741
739
  let list = [];
742
740
  let result = null;
743
741
  const recurveRecList = (query) => __awaiter(void 0, void 0, void 0, function* () {
744
- var _r, _s, _t, _u, _v, _w;
742
+ var _t, _u, _v, _w, _x, _y;
745
743
  query.pageNum = pageNum;
746
744
  result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/list', { method: 'GET', query }));
747
745
  if (!(result === null || result === void 0 ? void 0 : result.success)) {
748
746
  return undefined;
749
747
  }
750
748
  setLoading(false);
751
- 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));
752
749
  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 : []);
750
+ 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));
753
751
  if (isNotNullList) {
754
752
  pageNum = pageNum + 1;
755
753
  yield recurveRecList(query);
@@ -757,9 +755,12 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
757
755
  });
758
756
  yield recurveRecList(query);
759
757
  if (!(query === null || query === void 0 ? void 0 : query.hashTag) && result)
760
- 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 });
758
+ 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 });
761
759
  return Object.assign(Object.assign({}, result.data), { recList: list });
762
760
  }
761
+ if (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) {
762
+ 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 });
763
+ }
763
764
  const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/list', { method: 'GET', query }));
764
765
  if (!(result === null || result === void 0 ? void 0 : result.success)) {
765
766
  return undefined;
@@ -769,19 +770,24 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
769
770
  if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) && !isEditor) {
770
771
  let list = [];
771
772
  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 : []);
773
+ 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));
774
+ if (!isNotNullList) {
775
+ setIsNoMoreData(true);
776
+ }
772
777
  return Object.assign(Object.assign({}, result.data), { recList: list });
773
778
  }
774
779
  return result === null || result === void 0 ? void 0 : result.data;
775
780
  }), [bffFetch, utmVal, maxSize, defaultSize, channelQueryList]);
776
781
  const loadVideos = React.useCallback((pageNum) => __awaiter(void 0, void 0, void 0, function* () {
777
- var _x, _y, _z, _0;
782
+ var _z, _0, _1, _2;
778
783
  if (rtcList.length <= 0) {
779
784
  return;
780
785
  }
781
786
  const lastItem = rtcList === null || rtcList === void 0 ? void 0 : rtcList[(rtcList === null || rtcList === void 0 ? void 0 : rtcList.length) - 1];
782
- 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 })));
787
+ 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 })));
783
788
  setRtcList(rtcList.concat(getFilterRecList(data)));
784
789
  setCacheRtcList(cacheRtcList.concat(getFilterRecList(data)));
790
+ return data;
785
791
  }), [getRecommendVideos, rtcList, waterFallData, cacheRtcList]);
786
792
  const bffEventReport = React.useCallback(({ userInfo, eventInfo }) => {
787
793
  // 关闭 BFF 事件上报
@@ -826,7 +832,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
826
832
  eventName,
827
833
  actionSource,
828
834
  eventSourceUrl,
829
- 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 : '' })
835
+ 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 : '' })
830
836
  },
831
837
  type: 'beacon'
832
838
  });
@@ -845,17 +851,17 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
845
851
  }), [bffFetch]);
846
852
  // 获取 Tag
847
853
  const bffGetTagList = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
848
- var _1, _2, _3, _4, _5;
854
+ var _3, _4, _5, _6, _7;
849
855
  if (!utmVal || !isShowTag)
850
856
  return;
851
857
  try {
852
- const val = (_3 = (_2 = (_1 = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _1 === void 0 ? void 0 : _1.filter((val) => {
858
+ const val = (_5 = (_4 = (_3 = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _3 === void 0 ? void 0 : _3.filter((val) => {
853
859
  var _a, _b;
854
860
  const key = val.split('=')[0];
855
861
  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);
856
- })) === null || _2 === void 0 ? void 0 : _2.join('&')) !== null && _3 !== void 0 ? _3 : '';
862
+ })) === null || _4 === void 0 ? void 0 : _4.join('&')) !== null && _5 !== void 0 ? _5 : '';
857
863
  const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/tag/list', { method: 'GET', query: { channel: decodeURIComponent(val) } }));
858
- 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 : []);
864
+ 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 : []);
859
865
  }
860
866
  catch (e) {
861
867
  console.log('e', e);
@@ -1002,7 +1008,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1002
1008
  globalConfig,
1003
1009
  popupCurTimeRef,
1004
1010
  checkCommodityIndexRef,
1005
- isEditor
1011
+ isEditor,
1012
+ isNoMoreData
1006
1013
  } }, 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({
1007
1014
  rtcList,
1008
1015
  mutateLike: bffMutateLike,
@@ -1445,14 +1452,14 @@ var settingRender$a = [
1445
1452
  * @Author: binruan@chatlabs.com
1446
1453
  * @Date: 2024-03-12 10:59:06
1447
1454
  * @LastEditors: binruan@chatlabs.com
1448
- * @LastEditTime: 2024-08-22 17:43:04
1455
+ * @LastEditTime: 2024-08-28 17:51:37
1449
1456
  * @FilePath: \pb-sxp-ui\src\core\hooks\useEventReport.ts
1450
1457
  *
1451
1458
  */
1452
1459
  function useEventReport() {
1453
1460
  const { bffEventReport, popupDetailData, waterFallData, isFromHashtag } = useSxpDataSource();
1454
1461
  const jumpToWeb = React.useCallback((data, product, cta, position, traceInfo) => {
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;
1462
+ 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;
1456
1463
  let fromKName = '';
1457
1464
  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))) {
1458
1465
  fromKName = 'pdpPage';
@@ -1470,22 +1477,15 @@ function useEventReport() {
1470
1477
  fromKName = 'productPage';
1471
1478
  }
1472
1479
  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;
1480
+ let contentFormat = null;
1481
+ if ((_r = data === null || data === void 0 ? void 0 : data.video) === null || _r === void 0 ? void 0 : _r.url) {
1482
+ contentFormat = 'video';
1483
+ }
1484
+ 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)) {
1485
+ contentFormat = 'image';
1486
+ }
1473
1487
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
1474
- eventInfo: {
1475
- eventSubject: 'jumpToWeb',
1476
- eventDescription: 'User jumped to website',
1477
- productId: (_r = product === null || product === void 0 ? void 0 : product.itemId) !== null && _r !== void 0 ? _r : '',
1478
- productName: (_s = product === null || product === void 0 ? void 0 : product.title) !== null && _s !== void 0 ? _s : '',
1479
- price: (product === null || product === void 0 ? void 0 : product.price) ? (product === null || product === void 0 ? void 0 : product.price) + '' : '0',
1480
- productCollection: (_t = product === null || product === void 0 ? void 0 : product.collection) !== null && _t !== void 0 ? _t : '',
1481
- fromKName,
1482
- fromKPage: location === null || location === void 0 ? void 0 : location.href,
1483
- contentTags: contentTags ? JSON.stringify(contentTags) : '',
1484
- position: position + '',
1485
- 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 : '',
1486
- ctatId: (_w = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _w !== void 0 ? _w : '',
1487
- 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 : ''
1488
- }
1488
+ 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 }))
1489
1489
  });
1490
1490
  }, [bffEventReport, popupDetailData, isFromHashtag]);
1491
1491
  const productView = React.useCallback((data, product, cta, viewTime, position) => {
@@ -1540,22 +1540,25 @@ function useEventReport() {
1540
1540
  * @Author: binruan@chatlabs.com
1541
1541
  * @Date: 2024-06-27 16:22:34
1542
1542
  * @LastEditors: binruan@chatlabs.com
1543
- * @LastEditTime: 2024-07-05 14:55:25
1543
+ * @LastEditTime: 2024-08-27 16:59:46
1544
1544
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\AppointForm\Form.tsx
1545
1545
  *
1546
1546
  */
1547
1547
  const Form = ({ layout, columns, onChange }) => {
1548
1548
  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' } },
1549
1549
  layout !== 'inline' && React.createElement("label", { className: 'pb-appoint-form-container-label' }, item === null || item === void 0 ? void 0 : item.title),
1550
- (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 })))))))));
1550
+ (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 })))))))));
1551
1551
  };
1552
1552
  var Form$1 = React.memo(Form);
1553
1553
 
1554
1554
  const AppointForm$1 = (_a) => {
1555
+ var _b, _c;
1555
1556
  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"]);
1556
1557
  const { submitForm, popupDetailData } = useSxpDataSource();
1557
1558
  const { jumpToWeb } = useEventReport();
1558
1559
  const [loading, setLoading] = React.useState(false);
1560
+ const [formData, setFormData] = React.useState({});
1561
+ const [marginTop, setMarginTop] = React.useState(0);
1559
1562
  const defaultColumns = React.useMemo(() => [
1560
1563
  {
1561
1564
  title: '',
@@ -1582,7 +1585,7 @@ const AppointForm$1 = (_a) => {
1582
1585
  key: '4'
1583
1586
  }
1584
1587
  ], []);
1585
- const [formData, setFormData] = React.useState({});
1588
+ 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);
1586
1589
  const columnsData = React.useMemo(() => {
1587
1590
  return lodash.cloneDeep(columns) || defaultColumns;
1588
1591
  }, [columns, defaultColumns]);
@@ -1591,17 +1594,17 @@ const AppointForm$1 = (_a) => {
1591
1594
  setFormData(Object.assign(Object.assign({}, formData), { [name]: value }));
1592
1595
  }, [formData]);
1593
1596
  const handleSubmit = lodash.debounce(() => __awaiter(void 0, void 0, void 0, function* () {
1594
- var _b, _c, _d, _e, _f;
1597
+ var _d, _e, _f, _g, _h;
1595
1598
  const vals = formData;
1596
1599
  if (!vals)
1597
1600
  return;
1598
- const arr = (_c = (_b = Object.keys(vals)) === null || _b === void 0 ? void 0 : _b.map((key) => {
1601
+ const arr = (_e = (_d = Object.keys(vals)) === null || _d === void 0 ? void 0 : _d.map((key) => {
1599
1602
  var _a;
1600
1603
  return ({
1601
1604
  name: key,
1602
1605
  value: (_a = vals[key]) !== null && _a !== void 0 ? _a : ''
1603
1606
  });
1604
- })) === null || _c === void 0 ? void 0 : _c.filter((item) => item === null || item === void 0 ? void 0 : item.value);
1607
+ })) === null || _e === void 0 ? void 0 : _e.filter((item) => item === null || item === void 0 ? void 0 : item.value);
1605
1608
  if (!arr || !(arr === null || arr === void 0 ? void 0 : arr.length))
1606
1609
  return;
1607
1610
  setLoading(true);
@@ -1610,8 +1613,8 @@ const AppointForm$1 = (_a) => {
1610
1613
  if (res) {
1611
1614
  if (isExternalLink) {
1612
1615
  const data = popupDetailData;
1613
- const product = (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.bindProduct;
1614
- 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;
1616
+ const product = (_f = data === null || data === void 0 ? void 0 : data.video) === null || _f === void 0 ? void 0 : _f.bindProduct;
1617
+ 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;
1615
1618
  const position = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
1616
1619
  jumpToWeb(data, product, cta, position);
1617
1620
  }
@@ -1621,11 +1624,33 @@ const AppointForm$1 = (_a) => {
1621
1624
  onClick === null || onClick === void 0 ? void 0 : onClick();
1622
1625
  }
1623
1626
  }), 1000);
1627
+ React.useEffect(() => {
1628
+ const handleScroll = () => {
1629
+ var _a, _b;
1630
+ // 获取用户代理字符串
1631
+ const userAgent = navigator.userAgent;
1632
+ // 判断是否是安卓设备
1633
+ const isAndroid = userAgent.toLowerCase().includes('android');
1634
+ if (!isAndroid)
1635
+ return;
1636
+ 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);
1637
+ if (resizeHeight < originalHeight) {
1638
+ setMarginTop(50);
1639
+ }
1640
+ else {
1641
+ setMarginTop(0);
1642
+ }
1643
+ };
1644
+ window.addEventListener('resize', handleScroll);
1645
+ return () => {
1646
+ window.removeEventListener('resize', handleScroll);
1647
+ };
1648
+ }, []);
1624
1649
  return (React.createElement("div", { className: 'pb-appoint-form' },
1625
1650
  React.createElement("div", { className: `pb-appoint-form-title ${css.css(Object.assign({}, textStyle))}`, dangerouslySetInnerHTML: {
1626
1651
  __html: setFontForText(title, textStyle)
1627
1652
  } }),
1628
- React.createElement("div", Object.assign({ className: css.css(Object.assign({}, style)) }, props),
1653
+ React.createElement("div", Object.assign({ className: css.css(Object.assign(Object.assign({}, style), { marginTop })) }, props),
1629
1654
  React.createElement("div", { className: 'pb-appoint-form-container' },
1630
1655
  React.createElement(Form$1, { columns: columnsData, layout: layoutType, onChange: handleChange }))),
1631
1656
  React.createElement("div", { className: 'pb-appoint-form-btn-wrapper' },
@@ -2007,6 +2032,37 @@ var settingRender$9 = [
2007
2032
  name: ['props', 'iframeBgColor']
2008
2033
  }
2009
2034
  ]
2035
+ },
2036
+ {
2037
+ title: '轮播指示器',
2038
+ child: [
2039
+ {
2040
+ label: '背景色',
2041
+ name: ['props', 'swiper', 'dotsBgColor'],
2042
+ type: 'Color'
2043
+ },
2044
+ {
2045
+ label: '选中色',
2046
+ name: ['props', 'swiper', 'dotsActiveColor'],
2047
+ type: 'Color'
2048
+ },
2049
+ {
2050
+ label: '底边距',
2051
+ name: ['props', 'swiper', 'dotsMarginBottom'],
2052
+ type: 'Number',
2053
+ addonAfter: 'px'
2054
+ }
2055
+ ]
2056
+ },
2057
+ {
2058
+ title: '关闭按钮',
2059
+ child: [
2060
+ {
2061
+ label: '跟随弹窗滚动',
2062
+ type: 'Switch',
2063
+ name: ['props', 'enableFixedCloseButton']
2064
+ }
2065
+ ]
2010
2066
  }
2011
2067
  ];
2012
2068
 
@@ -8836,13 +8892,13 @@ SwiperSlide.displayName = 'SwiperSlide';
8836
8892
  * @Author: binruan@chatlabs.com
8837
8893
  * @Date: 2023-11-02 18:34:34
8838
8894
  * @LastEditors: binruan@chatlabs.com
8839
- * @LastEditTime: 2024-08-22 18:48:44
8895
+ * @LastEditTime: 2024-08-29 16:40:25
8840
8896
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Modal\index.tsx
8841
8897
  *
8842
8898
  */
8843
8899
  const closeIcon$1 = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII=';
8844
8900
  const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema, fullHeight = window.innerHeight, isFullScreen = false }) => {
8845
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
8901
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
8846
8902
  const touchRef = React.useRef(null);
8847
8903
  const fTouchRef = React.useRef(null);
8848
8904
  const touchMoveRef = React.useRef(null);
@@ -8854,6 +8910,7 @@ const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema,
8854
8910
  const modalEleRef = React.useRef(null);
8855
8911
  const { globalConfig, popupDetailData } = useSxpDataSource();
8856
8912
  const { schema: _schema } = useEditor();
8913
+ const [scrollTop, setScrollTop] = React.useState(15);
8857
8914
  React.useEffect(() => {
8858
8915
  const parentNode = document.getElementById('sxp-render');
8859
8916
  const node = document.getElementById('pb-modal');
@@ -8964,12 +9021,17 @@ const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema,
8964
9021
  onTouchStart: handleTouchStart,
8965
9022
  onTouchEnd: handleTouchEnd
8966
9023
  })),
8967
- React.createElement("div", { onClick: onClose, className: 'modal-icon-wrapper' },
9024
+ React.createElement("div", { className: 'modal-icon-wrapper', onClick: onClose, style: { top: scrollTop } },
8968
9025
  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' })),
8969
- React.createElement("div", { ref: ref, style: {
9026
+ React.createElement("div", Object.assign({ ref: ref, style: {
8970
9027
  height: isScrollFullScreen ? fullHeight : MODAL_DEF_CON_H,
8971
9028
  overflow: (isScrollFullScreen && modalTrans <= 0) || !isScrollFullScreen ? 'auto' : 'hidden'
8972
- } }, children)))))), modalEleRef.current);
9029
+ } }, (((_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) && {
9030
+ onScroll: (e) => {
9031
+ var _a;
9032
+ setScrollTop(15 - ((_a = e === null || e === void 0 ? void 0 : e.target) === null || _a === void 0 ? void 0 : _a.scrollTop));
9033
+ }
9034
+ })), children)))))), modalEleRef.current);
8973
9035
  };
8974
9036
  var Modal$1 = React.memo(Modal);
8975
9037
 
@@ -9214,10 +9276,10 @@ const CommodityDetail$1 = (_a) => {
9214
9276
  __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)
9215
9277
  } }),
9216
9278
  React.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
9217
- 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
9218
- bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
9219
- collection is unisex and is inspired by the padlock pattern found in the Tiffany Antique Collection. This
9220
- necklace features a stylish and eye-catching oval clasp chain decorated with a lock pattern. Crafted from
9279
+ 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
9280
+ bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
9281
+ collection is unisex and is inspired by the padlock pattern found in the Tiffany Antique Collection. This
9282
+ necklace features a stylish and eye-catching oval clasp chain decorated with a lock pattern. Crafted from
9221
9283
  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 }))));
9222
9284
  };
9223
9285
  const renderBtn = () => {
@@ -9266,7 +9328,17 @@ const CommodityDetail$1 = (_a) => {
9266
9328
  clickableClass: getDotsAlign
9267
9329
  }, loop: true, autoplay: {
9268
9330
  delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
9269
- }, ref: ref },
9331
+ }, 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) && {
9332
+ '.swiper-pagination-bullet': {
9333
+ backgroundColor: swiper === null || swiper === void 0 ? void 0 : swiper.dotsBgColor,
9334
+ opacity: 1
9335
+ }
9336
+ })), ((swiper === null || swiper === void 0 ? void 0 : swiper.dotsActiveColor) && {
9337
+ '.swipe-item-active-bullet': {
9338
+ backgroundColor: `${swiper === null || swiper === void 0 ? void 0 : swiper.dotsActiveColor}!important`,
9339
+ opacity: 1
9340
+ }
9341
+ }))) },
9270
9342
  React.createElement(React.Fragment, null, (_x = product === null || product === void 0 ? void 0 : product.homePage) === null || _x === void 0 ? void 0 : _x.map((src) => {
9271
9343
  var _a;
9272
9344
  return (React.createElement(SwiperSlide, { key: src },
@@ -9655,7 +9727,7 @@ const Prompt = createMaterial(PromptComponent, {
9655
9727
  * @Author: binruan@chatlabs.com
9656
9728
  * @Date: 2024-03-26 16:50:25
9657
9729
  * @LastEditors: binruan@chatlabs.com
9658
- * @LastEditTime: 2024-08-23 10:58:38
9730
+ * @LastEditTime: 2024-08-29 16:45:54
9659
9731
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetailDiroNew\settingRender.tsx
9660
9732
  *
9661
9733
  */
@@ -9970,6 +10042,37 @@ var settingRender$7 = [
9970
10042
  name: ['props', 'iframeBgColor']
9971
10043
  }
9972
10044
  ]
10045
+ },
10046
+ {
10047
+ title: '轮播指示器',
10048
+ child: [
10049
+ {
10050
+ label: '背景色',
10051
+ name: ['props', 'swiper', 'dotsBgColor'],
10052
+ type: 'Color'
10053
+ },
10054
+ {
10055
+ label: '选中色',
10056
+ name: ['props', 'swiper', 'dotsActiveColor'],
10057
+ type: 'Color'
10058
+ },
10059
+ {
10060
+ label: '底边距',
10061
+ name: ['props', 'swiper', 'dotsMarginBottom'],
10062
+ type: 'Number',
10063
+ addonAfter: 'px'
10064
+ }
10065
+ ]
10066
+ },
10067
+ {
10068
+ title: '关闭按钮',
10069
+ child: [
10070
+ {
10071
+ label: '跟随弹窗滚动',
10072
+ type: 'Switch',
10073
+ name: ['props', 'enableFixedCloseButton']
10074
+ }
10075
+ ]
9973
10076
  }
9974
10077
  ];
9975
10078
 
@@ -10094,7 +10197,7 @@ const CommodityDetailDiroNew$1 = (_a) => {
10094
10197
  const productInfoText = ({ isPost }) => {
10095
10198
  return (React.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
10096
10199
  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) ||
10097
- `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
10200
+ `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
10098
10201
  Made in Italy` })));
10099
10202
  };
10100
10203
  const getStyle = React.useCallback((style) => {
@@ -10132,11 +10235,21 @@ Made in Italy` })));
10132
10235
  React.createElement("div", { style: { position: 'relative' } },
10133
10236
  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: {
10134
10237
  clickable: true,
10135
- bulletActiveClass: 'commondityDiroNew-swipe-item-active-bullet',
10238
+ bulletActiveClass: 'swipe-item-active-bullet',
10136
10239
  clickableClass: getDotsAlign
10137
10240
  }, loop: true, autoplay: {
10138
10241
  delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
10139
- }, ref: ref }, (_x = product === null || product === void 0 ? void 0 : product.homePage) === null || _x === void 0 ? void 0 : _x.map((src) => {
10242
+ }, 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) && {
10243
+ '.swiper-pagination-bullet': {
10244
+ backgroundColor: swiper === null || swiper === void 0 ? void 0 : swiper.dotsBgColor,
10245
+ opacity: 1
10246
+ }
10247
+ })), ((swiper === null || swiper === void 0 ? void 0 : swiper.dotsActiveColor) && {
10248
+ '.swipe-item-active-bullet': {
10249
+ backgroundColor: `${swiper === null || swiper === void 0 ? void 0 : swiper.dotsActiveColor}!important`,
10250
+ opacity: 1
10251
+ }
10252
+ }))) }, (_x = product === null || product === void 0 ? void 0 : product.homePage) === null || _x === void 0 ? void 0 : _x.map((src) => {
10140
10253
  var _a;
10141
10254
  return (React.createElement(SwiperSlide, { key: src },
10142
10255
  React.createElement("div", { style: {
@@ -10194,7 +10307,8 @@ Made in Italy` })));
10194
10307
  __html: setFontForText((_3 = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _3 !== void 0 ? _3 : 'Shop now', buttonStyle)
10195
10308
  } }))),
10196
10309
  productInfoText({ isPost }))),
10197
- React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) }, productInfoText({ isPost: false })),
10310
+ React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) },
10311
+ React.createElement("div", { style: { paddingTop: '20px' } }, productInfoText({ isPost: false }))),
10198
10312
  React.createElement(Modal$1, { visible: show3DModal, padding: 0, isFullScreen: true, onClose: () => setShow3DModal(false) },
10199
10313
  React.createElement("div", { style: { backgroundColor: iframeBgColor, height: '100%' } },
10200
10314
  React.createElement("iframe", { src: iframeUrl, style: {
@@ -15744,11 +15858,11 @@ const Picture = (props) => {
15744
15858
  * @Author: lewinlu@chatlabs.com
15745
15859
  * @Date: 2024-01-03 14:39:09
15746
15860
  * @LastEditors: binruan@chatlabs.com
15747
- * @LastEditTime: 2024-07-02 18:25:17
15861
+ * @LastEditTime: 2024-08-29 18:03:12
15748
15862
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\PictureGroup\index.tsx
15749
15863
  */
15750
15864
  const PictureGroup$2 = ({ imgUrls, width, height, rec, index, onReportViewImageEnd, onViewImageStartEvent, imgUrlsPostConfig }) => {
15751
- var _a, _b;
15865
+ var _a;
15752
15866
  const ref = React.useRef();
15753
15867
  const { isActive } = useSwiperSlide();
15754
15868
  const { sxpParameter, openHashtag } = useSxpDataSource();
@@ -15778,11 +15892,17 @@ const PictureGroup$2 = ({ imgUrls, width, height, rec, index, onReportViewImageE
15778
15892
  return (React.createElement(Swiper, { ref: ref, defaultValue: 0, direction: 'horizontal', modules: [Pagination, Autoplay], pagination: {
15779
15893
  clickable: true,
15780
15894
  bulletActiveClass: 'swipe-item-active-bullet'
15781
- }, className: css.css(Object.assign({}, ((imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.marginBottom) && {
15782
- '.swiper-pagination': {
15783
- bottom: (_a = imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.marginBottom) !== null && _a !== void 0 ? _a : 0
15895
+ }, 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) && {
15896
+ '.swiper-pagination-bullet': {
15897
+ backgroundColor: imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.dotsBgColor,
15898
+ opacity: 1
15784
15899
  }
15785
- }))), 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) => {
15900
+ })), ((imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.dotsActiveColor) && {
15901
+ '.swipe-item-active-bullet': {
15902
+ backgroundColor: `${imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.dotsActiveColor}!important`,
15903
+ opacity: 1
15904
+ }
15905
+ }))), 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) => {
15786
15906
  return (React.createElement(SwiperSlide, { key: index },
15787
15907
  React.createElement(Picture, { src: !isLoad && index > 0 ? '' : url, height: height, imgUrlsPostConfig: imgUrlsPostConfig, onShowFirstImage: showFirstImageFn })));
15788
15908
  })));
@@ -16036,12 +16156,12 @@ var Tagbar$1 = React.memo(Tagbar);
16036
16156
  * @Author: binruan@chatlabs.com
16037
16157
  * @Date: 2024-01-15 19:03:09
16038
16158
  * @LastEditors: binruan@chatlabs.com
16039
- * @LastEditTime: 2024-08-23 14:04:14
16159
+ * @LastEditTime: 2024-08-29 11:23:41
16040
16160
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
16041
16161
  *
16042
16162
  */
16043
16163
  const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.innerHeight, containerWidth = window.innerWidth, tempMap, resolver, data = [], ctaType, tipText, nudge, _schema, hashTagStyle, tagList = [], licenseUrl }) => {
16044
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
16164
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
16045
16165
  const mutedIcon = useIconLink('/pb_static/5beaaa5ce7f3477b99db3838619cc471.png');
16046
16166
  const unmutedIcon = useIconLink('/pb_static/fea8668a8a894e4aa3a86bcc775e895e.png');
16047
16167
  const { schema } = useEditor();
@@ -16053,7 +16173,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
16053
16173
  const [isShowMore, setIsShowMore] = React.useState(false);
16054
16174
  const [isReload, setIsReload] = React.useState(new Date().getTime());
16055
16175
  const skipLinkRef = React.useRef(false);
16056
- 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();
16176
+ const [pageNum, setPageNum] = React.useState(2);
16177
+ 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();
16057
16178
  const { backMainFeed, productView, jumpToWeb } = useEventReport();
16058
16179
  const isShowFingerTip = React.useMemo(() => {
16059
16180
  return data.length > 0 && !loading && (getFeUserId() || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enableSwiperTip));
@@ -16212,8 +16333,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
16212
16333
  return null;
16213
16334
  }
16214
16335
  });
16215
- return !waterFallData ? list.concat([{ loading: true }]) : list;
16216
- }, [data, activeIndex, waterFallData, isEditor]);
16336
+ return !waterFallData && !isNoMoreData ? list.concat([{ loading: true }]) : list;
16337
+ }, [data, activeIndex, waterFallData, isEditor, isNoMoreData]);
16217
16338
  const renderLogo = React.useMemo(() => {
16218
16339
  var _a, _b, _c, _d;
16219
16340
  if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
@@ -16502,8 +16623,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
16502
16623
  isReload,
16503
16624
  renderToggleButton
16504
16625
  ]);
16505
- return (React.createElement("div", { id: 'sxp-render', className: 'clc-sxp-container' },
16506
- 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: () => {
16626
+ 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` } },
16627
+ 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: () => {
16507
16628
  const isEq = lodash.isEqual(rtcList, cacheRtcList);
16508
16629
  if (!isEq && cacheRtcList && (cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.length)) {
16509
16630
  setRtcList === null || setRtcList === void 0 ? void 0 : setRtcList(cacheRtcList);
@@ -16514,7 +16635,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
16514
16635
  React.createElement(Tagbar$1, { tagList: tagList, setActiveIndex: setActiveIndex, style: {
16515
16636
  top: minusHeight
16516
16637
  } }),
16517
- 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,
16638
+ 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,
16518
16639
  React.createElement(Swiper, { style: {
16519
16640
  marginTop: tagHeight
16520
16641
  }, ref: swiperRef, onSlideChange: () => {
@@ -16533,8 +16654,12 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
16533
16654
  if ((swiper === null || swiper === void 0 ? void 0 : swiper.activeIndex) + 1 >= (data === null || data === void 0 ? void 0 : data.length)) {
16534
16655
  if (!isLoadMore) {
16535
16656
  setIsLoadMore(true);
16536
- loadVideos === null || loadVideos === void 0 ? void 0 : loadVideos(Math.ceil(activeIndex / 10) + 1).then(() => {
16657
+ loadVideos === null || loadVideos === void 0 ? void 0 : loadVideos(pageNum).then((res) => {
16658
+ var _a;
16537
16659
  setIsLoadMore(false);
16660
+ if (res && ((_a = res === null || res === void 0 ? void 0 : res.recList) === null || _a === void 0 ? void 0 : _a.length) > 0) {
16661
+ setPageNum((pageNum + 1));
16662
+ }
16538
16663
  });
16539
16664
  }
16540
16665
  }
@@ -16542,7 +16667,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
16542
16667
  renderLikeButton(visList[activeIndex], activeIndex, !!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconFixed)),
16543
16668
  renderToggleButton(!!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed)),
16544
16669
  renderView),
16545
- 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))));
16670
+ 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))));
16546
16671
  };
16547
16672
 
16548
16673
  const PictureGroup = ({ imgUrls, width, height, imgUrlsPostConfig, rec, index }) => {