@gravity-ui/page-constructor 1.12.0 → 1.12.1-alpha.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 +9 -1
- 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/Slider.d.ts +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/Author/Author.js +2 -2
- package/build/cjs/components/Author/__tests__/Author.test.d.ts +1 -0
- package/build/cjs/components/Author/__tests__/Author.test.js +49 -0
- package/build/cjs/components/BlockHeader/BlockHeader.css +8 -19
- package/build/cjs/components/BlockHeader/BlockHeader.js +4 -3
- package/build/cjs/grid/Grid/Grid.css +16 -16
- package/build/cjs/models/constructor-items/common.d.ts +1 -0
- package/build/cjs/navigation/components/Header/Header.css +5 -3
- package/build/cjs/navigation/components/Logo/Logo.css +5 -6
- package/build/cjs/navigation/components/NavigationItem/NavigationItem.css +1 -0
- 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/Slider.d.ts +1 -6
- 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/Author/Author.js +2 -2
- package/build/esm/components/Author/__tests__/Author.test.d.ts +1 -0
- package/build/esm/components/Author/__tests__/Author.test.js +46 -0
- package/build/esm/components/BlockHeader/BlockHeader.css +8 -19
- package/build/esm/components/BlockHeader/BlockHeader.js +5 -4
- package/build/esm/grid/Grid/Grid.css +16 -16
- package/build/esm/models/constructor-items/common.d.ts +1 -0
- package/build/esm/navigation/components/Header/Header.css +5 -3
- package/build/esm/navigation/components/Logo/Logo.css +5 -6
- package/build/esm/navigation/components/NavigationItem/NavigationItem.css +1 -0
- 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 +2 -3
- package/server/models/constructor-items/common.d.ts +1 -0
- package/server/text-transform/blocks.js +44 -54
|
@@ -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;
|
|
@@ -21,64 +21,64 @@
|
|
|
21
21
|
}
|
|
22
22
|
@media only screen and (max-width: 577px) {
|
|
23
23
|
.pc-Grid .container,
|
|
24
|
-
.pc-Grid .container-fluid {
|
|
24
|
+
.pc-Grid .container-fluid {
|
|
25
25
|
padding: 0 16px;
|
|
26
26
|
}
|
|
27
27
|
.pc-Grid .col,
|
|
28
|
-
.pc-Grid .col-sm-auto,
|
|
29
|
-
.pc-Grid .col-auto {
|
|
28
|
+
.pc-Grid .col-sm-auto,
|
|
29
|
+
.pc-Grid .col-auto {
|
|
30
30
|
padding: 0 8px;
|
|
31
31
|
}
|
|
32
32
|
.pc-Grid .col-sm-0,
|
|
33
|
-
.pc-Grid .col-0 {
|
|
33
|
+
.pc-Grid .col-0 {
|
|
34
34
|
padding: 0 8px;
|
|
35
35
|
}
|
|
36
36
|
.pc-Grid .col-sm-1,
|
|
37
|
-
.pc-Grid .col-1 {
|
|
37
|
+
.pc-Grid .col-1 {
|
|
38
38
|
padding: 0 8px;
|
|
39
39
|
}
|
|
40
40
|
.pc-Grid .col-sm-2,
|
|
41
|
-
.pc-Grid .col-2 {
|
|
41
|
+
.pc-Grid .col-2 {
|
|
42
42
|
padding: 0 8px;
|
|
43
43
|
}
|
|
44
44
|
.pc-Grid .col-sm-3,
|
|
45
|
-
.pc-Grid .col-3 {
|
|
45
|
+
.pc-Grid .col-3 {
|
|
46
46
|
padding: 0 8px;
|
|
47
47
|
}
|
|
48
48
|
.pc-Grid .col-sm-4,
|
|
49
|
-
.pc-Grid .col-4 {
|
|
49
|
+
.pc-Grid .col-4 {
|
|
50
50
|
padding: 0 8px;
|
|
51
51
|
}
|
|
52
52
|
.pc-Grid .col-sm-5,
|
|
53
|
-
.pc-Grid .col-5 {
|
|
53
|
+
.pc-Grid .col-5 {
|
|
54
54
|
padding: 0 8px;
|
|
55
55
|
}
|
|
56
56
|
.pc-Grid .col-sm-6,
|
|
57
|
-
.pc-Grid .col-6 {
|
|
57
|
+
.pc-Grid .col-6 {
|
|
58
58
|
padding: 0 8px;
|
|
59
59
|
}
|
|
60
60
|
.pc-Grid .col-sm-7,
|
|
61
|
-
.pc-Grid .col-7 {
|
|
61
|
+
.pc-Grid .col-7 {
|
|
62
62
|
padding: 0 8px;
|
|
63
63
|
}
|
|
64
64
|
.pc-Grid .col-sm-8,
|
|
65
|
-
.pc-Grid .col-8 {
|
|
65
|
+
.pc-Grid .col-8 {
|
|
66
66
|
padding: 0 8px;
|
|
67
67
|
}
|
|
68
68
|
.pc-Grid .col-sm-9,
|
|
69
|
-
.pc-Grid .col-9 {
|
|
69
|
+
.pc-Grid .col-9 {
|
|
70
70
|
padding: 0 8px;
|
|
71
71
|
}
|
|
72
72
|
.pc-Grid .col-sm-10,
|
|
73
|
-
.pc-Grid .col-10 {
|
|
73
|
+
.pc-Grid .col-10 {
|
|
74
74
|
padding: 0 8px;
|
|
75
75
|
}
|
|
76
76
|
.pc-Grid .col-sm-11,
|
|
77
|
-
.pc-Grid .col-11 {
|
|
77
|
+
.pc-Grid .col-11 {
|
|
78
78
|
padding: 0 8px;
|
|
79
79
|
}
|
|
80
80
|
.pc-Grid .col-sm-12,
|
|
81
|
-
.pc-Grid .col-12 {
|
|
81
|
+
.pc-Grid .col-12 {
|
|
82
82
|
padding: 0 8px;
|
|
83
83
|
}
|
|
84
84
|
.pc-Grid .row .row {
|
|
@@ -18,25 +18,27 @@ unpredictable css rules order in build */
|
|
|
18
18
|
height: var(--header-height);
|
|
19
19
|
}
|
|
20
20
|
@media (min-width: 769px) {
|
|
21
|
-
.pc-header__mobile-menu-button {
|
|
21
|
+
.pc-header__mobile-menu-button.pc-header__mobile-menu-button {
|
|
22
22
|
display: none;
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
+
|
|
25
26
|
.pc-header__navigation, .pc-header__left, .pc-header__right {
|
|
26
27
|
display: flex;
|
|
27
28
|
align-items: center;
|
|
28
29
|
}
|
|
29
|
-
.pc-header__navigation {
|
|
30
|
+
.pc-header__navigation.pc-header__navigation {
|
|
30
31
|
position: relative;
|
|
31
32
|
margin-right: 20px;
|
|
32
33
|
flex: 1 0 0;
|
|
33
34
|
justify-content: flex-start;
|
|
34
35
|
}
|
|
35
36
|
@media (max-width: 768px) {
|
|
36
|
-
.pc-header__navigation {
|
|
37
|
+
.pc-header__navigation.pc-header__navigation {
|
|
37
38
|
display: none;
|
|
38
39
|
}
|
|
39
40
|
}
|
|
41
|
+
|
|
40
42
|
.pc-header__right {
|
|
41
43
|
flex: 0;
|
|
42
44
|
justify-content: flex-end;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.pc-
|
|
1
|
+
.pc-logo__text {
|
|
2
2
|
margin: 0;
|
|
3
3
|
}
|
|
4
4
|
|
|
@@ -7,11 +7,6 @@ unpredictable css rules order in build */
|
|
|
7
7
|
.pc-logo {
|
|
8
8
|
display: flex;
|
|
9
9
|
align-items: center;
|
|
10
|
-
font-weight: var(--yc-text-accent-font-weight);
|
|
11
|
-
font-size: var(--yc-text-header-1-font-size);
|
|
12
|
-
line-height: var(--yc-text-header-1-line-height);
|
|
13
|
-
color: var(--pc-text-header-color);
|
|
14
|
-
font-weight: var(--yc-text-accent-font-weight);
|
|
15
10
|
}
|
|
16
11
|
.pc-logo__icon {
|
|
17
12
|
display: flex;
|
|
@@ -19,5 +14,9 @@ unpredictable css rules order in build */
|
|
|
19
14
|
object-fit: contain;
|
|
20
15
|
}
|
|
21
16
|
.pc-logo__text {
|
|
17
|
+
font-size: var(--yc-text-header-1-font-size);
|
|
18
|
+
line-height: var(--yc-text-header-1-line-height);
|
|
19
|
+
color: var(--pc-text-header-color);
|
|
20
|
+
font-weight: var(--yc-text-accent-font-weight);
|
|
22
21
|
white-space: nowrap;
|
|
23
22
|
}
|
|
@@ -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
|
+
};
|
|
@@ -4,7 +4,7 @@ exports.CardWithImage = exports.CardWithImageItem = void 0;
|
|
|
4
4
|
const lodash_1 = require("lodash");
|
|
5
5
|
const common_1 = require("../../schema/validators/common");
|
|
6
6
|
const utils_1 = require("../../schema/validators/utils");
|
|
7
|
-
const schema_1 = require("
|
|
7
|
+
const schema_1 = require("../../sub-blocks/Content/schema");
|
|
8
8
|
const CardWithImageContentProps = (0, lodash_1.omit)(schema_1.ContentBase, ['links', 'size', 'text', 'theme']);
|
|
9
9
|
const CardWithImageLinks = {
|
|
10
10
|
type: 'object',
|
|
@@ -39,13 +39,6 @@ function parsePromoFeatures(transformer, items) {
|
|
|
39
39
|
return (Object.assign({ text: transformer(text) }, rest));
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
|
-
function parseSlider(transformer, block) {
|
|
43
|
-
const { title, description } = block;
|
|
44
|
-
block.title = Object.assign(Object.assign({}, title), { text: transformer(title ? title.text : '') });
|
|
45
|
-
if (description) {
|
|
46
|
-
block.description = transformer(description);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
42
|
const parseTitle = (transformer, title) => typeof title === 'object' && 'text' in title
|
|
50
43
|
? Object.assign(Object.assign({}, title), { text: transformer(title.text) }) : title && transformer(title);
|
|
51
44
|
const parseItemsTitle = (transformer, items) => items.map((_a) => {
|
|
@@ -101,6 +94,17 @@ function typografTransformer(lang, content) {
|
|
|
101
94
|
return (0, utils_1.typografToHTML)(content, lang);
|
|
102
95
|
}
|
|
103
96
|
exports.typografTransformer = typografTransformer;
|
|
97
|
+
const blockHeaderTransfomer = [
|
|
98
|
+
{
|
|
99
|
+
fields: ['title'],
|
|
100
|
+
transformer: typografTransformer,
|
|
101
|
+
parser: parseTitle,
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
fields: ['description'],
|
|
105
|
+
transformer: yfmTransformer,
|
|
106
|
+
},
|
|
107
|
+
];
|
|
104
108
|
const config = {
|
|
105
109
|
[models_1.SubBlockType.Partner]: {
|
|
106
110
|
fields: ['text'],
|
|
@@ -145,35 +149,35 @@ const config = {
|
|
|
145
149
|
transformer: typografTransformer,
|
|
146
150
|
},
|
|
147
151
|
[models_1.BlockType.ExtendedFeaturesBlock]: [
|
|
152
|
+
...blockHeaderTransfomer,
|
|
148
153
|
{
|
|
149
|
-
fields: ['
|
|
154
|
+
fields: ['items'],
|
|
150
155
|
transformer: typografTransformer,
|
|
151
|
-
parser:
|
|
156
|
+
parser: (0, exports.createItemsParser)(['title']),
|
|
152
157
|
},
|
|
153
158
|
{
|
|
154
|
-
fields: ['
|
|
159
|
+
fields: ['items'],
|
|
155
160
|
transformer: yfmTransformer,
|
|
161
|
+
parser: (0, exports.createItemsParser)(['text', 'additionalInfo']),
|
|
156
162
|
},
|
|
163
|
+
],
|
|
164
|
+
[models_1.BlockType.PromoFeaturesBlock]: [
|
|
157
165
|
{
|
|
158
|
-
fields: ['
|
|
166
|
+
fields: ['title'],
|
|
159
167
|
transformer: typografTransformer,
|
|
160
|
-
parser:
|
|
168
|
+
parser: parseTitle,
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
fields: ['description'],
|
|
172
|
+
transformer: yfmTransformer,
|
|
161
173
|
},
|
|
162
174
|
{
|
|
163
175
|
fields: ['items'],
|
|
164
176
|
transformer: yfmTransformer,
|
|
165
|
-
parser:
|
|
177
|
+
parser: parsePromoFeatures,
|
|
166
178
|
},
|
|
167
179
|
],
|
|
168
|
-
[models_1.BlockType.
|
|
169
|
-
fields: ['items'],
|
|
170
|
-
transformer: yfmTransformer,
|
|
171
|
-
parser: parsePromoFeatures,
|
|
172
|
-
},
|
|
173
|
-
[models_1.BlockType.SliderBlock]: {
|
|
174
|
-
transformer: typografTransformer,
|
|
175
|
-
parser: parseSlider,
|
|
176
|
-
},
|
|
180
|
+
[models_1.BlockType.SliderBlock]: blockHeaderTransfomer,
|
|
177
181
|
[models_1.BlockType.QuestionsBlock]: [
|
|
178
182
|
{
|
|
179
183
|
fields: ['title'],
|
|
@@ -210,21 +214,14 @@ const config = {
|
|
|
210
214
|
},
|
|
211
215
|
],
|
|
212
216
|
[models_1.BlockType.MediaBlock]: [
|
|
217
|
+
...blockHeaderTransfomer,
|
|
213
218
|
{
|
|
214
|
-
fields: ['title'],
|
|
215
|
-
transformer: typografTransformer,
|
|
216
|
-
},
|
|
217
|
-
{
|
|
218
|
-
fields: ['description', 'title', 'additionalInfo'],
|
|
219
|
+
fields: ['title', 'additionalInfo'],
|
|
219
220
|
transformer: yfmTransformer,
|
|
220
221
|
},
|
|
221
222
|
],
|
|
222
223
|
[models_1.BlockType.TabsBlock]: [
|
|
223
|
-
|
|
224
|
-
fields: ['title'],
|
|
225
|
-
transformer: typografTransformer,
|
|
226
|
-
parser: parseTitle,
|
|
227
|
-
},
|
|
224
|
+
...blockHeaderTransfomer,
|
|
228
225
|
{
|
|
229
226
|
fields: ['items'],
|
|
230
227
|
transformer: yfmTransformer,
|
|
@@ -256,6 +253,11 @@ const config = {
|
|
|
256
253
|
},
|
|
257
254
|
],
|
|
258
255
|
[models_1.BlockType.SimpleBlock]: [
|
|
256
|
+
{
|
|
257
|
+
fields: ['title'],
|
|
258
|
+
transformer: typografTransformer,
|
|
259
|
+
parser: parseTitle,
|
|
260
|
+
},
|
|
259
261
|
{
|
|
260
262
|
fields: ['description'],
|
|
261
263
|
transformer: yfmTransformer,
|
|
@@ -307,28 +309,7 @@ const config = {
|
|
|
307
309
|
parser: parseTitle,
|
|
308
310
|
},
|
|
309
311
|
],
|
|
310
|
-
[models_1.BlockType.
|
|
311
|
-
{
|
|
312
|
-
fields: ['description'],
|
|
313
|
-
transformer: yfmTransformer,
|
|
314
|
-
},
|
|
315
|
-
{
|
|
316
|
-
fields: ['title'],
|
|
317
|
-
transformer: typografTransformer,
|
|
318
|
-
parser: parseTitle,
|
|
319
|
-
},
|
|
320
|
-
],
|
|
321
|
-
[models_1.BlockType.PromoFeaturesBlock]: [
|
|
322
|
-
{
|
|
323
|
-
fields: ['description'],
|
|
324
|
-
transformer: typografTransformer,
|
|
325
|
-
},
|
|
326
|
-
{
|
|
327
|
-
fields: ['title'],
|
|
328
|
-
transformer: typografTransformer,
|
|
329
|
-
parser: parseTitle,
|
|
330
|
-
},
|
|
331
|
-
],
|
|
312
|
+
[models_1.BlockType.PromoFeaturesBlock]: blockHeaderTransfomer,
|
|
332
313
|
[models_1.BlockType.InfoBlock]: [
|
|
333
314
|
{
|
|
334
315
|
fields: ['rightContent', 'leftContent'],
|
|
@@ -347,6 +328,15 @@ const config = {
|
|
|
347
328
|
transformer: typografTransformer,
|
|
348
329
|
},
|
|
349
330
|
],
|
|
331
|
+
[models_1.BlockType.CardLayoutBlock]: blockHeaderTransfomer,
|
|
332
|
+
[models_1.BlockType.IconsBlock]: [
|
|
333
|
+
{
|
|
334
|
+
fields: ['title'],
|
|
335
|
+
transformer: typografTransformer,
|
|
336
|
+
parser: parseTitle,
|
|
337
|
+
},
|
|
338
|
+
],
|
|
339
|
+
[models_1.BlockType.LinkTableBlock]: blockHeaderTransfomer,
|
|
350
340
|
};
|
|
351
341
|
function addRandomOrder(block) {
|
|
352
342
|
if (block) {
|
|
@@ -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
|
};
|
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
import { AnimatableProps, containerSizesObject, ChildrenCardsProps, BlockBaseProps,
|
|
1
|
+
import { AnimatableProps, containerSizesObject, ChildrenCardsProps, BlockBaseProps, BlockHeaderProps, } from '../../schema/validators/common';
|
|
2
2
|
export const CardLayoutProps = {
|
|
3
3
|
additionalProperties: false,
|
|
4
4
|
required: ['title'],
|
|
5
|
-
properties: Object.assign(Object.assign(Object.assign({}, BlockBaseProps), AnimatableProps), {
|
|
6
|
-
oneOf: [{ type: 'string', contentType: 'text' }, TitleProps],
|
|
7
|
-
}, description: {
|
|
8
|
-
type: 'string',
|
|
9
|
-
contentType: 'yfm',
|
|
10
|
-
}, colSizes: containerSizesObject, children: ChildrenCardsProps }),
|
|
5
|
+
properties: Object.assign(Object.assign(Object.assign(Object.assign({}, BlockBaseProps), AnimatableProps), BlockHeaderProps), { colSizes: containerSizesObject, children: ChildrenCardsProps }),
|
|
11
6
|
};
|
|
12
7
|
export const CardLayoutBlock = {
|
|
13
8
|
'card-layout-block': 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
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnimatableProps, containerSizesObject, LinkProps, BlockBaseProps,
|
|
1
|
+
import { AnimatableProps, containerSizesObject, LinkProps, BlockBaseProps, BlockHeaderProps, } from '../../schema/validators/common';
|
|
2
2
|
import { filteredArray } from '../../schema/validators/utils';
|
|
3
3
|
export const ExtendedFeaturesItem = {
|
|
4
4
|
additionalProperties: false,
|
|
@@ -26,11 +26,6 @@ export const ExtendedFeaturesBlock = {
|
|
|
26
26
|
'extended-features-block': {
|
|
27
27
|
additionalProperties: false,
|
|
28
28
|
required: [],
|
|
29
|
-
properties: Object.assign(Object.assign(Object.assign({}, BlockBaseProps), AnimatableProps), {
|
|
30
|
-
oneOf: [{ type: 'string', contentType: 'text' }, TitleProps],
|
|
31
|
-
}, description: {
|
|
32
|
-
type: 'string',
|
|
33
|
-
contentType: 'yfm',
|
|
34
|
-
}, items: filteredArray(ExtendedFeaturesItem), colSizes: containerSizesObject }),
|
|
29
|
+
properties: Object.assign(Object.assign(Object.assign(Object.assign({}, BlockBaseProps), AnimatableProps), BlockHeaderProps), { items: filteredArray(ExtendedFeaturesItem), colSizes: containerSizesObject }),
|
|
35
30
|
},
|
|
36
31
|
};
|
|
@@ -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
|
};
|