pds-dev-kit-web-test 2.7.245 → 2.7.247

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 (60) hide show
  1. package/dist/src/sub/DynamicLayout/CompositionEditor/CompositionEditor.js +6 -5
  2. package/dist/src/sub/DynamicLayout/CompositionRenderer/Composition.js +17 -14
  3. package/dist/src/sub/DynamicLayout/CompositionRenderer/FlexGridItemForCCB.d.ts +5 -2
  4. package/dist/src/sub/DynamicLayout/CompositionRenderer/FlexGridItemForCCB.js +10 -11
  5. package/dist/src/sub/DynamicLayout/GridAutoRowEditor/GridAutoRowEditorForComposition.d.ts +9 -0
  6. package/dist/src/sub/DynamicLayout/GridAutoRowEditor/GridAutoRowEditorForComposition.js +250 -0
  7. package/dist/src/sub/DynamicLayout/GridAutoRowEditor/{GridAutoRowEditor.js → GridAutoRowEditorForDL.js} +2 -6
  8. package/dist/src/sub/DynamicLayout/mock.json +5 -3
  9. package/dist/src/sub/DynamicLayout/mock_componentBlocks.d.ts +16 -134
  10. package/dist/src/sub/DynamicLayout/mock_componentBlocks.js +91 -3
  11. package/dist/src/sub/DynamicLayout/mock_contentsCarousel.js +6389 -6376
  12. package/dist/src/sub/DynamicLayout/mock_contentsList.js +5 -3
  13. package/dist/src/sub/DynamicLayout/mock_slideBanner.js +2 -2
  14. package/dist/src/sub/DynamicLayout/mocks.d.ts +1 -3596
  15. package/dist/src/sub/DynamicLayout/mocks.js +15 -8
  16. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Button/Button.js +32 -8
  17. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarousel.d.ts +1 -0
  18. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarousel.js +61 -34
  19. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarouselCore.js +2 -1
  20. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomNavigationNextBtn.d.ts +2 -1
  21. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomNavigationNextBtn.js +4 -4
  22. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomNavigationPrevBtn.d.ts +2 -1
  23. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomNavigationPrevBtn.js +2 -2
  24. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomProgressbar.d.ts +2 -1
  25. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomProgressbar.js +15 -12
  26. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/hooks/elementPositions.d.ts +5 -0
  27. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/hooks/elementPositions.js +243 -0
  28. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/hooks/useFlexGridLayout.d.ts +1 -1
  29. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/hooks/useFlexGridLayout.js +26 -43
  30. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/hooks/useSwiper.d.ts +1 -1
  31. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/hooks/useSwiper.js +1 -1
  32. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/ContentsList.d.ts +1 -0
  33. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/ContentsList.js +44 -18
  34. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/components/CustomPagination.d.ts +2 -1
  35. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/components/CustomPagination.js +3 -3
  36. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/contentsListUtils.d.ts +2 -1
  37. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/contentsListUtils.js +18 -7
  38. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/hooks/elementPositions.d.ts +4 -0
  39. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/hooks/elementPositions.js +108 -0
  40. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/hooks/useFlexGridLayout.d.ts +1 -2
  41. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/hooks/useFlexGridLayout.js +26 -45
  42. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/types.d.ts +1 -1
  43. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/SlideBanner.js +49 -25
  44. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomNavigationNextBtn.js +2 -2
  45. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomNavigationPrevBtn.js +4 -4
  46. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomPagination.js +2 -2
  47. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomProgressbar.d.ts +2 -1
  48. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomProgressbar.js +13 -11
  49. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/hooks/elementPositions.d.ts +1 -1
  50. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/hooks/elementPositions.js +118 -151
  51. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/hooks/useFlexGridLayout.js +10 -36
  52. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/hooks/useSwiper.d.ts +1 -1
  53. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/hooks/useSwiper.js +1 -1
  54. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Text/Text.js +21 -8
  55. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/types.d.ts +8 -3
  56. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parsePlacement.d.ts +1 -1
  57. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parsePlacement.js +2 -2
  58. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/types.d.ts +3 -1
  59. package/package.json +1 -2
  60. /package/dist/src/sub/DynamicLayout/GridAutoRowEditor/{GridAutoRowEditor.d.ts → GridAutoRowEditorForDL.d.ts} +0 -0
@@ -0,0 +1,243 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.POS_OUTSET_NAVIGATION = exports.POS_INSET = exports.getPosition = void 0;
4
+ var GAP = 8;
5
+ function getPosition(position, designType, size, elementType) {
6
+ if (position.startsWith('OUTSET')) {
7
+ if (elementType === 'GROUP') {
8
+ return POS_OUTSET_GROUP[position];
9
+ }
10
+ if (elementType === 'PROGRESSBAR') {
11
+ return exports.POS_INSET[position];
12
+ }
13
+ if (elementType === 'NEXT' || elementType === 'PREV') {
14
+ return exports.POS_OUTSET_NAVIGATION[position];
15
+ }
16
+ var val = POS_OUTSET_PAGINATION[position][designType];
17
+ return val;
18
+ // return POS_OUTSET_PAGINATION[position][designType][size];
19
+ }
20
+ if (elementType === 'GROUP') {
21
+ return exports.POS_INSET[position];
22
+ }
23
+ return {};
24
+ }
25
+ exports.getPosition = getPosition;
26
+ var POS_OUTSET_PAGINATION = {
27
+ OUTSET1: {
28
+ DESIGN1: { bottom: 15 },
29
+ DESIGN3: { bottom: 15 },
30
+ DESIGN5: { bottom: 15 },
31
+ DESIGN7: { bottom: 15 },
32
+ DESIGN9: { bottom: 15 },
33
+ DESIGN11: { bottom: 15 },
34
+ DESIGN13: { bottom: 15 },
35
+ DESIGN15: { bottom: 20 }
36
+ },
37
+ OUTSET2: {
38
+ DESIGN1: { bottom: 15 },
39
+ DESIGN3: { bottom: 15 },
40
+ DESIGN5: { bottom: 15 },
41
+ DESIGN7: { bottom: 15 },
42
+ DESIGN9: { bottom: 15 },
43
+ DESIGN11: { bottom: 15 },
44
+ DESIGN13: { bottom: 15 },
45
+ DESIGN15: { bottom: 20 }
46
+ },
47
+ OUTSET3: {
48
+ DESIGN1: { bottom: 15 },
49
+ DESIGN3: { bottom: 15 },
50
+ DESIGN5: { bottom: 15 },
51
+ DESIGN7: { bottom: 15 },
52
+ DESIGN9: { bottom: 15 },
53
+ DESIGN11: { bottom: 15 },
54
+ DESIGN13: { bottom: 15 },
55
+ DESIGN15: { bottom: 20 }
56
+ },
57
+ OUTSET4: {
58
+ DESIGN1: { left: 15 },
59
+ DESIGN3: { left: 15 },
60
+ DESIGN5: { left: 15 },
61
+ DESIGN7: { left: 15 },
62
+ DESIGN9: { left: 15 },
63
+ DESIGN11: { left: 15 },
64
+ DESIGN13: { left: 15 },
65
+ DESIGN15: { left: 15 }
66
+ },
67
+ OUTSET5: {
68
+ DESIGN1: { left: 15 },
69
+ DESIGN3: { left: 15 },
70
+ DESIGN5: { left: 15 },
71
+ DESIGN7: { left: 15 },
72
+ DESIGN9: { left: 15 },
73
+ DESIGN11: { left: 15 },
74
+ DESIGN13: { left: 15 },
75
+ DESIGN15: { left: 15 }
76
+ },
77
+ OUTSET6: {
78
+ DESIGN1: { left: 15 },
79
+ DESIGN3: { left: 15 },
80
+ DESIGN5: { left: 15 },
81
+ DESIGN7: { left: 15 },
82
+ DESIGN9: { left: 15 },
83
+ DESIGN11: { left: 15 },
84
+ DESIGN13: { left: 15 },
85
+ DESIGN15: { left: 15 }
86
+ },
87
+ OUTSET7: {
88
+ DESIGN1: { top: 15 },
89
+ DESIGN3: { top: 15 },
90
+ DESIGN5: { top: 15 },
91
+ DESIGN7: { top: 15 },
92
+ DESIGN9: { top: 15 },
93
+ DESIGN11: { top: 15 },
94
+ DESIGN13: { top: 15 },
95
+ DESIGN15: { top: 20 }
96
+ },
97
+ OUTSET8: {
98
+ DESIGN1: { top: 15 },
99
+ DESIGN3: { top: 15 },
100
+ DESIGN5: { top: 15 },
101
+ DESIGN7: { top: 15 },
102
+ DESIGN9: { top: 15 },
103
+ DESIGN11: { top: 15 },
104
+ DESIGN13: { top: 15 },
105
+ DESIGN15: { top: 20 }
106
+ },
107
+ OUTSET9: {
108
+ DESIGN1: { top: 15 },
109
+ DESIGN3: { top: 15 },
110
+ DESIGN5: { top: 15 },
111
+ DESIGN7: { top: 15 },
112
+ DESIGN9: { top: 15 },
113
+ DESIGN11: { top: 15 },
114
+ DESIGN13: { top: 15 },
115
+ DESIGN15: { top: 20 }
116
+ },
117
+ OUTSET10: {
118
+ DESIGN1: { right: 15 },
119
+ DESIGN3: { right: 15 },
120
+ DESIGN5: { right: 15 },
121
+ DESIGN7: { right: 15 },
122
+ DESIGN9: { right: 15 },
123
+ DESIGN11: { right: 15 },
124
+ DESIGN13: { right: 15 },
125
+ DESIGN15: { right: 15 }
126
+ },
127
+ OUTSET11: {
128
+ DESIGN1: { right: 15 },
129
+ DESIGN3: { right: 15 },
130
+ DESIGN5: { right: 15 },
131
+ DESIGN7: { right: 15 },
132
+ DESIGN9: { right: 15 },
133
+ DESIGN11: { right: 15 },
134
+ DESIGN13: { right: 15 },
135
+ DESIGN15: { right: 15 }
136
+ },
137
+ OUTSET12: {
138
+ DESIGN1: { right: 15 },
139
+ DESIGN3: { right: 15 },
140
+ DESIGN5: { right: 15 },
141
+ DESIGN7: { right: 15 },
142
+ DESIGN9: { right: 15 },
143
+ DESIGN11: { right: 15 },
144
+ DESIGN13: { right: 15 },
145
+ DESIGN15: { right: 15 }
146
+ }
147
+ };
148
+ exports.POS_INSET = {
149
+ INSET1: { top: GAP, left: GAP },
150
+ INSET2: { top: GAP, left: '50%', transform: 'translateX(-50%)' },
151
+ INSET3: { top: GAP, right: GAP },
152
+ INSET4: { top: '50%', right: GAP, transform: 'translateY(-50%)' },
153
+ INSET5: { bottom: GAP, right: GAP },
154
+ INSET6: { bottom: GAP, left: '50%', transform: 'translateX(-50%)' },
155
+ INSET7: { left: GAP, bottom: GAP },
156
+ INSET8: { top: '50%', left: GAP, transform: 'translateY(-50%)' }
157
+ };
158
+ exports.POS_OUTSET_NAVIGATION = {
159
+ OUTSET1: { bottom: 20 },
160
+ OUTSET2: { bottom: 20 },
161
+ OUTSET3: { bottom: 20 },
162
+ OUTSET4: { left: 20 },
163
+ OUTSET5: { left: 20 },
164
+ OUTSET6: { left: 20 },
165
+ OUTSET7: { top: 20 },
166
+ OUTSET8: { top: 20 },
167
+ OUTSET9: { top: 20 },
168
+ OUTSET10: { right: 20 },
169
+ OUTSET11: { right: 20 },
170
+ OUTSET12: { right: 20 }
171
+ };
172
+ var POS_OUTSET_GROUP = {
173
+ OUTSET1: {
174
+ top: 0,
175
+ height: 0
176
+ },
177
+ OUTSET2: {
178
+ bottom: '100%',
179
+ height: 0,
180
+ left: '50%',
181
+ transform: 'translateX(-50%)'
182
+ },
183
+ OUTSET3: {
184
+ bottom: '100%',
185
+ height: 0,
186
+ right: 0,
187
+ justifyContent: 'flex-start'
188
+ },
189
+ OUTSET4: {
190
+ top: 0,
191
+ width: 0,
192
+ right: 0
193
+ },
194
+ OUTSET5: {
195
+ top: '50%',
196
+ width: 0,
197
+ right: 0,
198
+ transform: 'translateY(-50%)'
199
+ },
200
+ OUTSET6: {
201
+ bottom: 0,
202
+ width: 0,
203
+ right: 0
204
+ },
205
+ OUTSET7: {
206
+ bottom: 0,
207
+ height: 0,
208
+ right: 0
209
+ },
210
+ OUTSET8: {
211
+ bottom: 0,
212
+ height: 0,
213
+ left: '50%',
214
+ transform: 'translateX(-50%)'
215
+ },
216
+ OUTSET9: {
217
+ bottom: 0,
218
+ height: 0,
219
+ left: 0
220
+ },
221
+ OUTSET10: {
222
+ bottom: 0,
223
+ width: 0,
224
+ left: 0
225
+ },
226
+ OUTSET11: {
227
+ top: '50%',
228
+ width: 0,
229
+ left: 0,
230
+ transform: 'translateY(-50%)'
231
+ },
232
+ OUTSET12: {
233
+ top: 0,
234
+ width: 0,
235
+ left: 0
236
+ }
237
+ };
238
+ // export const POS_OUTSET = {
239
+ // PAGINATION: POS_OUTSET_PAGINATION,
240
+ // PREV: POS_OUTSET_NAVIGATION,
241
+ // NEXT: POS_OUTSET_NAVIGATION,
242
+ // GROUP: POS_OUTSET_GROUP
243
+ // };
@@ -13,6 +13,6 @@ export declare const useFlexGridLayout: ({ components }: {
13
13
  left: string;
14
14
  };
15
15
  componentGroups: Record<string, ContentsCarouselElementsProps[]>;
16
- getPositionStyle: (position: string, ccbInset: Record<string, string>) => CSSProperties;
16
+ getPositionStyle: (position: string, ccbInset: Record<string, string>, designType: string, size: 'LARGE' | 'MEDIUM' | 'SMALL' | 'GROUP', elementType: string) => CSSProperties;
17
17
  getComponentGroupLayout: (components: ContentsCarouselElementsProps[], position: string) => CSSProperties;
18
18
  };
@@ -13,6 +13,7 @@ var __assign = (this && this.__assign) || function () {
13
13
  Object.defineProperty(exports, "__esModule", { value: true });
14
14
  exports.useFlexGridLayout = void 0;
15
15
  var react_1 = require("react");
16
+ var elementPositions_1 = require("../../SlideBanner/hooks/elementPositions");
16
17
  var useFlexGridLayout = function (_a) {
17
18
  var components = _a.components;
18
19
  var _b = (0, react_1.useState)({ top: 0, right: 0, bottom: 0, left: 0 }), groupSizes = _b[0], setGroupSizes = _b[1];
@@ -60,50 +61,33 @@ var useFlexGridLayout = function (_a) {
60
61
  return directions[position];
61
62
  };
62
63
  // 위치에 따른 스타일 결정 (CCB 크기를 고려)
63
- var getPositionStyle = function (position, ccbInset) {
64
+ var getPositionStyle = function (position, ccbInset, designType, size, elementType) {
65
+ var EAST = ['OUTSET4', 'OUTSET5', 'OUTSET6'];
66
+ var WEST = ['OUTSET10', 'OUTSET11', 'OUTSET12'];
67
+ var SOUTH = ['OUTSET7', 'OUTSET8', 'OUTSET9'];
68
+ var NORTH = ['OUTSET1', 'OUTSET2', 'OUTSET3'];
69
+ var isEAST = EAST.includes(position);
70
+ var isWEST = WEST.includes(position);
71
+ var isSOUTH = SOUTH.includes(position);
72
+ var isNORTH = NORTH.includes(position);
64
73
  var base = {
65
- position: 'absolute',
74
+ position: 'relative',
66
75
  display: 'flex',
67
- alignItems: 'center',
68
- justifyContent: 'center'
76
+ alignItems: isSOUTH ? 'flex-start' : isNORTH ? 'flex-end' : 'center',
77
+ justifyContent: isEAST ? 'flex-start' : isWEST ? 'flex-end' : 'center'
69
78
  };
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: -50, left: ccbLeft },
82
- OUTSET2: { top: -50, left: "".concat(ccbCenterX, "px"), transform: 'translateX(-50%)' },
83
- OUTSET3: { top: -50, right: ccbRight },
84
- OUTSET4: { top: ccbTop, right: -50 },
85
- OUTSET5: { top: "".concat(ccbCenterY, "px"), right: -50, transform: 'translateY(-50%)' },
86
- OUTSET6: { bottom: ccbBottom, right: -50 },
87
- OUTSET7: { bottom: -50, right: ccbRight },
88
- OUTSET8: { bottom: -50, left: "".concat(ccbCenterX, "px"), transform: 'translateX(-50%)' },
89
- OUTSET9: { bottom: -50, left: ccbLeft },
90
- OUTSET10: { bottom: ccbBottom, left: -50 },
91
- OUTSET11: { top: "".concat(ccbCenterY, "px"), left: -50, transform: 'translateY(-50%)' },
92
- OUTSET12: { top: ccbTop, left: -50 },
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]);
79
+ // // CCB의 중앙 위치 계산
80
+ // const ccbTop = parseFloat(ccbInset.top) || 0;
81
+ // const ccbRight = parseFloat(ccbInset.right) || 0;
82
+ // const ccbBottom = parseFloat(ccbInset.bottom) || 0;
83
+ // const ccbLeft = parseFloat(ccbInset.left) || 0;
84
+ // // CCB의 실제 크기와 중앙 위치 계산
85
+ // const ccbWidth = layoutSize.width - ccbLeft - ccbRight;
86
+ // const ccbHeight = layoutSize.height - ccbTop - ccbBottom;
87
+ // const ccbCenterX = ccbLeft + ccbWidth / 2;
88
+ // const ccbCenterY = ccbTop + ccbHeight / 2;
89
+ var pos = (0, elementPositions_1.getPosition)(position, designType, size, elementType);
90
+ return __assign(__assign({}, base), pos);
107
91
  };
108
92
  // 컴포넌트 그룹 레이아웃
109
93
  var getComponentGroupLayout = function (components, position) {
@@ -129,8 +113,7 @@ var useFlexGridLayout = function (_a) {
129
113
  return {
130
114
  display: 'flex',
131
115
  flexDirection: isHorizontal ? 'row' : 'column',
132
- gap: '8px',
133
- alignItems: 'center'
116
+ gap: '8px'
134
117
  };
135
118
  };
136
119
  // ccbInset 계산
@@ -8,7 +8,7 @@ export declare function useSwiper(): {
8
8
  isEnd: boolean;
9
9
  onSwiper: (swiper: SwiperClass) => void;
10
10
  onSlideChangeTransitionEnd: (swiper: SwiperClass) => void;
11
- onAutoplayTimeLeft: (_: SwiperClass, time: number, progress: number) => void;
11
+ onAutoplayTimeLeft: (swiper: SwiperClass, time: number, progress: number) => void;
12
12
  onClickPrevBtn: () => void;
13
13
  onClickNextBtn: () => void;
14
14
  };
@@ -16,7 +16,7 @@ function useSwiper() {
16
16
  setIsBeginning(swiper.isBeginning);
17
17
  setIsEnd(swiper.isEnd);
18
18
  };
19
- var onAutoplayTimeLeft = (0, react_1.useCallback)(function (_, time, progress) {
19
+ var onAutoplayTimeLeft = (0, react_1.useCallback)(function (swiper, time, progress) {
20
20
  leftTimeMsRef.current = time;
21
21
  progressRef.current = progress;
22
22
  }, []);
@@ -10,6 +10,7 @@ export type ContentsListElementsProps = {
10
10
  type: ComponentType;
11
11
  position: OUTSET_POSTIION | INSET_POSTIION;
12
12
  designType: CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONSTYLE_TYPE;
13
+ size: 'LARGE' | 'MEDIUM' | 'SMALL';
13
14
  };
14
15
  declare function ContentsList(props: Props): JSX.Element;
15
16
  export default ContentsList;
@@ -30,6 +30,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
30
30
  var jsx_runtime_1 = require("react/jsx-runtime");
31
31
  /* eslint-disable @typescript-eslint/no-unused-vars */
32
32
  var react_1 = require("react");
33
+ var react_i18next_1 = require("react-i18next");
33
34
  var CustomSectionBackgroundMedia_1 = require("../../../../../../../DynamicLayout/components/Section/components/CustomSectionBackgroundMedia");
34
35
  var createCompositions_1 = require("../../../../../../../DynamicLayout/CompositionRenderer/createCompositions");
35
36
  var dynamicLayoutContext_1 = require("../../../../../../../DynamicLayout/dynamicLayoutContext");
@@ -42,8 +43,10 @@ var S_CB_BoxWithShadow_1 = require("../components/S_CB_BoxWithShadow");
42
43
  var CustomPagination_1 = require("./components/CustomPagination");
43
44
  var contentsListUtils_1 = require("./contentsListUtils");
44
45
  var useFlexGridLayout_1 = require("./hooks/useFlexGridLayout");
45
- var createComponent = function (type, getDesignType, getLocation, designType) {
46
- return function (normalStyle, hoverStyle, isHovered) {
46
+ var createComponent = function (type, getDesignType, getLocation, designType, size) {
47
+ if (size === void 0) { size = 'MEDIUM'; }
48
+ return function (normalStyle, hoverStyle, isHovered, size) {
49
+ if (size === void 0) { size = 'MEDIUM'; }
47
50
  var normalDesign = getDesignType(normalStyle);
48
51
  var hoverDesign = getDesignType(hoverStyle);
49
52
  if (isHovered && hoverDesign === 'NONE')
@@ -53,7 +56,8 @@ var createComponent = function (type, getDesignType, getLocation, designType) {
53
56
  return {
54
57
  type: type,
55
58
  position: isHovered ? getLocation(hoverStyle) : getLocation(normalStyle),
56
- designType: designType
59
+ designType: designType,
60
+ size: size
57
61
  };
58
62
  };
59
63
  };
@@ -61,20 +65,26 @@ function ContentsList(props) {
61
65
  var _a, _b, _c, _d, _e, _f;
62
66
  var _g = (0, react_1.useContext)(dynamicLayoutContext_1.dynamicLayoutContext), device = _g.device, mode = _g.mode, queryData = _g.queryData;
63
67
  var index = props.index, compositions = props.compositions, CB_CONTENT_PROP_CONTENTSLIST = props.CB_CONTENT_PROP_CONTENTSLIST, CB_STYLE_PROP_CONTENTSLISTDESIGN = props.CB_STYLE_PROP_CONTENTSLISTDESIGN, CB_STYLE_PROP_CONTENTSLISTPAGINATION = props.CB_STYLE_PROP_CONTENTSLISTPAGINATION, CB_STYLE_PROP_SHADOW = props.CB_STYLE_PROP_SHADOW, CB_EFFECT_PROP_ENTANIM = props.CB_EFFECT_PROP_ENTANIM, CB_LAYOUT_PROP_PADDING = props.CB_LAYOUT_PROP_PADDING, CB_STYLE_PROP_BGMEDIA = props.CB_STYLE_PROP_BGMEDIA, CB_STYLE_PROP_BGOVERLAY = props.CB_STYLE_PROP_BGOVERLAY;
64
- var CB_CONTENT_PROP_CONTENTSLIST_SPEC_ITEMCOUNTS = CB_CONTENT_PROP_CONTENTSLIST.CB_CONTENT_PROP_CONTENTSLIST_SPEC_ITEMCOUNTS, CB_CONTENT_PROP_CONTENTSLIST_SPEC_DISPLAYCOUNTS = CB_CONTENT_PROP_CONTENTSLIST.CB_CONTENT_PROP_CONTENTSLIST_SPEC_DISPLAYCOUNTS, CB_CONTENT_PROP_CONTENTSLIST_SPEC_VALUETYPE = CB_CONTENT_PROP_CONTENTSLIST.CB_CONTENT_PROP_CONTENTSLIST_SPEC_VALUETYPE, CB_CONTENT_PROP_CONTENTSLIST_SPEC_CONNECTDATA = CB_CONTENT_PROP_CONTENTSLIST.CB_CONTENT_PROP_CONTENTSLIST_SPEC_CONNECTDATA, CB_CONTENT_PROP_CONTENTSLIST_SPEC_COLUMNS = CB_CONTENT_PROP_CONTENTSLIST.CB_CONTENT_PROP_CONTENTSLIST_SPEC_COLUMNS, CB_CONTENT_PROP_CONTENTSLIST_SPEC_MANUALITEMS = CB_CONTENT_PROP_CONTENTSLIST.CB_CONTENT_PROP_CONTENTSLIST_SPEC_MANUALITEMS;
68
+ var CB_CONTENT_PROP_CONTENTSLIST_SPEC_ITEMCOUNTS = CB_CONTENT_PROP_CONTENTSLIST.CB_CONTENT_PROP_CONTENTSLIST_SPEC_ITEMCOUNTS, CB_CONTENT_PROP_CONTENTSLIST_SPEC_DISPLAYCOUNTS = CB_CONTENT_PROP_CONTENTSLIST.CB_CONTENT_PROP_CONTENTSLIST_SPEC_DISPLAYCOUNTS, CB_CONTENT_PROP_CONTENTSLIST_SPEC_MDISPLAYCOUNTS = CB_CONTENT_PROP_CONTENTSLIST.CB_CONTENT_PROP_CONTENTSLIST_SPEC_MDISPLAYCOUNTS, CB_CONTENT_PROP_CONTENTSLIST_SPEC_VALUETYPE = CB_CONTENT_PROP_CONTENTSLIST.CB_CONTENT_PROP_CONTENTSLIST_SPEC_VALUETYPE, CB_CONTENT_PROP_CONTENTSLIST_SPEC_CONNECTDATA = CB_CONTENT_PROP_CONTENTSLIST.CB_CONTENT_PROP_CONTENTSLIST_SPEC_CONNECTDATA, CB_CONTENT_PROP_CONTENTSLIST_SPEC_COLUMNS = CB_CONTENT_PROP_CONTENTSLIST.CB_CONTENT_PROP_CONTENTSLIST_SPEC_COLUMNS, CB_CONTENT_PROP_CONTENTSLIST_SPEC_MANUALITEMS = CB_CONTENT_PROP_CONTENTSLIST.CB_CONTENT_PROP_CONTENTSLIST_SPEC_MANUALITEMS, CB_CONTENT_PROP_CONTENTSLIST_SPEC_MCOLUMNS = CB_CONTENT_PROP_CONTENTSLIST.CB_CONTENT_PROP_CONTENTSLIST_SPEC_MCOLUMNS;
65
69
  var _h = (0, react_1.useState)(false), isHovered = _h[0], setIsHovered = _h[1];
66
70
  var _j = (0, react_1.useState)(1), currentPage = _j[0], setCurrentPage = _j[1];
67
71
  var parsedQueryPath = removeFirstSegment(CB_CONTENT_PROP_CONTENTSLIST_SPEC_CONNECTDATA);
68
72
  var queryDataValue = queryData === null || queryData === void 0 ? void 0 : queryData[parsedQueryPath];
69
- var displayCounts = CB_CONTENT_PROP_CONTENTSLIST_SPEC_DISPLAYCOUNTS !== null && CB_CONTENT_PROP_CONTENTSLIST_SPEC_DISPLAYCOUNTS !== void 0 ? CB_CONTENT_PROP_CONTENTSLIST_SPEC_DISPLAYCOUNTS : CB_CONTENT_PROP_CONTENTSLIST_SPEC_MANUALITEMS.length;
73
+ // list의 minheight / minwidth를 계산
74
+ var numberOfColumns = device === 'DESKTOP'
75
+ ? CB_CONTENT_PROP_CONTENTSLIST_SPEC_COLUMNS
76
+ : CB_CONTENT_PROP_CONTENTSLIST_SPEC_MCOLUMNS;
77
+ var displayCounts = device === 'DESKTOP'
78
+ ? CB_CONTENT_PROP_CONTENTSLIST_SPEC_DISPLAYCOUNTS
79
+ : CB_CONTENT_PROP_CONTENTSLIST_SPEC_MDISPLAYCOUNTS !== null && CB_CONTENT_PROP_CONTENTSLIST_SPEC_MDISPLAYCOUNTS !== void 0 ? CB_CONTENT_PROP_CONTENTSLIST_SPEC_MDISPLAYCOUNTS : CB_CONTENT_PROP_CONTENTSLIST_SPEC_MANUALITEMS.length;
70
80
  var totalPage = Math.ceil((CB_CONTENT_PROP_CONTENTSLIST_SPEC_VALUETYPE === 'DATA' && queryDataValue
71
81
  ? queryDataValue === null || queryDataValue === void 0 ? void 0 : queryDataValue.length
72
- : CB_CONTENT_PROP_CONTENTSLIST_SPEC_MANUALITEMS.length) /
73
- CB_CONTENT_PROP_CONTENTSLIST_SPEC_DISPLAYCOUNTS);
82
+ : CB_CONTENT_PROP_CONTENTSLIST_SPEC_MANUALITEMS.length) / displayCounts);
74
83
  var CB_STYLE_PROP_CONTENTSLIST = __assign(__assign({}, CB_STYLE_PROP_CONTENTSLISTDESIGN), CB_STYLE_PROP_CONTENTSLISTPAGINATION);
75
84
  var _k = (0, util_1.parseProperties)(props, device), style = _k.style, hoverStyle = _k.hoverStyle, layout = _k.layout, effect = _k.effect, overlayStyle = _k.overlayStyle;
76
85
  var contentPropCss = (0, contentsListUtils_1.parseGridContentProp)({
77
- props: CB_CONTENT_PROP_CONTENTSLIST
86
+ props: CB_CONTENT_PROP_CONTENTSLIST,
87
+ device: device
78
88
  }).contentPropCss;
79
89
  var _l = (0, contentsListUtils_1.parseGridStyleProp)({
80
90
  props: CB_STYLE_PROP_CONTENTSLIST,
@@ -102,11 +112,8 @@ function ContentsList(props) {
102
112
  var handlePageClick = function (page) {
103
113
  setCurrentPage(page);
104
114
  };
105
- // CB_CONTENT_PROP_CONTENTSLIST_SPEC_DISPLAYCOUNTS ?? CB_CONTENT_PROP_CONTENTSLIST_SPEC_ITEMCOUNTS;
106
115
  var startIndex = (currentPage - 1) * displayCounts;
107
116
  var endIndex = startIndex + (displayCounts - 1);
108
- // list의 minheight / minwidth를 계산
109
- var numberOfColumns = CB_CONTENT_PROP_CONTENTSLIST_SPEC_COLUMNS;
110
117
  // NOTE: edit환경에서 hover가 작동하지 않아서 제외함 필요시 추가..
111
118
  var columnGapEnum = device === 'DESKTOP'
112
119
  ? CB_STYLE_PROP_CONTENTSLIST.CB_STYLE_PROP_CONTENTSLISTDESIGN_SPEC_ITEMSPACING
@@ -131,7 +138,7 @@ function ContentsList(props) {
131
138
  var listMinHeight = oneCompositionMinHeight * numberOfRows +
132
139
  (numberOfRows - 1) * rowGap +
133
140
  paddingTB;
134
- var createPagination = createComponent('PAGINATION', function (style) { return style.type || 'NONE'; }, function (style) { return style.location || 'OUTSET1'; }, paginationNormalStyle.type || 'NONE');
141
+ var createPagination = createComponent('PAGINATION', function (style) { return style.type || 'NONE'; }, function (style) { return style.location || 'OUTSET1'; }, paginationNormalStyle.type || 'NONE', paginationNormalStyle.size || 'MEDIUM');
135
142
  var components = [
136
143
  createPagination(paginationNormalStyle, paginationHoverStyle, isHovered)
137
144
  ].filter(function (component) { return component !== undefined; });
@@ -144,10 +151,10 @@ function ContentsList(props) {
144
151
  bottom: '0px',
145
152
  left: '0px'
146
153
  };
147
- var renderElements = function (component) {
154
+ var renderElements = function (component, positionStyle) {
148
155
  switch (component.type) {
149
156
  case 'PAGINATION':
150
- return ((0, jsx_runtime_1.jsx)(CustomPagination_1.CustomPagination, { styles: isHovered ? paginationHoverStyle : paginationNormalStyle, current: currentPage, total: totalPage, onPageClick: handlePageClick }));
157
+ return ((0, jsx_runtime_1.jsx)("div", __assign({ style: positionStyle }, { children: (0, jsx_runtime_1.jsx)(CustomPagination_1.CustomPagination, { styles: isHovered ? paginationHoverStyle : paginationNormalStyle, current: currentPage, total: totalPage, onPageClick: handlePageClick, style: positionStyle }) })));
151
158
  default:
152
159
  return null;
153
160
  }
@@ -170,8 +177,10 @@ function ContentsList(props) {
170
177
  else {
171
178
  delete positionRefs.current[position];
172
179
  }
173
- }, style: __assign(__assign({}, getPositionStyle(position, ccbInset, groupComponents[0].designType)), { 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));
174
- }), (0, jsx_runtime_1.jsx)(S_CB_AnimationObserverBox_1.S_CB_AnimationObserverBox, __assign({ ref: hasEffect ? cbRef : null, effectVisibleStyle: effectVisibleStyle }, { children: (0, jsx_runtime_1.jsxs)(S_CB_BoxWithShadow_1.S_CB_BoxWithShadow, __assign({ id: "contentslist-box", className: "cb-layout-box ccb-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_MANUALITEMS.length, "data-number-of-columns": Math.min(CB_CONTENT_PROP_CONTENTSLIST_SPEC_DISPLAYCOUNTS, CB_CONTENT_PROP_CONTENTSLIST_SPEC_MANUALITEMS.length), "data-row-gap": rowGap, "data-column-gap": columnGap, "data-cols": Math.min(CB_CONTENT_PROP_CONTENTSLIST_SPEC_DISPLAYCOUNTS, CB_CONTENT_PROP_CONTENTSLIST_SPEC_MANUALITEMS.length), "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.jsx)(S_CustomBackgroundWrapper, __assign({ ref: backgroundRef, style: __assign(__assign({}, effect), { background: style.background }) }, { children: isBgMedia && CB_STYLE_PROP_BGMEDIA && ((0, jsx_runtime_1.jsx)(CustomSectionBackgroundMedia_1.CustomSectionBackgroundMedia, { specs: CB_STYLE_PROP_BGMEDIA, componentStyle: style, playerId: index, mediaType: mediaType || 'NONE', device: isMobile ? 'MOBILE' : 'DESKTOP', backgroundRef: backgroundRef })) })), (0, jsx_runtime_1.jsx)(S_Overlay, { style: overlayStyle }), (0, jsx_runtime_1.jsx)(S_ContentsListLayout, __assign({ className: "cb-contentslist-layout-box", ref: layoutRef, style: {
180
+ }, style: __assign(__assign({}, getPositionStyle(position, ccbInset, 'GROUP', 'GROUP', 'GROUP')), { zIndex: 3, position: 'absolute' }) }, { children: (0, jsx_runtime_1.jsx)("div", __assign({ className: "cb-contentslist-button-layout-box", style: getComponentGroupLayout(groupComponents, position) }, { children: groupComponents.map(function (component) {
181
+ return renderElements(component, getPositionStyle(position, ccbInset, component.designType, component.size, component.type));
182
+ }) })) }), position));
183
+ }), (0, jsx_runtime_1.jsx)(S_CB_AnimationObserverBox_1.S_CB_AnimationObserverBox, __assign({ ref: hasEffect ? cbRef : null, effectVisibleStyle: effectVisibleStyle }, { children: (0, jsx_runtime_1.jsxs)(S_CB_BoxWithShadow_1.S_CB_BoxWithShadow, __assign({ id: "contentslist-box", className: "cb-layout-box ccb-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_MANUALITEMS.length, "data-number-of-columns": Math.min(numberOfColumns, CB_CONTENT_PROP_CONTENTSLIST_SPEC_MANUALITEMS.length), "data-row-gap": rowGap, "data-column-gap": columnGap, "data-cols": Math.min(numberOfColumns, CB_CONTENT_PROP_CONTENTSLIST_SPEC_MANUALITEMS.length), "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.jsx)(S_CustomBackgroundWrapper, __assign({ ref: backgroundRef, style: __assign(__assign({}, effect), { background: style.background }) }, { children: isBgMedia && CB_STYLE_PROP_BGMEDIA && ((0, jsx_runtime_1.jsx)(CustomSectionBackgroundMedia_1.CustomSectionBackgroundMedia, { specs: CB_STYLE_PROP_BGMEDIA, componentStyle: style, playerId: index, mediaType: mediaType || 'NONE', device: isMobile ? 'MOBILE' : 'DESKTOP', backgroundRef: backgroundRef })) })), (0, jsx_runtime_1.jsx)(S_Overlay, { style: overlayStyle }), orderedCompositions.length > 0 ? ((0, jsx_runtime_1.jsx)(S_ContentsListLayout, __assign({ className: "cb-contentslist-layout-box", ref: layoutRef, style: {
175
184
  display: layout.display,
176
185
  flexDirection: layout.flexDirection,
177
186
  justifyContent: layout.justifyContent
@@ -183,7 +192,7 @@ function ContentsList(props) {
183
192
  limit: displayCounts,
184
193
  queryData: queryData,
185
194
  compositions: orderedCompositions
186
- }).slice(startIndex, endIndex + 1) })) }))] })) }))] }));
195
+ }).slice(startIndex, endIndex + 1) })) }))) : ((0, jsx_runtime_1.jsx)(EmptyString, {}))] })) }))] }));
187
196
  }
188
197
  function getIsBgMedia(isMobile, specs) {
189
198
  if (!specs) {
@@ -273,5 +282,22 @@ function getCompositionMinValue(composition, device) {
273
282
  };
274
283
  }
275
284
  }
285
+ function EmptyString() {
286
+ var t = (0, react_i18next_1.useTranslation)('translation').t;
287
+ return (0, jsx_runtime_1.jsx)(S_EmptyLayer, { children: t('str_9806') });
288
+ }
289
+ var S_EmptyLayer = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n background-color: rgba(0, 0, 0, 0.6);\n color: white;\n display: flex;\n font-size: ", ";\n font-weight: ", ";\n justify-content: center;\n line-height: ", ";\n margin: auto;\n padding: ", ";\n text-align: center;\n width: 100%;\n word-break: keep-all;\n"], ["\n background-color: rgba(0, 0, 0, 0.6);\n color: white;\n display: flex;\n font-size: ", ";\n font-weight: ", ";\n justify-content: center;\n line-height: ", ";\n margin: auto;\n padding: ", ";\n text-align: center;\n width: 100%;\n word-break: keep-all;\n"])), function (_a) {
290
+ var theme = _a.theme;
291
+ return theme.desktopFontSize.body2;
292
+ }, function (_a) {
293
+ var theme = _a.theme;
294
+ return theme.fontWeight.bold;
295
+ }, function (_a) {
296
+ var theme = _a.theme;
297
+ return theme.desktopLineHeight.body2;
298
+ }, function (_a) {
299
+ var theme = _a.theme;
300
+ return theme.spacing.spacingE;
301
+ });
276
302
  exports.default = ContentsList;
277
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
303
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
@@ -4,7 +4,8 @@ interface Props {
4
4
  current: number;
5
5
  total: number;
6
6
  styles: CustomPaginationProps;
7
+ style: React.CSSProperties;
7
8
  onPageClick: (page: number) => void;
8
9
  }
9
- export declare const CustomPagination: ({ current, total, styles, onPageClick }: Props) => JSX.Element;
10
+ export declare const CustomPagination: ({ current, total, styles, style, onPageClick }: Props) => JSX.Element;
10
11
  export default CustomPagination;
@@ -23,7 +23,7 @@ var jsx_runtime_1 = require("react/jsx-runtime");
23
23
  var styled_components_1 = __importDefault(require("styled-components"));
24
24
  var paginationConfigs_1 = require("./paginationConfigs");
25
25
  var CustomPagination = function (_a) {
26
- var _b = _a.current, current = _b === void 0 ? 1 : _b, _c = _a.total, total = _c === void 0 ? 1 : _c, styles = _a.styles, onPageClick = _a.onPageClick;
26
+ var _b = _a.current, current = _b === void 0 ? 1 : _b, _c = _a.total, total = _c === void 0 ? 1 : _c, styles = _a.styles, style = _a.style, onPageClick = _a.onPageClick;
27
27
  var getPageGroupStart = function (page) {
28
28
  return Math.floor((page - 1) / 5) * 5 + 1;
29
29
  };
@@ -68,9 +68,9 @@ var CustomPagination = function (_a) {
68
68
  return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {});
69
69
  }
70
70
  };
71
- return ((0, jsx_runtime_1.jsx)(S_Pagination, __assign({ className: "custom-pagination_".concat(current) }, { children: renderPagination() })));
71
+ return ((0, jsx_runtime_1.jsx)(S_Pagination, __assign({ "data-pagination-type": styles.type, className: "custom-pagination_".concat(current) }, { children: renderPagination() })));
72
72
  };
73
73
  exports.CustomPagination = CustomPagination;
74
- var S_Pagination = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding: 8px;\n"], ["\n padding: 8px;\n"])));
74
+ var S_Pagination = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding: 0;\n\n &[data-pagination-type='DESIGN1'],\n &[data-pagination-type='DESIGN2'],\n &[data-pagination-type='DESIGN3'],\n &[data-pagination-type='DESIGN4'],\n &[data-pagination-type='DESIGN5'],\n &[data-pagination-type='DESIGN6'] {\n padding: 8px 0;\n }\n"], ["\n padding: 0;\n\n &[data-pagination-type='DESIGN1'],\n &[data-pagination-type='DESIGN2'],\n &[data-pagination-type='DESIGN3'],\n &[data-pagination-type='DESIGN4'],\n &[data-pagination-type='DESIGN5'],\n &[data-pagination-type='DESIGN6'] {\n padding: 8px 0;\n }\n"])));
75
75
  exports.default = exports.CustomPagination;
76
76
  var templateObject_1;
@@ -8,6 +8,7 @@ type ParseContentsListStyleToCarouselCoreProps = {
8
8
  };
9
9
  type ParseContentsListContentToCarouselCoreProps = {
10
10
  props: CB_CONTENT_PROP_CONTENTSLIST;
11
+ device: Device;
11
12
  };
12
13
  type ParseContentsListStyleToCustomPaginationProps = {
13
14
  props: CB_STYLE_PROP_CONTENTSLIST_SPECS;
@@ -18,7 +19,7 @@ export declare function parseGridStyleProp({ props, device }: ParseContentsListS
18
19
  stylePropCss: CssFragment;
19
20
  hoverStylePropCss: CssFragment;
20
21
  };
21
- export declare function parseGridContentProp({ props }: ParseContentsListContentToCarouselCoreProps): {
22
+ export declare function parseGridContentProp({ props, device }: ParseContentsListContentToCarouselCoreProps): {
22
23
  contentPropCss: CssFragment;
23
24
  };
24
25
  export declare function parsePaginationStyleProp({ props, device }: ParseContentsListStyleToCustomPaginationProps): {
@@ -42,10 +42,18 @@ function parseStylePropertyStyles(key, value) {
42
42
  function getColumnsPropStyleValues(value, rows) {
43
43
  return (0, styled_components_1.css)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n grid-template-columns: repeat(", ", 1fr);\n grid-template-rows: repeat(", ", 1fr);\n "], ["\n grid-template-columns: repeat(", ", 1fr);\n grid-template-rows: repeat(", ", 1fr);\n "])), value, rows);
44
44
  }
45
- function parseContentPropertyStyles(key, value, rows) {
46
- switch (key) {
47
- case 'CB_CONTENT_PROP_CONTENTSLIST_SPEC_COLUMNS':
48
- return getColumnsPropStyleValues(value, rows);
45
+ function parseContentPropertyStyles(key, value, rows, device) {
46
+ if (device === 'DESKTOP') {
47
+ switch (key) {
48
+ case 'CB_CONTENT_PROP_CONTENTSLIST_SPEC_COLUMNS':
49
+ return getColumnsPropStyleValues(value, rows);
50
+ }
51
+ }
52
+ if (device === 'MOBILE') {
53
+ switch (key) {
54
+ case 'CB_CONTENT_PROP_CONTENTSLIST_SPEC_MCOLUMNS':
55
+ return getColumnsPropStyleValues(value, rows);
56
+ }
49
57
  }
50
58
  return undefined;
51
59
  }
@@ -70,16 +78,19 @@ function parseGridStyleProp(_a) {
70
78
  }
71
79
  exports.parseGridStyleProp = parseGridStyleProp;
72
80
  function parseGridContentProp(_a) {
73
- var props = _a.props;
81
+ var props = _a.props, device = _a.device;
74
82
  var availableSpecCodes = Object.keys(props).filter(function (key) { return !key.includes(':HOVER') && !key.includes(':MOBILE'); });
75
83
  var displayCounts = props.CB_CONTENT_PROP_CONTENTSLIST_SPEC_DISPLAYCOUNTS ||
76
84
  props.CB_CONTENT_PROP_CONTENTSLIST_SPEC_ITEMCOUNTS ||
77
85
  1;
78
- var columns = Math.min(props.CB_CONTENT_PROP_CONTENTSLIST_SPEC_COLUMNS, displayCounts);
86
+ var columnsByDevice = device === 'DESKTOP'
87
+ ? props.CB_CONTENT_PROP_CONTENTSLIST_SPEC_COLUMNS
88
+ : props.CB_CONTENT_PROP_CONTENTSLIST_SPEC_MCOLUMNS;
89
+ var columns = Math.min(columnsByDevice, displayCounts);
79
90
  var rows = Math.ceil(displayCounts / columns);
80
91
  return availableSpecCodes.reduce(function (acc, currentKey) {
81
92
  var value = props[currentKey];
82
- var styles = parseContentPropertyStyles(currentKey, value, rows);
93
+ var styles = parseContentPropertyStyles(currentKey, value, rows, device);
83
94
  return {
84
95
  contentPropCss: (0, styled_components_1.css)(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n ", "\n ", "\n "], ["\n ", "\n ", "\n "])), acc.contentPropCss, styles)
85
96
  };
@@ -0,0 +1,4 @@
1
+ import type { ContentsListElementsProps } from '../ContentsList';
2
+ import type { CSSProperties } from 'react';
3
+ export declare function getPosition(position: string, designType: string, size: string, elementType: ContentsListElementsProps['type'] | 'GROUP'): CSSProperties;
4
+ export declare const POS_INSET: Record<string, CSSProperties>;