@gravity-ui/page-constructor 4.43.0 → 4.43.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/build/cjs/components/BlockBase/BlockBase.css +37 -0
- package/build/cjs/components/BlockBase/BlockBase.js +3 -2
- package/build/cjs/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.js +3 -4
- package/build/cjs/grid/types.d.ts +1 -0
- package/build/cjs/models/constructor-items/blocks.d.ts +5 -1
- package/build/cjs/models/constructor.d.ts +1 -6
- package/build/esm/components/BlockBase/BlockBase.css +37 -0
- package/build/esm/components/BlockBase/BlockBase.js +3 -2
- package/build/esm/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.js +3 -4
- package/build/esm/grid/types.d.ts +1 -0
- package/build/esm/models/constructor-items/blocks.d.ts +5 -1
- package/build/esm/models/constructor.d.ts +1 -6
- package/package.json +1 -1
- package/server/grid/types.d.ts +1 -0
- package/server/models/constructor-items/blocks.d.ts +5 -1
- package/server/models/constructor.d.ts +1 -6
- package/widget/index.js +1 -1
|
@@ -11,6 +11,43 @@ unpredictable css rules order in build */
|
|
|
11
11
|
margin-top: var(--pc-first-block-indent, 96px);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
+
.pc-block-base.pc-block-base.pc-block-base.pc-block-base_indentTop_0 {
|
|
15
|
+
margin-top: 0;
|
|
16
|
+
}
|
|
17
|
+
.pc-block-base.pc-block-base.pc-block-base.pc-block-base_indentTop_xs {
|
|
18
|
+
margin-top: 16px;
|
|
19
|
+
}
|
|
20
|
+
.pc-block-base.pc-block-base.pc-block-base.pc-block-base_indentTop_s {
|
|
21
|
+
margin-top: 24px;
|
|
22
|
+
}
|
|
23
|
+
.pc-block-base.pc-block-base.pc-block-base.pc-block-base_indentTop_m {
|
|
24
|
+
margin-top: 32px;
|
|
25
|
+
}
|
|
26
|
+
.pc-block-base.pc-block-base.pc-block-base.pc-block-base_indentTop_l {
|
|
27
|
+
margin-top: 48px;
|
|
28
|
+
}
|
|
29
|
+
.pc-block-base.pc-block-base.pc-block-base.pc-block-base_indentTop_xl {
|
|
30
|
+
margin-top: 64px;
|
|
31
|
+
}
|
|
32
|
+
.pc-block-base.pc-block-base.pc-block-base.pc-block-base_indentBottom_0 {
|
|
33
|
+
padding-bottom: 0;
|
|
34
|
+
}
|
|
35
|
+
.pc-block-base.pc-block-base.pc-block-base.pc-block-base_indentBottom_xs {
|
|
36
|
+
padding-bottom: 16px;
|
|
37
|
+
}
|
|
38
|
+
.pc-block-base.pc-block-base.pc-block-base.pc-block-base_indentBottom_s {
|
|
39
|
+
padding-bottom: 24px;
|
|
40
|
+
}
|
|
41
|
+
.pc-block-base.pc-block-base.pc-block-base.pc-block-base_indentBottom_m {
|
|
42
|
+
padding-bottom: 32px;
|
|
43
|
+
}
|
|
44
|
+
.pc-block-base.pc-block-base.pc-block-base.pc-block-base_indentBottom_l {
|
|
45
|
+
padding-bottom: 48px;
|
|
46
|
+
}
|
|
47
|
+
.pc-block-base.pc-block-base.pc-block-base.pc-block-base_indentBottom_xl {
|
|
48
|
+
padding-bottom: 64px;
|
|
49
|
+
}
|
|
50
|
+
|
|
14
51
|
@media only screen and (max-width: 577px) {
|
|
15
52
|
.pc-block-base.pc-block-base {
|
|
16
53
|
margin-top: 32px;
|
|
@@ -7,8 +7,9 @@ const utils_1 = require("../../utils");
|
|
|
7
7
|
const Anchor_1 = tslib_1.__importDefault(require("../Anchor/Anchor"));
|
|
8
8
|
const b = (0, utils_1.block)('block-base');
|
|
9
9
|
const BlockBase = (props) => {
|
|
10
|
-
const { anchor, visible, children, className, resetPaddings, qa } = props;
|
|
11
|
-
|
|
10
|
+
const { anchor, indent, visible, children, className, resetPaddings, qa } = props;
|
|
11
|
+
const { top, bottom } = indent || (resetPaddings ? { top: '0', bottom: '0' } : { top: 'l', bottom: 'l' });
|
|
12
|
+
return (react_1.default.createElement(grid_1.Col, { className: b({ ['reset-paddings']: resetPaddings, indentTop: top, indentBottom: bottom }, className), visible: visible, reset: true, qa: qa },
|
|
12
13
|
anchor && react_1.default.createElement(Anchor_1.default, { id: anchor.url, className: b('anchor') }),
|
|
13
14
|
children));
|
|
14
15
|
};
|
package/build/cjs/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.js
CHANGED
|
@@ -9,10 +9,9 @@ const BlockDecoration_1 = require("../../../../customization/BlockDecoration");
|
|
|
9
9
|
const utils_1 = require("../../../../utils");
|
|
10
10
|
const b = (0, utils_1.block)('constructor-block');
|
|
11
11
|
const ConstructorBlock = ({ index = 0, data, children, }) => {
|
|
12
|
-
const { type
|
|
13
|
-
const blockBaseProps = (0, react_1.useMemo)(() => (0, pick_1.default)(data, ['anchor', 'visible', 'resetPaddings']), [data]);
|
|
14
|
-
const { top, bottom } = indent || { top: 'l', bottom: 'l' };
|
|
12
|
+
const { type } = data;
|
|
13
|
+
const blockBaseProps = (0, react_1.useMemo)(() => (0, pick_1.default)(data, ['anchor', 'visible', 'resetPaddings', 'indent']), [data]);
|
|
15
14
|
return (react_1.default.createElement(BlockDecoration_1.BlockDecoration, Object.assign({ type: type, index: index }, blockBaseProps),
|
|
16
|
-
react_1.default.createElement(BlockBase_1.default, Object.assign({ className: b({ type
|
|
15
|
+
react_1.default.createElement(BlockBase_1.default, Object.assign({ className: b({ type }) }, blockBaseProps), children)));
|
|
17
16
|
};
|
|
18
17
|
exports.ConstructorBlock = ConstructorBlock;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ButtonSize } from '@gravity-ui/uikit';
|
|
3
|
-
import { GridColumnSize, GridColumnSizesType } from '../../grid/types';
|
|
3
|
+
import { GridColumnSize, GridColumnSizesType, IndentValue } from '../../grid/types';
|
|
4
4
|
import { ThemeSupporting } from '../../utils';
|
|
5
5
|
import { AnalyticsEventsBase } from '../common';
|
|
6
6
|
import { AnchorProps, Animatable, BackgroundImageProps, ButtonProps, ContentSize, ContentTextSize, ContentTheme, FileLinkProps, HeaderBreadCrumbsProps, HeaderImageSize, HeaderOffset, HeaderWidth, ImageDeviceProps, ImageProps, Justify, LegendTableMarkerType, LinkProps, MapProps, MediaDirection, MediaProps, TextSize, TextTheme, ThemedImage, ThemedMediaProps, ThemedMediaVideoProps, TitleItemBaseProps, TitleItemProps, YandexFormProps } from './common';
|
|
@@ -36,6 +36,10 @@ export interface BlockBaseProps {
|
|
|
36
36
|
visible?: GridColumnSize;
|
|
37
37
|
/** @deprecated */
|
|
38
38
|
resetPaddings?: boolean;
|
|
39
|
+
indent?: {
|
|
40
|
+
top?: IndentValue;
|
|
41
|
+
bottom?: IndentValue;
|
|
42
|
+
};
|
|
39
43
|
qa?: string;
|
|
40
44
|
}
|
|
41
45
|
export interface LoadableProps {
|
|
@@ -6,12 +6,7 @@ export interface PageData {
|
|
|
6
6
|
export interface Menu {
|
|
7
7
|
title: string;
|
|
8
8
|
}
|
|
9
|
-
export type ConstructorBlock =
|
|
10
|
-
indent?: {
|
|
11
|
-
top?: string;
|
|
12
|
-
bottom?: string;
|
|
13
|
-
};
|
|
14
|
-
};
|
|
9
|
+
export type ConstructorBlock = ConstructorItem | CustomBlock;
|
|
15
10
|
export interface PageContent extends Animatable {
|
|
16
11
|
blocks: ConstructorBlock[];
|
|
17
12
|
menu?: Menu;
|
|
@@ -11,6 +11,43 @@ unpredictable css rules order in build */
|
|
|
11
11
|
margin-top: var(--pc-first-block-indent, 96px);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
+
.pc-block-base.pc-block-base.pc-block-base.pc-block-base_indentTop_0 {
|
|
15
|
+
margin-top: 0;
|
|
16
|
+
}
|
|
17
|
+
.pc-block-base.pc-block-base.pc-block-base.pc-block-base_indentTop_xs {
|
|
18
|
+
margin-top: 16px;
|
|
19
|
+
}
|
|
20
|
+
.pc-block-base.pc-block-base.pc-block-base.pc-block-base_indentTop_s {
|
|
21
|
+
margin-top: 24px;
|
|
22
|
+
}
|
|
23
|
+
.pc-block-base.pc-block-base.pc-block-base.pc-block-base_indentTop_m {
|
|
24
|
+
margin-top: 32px;
|
|
25
|
+
}
|
|
26
|
+
.pc-block-base.pc-block-base.pc-block-base.pc-block-base_indentTop_l {
|
|
27
|
+
margin-top: 48px;
|
|
28
|
+
}
|
|
29
|
+
.pc-block-base.pc-block-base.pc-block-base.pc-block-base_indentTop_xl {
|
|
30
|
+
margin-top: 64px;
|
|
31
|
+
}
|
|
32
|
+
.pc-block-base.pc-block-base.pc-block-base.pc-block-base_indentBottom_0 {
|
|
33
|
+
padding-bottom: 0;
|
|
34
|
+
}
|
|
35
|
+
.pc-block-base.pc-block-base.pc-block-base.pc-block-base_indentBottom_xs {
|
|
36
|
+
padding-bottom: 16px;
|
|
37
|
+
}
|
|
38
|
+
.pc-block-base.pc-block-base.pc-block-base.pc-block-base_indentBottom_s {
|
|
39
|
+
padding-bottom: 24px;
|
|
40
|
+
}
|
|
41
|
+
.pc-block-base.pc-block-base.pc-block-base.pc-block-base_indentBottom_m {
|
|
42
|
+
padding-bottom: 32px;
|
|
43
|
+
}
|
|
44
|
+
.pc-block-base.pc-block-base.pc-block-base.pc-block-base_indentBottom_l {
|
|
45
|
+
padding-bottom: 48px;
|
|
46
|
+
}
|
|
47
|
+
.pc-block-base.pc-block-base.pc-block-base.pc-block-base_indentBottom_xl {
|
|
48
|
+
padding-bottom: 64px;
|
|
49
|
+
}
|
|
50
|
+
|
|
14
51
|
@media only screen and (max-width: 577px) {
|
|
15
52
|
.pc-block-base.pc-block-base {
|
|
16
53
|
margin-top: 32px;
|
|
@@ -5,8 +5,9 @@ import Anchor from '../Anchor/Anchor';
|
|
|
5
5
|
import './BlockBase.css';
|
|
6
6
|
const b = block('block-base');
|
|
7
7
|
const BlockBase = (props) => {
|
|
8
|
-
const { anchor, visible, children, className, resetPaddings, qa } = props;
|
|
9
|
-
|
|
8
|
+
const { anchor, indent, visible, children, className, resetPaddings, qa } = props;
|
|
9
|
+
const { top, bottom } = indent || (resetPaddings ? { top: '0', bottom: '0' } : { top: 'l', bottom: 'l' });
|
|
10
|
+
return (React.createElement(Col, { className: b({ ['reset-paddings']: resetPaddings, indentTop: top, indentBottom: bottom }, className), visible: visible, reset: true, qa: qa },
|
|
10
11
|
anchor && React.createElement(Anchor, { id: anchor.url, className: b('anchor') }),
|
|
11
12
|
children));
|
|
12
13
|
};
|
package/build/esm/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.js
CHANGED
|
@@ -6,9 +6,8 @@ import { block } from '../../../../utils';
|
|
|
6
6
|
import './ConstructorBlock.css';
|
|
7
7
|
const b = block('constructor-block');
|
|
8
8
|
export const ConstructorBlock = ({ index = 0, data, children, }) => {
|
|
9
|
-
const { type
|
|
10
|
-
const blockBaseProps = useMemo(() => pick(data, ['anchor', 'visible', 'resetPaddings']), [data]);
|
|
11
|
-
const { top, bottom } = indent || { top: 'l', bottom: 'l' };
|
|
9
|
+
const { type } = data;
|
|
10
|
+
const blockBaseProps = useMemo(() => pick(data, ['anchor', 'visible', 'resetPaddings', 'indent']), [data]);
|
|
12
11
|
return (React.createElement(BlockDecoration, Object.assign({ type: type, index: index }, blockBaseProps),
|
|
13
|
-
React.createElement(BlockBase, Object.assign({ className: b({ type
|
|
12
|
+
React.createElement(BlockBase, Object.assign({ className: b({ type }) }, blockBaseProps), children)));
|
|
14
13
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ButtonSize } from '@gravity-ui/uikit';
|
|
3
|
-
import { GridColumnSize, GridColumnSizesType } from '../../grid/types';
|
|
3
|
+
import { GridColumnSize, GridColumnSizesType, IndentValue } from '../../grid/types';
|
|
4
4
|
import { ThemeSupporting } from '../../utils';
|
|
5
5
|
import { AnalyticsEventsBase } from '../common';
|
|
6
6
|
import { AnchorProps, Animatable, BackgroundImageProps, ButtonProps, ContentSize, ContentTextSize, ContentTheme, FileLinkProps, HeaderBreadCrumbsProps, HeaderImageSize, HeaderOffset, HeaderWidth, ImageDeviceProps, ImageProps, Justify, LegendTableMarkerType, LinkProps, MapProps, MediaDirection, MediaProps, TextSize, TextTheme, ThemedImage, ThemedMediaProps, ThemedMediaVideoProps, TitleItemBaseProps, TitleItemProps, YandexFormProps } from './common';
|
|
@@ -36,6 +36,10 @@ export interface BlockBaseProps {
|
|
|
36
36
|
visible?: GridColumnSize;
|
|
37
37
|
/** @deprecated */
|
|
38
38
|
resetPaddings?: boolean;
|
|
39
|
+
indent?: {
|
|
40
|
+
top?: IndentValue;
|
|
41
|
+
bottom?: IndentValue;
|
|
42
|
+
};
|
|
39
43
|
qa?: string;
|
|
40
44
|
}
|
|
41
45
|
export interface LoadableProps {
|
|
@@ -6,12 +6,7 @@ export interface PageData {
|
|
|
6
6
|
export interface Menu {
|
|
7
7
|
title: string;
|
|
8
8
|
}
|
|
9
|
-
export type ConstructorBlock =
|
|
10
|
-
indent?: {
|
|
11
|
-
top?: string;
|
|
12
|
-
bottom?: string;
|
|
13
|
-
};
|
|
14
|
-
};
|
|
9
|
+
export type ConstructorBlock = ConstructorItem | CustomBlock;
|
|
15
10
|
export interface PageContent extends Animatable {
|
|
16
11
|
blocks: ConstructorBlock[];
|
|
17
12
|
menu?: Menu;
|
package/package.json
CHANGED
package/server/grid/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ButtonSize } from '@gravity-ui/uikit';
|
|
3
|
-
import { GridColumnSize, GridColumnSizesType } from '../../grid/types';
|
|
3
|
+
import { GridColumnSize, GridColumnSizesType, IndentValue } from '../../grid/types';
|
|
4
4
|
import { ThemeSupporting } from '../../utils';
|
|
5
5
|
import { AnalyticsEventsBase } from '../common';
|
|
6
6
|
import { AnchorProps, Animatable, BackgroundImageProps, ButtonProps, ContentSize, ContentTextSize, ContentTheme, FileLinkProps, HeaderBreadCrumbsProps, HeaderImageSize, HeaderOffset, HeaderWidth, ImageDeviceProps, ImageProps, Justify, LegendTableMarkerType, LinkProps, MapProps, MediaDirection, MediaProps, TextSize, TextTheme, ThemedImage, ThemedMediaProps, ThemedMediaVideoProps, TitleItemBaseProps, TitleItemProps, YandexFormProps } from './common';
|
|
@@ -36,6 +36,10 @@ export interface BlockBaseProps {
|
|
|
36
36
|
visible?: GridColumnSize;
|
|
37
37
|
/** @deprecated */
|
|
38
38
|
resetPaddings?: boolean;
|
|
39
|
+
indent?: {
|
|
40
|
+
top?: IndentValue;
|
|
41
|
+
bottom?: IndentValue;
|
|
42
|
+
};
|
|
39
43
|
qa?: string;
|
|
40
44
|
}
|
|
41
45
|
export interface LoadableProps {
|
|
@@ -6,12 +6,7 @@ export interface PageData {
|
|
|
6
6
|
export interface Menu {
|
|
7
7
|
title: string;
|
|
8
8
|
}
|
|
9
|
-
export type ConstructorBlock =
|
|
10
|
-
indent?: {
|
|
11
|
-
top?: string;
|
|
12
|
-
bottom?: string;
|
|
13
|
-
};
|
|
14
|
-
};
|
|
9
|
+
export type ConstructorBlock = ConstructorItem | CustomBlock;
|
|
15
10
|
export interface PageContent extends Animatable {
|
|
16
11
|
blocks: ConstructorBlock[];
|
|
17
12
|
menu?: Menu;
|