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

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,17 +1,18 @@
1
1
  import React from 'react';
2
2
  import { block } from '../../utils';
3
3
  import CardBase from '../../components/CardBase/CardBase';
4
+ import { SubBlockType } from '../../models';
4
5
  import Image from '../../components/Image/Image';
5
6
  import { Content } from '../';
6
7
  import { getMediaImage } from '../../components/Media/Image/utils';
7
8
  import './BasicCard.css';
8
9
  const b = block('basic-card');
9
10
  const BasicCard = (props) => {
10
- const { url, title, text, border, icon, additionalInfo, links, buttons } = props;
11
+ const { url, title, text, border, icon, additionalInfo, links, buttons, blockName = SubBlockType.BasicCard, } = props;
11
12
  const iconProps = icon && getMediaImage(icon);
12
13
  return (React.createElement(CardBase, { className: b(), url: url, border: border },
13
14
  React.createElement(CardBase.Content, null,
14
15
  iconProps && React.createElement(Image, Object.assign({}, iconProps, { className: b('icon') })),
15
- React.createElement(Content, { title: title, text: text, additionalInfo: additionalInfo, links: links, buttons: buttons, colSizes: { all: 12, md: 12 }, size: "s" }))));
16
+ React.createElement(Content, { title: title, text: text, additionalInfo: additionalInfo, links: links, buttons: buttons, colSizes: { all: 12, md: 12 }, size: "s", blockName: blockName }))));
16
17
  };
17
18
  export default BasicCard;
@@ -1,4 +1,4 @@
1
1
  import { CardWithImageProps } from '../../models';
2
2
  import './CardWithImage.css';
3
- declare const CardWithImage: ({ title, description, image, disableCompress, links, border, fullScreen, className, additionalInfo, buttons, }: CardWithImageProps) => JSX.Element;
3
+ declare const CardWithImage: ({ title, description, image, disableCompress, links, border, fullScreen, className, additionalInfo, buttons, blockName, }: CardWithImageProps) => JSX.Element;
4
4
  export default CardWithImage;
@@ -1,14 +1,15 @@
1
1
  import React from 'react';
2
2
  import { block } from '../../utils';
3
+ import { SubBlockType } from '../../models';
3
4
  import { Image, FullscreenImage } from '../../components';
4
5
  import { Content } from '../';
5
6
  import './CardWithImage.css';
6
7
  const b = block('card-with-image');
7
- const CardWithImage = ({ title, description, image, disableCompress, links, border, fullScreen, className, additionalInfo, buttons, }) => {
8
+ const CardWithImage = ({ title, description, image, disableCompress, links, border, fullScreen, className, additionalInfo, buttons, blockName = SubBlockType.CardWithImage, }) => {
8
9
  const unifiedLinks = links === null || links === void 0 ? void 0 : links.map((link) => (Object.assign(Object.assign({ theme: 'normal' }, link), { text: link.title, url: link.link })));
9
10
  return (React.createElement("div", { className: b(null, className) },
10
11
  React.createElement("div", { className: b('image', { border }) }, fullScreen ? (React.createElement(FullscreenImage, { src: image, imageClassName: b('image-item'), disableCompress: disableCompress })) : (React.createElement(Image, { className: b('image-item'), src: image, alt: 'card-image', disableCompress: disableCompress }))),
11
12
  React.createElement("div", { className: b('content') },
12
- React.createElement(Content, { title: title, text: description, links: unifiedLinks, additionalInfo: additionalInfo, buttons: buttons, size: "s", colSizes: { all: 12, md: 12 } }))));
13
+ React.createElement(Content, { title: title, text: description, links: unifiedLinks, additionalInfo: additionalInfo, buttons: buttons, size: "s", colSizes: { all: 12, md: 12 }, blockName: blockName }))));
13
14
  };
14
15
  export default CardWithImage;
@@ -1,6 +1,7 @@
1
1
  import { __rest } from "tslib";
2
2
  import React from 'react';
3
3
  import { block } from '../../utils';
4
+ import { SubBlockType, } from '../../models';
4
5
  import { Title, YFMWrapper, Button } from '../../components';
5
6
  import LinkBlock from '../../components/Link/Link';
6
7
  import { Col } from '../../grid';
@@ -34,7 +35,7 @@ function getButtonSize(size) {
34
35
  }
35
36
  }
36
37
  const Content = (props) => {
37
- const { title, text, additionalInfo, size = 'l', links, buttons, colSizes = { all: 12, sm: 8 }, centered, theme, className, } = props;
38
+ const { title, text, additionalInfo, size = 'l', links, buttons, colSizes = { all: 12, sm: 8 }, centered, theme, className, blockName = SubBlockType.Content, } = props;
38
39
  const titleProps = __rest(!title || typeof title === 'string'
39
40
  ? { text: title, textSize: getTextSize(size) }
40
41
  : title, []);
@@ -49,7 +50,7 @@ const Content = (props) => {
49
50
  'constructor-notice': true,
50
51
  [`constructor-size-${size}`]: true,
51
52
  } }))),
52
- links && (React.createElement("div", { className: b('links') }, links.map((link) => (React.createElement(LinkBlock, Object.assign({ className: b('link') }, link, { textSize: getLinkSize(size), key: link.url })))))),
53
- buttons && (React.createElement("div", { className: b('buttons') }, buttons.map((item) => (React.createElement(Button, Object.assign({ className: b('button') }, item, { key: item.url, size: getButtonSize(size) }))))))));
53
+ links && (React.createElement("div", { className: b('links') }, links.map((link) => (React.createElement(LinkBlock, Object.assign({ className: b('link') }, link, { textSize: getLinkSize(size), key: link.url, blockName: blockName })))))),
54
+ buttons && (React.createElement("div", { className: b('buttons') }, buttons.map((item) => (React.createElement(Button, Object.assign({ className: b('button') }, item, { key: item.url, size: getButtonSize(size), blockName: blockName }))))))));
54
55
  };
55
56
  export default Content;
@@ -3,6 +3,7 @@ import { block } from '../../utils';
3
3
  import { ThemeValueContext } from '../../context/theme/ThemeValueContext';
4
4
  import { MobileContext } from '../../context/mobileContext';
5
5
  import { useMetrika } from '../../hooks/useMetrika';
6
+ import { SubBlockType } from '../../models';
6
7
  import { useHandleHubspotEvents, useAnalytics } from '../../hooks';
7
8
  import HubspotFormContainer from './HubspotFormContainer';
8
9
  import './HubspotForm.css';
@@ -10,7 +11,7 @@ const b = block('hubspot-form');
10
11
  const HubspotForm = (props) => {
11
12
  const { className, theme: themeProp, isMobile: isMobileProp, formId, formInstanceId, portalId, region, formClassName, pixelEvents,
12
13
  // hubspotEvents, // TODO: decide how to handle them
13
- analyticsEvents, onBeforeSubmit, onSubmit, onBeforeLoad, onLoad, } = props;
14
+ analyticsEvents, onBeforeSubmit, onSubmit, onBeforeLoad, onLoad, blockName = SubBlockType.HubspotForm, } = props;
14
15
  const handleMetrika = useMetrika();
15
16
  const handleAnalytics = useAnalytics();
16
17
  const { themeValue } = useContext(ThemeValueContext);
@@ -23,7 +24,11 @@ const HubspotForm = (props) => {
23
24
  onLoad,
24
25
  onSubmit: (e) => {
25
26
  handleMetrika === null || handleMetrika === void 0 ? void 0 : handleMetrika({ pixelEvents });
26
- handleAnalytics === null || handleAnalytics === void 0 ? void 0 : handleAnalytics(analyticsEvents);
27
+ handleAnalytics === null || handleAnalytics === void 0 ? void 0 : handleAnalytics(analyticsEvents, {
28
+ name: 'default',
29
+ type: 'hubspot-form',
30
+ block: blockName,
31
+ });
27
32
  onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit(e);
28
33
  },
29
34
  }), [
@@ -34,6 +39,7 @@ const HubspotForm = (props) => {
34
39
  pixelEvents,
35
40
  handleAnalytics,
36
41
  analyticsEvents,
42
+ blockName,
37
43
  onSubmit,
38
44
  ]);
39
45
  useHandleHubspotEvents(handlers, formId);
@@ -1,4 +1,4 @@
1
1
  import { MediaCardProps } from '../../models';
2
2
  import './MediaCard.css';
3
- declare const MediaCard: ({ border, ...mediaProps }: MediaCardProps) => JSX.Element;
3
+ declare const MediaCard: ({ border, blockName, ...mediaProps }: MediaCardProps) => JSX.Element;
4
4
  export default MediaCard;
@@ -1,13 +1,14 @@
1
1
  import { __rest } from "tslib";
2
2
  import React from 'react';
3
+ import { SubBlockType } from '../../models';
3
4
  import { block } from '../../utils';
4
5
  import { Media, CardBase } from '../../components';
5
6
  import './MediaCard.css';
6
7
  const b = block('MediaCard');
7
8
  const MediaCard = (_a) => {
8
- var { border } = _a, mediaProps = __rest(_a, ["border"]);
9
+ var { border, blockName = SubBlockType.MediaCard } = _a, mediaProps = __rest(_a, ["border", "blockName"]);
9
10
  return (React.createElement(CardBase, { className: b(), bodyClassName: b('body'), border: border },
10
11
  React.createElement(CardBase.Content, null,
11
- React.createElement(Media, Object.assign({}, mediaProps)))));
12
+ React.createElement(Media, Object.assign({}, mediaProps, { blockName: blockName })))));
12
13
  };
13
14
  export default MediaCard;
@@ -1,20 +1,27 @@
1
- import React, { useContext } from 'react';
1
+ import React, { useCallback, useContext } from 'react';
2
2
  import { Button } from '@gravity-ui/uikit';
3
3
  import { block, getThemedValue } from '../../utils';
4
- import { AuthorType } from '../../models';
4
+ import { AuthorType, SubBlockType } from '../../models';
5
5
  import { Author, Image, HTML } from '../../components';
6
6
  import { ThemeValueContext } from '../../context/theme/ThemeValueContext';
7
7
  import { getMediaImage } from '../../components/Media/Image/utils';
8
+ import { useAnalytics } from '../../hooks';
8
9
  import './Quote.css';
9
10
  const b = block('quote');
10
11
  const Quote = (props) => {
11
- const { theme: textTheme = 'light', color, image, border = 'shadow', text, logo, author, url, buttonText, } = props;
12
+ const { theme: textTheme = 'light', color, image, border = 'shadow', text, logo, author, url, buttonText, blockName = SubBlockType.Quote, } = props;
12
13
  const { themeValue: theme } = useContext(ThemeValueContext);
13
14
  const imageThemed = getThemedValue(image, theme);
14
15
  const imageData = getMediaImage(imageThemed);
16
+ const handleAnalytics = useAnalytics();
17
+ const handleButtonClick = useCallback(() => handleAnalytics === null || handleAnalytics === void 0 ? void 0 : handleAnalytics([], {
18
+ name: 'default',
19
+ type: 'button',
20
+ block: blockName,
21
+ }), [blockName, handleAnalytics]);
15
22
  const renderFooter = Boolean(author || url) && (React.createElement("div", { className: b('author-wrapper') },
16
23
  author && (React.createElement(Author, { className: b('author', { theme: textTheme }), author: author, type: AuthorType.Line })),
17
- url && buttonText && (React.createElement(Button, { view: "outlined", size: "xl", href: url, className: b('link-button', { theme: textTheme }) }, buttonText))));
24
+ url && buttonText && (React.createElement(Button, { view: "outlined", size: "xl", href: url, className: b('link-button', { theme: textTheme }), onClick: handleButtonClick }, buttonText))));
18
25
  return (React.createElement("div", { className: b({ theme: textTheme, border }), style: color ? { backgroundColor: color } : {} },
19
26
  React.createElement("div", { key: text, className: b('content-wrapper') },
20
27
  React.createElement("div", null,
@@ -64,6 +64,9 @@ export declare const Quote: {
64
64
  };
65
65
  };
66
66
  };
67
+ blockName: {
68
+ type: string;
69
+ };
67
70
  type: {};
68
71
  when: {};
69
72
  };
@@ -15,6 +15,8 @@ export const Quote = {
15
15
  }, url: {
16
16
  type: 'string',
17
17
  pattern: urlPattern,
18
- }, theme: ThemeProps, author: authorItem }),
18
+ }, theme: ThemeProps, author: authorItem, blockName: {
19
+ type: 'string',
20
+ } }),
19
21
  },
20
22
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/page-constructor",
3
- "version": "1.15.0-alpha.3",
3
+ "version": "1.15.0-alpha.5",
4
4
  "description": "Gravity UI Page Constructor",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -109,6 +109,7 @@ export interface HeaderBlockProps {
109
109
  verticalOffset?: 's' | 'm' | 'l' | 'xl';
110
110
  breadcrumbs?: HeaderBreadCrumbsProps;
111
111
  status?: JSX.Element;
112
+ blockName?: string;
112
113
  }
113
114
  export type CalculatorProps = Animatable;
114
115
  export interface SimpleBlockProps extends Animatable, Childable {
@@ -127,6 +128,7 @@ export interface ExtendedFeaturesProps extends Animatable {
127
128
  title?: TitleProps | string;
128
129
  description?: string;
129
130
  colSizes?: GridColumnSizesType;
131
+ blockName?: string;
130
132
  }
131
133
  export interface PromoFeaturesItem {
132
134
  title: string;
@@ -139,6 +141,7 @@ export interface PromoFeaturesProps extends Animatable {
139
141
  title?: TitleProps | string;
140
142
  description?: string;
141
143
  theme?: 'grey' | 'default';
144
+ blockName?: string;
142
145
  }
143
146
  export interface QuestionItem {
144
147
  title: string;
@@ -163,6 +166,7 @@ export interface MediaContentProps {
163
166
  links?: LinkProps[];
164
167
  buttons?: ButtonProps[];
165
168
  size?: ContentSize;
169
+ blockName?: string;
166
170
  }
167
171
  export interface MediaBlockProps extends Animatable, MediaContentProps {
168
172
  media: ThemeSupporting<MediaProps>;
@@ -180,6 +184,7 @@ export interface PreviewBlockProps extends Animatable {
180
184
  ratioMediaContent?: PreviewRatioMediaContent;
181
185
  stopVideo?: boolean;
182
186
  showImmediately?: boolean;
187
+ blockName?: string;
183
188
  }
184
189
  export interface InfoBlockProps {
185
190
  theme?: TextTheme;
@@ -194,6 +199,7 @@ export interface InfoBlockProps {
194
199
  links?: Pick<LinkProps, 'text' | 'url'>[];
195
200
  leftContent?: Omit<ContentBlockProps, 'colSizes' | 'theme' | 'size'>;
196
201
  rightContent?: Omit<ContentBlockProps, 'colSizes' | 'theme' | 'size'>;
202
+ blockName?: string;
197
203
  }
198
204
  export interface SecurityBlockPoint {
199
205
  img: string;
@@ -209,6 +215,7 @@ export interface SecurityBlockProps extends Animatable {
209
215
  title: string;
210
216
  points?: SecurityBlockPoint[];
211
217
  media: MediaProps;
218
+ blockName?: string;
212
219
  }
213
220
  export interface TableProps {
214
221
  content: string[][];
@@ -235,6 +242,7 @@ export interface TabsBlockProps extends BlockHeaderProps, Animatable {
235
242
  centered?: boolean;
236
243
  direction?: MediaDirection;
237
244
  items: TabsBlockItem[];
245
+ blockName?: string;
238
246
  }
239
247
  export interface LinkTableBlockProps extends BlockHeaderProps {
240
248
  items: LinkProps[][];
@@ -264,6 +272,7 @@ export interface ContentLayoutBlockProps {
264
272
  };
265
273
  textContent: ContentBlockProps;
266
274
  fileContent?: FileLinkProps[];
275
+ blockName?: string;
267
276
  }
268
277
  export interface ContentBlockProps {
269
278
  title?: TitleBaseProps | string;
@@ -275,6 +284,7 @@ export interface ContentBlockProps {
275
284
  colSizes?: GridColumnSizesType;
276
285
  centered?: boolean;
277
286
  theme?: ContentTheme;
287
+ blockName?: string;
278
288
  }
279
289
  export declare enum PCShareSocialNetwork {
280
290
  Vk = "vk",
@@ -286,6 +296,7 @@ export declare enum PCShareSocialNetwork {
286
296
  export interface ShareBlockProps {
287
297
  items: PCShareSocialNetwork[];
288
298
  title?: string;
299
+ blockName?: string;
289
300
  }
290
301
  export type HeaderBlockModel = {
291
302
  type: BlockType.HeaderBlock;
@@ -111,6 +111,7 @@ export interface MediaVideoProps {
111
111
  controls?: MediaVideoControlsType;
112
112
  metrika?: MetrikaVideo;
113
113
  analyticsEvents?: AnalyticsEvent[];
114
+ blockName?: string;
114
115
  }
115
116
  export interface LinkProps extends Stylable {
116
117
  url: string;
@@ -123,6 +124,7 @@ export interface LinkProps extends Stylable {
123
124
  metrikaGoals?: MetrikaGoal;
124
125
  pixelEvents?: ButtonPixel;
125
126
  analyticsEvents?: AnalyticsEvent | AnalyticsEvent[];
127
+ blockName?: string;
126
128
  }
127
129
  export interface FileLinkProps extends ClassNameProps {
128
130
  href: string;
@@ -171,6 +173,7 @@ export interface MediaComponentVideoProps {
171
173
  height?: number;
172
174
  metrika?: MetrikaVideo;
173
175
  analyticsEvents?: AnalyticsEvent[];
176
+ blockName?: string;
174
177
  previewImg?: string;
175
178
  }
176
179
  export interface MediaComponentYoutubeProps {
@@ -227,6 +230,7 @@ export interface HeaderBreadCrumbsProps extends ClassNameProps {
227
230
  metrikaGoals?: MetrikaGoal;
228
231
  pixelEvents?: ButtonPixel;
229
232
  analyticsEvents?: AnalyticsEvent | AnalyticsEvent[];
233
+ blockName?: string;
230
234
  }
231
235
  export interface PreviewContentItemProps {
232
236
  title: string;
@@ -62,6 +62,7 @@ export interface HubspotFormProps extends HubspotEventHandlers {
62
62
  pixelEvents?: string | string[] | PixelEvent | PixelEvent[] | ButtonPixel;
63
63
  hubspotEvents?: string[];
64
64
  analyticsEvents?: AnalyticsEvent | AnalyticsEvent[];
65
+ blockName?: string;
65
66
  }
66
67
  export interface PartnerProps extends CardBaseProps {
67
68
  text: string;
@@ -77,6 +78,7 @@ export interface QuoteProps extends Themable, CardBaseProps {
77
78
  author?: AuthorItem;
78
79
  buttonText?: string;
79
80
  theme?: TextTheme;
81
+ blockName?: string;
80
82
  }
81
83
  export interface NewsCardData {
82
84
  id: number;
@@ -111,6 +113,7 @@ export interface BannerCardProps {
111
113
  color?: ThemeSupporting<string>;
112
114
  theme?: TextTheme;
113
115
  button: Pick<ButtonProps, 'text' | 'url' | 'target'>;
116
+ blockName?: string;
114
117
  }
115
118
  export interface MediaCardProps extends MediaProps, CardBaseProps {
116
119
  }
@@ -118,7 +121,7 @@ export interface CardWithImageLinkProps extends Omit<LinkProps, 'text' | 'url'>
118
121
  title: string;
119
122
  link: string;
120
123
  }
121
- export interface CardWithImageProps extends ClassNameProps, Pick<ContentBlockProps, 'title' | 'additionalInfo' | 'buttons' | 'theme'> {
124
+ export interface CardWithImageProps extends ClassNameProps, Pick<ContentBlockProps, 'title' | 'additionalInfo' | 'buttons' | 'theme' | 'blockName'> {
122
125
  image: string;
123
126
  description?: string;
124
127
  disableCompress?: boolean;