@gravity-ui/page-constructor 1.2.3-alpha.3 → 1.2.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 (72) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/build/cjs/blocks/Companies/Companies.js +6 -2
  3. package/build/cjs/blocks/ContentLayout/schema.js +1 -2
  4. package/build/cjs/blocks/Header/Header.css +9 -2
  5. package/build/cjs/blocks/Header/Header.js +9 -6
  6. package/build/cjs/blocks/Header/schema.d.ts +244 -196
  7. package/build/cjs/blocks/Header/schema.js +23 -3
  8. package/build/cjs/blocks/HeaderSlider/schema.d.ts +122 -98
  9. package/build/cjs/blocks/Tabs/Tabs.js +2 -3
  10. package/build/cjs/blocks/Tabs/schema.js +1 -2
  11. package/build/cjs/components/BackgroundImage/BackgroundImage.js +2 -2
  12. package/build/cjs/components/FullscreenImage/FullscreenImage.d.ts +2 -2
  13. package/build/cjs/components/Image/Image.d.ts +5 -3
  14. package/build/cjs/components/Image/Image.js +5 -9
  15. package/build/cjs/components/Media/Image/Image.js +3 -3
  16. package/build/cjs/components/Media/Image/utils.d.ts +2 -2
  17. package/build/cjs/models/constructor-items/blocks.d.ts +9 -5
  18. package/build/cjs/models/constructor-items/common.d.ts +7 -11
  19. package/build/cjs/models/guards.d.ts +3 -2
  20. package/build/cjs/models/guards.js +5 -1
  21. package/build/cjs/schema/validators/common.d.ts +31 -0
  22. package/build/cjs/schema/validators/common.js +32 -5
  23. package/build/cjs/sub-blocks/BackgroundCard/schema.js +1 -2
  24. package/build/cjs/sub-blocks/BasicCard/BasicCard.js +1 -1
  25. package/build/cjs/sub-blocks/BasicCard/schema.js +1 -2
  26. package/build/cjs/sub-blocks/Content/Content.css +2 -1
  27. package/build/cjs/sub-blocks/Partner/Partner.js +1 -1
  28. package/build/cjs/sub-blocks/Partner/schema.js +1 -2
  29. package/build/cjs/sub-blocks/Quote/Quote.js +2 -3
  30. package/build/cjs/sub-blocks/Quote/schema.js +3 -4
  31. package/build/cjs/sub-blocks/TutorialCard/TutorialCard.js +2 -2
  32. package/build/cjs/sub-blocks/TutorialCard/schema.js +1 -2
  33. package/build/esm/blocks/Companies/Companies.js +6 -2
  34. package/build/esm/blocks/ContentLayout/schema.js +1 -2
  35. package/build/esm/blocks/Header/Header.css +9 -2
  36. package/build/esm/blocks/Header/Header.js +10 -7
  37. package/build/esm/blocks/Header/schema.d.ts +244 -196
  38. package/build/esm/blocks/Header/schema.js +23 -3
  39. package/build/esm/blocks/HeaderSlider/schema.d.ts +122 -98
  40. package/build/esm/blocks/Tabs/Tabs.js +2 -3
  41. package/build/esm/blocks/Tabs/schema.js +1 -2
  42. package/build/esm/components/BackgroundImage/BackgroundImage.js +2 -2
  43. package/build/esm/components/FullscreenImage/FullscreenImage.d.ts +2 -2
  44. package/build/esm/components/Image/Image.d.ts +5 -3
  45. package/build/esm/components/Image/Image.js +5 -9
  46. package/build/esm/components/Media/Image/Image.js +3 -3
  47. package/build/esm/components/Media/Image/utils.d.ts +2 -2
  48. package/build/esm/models/constructor-items/blocks.d.ts +9 -5
  49. package/build/esm/models/constructor-items/common.d.ts +7 -11
  50. package/build/esm/models/guards.d.ts +3 -2
  51. package/build/esm/models/guards.js +3 -0
  52. package/build/esm/schema/validators/common.d.ts +31 -0
  53. package/build/esm/schema/validators/common.js +28 -1
  54. package/build/esm/sub-blocks/BackgroundCard/schema.js +1 -2
  55. package/build/esm/sub-blocks/BasicCard/BasicCard.js +1 -1
  56. package/build/esm/sub-blocks/BasicCard/schema.js +1 -2
  57. package/build/esm/sub-blocks/Content/Content.css +2 -1
  58. package/build/esm/sub-blocks/Partner/Partner.js +1 -1
  59. package/build/esm/sub-blocks/Partner/schema.js +1 -2
  60. package/build/esm/sub-blocks/Quote/Quote.js +2 -3
  61. package/build/esm/sub-blocks/Quote/schema.js +1 -2
  62. package/build/esm/sub-blocks/TutorialCard/TutorialCard.js +2 -2
  63. package/build/esm/sub-blocks/TutorialCard/schema.js +1 -2
  64. package/package.json +1 -4
  65. package/server/models/constructor-items/blocks.d.ts +9 -5
  66. package/server/models/constructor-items/common.d.ts +7 -11
  67. package/server/models/guards.d.ts +3 -2
  68. package/server/models/guards.js +5 -1
  69. package/build/cjs/components/Image/schema.d.ts +0 -56
  70. package/build/cjs/components/Image/schema.js +0 -54
  71. package/build/esm/components/Image/schema.d.ts +0 -56
  72. package/build/esm/components/Image/schema.js +0 -51
@@ -140,139 +140,163 @@ export declare const HeaderProperties: {
140
140
  };
141
141
  background: {
142
142
  oneOf: ({
143
- fullWidth: {
144
- type: string;
145
- };
146
- fullWidthMedia: {
147
- type: string;
148
- };
149
- color: {
143
+ oneOf: ({
150
144
  type: string;
151
- };
152
- image: {
153
- anyOf: ({
154
- oneOf: ({
145
+ additionalProperties: boolean;
146
+ required: never[];
147
+ properties: {
148
+ fullWidth: {
155
149
  type: string;
156
- properties: {
157
- when: {
158
- type: string;
159
- };
160
- };
161
- } | {
150
+ };
151
+ color: {
162
152
  type: string;
163
- pattern: string;
164
- })[];
165
- } | {
166
- type: string;
167
- items: {
168
- oneOf: ({
169
- type: string;
170
- properties: {
171
- when: {
172
- type: string;
153
+ };
154
+ image: {
155
+ anyOf: ({
156
+ oneOf: ({
157
+ type: string;
158
+ properties: {
159
+ when: {
160
+ type: string;
161
+ };
173
162
  };
174
- };
163
+ } | {
164
+ type: string;
165
+ pattern: string;
166
+ })[];
175
167
  } | {
176
168
  type: string;
177
- pattern: string;
169
+ items: {
170
+ oneOf: ({
171
+ type: string;
172
+ properties: {
173
+ when: {
174
+ type: string;
175
+ };
176
+ };
177
+ } | {
178
+ type: string;
179
+ pattern: string;
180
+ })[];
181
+ };
178
182
  })[];
179
183
  };
180
- })[];
181
- };
182
- video: {
183
- type: string;
184
- additionalProperties: boolean;
185
- required: string[];
186
- properties: {
187
- src: {
184
+ video: {
188
185
  type: string;
189
- items: {
190
- type: string;
186
+ additionalProperties: boolean;
187
+ required: string[];
188
+ properties: {
189
+ src: {
190
+ type: string;
191
+ items: {
192
+ type: string;
193
+ };
194
+ };
195
+ loop: {
196
+ anyOf: ({
197
+ type: string;
198
+ additionalProperties: boolean;
199
+ required: string[];
200
+ properties: {
201
+ start: {
202
+ type: string;
203
+ };
204
+ end: {
205
+ type: string;
206
+ };
207
+ };
208
+ } | {
209
+ type: string;
210
+ })[];
211
+ };
212
+ type: {
213
+ type: string;
214
+ enum: string[];
215
+ };
216
+ muted: {
217
+ type: string;
218
+ };
219
+ playing: {
220
+ type: string;
221
+ };
222
+ elapsedTime: {
223
+ type: string;
224
+ };
225
+ playIcon: {
226
+ type: string;
227
+ additionalProperties: boolean;
228
+ properties: {
229
+ type: {
230
+ type: string;
231
+ enum: string[];
232
+ };
233
+ theme: {
234
+ type: string;
235
+ enum: string[];
236
+ };
237
+ text: {
238
+ type: string;
239
+ };
240
+ };
241
+ };
242
+ controls: {
243
+ type: string;
244
+ enum: string[];
245
+ };
191
246
  };
192
247
  };
193
- loop: {
194
- anyOf: ({
248
+ youtube: {
249
+ type: string;
250
+ };
251
+ parallax: {
252
+ type: string;
253
+ };
254
+ height: {
255
+ type: string;
256
+ };
257
+ previewImg: {
258
+ type: string;
259
+ };
260
+ dataLens: {
261
+ oneOf: ({
195
262
  type: string;
196
263
  additionalProperties: boolean;
197
264
  required: string[];
198
265
  properties: {
199
- start: {
266
+ id: {
200
267
  type: string;
201
268
  };
202
- end: {
269
+ theme: {
203
270
  type: string;
271
+ enum: string[];
204
272
  };
205
273
  };
206
274
  } | {
207
275
  type: string;
208
276
  })[];
209
277
  };
210
- type: {
211
- type: string;
212
- enum: string[];
213
- };
214
- muted: {
278
+ };
279
+ } | {
280
+ type: string;
281
+ additionalProperties: boolean;
282
+ properties: {
283
+ color: {
215
284
  type: string;
216
285
  };
217
- playing: {
286
+ url: {
218
287
  type: string;
219
288
  };
220
- elapsedTime: {
289
+ disableCompress: {
221
290
  type: string;
222
291
  };
223
- playIcon: {
292
+ fullWidth: {
224
293
  type: string;
225
- additionalProperties: boolean;
226
- properties: {
227
- type: {
228
- type: string;
229
- enum: string[];
230
- };
231
- theme: {
232
- type: string;
233
- enum: string[];
234
- };
235
- text: {
236
- type: string;
237
- };
238
- };
239
294
  };
240
- controls: {
295
+ fullWidthMedia: {
241
296
  type: string;
242
- enum: string[];
243
297
  };
244
298
  };
245
- };
246
- youtube: {
247
- type: string;
248
- };
249
- parallax: {
250
- type: string;
251
- };
252
- height: {
253
- type: string;
254
- };
255
- previewImg: {
256
- type: string;
257
- };
258
- dataLens: {
259
- oneOf: ({
260
- type: string;
261
- additionalProperties: boolean;
262
- required: string[];
263
- properties: {
264
- id: {
265
- type: string;
266
- };
267
- theme: {
268
- type: string;
269
- enum: string[];
270
- };
271
- };
272
- } | {
273
- type: string;
274
- })[];
275
- };
299
+ })[];
276
300
  } | {
277
301
  type: string;
278
302
  additionalProperties: boolean;
@@ -461,139 +485,163 @@ export declare const HeaderBlock: {
461
485
  };
462
486
  background: {
463
487
  oneOf: ({
464
- fullWidth: {
465
- type: string;
466
- };
467
- fullWidthMedia: {
468
- type: string;
469
- };
470
- color: {
488
+ oneOf: ({
471
489
  type: string;
472
- };
473
- image: {
474
- anyOf: ({
475
- oneOf: ({
490
+ additionalProperties: boolean;
491
+ required: never[];
492
+ properties: {
493
+ fullWidth: {
476
494
  type: string;
477
- properties: {
478
- when: {
479
- type: string;
480
- };
481
- };
482
- } | {
495
+ };
496
+ color: {
483
497
  type: string;
484
- pattern: string;
485
- })[];
486
- } | {
487
- type: string;
488
- items: {
489
- oneOf: ({
490
- type: string;
491
- properties: {
492
- when: {
493
- type: string;
498
+ };
499
+ image: {
500
+ anyOf: ({
501
+ oneOf: ({
502
+ type: string;
503
+ properties: {
504
+ when: {
505
+ type: string;
506
+ };
494
507
  };
495
- };
508
+ } | {
509
+ type: string;
510
+ pattern: string;
511
+ })[];
496
512
  } | {
497
513
  type: string;
498
- pattern: string;
514
+ items: {
515
+ oneOf: ({
516
+ type: string;
517
+ properties: {
518
+ when: {
519
+ type: string;
520
+ };
521
+ };
522
+ } | {
523
+ type: string;
524
+ pattern: string;
525
+ })[];
526
+ };
499
527
  })[];
500
528
  };
501
- })[];
502
- };
503
- video: {
504
- type: string;
505
- additionalProperties: boolean;
506
- required: string[];
507
- properties: {
508
- src: {
529
+ video: {
509
530
  type: string;
510
- items: {
511
- type: string;
531
+ additionalProperties: boolean;
532
+ required: string[];
533
+ properties: {
534
+ src: {
535
+ type: string;
536
+ items: {
537
+ type: string;
538
+ };
539
+ };
540
+ loop: {
541
+ anyOf: ({
542
+ type: string;
543
+ additionalProperties: boolean;
544
+ required: string[];
545
+ properties: {
546
+ start: {
547
+ type: string;
548
+ };
549
+ end: {
550
+ type: string;
551
+ };
552
+ };
553
+ } | {
554
+ type: string;
555
+ })[];
556
+ };
557
+ type: {
558
+ type: string;
559
+ enum: string[];
560
+ };
561
+ muted: {
562
+ type: string;
563
+ };
564
+ playing: {
565
+ type: string;
566
+ };
567
+ elapsedTime: {
568
+ type: string;
569
+ };
570
+ playIcon: {
571
+ type: string;
572
+ additionalProperties: boolean;
573
+ properties: {
574
+ type: {
575
+ type: string;
576
+ enum: string[];
577
+ };
578
+ theme: {
579
+ type: string;
580
+ enum: string[];
581
+ };
582
+ text: {
583
+ type: string;
584
+ };
585
+ };
586
+ };
587
+ controls: {
588
+ type: string;
589
+ enum: string[];
590
+ };
512
591
  };
513
592
  };
514
- loop: {
515
- anyOf: ({
593
+ youtube: {
594
+ type: string;
595
+ };
596
+ parallax: {
597
+ type: string;
598
+ };
599
+ height: {
600
+ type: string;
601
+ };
602
+ previewImg: {
603
+ type: string;
604
+ };
605
+ dataLens: {
606
+ oneOf: ({
516
607
  type: string;
517
608
  additionalProperties: boolean;
518
609
  required: string[];
519
610
  properties: {
520
- start: {
611
+ id: {
521
612
  type: string;
522
613
  };
523
- end: {
614
+ theme: {
524
615
  type: string;
616
+ enum: string[];
525
617
  };
526
618
  };
527
619
  } | {
528
620
  type: string;
529
621
  })[];
530
622
  };
531
- type: {
532
- type: string;
533
- enum: string[];
534
- };
535
- muted: {
623
+ };
624
+ } | {
625
+ type: string;
626
+ additionalProperties: boolean;
627
+ properties: {
628
+ color: {
536
629
  type: string;
537
630
  };
538
- playing: {
631
+ url: {
539
632
  type: string;
540
633
  };
541
- elapsedTime: {
634
+ disableCompress: {
542
635
  type: string;
543
636
  };
544
- playIcon: {
637
+ fullWidth: {
545
638
  type: string;
546
- additionalProperties: boolean;
547
- properties: {
548
- type: {
549
- type: string;
550
- enum: string[];
551
- };
552
- theme: {
553
- type: string;
554
- enum: string[];
555
- };
556
- text: {
557
- type: string;
558
- };
559
- };
560
639
  };
561
- controls: {
640
+ fullWidthMedia: {
562
641
  type: string;
563
- enum: string[];
564
642
  };
565
643
  };
566
- };
567
- youtube: {
568
- type: string;
569
- };
570
- parallax: {
571
- type: string;
572
- };
573
- height: {
574
- type: string;
575
- };
576
- previewImg: {
577
- type: string;
578
- };
579
- dataLens: {
580
- oneOf: ({
581
- type: string;
582
- additionalProperties: boolean;
583
- required: string[];
584
- properties: {
585
- id: {
586
- type: string;
587
- };
588
- theme: {
589
- type: string;
590
- enum: string[];
591
- };
592
- };
593
- } | {
594
- type: string;
595
- })[];
596
- };
644
+ })[];
597
645
  } | {
598
646
  type: string;
599
647
  additionalProperties: boolean;
@@ -1,6 +1,11 @@
1
- import { VideoProps, withTheme, BlockBaseProps, ButtonBlock, MediaProps, } from '../../schema/validators/common';
1
+ import { ImageProps, VideoProps, withTheme, BlockBaseProps, ButtonBlock, MediaProps, } from '../../schema/validators/common';
2
2
  import { filteredArray } from '../../schema/validators/utils';
3
- import { ImageProps } from '../../components/Image/schema';
3
+ const HeaderMedia = {
4
+ type: 'object',
5
+ additionalProperties: false,
6
+ required: [],
7
+ properties: Object.assign(Object.assign({}, MediaProps), { fullWidth: { type: 'boolean' } }),
8
+ };
4
9
  export const HeaderProperties = {
5
10
  title: {
6
11
  type: 'string',
@@ -42,7 +47,22 @@ export const HeaderProperties = {
42
47
  type: 'string',
43
48
  enum: ['s', 'm', 'l', 'xl'],
44
49
  },
45
- background: withTheme(Object.assign(Object.assign({}, MediaProps), { fullWidth: { type: 'boolean' }, fullWidthMedia: { type: 'boolean' } })),
50
+ background: withTheme({
51
+ oneOf: [
52
+ HeaderMedia,
53
+ {
54
+ type: 'object',
55
+ additionalProperties: false,
56
+ properties: {
57
+ color: { type: 'string' },
58
+ url: { type: 'string' },
59
+ disableCompress: { type: 'boolean' },
60
+ fullWidth: { type: 'boolean' },
61
+ fullWidthMedia: { type: 'boolean' },
62
+ },
63
+ },
64
+ ],
65
+ }),
46
66
  theme: {
47
67
  type: 'string',
48
68
  enum: ['default', 'dark'],