pb-sxp-ui 1.0.54 → 1.0.56

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
@@ -8419,10 +8419,10 @@ const CommodityDetail$1 = (_a) => {
8419
8419
  React.createElement("div", { className: 'pb-commondity-content-title', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title, hidden: !!product && !(product === null || product === void 0 ? void 0 : product.title) }, (_b = product === null || product === void 0 ? void 0 : product.title) !== null && _b !== void 0 ? _b : 'Pendant in Yellow Gold with Diamonds, Medium'),
8420
8420
  React.createElement("div", { className: 'pb-commondity-content-price', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price, hidden: !!product && !(product === null || product === void 0 ? void 0 : product.price) }, priceText),
8421
8421
  React.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
8422
- React.createElement(ExpandableText$1, { foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, onClick: () => setShowModal(true), isPost: isPost, text: (_c = product === null || product === void 0 ? void 0 : product.info) !== null && _c !== void 0 ? _c : `The design inspiration of Tiffany Lock series comes from the power of connection and inclusiveness, and the
8423
- bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
8424
- collection is unisex and is inspired by the padlock pattern found in the Tiffany Antique Collection. This
8425
- necklace features a stylish and eye-catching oval clasp chain decorated with a lock pattern. Crafted from
8422
+ React.createElement(ExpandableText$1, { foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, onClick: () => setShowModal(true), isPost: isPost, text: (_c = product === null || product === void 0 ? void 0 : product.info) !== null && _c !== void 0 ? _c : `The design inspiration of Tiffany Lock series comes from the power of connection and inclusiveness, and the
8423
+ bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
8424
+ collection is unisex and is inspired by the padlock pattern found in the Tiffany Antique Collection. This
8425
+ necklace features a stylish and eye-catching oval clasp chain decorated with a lock pattern. Crafted from
8426
8426
  18-karat gold, this necklace is embellished with hand-set diamonds.`, maxStr: 79, className: 'pb-commondity-content-info', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.info }))));
8427
8427
  };
8428
8428
  const renderBtn = () => {
@@ -8880,7 +8880,7 @@ const CommodityDetailDiroNew$1 = (_a) => {
8880
8880
  const productInfoText = ({ isPost }) => {
8881
8881
  return (React.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
8882
8882
  React.createElement(ExpandableText$1, { isPost: isPost, onClick: () => setShowModal(true), className: 'pb-commondityDiroNew-info', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.info, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (product === null || product === void 0 ? void 0 : product.info) ||
8883
- `Unveiled at the Spring-Summer 2023 fashion show, the Dior Toujours bag is distinguished by a casual and practical design. Crafted in black calfskin with Macrocannage topstitching, it showcases a spacious interior compartment with a matching pouch to organize essentials. Its leather strap closure keeps items secure while the D of the CD Lock closure twists to adjust the sides and enhance the bag's silhouette. The leather handles can be adjusted using the small notches in order to be able to carry the large bag by hand or wear it over the shoulder. CD Lock and strap closures D.I.O.R. charms Removable interior pouch Adjustable leather handles Dust bag included
8883
+ `Unveiled at the Spring-Summer 2023 fashion show, the Dior Toujours bag is distinguished by a casual and practical design. Crafted in black calfskin with Macrocannage topstitching, it showcases a spacious interior compartment with a matching pouch to organize essentials. Its leather strap closure keeps items secure while the D of the CD Lock closure twists to adjust the sides and enhance the bag's silhouette. The leather handles can be adjusted using the small notches in order to be able to carry the large bag by hand or wear it over the shoulder. CD Lock and strap closures D.I.O.R. charms Removable interior pouch Adjustable leather handles Dust bag included
8884
8884
  Made in Italy` })));
8885
8885
  };
8886
8886
  return (React.createElement("div", { className: 'pb-commondityDiroNew' },
@@ -12672,14 +12672,50 @@ const Nudge = ({ nudge }) => {
12672
12672
  borderRadius: (_f = nudge === null || nudge === void 0 ? void 0 : nudge.borderRadius) !== null && _f !== void 0 ? _f : 4
12673
12673
  } },
12674
12674
  (nudge === null || nudge === void 0 ? void 0 : nudge.icon) ? React.createElement("img", { src: nudge.icon, style: { height: '100%', objectFit: 'cover' } }) : null,
12675
- React.createElement("p", { style: Object.assign({}, nudge === null || nudge === void 0 ? void 0 : nudge.textStyle) }, (_g = nudge === null || nudge === void 0 ? void 0 : nudge.content) !== null && _g !== void 0 ? _g : '')))));
12675
+ React.createElement("p", { style: Object.assign(Object.assign({}, nudge === null || nudge === void 0 ? void 0 : nudge.textStyle), { textWrap: 'nowrap', textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap' }) }, (_g = nudge === null || nudge === void 0 ? void 0 : nudge.content) !== null && _g !== void 0 ? _g : '')))));
12676
12676
  };
12677
12677
 
12678
+ const DEFAULT_TAG = 'FOR U';
12679
+ const Tagbar = ({ tagList = [], setActiveIndex }) => {
12680
+ const [selectTag, setSelectTag] = useState(DEFAULT_TAG);
12681
+ const { getRecommendVideos, setRtcList, setCacheRtcList, setCacheActiveIndex, setLoading, swiperRef } = useSxpDataSource();
12682
+ const realTagList = useMemo(() => {
12683
+ return [DEFAULT_TAG, ...tagList];
12684
+ }, [tagList]);
12685
+ const handleSelectTag = (tag) => () => {
12686
+ if (tag === selectTag)
12687
+ return;
12688
+ let hashTag;
12689
+ if (tag !== DEFAULT_TAG) {
12690
+ hashTag = tag;
12691
+ }
12692
+ setLoading === null || setLoading === void 0 ? void 0 : setLoading(true);
12693
+ getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({ hashTag }).then((res) => {
12694
+ var _a, _b, _c, _d;
12695
+ setRtcList === null || setRtcList === void 0 ? void 0 : setRtcList((_a = res === null || res === void 0 ? void 0 : res.recList) !== null && _a !== void 0 ? _a : []);
12696
+ setCacheRtcList === null || setCacheRtcList === void 0 ? void 0 : setCacheRtcList((_b = res === null || res === void 0 ? void 0 : res.recList) !== null && _b !== void 0 ? _b : []);
12697
+ setActiveIndex === null || setActiveIndex === void 0 ? void 0 : setActiveIndex(0);
12698
+ setCacheActiveIndex === null || setCacheActiveIndex === void 0 ? void 0 : setCacheActiveIndex(0);
12699
+ (_d = (_c = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _c === void 0 ? void 0 : _c.swiper) === null || _d === void 0 ? void 0 : _d.slideTo(0);
12700
+ }).finally(() => {
12701
+ setLoading === null || setLoading === void 0 ? void 0 : setLoading(false);
12702
+ });
12703
+ setSelectTag(tag);
12704
+ };
12705
+ if (tagList.length <= 0)
12706
+ return null;
12707
+ return (React.createElement("div", { className: 'clc-sxp-tagbar' },
12708
+ React.createElement("ul", { className: 'clc-sxp-tagbar-list', style: { margin: 'auto', gap: 24 } }, realTagList.map((tag) => {
12709
+ return (React.createElement("li", { className: `clc-sxp-tagbar-list-item ${tag === selectTag ? 'clc-sxp-tagbar-list-item-active' : ''}`, key: tag, onClick: handleSelectTag(tag) }, tag));
12710
+ }))));
12711
+ };
12712
+ var Tagbar$1 = memo(Tagbar);
12713
+
12678
12714
  /*
12679
12715
  * @Author: binruan@chatlabs.com
12680
12716
  * @Date: 2024-01-15 19:03:09
12681
12717
  * @LastEditors: binruan@chatlabs.com
12682
- * @LastEditTime: 2024-05-07 17:16:06
12718
+ * @LastEditTime: 2024-05-09 16:23:59
12683
12719
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
12684
12720
  *
12685
12721
  */
@@ -12856,9 +12892,9 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12856
12892
  if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
12857
12893
  minusHeight += 45;
12858
12894
  }
12859
- // if (tagList.length > 0) {
12860
- // minusHeight += 45;
12861
- // }
12895
+ if (tagList.length > 0) {
12896
+ minusHeight += 45;
12897
+ }
12862
12898
  return containerHeight - minusHeight;
12863
12899
  }, [globalConfig, containerHeight, tagList]);
12864
12900
  const renderLogo = useMemo(() => {
@@ -13088,6 +13124,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
13088
13124
  setOpenHashtag === null || setOpenHashtag === void 0 ? void 0 : setOpenHashtag(true);
13089
13125
  } })),
13090
13126
  renderLogo,
13127
+ React.createElement(Tagbar$1, { tagList: tagList, setActiveIndex: setActiveIndex }),
13091
13128
  isShowFingerTip ? React.createElement(FingerSwipeTip, { imageUrl: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipIcon }) : null,
13092
13129
  React.createElement(Swiper, { ref: swiperRef, onSlideChange: () => {
13093
13130
  swiperRef.current.swiper.allowTouchMove = false;
@@ -13148,42 +13185,6 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
13148
13185
  React.createElement("div", { id: 'player-container-id-copy' }))));
13149
13186
  };
13150
13187
 
13151
- const DEFAULT_TAG = 'FOR U';
13152
- const Tagbar = ({ tagList = [], setActiveIndex }) => {
13153
- const [selectTag, setSelectTag] = useState(DEFAULT_TAG);
13154
- const { getRecommendVideos, setRtcList, setCacheRtcList, setCacheActiveIndex, setLoading, swiperRef } = useSxpDataSource();
13155
- const realTagList = useMemo(() => {
13156
- return [DEFAULT_TAG, ...tagList];
13157
- }, [tagList]);
13158
- const handleSelectTag = (tag) => () => {
13159
- if (tag === selectTag)
13160
- return;
13161
- let hashTag;
13162
- if (tag !== DEFAULT_TAG) {
13163
- hashTag = tag;
13164
- }
13165
- setLoading === null || setLoading === void 0 ? void 0 : setLoading(true);
13166
- getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({ hashTag }).then((res) => {
13167
- var _a, _b, _c, _d;
13168
- setRtcList === null || setRtcList === void 0 ? void 0 : setRtcList((_a = res === null || res === void 0 ? void 0 : res.recList) !== null && _a !== void 0 ? _a : []);
13169
- setCacheRtcList === null || setCacheRtcList === void 0 ? void 0 : setCacheRtcList((_b = res === null || res === void 0 ? void 0 : res.recList) !== null && _b !== void 0 ? _b : []);
13170
- setActiveIndex === null || setActiveIndex === void 0 ? void 0 : setActiveIndex(0);
13171
- setCacheActiveIndex === null || setCacheActiveIndex === void 0 ? void 0 : setCacheActiveIndex(0);
13172
- (_d = (_c = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _c === void 0 ? void 0 : _c.swiper) === null || _d === void 0 ? void 0 : _d.slideTo(0);
13173
- }).finally(() => {
13174
- setLoading === null || setLoading === void 0 ? void 0 : setLoading(false);
13175
- });
13176
- setSelectTag(tag);
13177
- };
13178
- if (tagList.length <= 0)
13179
- return null;
13180
- return (React.createElement("div", { className: 'clc-sxp-tagbar' },
13181
- React.createElement("ul", { className: 'clc-sxp-tagbar-list', style: { margin: 'auto', gap: 24 } }, realTagList.map((tag) => {
13182
- return (React.createElement("li", { className: `clc-sxp-tagbar-list-item ${tag === selectTag ? 'clc-sxp-tagbar-list-item-active' : ''}`, key: tag, onClick: handleSelectTag(tag) }, tag));
13183
- }))));
13184
- };
13185
- var Tagbar$1 = memo(Tagbar);
13186
-
13187
13188
  const PictureGroup = ({ imgUrls, width, height, imgUrlsPostConfig, rec, index }) => {
13188
13189
  return (React.createElement(Swiper, { defaultValue: 0, direction: 'horizontal', modules: [Pagination, Autoplay], pagination: { clickable: true, bulletActiveClass: 'swipe-item-active-bullet' }, height: height, style: { width }, loop: true, autoplay: false }, imgUrls === null || imgUrls === void 0 ? void 0 : imgUrls.map((url) => {
13189
13190
  return (React.createElement(SwiperSlide, { key: url },