@gravity-ui/page-constructor 4.51.0 → 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 (233) hide show
  1. package/README.md +5 -3
  2. package/build/cjs/blocks/Banner/schema.d.ts +12 -264
  3. package/build/cjs/blocks/Banner/schema.js +4 -1
  4. package/build/cjs/blocks/FilterBlock/FilterBlock.js +2 -2
  5. package/build/cjs/blocks/FilterBlock/i18n/index.d.ts +1 -2
  6. package/build/cjs/blocks/FilterBlock/i18n/index.js +4 -3
  7. package/build/cjs/blocks/Header/schema.js +1 -1
  8. package/build/cjs/blocks/Map/schema.d.ts +0 -88
  9. package/build/cjs/blocks/Media/schema.d.ts +0 -176
  10. package/build/cjs/blocks/Security/i18n/index.d.ts +1 -2
  11. package/build/cjs/blocks/Security/i18n/index.js +4 -3
  12. package/build/cjs/blocks/Share/Share.js +4 -4
  13. package/build/cjs/blocks/Share/i18n/index.d.ts +1 -2
  14. package/build/cjs/blocks/Share/i18n/index.js +4 -3
  15. package/build/cjs/blocks/Slider/Arrow/Arrow.js +2 -2
  16. package/build/cjs/blocks/Slider/i18n/index.d.ts +1 -2
  17. package/build/cjs/blocks/Slider/i18n/index.js +4 -3
  18. package/build/cjs/components/Button/Button.js +4 -7
  19. package/build/cjs/components/Button/i18n/index.d.ts +1 -2
  20. package/build/cjs/components/Button/i18n/index.js +4 -3
  21. package/build/cjs/components/CardBase/CardBase.d.ts +1 -3
  22. package/build/cjs/components/CardBase/CardBase.js +1 -4
  23. package/build/cjs/components/Control/Control.js +2 -2
  24. package/build/cjs/components/Control/i18n/index.d.ts +1 -2
  25. package/build/cjs/components/Control/i18n/index.js +4 -3
  26. package/build/cjs/components/FullscreenImage/FullscreenImage.js +3 -3
  27. package/build/cjs/components/FullscreenImage/i18n/index.d.ts +1 -2
  28. package/build/cjs/components/FullscreenImage/i18n/index.js +4 -3
  29. package/build/cjs/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +3 -6
  30. package/build/cjs/components/Link/Link.js +1 -4
  31. package/build/cjs/components/Map/GoogleMap.js +2 -2
  32. package/build/cjs/components/Map/YMap/YandexMap.js +2 -2
  33. package/build/cjs/components/Map/YMap/i18n/index.d.ts +1 -2
  34. package/build/cjs/components/Map/YMap/i18n/index.js +4 -3
  35. package/build/cjs/components/Media/DataLens/DataLens.js +2 -2
  36. package/build/cjs/components/Media/DataLens/i18n/index.d.ts +1 -2
  37. package/build/cjs/components/Media/DataLens/i18n/index.js +4 -3
  38. package/build/cjs/components/Media/Iframe/Iframe.js +2 -2
  39. package/build/cjs/components/Media/Iframe/i18n/index.d.ts +1 -2
  40. package/build/cjs/components/Media/Iframe/i18n/index.js +4 -3
  41. package/build/cjs/components/Media/Media.js +1 -3
  42. package/build/cjs/components/Media/Video/Video.js +2 -3
  43. package/build/cjs/components/OverflowScroller/OverflowScroller.js +2 -2
  44. package/build/cjs/components/OverflowScroller/i18n/index.d.ts +1 -2
  45. package/build/cjs/components/OverflowScroller/i18n/index.js +4 -3
  46. package/build/cjs/components/ReactPlayer/CustomBarControls.js +3 -3
  47. package/build/cjs/components/ReactPlayer/ReactPlayer.js +5 -29
  48. package/build/cjs/components/ReactPlayer/i18n/index.d.ts +1 -2
  49. package/build/cjs/components/ReactPlayer/i18n/index.js +4 -3
  50. package/build/cjs/components/UnpublishedLabel/UnpublishedLabel.js +2 -2
  51. package/build/cjs/components/UnpublishedLabel/i18n/index.d.ts +1 -2
  52. package/build/cjs/components/UnpublishedLabel/i18n/index.js +4 -3
  53. package/build/cjs/components/VideoBlock/VideoBlock.js +2 -2
  54. package/build/cjs/components/VideoBlock/i18n/index.d.ts +1 -2
  55. package/build/cjs/components/VideoBlock/i18n/index.js +4 -3
  56. package/build/cjs/components/YandexForm/YandexForm.js +2 -13
  57. package/build/cjs/containers/Loadable/Loadable.js +2 -2
  58. package/build/cjs/containers/Loadable/i18n/index.d.ts +1 -2
  59. package/build/cjs/containers/Loadable/i18n/index.js +4 -3
  60. package/build/cjs/containers/PageConstructor/Provider.d.ts +0 -2
  61. package/build/cjs/containers/PageConstructor/Provider.js +1 -3
  62. package/build/cjs/context/localeContext/localeContext.d.ts +2 -2
  63. package/build/cjs/context/localeContext/localeContext.js +2 -2
  64. package/build/cjs/editor/components/ControlPanel/ControlPanel.js +3 -3
  65. package/build/cjs/editor/components/ControlPanel/i18n/en.json +2 -1
  66. package/build/cjs/editor/components/ControlPanel/i18n/index.d.ts +1 -2
  67. package/build/cjs/editor/components/ControlPanel/i18n/index.js +4 -3
  68. package/build/cjs/editor/components/ControlPanel/i18n/ru.json +2 -1
  69. package/build/cjs/editor/components/ErrorBoundary/ErrorBoundary.js +3 -3
  70. package/build/cjs/editor/components/ErrorBoundary/i18n/index.d.ts +1 -2
  71. package/build/cjs/editor/components/ErrorBoundary/i18n/index.js +4 -3
  72. package/build/cjs/editor/components/NotFoundBlock/NotFoundBlock.js +2 -2
  73. package/build/cjs/editor/components/NotFoundBlock/i18n/index.d.ts +1 -2
  74. package/build/cjs/editor/components/NotFoundBlock/i18n/index.js +4 -3
  75. package/build/cjs/hooks/useAnalytics.d.ts +2 -2
  76. package/build/cjs/hooks/useMetrika.d.ts +1 -13
  77. package/build/cjs/hooks/useMetrika.js +0 -41
  78. package/build/cjs/models/common.d.ts +2 -53
  79. package/build/cjs/models/common.js +1 -25
  80. package/build/cjs/models/constructor-items/common.d.ts +2 -28
  81. package/build/cjs/models/constructor-items/sub-blocks.d.ts +2 -3
  82. package/build/cjs/models/guards.d.ts +0 -2
  83. package/build/cjs/models/guards.js +1 -5
  84. package/build/cjs/schema/constants.d.ts +4 -176
  85. package/build/cjs/schema/validators/common.d.ts +1 -188
  86. package/build/cjs/schema/validators/common.js +2 -32
  87. package/build/cjs/schema/validators/index.d.ts +0 -2
  88. package/build/cjs/schema/validators/index.js +0 -2
  89. package/build/cjs/sub-blocks/HubspotForm/index.js +1 -6
  90. package/build/cjs/sub-blocks/LayoutItem/utils.d.ts +1 -15
  91. package/build/cjs/sub-blocks/PriceCard/schema.d.ts +0 -88
  92. package/build/cjs/text-transform/common.d.ts +4 -4
  93. package/build/cjs/text-transform/transformers.d.ts +2 -2
  94. package/build/cjs/text-transform/utils.d.ts +6 -6
  95. package/build/cjs/text-transform/utils.js +5 -5
  96. package/build/cjs/utils/index.d.ts +0 -1
  97. package/build/cjs/utils/index.js +1 -4
  98. package/build/esm/blocks/Banner/schema.d.ts +12 -264
  99. package/build/esm/blocks/Banner/schema.js +5 -2
  100. package/build/esm/blocks/FilterBlock/FilterBlock.js +1 -1
  101. package/build/esm/blocks/FilterBlock/i18n/index.d.ts +1 -2
  102. package/build/esm/blocks/FilterBlock/i18n/index.js +3 -3
  103. package/build/esm/blocks/Header/schema.js +2 -2
  104. package/build/esm/blocks/Map/schema.d.ts +0 -88
  105. package/build/esm/blocks/Media/schema.d.ts +0 -176
  106. package/build/esm/blocks/Security/i18n/index.d.ts +1 -2
  107. package/build/esm/blocks/Security/i18n/index.js +3 -3
  108. package/build/esm/blocks/Share/Share.js +1 -1
  109. package/build/esm/blocks/Share/i18n/index.d.ts +1 -2
  110. package/build/esm/blocks/Share/i18n/index.js +3 -3
  111. package/build/esm/blocks/Slider/Arrow/Arrow.js +1 -1
  112. package/build/esm/blocks/Slider/i18n/index.d.ts +1 -2
  113. package/build/esm/blocks/Slider/i18n/index.js +3 -3
  114. package/build/esm/components/Button/Button.js +3 -6
  115. package/build/esm/components/Button/i18n/index.d.ts +1 -2
  116. package/build/esm/components/Button/i18n/index.js +3 -3
  117. package/build/esm/components/CardBase/CardBase.d.ts +1 -3
  118. package/build/esm/components/CardBase/CardBase.js +1 -4
  119. package/build/esm/components/Control/Control.js +1 -1
  120. package/build/esm/components/Control/i18n/index.d.ts +1 -2
  121. package/build/esm/components/Control/i18n/index.js +3 -3
  122. package/build/esm/components/FullscreenImage/FullscreenImage.js +1 -1
  123. package/build/esm/components/FullscreenImage/i18n/index.d.ts +1 -2
  124. package/build/esm/components/FullscreenImage/i18n/index.js +3 -3
  125. package/build/esm/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +3 -6
  126. package/build/esm/components/Link/Link.js +1 -4
  127. package/build/esm/components/Map/GoogleMap.js +1 -1
  128. package/build/esm/components/Map/YMap/YandexMap.js +1 -1
  129. package/build/esm/components/Map/YMap/i18n/index.d.ts +1 -2
  130. package/build/esm/components/Map/YMap/i18n/index.js +3 -3
  131. package/build/esm/components/Media/DataLens/DataLens.js +1 -1
  132. package/build/esm/components/Media/DataLens/i18n/index.d.ts +1 -2
  133. package/build/esm/components/Media/DataLens/i18n/index.js +3 -3
  134. package/build/esm/components/Media/Iframe/Iframe.js +1 -1
  135. package/build/esm/components/Media/Iframe/i18n/index.d.ts +1 -2
  136. package/build/esm/components/Media/Iframe/i18n/index.js +3 -3
  137. package/build/esm/components/Media/Media.js +1 -3
  138. package/build/esm/components/Media/Video/Video.js +2 -3
  139. package/build/esm/components/OverflowScroller/OverflowScroller.js +1 -1
  140. package/build/esm/components/OverflowScroller/i18n/index.d.ts +1 -2
  141. package/build/esm/components/OverflowScroller/i18n/index.js +3 -3
  142. package/build/esm/components/ReactPlayer/CustomBarControls.js +1 -1
  143. package/build/esm/components/ReactPlayer/ReactPlayer.js +4 -28
  144. package/build/esm/components/ReactPlayer/i18n/index.d.ts +1 -2
  145. package/build/esm/components/ReactPlayer/i18n/index.js +3 -3
  146. package/build/esm/components/UnpublishedLabel/UnpublishedLabel.js +1 -1
  147. package/build/esm/components/UnpublishedLabel/i18n/index.d.ts +1 -2
  148. package/build/esm/components/UnpublishedLabel/i18n/index.js +3 -3
  149. package/build/esm/components/VideoBlock/VideoBlock.js +1 -1
  150. package/build/esm/components/VideoBlock/i18n/index.d.ts +1 -2
  151. package/build/esm/components/VideoBlock/i18n/index.js +3 -3
  152. package/build/esm/components/YandexForm/YandexForm.js +2 -13
  153. package/build/esm/containers/Loadable/Loadable.js +1 -1
  154. package/build/esm/containers/Loadable/i18n/index.d.ts +1 -2
  155. package/build/esm/containers/Loadable/i18n/index.js +3 -3
  156. package/build/esm/containers/PageConstructor/Provider.d.ts +0 -2
  157. package/build/esm/containers/PageConstructor/Provider.js +1 -3
  158. package/build/esm/context/localeContext/localeContext.d.ts +2 -2
  159. package/build/esm/context/localeContext/localeContext.js +1 -1
  160. package/build/esm/editor/components/ControlPanel/ControlPanel.js +2 -2
  161. package/build/esm/editor/components/ControlPanel/i18n/en.json +2 -1
  162. package/build/esm/editor/components/ControlPanel/i18n/index.d.ts +1 -2
  163. package/build/esm/editor/components/ControlPanel/i18n/index.js +3 -3
  164. package/build/esm/editor/components/ControlPanel/i18n/ru.json +2 -1
  165. package/build/esm/editor/components/ErrorBoundary/ErrorBoundary.js +1 -1
  166. package/build/esm/editor/components/ErrorBoundary/i18n/index.d.ts +1 -2
  167. package/build/esm/editor/components/ErrorBoundary/i18n/index.js +3 -3
  168. package/build/esm/editor/components/NotFoundBlock/NotFoundBlock.js +1 -1
  169. package/build/esm/editor/components/NotFoundBlock/i18n/index.d.ts +1 -2
  170. package/build/esm/editor/components/NotFoundBlock/i18n/index.js +3 -3
  171. package/build/esm/hooks/useAnalytics.d.ts +2 -2
  172. package/build/esm/hooks/useMetrika.d.ts +1 -13
  173. package/build/esm/hooks/useMetrika.js +1 -38
  174. package/build/esm/models/common.d.ts +2 -53
  175. package/build/esm/models/common.js +0 -24
  176. package/build/esm/models/constructor-items/common.d.ts +2 -28
  177. package/build/esm/models/constructor-items/sub-blocks.d.ts +2 -3
  178. package/build/esm/models/guards.d.ts +0 -2
  179. package/build/esm/models/guards.js +0 -3
  180. package/build/esm/schema/constants.d.ts +4 -176
  181. package/build/esm/schema/validators/common.d.ts +1 -188
  182. package/build/esm/schema/validators/common.js +1 -31
  183. package/build/esm/schema/validators/index.d.ts +0 -2
  184. package/build/esm/schema/validators/index.js +0 -2
  185. package/build/esm/sub-blocks/HubspotForm/index.js +1 -6
  186. package/build/esm/sub-blocks/LayoutItem/utils.d.ts +1 -15
  187. package/build/esm/sub-blocks/PriceCard/schema.d.ts +0 -88
  188. package/build/esm/text-transform/common.d.ts +4 -4
  189. package/build/esm/text-transform/transformers.d.ts +2 -2
  190. package/build/esm/text-transform/utils.d.ts +6 -6
  191. package/build/esm/text-transform/utils.js +1 -1
  192. package/build/esm/utils/index.d.ts +0 -1
  193. package/build/esm/utils/index.js +0 -1
  194. package/package.json +1 -1
  195. package/server/models/common.d.ts +2 -53
  196. package/server/models/common.js +1 -25
  197. package/server/models/constructor-items/common.d.ts +2 -28
  198. package/server/models/constructor-items/sub-blocks.d.ts +2 -3
  199. package/server/models/guards.d.ts +0 -2
  200. package/server/models/guards.js +1 -5
  201. package/server/text-transform/common.d.ts +4 -4
  202. package/server/text-transform/transformers.d.ts +2 -2
  203. package/server/text-transform/utils.d.ts +6 -6
  204. package/server/text-transform/utils.js +5 -5
  205. package/server/utils/index.d.ts +0 -1
  206. package/server/utils/index.js +1 -4
  207. package/widget/index.js +1 -1
  208. package/build/cjs/context/metrikaContext/index.d.ts +0 -1
  209. package/build/cjs/context/metrikaContext/index.js +0 -4
  210. package/build/cjs/context/metrikaContext/metrikaContext.d.ts +0 -13
  211. package/build/cjs/context/metrikaContext/metrikaContext.js +0 -6
  212. package/build/cjs/i18n.d.ts +0 -2
  213. package/build/cjs/i18n.js +0 -12
  214. package/build/cjs/schema/validators/pixel.d.ts +0 -57
  215. package/build/cjs/schema/validators/pixel.js +0 -63
  216. package/build/cjs/utils/configure.d.ts +0 -12
  217. package/build/cjs/utils/configure.js +0 -26
  218. package/build/cjs/utils/registerKeyset.d.ts +0 -5
  219. package/build/cjs/utils/registerKeyset.js +0 -9
  220. package/build/esm/context/metrikaContext/index.d.ts +0 -1
  221. package/build/esm/context/metrikaContext/index.js +0 -1
  222. package/build/esm/context/metrikaContext/metrikaContext.d.ts +0 -13
  223. package/build/esm/context/metrikaContext/metrikaContext.js +0 -2
  224. package/build/esm/i18n.d.ts +0 -2
  225. package/build/esm/i18n.js +0 -9
  226. package/build/esm/schema/validators/pixel.d.ts +0 -57
  227. package/build/esm/schema/validators/pixel.js +0 -60
  228. package/build/esm/utils/configure.d.ts +0 -12
  229. package/build/esm/utils/configure.js +0 -20
  230. package/build/esm/utils/registerKeyset.d.ts +0 -5
  231. package/build/esm/utils/registerKeyset.js +0 -5
  232. package/server/utils/configure.d.ts +0 -12
  233. 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;
@@ -2,9 +2,6 @@ import { BlockTypes, } from './';
2
2
  export function isBlock(block) {
3
3
  return block.type in BlockTypes;
4
4
  }
5
- export function isNewMetrikaFormat(metrika) {
6
- return Boolean(Array.isArray(metrika) && metrika.length && typeof metrika[0] === 'object');
7
- }
8
5
  export function isYandexDataForm(data) {
9
6
  return Boolean(data.yandex);
10
7
  }
@@ -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;
@@ -986,6 +898,10 @@ export declare const cardSchemas: {
986
898
  optionName: string;
987
899
  })[];
988
900
  };
901
+ mediaView: {
902
+ type: string;
903
+ enum: string[];
904
+ };
989
905
  disableCompress: {
990
906
  type: string;
991
907
  };
@@ -1062,94 +978,6 @@ export declare const cardSchemas: {
1062
978
  optionName: string;
1063
979
  })[];
1064
980
  };
1065
- metrikaGoals: {
1066
- oneOf: ({
1067
- type: string;
1068
- optionName: string;
1069
- items?: undefined;
1070
- } | {
1071
- type: string;
1072
- items: {
1073
- type: string;
1074
- additionalProperties?: undefined;
1075
- required?: undefined;
1076
- properties?: undefined;
1077
- };
1078
- optionName: string;
1079
- } | {
1080
- type: string;
1081
- items: {
1082
- type: string;
1083
- additionalProperties: boolean;
1084
- required: string[];
1085
- properties: {
1086
- name: {
1087
- type: string;
1088
- };
1089
- isCrossSite: {
1090
- type: string;
1091
- };
1092
- };
1093
- };
1094
- optionName: string;
1095
- })[];
1096
- };
1097
- pixelEvents: {
1098
- type: string;
1099
- items: {
1100
- type: string;
1101
- required: string[];
1102
- additionalProperties: boolean;
1103
- properties: {
1104
- name: {
1105
- type: string;
1106
- enum: import("../models").PixelEventType[];
1107
- };
1108
- data: {};
1109
- };
1110
- select: {
1111
- $data: string;
1112
- };
1113
- selectCases: {
1114
- SubmitApplication: {
1115
- additionalProperties: boolean;
1116
- properties: {
1117
- name: {};
1118
- };
1119
- };
1120
- Contact: {
1121
- additionalProperties: boolean;
1122
- properties: {
1123
- name: {};
1124
- };
1125
- };
1126
- Lead: {
1127
- additionalProperties: boolean;
1128
- properties: {
1129
- name: {};
1130
- data: {
1131
- type: string;
1132
- additionalProperties: boolean;
1133
- properties: {
1134
- content_category: {
1135
- type: string;
1136
- };
1137
- content_name: {
1138
- type: string;
1139
- };
1140
- currency: {
1141
- type: string;
1142
- };
1143
- value: {
1144
- type: string;
1145
- };
1146
- };
1147
- };
1148
- };
1149
- };
1150
- };
1151
- };
1152
- };
1153
981
  analyticsEvents: {
1154
982
  oneOf: ({
1155
983
  optionName: string;
@@ -20,6 +20,7 @@ export declare const sizeNumber: {
20
20
  };
21
21
  export declare const contentThemes: string[];
22
22
  export declare const quoteTypes: QuoteType[];
23
+ export declare const mediaView: string[];
23
24
  export declare const customControlsType: CustomControlsType[];
24
25
  export declare const customControlsButtonPositioning: CustomControlsButtonPositioning[];
25
26
  export declare const BaseProps: {
@@ -589,100 +590,6 @@ export declare const ButtonProps: {
589
590
  optionName: string;
590
591
  })[];
591
592
  };
592
- /**
593
- * @deprecated Metrika will be deleted
594
- */
595
- metrikaGoals: {
596
- oneOf: ({
597
- type: string;
598
- optionName: string;
599
- items?: undefined;
600
- } | {
601
- type: string;
602
- items: {
603
- type: string;
604
- additionalProperties?: undefined;
605
- required?: undefined;
606
- properties?: undefined;
607
- };
608
- optionName: string;
609
- } | {
610
- type: string;
611
- items: {
612
- type: string;
613
- additionalProperties: boolean;
614
- required: string[];
615
- properties: {
616
- name: {
617
- type: string;
618
- };
619
- isCrossSite: {
620
- type: string;
621
- };
622
- };
623
- };
624
- optionName: string;
625
- })[];
626
- };
627
- /**
628
- * @deprecated Pixel will be deleted
629
- */
630
- pixelEvents: {
631
- type: string;
632
- items: {
633
- type: string;
634
- required: string[];
635
- additionalProperties: boolean;
636
- properties: {
637
- name: {
638
- type: string;
639
- enum: import("../../models").PixelEventType[];
640
- };
641
- data: {};
642
- };
643
- select: {
644
- $data: string;
645
- };
646
- selectCases: {
647
- SubmitApplication: {
648
- additionalProperties: boolean;
649
- properties: {
650
- name: {};
651
- };
652
- };
653
- Contact: {
654
- additionalProperties: boolean;
655
- properties: {
656
- name: {};
657
- };
658
- };
659
- Lead: {
660
- additionalProperties: boolean;
661
- properties: {
662
- name: {};
663
- data: {
664
- type: string;
665
- additionalProperties: boolean;
666
- properties: {
667
- content_category: {
668
- type: string;
669
- };
670
- content_name: {
671
- type: string;
672
- };
673
- currency: {
674
- type: string;
675
- };
676
- value: {
677
- type: string;
678
- };
679
- };
680
- };
681
- };
682
- };
683
- };
684
- };
685
- };
686
593
  analyticsEvents: {
687
594
  oneOf: ({
688
595
  optionName: string;
@@ -932,100 +839,6 @@ export declare const ButtonBlock: {
932
839
  optionName: string;
933
840
  })[];
934
841
  };
935
- /**
936
- * @deprecated Metrika will be deleted
937
- */
938
- metrikaGoals: {
939
- oneOf: ({
940
- type: string;
941
- optionName: string;
942
- items?: undefined;
943
- } | {
944
- type: string;
945
- items: {
946
- type: string;
947
- additionalProperties?: undefined;
948
- required?: undefined;
949
- properties?: undefined;
950
- };
951
- optionName: string;
952
- } | {
953
- type: string;
954
- items: {
955
- type: string;
956
- additionalProperties: boolean;
957
- required: string[];
958
- properties: {
959
- name: {
960
- type: string;
961
- };
962
- isCrossSite: {
963
- type: string;
964
- };
965
- };
966
- };
967
- optionName: string;
968
- })[];
969
- };
970
- /**
971
- * @deprecated Pixel will be deleted
972
- */
973
- pixelEvents: {
974
- type: string;
975
- items: {
976
- type: string;
977
- required: string[];
978
- additionalProperties: boolean;
979
- properties: {
980
- name: {
981
- type: string;
982
- enum: import("../../models").PixelEventType[];
983
- };
984
- data: {};
985
- };
986
- select: {
987
- $data: string;
988
- };
989
- selectCases: {
990
- SubmitApplication: {
991
- additionalProperties: boolean;
992
- properties: {
993
- name: {};
994
- };
995
- };
996
- Contact: {
997
- additionalProperties: boolean;
998
- properties: {
999
- name: {};
1000
- };
1001
- };
1002
- Lead: {
1003
- additionalProperties: boolean;
1004
- properties: {
1005
- name: {};
1006
- data: {
1007
- type: string;
1008
- additionalProperties: boolean;
1009
- properties: {
1010
- content_category: {
1011
- type: string;
1012
- };
1013
- content_name: {
1014
- type: string;
1015
- };
1016
- currency: {
1017
- type: string;
1018
- };
1019
- value: {
1020
- type: string;
1021
- };
1022
- };
1023
- };
1024
- };
1025
- };
1026
- };
1027
- };
1028
- };
1029
842
  analyticsEvents: {
1030
843
  oneOf: ({
1031
844
  optionName: string;
@@ -1,7 +1,6 @@
1
1
  import { ImageProps } from '../../components/Image/schema';
2
2
  import { CustomControlsButtonPositioning, CustomControlsType, MediaVideoControlsType, QuoteType, Theme, } from '../../models';
3
3
  import { AnalyticsEventSchema } from './event';
4
- import { pixelEvents } from './pixel';
5
4
  export const mediaDirection = ['media-content', 'content-media'];
6
5
  export const textSize = ['s', 'm', 'l'];
7
6
  export const containerSizesArray = ['sm', 'md', 'lg', 'xl', 'all'];
@@ -17,6 +16,7 @@ export const dividerEnum = { enum: ['0', 'xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl'
17
16
  export const sizeNumber = { type: 'number', maximum: 12, minimum: 1 };
18
17
  export const contentThemes = ['default', 'dark', 'light'];
19
18
  export const quoteTypes = Object.values(QuoteType);
19
+ export const mediaView = ['fit', 'full'];
20
20
  export const customControlsType = [
21
21
  CustomControlsType.WithMuteButton,
22
22
  CustomControlsType.WithPlayPauseButton,
@@ -364,36 +364,6 @@ export const ButtonProps = {
364
364
  },
365
365
  ],
366
366
  },
367
- /**
368
- * @deprecated Metrika will be deleted
369
- */
370
- metrikaGoals: {
371
- oneOf: [
372
- { type: 'string', optionName: 'single' },
373
- { type: 'array', items: { type: 'string' }, optionName: 'list' },
374
- {
375
- type: 'array',
376
- items: {
377
- type: 'object',
378
- additionalProperties: false,
379
- required: ['name'],
380
- properties: {
381
- name: {
382
- type: 'string',
383
- },
384
- isCrossSite: {
385
- type: 'boolean',
386
- },
387
- },
388
- },
389
- optionName: 'list-extended',
390
- },
391
- ],
392
- },
393
- /**
394
- * @deprecated Pixel will be deleted
395
- */
396
- pixelEvents,
397
367
  analyticsEvents: {
398
368
  oneOf: [
399
369
  Object.assign(Object.assign({}, 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
  };
@@ -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 const validators = {
@@ -10,7 +9,6 @@ export const validators = {
10
9
  common,
11
10
  components,
12
11
  subBlocks,
13
- pixel,
14
12
  utils,
15
13
  navigation,
16
14
  };
@@ -2,17 +2,15 @@ import React, { forwardRef, useContext, useMemo } from 'react';
2
2
  import { MobileContext } from '../../context/mobileContext';
3
3
  import { useTheme } from '../../context/theme';
4
4
  import { useAnalytics, useHandleHubspotEvents } from '../../hooks';
5
- import { useMetrika } from '../../hooks/useMetrika';
6
5
  import { DefaultEventNames } from '../../models';
7
6
  import { block } from '../../utils';
8
7
  import HubspotFormContainer from './HubspotFormContainer';
9
8
  import './HubspotForm.css';
10
9
  const b = block('hubspot-form');
11
10
  const HubspotForm = forwardRef((props, ref) => {
12
- const { className, theme: themeProp, isMobile: isMobileProp, formId, formInstanceId, portalId, region, formClassName, pixelEvents,
11
+ const { className, theme: themeProp, isMobile: isMobileProp, formId, formInstanceId, portalId, region, formClassName,
13
12
  // hubspotEvents, // TODO: decide how to handle them
14
13
  analyticsEvents, onBeforeSubmit, onSubmit, onBeforeLoad, onLoad, createDOMElement, onSubmitError, } = props;
15
- const handleMetrika = useMetrika();
16
14
  const themeValue = useTheme();
17
15
  const handleAnalytics = useAnalytics(DefaultEventNames.HubspotFormSubmit);
18
16
  const isMobileValue = useContext(MobileContext);
@@ -24,7 +22,6 @@ const HubspotForm = forwardRef((props, ref) => {
24
22
  onLoad,
25
23
  onSubmitError,
26
24
  onSubmit: (event) => {
27
- handleMetrika === null || handleMetrika === void 0 ? void 0 : handleMetrika({ pixelEvents });
28
25
  handleAnalytics(analyticsEvents);
29
26
  onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit(event);
30
27
  },
@@ -32,8 +29,6 @@ const HubspotForm = forwardRef((props, ref) => {
32
29
  onBeforeLoad,
33
30
  onBeforeSubmit,
34
31
  onLoad,
35
- handleMetrika,
36
- pixelEvents,
37
32
  handleAnalytics,
38
33
  analyticsEvents,
39
34
  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;