@gravity-ui/page-constructor 1.12.0 → 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 +8 -0
- package/build/cjs/blocks/CardLayout/schema.d.ts +22 -24
- package/build/cjs/blocks/CardLayout/schema.js +1 -6
- package/build/cjs/blocks/ExtendedFeatures/schema.d.ts +16 -17
- package/build/cjs/blocks/ExtendedFeatures/schema.js +1 -6
- package/build/cjs/blocks/HeaderSlider/schema.d.ts +0 -25
- package/build/cjs/blocks/LinkTable/schema.d.ts +29 -21
- package/build/cjs/blocks/LinkTable/schema.js +1 -1
- package/build/cjs/blocks/Media/schema.js +1 -1
- package/build/cjs/blocks/PromoFeaturesBlock/schema.d.ts +14 -15
- package/build/cjs/blocks/PromoFeaturesBlock/schema.js +1 -6
- package/build/cjs/blocks/Slider/schema.d.ts +28 -49
- package/build/cjs/blocks/Slider/schema.js +1 -6
- package/build/cjs/blocks/Tabs/schema.d.ts +29 -25
- package/build/cjs/blocks/Tabs/schema.js +1 -4
- package/build/cjs/components/BlockHeader/BlockHeader.css +8 -19
- package/build/cjs/components/BlockHeader/BlockHeader.js +4 -3
- package/build/cjs/schema/validators/common.d.ts +31 -0
- package/build/cjs/schema/validators/common.js +10 -1
- package/build/cjs/sub-blocks/CardWithImage/schema.js +1 -1
- package/build/cjs/text-transform/blocks.js +44 -54
- package/build/esm/blocks/CardLayout/schema.d.ts +22 -24
- package/build/esm/blocks/CardLayout/schema.js +2 -7
- package/build/esm/blocks/ExtendedFeatures/schema.d.ts +16 -17
- package/build/esm/blocks/ExtendedFeatures/schema.js +2 -7
- package/build/esm/blocks/HeaderSlider/schema.d.ts +0 -25
- package/build/esm/blocks/LinkTable/schema.d.ts +29 -21
- package/build/esm/blocks/LinkTable/schema.js +2 -2
- package/build/esm/blocks/Media/schema.js +1 -1
- package/build/esm/blocks/PromoFeaturesBlock/schema.d.ts +14 -15
- package/build/esm/blocks/PromoFeaturesBlock/schema.js +2 -7
- package/build/esm/blocks/Slider/schema.d.ts +28 -49
- package/build/esm/blocks/Slider/schema.js +2 -7
- package/build/esm/blocks/Tabs/schema.d.ts +29 -25
- package/build/esm/blocks/Tabs/schema.js +2 -5
- package/build/esm/components/BlockHeader/BlockHeader.css +8 -19
- package/build/esm/components/BlockHeader/BlockHeader.js +5 -4
- package/build/esm/schema/validators/common.d.ts +31 -0
- package/build/esm/schema/validators/common.js +9 -0
- package/build/esm/sub-blocks/CardWithImage/schema.js +1 -1
- package/build/esm/text-transform/blocks.js +44 -54
- package/package.json +1 -4
- package/server/text-transform/blocks.js +44 -54
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.12.1](https://github.com/gravity-ui/page-constructor/compare/v1.12.0...v1.12.1) (2023-01-11)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **BlockHeader:** add yfm to description, change styles ([#105](https://github.com/gravity-ui/page-constructor/issues/105)) ([f77fc5e](https://github.com/gravity-ui/page-constructor/commit/f77fc5e82f7aaf33dda8f56a9f17a87d61cc5cdd))
|
|
9
|
+
* contentBase import ([#109](https://github.com/gravity-ui/page-constructor/issues/109)) ([2136f7b](https://github.com/gravity-ui/page-constructor/commit/2136f7bbe340c6035c655ff5139ae69ee1b50d3e))
|
|
10
|
+
|
|
3
11
|
## [1.12.0](https://github.com/gravity-ui/page-constructor/compare/v1.11.1...v1.12.0) (2023-01-10)
|
|
4
12
|
|
|
5
13
|
|
|
@@ -2,6 +2,17 @@ export declare const CardLayoutProps: {
|
|
|
2
2
|
additionalProperties: boolean;
|
|
3
3
|
required: string[];
|
|
4
4
|
properties: {
|
|
5
|
+
colSizes: {
|
|
6
|
+
type: string;
|
|
7
|
+
additionalProperties: boolean;
|
|
8
|
+
properties: {};
|
|
9
|
+
};
|
|
10
|
+
children: {
|
|
11
|
+
type: string;
|
|
12
|
+
items: {
|
|
13
|
+
$ref: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
5
16
|
title: {
|
|
6
17
|
oneOf: ({
|
|
7
18
|
type: string;
|
|
@@ -25,24 +36,12 @@ export declare const CardLayoutProps: {
|
|
|
25
36
|
};
|
|
26
37
|
} | {
|
|
27
38
|
type: string;
|
|
28
|
-
contentType: string;
|
|
29
39
|
})[];
|
|
30
40
|
};
|
|
31
41
|
description: {
|
|
32
42
|
type: string;
|
|
33
43
|
contentType: string;
|
|
34
44
|
};
|
|
35
|
-
colSizes: {
|
|
36
|
-
type: string;
|
|
37
|
-
additionalProperties: boolean;
|
|
38
|
-
properties: {};
|
|
39
|
-
};
|
|
40
|
-
children: {
|
|
41
|
-
type: string;
|
|
42
|
-
items: {
|
|
43
|
-
$ref: string;
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
45
|
animated: {
|
|
47
46
|
type: string;
|
|
48
47
|
};
|
|
@@ -76,6 +75,17 @@ export declare const CardLayoutBlock: {
|
|
|
76
75
|
additionalProperties: boolean;
|
|
77
76
|
required: string[];
|
|
78
77
|
properties: {
|
|
78
|
+
colSizes: {
|
|
79
|
+
type: string;
|
|
80
|
+
additionalProperties: boolean;
|
|
81
|
+
properties: {};
|
|
82
|
+
};
|
|
83
|
+
children: {
|
|
84
|
+
type: string;
|
|
85
|
+
items: {
|
|
86
|
+
$ref: string;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
79
89
|
title: {
|
|
80
90
|
oneOf: ({
|
|
81
91
|
type: string;
|
|
@@ -99,24 +109,12 @@ export declare const CardLayoutBlock: {
|
|
|
99
109
|
};
|
|
100
110
|
} | {
|
|
101
111
|
type: string;
|
|
102
|
-
contentType: string;
|
|
103
112
|
})[];
|
|
104
113
|
};
|
|
105
114
|
description: {
|
|
106
115
|
type: string;
|
|
107
116
|
contentType: string;
|
|
108
117
|
};
|
|
109
|
-
colSizes: {
|
|
110
|
-
type: string;
|
|
111
|
-
additionalProperties: boolean;
|
|
112
|
-
properties: {};
|
|
113
|
-
};
|
|
114
|
-
children: {
|
|
115
|
-
type: string;
|
|
116
|
-
items: {
|
|
117
|
-
$ref: string;
|
|
118
|
-
};
|
|
119
|
-
};
|
|
120
118
|
animated: {
|
|
121
119
|
type: string;
|
|
122
120
|
};
|
|
@@ -5,12 +5,7 @@ const common_1 = require("../../schema/validators/common");
|
|
|
5
5
|
exports.CardLayoutProps = {
|
|
6
6
|
additionalProperties: false,
|
|
7
7
|
required: ['title'],
|
|
8
|
-
properties: Object.assign(Object.assign(Object.assign({}, common_1.BlockBaseProps), common_1.AnimatableProps), {
|
|
9
|
-
oneOf: [{ type: 'string', contentType: 'text' }, common_1.TitleProps],
|
|
10
|
-
}, description: {
|
|
11
|
-
type: 'string',
|
|
12
|
-
contentType: 'yfm',
|
|
13
|
-
}, colSizes: common_1.containerSizesObject, children: common_1.ChildrenCardsProps }),
|
|
8
|
+
properties: Object.assign(Object.assign(Object.assign(Object.assign({}, common_1.BlockBaseProps), common_1.AnimatableProps), common_1.BlockHeaderProps), { colSizes: common_1.containerSizesObject, children: common_1.ChildrenCardsProps }),
|
|
14
9
|
};
|
|
15
10
|
exports.CardLayoutBlock = {
|
|
16
11
|
'card-layout-block': exports.CardLayoutProps,
|
|
@@ -55,6 +55,22 @@ export declare const ExtendedFeaturesBlock: {
|
|
|
55
55
|
additionalProperties: boolean;
|
|
56
56
|
required: never[];
|
|
57
57
|
properties: {
|
|
58
|
+
items: {
|
|
59
|
+
type: string;
|
|
60
|
+
items: {
|
|
61
|
+
type: string;
|
|
62
|
+
properties: {
|
|
63
|
+
when: {
|
|
64
|
+
type: string;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
colSizes: {
|
|
70
|
+
type: string;
|
|
71
|
+
additionalProperties: boolean;
|
|
72
|
+
properties: {};
|
|
73
|
+
};
|
|
58
74
|
title: {
|
|
59
75
|
oneOf: ({
|
|
60
76
|
type: string;
|
|
@@ -78,29 +94,12 @@ export declare const ExtendedFeaturesBlock: {
|
|
|
78
94
|
};
|
|
79
95
|
} | {
|
|
80
96
|
type: string;
|
|
81
|
-
contentType: string;
|
|
82
97
|
})[];
|
|
83
98
|
};
|
|
84
99
|
description: {
|
|
85
100
|
type: string;
|
|
86
101
|
contentType: string;
|
|
87
102
|
};
|
|
88
|
-
items: {
|
|
89
|
-
type: string;
|
|
90
|
-
items: {
|
|
91
|
-
type: string;
|
|
92
|
-
properties: {
|
|
93
|
-
when: {
|
|
94
|
-
type: string;
|
|
95
|
-
};
|
|
96
|
-
};
|
|
97
|
-
};
|
|
98
|
-
};
|
|
99
|
-
colSizes: {
|
|
100
|
-
type: string;
|
|
101
|
-
additionalProperties: boolean;
|
|
102
|
-
properties: {};
|
|
103
|
-
};
|
|
104
103
|
animated: {
|
|
105
104
|
type: string;
|
|
106
105
|
};
|
|
@@ -29,11 +29,6 @@ exports.ExtendedFeaturesBlock = {
|
|
|
29
29
|
'extended-features-block': {
|
|
30
30
|
additionalProperties: false,
|
|
31
31
|
required: [],
|
|
32
|
-
properties: Object.assign(Object.assign(Object.assign({}, common_1.BlockBaseProps), common_1.AnimatableProps), {
|
|
33
|
-
oneOf: [{ type: 'string', contentType: 'text' }, common_1.TitleProps],
|
|
34
|
-
}, description: {
|
|
35
|
-
type: 'string',
|
|
36
|
-
contentType: 'yfm',
|
|
37
|
-
}, items: (0, utils_1.filteredArray)(exports.ExtendedFeaturesItem), colSizes: common_1.containerSizesObject }),
|
|
32
|
+
properties: Object.assign(Object.assign(Object.assign(Object.assign({}, common_1.BlockBaseProps), common_1.AnimatableProps), common_1.BlockHeaderProps), { items: (0, utils_1.filteredArray)(exports.ExtendedFeaturesItem), colSizes: common_1.containerSizesObject }),
|
|
38
33
|
},
|
|
39
34
|
};
|
|
@@ -346,31 +346,6 @@ export declare const HeaderSliderBlock: {
|
|
|
346
346
|
arrows: {
|
|
347
347
|
type: string;
|
|
348
348
|
};
|
|
349
|
-
description: {
|
|
350
|
-
type: string;
|
|
351
|
-
contentType: string;
|
|
352
|
-
};
|
|
353
|
-
title: {
|
|
354
|
-
type: string;
|
|
355
|
-
additionalProperties: boolean;
|
|
356
|
-
required: string[];
|
|
357
|
-
properties: {
|
|
358
|
-
text: {
|
|
359
|
-
type: string;
|
|
360
|
-
contentType: string;
|
|
361
|
-
};
|
|
362
|
-
textSize: {
|
|
363
|
-
type: string;
|
|
364
|
-
enum: string[];
|
|
365
|
-
};
|
|
366
|
-
url: {
|
|
367
|
-
type: string;
|
|
368
|
-
};
|
|
369
|
-
resetMargin: {
|
|
370
|
-
type: string;
|
|
371
|
-
};
|
|
372
|
-
};
|
|
373
|
-
};
|
|
374
349
|
randomOrder: {
|
|
375
350
|
type: string;
|
|
376
351
|
};
|
|
@@ -3,27 +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
|
-
contentType: string;
|
|
14
|
-
};
|
|
15
|
-
textSize: {
|
|
16
|
-
type: string;
|
|
17
|
-
enum: string[];
|
|
18
|
-
};
|
|
19
|
-
url: {
|
|
20
|
-
type: string;
|
|
21
|
-
};
|
|
22
|
-
resetMargin: {
|
|
23
|
-
type: string;
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
6
|
items: {
|
|
28
7
|
type: string;
|
|
29
8
|
items: {
|
|
@@ -38,6 +17,35 @@ export declare const LinkTableBlock: {
|
|
|
38
17
|
};
|
|
39
18
|
};
|
|
40
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
|
+
};
|
|
41
49
|
anchor: {
|
|
42
50
|
type: string;
|
|
43
51
|
additionalProperties: boolean;
|
|
@@ -7,7 +7,7 @@ exports.LinkTableBlock = {
|
|
|
7
7
|
'link-table-block': {
|
|
8
8
|
additionalProperties: false,
|
|
9
9
|
required: ['items'],
|
|
10
|
-
properties: Object.assign(Object.assign({}, common_1.BlockBaseProps),
|
|
10
|
+
properties: Object.assign(Object.assign(Object.assign({}, common_1.BlockBaseProps), common_1.BlockHeaderProps), { items: {
|
|
11
11
|
type: 'array',
|
|
12
12
|
items: (0, utils_1.filteredArray)(common_1.LinkProps),
|
|
13
13
|
} }),
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.MediaBlock = exports.Media = void 0;
|
|
4
4
|
const lodash_1 = require("lodash");
|
|
5
5
|
const common_1 = require("../../schema/validators/common");
|
|
6
|
-
const schema_1 = require("
|
|
6
|
+
const schema_1 = require("../../sub-blocks/Content/schema");
|
|
7
7
|
exports.Media = {
|
|
8
8
|
type: 'object',
|
|
9
9
|
additionalProperties: false,
|
|
@@ -155,6 +155,20 @@ export declare const PromoFeaturesBlock: {
|
|
|
155
155
|
additionalProperties: boolean;
|
|
156
156
|
required: string[];
|
|
157
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
|
+
};
|
|
158
172
|
title: {
|
|
159
173
|
oneOf: ({
|
|
160
174
|
type: string;
|
|
@@ -178,27 +192,12 @@ export declare const PromoFeaturesBlock: {
|
|
|
178
192
|
};
|
|
179
193
|
} | {
|
|
180
194
|
type: string;
|
|
181
|
-
contentType: string;
|
|
182
195
|
})[];
|
|
183
196
|
};
|
|
184
197
|
description: {
|
|
185
198
|
type: string;
|
|
186
199
|
contentType: string;
|
|
187
200
|
};
|
|
188
|
-
theme: {
|
|
189
|
-
enum: string[];
|
|
190
|
-
};
|
|
191
|
-
items: {
|
|
192
|
-
type: string;
|
|
193
|
-
items: {
|
|
194
|
-
type: string;
|
|
195
|
-
properties: {
|
|
196
|
-
when: {
|
|
197
|
-
type: string;
|
|
198
|
-
};
|
|
199
|
-
};
|
|
200
|
-
};
|
|
201
|
-
};
|
|
202
201
|
animated: {
|
|
203
202
|
type: string;
|
|
204
203
|
};
|
|
@@ -26,12 +26,7 @@ exports.PromoFeaturesBlock = {
|
|
|
26
26
|
'promo-features-block': {
|
|
27
27
|
additionalProperties: false,
|
|
28
28
|
required: ['items'],
|
|
29
|
-
properties: Object.assign(Object.assign(Object.assign({}, common_1.BlockBaseProps), common_1.AnimatableProps), {
|
|
30
|
-
oneOf: [{ type: 'string', contentType: 'text' }, common_1.TitleProps],
|
|
31
|
-
}, description: {
|
|
32
|
-
type: 'string',
|
|
33
|
-
contentType: 'text',
|
|
34
|
-
}, theme: {
|
|
29
|
+
properties: Object.assign(Object.assign(Object.assign(Object.assign({}, common_1.BlockBaseProps), common_1.AnimatableProps), common_1.BlockHeaderProps), { theme: {
|
|
35
30
|
enum: ['grey', 'default'],
|
|
36
31
|
}, items: (0, utils_1.filteredArray)(exports.PromoFeaturesItem) }),
|
|
37
32
|
},
|
|
@@ -5,31 +5,6 @@ export declare const SliderProps: {
|
|
|
5
5
|
arrows: {
|
|
6
6
|
type: string;
|
|
7
7
|
};
|
|
8
|
-
description: {
|
|
9
|
-
type: string;
|
|
10
|
-
contentType: string;
|
|
11
|
-
};
|
|
12
|
-
title: {
|
|
13
|
-
type: string;
|
|
14
|
-
additionalProperties: boolean;
|
|
15
|
-
required: string[];
|
|
16
|
-
properties: {
|
|
17
|
-
text: {
|
|
18
|
-
type: string;
|
|
19
|
-
contentType: string;
|
|
20
|
-
};
|
|
21
|
-
textSize: {
|
|
22
|
-
type: string;
|
|
23
|
-
enum: string[];
|
|
24
|
-
};
|
|
25
|
-
url: {
|
|
26
|
-
type: string;
|
|
27
|
-
};
|
|
28
|
-
resetMargin: {
|
|
29
|
-
type: string;
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
8
|
randomOrder: {
|
|
34
9
|
type: string;
|
|
35
10
|
};
|
|
@@ -108,36 +83,40 @@ export declare const SliderBlock: {
|
|
|
108
83
|
additionalProperties: boolean;
|
|
109
84
|
required: never[];
|
|
110
85
|
properties: {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
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
|
+
})[];
|
|
116
110
|
};
|
|
117
111
|
description: {
|
|
118
112
|
type: string;
|
|
119
113
|
contentType: string;
|
|
120
114
|
};
|
|
121
|
-
|
|
115
|
+
dots: {
|
|
116
|
+
type: string;
|
|
117
|
+
};
|
|
118
|
+
arrows: {
|
|
122
119
|
type: string;
|
|
123
|
-
additionalProperties: boolean;
|
|
124
|
-
required: string[];
|
|
125
|
-
properties: {
|
|
126
|
-
text: {
|
|
127
|
-
type: string;
|
|
128
|
-
contentType: string;
|
|
129
|
-
};
|
|
130
|
-
textSize: {
|
|
131
|
-
type: string;
|
|
132
|
-
enum: string[];
|
|
133
|
-
};
|
|
134
|
-
url: {
|
|
135
|
-
type: string;
|
|
136
|
-
};
|
|
137
|
-
resetMargin: {
|
|
138
|
-
type: string;
|
|
139
|
-
};
|
|
140
|
-
};
|
|
141
120
|
};
|
|
142
121
|
randomOrder: {
|
|
143
122
|
type: string;
|
|
@@ -51,11 +51,6 @@ exports.SliderProps = {
|
|
|
51
51
|
arrows: {
|
|
52
52
|
type: 'boolean',
|
|
53
53
|
},
|
|
54
|
-
description: {
|
|
55
|
-
type: 'string',
|
|
56
|
-
contentType: 'text',
|
|
57
|
-
},
|
|
58
|
-
title: common_1.TitleProps,
|
|
59
54
|
randomOrder: {
|
|
60
55
|
type: 'boolean',
|
|
61
56
|
},
|
|
@@ -72,6 +67,6 @@ exports.SliderBlock = {
|
|
|
72
67
|
'slider-block': {
|
|
73
68
|
additionalProperties: false,
|
|
74
69
|
required: [],
|
|
75
|
-
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),
|
|
76
71
|
},
|
|
77
72
|
};
|
|
@@ -272,31 +272,6 @@ export declare const TabsBlock: {
|
|
|
272
272
|
additionalProperties: boolean;
|
|
273
273
|
required: string[];
|
|
274
274
|
properties: {
|
|
275
|
-
title: {
|
|
276
|
-
type: string;
|
|
277
|
-
additionalProperties: boolean;
|
|
278
|
-
required: string[];
|
|
279
|
-
properties: {
|
|
280
|
-
text: {
|
|
281
|
-
type: string;
|
|
282
|
-
contentType: string;
|
|
283
|
-
};
|
|
284
|
-
textSize: {
|
|
285
|
-
type: string;
|
|
286
|
-
enum: string[];
|
|
287
|
-
};
|
|
288
|
-
url: {
|
|
289
|
-
type: string;
|
|
290
|
-
};
|
|
291
|
-
resetMargin: {
|
|
292
|
-
type: string;
|
|
293
|
-
};
|
|
294
|
-
};
|
|
295
|
-
};
|
|
296
|
-
description: {
|
|
297
|
-
type: string;
|
|
298
|
-
contentType: string;
|
|
299
|
-
};
|
|
300
275
|
tabsColSizes: {};
|
|
301
276
|
direction: {
|
|
302
277
|
type: string;
|
|
@@ -316,6 +291,35 @@ export declare const TabsBlock: {
|
|
|
316
291
|
};
|
|
317
292
|
};
|
|
318
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
|
+
};
|
|
319
323
|
anchor: {
|
|
320
324
|
type: string;
|
|
321
325
|
additionalProperties: boolean;
|
|
@@ -28,10 +28,7 @@ exports.TabsBlock = {
|
|
|
28
28
|
'tabs-block': {
|
|
29
29
|
additionalProperties: false,
|
|
30
30
|
required: ['title', 'items'],
|
|
31
|
-
properties: Object.assign(Object.assign({}, common_1.BlockBaseProps), {
|
|
32
|
-
type: 'string',
|
|
33
|
-
contentType: 'text',
|
|
34
|
-
}, 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: {
|
|
35
32
|
type: 'string',
|
|
36
33
|
enum: common_1.mediaDirection,
|
|
37
34
|
}, centered: { type: 'boolean' }, items: (0, utils_1.filteredArray)(exports.tabsItem) }),
|
|
@@ -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;
|
|
@@ -869,3 +869,34 @@ export declare const CardBase: {
|
|
|
869
869
|
enum: string[];
|
|
870
870
|
};
|
|
871
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
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CardBase = exports.MediaProps = exports.ButtonBlock = exports.TitleProps = exports.BlockBaseProps = exports.AnchorProps = exports.withTheme = exports.MenuProps = exports.ButtonProps = exports.authorItem = exports.FileLinkProps = exports.LinkProps = exports.BackgroundProps = exports.DataLensProps = exports.DataLensObjectProps = exports.JustifyProps = exports.ThemeProps = exports.VideoProps = exports.PlayIconProps = exports.LoopProps = exports.ChildrenCardsProps = exports.ChildrenProps = exports.AnimatableProps = exports.sliderSizesObject = exports.containerSizesObject = exports.BaseProps = exports.contentThemes = exports.sizeNumber = exports.dividerEnum = exports.fileLinkTypes = exports.videoControlsTypes = exports.playIconThemes = exports.playIconTypes = exports.videoTypes = exports.contentTextWidth = exports.contentSizes = exports.sliderSizesArray = exports.containerSizesArray = exports.textSize = exports.mediaDirection = void 0;
|
|
3
|
+
exports.BlockHeaderProps = exports.CardBase = exports.MediaProps = exports.ButtonBlock = exports.TitleProps = exports.BlockBaseProps = exports.AnchorProps = exports.withTheme = exports.MenuProps = exports.ButtonProps = exports.authorItem = exports.FileLinkProps = exports.LinkProps = exports.BackgroundProps = exports.DataLensProps = exports.DataLensObjectProps = exports.JustifyProps = exports.ThemeProps = exports.VideoProps = exports.PlayIconProps = exports.LoopProps = exports.ChildrenCardsProps = exports.ChildrenProps = exports.AnimatableProps = exports.sliderSizesObject = exports.containerSizesObject = exports.BaseProps = exports.contentThemes = exports.sizeNumber = exports.dividerEnum = exports.fileLinkTypes = exports.videoControlsTypes = exports.playIconThemes = exports.playIconTypes = exports.videoTypes = exports.contentTextWidth = exports.contentSizes = exports.sliderSizesArray = exports.containerSizesArray = exports.textSize = exports.mediaDirection = void 0;
|
|
4
4
|
const pixel_1 = require("./pixel");
|
|
5
5
|
const models_1 = require("../../models");
|
|
6
6
|
const schema_1 = require("../../components/Image/schema");
|
|
@@ -448,3 +448,12 @@ exports.CardBase = {
|
|
|
448
448
|
enum: ['border', 'shadow', 'none'],
|
|
449
449
|
},
|
|
450
450
|
};
|
|
451
|
+
exports.BlockHeaderProps = {
|
|
452
|
+
title: {
|
|
453
|
+
oneOf: [{ type: 'string' }, exports.TitleProps],
|
|
454
|
+
},
|
|
455
|
+
description: {
|
|
456
|
+
type: 'string',
|
|
457
|
+
contentType: 'yfm',
|
|
458
|
+
},
|
|
459
|
+
};
|