pb-sxp-ui 1.6.4 → 1.6.5

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.
@@ -37,9 +37,10 @@ const Hashtag = ({ tags, itemId, itemType, index, rec, hashTagStyle, hashTagRigh
37
37
  return (React.createElement("span", { style: { textDecoration: 'underline', cursor: 'pointer', color: '#fff' }, onClick: () => setIsShowMore(!isShowMore) }, isShowMore ? 'show less' : 'show more'));
38
38
  }, [isShowMore, tags]);
39
39
  return (React.createElement("div", { className: 'clc-sxp-bottom-hashtag', style: {
40
- marginTop: `${(_a = hashTagStyle === null || hashTagStyle === void 0 ? void 0 : hashTagStyle.marginTop) !== null && _a !== void 0 ? _a : 16}px`
40
+ marginTop: `${(_a = hashTagStyle === null || hashTagStyle === void 0 ? void 0 : hashTagStyle.marginTop) !== null && _a !== void 0 ? _a : 16}px`,
41
+ width: hashTagRightMargin
41
42
  } },
42
- React.createElement(Scroll, { width: hashTagRightMargin }, tags === null || tags === void 0 ? void 0 : tags.map((item, index) => (React.createElement(SwiperSlide, { key: index, hidden: !isShowMore ? index >= 6 : false, className: 'clc-sxp-bottom-hashtag-item', style: hashTagStyle, onClick: () => handleClickTag(item), tag: 'button', "aria-label": item },
43
+ React.createElement(Scroll, null, tags === null || tags === void 0 ? void 0 : tags.map((item, index) => (React.createElement(SwiperSlide, { key: index, hidden: !isShowMore ? index >= 6 : false, className: 'clc-sxp-bottom-hashtag-item', style: hashTagStyle, onClick: () => handleClickTag(item), tag: 'button', "aria-label": item },
43
44
  React.createElement("div", { dangerouslySetInnerHTML: { __html: setFontForText(`#${item}`, hashTagStyle) } })))))));
44
45
  };
45
46
  export default memo(Hashtag);
@@ -7,7 +7,6 @@ interface IScrollProps {
7
7
  isPadding?: boolean;
8
8
  style?: CSSProperties;
9
9
  enableSlideActive?: boolean;
10
- width?: number;
11
10
  }
12
11
  declare const _default: React.NamedExoticComponent<IScrollProps>;
13
12
  export default _default;
@@ -5,7 +5,7 @@ import 'swiper/css/free-mode';
5
5
  import 'swiper/css/scrollbar';
6
6
  import { FreeMode, Scrollbar, Mousewheel } from 'swiper/modules';
7
7
  import { useSxpDataSource } from '../../../../core/hooks';
8
- const Scroll = ({ children, isPadding = true, style, enableSlideActive = false, width }) => {
8
+ const Scroll = ({ children, isPadding = true, style, enableSlideActive = false }) => {
9
9
  const ref = useRef();
10
10
  const { popupDetailData } = useSxpDataSource();
11
11
  useEffect(() => {
@@ -13,6 +13,6 @@ const Scroll = ({ children, isPadding = true, style, enableSlideActive = false,
13
13
  if (enableSlideActive)
14
14
  (_a = ref === null || ref === void 0 ? void 0 : ref.current) === null || _a === void 0 ? void 0 : _a.swiper.slideTo((_b = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.multiCheckIndex) !== null && _b !== void 0 ? _b : 0);
15
15
  }, [popupDetailData, enableSlideActive]);
16
- return (React.createElement(Swiper, { ref: ref, direction: 'horizontal', slidesPerView: 'auto', freeMode: true, mousewheel: true, modules: [FreeMode, Scrollbar, Mousewheel], style: Object.assign(Object.assign({ padding: isPadding ? '0 12px 0 20px' : 0 }, style), (width && { width })) }, children));
16
+ return (React.createElement(Swiper, { ref: ref, direction: 'horizontal', slidesPerView: 'auto', freeMode: true, mousewheel: true, modules: [FreeMode, Scrollbar, Mousewheel], style: Object.assign({ padding: isPadding ? '0 12px 0 20px' : 0 }, style) }, children));
17
17
  };
18
18
  export default memo(Scroll);
@@ -40,9 +40,10 @@ const Hashtag = ({ tags, itemId, itemType, index, rec, hashTagStyle, hashTagRigh
40
40
  return (react_1.default.createElement("span", { style: { textDecoration: 'underline', cursor: 'pointer', color: '#fff' }, onClick: () => setIsShowMore(!isShowMore) }, isShowMore ? 'show less' : 'show more'));
41
41
  }, [isShowMore, tags]);
42
42
  return (react_1.default.createElement("div", { className: 'clc-sxp-bottom-hashtag', style: {
43
- marginTop: `${(_a = hashTagStyle === null || hashTagStyle === void 0 ? void 0 : hashTagStyle.marginTop) !== null && _a !== void 0 ? _a : 16}px`
43
+ marginTop: `${(_a = hashTagStyle === null || hashTagStyle === void 0 ? void 0 : hashTagStyle.marginTop) !== null && _a !== void 0 ? _a : 16}px`,
44
+ width: hashTagRightMargin
44
45
  } },
45
- react_1.default.createElement(Scroll_1.default, { width: hashTagRightMargin }, tags === null || tags === void 0 ? void 0 : tags.map((item, index) => (react_1.default.createElement(react_2.SwiperSlide, { key: index, hidden: !isShowMore ? index >= 6 : false, className: 'clc-sxp-bottom-hashtag-item', style: hashTagStyle, onClick: () => handleClickTag(item), tag: 'button', "aria-label": item },
46
+ react_1.default.createElement(Scroll_1.default, null, tags === null || tags === void 0 ? void 0 : tags.map((item, index) => (react_1.default.createElement(react_2.SwiperSlide, { key: index, hidden: !isShowMore ? index >= 6 : false, className: 'clc-sxp-bottom-hashtag-item', style: hashTagStyle, onClick: () => handleClickTag(item), tag: 'button', "aria-label": item },
46
47
  react_1.default.createElement("div", { dangerouslySetInnerHTML: { __html: (0, tool_1.setFontForText)(`#${item}`, hashTagStyle) } })))))));
47
48
  };
48
49
  exports.default = (0, react_1.memo)(Hashtag);
@@ -7,7 +7,6 @@ interface IScrollProps {
7
7
  isPadding?: boolean;
8
8
  style?: CSSProperties;
9
9
  enableSlideActive?: boolean;
10
- width?: number;
11
10
  }
12
11
  declare const _default: React.NamedExoticComponent<IScrollProps>;
13
12
  export default _default;
@@ -8,7 +8,7 @@ require("swiper/css/free-mode");
8
8
  require("swiper/css/scrollbar");
9
9
  const modules_1 = require("swiper/modules");
10
10
  const hooks_1 = require("../../../../core/hooks");
11
- const Scroll = ({ children, isPadding = true, style, enableSlideActive = false, width }) => {
11
+ const Scroll = ({ children, isPadding = true, style, enableSlideActive = false }) => {
12
12
  const ref = (0, react_1.useRef)();
13
13
  const { popupDetailData } = (0, hooks_1.useSxpDataSource)();
14
14
  (0, react_1.useEffect)(() => {
@@ -16,6 +16,6 @@ const Scroll = ({ children, isPadding = true, style, enableSlideActive = false,
16
16
  if (enableSlideActive)
17
17
  (_a = ref === null || ref === void 0 ? void 0 : ref.current) === null || _a === void 0 ? void 0 : _a.swiper.slideTo((_b = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.multiCheckIndex) !== null && _b !== void 0 ? _b : 0);
18
18
  }, [popupDetailData, enableSlideActive]);
19
- return (react_1.default.createElement(react_2.Swiper, { ref: ref, direction: 'horizontal', slidesPerView: 'auto', freeMode: true, mousewheel: true, modules: [modules_1.FreeMode, modules_1.Scrollbar, modules_1.Mousewheel], style: Object.assign(Object.assign({ padding: isPadding ? '0 12px 0 20px' : 0 }, style), (width && { width })) }, children));
19
+ return (react_1.default.createElement(react_2.Swiper, { ref: ref, direction: 'horizontal', slidesPerView: 'auto', freeMode: true, mousewheel: true, modules: [modules_1.FreeMode, modules_1.Scrollbar, modules_1.Mousewheel], style: Object.assign({ padding: isPadding ? '0 12px 0 20px' : 0 }, style) }, children));
20
20
  };
21
21
  exports.default = (0, react_1.memo)(Scroll);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pb-sxp-ui",
3
- "version": "1.6.4",
3
+ "version": "1.6.5",
4
4
  "description": "React enterprise-class UI components",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",