@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
|
@@ -5,29 +5,6 @@ export declare const SliderProps: {
|
|
|
5
5
|
arrows: {
|
|
6
6
|
type: string;
|
|
7
7
|
};
|
|
8
|
-
description: {
|
|
9
|
-
type: string;
|
|
10
|
-
};
|
|
11
|
-
title: {
|
|
12
|
-
type: string;
|
|
13
|
-
additionalProperties: boolean;
|
|
14
|
-
required: string[];
|
|
15
|
-
properties: {
|
|
16
|
-
text: {
|
|
17
|
-
type: string;
|
|
18
|
-
};
|
|
19
|
-
textSize: {
|
|
20
|
-
type: string;
|
|
21
|
-
enum: string[];
|
|
22
|
-
};
|
|
23
|
-
url: {
|
|
24
|
-
type: string;
|
|
25
|
-
};
|
|
26
|
-
resetMargin: {
|
|
27
|
-
type: string;
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
8
|
randomOrder: {
|
|
32
9
|
type: string;
|
|
33
10
|
};
|
|
@@ -56,6 +33,7 @@ export declare const SliderProps: {
|
|
|
56
33
|
properties: {
|
|
57
34
|
text: {
|
|
58
35
|
type: string;
|
|
36
|
+
contentType: string;
|
|
59
37
|
};
|
|
60
38
|
size: {
|
|
61
39
|
type: string;
|
|
@@ -105,34 +83,40 @@ export declare const SliderBlock: {
|
|
|
105
83
|
additionalProperties: boolean;
|
|
106
84
|
required: never[];
|
|
107
85
|
properties: {
|
|
108
|
-
|
|
109
|
-
|
|
86
|
+
title: {
|
|
87
|
+
oneOf: ({
|
|
88
|
+
type: string;
|
|
89
|
+
additionalProperties: boolean;
|
|
90
|
+
required: string[];
|
|
91
|
+
properties: {
|
|
92
|
+
text: {
|
|
93
|
+
type: string;
|
|
94
|
+
contentType: string;
|
|
95
|
+
};
|
|
96
|
+
textSize: {
|
|
97
|
+
type: string;
|
|
98
|
+
enum: string[];
|
|
99
|
+
};
|
|
100
|
+
url: {
|
|
101
|
+
type: string;
|
|
102
|
+
};
|
|
103
|
+
resetMargin: {
|
|
104
|
+
type: string;
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
} | {
|
|
108
|
+
type: string;
|
|
109
|
+
})[];
|
|
110
110
|
};
|
|
111
|
-
|
|
111
|
+
description: {
|
|
112
112
|
type: string;
|
|
113
|
+
contentType: string;
|
|
113
114
|
};
|
|
114
|
-
|
|
115
|
+
dots: {
|
|
115
116
|
type: string;
|
|
116
117
|
};
|
|
117
|
-
|
|
118
|
+
arrows: {
|
|
118
119
|
type: string;
|
|
119
|
-
additionalProperties: boolean;
|
|
120
|
-
required: string[];
|
|
121
|
-
properties: {
|
|
122
|
-
text: {
|
|
123
|
-
type: string;
|
|
124
|
-
};
|
|
125
|
-
textSize: {
|
|
126
|
-
type: string;
|
|
127
|
-
enum: string[];
|
|
128
|
-
};
|
|
129
|
-
url: {
|
|
130
|
-
type: string;
|
|
131
|
-
};
|
|
132
|
-
resetMargin: {
|
|
133
|
-
type: string;
|
|
134
|
-
};
|
|
135
|
-
};
|
|
136
120
|
};
|
|
137
121
|
randomOrder: {
|
|
138
122
|
type: string;
|
|
@@ -162,6 +146,7 @@ export declare const SliderBlock: {
|
|
|
162
146
|
properties: {
|
|
163
147
|
text: {
|
|
164
148
|
type: string;
|
|
149
|
+
contentType: string;
|
|
165
150
|
};
|
|
166
151
|
size: {
|
|
167
152
|
type: string;
|
|
@@ -212,6 +197,7 @@ export declare const SliderBlock: {
|
|
|
212
197
|
properties: {
|
|
213
198
|
text: {
|
|
214
199
|
type: string;
|
|
200
|
+
contentType: string;
|
|
215
201
|
};
|
|
216
202
|
url: {
|
|
217
203
|
type: string;
|
|
@@ -36,6 +36,7 @@ const DisclaimerProps = {
|
|
|
36
36
|
properties: {
|
|
37
37
|
text: {
|
|
38
38
|
type: 'string',
|
|
39
|
+
contentType: 'text',
|
|
39
40
|
},
|
|
40
41
|
size: {
|
|
41
42
|
type: 'string',
|
|
@@ -50,10 +51,6 @@ exports.SliderProps = {
|
|
|
50
51
|
arrows: {
|
|
51
52
|
type: 'boolean',
|
|
52
53
|
},
|
|
53
|
-
description: {
|
|
54
|
-
type: 'string',
|
|
55
|
-
},
|
|
56
|
-
title: common_1.TitleProps,
|
|
57
54
|
randomOrder: {
|
|
58
55
|
type: 'boolean',
|
|
59
56
|
},
|
|
@@ -70,6 +67,6 @@ exports.SliderBlock = {
|
|
|
70
67
|
'slider-block': {
|
|
71
68
|
additionalProperties: false,
|
|
72
69
|
required: [],
|
|
73
|
-
properties: Object.assign(Object.assign(Object.assign({}, common_1.BlockBaseProps), common_1.AnimatableProps), exports.SliderProps),
|
|
70
|
+
properties: Object.assign(Object.assign(Object.assign(Object.assign({}, common_1.BlockBaseProps), common_1.AnimatableProps), exports.SliderProps), common_1.BlockHeaderProps),
|
|
74
71
|
},
|
|
75
72
|
};
|
|
@@ -5,6 +5,7 @@ export declare const TableBlock: {
|
|
|
5
5
|
properties: {
|
|
6
6
|
title: {
|
|
7
7
|
type: string;
|
|
8
|
+
contentType: string;
|
|
8
9
|
};
|
|
9
10
|
table: {
|
|
10
11
|
additionalProperties: boolean;
|
|
@@ -16,6 +17,7 @@ export declare const TableBlock: {
|
|
|
16
17
|
type: string;
|
|
17
18
|
items: {
|
|
18
19
|
type: string[];
|
|
20
|
+
contentType: string;
|
|
19
21
|
};
|
|
20
22
|
};
|
|
21
23
|
};
|
|
@@ -23,6 +25,7 @@ export declare const TableBlock: {
|
|
|
23
25
|
type: string;
|
|
24
26
|
items: {
|
|
25
27
|
type: string;
|
|
28
|
+
contentType: string;
|
|
26
29
|
};
|
|
27
30
|
};
|
|
28
31
|
justify: {
|
|
@@ -47,6 +50,7 @@ export declare const TableBlock: {
|
|
|
47
50
|
properties: {
|
|
48
51
|
text: {
|
|
49
52
|
type: string;
|
|
53
|
+
contentType: string;
|
|
50
54
|
};
|
|
51
55
|
url: {
|
|
52
56
|
type: string;
|
|
@@ -8,6 +8,7 @@ exports.TableBlock = {
|
|
|
8
8
|
required: ['title', 'table'],
|
|
9
9
|
properties: Object.assign(Object.assign({}, common_1.BlockBaseProps), { title: {
|
|
10
10
|
type: 'string',
|
|
11
|
+
contentType: 'text',
|
|
11
12
|
}, table: {
|
|
12
13
|
additionalProperties: false,
|
|
13
14
|
required: ['content'],
|
|
@@ -17,12 +18,14 @@ exports.TableBlock = {
|
|
|
17
18
|
type: 'array',
|
|
18
19
|
items: {
|
|
19
20
|
type: ['string', 'number'],
|
|
21
|
+
contentType: 'text',
|
|
20
22
|
},
|
|
21
23
|
},
|
|
22
24
|
}, legend: {
|
|
23
25
|
type: 'array',
|
|
24
26
|
items: {
|
|
25
27
|
type: 'string',
|
|
28
|
+
contentType: 'yfm',
|
|
26
29
|
},
|
|
27
30
|
}, justify: {
|
|
28
31
|
type: 'array',
|
|
@@ -8,6 +8,7 @@ export declare const tabsItem: {
|
|
|
8
8
|
};
|
|
9
9
|
caption: {
|
|
10
10
|
type: string;
|
|
11
|
+
contentType: string;
|
|
11
12
|
};
|
|
12
13
|
media: {
|
|
13
14
|
oneOf: ({
|
|
@@ -101,6 +102,7 @@ export declare const tabsItem: {
|
|
|
101
102
|
};
|
|
102
103
|
text: {
|
|
103
104
|
type: string;
|
|
105
|
+
contentType: string;
|
|
104
106
|
};
|
|
105
107
|
};
|
|
106
108
|
};
|
|
@@ -155,6 +157,7 @@ export declare const tabsItem: {
|
|
|
155
157
|
properties: {
|
|
156
158
|
text: {
|
|
157
159
|
type: string;
|
|
160
|
+
contentType: string;
|
|
158
161
|
};
|
|
159
162
|
url: {
|
|
160
163
|
type: string;
|
|
@@ -206,6 +209,7 @@ export declare const tabsItem: {
|
|
|
206
209
|
properties: {
|
|
207
210
|
text: {
|
|
208
211
|
type: string;
|
|
212
|
+
contentType: string;
|
|
209
213
|
};
|
|
210
214
|
textSize: {
|
|
211
215
|
type: string;
|
|
@@ -220,13 +224,16 @@ export declare const tabsItem: {
|
|
|
220
224
|
};
|
|
221
225
|
} | {
|
|
222
226
|
type: string;
|
|
227
|
+
contentType: string;
|
|
223
228
|
})[];
|
|
224
229
|
} | undefined;
|
|
225
230
|
text?: {
|
|
226
231
|
type: string;
|
|
232
|
+
contentType: string;
|
|
227
233
|
} | undefined;
|
|
228
234
|
additionalInfo?: {
|
|
229
235
|
type: string;
|
|
236
|
+
contentType: string;
|
|
230
237
|
} | undefined;
|
|
231
238
|
size?: {
|
|
232
239
|
type: string;
|
|
@@ -265,29 +272,6 @@ export declare const TabsBlock: {
|
|
|
265
272
|
additionalProperties: boolean;
|
|
266
273
|
required: string[];
|
|
267
274
|
properties: {
|
|
268
|
-
title: {
|
|
269
|
-
type: string;
|
|
270
|
-
additionalProperties: boolean;
|
|
271
|
-
required: string[];
|
|
272
|
-
properties: {
|
|
273
|
-
text: {
|
|
274
|
-
type: string;
|
|
275
|
-
};
|
|
276
|
-
textSize: {
|
|
277
|
-
type: string;
|
|
278
|
-
enum: string[];
|
|
279
|
-
};
|
|
280
|
-
url: {
|
|
281
|
-
type: string;
|
|
282
|
-
};
|
|
283
|
-
resetMargin: {
|
|
284
|
-
type: string;
|
|
285
|
-
};
|
|
286
|
-
};
|
|
287
|
-
};
|
|
288
|
-
description: {
|
|
289
|
-
type: string;
|
|
290
|
-
};
|
|
291
275
|
tabsColSizes: {};
|
|
292
276
|
direction: {
|
|
293
277
|
type: string;
|
|
@@ -307,6 +291,35 @@ export declare const TabsBlock: {
|
|
|
307
291
|
};
|
|
308
292
|
};
|
|
309
293
|
};
|
|
294
|
+
title: {
|
|
295
|
+
oneOf: ({
|
|
296
|
+
type: string;
|
|
297
|
+
additionalProperties: boolean;
|
|
298
|
+
required: string[];
|
|
299
|
+
properties: {
|
|
300
|
+
text: {
|
|
301
|
+
type: string;
|
|
302
|
+
contentType: string;
|
|
303
|
+
};
|
|
304
|
+
textSize: {
|
|
305
|
+
type: string;
|
|
306
|
+
enum: string[];
|
|
307
|
+
};
|
|
308
|
+
url: {
|
|
309
|
+
type: string;
|
|
310
|
+
};
|
|
311
|
+
resetMargin: {
|
|
312
|
+
type: string;
|
|
313
|
+
};
|
|
314
|
+
};
|
|
315
|
+
} | {
|
|
316
|
+
type: string;
|
|
317
|
+
})[];
|
|
318
|
+
};
|
|
319
|
+
description: {
|
|
320
|
+
type: string;
|
|
321
|
+
contentType: string;
|
|
322
|
+
};
|
|
310
323
|
anchor: {
|
|
311
324
|
type: string;
|
|
312
325
|
additionalProperties: boolean;
|
|
@@ -314,6 +327,7 @@ export declare const TabsBlock: {
|
|
|
314
327
|
properties: {
|
|
315
328
|
text: {
|
|
316
329
|
type: string;
|
|
330
|
+
contentType: string;
|
|
317
331
|
};
|
|
318
332
|
url: {
|
|
319
333
|
type: string;
|
|
@@ -16,6 +16,7 @@ exports.tabsItem = {
|
|
|
16
16
|
type: 'string',
|
|
17
17
|
}, caption: {
|
|
18
18
|
type: 'string',
|
|
19
|
+
contentType: 'text',
|
|
19
20
|
}, media: (0, common_1.withTheme)({
|
|
20
21
|
type: 'object',
|
|
21
22
|
properties: common_1.MediaProps,
|
|
@@ -27,9 +28,7 @@ exports.TabsBlock = {
|
|
|
27
28
|
'tabs-block': {
|
|
28
29
|
additionalProperties: false,
|
|
29
30
|
required: ['title', 'items'],
|
|
30
|
-
properties: Object.assign(Object.assign({}, common_1.BlockBaseProps), {
|
|
31
|
-
type: 'string',
|
|
32
|
-
}, tabsColSizes: common_1.containerSizesArray.reduce((acc, size) => (Object.assign(Object.assign({}, acc), { [size]: common_1.sizeNumber })), {}), direction: {
|
|
31
|
+
properties: Object.assign(Object.assign(Object.assign({}, common_1.BlockBaseProps), common_1.BlockHeaderProps), { tabsColSizes: common_1.containerSizesArray.reduce((acc, size) => (Object.assign(Object.assign({}, acc), { [size]: common_1.sizeNumber })), {}), direction: {
|
|
33
32
|
type: 'string',
|
|
34
33
|
enum: common_1.mediaDirection,
|
|
35
34
|
}, centered: { type: 'boolean' }, items: (0, utils_1.filteredArray)(exports.tabsItem) }),
|
|
@@ -10,9 +10,11 @@ export declare const author: {
|
|
|
10
10
|
properties: {
|
|
11
11
|
firstName: {
|
|
12
12
|
type: string;
|
|
13
|
+
contentType: string;
|
|
13
14
|
};
|
|
14
15
|
secondName: {
|
|
15
16
|
type: string;
|
|
17
|
+
contentType: string;
|
|
16
18
|
};
|
|
17
19
|
avatar: {
|
|
18
20
|
type: string;
|
|
@@ -20,6 +22,7 @@ export declare const author: {
|
|
|
20
22
|
};
|
|
21
23
|
description: {
|
|
22
24
|
type: string;
|
|
25
|
+
contentType: string;
|
|
23
26
|
};
|
|
24
27
|
};
|
|
25
28
|
};
|
|
@@ -1,27 +1,16 @@
|
|
|
1
1
|
/* use this for style redefinitions to awoid problems with
|
|
2
2
|
unpredictable css rules order in build */
|
|
3
|
-
.pc-
|
|
4
|
-
|
|
5
|
-
line-height: var(--yc-text-body-2-line-height);
|
|
6
|
-
margin-top: 16px;
|
|
7
|
-
}
|
|
8
|
-
.pc-BlockHeader__description_titleSize_s {
|
|
9
|
-
margin-top: 8px;
|
|
3
|
+
.pc-block-header__description {
|
|
4
|
+
margin-top: 12px;
|
|
10
5
|
}
|
|
11
|
-
.pc-
|
|
6
|
+
.pc-block-header__description .yfm {
|
|
12
7
|
font-size: var(--yc-text-body-3-font-size);
|
|
13
8
|
line-height: var(--yc-text-body-3-line-height);
|
|
14
9
|
}
|
|
15
|
-
.pc-
|
|
16
|
-
|
|
17
|
-
color: var(--yc-color-text-link);
|
|
18
|
-
text-decoration: none;
|
|
19
|
-
cursor: pointer;
|
|
20
|
-
}
|
|
21
|
-
.utilityfocus .pc-BlockHeader__description a:focus {
|
|
22
|
-
outline: 2px solid #ffdb4d;
|
|
10
|
+
.pc-block-header__description_titleSize_s {
|
|
11
|
+
margin-top: 8px;
|
|
23
12
|
}
|
|
24
|
-
.pc-
|
|
25
|
-
|
|
26
|
-
|
|
13
|
+
.pc-block-header__description_titleSize_s .yfm {
|
|
14
|
+
font-size: var(--yc-text-body-2-font-size);
|
|
15
|
+
line-height: var(--yc-text-body-2-line-height);
|
|
27
16
|
}
|
|
@@ -5,7 +5,8 @@ const react_1 = tslib_1.__importDefault(require("react"));
|
|
|
5
5
|
const utils_1 = require("../../utils");
|
|
6
6
|
const grid_1 = require("../../grid");
|
|
7
7
|
const __1 = require("../");
|
|
8
|
-
const
|
|
8
|
+
const YFMWrapper_1 = tslib_1.__importDefault(require("../YFMWrapper/YFMWrapper"));
|
|
9
|
+
const b = (0, utils_1.block)('block-header');
|
|
9
10
|
const BlockHeader = ({ title, description, className, colSizes = { all: 12, sm: 8 }, }) => {
|
|
10
11
|
if (!title && !description) {
|
|
11
12
|
return null;
|
|
@@ -14,8 +15,8 @@ const BlockHeader = ({ title, description, className, colSizes = { all: 12, sm:
|
|
|
14
15
|
return (react_1.default.createElement("div", { className: b(null, className) },
|
|
15
16
|
text && (react_1.default.createElement(grid_1.Col, { reset: true, sizes: colSizes },
|
|
16
17
|
react_1.default.createElement(__1.Title, Object.assign({ text: text }, titleProps)))),
|
|
17
|
-
description && (react_1.default.createElement(grid_1.Col, { reset: true, sizes:
|
|
18
|
+
description && (react_1.default.createElement(grid_1.Col, { reset: true, sizes: colSizes },
|
|
18
19
|
react_1.default.createElement("div", { className: b('description', { titleSize: titleProps === null || titleProps === void 0 ? void 0 : titleProps.textSize }) },
|
|
19
|
-
react_1.default.createElement(
|
|
20
|
+
react_1.default.createElement(YFMWrapper_1.default, { content: description, modifiers: { constructor: true } }))))));
|
|
20
21
|
};
|
|
21
22
|
exports.default = BlockHeader;
|
|
@@ -18,6 +18,7 @@ export declare const ImageDeviceProps: {
|
|
|
18
18
|
};
|
|
19
19
|
alt: {
|
|
20
20
|
type: string;
|
|
21
|
+
contentType: string;
|
|
21
22
|
};
|
|
22
23
|
disableCompress: {
|
|
23
24
|
type: string;
|
|
@@ -35,6 +36,7 @@ export declare const ImageObjectProps: {
|
|
|
35
36
|
};
|
|
36
37
|
alt: {
|
|
37
38
|
type: string;
|
|
39
|
+
contentType: string;
|
|
38
40
|
};
|
|
39
41
|
disableCompress: {
|
|
40
42
|
type: string;
|
|
@@ -3,44 +3,35 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ImageProps = exports.ImageObjectProps = exports.ImageDeviceProps = exports.urlPattern = void 0;
|
|
4
4
|
const utils_1 = require("../../schema/validators/utils");
|
|
5
5
|
exports.urlPattern = '^((http[s]?|ftp):\\/)?\\/?([^:\\/\\s]+)((\\/\\w+)*\\/)([\\w\\-\\.]+[^#?\\s]+)(.*)?(#[\\w\\-]+)?$';
|
|
6
|
+
const ImageBase = {
|
|
7
|
+
alt: {
|
|
8
|
+
type: 'string',
|
|
9
|
+
contentType: 'text',
|
|
10
|
+
},
|
|
11
|
+
disableCompress: {
|
|
12
|
+
type: 'boolean',
|
|
13
|
+
},
|
|
14
|
+
};
|
|
6
15
|
exports.ImageDeviceProps = {
|
|
7
16
|
type: 'object',
|
|
8
17
|
additionalProperties: false,
|
|
9
18
|
required: ['desktop', 'mobile'],
|
|
10
|
-
properties: {
|
|
11
|
-
desktop: { type: 'string', pattern: exports.urlPattern },
|
|
12
|
-
tablet: {
|
|
19
|
+
properties: Object.assign(Object.assign({}, ImageBase), { desktop: { type: 'string', pattern: exports.urlPattern }, tablet: {
|
|
13
20
|
type: 'string',
|
|
14
21
|
pattern: exports.urlPattern,
|
|
15
|
-
},
|
|
16
|
-
mobile: {
|
|
22
|
+
}, mobile: {
|
|
17
23
|
type: 'string',
|
|
18
24
|
pattern: exports.urlPattern,
|
|
19
|
-
},
|
|
20
|
-
alt: {
|
|
21
|
-
type: 'string',
|
|
22
|
-
},
|
|
23
|
-
disableCompress: {
|
|
24
|
-
type: 'boolean',
|
|
25
|
-
},
|
|
26
|
-
},
|
|
25
|
+
} }),
|
|
27
26
|
};
|
|
28
27
|
exports.ImageObjectProps = {
|
|
29
28
|
type: 'object',
|
|
30
29
|
additionalProperties: false,
|
|
31
30
|
required: ['src'],
|
|
32
|
-
properties: {
|
|
33
|
-
src: {
|
|
31
|
+
properties: Object.assign(Object.assign({}, ImageBase), { src: {
|
|
34
32
|
type: 'string',
|
|
35
33
|
pattern: exports.urlPattern,
|
|
36
|
-
},
|
|
37
|
-
alt: {
|
|
38
|
-
type: 'string',
|
|
39
|
-
},
|
|
40
|
-
disableCompress: {
|
|
41
|
-
type: 'boolean',
|
|
42
|
-
},
|
|
43
|
-
},
|
|
34
|
+
} }),
|
|
44
35
|
};
|
|
45
36
|
exports.ImageProps = {
|
|
46
37
|
oneOf: [
|
|
@@ -43,6 +43,7 @@ export declare function generateDefaultSchema(config?: SchemaCustomConfig): {
|
|
|
43
43
|
properties: {
|
|
44
44
|
title: {
|
|
45
45
|
type: string;
|
|
46
|
+
contentType: string;
|
|
46
47
|
};
|
|
47
48
|
};
|
|
48
49
|
};
|
|
@@ -121,6 +122,7 @@ export declare function generateDefaultSchema(config?: SchemaCustomConfig): {
|
|
|
121
122
|
};
|
|
122
123
|
text: {
|
|
123
124
|
type: string;
|
|
125
|
+
contentType: string;
|
|
124
126
|
};
|
|
125
127
|
};
|
|
126
128
|
};
|
|
@@ -83,6 +83,7 @@ export declare const PlayIconProps: {
|
|
|
83
83
|
};
|
|
84
84
|
text: {
|
|
85
85
|
type: string;
|
|
86
|
+
contentType: string;
|
|
86
87
|
};
|
|
87
88
|
};
|
|
88
89
|
};
|
|
@@ -141,6 +142,7 @@ export declare const VideoProps: {
|
|
|
141
142
|
};
|
|
142
143
|
text: {
|
|
143
144
|
type: string;
|
|
145
|
+
contentType: string;
|
|
144
146
|
};
|
|
145
147
|
};
|
|
146
148
|
};
|
|
@@ -264,6 +266,7 @@ export declare const BackgroundProps: {
|
|
|
264
266
|
};
|
|
265
267
|
text: {
|
|
266
268
|
type: string;
|
|
269
|
+
contentType: string;
|
|
267
270
|
};
|
|
268
271
|
};
|
|
269
272
|
};
|
|
@@ -295,6 +298,7 @@ export declare const LinkProps: {
|
|
|
295
298
|
properties: {
|
|
296
299
|
text: {
|
|
297
300
|
type: string;
|
|
301
|
+
contentType: string;
|
|
298
302
|
};
|
|
299
303
|
url: {
|
|
300
304
|
type: string;
|
|
@@ -328,6 +332,7 @@ export declare const FileLinkProps: {
|
|
|
328
332
|
};
|
|
329
333
|
text: {
|
|
330
334
|
type: string;
|
|
335
|
+
contentType: string;
|
|
331
336
|
};
|
|
332
337
|
type: {
|
|
333
338
|
type: string;
|
|
@@ -349,9 +354,11 @@ export declare const authorItem: {
|
|
|
349
354
|
properties: {
|
|
350
355
|
firstName: {
|
|
351
356
|
type: string;
|
|
357
|
+
contentType: string;
|
|
352
358
|
};
|
|
353
359
|
secondName: {
|
|
354
360
|
type: string;
|
|
361
|
+
contentType: string;
|
|
355
362
|
};
|
|
356
363
|
avatar: {
|
|
357
364
|
type: string;
|
|
@@ -359,12 +366,14 @@ export declare const authorItem: {
|
|
|
359
366
|
};
|
|
360
367
|
description: {
|
|
361
368
|
type: string;
|
|
369
|
+
contentType: string;
|
|
362
370
|
};
|
|
363
371
|
};
|
|
364
372
|
};
|
|
365
373
|
export declare const ButtonProps: {
|
|
366
374
|
text: {
|
|
367
375
|
type: string;
|
|
376
|
+
contentType: string;
|
|
368
377
|
};
|
|
369
378
|
url: {
|
|
370
379
|
type: string;
|
|
@@ -400,6 +409,7 @@ export declare const ButtonProps: {
|
|
|
400
409
|
};
|
|
401
410
|
alt: {
|
|
402
411
|
type: string;
|
|
412
|
+
contentType: string;
|
|
403
413
|
};
|
|
404
414
|
};
|
|
405
415
|
})[];
|
|
@@ -500,6 +510,7 @@ export declare const MenuProps: {
|
|
|
500
510
|
properties: {
|
|
501
511
|
title: {
|
|
502
512
|
type: string;
|
|
513
|
+
contentType: string;
|
|
503
514
|
};
|
|
504
515
|
};
|
|
505
516
|
};
|
|
@@ -518,6 +529,7 @@ export declare const AnchorProps: {
|
|
|
518
529
|
properties: {
|
|
519
530
|
text: {
|
|
520
531
|
type: string;
|
|
532
|
+
contentType: string;
|
|
521
533
|
};
|
|
522
534
|
url: {
|
|
523
535
|
type: string;
|
|
@@ -532,6 +544,7 @@ export declare const BlockBaseProps: {
|
|
|
532
544
|
properties: {
|
|
533
545
|
text: {
|
|
534
546
|
type: string;
|
|
547
|
+
contentType: string;
|
|
535
548
|
};
|
|
536
549
|
url: {
|
|
537
550
|
type: string;
|
|
@@ -555,6 +568,7 @@ export declare const TitleProps: {
|
|
|
555
568
|
properties: {
|
|
556
569
|
text: {
|
|
557
570
|
type: string;
|
|
571
|
+
contentType: string;
|
|
558
572
|
};
|
|
559
573
|
textSize: {
|
|
560
574
|
type: string;
|
|
@@ -574,6 +588,7 @@ export declare const ButtonBlock: {
|
|
|
574
588
|
properties: {
|
|
575
589
|
text: {
|
|
576
590
|
type: string;
|
|
591
|
+
contentType: string;
|
|
577
592
|
};
|
|
578
593
|
url: {
|
|
579
594
|
type: string;
|
|
@@ -609,6 +624,7 @@ export declare const ButtonBlock: {
|
|
|
609
624
|
};
|
|
610
625
|
alt: {
|
|
611
626
|
type: string;
|
|
627
|
+
contentType: string;
|
|
612
628
|
};
|
|
613
629
|
};
|
|
614
630
|
})[];
|
|
@@ -806,6 +822,7 @@ export declare const MediaProps: {
|
|
|
806
822
|
};
|
|
807
823
|
text: {
|
|
808
824
|
type: string;
|
|
825
|
+
contentType: string;
|
|
809
826
|
};
|
|
810
827
|
};
|
|
811
828
|
};
|
|
@@ -852,3 +869,34 @@ export declare const CardBase: {
|
|
|
852
869
|
enum: string[];
|
|
853
870
|
};
|
|
854
871
|
};
|
|
872
|
+
export declare const BlockHeaderProps: {
|
|
873
|
+
title: {
|
|
874
|
+
oneOf: ({
|
|
875
|
+
type: string;
|
|
876
|
+
additionalProperties: boolean;
|
|
877
|
+
required: string[];
|
|
878
|
+
properties: {
|
|
879
|
+
text: {
|
|
880
|
+
type: string;
|
|
881
|
+
contentType: string;
|
|
882
|
+
};
|
|
883
|
+
textSize: {
|
|
884
|
+
type: string;
|
|
885
|
+
enum: string[];
|
|
886
|
+
};
|
|
887
|
+
url: {
|
|
888
|
+
type: string;
|
|
889
|
+
};
|
|
890
|
+
resetMargin: {
|
|
891
|
+
type: string;
|
|
892
|
+
};
|
|
893
|
+
};
|
|
894
|
+
} | {
|
|
895
|
+
type: string;
|
|
896
|
+
})[];
|
|
897
|
+
};
|
|
898
|
+
description: {
|
|
899
|
+
type: string;
|
|
900
|
+
contentType: string;
|
|
901
|
+
};
|
|
902
|
+
};
|