pds-dev-kit-web-test 2.5.470 → 2.5.480
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.
- package/dist/src/sub/DynamicLayout/CompositionEditor/CompositionEditor.d.ts +2 -1
- package/dist/src/sub/DynamicLayout/CompositionEditor/CompositionEditor.js +49 -49
- package/dist/src/sub/DynamicLayout/DynamicLayout.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/DynamicLayout.js +3 -2
- package/dist/src/sub/DynamicLayout/components/Section/components/CustomSectionBackgroundMedia.js +24 -2
- package/dist/src/sub/DynamicLayout/components/Section/util/parseSectionBackgroundMediaData.js +3 -1
- package/dist/src/sub/DynamicLayout/mock_componentBlocks.d.ts +776 -0
- package/dist/src/sub/DynamicLayout/mock_componentBlocks.js +4236 -0
- package/dist/src/sub/DynamicLayout/mock_composition.js +6 -5
- package/dist/src/sub/DynamicLayout/mock_contentsCarousel.js +5 -17
- package/dist/src/sub/DynamicLayout/mock_contentsList.js +2 -2
- package/dist/src/sub/DynamicLayout/mock_slideBanner.d.ts +63 -63
- package/dist/src/sub/DynamicLayout/mock_slideBanner.js +65 -65
- package/dist/src/sub/DynamicLayout/mocks.js +13 -8477
- package/dist/src/sub/DynamicLayout/sections/CustomSection/CustomSection.js +3 -3
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarousel.d.ts +6 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarousel.js +76 -192
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarouselCore.d.ts +2 -7
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarouselCore.js +8 -6
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomNavigationNextBtn.d.ts +15 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomNavigationNextBtn.js +69 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomNavigationPrevBtn.d.ts +15 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomNavigationPrevBtn.js +69 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomProgressbar.d.ts +4 -18
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomProgressbar.js +19 -49
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/progressConfigs.js +16 -16
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/contentsCarouselUtils.d.ts +19 -20
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/contentsCarouselUtils.js +131 -696
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/hooks/useFlexGridLayout.d.ts +18 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/hooks/useFlexGridLayout.js +229 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/hooks/useSwiper.d.ts +14 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/hooks/useSwiper.js +46 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/types.d.ts +36 -2
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/ContentsList.d.ts +6 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/ContentsList.js +54 -20
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/components/CustomPagination.d.ts +6 -25
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/components/CustomPagination.js +21 -51
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/contentsListUtils.d.ts +8 -9
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/contentsListUtils.js +42 -294
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/hooks/useFlexGridLayout.d.ts +18 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/hooks/useFlexGridLayout.js +229 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/types.d.ts +12 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/SlideBanner.d.ts +6 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/SlideBanner.js +82 -146
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/SlideBannerCore.d.ts +2 -5
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/SlideBannerCore.js +2 -2
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomNavigationNextBtn.d.ts +15 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomNavigationNextBtn.js +69 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomNavigationPrevBtn.d.ts +15 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomNavigationPrevBtn.js +69 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomPagination.d.ts +9 -22
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomPagination.js +25 -35
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomProgressbar.d.ts +4 -18
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomProgressbar.js +19 -49
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/progressConfigs.js +8 -8
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/hooks/useFlexGridLayout.d.ts +18 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/hooks/useFlexGridLayout.js +229 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/hooks/useSwiper.d.ts +16 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/hooks/useSwiper.js +63 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/slideBannerUtils.d.ts +22 -24
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/slideBannerUtils.js +155 -925
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/types.d.ts +46 -3
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parsePlacement.d.ts +6 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parsePlacement.js +10 -5
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/types.d.ts +1 -0
- package/dist/src/sub/DynamicLayout/types.d.ts +17 -3
- package/package.json +2 -2
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomNavigation.d.ts +0 -35
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomNavigation.js +0 -118
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomPagination.d.ts +0 -32
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomPagination.js +0 -183
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomNavigation.d.ts +0 -35
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomNavigation.js +0 -118
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ContentsCarouselElementsProps } from '../ContentsCarousel';
|
|
3
|
+
import type { CSSProperties } from 'styled-components';
|
|
4
|
+
export declare const useFlexGridLayout: ({ components }: {
|
|
5
|
+
components: ContentsCarouselElementsProps[];
|
|
6
|
+
}) => {
|
|
7
|
+
layoutRef: import("react").MutableRefObject<HTMLDivElement | null>;
|
|
8
|
+
positionRefs: import("react").MutableRefObject<Record<string, HTMLDivElement | null>>;
|
|
9
|
+
ccbInset: {
|
|
10
|
+
top: string;
|
|
11
|
+
right: string;
|
|
12
|
+
bottom: string;
|
|
13
|
+
left: string;
|
|
14
|
+
};
|
|
15
|
+
componentGroups: Record<string, ContentsCarouselElementsProps[]>;
|
|
16
|
+
getPositionStyle: (position: string, ccbInset: Record<string, string>) => CSSProperties;
|
|
17
|
+
getComponentGroupLayout: (components: ContentsCarouselElementsProps[], position: string) => CSSProperties;
|
|
18
|
+
};
|
|
@@ -0,0 +1,229 @@
|
|
|
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 components = _a.components;
|
|
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
|
+
// 위치별로 컴포넌트 그룹화
|
|
23
|
+
var getComponentsByPosition = function () {
|
|
24
|
+
var groups = {};
|
|
25
|
+
components.forEach(function (component) {
|
|
26
|
+
if (!groups[component.position]) {
|
|
27
|
+
groups[component.position] = [];
|
|
28
|
+
}
|
|
29
|
+
groups[component.position].push(component);
|
|
30
|
+
});
|
|
31
|
+
return groups;
|
|
32
|
+
};
|
|
33
|
+
var componentGroups = getComponentsByPosition();
|
|
34
|
+
var GAP = 8;
|
|
35
|
+
// 위치가 어느 방향인지 판단
|
|
36
|
+
var getPositionDirection = function (position) {
|
|
37
|
+
var directions = {
|
|
38
|
+
OUTSET1: 'top',
|
|
39
|
+
OUTSET2: 'top',
|
|
40
|
+
OUTSET3: 'top',
|
|
41
|
+
OUTSET4: 'right',
|
|
42
|
+
OUTSET5: 'right',
|
|
43
|
+
OUTSET6: 'right',
|
|
44
|
+
OUTSET7: 'bottom',
|
|
45
|
+
OUTSET8: 'bottom',
|
|
46
|
+
OUTSET9: 'bottom',
|
|
47
|
+
OUTSET10: 'left',
|
|
48
|
+
OUTSET11: 'left',
|
|
49
|
+
OUTSET12: 'left',
|
|
50
|
+
// INSET은 CCB 내부이므로 방향 개념 없음
|
|
51
|
+
INSET1: 'none',
|
|
52
|
+
INSET2: 'none',
|
|
53
|
+
INSET3: 'none',
|
|
54
|
+
INSET4: 'none',
|
|
55
|
+
INSET5: 'none',
|
|
56
|
+
INSET6: 'none',
|
|
57
|
+
INSET7: 'none',
|
|
58
|
+
INSET8: 'none'
|
|
59
|
+
};
|
|
60
|
+
return directions[position];
|
|
61
|
+
};
|
|
62
|
+
// 위치에 따른 스타일 결정 (CCB 크기를 고려)
|
|
63
|
+
var getPositionStyle = function (position, ccbInset) {
|
|
64
|
+
var base = {
|
|
65
|
+
position: 'absolute',
|
|
66
|
+
display: 'flex',
|
|
67
|
+
alignItems: 'center',
|
|
68
|
+
justifyContent: 'center'
|
|
69
|
+
};
|
|
70
|
+
// CCB의 중앙 위치 계산
|
|
71
|
+
var ccbTop = parseFloat(ccbInset.top) || 0;
|
|
72
|
+
var ccbRight = parseFloat(ccbInset.right) || 0;
|
|
73
|
+
var ccbBottom = parseFloat(ccbInset.bottom) || 0;
|
|
74
|
+
var ccbLeft = parseFloat(ccbInset.left) || 0;
|
|
75
|
+
// CCB의 실제 크기와 중앙 위치 계산
|
|
76
|
+
var ccbWidth = layoutSize.width - ccbLeft - ccbRight;
|
|
77
|
+
var ccbHeight = layoutSize.height - ccbTop - ccbBottom;
|
|
78
|
+
var ccbCenterX = ccbLeft + ccbWidth / 2;
|
|
79
|
+
var ccbCenterY = ccbTop + ccbHeight / 2;
|
|
80
|
+
var positions = {
|
|
81
|
+
OUTSET1: { top: 0, left: ccbLeft },
|
|
82
|
+
OUTSET2: { top: 0, left: "".concat(ccbCenterX, "px"), transform: 'translateX(-50%)' },
|
|
83
|
+
OUTSET3: { top: 0, right: ccbRight },
|
|
84
|
+
OUTSET4: { top: ccbTop, right: 0 },
|
|
85
|
+
OUTSET5: { top: "".concat(ccbCenterY, "px"), right: 0, transform: 'translateY(-50%)' },
|
|
86
|
+
OUTSET6: { bottom: ccbBottom, right: 0 },
|
|
87
|
+
OUTSET7: { bottom: 0, right: ccbRight },
|
|
88
|
+
OUTSET8: { bottom: 0, left: "".concat(ccbCenterX, "px"), transform: 'translateX(-50%)' },
|
|
89
|
+
OUTSET9: { bottom: 0, left: ccbLeft },
|
|
90
|
+
OUTSET10: { bottom: ccbBottom, left: 0 },
|
|
91
|
+
OUTSET11: { top: "".concat(ccbCenterY, "px"), left: 0, transform: 'translateY(-50%)' },
|
|
92
|
+
OUTSET12: { top: ccbTop, left: 0 },
|
|
93
|
+
INSET1: { top: ccbTop + GAP, left: ccbLeft + GAP },
|
|
94
|
+
INSET2: { top: ccbTop + GAP, left: "".concat(ccbCenterX, "px"), transform: 'translateX(-50%)' },
|
|
95
|
+
INSET3: { top: ccbTop + GAP, right: ccbRight + GAP },
|
|
96
|
+
INSET4: { top: "".concat(ccbCenterY, "px"), right: ccbRight + GAP, transform: 'translateY(-50%)' },
|
|
97
|
+
INSET5: { bottom: ccbBottom + GAP, right: ccbRight + GAP },
|
|
98
|
+
INSET6: {
|
|
99
|
+
bottom: ccbBottom + GAP,
|
|
100
|
+
left: "".concat(ccbCenterX, "px"),
|
|
101
|
+
transform: 'translateX(-50%)'
|
|
102
|
+
},
|
|
103
|
+
INSET7: { bottom: ccbBottom + GAP, left: ccbLeft + GAP },
|
|
104
|
+
INSET8: { top: "".concat(ccbCenterY, "px"), left: ccbLeft + GAP, transform: 'translateY(-50%)' }
|
|
105
|
+
};
|
|
106
|
+
return __assign(__assign({}, base), positions[position]);
|
|
107
|
+
};
|
|
108
|
+
// 컴포넌트 그룹 레이아웃
|
|
109
|
+
var getComponentGroupLayout = function (components, position) {
|
|
110
|
+
var count = components.length;
|
|
111
|
+
var horizontals = [
|
|
112
|
+
'OUTSET1',
|
|
113
|
+
'OUTSET2',
|
|
114
|
+
'OUTSET3',
|
|
115
|
+
'OUTSET7',
|
|
116
|
+
'OUTSET8',
|
|
117
|
+
'OUTSET9',
|
|
118
|
+
'INSET1',
|
|
119
|
+
'INSET2',
|
|
120
|
+
'INSET3',
|
|
121
|
+
'INSET5',
|
|
122
|
+
'INSET6',
|
|
123
|
+
'INSET7'
|
|
124
|
+
];
|
|
125
|
+
var isHorizontal = horizontals.includes(position);
|
|
126
|
+
if (count === 1) {
|
|
127
|
+
return { display: 'block' };
|
|
128
|
+
}
|
|
129
|
+
return {
|
|
130
|
+
display: 'flex',
|
|
131
|
+
flexDirection: isHorizontal ? 'row' : 'column',
|
|
132
|
+
gap: '8px',
|
|
133
|
+
alignItems: 'center'
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
// ccbInset 계산
|
|
137
|
+
var ccbInset = (0, react_1.useMemo)(function () {
|
|
138
|
+
return {
|
|
139
|
+
top: groupSizes.top > 0 ? "".concat(groupSizes.top + GAP, "px") : '0',
|
|
140
|
+
right: groupSizes.right > 0 ? "".concat(groupSizes.right + GAP, "px") : '0',
|
|
141
|
+
bottom: groupSizes.bottom > 0 ? "".concat(groupSizes.bottom + GAP, "px") : '0',
|
|
142
|
+
left: groupSizes.left > 0 ? "".concat(groupSizes.left + GAP, "px") : '0'
|
|
143
|
+
};
|
|
144
|
+
}, [groupSizes]);
|
|
145
|
+
// 레이아웃 크기 측정
|
|
146
|
+
(0, react_1.useEffect)(function () {
|
|
147
|
+
var measureLayout = function () {
|
|
148
|
+
if (layoutRef.current) {
|
|
149
|
+
var _a = layoutRef.current.getBoundingClientRect(), width_1 = _a.width, height_1 = _a.height;
|
|
150
|
+
setLayoutSize(function (prevSize) {
|
|
151
|
+
if (prevSize.width !== width_1 || prevSize.height !== height_1) {
|
|
152
|
+
return { width: width_1, height: height_1 };
|
|
153
|
+
}
|
|
154
|
+
return prevSize;
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
measureLayout();
|
|
159
|
+
var resizeObserver = new ResizeObserver(measureLayout);
|
|
160
|
+
if (layoutRef.current) {
|
|
161
|
+
resizeObserver.observe(layoutRef.current);
|
|
162
|
+
}
|
|
163
|
+
return function () {
|
|
164
|
+
resizeObserver.disconnect();
|
|
165
|
+
};
|
|
166
|
+
}, []);
|
|
167
|
+
// 컴포넌트 그룹의 크기 측정
|
|
168
|
+
(0, react_1.useEffect)(function () {
|
|
169
|
+
var measureGroups = function () {
|
|
170
|
+
var newSizes = {
|
|
171
|
+
top: 0,
|
|
172
|
+
right: 0,
|
|
173
|
+
bottom: 0,
|
|
174
|
+
left: 0
|
|
175
|
+
};
|
|
176
|
+
Object.entries(positionRefs.current).forEach(function (_a) {
|
|
177
|
+
var position = _a[0], ref = _a[1];
|
|
178
|
+
if (ref && ref.offsetHeight && ref.offsetWidth) {
|
|
179
|
+
var direction = getPositionDirection(position);
|
|
180
|
+
// INSET은 CCB 크기 계산에 영향을 주지 않음
|
|
181
|
+
if (direction !== 'none') {
|
|
182
|
+
var size = direction === 'top' || direction === 'bottom' ? ref.offsetHeight : ref.offsetWidth;
|
|
183
|
+
newSizes[direction] = Math.max(newSizes[direction], size);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
// 실제로 크기가 변경되었을 때만 업데이트
|
|
188
|
+
setGroupSizes(function (prevSizes) {
|
|
189
|
+
if (prevSizes.top !== newSizes.top ||
|
|
190
|
+
prevSizes.right !== newSizes.right ||
|
|
191
|
+
prevSizes.bottom !== newSizes.bottom ||
|
|
192
|
+
prevSizes.left !== newSizes.left) {
|
|
193
|
+
return newSizes;
|
|
194
|
+
}
|
|
195
|
+
return prevSizes;
|
|
196
|
+
});
|
|
197
|
+
};
|
|
198
|
+
// 초기 측정을 위한 타이머
|
|
199
|
+
var timeoutId = setTimeout(function () {
|
|
200
|
+
measureGroups();
|
|
201
|
+
}, 0);
|
|
202
|
+
// ResizeObserver 설정
|
|
203
|
+
var resizeObserver = new ResizeObserver(function (entries) {
|
|
204
|
+
// 크기 변경이 실제로 일어났을 때만 측정
|
|
205
|
+
if (entries.length > 0) {
|
|
206
|
+
measureGroups();
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
// 현재 존재하는 ref들에 observer 연결
|
|
210
|
+
Object.values(positionRefs.current).forEach(function (ref) {
|
|
211
|
+
if (ref) {
|
|
212
|
+
resizeObserver.observe(ref);
|
|
213
|
+
}
|
|
214
|
+
});
|
|
215
|
+
return function () {
|
|
216
|
+
clearTimeout(timeoutId);
|
|
217
|
+
resizeObserver.disconnect();
|
|
218
|
+
};
|
|
219
|
+
}, [componentGroups]);
|
|
220
|
+
return {
|
|
221
|
+
layoutRef: layoutRef,
|
|
222
|
+
positionRefs: positionRefs,
|
|
223
|
+
ccbInset: ccbInset,
|
|
224
|
+
componentGroups: componentGroups,
|
|
225
|
+
getPositionStyle: getPositionStyle,
|
|
226
|
+
getComponentGroupLayout: getComponentGroupLayout
|
|
227
|
+
};
|
|
228
|
+
};
|
|
229
|
+
exports.useFlexGridLayout = useFlexGridLayout;
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
isBeginning: boolean;
|
|
8
|
+
isEnd: boolean;
|
|
9
|
+
onSwiper: (swiper: SwiperClass) => void;
|
|
10
|
+
onSlideChangeTransitionEnd: (swiper: SwiperClass) => void;
|
|
11
|
+
onAutoplayTimeLeft: (_: SwiperClass, time: number, progress: number) => void;
|
|
12
|
+
onClickPrevBtn: () => void;
|
|
13
|
+
onClickNextBtn: () => void;
|
|
14
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
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)(true), isBeginning = _a[0], setIsBeginning = _a[1];
|
|
7
|
+
var _b = (0, react_1.useState)(false), isEnd = _b[0], setIsEnd = _b[1];
|
|
8
|
+
var progressRef = (0, react_1.useRef)(0);
|
|
9
|
+
var leftTimeMsRef = (0, react_1.useRef)(0);
|
|
10
|
+
var swiperRef = (0, react_1.useRef)(null);
|
|
11
|
+
var onSwiper = function (swiper) {
|
|
12
|
+
setIsBeginning(swiper.isBeginning);
|
|
13
|
+
setIsEnd(swiper.isEnd);
|
|
14
|
+
};
|
|
15
|
+
var onSlideChangeTransitionEnd = function (swiper) {
|
|
16
|
+
setIsBeginning(swiper.isBeginning);
|
|
17
|
+
setIsEnd(swiper.isEnd);
|
|
18
|
+
};
|
|
19
|
+
var onAutoplayTimeLeft = (0, react_1.useCallback)(function (_, time, progress) {
|
|
20
|
+
leftTimeMsRef.current = time;
|
|
21
|
+
progressRef.current = progress;
|
|
22
|
+
}, []);
|
|
23
|
+
var onClickPrevBtn = function () {
|
|
24
|
+
if (swiperRef.current) {
|
|
25
|
+
swiperRef.current.swiper.slidePrev();
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
var onClickNextBtn = function () {
|
|
29
|
+
if (swiperRef.current) {
|
|
30
|
+
swiperRef.current.swiper.slideNext();
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
return {
|
|
34
|
+
swiperRef: swiperRef,
|
|
35
|
+
progressRef: progressRef,
|
|
36
|
+
leftTimeMsRef: leftTimeMsRef,
|
|
37
|
+
isBeginning: isBeginning,
|
|
38
|
+
isEnd: isEnd,
|
|
39
|
+
onSwiper: onSwiper,
|
|
40
|
+
onSlideChangeTransitionEnd: onSlideChangeTransitionEnd,
|
|
41
|
+
onAutoplayTimeLeft: onAutoplayTimeLeft,
|
|
42
|
+
onClickPrevBtn: onClickPrevBtn,
|
|
43
|
+
onClickNextBtn: onClickNextBtn
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
exports.useSwiper = useSwiper;
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import type { NUMBER_INTEGER } from '../../../../../../../DynamicLayout/sections/CustomSection/util/types';
|
|
2
|
+
import type { SwiperProps } from 'swiper/react';
|
|
2
3
|
export type ContentsCarouselPropsKeys = keyof CB_STYLE_PROP_CONTENTSCAROUSEL_SPECS;
|
|
4
|
+
export type OUTSET_POSTIION = 'OUTSET1' | 'OUTSET2' | 'OUTSET3' | 'OUTSET4' | 'OUTSET5' | 'OUTSET6' | 'OUTSET7' | 'OUTSET8' | 'OUTSET9' | 'OUTSET10' | 'OUTSET11' | 'OUTSET12';
|
|
5
|
+
export type INSET_POSTIION = 'INSET1' | 'INSET2' | 'INSET3' | 'INSET4' | 'INSET5' | 'INSET6' | 'INSET7' | 'INSET8';
|
|
3
6
|
export type CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_STYLE_TYPE = 'DESIGN1' | 'DESIGN2';
|
|
4
7
|
export type CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_ITEMSPACING_TYPE = 'WIDE' | 'NORMAL' | 'NARROW';
|
|
5
8
|
export type CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_ITEMCURSOR_TYPE = 'ONCE' | 'ALL' | 'SCROLL';
|
|
6
9
|
export type CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_INFINITESCROLL_TYPE = boolean;
|
|
7
10
|
export type CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_PREVBTNSTYLE_TYPE = 'NONE' | 'DESIGN1' | 'DESIGN2' | 'DESIGN3' | 'DESIGN4' | 'DESIGN5' | 'DESIGN6' | 'DESIGN7' | 'DESIGN8' | 'DESIGN9' | 'DESIGN10' | 'DESIGN11' | 'DESIGN12' | 'DESIGN13' | 'DESIGN14' | 'DESIGN15' | 'DESIGN16' | 'DESIGN17' | 'DESIGN18' | 'DESIGN19' | 'DESIGN20' | 'DESIGN21' | 'DESIGN22' | 'DESIGN23' | 'DESIGN24' | 'DESIGN25' | 'DESIGN26' | 'DESIGN27' | 'DESIGN28' | 'DESIGN29' | 'DESIGN30' | 'DESIGN31' | 'DESIGN32' | 'DESIGN33' | 'DESIGN34' | 'DESIGN35' | 'DESIGN36' | 'DESIGN37' | 'DESIGN38' | 'DESIGN39' | 'DESIGN40' | 'DESIGN41' | 'DESIGN42' | 'DESIGN43' | 'DESIGN44' | 'DESIGN45' | 'DESIGN46' | 'DESIGN47' | 'DESIGN48' | 'DESIGN49' | 'DESIGN50' | 'DESIGN51' | 'DESIGN52' | 'DESIGN53' | 'DESIGN54' | 'DESIGN55' | 'DESIGN56' | 'DESIGN57' | 'DESIGN58' | 'DESIGN59' | 'DESIGN60' | 'DESIGN61' | 'DESIGN62' | 'DESIGN63' | 'DESIGN64' | 'DESIGN65' | 'DESIGN66' | 'DESIGN67' | 'DESIGN68' | 'DESIGN69' | 'DESIGN70' | 'DESIGN71' | 'DESIGN72' | 'DESIGN73' | 'DESIGN74' | 'DESIGN75' | 'DESIGN76' | 'DESIGN77' | 'DESIGN78' | 'DESIGN79' | 'DESIGN80' | 'DESIGN81' | 'DESIGN82' | 'DESIGN83' | 'DESIGN84' | 'DESIGN85' | 'DESIGN86' | 'DESIGN87' | 'DESIGN88' | 'DESIGN89' | 'DESIGN90' | 'DESIGN91' | 'DESIGN92' | 'DESIGN93' | 'DESIGN94' | 'DESIGN95' | 'DESIGN96' | 'DESIGN97' | 'DESIGN98' | 'DESIGN99' | 'DESIGN100';
|
|
8
|
-
export type CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_PREVBTNLOCATION_TYPE =
|
|
11
|
+
export type CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_PREVBTNLOCATION_TYPE = OUTSET_POSTIION | INSET_POSTIION;
|
|
9
12
|
export type CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_PREVBTNSIZE_TYPE = 'SMALL' | 'MEDIUM' | 'LARGE';
|
|
10
13
|
export type CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_PREVBTNPRIMARYCOLOR = string;
|
|
11
14
|
export type CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_PREVBTNSECONDARYCOLOR = string;
|
|
12
15
|
export type CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_NEXTBTNSTYLE_TYPE = 'NONE' | 'DESIGN1' | 'DESIGN2' | 'DESIGN3' | 'DESIGN4' | 'DESIGN5' | 'DESIGN6' | 'DESIGN7' | 'DESIGN8' | 'DESIGN9' | 'DESIGN10' | 'DESIGN11' | 'DESIGN12' | 'DESIGN13' | 'DESIGN14' | 'DESIGN15' | 'DESIGN16' | 'DESIGN17' | 'DESIGN18' | 'DESIGN19' | 'DESIGN20' | 'DESIGN21' | 'DESIGN22' | 'DESIGN23' | 'DESIGN24' | 'DESIGN25' | 'DESIGN26' | 'DESIGN27' | 'DESIGN28' | 'DESIGN29' | 'DESIGN30' | 'DESIGN31' | 'DESIGN32' | 'DESIGN33' | 'DESIGN34' | 'DESIGN35' | 'DESIGN36' | 'DESIGN37' | 'DESIGN38' | 'DESIGN39' | 'DESIGN40' | 'DESIGN41' | 'DESIGN42' | 'DESIGN43' | 'DESIGN44' | 'DESIGN45' | 'DESIGN46' | 'DESIGN47' | 'DESIGN48' | 'DESIGN49' | 'DESIGN50' | 'DESIGN51' | 'DESIGN52' | 'DESIGN53' | 'DESIGN54' | 'DESIGN55' | 'DESIGN56' | 'DESIGN57' | 'DESIGN58' | 'DESIGN59' | 'DESIGN60' | 'DESIGN61' | 'DESIGN62' | 'DESIGN63' | 'DESIGN64' | 'DESIGN65' | 'DESIGN66' | 'DESIGN67' | 'DESIGN68' | 'DESIGN69' | 'DESIGN70' | 'DESIGN71' | 'DESIGN72' | 'DESIGN73' | 'DESIGN74' | 'DESIGN75' | 'DESIGN76' | 'DESIGN77' | 'DESIGN78' | 'DESIGN79' | 'DESIGN80' | 'DESIGN81' | 'DESIGN82' | 'DESIGN83' | 'DESIGN84' | 'DESIGN85' | 'DESIGN86' | 'DESIGN87' | 'DESIGN88' | 'DESIGN89' | 'DESIGN90' | 'DESIGN91' | 'DESIGN92' | 'DESIGN93' | 'DESIGN94' | 'DESIGN95' | 'DESIGN96' | 'DESIGN97' | 'DESIGN98' | 'DESIGN99' | 'DESIGN100';
|
|
13
|
-
export type CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_NEXTBTNLOCATION_TYPE =
|
|
16
|
+
export type CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_NEXTBTNLOCATION_TYPE = OUTSET_POSTIION | INSET_POSTIION;
|
|
14
17
|
export type CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_NEXTBTNSIZE_TYPE = 'SMALL' | 'MEDIUM' | 'LARGE';
|
|
15
18
|
export type CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_NEXTBTNPRIMARYCOLOR = string;
|
|
16
19
|
export type CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_NEXTBTNSECONDARYCOLOR = string;
|
|
@@ -103,3 +106,34 @@ export type CB_STYLE_PROP_CONTENTSCAROUSEL_SPECS = CB_STYLE_PROP_CONTENTSCAROUSE
|
|
|
103
106
|
'CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_INFINITESCROLL:MOBILE': CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_INFINITESCROLL_TYPE;
|
|
104
107
|
'CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_INFINITESCROLL:MOBILE:HOVER': CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_INFINITESCROLL_TYPE;
|
|
105
108
|
};
|
|
109
|
+
export interface CustomNavigationProps {
|
|
110
|
+
prevBtnDisabled?: boolean;
|
|
111
|
+
prevBtnType?: CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_PREVBTNSTYLE_TYPE;
|
|
112
|
+
prevBtnLocation?: OUTSET_POSTIION | INSET_POSTIION;
|
|
113
|
+
prevBtnSize?: 'SMALL' | 'MEDIUM' | 'LARGE';
|
|
114
|
+
prevBtnPrimaryColor?: string;
|
|
115
|
+
prevBtnSecondaryColor?: string;
|
|
116
|
+
nextBtnDisabled?: boolean;
|
|
117
|
+
nextBtnType?: CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_NEXTBTNSTYLE_TYPE;
|
|
118
|
+
nextBtnLocation?: OUTSET_POSTIION | INSET_POSTIION;
|
|
119
|
+
nextBtnSize?: 'SMALL' | 'MEDIUM' | 'LARGE';
|
|
120
|
+
nextBtnPrimaryColor?: string;
|
|
121
|
+
nextBtnSecondaryColor?: string;
|
|
122
|
+
onPrevBtnClick?: () => void;
|
|
123
|
+
onNextBtnClick?: () => void;
|
|
124
|
+
}
|
|
125
|
+
export interface CustomProgressbarProps {
|
|
126
|
+
type?: CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_PROGRESSBAR_TYPE;
|
|
127
|
+
size?: 'SMALL' | 'MEDIUM' | 'LARGE';
|
|
128
|
+
primaryColor?: string;
|
|
129
|
+
secondaryColor?: string;
|
|
130
|
+
}
|
|
131
|
+
export type CoreCarouselProps = {
|
|
132
|
+
scrollbar?: SwiperProps['scrollbar'];
|
|
133
|
+
slidesPerGroup?: SwiperProps['slidesPerGroup'];
|
|
134
|
+
spaceBetween?: SwiperProps['spaceBetween'];
|
|
135
|
+
freeMode?: SwiperProps['freeMode'];
|
|
136
|
+
autoplay?: SwiperProps['autoplay'];
|
|
137
|
+
useAutoplay?: boolean;
|
|
138
|
+
loop?: SwiperProps['loop'];
|
|
139
|
+
};
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import type { OUTSET_POSTIION, INSET_POSTIION } from './types';
|
|
2
3
|
import type { CB_LIST } from '../../../../../../../DynamicLayout/sections/CustomSection/types';
|
|
3
4
|
import type { CB_LIST_PROPERTIES_TYPE, IndexForIntersection } from '../../../../../../../DynamicLayout/sections/CustomSection/util/types';
|
|
4
5
|
type Props = CB_LIST_PROPERTIES_TYPE & IndexForIntersection & {
|
|
5
6
|
compositions: CB_LIST['compositions'];
|
|
6
7
|
};
|
|
8
|
+
type ComponentType = 'PAGINATION';
|
|
9
|
+
export type ContentsListElementsProps = {
|
|
10
|
+
type: ComponentType;
|
|
11
|
+
position: OUTSET_POSTIION | INSET_POSTIION;
|
|
12
|
+
};
|
|
7
13
|
declare function ContentsList(props: Props): JSX.Element;
|
|
8
14
|
export default ContentsList;
|
|
@@ -29,6 +29,21 @@ var S_CB_AnimationObserverBox_1 = require("../components/S_CB_AnimationObserverB
|
|
|
29
29
|
var S_CB_BoxWithShadow_1 = require("../components/S_CB_BoxWithShadow");
|
|
30
30
|
var CustomPagination_1 = require("./components/CustomPagination");
|
|
31
31
|
var contentsListUtils_1 = require("./contentsListUtils");
|
|
32
|
+
var useFlexGridLayout_1 = require("./hooks/useFlexGridLayout");
|
|
33
|
+
var createComponent = function (type, getDesignType, getLocation) {
|
|
34
|
+
return function (normalStyle, hoverStyle, isHovered) {
|
|
35
|
+
var normalDesign = getDesignType(normalStyle);
|
|
36
|
+
var hoverDesign = getDesignType(hoverStyle);
|
|
37
|
+
if (isHovered && hoverDesign === 'NONE')
|
|
38
|
+
return undefined;
|
|
39
|
+
if (normalDesign === 'NONE')
|
|
40
|
+
return undefined;
|
|
41
|
+
return {
|
|
42
|
+
type: type,
|
|
43
|
+
position: isHovered ? getLocation(hoverStyle) : getLocation(normalStyle)
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
};
|
|
32
47
|
function ContentsList(props) {
|
|
33
48
|
var _a, _b, _c, _d;
|
|
34
49
|
var _e = (0, react_1.useContext)(dynamicLayoutContext_1.dynamicLayoutContext), device = _e.device, mode = _e.mode, queryData = _e.queryData;
|
|
@@ -98,32 +113,51 @@ function ContentsList(props) {
|
|
|
98
113
|
var listMinHeight = oneCompositionMinHeight * numberOfRows +
|
|
99
114
|
(numberOfRows - 1) * rowGap +
|
|
100
115
|
paddingTB;
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
borderColor: hoverStyle.borderColor,
|
|
116
|
-
borderStyle: hoverStyle.borderStyle
|
|
117
|
-
} }, { children: (0, createCompositions_1.createCompositions)({
|
|
116
|
+
var createPagination = createComponent('PAGINATION', function (style) { return style.type || 'NONE'; }, function (style) { return style.location || 'OUTSET1'; });
|
|
117
|
+
var components = [
|
|
118
|
+
createPagination(paginationNormalStyle, paginationHoverStyle, isHovered)
|
|
119
|
+
].filter(function (component) { return component !== undefined; });
|
|
120
|
+
var _l = (0, useFlexGridLayout_1.useFlexGridLayout)({ components: components }), layoutRef = _l.layoutRef, positionRefs = _l.positionRefs, ccbInset = _l.ccbInset, componentGroups = _l.componentGroups, getPositionStyle = _l.getPositionStyle, getComponentGroupLayout = _l.getComponentGroupLayout;
|
|
121
|
+
var renderElements = function (component) {
|
|
122
|
+
switch (component.type) {
|
|
123
|
+
case 'PAGINATION':
|
|
124
|
+
return ((0, jsx_runtime_1.jsx)(CustomPagination_1.CustomPagination, { styles: isHovered ? paginationHoverStyle : paginationNormalStyle, current: currentPage, total: totalPage, onPageClick: handlePageClick }));
|
|
125
|
+
default:
|
|
126
|
+
return null;
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
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({ id: "contentslist-box", 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); }, "data-number-of-items": CB_CONTENT_PROP_CONTENTSLIST_SPEC_ITEMCOUNTS, "data-number-of-columns": CB_CONTENT_PROP_CONTENTSLIST_SPEC_COLUMNS, "data-row-gap": rowGap, "data-column-gap": columnGap, "data-min-width": listMinWidth, "data-min-height": listMinHeight, "data-inset-top": parseFloat(ccbInset.top), "data-inset-bottom": parseFloat(ccbInset.bottom) }, { children: (0, jsx_runtime_1.jsxs)(S_ContentsListLayout, __assign({ className: "cb-contentslist-layout-box", ref: layoutRef }, { children: [(0, jsx_runtime_1.jsx)(S_ContentsListWrapper, __assign({ className: "cb-contentslist-wrapper", ccbInset: ccbInset, contentPropCss: contentPropCss, stylePropCss: isHovered ? hoverStylePropCss : stylePropCss }, { children: (0, createCompositions_1.createCompositions)({
|
|
118
130
|
valueType: CB_CONTENT_PROP_CONTENTSLIST_SPEC_VALUETYPE,
|
|
119
131
|
queryPath: CB_CONTENT_PROP_CONTENTSLIST_SPEC_CONNECTDATA,
|
|
120
132
|
limit: CB_CONTENT_PROP_CONTENTSLIST_SPEC_ITEMCOUNTS,
|
|
121
133
|
queryData: queryData,
|
|
122
134
|
compositions: compositions
|
|
123
|
-
}).slice(startIndex, endIndex) })), (
|
|
135
|
+
}).slice(startIndex, endIndex) })), Object.entries(componentGroups).map(function (_a) {
|
|
136
|
+
var position = _a[0], groupComponents = _a[1];
|
|
137
|
+
return ((0, jsx_runtime_1.jsx)("div", __assign({ className: "cb-contentslist-button-group", ref: function (el) {
|
|
138
|
+
if (el) {
|
|
139
|
+
positionRefs.current[position] = el;
|
|
140
|
+
}
|
|
141
|
+
else {
|
|
142
|
+
delete positionRefs.current[position];
|
|
143
|
+
}
|
|
144
|
+
}, style: __assign(__assign({}, getPositionStyle(position, ccbInset)), { zIndex: 3 }) }, { children: (0, jsx_runtime_1.jsx)("div", __assign({ className: "cb-contentslist-button-layout-box", style: getComponentGroupLayout(groupComponents, position) }, { children: groupComponents.map(function (component) { return renderElements(component); }) })) }), position));
|
|
145
|
+
})] })) })) })));
|
|
124
146
|
}
|
|
125
|
-
var
|
|
126
|
-
var
|
|
147
|
+
var S_ContentsListLayout = 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"])));
|
|
148
|
+
var S_ContentsListWrapper = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n bottom: ", ";\n display: grid;\n left: ", ";\n position: absolute;\n right: ", ";\n top: ", ";\n\n ", ";\n ", ";\n"], ["\n bottom: ", ";\n display: grid;\n left: ", ";\n position: absolute;\n right: ", ";\n top: ", ";\n\n ", ";\n ", ";\n"])), function (_a) {
|
|
149
|
+
var ccbInset = _a.ccbInset;
|
|
150
|
+
return ccbInset.bottom;
|
|
151
|
+
}, function (_a) {
|
|
152
|
+
var ccbInset = _a.ccbInset;
|
|
153
|
+
return ccbInset.left;
|
|
154
|
+
}, function (_a) {
|
|
155
|
+
var ccbInset = _a.ccbInset;
|
|
156
|
+
return ccbInset.right;
|
|
157
|
+
}, function (_a) {
|
|
158
|
+
var ccbInset = _a.ccbInset;
|
|
159
|
+
return ccbInset.top;
|
|
160
|
+
}, function (_a) {
|
|
127
161
|
var contentPropCss = _a.contentPropCss;
|
|
128
162
|
return contentPropCss;
|
|
129
163
|
}, function (_a) {
|
|
@@ -1,29 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type {
|
|
3
|
-
|
|
4
|
-
current
|
|
5
|
-
total
|
|
6
|
-
|
|
7
|
-
offset?: {
|
|
8
|
-
top?: string;
|
|
9
|
-
bottom?: string;
|
|
10
|
-
left?: string;
|
|
11
|
-
right?: string;
|
|
12
|
-
translateX?: number;
|
|
13
|
-
translateY?: number;
|
|
14
|
-
transformOrigin?: string;
|
|
15
|
-
};
|
|
16
|
-
size?: number;
|
|
17
|
-
primaryColor?: string;
|
|
18
|
-
secondaryColor?: string;
|
|
19
|
-
}
|
|
20
|
-
export declare const CustomPagination: ({ current, total, type, offset, size, primaryColor, secondaryColor, onPageClick }: CustomPaginationProps & {
|
|
2
|
+
import type { CustomPaginationProps } from '../types';
|
|
3
|
+
interface Props {
|
|
4
|
+
current: number;
|
|
5
|
+
total: number;
|
|
6
|
+
styles: CustomPaginationProps;
|
|
21
7
|
onPageClick: (page: number) => void;
|
|
22
|
-
}) => JSX.Element;
|
|
23
|
-
export interface FlexBoxProps {
|
|
24
|
-
direction?: 'row' | 'column';
|
|
25
|
-
justifyContent?: string;
|
|
26
|
-
alignItems?: string;
|
|
27
|
-
gap?: string;
|
|
28
8
|
}
|
|
9
|
+
export declare const CustomPagination: ({ current, total, styles, onPageClick }: Props) => JSX.Element;
|
|
29
10
|
export default CustomPagination;
|