pb-sxp-ui 1.6.4 → 1.6.6
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 +28 -24
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +28 -24
- 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 +28 -24
- 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/ExpandableText.js +3 -1
- package/es/core/components/SxpPageRender/Hashtag/index.js +3 -2
- package/es/core/components/SxpPageRender/VideoWidget/index.js +17 -16
- package/es/materials/sxp/template/components/Scroll.d.ts +0 -1
- package/es/materials/sxp/template/components/Scroll.js +2 -2
- package/lib/core/components/SxpPageRender/ExpandableText.js +3 -1
- package/lib/core/components/SxpPageRender/Hashtag/index.js +3 -2
- package/lib/core/components/SxpPageRender/VideoWidget/index.js +17 -16
- package/lib/materials/sxp/template/components/Scroll.d.ts +0 -1
- package/lib/materials/sxp/template/components/Scroll.js +2 -2
- package/package.json +1 -1
package/dist/pb-ui.js
CHANGED
@@ -9075,7 +9075,7 @@
|
|
9075
9075
|
* @Author: binruan@chatlabs.com
|
9076
9076
|
* @Date: 2023-12-26 16:11:34
|
9077
9077
|
* @LastEditors: binruan@chatlabs.com
|
9078
|
-
* @LastEditTime: 2024-
|
9078
|
+
* @LastEditTime: 2024-10-18 14:52:42
|
9079
9079
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\ExpandableText.tsx
|
9080
9080
|
*
|
9081
9081
|
*/
|
@@ -9112,6 +9112,8 @@
|
|
9112
9112
|
}, [text, maxStr, isShowMore]);
|
9113
9113
|
React.useEffect(() => {
|
9114
9114
|
var _a, _b;
|
9115
|
+
if (multiRowCopy === null || multiRowCopy === void 0 ? void 0 : multiRowCopy.current)
|
9116
|
+
multiRowCopy.current.style.display = 'block';
|
9115
9117
|
if (((_a = multiRowCopy === null || multiRowCopy === void 0 ? void 0 : multiRowCopy.current) === null || _a === void 0 ? void 0 : _a.offsetHeight) > ((_b = multiRow === null || multiRow === void 0 ? void 0 : multiRow.current) === null || _b === void 0 ? void 0 : _b.offsetHeight) && isPost) {
|
9116
9118
|
setIsShow(true);
|
9117
9119
|
}
|
@@ -9119,7 +9121,7 @@
|
|
9119
9121
|
setIsShow(false);
|
9120
9122
|
}
|
9121
9123
|
multiRowCopy.current.style.display = 'none';
|
9122
|
-
}, [isPost]);
|
9124
|
+
}, [isPost, text]);
|
9123
9125
|
return (React.createElement("div", { className: className, style: Object.assign(Object.assign({}, style), { transform: 'translate3d(0px, 0px, 0px)' }), hidden: !text || text === '' },
|
9124
9126
|
React.createElement("div", { ref: multiRow, style: {
|
9125
9127
|
overflow: 'hidden',
|
@@ -9183,11 +9185,11 @@
|
|
9183
9185
|
* @Author: binruan@chatlabs.com
|
9184
9186
|
* @Date: 2024-03-20 10:27:32
|
9185
9187
|
* @LastEditors: binruan@chatlabs.com
|
9186
|
-
* @LastEditTime: 2024-10-17
|
9188
|
+
* @LastEditTime: 2024-10-17 18:02:56
|
9187
9189
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\template\components\Scroll.tsx
|
9188
9190
|
*
|
9189
9191
|
*/
|
9190
|
-
const Scroll = ({ children, isPadding = true, style, enableSlideActive = false
|
9192
|
+
const Scroll = ({ children, isPadding = true, style, enableSlideActive = false }) => {
|
9191
9193
|
const ref = React.useRef();
|
9192
9194
|
const { popupDetailData } = useSxpDataSource();
|
9193
9195
|
React.useEffect(() => {
|
@@ -9195,7 +9197,7 @@
|
|
9195
9197
|
if (enableSlideActive)
|
9196
9198
|
(_a = ref === null || ref === void 0 ? void 0 : ref.current) === null || _a === void 0 ? void 0 : _a.swiper.slideTo((_b = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.multiCheckIndex) !== null && _b !== void 0 ? _b : 0);
|
9197
9199
|
}, [popupDetailData, enableSlideActive]);
|
9198
|
-
return (React.createElement(Swiper, { ref: ref, direction: 'horizontal', slidesPerView: 'auto', freeMode: true, mousewheel: true, modules: [freeMode, Scrollbar, Mousewheel], style: Object.assign(
|
9200
|
+
return (React.createElement(Swiper, { ref: ref, direction: 'horizontal', slidesPerView: 'auto', freeMode: true, mousewheel: true, modules: [freeMode, Scrollbar, Mousewheel], style: Object.assign({ padding: isPadding ? '0 12px 0 20px' : 0 }, style) }, children));
|
9199
9201
|
};
|
9200
9202
|
var Scroll$1 = React.memo(Scroll);
|
9201
9203
|
|
@@ -15572,6 +15574,7 @@ Made in Italy` })));
|
|
15572
15574
|
const videoRef = React.useRef();
|
15573
15575
|
const videoId = `pb-cache-video-${index}`;
|
15574
15576
|
const videoEleRef = React.useRef(null);
|
15577
|
+
const hlsRef = React.useRef(null);
|
15575
15578
|
const blur = React.useMemo(() => {
|
15576
15579
|
return (videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.mode) === '2';
|
15577
15580
|
}, [videoPostConfig]);
|
@@ -15750,12 +15753,12 @@ Made in Italy` })));
|
|
15750
15753
|
if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
|
15751
15754
|
return;
|
15752
15755
|
const Hls = window === null || window === void 0 ? void 0 : window.Hls;
|
15753
|
-
let hls = null;
|
15756
|
+
let hls = hlsRef === null || hlsRef === void 0 ? void 0 : hlsRef.current;
|
15754
15757
|
if (videoSrc.includes('.m3u8') && Hls && Hls.isSupported()) {
|
15755
15758
|
hls = new Hls();
|
15756
|
-
hls.loadSource(videoSrc);
|
15757
|
-
hls.attachMedia(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current);
|
15758
|
-
hls.on(Hls.Events.MANIFEST_PARSED, function () {
|
15759
|
+
hls === null || hls === void 0 ? void 0 : hls.loadSource(videoSrc);
|
15760
|
+
hls === null || hls === void 0 ? void 0 : hls.attachMedia(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current);
|
15761
|
+
hls === null || hls === void 0 ? void 0 : hls.on(Hls.Events.MANIFEST_PARSED, function () {
|
15759
15762
|
var _a;
|
15760
15763
|
(_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
|
15761
15764
|
});
|
@@ -15774,23 +15777,23 @@ Made in Italy` })));
|
|
15774
15777
|
(_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.addEventListener('canplay', handlePlay);
|
15775
15778
|
(_k = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _k === void 0 ? void 0 : _k.addEventListener('waiting', handleWaiting);
|
15776
15779
|
return () => {
|
15777
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
15780
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
15778
15781
|
const isPause = (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.paused;
|
15779
15782
|
if (!isPause)
|
15780
15783
|
handlePause();
|
15781
|
-
if (
|
15782
|
-
|
15784
|
+
if (hlsRef === null || hlsRef === void 0 ? void 0 : hlsRef.current)
|
15785
|
+
(_b = hlsRef === null || hlsRef === void 0 ? void 0 : hlsRef.current) === null || _b === void 0 ? void 0 : _b.destroy();
|
15783
15786
|
setIsLoadFinish(false);
|
15784
|
-
(
|
15785
|
-
(
|
15786
|
-
(
|
15787
|
-
(
|
15788
|
-
(
|
15789
|
-
(
|
15790
|
-
(
|
15791
|
-
(
|
15787
|
+
(_c = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _c === void 0 ? void 0 : _c.removeEventListener('loadedmetadata', handleLoadedmetadata);
|
15788
|
+
(_d = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _d === void 0 ? void 0 : _d.removeEventListener('loadeddata', handLoadeddata);
|
15789
|
+
(_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.removeEventListener('play', handleStartPlay);
|
15790
|
+
(_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.removeEventListener('playing', handlePlaying);
|
15791
|
+
(_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.removeEventListener('pause', handlePause);
|
15792
|
+
(_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.removeEventListener('ended', handlePlay);
|
15793
|
+
(_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.removeEventListener('canplay', handlePlay);
|
15794
|
+
(_k = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _k === void 0 ? void 0 : _k.removeEventListener('waiting', handleWaiting);
|
15792
15795
|
};
|
15793
|
-
}, [isActive
|
15796
|
+
}, [isActive]);
|
15794
15797
|
React.useEffect(() => {
|
15795
15798
|
var _a, _b;
|
15796
15799
|
if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || !isLoadFinish)
|
@@ -16061,7 +16064,7 @@ Made in Italy` })));
|
|
16061
16064
|
* @Author: binruan@chatlabs.com
|
16062
16065
|
* @Date: 2024-01-15 19:03:09
|
16063
16066
|
* @LastEditors: binruan@chatlabs.com
|
16064
|
-
* @LastEditTime: 2024-10-17
|
16067
|
+
* @LastEditTime: 2024-10-17 18:02:31
|
16065
16068
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Hashtag\index.tsx
|
16066
16069
|
*
|
16067
16070
|
*/
|
@@ -16099,9 +16102,10 @@ Made in Italy` })));
|
|
16099
16102
|
return (React.createElement("span", { style: { textDecoration: 'underline', cursor: 'pointer', color: '#fff' }, onClick: () => setIsShowMore(!isShowMore) }, isShowMore ? 'show less' : 'show more'));
|
16100
16103
|
}, [isShowMore, tags]);
|
16101
16104
|
return (React.createElement("div", { className: 'clc-sxp-bottom-hashtag', style: {
|
16102
|
-
marginTop: `${(_a = hashTagStyle === null || hashTagStyle === void 0 ? void 0 : hashTagStyle.marginTop) !== null && _a !== void 0 ? _a : 16}px
|
16105
|
+
marginTop: `${(_a = hashTagStyle === null || hashTagStyle === void 0 ? void 0 : hashTagStyle.marginTop) !== null && _a !== void 0 ? _a : 16}px`,
|
16106
|
+
width: hashTagRightMargin
|
16103
16107
|
} },
|
16104
|
-
React.createElement(Scroll$1,
|
16108
|
+
React.createElement(Scroll$1, null, tags === null || tags === void 0 ? void 0 : tags.map((item, index) => (React.createElement(SwiperSlide, { key: index, hidden: !isShowMore ? index >= 6 : false, className: 'clc-sxp-bottom-hashtag-item', style: hashTagStyle, onClick: () => handleClickTag(item), tag: 'button', "aria-label": item },
|
16105
16109
|
React.createElement("div", { dangerouslySetInnerHTML: { __html: setFontForText(`#${item}`, hashTagStyle) } })))))));
|
16106
16110
|
};
|
16107
16111
|
var Hashtag$1 = React.memo(Hashtag);
|