pds-dev-kit-web-test 2.5.437 → 2.5.439

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 (55) hide show
  1. package/dist/src/sub/DynamicLayout/mock_contentsCarousel.js +5 -17
  2. package/dist/src/sub/DynamicLayout/mock_contentsList.js +2 -2
  3. package/dist/src/sub/DynamicLayout/mock_slideBanner.d.ts +63 -63
  4. package/dist/src/sub/DynamicLayout/mock_slideBanner.js +64 -64
  5. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarousel.js +63 -192
  6. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarouselCore.d.ts +2 -7
  7. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarouselCore.js +8 -6
  8. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomNavigationNextBtn.d.ts +15 -0
  9. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomNavigationNextBtn.js +69 -0
  10. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomNavigationPrevBtn.d.ts +15 -0
  11. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomNavigationPrevBtn.js +69 -0
  12. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomProgressbar.d.ts +4 -18
  13. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomProgressbar.js +19 -49
  14. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/progressConfigs.js +16 -16
  15. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/contentsCarouselUtils.d.ts +19 -20
  16. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/contentsCarouselUtils.js +131 -696
  17. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/hooks/useFlexGridLayout.d.ts +25 -0
  18. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/hooks/useFlexGridLayout.js +234 -0
  19. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/hooks/useSwiper.d.ts +14 -0
  20. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/hooks/useSwiper.js +46 -0
  21. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/types.d.ts +36 -2
  22. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/ContentsList.js +38 -20
  23. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/components/CustomPagination.d.ts +6 -25
  24. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/components/CustomPagination.js +21 -51
  25. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/contentsListUtils.d.ts +8 -9
  26. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/contentsListUtils.js +42 -294
  27. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/hooks/useFlexGridLayout.d.ts +23 -0
  28. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/hooks/useFlexGridLayout.js +230 -0
  29. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/types.d.ts +12 -1
  30. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/SlideBanner.js +69 -146
  31. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/SlideBannerCore.d.ts +2 -5
  32. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/SlideBannerCore.js +2 -2
  33. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomNavigationNextBtn.d.ts +15 -0
  34. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomNavigationNextBtn.js +69 -0
  35. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomNavigationPrevBtn.d.ts +15 -0
  36. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomNavigationPrevBtn.js +69 -0
  37. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomPagination.d.ts +9 -22
  38. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomPagination.js +25 -35
  39. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomProgressbar.d.ts +4 -18
  40. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomProgressbar.js +19 -49
  41. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/progressConfigs.js +8 -8
  42. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/hooks/useFlexGridLayout.d.ts +26 -0
  43. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/hooks/useFlexGridLayout.js +235 -0
  44. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/hooks/useSwiper.d.ts +16 -0
  45. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/hooks/useSwiper.js +63 -0
  46. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/slideBannerUtils.d.ts +22 -24
  47. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/slideBannerUtils.js +155 -925
  48. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/types.d.ts +46 -3
  49. package/package.json +1 -1
  50. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomNavigation.d.ts +0 -35
  51. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomNavigation.js +0 -118
  52. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomPagination.d.ts +0 -32
  53. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomPagination.js +0 -183
  54. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomNavigation.d.ts +0 -35
  55. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomNavigation.js +0 -118
@@ -0,0 +1,230 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.useFlexGridLayout = void 0;
15
+ var react_1 = require("react");
16
+ var useFlexGridLayout = function (_a) {
17
+ var paginationLocation = _a.paginationLocation;
18
+ var _b = (0, react_1.useState)({ top: 0, right: 0, bottom: 0, left: 0 }), groupSizes = _b[0], setGroupSizes = _b[1];
19
+ var _c = (0, react_1.useState)({ width: 0, height: 0 }), layoutSize = _c[0], setLayoutSize = _c[1];
20
+ var layoutRef = (0, react_1.useRef)(null);
21
+ var positionRefs = (0, react_1.useRef)({});
22
+ var components = [{ type: 'PAGINATION', position: paginationLocation }];
23
+ // 위치별로 컴포넌트 그룹화
24
+ var getComponentsByPosition = function () {
25
+ var groups = {};
26
+ components.forEach(function (component) {
27
+ if (!groups[component.position]) {
28
+ groups[component.position] = [];
29
+ }
30
+ groups[component.position].push(component);
31
+ });
32
+ return groups;
33
+ };
34
+ var componentGroups = getComponentsByPosition();
35
+ var GAP = 8;
36
+ // 위치가 어느 방향인지 판단
37
+ var getPositionDirection = function (position) {
38
+ var directions = {
39
+ OUTSET1: 'top',
40
+ OUTSET2: 'top',
41
+ OUTSET3: 'top',
42
+ OUTSET4: 'right',
43
+ OUTSET5: 'right',
44
+ OUTSET6: 'right',
45
+ OUTSET7: 'bottom',
46
+ OUTSET8: 'bottom',
47
+ OUTSET9: 'bottom',
48
+ OUTSET10: 'left',
49
+ OUTSET11: 'left',
50
+ OUTSET12: 'left',
51
+ // INSET은 CCB 내부이므로 방향 개념 없음
52
+ INSET1: 'none',
53
+ INSET2: 'none',
54
+ INSET3: 'none',
55
+ INSET4: 'none',
56
+ INSET5: 'none',
57
+ INSET6: 'none',
58
+ INSET7: 'none',
59
+ INSET8: 'none'
60
+ };
61
+ return directions[position];
62
+ };
63
+ // 위치에 따른 스타일 결정 (CCB 크기를 고려)
64
+ var getPositionStyle = function (position, ccbInset) {
65
+ var base = {
66
+ position: 'absolute',
67
+ display: 'flex',
68
+ alignItems: 'center',
69
+ justifyContent: 'center'
70
+ };
71
+ // CCB의 중앙 위치 계산
72
+ var ccbTop = parseFloat(ccbInset.top) || 0;
73
+ var ccbRight = parseFloat(ccbInset.right) || 0;
74
+ var ccbBottom = parseFloat(ccbInset.bottom) || 0;
75
+ var ccbLeft = parseFloat(ccbInset.left) || 0;
76
+ // CCB의 실제 크기와 중앙 위치 계산
77
+ var ccbWidth = layoutSize.width - ccbLeft - ccbRight;
78
+ var ccbHeight = layoutSize.height - ccbTop - ccbBottom;
79
+ var ccbCenterX = ccbLeft + ccbWidth / 2;
80
+ var ccbCenterY = ccbTop + ccbHeight / 2;
81
+ var positions = {
82
+ OUTSET1: { top: 0, left: ccbLeft },
83
+ OUTSET2: { top: 0, left: "".concat(ccbCenterX, "px"), transform: 'translateX(-50%)' },
84
+ OUTSET3: { top: 0, right: ccbRight },
85
+ OUTSET4: { top: ccbTop, right: 0 },
86
+ OUTSET5: { top: "".concat(ccbCenterY, "px"), right: 0, transform: 'translateY(-50%)' },
87
+ OUTSET6: { bottom: ccbBottom, right: 0 },
88
+ OUTSET7: { bottom: 0, right: ccbRight },
89
+ OUTSET8: { bottom: 0, left: "".concat(ccbCenterX, "px"), transform: 'translateX(-50%)' },
90
+ OUTSET9: { bottom: 0, left: ccbLeft },
91
+ OUTSET10: { bottom: ccbBottom, left: 0 },
92
+ OUTSET11: { top: "".concat(ccbCenterY, "px"), left: 0, transform: 'translateY(-50%)' },
93
+ OUTSET12: { top: ccbTop, left: 0 },
94
+ INSET1: { top: ccbTop + GAP, left: ccbLeft + GAP },
95
+ INSET2: { top: ccbTop + GAP, left: "".concat(ccbCenterX, "px"), transform: 'translateX(-50%)' },
96
+ INSET3: { top: ccbTop + GAP, right: ccbRight + GAP },
97
+ INSET4: { top: "".concat(ccbCenterY, "px"), right: ccbRight + GAP, transform: 'translateY(-50%)' },
98
+ INSET5: { bottom: ccbBottom + GAP, right: ccbRight + GAP },
99
+ INSET6: {
100
+ bottom: ccbBottom + GAP,
101
+ left: "".concat(ccbCenterX, "px"),
102
+ transform: 'translateX(-50%)'
103
+ },
104
+ INSET7: { bottom: ccbBottom + GAP, left: ccbLeft + GAP },
105
+ INSET8: { top: "".concat(ccbCenterY, "px"), left: ccbLeft + GAP, transform: 'translateY(-50%)' }
106
+ };
107
+ return __assign(__assign({}, base), positions[position]);
108
+ };
109
+ // 컴포넌트 그룹 레이아웃
110
+ var getComponentGroupLayout = function (components, position) {
111
+ var count = components.length;
112
+ var horizontals = [
113
+ 'OUTSET1',
114
+ 'OUTSET2',
115
+ 'OUTSET3',
116
+ 'OUTSET7',
117
+ 'OUTSET8',
118
+ 'OUTSET9',
119
+ 'INSET1',
120
+ 'INSET2',
121
+ 'INSET3',
122
+ 'INSET5',
123
+ 'INSET6',
124
+ 'INSET7'
125
+ ];
126
+ var isHorizontal = horizontals.includes(position);
127
+ if (count === 1) {
128
+ return { display: 'block' };
129
+ }
130
+ return {
131
+ display: 'flex',
132
+ flexDirection: isHorizontal ? 'row' : 'column',
133
+ gap: '8px',
134
+ alignItems: 'center'
135
+ };
136
+ };
137
+ // ccbInset 계산
138
+ var ccbInset = (0, react_1.useMemo)(function () {
139
+ return {
140
+ top: groupSizes.top > 0 ? "".concat(groupSizes.top + GAP, "px") : '0',
141
+ right: groupSizes.right > 0 ? "".concat(groupSizes.right + GAP, "px") : '0',
142
+ bottom: groupSizes.bottom > 0 ? "".concat(groupSizes.bottom + GAP, "px") : '0',
143
+ left: groupSizes.left > 0 ? "".concat(groupSizes.left + GAP, "px") : '0'
144
+ };
145
+ }, [groupSizes]);
146
+ // 레이아웃 크기 측정
147
+ (0, react_1.useEffect)(function () {
148
+ var measureLayout = function () {
149
+ if (layoutRef.current) {
150
+ var _a = layoutRef.current.getBoundingClientRect(), width_1 = _a.width, height_1 = _a.height;
151
+ setLayoutSize(function (prevSize) {
152
+ if (prevSize.width !== width_1 || prevSize.height !== height_1) {
153
+ return { width: width_1, height: height_1 };
154
+ }
155
+ return prevSize;
156
+ });
157
+ }
158
+ };
159
+ measureLayout();
160
+ var resizeObserver = new ResizeObserver(measureLayout);
161
+ if (layoutRef.current) {
162
+ resizeObserver.observe(layoutRef.current);
163
+ }
164
+ return function () {
165
+ resizeObserver.disconnect();
166
+ };
167
+ }, []);
168
+ // 컴포넌트 그룹의 크기 측정
169
+ (0, react_1.useEffect)(function () {
170
+ var measureGroups = function () {
171
+ var newSizes = {
172
+ top: 0,
173
+ right: 0,
174
+ bottom: 0,
175
+ left: 0
176
+ };
177
+ Object.entries(positionRefs.current).forEach(function (_a) {
178
+ var position = _a[0], ref = _a[1];
179
+ if (ref && ref.offsetHeight && ref.offsetWidth) {
180
+ var direction = getPositionDirection(position);
181
+ // INSET은 CCB 크기 계산에 영향을 주지 않음
182
+ if (direction !== 'none') {
183
+ var size = direction === 'top' || direction === 'bottom' ? ref.offsetHeight : ref.offsetWidth;
184
+ newSizes[direction] = Math.max(newSizes[direction], size);
185
+ }
186
+ }
187
+ });
188
+ // 실제로 크기가 변경되었을 때만 업데이트
189
+ setGroupSizes(function (prevSizes) {
190
+ if (prevSizes.top !== newSizes.top ||
191
+ prevSizes.right !== newSizes.right ||
192
+ prevSizes.bottom !== newSizes.bottom ||
193
+ prevSizes.left !== newSizes.left) {
194
+ return newSizes;
195
+ }
196
+ return prevSizes;
197
+ });
198
+ };
199
+ // 초기 측정을 위한 타이머
200
+ var timeoutId = setTimeout(function () {
201
+ measureGroups();
202
+ }, 0);
203
+ // ResizeObserver 설정
204
+ var resizeObserver = new ResizeObserver(function (entries) {
205
+ // 크기 변경이 실제로 일어났을 때만 측정
206
+ if (entries.length > 0) {
207
+ measureGroups();
208
+ }
209
+ });
210
+ // 현재 존재하는 ref들에 observer 연결
211
+ Object.values(positionRefs.current).forEach(function (ref) {
212
+ if (ref) {
213
+ resizeObserver.observe(ref);
214
+ }
215
+ });
216
+ return function () {
217
+ clearTimeout(timeoutId);
218
+ resizeObserver.disconnect();
219
+ };
220
+ }, [componentGroups]);
221
+ return {
222
+ layoutRef: layoutRef,
223
+ positionRefs: positionRefs,
224
+ ccbInset: ccbInset,
225
+ componentGroups: componentGroups,
226
+ getPositionStyle: getPositionStyle,
227
+ getComponentGroupLayout: getComponentGroupLayout
228
+ };
229
+ };
230
+ exports.useFlexGridLayout = useFlexGridLayout;
@@ -1,12 +1,14 @@
1
1
  import type { NUMBER_INTEGER } from '../../../../../../../DynamicLayout/sections/CustomSection/util/types';
2
2
  export type ContentsListPropsKeys = keyof CB_STYLE_PROP_CONTENTSLIST_SPECS;
3
+ export type OUTSET_POSTIION = 'OUTSET1' | 'OUTSET2' | 'OUTSET3' | 'OUTSET4' | 'OUTSET5' | 'OUTSET6' | 'OUTSET7' | 'OUTSET8' | 'OUTSET9' | 'OUTSET10' | 'OUTSET11' | 'OUTSET12';
4
+ export type INSET_POSTIION = 'INSET1' | 'INSET2' | 'INSET3' | 'INSET4' | 'INSET5' | 'INSET6' | 'INSET7' | 'INSET8';
3
5
  export type CB_STYLE_PROP_CONTENTSLIST_SPEC_STYLE_TYPE = 'DESIGN1' | 'DESIGN2' | null;
4
6
  export type CB_STYLE_PROP_CONTENTSLIST_SPEC_ITEMSPACING_TYPE = 'WIDE' | 'NORMAL' | 'NARROW' | null;
5
7
  export type CB_STYLE_PROP_CONTENTSLIST_SPEC_ITEMLINEHEIGHT_TYPE = NUMBER_INTEGER | null;
6
8
  export type CB_STYLE_PROP_CONTENTSLIST_SPEC_ITEMHEIGHTFITCONTENT_TYPE = boolean | null;
7
9
  export type CB_STYLE_PROP_CONTENTSLIST_SPEC_INFINITESCROLL_TYPE = boolean | null;
8
10
  export type CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONSTYLE_TYPE = 'NONE' | 'DESIGN1' | 'DESIGN2' | 'DESIGN3' | 'DESIGN4' | 'DESIGN5' | 'DESIGN6' | 'DESIGN7' | 'DESIGN8' | 'DESIGN9' | 'DESIGN10' | 'DESIGN11' | 'DESIGN12' | 'DESIGN13' | 'DESIGN14' | 'DESIGN15' | 'DESIGN16' | 'DESIGN17' | null;
9
- export type CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONLOCATION_TYPE = 'OUTSET1' | 'OUTSET2' | 'OUTSET3' | 'OUTSET4' | 'OUTSET5' | 'OUTSET6' | 'OUTSET7' | 'OUTSET8' | 'OUTSET9' | 'OUTSET10' | 'OUTSET11' | 'OUTSET12' | 'INSET1' | 'INSET2' | 'INSET3' | 'INSET4' | 'INSET5' | 'INSET6' | 'INSET7' | 'INSET8' | null;
11
+ export type CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONLOCATION_TYPE = OUTSET_POSTIION | INSET_POSTIION;
10
12
  export type CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONSIZE_TYPE = 'SMALL' | 'MEDIUM' | 'LARGE' | null;
11
13
  export type CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONPRIMARYCOLOR = string;
12
14
  export type CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONSECONDARYCOLOR = string;
@@ -54,3 +56,12 @@ export type CB_STYLE_PROP_CONTENTSLIST_SPECS = CB_STYLE_PROP_CONTENTSLIST_SPECS_
54
56
  'CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONSECONDARYCOLOR:MOBILE': CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONSECONDARYCOLOR;
55
57
  'CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONSECONDARYCOLOR:MOBILE:HOVER': CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONSECONDARYCOLOR;
56
58
  };
59
+ export interface CustomPaginationProps {
60
+ current?: number;
61
+ total?: number;
62
+ type?: CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONSTYLE_TYPE;
63
+ location?: OUTSET_POSTIION | INSET_POSTIION;
64
+ size?: 'SMALL' | 'MEDIUM' | 'LARGE';
65
+ primaryColor?: string;
66
+ secondaryColor?: string;
67
+ }
@@ -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,51 +24,40 @@ 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");
30
+ var CustomNavigationNextBtn_1 = require("./components/CustomNavigationNextBtn");
31
+ var CustomNavigationPrevBtn_1 = require("./components/CustomNavigationPrevBtn");
54
32
  var CustomPagination_1 = require("./components/CustomPagination");
55
33
  var CustomProgressbar_1 = require("./components/CustomProgressbar");
34
+ var useFlexGridLayout_1 = require("./hooks/useFlexGridLayout");
35
+ var useSwiper_1 = require("./hooks/useSwiper");
56
36
  var SlideBannerCore_1 = __importDefault(require("./SlideBannerCore"));
57
37
  var slideBannerUtils_1 = require("./slideBannerUtils");
58
38
  function SlideBanner(props) {
59
- var _a;
60
- var _b = (0, react_1.useContext)(dynamicLayoutContext_1.dynamicLayoutContext), device = _b.device, mode = _b.mode, queryData = _b.queryData;
61
- var index = props.index,
62
- // CONTENT : 슬라이드배너
63
- _c = props.CB_CONTENT_PROP_SLIDEBANNER, CB_CONTENT_PROP_SLIDEBANNER_SPEC_ITEMCOUNTS = _c.CB_CONTENT_PROP_SLIDEBANNER_SPEC_ITEMCOUNTS, CB_CONTENT_PROP_SLIDEBANNER_SPEC_VALUETYPE = _c.CB_CONTENT_PROP_SLIDEBANNER_SPEC_VALUETYPE, CB_CONTENT_PROP_SLIDEBANNER_SPEC_CONNECTDATA = _c.CB_CONTENT_PROP_SLIDEBANNER_SPEC_CONNECTDATA,
64
- // STYLE: 슬라이드배너
65
- CB_STYLE_PROP_SLIDEBANNER = props.CB_STYLE_PROP_SLIDEBANNER,
66
- // STYLE: 그림자
67
- CB_STYLE_PROP_SHADOW = props.CB_STYLE_PROP_SHADOW,
68
- // EFFECT: 진입
69
- CB_EFFECT_PROP_ENTANIM = props.CB_EFFECT_PROP_ENTANIM;
39
+ var _a = (0, react_1.useContext)(dynamicLayoutContext_1.dynamicLayoutContext), device = _a.device, mode = _a.mode, queryData = _a.queryData;
40
+ var index = props.index, _b = props.CB_CONTENT_PROP_SLIDEBANNER, CB_CONTENT_PROP_SLIDEBANNER_SPEC_ITEMCOUNTS = _b.CB_CONTENT_PROP_SLIDEBANNER_SPEC_ITEMCOUNTS, CB_CONTENT_PROP_SLIDEBANNER_SPEC_VALUETYPE = _b.CB_CONTENT_PROP_SLIDEBANNER_SPEC_VALUETYPE, CB_CONTENT_PROP_SLIDEBANNER_SPEC_CONNECTDATA = _b.CB_CONTENT_PROP_SLIDEBANNER_SPEC_CONNECTDATA, CB_STYLE_PROP_SLIDEBANNER = props.CB_STYLE_PROP_SLIDEBANNER, CB_STYLE_PROP_SHADOW = props.CB_STYLE_PROP_SHADOW, CB_EFFECT_PROP_ENTANIM = props.CB_EFFECT_PROP_ENTANIM;
70
41
  var compositions = props.compositions;
71
- var _d = (0, react_1.useState)(false), isHovered = _d[0], setIsHovered = _d[1];
72
- var _e = (0, react_1.useState)(1), currentSlide = _e[0], setCurrentSlide = _e[1];
73
- var _f = (0, react_1.useState)(true), isBeginning = _f[0], setIsBeginning = _f[1];
74
- var _g = (0, react_1.useState)(false), isEnd = _g[0], setIsEnd = _g[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 _h = (0, slideBannerUtils_1.parseSlideBannerStyleToSlideBannerCoreProp)({
42
+ var _c = (0, util_1.parseProperties)(props, device), style = _c.style, hoverStyle = _c.hoverStyle, layout = _c.layout, effect = _c.effect;
43
+ var _d = (0, slideBannerUtils_1.parseSlideBannerStyleToSlideBannerCoreProp)({
79
44
  props: CB_STYLE_PROP_SLIDEBANNER,
80
45
  device: device
81
- }), slideBannerNormalStyle = _h.normalStyle, slideBannerHoverStyle = _h.hoverStyle;
82
- var _j = (0, slideBannerUtils_1.parseSlideBannerStyleToCustomPaginationProp)({
46
+ }), slideBannerNormalStyle = _d.normalStyle, slideBannerHoverStyle = _d.hoverStyle;
47
+ var _e = (0, slideBannerUtils_1.parseSlideBannerStyleToCustomPaginationProp)({
83
48
  props: CB_STYLE_PROP_SLIDEBANNER,
84
49
  device: device
85
- }), customPaginationNormalStyle = _j.normalStyle, customPaginationHoverStyle = _j.hoverStyle;
86
- var _k = (0, slideBannerUtils_1.parseSlideBannerStyleToCustomNavigationProp)({
50
+ }), customPaginationNormalStyle = _e.normalStyle, customPaginationHoverStyle = _e.hoverStyle;
51
+ var _f = (0, slideBannerUtils_1.parseSlideBannerStyleToCustomNavigationProp)({
87
52
  props: CB_STYLE_PROP_SLIDEBANNER,
88
53
  device: device
89
- }), customNavigationNormalStyle = _k.normalStyle, customNavigationHoverStyle = _k.hoverStyle;
90
- var _l = (0, slideBannerUtils_1.parseSlideBannerStyleToCustomProgressbarProp)({
54
+ }), customNavigationNormalStyle = _f.normalStyle, customNavigationHoverStyle = _f.hoverStyle;
55
+ var _g = (0, slideBannerUtils_1.parseSlideBannerStyleToCustomProgressbarProp)({
91
56
  props: CB_STYLE_PROP_SLIDEBANNER,
92
57
  device: device
93
- }), customProgressbarNormalStyle = _l.normalStyle, customProgressbarHoverStyle = _l.hoverStyle;
94
- var _m = (0, util_1.parseProperties)(props, device), style = _m.style, hoverStyle = _m.hoverStyle, layout = _m.layout, effect = _m.effect;
58
+ }), customProgressbarNormalStyle = _g.normalStyle, customProgressbarHoverStyle = _g.hoverStyle;
59
+ var _h = (0, useSwiper_1.useSwiper)(), swiperRef = _h.swiperRef, progressRef = _h.progressRef, leftTimeMsRef = _h.leftTimeMsRef, currentSlide = _h.currentSlide, isBeginning = _h.isBeginning, isEnd = _h.isEnd, onSwiper = _h.onSwiper, onSlideChangeTransitionEnd = _h.onSlideChangeTransitionEnd, onAutoplayTimeLeft = _h.onAutoplayTimeLeft, onClickBullet = _h.onClickBullet, onClickPrevBtn = _h.onClickPrevBtn, onClickNextBtn = _h.onClickNextBtn;
60
+ var _j = (0, react_1.useState)(false), isHovered = _j[0], setIsHovered = _j[1];
95
61
  var loop = isHovered ? slideBannerNormalStyle.loop : slideBannerHoverStyle.loop;
96
62
  // NOTE: edit모드에서는 그리드의 이벤트만 작동하도록 CB의 포인터 이벤트는 막습니다.
97
63
  var editModeStyle = mode === 'EDIT' ? { pointerEvents: 'none' } : {};
@@ -107,109 +73,66 @@ function SlideBanner(props) {
107
73
  : CB_EFFECT_PROP_ENTANIM['CB_EFFECT_PROP_ENTANIM_SPEC_TYPE:MOBILE'] === 'NONE';
108
74
  var hasEffect = !isNoneEffectType;
109
75
  var effectVisibleStyle = hasEffect ? { opacity: isVisible ? 1 : 0 } : {};
110
- (0, react_1.useEffect)(function () {
111
- var _a, _b, _c;
112
- (_b = (_a = swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper) === null || _b === void 0 ? void 0 : _b.update();
113
- (_c = swiperRef.current) === null || _c === void 0 ? void 0 : _c.swiper.update();
114
- }, [isHovered]);
115
- var handleSwiper = function (swiper) {
116
- setIsBeginning(swiper.isBeginning);
117
- setIsEnd(swiper.isEnd);
118
- };
119
- var handleSlideChangeTransitionEnd = function (swiper) {
120
- var isLoop = swiper.params.loop || false;
121
- setIsBeginning(swiper.isBeginning);
122
- setIsEnd(swiper.isEnd);
123
- if (isLoop) {
124
- // loop 모드에서는 realIndex가 실제 슬라이드 인덱스
125
- setCurrentSlide(swiper.realIndex + 1);
126
- }
127
- else {
128
- // loop가 꺼져있을 때는 activeIndex 사용
129
- setCurrentSlide(swiper.activeIndex + 1);
130
- }
131
- };
132
- var handleAutoplayTimeLeft = (0, react_1.useCallback)(function (_, time, progress) {
133
- leftTimeMsRef.current = time;
134
- progressRef.current = progress;
135
- }, []);
136
- var handleBulletClick = function (index) {
137
- if (swiperRef.current) {
138
- swiperRef.current.swiper.slideTo(index);
139
- }
140
- };
141
- var handlePrevBtnClick = function () {
142
- if (swiperRef.current) {
143
- swiperRef.current.swiper.slidePrev();
76
+ var _k = (0, useFlexGridLayout_1.useFlexGridLayout)({
77
+ prevBtnLocation: (isHovered
78
+ ? customNavigationHoverStyle.prevBtnLocation
79
+ : customNavigationNormalStyle.prevBtnLocation) || 'OUTSET1',
80
+ nextBtnLocation: (isHovered
81
+ ? customNavigationHoverStyle.nextBtnLocation
82
+ : customNavigationNormalStyle.nextBtnLocation) || 'OUTSET1',
83
+ paginationLocation: (isHovered ? customPaginationHoverStyle.location : customPaginationNormalStyle.location) ||
84
+ 'OUTSET1',
85
+ progressBarLocation: 'INSET5' // TODO: Design별 위치 선정 필요
86
+ }), layoutRef = _k.layoutRef, positionRefs = _k.positionRefs, ccbInset = _k.ccbInset, componentGroups = _k.componentGroups, getPositionStyle = _k.getPositionStyle, getComponentGroupLayout = _k.getComponentGroupLayout;
87
+ var renderElements = function (component) {
88
+ var _a;
89
+ switch (component.type) {
90
+ case 'PREV':
91
+ return ((0, jsx_runtime_1.jsx)(CustomNavigationPrevBtn_1.CustomNavigationPrevBtn, { isDisabled: loop ? false : isBeginning, styles: isHovered ? customNavigationHoverStyle : customNavigationNormalStyle, onClick: onClickPrevBtn }));
92
+ case 'NEXT':
93
+ return ((0, jsx_runtime_1.jsx)(CustomNavigationNextBtn_1.CustomNavigationNextBtn, { isDisabled: loop ? false : isEnd, styles: isHovered ? customNavigationHoverStyle : customNavigationNormalStyle, onClick: onClickNextBtn }));
94
+ case 'PAGINATION':
95
+ return ((0, jsx_runtime_1.jsx)(CustomPagination_1.CustomPagination, { styles: isHovered ? customPaginationHoverStyle : customPaginationNormalStyle, current: currentSlide, isPrevBtnDisabled: loop ? false : isBeginning, isNextBtnDisabled: loop ? false : isEnd, total: ((_a = swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper.slides.length) || 0, onBulletClick: onClickBullet, onPrevBtnClick: onClickPrevBtn, onNextBtnClick: onClickNextBtn }));
96
+ case 'PROGRESSBAR':
97
+ return ((0, jsx_runtime_1.jsx)(CustomProgressbar_1.CustomProgressbar, { progressRef: progressRef, leftTimeMsRef: leftTimeMsRef, styles: isHovered ? customProgressbarHoverStyle : customProgressbarNormalStyle }));
98
+ default:
99
+ return null;
144
100
  }
145
101
  };
146
- var handleNextBtnClick = function () {
147
- if (swiperRef.current) {
148
- swiperRef.current.swiper.slideNext();
149
- }
150
- };
151
- 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 ? slideBannerHoverStyle === null || slideBannerHoverStyle === void 0 ? void 0 : slideBannerHoverStyle.customStyle : slideBannerNormalStyle === null || slideBannerNormalStyle === void 0 ? void 0 : slideBannerNormalStyle.customStyle }, { children: [(0, jsx_runtime_1.jsx)(S_SwiperLayout, __assign({ borderStyle: {
152
- borderBottomLeftRadius: style.borderBottomLeftRadius,
153
- borderBottomRightRadius: style.borderBottomRightRadius,
154
- borderTopLeftRadius: style.borderTopLeftRadius,
155
- borderTopRightRadius: style.borderTopRightRadius,
156
- borderWidth: style.borderWidth,
157
- borderColor: style.borderColor,
158
- borderStyle: style.borderStyle
159
- }, hoverBorderStyle: {
160
- borderBottomLeftRadius: hoverStyle.borderBottomLeftRadius,
161
- borderBottomRightRadius: hoverStyle.borderBottomRightRadius,
162
- borderTopLeftRadius: hoverStyle.borderTopLeftRadius,
163
- borderTopRightRadius: hoverStyle.borderTopRightRadius,
164
- borderWidth: hoverStyle.borderWidth,
165
- borderColor: hoverStyle.borderColor,
166
- borderStyle: hoverStyle.borderStyle
167
- } }, { children: (0, jsx_runtime_1.jsx)(SlideBannerCore_1.default, __assign({ ref: swiperRef, onSwiper: handleSwiper, onSlideChangeTransitionEnd: handleSlideChangeTransitionEnd, onAutoplayTimeLeft: handleAutoplayTimeLeft, slidesPerView: 1, scrollbar: isHovered ? slideBannerHoverStyle.scrollbar : slideBannerNormalStyle.scrollbar, freeMode: isHovered ? slideBannerHoverStyle.freeMode : slideBannerNormalStyle.freeMode, autoplay: isHovered ? slideBannerHoverStyle.autoplay : slideBannerNormalStyle.autoplay, useAutoplay: isHovered ? slideBannerHoverStyle.useAutoplay : slideBannerNormalStyle.useAutoplay, loop: isHovered ? slideBannerHoverStyle.loop : slideBannerNormalStyle.loop }, { children: (0, createCompositions_1.createCompositions)({
102
+ 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-slidebanner-layout-box", ref: layoutRef }, { children: [(0, jsx_runtime_1.jsx)(S_SwiperWrapper, __assign({ className: "cb-slidebanner-wrapper", ccbInset: ccbInset, customStyle: isHovered ? slideBannerHoverStyle === null || slideBannerHoverStyle === void 0 ? void 0 : slideBannerHoverStyle.customStyle : slideBannerNormalStyle === null || slideBannerNormalStyle === void 0 ? void 0 : slideBannerNormalStyle.customStyle }, { children: (0, jsx_runtime_1.jsx)(SlideBannerCore_1.default, __assign({ ref: swiperRef, className: "cb-slidebanner", onSwiper: onSwiper, onSlideChangeTransitionEnd: onSlideChangeTransitionEnd, onAutoplayTimeLeft: onAutoplayTimeLeft, slidesPerView: 1, styles: isHovered ? slideBannerHoverStyle : slideBannerNormalStyle }, { children: (0, createCompositions_1.createCompositions)({
168
103
  valueType: CB_CONTENT_PROP_SLIDEBANNER_SPEC_VALUETYPE,
169
104
  queryPath: CB_CONTENT_PROP_SLIDEBANNER_SPEC_CONNECTDATA,
170
105
  limit: CB_CONTENT_PROP_SLIDEBANNER_SPEC_ITEMCOUNTS,
171
106
  queryData: queryData,
172
107
  compositions: compositions
173
- }) })) })), (0, jsx_runtime_1.jsx)(CustomPagination_1.CustomPagination, { type: isHovered ? customPaginationHoverStyle.type : customPaginationNormalStyle.type, offset: isHovered ? customPaginationHoverStyle.offset : customPaginationNormalStyle.offset, primaryColor: isHovered
174
- ? customPaginationHoverStyle.primaryColor
175
- : customPaginationNormalStyle.primaryColor, secondaryColor: isHovered
176
- ? customPaginationHoverStyle.secondaryColor
177
- : customPaginationNormalStyle.secondaryColor, current: currentSlide, prevBtnDisabled: loop ? false : isBeginning, nextBtnDisabled: loop ? false : isEnd, total: (_a = swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper.slides.length, size: isHovered ? customPaginationHoverStyle.size : customPaginationNormalStyle.size, onBulletClick: handleBulletClick, onPrevBtnClick: handlePrevBtnClick, onNextBtnClick: handleNextBtnClick }), (0, jsx_runtime_1.jsx)(CustomNavigation_1.CustomNavigation, { prevBtnDisabled: isBeginning, prevBtnType: isHovered
178
- ? customNavigationHoverStyle.prevBtnType
179
- : customNavigationNormalStyle.prevBtnType, prevBtnOffset: isHovered
180
- ? customNavigationHoverStyle.prevBtnOffset
181
- : customNavigationNormalStyle.prevBtnOffset, prevBtnSize: isHovered
182
- ? customNavigationHoverStyle.prevBtnSize
183
- : customNavigationNormalStyle.prevBtnSize, prevBtnPrimaryColor: isHovered
184
- ? customNavigationHoverStyle.prevBtnPrimaryColor
185
- : customNavigationNormalStyle.prevBtnPrimaryColor, prevBtnSecondaryColor: isHovered
186
- ? customNavigationHoverStyle.prevBtnSecondaryColor
187
- : customNavigationNormalStyle.prevBtnSecondaryColor, onPrevBtnClick: handlePrevBtnClick, nextBtnDisabled: isEnd, nextBtnType: isHovered
188
- ? customNavigationHoverStyle.nextBtnType
189
- : customNavigationNormalStyle.nextBtnType, nextBtnOffset: isHovered
190
- ? customNavigationHoverStyle.nextBtnOffset
191
- : customNavigationNormalStyle.nextBtnOffset, nextBtnSize: isHovered
192
- ? customNavigationHoverStyle.nextBtnSize
193
- : customNavigationNormalStyle.nextBtnSize, nextBtnPrimaryColor: isHovered
194
- ? customNavigationHoverStyle.nextBtnPrimaryColor
195
- : customNavigationNormalStyle.nextBtnPrimaryColor, nextBtnSecondaryColor: isHovered
196
- ? customNavigationHoverStyle.nextBtnSecondaryColor
197
- : 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, offset: isHovered ? customProgressbarHoverStyle.offset : customProgressbarNormalStyle.offset, primaryColor: isHovered
198
- ? customProgressbarHoverStyle.primaryColor
199
- : customProgressbarNormalStyle.primaryColor, secondaryColor: isHovered
200
- ? customProgressbarHoverStyle.secondaryColor
201
- : customProgressbarNormalStyle.secondaryColor })] })) })) })));
108
+ }) })) })), Object.entries(componentGroups).map(function (_a) {
109
+ var position = _a[0], groupComponents = _a[1];
110
+ return ((0, jsx_runtime_1.jsx)("div", __assign({ className: "cb-slidebanner-button-group", ref: function (el) {
111
+ if (el) {
112
+ positionRefs.current[position] = el;
113
+ }
114
+ else {
115
+ delete positionRefs.current[position];
116
+ }
117
+ }, style: __assign(__assign({}, getPositionStyle(position, ccbInset)), { zIndex: 3 }) }, { children: (0, jsx_runtime_1.jsx)("div", __assign({ className: "cb-slidebanner-button-layout-box", style: getComponentGroupLayout(groupComponents, position) }, { children: groupComponents.map(function (component) { return renderElements(component); }) })) }), position));
118
+ })] })) })) })));
202
119
  }
203
- 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) {
120
+ 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"])));
121
+ 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) {
122
+ var ccbInset = _a.ccbInset;
123
+ return ccbInset.bottom;
124
+ }, function (_a) {
125
+ var ccbInset = _a.ccbInset;
126
+ return ccbInset.left;
127
+ }, function (_a) {
128
+ var ccbInset = _a.ccbInset;
129
+ return ccbInset.right;
130
+ }, function (_a) {
131
+ var ccbInset = _a.ccbInset;
132
+ return ccbInset.top;
133
+ }, function (_a) {
204
134
  var customStyle = _a.customStyle;
205
135
  return customStyle;
206
136
  });
207
- 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) {
208
- var hoverBorderStyle = _a.hoverBorderStyle;
209
- return (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", "\n "], ["\n ", "\n "])), __assign(__assign({}, hoverBorderStyle), { boxShadow: '' }));
210
- }, function (_a) {
211
- var borderStyle = _a.borderStyle;
212
- return (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n ", "\n "], ["\n ", "\n "])), __assign(__assign({}, borderStyle), { boxShadow: '' }));
213
- });
214
137
  exports.default = SlideBanner;
215
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
138
+ var templateObject_1, templateObject_2;
@@ -1,14 +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 { CoreSlideBannerProps } from './types';
4
5
  import type { SwiperProps, SwiperRef } from 'swiper/react/swiper-react.js';
5
6
  export interface SlideBannerCoreProps extends SwiperProps {
6
- scrollbar?: SwiperProps['scrollbar'];
7
+ styles: CoreSlideBannerProps;
7
8
  slidesPerView?: SwiperProps['slidesPerView'];
8
- freeMode?: SwiperProps['freeMode'];
9
- autoplay?: SwiperProps['autoplay'];
10
- useAutoplay?: boolean;
11
- loop?: SwiperProps['loop'];
12
9
  children?: React.ReactNode[] | JSX.Element;
13
10
  }
14
11
  declare const SlideBannerCore: import("react").ForwardRefExoticComponent<SlideBannerCoreProps & import("react").RefAttributes<SwiperRef>>;
@@ -29,11 +29,11 @@ require("swiper/modules/navigation/navigation.min.css");
29
29
  var react_2 = require("swiper/react");
30
30
  require("swiper/swiper-bundle.css");
31
31
  var SlideBannerCore = (0, react_1.forwardRef)(function (_a, ref) {
32
- var scrollbar = _a.scrollbar, slidesPerView = _a.slidesPerView, freeMode = _a.freeMode, autoplay = _a.autoplay, useAutoplay = _a.useAutoplay, loop = _a.loop, children = _a.children, props = __rest(_a, ["scrollbar", "slidesPerView", "freeMode", "autoplay", "useAutoplay", "loop", "children"]);
32
+ var styles = _a.styles, slidesPerView = _a.slidesPerView, children = _a.children, props = __rest(_a, ["styles", "slidesPerView", "children"]);
33
33
  return ((0, jsx_runtime_1.jsx)(react_2.Swiper, __assign({ ref: ref, style: {
34
34
  width: '100%',
35
35
  height: '100%'
36
- }, modules: [swiper_1.Pagination, swiper_1.Navigation, swiper_1.Scrollbar, swiper_1.FreeMode, swiper_1.Autoplay], slidesPerView: slidesPerView, scrollbar: scrollbar, freeMode: freeMode, autoplay: useAutoplay ? autoplay : false, loop: loop }, props, { children: Array.isArray(children) ? (children.map(function (slide, index) { return (0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { children: slide }, index); })) : ((0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { children: children })) })));
36
+ }, modules: [swiper_1.Pagination, swiper_1.Navigation, swiper_1.Scrollbar, swiper_1.FreeMode, swiper_1.Autoplay], slidesPerView: slidesPerView, scrollbar: styles.scrollbar, freeMode: styles.freeMode, autoplay: styles.useAutoplay ? styles.autoplay : false, loop: styles.loop }, props, { children: Array.isArray(children) ? (children.map(function (slide, index) { return (0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { children: slide }, index); })) : ((0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { children: children })) })));
37
37
  });
38
38
  SlideBannerCore.displayName = 'SlideBannerCore';
39
39
  exports.default = SlideBannerCore;
@@ -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;