pb-sxp-ui 1.0.74 → 1.0.75

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/pb-ui.js CHANGED
@@ -12959,7 +12959,7 @@ Made in Italy` })));
12959
12959
  * @Author: binruan@chatlabs.com
12960
12960
  * @Date: 2024-01-15 19:03:09
12961
12961
  * @LastEditors: binruan@chatlabs.com
12962
- * @LastEditTime: 2024-05-29 17:41:35
12962
+ * @LastEditTime: 2024-05-30 11:35:35
12963
12963
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
12964
12964
  *
12965
12965
  */
@@ -13137,19 +13137,23 @@ Made in Italy` })));
13137
13137
  document.removeEventListener('visibilitychange', visibleChange);
13138
13138
  };
13139
13139
  }, [activeIndex, bffEventReport, curTime, data, handleH5EnterLink, popupDetailData, isFromHashtag, tempMap]);
13140
+ const tagHeight = React.useMemo(() => {
13141
+ let h = 0;
13142
+ if (tagList.length > 0) {
13143
+ h += 45;
13144
+ if (waterFallData) {
13145
+ h -= 45;
13146
+ }
13147
+ }
13148
+ return h;
13149
+ }, [tagList, waterFallData]);
13140
13150
  const height = React.useMemo(() => {
13141
13151
  let minusHeight = 0;
13142
13152
  if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
13143
13153
  minusHeight += 45;
13144
13154
  }
13145
- if (tagList.length > 0) {
13146
- minusHeight += 45;
13147
- if (waterFallData) {
13148
- minusHeight -= 45;
13149
- }
13150
- }
13151
- return containerHeight - minusHeight;
13152
- }, [globalConfig, containerHeight, tagList, waterFallData]);
13155
+ return containerHeight - minusHeight - tagHeight;
13156
+ }, [globalConfig, containerHeight, tagHeight]);
13153
13157
  const renderLogo = React.useMemo(() => {
13154
13158
  if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
13155
13159
  return (React.createElement("div", { className: 'clc-sxp-logo-banner', style: { backgroundColor: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.color } },
@@ -13209,10 +13213,8 @@ Made in Italy` })));
13209
13213
  ((_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' }),
13210
13214
  React.createElement("div", { className: 'clc-sxp-bottom' },
13211
13215
  React.createElement(Nudge, { nudge: nudge }),
13212
- (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA)
13213
- ? (React.createElement("div", { className: 'clc-sxp-bottom-card' },
13214
- React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver })))
13215
- : null,
13216
+ (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' },
13217
+ React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver }))) : null,
13216
13218
  React.createElement("div", null,
13217
13219
  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 }),
13218
13220
  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 })))));
@@ -13362,19 +13364,17 @@ Made in Italy` })));
13362
13364
  React.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } })));
13363
13365
  }
13364
13366
  return visList === null || visList === void 0 ? void 0 : visList.map((rec, index) => {
13365
- return (React.createElement(SwiperSlide, { key: index, virtualIndex: index }, rec && (React.createElement(React.Fragment, null, (rec === null || rec === void 0 ? void 0 : rec.loading)
13366
- ? (React.createElement("div", { style: {
13367
- height,
13368
- width: containerWidth,
13369
- display: 'flex',
13370
- justifyContent: 'center',
13371
- alignItems: 'center'
13372
- } },
13373
- React.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } })))
13374
- : (React.createElement(React.Fragment, null,
13375
- renderContent(rec, index),
13376
- renderBottom(rec, index),
13377
- renderLikeButton(rec, index)))))));
13367
+ 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: {
13368
+ height,
13369
+ width: containerWidth,
13370
+ display: 'flex',
13371
+ justifyContent: 'center',
13372
+ alignItems: 'center'
13373
+ } },
13374
+ React.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } }))) : (React.createElement(React.Fragment, null,
13375
+ renderContent(rec, index),
13376
+ renderBottom(rec, index),
13377
+ renderLikeButton(rec, index)))))));
13378
13378
  });
13379
13379
  }, [containerWidth, data, height, loading, renderBottom, renderContent, visList, loadingImage]);
13380
13380
  const mutedIcon = useIconLink('/pb_static/5beaaa5ce7f3477b99db3838619cc471.png');
@@ -13385,10 +13385,10 @@ Made in Italy` })));
13385
13385
  } })),
13386
13386
  renderLogo,
13387
13387
  React.createElement(Tagbar$1, { tagList: tagList, setActiveIndex: setActiveIndex }),
13388
- isShowFingerTip
13389
- ? (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)}%` } }))
13390
- : null,
13391
- React.createElement(Swiper, { ref: swiperRef, onSlideChange: () => {
13388
+ 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,
13389
+ React.createElement(Swiper, { style: {
13390
+ marginTop: tagHeight
13391
+ }, ref: swiperRef, onSlideChange: () => {
13392
13392
  swiperRef.current.swiper.allowTouchMove = false;
13393
13393
  setTimeout(() => {
13394
13394
  swiperRef.current.swiper.allowTouchMove = true;