@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[];
@@ -4,7 +4,6 @@ exports.BlockHeaderProps = exports.CardBase = exports.MediaProps = exports.Butto
4
4
  const pixel_1 = require("./pixel");
5
5
  const models_1 = require("../../models");
6
6
  const schema_1 = require("../../components/Image/schema");
7
- const event_1 = require("./event");
8
7
  exports.mediaDirection = ['media-content', 'content-media'];
9
8
  exports.textSize = ['s', 'm', 'l'];
10
9
  exports.containerSizesArray = ['sm', 'md', 'lg', 'xl', 'all'];
@@ -310,9 +309,6 @@ exports.ButtonProps = {
310
309
  },
311
310
  ],
312
311
  },
313
- /**
314
- * @deprecated Metrika will be deleted
315
- */
316
312
  metrikaGoals: {
317
313
  anyOf: [
318
314
  { type: 'string' },
@@ -335,13 +331,7 @@ exports.ButtonProps = {
335
331
  },
336
332
  ],
337
333
  },
338
- /**
339
- * @deprecated Pixel will be deleted
340
- */
341
334
  pixelEvents: pixel_1.pixelEvents,
342
- analyticsEvents: {
343
- anyOf: [event_1.AnalyticsEventSchema, { type: 'array', items: event_1.AnalyticsEventSchema }],
344
- },
345
335
  target: {
346
336
  type: 'string',
347
337
  enum: ['_self', '_blank', '_parent', '_top'],
@@ -390,8 +380,6 @@ exports.BlockBaseProps = Object.assign(Object.assign({}, exports.BaseProps), { a
390
380
  enum: exports.containerSizesArray,
391
381
  }, resetPaddings: {
392
382
  type: 'boolean',
393
- }, blockName: {
394
- type: 'string',
395
383
  } });
396
384
  exports.TitleProps = {
397
385
  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';
@@ -9,6 +9,7 @@ tslib_1.__exportStar(require("../../sub-blocks/NewsCard/schema"), exports);
9
9
  tslib_1.__exportStar(require("../../sub-blocks/Partner/schema"), exports);
10
10
  tslib_1.__exportStar(require("../../sub-blocks/TutorialCard/schema"), exports);
11
11
  tslib_1.__exportStar(require("../../sub-blocks/CardWithImage/schema"), exports);
12
+ tslib_1.__exportStar(require("../../sub-blocks/LayoutItem/schema"), exports);
12
13
  tslib_1.__exportStar(require("../../sub-blocks/Quote/schema"), exports);
13
14
  tslib_1.__exportStar(require("../../sub-blocks/Divider/schema"), exports);
14
15
  tslib_1.__exportStar(require("../../sub-blocks/BasicCard/schema"), exports);
@@ -4,12 +4,11 @@ const tslib_1 = require("tslib");
4
4
  const react_1 = tslib_1.__importStar(require("react"));
5
5
  const utils_1 = require("../../utils");
6
6
  const components_1 = require("../../components/");
7
- const models_1 = require("../../models");
8
7
  const Content_1 = tslib_1.__importDefault(require("../Content/Content"));
9
8
  const ThemeValueContext_1 = require("../../context/theme/ThemeValueContext");
10
9
  const b = (0, utils_1.block)('background-card');
11
10
  const BackgroundCard = (props) => {
12
- const { url, title, text, border, background, paddingBottom, backgroundColor, additionalInfo, theme: cardTheme = 'default', links, buttons, blockName = models_1.SubBlockType.BackgroundCard, } = props;
11
+ const { url, title, text, border, background, paddingBottom, backgroundColor, additionalInfo, theme: cardTheme = 'default', links, buttons, } = props;
13
12
  const { themeValue: theme } = (0, react_1.useContext)(ThemeValueContext_1.ThemeValueContext);
14
13
  const hasBackgroundColor = backgroundColor || cardTheme !== 'default';
15
14
  const link = hasBackgroundColor || border === 'line' ? undefined : url;
@@ -17,6 +16,6 @@ const BackgroundCard = (props) => {
17
16
  return (react_1.default.createElement(components_1.CardBase, { className: b({ padding: paddingBottom, theme: cardTheme }), url: link, border: borderType },
18
17
  react_1.default.createElement(components_1.CardBase.Content, null,
19
18
  react_1.default.createElement(components_1.BackgroundImage, Object.assign({ className: b('image') }, (0, utils_1.getThemedValue)(background, theme), { style: { backgroundColor } })),
20
- react_1.default.createElement(Content_1.default, { title: title, text: text, additionalInfo: additionalInfo, size: "s", theme: cardTheme, links: links, buttons: buttons, colSizes: { all: 12, md: 12 }, blockName: blockName }))));
19
+ react_1.default.createElement(Content_1.default, { title: title, text: text, additionalInfo: additionalInfo, size: "s", theme: cardTheme, links: links, buttons: buttons, colSizes: { all: 12, md: 12 } }))));
21
20
  };
22
21
  exports.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;
@@ -18,8 +18,6 @@ exports.BackgroundCard = {
18
18
  }, paddingBottom: {
19
19
  type: 'string',
20
20
  enum: ['s', 'm', 'l', 'xl'],
21
- }, blockName: {
22
- type: 'string',
23
21
  } }),
24
22
  },
25
23
  };
@@ -4,12 +4,11 @@ exports.BannerCard = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const react_1 = tslib_1.__importStar(require("react"));
6
6
  const utils_1 = require("../../utils");
7
- const models_1 = require("../../models");
8
7
  const components_1 = require("../../components");
9
8
  const ThemeValueContext_1 = require("../../context/theme/ThemeValueContext");
10
9
  const b = (0, utils_1.block)('banner-card');
11
10
  const BannerCard = (props) => {
12
- const { title, subtitle, button: { url, text, target }, color, theme: textTheme = 'light', image, disableCompress, blockName = models_1.SubBlockType.BannerCard, } = props;
11
+ const { title, subtitle, button: { url, text, target }, color, theme: textTheme = 'light', image, disableCompress, } = props;
13
12
  const { themeValue: theme } = (0, react_1.useContext)(ThemeValueContext_1.ThemeValueContext);
14
13
  const contentStyle = {};
15
14
  if (color) {
@@ -22,7 +21,7 @@ const BannerCard = (props) => {
22
21
  react_1.default.createElement("h2", { className: b('title') },
23
22
  react_1.default.createElement(components_1.HTML, null, title)),
24
23
  subtitle && (react_1.default.createElement(components_1.YFMWrapper, { className: b('subtitle'), content: subtitle, modifiers: { constructor: true } }))),
25
- react_1.default.createElement(components_1.Button, { className: b('button'), theme: "raised", size: "xl", text: text, url: url, target: target, blockName: blockName })),
24
+ react_1.default.createElement(components_1.Button, { className: b('button'), theme: "raised", size: "xl", text: text, url: url, target: target })),
26
25
  react_1.default.createElement(components_1.BackgroundImage, { className: b('image'), src: (0, utils_1.getThemedValue)(image, theme), disableCompress: disableCompress }))));
27
26
  };
28
27
  exports.BannerCard = BannerCard;
@@ -4,17 +4,16 @@ const tslib_1 = require("tslib");
4
4
  const react_1 = tslib_1.__importDefault(require("react"));
5
5
  const utils_1 = require("../../utils");
6
6
  const CardBase_1 = tslib_1.__importDefault(require("../../components/CardBase/CardBase"));
7
- const models_1 = require("../../models");
8
7
  const Image_1 = tslib_1.__importDefault(require("../../components/Image/Image"));
9
8
  const __1 = require("../");
10
9
  const utils_2 = require("../../components/Media/Image/utils");
11
10
  const b = (0, utils_1.block)('basic-card');
12
11
  const BasicCard = (props) => {
13
- const { url, title, text, border, icon, additionalInfo, links, buttons, blockName = models_1.SubBlockType.BasicCard, } = props;
12
+ const { url, title, text, border, icon, additionalInfo, links, buttons } = props;
14
13
  const iconProps = icon && (0, utils_2.getMediaImage)(icon);
15
14
  return (react_1.default.createElement(CardBase_1.default, { className: b(), url: url, border: border },
16
15
  react_1.default.createElement(CardBase_1.default.Content, null,
17
16
  iconProps && react_1.default.createElement(Image_1.default, Object.assign({}, iconProps, { className: b('icon') })),
18
- react_1.default.createElement(__1.Content, { title: title, text: text, additionalInfo: additionalInfo, links: links, buttons: buttons, colSizes: { all: 12, md: 12 }, size: "s", blockName: blockName }))));
17
+ react_1.default.createElement(__1.Content, { title: title, text: text, additionalInfo: additionalInfo, links: links, buttons: buttons, colSizes: { all: 12, md: 12 }, size: "s" }))));
19
18
  };
20
19
  exports.default = BasicCard;
@@ -1,3 +1,3 @@
1
1
  import { CardWithImageProps } from '../../models';
2
- declare const CardWithImage: ({ title, description, image, disableCompress, links, border, fullScreen, className, additionalInfo, buttons, blockName, }: CardWithImageProps) => JSX.Element;
2
+ declare const CardWithImage: ({ title, description, image, disableCompress, links, border, fullScreen, className, additionalInfo, buttons, }: CardWithImageProps) => JSX.Element;
3
3
  export default CardWithImage;
@@ -3,15 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const react_1 = tslib_1.__importDefault(require("react"));
5
5
  const utils_1 = require("../../utils");
6
- const models_1 = require("../../models");
7
6
  const components_1 = require("../../components");
8
7
  const __1 = require("../");
9
8
  const b = (0, utils_1.block)('card-with-image');
10
- const CardWithImage = ({ title, description, image, disableCompress, links, border, fullScreen, className, additionalInfo, buttons, blockName = models_1.SubBlockType.CardWithImage, }) => {
9
+ const CardWithImage = ({ title, description, image, disableCompress, links, border, fullScreen, className, additionalInfo, buttons, }) => {
11
10
  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 })));
12
11
  return (react_1.default.createElement("div", { className: b(null, className) },
13
12
  react_1.default.createElement("div", { className: b('image', { border }) }, fullScreen ? (react_1.default.createElement(components_1.FullscreenImage, { src: image, imageClassName: b('image-item'), disableCompress: disableCompress })) : (react_1.default.createElement(components_1.Image, { className: b('image-item'), src: image, alt: 'card-image', disableCompress: disableCompress }))),
14
13
  react_1.default.createElement("div", { className: b('content') },
15
- react_1.default.createElement(__1.Content, { title: title, text: description, links: unifiedLinks, additionalInfo: additionalInfo, buttons: buttons, size: "s", colSizes: { all: 12, md: 12 }, blockName: blockName }))));
14
+ react_1.default.createElement(__1.Content, { title: title, text: description, links: unifiedLinks, additionalInfo: additionalInfo, buttons: buttons, size: "s", colSizes: { all: 12, md: 12 } }))));
16
15
  };
17
16
  exports.default = CardWithImage;
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const react_1 = tslib_1.__importDefault(require("react"));
5
5
  const utils_1 = require("../../utils");
6
- const models_1 = require("../../models");
7
6
  const components_1 = require("../../components");
8
7
  const Link_1 = tslib_1.__importDefault(require("../../components/Link/Link"));
9
8
  const grid_1 = require("../../grid");
@@ -36,7 +35,7 @@ function getButtonSize(size) {
36
35
  }
37
36
  }
38
37
  const Content = (props) => {
39
- const { title, text, additionalInfo, size = 'l', links, buttons, colSizes = { all: 12, sm: 8 }, centered, theme, className, blockName = models_1.SubBlockType.Content, } = props;
38
+ const { title, text, additionalInfo, size = 'l', links, buttons, colSizes = { all: 12, sm: 8 }, centered, theme, className, } = props;
40
39
  const titleProps = tslib_1.__rest(!title || typeof title === 'string'
41
40
  ? { text: title, textSize: getTextSize(size) }
42
41
  : title, []);
@@ -51,7 +50,7 @@ const Content = (props) => {
51
50
  'constructor-notice': true,
52
51
  [`constructor-size-${size}`]: true,
53
52
  } }))),
54
- links && (react_1.default.createElement("div", { className: b('links') }, links.map((link) => (react_1.default.createElement(Link_1.default, Object.assign({ className: b('link') }, link, { textSize: getLinkSize(size), key: link.url, blockName: blockName })))))),
55
- buttons && (react_1.default.createElement("div", { className: b('buttons') }, buttons.map((item) => (react_1.default.createElement(components_1.Button, Object.assign({ className: b('button') }, item, { key: item.url, size: getButtonSize(size), blockName: blockName }))))))));
53
+ links && (react_1.default.createElement("div", { className: b('links') }, links.map((link) => (react_1.default.createElement(Link_1.default, Object.assign({ className: b('link') }, link, { textSize: getLinkSize(size), key: link.url })))))),
54
+ buttons && (react_1.default.createElement("div", { className: b('buttons') }, buttons.map((item) => (react_1.default.createElement(components_1.Button, Object.assign({ className: b('button') }, item, { key: item.url, size: getButtonSize(size) }))))))));
56
55
  };
57
56
  exports.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;
@@ -6,21 +6,14 @@ const utils_1 = require("../../utils");
6
6
  const ThemeValueContext_1 = require("../../context/theme/ThemeValueContext");
7
7
  const mobileContext_1 = require("../../context/mobileContext");
8
8
  const useMetrika_1 = require("../../hooks/useMetrika");
9
- const models_1 = require("../../models");
10
9
  const hooks_1 = require("../../hooks");
11
10
  const HubspotFormContainer_1 = tslib_1.__importDefault(require("./HubspotFormContainer"));
12
- const constants_1 = require("../../constants");
13
11
  const b = (0, utils_1.block)('hubspot-form');
14
12
  const HubspotForm = (props) => {
15
13
  const { className, theme: themeProp, isMobile: isMobileProp, formId, formInstanceId, portalId, region, formClassName, pixelEvents,
16
14
  // hubspotEvents, // TODO: decide how to handle them
17
- analyticsEvents, onBeforeSubmit, onSubmit, onBeforeLoad, onLoad, blockName = models_1.SubBlockType.HubspotForm, } = props;
15
+ onBeforeSubmit, onSubmit, onBeforeLoad, onLoad, onSubmitError, } = props;
18
16
  const handleMetrika = (0, useMetrika_1.useMetrika)();
19
- const handleAnalytics = (0, hooks_1.useAnalytics)({
20
- name: 'hubspot-form-submit',
21
- type: constants_1.DEFAULT_EVENT_TYPE,
22
- blockName: blockName,
23
- });
24
17
  const { themeValue } = (0, react_1.useContext)(ThemeValueContext_1.ThemeValueContext);
25
18
  const isMobileValue = (0, react_1.useContext)(mobileContext_1.MobileContext);
26
19
  const theme = themeProp !== null && themeProp !== void 0 ? themeProp : themeValue;
@@ -29,21 +22,12 @@ const HubspotForm = (props) => {
29
22
  onBeforeLoad,
30
23
  onBeforeSubmit,
31
24
  onLoad,
25
+ onSubmitError,
32
26
  onSubmit: (e) => {
33
27
  handleMetrika === null || handleMetrika === void 0 ? void 0 : handleMetrika({ pixelEvents });
34
- handleAnalytics === null || handleAnalytics === void 0 ? void 0 : handleAnalytics(analyticsEvents);
35
28
  onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit(e);
36
29
  },
37
- }), [
38
- onBeforeLoad,
39
- onBeforeSubmit,
40
- onLoad,
41
- handleMetrika,
42
- pixelEvents,
43
- handleAnalytics,
44
- analyticsEvents,
45
- onSubmit,
46
- ]);
30
+ }), [onBeforeLoad, onBeforeSubmit, onLoad, handleMetrika, pixelEvents, onSubmit, onSubmitError]);
47
31
  (0, hooks_1.useHandleHubspotEvents)(handlers, formId);
48
32
  return (react_1.default.createElement(HubspotFormContainer_1.default, { key: [formClassName, formId, formInstanceId, portalId, region].join(), className: b({ theme, mobile }, className), formClassName: formClassName, formId: formId, portalId: portalId, formInstanceId: formInstanceId, region: region }));
49
33
  };
@@ -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,3 @@
1
+ import { LayoutItemProps } from '../../models';
2
+ declare const LayoutItem: ({ content: { links, ...content }, metaInfo, media, border, fullScreen, className, }: LayoutItemProps) => JSX.Element;
3
+ export default LayoutItem;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const react_1 = tslib_1.__importDefault(require("react"));
5
+ const utils_1 = require("../../utils");
6
+ const components_1 = require("../../components");
7
+ const utils_2 = require("./utils");
8
+ const __1 = require("..");
9
+ const b = (0, utils_1.block)('layout-item');
10
+ const LayoutItem = (_a) => {
11
+ var _b = _a.content, { links } = _b, content = tslib_1.__rest(_b, ["links"]), { metaInfo, media, border, fullScreen, className } = _a;
12
+ return (react_1.default.createElement("div", { className: b(null, className) },
13
+ fullScreen && (0, utils_2.hasFullScreen)(media) ? (react_1.default.createElement(components_1.FullScreenMedia, { showFullScreenIcon: (0, utils_2.showFullScreenIcon)(media) }, (_a = {}) => {
14
+ var { className: mediaClassName } = _a, fullScreenMediaProps = tslib_1.__rest(_a, ["className"]);
15
+ return (react_1.default.createElement(components_1.Media, Object.assign({}, media, fullScreenMediaProps, { className: b('media', { border }, mediaClassName) })));
16
+ })) : (react_1.default.createElement(components_1.Media, Object.assign({}, media, { className: b('media', { border }) }))),
17
+ metaInfo && react_1.default.createElement(components_1.MetaInfo, { items: metaInfo, className: b('meta-info') }),
18
+ react_1.default.createElement("div", { className: b('content') },
19
+ react_1.default.createElement(__1.Content, Object.assign({}, content, { links: (0, utils_2.getLayoutItemLinks)(links), size: "s", colSizes: { all: 12, md: 12 } })))));
20
+ };
21
+ exports.default = LayoutItem;