@gravity-ui/page-constructor 4.3.0 → 4.3.12-alpha.3

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 (270) hide show
  1. package/README.md +4 -0
  2. package/build/cjs/blocks/CardLayout/CardLayout.d.ts +2 -2
  3. package/build/cjs/blocks/CardLayout/CardLayout.js +1 -1
  4. package/build/cjs/blocks/ContentLayout/schema.d.ts +38 -0
  5. package/build/cjs/blocks/Header/Header.css +0 -6
  6. package/build/cjs/blocks/Icons/Icons.js +7 -1
  7. package/build/cjs/blocks/Icons/schema.d.ts +162 -0
  8. package/build/cjs/blocks/Icons/schema.js +11 -0
  9. package/build/cjs/blocks/Slider/Arrow/Arrow.js +2 -1
  10. package/build/cjs/blocks/Slider/Slider.css +4 -1
  11. package/build/cjs/blocks/Slider/Slider.js +32 -6
  12. package/build/cjs/blocks/Slider/i18n/en.json +4 -0
  13. package/build/cjs/blocks/Slider/i18n/index.d.ts +2 -0
  14. package/build/cjs/blocks/Slider/i18n/index.js +8 -0
  15. package/build/cjs/blocks/Slider/i18n/ru.json +4 -0
  16. package/build/cjs/components/BackgroundImage/BackgroundImage.d.ts +1 -0
  17. package/build/cjs/components/BackgroundImage/BackgroundImage.js +5 -2
  18. package/build/cjs/components/BackgroundMedia/BackgroundMedia.d.ts +1 -1
  19. package/build/cjs/components/BackgroundMedia/BackgroundMedia.js +4 -3
  20. package/build/cjs/components/ButtonTabs/ButtonTabs.js +6 -1
  21. package/build/cjs/components/CardBase/CardBase.css +4 -4
  22. package/build/cjs/components/HTML/HTML.d.ts +5 -1
  23. package/build/cjs/components/HTML/HTML.js +3 -1
  24. package/build/cjs/components/Image/Image.js +7 -5
  25. package/build/cjs/components/Image/schema.d.ts +19 -0
  26. package/build/cjs/components/Image/schema.js +12 -1
  27. package/build/cjs/components/Link/Link.d.ts +2 -1
  28. package/build/cjs/components/Link/Link.js +4 -2
  29. package/build/cjs/components/Media/Image/Image.d.ts +3 -2
  30. package/build/cjs/components/Media/Image/Image.js +8 -5
  31. package/build/cjs/components/Media/Media.d.ts +2 -2
  32. package/build/cjs/components/Media/Media.js +9 -6
  33. package/build/cjs/components/Media/Video/Video.d.ts +2 -2
  34. package/build/cjs/components/Media/Video/Video.js +15 -6
  35. package/build/cjs/components/MetaInfo/MetaInfo.css +0 -2
  36. package/build/cjs/components/MetaInfo/MetaInfo.js +2 -1
  37. package/build/cjs/components/ReactPlayer/CustomBarControls.css +46 -14
  38. package/build/cjs/components/ReactPlayer/CustomBarControls.d.ts +4 -1
  39. package/build/cjs/components/ReactPlayer/CustomBarControls.js +33 -9
  40. package/build/cjs/components/ReactPlayer/ReactPlayer.css +12 -0
  41. package/build/cjs/components/ReactPlayer/ReactPlayer.js +49 -25
  42. package/build/cjs/components/ReactPlayer/i18n/en.json +4 -1
  43. package/build/cjs/components/ReactPlayer/i18n/ru.json +4 -1
  44. package/build/cjs/components/Table/Table.js +11 -5
  45. package/build/cjs/components/VideoBlock/VideoBlock.js +7 -6
  46. package/build/cjs/components/YFMWrapper/YFMWrapper.d.ts +4 -3
  47. package/build/cjs/components/YFMWrapper/YFMWrapper.js +3 -3
  48. package/build/cjs/constructor-items.d.ts +10 -3
  49. package/build/cjs/constructor-items.js +11 -1
  50. package/build/cjs/containers/Loadable/Loadable.js +2 -2
  51. package/build/cjs/containers/PageConstructor/PageConstructor.css +4 -0
  52. package/build/cjs/containers/PageConstructor/PageConstructor.d.ts +2 -1
  53. package/build/cjs/containers/PageConstructor/PageConstructor.js +10 -6
  54. package/build/cjs/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.css +38 -0
  55. package/build/cjs/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.js +3 -2
  56. package/build/cjs/context/innerContext/InnerContext.d.ts +3 -1
  57. package/build/cjs/context/innerContext/InnerContext.js +2 -0
  58. package/build/cjs/editor/components/AddBlock/AddBlock.css +1 -1
  59. package/build/cjs/editor/components/EditBlock/EditBlock.css +1 -0
  60. package/build/cjs/editor/components/Layout/Layout.css +2 -1
  61. package/build/cjs/editor/containers/Form/Form.css +14 -35
  62. package/build/cjs/editor/store/index.js +1 -1
  63. package/build/cjs/editor/styles/root.css +2 -1
  64. package/build/cjs/editor/utils/index.d.ts +1 -0
  65. package/build/cjs/grid/Col/Col.d.ts +2 -4
  66. package/build/cjs/icons/Mute.d.ts +2 -0
  67. package/build/cjs/icons/Mute.js +12 -0
  68. package/build/cjs/icons/MuteSmall.d.ts +2 -0
  69. package/build/cjs/icons/MuteSmall.js +15 -0
  70. package/build/cjs/icons/Unmute.d.ts +2 -0
  71. package/build/cjs/icons/Unmute.js +12 -0
  72. package/build/cjs/icons/UnmuteSmall.d.ts +2 -0
  73. package/build/cjs/icons/UnmuteSmall.js +17 -0
  74. package/build/cjs/icons/VideoControlPause.d.ts +2 -0
  75. package/build/cjs/icons/VideoControlPause.js +16 -0
  76. package/build/cjs/icons/VideoControlPlay.d.ts +2 -0
  77. package/build/cjs/icons/VideoControlPlay.js +12 -0
  78. package/build/cjs/models/constructor-items/blocks.d.ts +12 -5
  79. package/build/cjs/models/constructor-items/common.d.ts +16 -34
  80. package/build/cjs/models/constructor-items/common.js +6 -1
  81. package/build/cjs/models/constructor-items/sub-blocks.d.ts +4 -4
  82. package/build/cjs/models/constructor.d.ts +7 -1
  83. package/build/cjs/models/navigation.d.ts +1 -0
  84. package/build/cjs/models/navigation.js +2 -1
  85. package/build/cjs/navigation/components/MobileMenuButton/MobileMenuButton.js +1 -0
  86. package/build/cjs/navigation/components/NavigationItem/NavigationItem.css +1 -1
  87. package/build/cjs/navigation/components/NavigationItem/NavigationItem.js +4 -16
  88. package/build/cjs/navigation/components/NavigationItem/components/NavigationLink/NavigationLink.js +1 -1
  89. package/build/cjs/navigation/components/NavigationItem/index.d.ts +6 -0
  90. package/build/cjs/navigation/components/NavigationItem/index.js +14 -0
  91. package/build/cjs/navigation/components/NavigationListItem/NavigationListItem.js +1 -1
  92. package/build/cjs/navigation/components/NavigationPopup/NavigationPopup.js +1 -1
  93. package/build/cjs/navigation/components/SocialIcon/SocialIcon.js +2 -1
  94. package/build/cjs/schema/constants.d.ts +181 -78
  95. package/build/cjs/sub-blocks/BackgroundCard/BackgroundCard.js +2 -3
  96. package/build/cjs/sub-blocks/BackgroundCard/schema.d.ts +100 -0
  97. package/build/cjs/sub-blocks/BackgroundCard/schema.js +10 -0
  98. package/build/cjs/sub-blocks/Content/Content.d.ts +3 -1
  99. package/build/cjs/sub-blocks/Content/Content.js +7 -5
  100. package/build/cjs/sub-blocks/Content/ContentList/ContentList.d.ts +2 -1
  101. package/build/cjs/sub-blocks/Content/ContentList/ContentList.js +7 -5
  102. package/build/cjs/sub-blocks/HubspotForm/HubspotForm.css +2 -2
  103. package/build/cjs/sub-blocks/LayoutItem/LayoutItem.d.ts +1 -1
  104. package/build/cjs/sub-blocks/LayoutItem/LayoutItem.js +3 -3
  105. package/build/cjs/sub-blocks/LayoutItem/schema.d.ts +81 -0
  106. package/build/cjs/sub-blocks/LayoutItem/schema.js +10 -0
  107. package/build/cjs/sub-blocks/MediaCard/MediaCard.d.ts +1 -1
  108. package/build/cjs/sub-blocks/MediaCard/MediaCard.js +2 -2
  109. package/build/cjs/sub-blocks/MediaCard/schema.d.ts +81 -78
  110. package/build/cjs/sub-blocks/MediaCard/schema.js +11 -1
  111. package/build/cjs/sub-blocks/PriceDetailed/CombinedPriceDetailed/CombinedPriceDetailed.d.ts +2 -2
  112. package/build/cjs/sub-blocks/PriceDetailed/CombinedPriceDetailed/CombinedPriceDetailed.js +2 -2
  113. package/build/cjs/sub-blocks/PriceDetailed/SeparatePriceDetailed/SeparatePriceDetailed.js +7 -4
  114. package/build/cjs/sub-blocks/PriceDetailed/schema.js +11 -1
  115. package/build/cjs/sub-blocks/Quote/Quote.css +0 -3
  116. package/build/cjs/text-transform/common.d.ts +7 -2
  117. package/build/cjs/text-transform/common.js +8 -2
  118. package/build/cjs/text-transform/config.js +1 -1
  119. package/build/cjs/text-transform/transformers.d.ts +2 -0
  120. package/build/cjs/text-transform/transformers.js +11 -8
  121. package/build/cjs/utils/blocks.d.ts +3 -6
  122. package/build/cjs/utils/blocks.js +25 -16
  123. package/build/cjs/utils/cn.d.ts +3 -3
  124. package/build/cjs/utils/cn.js +4 -7
  125. package/build/esm/blocks/CardLayout/CardLayout.d.ts +2 -2
  126. package/build/esm/blocks/CardLayout/CardLayout.js +1 -1
  127. package/build/esm/blocks/ContentLayout/schema.d.ts +38 -0
  128. package/build/esm/blocks/Header/Header.css +0 -6
  129. package/build/esm/blocks/Icons/Icons.js +8 -2
  130. package/build/esm/blocks/Icons/schema.d.ts +162 -0
  131. package/build/esm/blocks/Icons/schema.js +11 -0
  132. package/build/esm/blocks/Slider/Arrow/Arrow.js +2 -1
  133. package/build/esm/blocks/Slider/Slider.css +4 -1
  134. package/build/esm/blocks/Slider/Slider.js +33 -7
  135. package/build/esm/blocks/Slider/i18n/en.json +4 -0
  136. package/build/esm/blocks/Slider/i18n/index.d.ts +2 -0
  137. package/build/esm/blocks/Slider/i18n/index.js +5 -0
  138. package/build/esm/blocks/Slider/i18n/ru.json +4 -0
  139. package/build/esm/components/BackgroundImage/BackgroundImage.d.ts +1 -0
  140. package/build/esm/components/BackgroundImage/BackgroundImage.js +5 -3
  141. package/build/esm/components/BackgroundMedia/BackgroundMedia.d.ts +1 -1
  142. package/build/esm/components/BackgroundMedia/BackgroundMedia.js +5 -4
  143. package/build/esm/components/ButtonTabs/ButtonTabs.js +6 -1
  144. package/build/esm/components/CardBase/CardBase.css +4 -4
  145. package/build/esm/components/HTML/HTML.d.ts +5 -1
  146. package/build/esm/components/HTML/HTML.js +3 -1
  147. package/build/esm/components/Image/Image.js +7 -5
  148. package/build/esm/components/Image/schema.d.ts +19 -0
  149. package/build/esm/components/Image/schema.js +12 -1
  150. package/build/esm/components/Link/Link.d.ts +2 -1
  151. package/build/esm/components/Link/Link.js +4 -2
  152. package/build/esm/components/Media/Image/Image.d.ts +3 -2
  153. package/build/esm/components/Media/Image/Image.js +8 -6
  154. package/build/esm/components/Media/Media.d.ts +2 -2
  155. package/build/esm/components/Media/Media.js +10 -7
  156. package/build/esm/components/Media/Video/Video.d.ts +2 -2
  157. package/build/esm/components/Media/Video/Video.js +16 -7
  158. package/build/esm/components/MetaInfo/MetaInfo.css +0 -2
  159. package/build/esm/components/MetaInfo/MetaInfo.js +2 -1
  160. package/build/esm/components/ReactPlayer/CustomBarControls.css +46 -14
  161. package/build/esm/components/ReactPlayer/CustomBarControls.d.ts +4 -1
  162. package/build/esm/components/ReactPlayer/CustomBarControls.js +34 -10
  163. package/build/esm/components/ReactPlayer/ReactPlayer.css +12 -0
  164. package/build/esm/components/ReactPlayer/ReactPlayer.js +52 -28
  165. package/build/esm/components/ReactPlayer/i18n/en.json +4 -1
  166. package/build/esm/components/ReactPlayer/i18n/ru.json +4 -1
  167. package/build/esm/components/Table/Table.js +11 -5
  168. package/build/esm/components/VideoBlock/VideoBlock.js +7 -6
  169. package/build/esm/components/YFMWrapper/YFMWrapper.d.ts +4 -3
  170. package/build/esm/components/YFMWrapper/YFMWrapper.js +3 -3
  171. package/build/esm/constructor-items.d.ts +10 -3
  172. package/build/esm/constructor-items.js +10 -1
  173. package/build/esm/containers/Loadable/Loadable.js +1 -1
  174. package/build/esm/containers/PageConstructor/PageConstructor.css +4 -0
  175. package/build/esm/containers/PageConstructor/PageConstructor.d.ts +2 -1
  176. package/build/esm/containers/PageConstructor/PageConstructor.js +12 -8
  177. package/build/esm/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.css +38 -0
  178. package/build/esm/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.d.ts +1 -0
  179. package/build/esm/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.js +4 -2
  180. package/build/esm/context/innerContext/InnerContext.d.ts +3 -1
  181. package/build/esm/context/innerContext/InnerContext.js +2 -0
  182. package/build/esm/editor/components/AddBlock/AddBlock.css +1 -1
  183. package/build/esm/editor/components/EditBlock/EditBlock.css +1 -0
  184. package/build/esm/editor/components/Layout/Layout.css +2 -1
  185. package/build/esm/editor/containers/Form/Form.css +14 -35
  186. package/build/esm/editor/store/index.js +2 -2
  187. package/build/esm/editor/styles/root.css +2 -1
  188. package/build/esm/editor/utils/index.d.ts +1 -0
  189. package/build/esm/grid/Col/Col.d.ts +2 -4
  190. package/build/esm/icons/Mute.d.ts +2 -0
  191. package/build/esm/icons/Mute.js +7 -0
  192. package/build/esm/icons/MuteSmall.d.ts +2 -0
  193. package/build/esm/icons/MuteSmall.js +10 -0
  194. package/build/esm/icons/Unmute.d.ts +2 -0
  195. package/build/esm/icons/Unmute.js +7 -0
  196. package/build/esm/icons/UnmuteSmall.d.ts +2 -0
  197. package/build/esm/icons/UnmuteSmall.js +12 -0
  198. package/build/esm/icons/VideoControlPause.d.ts +2 -0
  199. package/build/esm/icons/VideoControlPause.js +11 -0
  200. package/build/esm/icons/VideoControlPlay.d.ts +2 -0
  201. package/build/esm/icons/VideoControlPlay.js +7 -0
  202. package/build/esm/models/constructor-items/blocks.d.ts +12 -5
  203. package/build/esm/models/constructor-items/common.d.ts +16 -34
  204. package/build/esm/models/constructor-items/common.js +5 -0
  205. package/build/esm/models/constructor-items/sub-blocks.d.ts +4 -4
  206. package/build/esm/models/constructor.d.ts +7 -1
  207. package/build/esm/models/navigation.d.ts +1 -0
  208. package/build/esm/models/navigation.js +1 -0
  209. package/build/esm/navigation/components/MobileMenuButton/MobileMenuButton.js +1 -0
  210. package/build/esm/navigation/components/NavigationItem/NavigationItem.css +1 -1
  211. package/build/esm/navigation/components/NavigationItem/NavigationItem.js +5 -17
  212. package/build/esm/navigation/components/NavigationItem/components/NavigationLink/NavigationLink.js +1 -1
  213. package/build/esm/navigation/components/NavigationItem/index.d.ts +6 -0
  214. package/build/esm/navigation/components/NavigationItem/index.js +6 -0
  215. package/build/esm/navigation/components/NavigationListItem/NavigationListItem.js +1 -1
  216. package/build/esm/navigation/components/NavigationPopup/NavigationPopup.js +1 -1
  217. package/build/esm/navigation/components/SocialIcon/SocialIcon.js +2 -1
  218. package/build/esm/schema/constants.d.ts +181 -78
  219. package/build/esm/sub-blocks/BackgroundCard/BackgroundCard.js +2 -3
  220. package/build/esm/sub-blocks/BackgroundCard/schema.d.ts +100 -0
  221. package/build/esm/sub-blocks/BackgroundCard/schema.js +10 -0
  222. package/build/esm/sub-blocks/Content/Content.d.ts +3 -1
  223. package/build/esm/sub-blocks/Content/Content.js +7 -5
  224. package/build/esm/sub-blocks/Content/ContentList/ContentList.d.ts +2 -1
  225. package/build/esm/sub-blocks/Content/ContentList/ContentList.js +7 -5
  226. package/build/esm/sub-blocks/HubspotForm/HubspotForm.css +2 -2
  227. package/build/esm/sub-blocks/LayoutItem/LayoutItem.d.ts +1 -1
  228. package/build/esm/sub-blocks/LayoutItem/LayoutItem.js +3 -3
  229. package/build/esm/sub-blocks/LayoutItem/schema.d.ts +81 -0
  230. package/build/esm/sub-blocks/LayoutItem/schema.js +10 -0
  231. package/build/esm/sub-blocks/MediaCard/MediaCard.d.ts +1 -1
  232. package/build/esm/sub-blocks/MediaCard/MediaCard.js +2 -2
  233. package/build/esm/sub-blocks/MediaCard/schema.d.ts +81 -78
  234. package/build/esm/sub-blocks/MediaCard/schema.js +11 -1
  235. package/build/esm/sub-blocks/PriceDetailed/CombinedPriceDetailed/CombinedPriceDetailed.d.ts +2 -2
  236. package/build/esm/sub-blocks/PriceDetailed/CombinedPriceDetailed/CombinedPriceDetailed.js +2 -2
  237. package/build/esm/sub-blocks/PriceDetailed/SeparatePriceDetailed/SeparatePriceDetailed.js +8 -4
  238. package/build/esm/sub-blocks/PriceDetailed/schema.js +11 -1
  239. package/build/esm/sub-blocks/Quote/Quote.css +0 -3
  240. package/build/esm/text-transform/common.d.ts +7 -2
  241. package/build/esm/text-transform/common.js +7 -2
  242. package/build/esm/text-transform/config.js +1 -1
  243. package/build/esm/text-transform/transformers.d.ts +2 -0
  244. package/build/esm/text-transform/transformers.js +11 -8
  245. package/build/esm/utils/blocks.d.ts +3 -6
  246. package/build/esm/utils/blocks.js +21 -11
  247. package/build/esm/utils/cn.d.ts +3 -3
  248. package/build/esm/utils/cn.js +3 -4
  249. package/package.json +6 -6
  250. package/server/models/constructor-items/blocks.d.ts +12 -5
  251. package/server/models/constructor-items/common.d.ts +16 -34
  252. package/server/models/constructor-items/common.js +6 -1
  253. package/server/models/constructor-items/sub-blocks.d.ts +4 -4
  254. package/server/models/constructor.d.ts +7 -1
  255. package/server/models/navigation.d.ts +1 -0
  256. package/server/models/navigation.js +2 -1
  257. package/server/text-transform/common.d.ts +7 -2
  258. package/server/text-transform/common.js +10 -2
  259. package/server/text-transform/config.js +1 -1
  260. package/server/text-transform/transformers.d.ts +2 -0
  261. package/server/text-transform/transformers.js +11 -8
  262. package/server/utils/blocks.d.ts +3 -6
  263. package/server/utils/blocks.js +25 -16
  264. package/server/utils/cn.d.ts +3 -3
  265. package/server/utils/cn.js +4 -9
  266. package/styles/mixins.scss +4 -1
  267. package/styles/storybook/common.scss +2 -0
  268. package/styles/styles.css +4 -0
  269. package/styles/yfm.scss +7 -0
  270. package/widget/index.js +1 -1
@@ -0,0 +1,6 @@
1
+ export { GithubButton } from './components/GithubButton/GithubButton';
2
+ export { NavigationButton } from './components/NavigationButton/NavigationButton';
3
+ export { NavigationDropdown } from './components/NavigationDropdown/NavigationDropdown';
4
+ export { NavigationLink } from './components/NavigationLink/NavigationLink';
5
+ import NavigationItem from './NavigationItem';
6
+ export default NavigationItem;
@@ -0,0 +1,6 @@
1
+ export { GithubButton } from './components/GithubButton/GithubButton';
2
+ export { NavigationButton } from './components/NavigationButton/NavigationButton';
3
+ export { NavigationDropdown } from './components/NavigationDropdown/NavigationDropdown';
4
+ export { NavigationLink } from './components/NavigationLink/NavigationLink';
5
+ import NavigationItem from './NavigationItem';
6
+ export default NavigationItem;
@@ -1,7 +1,7 @@
1
1
  import { __rest } from "tslib";
2
2
  import React from 'react';
3
3
  import { getItemClickHandler } from '../../utils';
4
- import NavigationItem from '../NavigationItem/NavigationItem';
4
+ import NavigationItem from '../NavigationItem';
5
5
  const NavigationListItem = (_a) => {
6
6
  var { column, index, activeItemId, onActiveItemChange } = _a, props = __rest(_a, ["column", "index", "activeItemId", "onActiveItemChange"]);
7
7
  const id = `${column}-${index}`;
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import { Popup } from '@gravity-ui/uikit';
3
3
  import { block } from '../../../utils';
4
4
  import { NavigationLayout } from '../../models';
5
- import NavigationItem from '../NavigationItem/NavigationItem';
5
+ import NavigationItem from '../NavigationItem';
6
6
  import './NavigationPopup.css';
7
7
  const b = block('navigation-popup');
8
8
  const OFFSET_RESET = [0, 0];
@@ -6,7 +6,8 @@ import './SocialIcon.css';
6
6
  const b = block('social-icon');
7
7
  const SocialIcon = ({ icon, url, className }) => {
8
8
  const iconData = getMediaImage(icon);
9
- return (React.createElement("a", { href: url, target: "_blank", rel: "noopener noreferrer", className: b(null, className) },
9
+ const { alt } = iconData;
10
+ return (React.createElement("a", { href: url, "aria-label": alt, title: alt, target: "_blank", rel: "noopener noreferrer", className: b(null, className) },
10
11
  React.createElement(Image, Object.assign({ className: b('icon') }, iconData))));
11
12
  };
12
13
  export default SocialIcon;
@@ -205,6 +205,25 @@ export declare const cardSchemas: {
205
205
  type: string;
206
206
  pattern: string;
207
207
  };
208
+ style: {
209
+ type: string;
210
+ additionalProperties: boolean;
211
+ required: never[];
212
+ properties: {
213
+ backgroundColor: {
214
+ type: string;
215
+ };
216
+ height: {
217
+ type: string[];
218
+ };
219
+ width: {
220
+ type: string[];
221
+ };
222
+ color: {
223
+ type: string;
224
+ };
225
+ };
226
+ };
208
227
  alt: {
209
228
  type: string;
210
229
  contentType: string;
@@ -230,6 +249,87 @@ export declare const cardSchemas: {
230
249
  type: string;
231
250
  enum: string[];
232
251
  };
252
+ analyticsEvents: {
253
+ oneOf: ({
254
+ optionName: string;
255
+ type: string;
256
+ additionalProperties: {
257
+ type: string;
258
+ };
259
+ required: string[];
260
+ properties: {
261
+ name: {
262
+ type: string;
263
+ };
264
+ type: {
265
+ type: string;
266
+ };
267
+ counters: {
268
+ type: string;
269
+ additionalProperties: boolean;
270
+ required: never[];
271
+ properties: {
272
+ include: {
273
+ type: string;
274
+ items: {
275
+ type: string;
276
+ };
277
+ };
278
+ exclude: {
279
+ type: string;
280
+ items: {
281
+ type: string;
282
+ };
283
+ };
284
+ };
285
+ };
286
+ context: {
287
+ type: string;
288
+ };
289
+ };
290
+ items?: undefined;
291
+ } | {
292
+ type: string;
293
+ items: {
294
+ type: string;
295
+ additionalProperties: {
296
+ type: string;
297
+ };
298
+ required: string[];
299
+ properties: {
300
+ name: {
301
+ type: string;
302
+ };
303
+ type: {
304
+ type: string;
305
+ };
306
+ counters: {
307
+ type: string;
308
+ additionalProperties: boolean;
309
+ required: never[];
310
+ properties: {
311
+ include: {
312
+ type: string;
313
+ items: {
314
+ type: string;
315
+ };
316
+ };
317
+ exclude: {
318
+ type: string;
319
+ items: {
320
+ type: string;
321
+ };
322
+ };
323
+ };
324
+ };
325
+ context: {
326
+ type: string;
327
+ };
328
+ };
329
+ };
330
+ optionName: string;
331
+ })[];
332
+ };
233
333
  title: {
234
334
  oneOf: ({
235
335
  type: string;
@@ -708,6 +808,87 @@ export declare const cardSchemas: {
708
808
  additionalProperties: boolean;
709
809
  required: never[];
710
810
  properties: {
811
+ analyticsEvents: {
812
+ oneOf: ({
813
+ optionName: string;
814
+ type: string;
815
+ additionalProperties: {
816
+ type: string;
817
+ };
818
+ required: string[];
819
+ properties: {
820
+ name: {
821
+ type: string;
822
+ };
823
+ type: {
824
+ type: string;
825
+ };
826
+ counters: {
827
+ type: string;
828
+ additionalProperties: boolean;
829
+ required: never[];
830
+ properties: {
831
+ include: {
832
+ type: string;
833
+ items: {
834
+ type: string;
835
+ };
836
+ };
837
+ exclude: {
838
+ type: string;
839
+ items: {
840
+ type: string;
841
+ };
842
+ };
843
+ };
844
+ };
845
+ context: {
846
+ type: string;
847
+ };
848
+ };
849
+ items?: undefined;
850
+ } | {
851
+ type: string;
852
+ items: {
853
+ type: string;
854
+ additionalProperties: {
855
+ type: string;
856
+ };
857
+ required: string[];
858
+ properties: {
859
+ name: {
860
+ type: string;
861
+ };
862
+ type: {
863
+ type: string;
864
+ };
865
+ counters: {
866
+ type: string;
867
+ additionalProperties: boolean;
868
+ required: never[];
869
+ properties: {
870
+ include: {
871
+ type: string;
872
+ items: {
873
+ type: string;
874
+ };
875
+ };
876
+ exclude: {
877
+ type: string;
878
+ items: {
879
+ type: string;
880
+ };
881
+ };
882
+ };
883
+ };
884
+ context: {
885
+ type: string;
886
+ };
887
+ };
888
+ };
889
+ optionName: string;
890
+ })[];
891
+ };
711
892
  animated: {
712
893
  type: string;
713
894
  };
@@ -852,84 +1033,6 @@ export declare const cardSchemas: {
852
1033
  fullscreen: {
853
1034
  type: string;
854
1035
  };
855
- analyticsEvents: {
856
- anyOf: ({
857
- type: string;
858
- additionalProperties: {
859
- type: string;
860
- };
861
- required: string[];
862
- properties: {
863
- name: {
864
- type: string;
865
- };
866
- type: {
867
- type: string;
868
- };
869
- counters: {
870
- type: string;
871
- additionalProperties: boolean;
872
- required: never[];
873
- properties: {
874
- include: {
875
- type: string;
876
- items: {
877
- type: string;
878
- };
879
- };
880
- exclude: {
881
- type: string;
882
- items: {
883
- type: string;
884
- };
885
- };
886
- };
887
- };
888
- context: {
889
- type: string;
890
- };
891
- };
892
- } | {
893
- type: string;
894
- items: {
895
- type: string;
896
- additionalProperties: {
897
- type: string;
898
- };
899
- required: string[];
900
- properties: {
901
- name: {
902
- type: string;
903
- };
904
- type: {
905
- type: string;
906
- };
907
- counters: {
908
- type: string;
909
- additionalProperties: boolean;
910
- required: never[];
911
- properties: {
912
- include: {
913
- type: string;
914
- items: {
915
- type: string;
916
- };
917
- };
918
- exclude: {
919
- type: string;
920
- items: {
921
- type: string;
922
- };
923
- };
924
- };
925
- };
926
- context: {
927
- type: string;
928
- };
929
- };
930
- };
931
- })[];
932
- };
933
1036
  border: {
934
1037
  type: string;
935
1038
  enum: string[];
@@ -6,12 +6,11 @@ import Content from '../Content/Content';
6
6
  import './BackgroundCard.css';
7
7
  const b = block('background-card');
8
8
  const BackgroundCard = (props) => {
9
- const { url, title, text, border, background, paddingBottom, backgroundColor, additionalInfo, theme: cardTheme = 'default', links, buttons, } = props;
9
+ const { url, title, text, border, background, paddingBottom, backgroundColor, additionalInfo, theme: cardTheme = 'default', links, buttons, analyticsEvents, } = props;
10
10
  const theme = useTheme();
11
11
  const hasBackgroundColor = backgroundColor || cardTheme !== 'default';
12
- const link = hasBackgroundColor || border === 'line' ? undefined : url;
13
12
  const borderType = hasBackgroundColor ? 'none' : border;
14
- return (React.createElement(CardBase, { className: b({ padding: paddingBottom, theme: cardTheme }), url: link, border: borderType },
13
+ return (React.createElement(CardBase, { className: b({ padding: paddingBottom, theme: cardTheme }), url: url, border: borderType, analyticsEvents: analyticsEvents },
15
14
  React.createElement(CardBase.Content, null,
16
15
  React.createElement(BackgroundImage, Object.assign({ className: b('image') }, getThemedValue(background, theme), { style: { backgroundColor } })),
17
16
  React.createElement(Content, { title: title, text: text, additionalInfo: additionalInfo, size: "s", theme: cardTheme, links: links, buttons: buttons, colSizes: { all: 12, md: 12 } }))));
@@ -16,6 +16,25 @@ export declare const BackgroundCard: {
16
16
  type: string;
17
17
  pattern: string;
18
18
  };
19
+ style: {
20
+ type: string;
21
+ additionalProperties: boolean;
22
+ required: never[];
23
+ properties: {
24
+ backgroundColor: {
25
+ type: string;
26
+ };
27
+ height: {
28
+ type: string[];
29
+ };
30
+ width: {
31
+ type: string[];
32
+ };
33
+ color: {
34
+ type: string;
35
+ };
36
+ };
37
+ };
19
38
  alt: {
20
39
  type: string;
21
40
  contentType: string;
@@ -41,6 +60,87 @@ export declare const BackgroundCard: {
41
60
  type: string;
42
61
  enum: string[];
43
62
  };
63
+ analyticsEvents: {
64
+ oneOf: ({
65
+ optionName: string;
66
+ type: string;
67
+ additionalProperties: {
68
+ type: string;
69
+ };
70
+ required: string[];
71
+ properties: {
72
+ name: {
73
+ type: string;
74
+ };
75
+ type: {
76
+ type: string;
77
+ };
78
+ counters: {
79
+ type: string;
80
+ additionalProperties: boolean;
81
+ required: never[];
82
+ properties: {
83
+ include: {
84
+ type: string;
85
+ items: {
86
+ type: string;
87
+ };
88
+ };
89
+ exclude: {
90
+ type: string;
91
+ items: {
92
+ type: string;
93
+ };
94
+ };
95
+ };
96
+ };
97
+ context: {
98
+ type: string;
99
+ };
100
+ };
101
+ items?: undefined;
102
+ } | {
103
+ type: string;
104
+ items: {
105
+ type: string;
106
+ additionalProperties: {
107
+ type: string;
108
+ };
109
+ required: string[];
110
+ properties: {
111
+ name: {
112
+ type: string;
113
+ };
114
+ type: {
115
+ type: string;
116
+ };
117
+ counters: {
118
+ type: string;
119
+ additionalProperties: boolean;
120
+ required: never[];
121
+ properties: {
122
+ include: {
123
+ type: string;
124
+ items: {
125
+ type: string;
126
+ };
127
+ };
128
+ exclude: {
129
+ type: string;
130
+ items: {
131
+ type: string;
132
+ };
133
+ };
134
+ };
135
+ };
136
+ context: {
137
+ type: string;
138
+ };
139
+ };
140
+ };
141
+ optionName: string;
142
+ })[];
143
+ };
44
144
  title: {
45
145
  oneOf: ({
46
146
  type: string;
@@ -1,6 +1,7 @@
1
1
  import _ from 'lodash';
2
2
  import { ImageObjectProps } from '../../components/Image/schema';
3
3
  import { BaseProps, CardBase, withTheme } from '../../schema/validators/common';
4
+ import { AnalyticsEventSchema } from '../../schema/validators/event';
4
5
  import { ContentBase } from '../Content/schema';
5
6
  const BackgroundCardContentProps = _.omit(ContentBase, ['size']);
6
7
  export const BackgroundCard = {
@@ -14,6 +15,15 @@ export const BackgroundCard = {
14
15
  }, paddingBottom: {
15
16
  type: 'string',
16
17
  enum: ['s', 'm', 'l', 'xl'],
18
+ }, analyticsEvents: {
19
+ oneOf: [
20
+ Object.assign(Object.assign({}, AnalyticsEventSchema), { optionName: 'single' }),
21
+ {
22
+ type: 'array',
23
+ items: AnalyticsEventSchema,
24
+ optionName: 'list',
25
+ },
26
+ ],
17
27
  } }),
18
28
  },
19
29
  };
@@ -1,4 +1,6 @@
1
1
  import { ClassNameProps, ContentBlockProps } from '../../models';
2
+ import { QAProps } from '../../models/common';
2
3
  import './Content.css';
3
- declare const Content: (props: ContentBlockProps & ClassNameProps) => JSX.Element;
4
+ export type ContentProps = ContentBlockProps & ClassNameProps & QAProps;
5
+ declare const Content: (props: ContentProps) => JSX.Element;
4
6
  export default Content;
@@ -3,6 +3,7 @@ import { Button, Title, YFMWrapper } from '../../components';
3
3
  import LinkBlock from '../../components/Link/Link';
4
4
  import { Col } from '../../grid';
5
5
  import { block } from '../../utils';
6
+ import { getQaAttrubutes } from '../../utils/blocks';
6
7
  import ContentList from './ContentList/ContentList';
7
8
  import './Content.css';
8
9
  const b = block('content');
@@ -34,23 +35,24 @@ 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, list, } = props;
38
+ const { title, text, additionalInfo, size = 'l', links, buttons, colSizes = { all: 12, sm: 8 }, centered, theme, className, list, qa, } = props;
39
+ const qaAttributes = getQaAttrubutes(qa, ['links', 'link', 'buttons', 'button', 'list']);
38
40
  const titleProps = !title || typeof title === 'string'
39
41
  ? { text: title, textSize: getTextSize(size) }
40
42
  : title;
41
43
  const hasTitle = Boolean(title);
42
- return (React.createElement(Col, { className: b({ size, centered, theme }, className), reset: true, sizes: colSizes },
44
+ return (React.createElement(Col, { className: b({ size, centered, theme }, className), reset: true, sizes: colSizes, qa: qaAttributes.container },
43
45
  title && React.createElement(Title, { className: b('title'), title: titleProps, colSizes: { all: 12 } }),
44
46
  text && (React.createElement("div", { className: b('text', { ['without-title']: !hasTitle }) },
45
47
  React.createElement(YFMWrapper, { content: text, modifiers: { constructor: true, [`constructor-size-${size}`]: true } }))),
46
- (list === null || list === void 0 ? void 0 : list.length) ? React.createElement(ContentList, { list: list, size: size }) : null,
48
+ (list === null || list === void 0 ? void 0 : list.length) ? React.createElement(ContentList, { list: list, size: size, qa: qaAttributes.list }) : null,
47
49
  additionalInfo && (React.createElement("div", { className: b('notice') },
48
50
  React.createElement(YFMWrapper, { content: additionalInfo, modifiers: {
49
51
  constructor: true,
50
52
  'constructor-notice': true,
51
53
  [`constructor-size-${size}`]: true,
52
54
  } }))),
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 })))))),
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) }))))))));
55
+ links && (React.createElement("div", { className: b('links'), "data-qa": qaAttributes.links }, links.map((link) => (React.createElement(LinkBlock, Object.assign({ className: b('link') }, link, { textSize: getLinkSize(size), key: link.url, qa: qaAttributes.link })))))),
56
+ buttons && (React.createElement("div", { className: b('buttons'), "data-qa": qaAttributes.buttons }, buttons.map((item) => (React.createElement(Button, Object.assign({ className: b('button') }, item, { key: item.url, size: getButtonSize(size), qa: qaAttributes.button }))))))));
55
57
  };
56
58
  export default Content;
@@ -1,8 +1,9 @@
1
1
  import { ContentItemProps, ContentSize } from '../../../models';
2
+ import { QAProps } from '../../../models/common';
2
3
  import './ContentList.css';
3
4
  interface ContentListProps {
4
5
  list: ContentItemProps[];
5
6
  size: ContentSize;
6
7
  }
7
- declare const ContentList: ({ list, size }: ContentListProps) => JSX.Element;
8
+ declare const ContentList: ({ list, size, qa }: ContentListProps & QAProps) => JSX.Element;
8
9
  export default ContentList;
@@ -5,6 +5,7 @@ import Image from '../../../components/Image/Image';
5
5
  import { getMediaImage } from '../../../components/Media/Image/utils';
6
6
  import { useTheme } from '../../../context/theme';
7
7
  import { block, getThemedValue } from '../../../utils';
8
+ import { getQaAttrubutes } from '../../../utils/blocks';
8
9
  import './ContentList.css';
9
10
  const b = block('content-list');
10
11
  function getHeadingLevel(size) {
@@ -16,18 +17,19 @@ function getHeadingLevel(size) {
16
17
  return 'h3';
17
18
  }
18
19
  }
19
- const ContentList = ({ list, size }) => {
20
+ const ContentList = ({ list, size, qa }) => {
20
21
  const theme = useTheme();
21
- return (React.createElement("div", { className: b({ size }) }, list === null || list === void 0 ? void 0 : list.map((item) => {
22
+ const qaAttributes = getQaAttrubutes(qa, ['image', 'title', 'text']);
23
+ return (React.createElement("div", { className: b({ size }), "data-qa": qa }, list === null || list === void 0 ? void 0 : list.map((item) => {
22
24
  const { icon, title, text } = item;
23
25
  const iconThemed = getThemedValue(icon, theme);
24
26
  const iconData = getMediaImage(iconThemed);
25
27
  return (React.createElement("div", { className: b('item'), key: uuidv4() },
26
- React.createElement(Image, Object.assign({}, iconData, { className: b('icon') })),
28
+ React.createElement(Image, Object.assign({}, iconData, { className: b('icon'), qa: qaAttributes.image })),
27
29
  React.createElement("div", null,
28
30
  title &&
29
- React.createElement(getHeadingLevel(size), { className: b('title') }, title),
30
- text && (React.createElement(YFMWrapper, { className: b('text'), content: text, modifiers: { constructor: true } })))));
31
+ React.createElement(getHeadingLevel(size), { className: b('title'), 'data-qa': qaAttributes.title }, title),
32
+ text && (React.createElement(YFMWrapper, { className: b('text'), content: text, modifiers: { constructor: true }, qa: qaAttributes.text })))));
31
33
  })));
32
34
  };
33
35
  export default ContentList;
@@ -268,9 +268,9 @@ unpredictable css rules order in build */
268
268
  .pc-hubspot-form .hs-button.primary {
269
269
  margin: 0;
270
270
  padding: 0;
271
- font-family: var(--g-font-family-sans);
271
+ font-family: var(--g-text-body-font-family);
272
272
  font-size: inherit;
273
- font-weight: 400;
273
+ font-weight: var(--g-text-body-font-weight);
274
274
  color: inherit;
275
275
  background: none;
276
276
  border: none;
@@ -1,4 +1,4 @@
1
1
  import { LayoutItemProps } from '../../models';
2
2
  import './LayoutItem.css';
3
- declare const LayoutItem: ({ content: { links, ...content }, metaInfo, media, border, fullscreen, className, }: LayoutItemProps) => JSX.Element;
3
+ declare const LayoutItem: ({ content: { links, ...content }, metaInfo, media, border, fullscreen, className, analyticsEvents, }: LayoutItemProps) => JSX.Element;
4
4
  export default LayoutItem;
@@ -7,12 +7,12 @@ import { getLayoutItemLinks, hasFullscreen, showFullscreenIcon } from './utils';
7
7
  import './LayoutItem.css';
8
8
  const b = block('layout-item');
9
9
  const LayoutItem = (_a) => {
10
- var _b = _a.content, { links } = _b, content = __rest(_b, ["links"]), { metaInfo, media, border, fullscreen, className } = _a;
10
+ var _b = _a.content, { links } = _b, content = __rest(_b, ["links"]), { metaInfo, media, border, fullscreen, className, analyticsEvents } = _a;
11
11
  return (React.createElement("div", { className: b(null, className) },
12
12
  fullscreen && hasFullscreen(media) ? (React.createElement(FullscreenMedia, { showFullscreenIcon: showFullscreenIcon(media) }, (_a = {}) => {
13
13
  var { className: mediaClassName, fullscreen: _fullscreen } = _a, fullscreenMediaProps = __rest(_a, ["className", "fullscreen"]);
14
- return (React.createElement(Media, Object.assign({}, media, fullscreenMediaProps, { className: b('media', { border }, mediaClassName) })));
15
- })) : (React.createElement(Media, Object.assign({}, media, { className: b('media', { border }) }))),
14
+ return (React.createElement(Media, Object.assign({}, media, fullscreenMediaProps, { className: b('media', { border }, mediaClassName), analyticsEvents: analyticsEvents })));
15
+ })) : (React.createElement(Media, Object.assign({}, media, { className: b('media', { border }), analyticsEvents: analyticsEvents }))),
16
16
  metaInfo && React.createElement(MetaInfo, { items: metaInfo, className: b('meta-info') }),
17
17
  React.createElement("div", { className: b('content') },
18
18
  React.createElement(Content, Object.assign({}, content, { links: getLayoutItemLinks(links), size: "s", colSizes: { all: 12, md: 12 } })))));