pb-sxp-ui 1.0.3-alpha.1 → 1.0.3-alpha.3

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 (74) hide show
  1. package/dist/index.cjs +2403 -825
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.css +114 -112
  4. package/dist/index.js +2404 -826
  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 +2403 -825
  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/components/SxpPageRender/Hashtag/index.d.ts +2 -1
  15. package/es/core/components/SxpPageRender/Hashtag/index.js +2 -2
  16. package/es/core/components/SxpPageRender/Navbar.d.ts +1 -0
  17. package/es/core/components/SxpPageRender/Navbar.js +3 -2
  18. package/es/core/components/SxpPageRender/PictureGroup/Picture.js +31 -3
  19. package/es/core/components/SxpPageRender/VideoWidget/index.js +21 -30
  20. package/es/core/components/SxpPageRender/WaterFall/List.d.ts +2 -1
  21. package/es/core/components/SxpPageRender/WaterFall/List.js +24 -14
  22. package/es/core/components/SxpPageRender/WaterFall/WaterfallList.d.ts +2 -1
  23. package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +13 -11
  24. package/es/core/components/SxpPageRender/WaterFall/index.d.ts +2 -1
  25. package/es/core/components/SxpPageRender/WaterFall/index.js +4 -3
  26. package/es/core/components/SxpPageRender/WaterFall/preview.json +1242 -0
  27. package/es/core/components/SxpPageRender/index.d.ts +2 -0
  28. package/es/core/components/SxpPageRender/index.js +5 -5
  29. package/es/core/context/EditorDataProvider.d.ts +3 -1
  30. package/es/core/context/EditorDataProvider.js +5 -2
  31. package/es/core/context/SxpDataSourceProvider.d.ts +2 -0
  32. package/es/core/context/SxpDataSourceProvider.js +7 -3
  33. package/es/materials/sxp/HashTag/index.d.ts +14 -0
  34. package/es/materials/sxp/HashTag/index.js +6 -0
  35. package/es/materials/sxp/HashTag/material.d.ts +2 -0
  36. package/es/materials/sxp/HashTag/material.js +52 -0
  37. package/es/materials/sxp/HashTag/settingRender.d.ts +122 -0
  38. package/es/materials/sxp/HashTag/settingRender.js +153 -0
  39. package/es/materials/sxp/index.d.ts +1 -0
  40. package/es/materials/sxp/index.js +1 -0
  41. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +4 -3
  42. package/es/materials/sxp/template/components/settingRender.d.ts +15 -0
  43. package/es/materials/sxp/template/components/settingRender.js +17 -0
  44. package/lib/core/components/SxpPageRender/Hashtag/index.d.ts +2 -1
  45. package/lib/core/components/SxpPageRender/Hashtag/index.js +2 -2
  46. package/lib/core/components/SxpPageRender/Navbar.d.ts +1 -0
  47. package/lib/core/components/SxpPageRender/Navbar.js +3 -2
  48. package/lib/core/components/SxpPageRender/PictureGroup/Picture.js +30 -2
  49. package/lib/core/components/SxpPageRender/VideoWidget/index.js +21 -30
  50. package/lib/core/components/SxpPageRender/WaterFall/List.d.ts +2 -1
  51. package/lib/core/components/SxpPageRender/WaterFall/List.js +23 -14
  52. package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.d.ts +2 -1
  53. package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +12 -11
  54. package/lib/core/components/SxpPageRender/WaterFall/index.d.ts +2 -1
  55. package/lib/core/components/SxpPageRender/WaterFall/index.js +4 -3
  56. package/lib/core/components/SxpPageRender/WaterFall/preview.json +1242 -0
  57. package/lib/core/components/SxpPageRender/index.d.ts +2 -0
  58. package/lib/core/components/SxpPageRender/index.js +5 -5
  59. package/lib/core/context/EditorDataProvider.d.ts +3 -1
  60. package/lib/core/context/EditorDataProvider.js +4 -1
  61. package/lib/core/context/SxpDataSourceProvider.d.ts +2 -0
  62. package/lib/core/context/SxpDataSourceProvider.js +7 -3
  63. package/lib/materials/sxp/HashTag/index.d.ts +14 -0
  64. package/lib/materials/sxp/HashTag/index.js +9 -0
  65. package/lib/materials/sxp/HashTag/material.d.ts +2 -0
  66. package/lib/materials/sxp/HashTag/material.js +56 -0
  67. package/lib/materials/sxp/HashTag/settingRender.d.ts +122 -0
  68. package/lib/materials/sxp/HashTag/settingRender.js +155 -0
  69. package/lib/materials/sxp/index.d.ts +1 -0
  70. package/lib/materials/sxp/index.js +1 -0
  71. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +4 -3
  72. package/lib/materials/sxp/template/components/settingRender.d.ts +15 -0
  73. package/lib/materials/sxp/template/components/settingRender.js +17 -0
  74. package/package.json +1 -1
@@ -5,8 +5,25 @@ const react_1 = tslib_1.__importStar(require("react"));
5
5
  const hooks_1 = require("../../../../core/hooks");
6
6
  const Picture = (props) => {
7
7
  const { src, height, width } = props;
8
+ const [blur, setBlur] = (0, react_1.useState)(false);
8
9
  const imgDom = (0, react_1.useRef)(null);
9
10
  const { sxpParameter } = (0, hooks_1.useSxpDataSource)();
11
+ (0, react_1.useEffect)(() => {
12
+ if (imgDom.current === null || src === '') {
13
+ return;
14
+ }
15
+ const img = new Image();
16
+ img.src = src;
17
+ img.onload = () => {
18
+ const aspectRatio = img.height / img.width;
19
+ const targetAspectRatio = 16 / 9;
20
+ const tolerance = 0.05;
21
+ if (Math.abs(aspectRatio - targetAspectRatio) > tolerance) {
22
+ setBlur(true);
23
+ }
24
+ };
25
+ imgDom.current.src = src;
26
+ }, [src]);
10
27
  return (react_1.default.createElement("div", { style: {
11
28
  overflow: 'hidden',
12
29
  height,
@@ -16,7 +33,18 @@ const Picture = (props) => {
16
33
  react_1.default.createElement("img", { ref: imgDom, loading: 'lazy', src: src !== null && src !== void 0 ? src : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image, style: {
17
34
  height: '100%',
18
35
  width: '100%',
19
- objectFit: 'cover'
20
- } })));
36
+ objectFit: 'cover',
37
+ filter: blur ? 'blur(10px)' : 'none',
38
+ transform: blur ? 'scale(1.2)' : 'none'
39
+ } }),
40
+ blur && (react_1.default.createElement("img", { ref: imgDom, src: src, loading: 'lazy', style: {
41
+ width: '100%',
42
+ objectFit: 'contain',
43
+ position: 'absolute',
44
+ top: '50%',
45
+ transform: 'translateY(-50%)',
46
+ left: 0,
47
+ right: 0
48
+ } }))));
21
49
  };
22
50
  exports.default = Picture;
@@ -19,10 +19,8 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex }) => {
19
19
  videoRef.current.muted = muted;
20
20
  }, [muted]);
21
21
  const handleVideoStart = (0, react_1.useCallback)(() => {
22
- var _a, _b;
23
- if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || ((_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.readyState) < 2)
24
- return;
25
- (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.play();
22
+ var _a;
23
+ (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
26
24
  }, []);
27
25
  const PAUSE_ICON = (0, useIconLink_1.useIconLink)('/pb_static/06f28a2025c74c1cb49be6767316d827.png');
28
26
  const handlePlaying = (0, react_1.useCallback)(() => {
@@ -79,38 +77,37 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex }) => {
79
77
  });
80
78
  }
81
79
  setTimeout(() => {
82
- var _a, _b;
83
- if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || ((_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.readyState) < 2)
84
- return;
85
- (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.play();
80
+ var _a;
81
+ (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
86
82
  }, 0);
87
83
  }, [index, bffEventReport, data, isLoad]);
88
84
  const handleClickVideo = (0, react_1.useCallback)((type) => () => {
89
- var _a, _b, _c, _d, _e, _f;
90
- if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || ((_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.readyState) < 2)
91
- return;
85
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
92
86
  if (!isLoad)
93
87
  return;
94
- const isPause = (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.paused;
88
+ const item = data[index];
89
+ const videoDuration = ((_b = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.duration) !== null && _b !== void 0 ? _b : 0).toFixed(2);
90
+ const videoCurrentTime = ((_d = (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.currentTime) !== null && _d !== void 0 ? _d : 0).toFixed(2);
91
+ const isPause = (_e = videoRef.current) === null || _e === void 0 ? void 0 : _e.paused;
95
92
  switch (type) {
96
93
  case 'start':
97
94
  if (!isPause)
98
95
  return;
99
- (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.play();
96
+ (_f = videoRef.current) === null || _f === void 0 ? void 0 : _f.play();
100
97
  setIsPauseVideo(false);
101
98
  break;
102
99
  case 'pause':
103
100
  if (isPause)
104
101
  return;
105
- (_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.pause();
102
+ (_g = videoRef.current) === null || _g === void 0 ? void 0 : _g.pause();
106
103
  setIsPauseVideo(true);
107
104
  break;
108
105
  default:
109
106
  if (isPause) {
110
- (_e = videoRef.current) === null || _e === void 0 ? void 0 : _e.play();
107
+ (_h = videoRef.current) === null || _h === void 0 ? void 0 : _h.play();
111
108
  }
112
109
  else {
113
- (_f = videoRef.current) === null || _f === void 0 ? void 0 : _f.pause();
110
+ (_j = videoRef.current) === null || _j === void 0 ? void 0 : _j.pause();
114
111
  }
115
112
  setIsPauseVideo(!isPause);
116
113
  break;
@@ -141,16 +138,14 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex }) => {
141
138
  }
142
139
  }, [data, index, bffEventReport]);
143
140
  (0, react_1.useEffect)(() => {
144
- var _a, _b, _c, _d, _e, _f;
141
+ var _a, _b, _c;
145
142
  if (data.length <= 0)
146
143
  return;
147
144
  if (!videoRef.current)
148
145
  return;
149
- const isPause = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.paused;
150
146
  setIsPauseVideo(false);
151
147
  if (!isActive) {
152
- if (!isPause && ((_b = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _b === void 0 ? void 0 : _b.readyState) >= 2)
153
- (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.pause();
148
+ (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.pause();
154
149
  return;
155
150
  }
156
151
  if (!videoRef.current.src) {
@@ -160,12 +155,10 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex }) => {
160
155
  videoRef.current.setAttribute('webkit-playsinline', 'true');
161
156
  }
162
157
  else {
163
- if (((_d = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _d === void 0 ? void 0 : _d.readyState) < 2)
164
- return;
165
158
  videoRef.current.play();
166
159
  }
167
- (_e = videoRef.current) === null || _e === void 0 ? void 0 : _e.addEventListener('canplay', handleLoadedMetadata);
168
- (_f = videoRef.current) === null || _f === void 0 ? void 0 : _f.addEventListener('playing', handlePlaying);
160
+ (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.addEventListener('canplay', handleLoadedMetadata);
161
+ (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.addEventListener('playing', handlePlaying);
169
162
  return () => {
170
163
  var _a, _b;
171
164
  (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('canplay', handleLoadedMetadata);
@@ -173,17 +166,15 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex }) => {
173
166
  };
174
167
  }, [data, handleLoadedMetadata, handlePlaying, isActive, isLoad, rec.video]);
175
168
  (0, react_1.useEffect)(() => {
176
- var _a, _b, _c, _d;
177
- if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || ((_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.readyState) < 2)
178
- return;
179
- const isPause = (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.paused;
169
+ var _a, _b, _c;
170
+ const isPause = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.paused;
180
171
  if (!isActive)
181
172
  return;
182
173
  if (!isPause && openHashtag) {
183
- (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.pause();
174
+ (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.pause();
184
175
  }
185
176
  else if (!openHashtag) {
186
- (_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.play();
177
+ (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.play();
187
178
  }
188
179
  }, [openHashtag, isActive]);
189
180
  (0, react_1.useEffect)(() => {
@@ -1,3 +1,4 @@
1
1
  import React from 'react';
2
2
  import './List.less';
3
- export default function WaterfallList({ reportTagsView }: any): React.JSX.Element;
3
+ import { IHashTagProps } from '../../../../materials/sxp/HashTag';
4
+ export default function WaterfallList({ reportTagsView, ...props }: any & IHashTagProps): React.JSX.Element;
@@ -3,9 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const react_1 = tslib_1.__importStar(require("react"));
5
5
  require("./List.less");
6
+ const preview_json_1 = tslib_1.__importDefault(require("./preview.json"));
6
7
  const hooks_1 = require("../../../../core/hooks");
7
8
  const WaterfallFlowItem = (props) => {
8
- const { rec, index, list, reportTagsView } = props;
9
+ const { rec, index, list, reportTagsView, textStyles, space } = props;
9
10
  const { swiperRef, setRtcList, setOpenHashtag, bffEventReport, sxpParameter } = (0, hooks_1.useSxpDataSource)();
10
11
  const [showVideo, setShowVideo] = (0, react_1.useState)(false);
11
12
  const imgDom = (0, react_1.useRef)(null);
@@ -105,19 +106,20 @@ const WaterfallFlowItem = (props) => {
105
106
  setOpenHashtag === null || setOpenHashtag === void 0 ? void 0 : setOpenHashtag(false);
106
107
  }, 0);
107
108
  };
108
- return (react_1.default.createElement("div", { className: 'list-content-listItem', key: index, onClick: handleClickToDetail },
109
+ return (react_1.default.createElement("div", { className: 'list-content-listItem', key: index, onClick: handleClickToDetail, style: { marginBottom: space } },
109
110
  react_1.default.createElement("div", { className: 'list-content-listItem-picture' },
110
111
  showVideo && (react_1.default.createElement("div", { style: { display: 'none' } },
111
112
  react_1.default.createElement("video", { ref: videoDom, crossOrigin: 'anonymous', className: 'list-content-listItem-picture-img' }),
112
113
  react_1.default.createElement("canvas", { ref: canvasRef }))),
113
114
  react_1.default.createElement("img", { className: 'list-content-listItem-picture-img', loading: 'lazy', ref: imgDom })),
114
115
  react_1.default.createElement("div", { className: 'list-content-listItem-info' },
115
- react_1.default.createElement("div", { className: `${'list-content-listItem-info-title'} ${priceText ? 'list-content-listItem-info-nowrap' : ''}` }, title && title),
116
- react_1.default.createElement("div", { className: 'list-content-listItem-info-price', hidden: !priceText }, priceText))));
116
+ react_1.default.createElement("div", { className: `${'list-content-listItem-info-title'} ${priceText ? 'list-content-listItem-info-nowrap' : ''}`, style: textStyles === null || textStyles === void 0 ? void 0 : textStyles.title }, title && title),
117
+ react_1.default.createElement("div", { className: 'list-content-listItem-info-price', style: textStyles === null || textStyles === void 0 ? void 0 : textStyles.price, hidden: !priceText }, priceText))));
117
118
  };
118
- function WaterfallList({ reportTagsView }) {
119
- var _a, _b, _c, _d, _e, _f;
120
- const { waterFallData, getRecommendVideos, hashTagSize, loadingImage } = (0, hooks_1.useSxpDataSource)();
119
+ function WaterfallList(_a) {
120
+ var _b, _c, _d, _e, _f, _g, _h;
121
+ var { reportTagsView } = _a, props = tslib_1.__rest(_a, ["reportTagsView"]);
122
+ const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag } = (0, hooks_1.useSxpDataSource)();
121
123
  const [list, setList] = (0, react_1.useState)();
122
124
  const [data, setData] = (0, react_1.useState)();
123
125
  const [isLoadingData, setIsLoadingData] = (0, react_1.useState)(false);
@@ -139,6 +141,7 @@ function WaterfallList({ reportTagsView }) {
139
141
  }));
140
142
  }, [waterFallData, getRecommendVideos, list, isLoadMore]);
141
143
  (0, react_1.useEffect)(() => {
144
+ var _a, _b;
142
145
  setIsLoadingData(true);
143
146
  waterFallData &&
144
147
  (getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({
@@ -152,7 +155,13 @@ function WaterfallList({ reportTagsView }) {
152
155
  setList((_b = (_a = res === null || res === void 0 ? void 0 : res.recList) === null || _a === void 0 ? void 0 : _a.filter((item) => (item === null || item === void 0 ? void 0 : item.video) !== null || (item === null || item === void 0 ? void 0 : item.product) !== null)) !== null && _b !== void 0 ? _b : []);
153
156
  setIsLoadingData(false);
154
157
  }));
155
- }, [waterFallData, getRecommendVideos, hashTagSize]);
158
+ if (isOpenHashTag) {
159
+ const res = preview_json_1.default;
160
+ setData(res);
161
+ setList((_b = (_a = res === null || res === void 0 ? void 0 : res.recList) === null || _a === void 0 ? void 0 : _a.filter((item) => (item === null || item === void 0 ? void 0 : item.video) !== null || (item === null || item === void 0 ? void 0 : item.product) !== null)) !== null && _b !== void 0 ? _b : []);
162
+ setIsLoadingData(false);
163
+ }
164
+ }, [waterFallData, getRecommendVideos, hashTagSize, isOpenHashTag]);
156
165
  const handleClickLink = () => {
157
166
  var _a, _b;
158
167
  if ((_a = data === null || data === void 0 ? void 0 : data.tag) === null || _a === void 0 ? void 0 : _a.link) {
@@ -163,15 +172,15 @@ function WaterfallList({ reportTagsView }) {
163
172
  return (react_1.default.createElement(react_1.default.Fragment, null, isLoadingData ? (react_1.default.createElement("div", { style: { height: '100%', width: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' } },
164
173
  react_1.default.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } }))) : (react_1.default.createElement("div", { className: 'list' },
165
174
  react_1.default.createElement("div", { className: 'list-scroll', ref: containerRef, style: {
166
- bottom: ((_a = data === null || data === void 0 ? void 0 : data.tag) === null || _a === void 0 ? void 0 : _a.link) ? '100px' : 0
175
+ bottom: ((_b = data === null || data === void 0 ? void 0 : data.tag) === null || _b === void 0 ? void 0 : _b.link) ? '100px' : 0
167
176
  } },
168
- react_1.default.createElement("div", { className: 'list-info' }, (_b = data === null || data === void 0 ? void 0 : data.tag) === null || _b === void 0 ? void 0 : _b.info),
169
- react_1.default.createElement("div", { hidden: !((_c = data === null || data === void 0 ? void 0 : data.tag) === null || _c === void 0 ? void 0 : _c.link), className: 'list-collection', onClick: handleClickLink }, ((_d = data === null || data === void 0 ? void 0 : data.tag) === null || _d === void 0 ? void 0 : _d.linkTitle) || 'Shop the collection'),
177
+ react_1.default.createElement("div", { className: 'list-info', style: (_c = props === null || props === void 0 ? void 0 : props.textStyles) === null || _c === void 0 ? void 0 : _c.hashTagDesc }, (_d = data === null || data === void 0 ? void 0 : data.tag) === null || _d === void 0 ? void 0 : _d.info),
178
+ react_1.default.createElement("div", { hidden: !((_e = data === null || data === void 0 ? void 0 : data.tag) === null || _e === void 0 ? void 0 : _e.link), className: 'list-collection', onClick: handleClickLink, style: { 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'),
170
179
  react_1.default.createElement("div", { className: 'list-content' }, list === null || list === void 0 ? void 0 : list.map((item, ind) => {
171
- return (react_1.default.createElement(WaterfallFlowItem, { key: ind, index: ind, rec: item, list: list, reportTagsView: reportTagsView }));
180
+ return (react_1.default.createElement(WaterfallFlowItem, Object.assign({ key: ind, index: ind, rec: item, list: list, reportTagsView: reportTagsView }, props)));
172
181
  })),
173
182
  react_1.default.createElement("div", { hidden: !isLoadMore, style: { textAlign: 'center' } }, "loading...")),
174
- react_1.default.createElement("div", { className: 'list-bottom', hidden: !((_e = data === null || data === void 0 ? void 0 : data.tag) === null || _e === void 0 ? void 0 : _e.link) },
175
- react_1.default.createElement("button", { className: 'list-bottom-btn', onClick: handleClickLink }, ((_f = data === null || data === void 0 ? void 0 : data.tag) === null || _f === void 0 ? void 0 : _f.linkTitle) || 'Shop the collection'))))));
183
+ react_1.default.createElement("div", { className: 'list-bottom', hidden: !((_g = data === null || data === void 0 ? void 0 : data.tag) === null || _g === void 0 ? void 0 : _g.link) },
184
+ react_1.default.createElement("button", { className: 'list-bottom-btn', style: props === null || props === void 0 ? void 0 : props.buttonStyle, onClick: handleClickLink }, ((_h = data === null || data === void 0 ? void 0 : data.tag) === null || _h === void 0 ? void 0 : _h.linkTitle) || 'Shop the collection'))))));
176
185
  }
177
186
  exports.default = WaterfallList;
@@ -1,3 +1,4 @@
1
1
  import React from 'react';
2
2
  import './WaterfallList.less';
3
- export default function WaterfallList({ reportTagsView }: any): React.JSX.Element;
3
+ import { IHashTagProps } from '../../../../materials/sxp/HashTag';
4
+ export default function WaterfallList({ reportTagsView, ...props }: any & IHashTagProps): React.JSX.Element;
@@ -5,7 +5,7 @@ const react_1 = tslib_1.__importStar(require("react"));
5
5
  const hooks_1 = require("../../../../core/hooks");
6
6
  require("./WaterfallList.less");
7
7
  const WaterfallFlowItem = (props) => {
8
- const { rec, style = {}, sizeChange = () => { }, unitWidth, index, showBorder, list, reportTagsView } = props;
8
+ const { rec, style = {}, sizeChange = () => { }, unitWidth, index, showBorder, list, reportTagsView, textStyles, lineClamp } = props;
9
9
  const { swiperRef, setRtcList, setOpenHashtag, sxpParameter } = (0, hooks_1.useSxpDataSource)();
10
10
  const [showVideo, setShowVideo] = (0, react_1.useState)(false);
11
11
  const [isLoading, setIsLoading] = (0, react_1.useState)(false);
@@ -141,11 +141,12 @@ const WaterfallFlowItem = (props) => {
141
141
  visibility: isLoading ? 'visible' : 'hidden'
142
142
  } })),
143
143
  react_1.default.createElement("div", { className: 'waterFallList-content-listItem-info' },
144
- react_1.default.createElement("div", { className: `${'waterFallList-content-listItem-info-title'} ${priceText ? 'waterFallList-content-listItem-info-nowrap' : ''}` }, title && title),
145
- react_1.default.createElement("div", { className: 'waterFallList-content-listItem-info-price', hidden: !priceText }, priceText))));
144
+ react_1.default.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),
145
+ react_1.default.createElement("div", { className: 'waterFallList-content-listItem-info-price', hidden: !priceText, style: textStyles.price }, priceText))));
146
146
  };
147
- function WaterfallList({ reportTagsView }) {
148
- var _a, _b, _c, _d, _e, _f;
147
+ function WaterfallList(_a) {
148
+ var _b, _c, _d, _e, _f, _g, _h;
149
+ var { reportTagsView } = _a, props = tslib_1.__rest(_a, ["reportTagsView"]);
149
150
  const { popupAni } = (0, hooks_1.useEditor)();
150
151
  const { waterFallData, getRecommendVideos, loadingImage } = (0, hooks_1.useSxpDataSource)();
151
152
  const scrollParent = (0, react_1.useRef)(null);
@@ -309,14 +310,14 @@ function WaterfallList({ reportTagsView }) {
309
310
  react_1.default.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } })),
310
311
  react_1.default.createElement("div", { className: 'waterFallList', hidden: isLoadingData },
311
312
  react_1.default.createElement("div", { className: 'waterFallList-scroll', ref: scrollParent, style: {
312
- bottom: ((_a = data === null || data === void 0 ? void 0 : data.tag) === null || _a === void 0 ? void 0 : _a.link) ? '100px' : 0
313
+ bottom: ((_b = data === null || data === void 0 ? void 0 : data.tag) === null || _b === void 0 ? void 0 : _b.link) ? '100px' : 0
313
314
  } },
314
- react_1.default.createElement("div", { className: 'waterFallList-info' }, (_b = data === null || data === void 0 ? void 0 : data.tag) === null || _b === void 0 ? void 0 : _b.info),
315
- react_1.default.createElement("div", { hidden: !((_c = data === null || data === void 0 ? void 0 : data.tag) === null || _c === void 0 ? void 0 : _c.link), className: 'waterFallList-collection', onClick: handleClickLink }, ((_d = data === null || data === void 0 ? void 0 : data.tag) === null || _d === void 0 ? void 0 : _d.linkTitle) || 'Shop the collection'),
315
+ react_1.default.createElement("div", { className: 'waterFallList-info', style: (_c = props === null || props === void 0 ? void 0 : props.textStyles) === null || _c === void 0 ? void 0 : _c.hashTagDesc }, (_d = data === null || data === void 0 ? void 0 : data.tag) === null || _d === void 0 ? void 0 : _d.info),
316
+ react_1.default.createElement("div", { hidden: !((_e = data === null || data === void 0 ? void 0 : data.tag) === null || _e === void 0 ? void 0 : _e.link), className: 'waterFallList-collection', onClick: handleClickLink }, ((_f = data === null || data === void 0 ? void 0 : data.tag) === null || _f === void 0 ? void 0 : _f.linkTitle) || 'Shop the collection'),
316
317
  react_1.default.createElement("div", { className: 'waterFallList-content', ref: waterfallFlowDom }, list === null || list === void 0 ? void 0 : list.map((item, ind) => {
317
- return (react_1.default.createElement(WaterfallFlowItem, { key: ind, index: ind, rec: item, list: list, showBorder: scrollTop + scrollParent.current.clientHeight, style: styleList[ind], sizeChange: onSizeChange, unitWidth: unitWidth, reportTagsView: reportTagsView }));
318
+ return (react_1.default.createElement(WaterfallFlowItem, Object.assign({ key: ind, index: ind, rec: item, list: list, showBorder: scrollTop + scrollParent.current.clientHeight, style: styleList[ind], sizeChange: onSizeChange, unitWidth: unitWidth, reportTagsView: reportTagsView }, props)));
318
319
  }))),
319
- react_1.default.createElement("div", { className: 'waterFallList-bottom', hidden: !((_e = data === null || data === void 0 ? void 0 : data.tag) === null || _e === void 0 ? void 0 : _e.link) },
320
- react_1.default.createElement("button", { className: 'waterFallList-bottom-btn', onClick: handleClickLink }, ((_f = data === null || data === void 0 ? void 0 : data.tag) === null || _f === void 0 ? void 0 : _f.linkTitle) || 'Shop the collection')))));
320
+ react_1.default.createElement("div", { className: 'waterFallList-bottom', hidden: !((_g = data === null || data === void 0 ? void 0 : data.tag) === null || _g === void 0 ? void 0 : _g.link) },
321
+ react_1.default.createElement("button", { className: 'waterFallList-bottom-btn', style: props === null || props === void 0 ? void 0 : props.buttonStyle, onClick: handleClickLink }, ((_h = data === null || data === void 0 ? void 0 : data.tag) === null || _h === void 0 ? void 0 : _h.linkTitle) || 'Shop the collection')))));
321
322
  }
322
323
  exports.default = WaterfallList;
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import './index.less';
3
+ import { IHashTagProps } from '../../../../materials/sxp/HashTag';
3
4
  interface IWaterFallProps {
4
5
  }
5
- declare const _default: React.NamedExoticComponent<IWaterFallProps>;
6
+ declare const _default: React.NamedExoticComponent<IWaterFallProps & IHashTagProps>;
6
7
  export default _default;
@@ -9,7 +9,8 @@ const Navbar_1 = tslib_1.__importDefault(require("../Navbar"));
9
9
  const List_1 = tslib_1.__importDefault(require("./List"));
10
10
  const left_png_1 = tslib_1.__importDefault(require("./left.png"));
11
11
  const hooks_1 = require("../../../../core/hooks");
12
- const WaterFall = () => {
12
+ const WaterFall = (props) => {
13
+ var _a;
13
14
  const { waterFallData, setOpenHashtag, openHashtag, swiperRef, setWaterFallData, cacheRtcList, setRtcList, cacheActiveIndex, rtcList, setCacheRtcList, setIsFromHashtag, isFromHashtag, bffEventReport } = (0, hooks_1.useSxpDataSource)();
14
15
  const ref = (0, react_1.useRef)(null);
15
16
  const modalEleRef = (0, react_1.useRef)(null);
@@ -97,7 +98,7 @@ const WaterFall = () => {
97
98
  return ReactDOM.createPortal(react_1.default.createElement("div", { className: 'waterfall', style: {
98
99
  display: openHashtag ? 'block' : 'none'
99
100
  } },
100
- react_1.default.createElement(Navbar_1.default, { icon: left_png_1.default, styles: { top: '32px' }, onClose: handleClose }),
101
- react_1.default.createElement(List_1.default, { reportTagsView: reportTagsView })), modalEleRef.current);
101
+ react_1.default.createElement(Navbar_1.default, { icon: left_png_1.default, styles: { top: '32px' }, textStyle: (_a = props === null || props === void 0 ? void 0 : props.textStyles) === null || _a === void 0 ? void 0 : _a.hashTagTitle, onClose: handleClose }),
102
+ react_1.default.createElement(List_1.default, Object.assign({ reportTagsView: reportTagsView }, props))), modalEleRef.current);
102
103
  };
103
104
  exports.default = (0, react_1.memo)(WaterFall);