pb-sxp-ui 1.15.40 → 1.15.42
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 +108 -53
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +108 -53
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +6 -6
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +6 -6
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +108 -53
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +6 -6
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/components/SxpPageRender/PictureGroup/index.d.ts +5 -0
- package/es/core/components/SxpPageRender/PictureGroup/index.js +37 -13
- package/es/core/components/SxpPageRender/VideoWidget/index.js +27 -38
- package/es/core/components/SxpPageRender/index.js +4 -2
- package/es/materials/sxp/popup/CommodityDetail/material.js +2 -1
- package/es/materials/sxp/popup/CommodityDetail/settingRender.d.ts +16 -0
- package/es/materials/sxp/popup/CommodityDetail/settingRender.js +19 -0
- package/es/materials/sxp/popup/CommodityDetailDiroNew/material.js +2 -1
- package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +16 -0
- package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +19 -0
- package/lib/core/components/SxpPageRender/PictureGroup/index.d.ts +5 -0
- package/lib/core/components/SxpPageRender/PictureGroup/index.js +36 -12
- package/lib/core/components/SxpPageRender/VideoWidget/index.js +27 -38
- package/lib/core/components/SxpPageRender/index.js +4 -2
- package/lib/materials/sxp/popup/CommodityDetail/material.js +2 -1
- package/lib/materials/sxp/popup/CommodityDetail/settingRender.d.ts +16 -0
- package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +19 -0
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/material.js +2 -1
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +16 -0
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +19 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -2248,6 +2248,25 @@ var settingRender$e = [
|
|
2248
2248
|
{
|
2249
2249
|
title: '购买按钮样式',
|
2250
2250
|
child: [
|
2251
|
+
{
|
2252
|
+
label: '英文大小写',
|
2253
|
+
type: 'Select',
|
2254
|
+
name: ['props', 'buttonStyle', 'textTransform'],
|
2255
|
+
options: [
|
2256
|
+
{
|
2257
|
+
label: '默认',
|
2258
|
+
value: 'unset'
|
2259
|
+
},
|
2260
|
+
{
|
2261
|
+
label: '小写',
|
2262
|
+
value: 'lowercase'
|
2263
|
+
},
|
2264
|
+
{
|
2265
|
+
label: '大写',
|
2266
|
+
value: 'uppercase'
|
2267
|
+
}
|
2268
|
+
]
|
2269
|
+
},
|
2251
2270
|
{
|
2252
2271
|
type: 'Color',
|
2253
2272
|
label: '背景色',
|
@@ -10640,7 +10659,8 @@ const CommodityDetail = createMaterial(CommodityDetailComponent, {
|
|
10640
10659
|
height: 45,
|
10641
10660
|
fontWeight: 'bold',
|
10642
10661
|
textAlign: 'center',
|
10643
|
-
color: 'rgba(255, 255, 255, 0.9)'
|
10662
|
+
color: 'rgba(255, 255, 255, 0.9)',
|
10663
|
+
textTransform: 'unset'
|
10644
10664
|
},
|
10645
10665
|
commodityImgRatio: {
|
10646
10666
|
w: 1,
|
@@ -11108,6 +11128,25 @@ var settingRender$c = [
|
|
11108
11128
|
{
|
11109
11129
|
title: '购买按钮样式',
|
11110
11130
|
child: [
|
11131
|
+
{
|
11132
|
+
label: '英文大小写',
|
11133
|
+
type: 'Select',
|
11134
|
+
name: ['props', 'buttonStyle', 'textTransform'],
|
11135
|
+
options: [
|
11136
|
+
{
|
11137
|
+
label: '默认',
|
11138
|
+
value: 'unset'
|
11139
|
+
},
|
11140
|
+
{
|
11141
|
+
label: '小写',
|
11142
|
+
value: 'lowercase'
|
11143
|
+
},
|
11144
|
+
{
|
11145
|
+
label: '大写',
|
11146
|
+
value: 'uppercase'
|
11147
|
+
}
|
11148
|
+
]
|
11149
|
+
},
|
11111
11150
|
{
|
11112
11151
|
type: 'Color',
|
11113
11152
|
label: '背景色',
|
@@ -11600,7 +11639,8 @@ const CommodityDetailDiroNew = createMaterial(CommodityDetailDiroNewComponent, {
|
|
11600
11639
|
color: '#fff',
|
11601
11640
|
borderRadius: 25,
|
11602
11641
|
marginTop: 16,
|
11603
|
-
marginBottom: 16
|
11642
|
+
marginBottom: 16,
|
11643
|
+
textTransform: 'unset'
|
11604
11644
|
},
|
11605
11645
|
commodityImgRatio: {
|
11606
11646
|
w: 1,
|
@@ -17763,6 +17803,26 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
|
|
17763
17803
|
return;
|
17764
17804
|
(_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
|
17765
17805
|
}, [videoRef === null || videoRef === void 0 ? void 0 : videoRef.current]);
|
17806
|
+
const handleEnd = () => {
|
17807
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
17808
|
+
if (!videoRef.current)
|
17809
|
+
return;
|
17810
|
+
if (isDiyH5) {
|
17811
|
+
(_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.pause();
|
17812
|
+
if (!loopPlayRef.current)
|
17813
|
+
return;
|
17814
|
+
if (index === (data === null || data === void 0 ? void 0 : data.length) - 1) {
|
17815
|
+
(_c = (_b = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _b === void 0 ? void 0 : _b.swiper) === null || _c === void 0 ? void 0 : _c.slideTo(0);
|
17816
|
+
}
|
17817
|
+
else {
|
17818
|
+
const i = (_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.activeIndex;
|
17819
|
+
(_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.slideTo(i + 1);
|
17820
|
+
}
|
17821
|
+
}
|
17822
|
+
else {
|
17823
|
+
(_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.play();
|
17824
|
+
}
|
17825
|
+
};
|
17766
17826
|
const PAUSE_ICON = useIconLink('/pb_static/06f28a2025c74c1cb49be6767316d827.png');
|
17767
17827
|
const handlePlaying = useCallback(() => {
|
17768
17828
|
if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
|
@@ -17787,11 +17847,6 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
|
|
17787
17847
|
isFirstPlayRef.current = false;
|
17788
17848
|
}
|
17789
17849
|
}), [bffEventReport, data, index, isFirstPlayRef, videoRef === null || videoRef === void 0 ? void 0 : videoRef.current]);
|
17790
|
-
const setCurrentTimeByStartTime = useCallback(() => {
|
17791
|
-
if (isDiyH5) {
|
17792
|
-
videoRef.current.currentTime = scene === null || scene === void 0 ? void 0 : scene.startTime;
|
17793
|
-
}
|
17794
|
-
}, []);
|
17795
17850
|
const handLoadeddata = useCallback(() => {
|
17796
17851
|
if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || firstFrameSrc || !blur)
|
17797
17852
|
return;
|
@@ -17816,13 +17871,12 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
|
|
17816
17871
|
const handleLoadedmetadata = useCallback(() => {
|
17817
17872
|
if (!videoRef.current)
|
17818
17873
|
return;
|
17819
|
-
setCurrentTimeByStartTime();
|
17820
17874
|
loadedTimeRef.current = new Date();
|
17821
17875
|
handleStartPlay();
|
17822
17876
|
handLoadeddata();
|
17823
17877
|
}, [videoRef.current, handLoadeddata, handleStartPlay]);
|
17824
17878
|
const handleClickVideo = useCallback((type) => () => {
|
17825
|
-
var _a, _b, _c, _d, _e
|
17879
|
+
var _a, _b, _c, _d, _e;
|
17826
17880
|
if (!videoRef.current)
|
17827
17881
|
return;
|
17828
17882
|
if (!isLoadFinish)
|
@@ -17843,13 +17897,10 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
|
|
17843
17897
|
break;
|
17844
17898
|
default:
|
17845
17899
|
if (isPause) {
|
17846
|
-
|
17847
|
-
videoRef.current.currentTime = scene === null || scene === void 0 ? void 0 : scene.startTime;
|
17848
|
-
}
|
17849
|
-
(_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.play();
|
17900
|
+
(_d = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _d === void 0 ? void 0 : _d.play();
|
17850
17901
|
}
|
17851
17902
|
else {
|
17852
|
-
(
|
17903
|
+
(_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.pause();
|
17853
17904
|
}
|
17854
17905
|
setIsPauseVideo(!isPause);
|
17855
17906
|
break;
|
@@ -17887,27 +17938,8 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
|
|
17887
17938
|
const handleWaiting = useCallback(() => {
|
17888
17939
|
setWaiting(true);
|
17889
17940
|
}, []);
|
17890
|
-
const handleTimeUpload = () => {
|
17891
|
-
if (!videoRef.current || !isDiyH5)
|
17892
|
-
return;
|
17893
|
-
setTimeout(() => {
|
17894
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
17895
|
-
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)) {
|
17896
|
-
(_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.pause();
|
17897
|
-
if (!loopPlayRef.current)
|
17898
|
-
return;
|
17899
|
-
if (index === (data === null || data === void 0 ? void 0 : data.length) - 1) {
|
17900
|
-
(_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);
|
17901
|
-
}
|
17902
|
-
else {
|
17903
|
-
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;
|
17904
|
-
(_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);
|
17905
|
-
}
|
17906
|
-
}
|
17907
|
-
});
|
17908
|
-
};
|
17909
17941
|
useEffect(() => {
|
17910
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
17942
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
17911
17943
|
if (!isActive)
|
17912
17944
|
return;
|
17913
17945
|
const videoSrc = videoUrl;
|
@@ -17928,7 +17960,6 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
|
|
17928
17960
|
hls === null || hls === void 0 ? void 0 : hls.attachMedia(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current);
|
17929
17961
|
hls === null || hls === void 0 ? void 0 : hls.on(Hls.Events.MANIFEST_PARSED, function () {
|
17930
17962
|
var _a;
|
17931
|
-
setCurrentTimeByStartTime();
|
17932
17963
|
(_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
|
17933
17964
|
});
|
17934
17965
|
}
|
@@ -17942,12 +17973,11 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
|
|
17942
17973
|
(_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.addEventListener('play', handleStartPlay);
|
17943
17974
|
(_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.addEventListener('playing', handlePlaying);
|
17944
17975
|
(_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.addEventListener('pause', handlePause);
|
17945
|
-
(_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.addEventListener('ended',
|
17976
|
+
(_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.addEventListener('ended', handleEnd);
|
17946
17977
|
(_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.addEventListener('canplay', handlePlay);
|
17947
17978
|
(_k = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _k === void 0 ? void 0 : _k.addEventListener('waiting', handleWaiting);
|
17948
|
-
(_l = videoRef.current) === null || _l === void 0 ? void 0 : _l.addEventListener('timeupdate', handleTimeUpload);
|
17949
17979
|
return () => {
|
17950
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
17980
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
17951
17981
|
const isPause = (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.paused;
|
17952
17982
|
if (!isPause)
|
17953
17983
|
handlePause();
|
@@ -17959,10 +17989,9 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
|
|
17959
17989
|
(_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.removeEventListener('play', handleStartPlay);
|
17960
17990
|
(_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.removeEventListener('playing', handlePlaying);
|
17961
17991
|
(_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.removeEventListener('pause', handlePause);
|
17962
|
-
(_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.removeEventListener('ended',
|
17992
|
+
(_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.removeEventListener('ended', handleEnd);
|
17963
17993
|
(_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.removeEventListener('canplay', handlePlay);
|
17964
17994
|
(_k = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _k === void 0 ? void 0 : _k.removeEventListener('waiting', handleWaiting);
|
17965
|
-
(_l = videoRef.current) === null || _l === void 0 ? void 0 : _l.removeEventListener('timeupdate', handleTimeUpload);
|
17966
17995
|
};
|
17967
17996
|
}, [isActive]);
|
17968
17997
|
useEffect(() => {
|
@@ -18173,19 +18202,43 @@ const Picture = (props) => {
|
|
18173
18202
|
}, onLoad: onShowFirstImage }))));
|
18174
18203
|
};
|
18175
18204
|
|
18176
|
-
const PictureGroup$4 = ({ imgUrls,
|
18205
|
+
const PictureGroup$4 = forwardRef(({ imgUrls, data, height, rec, index, onViewImageEndEvent, onViewImageStartEvent, imgUrlsPostConfig, swiperRef }, ref) => {
|
18177
18206
|
var _a, _b;
|
18178
18207
|
const { isActive } = useSwiperSlide();
|
18179
|
-
const { sxpParameter, openHashtag } = useSxpDataSource();
|
18208
|
+
const { sxpParameter, openHashtag, isDiyH5 } = useSxpDataSource();
|
18180
18209
|
const [isLoad, setIsLoad] = useState(false);
|
18181
18210
|
const [imgInfo, setImgInfo] = useState();
|
18182
18211
|
const [swiperActiveIndex, setSwiperActiveIndex] = useState(0);
|
18183
|
-
const
|
18212
|
+
const imgsSwiperRef = useRef();
|
18184
18213
|
const isFirstPlayRef = useRef(true);
|
18214
|
+
const loopPlayRef = useRef(true);
|
18185
18215
|
const initTime = new Date();
|
18216
|
+
useImperativeHandle(ref, () => {
|
18217
|
+
return {
|
18218
|
+
setLoopPlay(v) {
|
18219
|
+
loopPlayRef.current = v;
|
18220
|
+
}
|
18221
|
+
};
|
18222
|
+
});
|
18223
|
+
useEffect(() => {
|
18224
|
+
if (isLoad && isActive && isDiyH5) {
|
18225
|
+
setTimeout(() => {
|
18226
|
+
var _a, _b, _c, _d, _e, _f;
|
18227
|
+
if (!loopPlayRef.current)
|
18228
|
+
return;
|
18229
|
+
if (index === (data === null || data === void 0 ? void 0 : data.length) - 1) {
|
18230
|
+
(_b = (_a = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper) === null || _b === void 0 ? void 0 : _b.slideTo(0);
|
18231
|
+
}
|
18232
|
+
else {
|
18233
|
+
const i = (_d = (_c = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _c === void 0 ? void 0 : _c.swiper) === null || _d === void 0 ? void 0 : _d.activeIndex;
|
18234
|
+
(_f = (_e = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _e === void 0 ? void 0 : _e.swiper) === null || _f === void 0 ? void 0 : _f.slideTo(i + 1);
|
18235
|
+
}
|
18236
|
+
}, 3000);
|
18237
|
+
}
|
18238
|
+
}, [isLoad, isActive, isDiyH5, data, index, swiperRef]);
|
18186
18239
|
useEffect(() => {
|
18187
18240
|
if (isLoad && isActive) {
|
18188
|
-
(
|
18241
|
+
(imgsSwiperRef === null || imgsSwiperRef === void 0 ? void 0 : imgsSwiperRef.current) && imgsSwiperRef.current.swiper.autoplay.start();
|
18189
18242
|
if (openHashtag) {
|
18190
18243
|
onViewImageEndEvent(rec);
|
18191
18244
|
}
|
@@ -18195,7 +18248,7 @@ const PictureGroup$4 = ({ imgUrls, width, height, rec, index, onViewImageEndEven
|
|
18195
18248
|
}
|
18196
18249
|
}
|
18197
18250
|
else {
|
18198
|
-
(
|
18251
|
+
(imgsSwiperRef === null || imgsSwiperRef === void 0 ? void 0 : imgsSwiperRef.current) && imgsSwiperRef.current.swiper.autoplay.stop();
|
18199
18252
|
}
|
18200
18253
|
}, [rec, isActive, onViewImageEndEvent, openHashtag, index, onViewImageStartEvent, isLoad, imgInfo]);
|
18201
18254
|
const showFirstImageFn = useCallback((e) => __awaiter(void 0, void 0, void 0, function* () {
|
@@ -18222,13 +18275,13 @@ const PictureGroup$4 = ({ imgUrls, width, height, rec, index, onViewImageEndEven
|
|
18222
18275
|
};
|
18223
18276
|
}, [isActive, imgInfo]);
|
18224
18277
|
const handleMouseEnter = useCallback(() => {
|
18225
|
-
if (
|
18226
|
-
|
18278
|
+
if (imgsSwiperRef.current && imgsSwiperRef.current.swiper && isAlly) {
|
18279
|
+
imgsSwiperRef.current.swiper.autoplay.stop();
|
18227
18280
|
}
|
18228
18281
|
}, []);
|
18229
18282
|
const handleMouseLeave = useCallback(() => {
|
18230
|
-
if (
|
18231
|
-
|
18283
|
+
if (imgsSwiperRef.current && imgsSwiperRef.current.swiper && isAlly) {
|
18284
|
+
imgsSwiperRef.current.swiper.autoplay.start();
|
18232
18285
|
}
|
18233
18286
|
}, []);
|
18234
18287
|
const handleSlideChange = useCallback((swiper) => {
|
@@ -18249,7 +18302,7 @@ const PictureGroup$4 = ({ imgUrls, width, height, rec, index, onViewImageEndEven
|
|
18249
18302
|
enabled: true
|
18250
18303
|
}
|
18251
18304
|
}
|
18252
|
-
: {}), { loop: true, ref:
|
18305
|
+
: {}), { loop: true, ref: imgsSwiperRef, onSlideChange: handleSlideChange, className: css(Object.assign(Object.assign({ '.swiper-pagination': {
|
18253
18306
|
bottom: (_a = imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.marginBottom) !== null && _a !== void 0 ? _a : 0,
|
18254
18307
|
fontSize: '14px'
|
18255
18308
|
} }, ((imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.dotsBgColor) && {
|
@@ -18266,7 +18319,7 @@ const PictureGroup$4 = ({ imgUrls, width, height, rec, index, onViewImageEndEven
|
|
18266
18319
|
return (React.createElement(SwiperSlide, { key: srcKey, "aria-hidden": srcKey !== swiperActiveIndex },
|
18267
18320
|
React.createElement(Picture, { src: !isLoad && srcKey > 0 ? '' : url, height: height, imgUrlsPostConfig: imgUrlsPostConfig, onShowFirstImage: showFirstImageFn })));
|
18268
18321
|
}))));
|
18269
|
-
};
|
18322
|
+
});
|
18270
18323
|
var PictureGroup$5 = memo(PictureGroup$4);
|
18271
18324
|
|
18272
18325
|
/*
|
@@ -18566,6 +18619,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
18566
18619
|
const skipLinkRef = useRef(false);
|
18567
18620
|
const [pageNum, setPageNum] = useState(2);
|
18568
18621
|
const videoWidgetRef = useRef(null);
|
18622
|
+
const pictureGroupRef = useRef(null);
|
18569
18623
|
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();
|
18570
18624
|
const { backMainFeed, productView, jumpToWeb } = useEventReport();
|
18571
18625
|
const isShowFingerTip = useMemo(() => {
|
@@ -18704,8 +18758,9 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
18704
18758
|
refreshFeSession
|
18705
18759
|
]);
|
18706
18760
|
const handleSessionExpire = useCallback(debounce(() => {
|
18707
|
-
var _a;
|
18761
|
+
var _a, _b;
|
18708
18762
|
(_a = videoWidgetRef.current) === null || _a === void 0 ? void 0 : _a.setLoopPlay(false);
|
18763
|
+
(_b = pictureGroupRef.current) === null || _b === void 0 ? void 0 : _b.setLoopPlay(false);
|
18709
18764
|
refreshFeSession === null || refreshFeSession === void 0 ? void 0 : refreshFeSession(false, handleSessionCompleted);
|
18710
18765
|
}, 1000), [handleSessionCompleted, refreshFeSession]);
|
18711
18766
|
useEffect(() => {
|
@@ -18783,7 +18838,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
18783
18838
|
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 })));
|
18784
18839
|
}
|
18785
18840
|
if ((_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.imgUrls) {
|
18786
|
-
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 }));
|
18841
|
+
return (React.createElement(PictureGroup$5, Object.assign({ data: data }, (activeIndex === index && { ref: pictureGroupRef }), { 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, swiperRef: swiperRef })));
|
18787
18842
|
}
|
18788
18843
|
if (rec.product && Array.isArray(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) && ((_j = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _j === void 0 ? void 0 : _j.length) > 0) {
|
18789
18844
|
return (_k = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _k === void 0 ? void 0 : _k.map((value, idx) => {
|