pb-sxp-ui 1.0.28 → 1.0.29
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 +23 -23
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +4 -0
- package/dist/index.js +23 -23
- 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 +23 -23
- 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/PictureGroup/Picture.js +10 -8
- package/es/core/components/SxpPageRender/VideoWidget/index.js +10 -8
- package/lib/core/components/SxpPageRender/PictureGroup/Picture.js +10 -8
- package/lib/core/components/SxpPageRender/VideoWidget/index.js +10 -8
- package/package.json +1 -1
@@ -8,22 +8,24 @@ const Picture = (props) => {
|
|
8
8
|
const translateY = useMemo(() => {
|
9
9
|
var _a;
|
10
10
|
return (imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.mode) === '2'
|
11
|
-
? `translateY(-${50 + ((_a = imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.offsetTop) !== null && _a !== void 0 ? _a : 0)}%)`
|
11
|
+
? `translateY(-${50 + ((_a = imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.offsetTop) !== null && _a !== void 0 ? _a : 0)}%) translate3d(0px, 0px, 0px)`
|
12
12
|
: 'translateY(-50%)';
|
13
13
|
}, [imgUrlsPostConfig]);
|
14
|
+
const blurStyle = useMemo(() => {
|
15
|
+
return blur
|
16
|
+
? {
|
17
|
+
filter: 'blur(10px)',
|
18
|
+
transform: 'translate3d(0px, 0px, 0px) scale(1.2)'
|
19
|
+
}
|
20
|
+
: {};
|
21
|
+
}, [blur]);
|
14
22
|
return (React.createElement("div", { style: {
|
15
23
|
overflow: 'hidden',
|
16
24
|
height,
|
17
25
|
width: '100%',
|
18
26
|
position: 'relative'
|
19
27
|
} },
|
20
|
-
React.createElement(FormatImage, { src: src, style: {
|
21
|
-
height: '100%',
|
22
|
-
width: '100%',
|
23
|
-
objectFit: 'cover',
|
24
|
-
filter: blur ? 'blur(10px)' : 'none',
|
25
|
-
transform: blur ? 'scale(1.2)' : 'none'
|
26
|
-
} }),
|
28
|
+
React.createElement(FormatImage, { src: src, style: Object.assign({ height: '100%', width: '100%', objectFit: 'cover' }, blurStyle) }),
|
27
29
|
blur && (React.createElement(FormatImage, { src: src, style: {
|
28
30
|
width: '100%',
|
29
31
|
objectFit: 'contain',
|
@@ -113,7 +113,7 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
|
|
113
113
|
const translateY = useMemo(() => {
|
114
114
|
var _a;
|
115
115
|
return (videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.mode) === '2'
|
116
|
-
? `translateY(-${50 + ((_a = videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.offsetTop) !== null && _a !== void 0 ? _a : 0)}%)`
|
116
|
+
? `translateY(-${50 + ((_a = videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.offsetTop) !== null && _a !== void 0 ? _a : 0)}%) translate3d(0px, 0px, 0px)`
|
117
117
|
: 'translateY(-50%)';
|
118
118
|
}, [videoPostConfig]);
|
119
119
|
const blurBgSrc = useMemo(() => {
|
@@ -209,6 +209,14 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
|
|
209
209
|
window.removeEventListener('beforeunload', handleBeforeUnload);
|
210
210
|
};
|
211
211
|
}, [activeIndex, index, rec, videoRef, handleClickVideo, isPauseVideo]);
|
212
|
+
const blurStyle = useMemo(() => {
|
213
|
+
return blur
|
214
|
+
? {
|
215
|
+
filter: 'blur(10px)',
|
216
|
+
transform: 'translate3d(0px, 0px, 0px) scale(1.2)'
|
217
|
+
}
|
218
|
+
: {};
|
219
|
+
}, [blur]);
|
212
220
|
if (!rec.video) {
|
213
221
|
return null;
|
214
222
|
}
|
@@ -218,13 +226,7 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
|
|
218
226
|
height,
|
219
227
|
overflow: 'hidden'
|
220
228
|
} },
|
221
|
-
React.createElement(FormatImage, { src: blurBgSrc, style: {
|
222
|
-
height: '100%',
|
223
|
-
width: '100%',
|
224
|
-
objectFit: 'cover',
|
225
|
-
filter: blur ? 'blur(10px)' : 'none',
|
226
|
-
transform: blur ? 'scale(1.2)' : 'none'
|
227
|
-
} }),
|
229
|
+
React.createElement(FormatImage, { src: blurBgSrc, style: Object.assign({ height: '100%', width: '100%', objectFit: 'cover' }, blurStyle) }),
|
228
230
|
React.createElement("canvas", { ref: canvasRef, style: { display: 'none' } }),
|
229
231
|
React.createElement("div", { style: {
|
230
232
|
position: 'absolute',
|
@@ -11,22 +11,24 @@ const Picture = (props) => {
|
|
11
11
|
const translateY = (0, react_1.useMemo)(() => {
|
12
12
|
var _a;
|
13
13
|
return (imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.mode) === '2'
|
14
|
-
? `translateY(-${50 + ((_a = imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.offsetTop) !== null && _a !== void 0 ? _a : 0)}%)`
|
14
|
+
? `translateY(-${50 + ((_a = imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.offsetTop) !== null && _a !== void 0 ? _a : 0)}%) translate3d(0px, 0px, 0px)`
|
15
15
|
: 'translateY(-50%)';
|
16
16
|
}, [imgUrlsPostConfig]);
|
17
|
+
const blurStyle = (0, react_1.useMemo)(() => {
|
18
|
+
return blur
|
19
|
+
? {
|
20
|
+
filter: 'blur(10px)',
|
21
|
+
transform: 'translate3d(0px, 0px, 0px) scale(1.2)'
|
22
|
+
}
|
23
|
+
: {};
|
24
|
+
}, [blur]);
|
17
25
|
return (react_1.default.createElement("div", { style: {
|
18
26
|
overflow: 'hidden',
|
19
27
|
height,
|
20
28
|
width: '100%',
|
21
29
|
position: 'relative'
|
22
30
|
} },
|
23
|
-
react_1.default.createElement(FormatImage_1.default, { src: src, style: {
|
24
|
-
height: '100%',
|
25
|
-
width: '100%',
|
26
|
-
objectFit: 'cover',
|
27
|
-
filter: blur ? 'blur(10px)' : 'none',
|
28
|
-
transform: blur ? 'scale(1.2)' : 'none'
|
29
|
-
} }),
|
31
|
+
react_1.default.createElement(FormatImage_1.default, { src: src, style: Object.assign({ height: '100%', width: '100%', objectFit: 'cover' }, blurStyle) }),
|
30
32
|
blur && (react_1.default.createElement(FormatImage_1.default, { src: src, style: {
|
31
33
|
width: '100%',
|
32
34
|
objectFit: 'contain',
|
@@ -116,7 +116,7 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
|
|
116
116
|
const translateY = (0, react_1.useMemo)(() => {
|
117
117
|
var _a;
|
118
118
|
return (videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.mode) === '2'
|
119
|
-
? `translateY(-${50 + ((_a = videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.offsetTop) !== null && _a !== void 0 ? _a : 0)}%)`
|
119
|
+
? `translateY(-${50 + ((_a = videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.offsetTop) !== null && _a !== void 0 ? _a : 0)}%) translate3d(0px, 0px, 0px)`
|
120
120
|
: 'translateY(-50%)';
|
121
121
|
}, [videoPostConfig]);
|
122
122
|
const blurBgSrc = (0, react_1.useMemo)(() => {
|
@@ -212,6 +212,14 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
|
|
212
212
|
window.removeEventListener('beforeunload', handleBeforeUnload);
|
213
213
|
};
|
214
214
|
}, [activeIndex, index, rec, videoRef, handleClickVideo, isPauseVideo]);
|
215
|
+
const blurStyle = (0, react_1.useMemo)(() => {
|
216
|
+
return blur
|
217
|
+
? {
|
218
|
+
filter: 'blur(10px)',
|
219
|
+
transform: 'translate3d(0px, 0px, 0px) scale(1.2)'
|
220
|
+
}
|
221
|
+
: {};
|
222
|
+
}, [blur]);
|
215
223
|
if (!rec.video) {
|
216
224
|
return null;
|
217
225
|
}
|
@@ -221,13 +229,7 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
|
|
221
229
|
height,
|
222
230
|
overflow: 'hidden'
|
223
231
|
} },
|
224
|
-
react_1.default.createElement(FormatImage_1.default, { src: blurBgSrc, style: {
|
225
|
-
height: '100%',
|
226
|
-
width: '100%',
|
227
|
-
objectFit: 'cover',
|
228
|
-
filter: blur ? 'blur(10px)' : 'none',
|
229
|
-
transform: blur ? 'scale(1.2)' : 'none'
|
230
|
-
} }),
|
232
|
+
react_1.default.createElement(FormatImage_1.default, { src: blurBgSrc, style: Object.assign({ height: '100%', width: '100%', objectFit: 'cover' }, blurStyle) }),
|
231
233
|
react_1.default.createElement("canvas", { ref: canvasRef, style: { display: 'none' } }),
|
232
234
|
react_1.default.createElement("div", { style: {
|
233
235
|
position: 'absolute',
|