@gravity-ui/page-constructor 1.11.1 → 1.12.1
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/CHANGELOG.md +15 -0
- package/build/cjs/blocks/Banner/schema.d.ts +12 -0
- package/build/cjs/blocks/Banner/schema.js +2 -0
- package/build/cjs/blocks/CardLayout/schema.d.ts +28 -22
- package/build/cjs/blocks/CardLayout/schema.js +1 -5
- package/build/cjs/blocks/Companies/schema.d.ts +2 -0
- package/build/cjs/blocks/Companies/schema.js +2 -0
- package/build/cjs/blocks/ContentLayout/schema.d.ts +6 -0
- package/build/cjs/blocks/ExtendedFeatures/schema.d.ts +22 -16
- package/build/cjs/blocks/ExtendedFeatures/schema.js +3 -5
- package/build/cjs/blocks/Header/schema.d.ts +16 -0
- package/build/cjs/blocks/Header/schema.js +5 -0
- package/build/cjs/blocks/HeaderSlider/schema.d.ts +9 -23
- package/build/cjs/blocks/Icons/schema.d.ts +6 -0
- package/build/cjs/blocks/Icons/schema.js +2 -0
- package/build/cjs/blocks/Info/schema.d.ts +10 -0
- package/build/cjs/blocks/Info/schema.js +2 -0
- package/build/cjs/blocks/LinkTable/schema.d.ts +30 -20
- package/build/cjs/blocks/LinkTable/schema.js +1 -1
- package/build/cjs/blocks/Media/schema.d.ts +62 -53
- package/build/cjs/blocks/Media/schema.js +6 -10
- package/build/cjs/blocks/Preview/schema.d.ts +2 -0
- package/build/cjs/blocks/Preview/schema.js +4 -0
- package/build/cjs/blocks/PromoFeaturesBlock/schema.d.ts +20 -14
- package/build/cjs/blocks/PromoFeaturesBlock/schema.js +3 -5
- package/build/cjs/blocks/Questions/schema.d.ts +5 -0
- package/build/cjs/blocks/Questions/schema.js +2 -0
- package/build/cjs/blocks/Security/schema.d.ts +2 -0
- package/build/cjs/blocks/Security/schema.js +2 -0
- package/build/cjs/blocks/Simple/schema.d.ts +3 -0
- package/build/cjs/blocks/Simple/schema.js +1 -0
- package/build/cjs/blocks/Slider/schema.d.ts +31 -45
- package/build/cjs/blocks/Slider/schema.js +2 -5
- package/build/cjs/blocks/Table/schema.d.ts +4 -0
- package/build/cjs/blocks/Table/schema.js +3 -0
- package/build/cjs/blocks/Tabs/schema.d.ts +37 -23
- package/build/cjs/blocks/Tabs/schema.js +2 -3
- package/build/cjs/components/Author/schema.d.ts +3 -0
- package/build/cjs/components/BlockHeader/BlockHeader.css +8 -19
- package/build/cjs/components/BlockHeader/BlockHeader.js +4 -3
- package/build/cjs/components/Image/schema.d.ts +2 -0
- package/build/cjs/components/Image/schema.js +14 -23
- package/build/cjs/schema/index.d.ts +2 -0
- package/build/cjs/schema/validators/common.d.ts +48 -0
- package/build/cjs/schema/validators/common.js +21 -1
- package/build/cjs/sub-blocks/BackgroundCard/schema.d.ts +5 -0
- package/build/cjs/sub-blocks/BasicCard/schema.d.ts +4 -0
- package/build/cjs/sub-blocks/CardWithImage/schema.d.ts +54 -46
- package/build/cjs/sub-blocks/CardWithImage/schema.js +7 -6
- package/build/cjs/sub-blocks/Content/schema.d.ts +8 -0
- package/build/cjs/sub-blocks/Content/schema.js +3 -1
- package/build/cjs/sub-blocks/MediaCard/schema.d.ts +1 -0
- package/build/cjs/sub-blocks/NewsCard/schema.d.ts +1 -0
- package/build/cjs/sub-blocks/NewsCard/schema.js +1 -0
- package/build/cjs/sub-blocks/Partner/schema.d.ts +1 -0
- package/build/cjs/sub-blocks/Partner/schema.js +1 -0
- package/build/cjs/sub-blocks/PriceDetailed/schema.d.ts +1 -0
- package/build/cjs/sub-blocks/PriceDetailed/schema.js +8 -0
- package/build/cjs/sub-blocks/Quote/schema.d.ts +4 -0
- package/build/cjs/sub-blocks/Quote/schema.js +1 -0
- package/build/cjs/sub-blocks/TutorialCard/schema.d.ts +2 -0
- package/build/cjs/sub-blocks/TutorialCard/schema.js +2 -0
- package/build/cjs/text-transform/blocks.js +49 -32
- package/build/esm/blocks/Banner/schema.d.ts +12 -0
- package/build/esm/blocks/Banner/schema.js +2 -0
- package/build/esm/blocks/CardLayout/schema.d.ts +28 -22
- package/build/esm/blocks/CardLayout/schema.js +2 -6
- package/build/esm/blocks/Companies/schema.d.ts +2 -0
- package/build/esm/blocks/Companies/schema.js +2 -0
- package/build/esm/blocks/ContentLayout/schema.d.ts +6 -0
- package/build/esm/blocks/ExtendedFeatures/schema.d.ts +22 -16
- package/build/esm/blocks/ExtendedFeatures/schema.js +4 -6
- package/build/esm/blocks/Header/schema.d.ts +16 -0
- package/build/esm/blocks/Header/schema.js +5 -0
- package/build/esm/blocks/HeaderSlider/schema.d.ts +9 -23
- package/build/esm/blocks/Icons/schema.d.ts +6 -0
- package/build/esm/blocks/Icons/schema.js +2 -0
- package/build/esm/blocks/Info/schema.d.ts +10 -0
- package/build/esm/blocks/Info/schema.js +2 -0
- package/build/esm/blocks/LinkTable/schema.d.ts +30 -20
- package/build/esm/blocks/LinkTable/schema.js +2 -2
- package/build/esm/blocks/Media/schema.d.ts +62 -53
- package/build/esm/blocks/Media/schema.js +7 -11
- package/build/esm/blocks/Preview/schema.d.ts +2 -0
- package/build/esm/blocks/Preview/schema.js +4 -0
- package/build/esm/blocks/PromoFeaturesBlock/schema.d.ts +20 -14
- package/build/esm/blocks/PromoFeaturesBlock/schema.js +4 -6
- package/build/esm/blocks/Questions/schema.d.ts +5 -0
- package/build/esm/blocks/Questions/schema.js +2 -0
- package/build/esm/blocks/Security/schema.d.ts +2 -0
- package/build/esm/blocks/Security/schema.js +2 -0
- package/build/esm/blocks/Simple/schema.d.ts +3 -0
- package/build/esm/blocks/Simple/schema.js +1 -0
- package/build/esm/blocks/Slider/schema.d.ts +31 -45
- package/build/esm/blocks/Slider/schema.js +3 -6
- package/build/esm/blocks/Table/schema.d.ts +4 -0
- package/build/esm/blocks/Table/schema.js +3 -0
- package/build/esm/blocks/Tabs/schema.d.ts +37 -23
- package/build/esm/blocks/Tabs/schema.js +3 -4
- package/build/esm/components/Author/schema.d.ts +3 -0
- package/build/esm/components/BlockHeader/BlockHeader.css +8 -19
- package/build/esm/components/BlockHeader/BlockHeader.js +5 -4
- package/build/esm/components/Image/schema.d.ts +2 -0
- package/build/esm/components/Image/schema.js +14 -23
- package/build/esm/schema/index.d.ts +2 -0
- package/build/esm/schema/validators/common.d.ts +48 -0
- package/build/esm/schema/validators/common.js +20 -0
- package/build/esm/sub-blocks/BackgroundCard/schema.d.ts +5 -0
- package/build/esm/sub-blocks/BasicCard/schema.d.ts +4 -0
- package/build/esm/sub-blocks/CardWithImage/schema.d.ts +54 -46
- package/build/esm/sub-blocks/CardWithImage/schema.js +8 -7
- package/build/esm/sub-blocks/Content/schema.d.ts +8 -0
- package/build/esm/sub-blocks/Content/schema.js +3 -1
- package/build/esm/sub-blocks/MediaCard/schema.d.ts +1 -0
- package/build/esm/sub-blocks/NewsCard/schema.d.ts +1 -0
- package/build/esm/sub-blocks/NewsCard/schema.js +1 -0
- package/build/esm/sub-blocks/Partner/schema.d.ts +1 -0
- package/build/esm/sub-blocks/Partner/schema.js +1 -0
- package/build/esm/sub-blocks/PriceDetailed/schema.d.ts +1 -0
- package/build/esm/sub-blocks/PriceDetailed/schema.js +8 -0
- package/build/esm/sub-blocks/Quote/schema.d.ts +4 -0
- package/build/esm/sub-blocks/Quote/schema.js +1 -0
- package/build/esm/sub-blocks/TutorialCard/schema.d.ts +2 -0
- package/build/esm/sub-blocks/TutorialCard/schema.js +2 -0
- package/build/esm/text-transform/blocks.js +49 -32
- package/package.json +1 -4
- package/server/text-transform/blocks.js +49 -32
|
@@ -12,12 +12,15 @@ export declare const HeaderSliderBlock: {
|
|
|
12
12
|
properties: {
|
|
13
13
|
title: {
|
|
14
14
|
type: string;
|
|
15
|
+
contentType: string;
|
|
15
16
|
};
|
|
16
17
|
overtitle: {
|
|
17
18
|
type: string;
|
|
19
|
+
contentType: string;
|
|
18
20
|
};
|
|
19
21
|
description: {
|
|
20
22
|
type: string;
|
|
23
|
+
contentType: string;
|
|
21
24
|
};
|
|
22
25
|
width: {
|
|
23
26
|
type: string;
|
|
@@ -114,6 +117,7 @@ export declare const HeaderSliderBlock: {
|
|
|
114
117
|
};
|
|
115
118
|
text: {
|
|
116
119
|
type: string;
|
|
120
|
+
contentType: string;
|
|
117
121
|
};
|
|
118
122
|
};
|
|
119
123
|
};
|
|
@@ -138,6 +142,7 @@ export declare const HeaderSliderBlock: {
|
|
|
138
142
|
};
|
|
139
143
|
title: {
|
|
140
144
|
type: string;
|
|
145
|
+
contentType: string;
|
|
141
146
|
};
|
|
142
147
|
};
|
|
143
148
|
};
|
|
@@ -249,6 +254,7 @@ export declare const HeaderSliderBlock: {
|
|
|
249
254
|
};
|
|
250
255
|
text: {
|
|
251
256
|
type: string;
|
|
257
|
+
contentType: string;
|
|
252
258
|
};
|
|
253
259
|
};
|
|
254
260
|
};
|
|
@@ -317,6 +323,7 @@ export declare const HeaderSliderBlock: {
|
|
|
317
323
|
};
|
|
318
324
|
text: {
|
|
319
325
|
type: string;
|
|
326
|
+
contentType: string;
|
|
320
327
|
};
|
|
321
328
|
};
|
|
322
329
|
};
|
|
@@ -339,29 +346,6 @@ export declare const HeaderSliderBlock: {
|
|
|
339
346
|
arrows: {
|
|
340
347
|
type: string;
|
|
341
348
|
};
|
|
342
|
-
description: {
|
|
343
|
-
type: string;
|
|
344
|
-
};
|
|
345
|
-
title: {
|
|
346
|
-
type: string;
|
|
347
|
-
additionalProperties: boolean;
|
|
348
|
-
required: string[];
|
|
349
|
-
properties: {
|
|
350
|
-
text: {
|
|
351
|
-
type: string;
|
|
352
|
-
};
|
|
353
|
-
textSize: {
|
|
354
|
-
type: string;
|
|
355
|
-
enum: string[];
|
|
356
|
-
};
|
|
357
|
-
url: {
|
|
358
|
-
type: string;
|
|
359
|
-
};
|
|
360
|
-
resetMargin: {
|
|
361
|
-
type: string;
|
|
362
|
-
};
|
|
363
|
-
};
|
|
364
|
-
};
|
|
365
349
|
randomOrder: {
|
|
366
350
|
type: string;
|
|
367
351
|
};
|
|
@@ -390,6 +374,7 @@ export declare const HeaderSliderBlock: {
|
|
|
390
374
|
properties: {
|
|
391
375
|
text: {
|
|
392
376
|
type: string;
|
|
377
|
+
contentType: string;
|
|
393
378
|
};
|
|
394
379
|
size: {
|
|
395
380
|
type: string;
|
|
@@ -434,6 +419,7 @@ export declare const HeaderSliderBlock: {
|
|
|
434
419
|
properties: {
|
|
435
420
|
text: {
|
|
436
421
|
type: string;
|
|
422
|
+
contentType: string;
|
|
437
423
|
};
|
|
438
424
|
url: {
|
|
439
425
|
type: string;
|
|
@@ -4,6 +4,7 @@ export declare const IconsProps: {
|
|
|
4
4
|
properties: {
|
|
5
5
|
title: {
|
|
6
6
|
type: string;
|
|
7
|
+
contentType: string;
|
|
7
8
|
};
|
|
8
9
|
size: {
|
|
9
10
|
type: string;
|
|
@@ -21,6 +22,7 @@ export declare const IconsProps: {
|
|
|
21
22
|
};
|
|
22
23
|
text: {
|
|
23
24
|
type: string;
|
|
25
|
+
contentType: string;
|
|
24
26
|
};
|
|
25
27
|
src: {
|
|
26
28
|
type: string;
|
|
@@ -38,6 +40,7 @@ export declare const IconsProps: {
|
|
|
38
40
|
properties: {
|
|
39
41
|
text: {
|
|
40
42
|
type: string;
|
|
43
|
+
contentType: string;
|
|
41
44
|
};
|
|
42
45
|
url: {
|
|
43
46
|
type: string;
|
|
@@ -62,6 +65,7 @@ export declare const IconsBlock: {
|
|
|
62
65
|
properties: {
|
|
63
66
|
title: {
|
|
64
67
|
type: string;
|
|
68
|
+
contentType: string;
|
|
65
69
|
};
|
|
66
70
|
size: {
|
|
67
71
|
type: string;
|
|
@@ -79,6 +83,7 @@ export declare const IconsBlock: {
|
|
|
79
83
|
};
|
|
80
84
|
text: {
|
|
81
85
|
type: string;
|
|
86
|
+
contentType: string;
|
|
82
87
|
};
|
|
83
88
|
src: {
|
|
84
89
|
type: string;
|
|
@@ -96,6 +101,7 @@ export declare const IconsBlock: {
|
|
|
96
101
|
properties: {
|
|
97
102
|
text: {
|
|
98
103
|
type: string;
|
|
104
|
+
contentType: string;
|
|
99
105
|
};
|
|
100
106
|
url: {
|
|
101
107
|
type: string;
|
|
@@ -4,6 +4,7 @@ export const IconsProps = {
|
|
|
4
4
|
required: ['size', 'items'],
|
|
5
5
|
properties: Object.assign(Object.assign(Object.assign({}, BlockBaseProps), AnimatableProps), { title: {
|
|
6
6
|
type: 'string',
|
|
7
|
+
contentType: 'text',
|
|
7
8
|
}, size: {
|
|
8
9
|
type: 'string',
|
|
9
10
|
enum: ['s', 'm', 'l'],
|
|
@@ -19,6 +20,7 @@ export const IconsProps = {
|
|
|
19
20
|
},
|
|
20
21
|
text: {
|
|
21
22
|
type: 'string',
|
|
23
|
+
contentType: 'text',
|
|
22
24
|
},
|
|
23
25
|
src: {
|
|
24
26
|
type: 'string',
|
|
@@ -5,6 +5,7 @@ export declare const InfoBlock: {
|
|
|
5
5
|
properties: {
|
|
6
6
|
title: {
|
|
7
7
|
type: string;
|
|
8
|
+
contentType: string;
|
|
8
9
|
};
|
|
9
10
|
backgroundColor: {
|
|
10
11
|
oneOf: ({
|
|
@@ -18,6 +19,7 @@ export declare const InfoBlock: {
|
|
|
18
19
|
};
|
|
19
20
|
sectionsTitle: {
|
|
20
21
|
type: string;
|
|
22
|
+
contentType: string;
|
|
21
23
|
};
|
|
22
24
|
buttons: {
|
|
23
25
|
type: string;
|
|
@@ -56,6 +58,7 @@ export declare const InfoBlock: {
|
|
|
56
58
|
properties: {
|
|
57
59
|
text: {
|
|
58
60
|
type: string;
|
|
61
|
+
contentType: string;
|
|
59
62
|
};
|
|
60
63
|
textSize: {
|
|
61
64
|
type: string;
|
|
@@ -70,13 +73,16 @@ export declare const InfoBlock: {
|
|
|
70
73
|
};
|
|
71
74
|
} | {
|
|
72
75
|
type: string;
|
|
76
|
+
contentType: string;
|
|
73
77
|
})[];
|
|
74
78
|
};
|
|
75
79
|
text: {
|
|
76
80
|
type: string;
|
|
81
|
+
contentType: string;
|
|
77
82
|
};
|
|
78
83
|
additionalInfo: {
|
|
79
84
|
type: string;
|
|
85
|
+
contentType: string;
|
|
80
86
|
};
|
|
81
87
|
size: {
|
|
82
88
|
type: string;
|
|
@@ -121,6 +127,7 @@ export declare const InfoBlock: {
|
|
|
121
127
|
properties: {
|
|
122
128
|
text: {
|
|
123
129
|
type: string;
|
|
130
|
+
contentType: string;
|
|
124
131
|
};
|
|
125
132
|
textSize: {
|
|
126
133
|
type: string;
|
|
@@ -135,13 +142,16 @@ export declare const InfoBlock: {
|
|
|
135
142
|
};
|
|
136
143
|
} | {
|
|
137
144
|
type: string;
|
|
145
|
+
contentType: string;
|
|
138
146
|
})[];
|
|
139
147
|
};
|
|
140
148
|
text: {
|
|
141
149
|
type: string;
|
|
150
|
+
contentType: string;
|
|
142
151
|
};
|
|
143
152
|
additionalInfo: {
|
|
144
153
|
type: string;
|
|
154
|
+
contentType: string;
|
|
145
155
|
};
|
|
146
156
|
size: {
|
|
147
157
|
type: string;
|
|
@@ -12,10 +12,12 @@ export const InfoBlock = {
|
|
|
12
12
|
required: ['title', 'sectionsTitle'],
|
|
13
13
|
properties: Object.assign(Object.assign({}, BaseProps), { title: {
|
|
14
14
|
type: 'string',
|
|
15
|
+
contentType: 'text',
|
|
15
16
|
}, backgroundColor: withTheme({
|
|
16
17
|
type: 'string',
|
|
17
18
|
}), sectionsTitle: {
|
|
18
19
|
type: 'string',
|
|
20
|
+
contentType: 'text',
|
|
19
21
|
}, buttons: filteredArray(ButtonBlock), theme: ThemeProps, links: filteredArray(LinkProps), leftContent: ContentProps, rightContent: ContentProps }),
|
|
20
22
|
},
|
|
21
23
|
};
|
|
@@ -3,26 +3,6 @@ export declare const LinkTableBlock: {
|
|
|
3
3
|
additionalProperties: boolean;
|
|
4
4
|
required: string[];
|
|
5
5
|
properties: {
|
|
6
|
-
title: {
|
|
7
|
-
type: string;
|
|
8
|
-
additionalProperties: boolean;
|
|
9
|
-
required: string[];
|
|
10
|
-
properties: {
|
|
11
|
-
text: {
|
|
12
|
-
type: string;
|
|
13
|
-
};
|
|
14
|
-
textSize: {
|
|
15
|
-
type: string;
|
|
16
|
-
enum: string[];
|
|
17
|
-
};
|
|
18
|
-
url: {
|
|
19
|
-
type: string;
|
|
20
|
-
};
|
|
21
|
-
resetMargin: {
|
|
22
|
-
type: string;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
6
|
items: {
|
|
27
7
|
type: string;
|
|
28
8
|
items: {
|
|
@@ -37,6 +17,35 @@ export declare const LinkTableBlock: {
|
|
|
37
17
|
};
|
|
38
18
|
};
|
|
39
19
|
};
|
|
20
|
+
title: {
|
|
21
|
+
oneOf: ({
|
|
22
|
+
type: string;
|
|
23
|
+
additionalProperties: boolean;
|
|
24
|
+
required: string[];
|
|
25
|
+
properties: {
|
|
26
|
+
text: {
|
|
27
|
+
type: string;
|
|
28
|
+
contentType: string;
|
|
29
|
+
};
|
|
30
|
+
textSize: {
|
|
31
|
+
type: string;
|
|
32
|
+
enum: string[];
|
|
33
|
+
};
|
|
34
|
+
url: {
|
|
35
|
+
type: string;
|
|
36
|
+
};
|
|
37
|
+
resetMargin: {
|
|
38
|
+
type: string;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
} | {
|
|
42
|
+
type: string;
|
|
43
|
+
})[];
|
|
44
|
+
};
|
|
45
|
+
description: {
|
|
46
|
+
type: string;
|
|
47
|
+
contentType: string;
|
|
48
|
+
};
|
|
40
49
|
anchor: {
|
|
41
50
|
type: string;
|
|
42
51
|
additionalProperties: boolean;
|
|
@@ -44,6 +53,7 @@ export declare const LinkTableBlock: {
|
|
|
44
53
|
properties: {
|
|
45
54
|
text: {
|
|
46
55
|
type: string;
|
|
56
|
+
contentType: string;
|
|
47
57
|
};
|
|
48
58
|
url: {
|
|
49
59
|
type: string;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { filteredArray } from '../../schema/validators/utils';
|
|
2
|
-
import { LinkProps, BlockBaseProps,
|
|
2
|
+
import { LinkProps, BlockBaseProps, BlockHeaderProps } from '../../schema/validators/common';
|
|
3
3
|
export const LinkTableBlock = {
|
|
4
4
|
'link-table-block': {
|
|
5
5
|
additionalProperties: false,
|
|
6
6
|
required: ['items'],
|
|
7
|
-
properties: Object.assign(Object.assign({}, BlockBaseProps), {
|
|
7
|
+
properties: Object.assign(Object.assign(Object.assign({}, BlockBaseProps), BlockHeaderProps), { items: {
|
|
8
8
|
type: 'array',
|
|
9
9
|
items: filteredArray(LinkProps),
|
|
10
10
|
} }),
|
|
@@ -91,6 +91,7 @@ export declare const Media: {
|
|
|
91
91
|
};
|
|
92
92
|
text: {
|
|
93
93
|
type: string;
|
|
94
|
+
contentType: string;
|
|
94
95
|
};
|
|
95
96
|
};
|
|
96
97
|
};
|
|
@@ -137,39 +138,9 @@ export declare const MediaBlock: {
|
|
|
137
138
|
additionalProperties: boolean;
|
|
138
139
|
required: string[];
|
|
139
140
|
properties: {
|
|
140
|
-
title: {
|
|
141
|
-
oneOf: ({
|
|
142
|
-
type: string;
|
|
143
|
-
additionalProperties: boolean;
|
|
144
|
-
required: string[];
|
|
145
|
-
properties: {
|
|
146
|
-
text: {
|
|
147
|
-
type: string;
|
|
148
|
-
};
|
|
149
|
-
textSize: {
|
|
150
|
-
type: string;
|
|
151
|
-
enum: string[];
|
|
152
|
-
};
|
|
153
|
-
url: {
|
|
154
|
-
type: string;
|
|
155
|
-
};
|
|
156
|
-
resetMargin: {
|
|
157
|
-
type: string;
|
|
158
|
-
};
|
|
159
|
-
};
|
|
160
|
-
} | {
|
|
161
|
-
type: string;
|
|
162
|
-
})[];
|
|
163
|
-
};
|
|
164
|
-
additionalInfo: {
|
|
165
|
-
type: string;
|
|
166
|
-
};
|
|
167
141
|
description: {
|
|
168
142
|
type: string;
|
|
169
|
-
|
|
170
|
-
size: {
|
|
171
|
-
type: string;
|
|
172
|
-
enum: string[];
|
|
143
|
+
contentType: string;
|
|
173
144
|
};
|
|
174
145
|
direction: {
|
|
175
146
|
type: string;
|
|
@@ -188,28 +159,6 @@ export declare const MediaBlock: {
|
|
|
188
159
|
disableShadow: {
|
|
189
160
|
type: string;
|
|
190
161
|
};
|
|
191
|
-
links: {
|
|
192
|
-
type: string;
|
|
193
|
-
items: {
|
|
194
|
-
type: string;
|
|
195
|
-
properties: {
|
|
196
|
-
when: {
|
|
197
|
-
type: string;
|
|
198
|
-
};
|
|
199
|
-
};
|
|
200
|
-
};
|
|
201
|
-
};
|
|
202
|
-
buttons: {
|
|
203
|
-
type: string;
|
|
204
|
-
items: {
|
|
205
|
-
type: string;
|
|
206
|
-
properties: {
|
|
207
|
-
when: {
|
|
208
|
-
type: string;
|
|
209
|
-
};
|
|
210
|
-
};
|
|
211
|
-
};
|
|
212
|
-
};
|
|
213
162
|
media: {
|
|
214
163
|
type: string;
|
|
215
164
|
additionalProperties: boolean;
|
|
@@ -303,6 +252,7 @@ export declare const MediaBlock: {
|
|
|
303
252
|
};
|
|
304
253
|
text: {
|
|
305
254
|
type: string;
|
|
255
|
+
contentType: string;
|
|
306
256
|
};
|
|
307
257
|
};
|
|
308
258
|
};
|
|
@@ -350,6 +300,7 @@ export declare const MediaBlock: {
|
|
|
350
300
|
properties: {
|
|
351
301
|
text: {
|
|
352
302
|
type: string;
|
|
303
|
+
contentType: string;
|
|
353
304
|
};
|
|
354
305
|
url: {
|
|
355
306
|
type: string;
|
|
@@ -385,6 +336,7 @@ export declare const MediaBlock: {
|
|
|
385
336
|
};
|
|
386
337
|
alt: {
|
|
387
338
|
type: string;
|
|
339
|
+
contentType: string;
|
|
388
340
|
};
|
|
389
341
|
};
|
|
390
342
|
})[];
|
|
@@ -493,6 +445,62 @@ export declare const MediaBlock: {
|
|
|
493
445
|
required: string[];
|
|
494
446
|
};
|
|
495
447
|
};
|
|
448
|
+
title: {
|
|
449
|
+
oneOf: ({
|
|
450
|
+
type: string;
|
|
451
|
+
additionalProperties: boolean;
|
|
452
|
+
required: string[];
|
|
453
|
+
properties: {
|
|
454
|
+
text: {
|
|
455
|
+
type: string;
|
|
456
|
+
contentType: string;
|
|
457
|
+
};
|
|
458
|
+
textSize: {
|
|
459
|
+
type: string;
|
|
460
|
+
enum: string[];
|
|
461
|
+
};
|
|
462
|
+
url: {
|
|
463
|
+
type: string;
|
|
464
|
+
};
|
|
465
|
+
resetMargin: {
|
|
466
|
+
type: string;
|
|
467
|
+
};
|
|
468
|
+
};
|
|
469
|
+
} | {
|
|
470
|
+
type: string;
|
|
471
|
+
contentType: string;
|
|
472
|
+
})[];
|
|
473
|
+
};
|
|
474
|
+
size: {
|
|
475
|
+
type: string;
|
|
476
|
+
enum: string[];
|
|
477
|
+
};
|
|
478
|
+
additionalInfo: {
|
|
479
|
+
type: string;
|
|
480
|
+
contentType: string;
|
|
481
|
+
};
|
|
482
|
+
links: {
|
|
483
|
+
type: string;
|
|
484
|
+
items: {
|
|
485
|
+
type: string;
|
|
486
|
+
properties: {
|
|
487
|
+
when: {
|
|
488
|
+
type: string;
|
|
489
|
+
};
|
|
490
|
+
};
|
|
491
|
+
};
|
|
492
|
+
};
|
|
493
|
+
buttons: {
|
|
494
|
+
type: string;
|
|
495
|
+
items: {
|
|
496
|
+
type: string;
|
|
497
|
+
properties: {
|
|
498
|
+
when: {
|
|
499
|
+
type: string;
|
|
500
|
+
};
|
|
501
|
+
};
|
|
502
|
+
};
|
|
503
|
+
};
|
|
496
504
|
animated: {
|
|
497
505
|
type: string;
|
|
498
506
|
};
|
|
@@ -503,6 +511,7 @@ export declare const MediaBlock: {
|
|
|
503
511
|
properties: {
|
|
504
512
|
text: {
|
|
505
513
|
type: string;
|
|
514
|
+
contentType: string;
|
|
506
515
|
};
|
|
507
516
|
url: {
|
|
508
517
|
type: string;
|
|
@@ -1,24 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { omit } from 'lodash';
|
|
2
|
+
import { BlockBaseProps, ButtonBlock, MediaProps, AnimatableProps, mediaDirection, } from '../../schema/validators/common';
|
|
3
|
+
import { ContentBase } from '../../sub-blocks/Content/schema';
|
|
3
4
|
export const Media = {
|
|
4
5
|
type: 'object',
|
|
5
6
|
additionalProperties: false,
|
|
6
7
|
required: [],
|
|
7
8
|
properties: MediaProps,
|
|
8
9
|
};
|
|
10
|
+
const MediaBlockContentProps = omit(ContentBase, ['text', 'theme']);
|
|
9
11
|
export const MediaBlock = {
|
|
10
12
|
'media-block': {
|
|
11
13
|
additionalProperties: false,
|
|
12
14
|
required: ['title', 'media'],
|
|
13
|
-
properties: Object.assign(Object.assign(Object.assign({}, BlockBaseProps), AnimatableProps), {
|
|
14
|
-
oneOf: [{ type: 'string' }, TitleProps],
|
|
15
|
-
}, additionalInfo: {
|
|
15
|
+
properties: Object.assign(Object.assign(Object.assign(Object.assign({}, BlockBaseProps), AnimatableProps), MediaBlockContentProps), { description: {
|
|
16
16
|
type: 'string',
|
|
17
|
-
|
|
18
|
-
type: 'string',
|
|
19
|
-
}, size: {
|
|
20
|
-
type: 'string',
|
|
21
|
-
enum: contentSizes,
|
|
17
|
+
contentType: 'yfm',
|
|
22
18
|
}, direction: {
|
|
23
19
|
type: 'string',
|
|
24
20
|
enum: mediaDirection,
|
|
@@ -31,6 +27,6 @@ export const MediaBlock = {
|
|
|
31
27
|
type: 'boolean',
|
|
32
28
|
}, disableShadow: {
|
|
33
29
|
type: 'boolean',
|
|
34
|
-
},
|
|
30
|
+
}, media: Media, button: ButtonBlock }),
|
|
35
31
|
},
|
|
36
32
|
};
|
|
@@ -8,9 +8,11 @@ const PreviewContentItem = {
|
|
|
8
8
|
properties: {
|
|
9
9
|
title: {
|
|
10
10
|
type: 'string',
|
|
11
|
+
contentType: 'text',
|
|
11
12
|
},
|
|
12
13
|
description: {
|
|
13
14
|
type: 'string',
|
|
15
|
+
contentType: 'yfm',
|
|
14
16
|
},
|
|
15
17
|
},
|
|
16
18
|
};
|
|
@@ -33,8 +35,10 @@ export const PreviewBlock = {
|
|
|
33
35
|
required: ['title', 'items'],
|
|
34
36
|
properties: Object.assign(Object.assign(Object.assign({}, BaseProps), AnimatableProps), { title: {
|
|
35
37
|
type: 'string',
|
|
38
|
+
contentType: 'text',
|
|
36
39
|
}, description: {
|
|
37
40
|
type: 'string',
|
|
41
|
+
contentType: 'yfm',
|
|
38
42
|
}, direction: {
|
|
39
43
|
type: 'string',
|
|
40
44
|
enum: mediaDirection,
|
|
@@ -4,9 +4,11 @@ export declare const PromoFeaturesItem: {
|
|
|
4
4
|
properties: {
|
|
5
5
|
title: {
|
|
6
6
|
type: string;
|
|
7
|
+
contentType: string;
|
|
7
8
|
};
|
|
8
9
|
text: {
|
|
9
10
|
type: string;
|
|
11
|
+
contentType: string;
|
|
10
12
|
};
|
|
11
13
|
theme: {
|
|
12
14
|
enum: string[];
|
|
@@ -104,6 +106,7 @@ export declare const PromoFeaturesItem: {
|
|
|
104
106
|
};
|
|
105
107
|
text: {
|
|
106
108
|
type: string;
|
|
109
|
+
contentType: string;
|
|
107
110
|
};
|
|
108
111
|
};
|
|
109
112
|
};
|
|
@@ -152,6 +155,20 @@ export declare const PromoFeaturesBlock: {
|
|
|
152
155
|
additionalProperties: boolean;
|
|
153
156
|
required: string[];
|
|
154
157
|
properties: {
|
|
158
|
+
theme: {
|
|
159
|
+
enum: string[];
|
|
160
|
+
};
|
|
161
|
+
items: {
|
|
162
|
+
type: string;
|
|
163
|
+
items: {
|
|
164
|
+
type: string;
|
|
165
|
+
properties: {
|
|
166
|
+
when: {
|
|
167
|
+
type: string;
|
|
168
|
+
};
|
|
169
|
+
};
|
|
170
|
+
};
|
|
171
|
+
};
|
|
155
172
|
title: {
|
|
156
173
|
oneOf: ({
|
|
157
174
|
type: string;
|
|
@@ -160,6 +177,7 @@ export declare const PromoFeaturesBlock: {
|
|
|
160
177
|
properties: {
|
|
161
178
|
text: {
|
|
162
179
|
type: string;
|
|
180
|
+
contentType: string;
|
|
163
181
|
};
|
|
164
182
|
textSize: {
|
|
165
183
|
type: string;
|
|
@@ -178,20 +196,7 @@ export declare const PromoFeaturesBlock: {
|
|
|
178
196
|
};
|
|
179
197
|
description: {
|
|
180
198
|
type: string;
|
|
181
|
-
|
|
182
|
-
theme: {
|
|
183
|
-
enum: string[];
|
|
184
|
-
};
|
|
185
|
-
items: {
|
|
186
|
-
type: string;
|
|
187
|
-
items: {
|
|
188
|
-
type: string;
|
|
189
|
-
properties: {
|
|
190
|
-
when: {
|
|
191
|
-
type: string;
|
|
192
|
-
};
|
|
193
|
-
};
|
|
194
|
-
};
|
|
199
|
+
contentType: string;
|
|
195
200
|
};
|
|
196
201
|
animated: {
|
|
197
202
|
type: string;
|
|
@@ -203,6 +208,7 @@ export declare const PromoFeaturesBlock: {
|
|
|
203
208
|
properties: {
|
|
204
209
|
text: {
|
|
205
210
|
type: string;
|
|
211
|
+
contentType: string;
|
|
206
212
|
};
|
|
207
213
|
url: {
|
|
208
214
|
type: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnimatableProps, BlockBaseProps,
|
|
1
|
+
import { AnimatableProps, BlockBaseProps, BlockHeaderProps } from '../../schema/validators/common';
|
|
2
2
|
import { filteredArray } from '../../schema/validators/utils';
|
|
3
3
|
import { Media } from '../Media/schema';
|
|
4
4
|
export const PromoFeaturesItem = {
|
|
@@ -7,9 +7,11 @@ export const PromoFeaturesItem = {
|
|
|
7
7
|
properties: {
|
|
8
8
|
title: {
|
|
9
9
|
type: 'string',
|
|
10
|
+
contentType: 'text',
|
|
10
11
|
},
|
|
11
12
|
text: {
|
|
12
13
|
type: 'string',
|
|
14
|
+
contentType: 'yfm',
|
|
13
15
|
},
|
|
14
16
|
theme: {
|
|
15
17
|
enum: ['accent', 'accent-light', 'primary'],
|
|
@@ -21,11 +23,7 @@ export const PromoFeaturesBlock = {
|
|
|
21
23
|
'promo-features-block': {
|
|
22
24
|
additionalProperties: false,
|
|
23
25
|
required: ['items'],
|
|
24
|
-
properties: Object.assign(Object.assign(Object.assign({}, BlockBaseProps), AnimatableProps), {
|
|
25
|
-
oneOf: [{ type: 'string' }, TitleProps],
|
|
26
|
-
}, description: {
|
|
27
|
-
type: 'string',
|
|
28
|
-
}, theme: {
|
|
26
|
+
properties: Object.assign(Object.assign(Object.assign(Object.assign({}, BlockBaseProps), AnimatableProps), BlockHeaderProps), { theme: {
|
|
29
27
|
enum: ['grey', 'default'],
|
|
30
28
|
}, items: filteredArray(PromoFeaturesItem) }),
|
|
31
29
|
},
|