@gravity-ui/page-constructor 1.15.0-alpha.8 → 1.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (273) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/README.md +5 -75
  3. package/build/cjs/blocks/Banner/Banner.js +2 -3
  4. package/build/cjs/blocks/Banner/schema.d.ts +0 -243
  5. package/build/cjs/blocks/Banner/schema.js +1 -3
  6. package/build/cjs/blocks/CardLayout/schema.d.ts +0 -6
  7. package/build/cjs/blocks/ContentLayout/ContentLayout.js +2 -3
  8. package/build/cjs/blocks/ContentLayout/schema.d.ts +0 -3
  9. package/build/cjs/blocks/ExtendedFeatures/ExtendedFeatures.d.ts +1 -1
  10. package/build/cjs/blocks/ExtendedFeatures/ExtendedFeatures.js +2 -3
  11. package/build/cjs/blocks/ExtendedFeatures/schema.d.ts +0 -3
  12. package/build/cjs/blocks/Header/Header.js +5 -6
  13. package/build/cjs/blocks/Header/schema.d.ts +0 -3
  14. package/build/cjs/blocks/HeaderSlider/schema.d.ts +0 -3
  15. package/build/cjs/blocks/Icons/schema.d.ts +0 -6
  16. package/build/cjs/blocks/Info/Info.js +3 -4
  17. package/build/cjs/blocks/Info/schema.d.ts +0 -3
  18. package/build/cjs/blocks/Info/schema.js +0 -2
  19. package/build/cjs/blocks/LinkTable/schema.d.ts +0 -3
  20. package/build/cjs/blocks/Media/Media.js +2 -3
  21. package/build/cjs/blocks/Media/MediaContent.js +2 -3
  22. package/build/cjs/blocks/Media/schema.d.ts +0 -81
  23. package/build/cjs/blocks/Preview/MediaContent/MediaContent.d.ts +1 -2
  24. package/build/cjs/blocks/Preview/MediaContent/MediaContent.js +2 -3
  25. package/build/cjs/blocks/Preview/MediaContent/PreviewMedia.d.ts +0 -1
  26. package/build/cjs/blocks/Preview/MediaContent/PreviewMedia.js +2 -3
  27. package/build/cjs/blocks/Preview/Preview.js +2 -3
  28. package/build/cjs/blocks/Preview/schema.d.ts +0 -3
  29. package/build/cjs/blocks/Preview/schema.js +1 -3
  30. package/build/cjs/blocks/PromoFeaturesBlock/PromoFeaturesBlock.js +2 -3
  31. package/build/cjs/blocks/PromoFeaturesBlock/schema.d.ts +0 -3
  32. package/build/cjs/blocks/Questions/Questions.js +2 -3
  33. package/build/cjs/blocks/Questions/schema.d.ts +0 -3
  34. package/build/cjs/blocks/Security/Security.js +2 -3
  35. package/build/cjs/blocks/Security/schema.d.ts +0 -3
  36. package/build/cjs/blocks/Security/schema.js +1 -3
  37. package/build/cjs/blocks/Share/Share.d.ts +1 -1
  38. package/build/cjs/blocks/Share/Share.js +2 -11
  39. package/build/cjs/blocks/Simple/schema.d.ts +0 -3
  40. package/build/cjs/blocks/Slider/schema.d.ts +0 -3
  41. package/build/cjs/blocks/Table/schema.d.ts +0 -3
  42. package/build/cjs/blocks/Tabs/Tabs.d.ts +1 -1
  43. package/build/cjs/blocks/Tabs/Tabs.js +4 -5
  44. package/build/cjs/blocks/Tabs/schema.d.ts +0 -3
  45. package/build/cjs/components/BackLink/BackLink.d.ts +0 -1
  46. package/build/cjs/components/BackLink/BackLink.js +2 -11
  47. package/build/cjs/components/BackgroundMedia/BackgroundMedia.js +1 -2
  48. package/build/cjs/components/Button/Button.d.ts +0 -1
  49. package/build/cjs/components/Button/Button.js +2 -11
  50. package/build/cjs/components/ButtonTabs/ButtonTabs.d.ts +0 -1
  51. package/build/cjs/components/ButtonTabs/ButtonTabs.js +2 -11
  52. package/build/cjs/components/CardBase/CardBase.d.ts +0 -3
  53. package/build/cjs/components/CardBase/CardBase.js +1 -10
  54. package/build/cjs/components/FullscreenImage/FullscreenImage.js +8 -6
  55. package/build/cjs/components/FullscreenMedia/FullScreenMedia.css +70 -0
  56. package/build/cjs/components/FullscreenMedia/FullScreenMedia.d.ts +9 -0
  57. package/build/cjs/components/FullscreenMedia/FullScreenMedia.js +40 -0
  58. package/build/cjs/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +1 -10
  59. package/build/cjs/components/Link/Link.js +2 -11
  60. package/build/cjs/components/Media/Media.js +5 -7
  61. package/build/cjs/components/Media/Video/Video.js +3 -6
  62. package/build/cjs/components/MetaInfo/MetaInfo.css +13 -0
  63. package/build/cjs/components/MetaInfo/MetaInfo.d.ts +6 -0
  64. package/build/cjs/components/MetaInfo/MetaInfo.js +8 -0
  65. package/build/cjs/components/MetaInfo/schema.d.ts +8 -0
  66. package/build/cjs/components/MetaInfo/schema.js +10 -0
  67. package/build/cjs/components/ReactPlayer/ReactPlayer.js +3 -16
  68. package/build/cjs/components/VideoBlock/VideoBlock.d.ts +1 -0
  69. package/build/cjs/components/VideoBlock/VideoBlock.js +6 -10
  70. package/build/cjs/components/YandexForm/YandexForm.d.ts +0 -3
  71. package/build/cjs/components/YandexForm/YandexForm.js +2 -19
  72. package/build/cjs/components/index.d.ts +2 -0
  73. package/build/cjs/components/index.js +5 -1
  74. package/build/cjs/constants.d.ts +0 -1
  75. package/build/cjs/constants.js +1 -2
  76. package/build/cjs/constructor-items.d.ts +9 -5
  77. package/build/cjs/constructor-items.js +4 -0
  78. package/build/cjs/containers/PageConstructor/PageConstructor.css +1 -0
  79. package/build/cjs/containers/PageConstructor/Provider.d.ts +0 -2
  80. package/build/cjs/containers/PageConstructor/Provider.js +1 -3
  81. package/build/cjs/context/metrikaContext/metrikaContext.d.ts +0 -6
  82. package/build/cjs/hooks/index.d.ts +0 -1
  83. package/build/cjs/hooks/index.js +0 -1
  84. package/build/cjs/hooks/useMetrika.d.ts +0 -6
  85. package/build/cjs/hooks/useMetrika.js +0 -8
  86. package/build/cjs/models/common.d.ts +0 -29
  87. package/build/cjs/models/common.js +0 -3
  88. package/build/cjs/models/constructor-items/blocks.d.ts +0 -11
  89. package/build/cjs/models/constructor-items/common.d.ts +2 -27
  90. package/build/cjs/models/constructor-items/sub-blocks.d.ts +16 -6
  91. package/build/cjs/models/constructor-items/sub-blocks.js +4 -0
  92. package/build/cjs/navigation/components/NavigationItem/NavigationItem.js +2 -3
  93. package/build/cjs/schema/index.js +1 -0
  94. package/build/cjs/schema/validators/common.d.ts +0 -171
  95. package/build/cjs/schema/validators/common.js +0 -12
  96. package/build/cjs/schema/validators/sub-blocks.d.ts +1 -0
  97. package/build/cjs/schema/validators/sub-blocks.js +1 -0
  98. package/build/cjs/sub-blocks/BackgroundCard/BackgroundCard.js +2 -3
  99. package/build/cjs/sub-blocks/BackgroundCard/schema.d.ts +0 -3
  100. package/build/cjs/sub-blocks/BackgroundCard/schema.js +0 -2
  101. package/build/cjs/sub-blocks/BannerCard/BannerCard.js +2 -3
  102. package/build/cjs/sub-blocks/BasicCard/BasicCard.js +2 -3
  103. package/build/cjs/sub-blocks/CardWithImage/CardWithImage.d.ts +1 -1
  104. package/build/cjs/sub-blocks/CardWithImage/CardWithImage.js +2 -3
  105. package/build/cjs/sub-blocks/Content/Content.js +3 -4
  106. package/build/cjs/sub-blocks/HubspotForm/HubspotForm.css +2 -2
  107. package/build/cjs/sub-blocks/HubspotForm/index.js +3 -19
  108. package/build/cjs/sub-blocks/LayoutItem/LayoutItem.css +16 -0
  109. package/build/cjs/sub-blocks/LayoutItem/LayoutItem.d.ts +3 -0
  110. package/build/cjs/sub-blocks/LayoutItem/LayoutItem.js +21 -0
  111. package/build/cjs/sub-blocks/LayoutItem/schema.d.ts +218 -0
  112. package/build/cjs/sub-blocks/LayoutItem/schema.js +18 -0
  113. package/build/cjs/sub-blocks/LayoutItem/utils.d.ts +15 -0
  114. package/build/cjs/sub-blocks/LayoutItem/utils.js +12 -0
  115. package/build/cjs/sub-blocks/MediaCard/MediaCard.d.ts +1 -1
  116. package/build/cjs/sub-blocks/MediaCard/MediaCard.js +2 -3
  117. package/build/cjs/sub-blocks/Quote/Quote.js +2 -10
  118. package/build/cjs/sub-blocks/Quote/schema.d.ts +0 -3
  119. package/build/cjs/sub-blocks/Quote/schema.js +1 -3
  120. package/build/cjs/sub-blocks/index.d.ts +1 -0
  121. package/build/cjs/sub-blocks/index.js +3 -1
  122. package/build/cjs/text-transform/blocks.js +17 -0
  123. package/build/cjs/utils/hubspot.d.ts +2 -1
  124. package/build/cjs/utils/hubspot.js +5 -1
  125. package/build/esm/blocks/Banner/Banner.js +2 -3
  126. package/build/esm/blocks/Banner/schema.d.ts +0 -243
  127. package/build/esm/blocks/Banner/schema.js +1 -3
  128. package/build/esm/blocks/CardLayout/schema.d.ts +0 -6
  129. package/build/esm/blocks/ContentLayout/ContentLayout.js +2 -3
  130. package/build/esm/blocks/ContentLayout/schema.d.ts +0 -3
  131. package/build/esm/blocks/ExtendedFeatures/ExtendedFeatures.d.ts +1 -1
  132. package/build/esm/blocks/ExtendedFeatures/ExtendedFeatures.js +2 -3
  133. package/build/esm/blocks/ExtendedFeatures/schema.d.ts +0 -3
  134. package/build/esm/blocks/Header/Header.js +5 -6
  135. package/build/esm/blocks/Header/schema.d.ts +0 -3
  136. package/build/esm/blocks/HeaderSlider/schema.d.ts +0 -3
  137. package/build/esm/blocks/Icons/schema.d.ts +0 -6
  138. package/build/esm/blocks/Info/Info.js +3 -4
  139. package/build/esm/blocks/Info/schema.d.ts +0 -3
  140. package/build/esm/blocks/Info/schema.js +0 -2
  141. package/build/esm/blocks/LinkTable/schema.d.ts +0 -3
  142. package/build/esm/blocks/Media/Media.js +2 -3
  143. package/build/esm/blocks/Media/MediaContent.js +2 -3
  144. package/build/esm/blocks/Media/schema.d.ts +0 -81
  145. package/build/esm/blocks/Preview/MediaContent/MediaContent.d.ts +1 -2
  146. package/build/esm/blocks/Preview/MediaContent/MediaContent.js +2 -3
  147. package/build/esm/blocks/Preview/MediaContent/PreviewMedia.d.ts +0 -1
  148. package/build/esm/blocks/Preview/MediaContent/PreviewMedia.js +2 -3
  149. package/build/esm/blocks/Preview/Preview.js +2 -3
  150. package/build/esm/blocks/Preview/schema.d.ts +0 -3
  151. package/build/esm/blocks/Preview/schema.js +1 -3
  152. package/build/esm/blocks/PromoFeaturesBlock/PromoFeaturesBlock.js +2 -3
  153. package/build/esm/blocks/PromoFeaturesBlock/schema.d.ts +0 -3
  154. package/build/esm/blocks/Questions/Questions.js +2 -3
  155. package/build/esm/blocks/Questions/schema.d.ts +0 -3
  156. package/build/esm/blocks/Security/Security.js +2 -3
  157. package/build/esm/blocks/Security/schema.d.ts +0 -3
  158. package/build/esm/blocks/Security/schema.js +1 -3
  159. package/build/esm/blocks/Share/Share.d.ts +1 -1
  160. package/build/esm/blocks/Share/Share.js +3 -12
  161. package/build/esm/blocks/Simple/schema.d.ts +0 -3
  162. package/build/esm/blocks/Slider/schema.d.ts +0 -3
  163. package/build/esm/blocks/Table/schema.d.ts +0 -3
  164. package/build/esm/blocks/Tabs/Tabs.d.ts +1 -1
  165. package/build/esm/blocks/Tabs/Tabs.js +4 -5
  166. package/build/esm/blocks/Tabs/schema.d.ts +0 -3
  167. package/build/esm/components/BackLink/BackLink.d.ts +0 -1
  168. package/build/esm/components/BackLink/BackLink.js +2 -11
  169. package/build/esm/components/BackgroundMedia/BackgroundMedia.js +1 -2
  170. package/build/esm/components/Button/Button.d.ts +0 -1
  171. package/build/esm/components/Button/Button.js +2 -11
  172. package/build/esm/components/ButtonTabs/ButtonTabs.d.ts +0 -1
  173. package/build/esm/components/ButtonTabs/ButtonTabs.js +2 -11
  174. package/build/esm/components/CardBase/CardBase.d.ts +0 -3
  175. package/build/esm/components/CardBase/CardBase.js +1 -10
  176. package/build/esm/components/FullscreenImage/FullscreenImage.js +9 -7
  177. package/build/esm/components/FullscreenMedia/FullScreenMedia.css +70 -0
  178. package/build/esm/components/FullscreenMedia/FullScreenMedia.d.ts +10 -0
  179. package/build/esm/components/FullscreenMedia/FullScreenMedia.js +38 -0
  180. package/build/esm/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +1 -10
  181. package/build/esm/components/Link/Link.js +2 -11
  182. package/build/esm/components/Media/Media.js +5 -7
  183. package/build/esm/components/Media/Video/Video.js +3 -6
  184. package/build/esm/components/MetaInfo/MetaInfo.css +13 -0
  185. package/build/esm/components/MetaInfo/MetaInfo.d.ts +7 -0
  186. package/build/esm/components/MetaInfo/MetaInfo.js +6 -0
  187. package/build/esm/components/MetaInfo/schema.d.ts +8 -0
  188. package/build/esm/components/MetaInfo/schema.js +8 -0
  189. package/build/esm/components/ReactPlayer/ReactPlayer.js +3 -16
  190. package/build/esm/components/VideoBlock/VideoBlock.d.ts +1 -0
  191. package/build/esm/components/VideoBlock/VideoBlock.js +6 -10
  192. package/build/esm/components/YandexForm/YandexForm.d.ts +0 -3
  193. package/build/esm/components/YandexForm/YandexForm.js +2 -19
  194. package/build/esm/components/index.d.ts +2 -0
  195. package/build/esm/components/index.js +2 -0
  196. package/build/esm/constants.d.ts +0 -1
  197. package/build/esm/constants.js +0 -1
  198. package/build/esm/constructor-items.d.ts +9 -5
  199. package/build/esm/constructor-items.js +5 -1
  200. package/build/esm/containers/PageConstructor/PageConstructor.css +1 -0
  201. package/build/esm/containers/PageConstructor/Provider.d.ts +0 -2
  202. package/build/esm/containers/PageConstructor/Provider.js +1 -3
  203. package/build/esm/context/metrikaContext/metrikaContext.d.ts +0 -6
  204. package/build/esm/hooks/index.d.ts +0 -1
  205. package/build/esm/hooks/index.js +0 -1
  206. package/build/esm/hooks/useMetrika.d.ts +0 -6
  207. package/build/esm/hooks/useMetrika.js +0 -8
  208. package/build/esm/models/common.d.ts +0 -29
  209. package/build/esm/models/common.js +0 -3
  210. package/build/esm/models/constructor-items/blocks.d.ts +0 -11
  211. package/build/esm/models/constructor-items/common.d.ts +2 -27
  212. package/build/esm/models/constructor-items/sub-blocks.d.ts +16 -6
  213. package/build/esm/models/constructor-items/sub-blocks.js +4 -0
  214. package/build/esm/navigation/components/NavigationItem/NavigationItem.js +2 -3
  215. package/build/esm/schema/index.js +1 -0
  216. package/build/esm/schema/validators/common.d.ts +0 -171
  217. package/build/esm/schema/validators/common.js +0 -12
  218. package/build/esm/schema/validators/sub-blocks.d.ts +1 -0
  219. package/build/esm/schema/validators/sub-blocks.js +1 -0
  220. package/build/esm/sub-blocks/BackgroundCard/BackgroundCard.js +2 -3
  221. package/build/esm/sub-blocks/BackgroundCard/schema.d.ts +0 -3
  222. package/build/esm/sub-blocks/BackgroundCard/schema.js +0 -2
  223. package/build/esm/sub-blocks/BannerCard/BannerCard.js +2 -3
  224. package/build/esm/sub-blocks/BasicCard/BasicCard.js +2 -3
  225. package/build/esm/sub-blocks/CardWithImage/CardWithImage.d.ts +1 -1
  226. package/build/esm/sub-blocks/CardWithImage/CardWithImage.js +2 -3
  227. package/build/esm/sub-blocks/Content/Content.js +3 -4
  228. package/build/esm/sub-blocks/HubspotForm/HubspotForm.css +2 -2
  229. package/build/esm/sub-blocks/HubspotForm/index.js +4 -20
  230. package/build/esm/sub-blocks/LayoutItem/LayoutItem.css +16 -0
  231. package/build/esm/sub-blocks/LayoutItem/LayoutItem.d.ts +4 -0
  232. package/build/esm/sub-blocks/LayoutItem/LayoutItem.js +20 -0
  233. package/build/esm/sub-blocks/LayoutItem/schema.d.ts +218 -0
  234. package/build/esm/sub-blocks/LayoutItem/schema.js +14 -0
  235. package/build/esm/sub-blocks/LayoutItem/utils.d.ts +15 -0
  236. package/build/esm/sub-blocks/LayoutItem/utils.js +6 -0
  237. package/build/esm/sub-blocks/MediaCard/MediaCard.d.ts +1 -1
  238. package/build/esm/sub-blocks/MediaCard/MediaCard.js +2 -3
  239. package/build/esm/sub-blocks/Quote/Quote.js +4 -12
  240. package/build/esm/sub-blocks/Quote/schema.d.ts +0 -3
  241. package/build/esm/sub-blocks/Quote/schema.js +1 -3
  242. package/build/esm/sub-blocks/index.d.ts +1 -0
  243. package/build/esm/sub-blocks/index.js +1 -0
  244. package/build/esm/text-transform/blocks.js +17 -0
  245. package/build/esm/utils/hubspot.d.ts +2 -1
  246. package/build/esm/utils/hubspot.js +5 -1
  247. package/package.json +4 -5
  248. package/server/models/common.d.ts +0 -29
  249. package/server/models/common.js +0 -3
  250. package/server/models/constructor-items/blocks.d.ts +0 -11
  251. package/server/models/constructor-items/common.d.ts +2 -27
  252. package/server/models/constructor-items/sub-blocks.d.ts +16 -6
  253. package/server/models/constructor-items/sub-blocks.js +4 -0
  254. package/server/text-transform/blocks.js +17 -0
  255. package/server/utils/hubspot.d.ts +2 -1
  256. package/server/utils/hubspot.js +5 -1
  257. package/styles/root.scss +1 -0
  258. package/build/cjs/context/analyticsContext/analyticsContext.d.ts +0 -6
  259. package/build/cjs/context/analyticsContext/analyticsContext.js +0 -6
  260. package/build/cjs/context/analyticsContext/index.d.ts +0 -1
  261. package/build/cjs/context/analyticsContext/index.js +0 -4
  262. package/build/cjs/hooks/useAnalytics.d.ts +0 -2
  263. package/build/cjs/hooks/useAnalytics.js +0 -23
  264. package/build/cjs/schema/validators/event.d.ts +0 -37
  265. package/build/cjs/schema/validators/event.js +0 -38
  266. package/build/esm/context/analyticsContext/analyticsContext.d.ts +0 -6
  267. package/build/esm/context/analyticsContext/analyticsContext.js +0 -2
  268. package/build/esm/context/analyticsContext/index.d.ts +0 -1
  269. package/build/esm/context/analyticsContext/index.js +0 -1
  270. package/build/esm/hooks/useAnalytics.d.ts +0 -2
  271. package/build/esm/hooks/useAnalytics.js +0 -19
  272. package/build/esm/schema/validators/event.d.ts +0 -37
  273. package/build/esm/schema/validators/event.js +0 -35
@@ -414,9 +414,6 @@ export declare const ButtonProps: {
414
414
  };
415
415
  })[];
416
416
  };
417
- /**
418
- * @deprecated Metrika will be deleted
419
- */
420
417
  metrikaGoals: {
421
418
  anyOf: ({
422
419
  type: string;
@@ -446,9 +443,6 @@ export declare const ButtonProps: {
446
443
  };
447
444
  })[];
448
445
  };
449
- /**
450
- * @deprecated Pixel will be deleted
451
- */
452
446
  pixelEvents: {
453
447
  type: string;
454
448
  items: {
@@ -505,84 +499,6 @@ export declare const ButtonProps: {
505
499
  };
506
500
  };
507
501
  };
508
- analyticsEvents: {
509
- anyOf: ({
510
- type: string;
511
- additionalProperties: {
512
- type: string;
513
- };
514
- required: string[];
515
- properties: {
516
- name: {
517
- type: string;
518
- };
519
- type: {
520
- type: string;
521
- };
522
- counters: {
523
- type: string;
524
- additionalProperties: boolean;
525
- required: never[];
526
- properties: {
527
- include: {
528
- type: string;
529
- items: {
530
- type: string;
531
- };
532
- };
533
- exclude: {
534
- type: string;
535
- items: {
536
- type: string;
537
- };
538
- };
539
- };
540
- };
541
- blockName: {
542
- type: string;
543
- };
544
- };
545
- } | {
546
- type: string;
547
- items: {
548
- type: string;
549
- additionalProperties: {
550
- type: string;
551
- };
552
- required: string[];
553
- properties: {
554
- name: {
555
- type: string;
556
- };
557
- type: {
558
- type: string;
559
- };
560
- counters: {
561
- type: string;
562
- additionalProperties: boolean;
563
- required: never[];
564
- properties: {
565
- include: {
566
- type: string;
567
- items: {
568
- type: string;
569
- };
570
- };
571
- exclude: {
572
- type: string;
573
- items: {
574
- type: string;
575
- };
576
- };
577
- };
578
- };
579
- blockName: {
580
- type: string;
581
- };
582
- };
583
- };
584
- })[];
585
- };
586
502
  target: {
587
503
  type: string;
588
504
  enum: string[];
@@ -642,9 +558,6 @@ export declare const BlockBaseProps: {
642
558
  resetPaddings: {
643
559
  type: string;
644
560
  };
645
- blockName: {
646
- type: string;
647
- };
648
561
  type: {};
649
562
  when: {};
650
563
  };
@@ -716,9 +629,6 @@ export declare const ButtonBlock: {
716
629
  };
717
630
  })[];
718
631
  };
719
- /**
720
- * @deprecated Metrika will be deleted
721
- */
722
632
  metrikaGoals: {
723
633
  anyOf: ({
724
634
  type: string;
@@ -748,9 +658,6 @@ export declare const ButtonBlock: {
748
658
  };
749
659
  })[];
750
660
  };
751
- /**
752
- * @deprecated Pixel will be deleted
753
- */
754
661
  pixelEvents: {
755
662
  type: string;
756
663
  items: {
@@ -807,84 +714,6 @@ export declare const ButtonBlock: {
807
714
  };
808
715
  };
809
716
  };
810
- analyticsEvents: {
811
- anyOf: ({
812
- type: string;
813
- additionalProperties: {
814
- type: string;
815
- };
816
- required: string[];
817
- properties: {
818
- name: {
819
- type: string;
820
- };
821
- type: {
822
- type: string;
823
- };
824
- counters: {
825
- type: string;
826
- additionalProperties: boolean;
827
- required: never[];
828
- properties: {
829
- include: {
830
- type: string;
831
- items: {
832
- type: string;
833
- };
834
- };
835
- exclude: {
836
- type: string;
837
- items: {
838
- type: string;
839
- };
840
- };
841
- };
842
- };
843
- blockName: {
844
- type: string;
845
- };
846
- };
847
- } | {
848
- type: string;
849
- items: {
850
- type: string;
851
- additionalProperties: {
852
- type: string;
853
- };
854
- required: string[];
855
- properties: {
856
- name: {
857
- type: string;
858
- };
859
- type: {
860
- type: string;
861
- };
862
- counters: {
863
- type: string;
864
- additionalProperties: boolean;
865
- required: never[];
866
- properties: {
867
- include: {
868
- type: string;
869
- items: {
870
- type: string;
871
- };
872
- };
873
- exclude: {
874
- type: string;
875
- items: {
876
- type: string;
877
- };
878
- };
879
- };
880
- };
881
- blockName: {
882
- type: string;
883
- };
884
- };
885
- };
886
- })[];
887
- };
888
717
  target: {
889
718
  type: string;
890
719
  enum: string[];
@@ -1,7 +1,6 @@
1
1
  import { pixelEvents } from './pixel';
2
2
  import { Theme } from '../../models';
3
3
  import { ImageProps, urlPattern } from '../../components/Image/schema';
4
- import { AnalyticsEventSchema } from './event';
5
4
  export const mediaDirection = ['media-content', 'content-media'];
6
5
  export const textSize = ['s', 'm', 'l'];
7
6
  export const containerSizesArray = ['sm', 'md', 'lg', 'xl', 'all'];
@@ -307,9 +306,6 @@ export const ButtonProps = {
307
306
  },
308
307
  ],
309
308
  },
310
- /**
311
- * @deprecated Metrika will be deleted
312
- */
313
309
  metrikaGoals: {
314
310
  anyOf: [
315
311
  { type: 'string' },
@@ -332,13 +328,7 @@ export const ButtonProps = {
332
328
  },
333
329
  ],
334
330
  },
335
- /**
336
- * @deprecated Pixel will be deleted
337
- */
338
331
  pixelEvents,
339
- analyticsEvents: {
340
- anyOf: [AnalyticsEventSchema, { type: 'array', items: AnalyticsEventSchema }],
341
- },
342
332
  target: {
343
333
  type: 'string',
344
334
  enum: ['_self', '_blank', '_parent', '_top'],
@@ -386,8 +376,6 @@ export const BlockBaseProps = Object.assign(Object.assign({}, BaseProps), { anch
386
376
  enum: containerSizesArray,
387
377
  }, resetPaddings: {
388
378
  type: 'boolean',
389
- }, blockName: {
390
- type: 'string',
391
379
  } });
392
380
  export const TitleProps = {
393
381
  type: 'object',
@@ -6,6 +6,7 @@ export * from '../../sub-blocks/NewsCard/schema';
6
6
  export * from '../../sub-blocks/Partner/schema';
7
7
  export * from '../../sub-blocks/TutorialCard/schema';
8
8
  export * from '../../sub-blocks/CardWithImage/schema';
9
+ export * from '../../sub-blocks/LayoutItem/schema';
9
10
  export * from '../../sub-blocks/Quote/schema';
10
11
  export * from '../../sub-blocks/Divider/schema';
11
12
  export * from '../../sub-blocks/BasicCard/schema';
@@ -6,6 +6,7 @@ export * from '../../sub-blocks/NewsCard/schema';
6
6
  export * from '../../sub-blocks/Partner/schema';
7
7
  export * from '../../sub-blocks/TutorialCard/schema';
8
8
  export * from '../../sub-blocks/CardWithImage/schema';
9
+ export * from '../../sub-blocks/LayoutItem/schema';
9
10
  export * from '../../sub-blocks/Quote/schema';
10
11
  export * from '../../sub-blocks/Divider/schema';
11
12
  export * from '../../sub-blocks/BasicCard/schema';
@@ -1,13 +1,12 @@
1
1
  import React, { useContext } from 'react';
2
2
  import { block, getThemedValue } from '../../utils';
3
3
  import { CardBase, BackgroundImage } from '../../components/';
4
- import { SubBlockType } from '../../models';
5
4
  import Content from '../Content/Content';
6
5
  import { ThemeValueContext } from '../../context/theme/ThemeValueContext';
7
6
  import './BackgroundCard.css';
8
7
  const b = block('background-card');
9
8
  const BackgroundCard = (props) => {
10
- const { url, title, text, border, background, paddingBottom, backgroundColor, additionalInfo, theme: cardTheme = 'default', links, buttons, blockName = SubBlockType.BackgroundCard, } = props;
9
+ const { url, title, text, border, background, paddingBottom, backgroundColor, additionalInfo, theme: cardTheme = 'default', links, buttons, } = props;
11
10
  const { themeValue: theme } = useContext(ThemeValueContext);
12
11
  const hasBackgroundColor = backgroundColor || cardTheme !== 'default';
13
12
  const link = hasBackgroundColor || border === 'line' ? undefined : url;
@@ -15,6 +14,6 @@ const BackgroundCard = (props) => {
15
14
  return (React.createElement(CardBase, { className: b({ padding: paddingBottom, theme: cardTheme }), url: link, border: borderType },
16
15
  React.createElement(CardBase.Content, null,
17
16
  React.createElement(BackgroundImage, Object.assign({ className: b('image') }, getThemedValue(background, theme), { style: { backgroundColor } })),
18
- React.createElement(Content, { title: title, text: text, additionalInfo: additionalInfo, size: "s", theme: cardTheme, links: links, buttons: buttons, colSizes: { all: 12, md: 12 }, blockName: blockName }))));
17
+ React.createElement(Content, { title: title, text: text, additionalInfo: additionalInfo, size: "s", theme: cardTheme, links: links, buttons: buttons, colSizes: { all: 12, md: 12 } }))));
19
18
  };
20
19
  export default BackgroundCard;
@@ -38,9 +38,6 @@ export declare const BackgroundCard: {
38
38
  type: string;
39
39
  enum: string[];
40
40
  };
41
- blockName: {
42
- type: string;
43
- };
44
41
  title: {
45
42
  oneOf: ({
46
43
  type: string;
@@ -14,8 +14,6 @@ export const BackgroundCard = {
14
14
  }, paddingBottom: {
15
15
  type: 'string',
16
16
  enum: ['s', 'm', 'l', 'xl'],
17
- }, blockName: {
18
- type: 'string',
19
17
  } }),
20
18
  },
21
19
  };
@@ -1,12 +1,11 @@
1
1
  import React, { useContext } from 'react';
2
2
  import { block, getThemedValue } from '../../utils';
3
- import { SubBlockType } from '../../models';
4
3
  import { Button, YFMWrapper, BackgroundImage, HTML } from '../../components';
5
4
  import { ThemeValueContext } from '../../context/theme/ThemeValueContext';
6
5
  import './BannerCard.css';
7
6
  const b = block('banner-card');
8
7
  export const BannerCard = (props) => {
9
- const { title, subtitle, button: { url, text, target }, color, theme: textTheme = 'light', image, disableCompress, blockName = SubBlockType.BannerCard, } = props;
8
+ const { title, subtitle, button: { url, text, target }, color, theme: textTheme = 'light', image, disableCompress, } = props;
10
9
  const { themeValue: theme } = useContext(ThemeValueContext);
11
10
  const contentStyle = {};
12
11
  if (color) {
@@ -19,7 +18,7 @@ export const BannerCard = (props) => {
19
18
  React.createElement("h2", { className: b('title') },
20
19
  React.createElement(HTML, null, title)),
21
20
  subtitle && (React.createElement(YFMWrapper, { className: b('subtitle'), content: subtitle, modifiers: { constructor: true } }))),
22
- React.createElement(Button, { className: b('button'), theme: "raised", size: "xl", text: text, url: url, target: target, blockName: blockName })),
21
+ React.createElement(Button, { className: b('button'), theme: "raised", size: "xl", text: text, url: url, target: target })),
23
22
  React.createElement(BackgroundImage, { className: b('image'), src: getThemedValue(image, theme), disableCompress: disableCompress }))));
24
23
  };
25
24
  export default BannerCard;
@@ -1,18 +1,17 @@
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';
5
4
  import Image from '../../components/Image/Image';
6
5
  import { Content } from '../';
7
6
  import { getMediaImage } from '../../components/Media/Image/utils';
8
7
  import './BasicCard.css';
9
8
  const b = block('basic-card');
10
9
  const BasicCard = (props) => {
11
- const { url, title, text, border, icon, additionalInfo, links, buttons, blockName = SubBlockType.BasicCard, } = props;
10
+ const { url, title, text, border, icon, additionalInfo, links, buttons } = props;
12
11
  const iconProps = icon && getMediaImage(icon);
13
12
  return (React.createElement(CardBase, { className: b(), url: url, border: border },
14
13
  React.createElement(CardBase.Content, null,
15
14
  iconProps && React.createElement(Image, Object.assign({}, iconProps, { className: b('icon') })),
16
- React.createElement(Content, { title: title, text: text, additionalInfo: additionalInfo, links: links, buttons: buttons, colSizes: { all: 12, md: 12 }, size: "s", blockName: blockName }))));
15
+ React.createElement(Content, { title: title, text: text, additionalInfo: additionalInfo, links: links, buttons: buttons, colSizes: { all: 12, md: 12 }, size: "s" }))));
17
16
  };
18
17
  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, blockName, }: CardWithImageProps) => JSX.Element;
3
+ declare const CardWithImage: ({ title, description, image, disableCompress, links, border, fullScreen, className, additionalInfo, buttons, }: CardWithImageProps) => JSX.Element;
4
4
  export default CardWithImage;
@@ -1,15 +1,14 @@
1
1
  import React from 'react';
2
2
  import { block } from '../../utils';
3
- import { SubBlockType } from '../../models';
4
3
  import { Image, FullscreenImage } from '../../components';
5
4
  import { Content } from '../';
6
5
  import './CardWithImage.css';
7
6
  const b = block('card-with-image');
8
- const CardWithImage = ({ title, description, image, disableCompress, links, border, fullScreen, className, additionalInfo, buttons, blockName = SubBlockType.CardWithImage, }) => {
7
+ const CardWithImage = ({ title, description, image, disableCompress, links, border, fullScreen, className, additionalInfo, buttons, }) => {
9
8
  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 })));
10
9
  return (React.createElement("div", { className: b(null, className) },
11
10
  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 }))),
12
11
  React.createElement("div", { className: b('content') },
13
- React.createElement(Content, { title: title, text: description, links: unifiedLinks, additionalInfo: additionalInfo, buttons: buttons, size: "s", colSizes: { all: 12, md: 12 }, blockName: blockName }))));
12
+ React.createElement(Content, { title: title, text: description, links: unifiedLinks, additionalInfo: additionalInfo, buttons: buttons, size: "s", colSizes: { all: 12, md: 12 } }))));
14
13
  };
15
14
  export default CardWithImage;
@@ -1,7 +1,6 @@
1
1
  import { __rest } from "tslib";
2
2
  import React from 'react';
3
3
  import { block } from '../../utils';
4
- import { SubBlockType, } from '../../models';
5
4
  import { Title, YFMWrapper, Button } from '../../components';
6
5
  import LinkBlock from '../../components/Link/Link';
7
6
  import { Col } from '../../grid';
@@ -35,7 +34,7 @@ function getButtonSize(size) {
35
34
  }
36
35
  }
37
36
  const Content = (props) => {
38
- const { title, text, additionalInfo, size = 'l', links, buttons, colSizes = { all: 12, sm: 8 }, centered, theme, className, blockName = SubBlockType.Content, } = props;
37
+ const { title, text, additionalInfo, size = 'l', links, buttons, colSizes = { all: 12, sm: 8 }, centered, theme, className, } = props;
39
38
  const titleProps = __rest(!title || typeof title === 'string'
40
39
  ? { text: title, textSize: getTextSize(size) }
41
40
  : title, []);
@@ -50,7 +49,7 @@ const Content = (props) => {
50
49
  'constructor-notice': true,
51
50
  [`constructor-size-${size}`]: true,
52
51
  } }))),
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 }))))))));
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) }))))))));
55
54
  };
56
55
  export default Content;
@@ -46,7 +46,7 @@ unpredictable css rules order in build */
46
46
  color: var(--yc-color-text-primary);
47
47
  background-color: transparent;
48
48
  border: 1px solid var(--yc-color-line-generic);
49
- border-radius: 6px;
49
+ border-radius: var(--yc-border-radius-l);
50
50
  }
51
51
  .pc-hubspot-form .hs-form-field .input input[type=text]:hover,
52
52
  .pc-hubspot-form .hs-form-field .input input[type=number]:hover,
@@ -276,7 +276,7 @@ unpredictable css rules order in build */
276
276
  box-sizing: border-box;
277
277
  height: 44px;
278
278
  padding: 0 20px;
279
- border-radius: 8px;
279
+ border-radius: var(--yc-border-radius-xl);
280
280
  background-color: var(--yc-color-base-special);
281
281
  color: var(--yc-my-color-brand-text-contrast);
282
282
  line-height: 44px;
@@ -3,22 +3,15 @@ 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';
7
- import { useHandleHubspotEvents, useAnalytics } from '../../hooks';
6
+ import { useHandleHubspotEvents } from '../../hooks';
8
7
  import HubspotFormContainer from './HubspotFormContainer';
9
- import { DEFAULT_EVENT_TYPE } from '../../constants';
10
8
  import './HubspotForm.css';
11
9
  const b = block('hubspot-form');
12
10
  const HubspotForm = (props) => {
13
11
  const { className, theme: themeProp, isMobile: isMobileProp, formId, formInstanceId, portalId, region, formClassName, pixelEvents,
14
12
  // hubspotEvents, // TODO: decide how to handle them
15
- analyticsEvents, onBeforeSubmit, onSubmit, onBeforeLoad, onLoad, blockName = SubBlockType.HubspotForm, } = props;
13
+ onBeforeSubmit, onSubmit, onBeforeLoad, onLoad, onSubmitError, } = props;
16
14
  const handleMetrika = useMetrika();
17
- const handleAnalytics = useAnalytics({
18
- name: 'hubspot-form-submit',
19
- type: DEFAULT_EVENT_TYPE,
20
- blockName: blockName,
21
- });
22
15
  const { themeValue } = useContext(ThemeValueContext);
23
16
  const isMobileValue = useContext(MobileContext);
24
17
  const theme = themeProp !== null && themeProp !== void 0 ? themeProp : themeValue;
@@ -27,21 +20,12 @@ const HubspotForm = (props) => {
27
20
  onBeforeLoad,
28
21
  onBeforeSubmit,
29
22
  onLoad,
23
+ onSubmitError,
30
24
  onSubmit: (e) => {
31
25
  handleMetrika === null || handleMetrika === void 0 ? void 0 : handleMetrika({ pixelEvents });
32
- handleAnalytics === null || handleAnalytics === void 0 ? void 0 : handleAnalytics(analyticsEvents);
33
26
  onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit(e);
34
27
  },
35
- }), [
36
- onBeforeLoad,
37
- onBeforeSubmit,
38
- onLoad,
39
- handleMetrika,
40
- pixelEvents,
41
- handleAnalytics,
42
- analyticsEvents,
43
- onSubmit,
44
- ]);
28
+ }), [onBeforeLoad, onBeforeSubmit, onLoad, handleMetrika, pixelEvents, onSubmit, onSubmitError]);
45
29
  useHandleHubspotEvents(handlers, formId);
46
30
  return (React.createElement(HubspotFormContainer, { key: [formClassName, formId, formInstanceId, portalId, region].join(), className: b({ theme, mobile }, className), formClassName: formClassName, formId: formId, portalId: portalId, formInstanceId: formInstanceId, region: region }));
47
31
  };
@@ -0,0 +1,16 @@
1
+ /* use this for style redefinitions to awoid problems with
2
+ unpredictable css rules order in build */
3
+ .pc-layout-item__media {
4
+ width: 100%;
5
+ display: block;
6
+ border-radius: var(--pc-border-radius);
7
+ }
8
+ .pc-layout-item__media_border {
9
+ border: 1px solid var(--yc-color-line-generic);
10
+ }
11
+ .pc-layout-item__meta-info {
12
+ margin: 16px 0 -8px 0;
13
+ }
14
+ .pc-layout-item__content {
15
+ margin: 16px 16px 0 0;
16
+ }
@@ -0,0 +1,4 @@
1
+ import { LayoutItemProps } from '../../models';
2
+ import './LayoutItem.css';
3
+ declare const LayoutItem: ({ content: { links, ...content }, metaInfo, media, border, fullScreen, className, }: LayoutItemProps) => JSX.Element;
4
+ export default LayoutItem;
@@ -0,0 +1,20 @@
1
+ import { __rest } from "tslib";
2
+ import React from 'react';
3
+ import { block } from '../../utils';
4
+ import { FullScreenMedia, Media, MetaInfo } from '../../components';
5
+ import { getLayoutItemLinks, hasFullScreen, showFullScreenIcon } from './utils';
6
+ import { Content } from '..';
7
+ import './LayoutItem.css';
8
+ const b = block('layout-item');
9
+ const LayoutItem = (_a) => {
10
+ var _b = _a.content, { links } = _b, content = __rest(_b, ["links"]), { metaInfo, media, border, fullScreen, className } = _a;
11
+ return (React.createElement("div", { className: b(null, className) },
12
+ fullScreen && hasFullScreen(media) ? (React.createElement(FullScreenMedia, { showFullScreenIcon: showFullScreenIcon(media) }, (_a = {}) => {
13
+ var { className: mediaClassName } = _a, fullScreenMediaProps = __rest(_a, ["className"]);
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 }) }))),
16
+ metaInfo && React.createElement(MetaInfo, { items: metaInfo, className: b('meta-info') }),
17
+ React.createElement("div", { className: b('content') },
18
+ React.createElement(Content, Object.assign({}, content, { links: getLayoutItemLinks(links), size: "s", colSizes: { all: 12, md: 12 } })))));
19
+ };
20
+ export default LayoutItem;