pds-dev-kit-web-test 2.5.470 → 2.5.471

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.
Files changed (73) hide show
  1. package/dist/src/sub/DynamicLayout/CompositionEditor/CompositionEditor.d.ts +2 -1
  2. package/dist/src/sub/DynamicLayout/CompositionEditor/CompositionEditor.js +49 -49
  3. package/dist/src/sub/DynamicLayout/DynamicLayout.d.ts +1 -1
  4. package/dist/src/sub/DynamicLayout/DynamicLayout.js +3 -2
  5. package/dist/src/sub/DynamicLayout/components/Section/components/CustomSectionBackgroundMedia.js +24 -2
  6. package/dist/src/sub/DynamicLayout/components/Section/util/parseSectionBackgroundMediaData.js +3 -1
  7. package/dist/src/sub/DynamicLayout/mock_componentBlocks.d.ts +776 -0
  8. package/dist/src/sub/DynamicLayout/mock_componentBlocks.js +4236 -0
  9. package/dist/src/sub/DynamicLayout/mock_composition.js +6 -5
  10. package/dist/src/sub/DynamicLayout/mock_contentsCarousel.js +5 -17
  11. package/dist/src/sub/DynamicLayout/mock_contentsList.js +2 -2
  12. package/dist/src/sub/DynamicLayout/mock_slideBanner.d.ts +63 -63
  13. package/dist/src/sub/DynamicLayout/mock_slideBanner.js +65 -65
  14. package/dist/src/sub/DynamicLayout/mocks.js +13 -8477
  15. package/dist/src/sub/DynamicLayout/sections/CustomSection/CustomSection.js +3 -3
  16. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarousel.d.ts +6 -0
  17. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarousel.js +76 -192
  18. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarouselCore.d.ts +2 -7
  19. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarouselCore.js +8 -6
  20. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomNavigationNextBtn.d.ts +15 -0
  21. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomNavigationNextBtn.js +69 -0
  22. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomNavigationPrevBtn.d.ts +15 -0
  23. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomNavigationPrevBtn.js +69 -0
  24. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomProgressbar.d.ts +4 -18
  25. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomProgressbar.js +19 -49
  26. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/progressConfigs.js +16 -16
  27. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/contentsCarouselUtils.d.ts +19 -20
  28. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/contentsCarouselUtils.js +131 -696
  29. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/hooks/useFlexGridLayout.d.ts +18 -0
  30. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/hooks/useFlexGridLayout.js +229 -0
  31. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/hooks/useSwiper.d.ts +14 -0
  32. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/hooks/useSwiper.js +46 -0
  33. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/types.d.ts +36 -2
  34. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/ContentsList.d.ts +6 -0
  35. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/ContentsList.js +54 -20
  36. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/components/CustomPagination.d.ts +6 -25
  37. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/components/CustomPagination.js +21 -51
  38. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/contentsListUtils.d.ts +8 -9
  39. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/contentsListUtils.js +42 -294
  40. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/hooks/useFlexGridLayout.d.ts +18 -0
  41. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/hooks/useFlexGridLayout.js +229 -0
  42. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/types.d.ts +12 -1
  43. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/SlideBanner.d.ts +6 -0
  44. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/SlideBanner.js +82 -146
  45. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/SlideBannerCore.d.ts +2 -5
  46. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/SlideBannerCore.js +2 -2
  47. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomNavigationNextBtn.d.ts +15 -0
  48. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomNavigationNextBtn.js +69 -0
  49. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomNavigationPrevBtn.d.ts +15 -0
  50. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomNavigationPrevBtn.js +69 -0
  51. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomPagination.d.ts +9 -22
  52. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomPagination.js +25 -35
  53. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomProgressbar.d.ts +4 -18
  54. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomProgressbar.js +19 -49
  55. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/progressConfigs.js +8 -8
  56. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/hooks/useFlexGridLayout.d.ts +18 -0
  57. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/hooks/useFlexGridLayout.js +229 -0
  58. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/hooks/useSwiper.d.ts +16 -0
  59. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/hooks/useSwiper.js +63 -0
  60. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/slideBannerUtils.d.ts +22 -24
  61. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/slideBannerUtils.js +155 -925
  62. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/types.d.ts +46 -3
  63. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parsePlacement.d.ts +6 -1
  64. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parsePlacement.js +10 -5
  65. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/types.d.ts +1 -0
  66. package/dist/src/sub/DynamicLayout/types.d.ts +17 -3
  67. package/package.json +2 -2
  68. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomNavigation.d.ts +0 -35
  69. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomNavigation.js +0 -118
  70. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomPagination.d.ts +0 -32
  71. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomPagination.js +0 -183
  72. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomNavigation.d.ts +0 -35
  73. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomNavigation.js +0 -118
@@ -74,7 +74,7 @@ var GLE_MIN_WIDTH_DESKTOP_PX = "".concat(GRID_CELL_MIN * DESKTOP_GRID_COLS, "px"
74
74
  var GLE_MIN_WIDTH_MOBILE_PX = "".concat(GRID_CELL_MIN * MOBILE_GRID_COLS, "px");
75
75
  var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
76
76
  var _a, _b, _c, _d;
77
- var _e = (0, react_1.useContext)(dynamicLayoutContext_1.dynamicLayoutContext), device = _e.device, editingSectionId = _e.editingSectionId, mode = _e.mode, shortcutKeyMode = _e.shortcutKeyMode, zoomScale = _e.zoomScale, sectionActionHandler = _e.sectionActionHandler;
77
+ var _e = (0, react_1.useContext)(dynamicLayoutContext_1.dynamicLayoutContext), device = _e.device, editingSectionId = _e.editingSectionId, mode = _e.mode, shortcutKeyMode = _e.shortcutKeyMode, zoomScale = _e.zoomScale, placementRestriction = _e.placementRestriction, sectionActionHandler = _e.sectionActionHandler;
78
78
  var componentBlocks = props.componentBlocks, jsonProperties = props.jsonProperties;
79
79
  var sectionPedigree = jsonProperties === null || jsonProperties === void 0 ? void 0 : jsonProperties.pedigree;
80
80
  var _f = (0, react_1.useState)(sectionPedigree), pedigreeState = _f[0], setPedigreeState = _f[1];
@@ -92,7 +92,7 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
92
92
  var isEditMode = mode === 'EDIT';
93
93
  var layoutByDevice = device === 'DESKTOP' ? 'lg' : 'sm';
94
94
  var _m = (0, react_1.useState)(function () {
95
- var _a = (0, util_1.parsePlacement)(componentBlocks !== null && componentBlocks !== void 0 ? componentBlocks : [], zOrders), lg = _a.lg, sm = _a.sm;
95
+ var _a = (0, util_1.parsePlacement)(componentBlocks !== null && componentBlocks !== void 0 ? componentBlocks : [], zOrders, placementRestriction), lg = _a.lg, sm = _a.sm;
96
96
  return {
97
97
  lg: lg,
98
98
  sm: sm
@@ -131,7 +131,7 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
131
131
  };
132
132
  }, [componentBlocks]);
133
133
  (0, react_1.useLayoutEffect)(function () {
134
- var parsedLayouts = (0, util_1.parsePlacement)(componentBlocks !== null && componentBlocks !== void 0 ? componentBlocks : [], zOrders);
134
+ var parsedLayouts = (0, util_1.parsePlacement)(componentBlocks !== null && componentBlocks !== void 0 ? componentBlocks : [], zOrders, placementRestriction);
135
135
  setLayouts(function (prev) {
136
136
  var _a;
137
137
  var _b;
@@ -1,8 +1,14 @@
1
1
  /// <reference types="react" />
2
+ import type { INSET_POSTIION, OUTSET_POSTIION } from './types';
2
3
  import type { CB_CONTENTSCAROUSEL } from '../../../../../../../DynamicLayout/sections/CustomSection/types';
3
4
  import type { CB_CONTENTSCAROUSEL_PROPERTIES_TYPE, IndexForIntersection } from '../../../../../../../DynamicLayout/sections/CustomSection/util/types';
4
5
  type Props = CB_CONTENTSCAROUSEL_PROPERTIES_TYPE & IndexForIntersection & {
5
6
  compositions: CB_CONTENTSCAROUSEL['compositions'];
6
7
  };
8
+ type ComponentType = 'PREV' | 'NEXT' | 'PROGRESSBAR';
9
+ export type ContentsCarouselElementsProps = {
10
+ type: ComponentType;
11
+ position: OUTSET_POSTIION | INSET_POSTIION;
12
+ };
7
13
  declare function ContentsCarousel(props: Props): JSX.Element;
8
14
  export default ContentsCarousel;
@@ -14,29 +14,6 @@ var __assign = (this && this.__assign) || function () {
14
14
  };
15
15
  return __assign.apply(this, arguments);
16
16
  };
17
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
18
- if (k2 === undefined) k2 = k;
19
- var desc = Object.getOwnPropertyDescriptor(m, k);
20
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
21
- desc = { enumerable: true, get: function() { return m[k]; } };
22
- }
23
- Object.defineProperty(o, k2, desc);
24
- }) : (function(o, m, k, k2) {
25
- if (k2 === undefined) k2 = k;
26
- o[k2] = m[k];
27
- }));
28
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
29
- Object.defineProperty(o, "default", { enumerable: true, value: v });
30
- }) : function(o, v) {
31
- o["default"] = v;
32
- });
33
- var __importStar = (this && this.__importStar) || function (mod) {
34
- if (mod && mod.__esModule) return mod;
35
- var result = {};
36
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
37
- __setModuleDefault(result, mod);
38
- return result;
39
- };
40
17
  var __importDefault = (this && this.__importDefault) || function (mod) {
41
18
  return (mod && mod.__esModule) ? mod : { "default": mod };
42
19
  };
@@ -47,53 +24,49 @@ var createCompositions_1 = require("../../../../../../../DynamicLayout/Compositi
47
24
  var dynamicLayoutContext_1 = require("../../../../../../../DynamicLayout/dynamicLayoutContext");
48
25
  var hooks_1 = require("../../../../../../../DynamicLayout/sections/CustomSection/hooks");
49
26
  var util_1 = require("../../../../../../../DynamicLayout/sections/CustomSection/util");
50
- var styled_components_1 = __importStar(require("styled-components"));
27
+ var styled_components_1 = __importDefault(require("styled-components"));
51
28
  var S_CB_AnimationObserverBox_1 = require("../components/S_CB_AnimationObserverBox");
52
29
  var S_CB_BoxWithShadow_1 = require("../components/S_CB_BoxWithShadow");
53
- var CustomNavigation_1 = require("./components/CustomNavigation");
54
- // import { CustomPagination } from './components/CustomPagination';
30
+ var CustomNavigationNextBtn_1 = require("./components/CustomNavigationNextBtn");
31
+ var CustomNavigationPrevBtn_1 = require("./components/CustomNavigationPrevBtn");
55
32
  var CustomProgressbar_1 = require("./components/CustomProgressbar");
56
33
  var ContentsCarouselCore_1 = __importDefault(require("./ContentsCarouselCore"));
57
34
  var contentsCarouselUtils_1 = require("./contentsCarouselUtils");
35
+ var useFlexGridLayout_1 = require("./hooks/useFlexGridLayout");
36
+ var useSwiper_1 = require("./hooks/useSwiper");
37
+ var createComponent = function (type, getDesignType, getLocation) {
38
+ return function (normalStyle, hoverStyle, isHovered) {
39
+ var normalDesign = getDesignType(normalStyle);
40
+ var hoverDesign = getDesignType(hoverStyle);
41
+ if (isHovered && hoverDesign === 'NONE')
42
+ return undefined;
43
+ if (normalDesign === 'NONE')
44
+ return undefined;
45
+ return {
46
+ type: type,
47
+ position: isHovered ? getLocation(hoverStyle) : getLocation(normalStyle)
48
+ };
49
+ };
50
+ };
58
51
  function ContentsCarousel(props) {
59
52
  var _a = (0, react_1.useContext)(dynamicLayoutContext_1.dynamicLayoutContext), device = _a.device, mode = _a.mode, queryData = _a.queryData;
60
- var index = props.index,
61
- // // CONTENT : 캐로셀
62
- _b = props.CB_CONTENT_PROP_CONTENTSCAROUSEL, CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_ITEMCOUNTS = _b.CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_ITEMCOUNTS, CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_DISPLAYCOUNTS = _b.CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_DISPLAYCOUNTS, CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_VALUETYPE = _b.CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_VALUETYPE, CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_CONNECTDATA = _b.CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_CONNECTDATA,
63
- // STYLE: 캐로셀
64
- CB_STYLE_PROP_CONTENTSCAROUSEL = props.CB_STYLE_PROP_CONTENTSCAROUSEL,
65
- // STYLE: 그림자
66
- CB_STYLE_PROP_SHADOW = props.CB_STYLE_PROP_SHADOW,
67
- // EFFECT: 진입
68
- CB_EFFECT_PROP_ENTANIM = props.CB_EFFECT_PROP_ENTANIM;
69
- var compositions = props.compositions;
70
- var _c = (0, react_1.useState)(false), isHovered = _c[0], setIsHovered = _c[1];
71
- // const [currentSlide, setCurrentSlide] = useState(1);
72
- // const [totalPages, setTotalPages] = useState(0);
73
- var _d = (0, react_1.useState)(true), isBeginning = _d[0], setIsBeginning = _d[1];
74
- var _e = (0, react_1.useState)(false), isEnd = _e[0], setIsEnd = _e[1];
75
- var progressRef = (0, react_1.useRef)(0);
76
- var leftTimeMsRef = (0, react_1.useRef)(0);
77
- var swiperRef = (0, react_1.useRef)(null);
78
- var _f = (0, contentsCarouselUtils_1.parseCarouselStyleToCarouselCoreProp)({
53
+ var compositions = props.compositions, index = props.index, _b = props.CB_CONTENT_PROP_CONTENTSCAROUSEL, CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_ITEMCOUNTS = _b.CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_ITEMCOUNTS, CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_DISPLAYCOUNTS = _b.CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_DISPLAYCOUNTS, CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_VALUETYPE = _b.CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_VALUETYPE, CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_CONNECTDATA = _b.CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_CONNECTDATA, CB_STYLE_PROP_CONTENTSCAROUSEL = props.CB_STYLE_PROP_CONTENTSCAROUSEL, CB_STYLE_PROP_SHADOW = props.CB_STYLE_PROP_SHADOW, CB_EFFECT_PROP_ENTANIM = props.CB_EFFECT_PROP_ENTANIM;
54
+ var _c = (0, util_1.parseProperties)(props, device), style = _c.style, hoverStyle = _c.hoverStyle, layout = _c.layout, effect = _c.effect;
55
+ var _d = (0, contentsCarouselUtils_1.parseCarouselStyleToCarouselCoreProp)({
79
56
  props: CB_STYLE_PROP_CONTENTSCAROUSEL,
80
57
  contentsPropsPartials: { CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_DISPLAYCOUNTS: CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_DISPLAYCOUNTS },
81
58
  device: device
82
- }), contentsCarouselNormalStyle = _f.normalStyle, contentsCarouselHoverStyle = _f.hoverStyle;
83
- // const { normalStyle: customPaginationNormalStyle, hoverStyle: customPaginationHoverStyle } =
84
- // parseCarouselStyleToCustomPaginationProp({
85
- // props: CB_STYLE_PROP_CONTENTSCAROUSEL,
86
- // device
87
- // });
88
- var _g = (0, contentsCarouselUtils_1.parseCarouselStyleToCustomNavigationProp)({
59
+ }), contentsCarouselNormalStyle = _d.normalStyle, contentsCarouselHoverStyle = _d.hoverStyle;
60
+ var _e = (0, contentsCarouselUtils_1.parseCarouselStyleToCustomNavigationProp)({
89
61
  props: CB_STYLE_PROP_CONTENTSCAROUSEL,
90
62
  device: device
91
- }), customNavigationNormalStyle = _g.normalStyle, customNavigationHoverStyle = _g.hoverStyle;
92
- var _h = (0, contentsCarouselUtils_1.parseCarouselStyleToCustomProgressbarProp)({
63
+ }), customNavigationNormalStyle = _e.normalStyle, customNavigationHoverStyle = _e.hoverStyle;
64
+ var _f = (0, contentsCarouselUtils_1.parseCarouselStyleToCustomProgressbarProp)({
93
65
  props: CB_STYLE_PROP_CONTENTSCAROUSEL,
94
66
  device: device
95
- }), customProgressbarNormalStyle = _h.normalStyle, customProgressbarHoverStyle = _h.hoverStyle;
96
- var _j = (0, util_1.parseProperties)(props, device), style = _j.style, hoverStyle = _j.hoverStyle, layout = _j.layout, effect = _j.effect;
67
+ }), customProgressbarNormalStyle = _f.normalStyle, customProgressbarHoverStyle = _f.hoverStyle;
68
+ var _g = (0, useSwiper_1.useSwiper)(), swiperRef = _g.swiperRef, progressRef = _g.progressRef, leftTimeMsRef = _g.leftTimeMsRef, isBeginning = _g.isBeginning, isEnd = _g.isEnd, onSwiper = _g.onSwiper, onSlideChangeTransitionEnd = _g.onSlideChangeTransitionEnd, onAutoplayTimeLeft = _g.onAutoplayTimeLeft, onClickPrevBtn = _g.onClickPrevBtn, onClickNextBtn = _g.onClickNextBtn;
69
+ var _h = (0, react_1.useState)(false), isHovered = _h[0], setIsHovered = _h[1];
97
70
  var loop = isHovered ? contentsCarouselHoverStyle.loop : contentsCarouselNormalStyle.loop;
98
71
  // NOTE: edit모드에서는 그리드의 이벤트만 작동하도록 CB의 포인터 이벤트는 막습니다.
99
72
  var editModeStyle = mode === 'EDIT' ? { pointerEvents: 'none' } : {};
@@ -109,151 +82,62 @@ function ContentsCarousel(props) {
109
82
  : CB_EFFECT_PROP_ENTANIM['CB_EFFECT_PROP_ENTANIM_SPEC_TYPE:MOBILE'] === 'NONE';
110
83
  var hasEffect = !isNoneEffectType;
111
84
  var effectVisibleStyle = hasEffect ? { opacity: isVisible ? 1 : 0 } : {};
112
- (0, react_1.useEffect)(function () {
113
- var _a, _b, _c;
114
- (_b = (_a = swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper) === null || _b === void 0 ? void 0 : _b.update();
115
- (_c = swiperRef.current) === null || _c === void 0 ? void 0 : _c.swiper.update();
116
- }, [isHovered]);
117
- var handleSwiper = function (swiper) {
118
- // NOTE: 페이지네이션 관련 로직 임시 주석 처리
119
- // const originalSlides = Array.from(swiper.slides).filter(
120
- // (slide) => !slide.classList.contains('swiper-slide-duplicate')
121
- // );
122
- // const totalSlides = originalSlides.length;
123
- // const slidesPerView =
124
- // typeof swiper.params.slidesPerView === 'number' ? swiper.params.slidesPerView : 1;
125
- // const slidesPerGroup =
126
- // typeof swiper.params.slidesPerGroup === 'number' ? swiper.params.slidesPerGroup : 1;
127
- // const isLoop = swiper.params.loop || false;
128
- // let totalPages;
129
- // if (slidesPerView === slidesPerGroup && slidesPerGroup > 1) {
130
- // // 페이지 단위로 넘어가는 경우 (loop 여부 상관없이 동일)
131
- // totalPages = Math.ceil(totalSlides / slidesPerGroup);
132
- // } else if (isLoop) {
133
- // totalPages = totalSlides;
134
- // } else {
135
- // // loop가 꺼져있으면 마지막 슬라이드가 첫 번째 위치에 올 수 있는 경우까지만
136
- // totalPages = Math.max(1, totalSlides - slidesPerView + 1);
137
- // }
138
- // setTotalPages(totalPages);
139
- setIsBeginning(swiper.isBeginning);
140
- setIsEnd(swiper.isEnd);
141
- };
142
- var handleSlideChangeTransitionEnd = function (swiper) {
143
- // NOTE: 페이지네이션 관련 로직 임시 주석 처리
144
- // const slidesPerGroup =
145
- // typeof swiper.params.slidesPerGroup === 'number' ? swiper.params.slidesPerGroup : 1;
146
- // const slidesPerView =
147
- // typeof swiper.params.slidesPerView === 'number' ? swiper.params.slidesPerView : 1;
148
- // const isLoop = swiper.params.loop || false;
149
- // // 현재 페이지 계산
150
- // if (slidesPerView === slidesPerGroup && slidesPerGroup > 1) {
151
- // // 페이지 단위로 이동하는 경우
152
- // const currentPage = Math.floor(swiper.realIndex / slidesPerGroup) + 1;
153
- // setCurrentSlide(currentPage);
154
- // } else if (isLoop) {
155
- // // loop 모드에서는 realIndex가 실제 슬라이드 인덱스
156
- // setCurrentSlide(swiper.realIndex + 1);
157
- // } else {
158
- // // loop가 꺼져있을 때는 activeIndex 사용
159
- // setCurrentSlide(swiper.activeIndex + 1);
160
- // }
161
- setIsBeginning(swiper.isBeginning);
162
- setIsEnd(swiper.isEnd);
163
- };
164
- var handleAutoplayTimeLeft = (0, react_1.useCallback)(function (_, time, progress) {
165
- leftTimeMsRef.current = time;
166
- progressRef.current = progress;
167
- }, []);
168
- // NOTE: 페이지네이션 관련 로직 임시 주석 처리
169
- // const handleBulletClick = (index: number) => {
170
- // if (swiperRef.current) {
171
- // const targetIndex = (swiperRef.current.swiper.params.slidesPerGroup || 1) * index;
172
- // swiperRef.current.swiper.slideTo(targetIndex);
173
- // }
174
- // };
175
- var handlePrevBtnClick = function () {
176
- if (swiperRef.current) {
177
- swiperRef.current.swiper.slidePrev();
178
- }
179
- };
180
- var handleNextBtnClick = function () {
181
- if (swiperRef.current) {
182
- swiperRef.current.swiper.slideNext();
85
+ var createPrevButton = createComponent('PREV', function (style) { return style.prevBtnType || 'NONE'; }, function (style) { return style.prevBtnLocation || 'OUTSET1'; });
86
+ var createNextButton = createComponent('NEXT', function (style) { return style.nextBtnType || 'NONE'; }, function (style) { return style.nextBtnLocation || 'OUTSET1'; });
87
+ var components = [
88
+ createPrevButton(customNavigationNormalStyle, customNavigationHoverStyle, isHovered),
89
+ createNextButton(customNavigationNormalStyle, customNavigationHoverStyle, isHovered),
90
+ { type: 'PROGRESSBAR', position: 'INSET5' }
91
+ ].filter(function (component) { return component !== undefined; });
92
+ var _j = (0, useFlexGridLayout_1.useFlexGridLayout)({ components: components }), layoutRef = _j.layoutRef, positionRefs = _j.positionRefs, ccbInset = _j.ccbInset, componentGroups = _j.componentGroups, getPositionStyle = _j.getPositionStyle, getComponentGroupLayout = _j.getComponentGroupLayout;
93
+ var renderElements = function (component) {
94
+ switch (component.type) {
95
+ case 'PREV':
96
+ return ((0, jsx_runtime_1.jsx)(CustomNavigationPrevBtn_1.CustomNavigationPrevBtn, { isDisabled: loop ? false : isBeginning, styles: isHovered ? customNavigationHoverStyle : customNavigationNormalStyle, onClick: onClickPrevBtn }));
97
+ case 'NEXT':
98
+ return ((0, jsx_runtime_1.jsx)(CustomNavigationNextBtn_1.CustomNavigationNextBtn, { isDisabled: loop ? false : isEnd, styles: isHovered ? customNavigationHoverStyle : customNavigationNormalStyle, onClick: onClickNextBtn }));
99
+ case 'PROGRESSBAR':
100
+ return ((0, jsx_runtime_1.jsx)(CustomProgressbar_1.CustomProgressbar, { progressRef: progressRef, leftTimeMsRef: leftTimeMsRef, styles: isHovered ? customProgressbarHoverStyle : customProgressbarNormalStyle }));
101
+ default:
102
+ return null;
183
103
  }
184
104
  };
185
- return ((0, jsx_runtime_1.jsx)(S_CB_AnimationObserverBox_1.S_CB_AnimationObserverBox, __assign({ ref: hasEffect ? cbRef : null, effectVisibleStyle: effectVisibleStyle }, { children: (0, jsx_runtime_1.jsx)(S_CB_BoxWithShadow_1.S_CB_BoxWithShadow, __assign({ className: "cb-layout-box", normalStyle: __assign(__assign(__assign(__assign(__assign({}, style), layout), effectCssProperties), editModeStyle), { borderBottomLeftRadius: style.borderBottomLeftRadius, borderBottomRightRadius: style.borderBottomRightRadius, borderTopLeftRadius: style.borderTopLeftRadius, borderTopRightRadius: style.borderTopRightRadius, borderWidth: undefined, borderColor: undefined, borderStyle: undefined }), hoverStyle: __assign(__assign({}, hoverStyle), { borderBottomLeftRadius: hoverStyle.borderBottomLeftRadius, borderBottomRightRadius: hoverStyle.borderBottomRightRadius, borderTopLeftRadius: hoverStyle.borderTopLeftRadius, borderTopRightRadius: hoverStyle.borderTopRightRadius, borderWidth: undefined, borderColor: undefined, borderStyle: undefined }), cbStylePropsShadowSpecs: CB_STYLE_PROP_SHADOW, device: device, onMouseEnter: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); } }, { children: (0, jsx_runtime_1.jsxs)(S_SwiperWrapper, __assign({ customStyle: isHovered
186
- ? contentsCarouselHoverStyle === null || contentsCarouselHoverStyle === void 0 ? void 0 : contentsCarouselHoverStyle.customStyle
187
- : contentsCarouselNormalStyle === null || contentsCarouselNormalStyle === void 0 ? void 0 : contentsCarouselNormalStyle.customStyle }, { children: [(0, jsx_runtime_1.jsx)(S_SwiperLayout, __assign({ borderStyle: {
188
- borderBottomLeftRadius: style.borderBottomLeftRadius,
189
- borderBottomRightRadius: style.borderBottomRightRadius,
190
- borderTopLeftRadius: style.borderTopLeftRadius,
191
- borderTopRightRadius: style.borderTopRightRadius,
192
- borderWidth: style.borderWidth,
193
- borderColor: style.borderColor,
194
- borderStyle: style.borderStyle
195
- }, hoverBorderStyle: {
196
- borderBottomLeftRadius: hoverStyle.borderBottomLeftRadius,
197
- borderBottomRightRadius: hoverStyle.borderBottomRightRadius,
198
- borderTopLeftRadius: hoverStyle.borderTopLeftRadius,
199
- borderTopRightRadius: hoverStyle.borderTopRightRadius,
200
- borderWidth: hoverStyle.borderWidth,
201
- borderColor: hoverStyle.borderColor,
202
- borderStyle: hoverStyle.borderStyle
203
- } }, { children: (0, jsx_runtime_1.jsx)(ContentsCarouselCore_1.default, __assign({ ref: swiperRef, className: "contents-carousel-core", onSwiper: handleSwiper, onSlideChangeTransitionEnd: handleSlideChangeTransitionEnd, onAutoplayTimeLeft: handleAutoplayTimeLeft, slidesPerView: CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_DISPLAYCOUNTS, scrollbar: isHovered
204
- ? contentsCarouselHoverStyle.scrollbar
205
- : contentsCarouselNormalStyle.scrollbar, slidesPerGroup: isHovered
206
- ? contentsCarouselHoverStyle.slidesPerGroup
207
- : contentsCarouselNormalStyle.slidesPerGroup, spaceBetween: isHovered
208
- ? contentsCarouselHoverStyle.spaceBetween
209
- : contentsCarouselNormalStyle.spaceBetween, freeMode: isHovered
210
- ? contentsCarouselHoverStyle.freeMode
211
- : contentsCarouselNormalStyle.freeMode, autoplay: isHovered
212
- ? contentsCarouselHoverStyle.autoplay
213
- : contentsCarouselNormalStyle.autoplay, useAutoplay: isHovered
214
- ? contentsCarouselHoverStyle.useAutoplay
215
- : contentsCarouselNormalStyle.useAutoplay, loop: isHovered ? contentsCarouselHoverStyle.loop : contentsCarouselNormalStyle.loop }, { children: (0, createCompositions_1.createCompositions)({
105
+ return ((0, jsx_runtime_1.jsx)(S_CB_AnimationObserverBox_1.S_CB_AnimationObserverBox, __assign({ ref: hasEffect ? cbRef : null, effectVisibleStyle: effectVisibleStyle }, { children: (0, jsx_runtime_1.jsx)(S_CB_BoxWithShadow_1.S_CB_BoxWithShadow, __assign({ className: "cb-layout-box", normalStyle: __assign(__assign(__assign(__assign(__assign({}, style), layout), effectCssProperties), editModeStyle), { overflow: 'hidden' }), hoverStyle: __assign(__assign({}, hoverStyle), { overflow: 'hidden' }), cbStylePropsShadowSpecs: CB_STYLE_PROP_SHADOW, device: device, onMouseEnter: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); } }, { children: (0, jsx_runtime_1.jsxs)(S_SwiperLayout, __assign({ className: "cb-contentscarousel-layout-box", ref: layoutRef }, { children: [(0, jsx_runtime_1.jsx)(S_SwiperWrapper, __assign({ className: "cb-contentscarousel-wrapper", ccbInset: ccbInset, customStyle: isHovered
106
+ ? contentsCarouselHoverStyle === null || contentsCarouselHoverStyle === void 0 ? void 0 : contentsCarouselHoverStyle.customStyle
107
+ : contentsCarouselNormalStyle === null || contentsCarouselNormalStyle === void 0 ? void 0 : contentsCarouselNormalStyle.customStyle }, { children: (0, jsx_runtime_1.jsx)(ContentsCarouselCore_1.default, __assign({ ref: swiperRef, className: "cb-contentscarousel", onSwiper: onSwiper, onSlideChangeTransitionEnd: onSlideChangeTransitionEnd, onAutoplayTimeLeft: onAutoplayTimeLeft, slidesPerView: CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_DISPLAYCOUNTS, styles: isHovered ? contentsCarouselHoverStyle : contentsCarouselNormalStyle }, { children: (0, createCompositions_1.createCompositions)({
216
108
  valueType: CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_VALUETYPE,
217
109
  queryPath: CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_CONNECTDATA,
218
110
  limit: CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_ITEMCOUNTS,
219
111
  queryData: queryData,
220
112
  compositions: compositions
221
- }) })) })), (0, jsx_runtime_1.jsx)(CustomNavigation_1.CustomNavigation, { prevBtnDisabled: loop ? false : isBeginning, prevBtnType: isHovered
222
- ? customNavigationHoverStyle.prevBtnType
223
- : customNavigationNormalStyle.prevBtnType, prevBtnOffset: isHovered
224
- ? customNavigationHoverStyle.prevBtnOffset
225
- : customNavigationNormalStyle.prevBtnOffset, prevBtnSize: isHovered
226
- ? customNavigationHoverStyle.prevBtnSize
227
- : customNavigationNormalStyle.prevBtnSize, prevBtnPrimaryColor: isHovered
228
- ? customNavigationHoverStyle.prevBtnPrimaryColor
229
- : customNavigationNormalStyle.prevBtnPrimaryColor, prevBtnSecondaryColor: isHovered
230
- ? customNavigationHoverStyle.prevBtnSecondaryColor
231
- : customNavigationNormalStyle.prevBtnSecondaryColor, onPrevBtnClick: handlePrevBtnClick, nextBtnDisabled: loop ? false : isEnd, nextBtnType: isHovered
232
- ? customNavigationHoverStyle.nextBtnType
233
- : customNavigationNormalStyle.nextBtnType, nextBtnOffset: isHovered
234
- ? customNavigationHoverStyle.nextBtnOffset
235
- : customNavigationNormalStyle.nextBtnOffset, nextBtnSize: isHovered
236
- ? customNavigationHoverStyle.nextBtnSize
237
- : customNavigationNormalStyle.nextBtnSize, nextBtnPrimaryColor: isHovered
238
- ? customNavigationHoverStyle.nextBtnPrimaryColor
239
- : customNavigationNormalStyle.nextBtnPrimaryColor, nextBtnSecondaryColor: isHovered
240
- ? customNavigationHoverStyle.nextBtnSecondaryColor
241
- : customNavigationNormalStyle.nextBtnSecondaryColor, onNextBtnClick: handleNextBtnClick }), (0, jsx_runtime_1.jsx)(CustomProgressbar_1.CustomProgressbar, { progressRef: progressRef, leftTimeMsRef: leftTimeMsRef, type: isHovered ? customProgressbarHoverStyle.type : customProgressbarNormalStyle.type, size: isHovered ? customProgressbarHoverStyle.size : customProgressbarNormalStyle.size, primaryColor: isHovered
242
- ? customProgressbarHoverStyle.primaryColor
243
- : customProgressbarNormalStyle.primaryColor, secondaryColor: isHovered
244
- ? customProgressbarHoverStyle.secondaryColor
245
- : customProgressbarNormalStyle.secondaryColor })] })) })) })));
113
+ }) })) })), Object.entries(componentGroups).map(function (_a) {
114
+ var position = _a[0], groupComponents = _a[1];
115
+ return ((0, jsx_runtime_1.jsx)("div", __assign({ className: "cb-contentscarousel-button-group", ref: function (el) {
116
+ if (el) {
117
+ positionRefs.current[position] = el;
118
+ }
119
+ else {
120
+ delete positionRefs.current[position];
121
+ }
122
+ }, style: __assign(__assign({}, getPositionStyle(position, ccbInset)), { zIndex: 3 }) }, { children: (0, jsx_runtime_1.jsx)("div", __assign({ className: "cb-contentscarousel-button-layout-box", style: getComponentGroupLayout(groupComponents, position) }, { children: groupComponents.map(function (component) { return renderElements(component); }) })) }), position));
123
+ })] })) })) })));
246
124
  }
247
- var S_SwiperWrapper = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n height: 100%;\n width: 100%;\n ", "\n"], ["\n height: 100%;\n width: 100%;\n ", "\n"])), function (_a) {
125
+ var S_SwiperLayout = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n height: 100%;\n margin: 0 auto;\n position: relative;\n width: 100%;\n"], ["\n height: 100%;\n margin: 0 auto;\n position: relative;\n width: 100%;\n"])));
126
+ var S_SwiperWrapper = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n bottom: ", ";\n left: ", ";\n position: absolute;\n right: ", ";\n top: ", ";\n ", ";\n"], ["\n bottom: ", ";\n left: ", ";\n position: absolute;\n right: ", ";\n top: ", ";\n ", ";\n"])), function (_a) {
127
+ var ccbInset = _a.ccbInset;
128
+ return ccbInset.bottom;
129
+ }, function (_a) {
130
+ var ccbInset = _a.ccbInset;
131
+ return ccbInset.left;
132
+ }, function (_a) {
133
+ var ccbInset = _a.ccbInset;
134
+ return ccbInset.right;
135
+ }, function (_a) {
136
+ var ccbInset = _a.ccbInset;
137
+ return ccbInset.top;
138
+ }, function (_a) {
248
139
  var customStyle = _a.customStyle;
249
140
  return customStyle;
250
141
  });
251
- var S_SwiperLayout = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n height: 100%;\n overflow: hidden;\n width: 100%;\n\n ", ";\n ", ";\n"], ["\n height: 100%;\n overflow: hidden;\n width: 100%;\n\n ", ";\n ", ";\n"])), function (_a) {
252
- var hoverBorderStyle = _a.hoverBorderStyle;
253
- return (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", "\n "], ["\n ", "\n "])), __assign(__assign({}, hoverBorderStyle), { boxShadow: '' }));
254
- }, function (_a) {
255
- var borderStyle = _a.borderStyle;
256
- return (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n ", "\n "], ["\n ", "\n "])), __assign(__assign({}, borderStyle), { boxShadow: '' }));
257
- });
258
142
  exports.default = ContentsCarousel;
259
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
143
+ var templateObject_1, templateObject_2;
@@ -1,16 +1,11 @@
1
1
  /// <reference types="react" />
2
2
  import 'swiper/modules/navigation/navigation.min.css';
3
3
  import 'swiper/swiper-bundle.css';
4
+ import type { CoreCarouselProps } from './types';
4
5
  import type { SwiperProps, SwiperRef } from 'swiper/react/swiper-react.js';
5
6
  export interface ContentsCarouselCoreProps extends SwiperProps {
6
- scrollbar?: SwiperProps['scrollbar'];
7
+ styles: CoreCarouselProps;
7
8
  slidesPerView?: SwiperProps['slidesPerView'];
8
- slidesPerGroup?: SwiperProps['slidesPerGroup'];
9
- spaceBetween?: SwiperProps['spaceBetween'];
10
- freeMode?: SwiperProps['freeMode'];
11
- autoplay?: SwiperProps['autoplay'];
12
- useAutoplay?: boolean;
13
- loop?: SwiperProps['loop'];
14
9
  children?: React.ReactNode[] | JSX.Element;
15
10
  }
16
11
  declare const ContentsCarouselCore: import("react").ForwardRefExoticComponent<ContentsCarouselCoreProps & import("react").RefAttributes<SwiperRef>>;
@@ -38,22 +38,24 @@ require("swiper/modules/navigation/navigation.min.css");
38
38
  var react_2 = require("swiper/react");
39
39
  require("swiper/swiper-bundle.css");
40
40
  var ContentsCarouselCore = (0, react_1.forwardRef)(function (_a, ref) {
41
- var scrollbar = _a.scrollbar, slidesPerView = _a.slidesPerView, slidesPerGroup = _a.slidesPerGroup, spaceBetween = _a.spaceBetween, freeMode = _a.freeMode, autoplay = _a.autoplay, useAutoplay = _a.useAutoplay, loop = _a.loop, children = _a.children, props = __rest(_a, ["scrollbar", "slidesPerView", "slidesPerGroup", "spaceBetween", "freeMode", "autoplay", "useAutoplay", "loop", "children"]);
41
+ var styles = _a.styles, slidesPerView = _a.slidesPerView, children = _a.children, props = __rest(_a, ["styles", "slidesPerView", "children"]);
42
42
  var slidesWithEmpty = (0, react_1.useMemo)(function () {
43
43
  var childrenArray = Array.isArray(children) ? children : [children];
44
- if (slidesPerView === slidesPerGroup && slidesPerGroup && slidesPerGroup > 1) {
45
- var remainder = childrenArray.length % slidesPerGroup;
44
+ if (slidesPerView === styles.slidesPerGroup &&
45
+ styles.slidesPerGroup &&
46
+ styles.slidesPerGroup > 1) {
47
+ var remainder = childrenArray.length % styles.slidesPerGroup;
46
48
  if (remainder !== 0) {
47
- var emptyCount = slidesPerGroup - remainder;
49
+ var emptyCount = styles.slidesPerGroup - remainder;
48
50
  return __spreadArray(__spreadArray([], childrenArray, true), Array(emptyCount).fill(null), true);
49
51
  }
50
52
  }
51
53
  return childrenArray;
52
- }, [children, slidesPerView, slidesPerGroup]);
54
+ }, [children, slidesPerView, styles.slidesPerGroup]);
53
55
  return ((0, jsx_runtime_1.jsx)(react_2.Swiper, __assign({ ref: ref, style: {
54
56
  width: '100%',
55
57
  height: '100%'
56
- }, modules: [swiper_1.Pagination, swiper_1.Navigation, swiper_1.Scrollbar, swiper_1.FreeMode, swiper_1.Autoplay], slidesPerView: slidesPerView, scrollbar: scrollbar, slidesPerGroup: slidesPerGroup, spaceBetween: spaceBetween, freeMode: freeMode, autoplay: useAutoplay ? autoplay : false, loop: loop }, props, { children: slidesWithEmpty.map(function (slide, index) { return ((0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { children: slide || (0, jsx_runtime_1.jsx)("div", { className: "swiper-slide-empty" }) }, index)); }) })));
58
+ }, modules: [swiper_1.Pagination, swiper_1.Navigation, swiper_1.Scrollbar, swiper_1.FreeMode, swiper_1.Autoplay], slidesPerView: slidesPerView, scrollbar: styles.scrollbar, slidesPerGroup: styles.slidesPerGroup, spaceBetween: styles.spaceBetween, freeMode: styles.freeMode, autoplay: styles.useAutoplay ? styles.autoplay : false, loop: styles.loop }, props, { children: slidesWithEmpty.map(function (slide, index) { return ((0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { children: slide || (0, jsx_runtime_1.jsx)("div", { className: "swiper-slide-empty" }) }, index)); }) })));
57
59
  });
58
60
  ContentsCarouselCore.displayName = 'ContentsCarouselCore';
59
61
  exports.default = ContentsCarouselCore;
@@ -0,0 +1,15 @@
1
+ /// <reference types="react" />
2
+ import type { CustomNavigationProps } from '../types';
3
+ export interface CustomNavigationNextBtnProps {
4
+ isDisabled: boolean;
5
+ styles: CustomNavigationProps;
6
+ onClick?: () => void;
7
+ }
8
+ export declare const CustomNavigationNextBtn: ({ isDisabled, styles, onClick }: CustomNavigationNextBtnProps) => JSX.Element;
9
+ export interface FlexBoxProps {
10
+ direction?: 'row' | 'column';
11
+ justifyContent?: string;
12
+ alignItems?: string;
13
+ gap?: string;
14
+ }
15
+ export default CustomNavigationNextBtn;
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
+ return cooked;
5
+ };
6
+ var __assign = (this && this.__assign) || function () {
7
+ __assign = Object.assign || function(t) {
8
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
9
+ s = arguments[i];
10
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
11
+ t[p] = s[p];
12
+ }
13
+ return t;
14
+ };
15
+ return __assign.apply(this, arguments);
16
+ };
17
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
18
+ if (k2 === undefined) k2 = k;
19
+ var desc = Object.getOwnPropertyDescriptor(m, k);
20
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
21
+ desc = { enumerable: true, get: function() { return m[k]; } };
22
+ }
23
+ Object.defineProperty(o, k2, desc);
24
+ }) : (function(o, m, k, k2) {
25
+ if (k2 === undefined) k2 = k;
26
+ o[k2] = m[k];
27
+ }));
28
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
29
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
30
+ }) : function(o, v) {
31
+ o["default"] = v;
32
+ });
33
+ var __importStar = (this && this.__importStar) || function (mod) {
34
+ if (mod && mod.__esModule) return mod;
35
+ var result = {};
36
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
37
+ __setModuleDefault(result, mod);
38
+ return result;
39
+ };
40
+ Object.defineProperty(exports, "__esModule", { value: true });
41
+ exports.CustomNavigationNextBtn = void 0;
42
+ var jsx_runtime_1 = require("react/jsx-runtime");
43
+ var IconButton_1 = require("../../../../../../../../DynamicLayout/components/pdsOriginal/desktop/IconButton");
44
+ var styled_components_1 = __importStar(require("styled-components"));
45
+ var navigationConfigs_1 = require("./navigationConfigs");
46
+ var CustomNavigationNextBtn = function (_a) {
47
+ var isDisabled = _a.isDisabled, styles = _a.styles, onClick = _a.onClick;
48
+ var nextButton = styles.nextBtnType === 'NONE'
49
+ ? undefined
50
+ : navigationConfigs_1.nextButtonMappedIcons[styles.nextBtnType || 'DESIGN1'];
51
+ var buttonSize = 'large';
52
+ var iconSize = 24;
53
+ if (styles.nextBtnSize === 'SMALL') {
54
+ buttonSize = 'small';
55
+ iconSize = 16;
56
+ }
57
+ if (styles.nextBtnSize === 'LARGE') {
58
+ buttonSize = 'xxlarge';
59
+ iconSize = 48;
60
+ }
61
+ return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: nextButton && ((0, jsx_runtime_1.jsx)(S_NextButton, __assign({ className: "cb-contentscarousel-next-button", disabled: isDisabled, "$size": styles.nextBtnSize }, { children: (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { fillType: "fill", baseSize: buttonSize, iconSize: iconSize, shapeType: nextButton.shapeType, borderColorKey: nextButton.borderColorKey, overrideBaseColorHex: styles.nextBtnPrimaryColor, iconName: nextButton.iconName, iconFillType: "line", iconColorKey: nextButton.iconColorKey || 'ui_cpnt_icon_sys_black', overrideIconColorHex: styles.nextBtnSecondaryColor, shadow: nextButton.shadow, onClick: onClick }) }))) }));
62
+ };
63
+ exports.CustomNavigationNextBtn = CustomNavigationNextBtn;
64
+ var S_NextButton = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n cursor: pointer;\n\n ", ";\n"], ["\n cursor: pointer;\n\n ", ";\n"])), function (_a) {
65
+ var disabled = _a.disabled;
66
+ return disabled && (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n cursor: auto;\n opacity: 0.35;\n pointer-events: none;\n "], ["\n cursor: auto;\n opacity: 0.35;\n pointer-events: none;\n "])));
67
+ });
68
+ exports.default = exports.CustomNavigationNextBtn;
69
+ var templateObject_1, templateObject_2;
@@ -0,0 +1,15 @@
1
+ /// <reference types="react" />
2
+ import type { CustomNavigationProps } from '../types';
3
+ export interface CustomNavigationPrevBtnProps {
4
+ isDisabled: boolean;
5
+ styles: CustomNavigationProps;
6
+ onClick?: () => void;
7
+ }
8
+ export declare const CustomNavigationPrevBtn: ({ isDisabled, styles, onClick }: CustomNavigationPrevBtnProps) => JSX.Element;
9
+ export interface FlexBoxProps {
10
+ direction?: 'row' | 'column';
11
+ justifyContent?: string;
12
+ alignItems?: string;
13
+ gap?: string;
14
+ }
15
+ export default CustomNavigationPrevBtn;
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
+ return cooked;
5
+ };
6
+ var __assign = (this && this.__assign) || function () {
7
+ __assign = Object.assign || function(t) {
8
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
9
+ s = arguments[i];
10
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
11
+ t[p] = s[p];
12
+ }
13
+ return t;
14
+ };
15
+ return __assign.apply(this, arguments);
16
+ };
17
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
18
+ if (k2 === undefined) k2 = k;
19
+ var desc = Object.getOwnPropertyDescriptor(m, k);
20
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
21
+ desc = { enumerable: true, get: function() { return m[k]; } };
22
+ }
23
+ Object.defineProperty(o, k2, desc);
24
+ }) : (function(o, m, k, k2) {
25
+ if (k2 === undefined) k2 = k;
26
+ o[k2] = m[k];
27
+ }));
28
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
29
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
30
+ }) : function(o, v) {
31
+ o["default"] = v;
32
+ });
33
+ var __importStar = (this && this.__importStar) || function (mod) {
34
+ if (mod && mod.__esModule) return mod;
35
+ var result = {};
36
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
37
+ __setModuleDefault(result, mod);
38
+ return result;
39
+ };
40
+ Object.defineProperty(exports, "__esModule", { value: true });
41
+ exports.CustomNavigationPrevBtn = void 0;
42
+ var jsx_runtime_1 = require("react/jsx-runtime");
43
+ var IconButton_1 = require("../../../../../../../../DynamicLayout/components/pdsOriginal/desktop/IconButton");
44
+ var styled_components_1 = __importStar(require("styled-components"));
45
+ var navigationConfigs_1 = require("./navigationConfigs");
46
+ var CustomNavigationPrevBtn = function (_a) {
47
+ var isDisabled = _a.isDisabled, styles = _a.styles, onClick = _a.onClick;
48
+ var prevButton = styles.prevBtnType === 'NONE'
49
+ ? undefined
50
+ : navigationConfigs_1.prevButtonMappedIcons[styles.prevBtnType || 'DESIGN1'];
51
+ var buttonSize = 'large';
52
+ var iconSize = 24;
53
+ if (styles.prevBtnSize === 'SMALL') {
54
+ buttonSize = 'small';
55
+ iconSize = 16;
56
+ }
57
+ if (styles.prevBtnSize === 'LARGE') {
58
+ buttonSize = 'xxlarge';
59
+ iconSize = 48;
60
+ }
61
+ return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: prevButton && ((0, jsx_runtime_1.jsx)(S_PrevButton, __assign({ className: "cb-contentscarousel-prev-button", disabled: isDisabled, "$size": styles.prevBtnSize }, { children: (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { fillType: "fill", baseSize: buttonSize, iconSize: iconSize, shapeType: prevButton.shapeType, borderColorKey: prevButton.borderColorKey, overrideBaseColorHex: styles.prevBtnPrimaryColor, iconName: prevButton.iconName, iconFillType: "line", iconColorKey: prevButton.iconColorKey || 'ui_cpnt_icon_sys_black', overrideIconColorHex: styles.prevBtnSecondaryColor, shadow: prevButton.shadow, onClick: onClick }) }))) }));
62
+ };
63
+ exports.CustomNavigationPrevBtn = CustomNavigationPrevBtn;
64
+ var S_PrevButton = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n cursor: pointer;\n\n ", ";\n"], ["\n cursor: pointer;\n\n ", ";\n"])), function (_a) {
65
+ var disabled = _a.disabled;
66
+ return disabled && (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n cursor: auto;\n opacity: 0.35;\n pointer-events: none;\n "], ["\n cursor: auto;\n opacity: 0.35;\n pointer-events: none;\n "])));
67
+ });
68
+ exports.default = exports.CustomNavigationPrevBtn;
69
+ var templateObject_1, templateObject_2;
@@ -1,23 +1,9 @@
1
1
  /// <reference types="react" />
2
- import type { CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_PROGRESSBAR_TYPE } from '../types';
3
- export interface CustomProgressbarProps {
4
- type?: CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_PROGRESSBAR_TYPE;
5
- offset?: {
6
- top?: string;
7
- bottom?: string;
8
- left?: string;
9
- right?: string;
10
- translateX?: number;
11
- translateY?: number;
12
- transformOrigin?: string;
13
- };
14
- size?: number;
15
- primaryColor?: string;
16
- secondaryColor?: string;
17
- }
2
+ import type { CustomProgressbarProps } from '../types';
18
3
  type Props = {
4
+ styles: CustomProgressbarProps;
19
5
  progressRef: React.RefObject<number>;
20
6
  leftTimeMsRef: React.RefObject<number>;
21
- } & CustomProgressbarProps;
22
- export declare const CustomProgressbar: ({ progressRef, leftTimeMsRef, type, offset, size, primaryColor, secondaryColor }: Props) => JSX.Element;
7
+ };
8
+ export declare const CustomProgressbar: ({ styles, progressRef, leftTimeMsRef }: Props) => JSX.Element;
23
9
  export default CustomProgressbar;