pds-dev-kit-web-test 2.5.261 → 2.5.263
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/common/assets/icons/fill/index.d.ts +0 -5
- package/dist/src/common/assets/icons/fill/index.js +1 -11
- package/dist/src/common/assets/icons/line/index.d.ts +0 -5
- package/dist/src/common/assets/icons/line/index.js +1 -11
- package/dist/src/common/hooks/useTooltip.js +1 -1
- package/dist/src/common/styles/colorSet/PaletteColor_Dark.json +1 -3
- package/dist/src/common/styles/colorSet/PaletteColor_light.json +1 -3
- package/dist/src/common/styles/colorSet/SemanticColor.json +1 -3
- package/dist/src/common/styles/colorSet/UIColor.json +2 -6
- package/dist/src/common/styles/colorSet/index.d.ts +0 -10
- package/dist/src/common/styles/colorSet/ui-type.d.ts +0 -4
- package/dist/src/common/utils/SystemUIPositionGenerator/hoverTypeSystemUICssGenerator.js +1 -1
- package/dist/src/desktop/components/BasicButtonGroup/BasicButtonGroup.js +1 -1
- package/dist/src/desktop/components/Dropdown/Dropdown.js +4 -6
- package/dist/src/desktop/components/MainButton/MainButton.d.ts +1 -1
- package/dist/src/desktop/components/MainButton/MainButton.js +6 -20
- package/dist/src/desktop/components/UploadMainButton/UploadMainButton.d.ts +1 -1
- package/dist/src/desktop/components/UploadMainButton/UploadMainButton.js +7 -21
- package/dist/src/mobile/components/MainButton/MainButton.d.ts +1 -1
- package/dist/src/mobile/components/MainButton/MainButton.js +6 -20
- package/dist/src/mobile/components/UploadMainButton/UploadMainButton.d.ts +1 -1
- package/dist/src/mobile/components/UploadMainButton/UploadMainButton.js +6 -20
- package/dist/src/sub/DynamicLayout/CompositionRenderer/ComponentBlockMatcher.d.ts +11 -0
- package/dist/src/sub/DynamicLayout/CompositionRenderer/ComponentBlockMatcher.js +56 -0
- package/dist/src/sub/DynamicLayout/CompositionRenderer/Composition.d.ts +9 -0
- package/dist/src/sub/DynamicLayout/CompositionRenderer/Composition.js +217 -0
- package/dist/src/sub/DynamicLayout/CompositionRenderer/CompositionRenderer.d.ts +6 -0
- package/dist/src/sub/DynamicLayout/CompositionRenderer/CompositionRenderer.js +27 -0
- package/dist/src/sub/DynamicLayout/CompositionRenderer/FlexGridItem.d.ts +12 -0
- package/dist/src/sub/DynamicLayout/CompositionRenderer/FlexGridItem.js +75 -0
- package/dist/src/sub/DynamicLayout/components/EditModeSectionMatcher/EditModeSectionMatcher.js +3 -0
- package/dist/src/sub/DynamicLayout/components/EditModeSectionMatcher/SectionBox.js +1 -1
- package/dist/src/sub/DynamicLayout/components/Section/ErrorBoundary/ErrorBoundary.js +12 -1
- package/dist/src/sub/DynamicLayout/components/SectionMatcher/SectionMatcher.js +5 -3
- package/dist/src/sub/DynamicLayout/gleStyles.d.ts +3 -0
- package/dist/src/sub/DynamicLayout/gleStyles.js +19 -0
- package/dist/src/sub/DynamicLayout/hooks/useCustomSectionShortcut/useCustomSectionShortcut.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/hooks/useCustomSectionShortcut/useCustomSectionShortcut.js +6 -1
- package/dist/src/sub/DynamicLayout/mock_samplePage.js +132 -132
- package/dist/src/sub/DynamicLayout/mocks.d.ts +1111 -0
- package/dist/src/sub/DynamicLayout/mocks.js +4775 -0
- package/dist/src/sub/DynamicLayout/sectionActionTypes.d.ts +64 -15
- package/dist/src/sub/DynamicLayout/sections/CustomSection/CustomSection.d.ts +0 -5
- package/dist/src/sub/DynamicLayout/sections/CustomSection/CustomSection.js +731 -200
- package/dist/src/sub/DynamicLayout/sections/CustomSection/FlexGridItem.d.ts +2 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/FlexGridItem.js +8 -5
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/ComponentBlockMatcher.d.ts +1 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/ComponentBlockMatcher.js +5 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Button/Button.js +25 -23
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarousel.d.ts +8 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarousel.js +12 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Text/Text.js +16 -2
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/components/S_Backdrop.d.ts +1 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/components/S_Backdrop.js +13 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/components/S_CB_Box.js +1 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/components/S_CB_BoxWithShadow.js +1 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/types.d.ts +79 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/useGoogleFonts/getGoogleFonts.d.ts +2 -4
- package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/useGoogleFonts/getGoogleFonts.js +3 -14
- package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/useGoogleFonts/index.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/useGoogleFonts/index.js +2 -3
- package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/clsx.d.ts +7 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/clsx.js +33 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/colorUtil.d.ts +4 -4
- package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/fontSizeAdjustment.d.ts +1 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/fontSizeAdjustment.js +333 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/{hooks/useGroupDrag/utils.d.ts → newUtils/group.d.ts} +4 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/{hooks/useGroupDrag/utils.js → newUtils/group.js} +14 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/replaceUndefinedValues.js +8 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/textUtil.d.ts +1 -6
- package/dist/src/sub/DynamicLayout/sections/CustomSection/types.d.ts +18 -2
- package/dist/src/sub/DynamicLayout/sections/CustomSection/types.js +2 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parsePlacement.d.ts +5 -2
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parsePlacement.js +12 -9
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropTextSpec.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/types.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/types.js +1 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/types.d.ts +3 -5
- package/dist/src/sub/DynamicLayout/sections/{CustomSection/FlexGridCustomSection.d.ts → FlexGridCustomSection.d.ts} +1 -5
- package/dist/src/sub/DynamicLayout/sections/{CustomSection/FlexGridCustomSection.js → FlexGridCustomSection.js} +44 -88
- package/dist/src/sub/DynamicLayout/types.d.ts +45 -1
- package/dist/src/sub/SandollFontKit/utils/appendSandollTagToHead.d.ts +1 -1
- package/dist/src/sub/SandollFontKit/utils/appendSandollTagToHead.js +17 -11
- package/package.json +3 -2
- package/release-note.md +3 -2
- package/dist/src/common/assets/icons/fill/BringToFrontArrow.d.ts +0 -4
- package/dist/src/common/assets/icons/fill/BringToFrontArrow.js +0 -30
- package/dist/src/common/assets/icons/fill/DesktopSync.d.ts +0 -4
- package/dist/src/common/assets/icons/fill/DesktopSync.js +0 -30
- package/dist/src/common/assets/icons/fill/MoveBackwardArrow.d.ts +0 -4
- package/dist/src/common/assets/icons/fill/MoveBackwardArrow.js +0 -30
- package/dist/src/common/assets/icons/fill/MoveForwardArrow.d.ts +0 -4
- package/dist/src/common/assets/icons/fill/MoveForwardArrow.js +0 -30
- package/dist/src/common/assets/icons/fill/SendToBackArrow.d.ts +0 -4
- package/dist/src/common/assets/icons/fill/SendToBackArrow.js +0 -30
- package/dist/src/common/assets/icons/line/BringToFrontArrow.d.ts +0 -4
- package/dist/src/common/assets/icons/line/BringToFrontArrow.js +0 -30
- package/dist/src/common/assets/icons/line/DesktopSync.d.ts +0 -4
- package/dist/src/common/assets/icons/line/DesktopSync.js +0 -30
- package/dist/src/common/assets/icons/line/MoveBackwardArrow.d.ts +0 -4
- package/dist/src/common/assets/icons/line/MoveBackwardArrow.js +0 -30
- package/dist/src/common/assets/icons/line/MoveForwardArrow.d.ts +0 -4
- package/dist/src/common/assets/icons/line/MoveForwardArrow.js +0 -30
- package/dist/src/common/assets/icons/line/SendToBackArrow.d.ts +0 -4
- package/dist/src/common/assets/icons/line/SendToBackArrow.js +0 -30
- package/dist/src/sub/DynamicLayout/pagesPreviewMock.d.ts +0 -14038
- package/dist/src/sub/DynamicLayout/pagesPreviewMock.js +0 -35827
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Button/btnTypes.d.ts +0 -76
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Button/btnTypes.js +0 -2
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Text/types.d.ts +0 -38
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Text/types.js +0 -2
- package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/useGroupDrag/index.d.ts +0 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/useGroupDrag/index.js +0 -8
- package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/useGroupDrag/useGroupDrag.d.ts +0 -22
- package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/useGroupDrag/useGroupDrag.js +0 -273
@@ -0,0 +1,333 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.getMobileFontSize = void 0;
|
4
|
+
// desktop 폰트 사이즈를 key로, mobile 폰트 사이즈를 value로 하는 매핑 객체
|
5
|
+
var fontSizeMapping = {
|
6
|
+
6: 7,
|
7
|
+
7: 7,
|
8
|
+
8: 8,
|
9
|
+
9: 9,
|
10
|
+
10: 10,
|
11
|
+
11: 11,
|
12
|
+
12: 12,
|
13
|
+
13: 13,
|
14
|
+
14: 14,
|
15
|
+
15: 16,
|
16
|
+
16: 16,
|
17
|
+
17: 16,
|
18
|
+
18: 16,
|
19
|
+
19: 16,
|
20
|
+
20: 18,
|
21
|
+
21: 18,
|
22
|
+
22: 18,
|
23
|
+
23: 18,
|
24
|
+
24: 18,
|
25
|
+
25: 18,
|
26
|
+
26: 20,
|
27
|
+
27: 20,
|
28
|
+
28: 22,
|
29
|
+
29: 22,
|
30
|
+
30: 24,
|
31
|
+
31: 24,
|
32
|
+
32: 24,
|
33
|
+
33: 26,
|
34
|
+
34: 26,
|
35
|
+
35: 26,
|
36
|
+
36: 26,
|
37
|
+
37: 28,
|
38
|
+
38: 28,
|
39
|
+
39: 28,
|
40
|
+
40: 28,
|
41
|
+
41: 30,
|
42
|
+
42: 30,
|
43
|
+
43: 30,
|
44
|
+
44: 30,
|
45
|
+
45: 30,
|
46
|
+
46: 32,
|
47
|
+
47: 32,
|
48
|
+
48: 32,
|
49
|
+
49: 32,
|
50
|
+
50: 36,
|
51
|
+
51: 36,
|
52
|
+
52: 36,
|
53
|
+
53: 36,
|
54
|
+
54: 36,
|
55
|
+
55: 36,
|
56
|
+
56: 36,
|
57
|
+
57: 36,
|
58
|
+
58: 36,
|
59
|
+
59: 36,
|
60
|
+
60: 40,
|
61
|
+
61: 40,
|
62
|
+
62: 40,
|
63
|
+
63: 40,
|
64
|
+
64: 42,
|
65
|
+
65: 42,
|
66
|
+
66: 42,
|
67
|
+
67: 42,
|
68
|
+
68: 44,
|
69
|
+
69: 44,
|
70
|
+
70: 46,
|
71
|
+
71: 46,
|
72
|
+
72: 48,
|
73
|
+
73: 48,
|
74
|
+
74: 48,
|
75
|
+
75: 48,
|
76
|
+
76: 48,
|
77
|
+
77: 48,
|
78
|
+
78: 48,
|
79
|
+
79: 48,
|
80
|
+
80: 48,
|
81
|
+
81: 48,
|
82
|
+
82: 48,
|
83
|
+
83: 48,
|
84
|
+
84: 48,
|
85
|
+
85: 48,
|
86
|
+
86: 48,
|
87
|
+
87: 48,
|
88
|
+
88: 48,
|
89
|
+
89: 48,
|
90
|
+
90: 50,
|
91
|
+
91: 50,
|
92
|
+
92: 50,
|
93
|
+
93: 50,
|
94
|
+
94: 50,
|
95
|
+
95: 52,
|
96
|
+
96: 52,
|
97
|
+
97: 52,
|
98
|
+
98: 52,
|
99
|
+
99: 52,
|
100
|
+
100: 52,
|
101
|
+
101: 50,
|
102
|
+
102: 50,
|
103
|
+
103: 50,
|
104
|
+
104: 50,
|
105
|
+
105: 50,
|
106
|
+
106: 50,
|
107
|
+
107: 50,
|
108
|
+
108: 50,
|
109
|
+
109: 50,
|
110
|
+
110: 50,
|
111
|
+
111: 50,
|
112
|
+
112: 52,
|
113
|
+
113: 52,
|
114
|
+
114: 52,
|
115
|
+
115: 52,
|
116
|
+
116: 53,
|
117
|
+
117: 54,
|
118
|
+
118: 55,
|
119
|
+
119: 56,
|
120
|
+
120: 57,
|
121
|
+
121: 58,
|
122
|
+
122: 59,
|
123
|
+
123: 60,
|
124
|
+
124: 61,
|
125
|
+
125: 62,
|
126
|
+
126: 63,
|
127
|
+
127: 64,
|
128
|
+
128: 65,
|
129
|
+
129: 66,
|
130
|
+
130: 67,
|
131
|
+
131: 68,
|
132
|
+
132: 69,
|
133
|
+
133: 70,
|
134
|
+
134: 71,
|
135
|
+
135: 72,
|
136
|
+
136: 73,
|
137
|
+
137: 74,
|
138
|
+
138: 75,
|
139
|
+
139: 76,
|
140
|
+
140: 77,
|
141
|
+
141: 78,
|
142
|
+
142: 79,
|
143
|
+
143: 80,
|
144
|
+
144: 81,
|
145
|
+
145: 82,
|
146
|
+
146: 83,
|
147
|
+
147: 84,
|
148
|
+
148: 85,
|
149
|
+
149: 86,
|
150
|
+
150: 87,
|
151
|
+
151: 88,
|
152
|
+
152: 89,
|
153
|
+
153: 90,
|
154
|
+
154: 91,
|
155
|
+
155: 92,
|
156
|
+
156: 93,
|
157
|
+
157: 94,
|
158
|
+
158: 95,
|
159
|
+
159: 96,
|
160
|
+
160: 97,
|
161
|
+
161: 98,
|
162
|
+
162: 99,
|
163
|
+
163: 100,
|
164
|
+
164: 101,
|
165
|
+
165: 102,
|
166
|
+
166: 103,
|
167
|
+
167: 104,
|
168
|
+
168: 105,
|
169
|
+
169: 106,
|
170
|
+
170: 107,
|
171
|
+
171: 108,
|
172
|
+
172: 109,
|
173
|
+
173: 110,
|
174
|
+
174: 111,
|
175
|
+
175: 112,
|
176
|
+
176: 113,
|
177
|
+
177: 114,
|
178
|
+
178: 115,
|
179
|
+
179: 116,
|
180
|
+
180: 117,
|
181
|
+
181: 118,
|
182
|
+
182: 119,
|
183
|
+
183: 120,
|
184
|
+
184: 121,
|
185
|
+
185: 122,
|
186
|
+
186: 123,
|
187
|
+
187: 124,
|
188
|
+
188: 125,
|
189
|
+
189: 126,
|
190
|
+
190: 127,
|
191
|
+
191: 128,
|
192
|
+
192: 129,
|
193
|
+
193: 130,
|
194
|
+
194: 131,
|
195
|
+
195: 132,
|
196
|
+
196: 133,
|
197
|
+
197: 134,
|
198
|
+
198: 135,
|
199
|
+
199: 136,
|
200
|
+
200: 137,
|
201
|
+
201: 138,
|
202
|
+
202: 139,
|
203
|
+
203: 140,
|
204
|
+
204: 141,
|
205
|
+
205: 142,
|
206
|
+
206: 143,
|
207
|
+
207: 144,
|
208
|
+
208: 145,
|
209
|
+
209: 146,
|
210
|
+
210: 147,
|
211
|
+
211: 148,
|
212
|
+
212: 149,
|
213
|
+
213: 150,
|
214
|
+
214: 151,
|
215
|
+
215: 152,
|
216
|
+
216: 153,
|
217
|
+
217: 154,
|
218
|
+
218: 155,
|
219
|
+
219: 156,
|
220
|
+
220: 157,
|
221
|
+
221: 158,
|
222
|
+
222: 159,
|
223
|
+
223: 160,
|
224
|
+
224: 161,
|
225
|
+
225: 162,
|
226
|
+
226: 163,
|
227
|
+
227: 164,
|
228
|
+
228: 165,
|
229
|
+
229: 166,
|
230
|
+
230: 167,
|
231
|
+
231: 168,
|
232
|
+
232: 169,
|
233
|
+
233: 170,
|
234
|
+
234: 171,
|
235
|
+
235: 172,
|
236
|
+
236: 173,
|
237
|
+
237: 174,
|
238
|
+
238: 175,
|
239
|
+
239: 176,
|
240
|
+
240: 177,
|
241
|
+
241: 178,
|
242
|
+
242: 179,
|
243
|
+
243: 180,
|
244
|
+
244: 181,
|
245
|
+
245: 182,
|
246
|
+
246: 183,
|
247
|
+
247: 184,
|
248
|
+
248: 185,
|
249
|
+
249: 186,
|
250
|
+
250: 187,
|
251
|
+
251: 188,
|
252
|
+
252: 189,
|
253
|
+
253: 190,
|
254
|
+
254: 191,
|
255
|
+
255: 192,
|
256
|
+
256: 193,
|
257
|
+
257: 194,
|
258
|
+
258: 195,
|
259
|
+
259: 196,
|
260
|
+
260: 197,
|
261
|
+
261: 198,
|
262
|
+
262: 199,
|
263
|
+
263: 200,
|
264
|
+
264: 200,
|
265
|
+
265: 200,
|
266
|
+
266: 200,
|
267
|
+
267: 200,
|
268
|
+
268: 200,
|
269
|
+
269: 200,
|
270
|
+
270: 200,
|
271
|
+
271: 200,
|
272
|
+
272: 200,
|
273
|
+
273: 200,
|
274
|
+
274: 200,
|
275
|
+
275: 200,
|
276
|
+
276: 200,
|
277
|
+
277: 200,
|
278
|
+
278: 200,
|
279
|
+
279: 200,
|
280
|
+
280: 200,
|
281
|
+
281: 200,
|
282
|
+
282: 200,
|
283
|
+
283: 200,
|
284
|
+
284: 200,
|
285
|
+
285: 200,
|
286
|
+
286: 200,
|
287
|
+
287: 200,
|
288
|
+
288: 200,
|
289
|
+
289: 200,
|
290
|
+
290: 200,
|
291
|
+
291: 200,
|
292
|
+
292: 200,
|
293
|
+
293: 200,
|
294
|
+
294: 200,
|
295
|
+
295: 200,
|
296
|
+
296: 200,
|
297
|
+
297: 200,
|
298
|
+
298: 200,
|
299
|
+
299: 200,
|
300
|
+
300: 200,
|
301
|
+
301: 200,
|
302
|
+
302: 200,
|
303
|
+
303: 200,
|
304
|
+
304: 200,
|
305
|
+
305: 200,
|
306
|
+
306: 200,
|
307
|
+
307: 200,
|
308
|
+
308: 200,
|
309
|
+
309: 200,
|
310
|
+
310: 200,
|
311
|
+
311: 200,
|
312
|
+
312: 200,
|
313
|
+
313: 200,
|
314
|
+
314: 200,
|
315
|
+
315: 200,
|
316
|
+
316: 200,
|
317
|
+
317: 200,
|
318
|
+
318: 200,
|
319
|
+
319: 200,
|
320
|
+
320: 200
|
321
|
+
};
|
322
|
+
function getMobileFontSize(desktopSize) {
|
323
|
+
if (fontSizeMapping[desktopSize]) {
|
324
|
+
return fontSizeMapping[desktopSize];
|
325
|
+
}
|
326
|
+
return desktopSize;
|
327
|
+
}
|
328
|
+
exports.getMobileFontSize = getMobileFontSize;
|
329
|
+
// 사용 예시:
|
330
|
+
// const desktopFontSize = 15;
|
331
|
+
// const mobileFontSizeFromServer: number | null = null;
|
332
|
+
// const finalMobileFontSize = getMobileFontSize(desktopFontSize, mobileFontSizeFromServer);
|
333
|
+
// console.log(finalMobileFontSize); // 출력: 16
|
@@ -1,4 +1,5 @@
|
|
1
|
-
import type { ComponentBlock } from '
|
1
|
+
import type { ComponentBlock } from '../types';
|
2
|
+
import type { Layout } from 'publ-echo-test/dist/lib';
|
2
3
|
import type { LayoutItem } from 'publ-echo/dist/lib';
|
3
4
|
export interface LayoutItemWithGroupType extends LayoutItem {
|
4
5
|
childrenIds: string[];
|
@@ -11,3 +12,5 @@ export declare function splitComponentBlocksByGroup(componentBlocks: ComponentBl
|
|
11
12
|
inGroup: ComponentBlock[];
|
12
13
|
notInGroup: ComponentBlock[];
|
13
14
|
};
|
15
|
+
export declare function getGroupCB(layout: Layout): LayoutItemWithGroupType | null;
|
16
|
+
export declare const filterItemsById: (layout: Layout, idsToRemove: Array<string>) => import("publ-echo-test/dist/lib").LayoutItem[];
|
@@ -20,7 +20,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
20
20
|
return to.concat(ar || Array.prototype.slice.call(from));
|
21
21
|
};
|
22
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
23
|
-
exports.splitComponentBlocksByGroup = exports.getGroupForMultiple = exports.recalculatedGroup = exports.getGroupData = void 0;
|
23
|
+
exports.filterItemsById = exports.getGroupCB = exports.splitComponentBlocksByGroup = exports.getGroupForMultiple = exports.recalculatedGroup = exports.getGroupData = void 0;
|
24
24
|
function getGroupData(elem1, elem2) {
|
25
25
|
var _a, _b;
|
26
26
|
var minX = Math.min(elem1.x, elem2.x);
|
@@ -125,3 +125,16 @@ function splitComponentBlocksByGroup(componentBlocks, groupIds) {
|
|
125
125
|
};
|
126
126
|
}
|
127
127
|
exports.splitComponentBlocksByGroup = splitComponentBlocksByGroup;
|
128
|
+
function getGroupCB(layout) {
|
129
|
+
var groupIdx = layout.findIndex(function (item) { return item.i === 'group'; });
|
130
|
+
if (groupIdx < 0) {
|
131
|
+
return null;
|
132
|
+
}
|
133
|
+
var groupItem = layout[groupIdx];
|
134
|
+
return groupItem;
|
135
|
+
}
|
136
|
+
exports.getGroupCB = getGroupCB;
|
137
|
+
var filterItemsById = function (layout, idsToRemove) {
|
138
|
+
return layout.filter(function (item) { return !idsToRemove.includes(item.i); });
|
139
|
+
};
|
140
|
+
exports.filterItemsById = filterItemsById;
|
package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/replaceUndefinedValues.js
CHANGED
@@ -11,6 +11,7 @@ var __assign = (this && this.__assign) || function () {
|
|
11
11
|
return __assign.apply(this, arguments);
|
12
12
|
};
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
14
|
+
var fontSizeAdjustment_1 = require("./fontSizeAdjustment");
|
14
15
|
function replaceUndefinedValues(jsonData) {
|
15
16
|
return Object.entries(jsonData).reduce(function (acc, cur) {
|
16
17
|
var _a;
|
@@ -24,7 +25,13 @@ function replaceUndefinedValues(jsonData) {
|
|
24
25
|
if (isTargetNeedOverride) {
|
25
26
|
var undefinedMobileKey = curSpec.replace(':MOBILE', '');
|
26
27
|
if (undefinedMobileKey in currentProps) {
|
27
|
-
|
28
|
+
var desktopValue = currentProps[undefinedMobileKey];
|
29
|
+
if (curSpec === 'CB_STYLE_PROP_TEXT_SPEC_SIZE:MOBILE') {
|
30
|
+
accSpecs[curSpec] = (0, fontSizeAdjustment_1.getMobileFontSize)(desktopValue);
|
31
|
+
}
|
32
|
+
else {
|
33
|
+
accSpecs[curSpec] = desktopValue;
|
34
|
+
}
|
28
35
|
}
|
29
36
|
else {
|
30
37
|
accSpecs[curSpec] = currentProps[curSpec];
|
@@ -9,11 +9,6 @@ type ParseStyleTextProps<T> = {
|
|
9
9
|
props: T;
|
10
10
|
propKey: 'TEXT';
|
11
11
|
device: Device;
|
12
|
-
} | {
|
13
|
-
availableSpecCodes: Array<keyof T>;
|
14
|
-
props: T;
|
15
|
-
propKey: 'BTNTEXT';
|
16
|
-
device: Device;
|
17
12
|
};
|
18
|
-
export declare function getTextCSSPropKey(key: string, cbName: 'TEXT'
|
13
|
+
export declare function getTextCSSPropKey(key: string, cbName: 'TEXT'): "" | "color" | "letterSpacing" | "fontWeight" | "fontFamily" | "lineHeight" | "fontSize" | "HORIZONTAL" | "alignItems";
|
19
14
|
export {};
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import type { CB_BTN_PROPERTIES_TYPE, CB_DIVIDER_PROPERTIES_TYPE, CB_EMBED_PROPERTIES_TYPE, CB_IMG_PROPERTIES_TYPE, CB_RICHTEXT_PROPERTIES_TYPE, CB_TEXT_PROPERTIES_TYPE, CB_TWITTER_PROPERTIES_TYPE, CB_YOUTUBE_PROPERTIES_TYPE } from './util/types';
|
2
|
+
import type { IComposition } from '../../../DynamicLayout/types';
|
2
3
|
export type CB_TYPES = 'GENERAL';
|
3
|
-
export type ComponentBlock = CB_TEXT_TYPE | CB_BTN_TYPE | CB_RICHTEXT | CB_DIVIDER | CB_IMG | CB_YOUTUBE | CB_TWITTER | CB_IFRAME;
|
4
|
+
export type ComponentBlock = CB_TEXT_TYPE | CB_BTN_TYPE | CB_RICHTEXT | CB_DIVIDER | CB_IMG | CB_YOUTUBE | CB_TWITTER | CB_IFRAME | CB_GROUP | CB_CONTENTS_CAROUSEL;
|
4
5
|
type GeneralCustomSectionType = {
|
5
6
|
id: number;
|
6
7
|
type: 'GENERAL';
|
@@ -66,6 +67,19 @@ export type CB_IFRAME = GeneralCustomSectionType & {
|
|
66
67
|
data: CB_TWITTER_PROPERTIES_TYPE;
|
67
68
|
};
|
68
69
|
};
|
70
|
+
export type CB_GROUP = GeneralCustomSectionType & {
|
71
|
+
componentBlockCode: CB_ALL_CODES.CB_GROUP;
|
72
|
+
jsonProperties: {
|
73
|
+
data: CB_BTN_PROPERTIES_TYPE;
|
74
|
+
};
|
75
|
+
};
|
76
|
+
export type CB_CONTENTS_CAROUSEL = GeneralCustomSectionType & {
|
77
|
+
componentBlockCode: CB_ALL_CODES.CB_CONTENTS_CAROUSEL;
|
78
|
+
jsonProperties: {
|
79
|
+
data: CB_BTN_PROPERTIES_TYPE;
|
80
|
+
};
|
81
|
+
compositions: Array<IComposition>;
|
82
|
+
};
|
69
83
|
export declare enum CB_ALL_CODES {
|
70
84
|
CB_TEXT = "CB_TEXT",
|
71
85
|
CB_BTN = "CB_BTN",
|
@@ -74,6 +88,8 @@ export declare enum CB_ALL_CODES {
|
|
74
88
|
CB_IMG = "CB_IMG",
|
75
89
|
CB_YOUTUBE = "CB_YOUTUBE",
|
76
90
|
CB_TWITTER = "CB_TWITTER",
|
77
|
-
CB_EMBED = "CB_EMBED"
|
91
|
+
CB_EMBED = "CB_EMBED",
|
92
|
+
CB_GROUP = "CB_GROUP",
|
93
|
+
CB_CONTENTS_CAROUSEL = "CB_CONTENTS_CAROUSEL"
|
78
94
|
}
|
79
95
|
export {};
|
@@ -11,4 +11,6 @@ var CB_ALL_CODES;
|
|
11
11
|
CB_ALL_CODES["CB_YOUTUBE"] = "CB_YOUTUBE";
|
12
12
|
CB_ALL_CODES["CB_TWITTER"] = "CB_TWITTER";
|
13
13
|
CB_ALL_CODES["CB_EMBED"] = "CB_EMBED";
|
14
|
+
CB_ALL_CODES["CB_GROUP"] = "CB_GROUP";
|
15
|
+
CB_ALL_CODES["CB_CONTENTS_CAROUSEL"] = "CB_CONTENTS_CAROUSEL";
|
14
16
|
})(CB_ALL_CODES = exports.CB_ALL_CODES || (exports.CB_ALL_CODES = {}));
|
@@ -1,5 +1,6 @@
|
|
1
|
-
import
|
2
|
-
|
1
|
+
import { ComponentBlock } from '../types';
|
2
|
+
import type { ZOrder } from 'publ-echo-test/dist/lib/GridLayoutEditor/group';
|
3
|
+
export declare function parsePlacement(components: ComponentBlock[], zOrders: ZOrder): {
|
3
4
|
sm: {
|
4
5
|
i: string;
|
5
6
|
x: number;
|
@@ -7,6 +8,7 @@ export declare function parsePlacement(components: ComponentBlock[]): {
|
|
7
8
|
w: number;
|
8
9
|
h: number;
|
9
10
|
z: number;
|
11
|
+
autoResize: boolean;
|
10
12
|
}[];
|
11
13
|
lg: {
|
12
14
|
i: string;
|
@@ -15,6 +17,7 @@ export declare function parsePlacement(components: ComponentBlock[]): {
|
|
15
17
|
w: number;
|
16
18
|
h: number;
|
17
19
|
z: number;
|
20
|
+
autoResize: boolean;
|
18
21
|
}[];
|
19
22
|
};
|
20
23
|
export default parsePlacement;
|
@@ -1,4 +1,5 @@
|
|
1
1
|
"use strict";
|
2
|
+
/* eslint-disable no-console */
|
2
3
|
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
3
4
|
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
4
5
|
if (ar || !(i in from)) {
|
@@ -10,12 +11,14 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
10
11
|
};
|
11
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
12
13
|
exports.parsePlacement = void 0;
|
13
|
-
|
14
|
-
|
15
|
-
|
14
|
+
var types_1 = require("../types");
|
15
|
+
function parsePlacement(components, zOrders) {
|
16
|
+
if (!zOrders) {
|
17
|
+
console.error('Z-ORDER NOT FOUND');
|
18
|
+
}
|
16
19
|
return components.reduce(function (acc, cur) {
|
17
20
|
var id = cur.id, jsonProperties = cur.jsonProperties, componentBlockCode = cur.componentBlockCode;
|
18
|
-
var _a = parsePropPlacement(jsonProperties.data.CB_PLACEMENT_PROP_PLACEMENT, id, componentBlockCode), mobileLayout = _a.mobileLayout, desktopLayout = _a.desktopLayout;
|
21
|
+
var _a = parsePropPlacement(jsonProperties.data.CB_PLACEMENT_PROP_PLACEMENT, id, componentBlockCode, zOrders), mobileLayout = _a.mobileLayout, desktopLayout = _a.desktopLayout;
|
19
22
|
return {
|
20
23
|
sm: __spreadArray(__spreadArray([], acc.sm, true), [mobileLayout], false),
|
21
24
|
lg: __spreadArray(__spreadArray([], acc.lg, true), [desktopLayout], false)
|
@@ -23,15 +26,15 @@ function parsePlacement(components) {
|
|
23
26
|
}, { sm: [], lg: [] });
|
24
27
|
}
|
25
28
|
exports.parsePlacement = parsePlacement;
|
26
|
-
function parsePropPlacement(props, id, cbCode) {
|
29
|
+
function parsePropPlacement(props, id, cbCode, zOrders) {
|
27
30
|
var desktopLayout = {
|
28
31
|
i: id.toString(),
|
29
32
|
x: props.CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTX,
|
30
33
|
y: props.CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTY,
|
31
34
|
w: props.CB_PLACEMENT_PROP_PLACEMENT_SPEC_COLS,
|
32
35
|
h: props.CB_PLACEMENT_PROP_PLACEMENT_SPEC_ROWS,
|
33
|
-
z:
|
34
|
-
|
36
|
+
z: zOrders.desktop[id],
|
37
|
+
autoResize: cbCode === types_1.CB_ALL_CODES.CB_TEXT
|
35
38
|
};
|
36
39
|
var mobileLayout = {
|
37
40
|
i: id.toString(),
|
@@ -39,8 +42,8 @@ function parsePropPlacement(props, id, cbCode) {
|
|
39
42
|
y: props['CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTY:MOBILE'],
|
40
43
|
w: props['CB_PLACEMENT_PROP_PLACEMENT_SPEC_COLS:MOBILE'],
|
41
44
|
h: props['CB_PLACEMENT_PROP_PLACEMENT_SPEC_ROWS:MOBILE'],
|
42
|
-
z:
|
43
|
-
|
45
|
+
z: zOrders.mobile[id],
|
46
|
+
autoResize: cbCode === types_1.CB_ALL_CODES.CB_TEXT
|
44
47
|
};
|
45
48
|
return {
|
46
49
|
mobileLayout: mobileLayout,
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { CB_STYLE_PROP_TEXT_SPECS } from '../../components/ComponentBlock/componentBlocks/
|
1
|
+
import type { CB_STYLE_PROP_TEXT_SPECS } from '../../components/ComponentBlock/componentBlocks/types';
|
2
2
|
import type { Device, StyleAndHoverStyle } from '../types';
|
3
3
|
import type { CB_STYLE_PROP_KEYS } from './types';
|
4
4
|
export type NAMED_CB_STYLE_TEXT_PROPS = {
|
@@ -14,7 +14,7 @@ export declare enum CB_STYLE_PROP_KEYS {
|
|
14
14
|
CB_STYLE_PROP_SHADOW = "CB_STYLE_PROP_SHADOW",
|
15
15
|
CB_STYLE_PROP_BORDER = "CB_STYLE_PROP_BORDER",
|
16
16
|
CB_STYLE_PROP_IMAGE = "CB_STYLE_PROP_IMAGE",
|
17
|
-
|
17
|
+
CB_STYLE_PROP_COLOR = "CB_STYLE_PROP_COLOR",
|
18
18
|
CB_STYLE_PROP_BGCOLOR = "CB_STYLE_PROP_BGCOLOR",
|
19
19
|
CB_STYLE_PROP_BGMEDIA = "CB_STYLE_PROP_BGMEDIA",
|
20
20
|
CB_STYLE_PROP_BGOVERLAY = "CB_STYLE_PROP_BGOVERLAY"
|
@@ -9,7 +9,7 @@ var CB_STYLE_PROP_KEYS;
|
|
9
9
|
CB_STYLE_PROP_KEYS["CB_STYLE_PROP_SHADOW"] = "CB_STYLE_PROP_SHADOW";
|
10
10
|
CB_STYLE_PROP_KEYS["CB_STYLE_PROP_BORDER"] = "CB_STYLE_PROP_BORDER";
|
11
11
|
CB_STYLE_PROP_KEYS["CB_STYLE_PROP_IMAGE"] = "CB_STYLE_PROP_IMAGE";
|
12
|
-
CB_STYLE_PROP_KEYS["
|
12
|
+
CB_STYLE_PROP_KEYS["CB_STYLE_PROP_COLOR"] = "CB_STYLE_PROP_COLOR";
|
13
13
|
CB_STYLE_PROP_KEYS["CB_STYLE_PROP_BGCOLOR"] = "CB_STYLE_PROP_BGCOLOR";
|
14
14
|
CB_STYLE_PROP_KEYS["CB_STYLE_PROP_BGMEDIA"] = "CB_STYLE_PROP_BGMEDIA";
|
15
15
|
CB_STYLE_PROP_KEYS["CB_STYLE_PROP_BGOVERLAY"] = "CB_STYLE_PROP_BGOVERLAY";
|
@@ -1,7 +1,5 @@
|
|
1
|
-
import type { CB_BTNTEXT_STYLE_PROPS, CB_STYLE_PROP_BTNCOLOR_SPECS } from '../components/ComponentBlock/componentBlocks/Button/btnTypes';
|
2
|
-
import type { CB_STYLE_PROP_TEXT_SPECS } from '../components/ComponentBlock/componentBlocks/Text/types';
|
3
1
|
import type { CB_TWITTER_STYLE_PROPS } from '../components/ComponentBlock/componentBlocks/Twitter/types';
|
4
|
-
import type { CB_CONTENT_PROP_CLINK, CB_CONTENT_PROP_CODEBLOCK, CB_CONTENT_PROP_IMAGE, CB_CONTENT_PROP_TEXT, CB_CONTENT_PROP_TWITTER } from '../components/ComponentBlock/componentBlocks/types';
|
2
|
+
import type { CB_CONTENT_PROP_CLINK, CB_CONTENT_PROP_CODEBLOCK, CB_CONTENT_PROP_IMAGE, CB_CONTENT_PROP_TEXT, CB_CONTENT_PROP_TWITTER, CB_STYLE_PROP_COLOR_SPECS, CB_STYLE_PROP_TEXT_SPECS } from '../components/ComponentBlock/componentBlocks/types';
|
5
3
|
import type { CB_CONTENT_PROP_YOUTUBE_TYPE, CB_STYLE_PROP_BGCOLOR_SPECS } from '../components/ComponentBlock/componentBlocks/Youtube/types';
|
6
4
|
import type { CB_CONTENT_PROP_VISIBILITY_SPECS } from './contentPropParsers/parseContentVisibility';
|
7
5
|
import type { CB_EFFECT_PROP_ENTANIM_SPECS } from './effectPropParsers/parseEffectPropEntAnim';
|
@@ -53,11 +51,11 @@ export type CB_BTN_PROPERTIES_TYPE = CB_GENERAL_PROPERTIES_TYPE & {
|
|
53
51
|
CB_CONTENT_PROP_TEXT: CB_CONTENT_PROP_TEXT;
|
54
52
|
CB_CONTENT_PROP_CLINK: CB_CONTENT_PROP_CLINK;
|
55
53
|
CB_CONTENT_PROP_VISIBILITY: CB_CONTENT_PROP_VISIBILITY_SPECS;
|
56
|
-
|
54
|
+
CB_STYLE_PROP_TEXT: CB_STYLE_PROP_TEXT_SPECS;
|
57
55
|
CB_STYLE_PROP_BORDER: CB_STYLE_PROP_BORDER_SPECS;
|
58
56
|
CB_STYLE_PROP_SHADOW: CB_STYLE_PROP_SHADOW_SPECS;
|
59
57
|
CB_STYLE_PROP_OPACITY: CB_STYLE_PROP_TEXT_OPACITY_SPECS;
|
60
|
-
|
58
|
+
CB_STYLE_PROP_COLOR: CB_STYLE_PROP_COLOR_SPECS;
|
61
59
|
CB_LAYOUT_PROP_PADDING: CB_LAYOUT_PROP_PADDING_SPECS;
|
62
60
|
CB_LAYOUT_PROP_ARRANGE: CB_LAYOUT_PROP_ARRANGE_SPECS;
|
63
61
|
CB_EFFECT_PROP_ENTANIM: CB_EFFECT_PROP_ENTANIM_SPECS;
|
@@ -1,13 +1,9 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import type { ISection } from '
|
2
|
+
import type { ISection } from '../types';
|
3
3
|
import type { Layout } from 'publ-echo/dist/lib/GridLayoutEditor/types';
|
4
4
|
export type LayoutsType = {
|
5
5
|
sm: Layout;
|
6
6
|
lg: Layout;
|
7
7
|
};
|
8
|
-
export type CustomSectionImperativeHandleRef = {
|
9
|
-
selectCB: (cbId: number | 'group') => void;
|
10
|
-
selectCBInBulk: (cbIds: string[]) => void;
|
11
|
-
};
|
12
8
|
declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<ISection & React.RefAttributes<unknown>>>;
|
13
9
|
export default _default;
|