pb-sxp-ui 1.15.22-alpha.2 → 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 +9 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -7
- 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 +9 -7
- 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/SxpPageRender/VideoWidget/index.js +5 -3
- package/es/core/components/SxpPageRender/index.js +3 -3
- package/lib/core/components/SxpPageRender/VideoWidget/index.js +5 -3
- package/lib/core/components/SxpPageRender/index.js +3 -3
- package/package.json +1 -1
@@ -169,6 +169,7 @@ const VideoWidget = forwardRef(({ rec, index, height, data, muted, activeIndex,
|
|
169
169
|
return;
|
170
170
|
if (activeIndex !== index)
|
171
171
|
return;
|
172
|
+
setIsPauseVideo(true);
|
172
173
|
const item = data[index];
|
173
174
|
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);
|
174
175
|
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);
|
@@ -318,7 +319,8 @@ const VideoWidget = forwardRef(({ rec, index, height, data, muted, activeIndex,
|
|
318
319
|
};
|
319
320
|
}, [handleClickVideo, isActive]);
|
320
321
|
const renderPoster = useMemo(() => {
|
321
|
-
|
322
|
+
var _a, _b;
|
323
|
+
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) {
|
322
324
|
return null;
|
323
325
|
}
|
324
326
|
return (React.createElement("img", { style: {
|
@@ -328,8 +330,8 @@ const VideoWidget = forwardRef(({ rec, index, height, data, muted, activeIndex,
|
|
328
330
|
width: '100%',
|
329
331
|
height: '100%',
|
330
332
|
objectFit: 'cover'
|
331
|
-
}, src: sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image, alt: 'placeholder image' }));
|
332
|
-
}, [isLoadFinish, sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image]);
|
333
|
+
}, 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' }));
|
334
|
+
}, [rec, isLoadFinish, sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image]);
|
333
335
|
const renderLoading = useMemo(() => {
|
334
336
|
if (!waiting || !isLoadFinish)
|
335
337
|
return;
|
@@ -214,7 +214,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
214
214
|
}, [minusHeight, containerHeight, tagHeight]);
|
215
215
|
const visList = useMemo(() => {
|
216
216
|
var _a;
|
217
|
-
const list = activeIndex === 0 && !waterFallData && !isEditor
|
217
|
+
const list = activeIndex === 0 && !waterFallData && !isEditor && !isDiyH5
|
218
218
|
? [(_a = data === null || data === void 0 ? void 0 : data[0]) !== null && _a !== void 0 ? _a : null]
|
219
219
|
: data === null || data === void 0 ? void 0 : data.map((item, index) => {
|
220
220
|
if (activeIndex === index || index - 1 === activeIndex || index + 1 === activeIndex) {
|
@@ -226,8 +226,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
226
226
|
});
|
227
227
|
if (!(list === null || list === void 0 ? void 0 : list.length))
|
228
228
|
return [];
|
229
|
-
return !waterFallData && !isNoMoreData ? list.concat([{ loading: true }]) : list;
|
230
|
-
}, [data, activeIndex, waterFallData, isEditor, isNoMoreData]);
|
229
|
+
return !waterFallData && !isNoMoreData && !isDiyH5 ? list.concat([{ loading: true }]) : list;
|
230
|
+
}, [data, activeIndex, waterFallData, isEditor, isNoMoreData, isDiyH5]);
|
231
231
|
const renderLogo = useMemo(() => {
|
232
232
|
var _a, _b, _c, _d;
|
233
233
|
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
|
@@ -171,6 +171,7 @@ const VideoWidget = (0, react_1.forwardRef)(({ rec, index, height, data, muted,
|
|
171
171
|
return;
|
172
172
|
if (activeIndex !== index)
|
173
173
|
return;
|
174
|
+
setIsPauseVideo(true);
|
174
175
|
const item = data[index];
|
175
176
|
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);
|
176
177
|
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);
|
@@ -320,7 +321,8 @@ const VideoWidget = (0, react_1.forwardRef)(({ rec, index, height, data, muted,
|
|
320
321
|
};
|
321
322
|
}, [handleClickVideo, isActive]);
|
322
323
|
const renderPoster = (0, react_1.useMemo)(() => {
|
323
|
-
|
324
|
+
var _a, _b;
|
325
|
+
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) {
|
324
326
|
return null;
|
325
327
|
}
|
326
328
|
return (react_1.default.createElement("img", { style: {
|
@@ -330,8 +332,8 @@ const VideoWidget = (0, react_1.forwardRef)(({ rec, index, height, data, muted,
|
|
330
332
|
width: '100%',
|
331
333
|
height: '100%',
|
332
334
|
objectFit: 'cover'
|
333
|
-
}, src: sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image, alt: 'placeholder image' }));
|
334
|
-
}, [isLoadFinish, sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image]);
|
335
|
+
}, 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' }));
|
336
|
+
}, [rec, isLoadFinish, sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image]);
|
335
337
|
const renderLoading = (0, react_1.useMemo)(() => {
|
336
338
|
if (!waiting || !isLoadFinish)
|
337
339
|
return;
|
@@ -217,7 +217,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
217
217
|
}, [minusHeight, containerHeight, tagHeight]);
|
218
218
|
const visList = (0, react_1.useMemo)(() => {
|
219
219
|
var _a;
|
220
|
-
const list = activeIndex === 0 && !waterFallData && !isEditor
|
220
|
+
const list = activeIndex === 0 && !waterFallData && !isEditor && !isDiyH5
|
221
221
|
? [(_a = data === null || data === void 0 ? void 0 : data[0]) !== null && _a !== void 0 ? _a : null]
|
222
222
|
: data === null || data === void 0 ? void 0 : data.map((item, index) => {
|
223
223
|
if (activeIndex === index || index - 1 === activeIndex || index + 1 === activeIndex) {
|
@@ -229,8 +229,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
229
229
|
});
|
230
230
|
if (!(list === null || list === void 0 ? void 0 : list.length))
|
231
231
|
return [];
|
232
|
-
return !waterFallData && !isNoMoreData ? list.concat([{ loading: true }]) : list;
|
233
|
-
}, [data, activeIndex, waterFallData, isEditor, isNoMoreData]);
|
232
|
+
return !waterFallData && !isNoMoreData && !isDiyH5 ? list.concat([{ loading: true }]) : list;
|
233
|
+
}, [data, activeIndex, waterFallData, isEditor, isNoMoreData, isDiyH5]);
|
234
234
|
const renderLogo = (0, react_1.useMemo)(() => {
|
235
235
|
var _a, _b, _c, _d;
|
236
236
|
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
|