@doyourjob/gravity-ui-page-constructor 5.31.150 → 5.31.152
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/build/cjs/blocks/Form/Form.css +3 -0
- package/build/cjs/blocks/Form/Form.js +4 -1
- package/build/cjs/blocks/Table/Table.css +3 -0
- package/build/cjs/blocks/Table/Table.js +16 -2
- package/build/cjs/blocks/Table/schema.d.ts +4 -0
- package/build/cjs/blocks/Table/schema.js +3 -0
- package/build/cjs/models/constructor-items/blocks.d.ts +2 -1
- package/build/esm/blocks/Form/Form.css +3 -0
- package/build/esm/blocks/Form/Form.js +4 -1
- package/build/esm/blocks/Table/Table.css +3 -0
- package/build/esm/blocks/Table/Table.js +16 -2
- package/build/esm/blocks/Table/schema.d.ts +4 -0
- package/build/esm/blocks/Table/schema.js +4 -1
- package/build/esm/models/constructor-items/blocks.d.ts +2 -1
- package/package.json +1 -1
- package/schema/index.js +1 -1
- package/server/models/constructor-items/blocks.d.ts +2 -1
- package/widget/index.js +1 -1
|
@@ -14,6 +14,9 @@ unpredictable css rules order in build */
|
|
|
14
14
|
.pc-form-block__title_mobile {
|
|
15
15
|
margin-left: 4px;
|
|
16
16
|
}
|
|
17
|
+
.pc-form-block__title_centered {
|
|
18
|
+
text-align: center;
|
|
19
|
+
}
|
|
17
20
|
.pc-form-block__full-form {
|
|
18
21
|
background-color: var(--g-color-base-background);
|
|
19
22
|
padding: 48px 64px 48px calc(64px - 10px);
|
|
@@ -82,7 +82,10 @@ const FormBlock = (props) => {
|
|
|
82
82
|
innerTitle && (react_1.default.createElement(components_1.Title, { title: {
|
|
83
83
|
text: innerTitle,
|
|
84
84
|
textSize: 's',
|
|
85
|
-
}, className: b('title', {
|
|
85
|
+
}, className: b('title', {
|
|
86
|
+
mobile: isMobile,
|
|
87
|
+
centered: direction === models_1.FormBlockDirection.Center,
|
|
88
|
+
}), colSizes: { all: 12 } })),
|
|
86
89
|
react_1.default.createElement(sub_blocks_1.Content, Object.assign({}, textFormContent, { theme: "default", centered: direction === models_1.FormBlockDirection.Center, colSizes: { all: 12 }, className: b('content') })),
|
|
87
90
|
data && (react_1.default.createElement(InnerForm_1.default, { className: b('form'), formData: data, onContentLoad: onContentLoad })))))))));
|
|
88
91
|
};
|
|
@@ -10,8 +10,22 @@ const utils_1 = require("../../utils");
|
|
|
10
10
|
const b = (0, utils_1.block)('table-block');
|
|
11
11
|
const bTable = (0, utils_1.block)('table');
|
|
12
12
|
const bScrollbar = (0, utils_1.block)('table-scrollbar');
|
|
13
|
+
function getTitleVariant(titleSize) {
|
|
14
|
+
switch (titleSize) {
|
|
15
|
+
case 'xs':
|
|
16
|
+
return 'header-1';
|
|
17
|
+
case 's':
|
|
18
|
+
return 'header-2';
|
|
19
|
+
case 'l':
|
|
20
|
+
case 'xl':
|
|
21
|
+
return 'display-3';
|
|
22
|
+
case 'm':
|
|
23
|
+
default:
|
|
24
|
+
return 'display-2';
|
|
25
|
+
}
|
|
26
|
+
}
|
|
13
27
|
const TableBlock = (props) => {
|
|
14
|
-
const { title, table, description, links = [], buttons = [] } = props;
|
|
28
|
+
const { title, titleSize, table, description, links = [], buttons = [] } = props;
|
|
15
29
|
const tableRef = (0, react_1.useRef)(null);
|
|
16
30
|
(0, react_1.useEffect)(() => {
|
|
17
31
|
var _a;
|
|
@@ -43,7 +57,7 @@ const TableBlock = (props) => {
|
|
|
43
57
|
react_1.default.createElement(grid_1.Grid, { className: b('content') },
|
|
44
58
|
react_1.default.createElement(grid_1.Row, { className: b('row') },
|
|
45
59
|
react_1.default.createElement(grid_1.Col, { className: b('lhs'), sizes: { [grid_1.GridColumnSize.Md]: 3, [grid_1.GridColumnSize.All]: 12 }, alignSelf: grid_1.GridColumnAlignSelf.Start },
|
|
46
|
-
react_1.default.createElement(uikit_1.Text, { variant:
|
|
60
|
+
react_1.default.createElement(uikit_1.Text, { variant: getTitleVariant(titleSize) }, title),
|
|
47
61
|
description && (react_1.default.createElement("div", { className: b('description') },
|
|
48
62
|
react_1.default.createElement(uikit_1.Text, { variant: "body-2" },
|
|
49
63
|
react_1.default.createElement(components_1.HTML, null, description)))),
|
|
@@ -10,6 +10,9 @@ exports.TableBlock = {
|
|
|
10
10
|
properties: Object.assign(Object.assign({}, common_1.BlockBaseProps), { title: {
|
|
11
11
|
type: 'string',
|
|
12
12
|
contentType: 'text',
|
|
13
|
+
}, titleSize: {
|
|
14
|
+
type: 'string',
|
|
15
|
+
enum: common_1.titleTextSize,
|
|
13
16
|
}, description: {
|
|
14
17
|
type: 'string',
|
|
15
18
|
}, links: (0, utils_1.filteredArray)(common_1.LinkProps), buttons: (0, utils_1.filteredArray)(common_1.ButtonBlock), table: {
|
|
@@ -3,7 +3,7 @@ import { ButtonSize } from '@gravity-ui/uikit';
|
|
|
3
3
|
import { GridColumnSize, GridColumnSizesType, IndentValue } from '../../grid/types';
|
|
4
4
|
import { BlockBackgroundType, ThemeSupporting } from '../../utils';
|
|
5
5
|
import { AnalyticsEventsBase } from '../common';
|
|
6
|
-
import { AnchorProps, Animatable, BackgroundImageProps, ButtonProps, CardBorder, ContentSize, ContentTextSize, ContentTheme, FileLinkProps, HeaderBreadCrumbsProps, HeaderImageSize, HeaderOffset, HeaderWidth, ImageDeviceProps, ImageProps, Justify, LegendTableMarkerType, LinkProps, MapProps, MediaDirection, MediaProps, MediaView, ReportFileType, TagProps, TextSize, TextTheme, Themable, ThemedImage, ThemedMediaProps, ThemedMediaVideoProps, TitleItemBaseProps, TitleItemProps, WithBorder, YandexFormProps } from './common';
|
|
6
|
+
import { AnchorProps, Animatable, BackgroundImageProps, ButtonProps, CardBorder, ContentSize, ContentTextSize, ContentTheme, FileLinkProps, HeaderBreadCrumbsProps, HeaderImageSize, HeaderOffset, HeaderWidth, ImageDeviceProps, ImageProps, Justify, LegendTableMarkerType, LinkProps, MapProps, MediaDirection, MediaProps, MediaView, ReportFileType, TagProps, TextSize, TextTheme, Themable, ThemedImage, ThemedMediaProps, ThemedMediaVideoProps, TitleItemBaseProps, TitleItemProps, TitleTextSize, WithBorder, YandexFormProps } from './common';
|
|
7
7
|
import { BannerCardProps, HubspotFormProps, SubBlock, SubBlockModels } from './sub-blocks';
|
|
8
8
|
export declare enum BlockType {
|
|
9
9
|
AdvantagesBlock = "advantages-block",
|
|
@@ -394,6 +394,7 @@ export interface TableBlockProps {
|
|
|
394
394
|
description?: string;
|
|
395
395
|
links?: LinkProps[];
|
|
396
396
|
buttons?: ButtonProps[];
|
|
397
|
+
titleSize?: TitleTextSize;
|
|
397
398
|
}
|
|
398
399
|
export interface FormWallBlockProps {
|
|
399
400
|
formData: FormBlockHubspotData;
|
|
@@ -14,6 +14,9 @@ unpredictable css rules order in build */
|
|
|
14
14
|
.pc-form-block__title_mobile {
|
|
15
15
|
margin-left: 4px;
|
|
16
16
|
}
|
|
17
|
+
.pc-form-block__title_centered {
|
|
18
|
+
text-align: center;
|
|
19
|
+
}
|
|
17
20
|
.pc-form-block__full-form {
|
|
18
21
|
background-color: var(--g-color-base-background);
|
|
19
22
|
padding: 48px 64px 48px calc(64px - 10px);
|
|
@@ -80,7 +80,10 @@ const FormBlock = (props) => {
|
|
|
80
80
|
innerTitle && (React.createElement(Title, { title: {
|
|
81
81
|
text: innerTitle,
|
|
82
82
|
textSize: 's',
|
|
83
|
-
}, className: b('title', {
|
|
83
|
+
}, className: b('title', {
|
|
84
|
+
mobile: isMobile,
|
|
85
|
+
centered: direction === FormBlockDirection.Center,
|
|
86
|
+
}), colSizes: { all: 12 } })),
|
|
84
87
|
React.createElement(Content, Object.assign({}, textFormContent, { theme: "default", centered: direction === FormBlockDirection.Center, colSizes: { all: 12 }, className: b('content') })),
|
|
85
88
|
data && (React.createElement(InnerForm, { className: b('form'), formData: data, onContentLoad: onContentLoad })))))))));
|
|
86
89
|
};
|
|
@@ -7,8 +7,22 @@ import './Table.css';
|
|
|
7
7
|
const b = block('table-block');
|
|
8
8
|
const bTable = block('table');
|
|
9
9
|
const bScrollbar = block('table-scrollbar');
|
|
10
|
+
function getTitleVariant(titleSize) {
|
|
11
|
+
switch (titleSize) {
|
|
12
|
+
case 'xs':
|
|
13
|
+
return 'header-1';
|
|
14
|
+
case 's':
|
|
15
|
+
return 'header-2';
|
|
16
|
+
case 'l':
|
|
17
|
+
case 'xl':
|
|
18
|
+
return 'display-3';
|
|
19
|
+
case 'm':
|
|
20
|
+
default:
|
|
21
|
+
return 'display-2';
|
|
22
|
+
}
|
|
23
|
+
}
|
|
10
24
|
export const TableBlock = (props) => {
|
|
11
|
-
const { title, table, description, links = [], buttons = [] } = props;
|
|
25
|
+
const { title, titleSize, table, description, links = [], buttons = [] } = props;
|
|
12
26
|
const tableRef = useRef(null);
|
|
13
27
|
useEffect(() => {
|
|
14
28
|
var _a;
|
|
@@ -40,7 +54,7 @@ export const TableBlock = (props) => {
|
|
|
40
54
|
React.createElement(Grid, { className: b('content') },
|
|
41
55
|
React.createElement(Row, { className: b('row') },
|
|
42
56
|
React.createElement(Col, { className: b('lhs'), sizes: { [GridColumnSize.Md]: 3, [GridColumnSize.All]: 12 }, alignSelf: GridColumnAlignSelf.Start },
|
|
43
|
-
React.createElement(Text, { variant:
|
|
57
|
+
React.createElement(Text, { variant: getTitleVariant(titleSize) }, title),
|
|
44
58
|
description && (React.createElement("div", { className: b('description') },
|
|
45
59
|
React.createElement(Text, { variant: "body-2" },
|
|
46
60
|
React.createElement(HTML, null, description)))),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseProps, BlockBaseProps, ButtonBlock, JustifyProps, LinkProps, } from '../../schema/validators/common';
|
|
1
|
+
import { BaseProps, BlockBaseProps, ButtonBlock, JustifyProps, LinkProps, titleTextSize, } from '../../schema/validators/common';
|
|
2
2
|
import { filteredArray } from '../../schema/validators/utils';
|
|
3
3
|
export const TableBlock = {
|
|
4
4
|
'table-block': {
|
|
@@ -7,6 +7,9 @@ export const TableBlock = {
|
|
|
7
7
|
properties: Object.assign(Object.assign({}, BlockBaseProps), { title: {
|
|
8
8
|
type: 'string',
|
|
9
9
|
contentType: 'text',
|
|
10
|
+
}, titleSize: {
|
|
11
|
+
type: 'string',
|
|
12
|
+
enum: titleTextSize,
|
|
10
13
|
}, description: {
|
|
11
14
|
type: 'string',
|
|
12
15
|
}, links: filteredArray(LinkProps), buttons: filteredArray(ButtonBlock), table: {
|
|
@@ -3,7 +3,7 @@ import { ButtonSize } from '@gravity-ui/uikit';
|
|
|
3
3
|
import { GridColumnSize, GridColumnSizesType, IndentValue } from '../../grid/types';
|
|
4
4
|
import { BlockBackgroundType, ThemeSupporting } from '../../utils';
|
|
5
5
|
import { AnalyticsEventsBase } from '../common';
|
|
6
|
-
import { AnchorProps, Animatable, BackgroundImageProps, ButtonProps, CardBorder, ContentSize, ContentTextSize, ContentTheme, FileLinkProps, HeaderBreadCrumbsProps, HeaderImageSize, HeaderOffset, HeaderWidth, ImageDeviceProps, ImageProps, Justify, LegendTableMarkerType, LinkProps, MapProps, MediaDirection, MediaProps, MediaView, ReportFileType, TagProps, TextSize, TextTheme, Themable, ThemedImage, ThemedMediaProps, ThemedMediaVideoProps, TitleItemBaseProps, TitleItemProps, WithBorder, YandexFormProps } from './common';
|
|
6
|
+
import { AnchorProps, Animatable, BackgroundImageProps, ButtonProps, CardBorder, ContentSize, ContentTextSize, ContentTheme, FileLinkProps, HeaderBreadCrumbsProps, HeaderImageSize, HeaderOffset, HeaderWidth, ImageDeviceProps, ImageProps, Justify, LegendTableMarkerType, LinkProps, MapProps, MediaDirection, MediaProps, MediaView, ReportFileType, TagProps, TextSize, TextTheme, Themable, ThemedImage, ThemedMediaProps, ThemedMediaVideoProps, TitleItemBaseProps, TitleItemProps, TitleTextSize, WithBorder, YandexFormProps } from './common';
|
|
7
7
|
import { BannerCardProps, HubspotFormProps, SubBlock, SubBlockModels } from './sub-blocks';
|
|
8
8
|
export declare enum BlockType {
|
|
9
9
|
AdvantagesBlock = "advantages-block",
|
|
@@ -394,6 +394,7 @@ export interface TableBlockProps {
|
|
|
394
394
|
description?: string;
|
|
395
395
|
links?: LinkProps[];
|
|
396
396
|
buttons?: ButtonProps[];
|
|
397
|
+
titleSize?: TitleTextSize;
|
|
397
398
|
}
|
|
398
399
|
export interface FormWallBlockProps {
|
|
399
400
|
formData: FormBlockHubspotData;
|