pb-sxp-ui 1.15.22-alpha.1 → 1.15.22-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.
- package/dist/index.cjs +78 -32
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +76 -30
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +4 -4
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +4 -4
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +78 -32
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +4 -4
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/components/DiyStoryPreview/index.js +0 -178
- package/es/core/components/SxpPageCore/index.js +2 -3
- package/es/core/components/SxpPageRender/VideoWidget/index.d.ts +6 -1
- package/es/core/components/SxpPageRender/VideoWidget/index.js +57 -15
- package/es/core/components/SxpPageRender/index.js +9 -6
- package/es/core/context/SxpDataSourceProvider.d.ts +1 -0
- package/es/core/context/SxpDataSourceProvider.js +2 -1
- package/lib/core/components/DiyStoryPreview/index.js +0 -178
- package/lib/core/components/SxpPageCore/index.js +2 -3
- package/lib/core/components/SxpPageRender/VideoWidget/index.d.ts +6 -1
- package/lib/core/components/SxpPageRender/VideoWidget/index.js +56 -14
- package/lib/core/components/SxpPageRender/index.js +9 -6
- package/lib/core/context/SxpDataSourceProvider.d.ts +1 -0
- package/lib/core/context/SxpDataSourceProvider.js +2 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
@@ -1267,7 +1267,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
1267
1267
|
multiPostTimeRef,
|
1268
1268
|
refreshFeSession,
|
1269
1269
|
getAccount,
|
1270
|
-
accountSonsent
|
1270
|
+
accountSonsent,
|
1271
|
+
isDiyH5
|
1271
1272
|
} }, isShowConsent ? (React.createElement(Consent$4, Object.assign({}, (_e = (_d = (_c = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.consent) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.item) === null || _e === void 0 ? void 0 : _e.props))) : (render({
|
1272
1273
|
rtcList,
|
1273
1274
|
mutateLike: bffMutateLike,
|
@@ -1501,7 +1502,7 @@ const EditorCore = React.forwardRef(({ children, resolver, isSsr, schema, enable
|
|
1501
1502
|
React.createElement(DataSourceProvider$1, { isSsr: isSsr, enable: enableDataSource }, children)));
|
1502
1503
|
});
|
1503
1504
|
|
1504
|
-
var index$
|
1505
|
+
var index$3 = /*#__PURE__*/Object.freeze({
|
1505
1506
|
__proto__: null,
|
1506
1507
|
EditorCore: EditorCore
|
1507
1508
|
});
|
@@ -17682,9 +17683,9 @@ const mountVideoPlayerAtNode = (() => {
|
|
17682
17683
|
};
|
17683
17684
|
})();
|
17684
17685
|
|
17685
|
-
const VideoWidget$4 = ({ rec, index, height, data, muted, activeIndex, videoPostConfig, videoPlayIcon }) => {
|
17686
|
+
const VideoWidget$4 = React.forwardRef(({ rec, index, height, data, muted, activeIndex, videoPostConfig, videoPlayIcon, loopPlay, swiperRef }, ref) => {
|
17686
17687
|
const [isPauseVideo, setIsPauseVideo] = React.useState(false);
|
17687
|
-
const { bffEventReport, sxpParameter, waterFallData, openHashtag, bffFbReport } = useSxpDataSource();
|
17688
|
+
const { bffEventReport, sxpParameter, waterFallData, openHashtag, bffFbReport, isDiyH5 } = useSxpDataSource();
|
17688
17689
|
const videoStartTime = React.useRef(0);
|
17689
17690
|
const [isLoadFinish, setIsLoadFinish] = React.useState(false);
|
17690
17691
|
const { isActive } = useSwiperSlide();
|
@@ -17698,6 +17699,18 @@ const VideoWidget$4 = ({ rec, index, height, data, muted, activeIndex, videoPost
|
|
17698
17699
|
const initTimeRef = React.useRef();
|
17699
17700
|
const loadedTimeRef = React.useRef();
|
17700
17701
|
const isFirstPlayRef = React.useRef(true);
|
17702
|
+
const loopPlayRef = React.useRef(loopPlay);
|
17703
|
+
const scene = rec.video.scene;
|
17704
|
+
React.useImperativeHandle(ref, () => {
|
17705
|
+
return {
|
17706
|
+
setLoopPlay(v) {
|
17707
|
+
loopPlayRef.current = v;
|
17708
|
+
}
|
17709
|
+
};
|
17710
|
+
});
|
17711
|
+
React.useEffect(() => {
|
17712
|
+
loopPlayRef.current = loopPlay;
|
17713
|
+
}, [loopPlay]);
|
17701
17714
|
const blur = React.useMemo(() => {
|
17702
17715
|
return (videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.mode) === '2';
|
17703
17716
|
}, [videoPostConfig]);
|
@@ -17785,12 +17798,15 @@ const VideoWidget$4 = ({ rec, index, height, data, muted, activeIndex, videoPost
|
|
17785
17798
|
const handleLoadedmetadata = React.useCallback(() => {
|
17786
17799
|
if (!videoRef.current)
|
17787
17800
|
return;
|
17801
|
+
if (isDiyH5) {
|
17802
|
+
videoRef.current.currentTime = scene === null || scene === void 0 ? void 0 : scene.startTime;
|
17803
|
+
}
|
17788
17804
|
loadedTimeRef.current = new Date();
|
17789
17805
|
handleStartPlay();
|
17790
17806
|
handLoadeddata();
|
17791
17807
|
}, [videoRef.current, handLoadeddata, handleStartPlay]);
|
17792
17808
|
const handleClickVideo = React.useCallback((type) => () => {
|
17793
|
-
var _a, _b, _c, _d, _e;
|
17809
|
+
var _a, _b, _c, _d, _e, _f;
|
17794
17810
|
if (!videoRef.current)
|
17795
17811
|
return;
|
17796
17812
|
if (!isLoadFinish)
|
@@ -17811,10 +17827,13 @@ const VideoWidget$4 = ({ rec, index, height, data, muted, activeIndex, videoPost
|
|
17811
17827
|
break;
|
17812
17828
|
default:
|
17813
17829
|
if (isPause) {
|
17814
|
-
(_d = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _d === void 0 ? void 0 : _d.
|
17830
|
+
if (isDiyH5 && Math.round((_d = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _d === void 0 ? void 0 : _d.currentTime) >= (scene === null || scene === void 0 ? void 0 : scene.endTime)) {
|
17831
|
+
videoRef.current.currentTime = scene === null || scene === void 0 ? void 0 : scene.startTime;
|
17832
|
+
}
|
17833
|
+
(_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.play();
|
17815
17834
|
}
|
17816
17835
|
else {
|
17817
|
-
(
|
17836
|
+
(_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.pause();
|
17818
17837
|
}
|
17819
17838
|
setIsPauseVideo(!isPause);
|
17820
17839
|
break;
|
@@ -17826,6 +17845,7 @@ const VideoWidget$4 = ({ rec, index, height, data, muted, activeIndex, videoPost
|
|
17826
17845
|
return;
|
17827
17846
|
if (activeIndex !== index)
|
17828
17847
|
return;
|
17848
|
+
setIsPauseVideo(true);
|
17829
17849
|
const item = data[index];
|
17830
17850
|
const videoDuration = ((_b = (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.duration) !== null && _b !== void 0 ? _b : 0).toFixed(2);
|
17831
17851
|
const videoCurrentTime = ((_d = (_c = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _c === void 0 ? void 0 : _c.currentTime) !== null && _d !== void 0 ? _d : 0).toFixed(2);
|
@@ -17851,8 +17871,27 @@ const VideoWidget$4 = ({ rec, index, height, data, muted, activeIndex, videoPost
|
|
17851
17871
|
const handleWaiting = React.useCallback(() => {
|
17852
17872
|
setWaiting(true);
|
17853
17873
|
}, []);
|
17874
|
+
const handleTimeUpload = () => {
|
17875
|
+
if (!videoRef.current || !isDiyH5)
|
17876
|
+
return;
|
17877
|
+
setTimeout(() => {
|
17878
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
17879
|
+
if (Math.round((_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.currentTime) >= ((_b = scene === null || scene === void 0 ? void 0 : scene.endTime) !== null && _b !== void 0 ? _b : 0)) {
|
17880
|
+
(_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.pause();
|
17881
|
+
if (!loopPlayRef.current)
|
17882
|
+
return;
|
17883
|
+
if (index === (data === null || data === void 0 ? void 0 : data.length) - 1) {
|
17884
|
+
(_e = (_d = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _d === void 0 ? void 0 : _d.swiper) === null || _e === void 0 ? void 0 : _e.slideTo(0);
|
17885
|
+
}
|
17886
|
+
else {
|
17887
|
+
const i = (_g = (_f = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _f === void 0 ? void 0 : _f.swiper) === null || _g === void 0 ? void 0 : _g.activeIndex;
|
17888
|
+
(_j = (_h = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _h === void 0 ? void 0 : _h.swiper) === null || _j === void 0 ? void 0 : _j.slideTo(i + 1);
|
17889
|
+
}
|
17890
|
+
}
|
17891
|
+
});
|
17892
|
+
};
|
17854
17893
|
React.useEffect(() => {
|
17855
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
17894
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
17856
17895
|
if (!isActive)
|
17857
17896
|
return;
|
17858
17897
|
const videoSrc = rec === null || rec === void 0 ? void 0 : rec.video.url;
|
@@ -17873,6 +17912,7 @@ const VideoWidget$4 = ({ rec, index, height, data, muted, activeIndex, videoPost
|
|
17873
17912
|
hls === null || hls === void 0 ? void 0 : hls.attachMedia(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current);
|
17874
17913
|
hls === null || hls === void 0 ? void 0 : hls.on(Hls.Events.MANIFEST_PARSED, function () {
|
17875
17914
|
var _a;
|
17915
|
+
videoRef.current.currentTime = scene === null || scene === void 0 ? void 0 : scene.startTime;
|
17876
17916
|
(_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
|
17877
17917
|
});
|
17878
17918
|
}
|
@@ -17889,8 +17929,9 @@ const VideoWidget$4 = ({ rec, index, height, data, muted, activeIndex, videoPost
|
|
17889
17929
|
(_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.addEventListener('ended', handlePlay);
|
17890
17930
|
(_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.addEventListener('canplay', handlePlay);
|
17891
17931
|
(_k = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _k === void 0 ? void 0 : _k.addEventListener('waiting', handleWaiting);
|
17932
|
+
(_l = videoRef.current) === null || _l === void 0 ? void 0 : _l.addEventListener('timeupdate', handleTimeUpload);
|
17892
17933
|
return () => {
|
17893
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
17934
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
17894
17935
|
const isPause = (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.paused;
|
17895
17936
|
if (!isPause)
|
17896
17937
|
handlePause();
|
@@ -17905,6 +17946,7 @@ const VideoWidget$4 = ({ rec, index, height, data, muted, activeIndex, videoPost
|
|
17905
17946
|
(_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.removeEventListener('ended', handlePlay);
|
17906
17947
|
(_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.removeEventListener('canplay', handlePlay);
|
17907
17948
|
(_k = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _k === void 0 ? void 0 : _k.removeEventListener('waiting', handleWaiting);
|
17949
|
+
(_l = videoRef.current) === null || _l === void 0 ? void 0 : _l.removeEventListener('timeupdate', handleTimeUpload);
|
17908
17950
|
};
|
17909
17951
|
}, [isActive]);
|
17910
17952
|
React.useEffect(() => {
|
@@ -17927,8 +17969,8 @@ const VideoWidget$4 = ({ rec, index, height, data, muted, activeIndex, videoPost
|
|
17927
17969
|
}
|
17928
17970
|
}, [isActive, isLoadFinish, videoRef === null || videoRef === void 0 ? void 0 : videoRef.current]);
|
17929
17971
|
/*
|
17930
|
-
|
17931
|
-
|
17972
|
+
打开/关闭hashtag暂停/播放视频
|
17973
|
+
*/
|
17932
17974
|
React.useEffect(() => {
|
17933
17975
|
var _a, _b, _c;
|
17934
17976
|
if (!isActive || !(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
|
@@ -17956,7 +17998,8 @@ const VideoWidget$4 = ({ rec, index, height, data, muted, activeIndex, videoPost
|
|
17956
17998
|
};
|
17957
17999
|
}, [handleClickVideo, isActive]);
|
17958
18000
|
const renderPoster = React.useMemo(() => {
|
17959
|
-
|
18001
|
+
var _a, _b;
|
18002
|
+
if ((!((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.cover) && !(sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image)) || isLoadFinish) {
|
17960
18003
|
return null;
|
17961
18004
|
}
|
17962
18005
|
return (React.createElement("img", { style: {
|
@@ -17966,8 +18009,8 @@ const VideoWidget$4 = ({ rec, index, height, data, muted, activeIndex, videoPost
|
|
17966
18009
|
width: '100%',
|
17967
18010
|
height: '100%',
|
17968
18011
|
objectFit: 'cover'
|
17969
|
-
}, src: sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image, alt: 'placeholder image' }));
|
17970
|
-
}, [isLoadFinish, sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image]);
|
18012
|
+
}, src: ((_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.cover) || (sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image), alt: 'placeholder image' }));
|
18013
|
+
}, [rec, isLoadFinish, sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image]);
|
17971
18014
|
const renderLoading = React.useMemo(() => {
|
17972
18015
|
if (!waiting || !isLoadFinish)
|
17973
18016
|
return;
|
@@ -18025,8 +18068,8 @@ const VideoWidget$4 = ({ rec, index, height, data, muted, activeIndex, videoPost
|
|
18025
18068
|
React.createElement("div", { className: 'n-full-screen', ref: videoEleRef, id: videoId, style: { width: '100%', height: '100%' } }),
|
18026
18069
|
renderPoster,
|
18027
18070
|
renderLoading,
|
18028
|
-
isPauseVideo && React.createElement(FormatImage$1, { className: 'clc-pb-video-pause', src: videoPlayIcon !== null && videoPlayIcon !== void 0 ? videoPlayIcon : PAUSE_ICON, alt: 'pause' })))));
|
18029
|
-
};
|
18071
|
+
isPauseVideo && (React.createElement(FormatImage$1, { className: 'clc-pb-video-pause', src: videoPlayIcon !== null && videoPlayIcon !== void 0 ? videoPlayIcon : PAUSE_ICON, alt: 'pause' }))))));
|
18072
|
+
});
|
18030
18073
|
var VideoWidget$5 = React.memo(VideoWidget$4);
|
18031
18074
|
|
18032
18075
|
const ToggleButton = ({ defaultValue, activeIcon, unactiveIcon, onChange, style }) => {
|
@@ -18489,7 +18532,7 @@ var NavBack$1 = React.memo(NavBack);
|
|
18489
18532
|
* @Author: binruan@chatlabs.com
|
18490
18533
|
* @Date: 2024-03-20 10:27:31
|
18491
18534
|
* @LastEditors: binruan@chatlabs.com
|
18492
|
-
* @LastEditTime: 2025-
|
18535
|
+
* @LastEditTime: 2025-05-07 13:33:18
|
18493
18536
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
|
18494
18537
|
*
|
18495
18538
|
*/
|
@@ -18508,7 +18551,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
18508
18551
|
const [isReload, setIsReload] = React.useState(new Date().getTime());
|
18509
18552
|
const skipLinkRef = React.useRef(false);
|
18510
18553
|
const [pageNum, setPageNum] = React.useState(2);
|
18511
|
-
const
|
18554
|
+
const videoWidgetRef = React.useRef(null);
|
18555
|
+
const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport, curTime, h5EnterLink, isShowConsent, selectTag, isPreview, isEditor, cacheRtcList, setRtcList, cacheActiveIndex, rtcList, isNoMoreData, channel, refreshFeSession, isDiyH5 } = useSxpDataSource();
|
18512
18556
|
const { backMainFeed, productView, jumpToWeb } = useEventReport();
|
18513
18557
|
const isShowFingerTip = React.useMemo(() => {
|
18514
18558
|
return data.length > 0 && !loading && (getFeUserState() || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enableSwiperTip));
|
@@ -18646,6 +18690,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
18646
18690
|
refreshFeSession
|
18647
18691
|
]);
|
18648
18692
|
const handleSessionExpire = React.useCallback(lodash.debounce(() => {
|
18693
|
+
var _a;
|
18694
|
+
(_a = videoWidgetRef.current) === null || _a === void 0 ? void 0 : _a.setLoopPlay(false);
|
18649
18695
|
refreshFeSession === null || refreshFeSession === void 0 ? void 0 : refreshFeSession(false, handleSessionCompleted);
|
18650
18696
|
}, 1000), [handleSessionCompleted, refreshFeSession]);
|
18651
18697
|
React.useEffect(() => {
|
@@ -18681,7 +18727,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
18681
18727
|
}, [minusHeight, containerHeight, tagHeight]);
|
18682
18728
|
const visList = React.useMemo(() => {
|
18683
18729
|
var _a;
|
18684
|
-
const list = activeIndex === 0 && !waterFallData && !isEditor
|
18730
|
+
const list = activeIndex === 0 && !waterFallData && !isEditor && !isDiyH5
|
18685
18731
|
? [(_a = data === null || data === void 0 ? void 0 : data[0]) !== null && _a !== void 0 ? _a : null]
|
18686
18732
|
: data === null || data === void 0 ? void 0 : data.map((item, index) => {
|
18687
18733
|
if (activeIndex === index || index - 1 === activeIndex || index + 1 === activeIndex) {
|
@@ -18693,8 +18739,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
18693
18739
|
});
|
18694
18740
|
if (!(list === null || list === void 0 ? void 0 : list.length))
|
18695
18741
|
return [];
|
18696
|
-
return !waterFallData && !isNoMoreData ? list.concat([{ loading: true }]) : list;
|
18697
|
-
}, [data, activeIndex, waterFallData, isEditor, isNoMoreData]);
|
18742
|
+
return !waterFallData && !isNoMoreData && !isDiyH5 ? list.concat([{ loading: true }]) : list;
|
18743
|
+
}, [data, activeIndex, waterFallData, isEditor, isNoMoreData, isDiyH5]);
|
18698
18744
|
const renderLogo = React.useMemo(() => {
|
18699
18745
|
var _a, _b, _c, _d;
|
18700
18746
|
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
|
@@ -18720,7 +18766,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
18720
18766
|
return (React.createElement(MultiPosts$2, Object.assign({ recData: data === null || data === void 0 ? void 0 : data[1] }, (_c = (_b = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.multiPosts) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.item) === null || _c === void 0 ? void 0 : _c.props, (_f = (_e = (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.multiPosts) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.item) === null || _f === void 0 ? void 0 : _f.event)));
|
18721
18767
|
}
|
18722
18768
|
if ((_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.url) {
|
18723
|
-
return (React.createElement(VideoWidget$5, { 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 }));
|
18769
|
+
return (React.createElement(VideoWidget$5, Object.assign({ key: isReload }, (activeIndex === index && { ref: videoWidgetRef }), { 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, loopPlay: true, swiperRef: swiperRef })));
|
18724
18770
|
}
|
18725
18771
|
if ((_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.imgUrls) {
|
18726
18772
|
return (React.createElement(PictureGroup$5, { 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, onViewImageEndEvent: handleViewImageStartEnd, onViewImageStartEvent: handleViewImageStartEvent, imgUrlsPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.imgUrlsPost }));
|
@@ -19069,7 +19115,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
19069
19115
|
return;
|
19070
19116
|
// 处理上滑下滑事件
|
19071
19117
|
handleScrollEvent(swiper);
|
19072
|
-
if (waterFallData || isEditor)
|
19118
|
+
if (waterFallData || isEditor || isDiyH5)
|
19073
19119
|
return;
|
19074
19120
|
if ((swiper === null || swiper === void 0 ? void 0 : swiper.activeIndex) + 1 >= (data === null || data === void 0 ? void 0 : data.length)) {
|
19075
19121
|
if (!isLoadMore) {
|
@@ -19455,7 +19501,7 @@ const DiyPortalPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, de
|
|
19455
19501
|
return renderView(rec, index);
|
19456
19502
|
})));
|
19457
19503
|
};
|
19458
|
-
var index$
|
19504
|
+
var index$2 = React.memo(DiyPortalPreview);
|
19459
19505
|
|
19460
19506
|
/*
|
19461
19507
|
* @Author: binruan@chatlabs.com
|
@@ -19716,7 +19762,7 @@ var VideoWidget$1 = React.memo(VideoWidget);
|
|
19716
19762
|
* @Author: binruan@chatlabs.com
|
19717
19763
|
* @Date: 2025-03-25 13:54:27
|
19718
19764
|
* @LastEditors: binruan@chatlabs.com
|
19719
|
-
* @LastEditTime: 2025-
|
19765
|
+
* @LastEditTime: 2025-05-06 18:10:44
|
19720
19766
|
* @FilePath: \pb-sxp-ui\src\core\components\DiyStoryPreview\index.tsx
|
19721
19767
|
*
|
19722
19768
|
*/
|
@@ -19948,7 +19994,7 @@ const DiyStoryPreview = React.forwardRef(({ data = [], globalConfig, tipText, nu
|
|
19948
19994
|
return renderView(rec, index);
|
19949
19995
|
}))));
|
19950
19996
|
});
|
19951
|
-
var
|
19997
|
+
var index$1 = React.memo(DiyStoryPreview);
|
19952
19998
|
|
19953
19999
|
/*
|
19954
20000
|
* @Author: binruan@chatlabs.com
|
@@ -20048,7 +20094,7 @@ const Popup = () => {
|
|
20048
20094
|
* @Author: binruan@chatlabs.com
|
20049
20095
|
* @Date: 2024-01-15 19:03:09
|
20050
20096
|
* @LastEditors: binruan@chatlabs.com
|
20051
|
-
* @LastEditTime: 2025-
|
20097
|
+
* @LastEditTime: 2025-05-06 15:49:04
|
20052
20098
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageCore\index.tsx
|
20053
20099
|
*
|
20054
20100
|
*/
|
@@ -20076,9 +20122,9 @@ const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, l
|
|
20076
20122
|
const [channel, setChannel] = React.useState();
|
20077
20123
|
return (React.createElement(EditorCore, { resolver: RESOLVER, enableDataSource: false, schema: _schema, utmVal: channel || utmVal },
|
20078
20124
|
React.createElement(SxpDataSourceProvider$1, { utmVal: utmVal, dataSources: data === null || data === void 0 ? void 0 : data.data_sources, sxpParameter: data === null || data === void 0 ? void 0 : data.sxp_parameter, maxSize: (_c = (_b = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _b === void 0 ? void 0 : _b.personalized_recommend) !== null && _c !== void 0 ? _c : maxSize, defaultSize: (_e = (_d = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _d === void 0 ? void 0 : _d.default_recommend) !== null && _e !== void 0 ? _e : defaultSize, hashTagSize: (_g = (_f = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _f === void 0 ? void 0 : _f.hash_tag_size) !== null && _g !== void 0 ? _g : hashTagSize, loadingImage: loadingImage, appDomain: appDomain, enabledMetaConversionApi: enabledMetaConversionApi, utmParameter: data === null || data === void 0 ? void 0 : data.utm_parameter, data: data, dataList: dataList, isDiyH5: isDiyH5, onUpdateSchema: (d) => setSchema(d), onUpdateChannel: (d) => setChannel(d), render: ({ rtcList, tagList, pageData }) => {
|
20079
|
-
var _a
|
20125
|
+
var _a;
|
20080
20126
|
return (React.createElement(React.Fragment, null,
|
20081
|
-
|
20127
|
+
React.createElement(SxpPageRender$1, Object.assign({ defaultData: data }, (_a = pageData === null || pageData === void 0 ? void 0 : pageData.data) === null || _a === void 0 ? void 0 : _a.sxpPageConf, { tagList: tagList, data: rtcList, resolver: RESOLVER })),
|
20082
20128
|
React.createElement(Popup, null)));
|
20083
20129
|
} })));
|
20084
20130
|
};
|
@@ -20092,14 +20138,14 @@ var index = React.memo(SxpPageCore);
|
|
20092
20138
|
* @FilePath: \pb-sxp-ui\src\index.ts
|
20093
20139
|
*/
|
20094
20140
|
|
20095
|
-
exports.DiyPortalPreview = index$
|
20096
|
-
exports.DiyStoryPreview =
|
20141
|
+
exports.DiyPortalPreview = index$2;
|
20142
|
+
exports.DiyStoryPreview = index$1;
|
20097
20143
|
exports.EditorDataProvider = EditorDataProvider;
|
20098
20144
|
exports.Modal = Modal$1;
|
20099
20145
|
exports.SxpDataSourceProvider = SxpDataSourceProvider$1;
|
20100
20146
|
exports.SxpPageCore = index;
|
20101
20147
|
exports.SxpPageRender = SxpPageRender$1;
|
20102
|
-
exports.core = index$
|
20148
|
+
exports.core = index$3;
|
20103
20149
|
exports.default = Pagebuilder;
|
20104
20150
|
exports.materials = _materials_;
|
20105
20151
|
exports.useEditorDataProvider = useEditorDataProvider;
|