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.cjs CHANGED
@@ -8608,7 +8608,7 @@ var Modal$1 = React.memo(Modal);
8608
8608
  * @Author: binruan@chatlabs.com
8609
8609
  * @Date: 2023-12-26 16:11:34
8610
8610
  * @LastEditors: binruan@chatlabs.com
8611
- * @LastEditTime: 2024-06-26 18:22:30
8611
+ * @LastEditTime: 2024-06-28 15:17:10
8612
8612
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\ExpandableText.tsx
8613
8613
  *
8614
8614
  */
@@ -8663,7 +8663,9 @@ const ExpandableText = ({ text, maxStr = 108, style, className, onClick, foldTex
8663
8663
  wordBreak: 'break-word'
8664
8664
  }, dangerouslySetInnerHTML: { __html: setFontForText(text === null || text === void 0 ? void 0 : text.replace(/\n/g, '</br>'), style) } }),
8665
8665
  React.createElement("div", { ref: multiRowCopy, dangerouslySetInnerHTML: { __html: setFontForText(text === null || text === void 0 ? void 0 : text.replace(/\n/g, '</br>'), style) } }),
8666
- 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'))));
8666
+ text && isPost && isShow && (React.createElement("span", { style: { textDecoration: 'underline', cursor: 'pointer' }, onClick: onClick !== null && onClick !== void 0 ? onClick : handleClick, dangerouslySetInnerHTML: {
8667
+ __html: setFontForText(isShowMore ? unfoldText || 'show less' : foldText || 'show more', style)
8668
+ } }))));
8667
8669
  };
8668
8670
  var ExpandableText$1 = React.memo(ExpandableText);
8669
8671
 
@@ -8793,9 +8795,10 @@ const CommodityDetail$1 = (_a) => {
8793
8795
  };
8794
8796
  const renderBtn = () => {
8795
8797
  var _a, _b;
8796
- 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: {
8797
- __html: setFontForText((_b = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _b !== void 0 ? _b : 'Purchase on Website', buttonStyle)
8798
- } }))));
8798
+ 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 },
8799
+ React.createElement("span", { dangerouslySetInnerHTML: {
8800
+ __html: setFontForText((_b = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _b !== void 0 ? _b : 'Purchase on Website', buttonStyle)
8801
+ } })))));
8799
8802
  };
8800
8803
  const getStyle = React.useCallback((style) => {
8801
8804
  if (style === null || style === void 0 ? void 0 : style.lineClamp) {
@@ -9424,9 +9427,10 @@ Made in Italy` })));
9424
9427
  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: {
9425
9428
  __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)
9426
9429
  } }))),
9427
- (!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: {
9428
- __html: setFontForText((_p = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _p !== void 0 ? _p : 'Shop now', buttonStyle)
9429
- } })),
9430
+ (!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 },
9431
+ React.createElement("span", { dangerouslySetInnerHTML: {
9432
+ __html: setFontForText((_p = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _p !== void 0 ? _p : 'Shop now', buttonStyle)
9433
+ } }))),
9430
9434
  productInfoText({ isPost }))),
9431
9435
  React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) }, productInfoText({ isPost: false }))));
9432
9436
  };
@@ -13734,11 +13738,11 @@ const Nudge = ({ nudge }) => {
13734
13738
  * @Author: binruan@chatlabs.com
13735
13739
  * @Date: 2024-04-29 16:32:21
13736
13740
  * @LastEditors: binruan@chatlabs.com
13737
- * @LastEditTime: 2024-06-20 10:53:08
13741
+ * @LastEditTime: 2024-06-28 18:03:50
13738
13742
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Tagbar.tsx
13739
13743
  *
13740
13744
  */
13741
- const Tagbar = ({ tagList = [], setActiveIndex }) => {
13745
+ const Tagbar = ({ tagList = [], setActiveIndex, style }) => {
13742
13746
  const { getRecommendVideos, setRtcList, setCacheRtcList, setCacheActiveIndex, setLoading, swiperRef, waterFallData, bffEventReport, selectTag, setSelectTag } = useSxpDataSource();
13743
13747
  const { backMainFeed } = useEventReport();
13744
13748
  const realTagList = React.useMemo(() => {
@@ -13779,7 +13783,7 @@ const Tagbar = ({ tagList = [], setActiveIndex }) => {
13779
13783
  };
13780
13784
  if (waterFallData || tagList.length <= 0)
13781
13785
  return null;
13782
- return (React.createElement("div", { className: 'clc-sxp-tagbar' },
13786
+ return (React.createElement("div", { className: 'clc-sxp-tagbar', style: style },
13783
13787
  React.createElement("ul", { className: 'clc-sxp-tagbar-list', style: { margin: 'auto', gap: 24 } }, realTagList.map((tag) => {
13784
13788
  return (React.createElement("li", { className: `clc-sxp-tagbar-list-item ${tag === selectTag ? 'clc-sxp-tagbar-list-item-active' : ''}`, key: tag, onClick: handleSelectTag(tag) }, tag));
13785
13789
  }))));
@@ -13790,7 +13794,7 @@ var Tagbar$1 = React.memo(Tagbar);
13790
13794
  * @Author: binruan@chatlabs.com
13791
13795
  * @Date: 2024-01-15 19:03:09
13792
13796
  * @LastEditors: binruan@chatlabs.com
13793
- * @LastEditTime: 2024-06-27 15:47:52
13797
+ * @LastEditTime: 2024-06-28 14:53:42
13794
13798
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
13795
13799
  *
13796
13800
  */
@@ -13944,11 +13948,14 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
13944
13948
  }
13945
13949
  return h;
13946
13950
  }, [tagList, waterFallData]);
13947
- const height = React.useMemo(() => {
13951
+ const minusHeight = React.useMemo(() => {
13948
13952
  let minusHeight = 0;
13949
13953
  if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
13950
13954
  minusHeight += 45;
13951
13955
  }
13956
+ return minusHeight;
13957
+ }, []);
13958
+ const height = React.useMemo(() => {
13952
13959
  return containerHeight - minusHeight - tagHeight;
13953
13960
  }, [globalConfig, containerHeight, tagHeight]);
13954
13961
  const renderLogo = React.useMemo(() => {
@@ -14185,7 +14192,9 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
14185
14192
  setOpenHashtag === null || setOpenHashtag === void 0 ? void 0 : setOpenHashtag(true);
14186
14193
  } })),
14187
14194
  renderLogo,
14188
- React.createElement(Tagbar$1, { tagList: tagList, setActiveIndex: setActiveIndex }),
14195
+ React.createElement(Tagbar$1, { tagList: tagList, setActiveIndex: setActiveIndex, style: {
14196
+ top: minusHeight
14197
+ } }),
14189
14198
  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,
14190
14199
  React.createElement(Swiper, { style: {
14191
14200
  marginTop: tagHeight