@gravity-ui/page-constructor 1.14.0 → 1.15.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 (73) hide show
  1. package/build/cjs/blocks/Banner/schema.d.ts +234 -0
  2. package/build/cjs/blocks/Media/schema.d.ts +78 -0
  3. package/build/cjs/components/Button/Button.js +5 -2
  4. package/build/cjs/components/CardBase/CardBase.d.ts +2 -0
  5. package/build/cjs/components/CardBase/CardBase.js +4 -1
  6. package/build/cjs/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +4 -1
  7. package/build/cjs/components/Link/Link.js +4 -1
  8. package/build/cjs/components/Media/Media.js +3 -2
  9. package/build/cjs/components/Media/Video/Video.js +4 -3
  10. package/build/cjs/components/ReactPlayer/ReactPlayer.js +27 -3
  11. package/build/cjs/components/YandexForm/YandexForm.d.ts +2 -0
  12. package/build/cjs/components/YandexForm/YandexForm.js +13 -2
  13. package/build/cjs/containers/PageConstructor/Provider.d.ts +2 -0
  14. package/build/cjs/containers/PageConstructor/Provider.js +3 -1
  15. package/build/cjs/context/analyticsContext/analyticsContext.d.ts +6 -0
  16. package/build/cjs/context/analyticsContext/analyticsContext.js +6 -0
  17. package/build/cjs/context/analyticsContext/index.d.ts +1 -0
  18. package/build/cjs/context/analyticsContext/index.js +4 -0
  19. package/build/cjs/context/metrikaContext/metrikaContext.d.ts +6 -0
  20. package/build/cjs/hooks/index.d.ts +1 -0
  21. package/build/cjs/hooks/index.js +1 -0
  22. package/build/cjs/hooks/useAnalytics.d.ts +2 -0
  23. package/build/cjs/hooks/useAnalytics.js +18 -0
  24. package/build/cjs/hooks/useMetrika.d.ts +6 -0
  25. package/build/cjs/hooks/useMetrika.js +8 -0
  26. package/build/cjs/models/common.d.ts +36 -0
  27. package/build/cjs/models/common.js +3 -0
  28. package/build/cjs/models/constructor-items/common.d.ts +6 -1
  29. package/build/cjs/models/constructor-items/sub-blocks.d.ts +2 -1
  30. package/build/cjs/schema/validators/common.d.ts +168 -0
  31. package/build/cjs/schema/validators/common.js +10 -0
  32. package/build/cjs/schema/validators/event.d.ts +91 -0
  33. package/build/cjs/schema/validators/event.js +90 -0
  34. package/build/cjs/sub-blocks/HubspotForm/index.js +13 -2
  35. package/build/esm/blocks/Banner/schema.d.ts +234 -0
  36. package/build/esm/blocks/Media/schema.d.ts +78 -0
  37. package/build/esm/components/Button/Button.js +5 -2
  38. package/build/esm/components/CardBase/CardBase.d.ts +2 -0
  39. package/build/esm/components/CardBase/CardBase.js +4 -1
  40. package/build/esm/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +4 -1
  41. package/build/esm/components/Link/Link.js +4 -1
  42. package/build/esm/components/Media/Media.js +3 -2
  43. package/build/esm/components/Media/Video/Video.js +4 -3
  44. package/build/esm/components/ReactPlayer/ReactPlayer.js +27 -3
  45. package/build/esm/components/YandexForm/YandexForm.d.ts +2 -0
  46. package/build/esm/components/YandexForm/YandexForm.js +13 -2
  47. package/build/esm/containers/PageConstructor/Provider.d.ts +2 -0
  48. package/build/esm/containers/PageConstructor/Provider.js +3 -1
  49. package/build/esm/context/analyticsContext/analyticsContext.d.ts +6 -0
  50. package/build/esm/context/analyticsContext/analyticsContext.js +2 -0
  51. package/build/esm/context/analyticsContext/index.d.ts +1 -0
  52. package/build/esm/context/analyticsContext/index.js +1 -0
  53. package/build/esm/context/metrikaContext/metrikaContext.d.ts +6 -0
  54. package/build/esm/hooks/index.d.ts +1 -0
  55. package/build/esm/hooks/index.js +1 -0
  56. package/build/esm/hooks/useAnalytics.d.ts +2 -0
  57. package/build/esm/hooks/useAnalytics.js +14 -0
  58. package/build/esm/hooks/useMetrika.d.ts +6 -0
  59. package/build/esm/hooks/useMetrika.js +8 -0
  60. package/build/esm/models/common.d.ts +36 -0
  61. package/build/esm/models/common.js +3 -0
  62. package/build/esm/models/constructor-items/common.d.ts +6 -1
  63. package/build/esm/models/constructor-items/sub-blocks.d.ts +2 -1
  64. package/build/esm/schema/validators/common.d.ts +168 -0
  65. package/build/esm/schema/validators/common.js +10 -0
  66. package/build/esm/schema/validators/event.d.ts +91 -0
  67. package/build/esm/schema/validators/event.js +87 -0
  68. package/build/esm/sub-blocks/HubspotForm/index.js +14 -3
  69. package/package.json +4 -1
  70. package/server/models/common.d.ts +36 -0
  71. package/server/models/common.js +3 -0
  72. package/server/models/constructor-items/common.d.ts +6 -1
  73. package/server/models/constructor-items/sub-blocks.d.ts +2 -1
@@ -4,6 +4,7 @@ exports.PageConstructorProvider = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const react_1 = tslib_1.__importStar(require("react"));
6
6
  const metrikaContext_1 = require("../../context/metrikaContext");
7
+ const analyticsContext_1 = require("../../context/analyticsContext");
7
8
  const mobileContext_1 = require("../../context/mobileContext");
8
9
  const projectSettingsContext_1 = require("../../context/projectSettingsContext");
9
10
  const ssrContext_1 = require("../../context/ssrContext");
@@ -12,7 +13,7 @@ const locationContext_1 = require("../../context/locationContext");
12
13
  const ThemeValueContext_1 = require("../../context/theme/ThemeValueContext");
13
14
  const constants_1 = require("../../components/constants");
14
15
  const PageConstructorProvider = (props) => {
15
- const { isMobile, locale = {}, location = {}, metrika = {}, ssrConfig = {}, projectSettings = {}, theme = constants_1.DEFAULT_THEME, children, } = props;
16
+ const { isMobile, locale = {}, location = {}, metrika = {}, analytics = {}, ssrConfig = {}, projectSettings = {}, theme = constants_1.DEFAULT_THEME, children, } = props;
16
17
  /* eslint-disable react/jsx-key */
17
18
  const context = [
18
19
  react_1.default.createElement(ThemeValueContext_1.ThemeValueContext.Provider, { value: { themeValue: theme } }),
@@ -21,6 +22,7 @@ const PageConstructorProvider = (props) => {
21
22
  react_1.default.createElement(locationContext_1.LocationContext.Provider, { value: location }),
22
23
  react_1.default.createElement(mobileContext_1.MobileContext.Provider, { value: Boolean(isMobile) }),
23
24
  react_1.default.createElement(metrikaContext_1.MetrikaContext.Provider, { value: metrika }),
25
+ react_1.default.createElement(analyticsContext_1.AnalyticsContext.Provider, { value: analytics }),
24
26
  react_1.default.createElement(ssrContext_1.SSRContext.Provider, { value: { isServer: ssrConfig === null || ssrConfig === void 0 ? void 0 : ssrConfig.isServer } }),
25
27
  ].reduceRight((prev, provider) => react_1.default.cloneElement(provider, {}, prev), children);
26
28
  /* eslint-enable react/jsx-key */
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { AnalyticsEventV2 } from '../../models';
3
+ export interface AnalyticsContextProps {
4
+ sendEvents?: (e: AnalyticsEventV2 | AnalyticsEventV2[]) => void;
5
+ }
6
+ export declare const AnalyticsContext: React.Context<AnalyticsContextProps>;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AnalyticsContext = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const react_1 = tslib_1.__importDefault(require("react"));
6
+ exports.AnalyticsContext = react_1.default.createContext({});
@@ -0,0 +1 @@
1
+ export * from './analyticsContext';
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./analyticsContext"), exports);
@@ -1,7 +1,13 @@
1
1
  import React from 'react';
2
2
  import { Metrika, Pixel } from '../../models';
3
3
  export interface MetrikaContextProps {
4
+ /**
5
+ * @deprecated Metrika will be deleted
6
+ */
4
7
  metrika?: Metrika;
8
+ /**
9
+ * @deprecated Metrika will be deleted
10
+ */
5
11
  pixel?: Pixel;
6
12
  }
7
13
  export declare const MetrikaContext: React.Context<MetrikaContextProps>;
@@ -2,4 +2,5 @@ export { default as useFocus } from './useFocus';
2
2
  export { default as useWindowBreakpoint } from './useWindowBreakpoint';
3
3
  export { useIntersection } from './useIntersection';
4
4
  export { default as useMount } from './useMount';
5
+ export * from './useAnalytics';
5
6
  export * from './hubspot';
@@ -10,4 +10,5 @@ var useIntersection_1 = require("./useIntersection");
10
10
  Object.defineProperty(exports, "useIntersection", { enumerable: true, get: function () { return useIntersection_1.useIntersection; } });
11
11
  var useMount_1 = require("./useMount");
12
12
  Object.defineProperty(exports, "useMount", { enumerable: true, get: function () { return tslib_1.__importDefault(useMount_1).default; } });
13
+ tslib_1.__exportStar(require("./useAnalytics"), exports);
13
14
  tslib_1.__exportStar(require("./hubspot"), exports);
@@ -0,0 +1,2 @@
1
+ import { AnalyticsEventV2 } from '../models';
2
+ export declare const useAnalytics: () => ((e?: AnalyticsEventV2 | AnalyticsEventV2[]) => void) | undefined;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useAnalytics = void 0;
4
+ const react_1 = require("react");
5
+ const analyticsContext_1 = require("../context/analyticsContext");
6
+ const useAnalytics = () => {
7
+ const { sendEvents } = (0, react_1.useContext)(analyticsContext_1.AnalyticsContext);
8
+ if (!sendEvents) {
9
+ return undefined;
10
+ }
11
+ return (e) => {
12
+ if (!e) {
13
+ return;
14
+ }
15
+ sendEvents(e);
16
+ };
17
+ };
18
+ exports.useAnalytics = useAnalytics;
@@ -1,7 +1,13 @@
1
1
  import { ButtonPixel, MetrikaGoal, PixelEvent } from '../models';
2
+ /**
3
+ * @deprecated Metrika will be deleted
4
+ */
2
5
  type UseMetrikaProps = {
3
6
  metrikaGoals?: MetrikaGoal;
4
7
  pixelEvents?: string | string[] | PixelEvent | PixelEvent[] | ButtonPixel;
5
8
  };
9
+ /**
10
+ * @deprecated useMetrika will be deleted
11
+ */
6
12
  export declare const useMetrika: () => ({ metrikaGoals, pixelEvents }: UseMetrikaProps) => void;
7
13
  export {};
@@ -5,12 +5,20 @@ const react_1 = require("react");
5
5
  const metrikaContext_1 = require("../context/metrikaContext");
6
6
  const models_1 = require("../models");
7
7
  const guards_1 = require("../models/guards");
8
+ // eslint-disable-next-line valid-jsdoc
9
+ /**
10
+ * @deprecated Metrika will be deleted, which uses this logic
11
+ */
8
12
  function isButtonPixel(pixelEvents) {
9
13
  if (Array.isArray(pixelEvents) && pixelEvents.length && 'name' in pixelEvents) {
10
14
  return true;
11
15
  }
12
16
  return false;
13
17
  }
18
+ // eslint-disable-next-line valid-jsdoc
19
+ /**
20
+ * @deprecated useMetrika will be deleted
21
+ */
14
22
  const useMetrika = () => {
15
23
  const { metrika, pixel } = (0, react_1.useContext)(metrikaContext_1.MetrikaContext);
16
24
  return ({ metrikaGoals, pixelEvents }) => {
@@ -7,12 +7,21 @@ export declare enum Theme {
7
7
  Light = "light",
8
8
  Dark = "dark"
9
9
  }
10
+ /**
11
+ * @deprecated Pixel will be deleted
12
+ */
10
13
  type PixelCommand = 'track' | 'trackCustom';
14
+ /**
15
+ * @deprecated Pixel will be deleted
16
+ */
11
17
  export interface PixelEvent {
12
18
  command: PixelCommand;
13
19
  event: PixelEventType | string;
14
20
  data?: Object;
15
21
  }
22
+ /**
23
+ * @deprecated Pixel will be deleted from package
24
+ */
16
25
  export declare enum PixelEventType {
17
26
  AddPaymentInfo = "AddPaymentInfo",
18
27
  AddToCart = "AddToCart",
@@ -36,11 +45,17 @@ export declare enum PixelEventType {
36
45
  export type Modifiers = {
37
46
  [name: string]: string | boolean | undefined;
38
47
  };
48
+ /**
49
+ * @deprecated Pixel will be deleted
50
+ */
39
51
  export interface Pixel<TEvent = string> {
40
52
  trackStandard: (event: TEvent, data?: Object) => void;
41
53
  trackCustom: (event: string, data?: Object) => void;
42
54
  track: (trackEvents: string | string[] | PixelEvent[] | PixelEvent) => void;
43
55
  }
56
+ /**
57
+ * @deprecated Metrika will be deleted
58
+ */
44
59
  export interface Metrika {
45
60
  reachGoal: (counterName: string, ...args: any) => void;
46
61
  reachGoals: (goals: MetrikaGoal, counterName?: string) => void;
@@ -49,4 +64,25 @@ export interface ClassNameProps {
49
64
  className?: string;
50
65
  }
51
66
  export type Timeout = ReturnType<typeof setTimeout> | undefined;
67
+ export type AnalyticsParameter = {
68
+ key: string;
69
+ value: string | number | boolean;
70
+ };
71
+ export type AnalyticsCounters = {
72
+ include?: string[];
73
+ exclude?: string[];
74
+ };
75
+ export type AnalyticsEvent = {
76
+ name: string;
77
+ type?: string;
78
+ counters?: AnalyticsCounters;
79
+ category?: string;
80
+ label?: string;
81
+ params?: AnalyticsParameter[];
82
+ };
83
+ export type AnalyticsEventV2<T = {}> = T & {
84
+ name: string;
85
+ type?: string;
86
+ counters?: AnalyticsCounters;
87
+ };
52
88
  export {};
@@ -6,6 +6,9 @@ var Theme;
6
6
  Theme["Light"] = "light";
7
7
  Theme["Dark"] = "dark";
8
8
  })(Theme = exports.Theme || (exports.Theme = {}));
9
+ /**
10
+ * @deprecated Pixel will be deleted from package
11
+ */
9
12
  var PixelEventType;
10
13
  (function (PixelEventType) {
11
14
  PixelEventType["AddPaymentInfo"] = "AddPaymentInfo";
@@ -1,7 +1,7 @@
1
1
  import { CSSProperties, ReactNode } from 'react';
2
2
  import { ButtonSize, ButtonView } from '@gravity-ui/uikit';
3
3
  import { ThemeSupporting } from '../../utils/theme';
4
- import { ClassNameProps, PixelEventType } from '../common';
4
+ import { AnalyticsEventV2, ClassNameProps, PixelEventType } from '../common';
5
5
  export declare enum AuthorType {
6
6
  Column = "column",
7
7
  Line = "line"
@@ -110,6 +110,7 @@ export interface MediaVideoProps {
110
110
  playButton?: PlayButtonProps;
111
111
  controls?: MediaVideoControlsType;
112
112
  metrika?: MetrikaVideo;
113
+ analyticsEvents?: AnalyticsEventV2[];
113
114
  }
114
115
  export interface LinkProps extends Stylable {
115
116
  url: string;
@@ -121,6 +122,7 @@ export interface LinkProps extends Stylable {
121
122
  target?: string;
122
123
  metrikaGoals?: MetrikaGoal;
123
124
  pixelEvents?: ButtonPixel;
125
+ analyticsEvents?: AnalyticsEventV2 | AnalyticsEventV2[];
124
126
  }
125
127
  export interface FileLinkProps extends ClassNameProps {
126
128
  href: string;
@@ -139,6 +141,7 @@ export interface ButtonProps {
139
141
  img?: ButtonImageProps | string;
140
142
  metrikaGoals?: MetrikaGoal;
141
143
  pixelEvents?: ButtonPixel;
144
+ analyticsEvents?: AnalyticsEventV2[];
142
145
  target?: string;
143
146
  }
144
147
  export interface ButtonImageProps {
@@ -167,6 +170,7 @@ export interface MediaComponentVideoProps {
167
170
  video: MediaVideoProps;
168
171
  height?: number;
169
172
  metrika?: MetrikaVideo;
173
+ analyticsEvents?: AnalyticsEventV2[];
170
174
  previewImg?: string;
171
175
  }
172
176
  export interface MediaComponentYoutubeProps {
@@ -222,6 +226,7 @@ export interface HeaderBreadCrumbsProps extends ClassNameProps {
222
226
  theme?: TextTheme;
223
227
  metrikaGoals?: MetrikaGoal;
224
228
  pixelEvents?: ButtonPixel;
229
+ analyticsEvents?: AnalyticsEventV2 | AnalyticsEventV2[];
225
230
  }
226
231
  export interface PreviewContentItemProps {
227
232
  title: string;
@@ -3,7 +3,7 @@ import { ThemeSupporting } from '../../utils';
3
3
  import { HubspotEventData, HubspotEventHandlers } from '../../utils/hubspot';
4
4
  import { AuthorItem, ButtonPixel, ButtonProps, CardBaseProps, ContentTheme, DividerSize, ImageObjectProps, ImageProps, LinkProps, MediaProps, PriceDetailedProps, TextTheme, Themable, ThemedImage } from './common';
5
5
  import { ContentBlockProps } from './blocks';
6
- import { PixelEvent } from '../common';
6
+ import { AnalyticsEventV2, PixelEvent } from '../common';
7
7
  export declare enum SubBlockType {
8
8
  Divider = "divider",
9
9
  Quote = "quote",
@@ -61,6 +61,7 @@ export interface HubspotFormProps extends HubspotEventHandlers {
61
61
  onLoad?: (arg: HubspotEventData) => void;
62
62
  pixelEvents?: string | string[] | PixelEvent | PixelEvent[] | ButtonPixel;
63
63
  hubspotEvents?: string[];
64
+ analyticsEvents?: AnalyticsEventV2 | AnalyticsEventV2[];
64
65
  }
65
66
  export interface PartnerProps extends CardBaseProps {
66
67
  text: string;
@@ -414,6 +414,9 @@ export declare const ButtonProps: {
414
414
  };
415
415
  })[];
416
416
  };
417
+ /**
418
+ * @deprecated Metrika will be deleted
419
+ */
417
420
  metrikaGoals: {
418
421
  anyOf: ({
419
422
  type: string;
@@ -443,6 +446,9 @@ export declare const ButtonProps: {
443
446
  };
444
447
  })[];
445
448
  };
449
+ /**
450
+ * @deprecated Pixel will be deleted
451
+ */
446
452
  pixelEvents: {
447
453
  type: string;
448
454
  items: {
@@ -499,6 +505,84 @@ export declare const ButtonProps: {
499
505
  };
500
506
  };
501
507
  };
508
+ analyticsEvents: {
509
+ anyOf: ({
510
+ type: string;
511
+ propertyNames: {
512
+ type: string;
513
+ };
514
+ additionalProperty: {
515
+ type: string;
516
+ };
517
+ required: string[];
518
+ properties: {
519
+ name: {
520
+ type: string;
521
+ };
522
+ type: {
523
+ type: string;
524
+ };
525
+ counters: {
526
+ type: string;
527
+ additionalProperties: boolean;
528
+ required: never[];
529
+ properties: {
530
+ include: {
531
+ type: string;
532
+ items: {
533
+ type: string;
534
+ };
535
+ };
536
+ exclude: {
537
+ type: string;
538
+ items: {
539
+ type: string;
540
+ };
541
+ };
542
+ };
543
+ };
544
+ };
545
+ } | {
546
+ type: string;
547
+ items: {
548
+ type: string;
549
+ propertyNames: {
550
+ type: string;
551
+ };
552
+ additionalProperty: {
553
+ type: string;
554
+ };
555
+ required: string[];
556
+ properties: {
557
+ name: {
558
+ type: string;
559
+ };
560
+ type: {
561
+ type: string;
562
+ };
563
+ counters: {
564
+ type: string;
565
+ additionalProperties: boolean;
566
+ required: never[];
567
+ properties: {
568
+ include: {
569
+ type: string;
570
+ items: {
571
+ type: string;
572
+ };
573
+ };
574
+ exclude: {
575
+ type: string;
576
+ items: {
577
+ type: string;
578
+ };
579
+ };
580
+ };
581
+ };
582
+ };
583
+ };
584
+ })[];
585
+ };
502
586
  target: {
503
587
  type: string;
504
588
  enum: string[];
@@ -629,6 +713,9 @@ export declare const ButtonBlock: {
629
713
  };
630
714
  })[];
631
715
  };
716
+ /**
717
+ * @deprecated Metrika will be deleted
718
+ */
632
719
  metrikaGoals: {
633
720
  anyOf: ({
634
721
  type: string;
@@ -658,6 +745,9 @@ export declare const ButtonBlock: {
658
745
  };
659
746
  })[];
660
747
  };
748
+ /**
749
+ * @deprecated Pixel will be deleted
750
+ */
661
751
  pixelEvents: {
662
752
  type: string;
663
753
  items: {
@@ -714,6 +804,84 @@ export declare const ButtonBlock: {
714
804
  };
715
805
  };
716
806
  };
807
+ analyticsEvents: {
808
+ anyOf: ({
809
+ type: string;
810
+ propertyNames: {
811
+ type: string;
812
+ };
813
+ additionalProperty: {
814
+ type: string;
815
+ };
816
+ required: string[];
817
+ properties: {
818
+ name: {
819
+ type: string;
820
+ };
821
+ type: {
822
+ type: string;
823
+ };
824
+ counters: {
825
+ type: string;
826
+ additionalProperties: boolean;
827
+ required: never[];
828
+ properties: {
829
+ include: {
830
+ type: string;
831
+ items: {
832
+ type: string;
833
+ };
834
+ };
835
+ exclude: {
836
+ type: string;
837
+ items: {
838
+ type: string;
839
+ };
840
+ };
841
+ };
842
+ };
843
+ };
844
+ } | {
845
+ type: string;
846
+ items: {
847
+ type: string;
848
+ propertyNames: {
849
+ type: string;
850
+ };
851
+ additionalProperty: {
852
+ type: string;
853
+ };
854
+ required: string[];
855
+ properties: {
856
+ name: {
857
+ type: string;
858
+ };
859
+ type: {
860
+ type: string;
861
+ };
862
+ counters: {
863
+ type: string;
864
+ additionalProperties: boolean;
865
+ required: never[];
866
+ properties: {
867
+ include: {
868
+ type: string;
869
+ items: {
870
+ type: string;
871
+ };
872
+ };
873
+ exclude: {
874
+ type: string;
875
+ items: {
876
+ type: string;
877
+ };
878
+ };
879
+ };
880
+ };
881
+ };
882
+ };
883
+ })[];
884
+ };
717
885
  target: {
718
886
  type: string;
719
887
  enum: string[];
@@ -4,6 +4,7 @@ exports.BlockHeaderProps = exports.CardBase = exports.MediaProps = exports.Butto
4
4
  const pixel_1 = require("./pixel");
5
5
  const models_1 = require("../../models");
6
6
  const schema_1 = require("../../components/Image/schema");
7
+ const event_1 = require("./event");
7
8
  exports.mediaDirection = ['media-content', 'content-media'];
8
9
  exports.textSize = ['s', 'm', 'l'];
9
10
  exports.containerSizesArray = ['sm', 'md', 'lg', 'xl', 'all'];
@@ -309,6 +310,9 @@ exports.ButtonProps = {
309
310
  },
310
311
  ],
311
312
  },
313
+ /**
314
+ * @deprecated Metrika will be deleted
315
+ */
312
316
  metrikaGoals: {
313
317
  anyOf: [
314
318
  { type: 'string' },
@@ -331,7 +335,13 @@ exports.ButtonProps = {
331
335
  },
332
336
  ],
333
337
  },
338
+ /**
339
+ * @deprecated Pixel will be deleted
340
+ */
334
341
  pixelEvents: pixel_1.pixelEvents,
342
+ analyticsEvents: {
343
+ anyOf: [event_1.AnalyticsEventV2Schema, { type: 'array', items: event_1.AnalyticsEventV2Schema }],
344
+ },
335
345
  target: {
336
346
  type: 'string',
337
347
  enum: ['_self', '_blank', '_parent', '_top'],
@@ -0,0 +1,91 @@
1
+ export declare const AnalyticsEventSchema: {
2
+ type: string;
3
+ additionalProperties: boolean;
4
+ required: string[];
5
+ properties: {
6
+ name: {
7
+ type: string;
8
+ };
9
+ type: {
10
+ type: string;
11
+ };
12
+ counters: {
13
+ type: string;
14
+ additionalProperties: boolean;
15
+ required: never[];
16
+ properties: {
17
+ include: {
18
+ type: string;
19
+ items: {
20
+ type: string;
21
+ };
22
+ };
23
+ exclude: {
24
+ type: string;
25
+ items: {
26
+ type: string;
27
+ };
28
+ };
29
+ };
30
+ };
31
+ category: {
32
+ type: string;
33
+ };
34
+ label: {
35
+ type: string;
36
+ };
37
+ params: {
38
+ type: string;
39
+ items: {
40
+ type: string;
41
+ additionalProperties: boolean;
42
+ required: string[];
43
+ properties: {
44
+ key: {
45
+ type: string;
46
+ };
47
+ value: {
48
+ type: string;
49
+ };
50
+ };
51
+ };
52
+ };
53
+ };
54
+ };
55
+ export declare const AnalyticsEventV2Schema: {
56
+ type: string;
57
+ propertyNames: {
58
+ type: string;
59
+ };
60
+ additionalProperty: {
61
+ type: string;
62
+ };
63
+ required: string[];
64
+ properties: {
65
+ name: {
66
+ type: string;
67
+ };
68
+ type: {
69
+ type: string;
70
+ };
71
+ counters: {
72
+ type: string;
73
+ additionalProperties: boolean;
74
+ required: never[];
75
+ properties: {
76
+ include: {
77
+ type: string;
78
+ items: {
79
+ type: string;
80
+ };
81
+ };
82
+ exclude: {
83
+ type: string;
84
+ items: {
85
+ type: string;
86
+ };
87
+ };
88
+ };
89
+ };
90
+ };
91
+ };