pb-sxp-ui 1.0.12 → 1.0.13

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.
@@ -20,9 +20,6 @@ const PictureGroup = ({ imgUrls, width, height, rec, index, onReportViewImageEnd
20
20
  setIsLoad(true);
21
21
  }
22
22
  }, [rec, isActive, onReportViewImageEnd, openHashtag, index, onViewImageStartEvent, isLoad]);
23
- if (!isActive) {
24
- return React.createElement("img", { src: sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image, style: { width, height, objectFit: 'cover' } });
25
- }
26
23
  return (React.createElement(Swiper, { defaultValue: 0, direction: 'horizontal', modules: [Pagination, Autoplay], pagination: { clickable: true, bulletActiveClass: 'swipe-item-active-bullet' }, height: height, loop: true, autoplay: { delay: 3000 } }, imgUrls === null || imgUrls === void 0 ? void 0 : imgUrls.map((url) => {
27
24
  return (React.createElement(SwiperSlide, { key: url },
28
25
  React.createElement(Picture, { src: url, width: width, height: height })));
@@ -96,7 +96,7 @@ const WaterfallFlowItem = (props) => {
96
96
  };
97
97
  }, [src, showVideo]);
98
98
  const handleClickToDetail = () => {
99
- reportTagsView(index);
99
+ reportTagsView();
100
100
  setRtcList === null || setRtcList === void 0 ? void 0 : setRtcList(list);
101
101
  setTimeout(() => {
102
102
  var _a;
@@ -29,7 +29,7 @@ const WaterFall = (props) => {
29
29
  if (!isEq && cacheRtcList && (cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.length)) {
30
30
  setRtcList === null || setRtcList === void 0 ? void 0 : setRtcList(cacheRtcList);
31
31
  }
32
- reportTagsView(cacheActiveIndex || 0);
32
+ reportTagsView();
33
33
  setWaterFallData === null || setWaterFallData === void 0 ? void 0 : setWaterFallData(undefined);
34
34
  setIsFromHashtag === null || setIsFromHashtag === void 0 ? void 0 : setIsFromHashtag(false);
35
35
  setTimeout(() => {
@@ -46,7 +46,7 @@ const WaterFall = (props) => {
46
46
  setRecData(waterFallData);
47
47
  }
48
48
  }, [waterFallData]);
49
- const reportTagsView = useCallback((index) => {
49
+ const reportTagsView = useCallback(() => {
50
50
  var _a, _b, _c, _d, _e, _f;
51
51
  const rec = recData === null || recData === void 0 ? void 0 : recData.rec;
52
52
  if (!rec)
@@ -64,7 +64,7 @@ const WaterFall = (props) => {
64
64
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
65
65
  eventInfo: {
66
66
  relatedContentId: (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.itemId,
67
- position: index + '',
67
+ position: cacheActiveIndex + '',
68
68
  contentTags: JSON.stringify((_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.tags),
69
69
  traceInfo: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.traceInfo,
70
70
  hashTags: JSON.stringify([recData === null || recData === void 0 ? void 0 : recData.hashTag]),
@@ -75,7 +75,7 @@ const WaterFall = (props) => {
75
75
  eventDescription: 'User click tags view contents'
76
76
  }
77
77
  });
78
- }, [recData, bffEventReport, viewTime, isFromHashtag]);
78
+ }, [recData, bffEventReport, viewTime, isFromHashtag, cacheActiveIndex]);
79
79
  useEffect(() => {
80
80
  if (openHashtag) {
81
81
  setViewTime(new Date());
@@ -23,9 +23,6 @@ const PictureGroup = ({ imgUrls, width, height, rec, index, onReportViewImageEnd
23
23
  setIsLoad(true);
24
24
  }
25
25
  }, [rec, isActive, onReportViewImageEnd, openHashtag, index, onViewImageStartEvent, isLoad]);
26
- if (!isActive) {
27
- return react_1.default.createElement("img", { src: sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image, style: { width, height, objectFit: 'cover' } });
28
- }
29
26
  return (react_1.default.createElement(react_2.Swiper, { defaultValue: 0, direction: 'horizontal', modules: [modules_1.Pagination, modules_1.Autoplay], pagination: { clickable: true, bulletActiveClass: 'swipe-item-active-bullet' }, height: height, loop: true, autoplay: { delay: 3000 } }, imgUrls === null || imgUrls === void 0 ? void 0 : imgUrls.map((url) => {
30
27
  return (react_1.default.createElement(react_2.SwiperSlide, { key: url },
31
28
  react_1.default.createElement(Picture_1.default, { src: url, width: width, height: height })));
@@ -98,7 +98,7 @@ const WaterfallFlowItem = (props) => {
98
98
  };
99
99
  }, [src, showVideo]);
100
100
  const handleClickToDetail = () => {
101
- reportTagsView(index);
101
+ reportTagsView();
102
102
  setRtcList === null || setRtcList === void 0 ? void 0 : setRtcList(list);
103
103
  setTimeout(() => {
104
104
  var _a;
@@ -32,7 +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
- reportTagsView(cacheActiveIndex || 0);
35
+ reportTagsView();
36
36
  setWaterFallData === null || setWaterFallData === void 0 ? void 0 : setWaterFallData(undefined);
37
37
  setIsFromHashtag === null || setIsFromHashtag === void 0 ? void 0 : setIsFromHashtag(false);
38
38
  setTimeout(() => {
@@ -49,7 +49,7 @@ const WaterFall = (props) => {
49
49
  setRecData(waterFallData);
50
50
  }
51
51
  }, [waterFallData]);
52
- const reportTagsView = (0, react_1.useCallback)((index) => {
52
+ const reportTagsView = (0, react_1.useCallback)(() => {
53
53
  var _a, _b, _c, _d, _e, _f;
54
54
  const rec = recData === null || recData === void 0 ? void 0 : recData.rec;
55
55
  if (!rec)
@@ -67,7 +67,7 @@ const WaterFall = (props) => {
67
67
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
68
68
  eventInfo: {
69
69
  relatedContentId: (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.itemId,
70
- position: index + '',
70
+ position: cacheActiveIndex + '',
71
71
  contentTags: JSON.stringify((_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.tags),
72
72
  traceInfo: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.traceInfo,
73
73
  hashTags: JSON.stringify([recData === null || recData === void 0 ? void 0 : recData.hashTag]),
@@ -78,7 +78,7 @@ const WaterFall = (props) => {
78
78
  eventDescription: 'User click tags view contents'
79
79
  }
80
80
  });
81
- }, [recData, bffEventReport, viewTime, isFromHashtag]);
81
+ }, [recData, bffEventReport, viewTime, isFromHashtag, cacheActiveIndex]);
82
82
  (0, react_1.useEffect)(() => {
83
83
  if (openHashtag) {
84
84
  setViewTime(new Date());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pb-sxp-ui",
3
- "version": "1.0.12",
3
+ "version": "1.0.13",
4
4
  "description": "React enterprise-class UI components",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",