@gravity-ui/page-constructor 8.2.2 → 8.3.0
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/README.md +1 -1
- package/build/cjs/blocks/ContentLayout/ContentLayout.css +2 -2
- package/build/cjs/blocks/ContentLayout/ContentLayout.js +2 -0
- package/build/cjs/blocks/ContentLayout/ContentLayout.js.map +1 -1
- package/build/cjs/blocks/ContentLayout/schema.d.ts +0 -11
- package/build/cjs/blocks/FoldableList/schema.d.ts +0 -11
- package/build/cjs/blocks/Form/Form.css +10 -1
- package/build/cjs/blocks/Form/Form.js +4 -2
- package/build/cjs/blocks/Form/Form.js.map +1 -1
- package/build/cjs/blocks/Form/schema.d.ts +0 -11
- package/build/cjs/blocks/Info/schema.d.ts +0 -22
- package/build/cjs/blocks/Map/schema.d.ts +0 -11
- package/build/cjs/blocks/Media/schema.d.ts +0 -22
- package/build/cjs/blocks/Questions/schema.d.ts +0 -11
- package/build/cjs/blocks/Tabs/schema.d.ts +0 -11
- package/build/cjs/components/Buttons/Buttons.css +2 -2
- package/build/cjs/components/Buttons/Buttons.js +2 -0
- package/build/cjs/components/Buttons/Buttons.js.map +1 -1
- package/build/cjs/components/ContentList/ContentList.css +8 -8
- package/build/cjs/components/ContentList/ContentList.js +2 -0
- package/build/cjs/components/ContentList/ContentList.js.map +1 -1
- package/build/cjs/components/IconWrapper/IconWrapper.css +6 -0
- package/build/cjs/components/Links/Links.css +1 -1
- package/build/cjs/components/Links/Links.js +2 -0
- package/build/cjs/components/Links/Links.js.map +1 -1
- package/build/cjs/components/index.d.ts +1 -0
- package/build/cjs/components/index.js +3 -1
- package/build/cjs/components/index.js.map +1 -1
- package/build/cjs/models/constructor-items/blocks.d.ts +9 -19
- package/build/cjs/models/constructor-items/blocks.js.map +1 -1
- package/build/cjs/models/constructor-items/common.d.ts +1 -1
- package/build/cjs/models/constructor-items/common.js.map +1 -1
- package/build/cjs/models/constructor-items/sub-blocks.d.ts +6 -6
- package/build/cjs/models/constructor-items/sub-blocks.js.map +1 -1
- package/build/cjs/schema/constants.d.ts +5 -30
- package/build/cjs/schema/validators/common.js +1 -1
- package/build/cjs/schema/validators/common.js.map +1 -1
- package/build/cjs/sub-blocks/BackgroundCard/schema.d.ts +3 -10
- package/build/cjs/sub-blocks/BackgroundCard/schema.js +1 -1
- package/build/cjs/sub-blocks/BackgroundCard/schema.js.map +1 -1
- package/build/cjs/sub-blocks/BasicCard/schema.d.ts +2 -9
- package/build/cjs/sub-blocks/BasicCard/schema.js +1 -1
- package/build/cjs/sub-blocks/BasicCard/schema.js.map +1 -1
- package/build/cjs/sub-blocks/Content/Content.css +29 -17
- package/build/cjs/sub-blocks/Content/Content.js +7 -13
- package/build/cjs/sub-blocks/Content/Content.js.map +1 -1
- package/build/cjs/sub-blocks/Content/schema.d.ts +0 -100
- package/build/cjs/sub-blocks/Content/schema.js +1 -14
- package/build/cjs/sub-blocks/Content/schema.js.map +1 -1
- package/build/cjs/sub-blocks/ImageCard/schema.d.ts +0 -11
- package/build/cjs/sub-blocks/LayoutItem/schema.d.ts +0 -11
- package/build/cjs/sub-blocks/LayoutItem/schema.js +1 -1
- package/build/cjs/sub-blocks/LayoutItem/schema.js.map +1 -1
- package/build/esm/blocks/ContentLayout/ContentLayout.css +2 -2
- package/build/esm/blocks/ContentLayout/ContentLayout.js +2 -0
- package/build/esm/blocks/ContentLayout/ContentLayout.js.map +1 -1
- package/build/esm/blocks/ContentLayout/schema.d.ts +0 -11
- package/build/esm/blocks/FoldableList/schema.d.ts +0 -11
- package/build/esm/blocks/Form/Form.css +10 -1
- package/build/esm/blocks/Form/Form.js +4 -2
- package/build/esm/blocks/Form/Form.js.map +1 -1
- package/build/esm/blocks/Form/schema.d.ts +0 -11
- package/build/esm/blocks/Info/schema.d.ts +0 -22
- package/build/esm/blocks/Map/schema.d.ts +0 -11
- package/build/esm/blocks/Media/schema.d.ts +0 -22
- package/build/esm/blocks/Questions/schema.d.ts +0 -11
- package/build/esm/blocks/Tabs/schema.d.ts +0 -11
- package/build/esm/components/Buttons/Buttons.css +2 -2
- package/build/esm/components/Buttons/Buttons.js +2 -0
- package/build/esm/components/Buttons/Buttons.js.map +1 -1
- package/build/esm/components/ContentList/ContentList.css +8 -8
- package/build/esm/components/ContentList/ContentList.js +2 -0
- package/build/esm/components/ContentList/ContentList.js.map +1 -1
- package/build/esm/components/IconWrapper/IconWrapper.css +6 -0
- package/build/esm/components/Links/Links.css +1 -1
- package/build/esm/components/Links/Links.js +2 -0
- package/build/esm/components/Links/Links.js.map +1 -1
- package/build/esm/components/index.d.ts +1 -0
- package/build/esm/components/index.js +1 -0
- package/build/esm/components/index.js.map +1 -1
- package/build/esm/models/constructor-items/blocks.d.ts +9 -19
- package/build/esm/models/constructor-items/blocks.js.map +1 -1
- package/build/esm/models/constructor-items/common.d.ts +1 -1
- package/build/esm/models/constructor-items/common.js.map +1 -1
- package/build/esm/models/constructor-items/sub-blocks.d.ts +6 -6
- package/build/esm/models/constructor-items/sub-blocks.js.map +1 -1
- package/build/esm/schema/constants.d.ts +5 -30
- package/build/esm/schema/validators/common.js +1 -1
- package/build/esm/schema/validators/common.js.map +1 -1
- package/build/esm/sub-blocks/BackgroundCard/schema.d.ts +3 -10
- package/build/esm/sub-blocks/BackgroundCard/schema.js +1 -1
- package/build/esm/sub-blocks/BackgroundCard/schema.js.map +1 -1
- package/build/esm/sub-blocks/BasicCard/schema.d.ts +2 -9
- package/build/esm/sub-blocks/BasicCard/schema.js +1 -1
- package/build/esm/sub-blocks/BasicCard/schema.js.map +1 -1
- package/build/esm/sub-blocks/Content/Content.css +29 -17
- package/build/esm/sub-blocks/Content/Content.js +7 -12
- package/build/esm/sub-blocks/Content/Content.js.map +1 -1
- package/build/esm/sub-blocks/Content/schema.d.ts +0 -100
- package/build/esm/sub-blocks/Content/schema.js +0 -13
- package/build/esm/sub-blocks/Content/schema.js.map +1 -1
- package/build/esm/sub-blocks/ImageCard/schema.d.ts +0 -11
- package/build/esm/sub-blocks/LayoutItem/schema.d.ts +0 -11
- package/build/esm/sub-blocks/LayoutItem/schema.js +1 -1
- package/build/esm/sub-blocks/LayoutItem/schema.js.map +1 -1
- package/package.json +1 -1
- package/schema/index.js +1 -1
- package/server/models/constructor-items/blocks.d.ts +9 -19
- package/server/models/constructor-items/common.d.ts +1 -1
- package/server/models/constructor-items/sub-blocks.d.ts +6 -6
- package/widget/index.js +1 -1
- package/build/cjs/components/ContentLabels/ContentLabels.css +0 -53
- package/build/cjs/components/ContentLabels/ContentLabels.d.ts +0 -3
- package/build/cjs/components/ContentLabels/ContentLabels.js +0 -16
- package/build/cjs/components/ContentLabels/ContentLabels.js.map +0 -1
- package/build/esm/components/ContentLabels/ContentLabels.css +0 -53
- package/build/esm/components/ContentLabels/ContentLabels.d.ts +0 -4
- package/build/esm/components/ContentLabels/ContentLabels.js +0 -14
- package/build/esm/components/ContentLabels/ContentLabels.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["sub-blocks/BasicCard/schema.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,uBAAoB;AAE/B,OAAO,EAAC,UAAU,EAAC,yCAAsC;AACzD,OAAO,EACH,SAAS,EACT,QAAQ,EACR,eAAe,EACf,gBAAgB,GACnB,0CAAuC;AACxC,OAAO,EAAC,WAAW,EAAC,6BAA0B;AAE9C,MAAM,qBAAqB,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["sub-blocks/BasicCard/schema.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,uBAAoB;AAE/B,OAAO,EAAC,UAAU,EAAC,yCAAsC;AACzD,OAAO,EACH,SAAS,EACT,QAAQ,EACR,eAAe,EACf,gBAAgB,GACnB,0CAAuC;AACxC,OAAO,EAAC,WAAW,EAAC,6BAA0B;AAE9C,MAAM,qBAAqB,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC,CAAC;AAE9E,MAAM,CAAC,MAAM,SAAS,GAAG;IACrB,YAAY,EAAE;QACV,oBAAoB,EAAE,KAAK;QAC3B,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE;YACR,GAAG,SAAS;YACZ,GAAG,QAAQ;YACX,GAAG,eAAe;YAClB,GAAG,qBAAqB;YACxB,GAAG,EAAE;gBACD,IAAI,EAAE,QAAQ;aACjB;YACD,QAAQ,EAAE;gBACN,IAAI,EAAE,QAAQ;aACjB;YACD,IAAI,EAAE,UAAU;YAChB,WAAW,EAAE,gBAAgB;YAC7B,MAAM,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC;aAC/C;YACD,YAAY,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC;aACxB;YACD,eAAe,EAAE;gBACb,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC;aAC9B;YACD;;eAEG;YACH,oBAAoB,EAAE;gBAClB,IAAI,EAAE,QAAQ;aACjB;SACJ;KACJ;CACJ,CAAC","sourcesContent":["import omit from 'lodash/omit';\n\nimport {ImageProps} from '../../components/Image/schema';\nimport {\n BaseProps,\n CardBase,\n CardLayoutProps,\n GravityIconProps,\n} from '../../schema/validators/common';\nimport {ContentBase} from '../Content/schema';\n\nconst BasicCardContentProps = omit(ContentBase, ['theme', 'controlPosition']);\n\nexport const BasicCard = {\n 'basic-card': {\n additionalProperties: false,\n required: [],\n properties: {\n ...BaseProps,\n ...CardBase,\n ...CardLayoutProps,\n ...BasicCardContentProps,\n url: {\n type: 'string',\n },\n urlTitle: {\n type: 'string',\n },\n icon: ImageProps,\n gravityIcon: GravityIconProps,\n target: {\n type: 'string',\n enum: ['_blank', '_parent', '_top', '_self'],\n },\n iconPosition: {\n type: 'string',\n enum: ['top', 'left'],\n },\n controlPosition: {\n type: 'string',\n enum: ['content', 'footer'],\n },\n /**\n * @deprecated This property will be removed in future versions\n */\n hoverBackgroundColor: {\n type: 'string',\n },\n },\n },\n};\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
.pc-
|
|
1
|
+
.pc-content_size_xl .pc-content__text .yfm,
|
|
2
|
+
.pc-content_size_xl .pc-content__notice .yfm, .pc-content_size_l .pc-content__text .yfm,
|
|
2
3
|
.pc-content_size_l .pc-content__notice .yfm, .pc-content_size_m .pc-content__text .yfm,
|
|
3
4
|
.pc-content_size_m .pc-content__notice .yfm {
|
|
4
5
|
margin: 0;
|
|
@@ -36,10 +37,6 @@ unpredictable css rules order in build */
|
|
|
36
37
|
text-align: center;
|
|
37
38
|
}
|
|
38
39
|
|
|
39
|
-
.pc-content_centered .pc-content__labels {
|
|
40
|
-
justify-content: center;
|
|
41
|
-
margin-inline: auto;
|
|
42
|
-
}
|
|
43
40
|
.pc-content_centered .pc-content__list {
|
|
44
41
|
margin-inline: auto;
|
|
45
42
|
}
|
|
@@ -64,15 +61,11 @@ unpredictable css rules order in build */
|
|
|
64
61
|
.pc-content_size_s .pc-content__text_without-title {
|
|
65
62
|
margin-top: 0;
|
|
66
63
|
}
|
|
67
|
-
.pc-content_size_s .pc-content__labels,
|
|
68
64
|
.pc-content_size_s .pc-content__list,
|
|
69
65
|
.pc-content_size_s .pc-content__links,
|
|
70
66
|
.pc-content_size_s .pc-content__notice {
|
|
71
67
|
margin-top: 16px;
|
|
72
68
|
}
|
|
73
|
-
.pc-content_size_s .pc-content__labels + .pc-content__list, .pc-content_size_s .pc-content__labels + .pc-content__link, .pc-content_size_s .pc-content__labels + .pc-content__notice {
|
|
74
|
-
margin-top: 20px;
|
|
75
|
-
}
|
|
76
69
|
.pc-content_size_s .pc-content__buttons {
|
|
77
70
|
margin-top: 20px;
|
|
78
71
|
}
|
|
@@ -99,15 +92,11 @@ unpredictable css rules order in build */
|
|
|
99
92
|
font-size: var(--g-text-body-2-font-size);
|
|
100
93
|
line-height: var(--g-text-body-2-line-height);
|
|
101
94
|
}
|
|
102
|
-
.pc-content_size_m .pc-content__labels,
|
|
103
95
|
.pc-content_size_m .pc-content__list,
|
|
104
96
|
.pc-content_size_m .pc-content__links,
|
|
105
97
|
.pc-content_size_m .pc-content__notice {
|
|
106
98
|
margin-top: 20px;
|
|
107
99
|
}
|
|
108
|
-
.pc-content_size_m .pc-content__labels + .pc-content__list, .pc-content_size_m .pc-content__labels + .pc-content__link, .pc-content_size_m .pc-content__labels + .pc-content__notice {
|
|
109
|
-
margin-top: 24px;
|
|
110
|
-
}
|
|
111
100
|
.pc-content_size_m .pc-content__buttons {
|
|
112
101
|
margin-top: 24px;
|
|
113
102
|
}
|
|
@@ -130,18 +119,41 @@ unpredictable css rules order in build */
|
|
|
130
119
|
font-size: var(--g-text-body-2-font-size);
|
|
131
120
|
line-height: var(--g-text-body-2-line-height);
|
|
132
121
|
}
|
|
133
|
-
.pc-content_size_l .pc-content__labels,
|
|
134
122
|
.pc-content_size_l .pc-content__list,
|
|
135
123
|
.pc-content_size_l .pc-content__links,
|
|
136
124
|
.pc-content_size_l .pc-content__notice {
|
|
137
125
|
margin-top: 20px;
|
|
138
126
|
}
|
|
139
|
-
.pc-content_size_l .pc-content__labels + .pc-content__list, .pc-content_size_l .pc-content__labels + .pc-content__link, .pc-content_size_l .pc-content__labels + .pc-content__notice {
|
|
140
|
-
margin-top: 24px;
|
|
141
|
-
}
|
|
142
127
|
.pc-content_size_l .pc-content__buttons {
|
|
143
128
|
margin-top: 24px;
|
|
144
129
|
}
|
|
130
|
+
.pc-content_size_xl .pc-content__text {
|
|
131
|
+
margin-top: 16px;
|
|
132
|
+
}
|
|
133
|
+
.pc-content_size_xl .pc-content__text_without-title {
|
|
134
|
+
margin-top: 0;
|
|
135
|
+
}
|
|
136
|
+
.pc-content_size_xl .pc-content__text .yfm,
|
|
137
|
+
.pc-content_size_xl .pc-content__notice .yfm {
|
|
138
|
+
font-size: var(--g-text-body-3-font-size);
|
|
139
|
+
line-height: var(--g-text-body-3-line-height);
|
|
140
|
+
}
|
|
141
|
+
.pc-content_size_xl .pc-content__text .yfm {
|
|
142
|
+
font-size: var(--g-text-body-3-font-size);
|
|
143
|
+
line-height: var(--g-text-body-3-line-height);
|
|
144
|
+
}
|
|
145
|
+
.pc-content_size_xl .pc-content__notice .yfm {
|
|
146
|
+
font-size: var(--g-text-body-2-font-size);
|
|
147
|
+
line-height: var(--g-text-body-2-line-height);
|
|
148
|
+
}
|
|
149
|
+
.pc-content_size_xl .pc-content__list,
|
|
150
|
+
.pc-content_size_xl .pc-content__links,
|
|
151
|
+
.pc-content_size_xl .pc-content__notice {
|
|
152
|
+
margin-top: 20px;
|
|
153
|
+
}
|
|
154
|
+
.pc-content_size_xl .pc-content__buttons {
|
|
155
|
+
margin-top: 32px;
|
|
156
|
+
}
|
|
145
157
|
.pc-content_theme_dark.pc-content_theme_dark {
|
|
146
158
|
--g-color-line-focus: var(--pc-color-line-focus-dark);
|
|
147
159
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useUniqId } from '@gravity-ui/uikit';
|
|
3
3
|
import { Buttons, ContentList, Links, Title, YFMWrapper } from "../../components/index.js";
|
|
4
|
-
import ContentLabels from "../../components/ContentLabels/ContentLabels.js";
|
|
5
4
|
import { Col } from "../../grid/index.js";
|
|
6
5
|
import { block } from "../../utils/index.js";
|
|
7
6
|
import { getQaAttrubutes } from "../../utils/blocks.js";
|
|
@@ -14,31 +13,27 @@ function getTextSize(size) {
|
|
|
14
13
|
case 'm':
|
|
15
14
|
return 'sm';
|
|
16
15
|
case 'l':
|
|
16
|
+
return 'm';
|
|
17
|
+
case 'xl':
|
|
18
|
+
return 'l';
|
|
17
19
|
default:
|
|
18
20
|
return 'm';
|
|
19
21
|
}
|
|
20
22
|
}
|
|
21
23
|
const Content = (props) => {
|
|
22
|
-
const { title, titleId: titleIdFromProps, text, textId, additionalInfo, size = 'l', links, buttons, colSizes = { all: 12, sm: 8 }, centered, theme, className, list,
|
|
23
|
-
const qaAttributes = getQaAttrubutes(qa, [
|
|
24
|
-
'links',
|
|
25
|
-
'link',
|
|
26
|
-
'buttons',
|
|
27
|
-
'button',
|
|
28
|
-
'list',
|
|
29
|
-
'labels',
|
|
30
|
-
]);
|
|
24
|
+
const { title, titleId: titleIdFromProps, text, textId, additionalInfo, size = 'l', links, buttons, colSizes = { all: 12, sm: 8 }, centered, theme, className, list, qa, controlPosition, } = props;
|
|
25
|
+
const qaAttributes = getQaAttrubutes(qa, ['links', 'link', 'buttons', 'button', 'list']);
|
|
31
26
|
const titleProps = !title || typeof title === 'string'
|
|
32
27
|
? { text: title, textSize: getTextSize(size) }
|
|
33
28
|
: title;
|
|
34
29
|
const hasTitle = Boolean(title);
|
|
35
30
|
const defaultTitleId = useUniqId();
|
|
36
31
|
const titleId = titleIdFromProps || defaultTitleId;
|
|
37
|
-
return (_jsxs(Col, { className: b({ size, centered, theme, 'control-position': controlPosition }, className), reset: true, sizes: colSizes, qa: qaAttributes.container, children: [title && (_jsx(Title, { className: b('title'), title: titleProps, colSizes: { all: 12 }, id: titleId })), text && (_jsx("div", { className: b('text', { ['without-title']: !hasTitle }), children: _jsx(YFMWrapper, { content: text, modifiers: { constructor: true, [`constructor-size-${size}`]: true }, id: textId, qa: qaAttributes.list }) })),
|
|
32
|
+
return (_jsxs(Col, { className: b({ size, centered, theme, 'control-position': controlPosition }, className), reset: true, sizes: colSizes, qa: qaAttributes.container, children: [title && (_jsx(Title, { className: b('title'), title: titleProps, colSizes: { all: 12 }, id: titleId })), text && (_jsx("div", { className: b('text', { ['without-title']: !hasTitle }), children: _jsx(YFMWrapper, { content: text, modifiers: { constructor: true, [`constructor-size-${size}`]: true }, id: textId, qa: qaAttributes.list }) })), list?.length ? (_jsx("div", { className: b('list'), children: _jsx(ContentList, { list: list, size: size, qa: qaAttributes.list, theme: theme }) })) : null, additionalInfo && (_jsx("div", { className: b('notice'), children: _jsx(YFMWrapper, { content: additionalInfo, modifiers: {
|
|
38
33
|
constructor: true,
|
|
39
34
|
'constructor-notice': true,
|
|
40
35
|
[`constructor-size-${size}`]: true,
|
|
41
|
-
} }) })), links && (_jsx(Links, { className: b('links'
|
|
36
|
+
} }) })), links && (_jsx(Links, { className: b('links'), size: size, links: links, titleId: titleId, qa: qaAttributes.links, linkQa: qaAttributes.link })), buttons && (_jsx(Buttons, { className: b('buttons'), size: size, buttons: buttons, titleId: titleId, qa: qaAttributes.buttons, buttonQa: qaAttributes.button }))] }));
|
|
42
37
|
};
|
|
43
38
|
export default Content;
|
|
44
39
|
//# sourceMappingURL=Content.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Content.js","sourceRoot":"../../../../src","sources":["sub-blocks/Content/Content.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,mBAAmB,CAAC;AAE5C,OAAO,EAAC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAC,kCAAyB;AAChF,OAAO,
|
|
1
|
+
{"version":3,"file":"Content.js","sourceRoot":"../../../../src","sources":["sub-blocks/Content/Content.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,mBAAmB,CAAC;AAE5C,OAAO,EAAC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAC,kCAAyB;AAChF,OAAO,EAAC,GAAG,EAAC,4BAAmB;AAS/B,OAAO,EAAC,KAAK,EAAC,6BAAoB;AAClC,OAAO,EAAC,eAAe,EAAC,8BAA2B;AAEnD,OAAO,eAAe,CAAC;AAEvB,MAAM,CAAC,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC;AAE3B,SAAS,WAAW,CAAC,IAAiB;IAClC,QA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KAAK,EACtB,MAAM,EAAE,YAAY,CAAC,IAAI,GAC3B,CACL,EACA,OAAO,IAAI,CACR,KAAC,OAAO,IACJ,SAAS,EAAE,CAAC,CAAC,SAAS,CAAC,EACvB,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,EAAE,EAAE,YAAY,CAAC,OAAO,EACxB,QAAQ,EAAE,YAAY,CAAC,MAAM,GAC/B,CACL,IACC,CACT,CAAC;AACN,CAAC,CAAC;AAEF,eAAe,OAAO,CAAC","sourcesContent":["import {useUniqId} from '@gravity-ui/uikit';\n\nimport {Buttons, ContentList, Links, Title, YFMWrapper} from '../../components';\nimport {Col} from '../../grid';\nimport {\n ClassNameProps,\n ContentBlockProps,\n ContentSize,\n TextSize,\n TitleItemProps,\n} from '../../models';\nimport {QAProps} from '../../models/common';\nimport {block} from '../../utils';\nimport {getQaAttrubutes} from '../../utils/blocks';\n\nimport './Content.scss';\n\nconst b = block('content');\n\nfunction getTextSize(size: ContentSize): TextSize {\n switch (size) {\n case 's':\n return 's';\n case 'm':\n return 'sm';\n case 'l':\n return 'm';\n case 'xl':\n return 'l';\n default:\n return 'm';\n }\n}\n\nexport type ContentProps = ContentBlockProps & ClassNameProps & QAProps;\n\nconst Content = (props: ContentProps) => {\n const {\n title,\n titleId: titleIdFromProps,\n text,\n textId,\n additionalInfo,\n size = 'l',\n links,\n buttons,\n colSizes = {all: 12, sm: 8},\n centered,\n theme,\n className,\n list,\n qa,\n controlPosition,\n } = props;\n const qaAttributes = getQaAttrubutes(qa, ['links', 'link', 'buttons', 'button', 'list']);\n\n const titleProps =\n !title || typeof title === 'string'\n ? ({text: title, textSize: getTextSize(size)} as TitleItemProps)\n : title;\n\n const hasTitle = Boolean(title);\n const defaultTitleId = useUniqId();\n const titleId = titleIdFromProps || defaultTitleId;\n\n return (\n <Col\n className={b({size, centered, theme, 'control-position': controlPosition}, className)}\n reset\n sizes={colSizes}\n qa={qaAttributes.container}\n >\n {title && (\n <Title\n className={b('title')}\n title={titleProps}\n colSizes={{all: 12}}\n id={titleId}\n />\n )}\n {text && (\n <div className={b('text', {['without-title']: !hasTitle})}>\n <YFMWrapper\n content={text}\n modifiers={{constructor: true, [`constructor-size-${size}`]: true}}\n id={textId}\n qa={qaAttributes.list}\n />\n </div>\n )}\n {list?.length ? (\n <div className={b('list')}>\n <ContentList list={list} size={size} qa={qaAttributes.list} theme={theme} />\n </div>\n ) : null}\n {additionalInfo && (\n <div className={b('notice')}>\n <YFMWrapper\n content={additionalInfo}\n modifiers={{\n constructor: true,\n 'constructor-notice': true,\n [`constructor-size-${size}`]: true,\n }}\n />\n </div>\n )}\n {links && (\n <Links\n className={b('links')}\n size={size}\n links={links}\n titleId={titleId}\n qa={qaAttributes.links}\n linkQa={qaAttributes.link}\n />\n )}\n {buttons && (\n <Buttons\n className={b('buttons')}\n size={size}\n buttons={buttons}\n titleId={titleId}\n qa={qaAttributes.buttons}\n buttonQa={qaAttributes.button}\n />\n )}\n </Col>\n );\n};\n\nexport default Content;\n"]}
|
|
@@ -82,84 +82,6 @@ export declare const ContentItem: {
|
|
|
82
82
|
};
|
|
83
83
|
};
|
|
84
84
|
};
|
|
85
|
-
export declare const ContentLabel: {
|
|
86
|
-
additionalProperties: boolean;
|
|
87
|
-
required: string[];
|
|
88
|
-
properties: {
|
|
89
|
-
text: {
|
|
90
|
-
type: string;
|
|
91
|
-
contentType: string;
|
|
92
|
-
};
|
|
93
|
-
icon: {
|
|
94
|
-
oneOf: (({
|
|
95
|
-
oneOf: ({
|
|
96
|
-
type: string;
|
|
97
|
-
properties: {
|
|
98
|
-
when: {
|
|
99
|
-
type: string;
|
|
100
|
-
};
|
|
101
|
-
};
|
|
102
|
-
} | {
|
|
103
|
-
type: string;
|
|
104
|
-
pattern: string;
|
|
105
|
-
optionName: string;
|
|
106
|
-
items?: undefined;
|
|
107
|
-
} | {
|
|
108
|
-
type: string;
|
|
109
|
-
items: {
|
|
110
|
-
type: string;
|
|
111
|
-
properties: {
|
|
112
|
-
when: {
|
|
113
|
-
type: string;
|
|
114
|
-
};
|
|
115
|
-
};
|
|
116
|
-
};
|
|
117
|
-
optionName: string;
|
|
118
|
-
pattern?: undefined;
|
|
119
|
-
})[];
|
|
120
|
-
} & {
|
|
121
|
-
optionName: string;
|
|
122
|
-
}) | {
|
|
123
|
-
type: string;
|
|
124
|
-
additionalProperties: boolean;
|
|
125
|
-
required: import("../../index.js").Theme[];
|
|
126
|
-
properties: {};
|
|
127
|
-
optionName: string;
|
|
128
|
-
})[];
|
|
129
|
-
};
|
|
130
|
-
gravityIcon: {
|
|
131
|
-
oneOf: (({
|
|
132
|
-
oneOf: ({
|
|
133
|
-
type: string;
|
|
134
|
-
additionalProperties?: undefined;
|
|
135
|
-
required?: undefined;
|
|
136
|
-
properties?: undefined;
|
|
137
|
-
} | {
|
|
138
|
-
type: string;
|
|
139
|
-
additionalProperties: boolean;
|
|
140
|
-
required: string[];
|
|
141
|
-
properties: {
|
|
142
|
-
name: {
|
|
143
|
-
type: string;
|
|
144
|
-
};
|
|
145
|
-
color: {
|
|
146
|
-
type: string;
|
|
147
|
-
enum: string[];
|
|
148
|
-
};
|
|
149
|
-
};
|
|
150
|
-
})[];
|
|
151
|
-
} & {
|
|
152
|
-
optionName: string;
|
|
153
|
-
}) | {
|
|
154
|
-
type: string;
|
|
155
|
-
additionalProperties: boolean;
|
|
156
|
-
required: import("../../index.js").Theme[];
|
|
157
|
-
properties: {};
|
|
158
|
-
optionName: string;
|
|
159
|
-
})[];
|
|
160
|
-
};
|
|
161
|
-
};
|
|
162
|
-
};
|
|
163
85
|
export declare const ContentBase: {
|
|
164
86
|
title: {
|
|
165
87
|
oneOf: ({
|
|
@@ -321,17 +243,6 @@ export declare const ContentBase: {
|
|
|
321
243
|
};
|
|
322
244
|
};
|
|
323
245
|
};
|
|
324
|
-
labels: {
|
|
325
|
-
type: string;
|
|
326
|
-
items: {
|
|
327
|
-
type: string;
|
|
328
|
-
properties: {
|
|
329
|
-
when: {
|
|
330
|
-
type: string;
|
|
331
|
-
};
|
|
332
|
-
};
|
|
333
|
-
};
|
|
334
|
-
};
|
|
335
246
|
controlPosition: {
|
|
336
247
|
type: string;
|
|
337
248
|
enum: string[];
|
|
@@ -505,17 +416,6 @@ export declare const ContentBlock: {
|
|
|
505
416
|
};
|
|
506
417
|
};
|
|
507
418
|
};
|
|
508
|
-
labels: {
|
|
509
|
-
type: string;
|
|
510
|
-
items: {
|
|
511
|
-
type: string;
|
|
512
|
-
properties: {
|
|
513
|
-
when: {
|
|
514
|
-
type: string;
|
|
515
|
-
};
|
|
516
|
-
};
|
|
517
|
-
};
|
|
518
|
-
};
|
|
519
419
|
controlPosition: {
|
|
520
420
|
type: string;
|
|
521
421
|
enum: string[];
|
|
@@ -24,18 +24,6 @@ export const ContentItem = {
|
|
|
24
24
|
gravityIcon: withTheme(GravityIconProps),
|
|
25
25
|
},
|
|
26
26
|
};
|
|
27
|
-
export const ContentLabel = {
|
|
28
|
-
additionalProperties: false,
|
|
29
|
-
required: ['text'],
|
|
30
|
-
properties: {
|
|
31
|
-
text: {
|
|
32
|
-
type: 'string',
|
|
33
|
-
contentType: 'text',
|
|
34
|
-
},
|
|
35
|
-
icon: withTheme(ImageProps),
|
|
36
|
-
gravityIcon: withTheme(GravityIconProps),
|
|
37
|
-
},
|
|
38
|
-
};
|
|
39
27
|
export const ContentBase = {
|
|
40
28
|
title: {
|
|
41
29
|
oneOf: [
|
|
@@ -70,7 +58,6 @@ export const ContentBase = {
|
|
|
70
58
|
enum: contentThemes,
|
|
71
59
|
},
|
|
72
60
|
list: filteredArray(ContentItem),
|
|
73
|
-
labels: filteredArray(ContentLabel),
|
|
74
61
|
controlPosition: {
|
|
75
62
|
type: 'string',
|
|
76
63
|
enum: ['default', 'bottom'],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["sub-blocks/Content/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,yCAAsC;AACzD,OAAO,EACH,WAAW,EACX,gBAAgB,EAChB,SAAS,EACT,UAAU,EACV,mBAAmB,EACnB,YAAY,EACZ,aAAa,EACb,UAAU,EACV,SAAS,GACZ,0CAAuC;AACxC,OAAO,EAAC,aAAa,EAAC,yCAAsC;AAE5D,MAAM,CAAC,MAAM,WAAW,GAAG;IACvB,oBAAoB,EAAE,KAAK;IAC3B,KAAK,EAAE;QACH;YACI,QAAQ,EAAE,CAAC,MAAM,CAAC;SACrB;QACD;YACI,QAAQ,EAAE,CAAC,aAAa,CAAC;SAC5B;KACJ;IACD,UAAU,EAAE;QACR,KAAK,EAAE;YACH,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,MAAM;SACtB;QACD,IAAI,EAAE;YACF,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,KAAK;SACrB;QACD,IAAI,EAAE,SAAS,CAAC,UAAU,CAAC;QAC3B,WAAW,EAAE,SAAS,CAAC,gBAAgB,CAAC;KAC3C;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["sub-blocks/Content/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,yCAAsC;AACzD,OAAO,EACH,WAAW,EACX,gBAAgB,EAChB,SAAS,EACT,UAAU,EACV,mBAAmB,EACnB,YAAY,EACZ,aAAa,EACb,UAAU,EACV,SAAS,GACZ,0CAAuC;AACxC,OAAO,EAAC,aAAa,EAAC,yCAAsC;AAE5D,MAAM,CAAC,MAAM,WAAW,GAAG;IACvB,oBAAoB,EAAE,KAAK;IAC3B,KAAK,EAAE;QACH;YACI,QAAQ,EAAE,CAAC,MAAM,CAAC;SACrB;QACD;YACI,QAAQ,EAAE,CAAC,aAAa,CAAC;SAC5B;KACJ;IACD,UAAU,EAAE;QACR,KAAK,EAAE;YACH,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,MA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,CAAC;YACvF,QAAQ,EAAE;gBACN,IAAI,EAAE,SAAS;aAClB;SACJ;KACJ;CACJ,CAAC","sourcesContent":["import {ImageProps} from '../../components/Image/schema';\nimport {\n ButtonBlock,\n GravityIconProps,\n LinkProps,\n TitleProps,\n containerSizesArray,\n contentSizes,\n contentThemes,\n sizeNumber,\n withTheme,\n} from '../../schema/validators/common';\nimport {filteredArray} from '../../schema/validators/utils';\n\nexport const ContentItem = {\n additionalProperties: false,\n oneOf: [\n {\n required: ['icon'],\n },\n {\n required: ['gravityIcon'],\n },\n ],\n properties: {\n title: {\n type: 'string',\n contentType: 'text',\n },\n text: {\n type: 'string',\n contentType: 'yfm',\n },\n icon: withTheme(ImageProps),\n gravityIcon: withTheme(GravityIconProps),\n },\n};\n\nexport const ContentBase = {\n title: {\n oneOf: [\n {\n type: 'string',\n contentType: 'text',\n optionName: 'text',\n },\n {\n ...TitleProps,\n optionName: 'options',\n },\n ],\n },\n text: {\n type: 'string',\n contentType: 'yfm',\n inputType: 'textarea',\n },\n additionalInfo: {\n type: 'string',\n contentType: 'yfm',\n },\n size: {\n type: 'string',\n enum: contentSizes,\n },\n links: filteredArray(LinkProps),\n buttons: filteredArray(ButtonBlock),\n theme: {\n type: 'string',\n enum: contentThemes,\n },\n list: filteredArray(ContentItem),\n controlPosition: {\n type: 'string',\n enum: ['default', 'bottom'],\n },\n};\n\nexport const ContentBlock = {\n content: {\n additionalProperties: false,\n properties: {\n ...ContentBase,\n colSizes: containerSizesArray.reduce((acc, size) => ({...acc, [size]: sizeNumber}), {}),\n centered: {\n type: 'boolean',\n },\n },\n },\n};\n"]}
|
|
@@ -207,17 +207,6 @@ export declare const ImageCard: {
|
|
|
207
207
|
};
|
|
208
208
|
};
|
|
209
209
|
} | undefined;
|
|
210
|
-
labels?: {
|
|
211
|
-
type: string;
|
|
212
|
-
items: {
|
|
213
|
-
type: string;
|
|
214
|
-
properties: {
|
|
215
|
-
when: {
|
|
216
|
-
type: string;
|
|
217
|
-
};
|
|
218
|
-
};
|
|
219
|
-
};
|
|
220
|
-
} | undefined;
|
|
221
210
|
controlPosition: {
|
|
222
211
|
type: string;
|
|
223
212
|
enum: string[];
|
|
@@ -472,17 +472,6 @@ export declare const LayoutItem: {
|
|
|
472
472
|
};
|
|
473
473
|
};
|
|
474
474
|
};
|
|
475
|
-
labels: {
|
|
476
|
-
type: string;
|
|
477
|
-
items: {
|
|
478
|
-
type: string;
|
|
479
|
-
properties: {
|
|
480
|
-
when: {
|
|
481
|
-
type: string;
|
|
482
|
-
};
|
|
483
|
-
};
|
|
484
|
-
};
|
|
485
|
-
};
|
|
486
475
|
controlPosition: {
|
|
487
476
|
type: string;
|
|
488
477
|
enum: string[];
|
|
@@ -11,7 +11,7 @@ export const LayoutItem = {
|
|
|
11
11
|
...BaseProps,
|
|
12
12
|
...CardLayoutProps,
|
|
13
13
|
media: MediaProps,
|
|
14
|
-
content: omit(ContentBase, ['colSize', '
|
|
14
|
+
content: omit(ContentBase, ['colSize', 'centered']),
|
|
15
15
|
contentMargin: {
|
|
16
16
|
type: 'string',
|
|
17
17
|
enum: ['m', 'l'],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["sub-blocks/LayoutItem/schema.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,uBAAoB;AAE/B,OAAO,QAAQ,4CAAyC;AACxD,OAAO,EAAC,SAAS,EAAE,eAAe,EAAE,UAAU,EAAC,0CAAuC;AACtF,OAAO,EAAC,oBAAoB,EAAC,yCAAsC;AACnE,OAAO,EAAC,WAAW,EAAC,6BAAwC;AAE5D,MAAM,CAAC,MAAM,UAAU,GAAG;IACtB,IAAI,EAAE,QAAQ;IACd,oBAAoB,EAAE,KAAK;IAC3B,QAAQ,EAAE,CAAC,SAAS,EAAE,OAAO,CAAC;IAC9B,UAAU,EAAE;QACR,GAAG,SAAS;QACZ,GAAG,eAAe;QAClB,KAAK,EAAE,UAAU;QACjB,OAAO,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["sub-blocks/LayoutItem/schema.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,uBAAoB;AAE/B,OAAO,QAAQ,4CAAyC;AACxD,OAAO,EAAC,SAAS,EAAE,eAAe,EAAE,UAAU,EAAC,0CAAuC;AACtF,OAAO,EAAC,oBAAoB,EAAC,yCAAsC;AACnE,OAAO,EAAC,WAAW,EAAC,6BAAwC;AAE5D,MAAM,CAAC,MAAM,UAAU,GAAG;IACtB,IAAI,EAAE,QAAQ;IACd,oBAAoB,EAAE,KAAK;IAC3B,QAAQ,EAAE,CAAC,SAAS,EAAE,OAAO,CAAC;IAC9B,UAAU,EAAE;QACR,GAAG,SAAS;QACZ,GAAG,eAAe;QAClB,KAAK,EAAE,UAAU;QACjB,OAAO,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;QACnD,aAAa,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC;YAChB,OAAO,EAAE,GAAG;SACf;QACD,QAAQ,EAAE,QAAQ;QAClB,MAAM,EAAE;YACJ,IAAI,EAAE,SAAS;SAClB;QACD,UAAU,EAAE;YACR,IAAI,EAAE,SAAS;SAClB;QACD,eAAe,EAAE;YACb,KAAK,EAAE;gBACH;oBACI,GAAG,oBAAoB;oBACvB,UAAU,EAAE,QAAQ;iBACvB;gBACD;oBACI,IAAI,EAAE,OAAO;oBACb,KAAK,EAAE,oBAAoB;oBAC3B,UAAU,EAAE,MAAM;iBACrB;aACJ;SACJ;KACJ;CACJ,CAAC","sourcesContent":["import omit from 'lodash/omit';\n\nimport metaInfo from '../../components/MetaInfo/schema';\nimport {BaseProps, CardLayoutProps, MediaProps} from '../../schema/validators/common';\nimport {AnalyticsEventSchema} from '../../schema/validators/event';\nimport {ContentBase} from '../../sub-blocks/Content/schema';\n\nexport const LayoutItem = {\n type: 'object',\n additionalProperties: false,\n required: ['content', 'media'],\n properties: {\n ...BaseProps,\n ...CardLayoutProps,\n media: MediaProps,\n content: omit(ContentBase, ['colSize', 'centered']),\n contentMargin: {\n type: 'string',\n enum: ['m', 'l'],\n default: 'm',\n },\n metaInfo: metaInfo,\n border: {\n type: 'boolean',\n },\n fullscreen: {\n type: 'boolean',\n },\n analyticsEvents: {\n oneOf: [\n {\n ...AnalyticsEventSchema,\n optionName: 'single',\n },\n {\n type: 'array',\n items: AnalyticsEventSchema,\n optionName: 'list',\n },\n ],\n },\n },\n};\n"]}
|