@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
@@ -3,10 +3,12 @@ import * as common from './common';
3
3
  import * as subBlocks from './sub-blocks';
4
4
  import * as pixel from './pixel';
5
5
  import * as utils from './utils';
6
+ import * as navigation from './navigation';
6
7
  export declare const validators: {
7
8
  blocks: typeof blocks;
8
9
  common: typeof common;
9
10
  subBlocks: typeof subBlocks;
10
11
  pixel: typeof pixel;
11
12
  utils: typeof utils;
13
+ navigation: typeof navigation;
12
14
  };
@@ -7,10 +7,12 @@ const common = tslib_1.__importStar(require("./common"));
7
7
  const subBlocks = tslib_1.__importStar(require("./sub-blocks"));
8
8
  const pixel = tslib_1.__importStar(require("./pixel"));
9
9
  const utils = tslib_1.__importStar(require("./utils"));
10
+ const navigation = tslib_1.__importStar(require("./navigation"));
10
11
  exports.validators = {
11
12
  blocks,
12
13
  common,
13
14
  subBlocks,
14
15
  pixel,
15
16
  utils,
17
+ navigation,
16
18
  };
@@ -0,0 +1 @@
1
+ export * from '../../navigation/schema';
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./analyticsContext"), exports);
4
+ tslib_1.__exportStar(require("../../navigation/schema"), exports);
@@ -8,14 +8,12 @@ const mobileContext_1 = require("../../context/mobileContext");
8
8
  const useMetrika_1 = require("../../hooks/useMetrika");
9
9
  const hooks_1 = require("../../hooks");
10
10
  const HubspotFormContainer_1 = tslib_1.__importDefault(require("./HubspotFormContainer"));
11
- const useAnalytics_1 = require("../../hooks/useAnalytics");
12
11
  const b = (0, utils_1.block)('hubspot-form');
13
12
  const HubspotForm = (props) => {
14
13
  const { className, theme: themeProp, isMobile: isMobileProp, formId, formInstanceId, portalId, region, formClassName, pixelEvents,
15
14
  // hubspotEvents, // TODO: decide how to handle them
16
- analyticsEvents, onBeforeSubmit, onSubmit, onBeforeLoad, onLoad, } = props;
15
+ onBeforeSubmit, onSubmit, onBeforeLoad, onLoad, } = props;
17
16
  const handleMetrika = (0, useMetrika_1.useMetrika)();
18
- const handleAnalytics = (0, useAnalytics_1.useAnalytics)();
19
17
  const { themeValue } = (0, react_1.useContext)(ThemeValueContext_1.ThemeValueContext);
20
18
  const isMobileValue = (0, react_1.useContext)(mobileContext_1.MobileContext);
21
19
  const theme = themeProp !== null && themeProp !== void 0 ? themeProp : themeValue;
@@ -26,19 +24,9 @@ const HubspotForm = (props) => {
26
24
  onLoad,
27
25
  onSubmit: (e) => {
28
26
  handleMetrika === null || handleMetrika === void 0 ? void 0 : handleMetrika({ pixelEvents });
29
- handleAnalytics(analyticsEvents);
30
27
  onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit(e);
31
28
  },
32
- }), [
33
- onBeforeLoad,
34
- onBeforeSubmit,
35
- onLoad,
36
- handleMetrika,
37
- pixelEvents,
38
- handleAnalytics,
39
- analyticsEvents,
40
- onSubmit,
41
- ]);
29
+ }), [onBeforeLoad, onBeforeSubmit, onLoad, handleMetrika, pixelEvents, onSubmit]);
42
30
  (0, hooks_1.useHandleHubspotEvents)(handlers, formId);
43
31
  return (react_1.default.createElement(HubspotFormContainer_1.default, { key: [formClassName, formId, formInstanceId, portalId, region].join(), className: b({ theme, mobile }, className), formClassName: formClassName, formId: formId, portalId: portalId, formInstanceId: formInstanceId, region: region }));
44
32
  };
@@ -173,113 +173,6 @@ export declare const BannerCardProps: {
173
173
  };
174
174
  };
175
175
  };
176
- events: {
177
- anyOf: ({
178
- type: {
179
- type: string;
180
- additionalProperties: boolean;
181
- required: string[];
182
- properties: {
183
- name: {
184
- type: string;
185
- };
186
- type: {
187
- type: string;
188
- };
189
- counters: {
190
- type: string;
191
- additionalProperties: boolean;
192
- required: never[];
193
- properties: {
194
- include: {
195
- type: string;
196
- items: string;
197
- };
198
- exclude: {
199
- type: string;
200
- items: string;
201
- };
202
- };
203
- };
204
- category: {
205
- type: string;
206
- };
207
- label: {
208
- type: string;
209
- };
210
- params: {
211
- type: string;
212
- items: {
213
- type: string;
214
- additionalProperties: boolean;
215
- required: string[];
216
- properties: {
217
- key: {
218
- type: string;
219
- };
220
- value: {
221
- type: string;
222
- };
223
- };
224
- };
225
- };
226
- };
227
- };
228
- items?: undefined;
229
- } | {
230
- type: string;
231
- items: {
232
- type: string;
233
- additionalProperties: boolean;
234
- required: string[];
235
- properties: {
236
- name: {
237
- type: string;
238
- };
239
- type: {
240
- type: string;
241
- };
242
- counters: {
243
- type: string;
244
- additionalProperties: boolean;
245
- required: never[];
246
- properties: {
247
- include: {
248
- type: string;
249
- items: string;
250
- };
251
- exclude: {
252
- type: string;
253
- items: string;
254
- };
255
- };
256
- };
257
- category: {
258
- type: string;
259
- };
260
- label: {
261
- type: string;
262
- };
263
- params: {
264
- type: string;
265
- items: {
266
- type: string;
267
- additionalProperties: boolean;
268
- required: string[];
269
- properties: {
270
- key: {
271
- type: string;
272
- };
273
- value: {
274
- type: string;
275
- };
276
- };
277
- };
278
- };
279
- };
280
- };
281
- })[];
282
- };
283
176
  target: {
284
177
  type: string;
285
178
  enum: string[];
@@ -482,113 +375,6 @@ export declare const BannerBlock: {
482
375
  };
483
376
  };
484
377
  };
485
- events: {
486
- anyOf: ({
487
- type: {
488
- type: string;
489
- additionalProperties: boolean;
490
- required: string[];
491
- properties: {
492
- name: {
493
- type: string;
494
- };
495
- type: {
496
- type: string;
497
- };
498
- counters: {
499
- type: string;
500
- additionalProperties: boolean;
501
- required: never[];
502
- properties: {
503
- include: {
504
- type: string;
505
- items: string;
506
- };
507
- exclude: {
508
- type: string;
509
- items: string;
510
- };
511
- };
512
- };
513
- category: {
514
- type: string;
515
- };
516
- label: {
517
- type: string;
518
- };
519
- params: {
520
- type: string;
521
- items: {
522
- type: string;
523
- additionalProperties: boolean;
524
- required: string[];
525
- properties: {
526
- key: {
527
- type: string;
528
- };
529
- value: {
530
- type: string;
531
- };
532
- };
533
- };
534
- };
535
- };
536
- };
537
- items?: undefined;
538
- } | {
539
- type: string;
540
- items: {
541
- type: string;
542
- additionalProperties: boolean;
543
- required: string[];
544
- properties: {
545
- name: {
546
- type: string;
547
- };
548
- type: {
549
- type: string;
550
- };
551
- counters: {
552
- type: string;
553
- additionalProperties: boolean;
554
- required: never[];
555
- properties: {
556
- include: {
557
- type: string;
558
- items: string;
559
- };
560
- exclude: {
561
- type: string;
562
- items: string;
563
- };
564
- };
565
- };
566
- category: {
567
- type: string;
568
- };
569
- label: {
570
- type: string;
571
- };
572
- params: {
573
- type: string;
574
- items: {
575
- type: string;
576
- additionalProperties: boolean;
577
- required: string[];
578
- properties: {
579
- key: {
580
- type: string;
581
- };
582
- value: {
583
- type: string;
584
- };
585
- };
586
- };
587
- };
588
- };
589
- };
590
- })[];
591
- };
592
378
  target: {
593
379
  type: string;
594
380
  enum: string[];
@@ -792,113 +578,6 @@ export declare const BannerCard: {
792
578
  };
793
579
  };
794
580
  };
795
- events: {
796
- anyOf: ({
797
- type: {
798
- type: string;
799
- additionalProperties: boolean;
800
- required: string[];
801
- properties: {
802
- name: {
803
- type: string;
804
- };
805
- type: {
806
- type: string;
807
- };
808
- counters: {
809
- type: string;
810
- additionalProperties: boolean;
811
- required: never[];
812
- properties: {
813
- include: {
814
- type: string;
815
- items: string;
816
- };
817
- exclude: {
818
- type: string;
819
- items: string;
820
- };
821
- };
822
- };
823
- category: {
824
- type: string;
825
- };
826
- label: {
827
- type: string;
828
- };
829
- params: {
830
- type: string;
831
- items: {
832
- type: string;
833
- additionalProperties: boolean;
834
- required: string[];
835
- properties: {
836
- key: {
837
- type: string;
838
- };
839
- value: {
840
- type: string;
841
- };
842
- };
843
- };
844
- };
845
- };
846
- };
847
- items?: undefined;
848
- } | {
849
- type: string;
850
- items: {
851
- type: string;
852
- additionalProperties: boolean;
853
- required: string[];
854
- properties: {
855
- name: {
856
- type: string;
857
- };
858
- type: {
859
- type: string;
860
- };
861
- counters: {
862
- type: string;
863
- additionalProperties: boolean;
864
- required: never[];
865
- properties: {
866
- include: {
867
- type: string;
868
- items: string;
869
- };
870
- exclude: {
871
- type: string;
872
- items: string;
873
- };
874
- };
875
- };
876
- category: {
877
- type: string;
878
- };
879
- label: {
880
- type: string;
881
- };
882
- params: {
883
- type: string;
884
- items: {
885
- type: string;
886
- additionalProperties: boolean;
887
- required: string[];
888
- properties: {
889
- key: {
890
- type: string;
891
- };
892
- value: {
893
- type: string;
894
- };
895
- };
896
- };
897
- };
898
- };
899
- };
900
- })[];
901
- };
902
581
  target: {
903
582
  type: string;
904
583
  enum: string[];
@@ -426,113 +426,6 @@ export declare const MediaBlock: {
426
426
  };
427
427
  };
428
428
  };
429
- events: {
430
- anyOf: ({
431
- type: {
432
- type: string;
433
- additionalProperties: boolean;
434
- required: string[];
435
- properties: {
436
- name: {
437
- type: string;
438
- };
439
- type: {
440
- type: string;
441
- };
442
- counters: {
443
- type: string;
444
- additionalProperties: boolean;
445
- required: never[];
446
- properties: {
447
- include: {
448
- type: string;
449
- items: string;
450
- };
451
- exclude: {
452
- type: string;
453
- items: string;
454
- };
455
- };
456
- };
457
- category: {
458
- type: string;
459
- };
460
- label: {
461
- type: string;
462
- };
463
- params: {
464
- type: string;
465
- items: {
466
- type: string;
467
- additionalProperties: boolean;
468
- required: string[];
469
- properties: {
470
- key: {
471
- type: string;
472
- };
473
- value: {
474
- type: string;
475
- };
476
- };
477
- };
478
- };
479
- };
480
- };
481
- items?: undefined;
482
- } | {
483
- type: string;
484
- items: {
485
- type: string;
486
- additionalProperties: boolean;
487
- required: string[];
488
- properties: {
489
- name: {
490
- type: string;
491
- };
492
- type: {
493
- type: string;
494
- };
495
- counters: {
496
- type: string;
497
- additionalProperties: boolean;
498
- required: never[];
499
- properties: {
500
- include: {
501
- type: string;
502
- items: string;
503
- };
504
- exclude: {
505
- type: string;
506
- items: string;
507
- };
508
- };
509
- };
510
- category: {
511
- type: string;
512
- };
513
- label: {
514
- type: string;
515
- };
516
- params: {
517
- type: string;
518
- items: {
519
- type: string;
520
- additionalProperties: boolean;
521
- required: string[];
522
- properties: {
523
- key: {
524
- type: string;
525
- };
526
- value: {
527
- type: string;
528
- };
529
- };
530
- };
531
- };
532
- };
533
- };
534
- })[];
535
- };
536
429
  target: {
537
430
  type: string;
538
431
  enum: string[];
@@ -5,23 +5,20 @@ import { block, setUrlTld } from '../../utils';
5
5
  import { toCommonSize, toCommonView } from './utils';
6
6
  import { LocaleContext } from '../../context/localeContext/localeContext';
7
7
  import { useMetrika } from '../../hooks/useMetrika';
8
- import { useAnalytics } from '../../hooks/useAnalytics';
9
8
  import { Github } from '../../icons';
10
9
  import './Button.css';
11
10
  const b = block('button-block');
12
11
  const Button = (props) => {
13
12
  const handleMetrika = useMetrika();
14
- const handleAnalytics = useAnalytics();
15
13
  const { lang, tld } = useContext(LocaleContext);
16
- const { className, metrikaGoals, pixelEvents, analyticsEvents, size = 'l', theme = 'normal', url, img, onClick: onClickOrigin, text } = props, rest = __rest(props, ["className", "metrikaGoals", "pixelEvents", "analyticsEvents", "size", "theme", "url", "img", "onClick", "text"]);
14
+ const { className, metrikaGoals, pixelEvents, size = 'l', theme = 'normal', url, img, onClick: onClickOrigin, text } = props, rest = __rest(props, ["className", "metrikaGoals", "pixelEvents", "size", "theme", "url", "img", "onClick", "text"]);
17
15
  const defaultImgPosition = 'left';
18
16
  const onClick = useCallback(() => {
19
17
  handleMetrika({ metrikaGoals, pixelEvents });
20
- handleAnalytics(analyticsEvents);
21
18
  if (onClickOrigin) {
22
19
  onClickOrigin();
23
20
  }
24
- }, [handleMetrika, metrikaGoals, pixelEvents, handleAnalytics, analyticsEvents, onClickOrigin]);
21
+ }, [handleMetrika, metrikaGoals, pixelEvents, onClickOrigin]);
25
22
  const buttonImg = img instanceof Object
26
23
  ? { url: img.url, position: img.position || defaultImgPosition, alt: img.alt }
27
24
  : { 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
  import './CardBase.css';
5
4
  export interface CardBaseProps extends CardBaseParams {
6
5
  className?: string;
@@ -11,7 +10,6 @@ export interface CardBaseProps extends CardBaseParams {
11
10
  target?: HTMLAttributeAnchorTarget;
12
11
  metrikaGoals?: MetrikaGoal;
13
12
  pixelEvents?: ButtonPixel;
14
- analyticsEvents?: AnalyticsEvent | AnalyticsEvent[];
15
13
  }
16
14
  export interface CardHeaderBaseProps {
17
15
  className?: string;
@@ -3,16 +3,14 @@ import { block } from '../../utils';
3
3
  import BackgroundImage from '../BackgroundImage/BackgroundImage';
4
4
  import RouterLink from '../RouterLink/RouterLink';
5
5
  import { useMetrika } from '../../hooks/useMetrika';
6
- import { useAnalytics } from '../../hooks/useAnalytics';
7
6
  import './CardBase.css';
8
7
  const b = block('card-base-block');
9
8
  const Header = () => null;
10
9
  const Content = () => null;
11
10
  const Footer = () => null;
12
11
  export const Layout = (props) => {
13
- const { className, bodyClassName, metrikaGoals, pixelEvents, analyticsEvents, contentClassName, children, url, target, border = 'shadow', } = props;
12
+ const { className, bodyClassName, metrikaGoals, pixelEvents, contentClassName, children, url, target, border = 'shadow', } = props;
14
13
  const handleMetrika = useMetrika();
15
- const handleAnalytics = useAnalytics();
16
14
  let header, content, footer, image, headerClass, footerClass;
17
15
  function handleChild(child) {
18
16
  switch (child.type) {
@@ -45,7 +43,6 @@ export const Layout = (props) => {
45
43
  const fullClassName = b({ border }, className);
46
44
  const onClick = () => {
47
45
  handleMetrika({ metrikaGoals, pixelEvents });
48
- handleAnalytics(analyticsEvents);
49
46
  };
50
47
  return url ? (React.createElement(RouterLink, { href: url },
51
48
  React.createElement("a", { href: url, target: target, rel: target === '_blank' ? 'noopener noreferrer' : undefined, className: fullClassName, draggable: false, onDragStart: (e) => e.preventDefault(), onClick: onClick }, cardContent))) : (React.createElement("div", { className: fullClassName }, cardContent));
@@ -1,16 +1,13 @@
1
1
  import React from 'react';
2
2
  import { block } from '../../utils';
3
3
  import { useMetrika } from '../../hooks/useMetrika';
4
- import { useAnalytics } from '../../hooks/useAnalytics';
5
4
  import './HeaderBreadcrumbs.css';
6
5
  const b = block('header-breadcrumbs');
7
6
  export default function HeaderBreadcrumbs(props) {
8
- const { items, metrikaGoals, pixelEvents, analyticsEvents, theme = 'light', className } = props;
7
+ const { items, metrikaGoals, pixelEvents, theme = 'light', className } = props;
9
8
  const handleMetrika = useMetrika();
10
- const handleAnalytics = useAnalytics();
11
9
  const onClick = () => {
12
10
  handleMetrika({ metrikaGoals, pixelEvents });
13
- handleAnalytics(analyticsEvents);
14
11
  };
15
12
  return (React.createElement("div", { className: b({ theme }, className) }, items.map((item) => (React.createElement("div", { className: b('item'), key: item.url },
16
13
  React.createElement("a", { href: item.url, className: b('text'), onClick: onClick }, item.text))))));
@@ -7,7 +7,6 @@ import BackLink from '../BackLink/BackLink';
7
7
  import { LocaleContext } from '../../context/localeContext/localeContext';
8
8
  import { LocationContext } from '../../context/locationContext/locationContext';
9
9
  import { useMetrika } from '../../hooks/useMetrika';
10
- import { useAnalytics } from '../../hooks/useAnalytics';
11
10
  import './Link.css';
12
11
  const b = block('link-block');
13
12
  const WORD_JOINER_SYM = '\u200b';
@@ -24,16 +23,14 @@ function getArrowSize(size) {
24
23
  }
25
24
  }
26
25
  const LinkBlock = (props) => {
27
- const { text, url, arrow, metrikaGoals, pixelEvents, analyticsEvents, theme = 'file-link', colorTheme = 'light', textSize = 'm', className, target, children, } = props;
26
+ const { text, url, arrow, metrikaGoals, pixelEvents, theme = 'file-link', colorTheme = 'light', textSize = 'm', className, target, children, } = props;
28
27
  const handleMetrika = useMetrika();
29
- const handleAnalytics = useAnalytics();
30
28
  const { hostname } = useContext(LocationContext);
31
29
  const { tld } = useContext(LocaleContext);
32
30
  const href = setUrlTld(props.url, tld);
33
31
  const defaultTextSize = theme === 'back' ? 'l' : 'm';
34
32
  const onClick = () => {
35
33
  handleMetrika({ metrikaGoals, pixelEvents });
36
- handleAnalytics(analyticsEvents);
37
34
  };
38
35
  const getLinkByType = () => {
39
36
  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;