pb-sxp-ui 1.0.74 → 1.0.76
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 +30 -30
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +7 -3
- package/dist/index.js +30 -30
- 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 +30 -30
- 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 +29 -29
- package/lib/core/components/SxpPageRender/index.js +29 -29
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
@@ -12967,7 +12967,7 @@ var Tagbar$1 = React.memo(Tagbar);
|
|
12967
12967
|
* @Author: binruan@chatlabs.com
|
12968
12968
|
* @Date: 2024-01-15 19:03:09
|
12969
12969
|
* @LastEditors: binruan@chatlabs.com
|
12970
|
-
* @LastEditTime: 2024-05-
|
12970
|
+
* @LastEditTime: 2024-05-30 11:35:35
|
12971
12971
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
|
12972
12972
|
*
|
12973
12973
|
*/
|
@@ -13145,19 +13145,23 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
13145
13145
|
document.removeEventListener('visibilitychange', visibleChange);
|
13146
13146
|
};
|
13147
13147
|
}, [activeIndex, bffEventReport, curTime, data, handleH5EnterLink, popupDetailData, isFromHashtag, tempMap]);
|
13148
|
+
const tagHeight = React.useMemo(() => {
|
13149
|
+
let h = 0;
|
13150
|
+
if (tagList.length > 0) {
|
13151
|
+
h += 45;
|
13152
|
+
if (waterFallData) {
|
13153
|
+
h -= 45;
|
13154
|
+
}
|
13155
|
+
}
|
13156
|
+
return h;
|
13157
|
+
}, [tagList, waterFallData]);
|
13148
13158
|
const height = React.useMemo(() => {
|
13149
13159
|
let minusHeight = 0;
|
13150
13160
|
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
|
13151
13161
|
minusHeight += 45;
|
13152
13162
|
}
|
13153
|
-
|
13154
|
-
|
13155
|
-
if (waterFallData) {
|
13156
|
-
minusHeight -= 45;
|
13157
|
-
}
|
13158
|
-
}
|
13159
|
-
return containerHeight - minusHeight;
|
13160
|
-
}, [globalConfig, containerHeight, tagList, waterFallData]);
|
13163
|
+
return containerHeight - minusHeight - tagHeight;
|
13164
|
+
}, [globalConfig, containerHeight, tagHeight]);
|
13161
13165
|
const renderLogo = React.useMemo(() => {
|
13162
13166
|
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
|
13163
13167
|
return (React.createElement("div", { className: 'clc-sxp-logo-banner', style: { backgroundColor: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.color } },
|
@@ -13217,10 +13221,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
13217
13221
|
((_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' }),
|
13218
13222
|
React.createElement("div", { className: 'clc-sxp-bottom' },
|
13219
13223
|
React.createElement(Nudge, { nudge: nudge }),
|
13220
|
-
(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA)
|
13221
|
-
|
13222
|
-
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver })))
|
13223
|
-
: null,
|
13224
|
+
(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' },
|
13225
|
+
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver }))) : null,
|
13224
13226
|
React.createElement("div", null,
|
13225
13227
|
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: (_c = (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : '', 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 }),
|
13226
13228
|
React.createElement(Hashtag$1, { index: activeIndex, tags: (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.hashTags) !== null && _e !== void 0 ? _e : [], itemId: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.itemId, itemType: ((_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.itemId) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle })))));
|
@@ -13370,19 +13372,17 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
13370
13372
|
React.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } })));
|
13371
13373
|
}
|
13372
13374
|
return visList === null || visList === void 0 ? void 0 : visList.map((rec, index) => {
|
13373
|
-
return (React.createElement(SwiperSlide, { key: index, virtualIndex: index }, rec && (React.createElement(React.Fragment, null, (rec === null || rec === void 0 ? void 0 : rec.loading)
|
13374
|
-
|
13375
|
-
|
13376
|
-
|
13377
|
-
|
13378
|
-
|
13379
|
-
|
13380
|
-
|
13381
|
-
|
13382
|
-
|
13383
|
-
|
13384
|
-
renderBottom(rec, index),
|
13385
|
-
renderLikeButton(rec, index)))))));
|
13375
|
+
return (React.createElement(SwiperSlide, { key: index, virtualIndex: index }, rec && (React.createElement(React.Fragment, null, (rec === null || rec === void 0 ? void 0 : rec.loading) ? (React.createElement("div", { style: {
|
13376
|
+
height,
|
13377
|
+
width: containerWidth,
|
13378
|
+
display: 'flex',
|
13379
|
+
justifyContent: 'center',
|
13380
|
+
alignItems: 'center'
|
13381
|
+
} },
|
13382
|
+
React.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } }))) : (React.createElement(React.Fragment, null,
|
13383
|
+
renderContent(rec, index),
|
13384
|
+
renderBottom(rec, index),
|
13385
|
+
renderLikeButton(rec, index)))))));
|
13386
13386
|
});
|
13387
13387
|
}, [containerWidth, data, height, loading, renderBottom, renderContent, visList, loadingImage]);
|
13388
13388
|
const mutedIcon = useIconLink('/pb_static/5beaaa5ce7f3477b99db3838619cc471.png');
|
@@ -13393,10 +13393,10 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
13393
13393
|
} })),
|
13394
13394
|
renderLogo,
|
13395
13395
|
React.createElement(Tagbar$1, { tagList: tagList, setActiveIndex: setActiveIndex }),
|
13396
|
-
isShowFingerTip
|
13397
|
-
|
13398
|
-
|
13399
|
-
|
13396
|
+
isShowFingerTip ? (React.createElement(FingerSwipeTip, { imageUrl: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipIcon, style: { top: `${50 + ((_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipOffset) !== null && _a !== void 0 ? _a : 0)}%` } })) : null,
|
13397
|
+
React.createElement(Swiper, { style: {
|
13398
|
+
marginTop: tagHeight
|
13399
|
+
}, ref: swiperRef, onSlideChange: () => {
|
13400
13400
|
swiperRef.current.swiper.allowTouchMove = false;
|
13401
13401
|
setTimeout(() => {
|
13402
13402
|
swiperRef.current.swiper.allowTouchMove = true;
|