@gravity-ui/page-constructor 1.15.0-alpha.9 → 1.15.1

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 (269) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/README.md +5 -75
  3. package/build/cjs/blocks/Banner/Banner.js +2 -3
  4. package/build/cjs/blocks/Banner/schema.d.ts +0 -243
  5. package/build/cjs/blocks/Banner/schema.js +1 -3
  6. package/build/cjs/blocks/CardLayout/schema.d.ts +0 -6
  7. package/build/cjs/blocks/ContentLayout/ContentLayout.js +2 -3
  8. package/build/cjs/blocks/ContentLayout/schema.d.ts +0 -3
  9. package/build/cjs/blocks/ExtendedFeatures/ExtendedFeatures.d.ts +1 -1
  10. package/build/cjs/blocks/ExtendedFeatures/ExtendedFeatures.js +2 -3
  11. package/build/cjs/blocks/ExtendedFeatures/schema.d.ts +0 -3
  12. package/build/cjs/blocks/Header/Header.js +5 -6
  13. package/build/cjs/blocks/Header/schema.d.ts +0 -3
  14. package/build/cjs/blocks/HeaderSlider/schema.d.ts +0 -3
  15. package/build/cjs/blocks/Icons/schema.d.ts +0 -6
  16. package/build/cjs/blocks/Info/Info.js +3 -4
  17. package/build/cjs/blocks/Info/schema.d.ts +0 -3
  18. package/build/cjs/blocks/Info/schema.js +0 -2
  19. package/build/cjs/blocks/LinkTable/schema.d.ts +0 -3
  20. package/build/cjs/blocks/Media/Media.js +2 -3
  21. package/build/cjs/blocks/Media/MediaContent.js +2 -3
  22. package/build/cjs/blocks/Media/schema.d.ts +0 -81
  23. package/build/cjs/blocks/Preview/MediaContent/MediaContent.d.ts +1 -2
  24. package/build/cjs/blocks/Preview/MediaContent/MediaContent.js +2 -3
  25. package/build/cjs/blocks/Preview/MediaContent/PreviewMedia.d.ts +0 -1
  26. package/build/cjs/blocks/Preview/MediaContent/PreviewMedia.js +2 -3
  27. package/build/cjs/blocks/Preview/Preview.js +2 -3
  28. package/build/cjs/blocks/Preview/schema.d.ts +0 -3
  29. package/build/cjs/blocks/Preview/schema.js +1 -3
  30. package/build/cjs/blocks/PromoFeaturesBlock/PromoFeaturesBlock.js +2 -3
  31. package/build/cjs/blocks/PromoFeaturesBlock/schema.d.ts +0 -3
  32. package/build/cjs/blocks/Questions/Questions.js +2 -3
  33. package/build/cjs/blocks/Questions/schema.d.ts +0 -3
  34. package/build/cjs/blocks/Security/Security.js +2 -3
  35. package/build/cjs/blocks/Security/schema.d.ts +0 -3
  36. package/build/cjs/blocks/Security/schema.js +1 -3
  37. package/build/cjs/blocks/Share/Share.d.ts +1 -1
  38. package/build/cjs/blocks/Share/Share.js +2 -10
  39. package/build/cjs/blocks/Simple/schema.d.ts +0 -3
  40. package/build/cjs/blocks/Slider/schema.d.ts +0 -3
  41. package/build/cjs/blocks/Table/schema.d.ts +0 -3
  42. package/build/cjs/blocks/Tabs/Tabs.d.ts +1 -1
  43. package/build/cjs/blocks/Tabs/Tabs.js +4 -5
  44. package/build/cjs/blocks/Tabs/schema.d.ts +0 -3
  45. package/build/cjs/components/BackLink/BackLink.d.ts +0 -1
  46. package/build/cjs/components/BackLink/BackLink.js +2 -11
  47. package/build/cjs/components/BackgroundMedia/BackgroundMedia.js +1 -2
  48. package/build/cjs/components/Button/Button.d.ts +0 -1
  49. package/build/cjs/components/Button/Button.js +2 -11
  50. package/build/cjs/components/ButtonTabs/ButtonTabs.d.ts +0 -1
  51. package/build/cjs/components/ButtonTabs/ButtonTabs.js +2 -11
  52. package/build/cjs/components/CardBase/CardBase.d.ts +0 -3
  53. package/build/cjs/components/CardBase/CardBase.js +1 -10
  54. package/build/cjs/components/FullscreenImage/FullscreenImage.js +8 -6
  55. package/build/cjs/components/FullscreenMedia/FullScreenMedia.css +70 -0
  56. package/build/cjs/components/FullscreenMedia/FullScreenMedia.d.ts +9 -0
  57. package/build/cjs/components/FullscreenMedia/FullScreenMedia.js +40 -0
  58. package/build/cjs/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +1 -10
  59. package/build/cjs/components/Link/Link.js +2 -11
  60. package/build/cjs/components/Media/Media.js +5 -7
  61. package/build/cjs/components/Media/Video/Video.js +3 -6
  62. package/build/cjs/components/MetaInfo/MetaInfo.css +13 -0
  63. package/build/cjs/components/MetaInfo/MetaInfo.d.ts +6 -0
  64. package/build/cjs/components/MetaInfo/MetaInfo.js +8 -0
  65. package/build/cjs/components/MetaInfo/schema.d.ts +8 -0
  66. package/build/cjs/components/MetaInfo/schema.js +10 -0
  67. package/build/cjs/components/ReactPlayer/ReactPlayer.js +3 -15
  68. package/build/cjs/components/VideoBlock/VideoBlock.d.ts +1 -0
  69. package/build/cjs/components/VideoBlock/VideoBlock.js +6 -10
  70. package/build/cjs/components/YandexForm/YandexForm.d.ts +0 -3
  71. package/build/cjs/components/YandexForm/YandexForm.js +2 -19
  72. package/build/cjs/components/index.d.ts +2 -0
  73. package/build/cjs/components/index.js +5 -1
  74. package/build/cjs/constructor-items.d.ts +9 -5
  75. package/build/cjs/constructor-items.js +4 -0
  76. package/build/cjs/containers/PageConstructor/PageConstructor.css +1 -0
  77. package/build/cjs/containers/PageConstructor/Provider.d.ts +0 -2
  78. package/build/cjs/containers/PageConstructor/Provider.js +1 -3
  79. package/build/cjs/context/metrikaContext/metrikaContext.d.ts +0 -6
  80. package/build/cjs/hooks/index.d.ts +0 -1
  81. package/build/cjs/hooks/index.js +0 -1
  82. package/build/cjs/hooks/useMetrika.d.ts +0 -6
  83. package/build/cjs/hooks/useMetrika.js +0 -8
  84. package/build/cjs/models/common.d.ts +0 -34
  85. package/build/cjs/models/common.js +1 -10
  86. package/build/cjs/models/constructor-items/blocks.d.ts +0 -11
  87. package/build/cjs/models/constructor-items/common.d.ts +2 -27
  88. package/build/cjs/models/constructor-items/sub-blocks.d.ts +16 -6
  89. package/build/cjs/models/constructor-items/sub-blocks.js +4 -0
  90. package/build/cjs/navigation/components/NavigationItem/NavigationItem.js +2 -3
  91. package/build/cjs/schema/index.js +1 -0
  92. package/build/cjs/schema/validators/common.d.ts +0 -171
  93. package/build/cjs/schema/validators/common.js +0 -12
  94. package/build/cjs/schema/validators/sub-blocks.d.ts +1 -0
  95. package/build/cjs/schema/validators/sub-blocks.js +1 -0
  96. package/build/cjs/sub-blocks/BackgroundCard/BackgroundCard.js +2 -3
  97. package/build/cjs/sub-blocks/BackgroundCard/schema.d.ts +0 -3
  98. package/build/cjs/sub-blocks/BackgroundCard/schema.js +0 -2
  99. package/build/cjs/sub-blocks/BannerCard/BannerCard.js +2 -3
  100. package/build/cjs/sub-blocks/BasicCard/BasicCard.js +2 -3
  101. package/build/cjs/sub-blocks/CardWithImage/CardWithImage.d.ts +1 -1
  102. package/build/cjs/sub-blocks/CardWithImage/CardWithImage.js +2 -3
  103. package/build/cjs/sub-blocks/Content/Content.js +3 -4
  104. package/build/cjs/sub-blocks/HubspotForm/HubspotForm.css +2 -2
  105. package/build/cjs/sub-blocks/HubspotForm/index.js +3 -18
  106. package/build/cjs/sub-blocks/LayoutItem/LayoutItem.css +16 -0
  107. package/build/cjs/sub-blocks/LayoutItem/LayoutItem.d.ts +3 -0
  108. package/build/cjs/sub-blocks/LayoutItem/LayoutItem.js +21 -0
  109. package/build/cjs/sub-blocks/LayoutItem/schema.d.ts +218 -0
  110. package/build/cjs/sub-blocks/LayoutItem/schema.js +18 -0
  111. package/build/cjs/sub-blocks/LayoutItem/utils.d.ts +15 -0
  112. package/build/cjs/sub-blocks/LayoutItem/utils.js +12 -0
  113. package/build/cjs/sub-blocks/MediaCard/MediaCard.d.ts +1 -1
  114. package/build/cjs/sub-blocks/MediaCard/MediaCard.js +2 -3
  115. package/build/cjs/sub-blocks/Quote/Quote.js +2 -9
  116. package/build/cjs/sub-blocks/Quote/schema.d.ts +0 -3
  117. package/build/cjs/sub-blocks/Quote/schema.js +1 -3
  118. package/build/cjs/sub-blocks/index.d.ts +1 -0
  119. package/build/cjs/sub-blocks/index.js +3 -1
  120. package/build/cjs/text-transform/blocks.js +17 -0
  121. package/build/cjs/utils/hubspot.d.ts +2 -1
  122. package/build/cjs/utils/hubspot.js +5 -1
  123. package/build/esm/blocks/Banner/Banner.js +2 -3
  124. package/build/esm/blocks/Banner/schema.d.ts +0 -243
  125. package/build/esm/blocks/Banner/schema.js +1 -3
  126. package/build/esm/blocks/CardLayout/schema.d.ts +0 -6
  127. package/build/esm/blocks/ContentLayout/ContentLayout.js +2 -3
  128. package/build/esm/blocks/ContentLayout/schema.d.ts +0 -3
  129. package/build/esm/blocks/ExtendedFeatures/ExtendedFeatures.d.ts +1 -1
  130. package/build/esm/blocks/ExtendedFeatures/ExtendedFeatures.js +2 -3
  131. package/build/esm/blocks/ExtendedFeatures/schema.d.ts +0 -3
  132. package/build/esm/blocks/Header/Header.js +5 -6
  133. package/build/esm/blocks/Header/schema.d.ts +0 -3
  134. package/build/esm/blocks/HeaderSlider/schema.d.ts +0 -3
  135. package/build/esm/blocks/Icons/schema.d.ts +0 -6
  136. package/build/esm/blocks/Info/Info.js +3 -4
  137. package/build/esm/blocks/Info/schema.d.ts +0 -3
  138. package/build/esm/blocks/Info/schema.js +0 -2
  139. package/build/esm/blocks/LinkTable/schema.d.ts +0 -3
  140. package/build/esm/blocks/Media/Media.js +2 -3
  141. package/build/esm/blocks/Media/MediaContent.js +2 -3
  142. package/build/esm/blocks/Media/schema.d.ts +0 -81
  143. package/build/esm/blocks/Preview/MediaContent/MediaContent.d.ts +1 -2
  144. package/build/esm/blocks/Preview/MediaContent/MediaContent.js +2 -3
  145. package/build/esm/blocks/Preview/MediaContent/PreviewMedia.d.ts +0 -1
  146. package/build/esm/blocks/Preview/MediaContent/PreviewMedia.js +2 -3
  147. package/build/esm/blocks/Preview/Preview.js +2 -3
  148. package/build/esm/blocks/Preview/schema.d.ts +0 -3
  149. package/build/esm/blocks/Preview/schema.js +1 -3
  150. package/build/esm/blocks/PromoFeaturesBlock/PromoFeaturesBlock.js +2 -3
  151. package/build/esm/blocks/PromoFeaturesBlock/schema.d.ts +0 -3
  152. package/build/esm/blocks/Questions/Questions.js +2 -3
  153. package/build/esm/blocks/Questions/schema.d.ts +0 -3
  154. package/build/esm/blocks/Security/Security.js +2 -3
  155. package/build/esm/blocks/Security/schema.d.ts +0 -3
  156. package/build/esm/blocks/Security/schema.js +1 -3
  157. package/build/esm/blocks/Share/Share.d.ts +1 -1
  158. package/build/esm/blocks/Share/Share.js +3 -11
  159. package/build/esm/blocks/Simple/schema.d.ts +0 -3
  160. package/build/esm/blocks/Slider/schema.d.ts +0 -3
  161. package/build/esm/blocks/Table/schema.d.ts +0 -3
  162. package/build/esm/blocks/Tabs/Tabs.d.ts +1 -1
  163. package/build/esm/blocks/Tabs/Tabs.js +4 -5
  164. package/build/esm/blocks/Tabs/schema.d.ts +0 -3
  165. package/build/esm/components/BackLink/BackLink.d.ts +0 -1
  166. package/build/esm/components/BackLink/BackLink.js +2 -11
  167. package/build/esm/components/BackgroundMedia/BackgroundMedia.js +1 -2
  168. package/build/esm/components/Button/Button.d.ts +0 -1
  169. package/build/esm/components/Button/Button.js +2 -11
  170. package/build/esm/components/ButtonTabs/ButtonTabs.d.ts +0 -1
  171. package/build/esm/components/ButtonTabs/ButtonTabs.js +2 -11
  172. package/build/esm/components/CardBase/CardBase.d.ts +0 -3
  173. package/build/esm/components/CardBase/CardBase.js +1 -10
  174. package/build/esm/components/FullscreenImage/FullscreenImage.js +9 -7
  175. package/build/esm/components/FullscreenMedia/FullScreenMedia.css +70 -0
  176. package/build/esm/components/FullscreenMedia/FullScreenMedia.d.ts +10 -0
  177. package/build/esm/components/FullscreenMedia/FullScreenMedia.js +38 -0
  178. package/build/esm/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +1 -10
  179. package/build/esm/components/Link/Link.js +2 -11
  180. package/build/esm/components/Media/Media.js +5 -7
  181. package/build/esm/components/Media/Video/Video.js +3 -6
  182. package/build/esm/components/MetaInfo/MetaInfo.css +13 -0
  183. package/build/esm/components/MetaInfo/MetaInfo.d.ts +7 -0
  184. package/build/esm/components/MetaInfo/MetaInfo.js +6 -0
  185. package/build/esm/components/MetaInfo/schema.d.ts +8 -0
  186. package/build/esm/components/MetaInfo/schema.js +8 -0
  187. package/build/esm/components/ReactPlayer/ReactPlayer.js +4 -16
  188. package/build/esm/components/VideoBlock/VideoBlock.d.ts +1 -0
  189. package/build/esm/components/VideoBlock/VideoBlock.js +6 -10
  190. package/build/esm/components/YandexForm/YandexForm.d.ts +0 -3
  191. package/build/esm/components/YandexForm/YandexForm.js +2 -19
  192. package/build/esm/components/index.d.ts +2 -0
  193. package/build/esm/components/index.js +2 -0
  194. package/build/esm/constructor-items.d.ts +9 -5
  195. package/build/esm/constructor-items.js +5 -1
  196. package/build/esm/containers/PageConstructor/PageConstructor.css +1 -0
  197. package/build/esm/containers/PageConstructor/Provider.d.ts +0 -2
  198. package/build/esm/containers/PageConstructor/Provider.js +1 -3
  199. package/build/esm/context/metrikaContext/metrikaContext.d.ts +0 -6
  200. package/build/esm/hooks/index.d.ts +0 -1
  201. package/build/esm/hooks/index.js +0 -1
  202. package/build/esm/hooks/useMetrika.d.ts +0 -6
  203. package/build/esm/hooks/useMetrika.js +0 -8
  204. package/build/esm/models/common.d.ts +0 -34
  205. package/build/esm/models/common.js +0 -9
  206. package/build/esm/models/constructor-items/blocks.d.ts +0 -11
  207. package/build/esm/models/constructor-items/common.d.ts +2 -27
  208. package/build/esm/models/constructor-items/sub-blocks.d.ts +16 -6
  209. package/build/esm/models/constructor-items/sub-blocks.js +4 -0
  210. package/build/esm/navigation/components/NavigationItem/NavigationItem.js +2 -3
  211. package/build/esm/schema/index.js +1 -0
  212. package/build/esm/schema/validators/common.d.ts +0 -171
  213. package/build/esm/schema/validators/common.js +0 -12
  214. package/build/esm/schema/validators/sub-blocks.d.ts +1 -0
  215. package/build/esm/schema/validators/sub-blocks.js +1 -0
  216. package/build/esm/sub-blocks/BackgroundCard/BackgroundCard.js +2 -3
  217. package/build/esm/sub-blocks/BackgroundCard/schema.d.ts +0 -3
  218. package/build/esm/sub-blocks/BackgroundCard/schema.js +0 -2
  219. package/build/esm/sub-blocks/BannerCard/BannerCard.js +2 -3
  220. package/build/esm/sub-blocks/BasicCard/BasicCard.js +2 -3
  221. package/build/esm/sub-blocks/CardWithImage/CardWithImage.d.ts +1 -1
  222. package/build/esm/sub-blocks/CardWithImage/CardWithImage.js +2 -3
  223. package/build/esm/sub-blocks/Content/Content.js +3 -4
  224. package/build/esm/sub-blocks/HubspotForm/HubspotForm.css +2 -2
  225. package/build/esm/sub-blocks/HubspotForm/index.js +4 -19
  226. package/build/esm/sub-blocks/LayoutItem/LayoutItem.css +16 -0
  227. package/build/esm/sub-blocks/LayoutItem/LayoutItem.d.ts +4 -0
  228. package/build/esm/sub-blocks/LayoutItem/LayoutItem.js +20 -0
  229. package/build/esm/sub-blocks/LayoutItem/schema.d.ts +218 -0
  230. package/build/esm/sub-blocks/LayoutItem/schema.js +14 -0
  231. package/build/esm/sub-blocks/LayoutItem/utils.d.ts +15 -0
  232. package/build/esm/sub-blocks/LayoutItem/utils.js +6 -0
  233. package/build/esm/sub-blocks/MediaCard/MediaCard.d.ts +1 -1
  234. package/build/esm/sub-blocks/MediaCard/MediaCard.js +2 -3
  235. package/build/esm/sub-blocks/Quote/Quote.js +4 -11
  236. package/build/esm/sub-blocks/Quote/schema.d.ts +0 -3
  237. package/build/esm/sub-blocks/Quote/schema.js +1 -3
  238. package/build/esm/sub-blocks/index.d.ts +1 -0
  239. package/build/esm/sub-blocks/index.js +1 -0
  240. package/build/esm/text-transform/blocks.js +17 -0
  241. package/build/esm/utils/hubspot.d.ts +2 -1
  242. package/build/esm/utils/hubspot.js +5 -1
  243. package/package.json +4 -5
  244. package/server/models/common.d.ts +0 -34
  245. package/server/models/common.js +1 -10
  246. package/server/models/constructor-items/blocks.d.ts +0 -11
  247. package/server/models/constructor-items/common.d.ts +2 -27
  248. package/server/models/constructor-items/sub-blocks.d.ts +16 -6
  249. package/server/models/constructor-items/sub-blocks.js +4 -0
  250. package/server/text-transform/blocks.js +17 -0
  251. package/server/utils/hubspot.d.ts +2 -1
  252. package/server/utils/hubspot.js +5 -1
  253. package/styles/root.scss +1 -0
  254. package/build/cjs/context/analyticsContext/analyticsContext.d.ts +0 -6
  255. package/build/cjs/context/analyticsContext/analyticsContext.js +0 -6
  256. package/build/cjs/context/analyticsContext/index.d.ts +0 -1
  257. package/build/cjs/context/analyticsContext/index.js +0 -4
  258. package/build/cjs/hooks/useAnalytics.d.ts +0 -2
  259. package/build/cjs/hooks/useAnalytics.js +0 -23
  260. package/build/cjs/schema/validators/event.d.ts +0 -37
  261. package/build/cjs/schema/validators/event.js +0 -38
  262. package/build/esm/context/analyticsContext/analyticsContext.d.ts +0 -6
  263. package/build/esm/context/analyticsContext/analyticsContext.js +0 -2
  264. package/build/esm/context/analyticsContext/index.d.ts +0 -1
  265. package/build/esm/context/analyticsContext/index.js +0 -1
  266. package/build/esm/hooks/useAnalytics.d.ts +0 -2
  267. package/build/esm/hooks/useAnalytics.js +0 -19
  268. package/build/esm/schema/validators/event.d.ts +0 -37
  269. package/build/esm/schema/validators/event.js +0 -35
@@ -426,84 +426,6 @@ export declare const MediaBlock: {
426
426
  };
427
427
  };
428
428
  };
429
- analyticsEvents: {
430
- anyOf: ({
431
- type: string;
432
- additionalProperties: {
433
- type: string;
434
- };
435
- required: string[];
436
- properties: {
437
- name: {
438
- type: string;
439
- };
440
- type: {
441
- type: string;
442
- };
443
- counters: {
444
- type: string;
445
- additionalProperties: boolean;
446
- required: never[];
447
- properties: {
448
- include: {
449
- type: string;
450
- items: {
451
- type: string;
452
- };
453
- };
454
- exclude: {
455
- type: string;
456
- items: {
457
- type: string;
458
- };
459
- };
460
- };
461
- };
462
- blockName: {
463
- type: string;
464
- };
465
- };
466
- } | {
467
- type: string;
468
- items: {
469
- type: string;
470
- additionalProperties: {
471
- type: string;
472
- };
473
- required: string[];
474
- properties: {
475
- name: {
476
- type: string;
477
- };
478
- type: {
479
- type: string;
480
- };
481
- counters: {
482
- type: string;
483
- additionalProperties: boolean;
484
- required: never[];
485
- properties: {
486
- include: {
487
- type: string;
488
- items: {
489
- type: string;
490
- };
491
- };
492
- exclude: {
493
- type: string;
494
- items: {
495
- type: string;
496
- };
497
- };
498
- };
499
- };
500
- blockName: {
501
- type: string;
502
- };
503
- };
504
- };
505
- })[];
506
- };
507
429
  target: {
508
430
  type: string;
509
431
  enum: string[];
@@ -603,9 +525,6 @@ export declare const MediaBlock: {
603
525
  resetPaddings: {
604
526
  type: string;
605
527
  };
606
- blockName: {
607
- type: string;
608
- };
609
528
  type: {};
610
529
  when: {};
611
530
  };
@@ -9,7 +9,6 @@ interface MediaContentProps extends Refable<HTMLDivElement> {
9
9
  switching: boolean;
10
10
  isActiveBlock: (id: number, isMediaBlock?: boolean) => boolean;
11
11
  showMediaContent: (id: number) => void;
12
- blockName?: string;
13
12
  }
14
- declare const MediaContent: React.ForwardRefExoticComponent<Pick<MediaContentProps, "title" | "blockName" | "items" | "description" | "ratioMediaContent" | "switching" | "isActiveBlock" | "showMediaContent"> & React.RefAttributes<HTMLDivElement>>;
13
+ declare const MediaContent: React.ForwardRefExoticComponent<Pick<MediaContentProps, "title" | "items" | "description" | "ratioMediaContent" | "switching" | "isActiveBlock" | "showMediaContent"> & React.RefAttributes<HTMLDivElement>>;
15
14
  export default MediaContent;
@@ -7,9 +7,8 @@ import PreviewMedia from './PreviewMedia';
7
7
  import { ThemeValueContext } from '../../../context/theme/ThemeValueContext';
8
8
  import './MediaContent.css';
9
9
  const b = block('preview-media-content-block');
10
- const COMPONENT_NAME = 'preview-media-content';
11
10
  const MediaContent = forwardRef((props, ref) => {
12
- const { items, title, description = '', switching, ratioMediaContent = '1-1', isActiveBlock, showMediaContent, blockName = COMPONENT_NAME, } = props;
11
+ const { items, title, description = '', switching, ratioMediaContent = '1-1', isActiveBlock, showMediaContent, } = props;
13
12
  const { themeValue: theme } = useContext(ThemeValueContext);
14
13
  const [mediaSizes, setMediaSizes] = useState({ [GridColumnSize.All]: 12 });
15
14
  const [contentSizes, setContentSizes] = useState({ [GridColumnSize.All]: 12 });
@@ -31,7 +30,7 @@ const MediaContent = forwardRef((props, ref) => {
31
30
  const mediaMods = { active: isActiveBlock(id, true) };
32
31
  const onClick = () => showMediaContent(id);
33
32
  contentComponents.push(React.createElement(PreviewContent, Object.assign({ key: id, id: id }, content, { switching: switching, onClick: onClick, mods: contentMods })));
34
- mediaComponents.push(React.createElement(PreviewMedia, { key: id, id: id, media: media && getThemedValue(media, theme), play: isActive, mods: mediaMods, blockName: blockName }));
33
+ mediaComponents.push(React.createElement(PreviewMedia, { key: id, id: id, media: media && getThemedValue(media, theme), play: isActive, mods: mediaMods }));
35
34
  });
36
35
  return (React.createElement(Fragment, null,
37
36
  React.createElement(Col, { sizes: contentSizes, className: b('content') },
@@ -5,7 +5,6 @@ interface PreviewMediaProps {
5
5
  media: MediaProps;
6
6
  play: boolean;
7
7
  mods: Modifiers | null;
8
- blockName?: string;
9
8
  }
10
9
  declare const PreviewMedia: (props: PreviewMediaProps) => JSX.Element;
11
10
  export default PreviewMedia;
@@ -3,10 +3,9 @@ import { block } from '../../../utils';
3
3
  import Media from '../../../components/Media/Media';
4
4
  import './PreviewMedia.css';
5
5
  const b = block('preview-media-block');
6
- const COMPONENT_NAME = 'preview-media';
7
6
  const PreviewMedia = (props) => {
8
- const { id, media, play, mods, blockName = COMPONENT_NAME } = props;
7
+ const { id, media, play, mods } = props;
9
8
  return (React.createElement("div", { key: id, className: b('media', mods) },
10
- React.createElement(Media, Object.assign({}, media, { playVideo: play, blockName: blockName }))));
9
+ React.createElement(Media, Object.assign({}, media, { playVideo: play }))));
11
10
  };
12
11
  export default PreviewMedia;
@@ -4,7 +4,6 @@ import { BreakpointContext } from '../../context/breakpointContext';
4
4
  import AnimateBlock from '../../components/AnimateBlock/AnimateBlock';
5
5
  import MediaContent from './MediaContent/MediaContent';
6
6
  import { Row } from '../../grid';
7
- import { BlockType } from '../../models';
8
7
  import { BREAKPOINTS } from '../../constants';
9
8
  import { useIntersection } from '../../hooks/useIntersection';
10
9
  import './Preview.css';
@@ -20,7 +19,7 @@ const INDENT_BETWEEN_TITLE_DESCRIPTION = 16;
20
19
  export const PreviewBlock = (props) => {
21
20
  const { direction = 'content-media', animated, items, title, description, ratioMediaContent = '1-1', stopVideo = false,
22
21
  // TODO YDB-server doesn't see previewRef.current and doesn't update the component CLOUDFRONT-9395
23
- showImmediately = false, blockName = BlockType.PreviewBlock, } = props;
22
+ showImmediately = false, } = props;
24
23
  const breakpoint = useContext(BreakpointContext);
25
24
  const isDesktop = breakpoint >= BREAKPOINTS.md;
26
25
  const menuRef = React.useRef(null);
@@ -83,7 +82,7 @@ export const PreviewBlock = (props) => {
83
82
  }, [changeActiveSlide, activeSlide, autoSwitchTimerId]);
84
83
  return (React.createElement(AnimateBlock, { className: b(), animate: animated },
85
84
  React.createElement(Row, { ref: previewRef, className: b('row', { reverse: direction === 'media-content' }) },
86
- React.createElement(MediaContent, { ref: menuRef, items: items, title: title, description: description, ratioMediaContent: ratioMediaContent, switching: !stopSwitching, isActiveBlock: isActiveBlock, showMediaContent: showMediaContent, blockName: blockName }))));
85
+ React.createElement(MediaContent, { ref: menuRef, items: items, title: title, description: description, ratioMediaContent: ratioMediaContent, switching: !stopSwitching, isActiveBlock: isActiveBlock, showMediaContent: showMediaContent }))));
87
86
  };
88
87
  function changeMenuScroll(element, nextSlide, activeSlide) {
89
88
  if (!element) {
@@ -30,9 +30,6 @@ export declare const PreviewBlock: {
30
30
  };
31
31
  };
32
32
  };
33
- blockName: {
34
- type: string;
35
- };
36
33
  animated: {
37
34
  type: string;
38
35
  };
@@ -45,8 +45,6 @@ export const PreviewBlock = {
45
45
  }, ratioMediaContent: {
46
46
  type: 'string',
47
47
  enum: previewRatioMediaContent,
48
- }, items: filteredArray(PreviewItem), blockName: {
49
- type: 'string',
50
- } }),
48
+ }, items: filteredArray(PreviewItem) }),
51
49
  },
52
50
  };
@@ -2,7 +2,6 @@ import React from 'react';
2
2
  import { block } from '../../utils';
3
3
  import { BREAKPOINTS } from '../../constants';
4
4
  import YFMWrapper from '../../components/YFMWrapper/YFMWrapper';
5
- import { BlockType } from '../../models';
6
5
  import Media from '../../components/Media/Media';
7
6
  import BlockHeader from '../../components/BlockHeader/BlockHeader';
8
7
  import AnimateBlock from '../../components/AnimateBlock/AnimateBlock';
@@ -16,7 +15,7 @@ const breakpointColumns = {
16
15
  [BREAKPOINTS.sm]: 1,
17
16
  };
18
17
  const PromoFeaturesBlock = (props) => {
19
- const { items, title, description, theme, animated = true, blockName = BlockType.PromoFeaturesBlock, } = props;
18
+ const { items, title, description, theme, animated = true } = props;
20
19
  const backgroundTheme = theme || 'default';
21
20
  return (React.createElement(AnimateBlock, { className: b({ [backgroundTheme]: true }), animate: animated },
22
21
  React.createElement(FullWidthBackground, { className: b('background', { [backgroundTheme]: true }) }),
@@ -32,7 +31,7 @@ const PromoFeaturesBlock = (props) => {
32
31
  React.createElement("h4", { className: b('card-title') }, cardTitle),
33
32
  React.createElement("div", { className: b('card-text') },
34
33
  React.createElement(YFMWrapper, { content: text, modifiers: { constructor: true } }))),
35
- media && (React.createElement(Media, Object.assign({ className: b('card-media'), blockName: blockName }, media)))));
34
+ media && React.createElement(Media, Object.assign({ className: b('card-media') }, media))));
36
35
  }))));
37
36
  };
38
37
  export default PromoFeaturesBlock;
@@ -222,9 +222,6 @@ export declare const PromoFeaturesBlock: {
222
222
  resetPaddings: {
223
223
  type: string;
224
224
  };
225
- blockName: {
226
- type: string;
227
- };
228
225
  type: {};
229
226
  when: {};
230
227
  };
@@ -1,6 +1,5 @@
1
1
  import React, { useState } from 'react';
2
2
  import { block } from '../../utils';
3
- import { BlockType } from '../../models';
4
3
  import Link from '../../components/Link/Link';
5
4
  import { YFMWrapper, ToggleArrow, Foldable, HTML } from '../../components';
6
5
  import { Row, Col } from '../../grid';
@@ -8,7 +7,7 @@ import { Content } from '../../sub-blocks';
8
7
  import './Questions.css';
9
8
  const b = block('QuestionsBlock');
10
9
  const QuestionsBlock = (props) => {
11
- const { title, text, additionalInfo, links, buttons, items, blockName = BlockType.QuestionsBlock, } = props;
10
+ const { title, text, additionalInfo, links, buttons, items } = props;
12
11
  const [opened, setOpened] = useState([0]);
13
12
  const toggleItem = (index) => {
14
13
  let newState;
@@ -24,7 +23,7 @@ const QuestionsBlock = (props) => {
24
23
  React.createElement(Row, null,
25
24
  React.createElement(Col, { sizes: { all: 12, md: 4 } },
26
25
  React.createElement("div", { className: b('title') },
27
- React.createElement(Content, { title: title, text: text, additionalInfo: additionalInfo, links: links, buttons: buttons, colSizes: { all: 12, md: 12 }, blockName: blockName }))),
26
+ React.createElement(Content, { title: title, text: text, additionalInfo: additionalInfo, links: links, buttons: buttons, colSizes: { all: 12, md: 12 } }))),
28
27
  React.createElement(Col, { sizes: { all: 12, md: 8 } }, items.map(({ title: itemTitle, text: itemText, link, listStyle = 'dash' }, index) => {
29
28
  const isOpened = opened.includes(index);
30
29
  return (React.createElement("div", { key: itemTitle, className: b('item') },
@@ -91,9 +91,6 @@ export declare const QuestionsBlock: {
91
91
  resetPaddings: {
92
92
  type: string;
93
93
  };
94
- blockName: {
95
- type: string;
96
- };
97
94
  type: {};
98
95
  when: {};
99
96
  };
@@ -1,12 +1,11 @@
1
1
  import React from 'react';
2
2
  import { block } from '../../utils';
3
- import { BlockType } from '../../models';
4
3
  import { FullWidthBackground, HTML, Media, Link, AnimateBlock } from '../../components';
5
4
  import { Grid, Row, Col } from '../../grid';
6
5
  import './Security.css';
7
6
  const b = block('SecurityBlock');
8
7
  export const SecurityBlock = (props) => {
9
- const { backgroundColor, theme = 'dark', title, points, media, animated, blockName = BlockType.SecurityBlock, } = props;
8
+ const { backgroundColor, theme = 'dark', title, points, media, animated } = props;
10
9
  return (React.createElement(AnimateBlock, { className: b({ theme }), offset: 200, animate: animated },
11
10
  React.createElement("div", { className: b('content') },
12
11
  React.createElement(FullWidthBackground, { className: b('background'), style: { backgroundColor } }),
@@ -20,6 +19,6 @@ export const SecurityBlock = (props) => {
20
19
  link && (React.createElement(Link, { className: b('point-link'), text: link.text, url: link.url, theme: 'normal', arrow: true }))))))),
21
20
  media && (React.createElement(Row, { className: b('media') },
22
21
  React.createElement(Col, null,
23
- React.createElement(Media, Object.assign({ className: b('media') }, media, { blockName: blockName })))))))));
22
+ React.createElement(Media, Object.assign({ className: b('media') }, media)))))))));
24
23
  };
25
24
  export default SecurityBlock;
@@ -160,9 +160,6 @@ export declare const SecurityBlock: {
160
160
  };
161
161
  };
162
162
  };
163
- blockName: {
164
- type: string;
165
- };
166
163
  animated: {
167
164
  type: string;
168
165
  };
@@ -23,8 +23,6 @@ export const SecurityBlock = {
23
23
  },
24
24
  link: _.pick(LinkProps, ['text', 'url']),
25
25
  },
26
- }), blockName: {
27
- type: 'string',
28
- } }),
26
+ }) }),
29
27
  },
30
28
  };
@@ -1,4 +1,4 @@
1
1
  import { ShareBlockProps } from '../../models';
2
2
  import './Share.css';
3
- declare const Share: ({ items, title, blockName }: ShareBlockProps) => JSX.Element;
3
+ declare const Share: ({ items, title }: ShareBlockProps) => JSX.Element;
4
4
  export default Share;
@@ -1,10 +1,8 @@
1
- import React, { useContext, useCallback } from 'react';
1
+ import React, { useContext } from 'react';
2
2
  import { Icon, Button } from '@gravity-ui/uikit';
3
3
  import { block, getAbsolutePath, getShareLink } from '../../utils';
4
- import { BlockType, PredefinedEventTypes } from '../../models';
5
4
  import { LocationContext } from '../../context/locationContext';
6
5
  import i18n from './i18n';
7
- import { useAnalytics } from '../../hooks';
8
6
  import { Facebook } from '../../icons/Facebook';
9
7
  import { Twitter } from '../../icons/Twitter';
10
8
  import { Linkedin } from '../../icons/Linkedin';
@@ -19,21 +17,15 @@ const icons = {
19
17
  telegram: Telegram,
20
18
  };
21
19
  const b = block('share-block');
22
- const Share = ({ items, title, blockName = BlockType.ShareBlock }) => {
20
+ const Share = ({ items, title }) => {
23
21
  const { pathname, hostname } = useContext(LocationContext);
24
- const handleAnalytics = useAnalytics({
25
- name: 'share-button-click',
26
- type: PredefinedEventTypes.Default,
27
- blockName: blockName,
28
- });
29
- const handleButtonClick = useCallback(() => handleAnalytics === null || handleAnalytics === void 0 ? void 0 : handleAnalytics(), [handleAnalytics]);
30
22
  return (React.createElement("div", { className: b() },
31
23
  React.createElement("h5", { className: b('title') }, title || i18n('constructor-share')),
32
24
  React.createElement("div", { className: b('items') }, items.map((type) => {
33
25
  const url = getAbsolutePath(hostname, pathname);
34
26
  const socialUrl = getShareLink(url, type);
35
27
  const icon = icons[type];
36
- return (React.createElement(Button, { key: type, view: "flat", size: "l", target: "_blank", href: socialUrl, className: b('item', { type: type.toLowerCase() }), onClick: handleButtonClick }, icon && React.createElement(Icon, { data: icon, size: 24, className: b('icon', { type }) })));
28
+ return (React.createElement(Button, { key: type, view: "flat", size: "l", target: "_blank", href: socialUrl, className: b('item', { type: type.toLowerCase() }) }, icon && React.createElement(Icon, { data: icon, size: 24, className: b('icon', { type }) })));
37
29
  }))));
38
30
  };
39
31
  export default Share;
@@ -33,9 +33,6 @@ export declare const SimpleBlock: {
33
33
  resetPaddings: {
34
34
  type: string;
35
35
  };
36
- blockName: {
37
- type: string;
38
- };
39
36
  type: {};
40
37
  when: {};
41
38
  title: {
@@ -211,9 +211,6 @@ export declare const SliderBlock: {
211
211
  resetPaddings: {
212
212
  type: string;
213
213
  };
214
- blockName: {
215
- type: string;
216
- };
217
214
  type: {};
218
215
  when: {};
219
216
  };
@@ -64,9 +64,6 @@ export declare const TableBlock: {
64
64
  resetPaddings: {
65
65
  type: string;
66
66
  };
67
- blockName: {
68
- type: string;
69
- };
70
67
  type: {};
71
68
  when: {};
72
69
  };
@@ -1,4 +1,4 @@
1
1
  import { TabsBlockProps } from '../../models';
2
2
  import './Tabs.css';
3
- export declare const TabsBlock: ({ items, title, description, animated, tabsColSizes, centered, direction, blockName, }: TabsBlockProps) => JSX.Element;
3
+ export declare const TabsBlock: ({ items, title, description, animated, tabsColSizes, centered, direction, }: TabsBlockProps) => JSX.Element;
4
4
  export default TabsBlock;
@@ -1,7 +1,6 @@
1
1
  import React, { Fragment, useContext, useRef, useState } from 'react';
2
2
  import { block, getThemedValue } from '../../utils';
3
3
  import { Row, Col, GridColumnOrderClasses } from '../../grid';
4
- import { BlockType } from '../../models';
5
4
  import AnimateBlock from '../../components/AnimateBlock/AnimateBlock';
6
5
  import BlockHeader from '../../components/BlockHeader/BlockHeader';
7
6
  import FullScreenImage from '../../components/FullscreenImage/FullscreenImage';
@@ -13,7 +12,7 @@ import { Content } from '../../sub-blocks';
13
12
  import { getHeight } from '../../components/VideoBlock/VideoBlock';
14
13
  import './Tabs.css';
15
14
  const b = block('tabs-block');
16
- export const TabsBlock = ({ items, title, description, animated, tabsColSizes, centered, direction = 'media-content', blockName = BlockType.TabsBlock, }) => {
15
+ export const TabsBlock = ({ items, title, description, animated, tabsColSizes, centered, direction = 'media-content', }) => {
17
16
  var _a;
18
17
  const [activeTab, setActiveTab] = useState(items[0].tabName);
19
18
  const [play, setPlay] = useState(false);
@@ -38,12 +37,12 @@ export const TabsBlock = ({ items, title, description, animated, tabsColSizes, c
38
37
  React.createElement(Content, { title: activeTabData.title, text: activeTabData.text, additionalInfo: activeTabData.additionalInfo, size: "s", links: [
39
38
  ...(activeTabData.link ? [activeTabData.link] : []),
40
39
  ...(activeTabData.links || []),
41
- ], buttons: activeTabData.buttons, colSizes: { all: 12 }, blockName: blockName }))));
40
+ ], buttons: activeTabData.buttons, colSizes: { all: 12 } }))));
42
41
  const mediaContent = showMedia && (React.createElement(Col, { sizes: { all: 12, md: 8 }, orders: {
43
42
  all: GridColumnOrderClasses.Last,
44
43
  md: GridColumnOrderClasses.First,
45
44
  }, className: b('col', { centered: centered }) },
46
- React.createElement("div", { ref: ref }, (activeTabData === null || activeTabData === void 0 ? void 0 : activeTabData.media) && (React.createElement(Media, Object.assign({}, getThemedValue(activeTabData.media, theme), { key: activeTab, className: b('media'), playVideo: play, height: mediaHeight, blockName: blockName })))),
45
+ React.createElement("div", { ref: ref }, (activeTabData === null || activeTabData === void 0 ? void 0 : activeTabData.media) && (React.createElement(Media, Object.assign({}, getThemedValue(activeTabData.media, theme), { key: activeTab, className: b('media'), playVideo: play, height: mediaHeight })))),
47
46
  imageProps && (React.createElement(Fragment, null,
48
47
  React.createElement(FullScreenImage, Object.assign({}, imageProps, { imageClassName: b('image') })))),
49
48
  (activeTabData === null || activeTabData === void 0 ? void 0 : activeTabData.caption) && React.createElement("p", { className: b('caption') }, activeTabData.caption)));
@@ -51,7 +50,7 @@ export const TabsBlock = ({ items, title, description, animated, tabsColSizes, c
51
50
  React.createElement(BlockHeader, { title: title, description: description, className: b('block-title', { centered: centered }) }),
52
51
  React.createElement(Row, null,
53
52
  React.createElement(Col, { sizes: tabsColSizes },
54
- React.createElement(ButtonTabs, { items: tabs, onSelectTab: setActiveTab, activeTab: activeTab, className: b('tabs', { centered: centered }), blockName: BlockType.TabsBlock }))),
53
+ React.createElement(ButtonTabs, { items: tabs, onSelectTab: setActiveTab, activeTab: activeTab, className: b('tabs', { centered: centered }) }))),
55
54
  activeTabData && (React.createElement(Row, { className: b('row', { reverse: isReverse }) },
56
55
  mediaContent,
57
56
  textContent))));
@@ -341,9 +341,6 @@ export declare const TabsBlock: {
341
341
  resetPaddings: {
342
342
  type: string;
343
343
  };
344
- blockName: {
345
- type: string;
346
- };
347
344
  type: {};
348
345
  when: {};
349
346
  };
@@ -9,6 +9,5 @@ export interface BackLinkProps {
9
9
  className?: string;
10
10
  shouldHandleBackAction?: boolean;
11
11
  onClick?: () => void;
12
- blockName?: string;
13
12
  }
14
13
  export default function BackLink(props: BackLinkProps): JSX.Element;
@@ -2,19 +2,10 @@ import React, { useCallback, useContext } from 'react';
2
2
  import { Button, Icon } from '@gravity-ui/uikit';
3
3
  import { ArrowSidebar } from '../../icons';
4
4
  import { LocationContext } from '../../context/locationContext';
5
- import { useAnalytics } from '../../hooks';
6
- import { PredefinedEventTypes } from '../../models';
7
- const COMPONENT_NAME = 'backlink';
8
5
  export default function BackLink(props) {
9
6
  const { history } = useContext(LocationContext);
10
- const { url, title, theme = 'default', size = 'l', className, shouldHandleBackAction = false, onClick, blockName = COMPONENT_NAME, } = props;
11
- const handleAnalytics = useAnalytics({
12
- name: 'back-link-click',
13
- type: PredefinedEventTypes.Default,
14
- blockName: blockName,
15
- });
7
+ const { url, title, theme = 'default', size = 'l', className, shouldHandleBackAction = false, onClick, } = props;
16
8
  const backActionHandler = useCallback(async () => {
17
- handleAnalytics === null || handleAnalytics === void 0 ? void 0 : handleAnalytics();
18
9
  if (!history) {
19
10
  return;
20
11
  }
@@ -27,7 +18,7 @@ export default function BackLink(props) {
27
18
  else {
28
19
  history.push({ pathname: url });
29
20
  }
30
- }, [handleAnalytics, history, onClick, url]);
21
+ }, [history, onClick, url]);
31
22
  return (React.createElement(Button, { className: className, view: theme === 'special' ? 'flat-contrast' : 'flat-secondary', size: size, href: shouldHandleBackAction ? undefined : url, onClick: shouldHandleBackAction ? backActionHandler : undefined },
32
23
  React.createElement(Icon, { data: ArrowSidebar, size: 24 }),
33
24
  React.createElement("span", null, title)));
@@ -6,12 +6,11 @@ import AnimateBlock from '../AnimateBlock/AnimateBlock';
6
6
  import { MobileContext } from '../../context/mobileContext';
7
7
  import './BackgroundMedia.css';
8
8
  const b = block('BackgroundMedia');
9
- const COMPONENT_NAME = 'backgound-media-component';
10
9
  const BackgroundMedia = (_a) => {
11
10
  var { className, color, animated, parallax = true, video, mediaClassName } = _a, props = __rest(_a, ["className", "color", "animated", "parallax", "video", "mediaClassName"]);
12
11
  const isMobile = useContext(MobileContext);
13
12
  return (React.createElement(AnimateBlock, { className: b(null, className), style: { backgroundColor: color }, animate: animated },
14
13
  React.createElement(Media, Object.assign({ className: b('media', mediaClassName), imageClassName: b('image'), videoClassName: b('video'), isBackground: true }, Object.assign({ height: 720, color,
15
- parallax, video: isMobile ? undefined : video }, props), { blockName: COMPONENT_NAME }))));
14
+ parallax, video: isMobile ? undefined : video }, props)))));
16
15
  };
17
16
  export default BackgroundMedia;
@@ -4,7 +4,6 @@ export interface ButtonProps extends Omit<ButtonParams, 'url'> {
4
4
  className?: string;
5
5
  url?: string;
6
6
  onClick?: () => void;
7
- blockName?: string;
8
7
  }
9
8
  declare const Button: (props: ButtonProps) => JSX.Element;
10
9
  export default Button;
@@ -2,32 +2,23 @@ import { __rest } from "tslib";
2
2
  import React, { useCallback, useContext } from 'react';
3
3
  import { Platform, Button as CommonButton, Icon, StoreBadge } from '@gravity-ui/uikit';
4
4
  import { block, setUrlTld } from '../../utils';
5
- import { PredefinedEventTypes } from '../../models';
6
5
  import { toCommonSize, toCommonView } from './utils';
7
6
  import { LocaleContext } from '../../context/localeContext/localeContext';
8
7
  import { useMetrika } from '../../hooks/useMetrika';
9
- import { useAnalytics } from '../../hooks';
10
8
  import { Github } from '../../icons';
11
9
  import './Button.css';
12
- const COMPONENT_NAME = 'button';
13
10
  const b = block('button-block');
14
11
  const Button = (props) => {
15
12
  const handleMetrika = useMetrika();
16
13
  const { lang, tld } = useContext(LocaleContext);
17
- const { className, metrikaGoals, pixelEvents, analyticsEvents, size = 'l', theme = 'normal', url, img, onClick: onClickOrigin, text, blockName = COMPONENT_NAME } = props, rest = __rest(props, ["className", "metrikaGoals", "pixelEvents", "analyticsEvents", "size", "theme", "url", "img", "onClick", "text", "blockName"]);
14
+ const { className, metrikaGoals, pixelEvents, size = 'l', theme = 'normal', url, img, onClick: onClickOrigin, text } = props, rest = __rest(props, ["className", "metrikaGoals", "pixelEvents", "size", "theme", "url", "img", "onClick", "text"]);
18
15
  const defaultImgPosition = 'left';
19
- const handleAnalytics = useAnalytics({
20
- name: 'button-click',
21
- type: PredefinedEventTypes.Default,
22
- blockName: blockName,
23
- });
24
16
  const onClick = useCallback(() => {
25
17
  handleMetrika({ metrikaGoals, pixelEvents });
26
- handleAnalytics === null || handleAnalytics === void 0 ? void 0 : handleAnalytics(analyticsEvents);
27
18
  if (onClickOrigin) {
28
19
  onClickOrigin();
29
20
  }
30
- }, [handleMetrika, metrikaGoals, pixelEvents, handleAnalytics, analyticsEvents, onClickOrigin]);
21
+ }, [handleMetrika, metrikaGoals, pixelEvents, onClickOrigin]);
31
22
  const buttonImg = img instanceof Object
32
23
  ? { url: img.url, position: img.position || defaultImgPosition, alt: img.alt }
33
24
  : { url: img, position: defaultImgPosition };
@@ -9,7 +9,6 @@ export interface ButtonTabsProps {
9
9
  items: ButtonTabsItemProps[];
10
10
  activeTab?: string;
11
11
  onSelectTab?: (tabId: string) => void;
12
- blockName?: string;
13
12
  }
14
13
  declare const ButtonTabs: (props: ButtonTabsProps) => JSX.Element;
15
14
  export default ButtonTabs;
@@ -1,18 +1,10 @@
1
1
  import React, { useCallback, useMemo } from 'react';
2
2
  import { block } from '../../utils';
3
- import { PredefinedEventTypes } from '../../models';
4
3
  import { Button } from '../index';
5
- import { useAnalytics } from '../../hooks';
6
4
  import './ButtonTabs.css';
7
5
  const b = block('button-tabs');
8
- const COMPONENT_NAME = 'button-tabs';
9
6
  const ButtonTabs = (props) => {
10
- const { className, items, activeTab, onSelectTab, blockName = COMPONENT_NAME } = props;
11
- const handleAnalytics = useAnalytics({
12
- name: 'button-tabs-click',
13
- type: PredefinedEventTypes.Default,
14
- blockName: blockName,
15
- });
7
+ const { className, items, activeTab, onSelectTab } = props;
16
8
  const activeTabId = useMemo(() => {
17
9
  if (activeTab) {
18
10
  return activeTab;
@@ -20,11 +12,10 @@ const ButtonTabs = (props) => {
20
12
  return items[0].id;
21
13
  }, [activeTab, items]);
22
14
  const handleClick = useCallback((tabId) => {
23
- handleAnalytics === null || handleAnalytics === void 0 ? void 0 : handleAnalytics();
24
15
  if (onSelectTab) {
25
16
  onSelectTab(tabId);
26
17
  }
27
- }, [handleAnalytics, onSelectTab]);
18
+ }, [onSelectTab]);
28
19
  return (React.createElement("div", { className: b(null, className) }, items.map((item) => {
29
20
  const isActive = item.id === activeTabId;
30
21
  return (React.createElement(Button, { text: item.title, className: b('item', { active: isActive }), key: item.title, size: 'l', onClick: () => handleClick(item.id), theme: isActive ? 'monochrome' : 'normal' }));
@@ -1,6 +1,5 @@
1
1
  import React, { ReactElement, HTMLAttributeAnchorTarget } from 'react';
2
2
  import { ButtonPixel, CardBaseProps as CardBaseParams, ImageProps, MetrikaGoal, WithChildren } from '../../models';
3
- import { AnalyticsEvent } from '../../models/common';
4
3
  import './CardBase.css';
5
4
  export interface CardBaseProps extends CardBaseParams {
6
5
  className?: string;
@@ -11,8 +10,6 @@ export interface CardBaseProps extends CardBaseParams {
11
10
  target?: HTMLAttributeAnchorTarget;
12
11
  metrikaGoals?: MetrikaGoal;
13
12
  pixelEvents?: ButtonPixel;
14
- analyticsEvents?: AnalyticsEvent | AnalyticsEvent[];
15
- blockName?: string;
16
13
  }
17
14
  export interface CardHeaderBaseProps {
18
15
  className?: string;