pb-sxp-ui 1.0.78 → 1.0.80

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 (34) hide show
  1. package/dist/index.cjs +430 -60
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.css +187 -1
  4. package/dist/index.js +430 -60
  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 +430 -60
  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/PictureGroup/Picture.d.ts +1 -0
  15. package/es/core/components/SxpPageRender/PictureGroup/Picture.js +2 -2
  16. package/es/core/components/SxpPageRender/PictureGroup/index.js +9 -5
  17. package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +52 -37
  18. package/es/core/components/SxpPageRender/WaterFall/index.js +3 -2
  19. package/es/core/components/SxpPageRender/index.js +1 -21
  20. package/es/core/context/SxpDataSourceProvider.js +30 -0
  21. package/es/materials/sxp/HashTag/index.d.ts +2 -0
  22. package/es/materials/sxp/HashTag/settingRender.d.ts +15 -1
  23. package/es/materials/sxp/HashTag/settingRender.js +16 -0
  24. package/lib/core/components/SxpPageRender/PictureGroup/Picture.d.ts +1 -0
  25. package/lib/core/components/SxpPageRender/PictureGroup/Picture.js +2 -2
  26. package/lib/core/components/SxpPageRender/PictureGroup/index.js +8 -4
  27. package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +52 -37
  28. package/lib/core/components/SxpPageRender/WaterFall/index.js +3 -2
  29. package/lib/core/components/SxpPageRender/index.js +1 -21
  30. package/lib/core/context/SxpDataSourceProvider.js +30 -0
  31. package/lib/materials/sxp/HashTag/index.d.ts +2 -0
  32. package/lib/materials/sxp/HashTag/settingRender.d.ts +15 -1
  33. package/lib/materials/sxp/HashTag/settingRender.js +16 -0
  34. package/package.json +1 -1
@@ -4,8 +4,10 @@ const tslib_1 = require("tslib");
4
4
  const react_1 = tslib_1.__importStar(require("react"));
5
5
  const hooks_1 = require("../../../../core/hooks");
6
6
  require("./WaterfallList.less");
7
+ const preview_json_1 = tslib_1.__importDefault(require("./preview.json"));
8
+ const FormatImage_1 = tslib_1.__importDefault(require("../FormatImage"));
7
9
  const WaterfallFlowItem = (props) => {
8
- const { rec, style = {}, sizeChange = () => { }, unitWidth, index, showBorder, list, reportTagsView, textStyles, lineClamp } = props;
10
+ const { rec, style = {}, sizeChange = () => { }, unitWidth, index, showBorder, list, reportTagsView, textStyles, space } = props;
9
11
  const { swiperRef, setRtcList, setOpenHashtag, sxpParameter } = (0, hooks_1.useSxpDataSource)();
10
12
  const [showVideo, setShowVideo] = (0, react_1.useState)(false);
11
13
  const [isLoading, setIsLoading] = (0, react_1.useState)(false);
@@ -14,23 +16,20 @@ const WaterfallFlowItem = (props) => {
14
16
  width: 1
15
17
  });
16
18
  const imgDom = (0, react_1.useRef)(null);
19
+ const ref = (0, react_1.useRef)(null);
17
20
  const videoDom = (0, react_1.useRef)(null);
18
21
  const canvasRef = (0, react_1.useRef)(null);
19
22
  const [firstFrameSrc, setFirstFrameSrc] = (0, react_1.useState)('');
20
23
  const src = (0, react_1.useMemo)(() => {
21
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
24
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
22
25
  if ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.cover) {
23
26
  return (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.cover;
24
27
  }
25
- else if ((_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.url) {
26
- setShowVideo(true);
27
- return (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.url;
28
+ else if ((_d = (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.imgUrls) === null || _d === void 0 ? void 0 : _d.length) {
29
+ return (_f = (_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.imgUrls) === null || _f === void 0 ? void 0 : _f[0];
28
30
  }
29
- else if ((_f = (_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.imgUrls) === null || _f === void 0 ? void 0 : _f.length) {
30
- return (_h = (_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.imgUrls) === null || _h === void 0 ? void 0 : _h[0];
31
- }
32
- else if ((_k = (_j = rec === null || rec === void 0 ? void 0 : rec.product) === null || _j === void 0 ? void 0 : _j.homePage) === null || _k === void 0 ? void 0 : _k.length) {
33
- return (_m = (_l = rec === null || rec === void 0 ? void 0 : rec.product) === null || _l === void 0 ? void 0 : _l.homePage) === null || _m === void 0 ? void 0 : _m[0];
31
+ else if ((_h = (_g = rec === null || rec === void 0 ? void 0 : rec.product) === null || _g === void 0 ? void 0 : _g.homePage) === null || _h === void 0 ? void 0 : _h.length) {
32
+ return (_k = (_j = rec === null || rec === void 0 ? void 0 : rec.product) === null || _j === void 0 ? void 0 : _j.homePage) === null || _k === void 0 ? void 0 : _k[0];
34
33
  }
35
34
  else {
36
35
  return (sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) || '';
@@ -70,7 +69,7 @@ const WaterfallFlowItem = (props) => {
70
69
  }
71
70
  }, [rec]);
72
71
  (0, react_1.useEffect)(() => {
73
- if (imgDom.current === null || src === '' || isImgShow === false) {
72
+ if (imgDom.current === null || src === '') {
74
73
  return;
75
74
  }
76
75
  const img = new Image();
@@ -87,14 +86,14 @@ const WaterfallFlowItem = (props) => {
87
86
  });
88
87
  setIsLoading(true);
89
88
  };
90
- imgDom.current.src = img.src;
89
+ imgDom.current.setSrc(img.src);
91
90
  }, [src, showVideo, firstFrameSrc, isImgShow]);
92
91
  (0, react_1.useEffect)(() => {
93
92
  const height = imgInfo.height * (unitWidth / imgInfo.width);
94
93
  if (isLoading) {
95
- sizeChange(height + 76, index);
94
+ sizeChange(height + 76 + space, index);
96
95
  }
97
- }, [imgInfo, index, unitWidth, isLoading]);
96
+ }, [imgInfo, index, unitWidth, isLoading, space]);
98
97
  const calculateHeightForWidth = (videoWidth, videoHeight, targetWidth) => {
99
98
  const aspectRatio = videoWidth / videoHeight;
100
99
  const targetHeight = targetWidth / aspectRatio;
@@ -132,22 +131,20 @@ const WaterfallFlowItem = (props) => {
132
131
  setOpenHashtag === null || setOpenHashtag === void 0 ? void 0 : setOpenHashtag(false);
133
132
  }, 0);
134
133
  };
135
- return (react_1.default.createElement("div", { style: Object.assign({}, style), className: 'waterFallList-content-listItem', key: index, onClick: handleClickToDetail },
134
+ return (react_1.default.createElement("div", { ref: ref, style: Object.assign({}, style), className: 'waterFallList-content-listItem', key: index, onClick: handleClickToDetail },
136
135
  react_1.default.createElement("div", { className: 'waterFallList-content-listItem-picture' },
137
136
  showVideo && (react_1.default.createElement("div", { style: { display: 'none' } },
138
137
  react_1.default.createElement("video", { ref: videoDom, src: src, crossOrigin: 'anonymous', className: 'waterFallList-content-listItem-picture-img' }),
139
138
  react_1.default.createElement("canvas", { ref: canvasRef }))),
140
- react_1.default.createElement("img", { className: 'waterFallList-content-listItem-picture-img', loading: 'lazy', ref: imgDom, style: {
141
- visibility: isLoading ? 'visible' : 'hidden'
142
- } })),
139
+ react_1.default.createElement(FormatImage_1.default, { loading: 'lazy', className: 'waterFallList-content-listItem-picture-img', ref: imgDom })),
143
140
  react_1.default.createElement("div", { className: 'waterFallList-content-listItem-info' },
144
141
  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
142
  react_1.default.createElement("div", { className: 'waterFallList-content-listItem-info-price', hidden: !priceText, style: textStyles.price }, priceText))));
146
143
  };
147
144
  function WaterfallList(_a) {
148
- var _b, _c, _d, _e, _f, _g, _h;
145
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
149
146
  var { reportTagsView } = _a, props = tslib_1.__rest(_a, ["reportTagsView"]);
150
- const { waterFallData, getRecommendVideos, loadingImage } = (0, hooks_1.useSxpDataSource)();
147
+ const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag } = (0, hooks_1.useSxpDataSource)();
151
148
  const scrollParent = (0, react_1.useRef)(null);
152
149
  const [scrollTop, setScrollTop] = (0, react_1.useState)(0);
153
150
  const [data, setData] = (0, react_1.useState)();
@@ -157,6 +154,7 @@ function WaterfallList(_a) {
157
154
  const heightList = [170, 230, 300];
158
155
  const [isLoadingData, setIsLoadingData] = (0, react_1.useState)(false);
159
156
  const [list, setList] = (0, react_1.useState)([]);
157
+ const buttonRef = (0, react_1.useRef)();
160
158
  const createRandomNum = (0, react_1.useCallback)((min, max) => {
161
159
  return Math.floor(Math.random() * (max - min + 1)) + min;
162
160
  }, []);
@@ -240,19 +238,28 @@ function WaterfallList(_a) {
240
238
  styleListRef.current = getStyleList();
241
239
  }, [unitWidth, rowsNum, list]);
242
240
  (0, react_1.useEffect)(() => {
241
+ var _a, _b;
243
242
  setIsLoadingData(true);
244
243
  waterFallData &&
245
244
  (getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({
246
245
  hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag,
247
246
  'itemFilter.itemId': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId,
248
- 'itemFilter.itemType': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemType
247
+ 'itemFilter.itemType': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemType,
248
+ defaultSize: hashTagSize,
249
+ maxSize: hashTagSize
249
250
  }).then((res) => {
250
251
  var _a, _b;
251
252
  setData(res);
252
253
  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 : []);
253
254
  setIsLoadingData(false);
254
255
  }));
255
- }, [waterFallData, getRecommendVideos]);
256
+ if (isOpenHashTag) {
257
+ const res = preview_json_1.default;
258
+ setData(res);
259
+ 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 : []);
260
+ setIsLoadingData(false);
261
+ }
262
+ }, [waterFallData, getRecommendVideos, hashTagSize, isOpenHashTag]);
256
263
  const onResize = (0, react_1.useCallback)(() => {
257
264
  if (waterfallFlowDom.current === null) {
258
265
  return;
@@ -272,7 +279,7 @@ function WaterfallList(_a) {
272
279
  return () => {
273
280
  resizeObserver.disconnect();
274
281
  };
275
- }, []);
282
+ }, [onResize]);
276
283
  const loadMoreData = (0, react_1.useCallback)(() => {
277
284
  setIsLoadingData(true);
278
285
  waterFallData &&
@@ -304,19 +311,27 @@ function WaterfallList(_a) {
304
311
  window.location.href = (_b = data === null || data === void 0 ? void 0 : data.tag) === null || _b === void 0 ? void 0 : _b.link;
305
312
  }
306
313
  };
307
- return (react_1.default.createElement(react_1.default.Fragment, null,
308
- react_1.default.createElement("div", { hidden: !isLoadingData, style: { height: '100%', width: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' } },
309
- react_1.default.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } })),
310
- react_1.default.createElement("div", { className: 'waterFallList', hidden: isLoadingData },
311
- react_1.default.createElement("div", { className: 'waterFallList-scroll', ref: scrollParent, style: {
312
- bottom: ((_b = data === null || data === void 0 ? void 0 : data.tag) === null || _b === void 0 ? void 0 : _b.link) ? '100px' : 0
313
- } },
314
- 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),
315
- 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
- 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, 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
- 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) },
320
- 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')))));
314
+ 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' } },
315
+ react_1.default.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } }))) : (react_1.default.createElement("div", { className: 'waterFallList', ref: waterfallFlowDom },
316
+ react_1.default.createElement("div", { className: 'waterFallList-scroll', ref: scrollParent },
317
+ react_1.default.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),
318
+ react_1.default.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'),
319
+ react_1.default.createElement("div", { className: 'waterFallList-content' }, list === null || list === void 0 ? void 0 :
320
+ list.map((item, ind) => {
321
+ var _a;
322
+ return (react_1.default.createElement(WaterfallFlowItem, 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)));
323
+ }),
324
+ react_1.default.createElement("div", { hidden: !((_g = data === null || data === void 0 ? void 0 : data.tag) === null || _g === void 0 ? void 0 : _g.link), style: {
325
+ position: 'absolute',
326
+ width: '100%',
327
+ 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) +
328
+ ((_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)`,
329
+ height: ((_o = data === null || data === void 0 ? void 0 : data.tag) === null || _o === void 0 ? void 0 : _o.link)
330
+ ? ((_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'
331
+ : 0
332
+ } }))),
333
+ react_1.default.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 }),
334
+ react_1.default.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' }) },
335
+ react_1.default.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'))))));
321
336
  }
322
337
  exports.default = WaterfallList;
@@ -6,8 +6,9 @@ const ReactDOM = tslib_1.__importStar(require("react-dom"));
6
6
  require("./index.less");
7
7
  const lodash_1 = require("lodash");
8
8
  const Navbar_1 = tslib_1.__importDefault(require("../Navbar"));
9
- const List_1 = tslib_1.__importDefault(require("./List"));
9
+ const WaterfallList_1 = tslib_1.__importDefault(require("./WaterfallList"));
10
10
  const left_png_1 = tslib_1.__importDefault(require("./left.png"));
11
+ const List_1 = tslib_1.__importDefault(require("./List"));
11
12
  const hooks_1 = require("../../../../core/hooks");
12
13
  const WaterFall = (props) => {
13
14
  var _a;
@@ -99,6 +100,6 @@ const WaterFall = (props) => {
99
100
  display: openHashtag ? 'block' : 'none'
100
101
  } },
101
102
  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);
103
+ (props === null || props === void 0 ? void 0 : props.isWaterfallFlow) === true || (props === null || props === void 0 ? void 0 : props.isWaterfallFlow) === undefined ? (react_1.default.createElement(List_1.default, Object.assign({ reportTagsView: reportTagsView }, props))) : (react_1.default.createElement(WaterfallList_1.default, Object.assign({ reportTagsView: reportTagsView }, props)))), modalEleRef.current);
103
104
  };
104
105
  exports.default = (0, react_1.memo)(WaterFall);
@@ -3,7 +3,6 @@ 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
  const react_2 = require("swiper/react");
6
- const qs_1 = tslib_1.__importDefault(require("qs"));
7
6
  const ExpandableText_1 = tslib_1.__importDefault(require("./ExpandableText"));
8
7
  const LikeButton_1 = tslib_1.__importDefault(require("./LikeButton"));
9
8
  const VideoWidget_1 = tslib_1.__importDefault(require("./VideoWidget"));
@@ -48,30 +47,11 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
48
47
  return;
49
48
  }
50
49
  initTime();
51
- const queryString = location.search.slice(1);
52
- const params = qs_1.default.parse(queryString.replace(/\+/g, '%2B'));
53
- for (const key in params) {
54
- params[key] = params[key].replace(/%2B/g, '+');
55
- }
56
- const getVal = (key) => { var _a; return (_a = params[key]) !== null && _a !== void 0 ? _a : ''; };
57
- bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
58
- eventInfo: {
59
- eventSubject: 'h5LinkEnterFeed',
60
- eventDescription: 'User enter h5 link',
61
- utmSource: getVal('utm_source'),
62
- utmMedium: getVal('utm_medium'),
63
- utmCampaign: getVal('utm_campaign'),
64
- utmId: getVal('utm_id'),
65
- utmContent: getVal('utm_content'),
66
- enterTime: `${Date.now()}`,
67
- requestId: null
68
- }
69
- });
70
50
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
71
51
  eventName: 'PageView'
72
52
  });
73
53
  setIsInit(true);
74
- }, [bffEventReport, data.length, bffFbReport]);
54
+ }, [data.length, bffFbReport]);
75
55
  const initTime = () => {
76
56
  curTime.current = new Date();
77
57
  viewTime.current = new Date();
@@ -199,6 +199,30 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
199
199
  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 })
200
200
  });
201
201
  }, [bffEventReport, isFromHashtag]);
202
+ (0, react_1.useEffect)(() => {
203
+ var _a, _b;
204
+ const queryString = location.search.slice(1);
205
+ const params = qs_1.default.parse(queryString.replace(/\+/g, '%2B'));
206
+ for (const key in params) {
207
+ params[key] = params[key].replace(/%2B/g, '+');
208
+ }
209
+ const getVal = (key) => { var _a; return (_a = params[key]) !== null && _a !== void 0 ? _a : ''; };
210
+ bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
211
+ eventInfo: {
212
+ eventSubject: 'h5LinkEnterFeed',
213
+ eventDescription: 'User enter h5 link',
214
+ utmSource: getVal('utm_source'),
215
+ utmMedium: getVal('utm_medium'),
216
+ utmCampaign: getVal('utm_campaign'),
217
+ utmId: getVal('utm_id'),
218
+ utmContent: getVal('utm_content'),
219
+ enterTime: `${Date.now()}`,
220
+ requestId: null,
221
+ 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 : '',
222
+ clSource: getVal('cl_sourc')
223
+ }
224
+ });
225
+ }, []);
202
226
  (0, react_1.useEffect)(() => {
203
227
  setLoading(true);
204
228
  bffGetTagList();
@@ -209,6 +233,12 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
209
233
  setCacheRtcList((_b = data === null || data === void 0 ? void 0 : data.recList) !== null && _b !== void 0 ? _b : []);
210
234
  })
211
235
  .finally(() => {
236
+ bffEventReport({
237
+ eventInfo: {
238
+ eventSubject: 'apiRequest',
239
+ eventDescription: 'api request succeed'
240
+ }
241
+ });
212
242
  setLoading(false);
213
243
  isInit.current = true;
214
244
  });
@@ -11,6 +11,8 @@ export interface IHashTagProps {
11
11
  price: CSSProperties;
12
12
  };
13
13
  buttonBgStyle: CSSProperties;
14
+ showBanner?: boolean;
15
+ isWaterfallFlow?: boolean;
14
16
  }
15
17
  declare const _default: React.NamedExoticComponent<IHashTagProps>;
16
18
  export default _default;
@@ -4,8 +4,22 @@ declare const _default: ({
4
4
  type: string;
5
5
  label: string;
6
6
  name: string[];
7
- addonAfter: string;
8
7
  }[];
8
+ } | {
9
+ title: string;
10
+ child: ({
11
+ type: string;
12
+ label: string;
13
+ name: string[];
14
+ addonAfter: string;
15
+ initialValue?: undefined;
16
+ } | {
17
+ type: string;
18
+ label: string;
19
+ name: string[];
20
+ initialValue: boolean;
21
+ addonAfter?: undefined;
22
+ })[];
9
23
  } | {
10
24
  title: string;
11
25
  child: {
@@ -3,6 +3,16 @@ var _a, _b;
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  const defaultSetting_1 = require("../defaultSetting");
5
5
  exports.default = [
6
+ {
7
+ title: 'Banner',
8
+ child: [
9
+ {
10
+ type: 'Switch',
11
+ label: 'Banner图开关',
12
+ name: ['props', 'showBanner']
13
+ }
14
+ ]
15
+ },
6
16
  {
7
17
  title: '卡片样式',
8
18
  child: [
@@ -11,6 +21,12 @@ exports.default = [
11
21
  label: '上下边距',
12
22
  name: ['props', 'space'],
13
23
  addonAfter: 'px'
24
+ },
25
+ {
26
+ type: 'Switch',
27
+ label: '固定宽高',
28
+ name: ['props', 'isWaterfallFlow'],
29
+ initialValue: true
14
30
  }
15
31
  ]
16
32
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pb-sxp-ui",
3
- "version": "1.0.78",
3
+ "version": "1.0.80",
4
4
  "description": "React enterprise-class UI components",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",