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,26 @@
1
+ /// <reference types="react" />
2
+ import type { INSET_POSTIION, OUTSET_POSTIION } from '../types';
3
+ import type { CSSProperties } from 'styled-components';
4
+ type ElementsProps = {
5
+ type: string;
6
+ position: OUTSET_POSTIION | INSET_POSTIION;
7
+ };
8
+ export declare const useFlexGridLayout: ({ prevBtnLocation, nextBtnLocation, paginationLocation, progressBarLocation }: {
9
+ prevBtnLocation: OUTSET_POSTIION | INSET_POSTIION;
10
+ nextBtnLocation: OUTSET_POSTIION | INSET_POSTIION;
11
+ paginationLocation: OUTSET_POSTIION | INSET_POSTIION;
12
+ progressBarLocation: OUTSET_POSTIION | INSET_POSTIION;
13
+ }) => {
14
+ layoutRef: import("react").MutableRefObject<HTMLDivElement | null>;
15
+ positionRefs: import("react").MutableRefObject<Record<string, HTMLDivElement | null>>;
16
+ ccbInset: {
17
+ top: string;
18
+ right: string;
19
+ bottom: string;
20
+ left: string;
21
+ };
22
+ componentGroups: Record<string, ElementsProps[]>;
23
+ getPositionStyle: (position: string, ccbInset: Record<string, string>) => CSSProperties;
24
+ getComponentGroupLayout: (components: ElementsProps[], position: string) => CSSProperties;
25
+ };
26
+ export {};
@@ -0,0 +1,235 @@
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 prevBtnLocation = _a.prevBtnLocation, nextBtnLocation = _a.nextBtnLocation, paginationLocation = _a.paginationLocation, progressBarLocation = _a.progressBarLocation;
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 = [
23
+ { type: 'PREV', position: prevBtnLocation },
24
+ { type: 'NEXT', position: nextBtnLocation },
25
+ { type: 'PAGINATION', position: paginationLocation },
26
+ { type: 'PROGRESSBAR', position: progressBarLocation }
27
+ ];
28
+ // 위치별로 컴포넌트 그룹화
29
+ var getComponentsByPosition = function () {
30
+ var groups = {};
31
+ components.forEach(function (component) {
32
+ if (!groups[component.position]) {
33
+ groups[component.position] = [];
34
+ }
35
+ groups[component.position].push(component);
36
+ });
37
+ return groups;
38
+ };
39
+ var componentGroups = getComponentsByPosition();
40
+ var GAP = 8;
41
+ // 위치가 어느 방향인지 판단
42
+ var getPositionDirection = function (position) {
43
+ var directions = {
44
+ OUTSET1: 'top',
45
+ OUTSET2: 'top',
46
+ OUTSET3: 'top',
47
+ OUTSET4: 'right',
48
+ OUTSET5: 'right',
49
+ OUTSET6: 'right',
50
+ OUTSET7: 'bottom',
51
+ OUTSET8: 'bottom',
52
+ OUTSET9: 'bottom',
53
+ OUTSET10: 'left',
54
+ OUTSET11: 'left',
55
+ OUTSET12: 'left',
56
+ // INSET은 CCB 내부이므로 방향 개념 없음
57
+ INSET1: 'none',
58
+ INSET2: 'none',
59
+ INSET3: 'none',
60
+ INSET4: 'none',
61
+ INSET5: 'none',
62
+ INSET6: 'none',
63
+ INSET7: 'none',
64
+ INSET8: 'none'
65
+ };
66
+ return directions[position];
67
+ };
68
+ // 위치에 따른 스타일 결정 (CCB 크기를 고려)
69
+ var getPositionStyle = function (position, ccbInset) {
70
+ var base = {
71
+ position: 'absolute',
72
+ display: 'flex',
73
+ alignItems: 'center',
74
+ justifyContent: 'center'
75
+ };
76
+ // CCB의 중앙 위치 계산
77
+ var ccbTop = parseFloat(ccbInset.top) || 0;
78
+ var ccbRight = parseFloat(ccbInset.right) || 0;
79
+ var ccbBottom = parseFloat(ccbInset.bottom) || 0;
80
+ var ccbLeft = parseFloat(ccbInset.left) || 0;
81
+ // CCB의 실제 크기와 중앙 위치 계산
82
+ var ccbWidth = layoutSize.width - ccbLeft - ccbRight;
83
+ var ccbHeight = layoutSize.height - ccbTop - ccbBottom;
84
+ var ccbCenterX = ccbLeft + ccbWidth / 2;
85
+ var ccbCenterY = ccbTop + ccbHeight / 2;
86
+ var positions = {
87
+ OUTSET1: { top: 0, left: ccbLeft },
88
+ OUTSET2: { top: 0, left: "".concat(ccbCenterX, "px"), transform: 'translateX(-50%)' },
89
+ OUTSET3: { top: 0, right: ccbRight },
90
+ OUTSET4: { top: ccbTop, right: 0 },
91
+ OUTSET5: { top: "".concat(ccbCenterY, "px"), right: 0, transform: 'translateY(-50%)' },
92
+ OUTSET6: { bottom: ccbBottom, right: 0 },
93
+ OUTSET7: { bottom: 0, right: ccbRight },
94
+ OUTSET8: { bottom: 0, left: "".concat(ccbCenterX, "px"), transform: 'translateX(-50%)' },
95
+ OUTSET9: { bottom: 0, left: ccbLeft },
96
+ OUTSET10: { bottom: ccbBottom, left: 0 },
97
+ OUTSET11: { top: "".concat(ccbCenterY, "px"), left: 0, transform: 'translateY(-50%)' },
98
+ OUTSET12: { top: ccbTop, left: 0 },
99
+ INSET1: { top: ccbTop + GAP, left: ccbLeft + GAP },
100
+ INSET2: { top: ccbTop + GAP, left: "".concat(ccbCenterX, "px"), transform: 'translateX(-50%)' },
101
+ INSET3: { top: ccbTop + GAP, right: ccbRight + GAP },
102
+ INSET4: { top: "".concat(ccbCenterY, "px"), right: ccbRight + GAP, transform: 'translateY(-50%)' },
103
+ INSET5: { bottom: ccbBottom + GAP, right: ccbRight + GAP },
104
+ INSET6: {
105
+ bottom: ccbBottom + GAP,
106
+ left: "".concat(ccbCenterX, "px"),
107
+ transform: 'translateX(-50%)'
108
+ },
109
+ INSET7: { bottom: ccbBottom + GAP, left: ccbLeft + GAP },
110
+ INSET8: { top: "".concat(ccbCenterY, "px"), left: ccbLeft + GAP, transform: 'translateY(-50%)' }
111
+ };
112
+ return __assign(__assign({}, base), positions[position]);
113
+ };
114
+ // 컴포넌트 그룹 레이아웃
115
+ var getComponentGroupLayout = function (components, position) {
116
+ var count = components.length;
117
+ var horizontals = [
118
+ 'OUTSET1',
119
+ 'OUTSET2',
120
+ 'OUTSET3',
121
+ 'OUTSET7',
122
+ 'OUTSET8',
123
+ 'OUTSET9',
124
+ 'INSET1',
125
+ 'INSET2',
126
+ 'INSET3',
127
+ 'INSET5',
128
+ 'INSET6',
129
+ 'INSET7'
130
+ ];
131
+ var isHorizontal = horizontals.includes(position);
132
+ if (count === 1) {
133
+ return { display: 'block' };
134
+ }
135
+ return {
136
+ display: 'flex',
137
+ flexDirection: isHorizontal ? 'row' : 'column',
138
+ gap: '8px',
139
+ alignItems: 'center'
140
+ };
141
+ };
142
+ // ccbInset 계산
143
+ var ccbInset = (0, react_1.useMemo)(function () {
144
+ return {
145
+ top: groupSizes.top > 0 ? "".concat(groupSizes.top + GAP, "px") : '0',
146
+ right: groupSizes.right > 0 ? "".concat(groupSizes.right + GAP, "px") : '0',
147
+ bottom: groupSizes.bottom > 0 ? "".concat(groupSizes.bottom + GAP, "px") : '0',
148
+ left: groupSizes.left > 0 ? "".concat(groupSizes.left + GAP, "px") : '0'
149
+ };
150
+ }, [groupSizes]);
151
+ // 레이아웃 크기 측정
152
+ (0, react_1.useEffect)(function () {
153
+ var measureLayout = function () {
154
+ if (layoutRef.current) {
155
+ var _a = layoutRef.current.getBoundingClientRect(), width_1 = _a.width, height_1 = _a.height;
156
+ setLayoutSize(function (prevSize) {
157
+ if (prevSize.width !== width_1 || prevSize.height !== height_1) {
158
+ return { width: width_1, height: height_1 };
159
+ }
160
+ return prevSize;
161
+ });
162
+ }
163
+ };
164
+ measureLayout();
165
+ var resizeObserver = new ResizeObserver(measureLayout);
166
+ if (layoutRef.current) {
167
+ resizeObserver.observe(layoutRef.current);
168
+ }
169
+ return function () {
170
+ resizeObserver.disconnect();
171
+ };
172
+ }, []);
173
+ // 컴포넌트 그룹의 크기 측정
174
+ (0, react_1.useEffect)(function () {
175
+ var measureGroups = function () {
176
+ var newSizes = {
177
+ top: 0,
178
+ right: 0,
179
+ bottom: 0,
180
+ left: 0
181
+ };
182
+ Object.entries(positionRefs.current).forEach(function (_a) {
183
+ var position = _a[0], ref = _a[1];
184
+ if (ref && ref.offsetHeight && ref.offsetWidth) {
185
+ var direction = getPositionDirection(position);
186
+ // INSET은 CCB 크기 계산에 영향을 주지 않음
187
+ if (direction !== 'none') {
188
+ var size = direction === 'top' || direction === 'bottom' ? ref.offsetHeight : ref.offsetWidth;
189
+ newSizes[direction] = Math.max(newSizes[direction], size);
190
+ }
191
+ }
192
+ });
193
+ // 실제로 크기가 변경되었을 때만 업데이트
194
+ setGroupSizes(function (prevSizes) {
195
+ if (prevSizes.top !== newSizes.top ||
196
+ prevSizes.right !== newSizes.right ||
197
+ prevSizes.bottom !== newSizes.bottom ||
198
+ prevSizes.left !== newSizes.left) {
199
+ return newSizes;
200
+ }
201
+ return prevSizes;
202
+ });
203
+ };
204
+ // 초기 측정을 위한 타이머
205
+ var timeoutId = setTimeout(function () {
206
+ measureGroups();
207
+ }, 0);
208
+ // ResizeObserver 설정
209
+ var resizeObserver = new ResizeObserver(function (entries) {
210
+ // 크기 변경이 실제로 일어났을 때만 측정
211
+ if (entries.length > 0) {
212
+ measureGroups();
213
+ }
214
+ });
215
+ // 현재 존재하는 ref들에 observer 연결
216
+ Object.values(positionRefs.current).forEach(function (ref) {
217
+ if (ref) {
218
+ resizeObserver.observe(ref);
219
+ }
220
+ });
221
+ return function () {
222
+ clearTimeout(timeoutId);
223
+ resizeObserver.disconnect();
224
+ };
225
+ }, [componentGroups]);
226
+ return {
227
+ layoutRef: layoutRef,
228
+ positionRefs: positionRefs,
229
+ ccbInset: ccbInset,
230
+ componentGroups: componentGroups,
231
+ getPositionStyle: getPositionStyle,
232
+ getComponentGroupLayout: getComponentGroupLayout
233
+ };
234
+ };
235
+ exports.useFlexGridLayout = useFlexGridLayout;
@@ -0,0 +1,16 @@
1
+ /// <reference types="react" />
2
+ import type { SwiperClass, SwiperRef } from 'swiper/react';
3
+ export declare function useSwiper(): {
4
+ swiperRef: import("react").MutableRefObject<SwiperRef | null>;
5
+ progressRef: import("react").MutableRefObject<number>;
6
+ leftTimeMsRef: import("react").MutableRefObject<number>;
7
+ currentSlide: number;
8
+ isBeginning: boolean;
9
+ isEnd: boolean;
10
+ onSwiper: (swiper: SwiperClass) => void;
11
+ onSlideChangeTransitionEnd: (swiper: SwiperClass) => void;
12
+ onAutoplayTimeLeft: (_: SwiperClass, time: number, progress: number) => void;
13
+ onClickBullet: (index: number) => void;
14
+ onClickPrevBtn: () => void;
15
+ onClickNextBtn: () => void;
16
+ };
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useSwiper = void 0;
4
+ var react_1 = require("react");
5
+ function useSwiper() {
6
+ var _a = (0, react_1.useState)(1), currentSlide = _a[0], setCurrentSlide = _a[1];
7
+ var _b = (0, react_1.useState)(true), isBeginning = _b[0], setIsBeginning = _b[1];
8
+ var _c = (0, react_1.useState)(false), isEnd = _c[0], setIsEnd = _c[1];
9
+ var progressRef = (0, react_1.useRef)(0);
10
+ var leftTimeMsRef = (0, react_1.useRef)(0);
11
+ var swiperRef = (0, react_1.useRef)(null);
12
+ var onSwiper = function (swiper) {
13
+ setIsBeginning(swiper.isBeginning);
14
+ setIsEnd(swiper.isEnd);
15
+ };
16
+ var onSlideChangeTransitionEnd = function (swiper) {
17
+ var isLoop = swiper.params.loop || false;
18
+ setIsBeginning(swiper.isBeginning);
19
+ setIsEnd(swiper.isEnd);
20
+ if (isLoop) {
21
+ // loop 모드에서는 realIndex가 실제 슬라이드 인덱스
22
+ setCurrentSlide(swiper.realIndex + 1);
23
+ }
24
+ else {
25
+ // loop가 꺼져있을 때는 activeIndex 사용
26
+ setCurrentSlide(swiper.activeIndex + 1);
27
+ }
28
+ };
29
+ var onAutoplayTimeLeft = (0, react_1.useCallback)(function (_, time, progress) {
30
+ leftTimeMsRef.current = time;
31
+ progressRef.current = progress;
32
+ }, []);
33
+ var onClickBullet = function (index) {
34
+ if (swiperRef.current) {
35
+ swiperRef.current.swiper.slideTo(index);
36
+ }
37
+ };
38
+ var onClickPrevBtn = function () {
39
+ if (swiperRef.current) {
40
+ swiperRef.current.swiper.slidePrev();
41
+ }
42
+ };
43
+ var onClickNextBtn = function () {
44
+ if (swiperRef.current) {
45
+ swiperRef.current.swiper.slideNext();
46
+ }
47
+ };
48
+ return {
49
+ swiperRef: swiperRef,
50
+ progressRef: progressRef,
51
+ leftTimeMsRef: leftTimeMsRef,
52
+ currentSlide: currentSlide,
53
+ isBeginning: isBeginning,
54
+ isEnd: isEnd,
55
+ onSwiper: onSwiper,
56
+ onSlideChangeTransitionEnd: onSlideChangeTransitionEnd,
57
+ onAutoplayTimeLeft: onAutoplayTimeLeft,
58
+ onClickBullet: onClickBullet,
59
+ onClickPrevBtn: onClickPrevBtn,
60
+ onClickNextBtn: onClickNextBtn
61
+ };
62
+ }
63
+ exports.useSwiper = useSwiper;
@@ -1,48 +1,46 @@
1
- import { css } from 'styled-components';
2
- import type { CustomNavigationProps } from './components/CustomNavigation';
3
- import type { CustomPaginationProps } from './components/CustomPagination';
4
- import type { CustomProgressbarProps } from './components/CustomProgressbar';
5
- import type { SlideBannerCoreProps } from './SlideBannerCore';
6
- import type { CB_STYLE_PROP_SLIDEBANNER_SPECS, SlideBannerPropsKeys } from './types';
1
+ import type { CB_STYLE_PROP_SLIDEBANNER_SPECS, SlideBannerPropsKeys, CoreSlideBannerProps, CustomNavigationProps, CustomProgressbarProps, CustomPaginationProps } from './types';
7
2
  import type { Device } from '../../../../../../../DynamicLayout/sections/CustomSection/util/types';
3
+ import type { css } from 'styled-components';
8
4
  type ParseSlideBannerStyleToSlideBannerCoreProps = {
9
5
  props: CB_STYLE_PROP_SLIDEBANNER_SPECS;
10
6
  device: Device;
11
7
  };
8
+ type ParseSlideBannerStyleToCustomPaginationProps = {
9
+ props: CB_STYLE_PROP_SLIDEBANNER_SPECS;
10
+ device: Device;
11
+ };
12
+ type ParseSlideBannerStyleToCustomNavigationProps = {
13
+ props: CB_STYLE_PROP_SLIDEBANNER_SPECS;
14
+ device: Device;
15
+ };
16
+ type ParseSlideBannerStyleToCustomProgressbarProps = {
17
+ props: CB_STYLE_PROP_SLIDEBANNER_SPECS;
18
+ device: Device;
19
+ };
20
+ export declare function getSlideBannerCorePropKey(key: SlideBannerPropsKeys): keyof (CoreSlideBannerProps & {
21
+ customStyle?: ReturnType<typeof css>;
22
+ }) | null;
23
+ export declare function getCustomNavigationPropKey(key: SlideBannerPropsKeys): keyof CustomNavigationProps | null;
24
+ export declare function getCustomProgressbarPropKey(key: SlideBannerPropsKeys): keyof CustomProgressbarProps | null;
25
+ export declare function getCustomPaginationPropKey(key: SlideBannerPropsKeys): keyof CustomPaginationProps | null;
12
26
  export declare function parseSlideBannerStyleToSlideBannerCoreProp({ props, device }: ParseSlideBannerStyleToSlideBannerCoreProps): {
13
- normalStyle: SlideBannerCoreProps & {
27
+ normalStyle: CoreSlideBannerProps & {
14
28
  customStyle?: ReturnType<typeof css>;
15
29
  };
16
- hoverStyle: SlideBannerCoreProps & {
30
+ hoverStyle: CoreSlideBannerProps & {
17
31
  customStyle?: ReturnType<typeof css>;
18
32
  };
19
33
  };
20
- export declare function getSlideBannerCorePropKey(key: SlideBannerPropsKeys): "" | "loop" | "customStyle" | "useAutoplay" | "autoplayDelay";
21
- type ParseSlideBannerStyleToCustomPaginationProps = {
22
- props: CB_STYLE_PROP_SLIDEBANNER_SPECS;
23
- device: Device;
24
- };
25
34
  export declare function parseSlideBannerStyleToCustomPaginationProp({ props, device }: ParseSlideBannerStyleToCustomPaginationProps): {
26
35
  normalStyle: CustomPaginationProps;
27
36
  hoverStyle: CustomPaginationProps;
28
37
  };
29
- export declare function getCustomPaginationPropKey(key: SlideBannerPropsKeys): "" | "size" | "type" | "primaryColor" | "secondaryColor" | "offset";
30
- type ParseSlideBannerStyleToCustomNavigationProps = {
31
- props: CB_STYLE_PROP_SLIDEBANNER_SPECS;
32
- device: Device;
33
- };
34
38
  export declare function parseSlideBannerStyleToCustomNavigationProp({ props, device }: ParseSlideBannerStyleToCustomNavigationProps): {
35
39
  normalStyle: CustomNavigationProps;
36
40
  hoverStyle: CustomNavigationProps;
37
41
  };
38
- export declare function getCustomNavigationPropKey(key: SlideBannerPropsKeys): "" | "prevBtnType" | "prevBtnOffset" | "prevBtnSize" | "prevBtnPrimaryColor" | "prevBtnSecondaryColor" | "nextBtnType" | "nextBtnOffset" | "nextBtnSize" | "nextBtnPrimaryColor" | "nextBtnSecondaryColor";
39
- type ParseSlideBannerStyleToCustomProgressbarProps = {
40
- props: CB_STYLE_PROP_SLIDEBANNER_SPECS;
41
- device: Device;
42
- };
43
42
  export declare function parseSlideBannerStyleToCustomProgressbarProp({ props, device }: ParseSlideBannerStyleToCustomProgressbarProps): {
44
43
  normalStyle: CustomProgressbarProps;
45
44
  hoverStyle: CustomProgressbarProps;
46
45
  };
47
- export declare function getCustomProgressbarPropKey(key: SlideBannerPropsKeys): "" | "size" | "type" | "primaryColor" | "secondaryColor";
48
46
  export {};