@gravity-ui/page-constructor 1.15.0-alpha.3 → 1.15.0-alpha.4

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 (162) hide show
  1. package/build/cjs/blocks/Banner/Banner.js +3 -2
  2. package/build/cjs/blocks/Banner/schema.d.ts +9 -0
  3. package/build/cjs/blocks/Banner/schema.js +3 -1
  4. package/build/cjs/blocks/CardLayout/schema.d.ts +6 -0
  5. package/build/cjs/blocks/ContentLayout/ContentLayout.js +3 -2
  6. package/build/cjs/blocks/ContentLayout/schema.d.ts +3 -0
  7. package/build/cjs/blocks/ExtendedFeatures/ExtendedFeatures.d.ts +1 -1
  8. package/build/cjs/blocks/ExtendedFeatures/ExtendedFeatures.js +3 -2
  9. package/build/cjs/blocks/ExtendedFeatures/schema.d.ts +3 -0
  10. package/build/cjs/blocks/Header/Header.js +6 -5
  11. package/build/cjs/blocks/Header/schema.d.ts +3 -0
  12. package/build/cjs/blocks/HeaderSlider/schema.d.ts +3 -0
  13. package/build/cjs/blocks/Icons/schema.d.ts +6 -0
  14. package/build/cjs/blocks/Info/Info.js +4 -3
  15. package/build/cjs/blocks/Info/schema.d.ts +3 -0
  16. package/build/cjs/blocks/Info/schema.js +2 -0
  17. package/build/cjs/blocks/LinkTable/schema.d.ts +3 -0
  18. package/build/cjs/blocks/Media/Media.js +3 -2
  19. package/build/cjs/blocks/Media/MediaContent.js +3 -2
  20. package/build/cjs/blocks/Media/schema.d.ts +3 -0
  21. package/build/cjs/blocks/Preview/MediaContent/MediaContent.d.ts +2 -1
  22. package/build/cjs/blocks/Preview/MediaContent/MediaContent.js +3 -2
  23. package/build/cjs/blocks/Preview/MediaContent/PreviewMedia.d.ts +1 -0
  24. package/build/cjs/blocks/Preview/MediaContent/PreviewMedia.js +3 -2
  25. package/build/cjs/blocks/Preview/Preview.js +3 -2
  26. package/build/cjs/blocks/Preview/schema.d.ts +3 -0
  27. package/build/cjs/blocks/Preview/schema.js +3 -1
  28. package/build/cjs/blocks/PromoFeaturesBlock/PromoFeaturesBlock.js +3 -2
  29. package/build/cjs/blocks/PromoFeaturesBlock/schema.d.ts +3 -0
  30. package/build/cjs/blocks/Questions/Questions.js +3 -2
  31. package/build/cjs/blocks/Questions/schema.d.ts +3 -0
  32. package/build/cjs/blocks/Security/Security.js +3 -2
  33. package/build/cjs/blocks/Security/schema.d.ts +3 -0
  34. package/build/cjs/blocks/Security/schema.js +3 -1
  35. package/build/cjs/blocks/Share/Share.d.ts +1 -1
  36. package/build/cjs/blocks/Share/Share.js +10 -2
  37. package/build/cjs/blocks/Simple/schema.d.ts +3 -0
  38. package/build/cjs/blocks/Slider/schema.d.ts +3 -0
  39. package/build/cjs/blocks/Table/schema.d.ts +3 -0
  40. package/build/cjs/blocks/Tabs/Tabs.d.ts +1 -1
  41. package/build/cjs/blocks/Tabs/Tabs.js +5 -4
  42. package/build/cjs/blocks/Tabs/schema.d.ts +3 -0
  43. package/build/cjs/components/BackLink/BackLink.d.ts +1 -0
  44. package/build/cjs/components/BackLink/BackLink.js +10 -2
  45. package/build/cjs/components/BackgroundMedia/BackgroundMedia.js +2 -1
  46. package/build/cjs/components/Button/Button.d.ts +1 -0
  47. package/build/cjs/components/Button/Button.js +12 -3
  48. package/build/cjs/components/ButtonTabs/ButtonTabs.d.ts +1 -0
  49. package/build/cjs/components/ButtonTabs/ButtonTabs.js +5 -2
  50. package/build/cjs/components/CardBase/CardBase.d.ts +1 -0
  51. package/build/cjs/components/CardBase/CardBase.js +3 -2
  52. package/build/cjs/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +7 -2
  53. package/build/cjs/components/Link/Link.js +4 -3
  54. package/build/cjs/components/Media/Media.js +4 -2
  55. package/build/cjs/components/Media/Video/Video.js +4 -2
  56. package/build/cjs/components/ReactPlayer/ReactPlayer.js +14 -7
  57. package/build/cjs/components/YandexForm/YandexForm.d.ts +1 -0
  58. package/build/cjs/components/YandexForm/YandexForm.js +8 -2
  59. package/build/cjs/constructor-items.d.ts +5 -5
  60. package/build/cjs/models/constructor-items/blocks.d.ts +11 -0
  61. package/build/cjs/models/constructor-items/common.d.ts +4 -0
  62. package/build/cjs/models/constructor-items/sub-blocks.d.ts +4 -1
  63. package/build/cjs/navigation/components/NavigationItem/NavigationItem.js +3 -2
  64. package/build/cjs/schema/validators/common.d.ts +3 -0
  65. package/build/cjs/schema/validators/common.js +2 -0
  66. package/build/cjs/sub-blocks/BackgroundCard/BackgroundCard.js +3 -2
  67. package/build/cjs/sub-blocks/BackgroundCard/schema.d.ts +3 -0
  68. package/build/cjs/sub-blocks/BackgroundCard/schema.js +2 -0
  69. package/build/cjs/sub-blocks/BannerCard/BannerCard.js +3 -2
  70. package/build/cjs/sub-blocks/BasicCard/BasicCard.js +3 -2
  71. package/build/cjs/sub-blocks/CardWithImage/CardWithImage.d.ts +1 -1
  72. package/build/cjs/sub-blocks/CardWithImage/CardWithImage.js +3 -2
  73. package/build/cjs/sub-blocks/Content/Content.js +4 -3
  74. package/build/cjs/sub-blocks/HubspotForm/index.js +8 -2
  75. package/build/cjs/sub-blocks/MediaCard/MediaCard.d.ts +1 -1
  76. package/build/cjs/sub-blocks/MediaCard/MediaCard.js +3 -2
  77. package/build/cjs/sub-blocks/Quote/Quote.js +9 -2
  78. package/build/cjs/sub-blocks/Quote/schema.d.ts +3 -0
  79. package/build/cjs/sub-blocks/Quote/schema.js +3 -1
  80. package/build/esm/blocks/Banner/Banner.js +3 -2
  81. package/build/esm/blocks/Banner/schema.d.ts +9 -0
  82. package/build/esm/blocks/Banner/schema.js +3 -1
  83. package/build/esm/blocks/CardLayout/schema.d.ts +6 -0
  84. package/build/esm/blocks/ContentLayout/ContentLayout.js +3 -2
  85. package/build/esm/blocks/ContentLayout/schema.d.ts +3 -0
  86. package/build/esm/blocks/ExtendedFeatures/ExtendedFeatures.d.ts +1 -1
  87. package/build/esm/blocks/ExtendedFeatures/ExtendedFeatures.js +3 -2
  88. package/build/esm/blocks/ExtendedFeatures/schema.d.ts +3 -0
  89. package/build/esm/blocks/Header/Header.js +6 -5
  90. package/build/esm/blocks/Header/schema.d.ts +3 -0
  91. package/build/esm/blocks/HeaderSlider/schema.d.ts +3 -0
  92. package/build/esm/blocks/Icons/schema.d.ts +6 -0
  93. package/build/esm/blocks/Info/Info.js +4 -3
  94. package/build/esm/blocks/Info/schema.d.ts +3 -0
  95. package/build/esm/blocks/Info/schema.js +2 -0
  96. package/build/esm/blocks/LinkTable/schema.d.ts +3 -0
  97. package/build/esm/blocks/Media/Media.js +3 -2
  98. package/build/esm/blocks/Media/MediaContent.js +3 -2
  99. package/build/esm/blocks/Media/schema.d.ts +3 -0
  100. package/build/esm/blocks/Preview/MediaContent/MediaContent.d.ts +2 -1
  101. package/build/esm/blocks/Preview/MediaContent/MediaContent.js +3 -2
  102. package/build/esm/blocks/Preview/MediaContent/PreviewMedia.d.ts +1 -0
  103. package/build/esm/blocks/Preview/MediaContent/PreviewMedia.js +3 -2
  104. package/build/esm/blocks/Preview/Preview.js +3 -2
  105. package/build/esm/blocks/Preview/schema.d.ts +3 -0
  106. package/build/esm/blocks/Preview/schema.js +3 -1
  107. package/build/esm/blocks/PromoFeaturesBlock/PromoFeaturesBlock.js +3 -2
  108. package/build/esm/blocks/PromoFeaturesBlock/schema.d.ts +3 -0
  109. package/build/esm/blocks/Questions/Questions.js +3 -2
  110. package/build/esm/blocks/Questions/schema.d.ts +3 -0
  111. package/build/esm/blocks/Security/Security.js +3 -2
  112. package/build/esm/blocks/Security/schema.d.ts +3 -0
  113. package/build/esm/blocks/Security/schema.js +3 -1
  114. package/build/esm/blocks/Share/Share.d.ts +1 -1
  115. package/build/esm/blocks/Share/Share.js +11 -3
  116. package/build/esm/blocks/Simple/schema.d.ts +3 -0
  117. package/build/esm/blocks/Slider/schema.d.ts +3 -0
  118. package/build/esm/blocks/Table/schema.d.ts +3 -0
  119. package/build/esm/blocks/Tabs/Tabs.d.ts +1 -1
  120. package/build/esm/blocks/Tabs/Tabs.js +5 -4
  121. package/build/esm/blocks/Tabs/schema.d.ts +3 -0
  122. package/build/esm/components/BackLink/BackLink.d.ts +1 -0
  123. package/build/esm/components/BackLink/BackLink.js +10 -2
  124. package/build/esm/components/BackgroundMedia/BackgroundMedia.js +2 -1
  125. package/build/esm/components/Button/Button.d.ts +1 -0
  126. package/build/esm/components/Button/Button.js +12 -3
  127. package/build/esm/components/ButtonTabs/ButtonTabs.d.ts +1 -0
  128. package/build/esm/components/ButtonTabs/ButtonTabs.js +5 -2
  129. package/build/esm/components/CardBase/CardBase.d.ts +1 -0
  130. package/build/esm/components/CardBase/CardBase.js +3 -2
  131. package/build/esm/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +7 -2
  132. package/build/esm/components/Link/Link.js +4 -3
  133. package/build/esm/components/Media/Media.js +4 -2
  134. package/build/esm/components/Media/Video/Video.js +4 -2
  135. package/build/esm/components/ReactPlayer/ReactPlayer.js +14 -7
  136. package/build/esm/components/YandexForm/YandexForm.d.ts +1 -0
  137. package/build/esm/components/YandexForm/YandexForm.js +8 -2
  138. package/build/esm/constructor-items.d.ts +5 -5
  139. package/build/esm/models/constructor-items/blocks.d.ts +11 -0
  140. package/build/esm/models/constructor-items/common.d.ts +4 -0
  141. package/build/esm/models/constructor-items/sub-blocks.d.ts +4 -1
  142. package/build/esm/navigation/components/NavigationItem/NavigationItem.js +3 -2
  143. package/build/esm/schema/validators/common.d.ts +3 -0
  144. package/build/esm/schema/validators/common.js +2 -0
  145. package/build/esm/sub-blocks/BackgroundCard/BackgroundCard.js +3 -2
  146. package/build/esm/sub-blocks/BackgroundCard/schema.d.ts +3 -0
  147. package/build/esm/sub-blocks/BackgroundCard/schema.js +2 -0
  148. package/build/esm/sub-blocks/BannerCard/BannerCard.js +3 -2
  149. package/build/esm/sub-blocks/BasicCard/BasicCard.js +3 -2
  150. package/build/esm/sub-blocks/CardWithImage/CardWithImage.d.ts +1 -1
  151. package/build/esm/sub-blocks/CardWithImage/CardWithImage.js +3 -2
  152. package/build/esm/sub-blocks/Content/Content.js +4 -3
  153. package/build/esm/sub-blocks/HubspotForm/index.js +8 -2
  154. package/build/esm/sub-blocks/MediaCard/MediaCard.d.ts +1 -1
  155. package/build/esm/sub-blocks/MediaCard/MediaCard.js +3 -2
  156. package/build/esm/sub-blocks/Quote/Quote.js +11 -4
  157. package/build/esm/sub-blocks/Quote/schema.d.ts +3 -0
  158. package/build/esm/sub-blocks/Quote/schema.js +3 -1
  159. package/package.json +1 -1
  160. package/server/models/constructor-items/blocks.d.ts +11 -0
  161. package/server/models/constructor-items/common.d.ts +4 -0
  162. package/server/models/constructor-items/sub-blocks.d.ts +4 -1
@@ -1,5 +1,6 @@
1
1
  import React, { useContext } from 'react';
2
2
  import { block, getThemedValue } from '../../utils';
3
+ import { BlockType, } from '../../models';
3
4
  import { Button, Media, RouterLink, HTML } from '../../components';
4
5
  import { Grid, Row, Col } from '../../grid';
5
6
  import { getImageSize, getTitleSizes, titleWithImageSizes } from './utils';
@@ -10,15 +11,15 @@ import { ThemeValueContext } from '../../context/theme/ThemeValueContext';
10
11
  import { getMediaImage } from '../../components/Media/Image/utils';
11
12
  import './Header.css';
12
13
  const b = block('header-block');
13
- const Background = ({ background, isMobile }) => {
14
+ const Background = ({ background, isMobile, blockName }) => {
14
15
  const { url, image, fullWidthMedia, video, color } = background;
15
16
  const imageObject = url ? getMediaImage(url) : image;
16
17
  const renderMedia = !isMobile || (typeof image === 'object' && 'mobile' in image);
17
- return (React.createElement("div", { className: b('background', { media: true, 'full-width-media': fullWidthMedia }), style: { backgroundColor: color } }, renderMedia && (React.createElement(Media, Object.assign({}, background, { className: b('background-media'), imageClassName: b('image'), videoClassName: b('video'), isBackground: true, parallax: false, video: isMobile ? undefined : video, image: imageObject })))));
18
+ return (React.createElement("div", { className: b('background', { media: true, 'full-width-media': fullWidthMedia }), style: { backgroundColor: color } }, renderMedia && (React.createElement(Media, Object.assign({}, background, { className: b('background-media'), imageClassName: b('image'), videoClassName: b('video'), isBackground: true, parallax: false, video: isMobile ? undefined : video, image: imageObject, blockName: blockName })))));
18
19
  };
19
20
  const FullWidthBackground = ({ background }) => (React.createElement("div", { className: b('background', { ['full-width']: true }), style: { backgroundColor: background === null || background === void 0 ? void 0 : background.color } }));
20
21
  export const HeaderBlock = (props) => {
21
- const { title, overtitle, description, buttons, image, video, width = 'm', imageSize, offset = 'default', background, theme: textTheme = 'light', verticalOffset = 'm', className, breadcrumbs, status, children, } = props;
22
+ const { title, overtitle, description, buttons, image, video, width = 'm', imageSize, offset = 'default', background, theme: textTheme = 'light', verticalOffset = 'm', className, breadcrumbs, status, children, blockName = BlockType.HeaderBlock, } = props;
22
23
  const isMobile = useContext(MobileContext);
23
24
  const { themeValue: theme } = useContext(ThemeValueContext);
24
25
  const hasRightSideImage = Boolean(image || video);
@@ -57,8 +58,8 @@ export const HeaderBlock = (props) => {
57
58
  React.createElement(YFMWrapper, { content: description, modifiers: { constructor: true } }))),
58
59
  buttons && (React.createElement("div", { className: b('buttons'), "data-qa": "header-buttons" }, buttons &&
59
60
  buttons.map((button, index) => (React.createElement(RouterLink, { href: button.url, key: index },
60
- React.createElement(Button, Object.assign({ key: index, className: b('button'), size: "xl" }, button))))))),
61
+ React.createElement(Button, Object.assign({ key: index, className: b('button'), size: "xl" }, button, { blockName: BlockType.HeaderBlock }))))))),
61
62
  children))),
62
- hasRightSideImage && (React.createElement(Media, { className: b('media', { [curImageSize]: true }), videoClassName: b('video'), imageClassName: b('image'), video: videoThemed, image: imageThemed })))))));
63
+ hasRightSideImage && (React.createElement(Media, { className: b('media', { [curImageSize]: true }), videoClassName: b('video'), imageClassName: b('image'), video: videoThemed, image: imageThemed, blockName: blockName })))))));
63
64
  };
64
65
  export default HeaderBlock;
@@ -821,6 +821,9 @@ export declare const HeaderBlock: {
821
821
  resetPaddings: {
822
822
  type: string;
823
823
  };
824
+ blockName: {
825
+ type: string;
826
+ };
824
827
  type: {};
825
828
  when: {};
826
829
  };
@@ -433,6 +433,9 @@ export declare const HeaderSliderBlock: {
433
433
  resetPaddings: {
434
434
  type: string;
435
435
  };
436
+ blockName: {
437
+ type: string;
438
+ };
436
439
  type: {};
437
440
  when: {};
438
441
  };
@@ -54,6 +54,9 @@ export declare const IconsProps: {
54
54
  resetPaddings: {
55
55
  type: string;
56
56
  };
57
+ blockName: {
58
+ type: string;
59
+ };
57
60
  type: {};
58
61
  when: {};
59
62
  };
@@ -115,6 +118,9 @@ export declare const IconsBlock: {
115
118
  resetPaddings: {
116
119
  type: string;
117
120
  };
121
+ blockName: {
122
+ type: string;
123
+ };
118
124
  type: {};
119
125
  when: {};
120
126
  };
@@ -1,5 +1,6 @@
1
1
  import React, { useContext } from 'react';
2
2
  import { block, getThemedValue } from '../../utils';
3
+ import { BlockType } from '../../models';
3
4
  import { Grid, Row, Col } from '../../grid';
4
5
  import { ThemeValueContext } from '../../context/theme/ThemeValueContext';
5
6
  import Content from '../../sub-blocks/Content/Content';
@@ -7,7 +8,7 @@ import './Info.css';
7
8
  const b = block('info-block');
8
9
  const sizes = { md: 6, all: 12 };
9
10
  export const InfoBlock = (props) => {
10
- const { backgroundColor, theme: blockTheme = 'dark', buttons = [], title, sectionsTitle, links = [], rightContent = {}, leftContent = {}, } = props;
11
+ const { backgroundColor, theme: blockTheme = 'dark', buttons = [], title, sectionsTitle, links = [], rightContent = {}, leftContent = {}, blockName = BlockType.InfoBlock, } = props;
11
12
  const { themeValue: theme } = useContext(ThemeValueContext);
12
13
  const contentTheme = blockTheme === 'dark' ? 'dark' : 'default';
13
14
  const rightLinks = [
@@ -25,8 +26,8 @@ export const InfoBlock = (props) => {
25
26
  React.createElement(Grid, null,
26
27
  React.createElement(Row, null,
27
28
  React.createElement(Col, { sizes: sizes, className: b('left') },
28
- React.createElement(Content, Object.assign({ title: title || (leftContent === null || leftContent === void 0 ? void 0 : leftContent.title), text: leftContent === null || leftContent === void 0 ? void 0 : leftContent.text, links: leftContent === null || leftContent === void 0 ? void 0 : leftContent.links, buttons: leftButtons, additionalInfo: leftContent === null || leftContent === void 0 ? void 0 : leftContent.additionalInfo }, commonProps))),
29
+ React.createElement(Content, Object.assign({ title: title || (leftContent === null || leftContent === void 0 ? void 0 : leftContent.title), text: leftContent === null || leftContent === void 0 ? void 0 : leftContent.text, links: leftContent === null || leftContent === void 0 ? void 0 : leftContent.links, buttons: leftButtons, additionalInfo: leftContent === null || leftContent === void 0 ? void 0 : leftContent.additionalInfo }, commonProps, { blockName: blockName }))),
29
30
  React.createElement(Col, { sizes: sizes, className: b('right') },
30
- React.createElement(Content, Object.assign({ title: sectionsTitle || (rightContent === null || rightContent === void 0 ? void 0 : rightContent.title), text: rightContent === null || rightContent === void 0 ? void 0 : rightContent.text, links: rightLinks, buttons: rightContent === null || rightContent === void 0 ? void 0 : rightContent.buttons, additionalInfo: rightContent === null || rightContent === void 0 ? void 0 : rightContent.additionalInfo }, commonProps))))))));
31
+ React.createElement(Content, Object.assign({ title: sectionsTitle || (rightContent === null || rightContent === void 0 ? void 0 : rightContent.title), text: rightContent === null || rightContent === void 0 ? void 0 : rightContent.text, links: rightLinks, buttons: rightContent === null || rightContent === void 0 ? void 0 : rightContent.buttons, additionalInfo: rightContent === null || rightContent === void 0 ? void 0 : rightContent.additionalInfo }, commonProps, { blockName: blockName }))))))));
31
32
  };
32
33
  export default InfoBlock;
@@ -21,6 +21,9 @@ export declare const InfoBlock: {
21
21
  type: string;
22
22
  contentType: string;
23
23
  };
24
+ blockName: {
25
+ type: string;
26
+ };
24
27
  buttons: {
25
28
  type: string;
26
29
  items: {
@@ -18,6 +18,8 @@ export const InfoBlock = {
18
18
  }), sectionsTitle: {
19
19
  type: 'string',
20
20
  contentType: 'text',
21
+ }, blockName: {
22
+ type: 'string',
21
23
  }, buttons: filteredArray(ButtonBlock), theme: ThemeProps, links: filteredArray(LinkProps), leftContent: ContentProps, rightContent: ContentProps }),
22
24
  },
23
25
  };
@@ -67,6 +67,9 @@ export declare const LinkTableBlock: {
67
67
  resetPaddings: {
68
68
  type: string;
69
69
  };
70
+ blockName: {
71
+ type: string;
72
+ };
70
73
  type: {};
71
74
  when: {};
72
75
  };
@@ -2,6 +2,7 @@ import { __rest } from "tslib";
2
2
  import React, { useContext, useMemo, useState } from 'react';
3
3
  import { block, getThemedValue } from '../../utils';
4
4
  import { Grid, Row, Col, GridColumnSize } from '../../grid';
5
+ import { BlockType } from '../../models';
5
6
  import Media from '../../components/Media/Media';
6
7
  import AnimateBlock from '../../components/AnimateBlock/AnimateBlock';
7
8
  import BlockHeader from '../../components/BlockHeader/BlockHeader';
@@ -10,7 +11,7 @@ import { ThemeValueContext } from '../../context/theme/ThemeValueContext';
10
11
  import './Media.css';
11
12
  const b = block('media-block');
12
13
  export const MediaBlock = (props) => {
13
- const { media, largeMedia, direction = 'content-media', mobileDirection = 'content-media', animated, mediaOnly, disableShadow = false } = props, mediaContentProps = __rest(props, ["media", "largeMedia", "direction", "mobileDirection", "animated", "mediaOnly", "disableShadow"]);
14
+ const { media, largeMedia, direction = 'content-media', mobileDirection = 'content-media', animated, mediaOnly, disableShadow = false, blockName = BlockType.MediaBlock } = props, mediaContentProps = __rest(props, ["media", "largeMedia", "direction", "mobileDirection", "animated", "mediaOnly", "disableShadow", "blockName"]);
14
15
  const { title, description } = mediaContentProps;
15
16
  const [play, setPlay] = useState(false);
16
17
  const { themeValue: theme } = useContext(ThemeValueContext);
@@ -34,6 +35,6 @@ export const MediaBlock = (props) => {
34
35
  React.createElement(Col, { className: b('content'), sizes: contentSizes }, mediaContent),
35
36
  React.createElement(Col, { sizes: mediaSizes },
36
37
  React.createElement("div", { className: b('card', { shadow: !disableShadow }) },
37
- React.createElement(Media, Object.assign({}, mediaThemed, { playVideo: play }))))))));
38
+ React.createElement(Media, Object.assign({}, mediaThemed, { playVideo: play, blockName: blockName }))))))));
38
39
  };
39
40
  export default MediaBlock;
@@ -1,12 +1,13 @@
1
1
  import React from 'react';
2
2
  import { block } from '../../utils';
3
+ import { BlockType } from '../../models';
3
4
  import { Content } from '../../sub-blocks';
4
5
  import './MediaContent.css';
5
6
  const b = block('media-content');
6
7
  const MediaContent = (props) => {
7
- const { title, description, button, links, buttons = [], additionalInfo, size = 'l' } = props;
8
+ const { title, description, button, links, buttons = [], additionalInfo, size = 'l', blockName = BlockType.MediaBlock, } = props;
8
9
  const allButtons = button ? [Object.assign(Object.assign({}, button), { size: 'xl' }), ...buttons] : buttons;
9
10
  return (React.createElement("div", { className: b() },
10
- React.createElement(Content, { title: title, text: description, links: links, theme: "default", buttons: allButtons, additionalInfo: additionalInfo, size: size, colSizes: { all: 12, md: 12 } })));
11
+ React.createElement(Content, { title: title, text: description, links: links, theme: "default", buttons: allButtons, additionalInfo: additionalInfo, size: size, colSizes: { all: 12, md: 12 }, blockName: blockName })));
11
12
  };
12
13
  export default MediaContent;
@@ -597,6 +597,9 @@ export declare const MediaBlock: {
597
597
  resetPaddings: {
598
598
  type: string;
599
599
  };
600
+ blockName: {
601
+ type: string;
602
+ };
600
603
  type: {};
601
604
  when: {};
602
605
  };
@@ -9,6 +9,7 @@ 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;
12
13
  }
13
- declare const MediaContent: React.ForwardRefExoticComponent<Pick<MediaContentProps, "title" | "items" | "description" | "ratioMediaContent" | "switching" | "isActiveBlock" | "showMediaContent"> & React.RefAttributes<HTMLDivElement>>;
14
+ declare const MediaContent: React.ForwardRefExoticComponent<Pick<MediaContentProps, "title" | "blockName" | "items" | "description" | "ratioMediaContent" | "switching" | "isActiveBlock" | "showMediaContent"> & React.RefAttributes<HTMLDivElement>>;
14
15
  export default MediaContent;
@@ -7,8 +7,9 @@ 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';
10
11
  const MediaContent = forwardRef((props, ref) => {
11
- const { items, title, description = '', switching, ratioMediaContent = '1-1', isActiveBlock, showMediaContent, } = props;
12
+ const { items, title, description = '', switching, ratioMediaContent = '1-1', isActiveBlock, showMediaContent, blockName = COMPONENT_NAME, } = props;
12
13
  const { themeValue: theme } = useContext(ThemeValueContext);
13
14
  const [mediaSizes, setMediaSizes] = useState({ [GridColumnSize.All]: 12 });
14
15
  const [contentSizes, setContentSizes] = useState({ [GridColumnSize.All]: 12 });
@@ -30,7 +31,7 @@ const MediaContent = forwardRef((props, ref) => {
30
31
  const mediaMods = { active: isActiveBlock(id, true) };
31
32
  const onClick = () => showMediaContent(id);
32
33
  contentComponents.push(React.createElement(PreviewContent, Object.assign({ key: id, id: id }, content, { switching: switching, onClick: onClick, mods: contentMods })));
33
- mediaComponents.push(React.createElement(PreviewMedia, { key: id, id: id, media: media && getThemedValue(media, theme), play: isActive, mods: mediaMods }));
34
+ mediaComponents.push(React.createElement(PreviewMedia, { key: id, id: id, media: media && getThemedValue(media, theme), play: isActive, mods: mediaMods, blockName: blockName }));
34
35
  });
35
36
  return (React.createElement(Fragment, null,
36
37
  React.createElement(Col, { sizes: contentSizes, className: b('content') },
@@ -5,6 +5,7 @@ interface PreviewMediaProps {
5
5
  media: MediaProps;
6
6
  play: boolean;
7
7
  mods: Modifiers | null;
8
+ blockName?: string;
8
9
  }
9
10
  declare const PreviewMedia: (props: PreviewMediaProps) => JSX.Element;
10
11
  export default PreviewMedia;
@@ -3,9 +3,10 @@ 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';
6
7
  const PreviewMedia = (props) => {
7
- const { id, media, play, mods } = props;
8
+ const { id, media, play, mods, blockName = COMPONENT_NAME } = props;
8
9
  return (React.createElement("div", { key: id, className: b('media', mods) },
9
- React.createElement(Media, Object.assign({}, media, { playVideo: play }))));
10
+ React.createElement(Media, Object.assign({}, media, { playVideo: play, blockName: blockName }))));
10
11
  };
11
12
  export default PreviewMedia;
@@ -4,6 +4,7 @@ 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';
7
8
  import { BREAKPOINTS } from '../../constants';
8
9
  import { useIntersection } from '../../hooks/useIntersection';
9
10
  import './Preview.css';
@@ -19,7 +20,7 @@ const INDENT_BETWEEN_TITLE_DESCRIPTION = 16;
19
20
  export const PreviewBlock = (props) => {
20
21
  const { direction = 'content-media', animated, items, title, description, ratioMediaContent = '1-1', stopVideo = false,
21
22
  // TODO YDB-server doesn't see previewRef.current and doesn't update the component CLOUDFRONT-9395
22
- showImmediately = false, } = props;
23
+ showImmediately = false, blockName = BlockType.PreviewBlock, } = props;
23
24
  const breakpoint = useContext(BreakpointContext);
24
25
  const isDesktop = breakpoint >= BREAKPOINTS.md;
25
26
  const menuRef = React.useRef(null);
@@ -82,7 +83,7 @@ export const PreviewBlock = (props) => {
82
83
  }, [changeActiveSlide, activeSlide, autoSwitchTimerId]);
83
84
  return (React.createElement(AnimateBlock, { className: b(), animate: animated },
84
85
  React.createElement(Row, { ref: previewRef, className: b('row', { reverse: direction === 'media-content' }) },
85
- React.createElement(MediaContent, { ref: menuRef, items: items, title: title, description: description, ratioMediaContent: ratioMediaContent, switching: !stopSwitching, isActiveBlock: isActiveBlock, showMediaContent: showMediaContent }))));
86
+ React.createElement(MediaContent, { ref: menuRef, items: items, title: title, description: description, ratioMediaContent: ratioMediaContent, switching: !stopSwitching, isActiveBlock: isActiveBlock, showMediaContent: showMediaContent, blockName: blockName }))));
86
87
  };
87
88
  function changeMenuScroll(element, nextSlide, activeSlide) {
88
89
  if (!element) {
@@ -30,6 +30,9 @@ export declare const PreviewBlock: {
30
30
  };
31
31
  };
32
32
  };
33
+ blockName: {
34
+ type: string;
35
+ };
33
36
  animated: {
34
37
  type: string;
35
38
  };
@@ -45,6 +45,8 @@ export const PreviewBlock = {
45
45
  }, ratioMediaContent: {
46
46
  type: 'string',
47
47
  enum: previewRatioMediaContent,
48
- }, items: filteredArray(PreviewItem) }),
48
+ }, items: filteredArray(PreviewItem), blockName: {
49
+ type: 'string',
50
+ } }),
49
51
  },
50
52
  };
@@ -2,6 +2,7 @@ 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';
5
6
  import Media from '../../components/Media/Media';
6
7
  import BlockHeader from '../../components/BlockHeader/BlockHeader';
7
8
  import AnimateBlock from '../../components/AnimateBlock/AnimateBlock';
@@ -15,7 +16,7 @@ const breakpointColumns = {
15
16
  [BREAKPOINTS.sm]: 1,
16
17
  };
17
18
  const PromoFeaturesBlock = (props) => {
18
- const { items, title, description, theme, animated = true } = props;
19
+ const { items, title, description, theme, animated = true, blockName = BlockType.PromoFeaturesBlock, } = props;
19
20
  const backgroundTheme = theme || 'default';
20
21
  return (React.createElement(AnimateBlock, { className: b({ [backgroundTheme]: true }), animate: animated },
21
22
  React.createElement(FullWidthBackground, { className: b('background', { [backgroundTheme]: true }) }),
@@ -31,7 +32,7 @@ const PromoFeaturesBlock = (props) => {
31
32
  React.createElement("h4", { className: b('card-title') }, cardTitle),
32
33
  React.createElement("div", { className: b('card-text') },
33
34
  React.createElement(YFMWrapper, { content: text, modifiers: { constructor: true } }))),
34
- media && React.createElement(Media, Object.assign({ className: b('card-media') }, media))));
35
+ media && (React.createElement(Media, Object.assign({ className: b('card-media'), blockName: blockName }, media)))));
35
36
  }))));
36
37
  };
37
38
  export default PromoFeaturesBlock;
@@ -222,6 +222,9 @@ export declare const PromoFeaturesBlock: {
222
222
  resetPaddings: {
223
223
  type: string;
224
224
  };
225
+ blockName: {
226
+ type: string;
227
+ };
225
228
  type: {};
226
229
  when: {};
227
230
  };
@@ -1,5 +1,6 @@
1
1
  import React, { useState } from 'react';
2
2
  import { block } from '../../utils';
3
+ import { BlockType } from '../../models';
3
4
  import Link from '../../components/Link/Link';
4
5
  import { YFMWrapper, ToggleArrow, Foldable, HTML } from '../../components';
5
6
  import { Row, Col } from '../../grid';
@@ -7,7 +8,7 @@ import { Content } from '../../sub-blocks';
7
8
  import './Questions.css';
8
9
  const b = block('QuestionsBlock');
9
10
  const QuestionsBlock = (props) => {
10
- const { title, text, additionalInfo, links, buttons, items } = props;
11
+ const { title, text, additionalInfo, links, buttons, items, blockName = BlockType.QuestionsBlock, } = props;
11
12
  const [opened, setOpened] = useState([0]);
12
13
  const toggleItem = (index) => {
13
14
  let newState;
@@ -23,7 +24,7 @@ const QuestionsBlock = (props) => {
23
24
  React.createElement(Row, null,
24
25
  React.createElement(Col, { sizes: { all: 12, md: 4 } },
25
26
  React.createElement("div", { className: b('title') },
26
- React.createElement(Content, { title: title, text: text, additionalInfo: additionalInfo, links: links, buttons: buttons, colSizes: { all: 12, md: 12 } }))),
27
+ React.createElement(Content, { title: title, text: text, additionalInfo: additionalInfo, links: links, buttons: buttons, colSizes: { all: 12, md: 12 }, blockName: blockName }))),
27
28
  React.createElement(Col, { sizes: { all: 12, md: 8 } }, items.map(({ title: itemTitle, text: itemText, link, listStyle = 'dash' }, index) => {
28
29
  const isOpened = opened.includes(index);
29
30
  return (React.createElement("div", { key: itemTitle, className: b('item') },
@@ -91,6 +91,9 @@ export declare const QuestionsBlock: {
91
91
  resetPaddings: {
92
92
  type: string;
93
93
  };
94
+ blockName: {
95
+ type: string;
96
+ };
94
97
  type: {};
95
98
  when: {};
96
99
  };
@@ -1,11 +1,12 @@
1
1
  import React from 'react';
2
2
  import { block } from '../../utils';
3
+ import { BlockType } from '../../models';
3
4
  import { FullWidthBackground, HTML, Media, Link, AnimateBlock } from '../../components';
4
5
  import { Grid, Row, Col } from '../../grid';
5
6
  import './Security.css';
6
7
  const b = block('SecurityBlock');
7
8
  export const SecurityBlock = (props) => {
8
- const { backgroundColor, theme = 'dark', title, points, media, animated } = props;
9
+ const { backgroundColor, theme = 'dark', title, points, media, animated, blockName = BlockType.SecurityBlock, } = props;
9
10
  return (React.createElement(AnimateBlock, { className: b({ theme }), offset: 200, animate: animated },
10
11
  React.createElement("div", { className: b('content') },
11
12
  React.createElement(FullWidthBackground, { className: b('background'), style: { backgroundColor } }),
@@ -19,6 +20,6 @@ export const SecurityBlock = (props) => {
19
20
  link && (React.createElement(Link, { className: b('point-link'), text: link.text, url: link.url, theme: 'normal', arrow: true }))))))),
20
21
  media && (React.createElement(Row, { className: b('media') },
21
22
  React.createElement(Col, null,
22
- React.createElement(Media, Object.assign({ className: b('media') }, media)))))))));
23
+ React.createElement(Media, Object.assign({ className: b('media') }, media, { blockName: blockName })))))))));
23
24
  };
24
25
  export default SecurityBlock;
@@ -160,6 +160,9 @@ export declare const SecurityBlock: {
160
160
  };
161
161
  };
162
162
  };
163
+ blockName: {
164
+ type: string;
165
+ };
163
166
  animated: {
164
167
  type: string;
165
168
  };
@@ -23,6 +23,8 @@ export const SecurityBlock = {
23
23
  },
24
24
  link: _.pick(LinkProps, ['text', 'url']),
25
25
  },
26
- }) }),
26
+ }), blockName: {
27
+ type: 'string',
28
+ } }),
27
29
  },
28
30
  };
@@ -1,4 +1,4 @@
1
1
  import { ShareBlockProps } from '../../models';
2
2
  import './Share.css';
3
- declare const Share: ({ items, title }: ShareBlockProps) => JSX.Element;
3
+ declare const Share: ({ items, title, blockName }: ShareBlockProps) => JSX.Element;
4
4
  export default Share;
@@ -1,8 +1,10 @@
1
- import React, { useContext } from 'react';
1
+ import React, { useContext, useCallback } from 'react';
2
2
  import { Icon, Button } from '@gravity-ui/uikit';
3
3
  import { block, getAbsolutePath, getShareLink } from '../../utils';
4
+ import { BlockType } from '../../models';
4
5
  import { LocationContext } from '../../context/locationContext';
5
6
  import i18n from './i18n';
7
+ import { useAnalytics } from 'src/hooks';
6
8
  import { Facebook } from '../../icons/Facebook';
7
9
  import { Twitter } from '../../icons/Twitter';
8
10
  import { Linkedin } from '../../icons/Linkedin';
@@ -17,15 +19,21 @@ const icons = {
17
19
  telegram: Telegram,
18
20
  };
19
21
  const b = block('share-block');
20
- const Share = ({ items, title }) => {
22
+ const Share = ({ items, title, blockName = BlockType.ShareBlock }) => {
21
23
  const { pathname, hostname } = useContext(LocationContext);
24
+ const handleAnalytics = useAnalytics();
25
+ const handleButtonClick = useCallback(() => handleAnalytics === null || handleAnalytics === void 0 ? void 0 : handleAnalytics([], {
26
+ name: 'default',
27
+ type: 'button',
28
+ block: blockName,
29
+ }), [handleAnalytics, blockName]);
22
30
  return (React.createElement("div", { className: b() },
23
31
  React.createElement("h5", { className: b('title') }, title || i18n('constructor-share')),
24
32
  React.createElement("div", { className: b('items') }, items.map((type) => {
25
33
  const url = getAbsolutePath(hostname, pathname);
26
34
  const socialUrl = getShareLink(url, type);
27
35
  const icon = icons[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 }) })));
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 }) })));
29
37
  }))));
30
38
  };
31
39
  export default Share;
@@ -33,6 +33,9 @@ export declare const SimpleBlock: {
33
33
  resetPaddings: {
34
34
  type: string;
35
35
  };
36
+ blockName: {
37
+ type: string;
38
+ };
36
39
  type: {};
37
40
  when: {};
38
41
  title: {
@@ -211,6 +211,9 @@ export declare const SliderBlock: {
211
211
  resetPaddings: {
212
212
  type: string;
213
213
  };
214
+ blockName: {
215
+ type: string;
216
+ };
214
217
  type: {};
215
218
  when: {};
216
219
  };
@@ -64,6 +64,9 @@ export declare const TableBlock: {
64
64
  resetPaddings: {
65
65
  type: string;
66
66
  };
67
+ blockName: {
68
+ type: string;
69
+ };
67
70
  type: {};
68
71
  when: {};
69
72
  };
@@ -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, }: TabsBlockProps) => JSX.Element;
3
+ export declare const TabsBlock: ({ items, title, description, animated, tabsColSizes, centered, direction, blockName, }: TabsBlockProps) => JSX.Element;
4
4
  export default TabsBlock;
@@ -1,6 +1,7 @@
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';
4
5
  import AnimateBlock from '../../components/AnimateBlock/AnimateBlock';
5
6
  import BlockHeader from '../../components/BlockHeader/BlockHeader';
6
7
  import FullScreenImage from '../../components/FullscreenImage/FullscreenImage';
@@ -12,7 +13,7 @@ import { Content } from '../../sub-blocks';
12
13
  import { getHeight } from '../../components/VideoBlock/VideoBlock';
13
14
  import './Tabs.css';
14
15
  const b = block('tabs-block');
15
- export const TabsBlock = ({ items, title, description, animated, tabsColSizes, centered, direction = 'media-content', }) => {
16
+ export const TabsBlock = ({ items, title, description, animated, tabsColSizes, centered, direction = 'media-content', blockName = BlockType.TabsBlock, }) => {
16
17
  var _a;
17
18
  const [activeTab, setActiveTab] = useState(items[0].tabName);
18
19
  const [play, setPlay] = useState(false);
@@ -37,12 +38,12 @@ export const TabsBlock = ({ items, title, description, animated, tabsColSizes, c
37
38
  React.createElement(Content, { title: activeTabData.title, text: activeTabData.text, additionalInfo: activeTabData.additionalInfo, size: "s", links: [
38
39
  ...(activeTabData.link ? [activeTabData.link] : []),
39
40
  ...(activeTabData.links || []),
40
- ], buttons: activeTabData.buttons, colSizes: { all: 12 } }))));
41
+ ], buttons: activeTabData.buttons, colSizes: { all: 12 }, blockName: blockName }))));
41
42
  const mediaContent = showMedia && (React.createElement(Col, { sizes: { all: 12, md: 8 }, orders: {
42
43
  all: GridColumnOrderClasses.Last,
43
44
  md: GridColumnOrderClasses.First,
44
45
  }, className: b('col', { centered: centered }) },
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 })))),
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 })))),
46
47
  imageProps && (React.createElement(Fragment, null,
47
48
  React.createElement(FullScreenImage, Object.assign({}, imageProps, { imageClassName: b('image') })))),
48
49
  (activeTabData === null || activeTabData === void 0 ? void 0 : activeTabData.caption) && React.createElement("p", { className: b('caption') }, activeTabData.caption)));
@@ -50,7 +51,7 @@ export const TabsBlock = ({ items, title, description, animated, tabsColSizes, c
50
51
  React.createElement(BlockHeader, { title: title, description: description, className: b('block-title', { centered: centered }) }),
51
52
  React.createElement(Row, null,
52
53
  React.createElement(Col, { sizes: tabsColSizes },
53
- React.createElement(ButtonTabs, { items: tabs, onSelectTab: setActiveTab, activeTab: activeTab, className: b('tabs', { centered: centered }) }))),
54
+ React.createElement(ButtonTabs, { items: tabs, onSelectTab: setActiveTab, activeTab: activeTab, className: b('tabs', { centered: centered }), blockName: BlockType.TabsBlock }))),
54
55
  activeTabData && (React.createElement(Row, { className: b('row', { reverse: isReverse }) },
55
56
  mediaContent,
56
57
  textContent))));
@@ -341,6 +341,9 @@ export declare const TabsBlock: {
341
341
  resetPaddings: {
342
342
  type: string;
343
343
  };
344
+ blockName: {
345
+ type: string;
346
+ };
344
347
  type: {};
345
348
  when: {};
346
349
  };
@@ -9,5 +9,6 @@ export interface BackLinkProps {
9
9
  className?: string;
10
10
  shouldHandleBackAction?: boolean;
11
11
  onClick?: () => void;
12
+ blockName?: string;
12
13
  }
13
14
  export default function BackLink(props: BackLinkProps): JSX.Element;
@@ -2,10 +2,18 @@ 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 'src/hooks';
6
+ const COMPONENT_NAME = 'backlink';
5
7
  export default function BackLink(props) {
6
8
  const { history } = useContext(LocationContext);
7
- const { url, title, theme = 'default', size = 'l', className, shouldHandleBackAction = false, onClick, } = props;
9
+ const handleAnalytics = useAnalytics();
10
+ const { url, title, theme = 'default', size = 'l', className, shouldHandleBackAction = false, onClick, blockName = COMPONENT_NAME, } = props;
8
11
  const backActionHandler = useCallback(async () => {
12
+ handleAnalytics === null || handleAnalytics === void 0 ? void 0 : handleAnalytics([], {
13
+ name: 'default',
14
+ type: 'button',
15
+ block: blockName,
16
+ });
9
17
  if (!history) {
10
18
  return;
11
19
  }
@@ -18,7 +26,7 @@ export default function BackLink(props) {
18
26
  else {
19
27
  history.push({ pathname: url });
20
28
  }
21
- }, [history, onClick, url]);
29
+ }, [blockName, handleAnalytics, history, onClick, url]);
22
30
  return (React.createElement(Button, { className: className, view: theme === 'special' ? 'flat-contrast' : 'flat-secondary', size: size, href: shouldHandleBackAction ? undefined : url, onClick: shouldHandleBackAction ? backActionHandler : undefined },
23
31
  React.createElement(Icon, { data: ArrowSidebar, size: 24 }),
24
32
  React.createElement("span", null, title)));
@@ -6,11 +6,12 @@ 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';
9
10
  const BackgroundMedia = (_a) => {
10
11
  var { className, color, animated, parallax = true, video, mediaClassName } = _a, props = __rest(_a, ["className", "color", "animated", "parallax", "video", "mediaClassName"]);
11
12
  const isMobile = useContext(MobileContext);
12
13
  return (React.createElement(AnimateBlock, { className: b(null, className), style: { backgroundColor: color }, animate: animated },
13
14
  React.createElement(Media, Object.assign({ className: b('media', mediaClassName), imageClassName: b('image'), videoClassName: b('video'), isBackground: true }, Object.assign({ height: 720, color,
14
- parallax, video: isMobile ? undefined : video }, props)))));
15
+ parallax, video: isMobile ? undefined : video }, props), { blockName: COMPONENT_NAME }))));
15
16
  };
16
17
  export default BackgroundMedia;
@@ -4,6 +4,7 @@ export interface ButtonProps extends Omit<ButtonParams, 'url'> {
4
4
  className?: string;
5
5
  url?: string;
6
6
  onClick?: () => void;
7
+ blockName?: string;
7
8
  }
8
9
  declare const Button: (props: ButtonProps) => JSX.Element;
9
10
  export default Button;