@gravity-ui/page-constructor 4.42.1 → 4.42.3
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/Banner/schema.d.ts +12 -0
- package/build/cjs/blocks/Companies/schema.d.ts +4 -0
- package/build/cjs/blocks/Companies/schema.js +3 -0
- package/build/cjs/blocks/Icons/schema.d.ts +18 -0
- package/build/cjs/blocks/Icons/schema.js +4 -1
- package/build/cjs/blocks/Map/schema.d.ts +9 -0
- package/build/cjs/blocks/Media/schema.d.ts +18 -0
- package/build/cjs/blocks/Media/schema.js +1 -1
- package/build/cjs/components/MediaBase/MediaBase.js +2 -2
- package/build/cjs/models/constructor-items/blocks.d.ts +1 -0
- package/build/cjs/models/constructor-items/sub-blocks.d.ts +4 -1
- package/build/cjs/schema/constants.d.ts +679 -0
- package/build/cjs/schema/constants.js +2 -1
- package/build/cjs/schema/validators/common.d.ts +8 -0
- package/build/cjs/schema/validators/common.js +4 -0
- package/build/cjs/sub-blocks/PriceCard/schema.d.ts +4 -0
- package/build/esm/blocks/Banner/schema.d.ts +12 -0
- package/build/esm/blocks/Companies/schema.d.ts +4 -0
- package/build/esm/blocks/Companies/schema.js +3 -0
- package/build/esm/blocks/Icons/schema.d.ts +18 -0
- package/build/esm/blocks/Icons/schema.js +5 -2
- package/build/esm/blocks/Map/schema.d.ts +9 -0
- package/build/esm/blocks/Media/schema.d.ts +18 -0
- package/build/esm/blocks/Media/schema.js +2 -2
- package/build/esm/components/MediaBase/MediaBase.js +2 -2
- package/build/esm/models/constructor-items/blocks.d.ts +1 -0
- package/build/esm/models/constructor-items/sub-blocks.d.ts +4 -1
- package/build/esm/schema/constants.d.ts +679 -0
- package/build/esm/schema/constants.js +3 -2
- package/build/esm/schema/validators/common.d.ts +8 -0
- package/build/esm/schema/validators/common.js +4 -0
- package/build/esm/sub-blocks/PriceCard/schema.d.ts +4 -0
- package/package.json +1 -1
- package/server/models/constructor-items/blocks.d.ts +1 -0
- package/server/models/constructor-items/sub-blocks.d.ts +4 -1
- package/widget/index.js +1 -1
|
@@ -272,6 +272,10 @@ export declare const BannerCardProps: {
|
|
|
272
272
|
type: string;
|
|
273
273
|
enum: string[];
|
|
274
274
|
};
|
|
275
|
+
width: {
|
|
276
|
+
type: string;
|
|
277
|
+
enum: string[];
|
|
278
|
+
};
|
|
275
279
|
};
|
|
276
280
|
if: {
|
|
277
281
|
properties: {
|
|
@@ -571,6 +575,10 @@ export declare const BannerBlock: {
|
|
|
571
575
|
type: string;
|
|
572
576
|
enum: string[];
|
|
573
577
|
};
|
|
578
|
+
width: {
|
|
579
|
+
type: string;
|
|
580
|
+
enum: string[];
|
|
581
|
+
};
|
|
574
582
|
};
|
|
575
583
|
if: {
|
|
576
584
|
properties: {
|
|
@@ -871,6 +879,10 @@ export declare const BannerCard: {
|
|
|
871
879
|
type: string;
|
|
872
880
|
enum: string[];
|
|
873
881
|
};
|
|
882
|
+
width: {
|
|
883
|
+
type: string;
|
|
884
|
+
enum: string[];
|
|
885
|
+
};
|
|
874
886
|
};
|
|
875
887
|
if: {
|
|
876
888
|
properties: {
|
|
@@ -9,6 +9,9 @@ exports.CompaniesBlock = {
|
|
|
9
9
|
properties: Object.assign(Object.assign(Object.assign({}, common_1.BaseProps), common_1.AnimatableProps), { title: {
|
|
10
10
|
type: 'string',
|
|
11
11
|
contentType: 'text',
|
|
12
|
+
}, description: {
|
|
13
|
+
type: 'string',
|
|
14
|
+
contentType: 'text',
|
|
12
15
|
}, images: (0, common_1.withTheme)({
|
|
13
16
|
type: 'object',
|
|
14
17
|
required: ['desktop', 'tablet', 'mobile'],
|
|
@@ -6,11 +6,20 @@ export declare const IconsProps: {
|
|
|
6
6
|
type: string;
|
|
7
7
|
contentType: string;
|
|
8
8
|
};
|
|
9
|
+
description: {
|
|
10
|
+
type: string;
|
|
11
|
+
contentType: string;
|
|
12
|
+
};
|
|
9
13
|
size: {
|
|
10
14
|
type: string;
|
|
11
15
|
enum: string[];
|
|
12
16
|
default: string;
|
|
13
17
|
};
|
|
18
|
+
colSizes: {
|
|
19
|
+
type: string;
|
|
20
|
+
additionalProperties: boolean;
|
|
21
|
+
properties: {};
|
|
22
|
+
};
|
|
14
23
|
items: {
|
|
15
24
|
type: string;
|
|
16
25
|
items: {
|
|
@@ -169,11 +178,20 @@ export declare const IconsBlock: {
|
|
|
169
178
|
type: string;
|
|
170
179
|
contentType: string;
|
|
171
180
|
};
|
|
181
|
+
description: {
|
|
182
|
+
type: string;
|
|
183
|
+
contentType: string;
|
|
184
|
+
};
|
|
172
185
|
size: {
|
|
173
186
|
type: string;
|
|
174
187
|
enum: string[];
|
|
175
188
|
default: string;
|
|
176
189
|
};
|
|
190
|
+
colSizes: {
|
|
191
|
+
type: string;
|
|
192
|
+
additionalProperties: boolean;
|
|
193
|
+
properties: {};
|
|
194
|
+
};
|
|
177
195
|
items: {
|
|
178
196
|
type: string;
|
|
179
197
|
items: {
|
|
@@ -9,11 +9,14 @@ exports.IconsProps = {
|
|
|
9
9
|
properties: Object.assign(Object.assign(Object.assign({}, common_1.BlockBaseProps), common_1.AnimatableProps), { title: {
|
|
10
10
|
type: 'string',
|
|
11
11
|
contentType: 'text',
|
|
12
|
+
}, description: {
|
|
13
|
+
type: 'string',
|
|
14
|
+
contentType: 'text',
|
|
12
15
|
}, size: {
|
|
13
16
|
type: 'string',
|
|
14
17
|
enum: ['s', 'm', 'l'],
|
|
15
18
|
default: 's',
|
|
16
|
-
}, items: {
|
|
19
|
+
}, colSizes: common_1.containerSizesObject, items: {
|
|
17
20
|
type: 'array',
|
|
18
21
|
items: {
|
|
19
22
|
type: 'object',
|
|
@@ -355,6 +355,10 @@ export declare const MapBlock: {
|
|
|
355
355
|
type: string;
|
|
356
356
|
enum: string[];
|
|
357
357
|
};
|
|
358
|
+
width: {
|
|
359
|
+
type: string;
|
|
360
|
+
enum: string[];
|
|
361
|
+
};
|
|
358
362
|
};
|
|
359
363
|
if: {
|
|
360
364
|
properties: {
|
|
@@ -370,6 +374,11 @@ export declare const MapBlock: {
|
|
|
370
374
|
required: string[];
|
|
371
375
|
};
|
|
372
376
|
};
|
|
377
|
+
mediaOnlyColSizes: {
|
|
378
|
+
type: string;
|
|
379
|
+
additionalProperties: boolean;
|
|
380
|
+
properties: {};
|
|
381
|
+
};
|
|
373
382
|
title: {
|
|
374
383
|
oneOf: ({
|
|
375
384
|
type: string;
|
|
@@ -519,6 +519,10 @@ export declare const MediaBlockBaseProps: {
|
|
|
519
519
|
type: string;
|
|
520
520
|
enum: string[];
|
|
521
521
|
};
|
|
522
|
+
width: {
|
|
523
|
+
type: string;
|
|
524
|
+
enum: string[];
|
|
525
|
+
};
|
|
522
526
|
};
|
|
523
527
|
if: {
|
|
524
528
|
properties: {
|
|
@@ -534,6 +538,11 @@ export declare const MediaBlockBaseProps: {
|
|
|
534
538
|
required: string[];
|
|
535
539
|
};
|
|
536
540
|
};
|
|
541
|
+
mediaOnlyColSizes: {
|
|
542
|
+
type: string;
|
|
543
|
+
additionalProperties: boolean;
|
|
544
|
+
properties: {};
|
|
545
|
+
};
|
|
537
546
|
title: {
|
|
538
547
|
oneOf: ({
|
|
539
548
|
type: string;
|
|
@@ -1189,6 +1198,10 @@ export declare const MediaBlock: {
|
|
|
1189
1198
|
type: string;
|
|
1190
1199
|
enum: string[];
|
|
1191
1200
|
};
|
|
1201
|
+
width: {
|
|
1202
|
+
type: string;
|
|
1203
|
+
enum: string[];
|
|
1204
|
+
};
|
|
1192
1205
|
};
|
|
1193
1206
|
if: {
|
|
1194
1207
|
properties: {
|
|
@@ -1204,6 +1217,11 @@ export declare const MediaBlock: {
|
|
|
1204
1217
|
required: string[];
|
|
1205
1218
|
};
|
|
1206
1219
|
};
|
|
1220
|
+
mediaOnlyColSizes: {
|
|
1221
|
+
type: string;
|
|
1222
|
+
additionalProperties: boolean;
|
|
1223
|
+
properties: {};
|
|
1224
|
+
};
|
|
1207
1225
|
title: {
|
|
1208
1226
|
oneOf: ({
|
|
1209
1227
|
type: string;
|
|
@@ -27,7 +27,7 @@ exports.MediaBlockBaseProps = Object.assign(Object.assign(Object.assign(Object.a
|
|
|
27
27
|
type: 'boolean',
|
|
28
28
|
}, disableShadow: {
|
|
29
29
|
type: 'boolean',
|
|
30
|
-
}, button: common_1.ButtonBlock });
|
|
30
|
+
}, button: common_1.ButtonBlock, mediaOnlyColSizes: common_1.containerSizesObject });
|
|
31
31
|
exports.MediaBlock = {
|
|
32
32
|
'media-block': {
|
|
33
33
|
additionalProperties: false,
|
|
@@ -11,7 +11,7 @@ const MediaBaseContent_1 = tslib_1.__importDefault(require("./MediaBaseContent")
|
|
|
11
11
|
const b = (0, utils_1.block)('media-base');
|
|
12
12
|
const Card = () => null;
|
|
13
13
|
const MediaBase = (props) => {
|
|
14
|
-
const { children, largeMedia, direction = 'content-media', mobileDirection = 'content-media', animated, mediaOnly, disableShadow = false, onScroll } = props, mediaContentProps = tslib_1.__rest(props, ["children", "largeMedia", "direction", "mobileDirection", "animated", "mediaOnly", "disableShadow", "onScroll"]);
|
|
14
|
+
const { children, largeMedia, direction = 'content-media', mobileDirection = 'content-media', animated, mediaOnly, disableShadow = false, onScroll, mediaOnlyColSizes = { all: 12, md: 8 } } = props, mediaContentProps = tslib_1.__rest(props, ["children", "largeMedia", "direction", "mobileDirection", "animated", "mediaOnly", "disableShadow", "onScroll", "mediaOnlyColSizes"]);
|
|
15
15
|
const { title, description } = mediaContentProps;
|
|
16
16
|
const mediaSizes = (0, react_1.useMemo)(() => {
|
|
17
17
|
return mediaOnly
|
|
@@ -24,7 +24,7 @@ const MediaBase = (props) => {
|
|
|
24
24
|
const mediaContent = !mediaOnly && react_1.default.createElement(MediaBaseContent_1.default, Object.assign({}, mediaContentProps));
|
|
25
25
|
const card = children.type === Card ? children === null || children === void 0 ? void 0 : children.props.children : null;
|
|
26
26
|
return (react_1.default.createElement(AnimateBlock_1.default, { className: b(), onScroll: onScroll, animate: animated },
|
|
27
|
-
mediaOnly && (react_1.default.createElement(Title_1.default, { className: b('header'), title: title, subtitle: description, colSizes:
|
|
27
|
+
mediaOnly && (react_1.default.createElement(Title_1.default, { className: b('header'), title: title, subtitle: description, colSizes: mediaOnlyColSizes })),
|
|
28
28
|
react_1.default.createElement(grid_1.Grid, null,
|
|
29
29
|
react_1.default.createElement(grid_1.Row, { className: b('row', {
|
|
30
30
|
reverse: direction === 'media-content',
|
|
@@ -163,6 +163,7 @@ export interface MediaBaseBlockProps extends Animatable, MediaContentProps {
|
|
|
163
163
|
largeMedia?: boolean;
|
|
164
164
|
mediaOnly?: boolean;
|
|
165
165
|
disableShadow?: boolean;
|
|
166
|
+
mediaOnlyColSizes?: GridColumnSizesType;
|
|
166
167
|
}
|
|
167
168
|
export interface MediaContentProps extends Omit<ContentBlockProps, 'colSizes' | 'text' | 'title' | 'theme' | 'centered'> {
|
|
168
169
|
title: string;
|
|
@@ -155,5 +155,8 @@ export type BannerCardModel = {
|
|
|
155
155
|
export type BasicCardModel = {
|
|
156
156
|
type: SubBlockType.BasicCard;
|
|
157
157
|
} & BasicCardProps;
|
|
158
|
-
export type
|
|
158
|
+
export type PriceCardModel = {
|
|
159
|
+
type: SubBlockType.PriceCard;
|
|
160
|
+
} & PriceCardProps;
|
|
161
|
+
export type SubBlockModels = DividerModel | QuoteModel | PriceDetailedModel | MediaCardModel | BackgroundCardModel | HubspotFormModel | BannerCardModel | BasicCardModel | PriceCardModel | LayoutItemModel;
|
|
159
162
|
export type SubBlock = SubBlockModels;
|