pb-sxp-ui 1.2.8 → 1.2.9

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.
@@ -30,7 +30,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
30
30
  const viewTime = useRef();
31
31
  const [isLoadMore, setIsLoadMore] = useState(false);
32
32
  const [isShowMore, setIsShowMore] = useState(false);
33
- const [isReload, setIsReload] = useState(false);
33
+ const [isReload, setIsReload] = useState(new Date().getTime());
34
34
  const skipLinkRef = useRef(false);
35
35
  const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport, curTime, h5EnterLink, isShowConsent, selectTag, isPreview } = useSxpDataSource();
36
36
  const { backMainFeed } = useEventReport();
@@ -124,7 +124,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
124
124
  }
125
125
  else if (document.visibilityState === 'visible') {
126
126
  if (skipLinkRef.current === true) {
127
- setIsReload(true);
127
+ setIsReload(new Date().getTime());
128
+ skipLinkRef.current = false;
128
129
  }
129
130
  handleH5EnterLink();
130
131
  if (repCond) {
@@ -182,7 +183,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
182
183
  const renderContent = useCallback((rec, index) => {
183
184
  var _a, _b, _c, _d;
184
185
  if ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.url) {
185
- return (React.createElement(VideoWidget, { rec: rec, index: index, muted: isMuted, data: data, height: height, activeIndex: activeIndex, videoPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.videoPost, videoPlayIcon: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.videoPlayIcon }));
186
+ return (React.createElement(VideoWidget, { key: isReload, rec: rec, index: index, muted: isMuted, data: data, height: height, activeIndex: activeIndex, videoPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.videoPost, videoPlayIcon: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.videoPlayIcon }));
186
187
  }
187
188
  if ((_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.imgUrls) {
188
189
  return (React.createElement(PictureGroup, { key: rec === null || rec === void 0 ? void 0 : rec.video.itemId, imgUrls: rec === null || rec === void 0 ? void 0 : rec.video.imgUrls, width: containerWidth, height: height, rec: rec, index: index, onReportViewImageEnd: handleReportViewImageEnd, onViewImageStartEvent: handleViewImageStartEvent, imgUrlsPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.imgUrlsPost }));
@@ -208,7 +209,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
208
209
  viewTime,
209
210
  tipText,
210
211
  resolver,
211
- schema
212
+ schema,
213
+ isReload
212
214
  ]);
213
215
  const onExpandableChange = useCallback((v) => {
214
216
  setIsShowMore(v);
@@ -24,7 +24,8 @@ const AniLinkPopup = createMaterial(AniLinkPopupComponent, {
24
24
  title: {
25
25
  fontSize: 14,
26
26
  color: '#000',
27
- textAlign: 'left'
27
+ textAlign: 'left',
28
+ lineHeight: 2.6
28
29
  },
29
30
  ctaTitle: {
30
31
  width: 108,
@@ -33,7 +33,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
33
33
  const viewTime = (0, react_1.useRef)();
34
34
  const [isLoadMore, setIsLoadMore] = (0, react_1.useState)(false);
35
35
  const [isShowMore, setIsShowMore] = (0, react_1.useState)(false);
36
- const [isReload, setIsReload] = (0, react_1.useState)(false);
36
+ const [isReload, setIsReload] = (0, react_1.useState)(new Date().getTime());
37
37
  const skipLinkRef = (0, react_1.useRef)(false);
38
38
  const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport, curTime, h5EnterLink, isShowConsent, selectTag, isPreview } = (0, hooks_1.useSxpDataSource)();
39
39
  const { backMainFeed } = (0, useEventReport_1.useEventReport)();
@@ -127,7 +127,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
127
127
  }
128
128
  else if (document.visibilityState === 'visible') {
129
129
  if (skipLinkRef.current === true) {
130
- setIsReload(true);
130
+ setIsReload(new Date().getTime());
131
+ skipLinkRef.current = false;
131
132
  }
132
133
  handleH5EnterLink();
133
134
  if (repCond) {
@@ -185,7 +186,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
185
186
  const renderContent = (0, react_1.useCallback)((rec, index) => {
186
187
  var _a, _b, _c, _d;
187
188
  if ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.url) {
188
- return (react_1.default.createElement(VideoWidget_1.default, { rec: rec, index: index, muted: isMuted, data: data, height: height, activeIndex: activeIndex, videoPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.videoPost, videoPlayIcon: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.videoPlayIcon }));
189
+ return (react_1.default.createElement(VideoWidget_1.default, { key: isReload, rec: rec, index: index, muted: isMuted, data: data, height: height, activeIndex: activeIndex, videoPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.videoPost, videoPlayIcon: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.videoPlayIcon }));
189
190
  }
190
191
  if ((_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.imgUrls) {
191
192
  return (react_1.default.createElement(PictureGroup_1.default, { key: rec === null || rec === void 0 ? void 0 : rec.video.itemId, imgUrls: rec === null || rec === void 0 ? void 0 : rec.video.imgUrls, width: containerWidth, height: height, rec: rec, index: index, onReportViewImageEnd: handleReportViewImageEnd, onViewImageStartEvent: handleViewImageStartEvent, imgUrlsPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.imgUrlsPost }));
@@ -211,7 +212,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
211
212
  viewTime,
212
213
  tipText,
213
214
  resolver,
214
- schema
215
+ schema,
216
+ isReload
215
217
  ]);
216
218
  const onExpandableChange = (0, react_1.useCallback)((v) => {
217
219
  setIsShowMore(v);
@@ -28,7 +28,8 @@ const AniLinkPopup = (0, create_1.createMaterial)(_1.default, {
28
28
  title: {
29
29
  fontSize: 14,
30
30
  color: '#000',
31
- textAlign: 'left'
31
+ textAlign: 'left',
32
+ lineHeight: 2.6
32
33
  },
33
34
  ctaTitle: {
34
35
  width: 108,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pb-sxp-ui",
3
- "version": "1.2.8",
3
+ "version": "1.2.9",
4
4
  "description": "React enterprise-class UI components",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",