@gravity-ui/page-constructor 1.14.0-alpha.8 → 1.14.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.
- package/CHANGELOG.md +21 -0
- package/build/cjs/blocks/Banner/schema.d.ts +0 -336
- package/build/cjs/blocks/Media/schema.d.ts +0 -112
- package/build/cjs/components/Button/Button.js +2 -5
- package/build/cjs/components/CardBase/CardBase.d.ts +0 -2
- package/build/cjs/components/CardBase/CardBase.js +1 -4
- package/build/cjs/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +1 -4
- package/build/cjs/components/Link/Link.js +1 -4
- package/build/cjs/components/YandexForm/YandexForm.d.ts +0 -2
- package/build/cjs/components/YandexForm/YandexForm.js +2 -13
- package/build/cjs/containers/PageConstructor/Provider.d.ts +0 -2
- package/build/cjs/containers/PageConstructor/Provider.js +1 -3
- package/build/cjs/context/metrikaContext/metrikaContext.d.ts +0 -6
- package/build/cjs/hooks/useMetrika.d.ts +0 -6
- package/build/cjs/hooks/useMetrika.js +0 -8
- package/build/cjs/models/common.d.ts +0 -30
- package/build/cjs/models/common.js +0 -3
- package/build/cjs/models/constructor-items/common.d.ts +1 -4
- package/build/cjs/models/constructor-items/sub-blocks.d.ts +1 -2
- package/build/cjs/models/navigation.d.ts +1 -3
- package/build/cjs/navigation/components/Header/Header.css +5 -3
- package/build/cjs/navigation/components/Logo/Logo.css +5 -6
- package/build/cjs/navigation/components/NavigationItem/NavigationItem.css +1 -0
- package/build/cjs/navigation/schema.d.ts +60 -0
- package/build/cjs/navigation/schema.js +80 -0
- package/build/cjs/schema/index.d.ts +67 -0
- package/build/cjs/schema/index.js +2 -1
- package/build/cjs/schema/validators/common.d.ts +0 -236
- package/build/cjs/schema/validators/common.js +0 -10
- package/build/cjs/schema/validators/index.d.ts +2 -0
- package/build/cjs/schema/validators/index.js +2 -0
- package/build/cjs/schema/validators/navigation.d.ts +1 -0
- package/build/cjs/{context/analyticsContext/index.js → schema/validators/navigation.js} +1 -1
- package/build/cjs/sub-blocks/HubspotForm/index.js +2 -14
- package/build/cjs/text-transform/blocks.js +1 -10
- package/build/esm/blocks/Banner/schema.d.ts +0 -336
- package/build/esm/blocks/Media/schema.d.ts +0 -112
- package/build/esm/components/Button/Button.js +2 -5
- package/build/esm/components/CardBase/CardBase.d.ts +0 -2
- package/build/esm/components/CardBase/CardBase.js +1 -4
- package/build/esm/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +1 -4
- package/build/esm/components/Link/Link.js +1 -4
- package/build/esm/components/YandexForm/YandexForm.d.ts +0 -2
- package/build/esm/components/YandexForm/YandexForm.js +2 -13
- package/build/esm/containers/PageConstructor/Provider.d.ts +0 -2
- package/build/esm/containers/PageConstructor/Provider.js +1 -3
- package/build/esm/context/metrikaContext/metrikaContext.d.ts +0 -6
- package/build/esm/hooks/useMetrika.d.ts +0 -6
- package/build/esm/hooks/useMetrika.js +0 -8
- package/build/esm/models/common.d.ts +0 -30
- package/build/esm/models/common.js +0 -3
- package/build/esm/models/constructor-items/common.d.ts +1 -4
- package/build/esm/models/constructor-items/sub-blocks.d.ts +1 -2
- package/build/esm/models/navigation.d.ts +1 -3
- package/build/esm/navigation/components/Header/Header.css +5 -3
- package/build/esm/navigation/components/Logo/Logo.css +5 -6
- package/build/esm/navigation/components/NavigationItem/NavigationItem.css +1 -0
- package/build/esm/navigation/schema.d.ts +60 -0
- package/build/esm/navigation/schema.js +77 -0
- package/build/esm/schema/index.d.ts +67 -0
- package/build/esm/schema/index.js +2 -1
- package/build/esm/schema/validators/common.d.ts +0 -236
- package/build/esm/schema/validators/common.js +0 -10
- package/build/esm/schema/validators/index.d.ts +2 -0
- package/build/esm/schema/validators/index.js +2 -0
- package/build/esm/schema/validators/navigation.d.ts +1 -0
- package/build/esm/schema/validators/navigation.js +1 -0
- package/build/esm/sub-blocks/HubspotForm/index.js +2 -14
- package/build/esm/text-transform/blocks.js +1 -10
- package/package.json +1 -4
- package/server/models/common.d.ts +0 -30
- package/server/models/common.js +0 -3
- package/server/models/constructor-items/common.d.ts +1 -4
- package/server/models/constructor-items/sub-blocks.d.ts +1 -2
- package/server/models/navigation.d.ts +1 -3
- package/server/text-transform/blocks.js +1 -10
- package/build/cjs/context/analyticsContext/analyticsContext.d.ts +0 -6
- package/build/cjs/context/analyticsContext/analyticsContext.js +0 -6
- package/build/cjs/context/analyticsContext/index.d.ts +0 -1
- package/build/cjs/hooks/useAnalytics.d.ts +0 -2
- package/build/cjs/hooks/useAnalytics.js +0 -15
- package/build/cjs/schema/validators/event.d.ts +0 -54
- package/build/cjs/schema/validators/event.js +0 -57
- package/build/esm/context/analyticsContext/analyticsContext.d.ts +0 -6
- package/build/esm/context/analyticsContext/analyticsContext.js +0 -2
- package/build/esm/context/analyticsContext/index.d.ts +0 -1
- package/build/esm/context/analyticsContext/index.js +0 -1
- package/build/esm/hooks/useAnalytics.d.ts +0 -2
- package/build/esm/hooks/useAnalytics.js +0 -11
- package/build/esm/schema/validators/event.d.ts +0 -54
- package/build/esm/schema/validators/event.js +0 -54
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.14.0](https://github.com/gravity-ui/page-constructor/compare/v1.13.2...v1.14.0) (2023-01-25)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **Navigation:** add schema validation ([#120](https://github.com/gravity-ui/page-constructor/issues/120)) ([a6c8dec](https://github.com/gravity-ui/page-constructor/commit/a6c8decf04f402113a5a31d2635721ffcc1b233c))
|
|
9
|
+
|
|
10
|
+
## [1.13.2](https://github.com/gravity-ui/page-constructor/compare/v1.13.1...v1.13.2) (2023-01-20)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* **PromoFeaturesBlock:** transform items ([#118](https://github.com/gravity-ui/page-constructor/issues/118)) ([4c1cc7a](https://github.com/gravity-ui/page-constructor/commit/4c1cc7a38f2d789ce1c723b9695b7c1ed3e3cdf8))
|
|
16
|
+
|
|
17
|
+
## [1.13.1](https://github.com/gravity-ui/page-constructor/compare/v1.13.0...v1.13.1) (2023-01-19)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* **Navigation:** logo and button specifity styles ([#116](https://github.com/gravity-ui/page-constructor/issues/116)) ([dbe0c39](https://github.com/gravity-ui/page-constructor/commit/dbe0c39aa88aac8a3e84c079d7de400e9a9b3d2f))
|
|
23
|
+
|
|
3
24
|
## [1.13.0](https://github.com/gravity-ui/page-constructor/compare/v1.12.1...v1.13.0) (2023-01-18)
|
|
4
25
|
|
|
5
26
|
|
|
@@ -173,118 +173,6 @@ export declare const BannerCardProps: {
|
|
|
173
173
|
};
|
|
174
174
|
};
|
|
175
175
|
};
|
|
176
|
-
analyticsEvents: {
|
|
177
|
-
anyOf: ({
|
|
178
|
-
type: string;
|
|
179
|
-
additionalProperties: boolean;
|
|
180
|
-
required: string[];
|
|
181
|
-
properties: {
|
|
182
|
-
name: {
|
|
183
|
-
type: string;
|
|
184
|
-
};
|
|
185
|
-
type: {
|
|
186
|
-
type: string;
|
|
187
|
-
};
|
|
188
|
-
counters: {
|
|
189
|
-
type: string;
|
|
190
|
-
additionalProperties: boolean;
|
|
191
|
-
required: never[];
|
|
192
|
-
properties: {
|
|
193
|
-
include: {
|
|
194
|
-
type: string;
|
|
195
|
-
items: {
|
|
196
|
-
type: string;
|
|
197
|
-
};
|
|
198
|
-
};
|
|
199
|
-
exclude: {
|
|
200
|
-
type: string;
|
|
201
|
-
items: {
|
|
202
|
-
type: string;
|
|
203
|
-
};
|
|
204
|
-
};
|
|
205
|
-
};
|
|
206
|
-
};
|
|
207
|
-
category: {
|
|
208
|
-
type: string;
|
|
209
|
-
};
|
|
210
|
-
label: {
|
|
211
|
-
type: string;
|
|
212
|
-
};
|
|
213
|
-
params: {
|
|
214
|
-
type: string;
|
|
215
|
-
items: {
|
|
216
|
-
type: string;
|
|
217
|
-
additionalProperties: boolean;
|
|
218
|
-
required: string[];
|
|
219
|
-
properties: {
|
|
220
|
-
key: {
|
|
221
|
-
type: string;
|
|
222
|
-
};
|
|
223
|
-
value: {
|
|
224
|
-
type: string;
|
|
225
|
-
};
|
|
226
|
-
};
|
|
227
|
-
};
|
|
228
|
-
};
|
|
229
|
-
};
|
|
230
|
-
} | {
|
|
231
|
-
type: string;
|
|
232
|
-
items: {
|
|
233
|
-
type: string;
|
|
234
|
-
additionalProperties: boolean;
|
|
235
|
-
required: string[];
|
|
236
|
-
properties: {
|
|
237
|
-
name: {
|
|
238
|
-
type: string;
|
|
239
|
-
};
|
|
240
|
-
type: {
|
|
241
|
-
type: string;
|
|
242
|
-
};
|
|
243
|
-
counters: {
|
|
244
|
-
type: string;
|
|
245
|
-
additionalProperties: boolean;
|
|
246
|
-
required: never[];
|
|
247
|
-
properties: {
|
|
248
|
-
include: {
|
|
249
|
-
type: string;
|
|
250
|
-
items: {
|
|
251
|
-
type: string;
|
|
252
|
-
};
|
|
253
|
-
};
|
|
254
|
-
exclude: {
|
|
255
|
-
type: string;
|
|
256
|
-
items: {
|
|
257
|
-
type: string;
|
|
258
|
-
};
|
|
259
|
-
};
|
|
260
|
-
};
|
|
261
|
-
};
|
|
262
|
-
category: {
|
|
263
|
-
type: string;
|
|
264
|
-
};
|
|
265
|
-
label: {
|
|
266
|
-
type: string;
|
|
267
|
-
};
|
|
268
|
-
params: {
|
|
269
|
-
type: string;
|
|
270
|
-
items: {
|
|
271
|
-
type: string;
|
|
272
|
-
additionalProperties: boolean;
|
|
273
|
-
required: string[];
|
|
274
|
-
properties: {
|
|
275
|
-
key: {
|
|
276
|
-
type: string;
|
|
277
|
-
};
|
|
278
|
-
value: {
|
|
279
|
-
type: string;
|
|
280
|
-
};
|
|
281
|
-
};
|
|
282
|
-
};
|
|
283
|
-
};
|
|
284
|
-
};
|
|
285
|
-
};
|
|
286
|
-
})[];
|
|
287
|
-
};
|
|
288
176
|
target: {
|
|
289
177
|
type: string;
|
|
290
178
|
enum: string[];
|
|
@@ -487,118 +375,6 @@ export declare const BannerBlock: {
|
|
|
487
375
|
};
|
|
488
376
|
};
|
|
489
377
|
};
|
|
490
|
-
analyticsEvents: {
|
|
491
|
-
anyOf: ({
|
|
492
|
-
type: string;
|
|
493
|
-
additionalProperties: boolean;
|
|
494
|
-
required: string[];
|
|
495
|
-
properties: {
|
|
496
|
-
name: {
|
|
497
|
-
type: string;
|
|
498
|
-
};
|
|
499
|
-
type: {
|
|
500
|
-
type: string;
|
|
501
|
-
};
|
|
502
|
-
counters: {
|
|
503
|
-
type: string;
|
|
504
|
-
additionalProperties: boolean;
|
|
505
|
-
required: never[];
|
|
506
|
-
properties: {
|
|
507
|
-
include: {
|
|
508
|
-
type: string;
|
|
509
|
-
items: {
|
|
510
|
-
type: string;
|
|
511
|
-
};
|
|
512
|
-
};
|
|
513
|
-
exclude: {
|
|
514
|
-
type: string;
|
|
515
|
-
items: {
|
|
516
|
-
type: string;
|
|
517
|
-
};
|
|
518
|
-
};
|
|
519
|
-
};
|
|
520
|
-
};
|
|
521
|
-
category: {
|
|
522
|
-
type: string;
|
|
523
|
-
};
|
|
524
|
-
label: {
|
|
525
|
-
type: string;
|
|
526
|
-
};
|
|
527
|
-
params: {
|
|
528
|
-
type: string;
|
|
529
|
-
items: {
|
|
530
|
-
type: string;
|
|
531
|
-
additionalProperties: boolean;
|
|
532
|
-
required: string[];
|
|
533
|
-
properties: {
|
|
534
|
-
key: {
|
|
535
|
-
type: string;
|
|
536
|
-
};
|
|
537
|
-
value: {
|
|
538
|
-
type: string;
|
|
539
|
-
};
|
|
540
|
-
};
|
|
541
|
-
};
|
|
542
|
-
};
|
|
543
|
-
};
|
|
544
|
-
} | {
|
|
545
|
-
type: string;
|
|
546
|
-
items: {
|
|
547
|
-
type: string;
|
|
548
|
-
additionalProperties: boolean;
|
|
549
|
-
required: string[];
|
|
550
|
-
properties: {
|
|
551
|
-
name: {
|
|
552
|
-
type: string;
|
|
553
|
-
};
|
|
554
|
-
type: {
|
|
555
|
-
type: string;
|
|
556
|
-
};
|
|
557
|
-
counters: {
|
|
558
|
-
type: string;
|
|
559
|
-
additionalProperties: boolean;
|
|
560
|
-
required: never[];
|
|
561
|
-
properties: {
|
|
562
|
-
include: {
|
|
563
|
-
type: string;
|
|
564
|
-
items: {
|
|
565
|
-
type: string;
|
|
566
|
-
};
|
|
567
|
-
};
|
|
568
|
-
exclude: {
|
|
569
|
-
type: string;
|
|
570
|
-
items: {
|
|
571
|
-
type: string;
|
|
572
|
-
};
|
|
573
|
-
};
|
|
574
|
-
};
|
|
575
|
-
};
|
|
576
|
-
category: {
|
|
577
|
-
type: string;
|
|
578
|
-
};
|
|
579
|
-
label: {
|
|
580
|
-
type: string;
|
|
581
|
-
};
|
|
582
|
-
params: {
|
|
583
|
-
type: string;
|
|
584
|
-
items: {
|
|
585
|
-
type: string;
|
|
586
|
-
additionalProperties: boolean;
|
|
587
|
-
required: string[];
|
|
588
|
-
properties: {
|
|
589
|
-
key: {
|
|
590
|
-
type: string;
|
|
591
|
-
};
|
|
592
|
-
value: {
|
|
593
|
-
type: string;
|
|
594
|
-
};
|
|
595
|
-
};
|
|
596
|
-
};
|
|
597
|
-
};
|
|
598
|
-
};
|
|
599
|
-
};
|
|
600
|
-
})[];
|
|
601
|
-
};
|
|
602
378
|
target: {
|
|
603
379
|
type: string;
|
|
604
380
|
enum: string[];
|
|
@@ -802,118 +578,6 @@ export declare const BannerCard: {
|
|
|
802
578
|
};
|
|
803
579
|
};
|
|
804
580
|
};
|
|
805
|
-
analyticsEvents: {
|
|
806
|
-
anyOf: ({
|
|
807
|
-
type: string;
|
|
808
|
-
additionalProperties: boolean;
|
|
809
|
-
required: string[];
|
|
810
|
-
properties: {
|
|
811
|
-
name: {
|
|
812
|
-
type: string;
|
|
813
|
-
};
|
|
814
|
-
type: {
|
|
815
|
-
type: string;
|
|
816
|
-
};
|
|
817
|
-
counters: {
|
|
818
|
-
type: string;
|
|
819
|
-
additionalProperties: boolean;
|
|
820
|
-
required: never[];
|
|
821
|
-
properties: {
|
|
822
|
-
include: {
|
|
823
|
-
type: string;
|
|
824
|
-
items: {
|
|
825
|
-
type: string;
|
|
826
|
-
};
|
|
827
|
-
};
|
|
828
|
-
exclude: {
|
|
829
|
-
type: string;
|
|
830
|
-
items: {
|
|
831
|
-
type: string;
|
|
832
|
-
};
|
|
833
|
-
};
|
|
834
|
-
};
|
|
835
|
-
};
|
|
836
|
-
category: {
|
|
837
|
-
type: string;
|
|
838
|
-
};
|
|
839
|
-
label: {
|
|
840
|
-
type: string;
|
|
841
|
-
};
|
|
842
|
-
params: {
|
|
843
|
-
type: string;
|
|
844
|
-
items: {
|
|
845
|
-
type: string;
|
|
846
|
-
additionalProperties: boolean;
|
|
847
|
-
required: string[];
|
|
848
|
-
properties: {
|
|
849
|
-
key: {
|
|
850
|
-
type: string;
|
|
851
|
-
};
|
|
852
|
-
value: {
|
|
853
|
-
type: string;
|
|
854
|
-
};
|
|
855
|
-
};
|
|
856
|
-
};
|
|
857
|
-
};
|
|
858
|
-
};
|
|
859
|
-
} | {
|
|
860
|
-
type: string;
|
|
861
|
-
items: {
|
|
862
|
-
type: string;
|
|
863
|
-
additionalProperties: boolean;
|
|
864
|
-
required: string[];
|
|
865
|
-
properties: {
|
|
866
|
-
name: {
|
|
867
|
-
type: string;
|
|
868
|
-
};
|
|
869
|
-
type: {
|
|
870
|
-
type: string;
|
|
871
|
-
};
|
|
872
|
-
counters: {
|
|
873
|
-
type: string;
|
|
874
|
-
additionalProperties: boolean;
|
|
875
|
-
required: never[];
|
|
876
|
-
properties: {
|
|
877
|
-
include: {
|
|
878
|
-
type: string;
|
|
879
|
-
items: {
|
|
880
|
-
type: string;
|
|
881
|
-
};
|
|
882
|
-
};
|
|
883
|
-
exclude: {
|
|
884
|
-
type: string;
|
|
885
|
-
items: {
|
|
886
|
-
type: string;
|
|
887
|
-
};
|
|
888
|
-
};
|
|
889
|
-
};
|
|
890
|
-
};
|
|
891
|
-
category: {
|
|
892
|
-
type: string;
|
|
893
|
-
};
|
|
894
|
-
label: {
|
|
895
|
-
type: string;
|
|
896
|
-
};
|
|
897
|
-
params: {
|
|
898
|
-
type: string;
|
|
899
|
-
items: {
|
|
900
|
-
type: string;
|
|
901
|
-
additionalProperties: boolean;
|
|
902
|
-
required: string[];
|
|
903
|
-
properties: {
|
|
904
|
-
key: {
|
|
905
|
-
type: string;
|
|
906
|
-
};
|
|
907
|
-
value: {
|
|
908
|
-
type: string;
|
|
909
|
-
};
|
|
910
|
-
};
|
|
911
|
-
};
|
|
912
|
-
};
|
|
913
|
-
};
|
|
914
|
-
};
|
|
915
|
-
})[];
|
|
916
|
-
};
|
|
917
581
|
target: {
|
|
918
582
|
type: string;
|
|
919
583
|
enum: string[];
|
|
@@ -426,118 +426,6 @@ export declare const MediaBlock: {
|
|
|
426
426
|
};
|
|
427
427
|
};
|
|
428
428
|
};
|
|
429
|
-
analyticsEvents: {
|
|
430
|
-
anyOf: ({
|
|
431
|
-
type: string;
|
|
432
|
-
additionalProperties: boolean;
|
|
433
|
-
required: string[];
|
|
434
|
-
properties: {
|
|
435
|
-
name: {
|
|
436
|
-
type: string;
|
|
437
|
-
};
|
|
438
|
-
type: {
|
|
439
|
-
type: string;
|
|
440
|
-
};
|
|
441
|
-
counters: {
|
|
442
|
-
type: string;
|
|
443
|
-
additionalProperties: boolean;
|
|
444
|
-
required: never[];
|
|
445
|
-
properties: {
|
|
446
|
-
include: {
|
|
447
|
-
type: string;
|
|
448
|
-
items: {
|
|
449
|
-
type: string;
|
|
450
|
-
};
|
|
451
|
-
};
|
|
452
|
-
exclude: {
|
|
453
|
-
type: string;
|
|
454
|
-
items: {
|
|
455
|
-
type: string;
|
|
456
|
-
};
|
|
457
|
-
};
|
|
458
|
-
};
|
|
459
|
-
};
|
|
460
|
-
category: {
|
|
461
|
-
type: string;
|
|
462
|
-
};
|
|
463
|
-
label: {
|
|
464
|
-
type: string;
|
|
465
|
-
};
|
|
466
|
-
params: {
|
|
467
|
-
type: string;
|
|
468
|
-
items: {
|
|
469
|
-
type: string;
|
|
470
|
-
additionalProperties: boolean;
|
|
471
|
-
required: string[];
|
|
472
|
-
properties: {
|
|
473
|
-
key: {
|
|
474
|
-
type: string;
|
|
475
|
-
};
|
|
476
|
-
value: {
|
|
477
|
-
type: string;
|
|
478
|
-
};
|
|
479
|
-
};
|
|
480
|
-
};
|
|
481
|
-
};
|
|
482
|
-
};
|
|
483
|
-
} | {
|
|
484
|
-
type: string;
|
|
485
|
-
items: {
|
|
486
|
-
type: string;
|
|
487
|
-
additionalProperties: boolean;
|
|
488
|
-
required: string[];
|
|
489
|
-
properties: {
|
|
490
|
-
name: {
|
|
491
|
-
type: string;
|
|
492
|
-
};
|
|
493
|
-
type: {
|
|
494
|
-
type: string;
|
|
495
|
-
};
|
|
496
|
-
counters: {
|
|
497
|
-
type: string;
|
|
498
|
-
additionalProperties: boolean;
|
|
499
|
-
required: never[];
|
|
500
|
-
properties: {
|
|
501
|
-
include: {
|
|
502
|
-
type: string;
|
|
503
|
-
items: {
|
|
504
|
-
type: string;
|
|
505
|
-
};
|
|
506
|
-
};
|
|
507
|
-
exclude: {
|
|
508
|
-
type: string;
|
|
509
|
-
items: {
|
|
510
|
-
type: string;
|
|
511
|
-
};
|
|
512
|
-
};
|
|
513
|
-
};
|
|
514
|
-
};
|
|
515
|
-
category: {
|
|
516
|
-
type: string;
|
|
517
|
-
};
|
|
518
|
-
label: {
|
|
519
|
-
type: string;
|
|
520
|
-
};
|
|
521
|
-
params: {
|
|
522
|
-
type: string;
|
|
523
|
-
items: {
|
|
524
|
-
type: string;
|
|
525
|
-
additionalProperties: boolean;
|
|
526
|
-
required: string[];
|
|
527
|
-
properties: {
|
|
528
|
-
key: {
|
|
529
|
-
type: string;
|
|
530
|
-
};
|
|
531
|
-
value: {
|
|
532
|
-
type: string;
|
|
533
|
-
};
|
|
534
|
-
};
|
|
535
|
-
};
|
|
536
|
-
};
|
|
537
|
-
};
|
|
538
|
-
};
|
|
539
|
-
})[];
|
|
540
|
-
};
|
|
541
429
|
target: {
|
|
542
430
|
type: string;
|
|
543
431
|
enum: string[];
|
|
@@ -7,22 +7,19 @@ const utils_1 = require("../../utils");
|
|
|
7
7
|
const utils_2 = require("./utils");
|
|
8
8
|
const localeContext_1 = require("../../context/localeContext/localeContext");
|
|
9
9
|
const useMetrika_1 = require("../../hooks/useMetrika");
|
|
10
|
-
const useAnalytics_1 = require("../../hooks/useAnalytics");
|
|
11
10
|
const icons_1 = require("../../icons");
|
|
12
11
|
const b = (0, utils_1.block)('button-block');
|
|
13
12
|
const Button = (props) => {
|
|
14
13
|
const handleMetrika = (0, useMetrika_1.useMetrika)();
|
|
15
|
-
const handleAnalytics = (0, useAnalytics_1.useAnalytics)();
|
|
16
14
|
const { lang, tld } = (0, react_1.useContext)(localeContext_1.LocaleContext);
|
|
17
|
-
const { className, metrikaGoals, pixelEvents,
|
|
15
|
+
const { className, metrikaGoals, pixelEvents, size = 'l', theme = 'normal', url, img, onClick: onClickOrigin, text } = props, rest = tslib_1.__rest(props, ["className", "metrikaGoals", "pixelEvents", "size", "theme", "url", "img", "onClick", "text"]);
|
|
18
16
|
const defaultImgPosition = 'left';
|
|
19
17
|
const onClick = (0, react_1.useCallback)(() => {
|
|
20
18
|
handleMetrika({ metrikaGoals, pixelEvents });
|
|
21
|
-
handleAnalytics(analyticsEvents);
|
|
22
19
|
if (onClickOrigin) {
|
|
23
20
|
onClickOrigin();
|
|
24
21
|
}
|
|
25
|
-
}, [handleMetrika, metrikaGoals, pixelEvents,
|
|
22
|
+
}, [handleMetrika, metrikaGoals, pixelEvents, onClickOrigin]);
|
|
26
23
|
const buttonImg = img instanceof Object
|
|
27
24
|
? { url: img.url, position: img.position || defaultImgPosition, alt: img.alt }
|
|
28
25
|
: { url: img, position: defaultImgPosition };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React, { ReactElement, HTMLAttributeAnchorTarget } from 'react';
|
|
2
2
|
import { ButtonPixel, CardBaseProps as CardBaseParams, ImageProps, MetrikaGoal, WithChildren } from '../../models';
|
|
3
|
-
import { AnalyticsEvent } from '../../models/common';
|
|
4
3
|
export interface CardBaseProps extends CardBaseParams {
|
|
5
4
|
className?: string;
|
|
6
5
|
bodyClassName?: string;
|
|
@@ -10,7 +9,6 @@ export interface CardBaseProps extends CardBaseParams {
|
|
|
10
9
|
target?: HTMLAttributeAnchorTarget;
|
|
11
10
|
metrikaGoals?: MetrikaGoal;
|
|
12
11
|
pixelEvents?: ButtonPixel;
|
|
13
|
-
analyticsEvents?: AnalyticsEvent | AnalyticsEvent[];
|
|
14
12
|
}
|
|
15
13
|
export interface CardHeaderBaseProps {
|
|
16
14
|
className?: string;
|
|
@@ -7,15 +7,13 @@ const utils_1 = require("../../utils");
|
|
|
7
7
|
const BackgroundImage_1 = tslib_1.__importDefault(require("../BackgroundImage/BackgroundImage"));
|
|
8
8
|
const RouterLink_1 = tslib_1.__importDefault(require("../RouterLink/RouterLink"));
|
|
9
9
|
const useMetrika_1 = require("../../hooks/useMetrika");
|
|
10
|
-
const useAnalytics_1 = require("../../hooks/useAnalytics");
|
|
11
10
|
const b = (0, utils_1.block)('card-base-block');
|
|
12
11
|
const Header = () => null;
|
|
13
12
|
const Content = () => null;
|
|
14
13
|
const Footer = () => null;
|
|
15
14
|
const Layout = (props) => {
|
|
16
|
-
const { className, bodyClassName, metrikaGoals, pixelEvents,
|
|
15
|
+
const { className, bodyClassName, metrikaGoals, pixelEvents, contentClassName, children, url, target, border = 'shadow', } = props;
|
|
17
16
|
const handleMetrika = (0, useMetrika_1.useMetrika)();
|
|
18
|
-
const handleAnalytics = (0, useAnalytics_1.useAnalytics)();
|
|
19
17
|
let header, content, footer, image, headerClass, footerClass;
|
|
20
18
|
function handleChild(child) {
|
|
21
19
|
switch (child.type) {
|
|
@@ -48,7 +46,6 @@ const Layout = (props) => {
|
|
|
48
46
|
const fullClassName = b({ border }, className);
|
|
49
47
|
const onClick = () => {
|
|
50
48
|
handleMetrika({ metrikaGoals, pixelEvents });
|
|
51
|
-
handleAnalytics(analyticsEvents);
|
|
52
49
|
};
|
|
53
50
|
return url ? (react_1.default.createElement(RouterLink_1.default, { href: url },
|
|
54
51
|
react_1.default.createElement("a", { href: url, target: target, rel: target === '_blank' ? 'noopener noreferrer' : undefined, className: fullClassName, draggable: false, onDragStart: (e) => e.preventDefault(), onClick: onClick }, cardContent))) : (react_1.default.createElement("div", { className: fullClassName }, cardContent));
|
|
@@ -4,15 +4,12 @@ const tslib_1 = require("tslib");
|
|
|
4
4
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
5
5
|
const utils_1 = require("../../utils");
|
|
6
6
|
const useMetrika_1 = require("../../hooks/useMetrika");
|
|
7
|
-
const useAnalytics_1 = require("../../hooks/useAnalytics");
|
|
8
7
|
const b = (0, utils_1.block)('header-breadcrumbs');
|
|
9
8
|
function HeaderBreadcrumbs(props) {
|
|
10
|
-
const { items, metrikaGoals, pixelEvents,
|
|
9
|
+
const { items, metrikaGoals, pixelEvents, theme = 'light', className } = props;
|
|
11
10
|
const handleMetrika = (0, useMetrika_1.useMetrika)();
|
|
12
|
-
const handleAnalytics = (0, useAnalytics_1.useAnalytics)();
|
|
13
11
|
const onClick = () => {
|
|
14
12
|
handleMetrika({ metrikaGoals, pixelEvents });
|
|
15
|
-
handleAnalytics(analyticsEvents);
|
|
16
13
|
};
|
|
17
14
|
return (react_1.default.createElement("div", { className: b({ theme }, className) }, items.map((item) => (react_1.default.createElement("div", { className: b('item'), key: item.url },
|
|
18
15
|
react_1.default.createElement("a", { href: item.url, className: b('text'), onClick: onClick }, item.text))))));
|
|
@@ -10,7 +10,6 @@ const BackLink_1 = tslib_1.__importDefault(require("../BackLink/BackLink"));
|
|
|
10
10
|
const localeContext_1 = require("../../context/localeContext/localeContext");
|
|
11
11
|
const locationContext_1 = require("../../context/locationContext/locationContext");
|
|
12
12
|
const useMetrika_1 = require("../../hooks/useMetrika");
|
|
13
|
-
const useAnalytics_1 = require("../../hooks/useAnalytics");
|
|
14
13
|
const b = (0, utils_1.block)('link-block');
|
|
15
14
|
const WORD_JOINER_SYM = '\u200b';
|
|
16
15
|
function getArrowSize(size) {
|
|
@@ -26,16 +25,14 @@ function getArrowSize(size) {
|
|
|
26
25
|
}
|
|
27
26
|
}
|
|
28
27
|
const LinkBlock = (props) => {
|
|
29
|
-
const { text, url, arrow, metrikaGoals, pixelEvents,
|
|
28
|
+
const { text, url, arrow, metrikaGoals, pixelEvents, theme = 'file-link', colorTheme = 'light', textSize = 'm', className, target, children, } = props;
|
|
30
29
|
const handleMetrika = (0, useMetrika_1.useMetrika)();
|
|
31
|
-
const handleAnalytics = (0, useAnalytics_1.useAnalytics)();
|
|
32
30
|
const { hostname } = (0, react_1.useContext)(locationContext_1.LocationContext);
|
|
33
31
|
const { tld } = (0, react_1.useContext)(localeContext_1.LocaleContext);
|
|
34
32
|
const href = (0, utils_1.setUrlTld)(props.url, tld);
|
|
35
33
|
const defaultTextSize = theme === 'back' ? 'l' : 'm';
|
|
36
34
|
const onClick = () => {
|
|
37
35
|
handleMetrika({ metrikaGoals, pixelEvents });
|
|
38
|
-
handleAnalytics(analyticsEvents);
|
|
39
36
|
};
|
|
40
37
|
const getLinkByType = () => {
|
|
41
38
|
switch (theme) {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { PixelEvent } from '../../models';
|
|
2
|
-
import { AnalyticsEvent } from '../../models/common';
|
|
3
2
|
export declare const YANDEX_FORM_ORIGIN = "https://forms.yandex.ru";
|
|
4
3
|
export interface YandexFormProps {
|
|
5
4
|
id: number | string;
|
|
@@ -15,7 +14,6 @@ export interface YandexFormProps {
|
|
|
15
14
|
onLoad?: () => void;
|
|
16
15
|
metrikaGoals?: string | string[];
|
|
17
16
|
pixelEvents?: string | string[] | PixelEvent | PixelEvent[];
|
|
18
|
-
analyticsEvents?: AnalyticsEvent | AnalyticsEvent[];
|
|
19
17
|
}
|
|
20
18
|
declare const YandexForm: (props: YandexFormProps) => JSX.Element;
|
|
21
19
|
export default YandexForm;
|
|
@@ -8,17 +8,15 @@ const localeContext_1 = require("../../context/localeContext");
|
|
|
8
8
|
const mobileContext_1 = require("../../context/mobileContext");
|
|
9
9
|
const utils_1 = require("../../utils");
|
|
10
10
|
const useMetrika_1 = require("../../hooks/useMetrika");
|
|
11
|
-
const useAnalytics_1 = require("../..//hooks/useAnalytics");
|
|
12
11
|
exports.YANDEX_FORM_ORIGIN = 'https://forms.yandex.ru';
|
|
13
12
|
const CONTAINER_ID = 'pc-yandex-form-container';
|
|
14
13
|
const b = (0, utils_1.block)('yandex-form');
|
|
15
14
|
const YandexForm = (props) => {
|
|
16
|
-
const { onLoad, id, params, className, theme, containerId = CONTAINER_ID, headerHeight = constants_1.HEADER_HEIGHT, onSubmit, metrikaGoals, pixelEvents,
|
|
15
|
+
const { onLoad, id, params, className, theme, containerId = CONTAINER_ID, headerHeight = constants_1.HEADER_HEIGHT, onSubmit, metrikaGoals, pixelEvents, customFormOrigin, } = props;
|
|
17
16
|
const formContainerRef = (0, react_1.useRef)(null);
|
|
18
17
|
const iframeRef = (0, react_1.useRef)();
|
|
19
18
|
const yaFormOrigin = customFormOrigin || exports.YANDEX_FORM_ORIGIN;
|
|
20
19
|
const handleMetrika = (0, useMetrika_1.useMetrika)();
|
|
21
|
-
const handleAnalytics = (0, useAnalytics_1.useAnalytics)();
|
|
22
20
|
const isMobile = (0, react_1.useContext)(mobileContext_1.MobileContext);
|
|
23
21
|
const locale = (0, react_1.useContext)(localeContext_1.LocaleContext);
|
|
24
22
|
const updateFormIframe = (0, react_1.useCallback)((container) => {
|
|
@@ -59,19 +57,10 @@ const YandexForm = (props) => {
|
|
|
59
57
|
window.scrollBy(0, top - headerHeight);
|
|
60
58
|
}
|
|
61
59
|
handleMetrika({ metrikaGoals, pixelEvents });
|
|
62
|
-
handleAnalytics(analyticsEvents);
|
|
63
60
|
if (onSubmit) {
|
|
64
61
|
onSubmit();
|
|
65
62
|
}
|
|
66
|
-
}, [
|
|
67
|
-
handleMetrika,
|
|
68
|
-
metrikaGoals,
|
|
69
|
-
pixelEvents,
|
|
70
|
-
handleAnalytics,
|
|
71
|
-
analyticsEvents,
|
|
72
|
-
onSubmit,
|
|
73
|
-
headerHeight,
|
|
74
|
-
]);
|
|
63
|
+
}, [handleMetrika, metrikaGoals, pixelEvents, onSubmit, headerHeight]);
|
|
75
64
|
const handleMessage = (0, react_1.useCallback)(({ origin, data }) => {
|
|
76
65
|
if (origin !== yaFormOrigin) {
|
|
77
66
|
return;
|