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/pb-ui.js CHANGED
@@ -9676,7 +9676,7 @@ Made in Italy` })));
9676
9676
  * @Author: binruan@chatlabs.com
9677
9677
  * @Date: 2024-01-16 14:50:13
9678
9678
  * @LastEditors: binruan@chatlabs.com
9679
- * @LastEditTime: 2024-06-21 16:34:48
9679
+ * @LastEditTime: 2024-06-24 15:41:25
9680
9680
  * @FilePath: \pb-sxp-ui\src\materials\sxp\template\components\Img.tsx
9681
9681
  *
9682
9682
  */
@@ -9693,7 +9693,7 @@ Made in Italy` })));
9693
9693
  }
9694
9694
  }, [isOnScreen, src, ref, rec, ctaEvent, item, index]);
9695
9695
  const imgSrc = React.useMemo(() => {
9696
- return (src === null || src === void 0 ? void 0 : src.includes('.avif')) ? src : `${src}?imrquality/rquality/40`;
9696
+ return (src === null || src === void 0 ? void 0 : src.includes('.avif')) ? src : `${src}?imrquality/rquality/20`;
9697
9697
  }, [src]);
9698
9698
  return (React.createElement("div", { className: css.css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, imgStyle)) },
9699
9699
  React.createElement("div", { ref: ref, hidden: !src, className: css.css({ width: '100%', height: '100%' }) },
@@ -10267,7 +10267,7 @@ Made in Italy` })));
10267
10267
  }
10268
10268
  }, popup === null || popup === void 0 ? void 0 : popup.duration);
10269
10269
  return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item) => {
10270
- var _a, _b, _c, _d, _e, _f, _g;
10270
+ var _a, _b, _c, _d, _e, _f, _g, _h;
10271
10271
  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.css(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item) }),
10272
10272
  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 }),
10273
10273
  React.createElement("div", { className: css.css({
@@ -10279,7 +10279,7 @@ Made in Italy` })));
10279
10279
  overflow: 'hidden'
10280
10280
  }) },
10281
10281
  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'),
10282
- React.createElement("div", { className: css.css(Object.assign({ padding: '2px 7px', textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (_g = (_f = item === null || item === void 0 ? void 0 : item.bindCta) === null || _f === void 0 ? void 0 : _f.enTitle) !== null && _g !== void 0 ? _g : 'Shop Now'))))));
10282
+ React.createElement("div", { className: css.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'))))));
10283
10283
  })));
10284
10284
  };
10285
10285
  var MultiCommodityComponent = React.memo(MultiCommodity$1);
@@ -13040,8 +13040,9 @@ Made in Italy` })));
13040
13040
  if (!videoSrc)
13041
13041
  return;
13042
13042
  const Hls = window === null || window === void 0 ? void 0 : window.Hls;
13043
+ let hls = null;
13043
13044
  if (videoSrc.includes('.m3u8') && Hls && Hls.isSupported()) {
13044
- const hls = new Hls();
13045
+ hls = new Hls();
13045
13046
  hls.loadSource(videoSrc);
13046
13047
  hls.attachMedia(videoRef);
13047
13048
  hls.on(Hls.Events.MANIFEST_PARSED, function () {
@@ -13068,6 +13069,7 @@ Made in Italy` })));
13068
13069
  videoRef === null || videoRef === void 0 ? void 0 : videoRef.addEventListener('canplay', handlePlay);
13069
13070
  videoRef === null || videoRef === void 0 ? void 0 : videoRef.addEventListener('waiting', handleWaiting);
13070
13071
  return () => {
13072
+ hls.destroy();
13071
13073
  setIsLoadFinish(false);
13072
13074
  dom2 === null || dom2 === void 0 ? void 0 : dom2.appendChild(dom);
13073
13075
  videoRef === null || videoRef === void 0 ? void 0 : videoRef.removeEventListener('loadedmetadata', handleLoadedmetadata);