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.js CHANGED
@@ -635,6 +635,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
635
635
  const [selectTag, setSelectTag] = useState(DEFAULT_TAG);
636
636
  const checkCommodityIndexRef = useRef(-1);
637
637
  const popupCurTimeRef = useRef(null);
638
+ const [isNoMoreData, setIsNoMoreData] = useState(false);
638
639
  const isShowConsent = useMemo(() => {
639
640
  var _a, _b, _c, _d;
640
641
  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;
@@ -696,7 +697,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
696
697
  }, [bffDataSource]);
697
698
  // 获取推荐视频数据
698
699
  const getRecommendVideos = useCallback((query) => __awaiter(void 0, void 0, void 0, function* () {
699
- var _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
700
+ var _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
700
701
  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 });
701
702
  if (utmVal) {
702
703
  const val = (_h = (_g = (_f = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _f === void 0 ? void 0 : _f.filter((val) => {
@@ -706,9 +707,6 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
706
707
  })) === null || _g === void 0 ? void 0 : _g.join('&')) !== null && _h !== void 0 ? _h : '';
707
708
  query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(val) });
708
709
  }
709
- if (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) {
710
- 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 });
711
- }
712
710
  if (isEditor) {
713
711
  let pageNum = 1;
714
712
  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] }));
@@ -719,15 +717,15 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
719
717
  let list = [];
720
718
  let result = null;
721
719
  const recurveRecList = (query) => __awaiter(void 0, void 0, void 0, function* () {
722
- var _r, _s, _t, _u, _v, _w;
720
+ var _t, _u, _v, _w, _x, _y;
723
721
  query.pageNum = pageNum;
724
722
  result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/list', { method: 'GET', query }));
725
723
  if (!(result === null || result === void 0 ? void 0 : result.success)) {
726
724
  return undefined;
727
725
  }
728
726
  setLoading(false);
729
- 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));
730
727
  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 : []);
728
+ 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));
731
729
  if (isNotNullList) {
732
730
  pageNum = pageNum + 1;
733
731
  yield recurveRecList(query);
@@ -735,9 +733,12 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
735
733
  });
736
734
  yield recurveRecList(query);
737
735
  if (!(query === null || query === void 0 ? void 0 : query.hashTag) && result)
738
- 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 });
736
+ 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 });
739
737
  return Object.assign(Object.assign({}, result.data), { recList: list });
740
738
  }
739
+ if (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) {
740
+ 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 });
741
+ }
741
742
  const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/list', { method: 'GET', query }));
742
743
  if (!(result === null || result === void 0 ? void 0 : result.success)) {
743
744
  return undefined;
@@ -747,19 +748,24 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
747
748
  if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) && !isEditor) {
748
749
  let list = [];
749
750
  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 : []);
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.some((item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video));
752
+ if (!isNotNullList) {
753
+ setIsNoMoreData(true);
754
+ }
750
755
  return Object.assign(Object.assign({}, result.data), { recList: list });
751
756
  }
752
757
  return result === null || result === void 0 ? void 0 : result.data;
753
758
  }), [bffFetch, utmVal, maxSize, defaultSize, channelQueryList]);
754
759
  const loadVideos = useCallback((pageNum) => __awaiter(void 0, void 0, void 0, function* () {
755
- var _x, _y, _z, _0;
760
+ var _z, _0, _1, _2;
756
761
  if (rtcList.length <= 0) {
757
762
  return;
758
763
  }
759
764
  const lastItem = rtcList === null || rtcList === void 0 ? void 0 : rtcList[(rtcList === null || rtcList === void 0 ? void 0 : rtcList.length) - 1];
760
- 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 })));
765
+ 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 })));
761
766
  setRtcList(rtcList.concat(getFilterRecList(data)));
762
767
  setCacheRtcList(cacheRtcList.concat(getFilterRecList(data)));
768
+ return data;
763
769
  }), [getRecommendVideos, rtcList, waterFallData, cacheRtcList]);
764
770
  const bffEventReport = useCallback(({ userInfo, eventInfo }) => {
765
771
  // 关闭 BFF 事件上报
@@ -804,7 +810,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
804
810
  eventName,
805
811
  actionSource,
806
812
  eventSourceUrl,
807
- 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 : '' })
813
+ 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 : '' })
808
814
  },
809
815
  type: 'beacon'
810
816
  });
@@ -823,17 +829,17 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
823
829
  }), [bffFetch]);
824
830
  // 获取 Tag
825
831
  const bffGetTagList = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
826
- var _1, _2, _3, _4, _5;
832
+ var _3, _4, _5, _6, _7;
827
833
  if (!utmVal || !isShowTag)
828
834
  return;
829
835
  try {
830
- const val = (_3 = (_2 = (_1 = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _1 === void 0 ? void 0 : _1.filter((val) => {
836
+ const val = (_5 = (_4 = (_3 = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _3 === void 0 ? void 0 : _3.filter((val) => {
831
837
  var _a, _b;
832
838
  const key = val.split('=')[0];
833
839
  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);
834
- })) === null || _2 === void 0 ? void 0 : _2.join('&')) !== null && _3 !== void 0 ? _3 : '';
840
+ })) === null || _4 === void 0 ? void 0 : _4.join('&')) !== null && _5 !== void 0 ? _5 : '';
835
841
  const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/tag/list', { method: 'GET', query: { channel: decodeURIComponent(val) } }));
836
- 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 : []);
842
+ 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 : []);
837
843
  }
838
844
  catch (e) {
839
845
  console.log('e', e);
@@ -980,7 +986,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
980
986
  globalConfig,
981
987
  popupCurTimeRef,
982
988
  checkCommodityIndexRef,
983
- isEditor
989
+ isEditor,
990
+ isNoMoreData
984
991
  } }, 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({
985
992
  rtcList,
986
993
  mutateLike: bffMutateLike,
@@ -1423,14 +1430,14 @@ var settingRender$a = [
1423
1430
  * @Author: binruan@chatlabs.com
1424
1431
  * @Date: 2024-03-12 10:59:06
1425
1432
  * @LastEditors: binruan@chatlabs.com
1426
- * @LastEditTime: 2024-08-22 17:43:04
1433
+ * @LastEditTime: 2024-08-28 17:51:37
1427
1434
  * @FilePath: \pb-sxp-ui\src\core\hooks\useEventReport.ts
1428
1435
  *
1429
1436
  */
1430
1437
  function useEventReport() {
1431
1438
  const { bffEventReport, popupDetailData, waterFallData, isFromHashtag } = useSxpDataSource();
1432
1439
  const jumpToWeb = useCallback((data, product, cta, position, traceInfo) => {
1433
- 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;
1440
+ 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;
1434
1441
  let fromKName = '';
1435
1442
  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))) {
1436
1443
  fromKName = 'pdpPage';
@@ -1448,22 +1455,15 @@ function useEventReport() {
1448
1455
  fromKName = 'productPage';
1449
1456
  }
1450
1457
  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;
1458
+ let contentFormat = null;
1459
+ if ((_r = data === null || data === void 0 ? void 0 : data.video) === null || _r === void 0 ? void 0 : _r.url) {
1460
+ contentFormat = 'video';
1461
+ }
1462
+ 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)) {
1463
+ contentFormat = 'image';
1464
+ }
1451
1465
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
1452
- eventInfo: {
1453
- eventSubject: 'jumpToWeb',
1454
- eventDescription: 'User jumped to website',
1455
- productId: (_r = product === null || product === void 0 ? void 0 : product.itemId) !== null && _r !== void 0 ? _r : '',
1456
- productName: (_s = product === null || product === void 0 ? void 0 : product.title) !== null && _s !== void 0 ? _s : '',
1457
- price: (product === null || product === void 0 ? void 0 : product.price) ? (product === null || product === void 0 ? void 0 : product.price) + '' : '0',
1458
- productCollection: (_t = product === null || product === void 0 ? void 0 : product.collection) !== null && _t !== void 0 ? _t : '',
1459
- fromKName,
1460
- fromKPage: location === null || location === void 0 ? void 0 : location.href,
1461
- contentTags: contentTags ? JSON.stringify(contentTags) : '',
1462
- position: position + '',
1463
- 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 : '',
1464
- ctatId: (_w = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _w !== void 0 ? _w : '',
1465
- 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 : ''
1466
- }
1466
+ 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 }))
1467
1467
  });
1468
1468
  }, [bffEventReport, popupDetailData, isFromHashtag]);
1469
1469
  const productView = useCallback((data, product, cta, viewTime, position) => {
@@ -1518,22 +1518,25 @@ function useEventReport() {
1518
1518
  * @Author: binruan@chatlabs.com
1519
1519
  * @Date: 2024-06-27 16:22:34
1520
1520
  * @LastEditors: binruan@chatlabs.com
1521
- * @LastEditTime: 2024-07-05 14:55:25
1521
+ * @LastEditTime: 2024-08-27 16:59:46
1522
1522
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\AppointForm\Form.tsx
1523
1523
  *
1524
1524
  */
1525
1525
  const Form = ({ layout, columns, onChange }) => {
1526
1526
  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' } },
1527
1527
  layout !== 'inline' && React.createElement("label", { className: 'pb-appoint-form-container-label' }, item === null || item === void 0 ? void 0 : item.title),
1528
- (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 })))))))));
1528
+ (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 })))))))));
1529
1529
  };
1530
1530
  var Form$1 = memo(Form);
1531
1531
 
1532
1532
  const AppointForm$1 = (_a) => {
1533
+ var _b, _c;
1533
1534
  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"]);
1534
1535
  const { submitForm, popupDetailData } = useSxpDataSource();
1535
1536
  const { jumpToWeb } = useEventReport();
1536
1537
  const [loading, setLoading] = useState(false);
1538
+ const [formData, setFormData] = useState({});
1539
+ const [marginTop, setMarginTop] = useState(0);
1537
1540
  const defaultColumns = useMemo(() => [
1538
1541
  {
1539
1542
  title: '',
@@ -1560,7 +1563,7 @@ const AppointForm$1 = (_a) => {
1560
1563
  key: '4'
1561
1564
  }
1562
1565
  ], []);
1563
- const [formData, setFormData] = useState({});
1566
+ 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);
1564
1567
  const columnsData = useMemo(() => {
1565
1568
  return cloneDeep(columns) || defaultColumns;
1566
1569
  }, [columns, defaultColumns]);
@@ -1569,17 +1572,17 @@ const AppointForm$1 = (_a) => {
1569
1572
  setFormData(Object.assign(Object.assign({}, formData), { [name]: value }));
1570
1573
  }, [formData]);
1571
1574
  const handleSubmit = debounce(() => __awaiter(void 0, void 0, void 0, function* () {
1572
- var _b, _c, _d, _e, _f;
1575
+ var _d, _e, _f, _g, _h;
1573
1576
  const vals = formData;
1574
1577
  if (!vals)
1575
1578
  return;
1576
- const arr = (_c = (_b = Object.keys(vals)) === null || _b === void 0 ? void 0 : _b.map((key) => {
1579
+ const arr = (_e = (_d = Object.keys(vals)) === null || _d === void 0 ? void 0 : _d.map((key) => {
1577
1580
  var _a;
1578
1581
  return ({
1579
1582
  name: key,
1580
1583
  value: (_a = vals[key]) !== null && _a !== void 0 ? _a : ''
1581
1584
  });
1582
- })) === null || _c === void 0 ? void 0 : _c.filter((item) => item === null || item === void 0 ? void 0 : item.value);
1585
+ })) === null || _e === void 0 ? void 0 : _e.filter((item) => item === null || item === void 0 ? void 0 : item.value);
1583
1586
  if (!arr || !(arr === null || arr === void 0 ? void 0 : arr.length))
1584
1587
  return;
1585
1588
  setLoading(true);
@@ -1588,8 +1591,8 @@ const AppointForm$1 = (_a) => {
1588
1591
  if (res) {
1589
1592
  if (isExternalLink) {
1590
1593
  const data = popupDetailData;
1591
- const product = (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.bindProduct;
1592
- 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;
1594
+ const product = (_f = data === null || data === void 0 ? void 0 : data.video) === null || _f === void 0 ? void 0 : _f.bindProduct;
1595
+ 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;
1593
1596
  const position = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
1594
1597
  jumpToWeb(data, product, cta, position);
1595
1598
  }
@@ -1599,11 +1602,33 @@ const AppointForm$1 = (_a) => {
1599
1602
  onClick === null || onClick === void 0 ? void 0 : onClick();
1600
1603
  }
1601
1604
  }), 1000);
1605
+ useEffect(() => {
1606
+ const handleScroll = () => {
1607
+ var _a, _b;
1608
+ // 获取用户代理字符串
1609
+ const userAgent = navigator.userAgent;
1610
+ // 判断是否是安卓设备
1611
+ const isAndroid = userAgent.toLowerCase().includes('android');
1612
+ if (!isAndroid)
1613
+ return;
1614
+ 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);
1615
+ if (resizeHeight < originalHeight) {
1616
+ setMarginTop(50);
1617
+ }
1618
+ else {
1619
+ setMarginTop(0);
1620
+ }
1621
+ };
1622
+ window.addEventListener('resize', handleScroll);
1623
+ return () => {
1624
+ window.removeEventListener('resize', handleScroll);
1625
+ };
1626
+ }, []);
1602
1627
  return (React.createElement("div", { className: 'pb-appoint-form' },
1603
1628
  React.createElement("div", { className: `pb-appoint-form-title ${css(Object.assign({}, textStyle))}`, dangerouslySetInnerHTML: {
1604
1629
  __html: setFontForText(title, textStyle)
1605
1630
  } }),
1606
- React.createElement("div", Object.assign({ className: css(Object.assign({}, style)) }, props),
1631
+ React.createElement("div", Object.assign({ className: css(Object.assign(Object.assign({}, style), { marginTop })) }, props),
1607
1632
  React.createElement("div", { className: 'pb-appoint-form-container' },
1608
1633
  React.createElement(Form$1, { columns: columnsData, layout: layoutType, onChange: handleChange }))),
1609
1634
  React.createElement("div", { className: 'pb-appoint-form-btn-wrapper' },
@@ -1985,6 +2010,37 @@ var settingRender$9 = [
1985
2010
  name: ['props', 'iframeBgColor']
1986
2011
  }
1987
2012
  ]
2013
+ },
2014
+ {
2015
+ title: '轮播指示器',
2016
+ child: [
2017
+ {
2018
+ label: '背景色',
2019
+ name: ['props', 'swiper', 'dotsBgColor'],
2020
+ type: 'Color'
2021
+ },
2022
+ {
2023
+ label: '选中色',
2024
+ name: ['props', 'swiper', 'dotsActiveColor'],
2025
+ type: 'Color'
2026
+ },
2027
+ {
2028
+ label: '底边距',
2029
+ name: ['props', 'swiper', 'dotsMarginBottom'],
2030
+ type: 'Number',
2031
+ addonAfter: 'px'
2032
+ }
2033
+ ]
2034
+ },
2035
+ {
2036
+ title: '关闭按钮',
2037
+ child: [
2038
+ {
2039
+ label: '跟随弹窗滚动',
2040
+ type: 'Switch',
2041
+ name: ['props', 'enableFixedCloseButton']
2042
+ }
2043
+ ]
1988
2044
  }
1989
2045
  ];
1990
2046
 
@@ -8814,13 +8870,13 @@ SwiperSlide.displayName = 'SwiperSlide';
8814
8870
  * @Author: binruan@chatlabs.com
8815
8871
  * @Date: 2023-11-02 18:34:34
8816
8872
  * @LastEditors: binruan@chatlabs.com
8817
- * @LastEditTime: 2024-08-22 18:48:44
8873
+ * @LastEditTime: 2024-08-29 16:40:25
8818
8874
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Modal\index.tsx
8819
8875
  *
8820
8876
  */
8821
8877
  const closeIcon$1 = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII=';
8822
8878
  const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema, fullHeight = window.innerHeight, isFullScreen = false }) => {
8823
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
8879
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
8824
8880
  const touchRef = useRef(null);
8825
8881
  const fTouchRef = useRef(null);
8826
8882
  const touchMoveRef = useRef(null);
@@ -8832,6 +8888,7 @@ const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema,
8832
8888
  const modalEleRef = useRef(null);
8833
8889
  const { globalConfig, popupDetailData } = useSxpDataSource();
8834
8890
  const { schema: _schema } = useEditor();
8891
+ const [scrollTop, setScrollTop] = useState(15);
8835
8892
  useEffect(() => {
8836
8893
  const parentNode = document.getElementById('sxp-render');
8837
8894
  const node = document.getElementById('pb-modal');
@@ -8942,12 +8999,17 @@ const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema,
8942
8999
  onTouchStart: handleTouchStart,
8943
9000
  onTouchEnd: handleTouchEnd
8944
9001
  })),
8945
- React.createElement("div", { onClick: onClose, className: 'modal-icon-wrapper' },
9002
+ React.createElement("div", { className: 'modal-icon-wrapper', onClick: onClose, style: { top: scrollTop } },
8946
9003
  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' })),
8947
- React.createElement("div", { ref: ref, style: {
9004
+ React.createElement("div", Object.assign({ ref: ref, style: {
8948
9005
  height: isScrollFullScreen ? fullHeight : MODAL_DEF_CON_H,
8949
9006
  overflow: (isScrollFullScreen && modalTrans <= 0) || !isScrollFullScreen ? 'auto' : 'hidden'
8950
- } }, children)))))), modalEleRef.current);
9007
+ } }, (((_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) && {
9008
+ onScroll: (e) => {
9009
+ var _a;
9010
+ setScrollTop(15 - ((_a = e === null || e === void 0 ? void 0 : e.target) === null || _a === void 0 ? void 0 : _a.scrollTop));
9011
+ }
9012
+ })), children)))))), modalEleRef.current);
8951
9013
  };
8952
9014
  var Modal$1 = memo(Modal);
8953
9015
 
@@ -9192,10 +9254,10 @@ const CommodityDetail$1 = (_a) => {
9192
9254
  __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)
9193
9255
  } }),
9194
9256
  React.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
9195
- 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
9196
- bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
9197
- collection is unisex and is inspired by the padlock pattern found in the Tiffany Antique Collection. This
9198
- necklace features a stylish and eye-catching oval clasp chain decorated with a lock pattern. Crafted from
9257
+ 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
9258
+ bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
9259
+ collection is unisex and is inspired by the padlock pattern found in the Tiffany Antique Collection. This
9260
+ necklace features a stylish and eye-catching oval clasp chain decorated with a lock pattern. Crafted from
9199
9261
  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 }))));
9200
9262
  };
9201
9263
  const renderBtn = () => {
@@ -9244,7 +9306,17 @@ const CommodityDetail$1 = (_a) => {
9244
9306
  clickableClass: getDotsAlign
9245
9307
  }, loop: true, autoplay: {
9246
9308
  delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
9247
- }, ref: ref },
9309
+ }, ref: ref, className: 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) && {
9310
+ '.swiper-pagination-bullet': {
9311
+ backgroundColor: swiper === null || swiper === void 0 ? void 0 : swiper.dotsBgColor,
9312
+ opacity: 1
9313
+ }
9314
+ })), ((swiper === null || swiper === void 0 ? void 0 : swiper.dotsActiveColor) && {
9315
+ '.swipe-item-active-bullet': {
9316
+ backgroundColor: `${swiper === null || swiper === void 0 ? void 0 : swiper.dotsActiveColor}!important`,
9317
+ opacity: 1
9318
+ }
9319
+ }))) },
9248
9320
  React.createElement(React.Fragment, null, (_x = product === null || product === void 0 ? void 0 : product.homePage) === null || _x === void 0 ? void 0 : _x.map((src) => {
9249
9321
  var _a;
9250
9322
  return (React.createElement(SwiperSlide, { key: src },
@@ -9633,7 +9705,7 @@ const Prompt = createMaterial(PromptComponent, {
9633
9705
  * @Author: binruan@chatlabs.com
9634
9706
  * @Date: 2024-03-26 16:50:25
9635
9707
  * @LastEditors: binruan@chatlabs.com
9636
- * @LastEditTime: 2024-08-23 10:58:38
9708
+ * @LastEditTime: 2024-08-29 16:45:54
9637
9709
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetailDiroNew\settingRender.tsx
9638
9710
  *
9639
9711
  */
@@ -9948,6 +10020,37 @@ var settingRender$7 = [
9948
10020
  name: ['props', 'iframeBgColor']
9949
10021
  }
9950
10022
  ]
10023
+ },
10024
+ {
10025
+ title: '轮播指示器',
10026
+ child: [
10027
+ {
10028
+ label: '背景色',
10029
+ name: ['props', 'swiper', 'dotsBgColor'],
10030
+ type: 'Color'
10031
+ },
10032
+ {
10033
+ label: '选中色',
10034
+ name: ['props', 'swiper', 'dotsActiveColor'],
10035
+ type: 'Color'
10036
+ },
10037
+ {
10038
+ label: '底边距',
10039
+ name: ['props', 'swiper', 'dotsMarginBottom'],
10040
+ type: 'Number',
10041
+ addonAfter: 'px'
10042
+ }
10043
+ ]
10044
+ },
10045
+ {
10046
+ title: '关闭按钮',
10047
+ child: [
10048
+ {
10049
+ label: '跟随弹窗滚动',
10050
+ type: 'Switch',
10051
+ name: ['props', 'enableFixedCloseButton']
10052
+ }
10053
+ ]
9951
10054
  }
9952
10055
  ];
9953
10056
 
@@ -10072,7 +10175,7 @@ const CommodityDetailDiroNew$1 = (_a) => {
10072
10175
  const productInfoText = ({ isPost }) => {
10073
10176
  return (React.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
10074
10177
  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) ||
10075
- `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
10178
+ `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
10076
10179
  Made in Italy` })));
10077
10180
  };
10078
10181
  const getStyle = useCallback((style) => {
@@ -10110,11 +10213,21 @@ Made in Italy` })));
10110
10213
  React.createElement("div", { style: { position: 'relative' } },
10111
10214
  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: {
10112
10215
  clickable: true,
10113
- bulletActiveClass: 'commondityDiroNew-swipe-item-active-bullet',
10216
+ bulletActiveClass: 'swipe-item-active-bullet',
10114
10217
  clickableClass: getDotsAlign
10115
10218
  }, loop: true, autoplay: {
10116
10219
  delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
10117
- }, ref: ref }, (_x = product === null || product === void 0 ? void 0 : product.homePage) === null || _x === void 0 ? void 0 : _x.map((src) => {
10220
+ }, ref: ref, className: 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) && {
10221
+ '.swiper-pagination-bullet': {
10222
+ backgroundColor: swiper === null || swiper === void 0 ? void 0 : swiper.dotsBgColor,
10223
+ opacity: 1
10224
+ }
10225
+ })), ((swiper === null || swiper === void 0 ? void 0 : swiper.dotsActiveColor) && {
10226
+ '.swipe-item-active-bullet': {
10227
+ backgroundColor: `${swiper === null || swiper === void 0 ? void 0 : swiper.dotsActiveColor}!important`,
10228
+ opacity: 1
10229
+ }
10230
+ }))) }, (_x = product === null || product === void 0 ? void 0 : product.homePage) === null || _x === void 0 ? void 0 : _x.map((src) => {
10118
10231
  var _a;
10119
10232
  return (React.createElement(SwiperSlide, { key: src },
10120
10233
  React.createElement("div", { style: {
@@ -10172,7 +10285,8 @@ Made in Italy` })));
10172
10285
  __html: setFontForText((_3 = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _3 !== void 0 ? _3 : 'Shop now', buttonStyle)
10173
10286
  } }))),
10174
10287
  productInfoText({ isPost }))),
10175
- React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) }, productInfoText({ isPost: false })),
10288
+ React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) },
10289
+ React.createElement("div", { style: { paddingTop: '20px' } }, productInfoText({ isPost: false }))),
10176
10290
  React.createElement(Modal$1, { visible: show3DModal, padding: 0, isFullScreen: true, onClose: () => setShow3DModal(false) },
10177
10291
  React.createElement("div", { style: { backgroundColor: iframeBgColor, height: '100%' } },
10178
10292
  React.createElement("iframe", { src: iframeUrl, style: {
@@ -15722,11 +15836,11 @@ const Picture = (props) => {
15722
15836
  * @Author: lewinlu@chatlabs.com
15723
15837
  * @Date: 2024-01-03 14:39:09
15724
15838
  * @LastEditors: binruan@chatlabs.com
15725
- * @LastEditTime: 2024-07-02 18:25:17
15839
+ * @LastEditTime: 2024-08-29 18:03:12
15726
15840
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\PictureGroup\index.tsx
15727
15841
  */
15728
15842
  const PictureGroup$2 = ({ imgUrls, width, height, rec, index, onReportViewImageEnd, onViewImageStartEvent, imgUrlsPostConfig }) => {
15729
- var _a, _b;
15843
+ var _a;
15730
15844
  const ref = useRef();
15731
15845
  const { isActive } = useSwiperSlide();
15732
15846
  const { sxpParameter, openHashtag } = useSxpDataSource();
@@ -15756,11 +15870,17 @@ const PictureGroup$2 = ({ imgUrls, width, height, rec, index, onReportViewImageE
15756
15870
  return (React.createElement(Swiper, { ref: ref, defaultValue: 0, direction: 'horizontal', modules: [Pagination, Autoplay], pagination: {
15757
15871
  clickable: true,
15758
15872
  bulletActiveClass: 'swipe-item-active-bullet'
15759
- }, className: css(Object.assign({}, ((imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.marginBottom) && {
15760
- '.swiper-pagination': {
15761
- bottom: (_a = imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.marginBottom) !== null && _a !== void 0 ? _a : 0
15873
+ }, className: 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) && {
15874
+ '.swiper-pagination-bullet': {
15875
+ backgroundColor: imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.dotsBgColor,
15876
+ opacity: 1
15762
15877
  }
15763
- }))), 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) => {
15878
+ })), ((imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.dotsActiveColor) && {
15879
+ '.swipe-item-active-bullet': {
15880
+ backgroundColor: `${imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.dotsActiveColor}!important`,
15881
+ opacity: 1
15882
+ }
15883
+ }))), 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) => {
15764
15884
  return (React.createElement(SwiperSlide, { key: index },
15765
15885
  React.createElement(Picture, { src: !isLoad && index > 0 ? '' : url, height: height, imgUrlsPostConfig: imgUrlsPostConfig, onShowFirstImage: showFirstImageFn })));
15766
15886
  })));
@@ -16014,12 +16134,12 @@ var Tagbar$1 = memo(Tagbar);
16014
16134
  * @Author: binruan@chatlabs.com
16015
16135
  * @Date: 2024-01-15 19:03:09
16016
16136
  * @LastEditors: binruan@chatlabs.com
16017
- * @LastEditTime: 2024-08-23 14:04:14
16137
+ * @LastEditTime: 2024-08-29 11:23:41
16018
16138
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
16019
16139
  *
16020
16140
  */
16021
16141
  const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.innerHeight, containerWidth = window.innerWidth, tempMap, resolver, data = [], ctaType, tipText, nudge, _schema, hashTagStyle, tagList = [], licenseUrl }) => {
16022
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
16142
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
16023
16143
  const mutedIcon = useIconLink('/pb_static/5beaaa5ce7f3477b99db3838619cc471.png');
16024
16144
  const unmutedIcon = useIconLink('/pb_static/fea8668a8a894e4aa3a86bcc775e895e.png');
16025
16145
  const { schema } = useEditor();
@@ -16031,7 +16151,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
16031
16151
  const [isShowMore, setIsShowMore] = useState(false);
16032
16152
  const [isReload, setIsReload] = useState(new Date().getTime());
16033
16153
  const skipLinkRef = useRef(false);
16034
- 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();
16154
+ const [pageNum, setPageNum] = useState(2);
16155
+ 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();
16035
16156
  const { backMainFeed, productView, jumpToWeb } = useEventReport();
16036
16157
  const isShowFingerTip = useMemo(() => {
16037
16158
  return data.length > 0 && !loading && (getFeUserId() || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enableSwiperTip));
@@ -16190,8 +16311,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
16190
16311
  return null;
16191
16312
  }
16192
16313
  });
16193
- return !waterFallData ? list.concat([{ loading: true }]) : list;
16194
- }, [data, activeIndex, waterFallData, isEditor]);
16314
+ return !waterFallData && !isNoMoreData ? list.concat([{ loading: true }]) : list;
16315
+ }, [data, activeIndex, waterFallData, isEditor, isNoMoreData]);
16195
16316
  const renderLogo = useMemo(() => {
16196
16317
  var _a, _b, _c, _d;
16197
16318
  if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
@@ -16480,8 +16601,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
16480
16601
  isReload,
16481
16602
  renderToggleButton
16482
16603
  ]);
16483
- return (React.createElement("div", { id: 'sxp-render', className: 'clc-sxp-container' },
16484
- 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: () => {
16604
+ 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` } },
16605
+ 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: () => {
16485
16606
  const isEq = isEqual(rtcList, cacheRtcList);
16486
16607
  if (!isEq && cacheRtcList && (cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.length)) {
16487
16608
  setRtcList === null || setRtcList === void 0 ? void 0 : setRtcList(cacheRtcList);
@@ -16492,7 +16613,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
16492
16613
  React.createElement(Tagbar$1, { tagList: tagList, setActiveIndex: setActiveIndex, style: {
16493
16614
  top: minusHeight
16494
16615
  } }),
16495
- 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,
16616
+ 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,
16496
16617
  React.createElement(Swiper, { style: {
16497
16618
  marginTop: tagHeight
16498
16619
  }, ref: swiperRef, onSlideChange: () => {
@@ -16511,8 +16632,12 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
16511
16632
  if ((swiper === null || swiper === void 0 ? void 0 : swiper.activeIndex) + 1 >= (data === null || data === void 0 ? void 0 : data.length)) {
16512
16633
  if (!isLoadMore) {
16513
16634
  setIsLoadMore(true);
16514
- loadVideos === null || loadVideos === void 0 ? void 0 : loadVideos(Math.ceil(activeIndex / 10) + 1).then(() => {
16635
+ loadVideos === null || loadVideos === void 0 ? void 0 : loadVideos(pageNum).then((res) => {
16636
+ var _a;
16515
16637
  setIsLoadMore(false);
16638
+ if (res && ((_a = res === null || res === void 0 ? void 0 : res.recList) === null || _a === void 0 ? void 0 : _a.length) > 0) {
16639
+ setPageNum((pageNum + 1));
16640
+ }
16516
16641
  });
16517
16642
  }
16518
16643
  }
@@ -16520,7 +16645,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
16520
16645
  renderLikeButton(visList[activeIndex], activeIndex, !!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconFixed)),
16521
16646
  renderToggleButton(!!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed)),
16522
16647
  renderView),
16523
- 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))));
16648
+ 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))));
16524
16649
  };
16525
16650
 
16526
16651
  const PictureGroup = ({ imgUrls, width, height, imgUrlsPostConfig, rec, index }) => {