pb-sxp-ui 1.0.105 → 1.1.1
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 +22 -18
- package/dist/index.css +1 -5
- package/dist/index.js +22 -18
- package/dist/index.min.cjs +3 -4
- package/dist/index.min.js +3 -4
- package/dist/pb-ui.js +22 -18
- package/dist/pb-ui.min.js +3 -4
- package/es/core/components/SxpPageRender/Hashtag/index.js +3 -1
- package/es/core/components/SxpPageRender/VideoWidget/index.js +10 -11
- package/es/core/components/SxpPageRender/index.d.ts +1 -0
- package/es/core/components/SxpPageRender/index.js +4 -4
- package/lib/core/components/SxpPageRender/Hashtag/index.js +3 -1
- package/lib/core/components/SxpPageRender/VideoWidget/index.js +10 -11
- package/lib/core/components/SxpPageRender/index.d.ts +1 -0
- package/lib/core/components/SxpPageRender/index.js +4 -4
- package/package.json +1 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/index.min.cjs.map +0 -1
- package/dist/index.min.js.map +0 -1
- package/dist/pb-ui.js.map +0 -1
- package/dist/pb-ui.min.js.map +0 -1
package/dist/index.cjs
CHANGED
@@ -13477,20 +13477,23 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
|
|
13477
13477
|
(_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.addEventListener('canplay', handlePlay);
|
13478
13478
|
(_k = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _k === void 0 ? void 0 : _k.addEventListener('waiting', handleWaiting);
|
13479
13479
|
return () => {
|
13480
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
13480
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
13481
|
+
const isPause = (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.paused;
|
13482
|
+
if (!isPause)
|
13483
|
+
handlePause();
|
13481
13484
|
if (hls)
|
13482
13485
|
hls === null || hls === void 0 ? void 0 : hls.destroy();
|
13483
13486
|
setIsLoadFinish(false);
|
13484
|
-
(
|
13485
|
-
(
|
13486
|
-
(
|
13487
|
-
(
|
13488
|
-
(
|
13489
|
-
(
|
13490
|
-
(
|
13491
|
-
(
|
13487
|
+
(_b = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _b === void 0 ? void 0 : _b.removeEventListener('loadedmetadata', handleLoadedmetadata);
|
13488
|
+
(_c = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _c === void 0 ? void 0 : _c.removeEventListener('loadeddata', handLoadeddata);
|
13489
|
+
(_d = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _d === void 0 ? void 0 : _d.removeEventListener('play', handleStartPlay);
|
13490
|
+
(_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.removeEventListener('playing', handlePlaying);
|
13491
|
+
(_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.removeEventListener('pause', handlePause);
|
13492
|
+
(_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.removeEventListener('ended', handlePlay);
|
13493
|
+
(_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.removeEventListener('canplay', handlePlay);
|
13494
|
+
(_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.removeEventListener('waiting', handleWaiting);
|
13492
13495
|
};
|
13493
|
-
}, [isActive, videoId, rec]);
|
13496
|
+
}, [isActive, videoId, rec, handlePause]);
|
13494
13497
|
React.useEffect(() => {
|
13495
13498
|
var _a, _b;
|
13496
13499
|
if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || !isLoadFinish)
|
@@ -13756,11 +13759,12 @@ var PictureGroup$3 = React.memo(PictureGroup$2);
|
|
13756
13759
|
* @Author: binruan@chatlabs.com
|
13757
13760
|
* @Date: 2024-01-15 19:03:09
|
13758
13761
|
* @LastEditors: binruan@chatlabs.com
|
13759
|
-
* @LastEditTime: 2024-
|
13762
|
+
* @LastEditTime: 2024-07-09 18:47:05
|
13760
13763
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Hashtag\index.tsx
|
13761
13764
|
*
|
13762
13765
|
*/
|
13763
13766
|
const Hashtag = ({ tags, itemId, itemType, index, rec, hashTagStyle }) => {
|
13767
|
+
var _a;
|
13764
13768
|
const [isShowMore, setIsShowMore] = React.useState(false);
|
13765
13769
|
const { setWaterFallData, setOpenHashtag, setCacheActiveIndex, waterFallData, setIsFromHashtag } = useSxpDataSource();
|
13766
13770
|
const handleClickTag = (data) => {
|
@@ -13792,7 +13796,8 @@ const Hashtag = ({ tags, itemId, itemType, index, rec, hashTagStyle }) => {
|
|
13792
13796
|
}
|
13793
13797
|
return (React.createElement("span", { style: { textDecoration: 'underline', cursor: 'pointer', color: '#fff' }, onClick: () => setIsShowMore(!isShowMore) }, isShowMore ? 'show less' : 'show more'));
|
13794
13798
|
}, [isShowMore, tags]);
|
13795
|
-
|
13799
|
+
console.log(hashTagStyle, '111');
|
13800
|
+
return (React.createElement("div", { className: 'clc-sxp-bottom-hashtag', style: { marginTop: `${(_a = hashTagStyle === null || hashTagStyle === void 0 ? void 0 : hashTagStyle.marginTop) !== null && _a !== void 0 ? _a : 16}px` } },
|
13796
13801
|
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) },
|
13797
13802
|
React.createElement("div", { dangerouslySetInnerHTML: { __html: setFontForText(`#${item}`, hashTagStyle) } })))))));
|
13798
13803
|
};
|
@@ -13989,7 +13994,7 @@ var Tagbar$1 = React.memo(Tagbar);
|
|
13989
13994
|
* @Author: binruan@chatlabs.com
|
13990
13995
|
* @Date: 2024-01-15 19:03:09
|
13991
13996
|
* @LastEditors: binruan@chatlabs.com
|
13992
|
-
* @LastEditTime: 2024-07-
|
13997
|
+
* @LastEditTime: 2024-07-09 18:11:21
|
13993
13998
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
|
13994
13999
|
*
|
13995
14000
|
*/
|
@@ -14194,17 +14199,17 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
14194
14199
|
};
|
14195
14200
|
}, [isShowMore]);
|
14196
14201
|
const renderBottom = React.useCallback((rec, index) => {
|
14197
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
14202
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
14198
14203
|
if (rec === null || rec === void 0 ? void 0 : rec.video) {
|
14199
14204
|
return (React.createElement(React.Fragment, null,
|
14200
14205
|
((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.title) && !isShowMore && React.createElement("div", { className: 'clc-sxp-bottom-shadow' }),
|
14201
|
-
React.createElement("div", { className: 'clc-sxp-bottom' },
|
14206
|
+
React.createElement("div", { className: 'clc-sxp-bottom', style: { paddingBottom: `${(_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.bottomInfoDist) !== null && _b !== void 0 ? _b : 40}px` } },
|
14202
14207
|
React.createElement(Nudge, { nudge: nudge }),
|
14203
14208
|
(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) ? (React.createElement("div", { className: 'clc-sxp-bottom-card' },
|
14204
14209
|
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver }))) : null,
|
14205
14210
|
React.createElement("div", null,
|
14206
|
-
React.createElement(ExpandableText$1, { className: 'clc-sxp-bottom-text', isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (
|
14207
|
-
React.createElement(Hashtag$1, { index: activeIndex, tags: (
|
14211
|
+
React.createElement(ExpandableText$1, { className: 'clc-sxp-bottom-text', isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_d = (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.title) !== null && _d !== void 0 ? _d : '', style: Object.assign(Object.assign({}, descStyle), { textShadow: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isOpenTextShadow) ? '2px 2px 4px rgba(0, 0, 0, 0.5)' : 'none' }), onChange: onExpandableChange }),
|
14212
|
+
React.createElement(Hashtag$1, { index: activeIndex, tags: (_f = (_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.hashTags) !== null && _f !== void 0 ? _f : [], itemId: (_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.itemId, itemType: ((_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.itemId) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle })))));
|
14208
14213
|
}
|
14209
14214
|
return null;
|
14210
14215
|
}, [
|
@@ -14936,4 +14941,3 @@ exports.core = index$2;
|
|
14936
14941
|
exports.default = Pagebuilder;
|
14937
14942
|
exports.materials = _materials_;
|
14938
14943
|
exports.useEditorDataProvider = useEditorDataProvider;
|
14939
|
-
//# sourceMappingURL=index.cjs.map
|
package/dist/index.css
CHANGED
@@ -1594,7 +1594,7 @@ button.swiper-pagination-bullet {
|
|
1594
1594
|
bottom: 0;
|
1595
1595
|
left: 0;
|
1596
1596
|
right: 0;
|
1597
|
-
padding: 20px
|
1597
|
+
padding-top: 20px;
|
1598
1598
|
}
|
1599
1599
|
.clc-sxp-bottom-nudge {
|
1600
1600
|
display: -webkit-box;
|
@@ -1617,9 +1617,6 @@ button.swiper-pagination-bullet {
|
|
1617
1617
|
padding: 0 20px;
|
1618
1618
|
font-size: 14px;
|
1619
1619
|
}
|
1620
|
-
.clc-sxp-bottom-hashtag {
|
1621
|
-
margin-top: 16px;
|
1622
|
-
}
|
1623
1620
|
.clc-sxp-bottom-hashtag-item {
|
1624
1621
|
width: auto;
|
1625
1622
|
height: 26px;
|
@@ -1630,7 +1627,6 @@ button.swiper-pagination-bullet {
|
|
1630
1627
|
padding: 0 10px;
|
1631
1628
|
font-size: 10px;
|
1632
1629
|
margin-right: 8px;
|
1633
|
-
margin-bottom: 20px;
|
1634
1630
|
cursor: pointer;
|
1635
1631
|
}
|
1636
1632
|
.clc-sxp-bottom-shadow {
|
package/dist/index.js
CHANGED
@@ -13455,20 +13455,23 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
|
|
13455
13455
|
(_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.addEventListener('canplay', handlePlay);
|
13456
13456
|
(_k = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _k === void 0 ? void 0 : _k.addEventListener('waiting', handleWaiting);
|
13457
13457
|
return () => {
|
13458
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
13458
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
13459
|
+
const isPause = (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.paused;
|
13460
|
+
if (!isPause)
|
13461
|
+
handlePause();
|
13459
13462
|
if (hls)
|
13460
13463
|
hls === null || hls === void 0 ? void 0 : hls.destroy();
|
13461
13464
|
setIsLoadFinish(false);
|
13462
|
-
(
|
13463
|
-
(
|
13464
|
-
(
|
13465
|
-
(
|
13466
|
-
(
|
13467
|
-
(
|
13468
|
-
(
|
13469
|
-
(
|
13465
|
+
(_b = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _b === void 0 ? void 0 : _b.removeEventListener('loadedmetadata', handleLoadedmetadata);
|
13466
|
+
(_c = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _c === void 0 ? void 0 : _c.removeEventListener('loadeddata', handLoadeddata);
|
13467
|
+
(_d = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _d === void 0 ? void 0 : _d.removeEventListener('play', handleStartPlay);
|
13468
|
+
(_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.removeEventListener('playing', handlePlaying);
|
13469
|
+
(_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.removeEventListener('pause', handlePause);
|
13470
|
+
(_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.removeEventListener('ended', handlePlay);
|
13471
|
+
(_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.removeEventListener('canplay', handlePlay);
|
13472
|
+
(_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.removeEventListener('waiting', handleWaiting);
|
13470
13473
|
};
|
13471
|
-
}, [isActive, videoId, rec]);
|
13474
|
+
}, [isActive, videoId, rec, handlePause]);
|
13472
13475
|
useEffect(() => {
|
13473
13476
|
var _a, _b;
|
13474
13477
|
if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || !isLoadFinish)
|
@@ -13734,11 +13737,12 @@ var PictureGroup$3 = memo(PictureGroup$2);
|
|
13734
13737
|
* @Author: binruan@chatlabs.com
|
13735
13738
|
* @Date: 2024-01-15 19:03:09
|
13736
13739
|
* @LastEditors: binruan@chatlabs.com
|
13737
|
-
* @LastEditTime: 2024-
|
13740
|
+
* @LastEditTime: 2024-07-09 18:47:05
|
13738
13741
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Hashtag\index.tsx
|
13739
13742
|
*
|
13740
13743
|
*/
|
13741
13744
|
const Hashtag = ({ tags, itemId, itemType, index, rec, hashTagStyle }) => {
|
13745
|
+
var _a;
|
13742
13746
|
const [isShowMore, setIsShowMore] = useState(false);
|
13743
13747
|
const { setWaterFallData, setOpenHashtag, setCacheActiveIndex, waterFallData, setIsFromHashtag } = useSxpDataSource();
|
13744
13748
|
const handleClickTag = (data) => {
|
@@ -13770,7 +13774,8 @@ const Hashtag = ({ tags, itemId, itemType, index, rec, hashTagStyle }) => {
|
|
13770
13774
|
}
|
13771
13775
|
return (React.createElement("span", { style: { textDecoration: 'underline', cursor: 'pointer', color: '#fff' }, onClick: () => setIsShowMore(!isShowMore) }, isShowMore ? 'show less' : 'show more'));
|
13772
13776
|
}, [isShowMore, tags]);
|
13773
|
-
|
13777
|
+
console.log(hashTagStyle, '111');
|
13778
|
+
return (React.createElement("div", { className: 'clc-sxp-bottom-hashtag', style: { marginTop: `${(_a = hashTagStyle === null || hashTagStyle === void 0 ? void 0 : hashTagStyle.marginTop) !== null && _a !== void 0 ? _a : 16}px` } },
|
13774
13779
|
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) },
|
13775
13780
|
React.createElement("div", { dangerouslySetInnerHTML: { __html: setFontForText(`#${item}`, hashTagStyle) } })))))));
|
13776
13781
|
};
|
@@ -13967,7 +13972,7 @@ var Tagbar$1 = memo(Tagbar);
|
|
13967
13972
|
* @Author: binruan@chatlabs.com
|
13968
13973
|
* @Date: 2024-01-15 19:03:09
|
13969
13974
|
* @LastEditors: binruan@chatlabs.com
|
13970
|
-
* @LastEditTime: 2024-07-
|
13975
|
+
* @LastEditTime: 2024-07-09 18:11:21
|
13971
13976
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
|
13972
13977
|
*
|
13973
13978
|
*/
|
@@ -14172,17 +14177,17 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
14172
14177
|
};
|
14173
14178
|
}, [isShowMore]);
|
14174
14179
|
const renderBottom = useCallback((rec, index) => {
|
14175
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
14180
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
14176
14181
|
if (rec === null || rec === void 0 ? void 0 : rec.video) {
|
14177
14182
|
return (React.createElement(React.Fragment, null,
|
14178
14183
|
((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.title) && !isShowMore && React.createElement("div", { className: 'clc-sxp-bottom-shadow' }),
|
14179
|
-
React.createElement("div", { className: 'clc-sxp-bottom' },
|
14184
|
+
React.createElement("div", { className: 'clc-sxp-bottom', style: { paddingBottom: `${(_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.bottomInfoDist) !== null && _b !== void 0 ? _b : 40}px` } },
|
14180
14185
|
React.createElement(Nudge, { nudge: nudge }),
|
14181
14186
|
(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) ? (React.createElement("div", { className: 'clc-sxp-bottom-card' },
|
14182
14187
|
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver }))) : null,
|
14183
14188
|
React.createElement("div", null,
|
14184
|
-
React.createElement(ExpandableText$1, { className: 'clc-sxp-bottom-text', isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (
|
14185
|
-
React.createElement(Hashtag$1, { index: activeIndex, tags: (
|
14189
|
+
React.createElement(ExpandableText$1, { className: 'clc-sxp-bottom-text', isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_d = (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.title) !== null && _d !== void 0 ? _d : '', style: Object.assign(Object.assign({}, descStyle), { textShadow: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isOpenTextShadow) ? '2px 2px 4px rgba(0, 0, 0, 0.5)' : 'none' }), onChange: onExpandableChange }),
|
14190
|
+
React.createElement(Hashtag$1, { index: activeIndex, tags: (_f = (_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.hashTags) !== null && _f !== void 0 ? _f : [], itemId: (_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.itemId, itemType: ((_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.itemId) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle })))));
|
14186
14191
|
}
|
14187
14192
|
return null;
|
14188
14193
|
}, [
|
@@ -14905,4 +14910,3 @@ function useEditorDataProvider() {
|
|
14905
14910
|
*/
|
14906
14911
|
|
14907
14912
|
export { index$1 as DiyPortalPreview, EditorDataProvider, Modal$1 as Modal, SxpDataSourceProvider$1 as SxpDataSourceProvider, index as SxpPageCore, SxpPageRender, index$2 as core, Pagebuilder as default, _materials_ as materials, useEditorDataProvider };
|
14908
|
-
//# sourceMappingURL=index.js.map
|