@gravity-ui/page-constructor 1.14.0-alpha.0 → 1.14.0-alpha.2

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 (83) hide show
  1. package/build/cjs/blocks/Banner/schema.d.ts +0 -321
  2. package/build/cjs/blocks/Media/schema.d.ts +0 -107
  3. package/build/cjs/components/Button/Button.js +2 -5
  4. package/build/cjs/components/CardBase/CardBase.d.ts +0 -2
  5. package/build/cjs/components/CardBase/CardBase.js +1 -4
  6. package/build/cjs/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +1 -4
  7. package/build/cjs/components/Link/Link.js +1 -4
  8. package/build/cjs/components/YandexForm/YandexForm.d.ts +0 -2
  9. package/build/cjs/components/YandexForm/YandexForm.js +2 -13
  10. package/build/cjs/context/metrikaContext/metrikaContext.d.ts +0 -6
  11. package/build/cjs/hooks/useMetrika.d.ts +0 -6
  12. package/build/cjs/hooks/useMetrika.js +0 -8
  13. package/build/cjs/models/common.d.ts +0 -30
  14. package/build/cjs/models/common.js +0 -3
  15. package/build/cjs/models/constructor-items/common.d.ts +1 -4
  16. package/build/cjs/models/constructor-items/sub-blocks.d.ts +1 -2
  17. package/build/cjs/models/navigation.d.ts +1 -3
  18. package/build/cjs/navigation/components/Header/Header.css +5 -3
  19. package/build/cjs/navigation/components/Logo/Logo.css +5 -6
  20. package/build/cjs/navigation/components/NavigationItem/NavigationItem.css +1 -0
  21. package/build/cjs/navigation/schema.d.ts +369 -0
  22. package/build/cjs/navigation/schema.js +89 -0
  23. package/build/cjs/schema/index.d.ts +367 -0
  24. package/build/cjs/schema/index.js +2 -1
  25. package/build/cjs/schema/validators/common.d.ts +0 -226
  26. package/build/cjs/schema/validators/common.js +0 -10
  27. package/build/cjs/schema/validators/index.d.ts +2 -0
  28. package/build/cjs/schema/validators/index.js +2 -0
  29. package/build/cjs/schema/validators/navigation.d.ts +1 -0
  30. package/build/cjs/{context/analyticsContext/index.js → schema/validators/navigation.js} +1 -1
  31. package/build/cjs/sub-blocks/HubspotForm/index.js +2 -14
  32. package/build/esm/blocks/Banner/schema.d.ts +0 -321
  33. package/build/esm/blocks/Media/schema.d.ts +0 -107
  34. package/build/esm/components/Button/Button.js +2 -5
  35. package/build/esm/components/CardBase/CardBase.d.ts +0 -2
  36. package/build/esm/components/CardBase/CardBase.js +1 -4
  37. package/build/esm/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +1 -4
  38. package/build/esm/components/Link/Link.js +1 -4
  39. package/build/esm/components/YandexForm/YandexForm.d.ts +0 -2
  40. package/build/esm/components/YandexForm/YandexForm.js +2 -13
  41. package/build/esm/context/metrikaContext/metrikaContext.d.ts +0 -6
  42. package/build/esm/hooks/useMetrika.d.ts +0 -6
  43. package/build/esm/hooks/useMetrika.js +0 -8
  44. package/build/esm/models/common.d.ts +0 -30
  45. package/build/esm/models/common.js +0 -3
  46. package/build/esm/models/constructor-items/common.d.ts +1 -4
  47. package/build/esm/models/constructor-items/sub-blocks.d.ts +1 -2
  48. package/build/esm/models/navigation.d.ts +1 -3
  49. package/build/esm/navigation/components/Header/Header.css +5 -3
  50. package/build/esm/navigation/components/Logo/Logo.css +5 -6
  51. package/build/esm/navigation/components/NavigationItem/NavigationItem.css +1 -0
  52. package/build/esm/navigation/schema.d.ts +369 -0
  53. package/build/esm/navigation/schema.js +86 -0
  54. package/build/esm/schema/index.d.ts +367 -0
  55. package/build/esm/schema/index.js +2 -1
  56. package/build/esm/schema/validators/common.d.ts +0 -226
  57. package/build/esm/schema/validators/common.js +0 -10
  58. package/build/esm/schema/validators/index.d.ts +2 -0
  59. package/build/esm/schema/validators/index.js +2 -0
  60. package/build/esm/schema/validators/navigation.d.ts +1 -0
  61. package/build/esm/schema/validators/navigation.js +1 -0
  62. package/build/esm/sub-blocks/HubspotForm/index.js +2 -14
  63. package/package.json +1 -4
  64. package/server/models/common.d.ts +0 -30
  65. package/server/models/common.js +0 -3
  66. package/server/models/constructor-items/common.d.ts +1 -4
  67. package/server/models/constructor-items/sub-blocks.d.ts +1 -2
  68. package/server/models/navigation.d.ts +1 -3
  69. package/build/cjs/context/analyticsContext/analyticsContext.d.ts +0 -6
  70. package/build/cjs/context/analyticsContext/analyticsContext.js +0 -6
  71. package/build/cjs/context/analyticsContext/index.d.ts +0 -1
  72. package/build/cjs/hooks/useAnalytics.d.ts +0 -2
  73. package/build/cjs/hooks/useAnalytics.js +0 -15
  74. package/build/cjs/schema/validators/event.d.ts +0 -50
  75. package/build/cjs/schema/validators/event.js +0 -53
  76. package/build/esm/context/analyticsContext/analyticsContext.d.ts +0 -6
  77. package/build/esm/context/analyticsContext/analyticsContext.js +0 -2
  78. package/build/esm/context/analyticsContext/index.d.ts +0 -1
  79. package/build/esm/context/analyticsContext/index.js +0 -1
  80. package/build/esm/hooks/useAnalytics.d.ts +0 -2
  81. package/build/esm/hooks/useAnalytics.js +0 -11
  82. package/build/esm/schema/validators/event.d.ts +0 -50
  83. package/build/esm/schema/validators/event.js +0 -50
@@ -159,6 +159,373 @@ export declare function generateDefaultSchema(config?: SchemaCustomConfig): {
159
159
  type: string;
160
160
  };
161
161
  };
162
+ additionalProperties: boolean;
163
+ required: never[];
164
+ properties: {
165
+ logo: {
166
+ oneOf: ({
167
+ type: string;
168
+ additionalProperties: boolean;
169
+ required: string[];
170
+ properties: {
171
+ icon: {
172
+ oneOf: ({
173
+ type: string;
174
+ properties: {
175
+ when: {
176
+ type: string;
177
+ };
178
+ };
179
+ } | {
180
+ type: string;
181
+ pattern: string;
182
+ })[];
183
+ };
184
+ text: {
185
+ type: string;
186
+ contentType: string;
187
+ };
188
+ url: {
189
+ type: string;
190
+ };
191
+ };
192
+ } | {
193
+ type: string;
194
+ additionalProperties: boolean;
195
+ required: import("..").Theme[];
196
+ properties: {};
197
+ })[];
198
+ };
199
+ header: {
200
+ type: string;
201
+ additionalProperties: boolean;
202
+ required: string[];
203
+ properties: {
204
+ leftItems: {
205
+ oneOf: {
206
+ type: string;
207
+ additionalProperties: boolean;
208
+ required: never[];
209
+ properties: {
210
+ type: {
211
+ type: string;
212
+ enum: string[];
213
+ };
214
+ additionalProperties: boolean;
215
+ properties: {
216
+ text: {
217
+ type: string;
218
+ contentType: string;
219
+ };
220
+ url: {
221
+ type: string;
222
+ };
223
+ primary: {
224
+ type: string;
225
+ };
226
+ size: {
227
+ type: string;
228
+ enum: string[];
229
+ };
230
+ theme: {
231
+ type: string;
232
+ enum: string[];
233
+ };
234
+ img: {
235
+ anyOf: ({
236
+ type: string;
237
+ additionalProperties?: undefined;
238
+ required?: undefined;
239
+ properties?: undefined;
240
+ } | {
241
+ type: string;
242
+ additionalProperties: boolean;
243
+ required: string[];
244
+ properties: {
245
+ data: {
246
+ type: string;
247
+ };
248
+ position: {
249
+ type: string;
250
+ enum: string[];
251
+ };
252
+ alt: {
253
+ type: string;
254
+ contentType: string;
255
+ };
256
+ };
257
+ })[];
258
+ };
259
+ metrikaGoals: {
260
+ anyOf: ({
261
+ type: string;
262
+ items?: undefined;
263
+ } | {
264
+ type: string;
265
+ items: {
266
+ type: string;
267
+ additionalProperties?: undefined;
268
+ required?: undefined;
269
+ properties?: undefined;
270
+ };
271
+ } | {
272
+ type: string;
273
+ items: {
274
+ type: string;
275
+ additionalProperties: boolean;
276
+ required: string[];
277
+ properties: {
278
+ name: {
279
+ type: string;
280
+ };
281
+ isCrossSite: {
282
+ type: string;
283
+ };
284
+ };
285
+ };
286
+ })[];
287
+ };
288
+ pixelEvents: {
289
+ type: string;
290
+ items: {
291
+ type: string;
292
+ required: string[];
293
+ additionalProperties: boolean;
294
+ properties: {
295
+ name: {
296
+ type: string;
297
+ enum: import("..").PixelEventType[];
298
+ };
299
+ data: {};
300
+ };
301
+ select: {
302
+ $data: string;
303
+ };
304
+ selectCases: {
305
+ SubmitApplication: {
306
+ additionalProperties: boolean;
307
+ properties: {
308
+ name: {};
309
+ };
310
+ };
311
+ Contact: {
312
+ additionalProperties: boolean;
313
+ properties: {
314
+ name: {};
315
+ };
316
+ };
317
+ Lead: {
318
+ additionalProperties: boolean;
319
+ properties: {
320
+ name: {};
321
+ data: {
322
+ type: string;
323
+ additionalProperties: boolean;
324
+ properties: {
325
+ content_category: {
326
+ type: string;
327
+ };
328
+ content_name: {
329
+ type: string;
330
+ };
331
+ currency: {
332
+ type: string;
333
+ };
334
+ value: {
335
+ type: string;
336
+ };
337
+ };
338
+ };
339
+ };
340
+ };
341
+ };
342
+ };
343
+ };
344
+ target: {
345
+ type: string;
346
+ enum: string[];
347
+ };
348
+ };
349
+ if: {
350
+ properties: {
351
+ theme: {
352
+ enum: string[];
353
+ };
354
+ };
355
+ };
356
+ then: {
357
+ required: string[];
358
+ };
359
+ else: {
360
+ required: string[];
361
+ };
362
+ };
363
+ }[];
364
+ };
365
+ rightItems: {
366
+ oneOf: {
367
+ type: string;
368
+ additionalProperties: boolean;
369
+ required: never[];
370
+ properties: {
371
+ type: {
372
+ type: string;
373
+ enum: string[];
374
+ };
375
+ additionalProperties: boolean;
376
+ properties: {
377
+ text: {
378
+ type: string;
379
+ contentType: string;
380
+ };
381
+ url: {
382
+ type: string;
383
+ };
384
+ primary: {
385
+ type: string;
386
+ };
387
+ size: {
388
+ type: string;
389
+ enum: string[];
390
+ };
391
+ theme: {
392
+ type: string;
393
+ enum: string[];
394
+ };
395
+ img: {
396
+ anyOf: ({
397
+ type: string;
398
+ additionalProperties?: undefined;
399
+ required?: undefined;
400
+ properties?: undefined;
401
+ } | {
402
+ type: string;
403
+ additionalProperties: boolean;
404
+ required: string[];
405
+ properties: {
406
+ data: {
407
+ type: string;
408
+ };
409
+ position: {
410
+ type: string;
411
+ enum: string[];
412
+ };
413
+ alt: {
414
+ type: string;
415
+ contentType: string;
416
+ };
417
+ };
418
+ })[];
419
+ };
420
+ metrikaGoals: {
421
+ anyOf: ({
422
+ type: string;
423
+ items?: undefined;
424
+ } | {
425
+ type: string;
426
+ items: {
427
+ type: string;
428
+ additionalProperties?: undefined;
429
+ required?: undefined;
430
+ properties?: undefined;
431
+ };
432
+ } | {
433
+ type: string;
434
+ items: {
435
+ type: string;
436
+ additionalProperties: boolean;
437
+ required: string[];
438
+ properties: {
439
+ name: {
440
+ type: string;
441
+ };
442
+ isCrossSite: {
443
+ type: string;
444
+ };
445
+ };
446
+ };
447
+ })[];
448
+ };
449
+ pixelEvents: {
450
+ type: string;
451
+ items: {
452
+ type: string;
453
+ required: string[];
454
+ additionalProperties: boolean;
455
+ properties: {
456
+ name: {
457
+ type: string;
458
+ enum: import("..").PixelEventType[];
459
+ };
460
+ data: {};
461
+ };
462
+ select: {
463
+ $data: string;
464
+ };
465
+ selectCases: {
466
+ SubmitApplication: {
467
+ additionalProperties: boolean;
468
+ properties: {
469
+ name: {};
470
+ };
471
+ };
472
+ Contact: {
473
+ additionalProperties: boolean;
474
+ properties: {
475
+ name: {};
476
+ };
477
+ };
478
+ Lead: {
479
+ additionalProperties: boolean;
480
+ properties: {
481
+ name: {};
482
+ data: {
483
+ type: string;
484
+ additionalProperties: boolean;
485
+ properties: {
486
+ content_category: {
487
+ type: string;
488
+ };
489
+ content_name: {
490
+ type: string;
491
+ };
492
+ currency: {
493
+ type: string;
494
+ };
495
+ value: {
496
+ type: string;
497
+ };
498
+ };
499
+ };
500
+ };
501
+ };
502
+ };
503
+ };
504
+ };
505
+ target: {
506
+ type: string;
507
+ enum: string[];
508
+ };
509
+ };
510
+ if: {
511
+ properties: {
512
+ theme: {
513
+ enum: string[];
514
+ };
515
+ };
516
+ };
517
+ then: {
518
+ required: string[];
519
+ };
520
+ else: {
521
+ required: string[];
522
+ };
523
+ };
524
+ }[];
525
+ };
526
+ };
527
+ };
528
+ };
162
529
  animated: {
163
530
  type: string;
164
531
  };
@@ -7,6 +7,7 @@ const blocks_1 = require("./validators/blocks");
7
7
  const sub_blocks_1 = require("./validators/sub-blocks");
8
8
  const common_1 = require("./validators/common");
9
9
  const utils_1 = require("./validators/utils");
10
+ const navigation_1 = require("./validators/navigation");
10
11
  const getBlocksCases = (blocks) => {
11
12
  return Object.values(blocks).reduce((acc, block) => (Object.assign(Object.assign({}, acc), block)));
12
13
  };
@@ -88,7 +89,7 @@ function generateDefaultSchema(config) {
88
89
  type: 'object',
89
90
  additionalProperties: false,
90
91
  required: ['blocks'],
91
- properties: Object.assign(Object.assign(Object.assign({}, common_1.AnimatableProps), { blocks: {
92
+ properties: Object.assign(Object.assign(Object.assign(Object.assign({}, common_1.AnimatableProps), navigation_1.NavigationProps), { blocks: {
92
93
  type: 'array',
93
94
  items: {
94
95
  $ref: '#/definitions/children',
@@ -414,9 +414,6 @@ export declare const ButtonProps: {
414
414
  };
415
415
  })[];
416
416
  };
417
- /**
418
- * @deprecated Metrika will be deleted
419
- */
420
417
  metrikaGoals: {
421
418
  anyOf: ({
422
419
  type: string;
@@ -446,9 +443,6 @@ export declare const ButtonProps: {
446
443
  };
447
444
  })[];
448
445
  };
449
- /**
450
- * @deprecated Pixel will be deleted
451
- */
452
446
  pixelEvents: {
453
447
  type: string;
454
448
  items: {
@@ -505,113 +499,6 @@ export declare const ButtonProps: {
505
499
  };
506
500
  };
507
501
  };
508
- events: {
509
- anyOf: ({
510
- type: {
511
- type: string;
512
- additionalProperties: boolean;
513
- required: string[];
514
- properties: {
515
- name: {
516
- type: string;
517
- };
518
- type: {
519
- type: string;
520
- };
521
- counters: {
522
- type: string;
523
- additionalProperties: boolean;
524
- required: never[];
525
- properties: {
526
- include: {
527
- type: string;
528
- items: string;
529
- };
530
- exclude: {
531
- type: string;
532
- items: string;
533
- };
534
- };
535
- };
536
- category: {
537
- type: string;
538
- };
539
- label: {
540
- type: string;
541
- };
542
- params: {
543
- type: string;
544
- items: {
545
- type: string;
546
- additionalProperties: boolean;
547
- required: string[];
548
- properties: {
549
- key: {
550
- type: string;
551
- };
552
- value: {
553
- type: string;
554
- };
555
- };
556
- };
557
- };
558
- };
559
- };
560
- items?: undefined;
561
- } | {
562
- type: string;
563
- items: {
564
- type: string;
565
- additionalProperties: boolean;
566
- required: string[];
567
- properties: {
568
- name: {
569
- type: string;
570
- };
571
- type: {
572
- type: string;
573
- };
574
- counters: {
575
- type: string;
576
- additionalProperties: boolean;
577
- required: never[];
578
- properties: {
579
- include: {
580
- type: string;
581
- items: string;
582
- };
583
- exclude: {
584
- type: string;
585
- items: string;
586
- };
587
- };
588
- };
589
- category: {
590
- type: string;
591
- };
592
- label: {
593
- type: string;
594
- };
595
- params: {
596
- type: string;
597
- items: {
598
- type: string;
599
- additionalProperties: boolean;
600
- required: string[];
601
- properties: {
602
- key: {
603
- type: string;
604
- };
605
- value: {
606
- type: string;
607
- };
608
- };
609
- };
610
- };
611
- };
612
- };
613
- })[];
614
- };
615
502
  target: {
616
503
  type: string;
617
504
  enum: string[];
@@ -742,9 +629,6 @@ export declare const ButtonBlock: {
742
629
  };
743
630
  })[];
744
631
  };
745
- /**
746
- * @deprecated Metrika will be deleted
747
- */
748
632
  metrikaGoals: {
749
633
  anyOf: ({
750
634
  type: string;
@@ -774,9 +658,6 @@ export declare const ButtonBlock: {
774
658
  };
775
659
  })[];
776
660
  };
777
- /**
778
- * @deprecated Pixel will be deleted
779
- */
780
661
  pixelEvents: {
781
662
  type: string;
782
663
  items: {
@@ -833,113 +714,6 @@ export declare const ButtonBlock: {
833
714
  };
834
715
  };
835
716
  };
836
- events: {
837
- anyOf: ({
838
- type: {
839
- type: string;
840
- additionalProperties: boolean;
841
- required: string[];
842
- properties: {
843
- name: {
844
- type: string;
845
- };
846
- type: {
847
- type: string;
848
- };
849
- counters: {
850
- type: string;
851
- additionalProperties: boolean;
852
- required: never[];
853
- properties: {
854
- include: {
855
- type: string;
856
- items: string;
857
- };
858
- exclude: {
859
- type: string;
860
- items: string;
861
- };
862
- };
863
- };
864
- category: {
865
- type: string;
866
- };
867
- label: {
868
- type: string;
869
- };
870
- params: {
871
- type: string;
872
- items: {
873
- type: string;
874
- additionalProperties: boolean;
875
- required: string[];
876
- properties: {
877
- key: {
878
- type: string;
879
- };
880
- value: {
881
- type: string;
882
- };
883
- };
884
- };
885
- };
886
- };
887
- };
888
- items?: undefined;
889
- } | {
890
- type: string;
891
- items: {
892
- type: string;
893
- additionalProperties: boolean;
894
- required: string[];
895
- properties: {
896
- name: {
897
- type: string;
898
- };
899
- type: {
900
- type: string;
901
- };
902
- counters: {
903
- type: string;
904
- additionalProperties: boolean;
905
- required: never[];
906
- properties: {
907
- include: {
908
- type: string;
909
- items: string;
910
- };
911
- exclude: {
912
- type: string;
913
- items: string;
914
- };
915
- };
916
- };
917
- category: {
918
- type: string;
919
- };
920
- label: {
921
- type: string;
922
- };
923
- params: {
924
- type: string;
925
- items: {
926
- type: string;
927
- additionalProperties: boolean;
928
- required: string[];
929
- properties: {
930
- key: {
931
- type: string;
932
- };
933
- value: {
934
- type: string;
935
- };
936
- };
937
- };
938
- };
939
- };
940
- };
941
- })[];
942
- };
943
717
  target: {
944
718
  type: string;
945
719
  enum: string[];
@@ -4,7 +4,6 @@ exports.BlockHeaderProps = exports.CardBase = exports.MediaProps = exports.Butto
4
4
  const pixel_1 = require("./pixel");
5
5
  const models_1 = require("../../models");
6
6
  const schema_1 = require("../../components/Image/schema");
7
- const event_1 = require("./event");
8
7
  exports.mediaDirection = ['media-content', 'content-media'];
9
8
  exports.textSize = ['s', 'm', 'l'];
10
9
  exports.containerSizesArray = ['sm', 'md', 'lg', 'xl', 'all'];
@@ -310,9 +309,6 @@ exports.ButtonProps = {
310
309
  },
311
310
  ],
312
311
  },
313
- /**
314
- * @deprecated Metrika will be deleted
315
- */
316
312
  metrikaGoals: {
317
313
  anyOf: [
318
314
  { type: 'string' },
@@ -335,13 +331,7 @@ exports.ButtonProps = {
335
331
  },
336
332
  ],
337
333
  },
338
- /**
339
- * @deprecated Pixel will be deleted
340
- */
341
334
  pixelEvents: pixel_1.pixelEvents,
342
- events: {
343
- anyOf: [{ type: event_1.AnalyticsEventSchema }, { type: 'array', items: event_1.AnalyticsEventSchema }],
344
- },
345
335
  target: {
346
336
  type: 'string',
347
337
  enum: ['_self', '_blank', '_parent', '_top'],