pb-sxp-ui 1.0.95 → 1.0.97
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 +7 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -5
- 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 +7 -5
- 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/VideoWidget/index.js +3 -1
- package/es/materials/sxp/template/MultiCommodity/index.js +2 -2
- package/es/materials/sxp/template/components/Img.js +1 -1
- package/lib/core/components/SxpPageRender/VideoWidget/index.js +3 -1
- package/lib/materials/sxp/template/MultiCommodity/index.js +2 -2
- package/lib/materials/sxp/template/components/Img.js +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -9660,7 +9660,7 @@ function useOnScreen(ref) {
|
|
9660
9660
|
* @Author: binruan@chatlabs.com
|
9661
9661
|
* @Date: 2024-01-16 14:50:13
|
9662
9662
|
* @LastEditors: binruan@chatlabs.com
|
9663
|
-
* @LastEditTime: 2024-06-
|
9663
|
+
* @LastEditTime: 2024-06-24 15:41:25
|
9664
9664
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\template\components\Img.tsx
|
9665
9665
|
*
|
9666
9666
|
*/
|
@@ -9677,7 +9677,7 @@ const Img = ({ src, rec, item, index, style, translateY, imgStyle }) => {
|
|
9677
9677
|
}
|
9678
9678
|
}, [isOnScreen, src, ref, rec, ctaEvent, item, index]);
|
9679
9679
|
const imgSrc = useMemo(() => {
|
9680
|
-
return (src === null || src === void 0 ? void 0 : src.includes('.avif')) ? src : `${src}?imrquality/rquality/
|
9680
|
+
return (src === null || src === void 0 ? void 0 : src.includes('.avif')) ? src : `${src}?imrquality/rquality/20`;
|
9681
9681
|
}, [src]);
|
9682
9682
|
return (React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, imgStyle)) },
|
9683
9683
|
React.createElement("div", { ref: ref, hidden: !src, className: css({ width: '100%', height: '100%' }) },
|
@@ -10251,7 +10251,7 @@ const MultiCommodity$1 = (_a) => {
|
|
10251
10251
|
}
|
10252
10252
|
}, popup === null || popup === void 0 ? void 0 : popup.duration);
|
10253
10253
|
return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item) => {
|
10254
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
10254
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
10255
10255
|
return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, Object.assign({ key: item.itemId, className: css(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item) }),
|
10256
10256
|
React.createElement(Img$1, { src: (_d = (_c = (_a = item === null || item === void 0 ? void 0 : item.cover) !== null && _a !== void 0 ? _a : (_b = item === null || item === void 0 ? void 0 : item.homePage) === null || _b === void 0 ? void 0 : _b[0]) !== null && _c !== void 0 ? _c : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _d !== void 0 ? _d : bottom_image, rec: recData, item: item, index: index, translateY: translateY, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img }),
|
10257
10257
|
React.createElement("div", { className: css({
|
@@ -10263,7 +10263,7 @@ const MultiCommodity$1 = (_a) => {
|
|
10263
10263
|
overflow: 'hidden'
|
10264
10264
|
}) },
|
10265
10265
|
React.createElement("div", { className: styles$1['two-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title }, (_e = item === null || item === void 0 ? void 0 : item.title) !== null && _e !== void 0 ? _e : 'Product Name'),
|
10266
|
-
React.createElement("div", { className: css(Object.assign({ padding: '
|
10266
|
+
React.createElement("div", { className: css(Object.assign({ padding: '0 7px', textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap', lineHeight: ((_f = ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle) === null || _f === void 0 ? void 0 : _f.height) + 'px' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (_h = (_g = item === null || item === void 0 ? void 0 : item.bindCta) === null || _g === void 0 ? void 0 : _g.enTitle) !== null && _h !== void 0 ? _h : 'Shop Now'))))));
|
10267
10267
|
})));
|
10268
10268
|
};
|
10269
10269
|
var MultiCommodityComponent = memo(MultiCommodity$1);
|
@@ -13024,8 +13024,9 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
|
|
13024
13024
|
if (!videoSrc)
|
13025
13025
|
return;
|
13026
13026
|
const Hls = window === null || window === void 0 ? void 0 : window.Hls;
|
13027
|
+
let hls = null;
|
13027
13028
|
if (videoSrc.includes('.m3u8') && Hls && Hls.isSupported()) {
|
13028
|
-
|
13029
|
+
hls = new Hls();
|
13029
13030
|
hls.loadSource(videoSrc);
|
13030
13031
|
hls.attachMedia(videoRef);
|
13031
13032
|
hls.on(Hls.Events.MANIFEST_PARSED, function () {
|
@@ -13052,6 +13053,7 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
|
|
13052
13053
|
videoRef === null || videoRef === void 0 ? void 0 : videoRef.addEventListener('canplay', handlePlay);
|
13053
13054
|
videoRef === null || videoRef === void 0 ? void 0 : videoRef.addEventListener('waiting', handleWaiting);
|
13054
13055
|
return () => {
|
13056
|
+
hls.destroy();
|
13055
13057
|
setIsLoadFinish(false);
|
13056
13058
|
dom2 === null || dom2 === void 0 ? void 0 : dom2.appendChild(dom);
|
13057
13059
|
videoRef === null || videoRef === void 0 ? void 0 : videoRef.removeEventListener('loadedmetadata', handleLoadedmetadata);
|