@gravity-ui/page-constructor 4.51.1 → 4.51.2-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 (229) hide show
  1. package/README.md +5 -3
  2. package/build/cjs/blocks/Banner/schema.d.ts +0 -264
  3. package/build/cjs/blocks/FilterBlock/FilterBlock.js +2 -2
  4. package/build/cjs/blocks/FilterBlock/i18n/index.d.ts +1 -2
  5. package/build/cjs/blocks/FilterBlock/i18n/index.js +4 -3
  6. package/build/cjs/blocks/Map/schema.d.ts +0 -88
  7. package/build/cjs/blocks/Media/schema.d.ts +0 -176
  8. package/build/cjs/blocks/Security/i18n/index.d.ts +1 -2
  9. package/build/cjs/blocks/Security/i18n/index.js +4 -3
  10. package/build/cjs/blocks/Share/Share.js +4 -4
  11. package/build/cjs/blocks/Share/i18n/index.d.ts +1 -2
  12. package/build/cjs/blocks/Share/i18n/index.js +4 -3
  13. package/build/cjs/blocks/Slider/Arrow/Arrow.js +2 -2
  14. package/build/cjs/blocks/Slider/i18n/index.d.ts +1 -2
  15. package/build/cjs/blocks/Slider/i18n/index.js +4 -3
  16. package/build/cjs/components/Button/Button.js +4 -7
  17. package/build/cjs/components/Button/i18n/index.d.ts +1 -2
  18. package/build/cjs/components/Button/i18n/index.js +4 -3
  19. package/build/cjs/components/CardBase/CardBase.d.ts +1 -3
  20. package/build/cjs/components/CardBase/CardBase.js +1 -4
  21. package/build/cjs/components/Control/Control.js +2 -2
  22. package/build/cjs/components/Control/i18n/index.d.ts +1 -2
  23. package/build/cjs/components/Control/i18n/index.js +4 -3
  24. package/build/cjs/components/FullscreenImage/FullscreenImage.js +3 -3
  25. package/build/cjs/components/FullscreenImage/i18n/index.d.ts +1 -2
  26. package/build/cjs/components/FullscreenImage/i18n/index.js +4 -3
  27. package/build/cjs/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +3 -6
  28. package/build/cjs/components/Link/Link.js +1 -4
  29. package/build/cjs/components/Map/GoogleMap.js +2 -2
  30. package/build/cjs/components/Map/YMap/YandexMap.js +2 -2
  31. package/build/cjs/components/Map/YMap/i18n/index.d.ts +1 -2
  32. package/build/cjs/components/Map/YMap/i18n/index.js +4 -3
  33. package/build/cjs/components/Media/DataLens/DataLens.js +2 -2
  34. package/build/cjs/components/Media/DataLens/i18n/index.d.ts +1 -2
  35. package/build/cjs/components/Media/DataLens/i18n/index.js +4 -3
  36. package/build/cjs/components/Media/Iframe/Iframe.js +2 -2
  37. package/build/cjs/components/Media/Iframe/i18n/index.d.ts +1 -2
  38. package/build/cjs/components/Media/Iframe/i18n/index.js +4 -3
  39. package/build/cjs/components/Media/Media.js +1 -3
  40. package/build/cjs/components/Media/Video/Video.js +2 -3
  41. package/build/cjs/components/OverflowScroller/OverflowScroller.js +2 -2
  42. package/build/cjs/components/OverflowScroller/i18n/index.d.ts +1 -2
  43. package/build/cjs/components/OverflowScroller/i18n/index.js +4 -3
  44. package/build/cjs/components/ReactPlayer/CustomBarControls.js +3 -3
  45. package/build/cjs/components/ReactPlayer/ReactPlayer.js +5 -29
  46. package/build/cjs/components/ReactPlayer/i18n/index.d.ts +1 -2
  47. package/build/cjs/components/ReactPlayer/i18n/index.js +4 -3
  48. package/build/cjs/components/UnpublishedLabel/UnpublishedLabel.js +2 -2
  49. package/build/cjs/components/UnpublishedLabel/i18n/index.d.ts +1 -2
  50. package/build/cjs/components/UnpublishedLabel/i18n/index.js +4 -3
  51. package/build/cjs/components/VideoBlock/VideoBlock.js +2 -2
  52. package/build/cjs/components/VideoBlock/i18n/index.d.ts +1 -2
  53. package/build/cjs/components/VideoBlock/i18n/index.js +4 -3
  54. package/build/cjs/components/YandexForm/YandexForm.js +2 -13
  55. package/build/cjs/containers/Loadable/Loadable.js +2 -2
  56. package/build/cjs/containers/Loadable/i18n/index.d.ts +1 -2
  57. package/build/cjs/containers/Loadable/i18n/index.js +4 -3
  58. package/build/cjs/containers/PageConstructor/Provider.d.ts +0 -2
  59. package/build/cjs/containers/PageConstructor/Provider.js +1 -3
  60. package/build/cjs/context/localeContext/localeContext.d.ts +2 -2
  61. package/build/cjs/context/localeContext/localeContext.js +2 -2
  62. package/build/cjs/editor/components/ControlPanel/ControlPanel.js +3 -3
  63. package/build/cjs/editor/components/ControlPanel/i18n/en.json +2 -1
  64. package/build/cjs/editor/components/ControlPanel/i18n/index.d.ts +1 -2
  65. package/build/cjs/editor/components/ControlPanel/i18n/index.js +4 -3
  66. package/build/cjs/editor/components/ControlPanel/i18n/ru.json +2 -1
  67. package/build/cjs/editor/components/ErrorBoundary/ErrorBoundary.js +3 -3
  68. package/build/cjs/editor/components/ErrorBoundary/i18n/index.d.ts +1 -2
  69. package/build/cjs/editor/components/ErrorBoundary/i18n/index.js +4 -3
  70. package/build/cjs/editor/components/NotFoundBlock/NotFoundBlock.js +2 -2
  71. package/build/cjs/editor/components/NotFoundBlock/i18n/index.d.ts +1 -2
  72. package/build/cjs/editor/components/NotFoundBlock/i18n/index.js +4 -3
  73. package/build/cjs/hooks/useAnalytics.d.ts +2 -2
  74. package/build/cjs/hooks/useMetrika.d.ts +1 -13
  75. package/build/cjs/hooks/useMetrika.js +0 -41
  76. package/build/cjs/models/common.d.ts +2 -53
  77. package/build/cjs/models/common.js +1 -25
  78. package/build/cjs/models/constructor-items/common.d.ts +2 -28
  79. package/build/cjs/models/constructor-items/sub-blocks.d.ts +2 -3
  80. package/build/cjs/models/guards.d.ts +0 -2
  81. package/build/cjs/models/guards.js +1 -5
  82. package/build/cjs/schema/constants.d.ts +0 -176
  83. package/build/cjs/schema/validators/common.d.ts +0 -188
  84. package/build/cjs/schema/validators/common.js +0 -31
  85. package/build/cjs/schema/validators/index.d.ts +0 -2
  86. package/build/cjs/schema/validators/index.js +0 -2
  87. package/build/cjs/sub-blocks/HubspotForm/index.js +1 -6
  88. package/build/cjs/sub-blocks/LayoutItem/utils.d.ts +1 -15
  89. package/build/cjs/sub-blocks/PriceCard/schema.d.ts +0 -88
  90. package/build/cjs/text-transform/common.d.ts +4 -4
  91. package/build/cjs/text-transform/transformers.d.ts +2 -2
  92. package/build/cjs/text-transform/utils.d.ts +6 -6
  93. package/build/cjs/text-transform/utils.js +5 -5
  94. package/build/cjs/utils/index.d.ts +0 -1
  95. package/build/cjs/utils/index.js +1 -4
  96. package/build/esm/blocks/Banner/schema.d.ts +0 -264
  97. package/build/esm/blocks/FilterBlock/FilterBlock.js +1 -1
  98. package/build/esm/blocks/FilterBlock/i18n/index.d.ts +1 -2
  99. package/build/esm/blocks/FilterBlock/i18n/index.js +3 -3
  100. package/build/esm/blocks/Map/schema.d.ts +0 -88
  101. package/build/esm/blocks/Media/schema.d.ts +0 -176
  102. package/build/esm/blocks/Security/i18n/index.d.ts +1 -2
  103. package/build/esm/blocks/Security/i18n/index.js +3 -3
  104. package/build/esm/blocks/Share/Share.js +1 -1
  105. package/build/esm/blocks/Share/i18n/index.d.ts +1 -2
  106. package/build/esm/blocks/Share/i18n/index.js +3 -3
  107. package/build/esm/blocks/Slider/Arrow/Arrow.js +1 -1
  108. package/build/esm/blocks/Slider/i18n/index.d.ts +1 -2
  109. package/build/esm/blocks/Slider/i18n/index.js +3 -3
  110. package/build/esm/components/Button/Button.js +3 -6
  111. package/build/esm/components/Button/i18n/index.d.ts +1 -2
  112. package/build/esm/components/Button/i18n/index.js +3 -3
  113. package/build/esm/components/CardBase/CardBase.d.ts +1 -3
  114. package/build/esm/components/CardBase/CardBase.js +1 -4
  115. package/build/esm/components/Control/Control.js +1 -1
  116. package/build/esm/components/Control/i18n/index.d.ts +1 -2
  117. package/build/esm/components/Control/i18n/index.js +3 -3
  118. package/build/esm/components/FullscreenImage/FullscreenImage.js +1 -1
  119. package/build/esm/components/FullscreenImage/i18n/index.d.ts +1 -2
  120. package/build/esm/components/FullscreenImage/i18n/index.js +3 -3
  121. package/build/esm/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +3 -6
  122. package/build/esm/components/Link/Link.js +1 -4
  123. package/build/esm/components/Map/GoogleMap.js +1 -1
  124. package/build/esm/components/Map/YMap/YandexMap.js +1 -1
  125. package/build/esm/components/Map/YMap/i18n/index.d.ts +1 -2
  126. package/build/esm/components/Map/YMap/i18n/index.js +3 -3
  127. package/build/esm/components/Media/DataLens/DataLens.js +1 -1
  128. package/build/esm/components/Media/DataLens/i18n/index.d.ts +1 -2
  129. package/build/esm/components/Media/DataLens/i18n/index.js +3 -3
  130. package/build/esm/components/Media/Iframe/Iframe.js +1 -1
  131. package/build/esm/components/Media/Iframe/i18n/index.d.ts +1 -2
  132. package/build/esm/components/Media/Iframe/i18n/index.js +3 -3
  133. package/build/esm/components/Media/Media.js +1 -3
  134. package/build/esm/components/Media/Video/Video.js +2 -3
  135. package/build/esm/components/OverflowScroller/OverflowScroller.js +1 -1
  136. package/build/esm/components/OverflowScroller/i18n/index.d.ts +1 -2
  137. package/build/esm/components/OverflowScroller/i18n/index.js +3 -3
  138. package/build/esm/components/ReactPlayer/CustomBarControls.js +1 -1
  139. package/build/esm/components/ReactPlayer/ReactPlayer.js +4 -28
  140. package/build/esm/components/ReactPlayer/i18n/index.d.ts +1 -2
  141. package/build/esm/components/ReactPlayer/i18n/index.js +3 -3
  142. package/build/esm/components/UnpublishedLabel/UnpublishedLabel.js +1 -1
  143. package/build/esm/components/UnpublishedLabel/i18n/index.d.ts +1 -2
  144. package/build/esm/components/UnpublishedLabel/i18n/index.js +3 -3
  145. package/build/esm/components/VideoBlock/VideoBlock.js +1 -1
  146. package/build/esm/components/VideoBlock/i18n/index.d.ts +1 -2
  147. package/build/esm/components/VideoBlock/i18n/index.js +3 -3
  148. package/build/esm/components/YandexForm/YandexForm.js +2 -13
  149. package/build/esm/containers/Loadable/Loadable.js +1 -1
  150. package/build/esm/containers/Loadable/i18n/index.d.ts +1 -2
  151. package/build/esm/containers/Loadable/i18n/index.js +3 -3
  152. package/build/esm/containers/PageConstructor/Provider.d.ts +0 -2
  153. package/build/esm/containers/PageConstructor/Provider.js +1 -3
  154. package/build/esm/context/localeContext/localeContext.d.ts +2 -2
  155. package/build/esm/context/localeContext/localeContext.js +1 -1
  156. package/build/esm/editor/components/ControlPanel/ControlPanel.js +2 -2
  157. package/build/esm/editor/components/ControlPanel/i18n/en.json +2 -1
  158. package/build/esm/editor/components/ControlPanel/i18n/index.d.ts +1 -2
  159. package/build/esm/editor/components/ControlPanel/i18n/index.js +3 -3
  160. package/build/esm/editor/components/ControlPanel/i18n/ru.json +2 -1
  161. package/build/esm/editor/components/ErrorBoundary/ErrorBoundary.js +1 -1
  162. package/build/esm/editor/components/ErrorBoundary/i18n/index.d.ts +1 -2
  163. package/build/esm/editor/components/ErrorBoundary/i18n/index.js +3 -3
  164. package/build/esm/editor/components/NotFoundBlock/NotFoundBlock.js +1 -1
  165. package/build/esm/editor/components/NotFoundBlock/i18n/index.d.ts +1 -2
  166. package/build/esm/editor/components/NotFoundBlock/i18n/index.js +3 -3
  167. package/build/esm/hooks/useAnalytics.d.ts +2 -2
  168. package/build/esm/hooks/useMetrika.d.ts +1 -13
  169. package/build/esm/hooks/useMetrika.js +1 -38
  170. package/build/esm/models/common.d.ts +2 -53
  171. package/build/esm/models/common.js +0 -24
  172. package/build/esm/models/constructor-items/common.d.ts +2 -28
  173. package/build/esm/models/constructor-items/sub-blocks.d.ts +2 -3
  174. package/build/esm/models/guards.d.ts +0 -2
  175. package/build/esm/models/guards.js +0 -3
  176. package/build/esm/schema/constants.d.ts +0 -176
  177. package/build/esm/schema/validators/common.d.ts +0 -188
  178. package/build/esm/schema/validators/common.js +0 -31
  179. package/build/esm/schema/validators/index.d.ts +0 -2
  180. package/build/esm/schema/validators/index.js +0 -2
  181. package/build/esm/sub-blocks/HubspotForm/index.js +1 -6
  182. package/build/esm/sub-blocks/LayoutItem/utils.d.ts +1 -15
  183. package/build/esm/sub-blocks/PriceCard/schema.d.ts +0 -88
  184. package/build/esm/text-transform/common.d.ts +4 -4
  185. package/build/esm/text-transform/transformers.d.ts +2 -2
  186. package/build/esm/text-transform/utils.d.ts +6 -6
  187. package/build/esm/text-transform/utils.js +1 -1
  188. package/build/esm/utils/index.d.ts +0 -1
  189. package/build/esm/utils/index.js +0 -1
  190. package/package.json +1 -1
  191. package/server/models/common.d.ts +2 -53
  192. package/server/models/common.js +1 -25
  193. package/server/models/constructor-items/common.d.ts +2 -28
  194. package/server/models/constructor-items/sub-blocks.d.ts +2 -3
  195. package/server/models/guards.d.ts +0 -2
  196. package/server/models/guards.js +1 -5
  197. package/server/text-transform/common.d.ts +4 -4
  198. package/server/text-transform/transformers.d.ts +2 -2
  199. package/server/text-transform/utils.d.ts +6 -6
  200. package/server/text-transform/utils.js +5 -5
  201. package/server/utils/index.d.ts +0 -1
  202. package/server/utils/index.js +1 -4
  203. package/widget/index.js +1 -1
  204. package/build/cjs/context/metrikaContext/index.d.ts +0 -1
  205. package/build/cjs/context/metrikaContext/index.js +0 -4
  206. package/build/cjs/context/metrikaContext/metrikaContext.d.ts +0 -13
  207. package/build/cjs/context/metrikaContext/metrikaContext.js +0 -6
  208. package/build/cjs/i18n.d.ts +0 -2
  209. package/build/cjs/i18n.js +0 -12
  210. package/build/cjs/schema/validators/pixel.d.ts +0 -57
  211. package/build/cjs/schema/validators/pixel.js +0 -63
  212. package/build/cjs/utils/configure.d.ts +0 -12
  213. package/build/cjs/utils/configure.js +0 -26
  214. package/build/cjs/utils/registerKeyset.d.ts +0 -5
  215. package/build/cjs/utils/registerKeyset.js +0 -9
  216. package/build/esm/context/metrikaContext/index.d.ts +0 -1
  217. package/build/esm/context/metrikaContext/index.js +0 -1
  218. package/build/esm/context/metrikaContext/metrikaContext.d.ts +0 -13
  219. package/build/esm/context/metrikaContext/metrikaContext.js +0 -2
  220. package/build/esm/i18n.d.ts +0 -2
  221. package/build/esm/i18n.js +0 -9
  222. package/build/esm/schema/validators/pixel.d.ts +0 -57
  223. package/build/esm/schema/validators/pixel.js +0 -60
  224. package/build/esm/utils/configure.d.ts +0 -12
  225. package/build/esm/utils/configure.js +0 -20
  226. package/build/esm/utils/registerKeyset.d.ts +0 -5
  227. package/build/esm/utils/registerKeyset.js +0 -5
  228. package/server/utils/configure.d.ts +0 -12
  229. package/server/utils/configure.js +0 -26
@@ -1,7 +1,7 @@
1
1
  import React, { CSSProperties, HTMLProps, ReactNode } from 'react';
2
2
  import { ButtonView, ButtonProps as UikitButtonProps } from '@gravity-ui/uikit';
3
3
  import { ThemeSupporting } from '../../utils';
4
- import { AnalyticsEventsBase, ClassNameProps, PixelEvent, PixelEventType, QAProps } from '../common';
4
+ import { AnalyticsEventsBase, AnalyticsEventsProp, ClassNameProps, QAProps } from '../common';
5
5
  export declare enum AuthorType {
6
6
  Column = "column",
7
7
  Line = "line"
@@ -124,7 +124,6 @@ export interface MediaVideoProps extends AnalyticsEventsBase {
124
124
  playButton?: PlayButtonProps;
125
125
  controls?: MediaVideoControlsType;
126
126
  customControlsOptions?: CustomControlsOptions;
127
- metrika?: MetrikaVideo;
128
127
  ariaLabel?: string;
129
128
  }
130
129
  export interface LinkProps extends AnalyticsEventsBase, Stylable, Tabbable {
@@ -136,8 +135,6 @@ export interface LinkProps extends AnalyticsEventsBase, Stylable, Tabbable {
136
135
  colorTheme?: TextTheme;
137
136
  arrow?: boolean;
138
137
  target?: string;
139
- metrikaGoals?: MetrikaGoal;
140
- pixelEvents?: ButtonPixel;
141
138
  extraProps?: HTMLProps<HTMLAnchorElement>;
142
139
  }
143
140
  export interface FileLinkProps extends ClassNameProps, Tabbable {
@@ -158,8 +155,6 @@ export interface ButtonProps extends AnalyticsEventsBase, Pick<UikitButtonProps,
158
155
  primary?: boolean;
159
156
  theme?: ButtonTheme;
160
157
  img?: ButtonImageProps | string;
161
- metrikaGoals?: MetrikaGoal;
162
- pixelEvents?: ButtonPixel;
163
158
  target?: string;
164
159
  }
165
160
  export type ButtonImagePosition = 'left' | 'right';
@@ -183,7 +178,6 @@ export interface MediaComponentVideoProps extends AnalyticsEventsBase {
183
178
  video: MediaVideoProps;
184
179
  height?: number;
185
180
  ratio?: number;
186
- metrika?: MetrikaVideo;
187
181
  previewImg?: string;
188
182
  }
189
183
  export interface MediaComponentYoutubeProps {
@@ -237,23 +231,6 @@ export interface YMapMarkerLabel {
237
231
  }
238
232
  export type MapProps = GMapProps | YMapProps;
239
233
  export type ThemedMediaProps = ThemeSupporting<MediaProps>;
240
- export interface NewMetrikaGoal {
241
- name: string;
242
- isCrossSite?: boolean;
243
- counterName?: string;
244
- params?: Record<string, string>;
245
- }
246
- export type MetrikaGoal = string | string[] | NewMetrikaGoal[];
247
- export interface MetrikaVideo {
248
- counterName?: string;
249
- play?: MetrikaGoal;
250
- stop?: MetrikaGoal;
251
- }
252
- export interface ButtonPixelEvent {
253
- name: PixelEventType;
254
- data?: Object;
255
- }
256
- export type ButtonPixel = ButtonPixelEvent[];
257
234
  export interface DataLensObjectProps {
258
235
  id: string;
259
236
  theme: 'dark' | 'light';
@@ -278,8 +255,7 @@ export interface HeaderBreadCrumbsProps extends ClassNameProps {
278
255
  text: ReactNode;
279
256
  }[];
280
257
  theme?: TextTheme;
281
- metrikaGoals?: MetrikaGoal;
282
- pixelEvents?: ButtonPixel;
258
+ analyticsEvents?: AnalyticsEventsProp;
283
259
  }
284
260
  export interface TitleItemProps extends Justifyable, TitleItemBaseProps {
285
261
  navTitle?: string;
@@ -368,8 +344,6 @@ export interface YandexFormProps extends AnalyticsEventsBase {
368
344
  };
369
345
  onSubmit?: () => void;
370
346
  onLoad?: () => void;
371
- metrikaGoals?: string | string[];
372
- pixelEvents?: string | string[] | PixelEvent | PixelEvent[];
373
347
  }
374
348
  export interface WithBorder {
375
349
  border?: MediaBorder;
@@ -1,9 +1,9 @@
1
1
  import { ClassNameProps, QuoteType } from '../../models';
2
2
  import { ThemeSupporting } from '../../utils';
3
3
  import { HubspotEventData, HubspotEventHandlers } from '../../utils/hubspot';
4
- import { AnalyticsEventsBase, PixelEvent } from '../common';
4
+ import { AnalyticsEventsBase } from '../common';
5
5
  import { ContentBlockProps } from './blocks';
6
- import { AuthorItem, ButtonPixel, ButtonProps, CardBaseProps, ContentTheme, DividerSize, ImageObjectProps, ImageProps, LinkProps, MediaProps, MediaView, PriceDetailedProps, TextTheme, Themable, ThemedImage } from './common';
6
+ import { AuthorItem, ButtonProps, CardBaseProps, ContentTheme, DividerSize, ImageObjectProps, ImageProps, LinkProps, MediaProps, MediaView, PriceDetailedProps, TextTheme, Themable, ThemedImage } from './common';
7
7
  export declare enum SubBlockType {
8
8
  Divider = "divider",
9
9
  Quote = "quote",
@@ -65,7 +65,6 @@ export interface HubspotFormProps extends HubspotEventHandlers, AnalyticsEventsB
65
65
  * To use this handler for component that is rendered in iframe, set up useLoopBackHubspotEvents hook on top level frame
66
66
  */
67
67
  onLoad?: (arg: HubspotEventData) => void;
68
- pixelEvents?: string | string[] | PixelEvent | PixelEvent[] | ButtonPixel;
69
68
  hubspotEvents?: string[];
70
69
  createDOMElement?: boolean;
71
70
  }
@@ -1,6 +1,4 @@
1
1
  import { Block, ConstructorItem, FormBlockData, FormBlockHubspotData, FormBlockYandexData } from './';
2
- import { MetrikaGoal, NewMetrikaGoal } from './index';
3
2
  export declare function isBlock(block: ConstructorItem): block is Block;
4
- export declare function isNewMetrikaFormat(metrika: MetrikaGoal): metrika is NewMetrikaGoal[];
5
3
  export declare function isYandexDataForm(data: FormBlockData): data is FormBlockYandexData;
6
4
  export declare function isHubspotDataForm(data: FormBlockData): data is FormBlockHubspotData;
@@ -1,15 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isHubspotDataForm = exports.isYandexDataForm = exports.isNewMetrikaFormat = exports.isBlock = void 0;
3
+ exports.isHubspotDataForm = exports.isYandexDataForm = exports.isBlock = void 0;
4
4
  const _1 = require("./");
5
5
  function isBlock(block) {
6
6
  return block.type in _1.BlockTypes;
7
7
  }
8
8
  exports.isBlock = isBlock;
9
- function isNewMetrikaFormat(metrika) {
10
- return Boolean(Array.isArray(metrika) && metrika.length && typeof metrika[0] === 'object');
11
- }
12
- exports.isNewMetrikaFormat = isNewMetrikaFormat;
13
9
  function isYandexDataForm(data) {
14
10
  return Boolean(data.yandex);
15
11
  }
@@ -78,94 +78,6 @@ export declare const cardSchemas: {
78
78
  optionName: string;
79
79
  })[];
80
80
  };
81
- metrikaGoals: {
82
- oneOf: ({
83
- type: string;
84
- optionName: string;
85
- items?: undefined;
86
- } | {
87
- type: string;
88
- items: {
89
- type: string;
90
- additionalProperties?: undefined;
91
- required?: undefined;
92
- properties?: undefined;
93
- };
94
- optionName: string;
95
- } | {
96
- type: string;
97
- items: {
98
- type: string;
99
- additionalProperties: boolean;
100
- required: string[];
101
- properties: {
102
- name: {
103
- type: string;
104
- };
105
- isCrossSite: {
106
- type: string;
107
- };
108
- };
109
- };
110
- optionName: string;
111
- })[];
112
- };
113
- pixelEvents: {
114
- type: string;
115
- items: {
116
- type: string;
117
- required: string[];
118
- additionalProperties: boolean;
119
- properties: {
120
- name: {
121
- type: string;
122
- enum: import("../models").PixelEventType[];
123
- };
124
- data: {};
125
- };
126
- select: {
127
- $data: string;
128
- };
129
- selectCases: {
130
- SubmitApplication: {
131
- additionalProperties: boolean;
132
- properties: {
133
- name: {};
134
- };
135
- };
136
- Contact: {
137
- additionalProperties: boolean;
138
- properties: {
139
- name: {};
140
- };
141
- };
142
- Lead: {
143
- additionalProperties: boolean;
144
- properties: {
145
- name: {};
146
- data: {
147
- type: string;
148
- additionalProperties: boolean;
149
- properties: {
150
- content_category: {
151
- type: string;
152
- };
153
- content_name: {
154
- type: string;
155
- };
156
- currency: {
157
- type: string;
158
- };
159
- value: {
160
- type: string;
161
- };
162
- };
163
- };
164
- };
165
- };
166
- };
167
- };
168
- };
169
81
  analyticsEvents: {
170
82
  oneOf: ({
171
83
  optionName: string;
@@ -1066,94 +978,6 @@ export declare const cardSchemas: {
1066
978
  optionName: string;
1067
979
  })[];
1068
980
  };
1069
- metrikaGoals: {
1070
- oneOf: ({
1071
- type: string;
1072
- optionName: string;
1073
- items?: undefined;
1074
- } | {
1075
- type: string;
1076
- items: {
1077
- type: string;
1078
- additionalProperties?: undefined;
1079
- required?: undefined;
1080
- properties?: undefined;
1081
- };
1082
- optionName: string;
1083
- } | {
1084
- type: string;
1085
- items: {
1086
- type: string;
1087
- additionalProperties: boolean;
1088
- required: string[];
1089
- properties: {
1090
- name: {
1091
- type: string;
1092
- };
1093
- isCrossSite: {
1094
- type: string;
1095
- };
1096
- };
1097
- };
1098
- optionName: string;
1099
- })[];
1100
- };
1101
- pixelEvents: {
1102
- type: string;
1103
- items: {
1104
- type: string;
1105
- required: string[];
1106
- additionalProperties: boolean;
1107
- properties: {
1108
- name: {
1109
- type: string;
1110
- enum: import("../models").PixelEventType[];
1111
- };
1112
- data: {};
1113
- };
1114
- select: {
1115
- $data: string;
1116
- };
1117
- selectCases: {
1118
- SubmitApplication: {
1119
- additionalProperties: boolean;
1120
- properties: {
1121
- name: {};
1122
- };
1123
- };
1124
- Contact: {
1125
- additionalProperties: boolean;
1126
- properties: {
1127
- name: {};
1128
- };
1129
- };
1130
- Lead: {
1131
- additionalProperties: boolean;
1132
- properties: {
1133
- name: {};
1134
- data: {
1135
- type: string;
1136
- additionalProperties: boolean;
1137
- properties: {
1138
- content_category: {
1139
- type: string;
1140
- };
1141
- content_name: {
1142
- type: string;
1143
- };
1144
- currency: {
1145
- type: string;
1146
- };
1147
- value: {
1148
- type: string;
1149
- };
1150
- };
1151
- };
1152
- };
1153
- };
1154
- };
1155
- };
1156
- };
1157
981
  analyticsEvents: {
1158
982
  oneOf: ({
1159
983
  optionName: string;
@@ -590,100 +590,6 @@ export declare const ButtonProps: {
590
590
  optionName: string;
591
591
  })[];
592
592
  };
593
- /**
594
- * @deprecated Metrika will be deleted
595
- */
596
- metrikaGoals: {
597
- oneOf: ({
598
- type: string;
599
- optionName: string;
600
- items?: undefined;
601
- } | {
602
- type: string;
603
- items: {
604
- type: string;
605
- additionalProperties?: undefined;
606
- required?: undefined;
607
- properties?: undefined;
608
- };
609
- optionName: string;
610
- } | {
611
- type: string;
612
- items: {
613
- type: string;
614
- additionalProperties: boolean;
615
- required: string[];
616
- properties: {
617
- name: {
618
- type: string;
619
- };
620
- isCrossSite: {
621
- type: string;
622
- };
623
- };
624
- };
625
- optionName: string;
626
- })[];
627
- };
628
- /**
629
- * @deprecated Pixel will be deleted
630
- */
631
- pixelEvents: {
632
- type: string;
633
- items: {
634
- type: string;
635
- required: string[];
636
- additionalProperties: boolean;
637
- properties: {
638
- name: {
639
- type: string;
640
- enum: import("../../models").PixelEventType[];
641
- };
642
- data: {};
643
- };
644
- select: {
645
- $data: string;
646
- };
647
- selectCases: {
648
- SubmitApplication: {
649
- additionalProperties: boolean;
650
- properties: {
651
- name: {};
652
- };
653
- };
654
- Contact: {
655
- additionalProperties: boolean;
656
- properties: {
657
- name: {};
658
- };
659
- };
660
- Lead: {
661
- additionalProperties: boolean;
662
- properties: {
663
- name: {};
664
- data: {
665
- type: string;
666
- additionalProperties: boolean;
667
- properties: {
668
- content_category: {
669
- type: string;
670
- };
671
- content_name: {
672
- type: string;
673
- };
674
- currency: {
675
- type: string;
676
- };
677
- value: {
678
- type: string;
679
- };
680
- };
681
- };
682
- };
683
- };
684
- };
685
- };
686
- };
687
593
  analyticsEvents: {
688
594
  oneOf: ({
689
595
  optionName: string;
@@ -933,100 +839,6 @@ export declare const ButtonBlock: {
933
839
  optionName: string;
934
840
  })[];
935
841
  };
936
- /**
937
- * @deprecated Metrika will be deleted
938
- */
939
- metrikaGoals: {
940
- oneOf: ({
941
- type: string;
942
- optionName: string;
943
- items?: undefined;
944
- } | {
945
- type: string;
946
- items: {
947
- type: string;
948
- additionalProperties?: undefined;
949
- required?: undefined;
950
- properties?: undefined;
951
- };
952
- optionName: string;
953
- } | {
954
- type: string;
955
- items: {
956
- type: string;
957
- additionalProperties: boolean;
958
- required: string[];
959
- properties: {
960
- name: {
961
- type: string;
962
- };
963
- isCrossSite: {
964
- type: string;
965
- };
966
- };
967
- };
968
- optionName: string;
969
- })[];
970
- };
971
- /**
972
- * @deprecated Pixel will be deleted
973
- */
974
- pixelEvents: {
975
- type: string;
976
- items: {
977
- type: string;
978
- required: string[];
979
- additionalProperties: boolean;
980
- properties: {
981
- name: {
982
- type: string;
983
- enum: import("../../models").PixelEventType[];
984
- };
985
- data: {};
986
- };
987
- select: {
988
- $data: string;
989
- };
990
- selectCases: {
991
- SubmitApplication: {
992
- additionalProperties: boolean;
993
- properties: {
994
- name: {};
995
- };
996
- };
997
- Contact: {
998
- additionalProperties: boolean;
999
- properties: {
1000
- name: {};
1001
- };
1002
- };
1003
- Lead: {
1004
- additionalProperties: boolean;
1005
- properties: {
1006
- name: {};
1007
- data: {
1008
- type: string;
1009
- additionalProperties: boolean;
1010
- properties: {
1011
- content_category: {
1012
- type: string;
1013
- };
1014
- content_name: {
1015
- type: string;
1016
- };
1017
- currency: {
1018
- type: string;
1019
- };
1020
- value: {
1021
- type: string;
1022
- };
1023
- };
1024
- };
1025
- };
1026
- };
1027
- };
1028
- };
1029
- };
1030
842
  analyticsEvents: {
1031
843
  oneOf: ({
1032
844
  optionName: string;
@@ -4,7 +4,6 @@ exports.BlockHeaderProps = exports.CardBase = exports.BorderProps = exports.MapP
4
4
  const schema_1 = require("../../components/Image/schema");
5
5
  const models_1 = require("../../models");
6
6
  const event_1 = require("./event");
7
- const pixel_1 = require("./pixel");
8
7
  exports.mediaDirection = ['media-content', 'content-media'];
9
8
  exports.textSize = ['s', 'm', 'l'];
10
9
  exports.containerSizesArray = ['sm', 'md', 'lg', 'xl', 'all'];
@@ -368,36 +367,6 @@ exports.ButtonProps = {
368
367
  },
369
368
  ],
370
369
  },
371
- /**
372
- * @deprecated Metrika will be deleted
373
- */
374
- metrikaGoals: {
375
- oneOf: [
376
- { type: 'string', optionName: 'single' },
377
- { type: 'array', items: { type: 'string' }, optionName: 'list' },
378
- {
379
- type: 'array',
380
- items: {
381
- type: 'object',
382
- additionalProperties: false,
383
- required: ['name'],
384
- properties: {
385
- name: {
386
- type: 'string',
387
- },
388
- isCrossSite: {
389
- type: 'boolean',
390
- },
391
- },
392
- },
393
- optionName: 'list-extended',
394
- },
395
- ],
396
- },
397
- /**
398
- * @deprecated Pixel will be deleted
399
- */
400
- pixelEvents: pixel_1.pixelEvents,
401
370
  analyticsEvents: {
402
371
  oneOf: [
403
372
  Object.assign(Object.assign({}, event_1.AnalyticsEventSchema), { optionName: 'single' }),
@@ -2,7 +2,6 @@ import * as blocks from './blocks';
2
2
  import * as common from './common';
3
3
  import * as components from './components';
4
4
  import * as navigation from './navigation';
5
- import * as pixel from './pixel';
6
5
  import * as subBlocks from './sub-blocks';
7
6
  import * as utils from './utils';
8
7
  export declare const validators: {
@@ -10,7 +9,6 @@ export declare const validators: {
10
9
  common: typeof common;
11
10
  components: typeof components;
12
11
  subBlocks: typeof subBlocks;
13
- pixel: typeof pixel;
14
12
  utils: typeof utils;
15
13
  navigation: typeof navigation;
16
14
  };
@@ -6,7 +6,6 @@ const blocks = tslib_1.__importStar(require("./blocks"));
6
6
  const common = tslib_1.__importStar(require("./common"));
7
7
  const components = tslib_1.__importStar(require("./components"));
8
8
  const navigation = tslib_1.__importStar(require("./navigation"));
9
- const pixel = tslib_1.__importStar(require("./pixel"));
10
9
  const subBlocks = tslib_1.__importStar(require("./sub-blocks"));
11
10
  const utils = tslib_1.__importStar(require("./utils"));
12
11
  exports.validators = {
@@ -14,7 +13,6 @@ exports.validators = {
14
13
  common,
15
14
  components,
16
15
  subBlocks,
17
- pixel,
18
16
  utils,
19
17
  navigation,
20
18
  };
@@ -5,16 +5,14 @@ const react_1 = tslib_1.__importStar(require("react"));
5
5
  const mobileContext_1 = require("../../context/mobileContext");
6
6
  const theme_1 = require("../../context/theme");
7
7
  const hooks_1 = require("../../hooks");
8
- const useMetrika_1 = require("../../hooks/useMetrika");
9
8
  const models_1 = require("../../models");
10
9
  const utils_1 = require("../../utils");
11
10
  const HubspotFormContainer_1 = tslib_1.__importDefault(require("./HubspotFormContainer"));
12
11
  const b = (0, utils_1.block)('hubspot-form');
13
12
  const HubspotForm = (0, react_1.forwardRef)((props, ref) => {
14
- const { className, theme: themeProp, isMobile: isMobileProp, formId, formInstanceId, portalId, region, formClassName, pixelEvents,
13
+ const { className, theme: themeProp, isMobile: isMobileProp, formId, formInstanceId, portalId, region, formClassName,
15
14
  // hubspotEvents, // TODO: decide how to handle them
16
15
  analyticsEvents, onBeforeSubmit, onSubmit, onBeforeLoad, onLoad, createDOMElement, onSubmitError, } = props;
17
- const handleMetrika = (0, useMetrika_1.useMetrika)();
18
16
  const themeValue = (0, theme_1.useTheme)();
19
17
  const handleAnalytics = (0, hooks_1.useAnalytics)(models_1.DefaultEventNames.HubspotFormSubmit);
20
18
  const isMobileValue = (0, react_1.useContext)(mobileContext_1.MobileContext);
@@ -26,7 +24,6 @@ const HubspotForm = (0, react_1.forwardRef)((props, ref) => {
26
24
  onLoad,
27
25
  onSubmitError,
28
26
  onSubmit: (event) => {
29
- handleMetrika === null || handleMetrika === void 0 ? void 0 : handleMetrika({ pixelEvents });
30
27
  handleAnalytics(analyticsEvents);
31
28
  onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit(event);
32
29
  },
@@ -34,8 +31,6 @@ const HubspotForm = (0, react_1.forwardRef)((props, ref) => {
34
31
  onBeforeLoad,
35
32
  onBeforeSubmit,
36
33
  onLoad,
37
- handleMetrika,
38
- pixelEvents,
39
34
  handleAnalytics,
40
35
  analyticsEvents,
41
36
  onSubmit,
@@ -8,22 +8,8 @@ export declare const getLayoutItemLinks: (links: LayoutItemProps['content']['lin
8
8
  colorTheme?: import("../../models").TextTheme | undefined;
9
9
  arrow?: boolean | undefined;
10
10
  target?: string | undefined;
11
- metrikaGoals?: import("../../models").MetrikaGoal | undefined;
12
- pixelEvents?: import("../../models").ButtonPixel | undefined;
13
11
  extraProps?: import("react").HTMLProps<HTMLAnchorElement> | undefined;
14
- analyticsEvents?: {
15
- name: string;
16
- type?: string | undefined;
17
- counters?: import("../../models").AnalyticsCounters | undefined;
18
- context?: string | undefined;
19
- target?: string | undefined;
20
- } | {
21
- name: string;
22
- type?: string | undefined;
23
- counters?: import("../../models").AnalyticsCounters | undefined;
24
- context?: string | undefined;
25
- target?: string | undefined;
26
- }[] | undefined;
12
+ analyticsEvents?: import("../../models").AnalyticsEventsProp | undefined;
27
13
  className?: string | undefined;
28
14
  tabIndex?: number | undefined;
29
15
  }[] | undefined;