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.css CHANGED
@@ -1306,16 +1306,19 @@ button.swiper-pagination-bullet {
1306
1306
  .clc-sxp-tagbar {
1307
1307
  z-index: 8;
1308
1308
  background-color: #fff;
1309
- overflow-x: auto;
1310
1309
  text-align: center;
1311
1310
  height: 45px;
1311
+ overflow-x: auto;
1312
+ position: absolute;
1313
+ top: 0;
1314
+ left: 0;
1315
+ right: 0;
1316
+ scrollbar-width: none;
1312
1317
  }
1313
1318
  .clc-sxp-tagbar-list {
1314
- scrollbar-width: none;
1315
1319
  width: -webkit-fit-content;
1316
1320
  width: -moz-fit-content;
1317
1321
  width: fit-content;
1318
- overflow-y: auto;
1319
1322
  padding: 0 12px;
1320
1323
  margin: 0;
1321
1324
  display: -webkit-box;
@@ -1336,6 +1339,7 @@ button.swiper-pagination-bullet {
1336
1339
  cursor: pointer;
1337
1340
  font-size: 14px;
1338
1341
  text-wrap: nowrap;
1342
+ white-space: nowrap;
1339
1343
  }
1340
1344
  .clc-sxp-tagbar-list-item-active {
1341
1345
  position: relative;
package/dist/index.js CHANGED
@@ -12944,7 +12944,7 @@ var Tagbar$1 = memo(Tagbar);
12944
12944
  * @Author: binruan@chatlabs.com
12945
12945
  * @Date: 2024-01-15 19:03:09
12946
12946
  * @LastEditors: binruan@chatlabs.com
12947
- * @LastEditTime: 2024-05-29 17:41:35
12947
+ * @LastEditTime: 2024-05-30 11:35:35
12948
12948
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
12949
12949
  *
12950
12950
  */
@@ -13122,19 +13122,23 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
13122
13122
  document.removeEventListener('visibilitychange', visibleChange);
13123
13123
  };
13124
13124
  }, [activeIndex, bffEventReport, curTime, data, handleH5EnterLink, popupDetailData, isFromHashtag, tempMap]);
13125
+ const tagHeight = useMemo(() => {
13126
+ let h = 0;
13127
+ if (tagList.length > 0) {
13128
+ h += 45;
13129
+ if (waterFallData) {
13130
+ h -= 45;
13131
+ }
13132
+ }
13133
+ return h;
13134
+ }, [tagList, waterFallData]);
13125
13135
  const height = useMemo(() => {
13126
13136
  let minusHeight = 0;
13127
13137
  if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
13128
13138
  minusHeight += 45;
13129
13139
  }
13130
- if (tagList.length > 0) {
13131
- minusHeight += 45;
13132
- if (waterFallData) {
13133
- minusHeight -= 45;
13134
- }
13135
- }
13136
- return containerHeight - minusHeight;
13137
- }, [globalConfig, containerHeight, tagList, waterFallData]);
13140
+ return containerHeight - minusHeight - tagHeight;
13141
+ }, [globalConfig, containerHeight, tagHeight]);
13138
13142
  const renderLogo = useMemo(() => {
13139
13143
  if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
13140
13144
  return (React.createElement("div", { className: 'clc-sxp-logo-banner', style: { backgroundColor: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.color } },
@@ -13194,10 +13198,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
13194
13198
  ((_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' }),
13195
13199
  React.createElement("div", { className: 'clc-sxp-bottom' },
13196
13200
  React.createElement(Nudge, { nudge: nudge }),
13197
- (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA)
13198
- ? (React.createElement("div", { className: 'clc-sxp-bottom-card' },
13199
- React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver })))
13200
- : null,
13201
+ (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' },
13202
+ React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver }))) : null,
13201
13203
  React.createElement("div", null,
13202
13204
  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 }),
13203
13205
  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 })))));
@@ -13347,19 +13349,17 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
13347
13349
  React.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } })));
13348
13350
  }
13349
13351
  return visList === null || visList === void 0 ? void 0 : visList.map((rec, index) => {
13350
- return (React.createElement(SwiperSlide, { key: index, virtualIndex: index }, rec && (React.createElement(React.Fragment, null, (rec === null || rec === void 0 ? void 0 : rec.loading)
13351
- ? (React.createElement("div", { style: {
13352
- height,
13353
- width: containerWidth,
13354
- display: 'flex',
13355
- justifyContent: 'center',
13356
- alignItems: 'center'
13357
- } },
13358
- React.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } })))
13359
- : (React.createElement(React.Fragment, null,
13360
- renderContent(rec, index),
13361
- renderBottom(rec, index),
13362
- renderLikeButton(rec, index)))))));
13352
+ 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: {
13353
+ height,
13354
+ width: containerWidth,
13355
+ display: 'flex',
13356
+ justifyContent: 'center',
13357
+ alignItems: 'center'
13358
+ } },
13359
+ React.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } }))) : (React.createElement(React.Fragment, null,
13360
+ renderContent(rec, index),
13361
+ renderBottom(rec, index),
13362
+ renderLikeButton(rec, index)))))));
13363
13363
  });
13364
13364
  }, [containerWidth, data, height, loading, renderBottom, renderContent, visList, loadingImage]);
13365
13365
  const mutedIcon = useIconLink('/pb_static/5beaaa5ce7f3477b99db3838619cc471.png');
@@ -13370,10 +13370,10 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
13370
13370
  } })),
13371
13371
  renderLogo,
13372
13372
  React.createElement(Tagbar$1, { tagList: tagList, setActiveIndex: setActiveIndex }),
13373
- isShowFingerTip
13374
- ? (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)}%` } }))
13375
- : null,
13376
- React.createElement(Swiper, { ref: swiperRef, onSlideChange: () => {
13373
+ 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,
13374
+ React.createElement(Swiper, { style: {
13375
+ marginTop: tagHeight
13376
+ }, ref: swiperRef, onSlideChange: () => {
13377
13377
  swiperRef.current.swiper.allowTouchMove = false;
13378
13378
  setTimeout(() => {
13379
13379
  swiperRef.current.swiper.allowTouchMove = true;