pb-sxp-ui 1.0.80 → 1.0.82

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 (76) hide show
  1. package/dist/index.cjs +400 -145
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.css +97 -4
  4. package/dist/index.js +401 -146
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.min.cjs +3 -3
  7. package/dist/index.min.cjs.map +1 -1
  8. package/dist/index.min.js +3 -3
  9. package/dist/index.min.js.map +1 -1
  10. package/dist/pb-ui.js +400 -145
  11. package/dist/pb-ui.js.map +1 -1
  12. package/dist/pb-ui.min.js +3 -3
  13. package/dist/pb-ui.min.js.map +1 -1
  14. package/es/core/Pagebuilder/type.d.ts +7 -0
  15. package/es/core/components/Consent/index.d.ts +13 -0
  16. package/es/core/components/Consent/index.js +60 -0
  17. package/es/core/components/SxpPageCore/index.js +2 -2
  18. package/es/core/components/SxpPageRender/Tagbar.js +15 -1
  19. package/es/core/components/SxpPageRender/WaterFall/List.d.ts +1 -1
  20. package/es/core/components/SxpPageRender/WaterFall/List.js +15 -9
  21. package/es/core/components/SxpPageRender/WaterFall/WaterfallList.d.ts +1 -1
  22. package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +18 -12
  23. package/es/core/components/SxpPageRender/WaterFall/index.js +7 -2
  24. package/es/core/components/SxpPageRender/index.d.ts +2 -1
  25. package/es/core/components/SxpPageRender/index.js +30 -10
  26. package/es/core/components/SxpPageRender/typing.d.ts +1 -0
  27. package/es/core/context/EditorDataProvider.d.ts +9 -0
  28. package/es/core/context/EditorDataProvider.js +13 -3
  29. package/es/core/context/SxpDataSourceProvider.d.ts +10 -0
  30. package/es/core/context/SxpDataSourceProvider.js +37 -21
  31. package/es/core/hooks/useEventReport.d.ts +1 -0
  32. package/es/core/hooks/useEventReport.js +13 -1
  33. package/es/core/utils/localStore.d.ts +1 -0
  34. package/es/core/utils/localStore.js +1 -0
  35. package/es/materials/sxp/Consent/index.d.ts +12 -0
  36. package/es/materials/sxp/Consent/index.js +5 -0
  37. package/es/materials/sxp/Consent/material.d.ts +2 -0
  38. package/es/materials/sxp/Consent/material.js +20 -0
  39. package/es/materials/sxp/Consent/settingRender.d.ts +31 -0
  40. package/es/materials/sxp/Consent/settingRender.js +39 -0
  41. package/es/materials/sxp/HashTag/index.d.ts +1 -1
  42. package/es/materials/sxp/HashTag/settingRender.js +1 -1
  43. package/es/materials/sxp/index.d.ts +1 -0
  44. package/es/materials/sxp/index.js +1 -0
  45. package/lib/core/Pagebuilder/type.d.ts +7 -0
  46. package/lib/core/components/Consent/index.d.ts +13 -0
  47. package/lib/core/components/Consent/index.js +63 -0
  48. package/lib/core/components/SxpPageCore/index.js +2 -2
  49. package/lib/core/components/SxpPageRender/Tagbar.js +15 -1
  50. package/lib/core/components/SxpPageRender/WaterFall/List.d.ts +1 -1
  51. package/lib/core/components/SxpPageRender/WaterFall/List.js +15 -9
  52. package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.d.ts +1 -1
  53. package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +18 -12
  54. package/lib/core/components/SxpPageRender/WaterFall/index.js +7 -2
  55. package/lib/core/components/SxpPageRender/index.d.ts +2 -1
  56. package/lib/core/components/SxpPageRender/index.js +30 -10
  57. package/lib/core/components/SxpPageRender/typing.d.ts +1 -0
  58. package/lib/core/context/EditorDataProvider.d.ts +9 -0
  59. package/lib/core/context/EditorDataProvider.js +13 -3
  60. package/lib/core/context/SxpDataSourceProvider.d.ts +10 -0
  61. package/lib/core/context/SxpDataSourceProvider.js +36 -20
  62. package/lib/core/hooks/useEventReport.d.ts +1 -0
  63. package/lib/core/hooks/useEventReport.js +13 -1
  64. package/lib/core/utils/localStore.d.ts +1 -0
  65. package/lib/core/utils/localStore.js +2 -1
  66. package/lib/materials/sxp/Consent/index.d.ts +12 -0
  67. package/lib/materials/sxp/Consent/index.js +8 -0
  68. package/lib/materials/sxp/Consent/material.d.ts +2 -0
  69. package/lib/materials/sxp/Consent/material.js +24 -0
  70. package/lib/materials/sxp/Consent/settingRender.d.ts +31 -0
  71. package/lib/materials/sxp/Consent/settingRender.js +41 -0
  72. package/lib/materials/sxp/HashTag/index.d.ts +1 -1
  73. package/lib/materials/sxp/HashTag/settingRender.js +1 -1
  74. package/lib/materials/sxp/index.d.ts +1 -0
  75. package/lib/materials/sxp/index.js +1 -0
  76. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { isEmpty, isEqual, cloneDeep, debounce, throttle, get } from 'lodash';
2
2
  import { v4 } from 'uuid';
3
3
  import pako from 'pako';
4
- import React, { useContext, useMemo, createContext, memo, useState, useRef, useEffect, useCallback, forwardRef, useImperativeHandle, useLayoutEffect } from 'react';
4
+ import React, { useContext, useMemo, memo, useEffect, createContext, useState, useRef, useCallback, forwardRef, useImperativeHandle, useLayoutEffect } from 'react';
5
5
  import qs from 'qs';
6
6
  import EventEmitter from 'eventemitter3';
7
7
  import { css } from '@emotion/css';
@@ -370,6 +370,7 @@ const getFeSessionId = () => {
370
370
 
371
371
  const FAKE_USER_KEY = 'SXP_FAKE_USER_ID';
372
372
  const FAKE_USER_STATE = 'FAKE_USER_STATE';
373
+ const AGREE_POLICY = 'AGREE_POLICY';
373
374
  const storeAndLoadFeUserId = () => {
374
375
  let fakeUserId = window.localStorage.getItem(FAKE_USER_KEY);
375
376
  if (isEmpty(fakeUserId)) {
@@ -414,6 +415,70 @@ var SXP_EVENT_TYPE;
414
415
  SXP_EVENT_TYPE["CHANGE_THEME_TAG"] = "changeThemeTag";
415
416
  })(SXP_EVENT_TYPE || (SXP_EVENT_TYPE = {}));
416
417
 
418
+ /*
419
+ * @Author: binruan@chatlabs.com
420
+ * @Date: 2024-06-13 15:16:53
421
+ * @LastEditors: binruan@chatlabs.com
422
+ * @LastEditTime: 2024-06-13 18:22:53
423
+ * @FilePath: \pb-sxp-ui\src\core\components\Consent\index.tsx
424
+ *
425
+ */
426
+ const Consent$2 = ({ width = window.innerWidth, height = window.innerHeight, privacy_title, privacy_context, privacy_policy_url, privacy_policy_title }) => {
427
+ const { setIsAgreePolicy, bffEventReport } = useSxpDataSource();
428
+ const channelObj = useMemo(() => {
429
+ const queryString = location.search.slice(1);
430
+ const params = qs.parse(queryString.replace(/\+/g, '%2B'));
431
+ for (const key in params) {
432
+ params[key] = params[key].replace(/%2B/g, '+');
433
+ }
434
+ return params;
435
+ }, []);
436
+ const getUtmValue = (key) => { var _a; return (_a = channelObj[key]) !== null && _a !== void 0 ? _a : null; };
437
+ useEffect(() => {
438
+ bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
439
+ eventInfo: {
440
+ eventSubject: 'privacyEnter',
441
+ eventDescription: 'User enter privacy page',
442
+ utmSource: getUtmValue('utm_source'),
443
+ utmMedium: getUtmValue('utm_medium'),
444
+ utmCampaign: getUtmValue('utm_campaign'),
445
+ utmId: getUtmValue('utm_id'),
446
+ utmContent: getUtmValue('utm_content'),
447
+ clSource: getUtmValue('cl_source'),
448
+ enterTime: `${Date.now()}`,
449
+ enterUrl: window.location.href,
450
+ rtc: null,
451
+ requestId: null,
452
+ sessionID: null
453
+ }
454
+ });
455
+ }, []);
456
+ const handleAgree = () => {
457
+ bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
458
+ eventInfo: {
459
+ eventSubject: 'userConsent',
460
+ eventDescription: '用户授权【操作结果】',
461
+ consentResult: '0',
462
+ consentTags: '[]',
463
+ rtc: null,
464
+ requestId: null,
465
+ sessionID: null
466
+ }
467
+ });
468
+ setIsAgreePolicy === null || setIsAgreePolicy === void 0 ? void 0 : setIsAgreePolicy(true);
469
+ window.localStorage.setItem(AGREE_POLICY, 'yes');
470
+ };
471
+ return (React.createElement("div", { className: 'consent-bg' },
472
+ React.createElement("div", { className: 'consent' },
473
+ React.createElement("div", { className: 'consent-col' },
474
+ React.createElement("div", { className: 'consent-title' }, privacy_title !== null && privacy_title !== void 0 ? privacy_title : 'Privacy Policy'),
475
+ React.createElement("div", { className: 'consent-content' }, privacy_context !== null && privacy_context !== void 0 ? privacy_context : 'This site uses cookies to improve your online experience. By continuing to use the site please agree the policy first.')),
476
+ React.createElement("div", { className: 'consent-col' },
477
+ React.createElement("button", { className: 'consent-btn', onClick: handleAgree }, "Agree"),
478
+ React.createElement("a", { className: 'consent-policy', target: '_blank', href: privacy_policy_url }, privacy_policy_title !== null && privacy_policy_title !== void 0 ? privacy_policy_title : 'More information')))));
479
+ };
480
+ var Consent$3 = memo(Consent$2);
481
+
417
482
  const SxpDataSourceContext = createContext({
418
483
  rtcList: [],
419
484
  tagList: []
@@ -423,13 +488,15 @@ var DataSourceType;
423
488
  DataSourceType[DataSourceType["BFF"] = 5] = "BFF";
424
489
  })(DataSourceType || (DataSourceType = {}));
425
490
  const UTM_KEYS = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_id', 'utm_content', 'cl_source'];
426
- const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false, enabledMetaConversionApi = false, isShowTag = true }) => {
491
+ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false, enabledMetaConversionApi = false, consentHeight, consentWidth, isShowTag = true, isOpenConsent = false, globalConfig }) => {
492
+ var _a, _b, _c, _d, _e, _f, _g;
427
493
  const [rtcList, setRtcList] = useState([]);
428
494
  const [tagList, setTagList] = useState([]);
429
495
  const [loading, setLoading] = useState(false);
430
496
  const [curReqInfo, setCurReqInfo] = useState({ rtc: '', requestId: '' });
431
497
  const swiperRef = useRef(null);
432
498
  const isInit = useRef(false);
499
+ const [isAgreePolicy, setIsAgreePolicy] = useState(() => !!window.localStorage.getItem(AGREE_POLICY));
433
500
  // 弹窗数据
434
501
  const [popupDetailData, setPopupDetailData] = useState();
435
502
  const [waterFallData, setWaterFallData] = useState();
@@ -439,6 +506,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
439
506
  const [isFromHashtag, setIsFromHashtag] = useState(false);
440
507
  const [videoRef, setVideoRef] = useState(null);
441
508
  const themeTag = useRef();
509
+ const curTime = useRef();
442
510
  useEffect(() => {
443
511
  const handleChangeThemeTag = (tag) => {
444
512
  themeTag.current = tag;
@@ -483,10 +551,10 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
483
551
  }, [bffDataSource]);
484
552
  // 获取推荐视频数据
485
553
  const getRecommendVideos = useCallback((query) => __awaiter(void 0, void 0, void 0, function* () {
486
- var _a, _b, _c, _d, _e;
554
+ var _h, _j, _k, _l, _m;
487
555
  query = {
488
- maxSize: (_a = query === null || query === void 0 ? void 0 : query.maxSize) !== null && _a !== void 0 ? _a : maxSize,
489
- defaultSize: (_b = query === null || query === void 0 ? void 0 : query.defaultSize) !== null && _b !== void 0 ? _b : defaultSize,
556
+ maxSize: (_h = query === null || query === void 0 ? void 0 : query.maxSize) !== null && _h !== void 0 ? _h : maxSize,
557
+ defaultSize: (_j = query === null || query === void 0 ? void 0 : query.defaultSize) !== null && _j !== void 0 ? _j : defaultSize,
490
558
  'itemFilter.itemId': query === null || query === void 0 ? void 0 : query['itemFilter.itemId'],
491
559
  'itemFilter.itemType': query === null || query === void 0 ? void 0 : query['itemFilter.itemType'],
492
560
  hashTag: query === null || query === void 0 ? void 0 : query.hashTag,
@@ -494,10 +562,10 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
494
562
  themeTag: query === null || query === void 0 ? void 0 : query.themeTag
495
563
  };
496
564
  if (utmVal) {
497
- const val = (_e = (_d = (_c = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _c === void 0 ? void 0 : _c.filter((val) => {
565
+ const val = (_m = (_l = (_k = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _k === void 0 ? void 0 : _k.filter((val) => {
498
566
  const key = val.split('=')[0];
499
567
  return UTM_KEYS.includes(key);
500
- })) === null || _d === void 0 ? void 0 : _d.join('&')) !== null && _e !== void 0 ? _e : '';
568
+ })) === null || _l === void 0 ? void 0 : _l.join('&')) !== null && _m !== void 0 ? _m : '';
501
569
  query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(val) });
502
570
  }
503
571
  const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/list', { method: 'GET', query }));
@@ -509,7 +577,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
509
577
  return result === null || result === void 0 ? void 0 : result.data;
510
578
  }), [bffFetch, utmVal, maxSize, defaultSize]);
511
579
  const loadVideos = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
512
- var _f, _g;
580
+ var _o, _p;
513
581
  if (rtcList.length <= 0) {
514
582
  return;
515
583
  }
@@ -519,8 +587,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
519
587
  'itemFilter.itemType': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemType,
520
588
  themeTag: themeTag.current
521
589
  });
522
- setRtcList(rtcList.concat((_f = data === null || data === void 0 ? void 0 : data.recList) !== null && _f !== void 0 ? _f : []));
523
- setCacheRtcList(cacheRtcList.concat((_g = data === null || data === void 0 ? void 0 : data.recList) !== null && _g !== void 0 ? _g : []));
590
+ setRtcList(rtcList.concat((_o = data === null || data === void 0 ? void 0 : data.recList) !== null && _o !== void 0 ? _o : []));
591
+ setCacheRtcList(cacheRtcList.concat((_p = data === null || data === void 0 ? void 0 : data.recList) !== null && _p !== void 0 ? _p : []));
524
592
  }), [getRecommendVideos, rtcList, waterFallData, cacheRtcList]);
525
593
  const bffEventReport = useCallback(({ userInfo, eventInfo }) => {
526
594
  // 关闭 BFF 事件上报
@@ -584,16 +652,16 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
584
652
  }), [bffFetch]);
585
653
  // 获取 Tag
586
654
  const bffGetTagList = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
587
- var _h, _j, _k, _l, _m;
655
+ var _q, _r, _s, _t, _u;
588
656
  if (!utmVal || !isShowTag)
589
657
  return;
590
658
  try {
591
- const val = (_k = (_j = (_h = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _h === void 0 ? void 0 : _h.filter((val) => {
659
+ const val = (_s = (_r = (_q = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _q === void 0 ? void 0 : _q.filter((val) => {
592
660
  const key = val.split('=')[0];
593
661
  return UTM_KEYS.includes(key);
594
- })) === null || _j === void 0 ? void 0 : _j.join('&')) !== null && _k !== void 0 ? _k : '';
662
+ })) === null || _r === void 0 ? void 0 : _r.join('&')) !== null && _s !== void 0 ? _s : '';
595
663
  const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/tag/list', { method: 'GET', query: { channel: decodeURIComponent(val) } }));
596
- setTagList((_m = (_l = result === null || result === void 0 ? void 0 : result.data) === null || _l === void 0 ? void 0 : _l.tags) !== null && _m !== void 0 ? _m : []);
664
+ setTagList((_u = (_t = result === null || result === void 0 ? void 0 : result.data) === null || _t === void 0 ? void 0 : _t.tags) !== null && _u !== void 0 ? _u : []);
597
665
  }
598
666
  catch (e) {
599
667
  console.log('e', e);
@@ -617,7 +685,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
617
685
  eventInfo: Object.assign(Object.assign({}, eventInfo), { ctaId: (_h = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _h !== void 0 ? _h : '', ctaName: (_j = cta === null || cta === void 0 ? void 0 : cta.title) !== null && _j !== void 0 ? _j : '', contentTags: JSON.stringify(cta === null || cta === void 0 ? void 0 : cta.tags), position: position + '', contentId: (_l = (_k = rec === null || rec === void 0 ? void 0 : rec.video) === null || _k === void 0 ? void 0 : _k.itemId) !== null && _l !== void 0 ? _l : '', productId: isProd ? product === null || product === void 0 ? void 0 : product.itemId : '', traceInfo: (_m = cta === null || cta === void 0 ? void 0 : cta.traceInfo) !== null && _m !== void 0 ? _m : '', fromKName })
618
686
  });
619
687
  }, [bffEventReport, isFromHashtag]);
620
- useEffect(() => {
688
+ const h5EnterLink = useCallback(() => {
621
689
  var _a, _b;
622
690
  const queryString = location.search.slice(1);
623
691
  const params = qs.parse(queryString.replace(/\+/g, '%2B'));
@@ -625,6 +693,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
625
693
  params[key] = params[key].replace(/%2B/g, '+');
626
694
  }
627
695
  const getVal = (key) => { var _a; return (_a = params[key]) !== null && _a !== void 0 ? _a : ''; };
696
+ const time = new Date();
697
+ curTime.current = time;
628
698
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
629
699
  eventInfo: {
630
700
  eventSubject: 'h5LinkEnterFeed',
@@ -634,14 +704,19 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
634
704
  utmCampaign: getVal('utm_campaign'),
635
705
  utmId: getVal('utm_id'),
636
706
  utmContent: getVal('utm_content'),
637
- enterTime: `${Date.now()}`,
707
+ enterTime: Math.floor(time / 1000) + '',
638
708
  requestId: null,
639
709
  enterUrl: (_b = (_a = window === null || window === void 0 ? void 0 : window.location) === null || _a === void 0 ? void 0 : _a.href) !== null && _b !== void 0 ? _b : '',
640
- clSource: getVal('cl_sourc')
710
+ clSource: getVal('cl_source')
641
711
  }
642
712
  });
713
+ }, [bffEventReport]);
714
+ useEffect(() => {
715
+ h5EnterLink();
643
716
  }, []);
644
717
  useEffect(() => {
718
+ if (!isAgreePolicy)
719
+ return;
645
720
  setLoading(true);
646
721
  bffGetTagList();
647
722
  getRecommendVideos()
@@ -660,7 +735,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
660
735
  setLoading(false);
661
736
  isInit.current = true;
662
737
  });
663
- }, []);
738
+ }, [isAgreePolicy]);
664
739
  useEffect(() => {
665
740
  if (!isInit.current)
666
741
  return;
@@ -712,14 +787,19 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
712
787
  setLoading,
713
788
  videoRef,
714
789
  setVideoRef,
715
- bffFbReport
716
- } }, render({
790
+ bffFbReport,
791
+ isAgreePolicy,
792
+ setIsAgreePolicy,
793
+ curTime,
794
+ h5EnterLink,
795
+ themeTag
796
+ } }, (((_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) || isOpenConsent ? (React.createElement(Consent$3, Object.assign({}, (_g = (_f = (_e = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.consent) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.item) === null || _g === void 0 ? void 0 : _g.props))) : (render({
717
797
  rtcList,
718
798
  mutateLike: bffMutateLike,
719
799
  mutateUnlike: bffMutateUnlike,
720
800
  submitForm: bffSubmitForm,
721
801
  tagList
722
- })));
802
+ }))));
723
803
  };
724
804
  var SxpDataSourceProvider$1 = memo(SxpDataSourceProvider);
725
805
 
@@ -985,7 +1065,7 @@ var defaultSetting = {
985
1065
  *
986
1066
  */
987
1067
  var _a$5, _b$5, _c;
988
- var settingRender$5 = [
1068
+ var settingRender$6 = [
989
1069
  {
990
1070
  type: 'Text',
991
1071
  label: '组件名称',
@@ -1123,7 +1203,7 @@ var settingRender$5 = [
1123
1203
  * @Author: binruan@chatlabs.com
1124
1204
  * @Date: 2024-03-12 10:59:06
1125
1205
  * @LastEditors: binruan@chatlabs.com
1126
- * @LastEditTime: 2024-04-15 09:47:08
1206
+ * @LastEditTime: 2024-06-12 10:53:57
1127
1207
  * @FilePath: \pb-sxp-ui\src\core\hooks\useEventReport.ts
1128
1208
  *
1129
1209
  */
@@ -1193,9 +1273,21 @@ function useEventReport() {
1193
1273
  }
1194
1274
  });
1195
1275
  }, [bffEventReport, popupDetailData]);
1276
+ const backMainFeed = useCallback((lastFeed, themeTag, hashTag) => {
1277
+ bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
1278
+ eventInfo: {
1279
+ lastFeed,
1280
+ themeTags: themeTag ? `[${themeTag}]` : '',
1281
+ hashTags: hashTag ? `[${hashTag}]` : '',
1282
+ eventSubject: 'backMainFeed',
1283
+ eventDescription: 'back Main Feed'
1284
+ }
1285
+ });
1286
+ }, [bffEventReport]);
1196
1287
  return {
1197
1288
  jumpToWeb,
1198
- productView
1289
+ productView,
1290
+ backMainFeed
1199
1291
  };
1200
1292
  }
1201
1293
 
@@ -1300,7 +1392,7 @@ const AppointForm = createMaterial(AppointFormComponent, {
1300
1392
  category: 'popup',
1301
1393
  type: 'AppointForm',
1302
1394
  related: {
1303
- settingRender: settingRender$5,
1395
+ settingRender: settingRender$6,
1304
1396
  bindableProps: [],
1305
1397
  interactionRender: interactionRender$8
1306
1398
  },
@@ -1326,7 +1418,7 @@ const AppointForm = createMaterial(AppointFormComponent, {
1326
1418
  });
1327
1419
 
1328
1420
  var _a$4, _b$4;
1329
- var settingRender$4 = [
1421
+ var settingRender$5 = [
1330
1422
  {
1331
1423
  title: '商品图片',
1332
1424
  child: [
@@ -2985,7 +3077,7 @@ function Scrollbar(_ref) {
2985
3077
  dragEl
2986
3078
  } = scrollbar;
2987
3079
  if (!isTouched) return;
2988
- if (e.preventDefault) e.preventDefault();else e.returnValue = false;
3080
+ if (e.preventDefault && e.cancelable) e.preventDefault();else e.returnValue = false;
2989
3081
  setDragPosition(e);
2990
3082
  wrapperEl.style.transitionDuration = '0ms';
2991
3083
  el.style.transitionDuration = '0ms';
@@ -3212,7 +3304,7 @@ function Autoplay(_ref) {
3212
3304
  if (!swiper || swiper.destroyed || !swiper.wrapperEl) return;
3213
3305
  if (e.target !== swiper.wrapperEl) return;
3214
3306
  swiper.wrapperEl.removeEventListener('transitionend', onTransitionEnd);
3215
- if (pausedByPointerEnter) {
3307
+ if (pausedByPointerEnter || e.detail && e.detail.bySwiperTouchMove) {
3216
3308
  return;
3217
3309
  }
3218
3310
  resume();
@@ -3383,8 +3475,10 @@ function Autoplay(_ref) {
3383
3475
  }
3384
3476
  };
3385
3477
  const detachMouseEvents = () => {
3386
- swiper.el.removeEventListener('pointerenter', onPointerEnter);
3387
- swiper.el.removeEventListener('pointerleave', onPointerLeave);
3478
+ if (swiper.el && typeof swiper.el !== 'string') {
3479
+ swiper.el.removeEventListener('pointerenter', onPointerEnter);
3480
+ swiper.el.removeEventListener('pointerleave', onPointerLeave);
3481
+ }
3388
3482
  };
3389
3483
  const attachDocumentEvents = () => {
3390
3484
  const document = getDocument();
@@ -4306,8 +4400,9 @@ function updateSlides() {
4306
4400
  allSlidesSize += slideSizeValue + (spaceBetween || 0);
4307
4401
  });
4308
4402
  allSlidesSize -= spaceBetween;
4309
- if (allSlidesSize < swiperSize) {
4310
- const allSlidesOffset = (swiperSize - allSlidesSize) / 2;
4403
+ const offsetSize = (params.slidesOffsetBefore || 0) + (params.slidesOffsetAfter || 0);
4404
+ if (allSlidesSize + offsetSize < swiperSize) {
4405
+ const allSlidesOffset = (swiperSize - allSlidesSize - offsetSize) / 2;
4311
4406
  snapGrid.forEach((snap, snapIndex) => {
4312
4407
  snapGrid[snapIndex] = snap - allSlidesOffset;
4313
4408
  });
@@ -4411,6 +4506,13 @@ function updateSlidesOffset() {
4411
4506
  }
4412
4507
  }
4413
4508
 
4509
+ const toggleSlideClasses$1 = (slideEl, condition, className) => {
4510
+ if (condition && !slideEl.classList.contains(className)) {
4511
+ slideEl.classList.add(className);
4512
+ } else if (!condition && slideEl.classList.contains(className)) {
4513
+ slideEl.classList.remove(className);
4514
+ }
4515
+ };
4414
4516
  function updateSlidesProgress(translate) {
4415
4517
  if (translate === void 0) {
4416
4518
  translate = this && this.translate || 0;
@@ -4426,11 +4528,6 @@ function updateSlidesProgress(translate) {
4426
4528
  if (typeof slides[0].swiperSlideOffset === 'undefined') swiper.updateSlidesOffset();
4427
4529
  let offsetCenter = -translate;
4428
4530
  if (rtl) offsetCenter = translate;
4429
-
4430
- // Visible Slides
4431
- slides.forEach(slideEl => {
4432
- slideEl.classList.remove(params.slideVisibleClass, params.slideFullyVisibleClass);
4433
- });
4434
4531
  swiper.visibleSlidesIndexes = [];
4435
4532
  swiper.visibleSlides = [];
4436
4533
  let spaceBetween = params.spaceBetween;
@@ -4454,11 +4551,9 @@ function updateSlidesProgress(translate) {
4454
4551
  if (isVisible) {
4455
4552
  swiper.visibleSlides.push(slide);
4456
4553
  swiper.visibleSlidesIndexes.push(i);
4457
- slides[i].classList.add(params.slideVisibleClass);
4458
- }
4459
- if (isFullyVisible) {
4460
- slides[i].classList.add(params.slideFullyVisibleClass);
4461
4554
  }
4555
+ toggleSlideClasses$1(slide, isVisible, params.slideVisibleClass);
4556
+ toggleSlideClasses$1(slide, isFullyVisible, params.slideFullyVisibleClass);
4462
4557
  slide.progress = rtl ? -slideProgress : slideProgress;
4463
4558
  slide.originalProgress = rtl ? -originalSlideProgress : originalSlideProgress;
4464
4559
  }
@@ -4527,6 +4622,13 @@ function updateProgress(translate) {
4527
4622
  swiper.emit('progress', progress);
4528
4623
  }
4529
4624
 
4625
+ const toggleSlideClasses = (slideEl, condition, className) => {
4626
+ if (condition && !slideEl.classList.contains(className)) {
4627
+ slideEl.classList.add(className);
4628
+ } else if (!condition && slideEl.classList.contains(className)) {
4629
+ slideEl.classList.remove(className);
4630
+ }
4631
+ };
4530
4632
  function updateSlidesClasses() {
4531
4633
  const swiper = this;
4532
4634
  const {
@@ -4540,9 +4642,6 @@ function updateSlidesClasses() {
4540
4642
  const getFilteredSlide = selector => {
4541
4643
  return elementChildren(slidesEl, `.${params.slideClass}${selector}, swiper-slide${selector}`)[0];
4542
4644
  };
4543
- slides.forEach(slideEl => {
4544
- slideEl.classList.remove(params.slideActiveClass, params.slideNextClass, params.slidePrevClass);
4545
- });
4546
4645
  let activeSlide;
4547
4646
  let prevSlide;
4548
4647
  let nextSlide;
@@ -4565,35 +4664,25 @@ function updateSlidesClasses() {
4565
4664
  }
4566
4665
  }
4567
4666
  if (activeSlide) {
4568
- // Active classes
4569
- activeSlide.classList.add(params.slideActiveClass);
4570
- if (gridEnabled) {
4571
- if (nextSlide) {
4572
- nextSlide.classList.add(params.slideNextClass);
4573
- }
4574
- if (prevSlide) {
4575
- prevSlide.classList.add(params.slidePrevClass);
4576
- }
4577
- } else {
4667
+ if (!gridEnabled) {
4578
4668
  // Next Slide
4579
4669
  nextSlide = elementNextAll(activeSlide, `.${params.slideClass}, swiper-slide`)[0];
4580
4670
  if (params.loop && !nextSlide) {
4581
4671
  nextSlide = slides[0];
4582
4672
  }
4583
- if (nextSlide) {
4584
- nextSlide.classList.add(params.slideNextClass);
4585
- }
4586
4673
 
4587
4674
  // Prev Slide
4588
4675
  prevSlide = elementPrevAll(activeSlide, `.${params.slideClass}, swiper-slide`)[0];
4589
4676
  if (params.loop && !prevSlide === 0) {
4590
4677
  prevSlide = slides[slides.length - 1];
4591
4678
  }
4592
- if (prevSlide) {
4593
- prevSlide.classList.add(params.slidePrevClass);
4594
- }
4595
4679
  }
4596
4680
  }
4681
+ slides.forEach(slideEl => {
4682
+ toggleSlideClasses(slideEl, slideEl === activeSlide, params.slideActiveClass);
4683
+ toggleSlideClasses(slideEl, slideEl === nextSlide, params.slideNextClass);
4684
+ toggleSlideClasses(slideEl, slideEl === prevSlide, params.slidePrevClass);
4685
+ });
4597
4686
  swiper.emitSlidesClasses();
4598
4687
  }
4599
4688
 
@@ -4971,6 +5060,7 @@ function translateTo(translate, speed, runCallbacks, translateBounds, internal)
4971
5060
  swiper.wrapperEl.removeEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd);
4972
5061
  swiper.onTranslateToWrapperTransitionEnd = null;
4973
5062
  delete swiper.onTranslateToWrapperTransitionEnd;
5063
+ swiper.animating = false;
4974
5064
  if (runCallbacks) {
4975
5065
  swiper.emit('transitionEnd');
4976
5066
  }
@@ -5078,9 +5168,6 @@ function slideTo(index, speed, runCallbacks, internal, initial) {
5078
5168
  if (index === void 0) {
5079
5169
  index = 0;
5080
5170
  }
5081
- if (speed === void 0) {
5082
- speed = this.params.speed;
5083
- }
5084
5171
  if (runCallbacks === void 0) {
5085
5172
  runCallbacks = true;
5086
5173
  }
@@ -5100,9 +5187,12 @@ function slideTo(index, speed, runCallbacks, internal, initial) {
5100
5187
  wrapperEl,
5101
5188
  enabled
5102
5189
  } = swiper;
5103
- if (swiper.animating && params.preventInteractionOnTransition || !enabled && !internal && !initial || swiper.destroyed) {
5190
+ if (!enabled && !internal && !initial || swiper.destroyed || swiper.animating && params.preventInteractionOnTransition) {
5104
5191
  return false;
5105
5192
  }
5193
+ if (typeof speed === 'undefined') {
5194
+ speed = swiper.params.speed;
5195
+ }
5106
5196
  const skip = Math.min(swiper.params.slidesPerGroupSkip, slideIndex);
5107
5197
  let snapIndex = skip + Math.floor((slideIndex - skip) / swiper.params.slidesPerGroup);
5108
5198
  if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1;
@@ -5229,9 +5319,6 @@ function slideToLoop(index, speed, runCallbacks, internal) {
5229
5319
  if (index === void 0) {
5230
5320
  index = 0;
5231
5321
  }
5232
- if (speed === void 0) {
5233
- speed = this.params.speed;
5234
- }
5235
5322
  if (runCallbacks === void 0) {
5236
5323
  runCallbacks = true;
5237
5324
  }
@@ -5241,6 +5328,9 @@ function slideToLoop(index, speed, runCallbacks, internal) {
5241
5328
  }
5242
5329
  const swiper = this;
5243
5330
  if (swiper.destroyed) return;
5331
+ if (typeof speed === 'undefined') {
5332
+ speed = swiper.params.speed;
5333
+ }
5244
5334
  const gridEnabled = swiper.grid && swiper.params.grid && swiper.params.grid.rows > 1;
5245
5335
  let newIndex = index;
5246
5336
  if (swiper.params.loop) {
@@ -5272,6 +5362,9 @@ function slideToLoop(index, speed, runCallbacks, internal) {
5272
5362
  if (centeredSlides) {
5273
5363
  needLoopFix = needLoopFix || targetSlideIndex < Math.ceil(slidesPerView / 2);
5274
5364
  }
5365
+ if (internal && centeredSlides && swiper.params.slidesPerView !== 'auto' && !gridEnabled) {
5366
+ needLoopFix = false;
5367
+ }
5275
5368
  if (needLoopFix) {
5276
5369
  const direction = centeredSlides ? targetSlideIndex < swiper.activeIndex ? 'prev' : 'next' : targetSlideIndex - swiper.activeIndex - 1 < swiper.params.slidesPerView ? 'next' : 'prev';
5277
5370
  swiper.loopFix({
@@ -5297,9 +5390,6 @@ function slideToLoop(index, speed, runCallbacks, internal) {
5297
5390
 
5298
5391
  /* eslint no-unused-vars: "off" */
5299
5392
  function slideNext(speed, runCallbacks, internal) {
5300
- if (speed === void 0) {
5301
- speed = this.params.speed;
5302
- }
5303
5393
  if (runCallbacks === void 0) {
5304
5394
  runCallbacks = true;
5305
5395
  }
@@ -5310,6 +5400,9 @@ function slideNext(speed, runCallbacks, internal) {
5310
5400
  animating
5311
5401
  } = swiper;
5312
5402
  if (!enabled || swiper.destroyed) return swiper;
5403
+ if (typeof speed === 'undefined') {
5404
+ speed = swiper.params.speed;
5405
+ }
5313
5406
  let perGroup = params.slidesPerGroup;
5314
5407
  if (params.slidesPerView === 'auto' && params.slidesPerGroup === 1 && params.slidesPerGroupAuto) {
5315
5408
  perGroup = Math.max(swiper.slidesPerViewDynamic('current', true), 1);
@@ -5338,9 +5431,6 @@ function slideNext(speed, runCallbacks, internal) {
5338
5431
 
5339
5432
  /* eslint no-unused-vars: "off" */
5340
5433
  function slidePrev(speed, runCallbacks, internal) {
5341
- if (speed === void 0) {
5342
- speed = this.params.speed;
5343
- }
5344
5434
  if (runCallbacks === void 0) {
5345
5435
  runCallbacks = true;
5346
5436
  }
@@ -5354,6 +5444,9 @@ function slidePrev(speed, runCallbacks, internal) {
5354
5444
  animating
5355
5445
  } = swiper;
5356
5446
  if (!enabled || swiper.destroyed) return swiper;
5447
+ if (typeof speed === 'undefined') {
5448
+ speed = swiper.params.speed;
5449
+ }
5357
5450
  const isVirtual = swiper.virtual && params.virtual.enabled;
5358
5451
  if (params.loop) {
5359
5452
  if (animating && !isVirtual && params.loopPreventsSliding) return false;
@@ -5406,22 +5499,19 @@ function slidePrev(speed, runCallbacks, internal) {
5406
5499
 
5407
5500
  /* eslint no-unused-vars: "off" */
5408
5501
  function slideReset(speed, runCallbacks, internal) {
5409
- if (speed === void 0) {
5410
- speed = this.params.speed;
5411
- }
5412
5502
  if (runCallbacks === void 0) {
5413
5503
  runCallbacks = true;
5414
5504
  }
5415
5505
  const swiper = this;
5416
5506
  if (swiper.destroyed) return;
5507
+ if (typeof speed === 'undefined') {
5508
+ speed = swiper.params.speed;
5509
+ }
5417
5510
  return swiper.slideTo(swiper.activeIndex, speed, runCallbacks, internal);
5418
5511
  }
5419
5512
 
5420
5513
  /* eslint no-unused-vars: "off" */
5421
5514
  function slideToClosest(speed, runCallbacks, internal, threshold) {
5422
- if (speed === void 0) {
5423
- speed = this.params.speed;
5424
- }
5425
5515
  if (runCallbacks === void 0) {
5426
5516
  runCallbacks = true;
5427
5517
  }
@@ -5430,6 +5520,9 @@ function slideToClosest(speed, runCallbacks, internal, threshold) {
5430
5520
  }
5431
5521
  const swiper = this;
5432
5522
  if (swiper.destroyed) return;
5523
+ if (typeof speed === 'undefined') {
5524
+ speed = swiper.params.speed;
5525
+ }
5433
5526
  let index = swiper.activeIndex;
5434
5527
  const skip = Math.min(swiper.params.slidesPerGroupSkip, index);
5435
5528
  const snapIndex = skip + Math.floor((index - skip) / swiper.params.slidesPerGroup);
@@ -6064,7 +6157,7 @@ function onTouchMove(event) {
6064
6157
  data.startMoving = true;
6065
6158
  }
6066
6159
  }
6067
- if (data.isScrolling) {
6160
+ if (data.isScrolling || e.type === 'touchmove' && data.preventTouchMoveFromPointerMove) {
6068
6161
  data.isTouched = false;
6069
6162
  return;
6070
6163
  }
@@ -6106,7 +6199,10 @@ function onTouchMove(event) {
6106
6199
  if (swiper.animating) {
6107
6200
  const evt = new window.CustomEvent('transitionend', {
6108
6201
  bubbles: true,
6109
- cancelable: true
6202
+ cancelable: true,
6203
+ detail: {
6204
+ bySwiperTouchMove: true
6205
+ }
6110
6206
  });
6111
6207
  swiper.wrapperEl.dispatchEvent(evt);
6112
6208
  }
@@ -6500,6 +6596,7 @@ const events = (swiper, method) => {
6500
6596
  const capture = !!params.nested;
6501
6597
  const domMethod = method === 'on' ? 'addEventListener' : 'removeEventListener';
6502
6598
  const swiperMethod = method;
6599
+ if (!el || typeof el === 'string') return;
6503
6600
 
6504
6601
  // Touch Events
6505
6602
  document[domMethod]('touchstart', swiper.onDocumentTouchStart, {
@@ -6608,6 +6705,8 @@ function setBreakpoint() {
6608
6705
  const breakpointParams = breakpointOnlyParams || swiper.originalParams;
6609
6706
  const wasMultiRow = isGridEnabled(swiper, params);
6610
6707
  const isMultiRow = isGridEnabled(swiper, breakpointParams);
6708
+ const wasGrabCursor = swiper.params.grabCursor;
6709
+ const isGrabCursor = breakpointParams.grabCursor;
6611
6710
  const wasEnabled = params.enabled;
6612
6711
  if (wasMultiRow && !isMultiRow) {
6613
6712
  el.classList.remove(`${params.containerModifierClass}grid`, `${params.containerModifierClass}grid-column`);
@@ -6619,6 +6718,11 @@ function setBreakpoint() {
6619
6718
  }
6620
6719
  swiper.emitContainerClasses();
6621
6720
  }
6721
+ if (wasGrabCursor && !isGrabCursor) {
6722
+ swiper.unsetGrabCursor();
6723
+ } else if (!wasGrabCursor && isGrabCursor) {
6724
+ swiper.setGrabCursor();
6725
+ }
6622
6726
 
6623
6727
  // Toggle navigation, pagination, scrollbar
6624
6728
  ['navigation', 'pagination', 'scrollbar'].forEach(prop => {
@@ -6769,6 +6873,7 @@ function removeClasses() {
6769
6873
  el,
6770
6874
  classNames
6771
6875
  } = swiper;
6876
+ if (!el || typeof el === 'string') return;
6772
6877
  el.classList.remove(...classNames);
6773
6878
  swiper.emitContainerClasses();
6774
6879
  }
@@ -7533,8 +7638,12 @@ let Swiper$1 = class Swiper {
7533
7638
  // Cleanup styles
7534
7639
  if (cleanStyles) {
7535
7640
  swiper.removeClasses();
7536
- el.removeAttribute('style');
7537
- wrapperEl.removeAttribute('style');
7641
+ if (el && typeof el !== 'string') {
7642
+ el.removeAttribute('style');
7643
+ }
7644
+ if (wrapperEl) {
7645
+ wrapperEl.removeAttribute('style');
7646
+ }
7538
7647
  if (slides && slides.length) {
7539
7648
  slides.forEach(slideEl => {
7540
7649
  slideEl.classList.remove(params.slideVisibleClass, params.slideFullyVisibleClass, params.slideActiveClass, params.slideNextClass, params.slidePrevClass);
@@ -7550,7 +7659,9 @@ let Swiper$1 = class Swiper {
7550
7659
  swiper.off(eventName);
7551
7660
  });
7552
7661
  if (deleteInstance !== false) {
7553
- swiper.el.swiper = null;
7662
+ if (swiper.el && typeof swiper.el !== 'string') {
7663
+ swiper.el.swiper = null;
7664
+ }
7554
7665
  deleteProps(swiper);
7555
7666
  }
7556
7667
  swiper.destroyed = true;
@@ -7944,7 +8055,7 @@ const updateOnVirtualData = swiper => {
7944
8055
  };
7945
8056
 
7946
8057
  /**
7947
- * Swiper React 11.0.7
8058
+ * Swiper React 11.1.4
7948
8059
  * Most modern mobile touch slider and framework with hardware accelerated transitions
7949
8060
  * https://swiperjs.com
7950
8061
  *
@@ -7952,7 +8063,7 @@ const updateOnVirtualData = swiper => {
7952
8063
  *
7953
8064
  * Released under the MIT License
7954
8065
  *
7955
- * Released on: February 27, 2024
8066
+ * Released on: May 30, 2024
7956
8067
  */
7957
8068
 
7958
8069
 
@@ -8640,7 +8751,7 @@ const CommodityDetail = createMaterial(CommodityDetailComponent, {
8640
8751
  category: 'popup',
8641
8752
  type: 'CommodityDetail',
8642
8753
  related: {
8643
- settingRender: settingRender$4
8754
+ settingRender: settingRender$5
8644
8755
  },
8645
8756
  defaulSetting: {
8646
8757
  props: {
@@ -8706,7 +8817,7 @@ var interactionRender$7 = [
8706
8817
  *
8707
8818
  */
8708
8819
  var _a$3, _b$3;
8709
- var settingRender$3 = [
8820
+ var settingRender$4 = [
8710
8821
  {
8711
8822
  title: '',
8712
8823
  child: [
@@ -8833,7 +8944,7 @@ const Prompt = createMaterial(PromptComponent, {
8833
8944
  category: 'popup',
8834
8945
  type: 'Prompt',
8835
8946
  related: {
8836
- settingRender: settingRender$3,
8947
+ settingRender: settingRender$4,
8837
8948
  bindableProps: [],
8838
8949
  interactionRender: interactionRender$7
8839
8950
  },
@@ -8859,7 +8970,7 @@ var _a$2, _b$2;
8859
8970
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetailDiroNew\settingRender.tsx
8860
8971
  *
8861
8972
  */
8862
- var settingRender$2 = [
8973
+ var settingRender$3 = [
8863
8974
  {
8864
8975
  title: '商品图片',
8865
8976
  child: [
@@ -9182,7 +9293,7 @@ const CommodityDetailDiroNew = createMaterial(CommodityDetailDiroNewComponent, {
9182
9293
  category: 'popup',
9183
9294
  type: 'CommodityDetailDiroNew',
9184
9295
  related: {
9185
- settingRender: settingRender$2
9296
+ settingRender: settingRender$3
9186
9297
  },
9187
9298
  defaulSetting: {
9188
9299
  props: {
@@ -9243,7 +9354,7 @@ var _a$1, _b$1;
9243
9354
  * @FilePath: \pb-sxp-ui\src\materials\sxp\template\components\settingRender.tsx
9244
9355
  *
9245
9356
  */
9246
- var settingRender$1 = [
9357
+ var settingRender$2 = [
9247
9358
  {
9248
9359
  title: '主题样式',
9249
9360
  child: [
@@ -9595,7 +9706,7 @@ const Commodity = createMaterial(CommodityComponent, {
9595
9706
  related: {
9596
9707
  interactionRender: interactionRender$6,
9597
9708
  bindableProps: [],
9598
- settingRender: settingRender$1
9709
+ settingRender: settingRender$2
9599
9710
  },
9600
9711
  defaulSetting: {
9601
9712
  props: {
@@ -9674,7 +9785,7 @@ const Appoint = createMaterial(AppointComponent, {
9674
9785
  type: 'Appoint',
9675
9786
  related: {
9676
9787
  interactionRender: interactionRender$5,
9677
- settingRender: settingRender$1 === null || settingRender$1 === void 0 ? void 0 : settingRender$1.filter((i) => i.type !== 'commodityTitle'),
9788
+ settingRender: settingRender$2 === null || settingRender$2 === void 0 ? void 0 : settingRender$2.filter((i) => i.type !== 'commodityTitle'),
9678
9789
  bindableProps: []
9679
9790
  },
9680
9791
  defaulSetting: {
@@ -9751,7 +9862,7 @@ const Link = createMaterial(LinkComponent, {
9751
9862
  category: 'template',
9752
9863
  type: 'Link',
9753
9864
  related: {
9754
- settingRender: settingRender$1 === null || settingRender$1 === void 0 ? void 0 : settingRender$1.filter((i) => i.type !== 'commodityTitle'),
9865
+ settingRender: settingRender$2 === null || settingRender$2 === void 0 ? void 0 : settingRender$2.filter((i) => i.type !== 'commodityTitle'),
9755
9866
  bindableProps: []
9756
9867
  },
9757
9868
  defaulSetting: {
@@ -9843,7 +9954,7 @@ const CommodityDiro = createMaterial(CommodityDiroComponent, {
9843
9954
  type: 'CommodityDiro',
9844
9955
  related: {
9845
9956
  interactionRender: interactionRender$4,
9846
- settingRender: settingRender$1,
9957
+ settingRender: settingRender$2,
9847
9958
  bindableProps: []
9848
9959
  },
9849
9960
  defaulSetting: {
@@ -9942,7 +10053,7 @@ const CommodityDiroNew = createMaterial(CommodityDiroNewComponent, {
9942
10053
  related: {
9943
10054
  interactionRender: interactionRender$3,
9944
10055
  bindableProps: [],
9945
- settingRender: settingRender$1
10056
+ settingRender: settingRender$2
9946
10057
  },
9947
10058
  defaulSetting: {
9948
10059
  props: {
@@ -10087,7 +10198,7 @@ const MultiCommodityDiro = createMaterial(MultiCommodityDiroComponent, {
10087
10198
  related: {
10088
10199
  interactionRender: interactionRender$2,
10089
10200
  bindableProps: [],
10090
- settingRender: settingRender$1
10201
+ settingRender: settingRender$2
10091
10202
  },
10092
10203
  defaulSetting: {
10093
10204
  props: {
@@ -10201,7 +10312,7 @@ const MultiCommodity = createMaterial(MultiCommodityComponent, {
10201
10312
  type: 'MultiCommodity',
10202
10313
  related: {
10203
10314
  interactionRender: interactionRender$1,
10204
- settingRender: settingRender$1,
10315
+ settingRender: settingRender$2,
10205
10316
  bindableProps: []
10206
10317
  },
10207
10318
  defaulSetting: {
@@ -10317,7 +10428,7 @@ const MultiCommodityDiroNew = createMaterial(MultiCommodityDiroNewComponent, {
10317
10428
  related: {
10318
10429
  interactionRender,
10319
10430
  bindableProps: [],
10320
- settingRender: settingRender$1
10431
+ settingRender: settingRender$2
10321
10432
  },
10322
10433
  defaulSetting: {
10323
10434
  props: {
@@ -10363,11 +10474,11 @@ var _a, _b;
10363
10474
  * @Author: binruan@chatlabs.com
10364
10475
  * @Date: 2024-04-07 14:07:12
10365
10476
  * @LastEditors: binruan@chatlabs.com
10366
- * @LastEditTime: 2024-06-07 15:51:49
10477
+ * @LastEditTime: 2024-06-11 11:04:55
10367
10478
  * @FilePath: \pb-sxp-ui\src\materials\sxp\HashTag\settingRender.tsx
10368
10479
  *
10369
10480
  */
10370
- var settingRender = [
10481
+ var settingRender$1 = [
10371
10482
  {
10372
10483
  title: 'Banner',
10373
10484
  child: [
@@ -10390,7 +10501,7 @@ var settingRender = [
10390
10501
  {
10391
10502
  type: 'Switch',
10392
10503
  label: '固定宽高',
10393
- name: ['props', 'isWaterfallFlow'],
10504
+ name: ['props', 'openFixedSize'],
10394
10505
  initialValue: true
10395
10506
  }
10396
10507
  ]
@@ -12000,8 +12111,8 @@ const WaterfallFlowItem$1 = (props) => {
12000
12111
  React.createElement("div", { className: 'waterFallList-content-listItem-info-price', hidden: !priceText, style: textStyles.price }, priceText))));
12001
12112
  };
12002
12113
  function WaterfallList$1(_a) {
12003
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
12004
- var { reportTagsView } = _a, props = __rest(_a, ["reportTagsView"]);
12114
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
12115
+ var { reportTagsView, showBanner } = _a, props = __rest(_a, ["reportTagsView", "showBanner"]);
12005
12116
  const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag } = useSxpDataSource();
12006
12117
  /** 滚动的父元素 */
12007
12118
  const scrollParent = useRef(null);
@@ -12205,25 +12316,30 @@ function WaterfallList$1(_a) {
12205
12316
  return (React.createElement(React.Fragment, null, isLoadingData ? (React.createElement("div", { style: { height: '100%', width: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' } },
12206
12317
  React.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } }))) : (React.createElement("div", { className: 'waterFallList', ref: waterfallFlowDom },
12207
12318
  React.createElement("div", { className: 'waterFallList-scroll', ref: scrollParent },
12208
- React.createElement("div", { className: 'waterFallList-info', style: (_b = props === null || props === void 0 ? void 0 : props.textStyles) === null || _b === void 0 ? void 0 : _b.hashTagDesc }, (_c = data === null || data === void 0 ? void 0 : data.tag) === null || _c === void 0 ? void 0 : _c.info),
12209
- React.createElement("div", { hidden: !((_d = data === null || data === void 0 ? void 0 : data.tag) === null || _d === void 0 ? void 0 : _d.link), className: 'waterFallList-collection', style: Object.assign({}, (_e = props === null || props === void 0 ? void 0 : props.textStyles) === null || _e === void 0 ? void 0 : _e.hashTagLink), onClick: handleClickLink }, ((_f = data === null || data === void 0 ? void 0 : data.tag) === null || _f === void 0 ? void 0 : _f.linkTitle) || 'Shop the collection'),
12319
+ showBanner && ((_b = data === null || data === void 0 ? void 0 : data.tag) === null || _b === void 0 ? void 0 : _b.picture) && (React.createElement(FormatImage$1, { className: css({
12320
+ width: '100%',
12321
+ objectFit: 'cover',
12322
+ marginBottom: '20px'
12323
+ }), src: (_c = data === null || data === void 0 ? void 0 : data.tag) === null || _c === void 0 ? void 0 : _c.picture })),
12324
+ React.createElement("div", { className: 'waterFallList-info', style: (_d = props === null || props === void 0 ? void 0 : props.textStyles) === null || _d === void 0 ? void 0 : _d.hashTagDesc }, (_e = data === null || data === void 0 ? void 0 : data.tag) === null || _e === void 0 ? void 0 : _e.info),
12325
+ React.createElement("div", { hidden: !((_f = data === null || data === void 0 ? void 0 : data.tag) === null || _f === void 0 ? void 0 : _f.link), className: 'waterFallList-collection', style: Object.assign({}, (_g = props === null || props === void 0 ? void 0 : props.textStyles) === null || _g === void 0 ? void 0 : _g.hashTagLink), onClick: handleClickLink }, ((_h = data === null || data === void 0 ? void 0 : data.tag) === null || _h === void 0 ? void 0 : _h.linkTitle) || 'Shop the collection'),
12210
12326
  React.createElement("div", { className: 'waterFallList-content' }, list === null || list === void 0 ? void 0 :
12211
12327
  list.map((item, ind) => {
12212
12328
  var _a;
12213
12329
  return (React.createElement(WaterfallFlowItem$1, Object.assign({ key: ind, index: ind, rec: item, list: list, showBorder: scrollTop + ((_a = scrollParent === null || scrollParent === void 0 ? void 0 : scrollParent.current) === null || _a === void 0 ? void 0 : _a.clientHeight), style: styleList[ind], sizeChange: onSizeChange, unitWidth: unitWidth, reportTagsView: reportTagsView }, props)));
12214
12330
  }),
12215
- React.createElement("div", { hidden: !((_g = data === null || data === void 0 ? void 0 : data.tag) === null || _g === void 0 ? void 0 : _g.link), style: {
12331
+ React.createElement("div", { hidden: !((_j = data === null || data === void 0 ? void 0 : data.tag) === null || _j === void 0 ? void 0 : _j.link), style: {
12216
12332
  position: 'absolute',
12217
12333
  width: '100%',
12218
- transform: `translate(0px,${(_m = ((_j = waterfallFlowListInfo === null || waterfallFlowListInfo === void 0 ? void 0 : waterfallFlowListInfo.current[((_h = waterfallFlowListInfo === null || waterfallFlowListInfo === void 0 ? void 0 : waterfallFlowListInfo.current) === null || _h === void 0 ? void 0 : _h.length) - 1]) === null || _j === void 0 ? void 0 : _j.top) +
12219
- ((_l = waterfallFlowListInfo === null || waterfallFlowListInfo === void 0 ? void 0 : waterfallFlowListInfo.current[((_k = waterfallFlowListInfo === null || waterfallFlowListInfo === void 0 ? void 0 : waterfallFlowListInfo.current) === null || _k === void 0 ? void 0 : _k.length) - 1]) === null || _l === void 0 ? void 0 : _l.height)) !== null && _m !== void 0 ? _m : 0}px)`,
12220
- height: ((_o = data === null || data === void 0 ? void 0 : data.tag) === null || _o === void 0 ? void 0 : _o.link)
12221
- ? ((_p = buttonRef === null || buttonRef === void 0 ? void 0 : buttonRef.current) === null || _p === void 0 ? void 0 : _p.offsetHeight) || ((_q = props === null || props === void 0 ? void 0 : props.buttonBgStyle) === null || _q === void 0 ? void 0 : _q.height) || '100px'
12334
+ transform: `translate(0px,${(_p = ((_l = waterfallFlowListInfo === null || waterfallFlowListInfo === void 0 ? void 0 : waterfallFlowListInfo.current[((_k = waterfallFlowListInfo === null || waterfallFlowListInfo === void 0 ? void 0 : waterfallFlowListInfo.current) === null || _k === void 0 ? void 0 : _k.length) - 1]) === null || _l === void 0 ? void 0 : _l.top) +
12335
+ ((_o = waterfallFlowListInfo === null || waterfallFlowListInfo === void 0 ? void 0 : waterfallFlowListInfo.current[((_m = waterfallFlowListInfo === null || waterfallFlowListInfo === void 0 ? void 0 : waterfallFlowListInfo.current) === null || _m === void 0 ? void 0 : _m.length) - 1]) === null || _o === void 0 ? void 0 : _o.height)) !== null && _p !== void 0 ? _p : 0}px)`,
12336
+ height: ((_q = data === null || data === void 0 ? void 0 : data.tag) === null || _q === void 0 ? void 0 : _q.link)
12337
+ ? ((_r = buttonRef === null || buttonRef === void 0 ? void 0 : buttonRef.current) === null || _r === void 0 ? void 0 : _r.offsetHeight) || ((_s = props === null || props === void 0 ? void 0 : props.buttonBgStyle) === null || _s === void 0 ? void 0 : _s.height) || '100px'
12222
12338
  : 0
12223
12339
  } }))),
12224
- React.createElement("div", { className: 'waterFallList-bottom', hidden: !((_r = data === null || data === void 0 ? void 0 : data.tag) === null || _r === void 0 ? void 0 : _r.link), style: props === null || props === void 0 ? void 0 : props.buttonBgStyle }),
12225
- React.createElement("div", { ref: buttonRef, hidden: !((_s = data === null || data === void 0 ? void 0 : data.tag) === null || _s === void 0 ? void 0 : _s.link), className: 'waterFallList-btn-wrap', style: Object.assign(Object.assign({}, props === null || props === void 0 ? void 0 : props.buttonBgStyle), { height: 'auto', backgroundColor: 'transparent' }) },
12226
- React.createElement("button", { className: 'waterFallList-btn', style: props === null || props === void 0 ? void 0 : props.buttonStyle, onClick: handleClickLink }, ((_t = data === null || data === void 0 ? void 0 : data.tag) === null || _t === void 0 ? void 0 : _t.linkTitle) || 'Shop the collection'))))));
12340
+ React.createElement("div", { className: 'waterFallList-bottom', hidden: !((_t = data === null || data === void 0 ? void 0 : data.tag) === null || _t === void 0 ? void 0 : _t.link), style: props === null || props === void 0 ? void 0 : props.buttonBgStyle }),
12341
+ React.createElement("div", { ref: buttonRef, hidden: !((_u = data === null || data === void 0 ? void 0 : data.tag) === null || _u === void 0 ? void 0 : _u.link), className: 'waterFallList-btn-wrap', style: Object.assign(Object.assign({}, props === null || props === void 0 ? void 0 : props.buttonBgStyle), { height: 'auto', backgroundColor: 'transparent' }) },
12342
+ React.createElement("button", { className: 'waterFallList-btn', style: props === null || props === void 0 ? void 0 : props.buttonStyle, onClick: handleClickLink }, ((_v = data === null || data === void 0 ? void 0 : data.tag) === null || _v === void 0 ? void 0 : _v.linkTitle) || 'Shop the collection'))))));
12227
12343
  }
12228
12344
 
12229
12345
  var img$1 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAAAaZJREFUeF7t2jFKBEEQRuG3mSJeQTARURDMTL2EqXfwAnoKD6FHMDEzNVIw2tzQC2gFggyDrExX1V92T7wz9PumFnqbXdH5teq8nwEwJqBzgfEVKDYAW8Ae8NZq3ZUm4Aa4AnaBR+C8BUIVAIu/ngSfAs9LESoAWLgB/LzWwP7SeLtfHWAu3tZ9Adz/dwD3eOUJCIlXBQiLVwQIjVcDCI9XAkiJVwFIi1cASI3PBpjb3jbd5GyyUcraCUrEZ02ATHwGgFR8NIBcfCSAZHwUgGx8BIB0vDeAfLwnQIl4L4Ay8R4ApeJbA2wD78DOZA/e7ABzk739Xz/T8rfAIfA6WYCd3BqA7NUSwCKfgLNKCK0BjoC7rzP74yoIrQGsuxSCB0ApBC+AMgieACUQvAHkESIApBGiAGQRIgEkEaIB5BAyAKQQsgBkEDIBJBCyAdIRFABSEVQA0hCUAFIQ1ADCERQBQhFUAcIQlAFCENQBfkOwg9eXpeftFQDmEOzv8ifARy8A3wiXwAHwANwujbf7q0xAi9bZZwwAN9oiDx4TUORFuS2z+wn4BAiAaEHnKChjAAAAAElFTkSuQmCC";
@@ -12352,8 +12468,8 @@ const WaterfallFlowItem = (props) => {
12352
12468
  React.createElement("div", { className: 'list-content-listItem-info-price', style: textStyles === null || textStyles === void 0 ? void 0 : textStyles.price, hidden: !priceText }, priceText))));
12353
12469
  };
12354
12470
  function WaterfallList(_a) {
12355
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
12356
- var { reportTagsView } = _a, props = __rest(_a, ["reportTagsView"]);
12471
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
12472
+ var { reportTagsView, showBanner } = _a, props = __rest(_a, ["reportTagsView", "showBanner"]);
12357
12473
  const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag } = useSxpDataSource();
12358
12474
  const [list, setList] = useState();
12359
12475
  const [data, setData] = useState();
@@ -12424,31 +12540,37 @@ function WaterfallList(_a) {
12424
12540
  return (React.createElement(React.Fragment, null, isLoadingData ? (React.createElement("div", { style: { height: '100%', width: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' } },
12425
12541
  React.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } }))) : (React.createElement("div", { className: 'list' },
12426
12542
  React.createElement("div", { className: 'list-scroll', ref: containerRef },
12427
- React.createElement("div", { className: 'list-info', style: (_b = props === null || props === void 0 ? void 0 : props.textStyles) === null || _b === void 0 ? void 0 : _b.hashTagDesc }, (_c = data === null || data === void 0 ? void 0 : data.tag) === null || _c === void 0 ? void 0 : _c.info),
12428
- React.createElement("div", { hidden: !((_d = data === null || data === void 0 ? void 0 : data.tag) === null || _d === void 0 ? void 0 : _d.link), className: 'list-collection', onClick: handleClickLink, style: Object.assign(Object.assign({}, (_e = props === null || props === void 0 ? void 0 : props.textStyles) === null || _e === void 0 ? void 0 : _e.hashTagLink), { marginBottom: props === null || props === void 0 ? void 0 : props.space }) }, ((_f = data === null || data === void 0 ? void 0 : data.tag) === null || _f === void 0 ? void 0 : _f.linkTitle) || 'Shop the collection'),
12543
+ showBanner && ((_b = data === null || data === void 0 ? void 0 : data.tag) === null || _b === void 0 ? void 0 : _b.picture) && (React.createElement(FormatImage$1, { className: css({
12544
+ width: '100%',
12545
+ objectFit: 'cover',
12546
+ marginBottom: '20px'
12547
+ }), src: (_c = data === null || data === void 0 ? void 0 : data.tag) === null || _c === void 0 ? void 0 : _c.picture })),
12548
+ React.createElement("div", { className: 'list-info', style: (_d = props === null || props === void 0 ? void 0 : props.textStyles) === null || _d === void 0 ? void 0 : _d.hashTagDesc }, (_e = data === null || data === void 0 ? void 0 : data.tag) === null || _e === void 0 ? void 0 : _e.info),
12549
+ React.createElement("div", { hidden: !((_f = data === null || data === void 0 ? void 0 : data.tag) === null || _f === void 0 ? void 0 : _f.link), className: 'list-collection', onClick: handleClickLink, style: Object.assign(Object.assign({}, (_g = props === null || props === void 0 ? void 0 : props.textStyles) === null || _g === void 0 ? void 0 : _g.hashTagLink), { marginBottom: props === null || props === void 0 ? void 0 : props.space }) }, ((_h = data === null || data === void 0 ? void 0 : data.tag) === null || _h === void 0 ? void 0 : _h.linkTitle) || 'Shop the collection'),
12429
12550
  React.createElement("div", { className: 'list-content' }, list === null || list === void 0 ? void 0 : list.map((item, ind) => {
12430
12551
  return (React.createElement(WaterfallFlowItem, Object.assign({ key: ind, index: ind, rec: item, list: list, reportTagsView: reportTagsView }, props)));
12431
12552
  })),
12432
12553
  React.createElement("div", { hidden: !isLoadMore, style: { textAlign: 'center' } }, "loading..."),
12433
- React.createElement("div", { hidden: !((_g = data === null || data === void 0 ? void 0 : data.tag) === null || _g === void 0 ? void 0 : _g.link), style: {
12434
- height: ((_h = data === null || data === void 0 ? void 0 : data.tag) === null || _h === void 0 ? void 0 : _h.link) ? ((_j = props === null || props === void 0 ? void 0 : props.buttonBgStyle) === null || _j === void 0 ? void 0 : _j.height) || ((_k = props === null || props === void 0 ? void 0 : props.buttonStyle) === null || _k === void 0 ? void 0 : _k.height) || '100px' : 0
12554
+ React.createElement("div", { hidden: !((_j = data === null || data === void 0 ? void 0 : data.tag) === null || _j === void 0 ? void 0 : _j.link), style: {
12555
+ height: ((_k = data === null || data === void 0 ? void 0 : data.tag) === null || _k === void 0 ? void 0 : _k.link) ? ((_l = props === null || props === void 0 ? void 0 : props.buttonBgStyle) === null || _l === void 0 ? void 0 : _l.height) || ((_m = props === null || props === void 0 ? void 0 : props.buttonStyle) === null || _m === void 0 ? void 0 : _m.height) || '100px' : 0
12435
12556
  } })),
12436
- React.createElement("div", { className: 'list-bottom', hidden: !((_l = data === null || data === void 0 ? void 0 : data.tag) === null || _l === void 0 ? void 0 : _l.link), style: props === null || props === void 0 ? void 0 : props.buttonBgStyle }),
12437
- React.createElement("div", { hidden: !((_m = data === null || data === void 0 ? void 0 : data.tag) === null || _m === void 0 ? void 0 : _m.link), className: 'list-btn-wrap', style: Object.assign(Object.assign({}, props === null || props === void 0 ? void 0 : props.buttonBgStyle), { height: 'auto', backgroundColor: 'transparent' }) },
12438
- React.createElement("button", { className: 'list-btn', style: props === null || props === void 0 ? void 0 : props.buttonStyle, onClick: handleClickLink }, ((_o = data === null || data === void 0 ? void 0 : data.tag) === null || _o === void 0 ? void 0 : _o.linkTitle) || 'Shop the collection'))))));
12557
+ React.createElement("div", { className: 'list-bottom', hidden: !((_o = data === null || data === void 0 ? void 0 : data.tag) === null || _o === void 0 ? void 0 : _o.link), style: props === null || props === void 0 ? void 0 : props.buttonBgStyle }),
12558
+ React.createElement("div", { hidden: !((_p = data === null || data === void 0 ? void 0 : data.tag) === null || _p === void 0 ? void 0 : _p.link), className: 'list-btn-wrap', style: Object.assign(Object.assign({}, props === null || props === void 0 ? void 0 : props.buttonBgStyle), { height: 'auto', backgroundColor: 'transparent' }) },
12559
+ React.createElement("button", { className: 'list-btn', style: props === null || props === void 0 ? void 0 : props.buttonStyle, onClick: handleClickLink }, ((_q = data === null || data === void 0 ? void 0 : data.tag) === null || _q === void 0 ? void 0 : _q.linkTitle) || 'Shop the collection'))))));
12439
12560
  }
12440
12561
 
12441
12562
  /*
12442
12563
  * @Author: binruan@chatlabs.com
12443
12564
  * @Date: 2024-01-10 10:58:24
12444
12565
  * @LastEditors: binruan@chatlabs.com
12445
- * @LastEditTime: 2024-06-07 15:57:29
12566
+ * @LastEditTime: 2024-06-12 14:18:56
12446
12567
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\WaterFall\index.tsx
12447
12568
  *
12448
12569
  */
12449
12570
  const WaterFall = (props) => {
12450
12571
  var _a;
12451
- const { waterFallData, setOpenHashtag, openHashtag, swiperRef, setWaterFallData, cacheRtcList, setRtcList, cacheActiveIndex, rtcList, setCacheRtcList, setIsFromHashtag, isFromHashtag, bffEventReport } = useSxpDataSource();
12572
+ const { waterFallData, setOpenHashtag, openHashtag, swiperRef, setWaterFallData, cacheRtcList, setRtcList, cacheActiveIndex, rtcList, setCacheRtcList, setIsFromHashtag, isFromHashtag, bffEventReport, themeTag } = useSxpDataSource();
12573
+ const { backMainFeed } = useEventReport();
12452
12574
  useRef(null);
12453
12575
  const modalEleRef = useRef(null);
12454
12576
  const [viewTime, setViewTime] = useState();
@@ -12469,6 +12591,9 @@ const WaterFall = (props) => {
12469
12591
  if (!isEq && cacheRtcList && (cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.length)) {
12470
12592
  setRtcList === null || setRtcList === void 0 ? void 0 : setRtcList(cacheRtcList);
12471
12593
  }
12594
+ if (!(themeTag === null || themeTag === void 0 ? void 0 : themeTag.current)) {
12595
+ backMainFeed('branch', themeTag === null || themeTag === void 0 ? void 0 : themeTag.current, waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag);
12596
+ }
12472
12597
  reportTagsView();
12473
12598
  setWaterFallData === null || setWaterFallData === void 0 ? void 0 : setWaterFallData(undefined);
12474
12599
  setIsFromHashtag === null || setIsFromHashtag === void 0 ? void 0 : setIsFromHashtag(false);
@@ -12536,7 +12661,7 @@ const WaterFall = (props) => {
12536
12661
  display: openHashtag ? 'block' : 'none'
12537
12662
  } },
12538
12663
  React.createElement(Navbar$1, { icon: img$1, styles: { top: '32px' }, textStyle: (_a = props === null || props === void 0 ? void 0 : props.textStyles) === null || _a === void 0 ? void 0 : _a.hashTagTitle, onClose: handleClose }),
12539
- (props === null || props === void 0 ? void 0 : props.isWaterfallFlow) === true || (props === null || props === void 0 ? void 0 : props.isWaterfallFlow) === undefined ? (React.createElement(WaterfallList, Object.assign({ reportTagsView: reportTagsView }, props))) : (React.createElement(WaterfallList$1, Object.assign({ reportTagsView: reportTagsView }, props)))), modalEleRef.current);
12664
+ (props === null || props === void 0 ? void 0 : props.openFixedSize) === true || (props === null || props === void 0 ? void 0 : props.openFixedSize) === undefined ? (React.createElement(WaterfallList, Object.assign({ reportTagsView: reportTagsView }, props))) : (React.createElement(WaterfallList$1, Object.assign({ reportTagsView: reportTagsView }, props)))), modalEleRef.current);
12540
12665
  };
12541
12666
  var WaterFall$1 = memo(WaterFall);
12542
12667
 
@@ -12567,7 +12692,7 @@ const HashTag = createMaterial(HashTagComponent, {
12567
12692
  category: 'base',
12568
12693
  type: 'HashTag',
12569
12694
  related: {
12570
- settingRender,
12695
+ settingRender: settingRender$1,
12571
12696
  bindableProps: []
12572
12697
  },
12573
12698
  defaulSetting: {
@@ -12624,6 +12749,84 @@ const HashTag = createMaterial(HashTagComponent, {
12624
12749
  sort: 2
12625
12750
  });
12626
12751
 
12752
+ /*
12753
+ * @Author: binruan@chatlabs.com
12754
+ * @Date: 2024-06-13 10:08:32
12755
+ * @LastEditors: binruan@chatlabs.com
12756
+ * @LastEditTime: 2024-06-13 17:42:50
12757
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\Consent\settingRender.tsx
12758
+ *
12759
+ */
12760
+ var settingRender = [
12761
+ {
12762
+ title: '协议详情',
12763
+ child: [
12764
+ {
12765
+ type: 'Switch',
12766
+ label: '必须同意用户协议',
12767
+ name: ['props', 'privacy_necessity'],
12768
+ extra: '当新用户进入页面时,会出现用户协议弹窗,用户需要先同意协议后才能访问内容。'
12769
+ },
12770
+ {
12771
+ type: 'Text',
12772
+ label: '弹窗标题',
12773
+ name: ['props', 'privacy_title']
12774
+ },
12775
+ {
12776
+ type: 'TextArea',
12777
+ label: '用户协议弹窗内容',
12778
+ name: ['props', 'privacy_context']
12779
+ },
12780
+ {
12781
+ type: 'Group',
12782
+ label: '隐私政策',
12783
+ child: [
12784
+ {
12785
+ type: 'Text',
12786
+ name: ['props', 'privacy_policy_title']
12787
+ },
12788
+ {
12789
+ type: 'Text',
12790
+ name: ['props', 'privacy_policy_url'],
12791
+ addonBefore: 'https://'
12792
+ }
12793
+ ],
12794
+ extra: '当用户点击更多信息按钮时,将会跳转至设置的链接查看政策内容'
12795
+ }
12796
+ ]
12797
+ }
12798
+ ];
12799
+
12800
+ const Consent$1 = (props) => {
12801
+ return React.createElement(Consent$1, Object.assign({}, props));
12802
+ };
12803
+ var ConsentComponent = memo(Consent$1);
12804
+
12805
+ /*
12806
+ * @Author: binruan@chatlabs.com
12807
+ * @Date: 2023-07-28 18:29:57
12808
+ * @LastEditors: binruan@chatlabs.com
12809
+ * @LastEditTime: 2024-06-13 17:32:17
12810
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\Consent\material.tsx
12811
+ *
12812
+ */
12813
+ const Consent = createMaterial(ConsentComponent, {
12814
+ displayName: 'Consent',
12815
+ icon: '',
12816
+ category: 'base',
12817
+ type: 'Consent',
12818
+ related: {
12819
+ settingRender
12820
+ },
12821
+ defaulSetting: {
12822
+ props: {},
12823
+ style: {}
12824
+ },
12825
+ w: 100,
12826
+ h: 40,
12827
+ sort: 1
12828
+ });
12829
+
12627
12830
  /*
12628
12831
  * @Author: binruan@chatlabs.com
12629
12832
  * @Date: 2023-07-25 14:56:49
@@ -12642,6 +12845,7 @@ var _materials_ = /*#__PURE__*/Object.freeze({
12642
12845
  CommodityDetailDiroNew: CommodityDetailDiroNew,
12643
12846
  CommodityDiro: CommodityDiro,
12644
12847
  CommodityDiroNew: CommodityDiroNew,
12848
+ Consent: Consent,
12645
12849
  HashTag: HashTag,
12646
12850
  Link: Link,
12647
12851
  MultiCommodity: MultiCommodity,
@@ -13314,16 +13518,37 @@ const Nudge = ({ nudge }) => {
13314
13518
  React.createElement("p", { style: Object.assign(Object.assign({}, nudge === null || nudge === void 0 ? void 0 : nudge.textStyle), { textWrap: 'nowrap', textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap', flex: 1, marginBottom: 0 }) }, (_g = nudge === null || nudge === void 0 ? void 0 : nudge.content) !== null && _g !== void 0 ? _g : '')))));
13315
13519
  };
13316
13520
 
13521
+ /*
13522
+ * @Author: binruan@chatlabs.com
13523
+ * @Date: 2024-04-29 16:32:21
13524
+ * @LastEditors: binruan@chatlabs.com
13525
+ * @LastEditTime: 2024-06-12 11:01:48
13526
+ * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Tagbar.tsx
13527
+ *
13528
+ */
13317
13529
  const DEFAULT_TAG = 'FOR U';
13318
13530
  const Tagbar = ({ tagList = [], setActiveIndex }) => {
13319
13531
  const [selectTag, setSelectTag] = useState(DEFAULT_TAG);
13320
- const { getRecommendVideos, setRtcList, setCacheRtcList, setCacheActiveIndex, setLoading, swiperRef, waterFallData } = useSxpDataSource();
13532
+ const { getRecommendVideos, setRtcList, setCacheRtcList, setCacheActiveIndex, setLoading, swiperRef, waterFallData, bffEventReport } = useSxpDataSource();
13533
+ const { backMainFeed } = useEventReport();
13321
13534
  const realTagList = useMemo(() => {
13322
13535
  return [DEFAULT_TAG, ...tagList];
13323
13536
  }, [tagList]);
13324
13537
  const handleSelectTag = (tag) => () => {
13325
13538
  if (tag === selectTag)
13326
13539
  return;
13540
+ if (tag !== 'FOR U') {
13541
+ bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
13542
+ eventInfo: {
13543
+ eventSubject: 'clickThemeTagsViewContents',
13544
+ eventDescription: 'click Theme Tags View Contents',
13545
+ themeTags: `[${tag}]`
13546
+ }
13547
+ });
13548
+ }
13549
+ else {
13550
+ backMainFeed('theme', selectTag);
13551
+ }
13327
13552
  let themeTag;
13328
13553
  if (tag !== DEFAULT_TAG) {
13329
13554
  themeTag = tag;
@@ -13355,7 +13580,7 @@ var Tagbar$1 = memo(Tagbar);
13355
13580
  * @Author: binruan@chatlabs.com
13356
13581
  * @Date: 2024-01-15 19:03:09
13357
13582
  * @LastEditors: binruan@chatlabs.com
13358
- * @LastEditTime: 2024-06-07 11:10:42
13583
+ * @LastEditTime: 2024-06-13 18:09:16
13359
13584
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
13360
13585
  *
13361
13586
  */
@@ -13366,11 +13591,11 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
13366
13591
  const viewImageStartTime = useRef(0);
13367
13592
  const [isInit, setIsInit] = useState(false);
13368
13593
  const [isMuted, setIsMuted] = useState(true);
13369
- const curTime = useRef();
13370
13594
  const viewTime = useRef();
13371
13595
  const [isLoadMore, setIsLoadMore] = useState(false);
13372
13596
  const [isShowMore, setIsShowMore] = useState(false);
13373
- const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport } = useSxpDataSource();
13597
+ const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport, curTime, h5EnterLink } = useSxpDataSource();
13598
+ const { backMainFeed } = useEventReport();
13374
13599
  const [videoRef, setVideoRef] = useState(null);
13375
13600
  const playerRef = useRef();
13376
13601
  const { productView } = useEventReport();
@@ -13381,17 +13606,17 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
13381
13606
  if (data.length <= 0) {
13382
13607
  return;
13383
13608
  }
13384
- initTime();
13609
+ refreshFeSessionId();
13610
+ const now = new Date();
13611
+ viewTime.current = now;
13612
+ if (isInit) {
13613
+ h5EnterLink === null || h5EnterLink === void 0 ? void 0 : h5EnterLink();
13614
+ }
13385
13615
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
13386
13616
  eventName: 'PageView'
13387
13617
  });
13388
13618
  setIsInit(true);
13389
- }, [data.length, bffFbReport]);
13390
- const initTime = () => {
13391
- curTime.current = new Date();
13392
- viewTime.current = new Date();
13393
- refreshFeSessionId();
13394
- };
13619
+ }, [data.length, bffFbReport, h5EnterLink, isInit]);
13395
13620
  const firstRef = useRef();
13396
13621
  useEffect(() => {
13397
13622
  var _a, _b, _c, _d;
@@ -13487,13 +13712,33 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
13487
13712
  handleH5EnterLink();
13488
13713
  handleViewImageStartEvent(activeIndex);
13489
13714
  SXP_EVENT_BUS.emit(SXP_EVENT_TYPE.PAGE_DID_SHOW, item);
13715
+ backMainFeed('external');
13490
13716
  }
13491
13717
  };
13492
13718
  document.addEventListener('visibilitychange', visibleChange);
13493
13719
  return () => {
13494
13720
  document.removeEventListener('visibilitychange', visibleChange);
13495
13721
  };
13496
- }, [activeIndex, bffEventReport, curTime, data, handleH5EnterLink, popupDetailData, isFromHashtag, tempMap]);
13722
+ }, [
13723
+ activeIndex,
13724
+ bffEventReport,
13725
+ data,
13726
+ handleH5EnterLink,
13727
+ popupDetailData,
13728
+ isFromHashtag,
13729
+ tempMap,
13730
+ curTime,
13731
+ backMainFeed
13732
+ ]);
13733
+ useEffect(() => {
13734
+ const initTime = () => {
13735
+ backMainFeed('external');
13736
+ };
13737
+ window.addEventListener('pageshow', initTime);
13738
+ return () => {
13739
+ window.removeEventListener('pageshow', initTime);
13740
+ };
13741
+ }, []);
13497
13742
  const tagHeight = useMemo(() => {
13498
13743
  let h = 0;
13499
13744
  if (tagList.length > 0) {
@@ -14235,7 +14480,7 @@ const Popup = () => {
14235
14480
  * @Author: binruan@chatlabs.com
14236
14481
  * @Date: 2024-01-15 19:03:09
14237
14482
  * @LastEditors: binruan@chatlabs.com
14238
- * @LastEditTime: 2024-05-17 18:41:05
14483
+ * @LastEditTime: 2024-06-13 14:54:12
14239
14484
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageCore\index.tsx
14240
14485
  *
14241
14486
  */
@@ -14252,14 +14497,14 @@ Object.values(_materials_).forEach((v) => {
14252
14497
  RESOLVER[v.extend.type] = v;
14253
14498
  });
14254
14499
  const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage, appDomain, licenseUrl, enabledMetaConversionApi }) => {
14255
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
14500
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
14256
14501
  const utmVal = useMemo(() => {
14257
14502
  var _a;
14258
14503
  const searchParams = (location === null || location === void 0 ? void 0 : location.search) ? (_a = location === null || location === void 0 ? void 0 : location.search) === null || _a === void 0 ? void 0 : _a.replace('?', '') : '';
14259
14504
  return searchParams;
14260
14505
  }, []);
14261
14506
  return (React.createElement(EditorCore, { resolver: RESOLVER, enableDataSource: false, schema: data === null || data === void 0 ? void 0 : data.data, utmVal: utmVal },
14262
- React.createElement(SxpDataSourceProvider$1, { utmVal: utmVal, dataSources: data === null || data === void 0 ? void 0 : data.data_sources, sxpParameter: data === null || data === void 0 ? void 0 : data.sxp_parameter, maxSize: (_b = (_a = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _a === void 0 ? void 0 : _a.personalized_recommend) !== null && _b !== void 0 ? _b : maxSize, defaultSize: (_d = (_c = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _c === void 0 ? void 0 : _c.default_recommend) !== null && _d !== void 0 ? _d : defaultSize, hashTagSize: (_f = (_e = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _e === void 0 ? void 0 : _e.hash_tag_size) !== null && _f !== void 0 ? _f : hashTagSize, loadingImage: loadingImage, appDomain: appDomain, enabledMetaConversionApi: enabledMetaConversionApi, isShowTag: (_j = (_h = (_g = data === null || data === void 0 ? void 0 : data.data) === null || _g === void 0 ? void 0 : _g.sxpPageConf) === null || _h === void 0 ? void 0 : _h.globalConfig) === null || _j === void 0 ? void 0 : _j.isShowTag, render: ({ rtcList, tagList }) => {
14507
+ React.createElement(SxpDataSourceProvider$1, { utmVal: utmVal, dataSources: data === null || data === void 0 ? void 0 : data.data_sources, sxpParameter: data === null || data === void 0 ? void 0 : data.sxp_parameter, maxSize: (_b = (_a = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _a === void 0 ? void 0 : _a.personalized_recommend) !== null && _b !== void 0 ? _b : maxSize, defaultSize: (_d = (_c = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _c === void 0 ? void 0 : _c.default_recommend) !== null && _d !== void 0 ? _d : defaultSize, hashTagSize: (_f = (_e = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _e === void 0 ? void 0 : _e.hash_tag_size) !== null && _f !== void 0 ? _f : hashTagSize, loadingImage: loadingImage, appDomain: appDomain, enabledMetaConversionApi: enabledMetaConversionApi, isShowTag: (_j = (_h = (_g = data === null || data === void 0 ? void 0 : data.data) === null || _g === void 0 ? void 0 : _g.sxpPageConf) === null || _h === void 0 ? void 0 : _h.globalConfig) === null || _j === void 0 ? void 0 : _j.isShowTag, globalConfig: (_l = (_k = data === null || data === void 0 ? void 0 : data.data) === null || _k === void 0 ? void 0 : _k.sxpPageConf) === null || _l === void 0 ? void 0 : _l.globalConfig, render: ({ rtcList, tagList }) => {
14263
14508
  var _a;
14264
14509
  return (React.createElement(React.Fragment, null,
14265
14510
  React.createElement(SxpPageRender, Object.assign({}, (_a = data === null || data === void 0 ? void 0 : data.data) === null || _a === void 0 ? void 0 : _a.sxpPageConf, { tagList: tagList, data: rtcList, resolver: RESOLVER, licenseUrl: licenseUrl })),
@@ -14278,8 +14523,9 @@ var index = memo(SxpPageCore);
14278
14523
  */
14279
14524
  const EditorDataContext = createContext({});
14280
14525
  const EditorDataProvider = ({ children, data }) => {
14281
- var _a, _b, _c, _d, _e, _f;
14526
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
14282
14527
  const [openHashtag, setOpenHashtag] = useState(false);
14528
+ const [openConsent, setOpenConsent] = useState(false);
14283
14529
  return (React.createElement(EditorDataContext.Provider, { value: {
14284
14530
  sxpPrameter: {
14285
14531
  bottomImage: (_a = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _a === void 0 ? void 0 : _a.bottom_image,
@@ -14287,11 +14533,20 @@ const EditorDataProvider = ({ children, data }) => {
14287
14533
  personalizedRecommend: (_c = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _c === void 0 ? void 0 : _c.personalized_recommend,
14288
14534
  placeholderImage: (_d = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _d === void 0 ? void 0 : _d.placeholder_image,
14289
14535
  hashTagSize: (_e = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _e === void 0 ? void 0 : _e.hash_tag_size,
14290
- loadingImage: (_f = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _f === void 0 ? void 0 : _f.loading_image
14536
+ loadingImage: (_f = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _f === void 0 ? void 0 : _f.loading_image,
14537
+ privacyContent: (_g = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _g === void 0 ? void 0 : _g.privacy_context,
14538
+ privacyNecessity: (_h = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _h === void 0 ? void 0 : _h.privacy_necessity,
14539
+ privacyPolicyTitle: (_j = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _j === void 0 ? void 0 : _j.privacy_policy_title,
14540
+ privacyPolicyUrl: (_k = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _k === void 0 ? void 0 : _k.privacy_policy_url,
14541
+ privacyTitle: (_l = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _l === void 0 ? void 0 : _l.privacy_title,
14542
+ template: (_m = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _m === void 0 ? void 0 : _m.template,
14543
+ industry: (_o = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _o === void 0 ? void 0 : _o.industry
14291
14544
  },
14292
14545
  appDomain: data === null || data === void 0 ? void 0 : data.appDomain,
14293
14546
  openHashtag,
14294
- setOpenHashtag
14547
+ setOpenHashtag,
14548
+ openConsent,
14549
+ setOpenConsent
14295
14550
  } }, children));
14296
14551
  };
14297
14552
  function useEditorDataProvider() {