@gravity-ui/page-constructor 1.15.0-alpha.21 → 1.15.0-alpha.22
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 +0 -9
- package/build/cjs/blocks/Banner/schema.js +1 -3
- package/build/cjs/blocks/ExtendedFeatures/schema.d.ts +78 -0
- package/build/cjs/blocks/Header/schema.d.ts +0 -156
- package/build/cjs/blocks/Header/schema.js +0 -4
- package/build/cjs/blocks/HeaderSlider/schema.d.ts +0 -78
- package/build/cjs/blocks/Info/schema.d.ts +0 -3
- package/build/cjs/blocks/Info/schema.js +0 -2
- package/build/cjs/blocks/Preview/MediaContent/MediaContent.d.ts +1 -2
- package/build/cjs/blocks/Preview/schema.d.ts +0 -3
- package/build/cjs/blocks/Preview/schema.js +1 -3
- package/build/cjs/blocks/Security/schema.d.ts +0 -3
- package/build/cjs/blocks/Security/schema.js +1 -3
- package/build/cjs/blocks/Tabs/schema.d.ts +78 -0
- package/build/cjs/components/BackLink/BackLink.d.ts +0 -1
- package/build/cjs/components/BackLink/BackLink.js +4 -2
- package/build/cjs/components/Button/Button.js +1 -4
- package/build/cjs/components/ButtonTabs/ButtonTabs.d.ts +0 -1
- package/build/cjs/components/CardBase/CardBase.d.ts +2 -4
- package/build/cjs/components/HeaderBreadcrumbs/HeaderBreadcrumbs.css +30 -0
- package/build/cjs/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +7 -2
- package/build/cjs/components/Link/Link.js +1 -1
- package/build/cjs/components/ReactPlayer/ReactPlayer.js +1 -1
- package/build/cjs/components/YandexForm/YandexForm.d.ts +2 -4
- package/build/cjs/components/YandexForm/YandexForm.js +2 -2
- package/build/cjs/models/common.d.ts +3 -0
- package/build/cjs/models/constructor-items/blocks.d.ts +0 -10
- package/build/cjs/models/constructor-items/common.d.ts +5 -13
- package/build/cjs/models/constructor-items/sub-blocks.d.ts +3 -7
- package/build/cjs/navigation/components/NavigationItem/NavigationItem.js +5 -3
- package/build/cjs/schema/validators/common.d.ts +78 -0
- package/build/cjs/schema/validators/common.js +2 -0
- package/build/cjs/sub-blocks/BackgroundCard/schema.d.ts +0 -3
- package/build/cjs/sub-blocks/BackgroundCard/schema.js +0 -2
- package/build/cjs/sub-blocks/HubspotForm/index.js +1 -1
- package/build/cjs/sub-blocks/Quote/Quote.js +2 -2
- package/build/cjs/sub-blocks/Quote/schema.d.ts +0 -3
- package/build/cjs/sub-blocks/Quote/schema.js +1 -3
- package/build/esm/blocks/Banner/schema.d.ts +0 -9
- package/build/esm/blocks/Banner/schema.js +1 -3
- package/build/esm/blocks/ExtendedFeatures/schema.d.ts +78 -0
- package/build/esm/blocks/Header/schema.d.ts +0 -156
- package/build/esm/blocks/Header/schema.js +0 -4
- package/build/esm/blocks/HeaderSlider/schema.d.ts +0 -78
- package/build/esm/blocks/Info/schema.d.ts +0 -3
- package/build/esm/blocks/Info/schema.js +0 -2
- package/build/esm/blocks/Preview/MediaContent/MediaContent.d.ts +1 -2
- package/build/esm/blocks/Preview/schema.d.ts +0 -3
- package/build/esm/blocks/Preview/schema.js +1 -3
- package/build/esm/blocks/Security/schema.d.ts +0 -3
- package/build/esm/blocks/Security/schema.js +1 -3
- package/build/esm/blocks/Tabs/schema.d.ts +78 -0
- package/build/esm/components/BackLink/BackLink.d.ts +0 -1
- package/build/esm/components/BackLink/BackLink.js +4 -2
- package/build/esm/components/Button/Button.js +1 -4
- package/build/esm/components/ButtonTabs/ButtonTabs.d.ts +0 -1
- package/build/esm/components/CardBase/CardBase.d.ts +2 -4
- package/build/esm/components/HeaderBreadcrumbs/HeaderBreadcrumbs.css +30 -0
- package/build/esm/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +7 -2
- package/build/esm/components/Link/Link.js +1 -1
- package/build/esm/components/ReactPlayer/ReactPlayer.js +1 -1
- package/build/esm/components/YandexForm/YandexForm.d.ts +2 -4
- package/build/esm/components/YandexForm/YandexForm.js +2 -2
- package/build/esm/models/common.d.ts +3 -0
- package/build/esm/models/constructor-items/blocks.d.ts +0 -10
- package/build/esm/models/constructor-items/common.d.ts +5 -13
- package/build/esm/models/constructor-items/sub-blocks.d.ts +3 -7
- package/build/esm/navigation/components/NavigationItem/NavigationItem.js +5 -3
- package/build/esm/schema/validators/common.d.ts +78 -0
- package/build/esm/schema/validators/common.js +2 -0
- package/build/esm/sub-blocks/BackgroundCard/schema.d.ts +0 -3
- package/build/esm/sub-blocks/BackgroundCard/schema.js +0 -2
- package/build/esm/sub-blocks/HubspotForm/index.js +1 -1
- package/build/esm/sub-blocks/Quote/Quote.js +2 -2
- package/build/esm/sub-blocks/Quote/schema.d.ts +0 -3
- package/build/esm/sub-blocks/Quote/schema.js +1 -3
- package/package.json +1 -1
- package/server/models/common.d.ts +3 -0
- package/server/models/constructor-items/blocks.d.ts +0 -10
- package/server/models/constructor-items/common.d.ts +5 -13
- package/server/models/constructor-items/sub-blocks.d.ts +3 -7
- package/build/cjs/components/HeaderBreadcrumbs/HeaderBreadcrumbsItem.css +0 -30
- package/build/cjs/components/HeaderBreadcrumbs/HeaderBreadcrumbsItem.d.ts +0 -12
- package/build/cjs/components/HeaderBreadcrumbs/HeaderBreadcrumbsItem.js +0 -28
- package/build/esm/components/HeaderBreadcrumbs/HeaderBreadcrumbsItem.css +0 -30
- package/build/esm/components/HeaderBreadcrumbs/HeaderBreadcrumbsItem.d.ts +0 -13
- package/build/esm/components/HeaderBreadcrumbs/HeaderBreadcrumbsItem.js +0 -25
|
@@ -270,9 +270,6 @@ export declare const BannerCardProps: {
|
|
|
270
270
|
required: string[];
|
|
271
271
|
};
|
|
272
272
|
};
|
|
273
|
-
context: {
|
|
274
|
-
type: string;
|
|
275
|
-
};
|
|
276
273
|
animated: {
|
|
277
274
|
type: string;
|
|
278
275
|
};
|
|
@@ -553,9 +550,6 @@ export declare const BannerBlock: {
|
|
|
553
550
|
required: string[];
|
|
554
551
|
};
|
|
555
552
|
};
|
|
556
|
-
context: {
|
|
557
|
-
type: string;
|
|
558
|
-
};
|
|
559
553
|
animated: {
|
|
560
554
|
type: string;
|
|
561
555
|
};
|
|
@@ -837,9 +831,6 @@ export declare const BannerCard: {
|
|
|
837
831
|
required: string[];
|
|
838
832
|
};
|
|
839
833
|
};
|
|
840
|
-
context: {
|
|
841
|
-
type: string;
|
|
842
|
-
};
|
|
843
834
|
animated: {
|
|
844
835
|
type: string;
|
|
845
836
|
};
|
|
@@ -20,9 +20,7 @@ exports.BannerCardProps = {
|
|
|
20
20
|
}), theme: common_1.ThemeProps, width: {
|
|
21
21
|
type: 'string',
|
|
22
22
|
enum: ['s', 'm', 'l'],
|
|
23
|
-
}, button: common_1.ButtonBlock,
|
|
24
|
-
type: 'string',
|
|
25
|
-
} }),
|
|
23
|
+
}, button: common_1.ButtonBlock }),
|
|
26
24
|
};
|
|
27
25
|
exports.BannerBlock = {
|
|
28
26
|
'banner-block': exports.BannerCardProps,
|
|
@@ -41,6 +41,84 @@ export declare const ExtendedFeaturesItem: {
|
|
|
41
41
|
type: string;
|
|
42
42
|
enum: string[];
|
|
43
43
|
};
|
|
44
|
+
analyticsEvents: {
|
|
45
|
+
anyOf: ({
|
|
46
|
+
type: string;
|
|
47
|
+
additionalProperties: {
|
|
48
|
+
type: string;
|
|
49
|
+
};
|
|
50
|
+
required: string[];
|
|
51
|
+
properties: {
|
|
52
|
+
name: {
|
|
53
|
+
type: string;
|
|
54
|
+
};
|
|
55
|
+
type: {
|
|
56
|
+
type: string;
|
|
57
|
+
};
|
|
58
|
+
counters: {
|
|
59
|
+
type: string;
|
|
60
|
+
additionalProperties: boolean;
|
|
61
|
+
required: never[];
|
|
62
|
+
properties: {
|
|
63
|
+
include: {
|
|
64
|
+
type: string;
|
|
65
|
+
items: {
|
|
66
|
+
type: string;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
exclude: {
|
|
70
|
+
type: string;
|
|
71
|
+
items: {
|
|
72
|
+
type: string;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
context: {
|
|
78
|
+
type: string;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
} | {
|
|
82
|
+
type: string;
|
|
83
|
+
items: {
|
|
84
|
+
type: string;
|
|
85
|
+
additionalProperties: {
|
|
86
|
+
type: string;
|
|
87
|
+
};
|
|
88
|
+
required: string[];
|
|
89
|
+
properties: {
|
|
90
|
+
name: {
|
|
91
|
+
type: string;
|
|
92
|
+
};
|
|
93
|
+
type: {
|
|
94
|
+
type: string;
|
|
95
|
+
};
|
|
96
|
+
counters: {
|
|
97
|
+
type: string;
|
|
98
|
+
additionalProperties: boolean;
|
|
99
|
+
required: never[];
|
|
100
|
+
properties: {
|
|
101
|
+
include: {
|
|
102
|
+
type: string;
|
|
103
|
+
items: {
|
|
104
|
+
type: string;
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
exclude: {
|
|
108
|
+
type: string;
|
|
109
|
+
items: {
|
|
110
|
+
type: string;
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
context: {
|
|
116
|
+
type: string;
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
})[];
|
|
121
|
+
};
|
|
44
122
|
type: {};
|
|
45
123
|
when: {};
|
|
46
124
|
};
|
|
@@ -274,84 +274,6 @@ export declare const HeaderProperties: {
|
|
|
274
274
|
type: string;
|
|
275
275
|
contentType: string;
|
|
276
276
|
};
|
|
277
|
-
analyticsEvents: {
|
|
278
|
-
anyOf: ({
|
|
279
|
-
type: string;
|
|
280
|
-
additionalProperties: {
|
|
281
|
-
type: string;
|
|
282
|
-
};
|
|
283
|
-
required: string[];
|
|
284
|
-
properties: {
|
|
285
|
-
name: {
|
|
286
|
-
type: string;
|
|
287
|
-
};
|
|
288
|
-
type: {
|
|
289
|
-
type: string;
|
|
290
|
-
};
|
|
291
|
-
counters: {
|
|
292
|
-
type: string;
|
|
293
|
-
additionalProperties: boolean;
|
|
294
|
-
required: never[];
|
|
295
|
-
properties: {
|
|
296
|
-
include: {
|
|
297
|
-
type: string;
|
|
298
|
-
items: {
|
|
299
|
-
type: string;
|
|
300
|
-
};
|
|
301
|
-
};
|
|
302
|
-
exclude: {
|
|
303
|
-
type: string;
|
|
304
|
-
items: {
|
|
305
|
-
type: string;
|
|
306
|
-
};
|
|
307
|
-
};
|
|
308
|
-
};
|
|
309
|
-
};
|
|
310
|
-
context: {
|
|
311
|
-
type: string;
|
|
312
|
-
};
|
|
313
|
-
};
|
|
314
|
-
} | {
|
|
315
|
-
type: string;
|
|
316
|
-
items: {
|
|
317
|
-
type: string;
|
|
318
|
-
additionalProperties: {
|
|
319
|
-
type: string;
|
|
320
|
-
};
|
|
321
|
-
required: string[];
|
|
322
|
-
properties: {
|
|
323
|
-
name: {
|
|
324
|
-
type: string;
|
|
325
|
-
};
|
|
326
|
-
type: {
|
|
327
|
-
type: string;
|
|
328
|
-
};
|
|
329
|
-
counters: {
|
|
330
|
-
type: string;
|
|
331
|
-
additionalProperties: boolean;
|
|
332
|
-
required: never[];
|
|
333
|
-
properties: {
|
|
334
|
-
include: {
|
|
335
|
-
type: string;
|
|
336
|
-
items: {
|
|
337
|
-
type: string;
|
|
338
|
-
};
|
|
339
|
-
};
|
|
340
|
-
exclude: {
|
|
341
|
-
type: string;
|
|
342
|
-
items: {
|
|
343
|
-
type: string;
|
|
344
|
-
};
|
|
345
|
-
};
|
|
346
|
-
};
|
|
347
|
-
};
|
|
348
|
-
context: {
|
|
349
|
-
type: string;
|
|
350
|
-
};
|
|
351
|
-
};
|
|
352
|
-
};
|
|
353
|
-
})[];
|
|
354
|
-
};
|
|
355
277
|
};
|
|
356
278
|
};
|
|
357
279
|
imageSize: {
|
|
@@ -685,84 +607,6 @@ export declare const HeaderBlock: {
|
|
|
685
607
|
type: string;
|
|
686
608
|
contentType: string;
|
|
687
609
|
};
|
|
688
|
-
analyticsEvents: {
|
|
689
|
-
anyOf: ({
|
|
690
|
-
type: string;
|
|
691
|
-
additionalProperties: {
|
|
692
|
-
type: string;
|
|
693
|
-
};
|
|
694
|
-
required: string[];
|
|
695
|
-
properties: {
|
|
696
|
-
name: {
|
|
697
|
-
type: string;
|
|
698
|
-
};
|
|
699
|
-
type: {
|
|
700
|
-
type: string;
|
|
701
|
-
};
|
|
702
|
-
counters: {
|
|
703
|
-
type: string;
|
|
704
|
-
additionalProperties: boolean;
|
|
705
|
-
required: never[];
|
|
706
|
-
properties: {
|
|
707
|
-
include: {
|
|
708
|
-
type: string;
|
|
709
|
-
items: {
|
|
710
|
-
type: string;
|
|
711
|
-
};
|
|
712
|
-
};
|
|
713
|
-
exclude: {
|
|
714
|
-
type: string;
|
|
715
|
-
items: {
|
|
716
|
-
type: string;
|
|
717
|
-
};
|
|
718
|
-
};
|
|
719
|
-
};
|
|
720
|
-
};
|
|
721
|
-
context: {
|
|
722
|
-
type: string;
|
|
723
|
-
};
|
|
724
|
-
};
|
|
725
|
-
} | {
|
|
726
|
-
type: string;
|
|
727
|
-
items: {
|
|
728
|
-
type: string;
|
|
729
|
-
additionalProperties: {
|
|
730
|
-
type: string;
|
|
731
|
-
};
|
|
732
|
-
required: string[];
|
|
733
|
-
properties: {
|
|
734
|
-
name: {
|
|
735
|
-
type: string;
|
|
736
|
-
};
|
|
737
|
-
type: {
|
|
738
|
-
type: string;
|
|
739
|
-
};
|
|
740
|
-
counters: {
|
|
741
|
-
type: string;
|
|
742
|
-
additionalProperties: boolean;
|
|
743
|
-
required: never[];
|
|
744
|
-
properties: {
|
|
745
|
-
include: {
|
|
746
|
-
type: string;
|
|
747
|
-
items: {
|
|
748
|
-
type: string;
|
|
749
|
-
};
|
|
750
|
-
};
|
|
751
|
-
exclude: {
|
|
752
|
-
type: string;
|
|
753
|
-
items: {
|
|
754
|
-
type: string;
|
|
755
|
-
};
|
|
756
|
-
};
|
|
757
|
-
};
|
|
758
|
-
};
|
|
759
|
-
context: {
|
|
760
|
-
type: string;
|
|
761
|
-
};
|
|
762
|
-
};
|
|
763
|
-
};
|
|
764
|
-
})[];
|
|
765
|
-
};
|
|
766
610
|
};
|
|
767
611
|
};
|
|
768
612
|
imageSize: {
|
|
@@ -4,7 +4,6 @@ exports.HeaderBlock = exports.HeaderProperties = exports.HeaderBackgroundProps =
|
|
|
4
4
|
const common_1 = require("../../schema/validators/common");
|
|
5
5
|
const utils_1 = require("../../schema/validators/utils");
|
|
6
6
|
const schema_1 = require("../../components/Image/schema");
|
|
7
|
-
const event_1 = require("../../schema/validators/event");
|
|
8
7
|
exports.HeaderBackgroundProps = {
|
|
9
8
|
type: 'object',
|
|
10
9
|
additionalProperties: false,
|
|
@@ -46,9 +45,6 @@ exports.HeaderProperties = {
|
|
|
46
45
|
type: 'string',
|
|
47
46
|
contentType: 'text',
|
|
48
47
|
},
|
|
49
|
-
analyticsEvents: {
|
|
50
|
-
anyOf: [event_1.AnalyticsEventSchema, { type: 'array', items: event_1.AnalyticsEventSchema }],
|
|
51
|
-
},
|
|
52
48
|
},
|
|
53
49
|
},
|
|
54
50
|
imageSize: {
|
|
@@ -144,84 +144,6 @@ export declare const HeaderSliderBlock: {
|
|
|
144
144
|
type: string;
|
|
145
145
|
contentType: string;
|
|
146
146
|
};
|
|
147
|
-
analyticsEvents: {
|
|
148
|
-
anyOf: ({
|
|
149
|
-
type: string;
|
|
150
|
-
additionalProperties: {
|
|
151
|
-
type: string;
|
|
152
|
-
};
|
|
153
|
-
required: string[];
|
|
154
|
-
properties: {
|
|
155
|
-
name: {
|
|
156
|
-
type: string;
|
|
157
|
-
};
|
|
158
|
-
type: {
|
|
159
|
-
type: string;
|
|
160
|
-
};
|
|
161
|
-
counters: {
|
|
162
|
-
type: string;
|
|
163
|
-
additionalProperties: boolean;
|
|
164
|
-
required: never[];
|
|
165
|
-
properties: {
|
|
166
|
-
include: {
|
|
167
|
-
type: string;
|
|
168
|
-
items: {
|
|
169
|
-
type: string;
|
|
170
|
-
};
|
|
171
|
-
};
|
|
172
|
-
exclude: {
|
|
173
|
-
type: string;
|
|
174
|
-
items: {
|
|
175
|
-
type: string;
|
|
176
|
-
};
|
|
177
|
-
};
|
|
178
|
-
};
|
|
179
|
-
};
|
|
180
|
-
context: {
|
|
181
|
-
type: string;
|
|
182
|
-
};
|
|
183
|
-
};
|
|
184
|
-
} | {
|
|
185
|
-
type: string;
|
|
186
|
-
items: {
|
|
187
|
-
type: string;
|
|
188
|
-
additionalProperties: {
|
|
189
|
-
type: string;
|
|
190
|
-
};
|
|
191
|
-
required: string[];
|
|
192
|
-
properties: {
|
|
193
|
-
name: {
|
|
194
|
-
type: string;
|
|
195
|
-
};
|
|
196
|
-
type: {
|
|
197
|
-
type: string;
|
|
198
|
-
};
|
|
199
|
-
counters: {
|
|
200
|
-
type: string;
|
|
201
|
-
additionalProperties: boolean;
|
|
202
|
-
required: never[];
|
|
203
|
-
properties: {
|
|
204
|
-
include: {
|
|
205
|
-
type: string;
|
|
206
|
-
items: {
|
|
207
|
-
type: string;
|
|
208
|
-
};
|
|
209
|
-
};
|
|
210
|
-
exclude: {
|
|
211
|
-
type: string;
|
|
212
|
-
items: {
|
|
213
|
-
type: string;
|
|
214
|
-
};
|
|
215
|
-
};
|
|
216
|
-
};
|
|
217
|
-
};
|
|
218
|
-
context: {
|
|
219
|
-
type: string;
|
|
220
|
-
};
|
|
221
|
-
};
|
|
222
|
-
};
|
|
223
|
-
})[];
|
|
224
|
-
};
|
|
225
147
|
};
|
|
226
148
|
};
|
|
227
149
|
imageSize: {
|
|
@@ -22,8 +22,6 @@ exports.InfoBlock = {
|
|
|
22
22
|
}), sectionsTitle: {
|
|
23
23
|
type: 'string',
|
|
24
24
|
contentType: 'text',
|
|
25
|
-
}, context: {
|
|
26
|
-
type: 'string',
|
|
27
25
|
}, buttons: (0, utils_1.filteredArray)(common_1.ButtonBlock), theme: common_1.ThemeProps, links: (0, utils_1.filteredArray)(common_1.LinkProps), leftContent: ContentProps, rightContent: ContentProps }),
|
|
28
26
|
},
|
|
29
27
|
};
|
|
@@ -8,7 +8,6 @@ interface MediaContentProps extends Refable<HTMLDivElement> {
|
|
|
8
8
|
switching: boolean;
|
|
9
9
|
isActiveBlock: (id: number, isMediaBlock?: boolean) => boolean;
|
|
10
10
|
showMediaContent: (id: number) => void;
|
|
11
|
-
context?: string;
|
|
12
11
|
}
|
|
13
|
-
declare const MediaContent: React.ForwardRefExoticComponent<Pick<MediaContentProps, "title" | "
|
|
12
|
+
declare const MediaContent: React.ForwardRefExoticComponent<Pick<MediaContentProps, "title" | "items" | "description" | "ratioMediaContent" | "switching" | "isActiveBlock" | "showMediaContent"> & React.RefAttributes<HTMLDivElement>>;
|
|
14
13
|
export default MediaContent;
|
|
@@ -48,8 +48,6 @@ exports.PreviewBlock = {
|
|
|
48
48
|
}, ratioMediaContent: {
|
|
49
49
|
type: 'string',
|
|
50
50
|
enum: previewRatioMediaContent,
|
|
51
|
-
}, items: (0, utils_1.filteredArray)(PreviewItem),
|
|
52
|
-
type: 'string',
|
|
53
|
-
} }),
|
|
51
|
+
}, items: (0, utils_1.filteredArray)(PreviewItem) }),
|
|
54
52
|
},
|
|
55
53
|
};
|
|
@@ -177,6 +177,84 @@ export declare const tabsItem: {
|
|
|
177
177
|
type: string;
|
|
178
178
|
enum: string[];
|
|
179
179
|
};
|
|
180
|
+
analyticsEvents: {
|
|
181
|
+
anyOf: ({
|
|
182
|
+
type: string;
|
|
183
|
+
additionalProperties: {
|
|
184
|
+
type: string;
|
|
185
|
+
};
|
|
186
|
+
required: string[];
|
|
187
|
+
properties: {
|
|
188
|
+
name: {
|
|
189
|
+
type: string;
|
|
190
|
+
};
|
|
191
|
+
type: {
|
|
192
|
+
type: string;
|
|
193
|
+
};
|
|
194
|
+
counters: {
|
|
195
|
+
type: string;
|
|
196
|
+
additionalProperties: boolean;
|
|
197
|
+
required: never[];
|
|
198
|
+
properties: {
|
|
199
|
+
include: {
|
|
200
|
+
type: string;
|
|
201
|
+
items: {
|
|
202
|
+
type: string;
|
|
203
|
+
};
|
|
204
|
+
};
|
|
205
|
+
exclude: {
|
|
206
|
+
type: string;
|
|
207
|
+
items: {
|
|
208
|
+
type: string;
|
|
209
|
+
};
|
|
210
|
+
};
|
|
211
|
+
};
|
|
212
|
+
};
|
|
213
|
+
context: {
|
|
214
|
+
type: string;
|
|
215
|
+
};
|
|
216
|
+
};
|
|
217
|
+
} | {
|
|
218
|
+
type: string;
|
|
219
|
+
items: {
|
|
220
|
+
type: string;
|
|
221
|
+
additionalProperties: {
|
|
222
|
+
type: string;
|
|
223
|
+
};
|
|
224
|
+
required: string[];
|
|
225
|
+
properties: {
|
|
226
|
+
name: {
|
|
227
|
+
type: string;
|
|
228
|
+
};
|
|
229
|
+
type: {
|
|
230
|
+
type: string;
|
|
231
|
+
};
|
|
232
|
+
counters: {
|
|
233
|
+
type: string;
|
|
234
|
+
additionalProperties: boolean;
|
|
235
|
+
required: never[];
|
|
236
|
+
properties: {
|
|
237
|
+
include: {
|
|
238
|
+
type: string;
|
|
239
|
+
items: {
|
|
240
|
+
type: string;
|
|
241
|
+
};
|
|
242
|
+
};
|
|
243
|
+
exclude: {
|
|
244
|
+
type: string;
|
|
245
|
+
items: {
|
|
246
|
+
type: string;
|
|
247
|
+
};
|
|
248
|
+
};
|
|
249
|
+
};
|
|
250
|
+
};
|
|
251
|
+
context: {
|
|
252
|
+
type: string;
|
|
253
|
+
};
|
|
254
|
+
};
|
|
255
|
+
};
|
|
256
|
+
})[];
|
|
257
|
+
};
|
|
180
258
|
type: {};
|
|
181
259
|
when: {};
|
|
182
260
|
};
|
|
@@ -5,16 +5,18 @@ const react_1 = tslib_1.__importStar(require("react"));
|
|
|
5
5
|
const uikit_1 = require("@gravity-ui/uikit");
|
|
6
6
|
const icons_1 = require("../../icons");
|
|
7
7
|
const locationContext_1 = require("../../context/locationContext");
|
|
8
|
+
const blockPositionContext_1 = require("../../context/blockPositionContext");
|
|
8
9
|
const hooks_1 = require("../../hooks");
|
|
9
10
|
const models_1 = require("../../models");
|
|
10
11
|
const COMPONENT_NAME = 'backlink';
|
|
11
12
|
function BackLink(props) {
|
|
12
13
|
const { history } = (0, react_1.useContext)(locationContext_1.LocationContext);
|
|
13
|
-
const { url, title, theme = 'default', size = 'l', className, shouldHandleBackAction = false, onClick,
|
|
14
|
+
const { url, title, theme = 'default', size = 'l', className, shouldHandleBackAction = false, onClick, } = props;
|
|
15
|
+
const context = (0, react_1.useContext)(blockPositionContext_1.BlockPositionContext);
|
|
14
16
|
const handleAnalytics = (0, hooks_1.useAnalytics)({
|
|
15
17
|
name: 'back-link-click',
|
|
16
18
|
type: models_1.PredefinedEventTypes.Default,
|
|
17
|
-
context: context,
|
|
19
|
+
context: context || COMPONENT_NAME,
|
|
18
20
|
target: url,
|
|
19
21
|
});
|
|
20
22
|
const backActionHandler = (0, react_1.useCallback)(async () => {
|
|
@@ -7,10 +7,10 @@ const utils_1 = require("../../utils");
|
|
|
7
7
|
const models_1 = require("../../models");
|
|
8
8
|
const utils_2 = require("./utils");
|
|
9
9
|
const localeContext_1 = require("../../context/localeContext/localeContext");
|
|
10
|
+
const blockPositionContext_1 = require("../../context/blockPositionContext");
|
|
10
11
|
const useMetrika_1 = require("../../hooks/useMetrika");
|
|
11
12
|
const hooks_1 = require("../../hooks");
|
|
12
13
|
const icons_1 = require("../../icons");
|
|
13
|
-
const blockPositionContext_1 = require("../../context/blockPositionContext");
|
|
14
14
|
const COMPONENT_NAME = 'button';
|
|
15
15
|
const b = (0, utils_1.block)('button-block');
|
|
16
16
|
const Button = (props) => {
|
|
@@ -26,9 +26,6 @@ const Button = (props) => {
|
|
|
26
26
|
target: url,
|
|
27
27
|
}), [context, url]);
|
|
28
28
|
const handleAnalytics = (0, hooks_1.useAnalytics)(defaultEvent);
|
|
29
|
-
const blockPosition = (0, react_1.useContext)(blockPositionContext_1.BlockPositionContext);
|
|
30
|
-
// eslint-disable-next-line no-console
|
|
31
|
-
console.log({ blockPosition }, props);
|
|
32
29
|
const onClick = (0, react_1.useCallback)(() => {
|
|
33
30
|
handleMetrika({ metrikaGoals, pixelEvents });
|
|
34
31
|
handleAnalytics(analyticsEvents);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { ReactElement, HTMLAttributeAnchorTarget } from 'react';
|
|
2
2
|
import { ButtonPixel, CardBaseProps as CardBaseParams, ImageProps, MetrikaGoal, WithChildren } from '../../models';
|
|
3
|
-
import {
|
|
4
|
-
export interface CardBaseProps extends CardBaseParams {
|
|
3
|
+
import { AnalyticsEventsBase } from '../../models/common';
|
|
4
|
+
export interface CardBaseProps extends AnalyticsEventsBase, CardBaseParams {
|
|
5
5
|
className?: string;
|
|
6
6
|
bodyClassName?: string;
|
|
7
7
|
contentClassName?: string;
|
|
@@ -10,8 +10,6 @@ export interface CardBaseProps extends CardBaseParams {
|
|
|
10
10
|
target?: HTMLAttributeAnchorTarget;
|
|
11
11
|
metrikaGoals?: MetrikaGoal;
|
|
12
12
|
pixelEvents?: ButtonPixel;
|
|
13
|
-
analyticsEvents?: AnalyticsEvent | AnalyticsEvent[];
|
|
14
|
-
context?: string;
|
|
15
13
|
}
|
|
16
14
|
export interface CardHeaderBaseProps {
|
|
17
15
|
className?: string;
|