@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
|
@@ -4,7 +4,7 @@ exports.constructorCardSchemaNames = exports.constructorBlockSchemaNames = expor
|
|
|
4
4
|
const blocks_1 = require("./validators/blocks");
|
|
5
5
|
const sub_blocks_1 = require("./validators/sub-blocks");
|
|
6
6
|
exports.blockSchemas = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, sub_blocks_1.Divider), blocks_1.ExtendedFeaturesBlock), blocks_1.PromoFeaturesBlock), blocks_1.SliderBlock), blocks_1.QuestionsBlock), blocks_1.HeaderBlock), blocks_1.BannerBlock), blocks_1.CompaniesBlock), blocks_1.MediaBlock), blocks_1.MapBlock), blocks_1.InfoBlock), blocks_1.TableBlock), blocks_1.TabsBlock), blocks_1.HeaderSliderBlock), blocks_1.IconsBlock), blocks_1.CardLayoutBlock), blocks_1.ContentLayoutBlock), blocks_1.ShareBlock), blocks_1.FilterBlock), blocks_1.FormBlock);
|
|
7
|
-
exports.cardSchemas = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, sub_blocks_1.MediaCardBlock), blocks_1.BannerCard), sub_blocks_1.PriceDetailedBlock), sub_blocks_1.BackgroundCard), sub_blocks_1.Quote), sub_blocks_1.BasicCard);
|
|
7
|
+
exports.cardSchemas = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, sub_blocks_1.MediaCardBlock), blocks_1.BannerCard), sub_blocks_1.PriceDetailedBlock), sub_blocks_1.BackgroundCard), sub_blocks_1.Quote), sub_blocks_1.BasicCard), sub_blocks_1.PriceCardBlock);
|
|
8
8
|
exports.constructorBlockSchemaNames = [
|
|
9
9
|
'divider',
|
|
10
10
|
'quote',
|
|
@@ -40,4 +40,5 @@ exports.constructorCardSchemaNames = [
|
|
|
40
40
|
'quote',
|
|
41
41
|
'basic-card',
|
|
42
42
|
'layout-item',
|
|
43
|
+
'price-card',
|
|
43
44
|
];
|
|
@@ -768,6 +768,10 @@ export declare const ButtonProps: {
|
|
|
768
768
|
type: string;
|
|
769
769
|
enum: string[];
|
|
770
770
|
};
|
|
771
|
+
width: {
|
|
772
|
+
type: string;
|
|
773
|
+
enum: string[];
|
|
774
|
+
};
|
|
771
775
|
};
|
|
772
776
|
export declare const MenuProps: {
|
|
773
777
|
type: string;
|
|
@@ -1107,6 +1111,10 @@ export declare const ButtonBlock: {
|
|
|
1107
1111
|
type: string;
|
|
1108
1112
|
enum: string[];
|
|
1109
1113
|
};
|
|
1114
|
+
width: {
|
|
1115
|
+
type: string;
|
|
1116
|
+
enum: string[];
|
|
1117
|
+
};
|
|
1110
1118
|
};
|
|
1111
1119
|
if: {
|
|
1112
1120
|
properties: {
|
|
@@ -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: {
|
|
@@ -6,6 +6,9 @@ export const CompaniesBlock = {
|
|
|
6
6
|
properties: Object.assign(Object.assign(Object.assign({}, BaseProps), AnimatableProps), { title: {
|
|
7
7
|
type: 'string',
|
|
8
8
|
contentType: 'text',
|
|
9
|
+
}, description: {
|
|
10
|
+
type: 'string',
|
|
11
|
+
contentType: 'text',
|
|
9
12
|
}, images: withTheme({
|
|
10
13
|
type: 'object',
|
|
11
14
|
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: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnimatableProps, BlockBaseProps } from '../../schema/validators/common';
|
|
1
|
+
import { AnimatableProps, BlockBaseProps, containerSizesObject, } from '../../schema/validators/common';
|
|
2
2
|
import { AnalyticsEventSchema } from '../../schema/validators/event';
|
|
3
3
|
export const IconsProps = {
|
|
4
4
|
additionalProperties: false,
|
|
@@ -6,11 +6,14 @@ export const IconsProps = {
|
|
|
6
6
|
properties: Object.assign(Object.assign(Object.assign({}, BlockBaseProps), AnimatableProps), { title: {
|
|
7
7
|
type: 'string',
|
|
8
8
|
contentType: 'text',
|
|
9
|
+
}, description: {
|
|
10
|
+
type: 'string',
|
|
11
|
+
contentType: 'text',
|
|
9
12
|
}, size: {
|
|
10
13
|
type: 'string',
|
|
11
14
|
enum: ['s', 'm', 'l'],
|
|
12
15
|
default: 's',
|
|
13
|
-
}, items: {
|
|
16
|
+
}, colSizes: containerSizesObject, items: {
|
|
14
17
|
type: 'array',
|
|
15
18
|
items: {
|
|
16
19
|
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;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import omit from 'lodash/omit';
|
|
2
|
-
import { AnimatableProps, BlockBaseProps, ButtonBlock, MediaProps, mediaDirection, withTheme, } from '../../schema/validators/common';
|
|
2
|
+
import { AnimatableProps, BlockBaseProps, ButtonBlock, MediaProps, containerSizesObject, mediaDirection, withTheme, } from '../../schema/validators/common';
|
|
3
3
|
import { ContentBase } from '../../sub-blocks/Content/schema';
|
|
4
4
|
export const Media = {
|
|
5
5
|
type: 'object',
|
|
@@ -23,7 +23,7 @@ export const MediaBlockBaseProps = Object.assign(Object.assign(Object.assign(Obj
|
|
|
23
23
|
type: 'boolean',
|
|
24
24
|
}, disableShadow: {
|
|
25
25
|
type: 'boolean',
|
|
26
|
-
}, button: ButtonBlock });
|
|
26
|
+
}, button: ButtonBlock, mediaOnlyColSizes: containerSizesObject });
|
|
27
27
|
export const MediaBlock = {
|
|
28
28
|
'media-block': {
|
|
29
29
|
additionalProperties: false,
|
|
@@ -9,7 +9,7 @@ import './MediaBase.css';
|
|
|
9
9
|
const b = block('media-base');
|
|
10
10
|
const Card = () => null;
|
|
11
11
|
export const MediaBase = (props) => {
|
|
12
|
-
const { children, largeMedia, direction = 'content-media', mobileDirection = 'content-media', animated, mediaOnly, disableShadow = false, onScroll } = props, mediaContentProps = __rest(props, ["children", "largeMedia", "direction", "mobileDirection", "animated", "mediaOnly", "disableShadow", "onScroll"]);
|
|
12
|
+
const { children, largeMedia, direction = 'content-media', mobileDirection = 'content-media', animated, mediaOnly, disableShadow = false, onScroll, mediaOnlyColSizes = { all: 12, md: 8 } } = props, mediaContentProps = __rest(props, ["children", "largeMedia", "direction", "mobileDirection", "animated", "mediaOnly", "disableShadow", "onScroll", "mediaOnlyColSizes"]);
|
|
13
13
|
const { title, description } = mediaContentProps;
|
|
14
14
|
const mediaSizes = useMemo(() => {
|
|
15
15
|
return mediaOnly
|
|
@@ -22,7 +22,7 @@ export const MediaBase = (props) => {
|
|
|
22
22
|
const mediaContent = !mediaOnly && React.createElement(MediaContent, Object.assign({}, mediaContentProps));
|
|
23
23
|
const card = children.type === Card ? children === null || children === void 0 ? void 0 : children.props.children : null;
|
|
24
24
|
return (React.createElement(AnimateBlock, { className: b(), onScroll: onScroll, animate: animated },
|
|
25
|
-
mediaOnly && (React.createElement(Title, { className: b('header'), title: title, subtitle: description, colSizes:
|
|
25
|
+
mediaOnly && (React.createElement(Title, { className: b('header'), title: title, subtitle: description, colSizes: mediaOnlyColSizes })),
|
|
26
26
|
React.createElement(Grid, null,
|
|
27
27
|
React.createElement(Row, { className: b('row', {
|
|
28
28
|
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;
|