@gravity-ui/page-constructor 1.12.0 → 1.13.0-alpha.0

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/build/cjs/blocks/Banner/schema.d.ts +141 -0
  2. package/build/cjs/blocks/CardLayout/schema.d.ts +22 -24
  3. package/build/cjs/blocks/CardLayout/schema.js +1 -6
  4. package/build/cjs/blocks/ExtendedFeatures/schema.d.ts +16 -17
  5. package/build/cjs/blocks/ExtendedFeatures/schema.js +1 -6
  6. package/build/cjs/blocks/HeaderSlider/schema.d.ts +0 -25
  7. package/build/cjs/blocks/LinkTable/schema.d.ts +29 -21
  8. package/build/cjs/blocks/LinkTable/schema.js +1 -1
  9. package/build/cjs/blocks/Media/schema.d.ts +47 -0
  10. package/build/cjs/blocks/Media/schema.js +1 -1
  11. package/build/cjs/blocks/PromoFeaturesBlock/schema.d.ts +14 -15
  12. package/build/cjs/blocks/PromoFeaturesBlock/schema.js +1 -6
  13. package/build/cjs/blocks/Slider/schema.d.ts +28 -49
  14. package/build/cjs/blocks/Slider/schema.js +1 -6
  15. package/build/cjs/blocks/Tabs/schema.d.ts +29 -25
  16. package/build/cjs/blocks/Tabs/schema.js +1 -4
  17. package/build/cjs/components/BlockHeader/BlockHeader.css +8 -19
  18. package/build/cjs/components/BlockHeader/BlockHeader.js +4 -3
  19. package/build/cjs/components/Button/Button.js +3 -3
  20. package/build/cjs/components/CardBase/CardBase.d.ts +2 -1
  21. package/build/cjs/components/CardBase/CardBase.js +2 -2
  22. package/build/cjs/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +2 -2
  23. package/build/cjs/components/Link/Link.js +2 -2
  24. package/build/cjs/context/metrikaContext/metrikaContext.d.ts +2 -1
  25. package/build/cjs/hooks/useMetrika.d.ts +3 -2
  26. package/build/cjs/hooks/useMetrika.js +10 -2
  27. package/build/cjs/models/common.d.ts +4 -1
  28. package/build/cjs/models/constructor-items/common.d.ts +21 -0
  29. package/build/cjs/schema/validators/common.d.ts +125 -0
  30. package/build/cjs/schema/validators/common.js +12 -1
  31. package/build/cjs/schema/validators/ga-events.d.ts +47 -0
  32. package/build/cjs/schema/validators/ga-events.js +50 -0
  33. package/build/cjs/sub-blocks/CardWithImage/schema.js +1 -1
  34. package/build/cjs/text-transform/blocks.js +44 -54
  35. package/build/esm/blocks/Banner/schema.d.ts +141 -0
  36. package/build/esm/blocks/CardLayout/schema.d.ts +22 -24
  37. package/build/esm/blocks/CardLayout/schema.js +2 -7
  38. package/build/esm/blocks/ExtendedFeatures/schema.d.ts +16 -17
  39. package/build/esm/blocks/ExtendedFeatures/schema.js +2 -7
  40. package/build/esm/blocks/HeaderSlider/schema.d.ts +0 -25
  41. package/build/esm/blocks/LinkTable/schema.d.ts +29 -21
  42. package/build/esm/blocks/LinkTable/schema.js +2 -2
  43. package/build/esm/blocks/Media/schema.d.ts +47 -0
  44. package/build/esm/blocks/Media/schema.js +1 -1
  45. package/build/esm/blocks/PromoFeaturesBlock/schema.d.ts +14 -15
  46. package/build/esm/blocks/PromoFeaturesBlock/schema.js +2 -7
  47. package/build/esm/blocks/Slider/schema.d.ts +28 -49
  48. package/build/esm/blocks/Slider/schema.js +2 -7
  49. package/build/esm/blocks/Tabs/schema.d.ts +29 -25
  50. package/build/esm/blocks/Tabs/schema.js +2 -5
  51. package/build/esm/components/BlockHeader/BlockHeader.css +8 -19
  52. package/build/esm/components/BlockHeader/BlockHeader.js +5 -4
  53. package/build/esm/components/Button/Button.js +3 -3
  54. package/build/esm/components/CardBase/CardBase.d.ts +2 -1
  55. package/build/esm/components/CardBase/CardBase.js +2 -2
  56. package/build/esm/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +2 -2
  57. package/build/esm/components/Link/Link.js +2 -2
  58. package/build/esm/context/metrikaContext/metrikaContext.d.ts +2 -1
  59. package/build/esm/hooks/useMetrika.d.ts +3 -2
  60. package/build/esm/hooks/useMetrika.js +10 -2
  61. package/build/esm/models/common.d.ts +4 -1
  62. package/build/esm/models/constructor-items/common.d.ts +21 -0
  63. package/build/esm/schema/validators/common.d.ts +125 -0
  64. package/build/esm/schema/validators/common.js +11 -0
  65. package/build/esm/schema/validators/ga-events.d.ts +47 -0
  66. package/build/esm/schema/validators/ga-events.js +47 -0
  67. package/build/esm/sub-blocks/CardWithImage/schema.js +1 -1
  68. package/build/esm/text-transform/blocks.js +44 -54
  69. package/package.json +1 -1
  70. package/server/models/common.d.ts +4 -1
  71. package/server/models/constructor-items/common.d.ts +21 -0
  72. package/server/text-transform/blocks.js +44 -54
@@ -173,6 +173,53 @@ export declare const BannerCardProps: {
173
173
  };
174
174
  };
175
175
  };
176
+ gaEvents: {
177
+ type: string;
178
+ items: {
179
+ type: string;
180
+ required: string[];
181
+ additionalProperties: boolean;
182
+ properties: {
183
+ eventName: {
184
+ type: string;
185
+ };
186
+ eventCategory: {
187
+ type: string;
188
+ };
189
+ eventLabel: {
190
+ type: string;
191
+ };
192
+ value: {
193
+ type: string;
194
+ };
195
+ groups: {
196
+ oneOf: ({
197
+ type: string;
198
+ items?: undefined;
199
+ } | {
200
+ type: string;
201
+ items: {
202
+ type: string;
203
+ };
204
+ })[];
205
+ };
206
+ sendTo: {
207
+ oneOf: ({
208
+ type: string;
209
+ items?: undefined;
210
+ } | {
211
+ type: string;
212
+ items: {
213
+ type: string;
214
+ };
215
+ })[];
216
+ };
217
+ eventTimeout: {
218
+ type: string;
219
+ };
220
+ };
221
+ };
222
+ };
176
223
  target: {
177
224
  type: string;
178
225
  enum: string[];
@@ -375,6 +422,53 @@ export declare const BannerBlock: {
375
422
  };
376
423
  };
377
424
  };
425
+ gaEvents: {
426
+ type: string;
427
+ items: {
428
+ type: string;
429
+ required: string[];
430
+ additionalProperties: boolean;
431
+ properties: {
432
+ eventName: {
433
+ type: string;
434
+ };
435
+ eventCategory: {
436
+ type: string;
437
+ };
438
+ eventLabel: {
439
+ type: string;
440
+ };
441
+ value: {
442
+ type: string;
443
+ };
444
+ groups: {
445
+ oneOf: ({
446
+ type: string;
447
+ items?: undefined;
448
+ } | {
449
+ type: string;
450
+ items: {
451
+ type: string;
452
+ };
453
+ })[];
454
+ };
455
+ sendTo: {
456
+ oneOf: ({
457
+ type: string;
458
+ items?: undefined;
459
+ } | {
460
+ type: string;
461
+ items: {
462
+ type: string;
463
+ };
464
+ })[];
465
+ };
466
+ eventTimeout: {
467
+ type: string;
468
+ };
469
+ };
470
+ };
471
+ };
378
472
  target: {
379
473
  type: string;
380
474
  enum: string[];
@@ -578,6 +672,53 @@ export declare const BannerCard: {
578
672
  };
579
673
  };
580
674
  };
675
+ gaEvents: {
676
+ type: string;
677
+ items: {
678
+ type: string;
679
+ required: string[];
680
+ additionalProperties: boolean;
681
+ properties: {
682
+ eventName: {
683
+ type: string;
684
+ };
685
+ eventCategory: {
686
+ type: string;
687
+ };
688
+ eventLabel: {
689
+ type: string;
690
+ };
691
+ value: {
692
+ type: string;
693
+ };
694
+ groups: {
695
+ oneOf: ({
696
+ type: string;
697
+ items?: undefined;
698
+ } | {
699
+ type: string;
700
+ items: {
701
+ type: string;
702
+ };
703
+ })[];
704
+ };
705
+ sendTo: {
706
+ oneOf: ({
707
+ type: string;
708
+ items?: undefined;
709
+ } | {
710
+ type: string;
711
+ items: {
712
+ type: string;
713
+ };
714
+ })[];
715
+ };
716
+ eventTimeout: {
717
+ type: string;
718
+ };
719
+ };
720
+ };
721
+ };
581
722
  target: {
582
723
  type: string;
583
724
  enum: string[];
@@ -2,6 +2,17 @@ export declare const CardLayoutProps: {
2
2
  additionalProperties: boolean;
3
3
  required: string[];
4
4
  properties: {
5
+ colSizes: {
6
+ type: string;
7
+ additionalProperties: boolean;
8
+ properties: {};
9
+ };
10
+ children: {
11
+ type: string;
12
+ items: {
13
+ $ref: string;
14
+ };
15
+ };
5
16
  title: {
6
17
  oneOf: ({
7
18
  type: string;
@@ -25,24 +36,12 @@ export declare const CardLayoutProps: {
25
36
  };
26
37
  } | {
27
38
  type: string;
28
- contentType: string;
29
39
  })[];
30
40
  };
31
41
  description: {
32
42
  type: string;
33
43
  contentType: string;
34
44
  };
35
- colSizes: {
36
- type: string;
37
- additionalProperties: boolean;
38
- properties: {};
39
- };
40
- children: {
41
- type: string;
42
- items: {
43
- $ref: string;
44
- };
45
- };
46
45
  animated: {
47
46
  type: string;
48
47
  };
@@ -76,6 +75,17 @@ export declare const CardLayoutBlock: {
76
75
  additionalProperties: boolean;
77
76
  required: string[];
78
77
  properties: {
78
+ colSizes: {
79
+ type: string;
80
+ additionalProperties: boolean;
81
+ properties: {};
82
+ };
83
+ children: {
84
+ type: string;
85
+ items: {
86
+ $ref: string;
87
+ };
88
+ };
79
89
  title: {
80
90
  oneOf: ({
81
91
  type: string;
@@ -99,24 +109,12 @@ export declare const CardLayoutBlock: {
99
109
  };
100
110
  } | {
101
111
  type: string;
102
- contentType: string;
103
112
  })[];
104
113
  };
105
114
  description: {
106
115
  type: string;
107
116
  contentType: string;
108
117
  };
109
- colSizes: {
110
- type: string;
111
- additionalProperties: boolean;
112
- properties: {};
113
- };
114
- children: {
115
- type: string;
116
- items: {
117
- $ref: string;
118
- };
119
- };
120
118
  animated: {
121
119
  type: string;
122
120
  };
@@ -5,12 +5,7 @@ const common_1 = require("../../schema/validators/common");
5
5
  exports.CardLayoutProps = {
6
6
  additionalProperties: false,
7
7
  required: ['title'],
8
- properties: Object.assign(Object.assign(Object.assign({}, common_1.BlockBaseProps), common_1.AnimatableProps), { title: {
9
- oneOf: [{ type: 'string', contentType: 'text' }, common_1.TitleProps],
10
- }, description: {
11
- type: 'string',
12
- contentType: 'yfm',
13
- }, colSizes: common_1.containerSizesObject, children: common_1.ChildrenCardsProps }),
8
+ properties: Object.assign(Object.assign(Object.assign(Object.assign({}, common_1.BlockBaseProps), common_1.AnimatableProps), common_1.BlockHeaderProps), { colSizes: common_1.containerSizesObject, children: common_1.ChildrenCardsProps }),
14
9
  };
15
10
  exports.CardLayoutBlock = {
16
11
  'card-layout-block': exports.CardLayoutProps,
@@ -55,6 +55,22 @@ export declare const ExtendedFeaturesBlock: {
55
55
  additionalProperties: boolean;
56
56
  required: never[];
57
57
  properties: {
58
+ items: {
59
+ type: string;
60
+ items: {
61
+ type: string;
62
+ properties: {
63
+ when: {
64
+ type: string;
65
+ };
66
+ };
67
+ };
68
+ };
69
+ colSizes: {
70
+ type: string;
71
+ additionalProperties: boolean;
72
+ properties: {};
73
+ };
58
74
  title: {
59
75
  oneOf: ({
60
76
  type: string;
@@ -78,29 +94,12 @@ export declare const ExtendedFeaturesBlock: {
78
94
  };
79
95
  } | {
80
96
  type: string;
81
- contentType: string;
82
97
  })[];
83
98
  };
84
99
  description: {
85
100
  type: string;
86
101
  contentType: string;
87
102
  };
88
- items: {
89
- type: string;
90
- items: {
91
- type: string;
92
- properties: {
93
- when: {
94
- type: string;
95
- };
96
- };
97
- };
98
- };
99
- colSizes: {
100
- type: string;
101
- additionalProperties: boolean;
102
- properties: {};
103
- };
104
103
  animated: {
105
104
  type: string;
106
105
  };
@@ -29,11 +29,6 @@ exports.ExtendedFeaturesBlock = {
29
29
  'extended-features-block': {
30
30
  additionalProperties: false,
31
31
  required: [],
32
- properties: Object.assign(Object.assign(Object.assign({}, common_1.BlockBaseProps), common_1.AnimatableProps), { title: {
33
- oneOf: [{ type: 'string', contentType: 'text' }, common_1.TitleProps],
34
- }, description: {
35
- type: 'string',
36
- contentType: 'yfm',
37
- }, items: (0, utils_1.filteredArray)(exports.ExtendedFeaturesItem), colSizes: common_1.containerSizesObject }),
32
+ properties: Object.assign(Object.assign(Object.assign(Object.assign({}, common_1.BlockBaseProps), common_1.AnimatableProps), common_1.BlockHeaderProps), { items: (0, utils_1.filteredArray)(exports.ExtendedFeaturesItem), colSizes: common_1.containerSizesObject }),
38
33
  },
39
34
  };
@@ -346,31 +346,6 @@ export declare const HeaderSliderBlock: {
346
346
  arrows: {
347
347
  type: string;
348
348
  };
349
- description: {
350
- type: string;
351
- contentType: string;
352
- };
353
- title: {
354
- type: string;
355
- additionalProperties: boolean;
356
- required: string[];
357
- properties: {
358
- text: {
359
- type: string;
360
- contentType: string;
361
- };
362
- textSize: {
363
- type: string;
364
- enum: string[];
365
- };
366
- url: {
367
- type: string;
368
- };
369
- resetMargin: {
370
- type: string;
371
- };
372
- };
373
- };
374
349
  randomOrder: {
375
350
  type: string;
376
351
  };
@@ -3,27 +3,6 @@ export declare const LinkTableBlock: {
3
3
  additionalProperties: boolean;
4
4
  required: string[];
5
5
  properties: {
6
- title: {
7
- type: string;
8
- additionalProperties: boolean;
9
- required: string[];
10
- properties: {
11
- text: {
12
- type: string;
13
- contentType: string;
14
- };
15
- textSize: {
16
- type: string;
17
- enum: string[];
18
- };
19
- url: {
20
- type: string;
21
- };
22
- resetMargin: {
23
- type: string;
24
- };
25
- };
26
- };
27
6
  items: {
28
7
  type: string;
29
8
  items: {
@@ -38,6 +17,35 @@ export declare const LinkTableBlock: {
38
17
  };
39
18
  };
40
19
  };
20
+ title: {
21
+ oneOf: ({
22
+ type: string;
23
+ additionalProperties: boolean;
24
+ required: string[];
25
+ properties: {
26
+ text: {
27
+ type: string;
28
+ contentType: string;
29
+ };
30
+ textSize: {
31
+ type: string;
32
+ enum: string[];
33
+ };
34
+ url: {
35
+ type: string;
36
+ };
37
+ resetMargin: {
38
+ type: string;
39
+ };
40
+ };
41
+ } | {
42
+ type: string;
43
+ })[];
44
+ };
45
+ description: {
46
+ type: string;
47
+ contentType: string;
48
+ };
41
49
  anchor: {
42
50
  type: string;
43
51
  additionalProperties: boolean;
@@ -7,7 +7,7 @@ exports.LinkTableBlock = {
7
7
  'link-table-block': {
8
8
  additionalProperties: false,
9
9
  required: ['items'],
10
- properties: Object.assign(Object.assign({}, common_1.BlockBaseProps), { title: common_1.TitleProps, items: {
10
+ properties: Object.assign(Object.assign(Object.assign({}, common_1.BlockBaseProps), common_1.BlockHeaderProps), { items: {
11
11
  type: 'array',
12
12
  items: (0, utils_1.filteredArray)(common_1.LinkProps),
13
13
  } }),
@@ -426,6 +426,53 @@ export declare const MediaBlock: {
426
426
  };
427
427
  };
428
428
  };
429
+ gaEvents: {
430
+ type: string;
431
+ items: {
432
+ type: string;
433
+ required: string[];
434
+ additionalProperties: boolean;
435
+ properties: {
436
+ eventName: {
437
+ type: string;
438
+ };
439
+ eventCategory: {
440
+ type: string;
441
+ };
442
+ eventLabel: {
443
+ type: string;
444
+ };
445
+ value: {
446
+ type: string;
447
+ };
448
+ groups: {
449
+ oneOf: ({
450
+ type: string;
451
+ items?: undefined;
452
+ } | {
453
+ type: string;
454
+ items: {
455
+ type: string;
456
+ };
457
+ })[];
458
+ };
459
+ sendTo: {
460
+ oneOf: ({
461
+ type: string;
462
+ items?: undefined;
463
+ } | {
464
+ type: string;
465
+ items: {
466
+ type: string;
467
+ };
468
+ })[];
469
+ };
470
+ eventTimeout: {
471
+ type: string;
472
+ };
473
+ };
474
+ };
475
+ };
429
476
  target: {
430
477
  type: string;
431
478
  enum: string[];
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MediaBlock = exports.Media = void 0;
4
4
  const lodash_1 = require("lodash");
5
5
  const common_1 = require("../../schema/validators/common");
6
- const schema_1 = require("../../../src/sub-blocks/Content/schema");
6
+ const schema_1 = require("../../sub-blocks/Content/schema");
7
7
  exports.Media = {
8
8
  type: 'object',
9
9
  additionalProperties: false,
@@ -155,6 +155,20 @@ export declare const PromoFeaturesBlock: {
155
155
  additionalProperties: boolean;
156
156
  required: string[];
157
157
  properties: {
158
+ theme: {
159
+ enum: string[];
160
+ };
161
+ items: {
162
+ type: string;
163
+ items: {
164
+ type: string;
165
+ properties: {
166
+ when: {
167
+ type: string;
168
+ };
169
+ };
170
+ };
171
+ };
158
172
  title: {
159
173
  oneOf: ({
160
174
  type: string;
@@ -178,27 +192,12 @@ export declare const PromoFeaturesBlock: {
178
192
  };
179
193
  } | {
180
194
  type: string;
181
- contentType: string;
182
195
  })[];
183
196
  };
184
197
  description: {
185
198
  type: string;
186
199
  contentType: string;
187
200
  };
188
- theme: {
189
- enum: string[];
190
- };
191
- items: {
192
- type: string;
193
- items: {
194
- type: string;
195
- properties: {
196
- when: {
197
- type: string;
198
- };
199
- };
200
- };
201
- };
202
201
  animated: {
203
202
  type: string;
204
203
  };
@@ -26,12 +26,7 @@ exports.PromoFeaturesBlock = {
26
26
  'promo-features-block': {
27
27
  additionalProperties: false,
28
28
  required: ['items'],
29
- properties: Object.assign(Object.assign(Object.assign({}, common_1.BlockBaseProps), common_1.AnimatableProps), { title: {
30
- oneOf: [{ type: 'string', contentType: 'text' }, common_1.TitleProps],
31
- }, description: {
32
- type: 'string',
33
- contentType: 'text',
34
- }, theme: {
29
+ properties: Object.assign(Object.assign(Object.assign(Object.assign({}, common_1.BlockBaseProps), common_1.AnimatableProps), common_1.BlockHeaderProps), { theme: {
35
30
  enum: ['grey', 'default'],
36
31
  }, items: (0, utils_1.filteredArray)(exports.PromoFeaturesItem) }),
37
32
  },
@@ -5,31 +5,6 @@ export declare const SliderProps: {
5
5
  arrows: {
6
6
  type: string;
7
7
  };
8
- description: {
9
- type: string;
10
- contentType: string;
11
- };
12
- title: {
13
- type: string;
14
- additionalProperties: boolean;
15
- required: string[];
16
- properties: {
17
- text: {
18
- type: string;
19
- contentType: string;
20
- };
21
- textSize: {
22
- type: string;
23
- enum: string[];
24
- };
25
- url: {
26
- type: string;
27
- };
28
- resetMargin: {
29
- type: string;
30
- };
31
- };
32
- };
33
8
  randomOrder: {
34
9
  type: string;
35
10
  };
@@ -108,36 +83,40 @@ export declare const SliderBlock: {
108
83
  additionalProperties: boolean;
109
84
  required: never[];
110
85
  properties: {
111
- dots: {
112
- type: string;
113
- };
114
- arrows: {
115
- type: string;
86
+ title: {
87
+ oneOf: ({
88
+ type: string;
89
+ additionalProperties: boolean;
90
+ required: string[];
91
+ properties: {
92
+ text: {
93
+ type: string;
94
+ contentType: string;
95
+ };
96
+ textSize: {
97
+ type: string;
98
+ enum: string[];
99
+ };
100
+ url: {
101
+ type: string;
102
+ };
103
+ resetMargin: {
104
+ type: string;
105
+ };
106
+ };
107
+ } | {
108
+ type: string;
109
+ })[];
116
110
  };
117
111
  description: {
118
112
  type: string;
119
113
  contentType: string;
120
114
  };
121
- title: {
115
+ dots: {
116
+ type: string;
117
+ };
118
+ arrows: {
122
119
  type: string;
123
- additionalProperties: boolean;
124
- required: string[];
125
- properties: {
126
- text: {
127
- type: string;
128
- contentType: string;
129
- };
130
- textSize: {
131
- type: string;
132
- enum: string[];
133
- };
134
- url: {
135
- type: string;
136
- };
137
- resetMargin: {
138
- type: string;
139
- };
140
- };
141
120
  };
142
121
  randomOrder: {
143
122
  type: string;
@@ -51,11 +51,6 @@ exports.SliderProps = {
51
51
  arrows: {
52
52
  type: 'boolean',
53
53
  },
54
- description: {
55
- type: 'string',
56
- contentType: 'text',
57
- },
58
- title: common_1.TitleProps,
59
54
  randomOrder: {
60
55
  type: 'boolean',
61
56
  },
@@ -72,6 +67,6 @@ exports.SliderBlock = {
72
67
  'slider-block': {
73
68
  additionalProperties: false,
74
69
  required: [],
75
- properties: Object.assign(Object.assign(Object.assign({}, common_1.BlockBaseProps), common_1.AnimatableProps), exports.SliderProps),
70
+ properties: Object.assign(Object.assign(Object.assign(Object.assign({}, common_1.BlockBaseProps), common_1.AnimatableProps), exports.SliderProps), common_1.BlockHeaderProps),
76
71
  },
77
72
  };