pds-dev-kit-web-test 2.7.348 → 2.7.350

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.
@@ -180,7 +180,7 @@ function ContentsCarousel(props) {
180
180
  display: layout.display,
181
181
  flexDirection: layout.flexDirection,
182
182
  justifyContent: layout.justifyContent
183
- } }, { children: (0, jsx_runtime_1.jsx)(ContentsCarouselCore_1.default, __assign({ ref: swiperRef, className: "cb-contentscarousel", allowTouchMove: mode !== 'EDIT' ? true : false, onSwiper: onSwiper, onSlideChangeTransitionEnd: onSlideChangeTransitionEnd, onAutoplayTimeLeft: onAutoplayTimeLeft, slidesPerView: displayCounts, styles: isHovered ? contentsCarouselHoverStyle : contentsCarouselNormalStyle, effect: CB_EFFECT_PROP_CONTENTSCAROUSEL_SPEC_TRANSITIONTYPE === null || CB_EFFECT_PROP_CONTENTSCAROUSEL_SPEC_TRANSITIONTYPE === void 0 ? void 0 : CB_EFFECT_PROP_CONTENTSCAROUSEL_SPEC_TRANSITIONTYPE.toLowerCase() }, { children: (0, createCompositions_1.createCompositions)({
183
+ } }, { children: (0, jsx_runtime_1.jsx)(ContentsCarouselCore_1.default, __assign({ ref: swiperRef, className: "cb-contentscarousel", allowTouchMove: mode !== 'EDIT' ? true : false, onSwiper: onSwiper, onSlideChangeTransitionEnd: onSlideChangeTransitionEnd, onAutoplayTimeLeft: onAutoplayTimeLeft, slidesPerView: displayCounts, styles: isHovered ? contentsCarouselHoverStyle : contentsCarouselNormalStyle, effect: CB_EFFECT_PROP_CONTENTSCAROUSEL_SPEC_TRANSITIONTYPE === null || CB_EFFECT_PROP_CONTENTSCAROUSEL_SPEC_TRANSITIONTYPE === void 0 ? void 0 : CB_EFFECT_PROP_CONTENTSCAROUSEL_SPEC_TRANSITIONTYPE.toLowerCase(), displayCounts: displayCounts }, { children: (0, createCompositions_1.createCompositions)({
184
184
  valueType: CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_VALUETYPE,
185
185
  queryPath: CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_CONNECTDATA,
186
186
  limit: displayCounts,
@@ -5,6 +5,7 @@ import type { SwiperProps, SwiperRef } from 'swiper/react/swiper-react.js';
5
5
  export interface ContentsCarouselCoreProps extends SwiperProps {
6
6
  styles: CoreCarouselProps;
7
7
  slidesPerView?: SwiperProps['slidesPerView'];
8
+ displayCounts: number;
8
9
  children?: React.ReactNode[] | JSX.Element;
9
10
  }
10
11
  declare const ContentsCarouselCore: import("react").ForwardRefExoticComponent<ContentsCarouselCoreProps & import("react").RefAttributes<SwiperRef>>;
@@ -41,7 +41,7 @@ require("swiper/modules/navigation/navigation.min.css");
41
41
  var react_2 = require("swiper/react");
42
42
  var StyledSwiper_1 = __importDefault(require("../../../StyledSwiper/StyledSwiper"));
43
43
  var ContentsCarouselCore = (0, react_1.forwardRef)(function (_a, ref) {
44
- var styles = _a.styles, slidesPerView = _a.slidesPerView, children = _a.children, allowTouchMove = _a.allowTouchMove, props = __rest(_a, ["styles", "slidesPerView", "children", "allowTouchMove"]);
44
+ var styles = _a.styles, slidesPerView = _a.slidesPerView, children = _a.children, allowTouchMove = _a.allowTouchMove, displayCounts = _a.displayCounts, props = __rest(_a, ["styles", "slidesPerView", "children", "allowTouchMove", "displayCounts"]);
45
45
  var childrenArray = (0, react_1.useMemo)(function () {
46
46
  return Array.isArray(children) ? children : [children];
47
47
  }, [children]);
@@ -49,10 +49,13 @@ var ContentsCarouselCore = (0, react_1.forwardRef)(function (_a, ref) {
49
49
  var originalChildren = (0, react_1.useMemo)(function () {
50
50
  return Array.isArray(children) ? children : [children];
51
51
  }, [children]);
52
+ var finalSlidesPerView = props.effect === 'cards' ? 1 : slidesPerView;
53
+ var useAutoplay = !!styles.useAutoplay && childrenArray.length > 1;
54
+ var loop = styles.loop && originalChildren.length >= displayCounts;
52
55
  // 2. (수정) 루프와 slidesPerView 문제를 해결하기 위한 배열
53
56
  var loopedChildren = (0, react_1.useMemo)(function () {
54
57
  // 루프가 아니거나, slidesPerView가 1이하이면 원본 반환
55
- if (!styles.loop || typeof slidesPerView !== 'number' || slidesPerView <= 1) {
58
+ if (!loop || typeof slidesPerView !== 'number' || slidesPerView <= 1) {
56
59
  return originalChildren;
57
60
  }
58
61
  // 3. (핵심) 루프가 필요한데 슬라이드 수가 (slidesPerView * 2)보다 적은 경우
@@ -63,9 +66,7 @@ var ContentsCarouselCore = (0, react_1.forwardRef)(function (_a, ref) {
63
66
  }
64
67
  // 슬라이드 수가 충분하면 원본 반환
65
68
  return originalChildren;
66
- }, [originalChildren, styles.loop, slidesPerView]);
67
- var finalSlidesPerView = props.effect === 'cards' ? 1 : slidesPerView;
68
- var useAutoplay = !!styles.useAutoplay && childrenArray.length > 1;
69
+ }, [originalChildren, loop, slidesPerView]);
69
70
  // const slidesWithEmpty = useMemo(() => {
70
71
  // const childrenArray = Array.isArray(children) ? children : [children];
71
72
  // if (
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pds-dev-kit-web-test",
3
- "version": "2.7.348",
3
+ "version": "2.7.350",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "dist/index.js",