pb-sxp-ui 1.0.80 → 1.0.81

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 +321 -85
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.css +93 -0
  4. package/dist/index.js +322 -86
  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 +321 -85
  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/pb-ui.js CHANGED
@@ -385,6 +385,7 @@
385
385
 
386
386
  const FAKE_USER_KEY = 'SXP_FAKE_USER_ID';
387
387
  const FAKE_USER_STATE = 'FAKE_USER_STATE';
388
+ const AGREE_POLICY = 'AGREE_POLICY';
388
389
  const storeAndLoadFeUserId = () => {
389
390
  let fakeUserId = window.localStorage.getItem(FAKE_USER_KEY);
390
391
  if (lodash.isEmpty(fakeUserId)) {
@@ -429,6 +430,70 @@
429
430
  SXP_EVENT_TYPE["CHANGE_THEME_TAG"] = "changeThemeTag";
430
431
  })(SXP_EVENT_TYPE || (SXP_EVENT_TYPE = {}));
431
432
 
433
+ /*
434
+ * @Author: binruan@chatlabs.com
435
+ * @Date: 2024-06-13 15:16:53
436
+ * @LastEditors: binruan@chatlabs.com
437
+ * @LastEditTime: 2024-06-13 18:22:53
438
+ * @FilePath: \pb-sxp-ui\src\core\components\Consent\index.tsx
439
+ *
440
+ */
441
+ const Consent$2 = ({ width = window.innerWidth, height = window.innerHeight, privacy_title, privacy_context, privacy_policy_url, privacy_policy_title }) => {
442
+ const { setIsAgreePolicy, bffEventReport } = useSxpDataSource();
443
+ const channelObj = React.useMemo(() => {
444
+ const queryString = location.search.slice(1);
445
+ const params = qs.parse(queryString.replace(/\+/g, '%2B'));
446
+ for (const key in params) {
447
+ params[key] = params[key].replace(/%2B/g, '+');
448
+ }
449
+ return params;
450
+ }, []);
451
+ const getUtmValue = (key) => { var _a; return (_a = channelObj[key]) !== null && _a !== void 0 ? _a : null; };
452
+ React.useEffect(() => {
453
+ bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
454
+ eventInfo: {
455
+ eventSubject: 'privacyEnter',
456
+ eventDescription: 'User enter privacy page',
457
+ utmSource: getUtmValue('utm_source'),
458
+ utmMedium: getUtmValue('utm_medium'),
459
+ utmCampaign: getUtmValue('utm_campaign'),
460
+ utmId: getUtmValue('utm_id'),
461
+ utmContent: getUtmValue('utm_content'),
462
+ clSource: getUtmValue('cl_source'),
463
+ enterTime: `${Date.now()}`,
464
+ enterUrl: window.location.href,
465
+ rtc: null,
466
+ requestId: null,
467
+ sessionID: null
468
+ }
469
+ });
470
+ }, []);
471
+ const handleAgree = () => {
472
+ bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
473
+ eventInfo: {
474
+ eventSubject: 'userConsent',
475
+ eventDescription: '用户授权【操作结果】',
476
+ consentResult: '0',
477
+ consentTags: '[]',
478
+ rtc: null,
479
+ requestId: null,
480
+ sessionID: null
481
+ }
482
+ });
483
+ setIsAgreePolicy === null || setIsAgreePolicy === void 0 ? void 0 : setIsAgreePolicy(true);
484
+ window.localStorage.setItem(AGREE_POLICY, 'yes');
485
+ };
486
+ return (React.createElement("div", { className: 'consent-bg' },
487
+ React.createElement("div", { className: 'consent' },
488
+ React.createElement("div", { className: 'consent-col' },
489
+ React.createElement("div", { className: 'consent-title' }, privacy_title !== null && privacy_title !== void 0 ? privacy_title : 'Privacy Policy'),
490
+ 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.')),
491
+ React.createElement("div", { className: 'consent-col' },
492
+ React.createElement("button", { className: 'consent-btn', onClick: handleAgree }, "Agree"),
493
+ 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')))));
494
+ };
495
+ var Consent$3 = React.memo(Consent$2);
496
+
432
497
  const SxpDataSourceContext = React.createContext({
433
498
  rtcList: [],
434
499
  tagList: []
@@ -438,13 +503,15 @@
438
503
  DataSourceType[DataSourceType["BFF"] = 5] = "BFF";
439
504
  })(DataSourceType || (DataSourceType = {}));
440
505
  const UTM_KEYS = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_id', 'utm_content', 'cl_source'];
441
- const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false, enabledMetaConversionApi = false, isShowTag = true }) => {
506
+ 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 }) => {
507
+ var _a, _b, _c, _d, _e, _f, _g;
442
508
  const [rtcList, setRtcList] = React.useState([]);
443
509
  const [tagList, setTagList] = React.useState([]);
444
510
  const [loading, setLoading] = React.useState(false);
445
511
  const [curReqInfo, setCurReqInfo] = React.useState({ rtc: '', requestId: '' });
446
512
  const swiperRef = React.useRef(null);
447
513
  const isInit = React.useRef(false);
514
+ const [isAgreePolicy, setIsAgreePolicy] = React.useState(() => !!window.localStorage.getItem(AGREE_POLICY));
448
515
  // 弹窗数据
449
516
  const [popupDetailData, setPopupDetailData] = React.useState();
450
517
  const [waterFallData, setWaterFallData] = React.useState();
@@ -454,6 +521,7 @@
454
521
  const [isFromHashtag, setIsFromHashtag] = React.useState(false);
455
522
  const [videoRef, setVideoRef] = React.useState(null);
456
523
  const themeTag = React.useRef();
524
+ const curTime = React.useRef();
457
525
  React.useEffect(() => {
458
526
  const handleChangeThemeTag = (tag) => {
459
527
  themeTag.current = tag;
@@ -498,10 +566,10 @@
498
566
  }, [bffDataSource]);
499
567
  // 获取推荐视频数据
500
568
  const getRecommendVideos = React.useCallback((query) => __awaiter(void 0, void 0, void 0, function* () {
501
- var _a, _b, _c, _d, _e;
569
+ var _h, _j, _k, _l, _m;
502
570
  query = {
503
- maxSize: (_a = query === null || query === void 0 ? void 0 : query.maxSize) !== null && _a !== void 0 ? _a : maxSize,
504
- defaultSize: (_b = query === null || query === void 0 ? void 0 : query.defaultSize) !== null && _b !== void 0 ? _b : defaultSize,
571
+ maxSize: (_h = query === null || query === void 0 ? void 0 : query.maxSize) !== null && _h !== void 0 ? _h : maxSize,
572
+ defaultSize: (_j = query === null || query === void 0 ? void 0 : query.defaultSize) !== null && _j !== void 0 ? _j : defaultSize,
505
573
  'itemFilter.itemId': query === null || query === void 0 ? void 0 : query['itemFilter.itemId'],
506
574
  'itemFilter.itemType': query === null || query === void 0 ? void 0 : query['itemFilter.itemType'],
507
575
  hashTag: query === null || query === void 0 ? void 0 : query.hashTag,
@@ -509,10 +577,10 @@
509
577
  themeTag: query === null || query === void 0 ? void 0 : query.themeTag
510
578
  };
511
579
  if (utmVal) {
512
- const val = (_e = (_d = (_c = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _c === void 0 ? void 0 : _c.filter((val) => {
580
+ const val = (_m = (_l = (_k = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _k === void 0 ? void 0 : _k.filter((val) => {
513
581
  const key = val.split('=')[0];
514
582
  return UTM_KEYS.includes(key);
515
- })) === null || _d === void 0 ? void 0 : _d.join('&')) !== null && _e !== void 0 ? _e : '';
583
+ })) === null || _l === void 0 ? void 0 : _l.join('&')) !== null && _m !== void 0 ? _m : '';
516
584
  query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(val) });
517
585
  }
518
586
  const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/list', { method: 'GET', query }));
@@ -524,7 +592,7 @@
524
592
  return result === null || result === void 0 ? void 0 : result.data;
525
593
  }), [bffFetch, utmVal, maxSize, defaultSize]);
526
594
  const loadVideos = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
527
- var _f, _g;
595
+ var _o, _p;
528
596
  if (rtcList.length <= 0) {
529
597
  return;
530
598
  }
@@ -534,8 +602,8 @@
534
602
  'itemFilter.itemType': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemType,
535
603
  themeTag: themeTag.current
536
604
  });
537
- setRtcList(rtcList.concat((_f = data === null || data === void 0 ? void 0 : data.recList) !== null && _f !== void 0 ? _f : []));
538
- setCacheRtcList(cacheRtcList.concat((_g = data === null || data === void 0 ? void 0 : data.recList) !== null && _g !== void 0 ? _g : []));
605
+ setRtcList(rtcList.concat((_o = data === null || data === void 0 ? void 0 : data.recList) !== null && _o !== void 0 ? _o : []));
606
+ setCacheRtcList(cacheRtcList.concat((_p = data === null || data === void 0 ? void 0 : data.recList) !== null && _p !== void 0 ? _p : []));
539
607
  }), [getRecommendVideos, rtcList, waterFallData, cacheRtcList]);
540
608
  const bffEventReport = React.useCallback(({ userInfo, eventInfo }) => {
541
609
  // 关闭 BFF 事件上报
@@ -599,16 +667,16 @@
599
667
  }), [bffFetch]);
600
668
  // 获取 Tag
601
669
  const bffGetTagList = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
602
- var _h, _j, _k, _l, _m;
670
+ var _q, _r, _s, _t, _u;
603
671
  if (!utmVal || !isShowTag)
604
672
  return;
605
673
  try {
606
- const val = (_k = (_j = (_h = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _h === void 0 ? void 0 : _h.filter((val) => {
674
+ const val = (_s = (_r = (_q = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _q === void 0 ? void 0 : _q.filter((val) => {
607
675
  const key = val.split('=')[0];
608
676
  return UTM_KEYS.includes(key);
609
- })) === null || _j === void 0 ? void 0 : _j.join('&')) !== null && _k !== void 0 ? _k : '';
677
+ })) === null || _r === void 0 ? void 0 : _r.join('&')) !== null && _s !== void 0 ? _s : '';
610
678
  const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/tag/list', { method: 'GET', query: { channel: decodeURIComponent(val) } }));
611
- 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 : []);
679
+ 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 : []);
612
680
  }
613
681
  catch (e) {
614
682
  console.log('e', e);
@@ -632,7 +700,7 @@
632
700
  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 })
633
701
  });
634
702
  }, [bffEventReport, isFromHashtag]);
635
- React.useEffect(() => {
703
+ const h5EnterLink = React.useCallback(() => {
636
704
  var _a, _b;
637
705
  const queryString = location.search.slice(1);
638
706
  const params = qs.parse(queryString.replace(/\+/g, '%2B'));
@@ -640,6 +708,8 @@
640
708
  params[key] = params[key].replace(/%2B/g, '+');
641
709
  }
642
710
  const getVal = (key) => { var _a; return (_a = params[key]) !== null && _a !== void 0 ? _a : ''; };
711
+ const time = new Date();
712
+ curTime.current = time;
643
713
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
644
714
  eventInfo: {
645
715
  eventSubject: 'h5LinkEnterFeed',
@@ -649,14 +719,19 @@
649
719
  utmCampaign: getVal('utm_campaign'),
650
720
  utmId: getVal('utm_id'),
651
721
  utmContent: getVal('utm_content'),
652
- enterTime: `${Date.now()}`,
722
+ enterTime: Math.floor(time / 1000) + '',
653
723
  requestId: null,
654
724
  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 : '',
655
- clSource: getVal('cl_sourc')
725
+ clSource: getVal('cl_source')
656
726
  }
657
727
  });
728
+ }, [bffEventReport]);
729
+ React.useEffect(() => {
730
+ h5EnterLink();
658
731
  }, []);
659
732
  React.useEffect(() => {
733
+ if (!isAgreePolicy)
734
+ return;
660
735
  setLoading(true);
661
736
  bffGetTagList();
662
737
  getRecommendVideos()
@@ -675,7 +750,7 @@
675
750
  setLoading(false);
676
751
  isInit.current = true;
677
752
  });
678
- }, []);
753
+ }, [isAgreePolicy]);
679
754
  React.useEffect(() => {
680
755
  if (!isInit.current)
681
756
  return;
@@ -727,14 +802,19 @@
727
802
  setLoading,
728
803
  videoRef,
729
804
  setVideoRef,
730
- bffFbReport
731
- } }, render({
805
+ bffFbReport,
806
+ isAgreePolicy,
807
+ setIsAgreePolicy,
808
+ curTime,
809
+ h5EnterLink,
810
+ themeTag
811
+ } }, (((_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({
732
812
  rtcList,
733
813
  mutateLike: bffMutateLike,
734
814
  mutateUnlike: bffMutateUnlike,
735
815
  submitForm: bffSubmitForm,
736
816
  tagList
737
- })));
817
+ }))));
738
818
  };
739
819
  var SxpDataSourceProvider$1 = React.memo(SxpDataSourceProvider);
740
820
 
@@ -1000,7 +1080,7 @@
1000
1080
  *
1001
1081
  */
1002
1082
  var _a$5, _b$5, _c;
1003
- var settingRender$5 = [
1083
+ var settingRender$6 = [
1004
1084
  {
1005
1085
  type: 'Text',
1006
1086
  label: '组件名称',
@@ -1138,7 +1218,7 @@
1138
1218
  * @Author: binruan@chatlabs.com
1139
1219
  * @Date: 2024-03-12 10:59:06
1140
1220
  * @LastEditors: binruan@chatlabs.com
1141
- * @LastEditTime: 2024-04-15 09:47:08
1221
+ * @LastEditTime: 2024-06-12 10:53:57
1142
1222
  * @FilePath: \pb-sxp-ui\src\core\hooks\useEventReport.ts
1143
1223
  *
1144
1224
  */
@@ -1208,9 +1288,21 @@
1208
1288
  }
1209
1289
  });
1210
1290
  }, [bffEventReport, popupDetailData]);
1291
+ const backMainFeed = React.useCallback((lastFeed, themeTag, hashTag) => {
1292
+ bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
1293
+ eventInfo: {
1294
+ lastFeed,
1295
+ themeTags: themeTag ? `[${themeTag}]` : '',
1296
+ hashTags: hashTag ? `[${hashTag}]` : '',
1297
+ eventSubject: 'backMainFeed',
1298
+ eventDescription: 'back Main Feed'
1299
+ }
1300
+ });
1301
+ }, [bffEventReport]);
1211
1302
  return {
1212
1303
  jumpToWeb,
1213
- productView
1304
+ productView,
1305
+ backMainFeed
1214
1306
  };
1215
1307
  }
1216
1308
 
@@ -1315,7 +1407,7 @@
1315
1407
  category: 'popup',
1316
1408
  type: 'AppointForm',
1317
1409
  related: {
1318
- settingRender: settingRender$5,
1410
+ settingRender: settingRender$6,
1319
1411
  bindableProps: [],
1320
1412
  interactionRender: interactionRender$8
1321
1413
  },
@@ -1341,7 +1433,7 @@
1341
1433
  });
1342
1434
 
1343
1435
  var _a$4, _b$4;
1344
- var settingRender$4 = [
1436
+ var settingRender$5 = [
1345
1437
  {
1346
1438
  title: '商品图片',
1347
1439
  child: [
@@ -8655,7 +8747,7 @@
8655
8747
  category: 'popup',
8656
8748
  type: 'CommodityDetail',
8657
8749
  related: {
8658
- settingRender: settingRender$4
8750
+ settingRender: settingRender$5
8659
8751
  },
8660
8752
  defaulSetting: {
8661
8753
  props: {
@@ -8721,7 +8813,7 @@
8721
8813
  *
8722
8814
  */
8723
8815
  var _a$3, _b$3;
8724
- var settingRender$3 = [
8816
+ var settingRender$4 = [
8725
8817
  {
8726
8818
  title: '',
8727
8819
  child: [
@@ -8848,7 +8940,7 @@
8848
8940
  category: 'popup',
8849
8941
  type: 'Prompt',
8850
8942
  related: {
8851
- settingRender: settingRender$3,
8943
+ settingRender: settingRender$4,
8852
8944
  bindableProps: [],
8853
8945
  interactionRender: interactionRender$7
8854
8946
  },
@@ -8874,7 +8966,7 @@
8874
8966
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetailDiroNew\settingRender.tsx
8875
8967
  *
8876
8968
  */
8877
- var settingRender$2 = [
8969
+ var settingRender$3 = [
8878
8970
  {
8879
8971
  title: '商品图片',
8880
8972
  child: [
@@ -9197,7 +9289,7 @@ Made in Italy` })));
9197
9289
  category: 'popup',
9198
9290
  type: 'CommodityDetailDiroNew',
9199
9291
  related: {
9200
- settingRender: settingRender$2
9292
+ settingRender: settingRender$3
9201
9293
  },
9202
9294
  defaulSetting: {
9203
9295
  props: {
@@ -9258,7 +9350,7 @@ Made in Italy` })));
9258
9350
  * @FilePath: \pb-sxp-ui\src\materials\sxp\template\components\settingRender.tsx
9259
9351
  *
9260
9352
  */
9261
- var settingRender$1 = [
9353
+ var settingRender$2 = [
9262
9354
  {
9263
9355
  title: '主题样式',
9264
9356
  child: [
@@ -9610,7 +9702,7 @@ Made in Italy` })));
9610
9702
  related: {
9611
9703
  interactionRender: interactionRender$6,
9612
9704
  bindableProps: [],
9613
- settingRender: settingRender$1
9705
+ settingRender: settingRender$2
9614
9706
  },
9615
9707
  defaulSetting: {
9616
9708
  props: {
@@ -9689,7 +9781,7 @@ Made in Italy` })));
9689
9781
  type: 'Appoint',
9690
9782
  related: {
9691
9783
  interactionRender: interactionRender$5,
9692
- settingRender: settingRender$1 === null || settingRender$1 === void 0 ? void 0 : settingRender$1.filter((i) => i.type !== 'commodityTitle'),
9784
+ settingRender: settingRender$2 === null || settingRender$2 === void 0 ? void 0 : settingRender$2.filter((i) => i.type !== 'commodityTitle'),
9693
9785
  bindableProps: []
9694
9786
  },
9695
9787
  defaulSetting: {
@@ -9766,7 +9858,7 @@ Made in Italy` })));
9766
9858
  category: 'template',
9767
9859
  type: 'Link',
9768
9860
  related: {
9769
- settingRender: settingRender$1 === null || settingRender$1 === void 0 ? void 0 : settingRender$1.filter((i) => i.type !== 'commodityTitle'),
9861
+ settingRender: settingRender$2 === null || settingRender$2 === void 0 ? void 0 : settingRender$2.filter((i) => i.type !== 'commodityTitle'),
9770
9862
  bindableProps: []
9771
9863
  },
9772
9864
  defaulSetting: {
@@ -9858,7 +9950,7 @@ Made in Italy` })));
9858
9950
  type: 'CommodityDiro',
9859
9951
  related: {
9860
9952
  interactionRender: interactionRender$4,
9861
- settingRender: settingRender$1,
9953
+ settingRender: settingRender$2,
9862
9954
  bindableProps: []
9863
9955
  },
9864
9956
  defaulSetting: {
@@ -9957,7 +10049,7 @@ Made in Italy` })));
9957
10049
  related: {
9958
10050
  interactionRender: interactionRender$3,
9959
10051
  bindableProps: [],
9960
- settingRender: settingRender$1
10052
+ settingRender: settingRender$2
9961
10053
  },
9962
10054
  defaulSetting: {
9963
10055
  props: {
@@ -10102,7 +10194,7 @@ Made in Italy` })));
10102
10194
  related: {
10103
10195
  interactionRender: interactionRender$2,
10104
10196
  bindableProps: [],
10105
- settingRender: settingRender$1
10197
+ settingRender: settingRender$2
10106
10198
  },
10107
10199
  defaulSetting: {
10108
10200
  props: {
@@ -10216,7 +10308,7 @@ Made in Italy` })));
10216
10308
  type: 'MultiCommodity',
10217
10309
  related: {
10218
10310
  interactionRender: interactionRender$1,
10219
- settingRender: settingRender$1,
10311
+ settingRender: settingRender$2,
10220
10312
  bindableProps: []
10221
10313
  },
10222
10314
  defaulSetting: {
@@ -10332,7 +10424,7 @@ Made in Italy` })));
10332
10424
  related: {
10333
10425
  interactionRender,
10334
10426
  bindableProps: [],
10335
- settingRender: settingRender$1
10427
+ settingRender: settingRender$2
10336
10428
  },
10337
10429
  defaulSetting: {
10338
10430
  props: {
@@ -10378,11 +10470,11 @@ Made in Italy` })));
10378
10470
  * @Author: binruan@chatlabs.com
10379
10471
  * @Date: 2024-04-07 14:07:12
10380
10472
  * @LastEditors: binruan@chatlabs.com
10381
- * @LastEditTime: 2024-06-07 15:51:49
10473
+ * @LastEditTime: 2024-06-11 11:04:55
10382
10474
  * @FilePath: \pb-sxp-ui\src\materials\sxp\HashTag\settingRender.tsx
10383
10475
  *
10384
10476
  */
10385
- var settingRender = [
10477
+ var settingRender$1 = [
10386
10478
  {
10387
10479
  title: 'Banner',
10388
10480
  child: [
@@ -10405,7 +10497,7 @@ Made in Italy` })));
10405
10497
  {
10406
10498
  type: 'Switch',
10407
10499
  label: '固定宽高',
10408
- name: ['props', 'isWaterfallFlow'],
10500
+ name: ['props', 'openFixedSize'],
10409
10501
  initialValue: true
10410
10502
  }
10411
10503
  ]
@@ -12015,8 +12107,8 @@ Made in Italy` })));
12015
12107
  React.createElement("div", { className: 'waterFallList-content-listItem-info-price', hidden: !priceText, style: textStyles.price }, priceText))));
12016
12108
  };
12017
12109
  function WaterfallList$1(_a) {
12018
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
12019
- var { reportTagsView } = _a, props = __rest(_a, ["reportTagsView"]);
12110
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
12111
+ var { reportTagsView, showBanner } = _a, props = __rest(_a, ["reportTagsView", "showBanner"]);
12020
12112
  const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag } = useSxpDataSource();
12021
12113
  /** 滚动的父元素 */
12022
12114
  const scrollParent = React.useRef(null);
@@ -12220,25 +12312,30 @@ Made in Italy` })));
12220
12312
  return (React.createElement(React.Fragment, null, isLoadingData ? (React.createElement("div", { style: { height: '100%', width: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' } },
12221
12313
  React.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } }))) : (React.createElement("div", { className: 'waterFallList', ref: waterfallFlowDom },
12222
12314
  React.createElement("div", { className: 'waterFallList-scroll', ref: scrollParent },
12223
- 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),
12224
- 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'),
12315
+ 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.css({
12316
+ width: '100%',
12317
+ objectFit: 'cover',
12318
+ marginBottom: '20px'
12319
+ }), src: (_c = data === null || data === void 0 ? void 0 : data.tag) === null || _c === void 0 ? void 0 : _c.picture })),
12320
+ 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),
12321
+ 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'),
12225
12322
  React.createElement("div", { className: 'waterFallList-content' }, list === null || list === void 0 ? void 0 :
12226
12323
  list.map((item, ind) => {
12227
12324
  var _a;
12228
12325
  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)));
12229
12326
  }),
12230
- React.createElement("div", { hidden: !((_g = data === null || data === void 0 ? void 0 : data.tag) === null || _g === void 0 ? void 0 : _g.link), style: {
12327
+ React.createElement("div", { hidden: !((_j = data === null || data === void 0 ? void 0 : data.tag) === null || _j === void 0 ? void 0 : _j.link), style: {
12231
12328
  position: 'absolute',
12232
12329
  width: '100%',
12233
- 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) +
12234
- ((_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)`,
12235
- height: ((_o = data === null || data === void 0 ? void 0 : data.tag) === null || _o === void 0 ? void 0 : _o.link)
12236
- ? ((_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'
12330
+ 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) +
12331
+ ((_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)`,
12332
+ height: ((_q = data === null || data === void 0 ? void 0 : data.tag) === null || _q === void 0 ? void 0 : _q.link)
12333
+ ? ((_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'
12237
12334
  : 0
12238
12335
  } }))),
12239
- 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 }),
12240
- 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' }) },
12241
- 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'))))));
12336
+ 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 }),
12337
+ 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' }) },
12338
+ 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'))))));
12242
12339
  }
12243
12340
 
12244
12341
  var img$1 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAAAaZJREFUeF7t2jFKBEEQRuG3mSJeQTARURDMTL2EqXfwAnoKD6FHMDEzNVIw2tzQC2gFggyDrExX1V92T7wz9PumFnqbXdH5teq8nwEwJqBzgfEVKDYAW8Ae8NZq3ZUm4Aa4AnaBR+C8BUIVAIu/ngSfAs9LESoAWLgB/LzWwP7SeLtfHWAu3tZ9Adz/dwD3eOUJCIlXBQiLVwQIjVcDCI9XAkiJVwFIi1cASI3PBpjb3jbd5GyyUcraCUrEZ02ATHwGgFR8NIBcfCSAZHwUgGx8BIB0vDeAfLwnQIl4L4Ay8R4ApeJbA2wD78DOZA/e7ABzk739Xz/T8rfAIfA6WYCd3BqA7NUSwCKfgLNKCK0BjoC7rzP74yoIrQGsuxSCB0ApBC+AMgieACUQvAHkESIApBGiAGQRIgEkEaIB5BAyAKQQsgBkEDIBJBCyAdIRFABSEVQA0hCUAFIQ1ADCERQBQhFUAcIQlAFCENQBfkOwg9eXpeftFQDmEOzv8ifARy8A3wiXwAHwANwujbf7q0xAi9bZZwwAN9oiDx4TUORFuS2z+wn4BAiAaEHnKChjAAAAAElFTkSuQmCC";
@@ -12367,8 +12464,8 @@ Made in Italy` })));
12367
12464
  React.createElement("div", { className: 'list-content-listItem-info-price', style: textStyles === null || textStyles === void 0 ? void 0 : textStyles.price, hidden: !priceText }, priceText))));
12368
12465
  };
12369
12466
  function WaterfallList(_a) {
12370
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
12371
- var { reportTagsView } = _a, props = __rest(_a, ["reportTagsView"]);
12467
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
12468
+ var { reportTagsView, showBanner } = _a, props = __rest(_a, ["reportTagsView", "showBanner"]);
12372
12469
  const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag } = useSxpDataSource();
12373
12470
  const [list, setList] = React.useState();
12374
12471
  const [data, setData] = React.useState();
@@ -12439,31 +12536,37 @@ Made in Italy` })));
12439
12536
  return (React.createElement(React.Fragment, null, isLoadingData ? (React.createElement("div", { style: { height: '100%', width: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' } },
12440
12537
  React.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } }))) : (React.createElement("div", { className: 'list' },
12441
12538
  React.createElement("div", { className: 'list-scroll', ref: containerRef },
12442
- 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),
12443
- 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'),
12539
+ 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.css({
12540
+ width: '100%',
12541
+ objectFit: 'cover',
12542
+ marginBottom: '20px'
12543
+ }), src: (_c = data === null || data === void 0 ? void 0 : data.tag) === null || _c === void 0 ? void 0 : _c.picture })),
12544
+ 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),
12545
+ 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'),
12444
12546
  React.createElement("div", { className: 'list-content' }, list === null || list === void 0 ? void 0 : list.map((item, ind) => {
12445
12547
  return (React.createElement(WaterfallFlowItem, Object.assign({ key: ind, index: ind, rec: item, list: list, reportTagsView: reportTagsView }, props)));
12446
12548
  })),
12447
12549
  React.createElement("div", { hidden: !isLoadMore, style: { textAlign: 'center' } }, "loading..."),
12448
- React.createElement("div", { hidden: !((_g = data === null || data === void 0 ? void 0 : data.tag) === null || _g === void 0 ? void 0 : _g.link), style: {
12449
- 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
12550
+ React.createElement("div", { hidden: !((_j = data === null || data === void 0 ? void 0 : data.tag) === null || _j === void 0 ? void 0 : _j.link), style: {
12551
+ 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
12450
12552
  } })),
12451
- 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 }),
12452
- 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' }) },
12453
- 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'))))));
12553
+ 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 }),
12554
+ 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' }) },
12555
+ 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'))))));
12454
12556
  }
12455
12557
 
12456
12558
  /*
12457
12559
  * @Author: binruan@chatlabs.com
12458
12560
  * @Date: 2024-01-10 10:58:24
12459
12561
  * @LastEditors: binruan@chatlabs.com
12460
- * @LastEditTime: 2024-06-07 15:57:29
12562
+ * @LastEditTime: 2024-06-12 14:18:56
12461
12563
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\WaterFall\index.tsx
12462
12564
  *
12463
12565
  */
12464
12566
  const WaterFall = (props) => {
12465
12567
  var _a;
12466
- const { waterFallData, setOpenHashtag, openHashtag, swiperRef, setWaterFallData, cacheRtcList, setRtcList, cacheActiveIndex, rtcList, setCacheRtcList, setIsFromHashtag, isFromHashtag, bffEventReport } = useSxpDataSource();
12568
+ const { waterFallData, setOpenHashtag, openHashtag, swiperRef, setWaterFallData, cacheRtcList, setRtcList, cacheActiveIndex, rtcList, setCacheRtcList, setIsFromHashtag, isFromHashtag, bffEventReport, themeTag } = useSxpDataSource();
12569
+ const { backMainFeed } = useEventReport();
12467
12570
  React.useRef(null);
12468
12571
  const modalEleRef = React.useRef(null);
12469
12572
  const [viewTime, setViewTime] = React.useState();
@@ -12484,6 +12587,9 @@ Made in Italy` })));
12484
12587
  if (!isEq && cacheRtcList && (cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.length)) {
12485
12588
  setRtcList === null || setRtcList === void 0 ? void 0 : setRtcList(cacheRtcList);
12486
12589
  }
12590
+ if (!(themeTag === null || themeTag === void 0 ? void 0 : themeTag.current)) {
12591
+ backMainFeed('branch', themeTag === null || themeTag === void 0 ? void 0 : themeTag.current, waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag);
12592
+ }
12487
12593
  reportTagsView();
12488
12594
  setWaterFallData === null || setWaterFallData === void 0 ? void 0 : setWaterFallData(undefined);
12489
12595
  setIsFromHashtag === null || setIsFromHashtag === void 0 ? void 0 : setIsFromHashtag(false);
@@ -12551,7 +12657,7 @@ Made in Italy` })));
12551
12657
  display: openHashtag ? 'block' : 'none'
12552
12658
  } },
12553
12659
  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 }),
12554
- (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);
12660
+ (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);
12555
12661
  };
12556
12662
  var WaterFall$1 = React.memo(WaterFall);
12557
12663
 
@@ -12582,7 +12688,7 @@ Made in Italy` })));
12582
12688
  category: 'base',
12583
12689
  type: 'HashTag',
12584
12690
  related: {
12585
- settingRender,
12691
+ settingRender: settingRender$1,
12586
12692
  bindableProps: []
12587
12693
  },
12588
12694
  defaulSetting: {
@@ -12639,6 +12745,84 @@ Made in Italy` })));
12639
12745
  sort: 2
12640
12746
  });
12641
12747
 
12748
+ /*
12749
+ * @Author: binruan@chatlabs.com
12750
+ * @Date: 2024-06-13 10:08:32
12751
+ * @LastEditors: binruan@chatlabs.com
12752
+ * @LastEditTime: 2024-06-13 17:42:50
12753
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\Consent\settingRender.tsx
12754
+ *
12755
+ */
12756
+ var settingRender = [
12757
+ {
12758
+ title: '协议详情',
12759
+ child: [
12760
+ {
12761
+ type: 'Switch',
12762
+ label: '必须同意用户协议',
12763
+ name: ['props', 'privacy_necessity'],
12764
+ extra: '当新用户进入页面时,会出现用户协议弹窗,用户需要先同意协议后才能访问内容。'
12765
+ },
12766
+ {
12767
+ type: 'Text',
12768
+ label: '弹窗标题',
12769
+ name: ['props', 'privacy_title']
12770
+ },
12771
+ {
12772
+ type: 'TextArea',
12773
+ label: '用户协议弹窗内容',
12774
+ name: ['props', 'privacy_context']
12775
+ },
12776
+ {
12777
+ type: 'Group',
12778
+ label: '隐私政策',
12779
+ child: [
12780
+ {
12781
+ type: 'Text',
12782
+ name: ['props', 'privacy_policy_title']
12783
+ },
12784
+ {
12785
+ type: 'Text',
12786
+ name: ['props', 'privacy_policy_url'],
12787
+ addonBefore: 'https://'
12788
+ }
12789
+ ],
12790
+ extra: '当用户点击更多信息按钮时,将会跳转至设置的链接查看政策内容'
12791
+ }
12792
+ ]
12793
+ }
12794
+ ];
12795
+
12796
+ const Consent$1 = (props) => {
12797
+ return React.createElement(Consent$1, Object.assign({}, props));
12798
+ };
12799
+ var ConsentComponent = React.memo(Consent$1);
12800
+
12801
+ /*
12802
+ * @Author: binruan@chatlabs.com
12803
+ * @Date: 2023-07-28 18:29:57
12804
+ * @LastEditors: binruan@chatlabs.com
12805
+ * @LastEditTime: 2024-06-13 17:32:17
12806
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\Consent\material.tsx
12807
+ *
12808
+ */
12809
+ const Consent = createMaterial(ConsentComponent, {
12810
+ displayName: 'Consent',
12811
+ icon: '',
12812
+ category: 'base',
12813
+ type: 'Consent',
12814
+ related: {
12815
+ settingRender
12816
+ },
12817
+ defaulSetting: {
12818
+ props: {},
12819
+ style: {}
12820
+ },
12821
+ w: 100,
12822
+ h: 40,
12823
+ sort: 1
12824
+ });
12825
+
12642
12826
  /*
12643
12827
  * @Author: binruan@chatlabs.com
12644
12828
  * @Date: 2023-07-25 14:56:49
@@ -12657,6 +12841,7 @@ Made in Italy` })));
12657
12841
  CommodityDetailDiroNew: CommodityDetailDiroNew,
12658
12842
  CommodityDiro: CommodityDiro,
12659
12843
  CommodityDiroNew: CommodityDiroNew,
12844
+ Consent: Consent,
12660
12845
  HashTag: HashTag,
12661
12846
  Link: Link,
12662
12847
  MultiCommodity: MultiCommodity,
@@ -13329,16 +13514,37 @@ Made in Italy` })));
13329
13514
  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 : '')))));
13330
13515
  };
13331
13516
 
13517
+ /*
13518
+ * @Author: binruan@chatlabs.com
13519
+ * @Date: 2024-04-29 16:32:21
13520
+ * @LastEditors: binruan@chatlabs.com
13521
+ * @LastEditTime: 2024-06-12 11:01:48
13522
+ * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Tagbar.tsx
13523
+ *
13524
+ */
13332
13525
  const DEFAULT_TAG = 'FOR U';
13333
13526
  const Tagbar = ({ tagList = [], setActiveIndex }) => {
13334
13527
  const [selectTag, setSelectTag] = React.useState(DEFAULT_TAG);
13335
- const { getRecommendVideos, setRtcList, setCacheRtcList, setCacheActiveIndex, setLoading, swiperRef, waterFallData } = useSxpDataSource();
13528
+ const { getRecommendVideos, setRtcList, setCacheRtcList, setCacheActiveIndex, setLoading, swiperRef, waterFallData, bffEventReport } = useSxpDataSource();
13529
+ const { backMainFeed } = useEventReport();
13336
13530
  const realTagList = React.useMemo(() => {
13337
13531
  return [DEFAULT_TAG, ...tagList];
13338
13532
  }, [tagList]);
13339
13533
  const handleSelectTag = (tag) => () => {
13340
13534
  if (tag === selectTag)
13341
13535
  return;
13536
+ if (tag !== 'FOR U') {
13537
+ bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
13538
+ eventInfo: {
13539
+ eventSubject: 'clickThemeTagsViewContents',
13540
+ eventDescription: 'click Theme Tags View Contents',
13541
+ themeTags: `[${tag}]`
13542
+ }
13543
+ });
13544
+ }
13545
+ else {
13546
+ backMainFeed('theme', selectTag);
13547
+ }
13342
13548
  let themeTag;
13343
13549
  if (tag !== DEFAULT_TAG) {
13344
13550
  themeTag = tag;
@@ -13370,7 +13576,7 @@ Made in Italy` })));
13370
13576
  * @Author: binruan@chatlabs.com
13371
13577
  * @Date: 2024-01-15 19:03:09
13372
13578
  * @LastEditors: binruan@chatlabs.com
13373
- * @LastEditTime: 2024-06-07 11:10:42
13579
+ * @LastEditTime: 2024-06-13 18:09:16
13374
13580
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
13375
13581
  *
13376
13582
  */
@@ -13381,11 +13587,11 @@ Made in Italy` })));
13381
13587
  const viewImageStartTime = React.useRef(0);
13382
13588
  const [isInit, setIsInit] = React.useState(false);
13383
13589
  const [isMuted, setIsMuted] = React.useState(true);
13384
- const curTime = React.useRef();
13385
13590
  const viewTime = React.useRef();
13386
13591
  const [isLoadMore, setIsLoadMore] = React.useState(false);
13387
13592
  const [isShowMore, setIsShowMore] = React.useState(false);
13388
- const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport } = useSxpDataSource();
13593
+ const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport, curTime, h5EnterLink } = useSxpDataSource();
13594
+ const { backMainFeed } = useEventReport();
13389
13595
  const [videoRef, setVideoRef] = React.useState(null);
13390
13596
  const playerRef = React.useRef();
13391
13597
  const { productView } = useEventReport();
@@ -13396,17 +13602,17 @@ Made in Italy` })));
13396
13602
  if (data.length <= 0) {
13397
13603
  return;
13398
13604
  }
13399
- initTime();
13605
+ refreshFeSessionId();
13606
+ const now = new Date();
13607
+ viewTime.current = now;
13608
+ if (isInit) {
13609
+ h5EnterLink === null || h5EnterLink === void 0 ? void 0 : h5EnterLink();
13610
+ }
13400
13611
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
13401
13612
  eventName: 'PageView'
13402
13613
  });
13403
13614
  setIsInit(true);
13404
- }, [data.length, bffFbReport]);
13405
- const initTime = () => {
13406
- curTime.current = new Date();
13407
- viewTime.current = new Date();
13408
- refreshFeSessionId();
13409
- };
13615
+ }, [data.length, bffFbReport, h5EnterLink, isInit]);
13410
13616
  const firstRef = React.useRef();
13411
13617
  React.useEffect(() => {
13412
13618
  var _a, _b, _c, _d;
@@ -13502,13 +13708,33 @@ Made in Italy` })));
13502
13708
  handleH5EnterLink();
13503
13709
  handleViewImageStartEvent(activeIndex);
13504
13710
  SXP_EVENT_BUS.emit(SXP_EVENT_TYPE.PAGE_DID_SHOW, item);
13711
+ backMainFeed('external');
13505
13712
  }
13506
13713
  };
13507
13714
  document.addEventListener('visibilitychange', visibleChange);
13508
13715
  return () => {
13509
13716
  document.removeEventListener('visibilitychange', visibleChange);
13510
13717
  };
13511
- }, [activeIndex, bffEventReport, curTime, data, handleH5EnterLink, popupDetailData, isFromHashtag, tempMap]);
13718
+ }, [
13719
+ activeIndex,
13720
+ bffEventReport,
13721
+ data,
13722
+ handleH5EnterLink,
13723
+ popupDetailData,
13724
+ isFromHashtag,
13725
+ tempMap,
13726
+ curTime,
13727
+ backMainFeed
13728
+ ]);
13729
+ React.useEffect(() => {
13730
+ const initTime = () => {
13731
+ backMainFeed('external');
13732
+ };
13733
+ window.addEventListener('pageshow', initTime);
13734
+ return () => {
13735
+ window.removeEventListener('pageshow', initTime);
13736
+ };
13737
+ }, []);
13512
13738
  const tagHeight = React.useMemo(() => {
13513
13739
  let h = 0;
13514
13740
  if (tagList.length > 0) {
@@ -14250,7 +14476,7 @@ Made in Italy` })));
14250
14476
  * @Author: binruan@chatlabs.com
14251
14477
  * @Date: 2024-01-15 19:03:09
14252
14478
  * @LastEditors: binruan@chatlabs.com
14253
- * @LastEditTime: 2024-05-17 18:41:05
14479
+ * @LastEditTime: 2024-06-13 14:54:12
14254
14480
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageCore\index.tsx
14255
14481
  *
14256
14482
  */
@@ -14267,14 +14493,14 @@ Made in Italy` })));
14267
14493
  RESOLVER[v.extend.type] = v;
14268
14494
  });
14269
14495
  const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage, appDomain, licenseUrl, enabledMetaConversionApi }) => {
14270
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
14496
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
14271
14497
  const utmVal = React.useMemo(() => {
14272
14498
  var _a;
14273
14499
  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('?', '') : '';
14274
14500
  return searchParams;
14275
14501
  }, []);
14276
14502
  return (React.createElement(EditorCore, { resolver: RESOLVER, enableDataSource: false, schema: data === null || data === void 0 ? void 0 : data.data, utmVal: utmVal },
14277
- 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 }) => {
14503
+ 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 }) => {
14278
14504
  var _a;
14279
14505
  return (React.createElement(React.Fragment, null,
14280
14506
  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 })),
@@ -14293,8 +14519,9 @@ Made in Italy` })));
14293
14519
  */
14294
14520
  const EditorDataContext = React.createContext({});
14295
14521
  const EditorDataProvider = ({ children, data }) => {
14296
- var _a, _b, _c, _d, _e, _f;
14522
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
14297
14523
  const [openHashtag, setOpenHashtag] = React.useState(false);
14524
+ const [openConsent, setOpenConsent] = React.useState(false);
14298
14525
  return (React.createElement(EditorDataContext.Provider, { value: {
14299
14526
  sxpPrameter: {
14300
14527
  bottomImage: (_a = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _a === void 0 ? void 0 : _a.bottom_image,
@@ -14302,11 +14529,20 @@ Made in Italy` })));
14302
14529
  personalizedRecommend: (_c = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _c === void 0 ? void 0 : _c.personalized_recommend,
14303
14530
  placeholderImage: (_d = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _d === void 0 ? void 0 : _d.placeholder_image,
14304
14531
  hashTagSize: (_e = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _e === void 0 ? void 0 : _e.hash_tag_size,
14305
- loadingImage: (_f = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _f === void 0 ? void 0 : _f.loading_image
14532
+ loadingImage: (_f = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _f === void 0 ? void 0 : _f.loading_image,
14533
+ privacyContent: (_g = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _g === void 0 ? void 0 : _g.privacy_context,
14534
+ privacyNecessity: (_h = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _h === void 0 ? void 0 : _h.privacy_necessity,
14535
+ privacyPolicyTitle: (_j = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _j === void 0 ? void 0 : _j.privacy_policy_title,
14536
+ privacyPolicyUrl: (_k = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _k === void 0 ? void 0 : _k.privacy_policy_url,
14537
+ privacyTitle: (_l = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _l === void 0 ? void 0 : _l.privacy_title,
14538
+ template: (_m = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _m === void 0 ? void 0 : _m.template,
14539
+ industry: (_o = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _o === void 0 ? void 0 : _o.industry
14306
14540
  },
14307
14541
  appDomain: data === null || data === void 0 ? void 0 : data.appDomain,
14308
14542
  openHashtag,
14309
- setOpenHashtag
14543
+ setOpenHashtag,
14544
+ openConsent,
14545
+ setOpenConsent
14310
14546
  } }, children));
14311
14547
  };
14312
14548
  function useEditorDataProvider() {