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.
- package/dist/index.cjs +10 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +10 -7
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +3 -3
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +3 -3
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +10 -7
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +3 -3
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/components/SxpPageRender/index.js +6 -4
- package/es/materials/sxp/cta/AniLinkPopup/material.js +2 -1
- package/lib/core/components/SxpPageRender/index.js +6 -4
- package/lib/materials/sxp/cta/AniLinkPopup/material.js +2 -1
- package/package.json +1 -1
@@ -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(
|
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(
|
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);
|
@@ -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)(
|
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(
|
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);
|