@gravity-ui/page-constructor 1.2.3-alpha.1 → 1.2.3-alpha.3
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/build/cjs/blocks/Header/Header.css +1 -4
- package/build/cjs/blocks/Header/Header.js +5 -13
- package/build/cjs/blocks/Header/schema.d.ts +196 -244
- package/build/cjs/blocks/Header/schema.js +1 -22
- package/build/cjs/blocks/HeaderSlider/schema.d.ts +98 -122
- package/build/cjs/components/Image/schema.d.ts +4 -0
- package/build/cjs/components/Image/schema.js +7 -5
- package/build/cjs/models/constructor-items/blocks.d.ts +2 -2
- package/build/cjs/models/guards.d.ts +2 -3
- package/build/cjs/models/guards.js +1 -5
- package/build/cjs/schema/validators/common.d.ts +0 -1
- package/build/cjs/schema/validators/common.js +2 -3
- package/build/cjs/sub-blocks/Quote/schema.js +2 -2
- package/build/esm/blocks/Header/Header.css +1 -4
- package/build/esm/blocks/Header/Header.js +6 -14
- package/build/esm/blocks/Header/schema.d.ts +196 -244
- package/build/esm/blocks/Header/schema.js +1 -22
- package/build/esm/blocks/HeaderSlider/schema.d.ts +98 -122
- package/build/esm/components/Image/schema.d.ts +4 -0
- package/build/esm/components/Image/schema.js +4 -2
- package/build/esm/models/constructor-items/blocks.d.ts +2 -2
- package/build/esm/models/guards.d.ts +2 -3
- package/build/esm/models/guards.js +0 -3
- package/build/esm/schema/validators/common.d.ts +0 -1
- package/build/esm/schema/validators/common.js +1 -2
- package/build/esm/sub-blocks/Quote/schema.js +2 -2
- package/package.json +1 -1
- package/server/models/constructor-items/blocks.d.ts +2 -2
- package/server/models/guards.d.ts +2 -3
- package/server/models/guards.js +1 -5
|
@@ -9,6 +9,7 @@ unpredictable css rules order in build */
|
|
|
9
9
|
margin: 16px 0;
|
|
10
10
|
}
|
|
11
11
|
.pc-header-block_full-width {
|
|
12
|
+
--pc-border-radius: 0;
|
|
12
13
|
padding: 16px 0;
|
|
13
14
|
margin: 0 0 16px;
|
|
14
15
|
}
|
|
@@ -149,11 +150,7 @@ unpredictable css rules order in build */
|
|
|
149
150
|
width: 100%;
|
|
150
151
|
object-fit: cover;
|
|
151
152
|
}
|
|
152
|
-
.pc-header-block__background_full-width-media {
|
|
153
|
-
--pc-border-radius: 0;
|
|
154
|
-
}
|
|
155
153
|
.pc-header-block__background_full-width {
|
|
156
|
-
--pc-border-radius: 0;
|
|
157
154
|
left: 0;
|
|
158
155
|
transform: none;
|
|
159
156
|
max-width: none;
|
|
@@ -4,7 +4,6 @@ exports.HeaderBlock = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = (0, tslib_1.__importStar)(require("react"));
|
|
6
6
|
const utils_1 = require("../../utils");
|
|
7
|
-
const guards_1 = require("../../models/guards");
|
|
8
7
|
const components_1 = require("../../components");
|
|
9
8
|
const grid_1 = require("../../grid");
|
|
10
9
|
const utils_2 = require("./utils");
|
|
@@ -14,12 +13,9 @@ const ThemeValueContext_1 = require("../../context/theme/ThemeValueContext");
|
|
|
14
13
|
const utils_3 = require("../../components/Media/Image/utils");
|
|
15
14
|
const b = (0, utils_1.block)('header-block');
|
|
16
15
|
const Background = ({ background }) => {
|
|
17
|
-
const { url,
|
|
18
|
-
const imageObject = url
|
|
19
|
-
|
|
20
|
-
imageObject.disableCompress = disableCompress;
|
|
21
|
-
}
|
|
22
|
-
return (0, guards_1.headerHasMediaBackground)(background) ? (react_1.default.createElement(components_1.BackgroundMedia, Object.assign({}, background, { mediaClassName: b('background-media'), className: b('background', { media: true, 'full-width-media': fullWidthMedia }) }))) : (react_1.default.createElement(components_1.BackgroundImage, Object.assign({}, imageObject, { className: b('background', { 'full-width-media': fullWidthMedia }), imageClassName: b('background-img'), style: { backgroundColor: fullWidth ? 'none' : color } })));
|
|
16
|
+
const { url, image, fullWidthMedia } = background;
|
|
17
|
+
const imageObject = url ? (0, utils_3.getMediaImage)(url) : image;
|
|
18
|
+
return (react_1.default.createElement(components_1.BackgroundMedia, Object.assign({}, background, { image: imageObject, animated: false, parallax: false, mediaClassName: b('background-media'), className: b('background', { media: true, 'full-width-media': fullWidthMedia }) })));
|
|
23
19
|
};
|
|
24
20
|
const FullWidthBackground = ({ background }) => (react_1.default.createElement("div", { className: b('background', { ['full-width']: true }), style: { backgroundColor: background === null || background === void 0 ? void 0 : background.color } }));
|
|
25
21
|
const HeaderBlock = (props) => {
|
|
@@ -35,12 +31,8 @@ const HeaderBlock = (props) => {
|
|
|
35
31
|
const backgroundThemed = background && (0, utils_1.getThemedValue)(background, theme);
|
|
36
32
|
const imageThemed = image && (0, utils_1.getThemedValue)(image, theme);
|
|
37
33
|
const videoThemed = video && (0, utils_1.getThemedValue)(video, theme);
|
|
38
|
-
const fullWidth =
|
|
39
|
-
return (react_1.default.createElement("header", { className: b({
|
|
40
|
-
['has-media']: hasMedia,
|
|
41
|
-
['has-background']: Boolean(background),
|
|
42
|
-
['full-width']: fullWidth,
|
|
43
|
-
}, className) },
|
|
34
|
+
const fullWidth = backgroundThemed === null || backgroundThemed === void 0 ? void 0 : backgroundThemed.fullWidth;
|
|
35
|
+
return (react_1.default.createElement("header", { className: b({ ['has-media']: hasMedia, ['full-width']: fullWidth }, className) },
|
|
44
36
|
backgroundThemed && fullWidth && react_1.default.createElement(FullWidthBackground, { background: backgroundThemed }),
|
|
45
37
|
backgroundThemed && react_1.default.createElement(Background, { background: backgroundThemed }),
|
|
46
38
|
react_1.default.createElement(grid_1.Grid, { containerClass: b('container-fluid') },
|
|
@@ -140,163 +140,139 @@ export declare const HeaderProperties: {
|
|
|
140
140
|
};
|
|
141
141
|
background: {
|
|
142
142
|
oneOf: ({
|
|
143
|
-
|
|
143
|
+
fullWidth: {
|
|
144
144
|
type: string;
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
anyOf: ({
|
|
156
|
-
oneOf: ({
|
|
157
|
-
type: string;
|
|
158
|
-
properties: {
|
|
159
|
-
when: {
|
|
160
|
-
type: string;
|
|
161
|
-
};
|
|
162
|
-
};
|
|
163
|
-
} | {
|
|
164
|
-
type: string;
|
|
165
|
-
pattern: string;
|
|
166
|
-
})[];
|
|
167
|
-
} | {
|
|
168
|
-
type: string;
|
|
169
|
-
items: {
|
|
170
|
-
oneOf: ({
|
|
171
|
-
type: string;
|
|
172
|
-
properties: {
|
|
173
|
-
when: {
|
|
174
|
-
type: string;
|
|
175
|
-
};
|
|
176
|
-
};
|
|
177
|
-
} | {
|
|
178
|
-
type: string;
|
|
179
|
-
pattern: string;
|
|
180
|
-
})[];
|
|
181
|
-
};
|
|
182
|
-
})[];
|
|
183
|
-
};
|
|
184
|
-
video: {
|
|
145
|
+
};
|
|
146
|
+
fullWidthMedia: {
|
|
147
|
+
type: string;
|
|
148
|
+
};
|
|
149
|
+
color: {
|
|
150
|
+
type: string;
|
|
151
|
+
};
|
|
152
|
+
image: {
|
|
153
|
+
anyOf: ({
|
|
154
|
+
oneOf: ({
|
|
185
155
|
type: string;
|
|
186
|
-
additionalProperties: boolean;
|
|
187
|
-
required: string[];
|
|
188
156
|
properties: {
|
|
189
|
-
|
|
157
|
+
when: {
|
|
190
158
|
type: string;
|
|
191
|
-
items: {
|
|
192
|
-
type: string;
|
|
193
|
-
};
|
|
194
159
|
};
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
};
|
|
208
|
-
} | {
|
|
160
|
+
};
|
|
161
|
+
} | {
|
|
162
|
+
type: string;
|
|
163
|
+
pattern: string;
|
|
164
|
+
})[];
|
|
165
|
+
} | {
|
|
166
|
+
type: string;
|
|
167
|
+
items: {
|
|
168
|
+
oneOf: ({
|
|
169
|
+
type: string;
|
|
170
|
+
properties: {
|
|
171
|
+
when: {
|
|
209
172
|
type: string;
|
|
210
|
-
})[];
|
|
211
|
-
};
|
|
212
|
-
type: {
|
|
213
|
-
type: string;
|
|
214
|
-
enum: string[];
|
|
215
|
-
};
|
|
216
|
-
muted: {
|
|
217
|
-
type: string;
|
|
218
|
-
};
|
|
219
|
-
playing: {
|
|
220
|
-
type: string;
|
|
221
|
-
};
|
|
222
|
-
elapsedTime: {
|
|
223
|
-
type: string;
|
|
224
|
-
};
|
|
225
|
-
playIcon: {
|
|
226
|
-
type: string;
|
|
227
|
-
additionalProperties: boolean;
|
|
228
|
-
properties: {
|
|
229
|
-
type: {
|
|
230
|
-
type: string;
|
|
231
|
-
enum: string[];
|
|
232
|
-
};
|
|
233
|
-
theme: {
|
|
234
|
-
type: string;
|
|
235
|
-
enum: string[];
|
|
236
|
-
};
|
|
237
|
-
text: {
|
|
238
|
-
type: string;
|
|
239
|
-
};
|
|
240
173
|
};
|
|
241
174
|
};
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
};
|
|
247
|
-
};
|
|
248
|
-
youtube: {
|
|
249
|
-
type: string;
|
|
250
|
-
};
|
|
251
|
-
parallax: {
|
|
252
|
-
type: string;
|
|
253
|
-
};
|
|
254
|
-
height: {
|
|
255
|
-
type: string;
|
|
175
|
+
} | {
|
|
176
|
+
type: string;
|
|
177
|
+
pattern: string;
|
|
178
|
+
})[];
|
|
256
179
|
};
|
|
257
|
-
|
|
180
|
+
})[];
|
|
181
|
+
};
|
|
182
|
+
video: {
|
|
183
|
+
type: string;
|
|
184
|
+
additionalProperties: boolean;
|
|
185
|
+
required: string[];
|
|
186
|
+
properties: {
|
|
187
|
+
src: {
|
|
258
188
|
type: string;
|
|
189
|
+
items: {
|
|
190
|
+
type: string;
|
|
191
|
+
};
|
|
259
192
|
};
|
|
260
|
-
|
|
261
|
-
|
|
193
|
+
loop: {
|
|
194
|
+
anyOf: ({
|
|
262
195
|
type: string;
|
|
263
196
|
additionalProperties: boolean;
|
|
264
197
|
required: string[];
|
|
265
198
|
properties: {
|
|
266
|
-
|
|
199
|
+
start: {
|
|
267
200
|
type: string;
|
|
268
201
|
};
|
|
269
|
-
|
|
202
|
+
end: {
|
|
270
203
|
type: string;
|
|
271
|
-
enum: string[];
|
|
272
204
|
};
|
|
273
205
|
};
|
|
274
206
|
} | {
|
|
275
207
|
type: string;
|
|
276
208
|
})[];
|
|
277
209
|
};
|
|
278
|
-
|
|
279
|
-
} | {
|
|
280
|
-
type: string;
|
|
281
|
-
additionalProperties: boolean;
|
|
282
|
-
properties: {
|
|
283
|
-
color: {
|
|
210
|
+
type: {
|
|
284
211
|
type: string;
|
|
212
|
+
enum: string[];
|
|
285
213
|
};
|
|
286
|
-
|
|
214
|
+
muted: {
|
|
287
215
|
type: string;
|
|
288
216
|
};
|
|
289
|
-
|
|
217
|
+
playing: {
|
|
290
218
|
type: string;
|
|
291
219
|
};
|
|
292
|
-
|
|
220
|
+
elapsedTime: {
|
|
293
221
|
type: string;
|
|
294
222
|
};
|
|
295
|
-
|
|
223
|
+
playIcon: {
|
|
296
224
|
type: string;
|
|
225
|
+
additionalProperties: boolean;
|
|
226
|
+
properties: {
|
|
227
|
+
type: {
|
|
228
|
+
type: string;
|
|
229
|
+
enum: string[];
|
|
230
|
+
};
|
|
231
|
+
theme: {
|
|
232
|
+
type: string;
|
|
233
|
+
enum: string[];
|
|
234
|
+
};
|
|
235
|
+
text: {
|
|
236
|
+
type: string;
|
|
237
|
+
};
|
|
238
|
+
};
|
|
239
|
+
};
|
|
240
|
+
controls: {
|
|
241
|
+
type: string;
|
|
242
|
+
enum: string[];
|
|
297
243
|
};
|
|
298
244
|
};
|
|
299
|
-
}
|
|
245
|
+
};
|
|
246
|
+
youtube: {
|
|
247
|
+
type: string;
|
|
248
|
+
};
|
|
249
|
+
parallax: {
|
|
250
|
+
type: string;
|
|
251
|
+
};
|
|
252
|
+
height: {
|
|
253
|
+
type: string;
|
|
254
|
+
};
|
|
255
|
+
previewImg: {
|
|
256
|
+
type: string;
|
|
257
|
+
};
|
|
258
|
+
dataLens: {
|
|
259
|
+
oneOf: ({
|
|
260
|
+
type: string;
|
|
261
|
+
additionalProperties: boolean;
|
|
262
|
+
required: string[];
|
|
263
|
+
properties: {
|
|
264
|
+
id: {
|
|
265
|
+
type: string;
|
|
266
|
+
};
|
|
267
|
+
theme: {
|
|
268
|
+
type: string;
|
|
269
|
+
enum: string[];
|
|
270
|
+
};
|
|
271
|
+
};
|
|
272
|
+
} | {
|
|
273
|
+
type: string;
|
|
274
|
+
})[];
|
|
275
|
+
};
|
|
300
276
|
} | {
|
|
301
277
|
type: string;
|
|
302
278
|
additionalProperties: boolean;
|
|
@@ -485,163 +461,139 @@ export declare const HeaderBlock: {
|
|
|
485
461
|
};
|
|
486
462
|
background: {
|
|
487
463
|
oneOf: ({
|
|
488
|
-
|
|
464
|
+
fullWidth: {
|
|
489
465
|
type: string;
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
anyOf: ({
|
|
501
|
-
oneOf: ({
|
|
502
|
-
type: string;
|
|
503
|
-
properties: {
|
|
504
|
-
when: {
|
|
505
|
-
type: string;
|
|
506
|
-
};
|
|
507
|
-
};
|
|
508
|
-
} | {
|
|
509
|
-
type: string;
|
|
510
|
-
pattern: string;
|
|
511
|
-
})[];
|
|
512
|
-
} | {
|
|
513
|
-
type: string;
|
|
514
|
-
items: {
|
|
515
|
-
oneOf: ({
|
|
516
|
-
type: string;
|
|
517
|
-
properties: {
|
|
518
|
-
when: {
|
|
519
|
-
type: string;
|
|
520
|
-
};
|
|
521
|
-
};
|
|
522
|
-
} | {
|
|
523
|
-
type: string;
|
|
524
|
-
pattern: string;
|
|
525
|
-
})[];
|
|
526
|
-
};
|
|
527
|
-
})[];
|
|
528
|
-
};
|
|
529
|
-
video: {
|
|
466
|
+
};
|
|
467
|
+
fullWidthMedia: {
|
|
468
|
+
type: string;
|
|
469
|
+
};
|
|
470
|
+
color: {
|
|
471
|
+
type: string;
|
|
472
|
+
};
|
|
473
|
+
image: {
|
|
474
|
+
anyOf: ({
|
|
475
|
+
oneOf: ({
|
|
530
476
|
type: string;
|
|
531
|
-
additionalProperties: boolean;
|
|
532
|
-
required: string[];
|
|
533
477
|
properties: {
|
|
534
|
-
|
|
478
|
+
when: {
|
|
535
479
|
type: string;
|
|
536
|
-
items: {
|
|
537
|
-
type: string;
|
|
538
|
-
};
|
|
539
480
|
};
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
};
|
|
553
|
-
} | {
|
|
481
|
+
};
|
|
482
|
+
} | {
|
|
483
|
+
type: string;
|
|
484
|
+
pattern: string;
|
|
485
|
+
})[];
|
|
486
|
+
} | {
|
|
487
|
+
type: string;
|
|
488
|
+
items: {
|
|
489
|
+
oneOf: ({
|
|
490
|
+
type: string;
|
|
491
|
+
properties: {
|
|
492
|
+
when: {
|
|
554
493
|
type: string;
|
|
555
|
-
})[];
|
|
556
|
-
};
|
|
557
|
-
type: {
|
|
558
|
-
type: string;
|
|
559
|
-
enum: string[];
|
|
560
|
-
};
|
|
561
|
-
muted: {
|
|
562
|
-
type: string;
|
|
563
|
-
};
|
|
564
|
-
playing: {
|
|
565
|
-
type: string;
|
|
566
|
-
};
|
|
567
|
-
elapsedTime: {
|
|
568
|
-
type: string;
|
|
569
|
-
};
|
|
570
|
-
playIcon: {
|
|
571
|
-
type: string;
|
|
572
|
-
additionalProperties: boolean;
|
|
573
|
-
properties: {
|
|
574
|
-
type: {
|
|
575
|
-
type: string;
|
|
576
|
-
enum: string[];
|
|
577
|
-
};
|
|
578
|
-
theme: {
|
|
579
|
-
type: string;
|
|
580
|
-
enum: string[];
|
|
581
|
-
};
|
|
582
|
-
text: {
|
|
583
|
-
type: string;
|
|
584
|
-
};
|
|
585
494
|
};
|
|
586
495
|
};
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
};
|
|
592
|
-
};
|
|
593
|
-
youtube: {
|
|
594
|
-
type: string;
|
|
595
|
-
};
|
|
596
|
-
parallax: {
|
|
597
|
-
type: string;
|
|
598
|
-
};
|
|
599
|
-
height: {
|
|
600
|
-
type: string;
|
|
496
|
+
} | {
|
|
497
|
+
type: string;
|
|
498
|
+
pattern: string;
|
|
499
|
+
})[];
|
|
601
500
|
};
|
|
602
|
-
|
|
501
|
+
})[];
|
|
502
|
+
};
|
|
503
|
+
video: {
|
|
504
|
+
type: string;
|
|
505
|
+
additionalProperties: boolean;
|
|
506
|
+
required: string[];
|
|
507
|
+
properties: {
|
|
508
|
+
src: {
|
|
603
509
|
type: string;
|
|
510
|
+
items: {
|
|
511
|
+
type: string;
|
|
512
|
+
};
|
|
604
513
|
};
|
|
605
|
-
|
|
606
|
-
|
|
514
|
+
loop: {
|
|
515
|
+
anyOf: ({
|
|
607
516
|
type: string;
|
|
608
517
|
additionalProperties: boolean;
|
|
609
518
|
required: string[];
|
|
610
519
|
properties: {
|
|
611
|
-
|
|
520
|
+
start: {
|
|
612
521
|
type: string;
|
|
613
522
|
};
|
|
614
|
-
|
|
523
|
+
end: {
|
|
615
524
|
type: string;
|
|
616
|
-
enum: string[];
|
|
617
525
|
};
|
|
618
526
|
};
|
|
619
527
|
} | {
|
|
620
528
|
type: string;
|
|
621
529
|
})[];
|
|
622
530
|
};
|
|
623
|
-
|
|
624
|
-
} | {
|
|
625
|
-
type: string;
|
|
626
|
-
additionalProperties: boolean;
|
|
627
|
-
properties: {
|
|
628
|
-
color: {
|
|
531
|
+
type: {
|
|
629
532
|
type: string;
|
|
533
|
+
enum: string[];
|
|
630
534
|
};
|
|
631
|
-
|
|
535
|
+
muted: {
|
|
632
536
|
type: string;
|
|
633
537
|
};
|
|
634
|
-
|
|
538
|
+
playing: {
|
|
635
539
|
type: string;
|
|
636
540
|
};
|
|
637
|
-
|
|
541
|
+
elapsedTime: {
|
|
542
|
+
type: string;
|
|
543
|
+
};
|
|
544
|
+
playIcon: {
|
|
638
545
|
type: string;
|
|
546
|
+
additionalProperties: boolean;
|
|
547
|
+
properties: {
|
|
548
|
+
type: {
|
|
549
|
+
type: string;
|
|
550
|
+
enum: string[];
|
|
551
|
+
};
|
|
552
|
+
theme: {
|
|
553
|
+
type: string;
|
|
554
|
+
enum: string[];
|
|
555
|
+
};
|
|
556
|
+
text: {
|
|
557
|
+
type: string;
|
|
558
|
+
};
|
|
559
|
+
};
|
|
639
560
|
};
|
|
640
|
-
|
|
561
|
+
controls: {
|
|
641
562
|
type: string;
|
|
563
|
+
enum: string[];
|
|
642
564
|
};
|
|
643
565
|
};
|
|
644
|
-
}
|
|
566
|
+
};
|
|
567
|
+
youtube: {
|
|
568
|
+
type: string;
|
|
569
|
+
};
|
|
570
|
+
parallax: {
|
|
571
|
+
type: string;
|
|
572
|
+
};
|
|
573
|
+
height: {
|
|
574
|
+
type: string;
|
|
575
|
+
};
|
|
576
|
+
previewImg: {
|
|
577
|
+
type: string;
|
|
578
|
+
};
|
|
579
|
+
dataLens: {
|
|
580
|
+
oneOf: ({
|
|
581
|
+
type: string;
|
|
582
|
+
additionalProperties: boolean;
|
|
583
|
+
required: string[];
|
|
584
|
+
properties: {
|
|
585
|
+
id: {
|
|
586
|
+
type: string;
|
|
587
|
+
};
|
|
588
|
+
theme: {
|
|
589
|
+
type: string;
|
|
590
|
+
enum: string[];
|
|
591
|
+
};
|
|
592
|
+
};
|
|
593
|
+
} | {
|
|
594
|
+
type: string;
|
|
595
|
+
})[];
|
|
596
|
+
};
|
|
645
597
|
} | {
|
|
646
598
|
type: string;
|
|
647
599
|
additionalProperties: boolean;
|
|
@@ -4,12 +4,6 @@ exports.HeaderBlock = exports.HeaderProperties = void 0;
|
|
|
4
4
|
const common_1 = require("../../schema/validators/common");
|
|
5
5
|
const utils_1 = require("../../schema/validators/utils");
|
|
6
6
|
const schema_1 = require("../../components/Image/schema");
|
|
7
|
-
const HeaderMedia = {
|
|
8
|
-
type: 'object',
|
|
9
|
-
additionalProperties: false,
|
|
10
|
-
required: [],
|
|
11
|
-
properties: Object.assign(Object.assign({}, common_1.MediaProps), { fullWidth: { type: 'boolean' } }),
|
|
12
|
-
};
|
|
13
7
|
exports.HeaderProperties = {
|
|
14
8
|
title: {
|
|
15
9
|
type: 'string',
|
|
@@ -51,22 +45,7 @@ exports.HeaderProperties = {
|
|
|
51
45
|
type: 'string',
|
|
52
46
|
enum: ['s', 'm', 'l', 'xl'],
|
|
53
47
|
},
|
|
54
|
-
background: (0, common_1.withTheme)({
|
|
55
|
-
oneOf: [
|
|
56
|
-
HeaderMedia,
|
|
57
|
-
{
|
|
58
|
-
type: 'object',
|
|
59
|
-
additionalProperties: false,
|
|
60
|
-
properties: {
|
|
61
|
-
color: { type: 'string' },
|
|
62
|
-
url: { type: 'string' },
|
|
63
|
-
disableCompress: { type: 'boolean' },
|
|
64
|
-
fullWidth: { type: 'boolean' },
|
|
65
|
-
fullWidthMedia: { type: 'boolean' },
|
|
66
|
-
},
|
|
67
|
-
},
|
|
68
|
-
],
|
|
69
|
-
}),
|
|
48
|
+
background: (0, common_1.withTheme)(Object.assign(Object.assign({}, common_1.MediaProps), { fullWidth: { type: 'boolean' }, fullWidthMedia: { type: 'boolean' } })),
|
|
70
49
|
theme: {
|
|
71
50
|
type: 'string',
|
|
72
51
|
enum: ['default', 'dark'],
|