pb-sxp-ui 1.0.54 → 1.0.55
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 +41 -40
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +41 -40
- 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 +41 -40
- 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/index.js +5 -0
- package/lib/core/components/SxpPageRender/index.js +5 -0
- package/package.json +1 -1
package/dist/pb-ui.js
CHANGED
@@ -12689,11 +12689,47 @@ Made in Italy` })));
|
|
12689
12689
|
React.createElement("p", { style: Object.assign({}, nudge === null || nudge === void 0 ? void 0 : nudge.textStyle) }, (_g = nudge === null || nudge === void 0 ? void 0 : nudge.content) !== null && _g !== void 0 ? _g : '')))));
|
12690
12690
|
};
|
12691
12691
|
|
12692
|
+
const DEFAULT_TAG = 'FOR U';
|
12693
|
+
const Tagbar = ({ tagList = [], setActiveIndex }) => {
|
12694
|
+
const [selectTag, setSelectTag] = React.useState(DEFAULT_TAG);
|
12695
|
+
const { getRecommendVideos, setRtcList, setCacheRtcList, setCacheActiveIndex, setLoading, swiperRef } = useSxpDataSource();
|
12696
|
+
const realTagList = React.useMemo(() => {
|
12697
|
+
return [DEFAULT_TAG, ...tagList];
|
12698
|
+
}, [tagList]);
|
12699
|
+
const handleSelectTag = (tag) => () => {
|
12700
|
+
if (tag === selectTag)
|
12701
|
+
return;
|
12702
|
+
let hashTag;
|
12703
|
+
if (tag !== DEFAULT_TAG) {
|
12704
|
+
hashTag = tag;
|
12705
|
+
}
|
12706
|
+
setLoading === null || setLoading === void 0 ? void 0 : setLoading(true);
|
12707
|
+
getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({ hashTag }).then((res) => {
|
12708
|
+
var _a, _b, _c, _d;
|
12709
|
+
setRtcList === null || setRtcList === void 0 ? void 0 : setRtcList((_a = res === null || res === void 0 ? void 0 : res.recList) !== null && _a !== void 0 ? _a : []);
|
12710
|
+
setCacheRtcList === null || setCacheRtcList === void 0 ? void 0 : setCacheRtcList((_b = res === null || res === void 0 ? void 0 : res.recList) !== null && _b !== void 0 ? _b : []);
|
12711
|
+
setActiveIndex === null || setActiveIndex === void 0 ? void 0 : setActiveIndex(0);
|
12712
|
+
setCacheActiveIndex === null || setCacheActiveIndex === void 0 ? void 0 : setCacheActiveIndex(0);
|
12713
|
+
(_d = (_c = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _c === void 0 ? void 0 : _c.swiper) === null || _d === void 0 ? void 0 : _d.slideTo(0);
|
12714
|
+
}).finally(() => {
|
12715
|
+
setLoading === null || setLoading === void 0 ? void 0 : setLoading(false);
|
12716
|
+
});
|
12717
|
+
setSelectTag(tag);
|
12718
|
+
};
|
12719
|
+
if (tagList.length <= 0)
|
12720
|
+
return null;
|
12721
|
+
return (React.createElement("div", { className: 'clc-sxp-tagbar' },
|
12722
|
+
React.createElement("ul", { className: 'clc-sxp-tagbar-list', style: { margin: 'auto', gap: 24 } }, realTagList.map((tag) => {
|
12723
|
+
return (React.createElement("li", { className: `clc-sxp-tagbar-list-item ${tag === selectTag ? 'clc-sxp-tagbar-list-item-active' : ''}`, key: tag, onClick: handleSelectTag(tag) }, tag));
|
12724
|
+
}))));
|
12725
|
+
};
|
12726
|
+
var Tagbar$1 = React.memo(Tagbar);
|
12727
|
+
|
12692
12728
|
/*
|
12693
12729
|
* @Author: binruan@chatlabs.com
|
12694
12730
|
* @Date: 2024-01-15 19:03:09
|
12695
12731
|
* @LastEditors: binruan@chatlabs.com
|
12696
|
-
* @LastEditTime: 2024-05-
|
12732
|
+
* @LastEditTime: 2024-05-09 16:23:59
|
12697
12733
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
|
12698
12734
|
*
|
12699
12735
|
*/
|
@@ -12870,9 +12906,9 @@ Made in Italy` })));
|
|
12870
12906
|
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
|
12871
12907
|
minusHeight += 45;
|
12872
12908
|
}
|
12873
|
-
|
12874
|
-
|
12875
|
-
|
12909
|
+
if (tagList.length > 0) {
|
12910
|
+
minusHeight += 45;
|
12911
|
+
}
|
12876
12912
|
return containerHeight - minusHeight;
|
12877
12913
|
}, [globalConfig, containerHeight, tagList]);
|
12878
12914
|
const renderLogo = React.useMemo(() => {
|
@@ -13102,6 +13138,7 @@ Made in Italy` })));
|
|
13102
13138
|
setOpenHashtag === null || setOpenHashtag === void 0 ? void 0 : setOpenHashtag(true);
|
13103
13139
|
} })),
|
13104
13140
|
renderLogo,
|
13141
|
+
React.createElement(Tagbar$1, { tagList: tagList, setActiveIndex: setActiveIndex }),
|
13105
13142
|
isShowFingerTip ? React.createElement(FingerSwipeTip, { imageUrl: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipIcon }) : null,
|
13106
13143
|
React.createElement(Swiper, { ref: swiperRef, onSlideChange: () => {
|
13107
13144
|
swiperRef.current.swiper.allowTouchMove = false;
|
@@ -13162,42 +13199,6 @@ Made in Italy` })));
|
|
13162
13199
|
React.createElement("div", { id: 'player-container-id-copy' }))));
|
13163
13200
|
};
|
13164
13201
|
|
13165
|
-
const DEFAULT_TAG = 'FOR U';
|
13166
|
-
const Tagbar = ({ tagList = [], setActiveIndex }) => {
|
13167
|
-
const [selectTag, setSelectTag] = React.useState(DEFAULT_TAG);
|
13168
|
-
const { getRecommendVideos, setRtcList, setCacheRtcList, setCacheActiveIndex, setLoading, swiperRef } = useSxpDataSource();
|
13169
|
-
const realTagList = React.useMemo(() => {
|
13170
|
-
return [DEFAULT_TAG, ...tagList];
|
13171
|
-
}, [tagList]);
|
13172
|
-
const handleSelectTag = (tag) => () => {
|
13173
|
-
if (tag === selectTag)
|
13174
|
-
return;
|
13175
|
-
let hashTag;
|
13176
|
-
if (tag !== DEFAULT_TAG) {
|
13177
|
-
hashTag = tag;
|
13178
|
-
}
|
13179
|
-
setLoading === null || setLoading === void 0 ? void 0 : setLoading(true);
|
13180
|
-
getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({ hashTag }).then((res) => {
|
13181
|
-
var _a, _b, _c, _d;
|
13182
|
-
setRtcList === null || setRtcList === void 0 ? void 0 : setRtcList((_a = res === null || res === void 0 ? void 0 : res.recList) !== null && _a !== void 0 ? _a : []);
|
13183
|
-
setCacheRtcList === null || setCacheRtcList === void 0 ? void 0 : setCacheRtcList((_b = res === null || res === void 0 ? void 0 : res.recList) !== null && _b !== void 0 ? _b : []);
|
13184
|
-
setActiveIndex === null || setActiveIndex === void 0 ? void 0 : setActiveIndex(0);
|
13185
|
-
setCacheActiveIndex === null || setCacheActiveIndex === void 0 ? void 0 : setCacheActiveIndex(0);
|
13186
|
-
(_d = (_c = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _c === void 0 ? void 0 : _c.swiper) === null || _d === void 0 ? void 0 : _d.slideTo(0);
|
13187
|
-
}).finally(() => {
|
13188
|
-
setLoading === null || setLoading === void 0 ? void 0 : setLoading(false);
|
13189
|
-
});
|
13190
|
-
setSelectTag(tag);
|
13191
|
-
};
|
13192
|
-
if (tagList.length <= 0)
|
13193
|
-
return null;
|
13194
|
-
return (React.createElement("div", { className: 'clc-sxp-tagbar' },
|
13195
|
-
React.createElement("ul", { className: 'clc-sxp-tagbar-list', style: { margin: 'auto', gap: 24 } }, realTagList.map((tag) => {
|
13196
|
-
return (React.createElement("li", { className: `clc-sxp-tagbar-list-item ${tag === selectTag ? 'clc-sxp-tagbar-list-item-active' : ''}`, key: tag, onClick: handleSelectTag(tag) }, tag));
|
13197
|
-
}))));
|
13198
|
-
};
|
13199
|
-
var Tagbar$1 = React.memo(Tagbar);
|
13200
|
-
|
13201
13202
|
const PictureGroup = ({ imgUrls, width, height, imgUrlsPostConfig, rec, index }) => {
|
13202
13203
|
return (React.createElement(Swiper, { defaultValue: 0, direction: 'horizontal', modules: [Pagination, Autoplay], pagination: { clickable: true, bulletActiveClass: 'swipe-item-active-bullet' }, height: height, style: { width }, loop: true, autoplay: false }, imgUrls === null || imgUrls === void 0 ? void 0 : imgUrls.map((url) => {
|
13203
13204
|
return (React.createElement(SwiperSlide, { key: url },
|