pb-sxp-ui 1.0.100 → 1.0.101

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.js CHANGED
@@ -8585,7 +8585,7 @@ var Modal$1 = memo(Modal);
8585
8585
  * @Author: binruan@chatlabs.com
8586
8586
  * @Date: 2023-12-26 16:11:34
8587
8587
  * @LastEditors: binruan@chatlabs.com
8588
- * @LastEditTime: 2024-06-26 18:22:30
8588
+ * @LastEditTime: 2024-06-28 15:17:10
8589
8589
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\ExpandableText.tsx
8590
8590
  *
8591
8591
  */
@@ -8640,7 +8640,9 @@ const ExpandableText = ({ text, maxStr = 108, style, className, onClick, foldTex
8640
8640
  wordBreak: 'break-word'
8641
8641
  }, dangerouslySetInnerHTML: { __html: setFontForText(text === null || text === void 0 ? void 0 : text.replace(/\n/g, '</br>'), style) } }),
8642
8642
  React.createElement("div", { ref: multiRowCopy, dangerouslySetInnerHTML: { __html: setFontForText(text === null || text === void 0 ? void 0 : text.replace(/\n/g, '</br>'), style) } }),
8643
- text && isPost && isShow && (React.createElement("span", { style: { textDecoration: 'underline', cursor: 'pointer' }, onClick: onClick !== null && onClick !== void 0 ? onClick : handleClick }, isShowMore ? unfoldText || 'show less' : foldText || 'show more'))));
8643
+ text && isPost && isShow && (React.createElement("span", { style: { textDecoration: 'underline', cursor: 'pointer' }, onClick: onClick !== null && onClick !== void 0 ? onClick : handleClick, dangerouslySetInnerHTML: {
8644
+ __html: setFontForText(isShowMore ? unfoldText || 'show less' : foldText || 'show more', style)
8645
+ } }))));
8644
8646
  };
8645
8647
  var ExpandableText$1 = memo(ExpandableText);
8646
8648
 
@@ -8770,9 +8772,10 @@ const CommodityDetail$1 = (_a) => {
8770
8772
  };
8771
8773
  const renderBtn = () => {
8772
8774
  var _a, _b;
8773
- return (React.createElement(React.Fragment, null, (isDefault || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("button", { "aria-label": (_a = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _a !== void 0 ? _a : 'Purchase on Website', onClick: handleLink, className: 'pb-commondity-btn', style: buttonStyle, dangerouslySetInnerHTML: {
8774
- __html: setFontForText((_b = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _b !== void 0 ? _b : 'Purchase on Website', buttonStyle)
8775
- } }))));
8775
+ return (React.createElement(React.Fragment, null, (isDefault || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("button", { "aria-label": (_a = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _a !== void 0 ? _a : 'Purchase on Website', onClick: handleLink, className: 'pb-commondity-btn', style: buttonStyle },
8776
+ React.createElement("span", { dangerouslySetInnerHTML: {
8777
+ __html: setFontForText((_b = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _b !== void 0 ? _b : 'Purchase on Website', buttonStyle)
8778
+ } })))));
8776
8779
  };
8777
8780
  const getStyle = useCallback((style) => {
8778
8781
  if (style === null || style === void 0 ? void 0 : style.lineClamp) {
@@ -9401,9 +9404,10 @@ Made in Italy` })));
9401
9404
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top-right-price', hidden: !!product && !(product === null || product === void 0 ? void 0 : product.taxInfo), style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.taxInfo), dangerouslySetInnerHTML: {
9402
9405
  __html: setFontForText((_m = product === null || product === void 0 ? void 0 : product.taxInfo) !== null && _m !== void 0 ? _m : '税费', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.taxInfo)
9403
9406
  } }))),
9404
- (!product || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("button", { "aria-label": (_o = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _o !== void 0 ? _o : 'Shop now', onClick: handleLink, className: 'pb-commondityDiroNew-btn', style: buttonStyle, dangerouslySetInnerHTML: {
9405
- __html: setFontForText((_p = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _p !== void 0 ? _p : 'Shop now', buttonStyle)
9406
- } })),
9407
+ (!product || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("button", { "aria-label": (_o = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _o !== void 0 ? _o : 'Shop now', onClick: handleLink, className: 'pb-commondityDiroNew-btn', style: buttonStyle },
9408
+ React.createElement("span", { dangerouslySetInnerHTML: {
9409
+ __html: setFontForText((_p = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _p !== void 0 ? _p : 'Shop now', buttonStyle)
9410
+ } }))),
9407
9411
  productInfoText({ isPost }))),
9408
9412
  React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) }, productInfoText({ isPost: false }))));
9409
9413
  };
@@ -13711,11 +13715,11 @@ const Nudge = ({ nudge }) => {
13711
13715
  * @Author: binruan@chatlabs.com
13712
13716
  * @Date: 2024-04-29 16:32:21
13713
13717
  * @LastEditors: binruan@chatlabs.com
13714
- * @LastEditTime: 2024-06-20 10:53:08
13718
+ * @LastEditTime: 2024-06-28 18:03:50
13715
13719
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Tagbar.tsx
13716
13720
  *
13717
13721
  */
13718
- const Tagbar = ({ tagList = [], setActiveIndex }) => {
13722
+ const Tagbar = ({ tagList = [], setActiveIndex, style }) => {
13719
13723
  const { getRecommendVideos, setRtcList, setCacheRtcList, setCacheActiveIndex, setLoading, swiperRef, waterFallData, bffEventReport, selectTag, setSelectTag } = useSxpDataSource();
13720
13724
  const { backMainFeed } = useEventReport();
13721
13725
  const realTagList = useMemo(() => {
@@ -13756,7 +13760,7 @@ const Tagbar = ({ tagList = [], setActiveIndex }) => {
13756
13760
  };
13757
13761
  if (waterFallData || tagList.length <= 0)
13758
13762
  return null;
13759
- return (React.createElement("div", { className: 'clc-sxp-tagbar' },
13763
+ return (React.createElement("div", { className: 'clc-sxp-tagbar', style: style },
13760
13764
  React.createElement("ul", { className: 'clc-sxp-tagbar-list', style: { margin: 'auto', gap: 24 } }, realTagList.map((tag) => {
13761
13765
  return (React.createElement("li", { className: `clc-sxp-tagbar-list-item ${tag === selectTag ? 'clc-sxp-tagbar-list-item-active' : ''}`, key: tag, onClick: handleSelectTag(tag) }, tag));
13762
13766
  }))));
@@ -13767,7 +13771,7 @@ var Tagbar$1 = memo(Tagbar);
13767
13771
  * @Author: binruan@chatlabs.com
13768
13772
  * @Date: 2024-01-15 19:03:09
13769
13773
  * @LastEditors: binruan@chatlabs.com
13770
- * @LastEditTime: 2024-06-27 15:47:52
13774
+ * @LastEditTime: 2024-06-28 14:53:42
13771
13775
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
13772
13776
  *
13773
13777
  */
@@ -13921,11 +13925,14 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
13921
13925
  }
13922
13926
  return h;
13923
13927
  }, [tagList, waterFallData]);
13924
- const height = useMemo(() => {
13928
+ const minusHeight = useMemo(() => {
13925
13929
  let minusHeight = 0;
13926
13930
  if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
13927
13931
  minusHeight += 45;
13928
13932
  }
13933
+ return minusHeight;
13934
+ }, []);
13935
+ const height = useMemo(() => {
13929
13936
  return containerHeight - minusHeight - tagHeight;
13930
13937
  }, [globalConfig, containerHeight, tagHeight]);
13931
13938
  const renderLogo = useMemo(() => {
@@ -14162,7 +14169,9 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
14162
14169
  setOpenHashtag === null || setOpenHashtag === void 0 ? void 0 : setOpenHashtag(true);
14163
14170
  } })),
14164
14171
  renderLogo,
14165
- React.createElement(Tagbar$1, { tagList: tagList, setActiveIndex: setActiveIndex }),
14172
+ React.createElement(Tagbar$1, { tagList: tagList, setActiveIndex: setActiveIndex, style: {
14173
+ top: minusHeight
14174
+ } }),
14166
14175
  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,
14167
14176
  React.createElement(Swiper, { style: {
14168
14177
  marginTop: tagHeight