pb-sxp-ui 1.0.86 → 1.0.87

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 (61) hide show
  1. package/dist/index.cjs +208 -265
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.js +209 -266
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.min.cjs +3 -3
  6. package/dist/index.min.cjs.map +1 -1
  7. package/dist/index.min.js +3 -3
  8. package/dist/index.min.js.map +1 -1
  9. package/dist/pb-ui.js +208 -265
  10. package/dist/pb-ui.js.map +1 -1
  11. package/dist/pb-ui.min.js +3 -3
  12. package/dist/pb-ui.min.js.map +1 -1
  13. package/es/core/components/Consent/index.js +2 -2
  14. package/es/core/components/DiyPortalPreview/VideoWidget.js +3 -3
  15. package/es/core/components/SxpPageRender/FingerSwipeTip/index.js +1 -1
  16. package/es/core/components/SxpPageRender/FormatImage.js +2 -2
  17. package/es/core/components/SxpPageRender/LikeButton/index.js +1 -1
  18. package/es/core/components/SxpPageRender/Navbar.js +1 -1
  19. package/es/core/components/SxpPageRender/Nudge/index.js +1 -1
  20. package/es/core/components/SxpPageRender/Tagbar.js +6 -7
  21. package/es/core/components/SxpPageRender/ToggleButton/index.js +2 -2
  22. package/es/core/components/SxpPageRender/VideoWidget/index.js +3 -3
  23. package/es/core/components/SxpPageRender/WaterFall/List.js +2 -2
  24. package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +17 -52
  25. package/es/core/components/SxpPageRender/WaterFall/index.js +2 -4
  26. package/es/core/components/SxpPageRender/index.js +48 -52
  27. package/es/core/context/SxpDataSourceProvider.d.ts +4 -0
  28. package/es/core/context/SxpDataSourceProvider.js +20 -17
  29. package/es/core/hooks/useEventReport.d.ts +1 -1
  30. package/es/core/hooks/useEventReport.js +13 -10
  31. package/es/materials/sxp/popup/AppointForm/index.js +1 -1
  32. package/es/materials/sxp/popup/CommodityDetail/index.js +3 -3
  33. package/es/materials/sxp/popup/CommodityDetailDiro/index.js +4 -4
  34. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +3 -3
  35. package/es/materials/sxp/popup/Prompt/index.js +2 -2
  36. package/es/materials/sxp/template/Appoint/index.js +1 -1
  37. package/lib/core/components/Consent/index.js +2 -2
  38. package/lib/core/components/DiyPortalPreview/VideoWidget.js +3 -3
  39. package/lib/core/components/SxpPageRender/FingerSwipeTip/index.js +1 -1
  40. package/lib/core/components/SxpPageRender/FormatImage.js +2 -2
  41. package/lib/core/components/SxpPageRender/LikeButton/index.js +1 -1
  42. package/lib/core/components/SxpPageRender/Navbar.js +1 -1
  43. package/lib/core/components/SxpPageRender/Nudge/index.js +1 -1
  44. package/lib/core/components/SxpPageRender/Tagbar.js +7 -8
  45. package/lib/core/components/SxpPageRender/ToggleButton/index.js +2 -2
  46. package/lib/core/components/SxpPageRender/VideoWidget/index.js +3 -3
  47. package/lib/core/components/SxpPageRender/WaterFall/List.js +2 -2
  48. package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +17 -52
  49. package/lib/core/components/SxpPageRender/WaterFall/index.js +2 -4
  50. package/lib/core/components/SxpPageRender/index.js +48 -52
  51. package/lib/core/context/SxpDataSourceProvider.d.ts +4 -0
  52. package/lib/core/context/SxpDataSourceProvider.js +21 -18
  53. package/lib/core/hooks/useEventReport.d.ts +1 -1
  54. package/lib/core/hooks/useEventReport.js +13 -10
  55. package/lib/materials/sxp/popup/AppointForm/index.js +1 -1
  56. package/lib/materials/sxp/popup/CommodityDetail/index.js +3 -3
  57. package/lib/materials/sxp/popup/CommodityDetailDiro/index.js +4 -4
  58. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +3 -3
  59. package/lib/materials/sxp/popup/Prompt/index.js +2 -2
  60. package/lib/materials/sxp/template/Appoint/index.js +1 -1
  61. package/package.json +1 -1
@@ -53,7 +53,7 @@ const Consent = ({ width = window.innerWidth, height = window.innerHeight, priva
53
53
  React.createElement("div", { className: 'consent-title' }, privacy_title !== null && privacy_title !== void 0 ? privacy_title : 'Privacy Policy'),
54
54
  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.')),
55
55
  React.createElement("div", { className: 'consent-col' },
56
- React.createElement("button", { className: 'consent-btn', onClick: handleAgree }, "Agree"),
57
- 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')))));
56
+ React.createElement("button", { "aria-label": 'agree', className: 'consent-btn', onClick: handleAgree }, "Agree"),
57
+ React.createElement("a", { className: 'consent-policy', target: '_blank', href: privacy_policy_url ? `https://${privacy_policy_url}` : undefined }, privacy_policy_title !== null && privacy_policy_title !== void 0 ? privacy_policy_title : 'More information')))));
58
58
  };
59
59
  export default memo(Consent);
@@ -172,7 +172,7 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
172
172
  if (!(sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image) || isLoadFinish) {
173
173
  return null;
174
174
  }
175
- return (React.createElement("img", { style: { position: 'absolute', left: 0, top: 0, width: '100%', height: '100%', objectFit: 'cover' }, src: sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image }));
175
+ return (React.createElement("img", { style: { position: 'absolute', left: 0, top: 0, width: '100%', height: '100%', objectFit: 'cover' }, src: sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image, alt: 'video poster' }));
176
176
  }, [isLoadFinish, sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image]);
177
177
  useEffect(() => {
178
178
  const handleBeforeUnload = () => {
@@ -221,7 +221,7 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
221
221
  height,
222
222
  objectFit: 'contain'
223
223
  } }),
224
- React.createElement("img", { hidden: !isPauseVideo, className: 'clc-pb-video-pause', src: PAUSE_ICON }))),
224
+ React.createElement("img", { hidden: !isPauseVideo, className: 'clc-pb-video-pause', src: PAUSE_ICON, alt: 'video pause image' }))),
225
225
  renderPoster)) : (React.createElement("div", { className: 'video-container', key: rec === null || rec === void 0 ? void 0 : rec.video.itemId, onClick: handleClickVideo(), style: {
226
226
  position: 'relative',
227
227
  width,
@@ -230,6 +230,6 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
230
230
  } },
231
231
  React.createElement("video", { id: `pb-video-${index}`, className: 'clc-pb-video', style: { width: '100%' }, ref: videoRef, crossOrigin: 'anonymous', muted: true, autoPlay: true, controls: false, playsInline: true, preload: 'auto', onPause: onPause, onEnded: handleVideoStart }),
232
232
  renderPoster,
233
- React.createElement("img", { hidden: !isPauseVideo, className: 'clc-pb-video-pause', src: PAUSE_ICON })))));
233
+ React.createElement("img", { hidden: !isPauseVideo, className: 'clc-pb-video-pause', src: PAUSE_ICON, alt: 'video pause image' })))));
234
234
  };
235
235
  export default memo(VideoWidget);
@@ -14,6 +14,6 @@ const FingerSwipeTip = ({ imageUrl, style }) => {
14
14
  return show ? 'pb-fadeIn' : 'pb-fadeOut';
15
15
  }, [show]);
16
16
  return (React.createElement("div", { hidden: !show, className: `pb-finger-wrap ${animationCls}`, style: style },
17
- React.createElement("img", { src: imageUrl || FINGER_SWIPE_ICON })));
17
+ React.createElement("img", { src: imageUrl || FINGER_SWIPE_ICON, alt: 'finger swiper' })));
18
18
  };
19
19
  export default FingerSwipeTip;
@@ -22,8 +22,8 @@ const FormatImage = forwardRef((props, ref) => {
22
22
  React.createElement("source", { type: 'image/jpeg', srcSet: `${imgSrc}?imageMogr2/format/jpg` }),
23
23
  React.createElement("img", { className: className, src: imgSrc, style: style, loading: loading, onLoad: (e) => {
24
24
  onLoad === null || onLoad === void 0 ? void 0 : onLoad(e.target);
25
- } }))) : (React.createElement("img", { className: className, src: imgSrc, style: style, loading: loading, onLoad: (e) => {
25
+ }, alt: 'image' }))) : (React.createElement("img", { className: className, src: imgSrc, style: style, loading: loading, onLoad: (e) => {
26
26
  onLoad === null || onLoad === void 0 ? void 0 : onLoad(e.target);
27
- } }))));
27
+ }, alt: 'image' }))));
28
28
  });
29
29
  export default memo(FormatImage);
@@ -52,7 +52,7 @@ const LikeButton = (_a) => {
52
52
  }
53
53
  }
54
54
  }), 200);
55
- return (React.createElement("button", Object.assign({}, props, { onClick: handleClick }),
55
+ return (React.createElement("button", Object.assign({}, props, { "aria-label": 'like', onClick: handleClick }),
56
56
  React.createElement("img", { style: { width: '100%', height: '100%', objectFit: 'contain' }, src: state ? activeIcon || likeIcon : unActicveIcon || unlikeIcon, alt: 'icon' })));
57
57
  };
58
58
  export default memo(LikeButton);
@@ -4,7 +4,7 @@ const Navbar = ({ icon, styles, textStyle, onClose }) => {
4
4
  var _a;
5
5
  const { waterFallData, setOpenHashtag } = useSxpDataSource();
6
6
  return (React.createElement("div", { className: 'clc-sxp-nav', style: styles },
7
- React.createElement("img", { className: 'clc-sxp-nav-left', src: icon, alt: '', onClick: onClose }),
7
+ React.createElement("img", { className: 'clc-sxp-nav-left', src: icon, alt: 'back button', onClick: onClose }),
8
8
  React.createElement("div", { className: 'clc-sxp-nav-title', style: textStyle }, `#${(_a = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag) !== null && _a !== void 0 ? _a : '标题'}`)));
9
9
  };
10
10
  export default memo(Navbar);
@@ -8,7 +8,7 @@ const Nudge = ({ nudge }) => {
8
8
  backgroundColor: nudge === null || nudge === void 0 ? void 0 : nudge.backgroundColor,
9
9
  borderRadius: (_f = nudge === null || nudge === void 0 ? void 0 : nudge.borderRadius) !== null && _f !== void 0 ? _f : 4
10
10
  } },
11
- (nudge === null || nudge === void 0 ? void 0 : nudge.icon) ? React.createElement("img", { src: nudge.icon, style: { height: '100%', objectFit: 'cover', flexShrink: 0 } }) : null,
11
+ (nudge === null || nudge === void 0 ? void 0 : nudge.icon) ? (React.createElement("img", { src: nudge.icon, alt: 'nudge icon', style: { height: '100%', objectFit: 'cover', flexShrink: 0 } })) : null,
12
12
  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 : '')))));
13
13
  };
14
14
  export default Nudge;
@@ -1,11 +1,10 @@
1
- import React, { memo, useMemo, useState } from 'react';
1
+ import React, { memo, useMemo } from 'react';
2
2
  import { useSxpDataSource } from '../../../core/hooks';
3
3
  import SXP_EVENT_BUS, { SXP_EVENT_TYPE } from '../../../core/utils/event';
4
4
  import { useEventReport } from '../../../core/hooks/useEventReport';
5
- const DEFAULT_TAG = 'FOR U';
5
+ import { DEFAULT_TAG } from '../../../core/context/SxpDataSourceProvider';
6
6
  const Tagbar = ({ tagList = [], setActiveIndex }) => {
7
- const [selectTag, setSelectTag] = useState(DEFAULT_TAG);
8
- const { getRecommendVideos, setRtcList, setCacheRtcList, setCacheActiveIndex, setLoading, swiperRef, waterFallData, bffEventReport } = useSxpDataSource();
7
+ const { getRecommendVideos, setRtcList, setCacheRtcList, setCacheActiveIndex, setLoading, swiperRef, waterFallData, bffEventReport, selectTag, setSelectTag } = useSxpDataSource();
9
8
  const { backMainFeed } = useEventReport();
10
9
  const realTagList = useMemo(() => {
11
10
  return [DEFAULT_TAG, ...tagList];
@@ -18,12 +17,12 @@ const Tagbar = ({ tagList = [], setActiveIndex }) => {
18
17
  eventInfo: {
19
18
  eventSubject: 'clickThemeTagsViewContents',
20
19
  eventDescription: 'click Theme Tags View Contents',
21
- themeTags: `[${tag}]`
20
+ themeTags: `['${tag}']`
22
21
  }
23
22
  });
24
23
  }
25
24
  else {
26
- backMainFeed('theme', selectTag);
25
+ backMainFeed('theme', tag, selectTag);
27
26
  }
28
27
  let themeTag;
29
28
  if (tag !== DEFAULT_TAG) {
@@ -41,7 +40,7 @@ const Tagbar = ({ tagList = [], setActiveIndex }) => {
41
40
  }).finally(() => {
42
41
  setLoading === null || setLoading === void 0 ? void 0 : setLoading(false);
43
42
  });
44
- setSelectTag(tag);
43
+ setSelectTag === null || setSelectTag === void 0 ? void 0 : setSelectTag(tag);
45
44
  };
46
45
  if (waterFallData || tagList.length <= 0)
47
46
  return null;
@@ -7,7 +7,7 @@ const ToggleButton = ({ defaultValue, activeIcon, unactiveIcon, onChange, style
7
7
  setIsTure(result);
8
8
  onChange === null || onChange === void 0 ? void 0 : onChange(result);
9
9
  };
10
- return (React.createElement("button", { style: style, className: 'pb-toggle-button', onClick: handleClick },
11
- React.createElement("img", { className: 'pb-toggle-button-icon', src: isTrue ? activeIcon : unactiveIcon })));
10
+ return (React.createElement("button", { style: style, "aria-label": 'toggle button', className: 'pb-toggle-button', onClick: handleClick },
11
+ React.createElement("img", { className: 'pb-toggle-button-icon', alt: 'toggle image', src: isTrue ? activeIcon : unactiveIcon })));
12
12
  };
13
13
  export default memo(ToggleButton);
@@ -248,7 +248,7 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
248
248
  if (!(sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image) || isLoadFinish) {
249
249
  return null;
250
250
  }
251
- return (React.createElement("img", { style: { position: 'absolute', left: 0, top: 0, width: '100%', height: '100%', objectFit: 'cover' }, src: sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image }));
251
+ return (React.createElement("img", { style: { position: 'absolute', left: 0, top: 0, width: '100%', height: '100%', objectFit: 'cover' }, src: sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image, alt: 'placeholder image' }));
252
252
  }, [isLoadFinish, sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image]);
253
253
  useEffect(() => {
254
254
  if (!videoRef)
@@ -281,7 +281,7 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
281
281
  } },
282
282
  React.createElement("div", { style: { position: 'relative', width: '100%', height: '100%' } },
283
283
  React.createElement("div", { className: 'n-full-screen', ref: videoEleRef, id: videoId, style: { width: '100%', height: '100%' } }),
284
- React.createElement("img", { hidden: !isPauseVideo, className: 'clc-pb-video-pause', src: PAUSE_ICON }))),
284
+ React.createElement("img", { hidden: !isPauseVideo, className: 'clc-pb-video-pause', alt: 'pause', src: PAUSE_ICON }))),
285
285
  renderPoster)) : (React.createElement("div", { className: 'video-container', key: rec === null || rec === void 0 ? void 0 : rec.video.itemId, style: {
286
286
  position: 'relative',
287
287
  width: '100%',
@@ -290,6 +290,6 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
290
290
  }, onClick: handleClickVideo() },
291
291
  React.createElement("div", { className: 'n-full-screen', ref: videoEleRef, id: videoId, style: { width: '100%', height: '100%' } }),
292
292
  renderPoster,
293
- React.createElement("img", { hidden: !isPauseVideo, className: 'clc-pb-video-pause', src: PAUSE_ICON })))));
293
+ React.createElement("img", { hidden: !isPauseVideo, className: 'clc-pb-video-pause', src: PAUSE_ICON, alt: 'pause' })))));
294
294
  };
295
295
  export default memo(VideoWidget);
@@ -114,7 +114,7 @@ const WaterfallFlowItem = (props) => {
114
114
  React.createElement("div", { className: 'list-content-listItem-info-price', style: textStyles === null || textStyles === void 0 ? void 0 : textStyles.price, hidden: !priceText }, priceText))));
115
115
  };
116
116
  export default function WaterfallList(_a) {
117
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
117
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
118
118
  var { reportTagsView, showBanner } = _a, props = __rest(_a, ["reportTagsView", "showBanner"]);
119
119
  const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag } = useSxpDataSource();
120
120
  const [list, setList] = useState();
@@ -187,5 +187,5 @@ export default function WaterfallList(_a) {
187
187
  } })),
188
188
  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 }),
189
189
  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' }) },
190
- 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'))))));
190
+ React.createElement("button", { "aria-label": ((_q = data === null || data === void 0 ? void 0 : data.tag) === null || _q === void 0 ? void 0 : _q.linkTitle) || 'Shop the collection', className: 'list-btn', style: props === null || props === void 0 ? void 0 : props.buttonStyle, onClick: handleClickLink }, ((_r = data === null || data === void 0 ? void 0 : data.tag) === null || _r === void 0 ? void 0 : _r.linkTitle) || 'Shop the collection'))))));
191
191
  }
@@ -71,56 +71,24 @@ const WaterfallFlowItem = (props) => {
71
71
  if (imgDom.current === null || src === '') {
72
72
  return;
73
73
  }
74
- const img = new Image();
74
+ let imgSrc = null;
75
75
  if (showVideo && firstFrameSrc) {
76
- img.src = firstFrameSrc;
76
+ imgSrc = firstFrameSrc;
77
77
  }
78
78
  else {
79
- img.src = src;
79
+ imgSrc = src;
80
80
  }
81
- img.onload = () => {
82
- setImgInfo({
83
- height: img.height,
84
- width: img.width
85
- });
86
- setIsLoading(true);
87
- };
88
- imgDom.current.setSrc(img.src);
89
- }, [src, showVideo, firstFrameSrc, isImgShow]);
90
- useEffect(() => {
91
- const height = imgInfo.height * (unitWidth / imgInfo.width);
92
- if (isLoading) {
81
+ if (imgSrc)
82
+ imgDom.current.setSrc(imgSrc);
83
+ }, [src, showVideo, firstFrameSrc]);
84
+ const pictRef = useRef();
85
+ const imgLoad = useCallback((img) => {
86
+ setTimeout(() => {
87
+ var _a;
88
+ const height = (_a = pictRef === null || pictRef === void 0 ? void 0 : pictRef.current) === null || _a === void 0 ? void 0 : _a.offsetHeight;
93
89
  sizeChange(height + 56 + space, index);
94
- }
95
- }, [imgInfo, index, unitWidth, isLoading, space]);
96
- const calculateHeightForWidth = (videoWidth, videoHeight, targetWidth) => {
97
- const aspectRatio = videoWidth / videoHeight;
98
- const targetHeight = targetWidth / aspectRatio;
99
- return targetHeight;
100
- };
101
- useEffect(() => {
102
- const video = videoDom === null || videoDom === void 0 ? void 0 : videoDom.current;
103
- if (video === null || src === '' || !showVideo) {
104
- return;
105
- }
106
- video.src = src;
107
- video.currentTime = 1;
108
- video.crossOrigin = 'anonymous';
109
- video.onloadeddata = () => {
110
- const canvas = canvasRef === null || canvasRef === void 0 ? void 0 : canvasRef.current;
111
- if (!canvas)
112
- return;
113
- const ctx = canvas.getContext('2d');
114
- const targetWidth = (window === null || window === void 0 ? void 0 : window.innerWidth) / 2;
115
- const targetHeight = calculateHeightForWidth(video.videoWidth, video.videoHeight, targetWidth);
116
- canvas.height = targetHeight;
117
- canvas.width = targetWidth;
118
- ctx === null || ctx === void 0 ? void 0 : ctx.drawImage(video, 0, 0, canvas.width, canvas.height);
119
- setFirstFrameSrc(canvas.toDataURL());
120
- video.remove();
121
- canvas.remove();
122
- };
123
- }, [src, showVideo]);
90
+ }, 0);
91
+ }, [space, sizeChange, index, unitWidth, pictRef]);
124
92
  const handleClickToDetail = () => {
125
93
  reportTagsView();
126
94
  setRtcList === null || setRtcList === void 0 ? void 0 : setRtcList(list);
@@ -131,17 +99,14 @@ const WaterfallFlowItem = (props) => {
131
99
  }, 0);
132
100
  };
133
101
  return (React.createElement("div", { ref: ref, style: Object.assign({}, style), className: 'waterFallList-content-listItem', key: index, onClick: handleClickToDetail },
134
- React.createElement("div", { className: 'waterFallList-content-listItem-picture' },
135
- showVideo && (React.createElement("div", { style: { display: 'none' } },
136
- React.createElement("video", { ref: videoDom, src: src, crossOrigin: 'anonymous', className: 'waterFallList-content-listItem-picture-img' }),
137
- React.createElement("canvas", { ref: canvasRef }))),
138
- React.createElement(FormatImage, { loading: 'lazy', className: 'waterFallList-content-listItem-picture-img', ref: imgDom })),
102
+ React.createElement("div", { className: 'waterFallList-content-listItem-picture', ref: pictRef },
103
+ React.createElement(FormatImage, { loading: 'lazy', className: 'waterFallList-content-listItem-picture-img', onLoad: imgLoad, ref: imgDom })),
139
104
  React.createElement("div", { className: 'waterFallList-content-listItem-info' },
140
105
  React.createElement("div", { className: `${'waterFallList-content-listItem-info-title'} ${priceText ? 'waterFallList-content-listItem-info-nowrap' : ''}`, style: Object.assign({}, textStyles === null || textStyles === void 0 ? void 0 : textStyles.title) }, title && title),
141
106
  React.createElement("div", { className: 'waterFallList-content-listItem-info-price', hidden: !priceText, style: textStyles.price }, priceText))));
142
107
  };
143
108
  export default function WaterfallList(_a) {
144
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
109
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
145
110
  var { reportTagsView, showBanner } = _a, props = __rest(_a, ["reportTagsView", "showBanner"]);
146
111
  const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag } = useSxpDataSource();
147
112
  const scrollParent = useRef(null);
@@ -337,5 +302,5 @@ export default function WaterfallList(_a) {
337
302
  } }))),
338
303
  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 }),
339
304
  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' }) },
340
- 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'))))));
305
+ React.createElement("button", { "aria-label": ((_v = data === null || data === void 0 ? void 0 : data.tag) === null || _v === void 0 ? void 0 : _v.linkTitle) || 'Shop the collection', className: 'waterFallList-btn', style: props === null || props === void 0 ? void 0 : props.buttonStyle, onClick: handleClickLink }, ((_w = data === null || data === void 0 ? void 0 : data.tag) === null || _w === void 0 ? void 0 : _w.linkTitle) || 'Shop the collection'))))));
341
306
  }
@@ -10,7 +10,7 @@ import { useSxpDataSource } from '../../../../core/hooks';
10
10
  import { useEventReport } from '../../../../core/hooks/useEventReport';
11
11
  const WaterFall = (props) => {
12
12
  var _a;
13
- const { waterFallData, setOpenHashtag, openHashtag, swiperRef, setWaterFallData, cacheRtcList, setRtcList, cacheActiveIndex, rtcList, setCacheRtcList, setIsFromHashtag, isFromHashtag, bffEventReport, themeTag } = useSxpDataSource();
13
+ const { waterFallData, setOpenHashtag, openHashtag, swiperRef, setWaterFallData, cacheRtcList, setRtcList, cacheActiveIndex, rtcList, setCacheRtcList, setIsFromHashtag, isFromHashtag, bffEventReport, themeTag, selectTag } = useSxpDataSource();
14
14
  const { backMainFeed } = useEventReport();
15
15
  const ref = useRef(null);
16
16
  const modalEleRef = useRef(null);
@@ -32,9 +32,7 @@ const WaterFall = (props) => {
32
32
  if (!isEq && cacheRtcList && (cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.length)) {
33
33
  setRtcList === null || setRtcList === void 0 ? void 0 : setRtcList(cacheRtcList);
34
34
  }
35
- if (!(themeTag === null || themeTag === void 0 ? void 0 : themeTag.current)) {
36
- backMainFeed('branch', themeTag === null || themeTag === void 0 ? void 0 : themeTag.current, waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag);
37
- }
35
+ backMainFeed('branch', selectTag, undefined, waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag);
38
36
  reportTagsView();
39
37
  setWaterFallData === null || setWaterFallData === void 0 ? void 0 : setWaterFallData(undefined);
40
38
  setIsFromHashtag === null || setIsFromHashtag === void 0 ? void 0 : setIsFromHashtag(false);
@@ -21,8 +21,9 @@ import { useEventReport } from '../../../core/hooks/useEventReport';
21
21
  import withBindDataSource from '../../../core/hoc/withBindDataSource';
22
22
  import Tagbar from './Tagbar';
23
23
  import { getFeUserId } from '../../../core/utils/localStore';
24
+ import Consent from '../Consent';
24
25
  const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.innerHeight, containerWidth = window.innerWidth, tempMap, resolver, data = [], ctaType, tipText, nudge, _schema, hashTagStyle, tagList = [], licenseUrl }) => {
25
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
26
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
26
27
  const { schema } = useEditor();
27
28
  const [activeIndex, setActiveIndex] = useState(0);
28
29
  const viewImageStartTime = useRef(0);
@@ -31,7 +32,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
31
32
  const viewTime = useRef();
32
33
  const [isLoadMore, setIsLoadMore] = useState(false);
33
34
  const [isShowMore, setIsShowMore] = useState(false);
34
- const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport, curTime, h5EnterLink } = useSxpDataSource();
35
+ const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport, curTime, h5EnterLink, isShowConsent, selectTag } = useSxpDataSource();
35
36
  const { backMainFeed } = useEventReport();
36
37
  const [videoRef, setVideoRef] = useState(null);
37
38
  const playerRef = useRef();
@@ -105,8 +106,9 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
105
106
  const item = data === null || data === void 0 ? void 0 : data[activeIndex];
106
107
  const visibleChange = () => {
107
108
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
109
+ const repCond = !openHashtag && !isShowConsent;
108
110
  if (document.visibilityState === 'hidden') {
109
- if (!openHashtag) {
111
+ if (repCond) {
110
112
  SXP_EVENT_BUS.emit(SXP_EVENT_TYPE.PAGE_DID_HIDE, item);
111
113
  handleReportViewImageEnd(item);
112
114
  handleReportProductView(item);
@@ -146,11 +148,11 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
146
148
  }
147
149
  else if (document.visibilityState === 'visible') {
148
150
  handleH5EnterLink();
149
- if (!openHashtag) {
151
+ if (repCond) {
150
152
  handleViewImageStartEvent(activeIndex);
151
153
  SXP_EVENT_BUS.emit(SXP_EVENT_TYPE.PAGE_DID_SHOW, item);
154
+ backMainFeed('external', selectTag);
152
155
  }
153
- backMainFeed('external');
154
156
  }
155
157
  };
156
158
  document.addEventListener('visibilitychange', visibleChange);
@@ -167,17 +169,10 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
167
169
  tempMap,
168
170
  curTime,
169
171
  backMainFeed,
170
- openHashtag
172
+ openHashtag,
173
+ isShowConsent,
174
+ selectTag
171
175
  ]);
172
- useEffect(() => {
173
- const initTime = () => {
174
- backMainFeed('external');
175
- };
176
- window.addEventListener('pageshow', initTime);
177
- return () => {
178
- window.removeEventListener('pageshow', initTime);
179
- };
180
- }, []);
181
176
  const tagHeight = useMemo(() => {
182
177
  let h = 0;
183
178
  if (tagList.length > 0) {
@@ -417,44 +412,45 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
417
412
  const mutedIcon = useIconLink('/pb_static/5beaaa5ce7f3477b99db3838619cc471.png');
418
413
  const unmutedIcon = useIconLink('/pb_static/fea8668a8a894e4aa3a86bcc775e895e.png');
419
414
  return (React.createElement("div", { id: 'sxp-render', className: 'clc-sxp-container' },
420
- waterFallData && (React.createElement(Navbar, { icon: left, styles: { background: 'rgba(0,0,0,.3)', color: '#fff' }, onClose: () => {
421
- setOpenHashtag === null || setOpenHashtag === void 0 ? void 0 : setOpenHashtag(true);
422
- } })),
423
- renderLogo,
424
- React.createElement(Tagbar, { tagList: tagList, setActiveIndex: setActiveIndex }),
425
- isShowFingerTip ? (React.createElement(FingerSwipeTip, { imageUrl: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipIcon, style: { top: `${50 + ((_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipOffset) !== null && _a !== void 0 ? _a : 0)}%` } })) : null,
426
- React.createElement(Swiper, { style: {
427
- marginTop: tagHeight
428
- }, ref: swiperRef, onSlideChange: () => {
429
- swiperRef.current.swiper.allowTouchMove = false;
430
- setTimeout(() => {
431
- swiperRef.current.swiper.allowTouchMove = true;
432
- }, 500);
433
- }, onActiveIndexChange: (swiper) => {
434
- setActiveIndex(swiper.activeIndex);
435
- if (openHashtag)
436
- return;
437
- handleScrollEvent(swiper);
438
- if (waterFallData)
439
- return;
440
- if ((swiper === null || swiper === void 0 ? void 0 : swiper.activeIndex) + 2 >= (data === null || data === void 0 ? void 0 : data.length)) {
441
- if (!isLoadMore) {
442
- setIsLoadMore(true);
443
- loadVideos === null || loadVideos === void 0 ? void 0 : loadVideos(Math.ceil(activeIndex / 10) + 1).then(() => {
444
- setIsLoadMore(false);
445
- });
415
+ isShowConsent ? (React.createElement(Consent, Object.assign({}, (_c = (_b = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.consent) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.item) === null || _c === void 0 ? void 0 : _c.props))) : (React.createElement(React.Fragment, null,
416
+ waterFallData && (React.createElement(Navbar, { icon: left, styles: { background: 'rgba(0,0,0,.3)', color: '#fff' }, onClose: () => {
417
+ setOpenHashtag === null || setOpenHashtag === void 0 ? void 0 : setOpenHashtag(true);
418
+ } })),
419
+ renderLogo,
420
+ React.createElement(Tagbar, { tagList: tagList, setActiveIndex: setActiveIndex }),
421
+ isShowFingerTip ? (React.createElement(FingerSwipeTip, { imageUrl: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipIcon, style: { top: `${50 + ((_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipOffset) !== null && _d !== void 0 ? _d : 0)}%` } })) : null,
422
+ React.createElement(Swiper, { style: {
423
+ marginTop: tagHeight
424
+ }, ref: swiperRef, onSlideChange: () => {
425
+ swiperRef.current.swiper.allowTouchMove = false;
426
+ setTimeout(() => {
427
+ swiperRef.current.swiper.allowTouchMove = true;
428
+ }, 500);
429
+ }, onActiveIndexChange: (swiper) => {
430
+ setActiveIndex(swiper.activeIndex);
431
+ if (openHashtag)
432
+ return;
433
+ handleScrollEvent(swiper);
434
+ if (waterFallData)
435
+ return;
436
+ if ((swiper === null || swiper === void 0 ? void 0 : swiper.activeIndex) + 2 >= (data === null || data === void 0 ? void 0 : data.length)) {
437
+ if (!isLoadMore) {
438
+ setIsLoadMore(true);
439
+ loadVideos === null || loadVideos === void 0 ? void 0 : loadVideos(Math.ceil(activeIndex / 10) + 1).then(() => {
440
+ setIsLoadMore(false);
441
+ });
442
+ }
446
443
  }
447
- }
448
- }, direction: 'vertical', height: height },
449
- React.createElement(ToggleButton, { style: {
450
- position: 'fixed',
451
- visibility: ((_c = (_b = data === null || data === void 0 ? void 0 : data[activeIndex]) === null || _b === void 0 ? void 0 : _b.video) === null || _c === void 0 ? void 0 : _c.url) ? 'visible' : 'hidden',
452
- zIndex: 999,
453
- [(_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconXPosit) !== null && _d !== void 0 ? _d : 'right']: (_e = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconX) !== null && _e !== void 0 ? _e : 0,
454
- [(_f = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconYPosit) !== null && _f !== void 0 ? _f : 'bottom']: (_g = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconY) !== null && _g !== void 0 ? _g : 23
455
- }, defaultValue: isMuted, activeIcon: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unMuteIcon) ? globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unMuteIcon : mutedIcon, unactiveIcon: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIcon) ? globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIcon : unmutedIcon, onChange: setIsMuted }),
456
- renderView),
457
- React.createElement(WaterFall, Object.assign({}, (_k = (_j = (_h = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.hashTag) === null || _h === void 0 ? void 0 : _h[0]) === null || _j === void 0 ? void 0 : _j.item) === null || _k === void 0 ? void 0 : _k.props)),
444
+ }, direction: 'vertical', height: height },
445
+ React.createElement(ToggleButton, { style: {
446
+ position: 'fixed',
447
+ visibility: ((_f = (_e = data === null || data === void 0 ? void 0 : data[activeIndex]) === null || _e === void 0 ? void 0 : _e.video) === null || _f === void 0 ? void 0 : _f.url) ? 'visible' : 'hidden',
448
+ zIndex: 999,
449
+ [(_g = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconXPosit) !== null && _g !== void 0 ? _g : 'right']: (_h = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconX) !== null && _h !== void 0 ? _h : 0,
450
+ [(_j = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconYPosit) !== null && _j !== void 0 ? _j : 'bottom']: (_k = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconY) !== null && _k !== void 0 ? _k : 23
451
+ }, defaultValue: isMuted, activeIcon: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unMuteIcon) ? globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unMuteIcon : mutedIcon, unactiveIcon: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIcon) ? globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIcon : unmutedIcon, onChange: setIsMuted }),
452
+ renderView))),
453
+ React.createElement(WaterFall, Object.assign({}, (_o = (_m = (_l = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.hashTag) === null || _l === void 0 ? void 0 : _l[0]) === null || _m === void 0 ? void 0 : _m.item) === null || _o === void 0 ? void 0 : _o.props)),
458
454
  React.createElement("div", { style: { position: 'absolute', zIndex: -100 } },
459
455
  React.createElement("video", { ref: playerRef, id: 'player-container-id', playsInline: true, crossOrigin: 'anonymous', style: {
460
456
  backgroundColor: 'transparent',
@@ -77,6 +77,9 @@ export interface ISxpDataSourceContext {
77
77
  curTime?: any;
78
78
  h5EnterLink?: () => void;
79
79
  themeTag?: any;
80
+ isShowConsent?: boolean;
81
+ selectTag?: string;
82
+ setSelectTag?: React.Dispatch<React.SetStateAction<string>>;
80
83
  }
81
84
  export declare const SxpDataSourceContext: React.Context<ISxpDataSourceContext>;
82
85
  export interface SxpDataSourceProviderProps {
@@ -115,5 +118,6 @@ export interface SxpDataSourceProviderProps {
115
118
  globalConfig?: ISxpPageRenderProps['globalConfig'];
116
119
  isEditor?: boolean;
117
120
  }
121
+ export declare const DEFAULT_TAG = "FOR U";
118
122
  declare const _default: React.NamedExoticComponent<SxpDataSourceProviderProps>;
119
123
  export default _default;
@@ -5,7 +5,6 @@ import { storeAndLoadFeSessionId } from '../utils/sessionStore';
5
5
  import { storeAndLoadFeUserId, AGREE_POLICY } from '../utils/localStore';
6
6
  import { useIconLink } from '../components/SxpPageRender/useIconLink';
7
7
  import SXP_EVENT_BUS, { SXP_EVENT_TYPE } from '../utils/event';
8
- import Consent from '../components/Consent';
9
8
  export const SxpDataSourceContext = createContext({
10
9
  rtcList: [],
11
10
  tagList: []
@@ -15,8 +14,8 @@ var DataSourceType;
15
14
  DataSourceType[DataSourceType["BFF"] = 5] = "BFF";
16
15
  })(DataSourceType || (DataSourceType = {}));
17
16
  const UTM_KEYS = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_id', 'utm_content', 'cl_source'];
17
+ export const DEFAULT_TAG = 'FOR U';
18
18
  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, isEditor = false }) => {
19
- var _a, _b, _c;
20
19
  const [rtcList, setRtcList] = useState([]);
21
20
  const [tagList, setTagList] = useState([]);
22
21
  const [loading, setLoading] = useState(false);
@@ -33,6 +32,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
33
32
  const [videoRef, setVideoRef] = useState(null);
34
33
  const themeTag = useRef();
35
34
  const curTime = useRef();
35
+ const [selectTag, setSelectTag] = useState(DEFAULT_TAG);
36
36
  const isShowConsent = useMemo(() => {
37
37
  var _a, _b, _c, _d;
38
38
  return (((_d = (_c = (_b = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.consent) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.item) === null || _c === void 0 ? void 0 : _c.props) === null || _d === void 0 ? void 0 : _d.privacy_necessity) && !isAgreePolicy && !isEditor) || isOpenConsent;
@@ -76,10 +76,10 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
76
76
  .catch((err) => Promise.reject(err));
77
77
  }, [bffDataSource]);
78
78
  const getRecommendVideos = useCallback((query) => __awaiter(void 0, void 0, void 0, function* () {
79
- var _d, _e, _f, _g, _h;
79
+ var _a, _b, _c, _d, _e;
80
80
  query = {
81
- maxSize: (_d = query === null || query === void 0 ? void 0 : query.maxSize) !== null && _d !== void 0 ? _d : maxSize,
82
- defaultSize: (_e = query === null || query === void 0 ? void 0 : query.defaultSize) !== null && _e !== void 0 ? _e : defaultSize,
81
+ maxSize: (_a = query === null || query === void 0 ? void 0 : query.maxSize) !== null && _a !== void 0 ? _a : maxSize,
82
+ defaultSize: (_b = query === null || query === void 0 ? void 0 : query.defaultSize) !== null && _b !== void 0 ? _b : defaultSize,
83
83
  'itemFilter.itemId': query === null || query === void 0 ? void 0 : query['itemFilter.itemId'],
84
84
  'itemFilter.itemType': query === null || query === void 0 ? void 0 : query['itemFilter.itemType'],
85
85
  hashTag: query === null || query === void 0 ? void 0 : query.hashTag,
@@ -87,10 +87,10 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
87
87
  themeTag: query === null || query === void 0 ? void 0 : query.themeTag
88
88
  };
89
89
  if (utmVal) {
90
- const val = (_h = (_g = (_f = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _f === void 0 ? void 0 : _f.filter((val) => {
90
+ const val = (_e = (_d = (_c = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _c === void 0 ? void 0 : _c.filter((val) => {
91
91
  const key = val.split('=')[0];
92
92
  return UTM_KEYS.includes(key);
93
- })) === null || _g === void 0 ? void 0 : _g.join('&')) !== null && _h !== void 0 ? _h : '';
93
+ })) === null || _d === void 0 ? void 0 : _d.join('&')) !== null && _e !== void 0 ? _e : '';
94
94
  query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(val) });
95
95
  }
96
96
  const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/list', { method: 'GET', query }));
@@ -102,7 +102,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
102
102
  return result === null || result === void 0 ? void 0 : result.data;
103
103
  }), [bffFetch, utmVal, maxSize, defaultSize]);
104
104
  const loadVideos = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
105
- var _j, _k;
105
+ var _f, _g;
106
106
  if (rtcList.length <= 0) {
107
107
  return;
108
108
  }
@@ -112,8 +112,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
112
112
  'itemFilter.itemType': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemType,
113
113
  themeTag: themeTag.current
114
114
  });
115
- setRtcList(rtcList.concat((_j = data === null || data === void 0 ? void 0 : data.recList) !== null && _j !== void 0 ? _j : []));
116
- setCacheRtcList(cacheRtcList.concat((_k = data === null || data === void 0 ? void 0 : data.recList) !== null && _k !== void 0 ? _k : []));
115
+ setRtcList(rtcList.concat((_f = data === null || data === void 0 ? void 0 : data.recList) !== null && _f !== void 0 ? _f : []));
116
+ setCacheRtcList(cacheRtcList.concat((_g = data === null || data === void 0 ? void 0 : data.recList) !== null && _g !== void 0 ? _g : []));
117
117
  }), [getRecommendVideos, rtcList, waterFallData, cacheRtcList]);
118
118
  const bffEventReport = useCallback(({ userInfo, eventInfo }) => {
119
119
  if (!enableReportEvent) {
@@ -171,16 +171,16 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
171
171
  return res === null || res === void 0 ? void 0 : res.success;
172
172
  }), [bffFetch]);
173
173
  const bffGetTagList = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
174
- var _l, _m, _o, _p, _q;
174
+ var _h, _j, _k, _l, _m;
175
175
  if (!utmVal || !isShowTag)
176
176
  return;
177
177
  try {
178
- const val = (_o = (_m = (_l = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _l === void 0 ? void 0 : _l.filter((val) => {
178
+ const val = (_k = (_j = (_h = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _h === void 0 ? void 0 : _h.filter((val) => {
179
179
  const key = val.split('=')[0];
180
180
  return UTM_KEYS.includes(key);
181
- })) === null || _m === void 0 ? void 0 : _m.join('&')) !== null && _o !== void 0 ? _o : '';
181
+ })) === null || _j === void 0 ? void 0 : _j.join('&')) !== null && _k !== void 0 ? _k : '';
182
182
  const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/tag/list', { method: 'GET', query: { channel: decodeURIComponent(val) } }));
183
- setTagList((_q = (_p = result === null || result === void 0 ? void 0 : result.data) === null || _p === void 0 ? void 0 : _p.tags) !== null && _q !== void 0 ? _q : []);
183
+ 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 : []);
184
184
  }
185
185
  catch (e) {
186
186
  console.log('e', e);
@@ -311,13 +311,16 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
311
311
  setIsAgreePolicy,
312
312
  curTime,
313
313
  h5EnterLink,
314
- themeTag
315
- } }, isShowConsent ? (React.createElement(Consent, Object.assign({}, (_c = (_b = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.consent) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.item) === null || _c === void 0 ? void 0 : _c.props))) : (render({
314
+ themeTag,
315
+ isShowConsent,
316
+ selectTag,
317
+ setSelectTag
318
+ } }, render({
316
319
  rtcList,
317
320
  mutateLike: bffMutateLike,
318
321
  mutateUnlike: bffMutateUnlike,
319
322
  submitForm: bffSubmitForm,
320
323
  tagList
321
- }))));
324
+ })));
322
325
  };
323
326
  export default memo(SxpDataSourceProvider);
@@ -2,5 +2,5 @@ import { RecItemType } from '../components/SxpPageRender/typing';
2
2
  export declare function useEventReport(): {
3
3
  jumpToWeb: (data?: RecItemType, product?: RecItemType['product'], cta?: RecItemType['cta'], position?: number) => void;
4
4
  productView: (data?: RecItemType, product?: RecItemType['product'], cta?: RecItemType['cta'], viewTime?: any, position?: number) => void;
5
- backMainFeed: (lastFeed?: 'theme' | 'branch' | 'external', themeTag?: string, hashTag?: string) => void;
5
+ backMainFeed: (lastFeed: 'theme' | 'branch' | 'external', selectTag?: string, themeTag?: string, hashTag?: string) => void;
6
6
  };