@gravity-ui/page-constructor 4.42.2 → 4.42.4

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.
Files changed (32) hide show
  1. package/build/cjs/blocks/Banner/schema.d.ts +12 -0
  2. package/build/cjs/blocks/Form/Form.css +1 -0
  3. package/build/cjs/blocks/Map/schema.d.ts +9 -0
  4. package/build/cjs/blocks/Media/schema.d.ts +18 -0
  5. package/build/cjs/blocks/Media/schema.js +1 -1
  6. package/build/cjs/components/MediaBase/MediaBase.js +2 -2
  7. package/build/cjs/models/constructor-items/blocks.d.ts +1 -0
  8. package/build/cjs/models/constructor-items/sub-blocks.d.ts +4 -1
  9. package/build/cjs/schema/constants.d.ts +413 -0
  10. package/build/cjs/schema/constants.js +2 -1
  11. package/build/cjs/schema/validators/common.d.ts +8 -0
  12. package/build/cjs/schema/validators/common.js +4 -0
  13. package/build/cjs/sub-blocks/PriceCard/schema.d.ts +8 -270
  14. package/build/cjs/sub-blocks/PriceCard/schema.js +2 -1
  15. package/build/esm/blocks/Banner/schema.d.ts +12 -0
  16. package/build/esm/blocks/Form/Form.css +1 -0
  17. package/build/esm/blocks/Map/schema.d.ts +9 -0
  18. package/build/esm/blocks/Media/schema.d.ts +18 -0
  19. package/build/esm/blocks/Media/schema.js +2 -2
  20. package/build/esm/components/MediaBase/MediaBase.js +2 -2
  21. package/build/esm/models/constructor-items/blocks.d.ts +1 -0
  22. package/build/esm/models/constructor-items/sub-blocks.d.ts +4 -1
  23. package/build/esm/schema/constants.d.ts +413 -0
  24. package/build/esm/schema/constants.js +3 -2
  25. package/build/esm/schema/validators/common.d.ts +8 -0
  26. package/build/esm/schema/validators/common.js +4 -0
  27. package/build/esm/sub-blocks/PriceCard/schema.d.ts +8 -270
  28. package/build/esm/sub-blocks/PriceCard/schema.js +3 -2
  29. package/package.json +1 -1
  30. package/server/models/constructor-items/blocks.d.ts +1 -0
  31. package/server/models/constructor-items/sub-blocks.d.ts +4 -1
  32. 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: {
@@ -27,6 +27,7 @@ unpredictable css rules order in build */
27
27
  height: 100%;
28
28
  width: 100%;
29
29
  object-fit: cover;
30
+ object-position: top;
30
31
  }
31
32
  .pc-form-block__row_direction_form-content {
32
33
  flex-direction: row-reverse;
@@ -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: { all: 12 } })),
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 SubBlockModels = DividerModel | QuoteModel | PriceDetailedModel | MediaCardModel | BackgroundCardModel | HubspotFormModel | BannerCardModel | BasicCardModel | LayoutItemModel;
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;
@@ -1,6 +1,415 @@
1
1
  import { BlockType } from '../models';
2
2
  export declare const blockSchemas: Record<BlockType, object>;
3
3
  export declare const cardSchemas: {
4
+ 'price-card': {
5
+ additionalProperties: boolean;
6
+ required: string[];
7
+ properties: {
8
+ theme: {
9
+ type: string;
10
+ enum: string[];
11
+ };
12
+ title: {
13
+ type: string;
14
+ };
15
+ price: {
16
+ type: string;
17
+ };
18
+ pricePeriod: {
19
+ type: string;
20
+ };
21
+ priceDetails: {
22
+ type: string;
23
+ };
24
+ description: {
25
+ type: string;
26
+ };
27
+ buttons: {
28
+ type: string;
29
+ items: {
30
+ type: string;
31
+ additionalProperties: boolean;
32
+ properties: {
33
+ text: {
34
+ type: string;
35
+ contentType: string;
36
+ };
37
+ url: {
38
+ type: string;
39
+ };
40
+ urlTitle: {
41
+ type: string;
42
+ };
43
+ primary: {
44
+ type: string;
45
+ };
46
+ size: {
47
+ type: string;
48
+ enum: string[];
49
+ };
50
+ theme: {
51
+ type: string;
52
+ enum: string[];
53
+ };
54
+ img: {
55
+ oneOf: ({
56
+ type: string;
57
+ optionName: string;
58
+ additionalProperties?: undefined;
59
+ required?: undefined;
60
+ properties?: undefined;
61
+ } | {
62
+ type: string;
63
+ additionalProperties: boolean;
64
+ required: string[];
65
+ properties: {
66
+ data: {
67
+ type: string;
68
+ };
69
+ position: {
70
+ type: string;
71
+ enum: string[];
72
+ };
73
+ alt: {
74
+ type: string;
75
+ contentType: string;
76
+ };
77
+ };
78
+ optionName: string;
79
+ })[];
80
+ };
81
+ metrikaGoals: {
82
+ oneOf: ({
83
+ type: string;
84
+ optionName: string;
85
+ items?: undefined;
86
+ } | {
87
+ type: string;
88
+ items: {
89
+ type: string;
90
+ additionalProperties?: undefined;
91
+ required?: undefined;
92
+ properties?: undefined;
93
+ };
94
+ optionName: string;
95
+ } | {
96
+ type: string;
97
+ items: {
98
+ type: string;
99
+ additionalProperties: boolean;
100
+ required: string[];
101
+ properties: {
102
+ name: {
103
+ type: string;
104
+ };
105
+ isCrossSite: {
106
+ type: string;
107
+ };
108
+ };
109
+ };
110
+ optionName: string;
111
+ })[];
112
+ };
113
+ pixelEvents: {
114
+ type: string;
115
+ items: {
116
+ type: string;
117
+ required: string[];
118
+ additionalProperties: boolean;
119
+ properties: {
120
+ name: {
121
+ type: string;
122
+ enum: import("../models").PixelEventType[];
123
+ };
124
+ data: {};
125
+ };
126
+ select: {
127
+ $data: string;
128
+ };
129
+ selectCases: {
130
+ SubmitApplication: {
131
+ additionalProperties: boolean;
132
+ properties: {
133
+ name: {};
134
+ };
135
+ };
136
+ Contact: {
137
+ additionalProperties: boolean;
138
+ properties: {
139
+ name: {};
140
+ };
141
+ };
142
+ Lead: {
143
+ additionalProperties: boolean;
144
+ properties: {
145
+ name: {};
146
+ data: {
147
+ type: string;
148
+ additionalProperties: boolean;
149
+ properties: {
150
+ content_category: {
151
+ type: string;
152
+ };
153
+ content_name: {
154
+ type: string;
155
+ };
156
+ currency: {
157
+ type: string;
158
+ };
159
+ value: {
160
+ type: string;
161
+ };
162
+ };
163
+ };
164
+ };
165
+ };
166
+ };
167
+ };
168
+ };
169
+ analyticsEvents: {
170
+ oneOf: ({
171
+ optionName: string;
172
+ type: string;
173
+ additionalProperties: {
174
+ type: string;
175
+ };
176
+ required: string[];
177
+ properties: {
178
+ name: {
179
+ type: string;
180
+ };
181
+ type: {
182
+ type: string;
183
+ };
184
+ counters: {
185
+ type: string;
186
+ additionalProperties: boolean;
187
+ required: never[];
188
+ properties: {
189
+ include: {
190
+ type: string;
191
+ items: {
192
+ type: string;
193
+ };
194
+ };
195
+ exclude: {
196
+ type: string;
197
+ items: {
198
+ type: string;
199
+ };
200
+ };
201
+ };
202
+ };
203
+ context: {
204
+ type: string;
205
+ };
206
+ };
207
+ items?: undefined;
208
+ } | {
209
+ type: string;
210
+ items: {
211
+ type: string;
212
+ additionalProperties: {
213
+ type: string;
214
+ };
215
+ required: string[];
216
+ properties: {
217
+ name: {
218
+ type: string;
219
+ };
220
+ type: {
221
+ type: string;
222
+ };
223
+ counters: {
224
+ type: string;
225
+ additionalProperties: boolean;
226
+ required: never[];
227
+ properties: {
228
+ include: {
229
+ type: string;
230
+ items: {
231
+ type: string;
232
+ };
233
+ };
234
+ exclude: {
235
+ type: string;
236
+ items: {
237
+ type: string;
238
+ };
239
+ };
240
+ };
241
+ };
242
+ context: {
243
+ type: string;
244
+ };
245
+ };
246
+ };
247
+ optionName: string;
248
+ })[];
249
+ };
250
+ target: {
251
+ type: string;
252
+ enum: string[];
253
+ };
254
+ width: {
255
+ type: string;
256
+ enum: string[];
257
+ };
258
+ };
259
+ if: {
260
+ properties: {
261
+ theme: {
262
+ enum: string[];
263
+ };
264
+ };
265
+ };
266
+ then: {
267
+ required: string[];
268
+ };
269
+ else: {
270
+ required: string[];
271
+ };
272
+ };
273
+ };
274
+ links: {
275
+ type: string;
276
+ items: {
277
+ type: string;
278
+ additionalProperties: boolean;
279
+ required: string[];
280
+ properties: {
281
+ text: {
282
+ type: string;
283
+ contentType: string;
284
+ };
285
+ url: {
286
+ type: string;
287
+ };
288
+ urlTitle: {
289
+ type: string;
290
+ };
291
+ arrow: {
292
+ type: string;
293
+ };
294
+ theme: {
295
+ type: string;
296
+ enum: string[];
297
+ };
298
+ textSize: {
299
+ type: string;
300
+ enum: string[];
301
+ };
302
+ target: {
303
+ type: string;
304
+ enum: string[];
305
+ };
306
+ analyticsEvents: {
307
+ oneOf: ({
308
+ optionName: string;
309
+ type: string;
310
+ additionalProperties: {
311
+ type: string;
312
+ };
313
+ required: string[];
314
+ properties: {
315
+ name: {
316
+ type: string;
317
+ };
318
+ type: {
319
+ type: string;
320
+ };
321
+ counters: {
322
+ type: string;
323
+ additionalProperties: boolean;
324
+ required: never[];
325
+ properties: {
326
+ include: {
327
+ type: string;
328
+ items: {
329
+ type: string;
330
+ };
331
+ };
332
+ exclude: {
333
+ type: string;
334
+ items: {
335
+ type: string;
336
+ };
337
+ };
338
+ };
339
+ };
340
+ context: {
341
+ type: string;
342
+ };
343
+ };
344
+ items?: undefined;
345
+ } | {
346
+ type: string;
347
+ items: {
348
+ type: string;
349
+ additionalProperties: {
350
+ type: string;
351
+ };
352
+ required: string[];
353
+ properties: {
354
+ name: {
355
+ type: string;
356
+ };
357
+ type: {
358
+ type: string;
359
+ };
360
+ counters: {
361
+ type: string;
362
+ additionalProperties: boolean;
363
+ required: never[];
364
+ properties: {
365
+ include: {
366
+ type: string;
367
+ items: {
368
+ type: string;
369
+ };
370
+ };
371
+ exclude: {
372
+ type: string;
373
+ items: {
374
+ type: string;
375
+ };
376
+ };
377
+ };
378
+ };
379
+ context: {
380
+ type: string;
381
+ };
382
+ };
383
+ };
384
+ optionName: string;
385
+ })[];
386
+ };
387
+ type: {};
388
+ when: {
389
+ type: string;
390
+ };
391
+ };
392
+ };
393
+ };
394
+ backgroundColor: {
395
+ type: string;
396
+ };
397
+ list: {
398
+ type: string;
399
+ items: {
400
+ type: string;
401
+ };
402
+ };
403
+ border: {
404
+ type: string;
405
+ enum: string[];
406
+ };
407
+ type: {};
408
+ when: {
409
+ type: string;
410
+ };
411
+ };
412
+ };
4
413
  'basic-card': {
5
414
  additionalProperties: boolean;
6
415
  required: never[];
@@ -826,6 +1235,10 @@ export declare const cardSchemas: {
826
1235
  type: string;
827
1236
  enum: string[];
828
1237
  };
1238
+ width: {
1239
+ type: string;
1240
+ enum: string[];
1241
+ };
829
1242
  };
830
1243
  if: {
831
1244
  properties: {
@@ -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: {
@@ -407,6 +407,10 @@ exports.ButtonProps = {
407
407
  type: 'string',
408
408
  enum: ['_self', '_blank', '_parent', '_top'],
409
409
  },
410
+ width: {
411
+ type: 'string',
412
+ enum: ['auto', 'max'],
413
+ },
410
414
  };
411
415
  exports.MenuProps = {
412
416
  type: 'object',