@gravity-ui/page-constructor 4.51.2-alpha.0 → 4.53.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 (264) hide show
  1. package/README.md +3 -5
  2. package/build/cjs/blocks/Banner/schema.d.ts +264 -0
  3. package/build/cjs/blocks/ExtendedFeatures/ExtendedFeatures.js +2 -2
  4. package/build/cjs/blocks/FilterBlock/FilterBlock.js +2 -2
  5. package/build/cjs/blocks/FilterBlock/i18n/index.d.ts +2 -1
  6. package/build/cjs/blocks/FilterBlock/i18n/index.js +3 -4
  7. package/build/cjs/blocks/Map/schema.d.ts +88 -0
  8. package/build/cjs/blocks/Media/schema.d.ts +176 -0
  9. package/build/cjs/blocks/Security/i18n/index.d.ts +2 -1
  10. package/build/cjs/blocks/Security/i18n/index.js +3 -4
  11. package/build/cjs/blocks/Share/Share.js +4 -4
  12. package/build/cjs/blocks/Share/i18n/index.d.ts +2 -1
  13. package/build/cjs/blocks/Share/i18n/index.js +3 -4
  14. package/build/cjs/blocks/Slider/Arrow/Arrow.js +2 -2
  15. package/build/cjs/blocks/Slider/i18n/index.d.ts +2 -1
  16. package/build/cjs/blocks/Slider/i18n/index.js +3 -4
  17. package/build/cjs/components/Button/Button.js +7 -4
  18. package/build/cjs/components/Button/i18n/index.d.ts +2 -1
  19. package/build/cjs/components/Button/i18n/index.js +3 -4
  20. package/build/cjs/components/CardBase/CardBase.d.ts +3 -1
  21. package/build/cjs/components/CardBase/CardBase.js +4 -1
  22. package/build/cjs/components/Control/Control.js +2 -2
  23. package/build/cjs/components/Control/i18n/index.d.ts +2 -1
  24. package/build/cjs/components/Control/i18n/index.js +3 -4
  25. package/build/cjs/components/FullscreenImage/FullscreenImage.js +3 -3
  26. package/build/cjs/components/FullscreenImage/i18n/index.d.ts +2 -1
  27. package/build/cjs/components/FullscreenImage/i18n/index.js +3 -4
  28. package/build/cjs/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +6 -3
  29. package/build/cjs/components/Link/Link.js +4 -1
  30. package/build/cjs/components/Map/GoogleMap.js +2 -2
  31. package/build/cjs/components/Map/YMap/YandexMap.js +2 -2
  32. package/build/cjs/components/Map/YMap/i18n/index.d.ts +2 -1
  33. package/build/cjs/components/Map/YMap/i18n/index.js +3 -4
  34. package/build/cjs/components/Media/DataLens/DataLens.js +2 -2
  35. package/build/cjs/components/Media/DataLens/i18n/index.d.ts +2 -1
  36. package/build/cjs/components/Media/DataLens/i18n/index.js +3 -4
  37. package/build/cjs/components/Media/Iframe/Iframe.js +2 -2
  38. package/build/cjs/components/Media/Iframe/i18n/index.d.ts +2 -1
  39. package/build/cjs/components/Media/Iframe/i18n/index.js +3 -4
  40. package/build/cjs/components/Media/Media.js +3 -1
  41. package/build/cjs/components/Media/Video/Video.js +3 -2
  42. package/build/cjs/components/OverflowScroller/OverflowScroller.js +2 -2
  43. package/build/cjs/components/OverflowScroller/i18n/index.d.ts +2 -1
  44. package/build/cjs/components/OverflowScroller/i18n/index.js +3 -4
  45. package/build/cjs/components/ReactPlayer/CustomBarControls.js +3 -3
  46. package/build/cjs/components/ReactPlayer/ReactPlayer.js +38 -6
  47. package/build/cjs/components/ReactPlayer/i18n/index.d.ts +2 -1
  48. package/build/cjs/components/ReactPlayer/i18n/index.js +3 -4
  49. package/build/cjs/components/ReactPlayer/utils/youtube.d.ts +2 -0
  50. package/build/cjs/components/ReactPlayer/utils/youtube.js +7 -0
  51. package/build/cjs/components/UnpublishedLabel/UnpublishedLabel.js +2 -2
  52. package/build/cjs/components/UnpublishedLabel/i18n/index.d.ts +2 -1
  53. package/build/cjs/components/UnpublishedLabel/i18n/index.js +3 -4
  54. package/build/cjs/components/VideoBlock/VideoBlock.js +2 -2
  55. package/build/cjs/components/VideoBlock/i18n/index.d.ts +2 -1
  56. package/build/cjs/components/VideoBlock/i18n/index.js +3 -4
  57. package/build/cjs/components/YandexForm/YandexForm.js +13 -2
  58. package/build/cjs/constructor-items.d.ts +1 -0
  59. package/build/cjs/constructor-items.js +1 -0
  60. package/build/cjs/containers/Loadable/Loadable.js +2 -2
  61. package/build/cjs/containers/Loadable/i18n/index.d.ts +2 -1
  62. package/build/cjs/containers/Loadable/i18n/index.js +3 -4
  63. package/build/cjs/containers/PageConstructor/Provider.d.ts +2 -0
  64. package/build/cjs/containers/PageConstructor/Provider.js +3 -1
  65. package/build/cjs/context/localeContext/localeContext.d.ts +2 -2
  66. package/build/cjs/context/localeContext/localeContext.js +2 -2
  67. package/build/cjs/context/metrikaContext/index.d.ts +1 -0
  68. package/build/cjs/context/metrikaContext/index.js +4 -0
  69. package/build/cjs/context/metrikaContext/metrikaContext.d.ts +13 -0
  70. package/build/cjs/context/metrikaContext/metrikaContext.js +6 -0
  71. package/build/cjs/editor/components/ControlPanel/ControlPanel.js +3 -3
  72. package/build/cjs/editor/components/ControlPanel/i18n/en.json +1 -2
  73. package/build/cjs/editor/components/ControlPanel/i18n/index.d.ts +2 -1
  74. package/build/cjs/editor/components/ControlPanel/i18n/index.js +3 -4
  75. package/build/cjs/editor/components/ControlPanel/i18n/ru.json +1 -2
  76. package/build/cjs/editor/components/ErrorBoundary/ErrorBoundary.js +3 -3
  77. package/build/cjs/editor/components/ErrorBoundary/i18n/index.d.ts +2 -1
  78. package/build/cjs/editor/components/ErrorBoundary/i18n/index.js +3 -4
  79. package/build/cjs/editor/components/NotFoundBlock/NotFoundBlock.js +2 -2
  80. package/build/cjs/editor/components/NotFoundBlock/i18n/index.d.ts +2 -1
  81. package/build/cjs/editor/components/NotFoundBlock/i18n/index.js +3 -4
  82. package/build/cjs/hooks/useAnalytics.d.ts +2 -2
  83. package/build/cjs/hooks/useMetrika.d.ts +13 -1
  84. package/build/cjs/hooks/useMetrika.js +41 -0
  85. package/build/cjs/i18n.d.ts +2 -0
  86. package/build/cjs/i18n.js +12 -0
  87. package/build/cjs/models/common.d.ts +53 -2
  88. package/build/cjs/models/common.js +25 -1
  89. package/build/cjs/models/constructor-items/common.d.ts +29 -2
  90. package/build/cjs/models/constructor-items/sub-blocks.d.ts +20 -4
  91. package/build/cjs/models/constructor-items/sub-blocks.js +7 -1
  92. package/build/cjs/models/guards.d.ts +2 -0
  93. package/build/cjs/models/guards.js +5 -1
  94. package/build/cjs/schema/constants.d.ts +252 -0
  95. package/build/cjs/schema/constants.js +2 -1
  96. package/build/cjs/schema/validators/common.d.ts +188 -0
  97. package/build/cjs/schema/validators/common.js +31 -0
  98. package/build/cjs/schema/validators/index.d.ts +2 -0
  99. package/build/cjs/schema/validators/index.js +2 -0
  100. package/build/cjs/schema/validators/pixel.d.ts +57 -0
  101. package/build/cjs/schema/validators/pixel.js +63 -0
  102. package/build/cjs/schema/validators/sub-blocks.d.ts +1 -0
  103. package/build/cjs/schema/validators/sub-blocks.js +1 -0
  104. package/build/cjs/sub-blocks/BasicCard/BasicCard.js +2 -2
  105. package/build/cjs/sub-blocks/HubspotForm/index.js +6 -1
  106. package/build/cjs/sub-blocks/ImageCard/ImageCard.css +59 -0
  107. package/build/cjs/sub-blocks/ImageCard/ImageCard.d.ts +3 -0
  108. package/build/cjs/sub-blocks/ImageCard/ImageCard.js +21 -0
  109. package/build/cjs/sub-blocks/ImageCard/schema.d.ts +78 -0
  110. package/build/cjs/sub-blocks/ImageCard/schema.js +24 -0
  111. package/build/cjs/sub-blocks/LayoutItem/utils.d.ts +15 -1
  112. package/build/cjs/sub-blocks/PriceCard/schema.d.ts +88 -0
  113. package/build/cjs/sub-blocks/index.d.ts +1 -0
  114. package/build/cjs/sub-blocks/index.js +3 -1
  115. package/build/cjs/text-transform/common.d.ts +4 -4
  116. package/build/cjs/text-transform/transformers.d.ts +2 -2
  117. package/build/cjs/text-transform/utils.d.ts +6 -6
  118. package/build/cjs/text-transform/utils.js +5 -5
  119. package/build/cjs/utils/configure.d.ts +12 -0
  120. package/build/cjs/utils/configure.js +26 -0
  121. package/build/cjs/utils/index.d.ts +1 -0
  122. package/build/cjs/utils/index.js +4 -1
  123. package/build/cjs/utils/registerKeyset.d.ts +5 -0
  124. package/build/cjs/utils/registerKeyset.js +9 -0
  125. package/build/esm/blocks/Banner/schema.d.ts +264 -0
  126. package/build/esm/blocks/ExtendedFeatures/ExtendedFeatures.js +2 -2
  127. package/build/esm/blocks/FilterBlock/FilterBlock.js +1 -1
  128. package/build/esm/blocks/FilterBlock/i18n/index.d.ts +2 -1
  129. package/build/esm/blocks/FilterBlock/i18n/index.js +3 -3
  130. package/build/esm/blocks/Map/schema.d.ts +88 -0
  131. package/build/esm/blocks/Media/schema.d.ts +176 -0
  132. package/build/esm/blocks/Security/i18n/index.d.ts +2 -1
  133. package/build/esm/blocks/Security/i18n/index.js +3 -3
  134. package/build/esm/blocks/Share/Share.js +1 -1
  135. package/build/esm/blocks/Share/i18n/index.d.ts +2 -1
  136. package/build/esm/blocks/Share/i18n/index.js +3 -3
  137. package/build/esm/blocks/Slider/Arrow/Arrow.js +1 -1
  138. package/build/esm/blocks/Slider/i18n/index.d.ts +2 -1
  139. package/build/esm/blocks/Slider/i18n/index.js +3 -3
  140. package/build/esm/components/Button/Button.js +6 -3
  141. package/build/esm/components/Button/i18n/index.d.ts +2 -1
  142. package/build/esm/components/Button/i18n/index.js +3 -3
  143. package/build/esm/components/CardBase/CardBase.d.ts +3 -1
  144. package/build/esm/components/CardBase/CardBase.js +4 -1
  145. package/build/esm/components/Control/Control.js +1 -1
  146. package/build/esm/components/Control/i18n/index.d.ts +2 -1
  147. package/build/esm/components/Control/i18n/index.js +3 -3
  148. package/build/esm/components/FullscreenImage/FullscreenImage.js +1 -1
  149. package/build/esm/components/FullscreenImage/i18n/index.d.ts +2 -1
  150. package/build/esm/components/FullscreenImage/i18n/index.js +3 -3
  151. package/build/esm/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +6 -3
  152. package/build/esm/components/Link/Link.js +4 -1
  153. package/build/esm/components/Map/GoogleMap.js +1 -1
  154. package/build/esm/components/Map/YMap/YandexMap.js +1 -1
  155. package/build/esm/components/Map/YMap/i18n/index.d.ts +2 -1
  156. package/build/esm/components/Map/YMap/i18n/index.js +3 -3
  157. package/build/esm/components/Media/DataLens/DataLens.js +1 -1
  158. package/build/esm/components/Media/DataLens/i18n/index.d.ts +2 -1
  159. package/build/esm/components/Media/DataLens/i18n/index.js +3 -3
  160. package/build/esm/components/Media/Iframe/Iframe.js +1 -1
  161. package/build/esm/components/Media/Iframe/i18n/index.d.ts +2 -1
  162. package/build/esm/components/Media/Iframe/i18n/index.js +3 -3
  163. package/build/esm/components/Media/Media.js +3 -1
  164. package/build/esm/components/Media/Video/Video.js +3 -2
  165. package/build/esm/components/OverflowScroller/OverflowScroller.js +1 -1
  166. package/build/esm/components/OverflowScroller/i18n/index.d.ts +2 -1
  167. package/build/esm/components/OverflowScroller/i18n/index.js +3 -3
  168. package/build/esm/components/ReactPlayer/CustomBarControls.js +1 -1
  169. package/build/esm/components/ReactPlayer/ReactPlayer.js +37 -5
  170. package/build/esm/components/ReactPlayer/i18n/index.d.ts +2 -1
  171. package/build/esm/components/ReactPlayer/i18n/index.js +3 -3
  172. package/build/esm/components/ReactPlayer/utils/youtube.d.ts +2 -0
  173. package/build/esm/components/ReactPlayer/utils/youtube.js +3 -0
  174. package/build/esm/components/UnpublishedLabel/UnpublishedLabel.js +1 -1
  175. package/build/esm/components/UnpublishedLabel/i18n/index.d.ts +2 -1
  176. package/build/esm/components/UnpublishedLabel/i18n/index.js +3 -3
  177. package/build/esm/components/VideoBlock/VideoBlock.js +1 -1
  178. package/build/esm/components/VideoBlock/i18n/index.d.ts +2 -1
  179. package/build/esm/components/VideoBlock/i18n/index.js +3 -3
  180. package/build/esm/components/YandexForm/YandexForm.js +13 -2
  181. package/build/esm/constructor-items.d.ts +1 -0
  182. package/build/esm/constructor-items.js +2 -1
  183. package/build/esm/containers/Loadable/Loadable.js +1 -1
  184. package/build/esm/containers/Loadable/i18n/index.d.ts +2 -1
  185. package/build/esm/containers/Loadable/i18n/index.js +3 -3
  186. package/build/esm/containers/PageConstructor/Provider.d.ts +2 -0
  187. package/build/esm/containers/PageConstructor/Provider.js +3 -1
  188. package/build/esm/context/localeContext/localeContext.d.ts +2 -2
  189. package/build/esm/context/localeContext/localeContext.js +1 -1
  190. package/build/esm/context/metrikaContext/index.d.ts +1 -0
  191. package/build/esm/context/metrikaContext/index.js +1 -0
  192. package/build/esm/context/metrikaContext/metrikaContext.d.ts +13 -0
  193. package/build/esm/context/metrikaContext/metrikaContext.js +2 -0
  194. package/build/esm/editor/components/ControlPanel/ControlPanel.js +2 -2
  195. package/build/esm/editor/components/ControlPanel/i18n/en.json +1 -2
  196. package/build/esm/editor/components/ControlPanel/i18n/index.d.ts +2 -1
  197. package/build/esm/editor/components/ControlPanel/i18n/index.js +3 -3
  198. package/build/esm/editor/components/ControlPanel/i18n/ru.json +1 -2
  199. package/build/esm/editor/components/ErrorBoundary/ErrorBoundary.js +1 -1
  200. package/build/esm/editor/components/ErrorBoundary/i18n/index.d.ts +2 -1
  201. package/build/esm/editor/components/ErrorBoundary/i18n/index.js +3 -3
  202. package/build/esm/editor/components/NotFoundBlock/NotFoundBlock.js +1 -1
  203. package/build/esm/editor/components/NotFoundBlock/i18n/index.d.ts +2 -1
  204. package/build/esm/editor/components/NotFoundBlock/i18n/index.js +3 -3
  205. package/build/esm/hooks/useAnalytics.d.ts +2 -2
  206. package/build/esm/hooks/useMetrika.d.ts +13 -1
  207. package/build/esm/hooks/useMetrika.js +38 -1
  208. package/build/esm/i18n.d.ts +2 -0
  209. package/build/esm/i18n.js +9 -0
  210. package/build/esm/models/common.d.ts +53 -2
  211. package/build/esm/models/common.js +24 -0
  212. package/build/esm/models/constructor-items/common.d.ts +29 -2
  213. package/build/esm/models/constructor-items/sub-blocks.d.ts +20 -4
  214. package/build/esm/models/constructor-items/sub-blocks.js +6 -0
  215. package/build/esm/models/guards.d.ts +2 -0
  216. package/build/esm/models/guards.js +3 -0
  217. package/build/esm/schema/constants.d.ts +252 -0
  218. package/build/esm/schema/constants.js +3 -2
  219. package/build/esm/schema/validators/common.d.ts +188 -0
  220. package/build/esm/schema/validators/common.js +31 -0
  221. package/build/esm/schema/validators/index.d.ts +2 -0
  222. package/build/esm/schema/validators/index.js +2 -0
  223. package/build/esm/schema/validators/pixel.d.ts +57 -0
  224. package/build/esm/schema/validators/pixel.js +60 -0
  225. package/build/esm/schema/validators/sub-blocks.d.ts +1 -0
  226. package/build/esm/schema/validators/sub-blocks.js +1 -0
  227. package/build/esm/sub-blocks/BasicCard/BasicCard.js +2 -2
  228. package/build/esm/sub-blocks/HubspotForm/index.js +6 -1
  229. package/build/esm/sub-blocks/ImageCard/ImageCard.css +59 -0
  230. package/build/esm/sub-blocks/ImageCard/ImageCard.d.ts +4 -0
  231. package/build/esm/sub-blocks/ImageCard/ImageCard.js +19 -0
  232. package/build/esm/sub-blocks/ImageCard/schema.d.ts +78 -0
  233. package/build/esm/sub-blocks/ImageCard/schema.js +20 -0
  234. package/build/esm/sub-blocks/LayoutItem/utils.d.ts +15 -1
  235. package/build/esm/sub-blocks/PriceCard/schema.d.ts +88 -0
  236. package/build/esm/sub-blocks/index.d.ts +1 -0
  237. package/build/esm/sub-blocks/index.js +1 -0
  238. package/build/esm/text-transform/common.d.ts +4 -4
  239. package/build/esm/text-transform/transformers.d.ts +2 -2
  240. package/build/esm/text-transform/utils.d.ts +6 -6
  241. package/build/esm/text-transform/utils.js +1 -1
  242. package/build/esm/utils/configure.d.ts +12 -0
  243. package/build/esm/utils/configure.js +20 -0
  244. package/build/esm/utils/index.d.ts +1 -0
  245. package/build/esm/utils/index.js +1 -0
  246. package/build/esm/utils/registerKeyset.d.ts +5 -0
  247. package/build/esm/utils/registerKeyset.js +5 -0
  248. package/package.json +2 -1
  249. package/server/models/common.d.ts +53 -2
  250. package/server/models/common.js +25 -1
  251. package/server/models/constructor-items/common.d.ts +29 -2
  252. package/server/models/constructor-items/sub-blocks.d.ts +20 -4
  253. package/server/models/constructor-items/sub-blocks.js +7 -1
  254. package/server/models/guards.d.ts +2 -0
  255. package/server/models/guards.js +5 -1
  256. package/server/text-transform/common.d.ts +4 -4
  257. package/server/text-transform/transformers.d.ts +2 -2
  258. package/server/text-transform/utils.d.ts +6 -6
  259. package/server/text-transform/utils.js +5 -5
  260. package/server/utils/configure.d.ts +12 -0
  261. package/server/utils/configure.js +26 -0
  262. package/server/utils/index.d.ts +1 -0
  263. package/server/utils/index.js +4 -1
  264. package/widget/index.js +1 -1
@@ -590,6 +590,100 @@ export declare const ButtonProps: {
590
590
  optionName: string;
591
591
  })[];
592
592
  };
593
+ /**
594
+ * @deprecated Metrika will be deleted
595
+ */
596
+ metrikaGoals: {
597
+ oneOf: ({
598
+ type: string;
599
+ optionName: string;
600
+ items?: undefined;
601
+ } | {
602
+ type: string;
603
+ items: {
604
+ type: string;
605
+ additionalProperties?: undefined;
606
+ required?: undefined;
607
+ properties?: undefined;
608
+ };
609
+ optionName: string;
610
+ } | {
611
+ type: string;
612
+ items: {
613
+ type: string;
614
+ additionalProperties: boolean;
615
+ required: string[];
616
+ properties: {
617
+ name: {
618
+ type: string;
619
+ };
620
+ isCrossSite: {
621
+ type: string;
622
+ };
623
+ };
624
+ };
625
+ optionName: string;
626
+ })[];
627
+ };
628
+ /**
629
+ * @deprecated Pixel will be deleted
630
+ */
631
+ pixelEvents: {
632
+ type: string;
633
+ items: {
634
+ type: string;
635
+ required: string[];
636
+ additionalProperties: boolean;
637
+ properties: {
638
+ name: {
639
+ type: string;
640
+ enum: import("../../models").PixelEventType[];
641
+ };
642
+ data: {};
643
+ };
644
+ select: {
645
+ $data: string;
646
+ };
647
+ selectCases: {
648
+ SubmitApplication: {
649
+ additionalProperties: boolean;
650
+ properties: {
651
+ name: {};
652
+ };
653
+ };
654
+ Contact: {
655
+ additionalProperties: boolean;
656
+ properties: {
657
+ name: {};
658
+ };
659
+ };
660
+ Lead: {
661
+ additionalProperties: boolean;
662
+ properties: {
663
+ name: {};
664
+ data: {
665
+ type: string;
666
+ additionalProperties: boolean;
667
+ properties: {
668
+ content_category: {
669
+ type: string;
670
+ };
671
+ content_name: {
672
+ type: string;
673
+ };
674
+ currency: {
675
+ type: string;
676
+ };
677
+ value: {
678
+ type: string;
679
+ };
680
+ };
681
+ };
682
+ };
683
+ };
684
+ };
685
+ };
686
+ };
593
687
  analyticsEvents: {
594
688
  oneOf: ({
595
689
  optionName: string;
@@ -839,6 +933,100 @@ export declare const ButtonBlock: {
839
933
  optionName: string;
840
934
  })[];
841
935
  };
936
+ /**
937
+ * @deprecated Metrika will be deleted
938
+ */
939
+ metrikaGoals: {
940
+ oneOf: ({
941
+ type: string;
942
+ optionName: string;
943
+ items?: undefined;
944
+ } | {
945
+ type: string;
946
+ items: {
947
+ type: string;
948
+ additionalProperties?: undefined;
949
+ required?: undefined;
950
+ properties?: undefined;
951
+ };
952
+ optionName: string;
953
+ } | {
954
+ type: string;
955
+ items: {
956
+ type: string;
957
+ additionalProperties: boolean;
958
+ required: string[];
959
+ properties: {
960
+ name: {
961
+ type: string;
962
+ };
963
+ isCrossSite: {
964
+ type: string;
965
+ };
966
+ };
967
+ };
968
+ optionName: string;
969
+ })[];
970
+ };
971
+ /**
972
+ * @deprecated Pixel will be deleted
973
+ */
974
+ pixelEvents: {
975
+ type: string;
976
+ items: {
977
+ type: string;
978
+ required: string[];
979
+ additionalProperties: boolean;
980
+ properties: {
981
+ name: {
982
+ type: string;
983
+ enum: import("../../models").PixelEventType[];
984
+ };
985
+ data: {};
986
+ };
987
+ select: {
988
+ $data: string;
989
+ };
990
+ selectCases: {
991
+ SubmitApplication: {
992
+ additionalProperties: boolean;
993
+ properties: {
994
+ name: {};
995
+ };
996
+ };
997
+ Contact: {
998
+ additionalProperties: boolean;
999
+ properties: {
1000
+ name: {};
1001
+ };
1002
+ };
1003
+ Lead: {
1004
+ additionalProperties: boolean;
1005
+ properties: {
1006
+ name: {};
1007
+ data: {
1008
+ type: string;
1009
+ additionalProperties: boolean;
1010
+ properties: {
1011
+ content_category: {
1012
+ type: string;
1013
+ };
1014
+ content_name: {
1015
+ type: string;
1016
+ };
1017
+ currency: {
1018
+ type: string;
1019
+ };
1020
+ value: {
1021
+ type: string;
1022
+ };
1023
+ };
1024
+ };
1025
+ };
1026
+ };
1027
+ };
1028
+ };
1029
+ };
842
1030
  analyticsEvents: {
843
1031
  oneOf: ({
844
1032
  optionName: string;
@@ -1,6 +1,7 @@
1
1
  import { ImageProps } from '../../components/Image/schema';
2
2
  import { CustomControlsButtonPositioning, CustomControlsType, MediaVideoControlsType, QuoteType, Theme, } from '../../models';
3
3
  import { AnalyticsEventSchema } from './event';
4
+ import { pixelEvents } from './pixel';
4
5
  export const mediaDirection = ['media-content', 'content-media'];
5
6
  export const textSize = ['s', 'm', 'l'];
6
7
  export const containerSizesArray = ['sm', 'md', 'lg', 'xl', 'all'];
@@ -364,6 +365,36 @@ export const ButtonProps = {
364
365
  },
365
366
  ],
366
367
  },
368
+ /**
369
+ * @deprecated Metrika will be deleted
370
+ */
371
+ metrikaGoals: {
372
+ oneOf: [
373
+ { type: 'string', optionName: 'single' },
374
+ { type: 'array', items: { type: 'string' }, optionName: 'list' },
375
+ {
376
+ type: 'array',
377
+ items: {
378
+ type: 'object',
379
+ additionalProperties: false,
380
+ required: ['name'],
381
+ properties: {
382
+ name: {
383
+ type: 'string',
384
+ },
385
+ isCrossSite: {
386
+ type: 'boolean',
387
+ },
388
+ },
389
+ },
390
+ optionName: 'list-extended',
391
+ },
392
+ ],
393
+ },
394
+ /**
395
+ * @deprecated Pixel will be deleted
396
+ */
397
+ pixelEvents,
367
398
  analyticsEvents: {
368
399
  oneOf: [
369
400
  Object.assign(Object.assign({}, AnalyticsEventSchema), { optionName: 'single' }),
@@ -2,6 +2,7 @@ import * as blocks from './blocks';
2
2
  import * as common from './common';
3
3
  import * as components from './components';
4
4
  import * as navigation from './navigation';
5
+ import * as pixel from './pixel';
5
6
  import * as subBlocks from './sub-blocks';
6
7
  import * as utils from './utils';
7
8
  export declare const validators: {
@@ -9,6 +10,7 @@ export declare const validators: {
9
10
  common: typeof common;
10
11
  components: typeof components;
11
12
  subBlocks: typeof subBlocks;
13
+ pixel: typeof pixel;
12
14
  utils: typeof utils;
13
15
  navigation: typeof navigation;
14
16
  };
@@ -2,6 +2,7 @@ import * as blocks from './blocks';
2
2
  import * as common from './common';
3
3
  import * as components from './components';
4
4
  import * as navigation from './navigation';
5
+ import * as pixel from './pixel';
5
6
  import * as subBlocks from './sub-blocks';
6
7
  import * as utils from './utils';
7
8
  export const validators = {
@@ -9,6 +10,7 @@ export const validators = {
9
10
  common,
10
11
  components,
11
12
  subBlocks,
13
+ pixel,
12
14
  utils,
13
15
  navigation,
14
16
  };
@@ -0,0 +1,57 @@
1
+ import { PixelEventType } from '../../models';
2
+ export declare const pixelEvents: {
3
+ type: string;
4
+ items: {
5
+ type: string;
6
+ required: string[];
7
+ additionalProperties: boolean;
8
+ properties: {
9
+ name: {
10
+ type: string;
11
+ enum: PixelEventType[];
12
+ };
13
+ data: {};
14
+ };
15
+ select: {
16
+ $data: string;
17
+ };
18
+ selectCases: {
19
+ SubmitApplication: {
20
+ additionalProperties: boolean;
21
+ properties: {
22
+ name: {};
23
+ };
24
+ };
25
+ Contact: {
26
+ additionalProperties: boolean;
27
+ properties: {
28
+ name: {};
29
+ };
30
+ };
31
+ Lead: {
32
+ additionalProperties: boolean;
33
+ properties: {
34
+ name: {};
35
+ data: {
36
+ type: string;
37
+ additionalProperties: boolean;
38
+ properties: {
39
+ content_category: {
40
+ type: string;
41
+ };
42
+ content_name: {
43
+ type: string;
44
+ };
45
+ currency: {
46
+ type: string;
47
+ };
48
+ value: {
49
+ type: string;
50
+ };
51
+ };
52
+ };
53
+ };
54
+ };
55
+ };
56
+ };
57
+ };
@@ -0,0 +1,60 @@
1
+ import { PixelEventType } from '../../models';
2
+ const LeadData = {
3
+ Lead: {
4
+ additionalProperties: false,
5
+ properties: {
6
+ name: {},
7
+ data: {
8
+ type: 'object',
9
+ additionalProperties: false,
10
+ properties: {
11
+ content_category: {
12
+ type: 'string',
13
+ },
14
+ content_name: {
15
+ type: 'string',
16
+ },
17
+ currency: {
18
+ type: 'string',
19
+ },
20
+ value: {
21
+ type: 'number',
22
+ },
23
+ },
24
+ },
25
+ },
26
+ },
27
+ };
28
+ const ContactData = {
29
+ Contact: {
30
+ additionalProperties: false,
31
+ properties: {
32
+ name: {},
33
+ },
34
+ },
35
+ };
36
+ const SubmitApplicationData = {
37
+ SubmitApplication: {
38
+ additionalProperties: false,
39
+ properties: {
40
+ name: {},
41
+ },
42
+ },
43
+ };
44
+ export const pixelEvents = {
45
+ type: 'array',
46
+ items: {
47
+ type: 'object',
48
+ required: ['name'],
49
+ additionalProperties: false,
50
+ properties: {
51
+ name: {
52
+ type: 'string',
53
+ enum: Object.values(PixelEventType),
54
+ },
55
+ data: {},
56
+ },
57
+ select: { $data: '0/name' },
58
+ selectCases: Object.assign(Object.assign(Object.assign({}, LeadData), ContactData), SubmitApplicationData),
59
+ },
60
+ };
@@ -8,3 +8,4 @@ export * from '../../sub-blocks/Divider/schema';
8
8
  export * from '../../sub-blocks/BasicCard/schema';
9
9
  export * from '../../sub-blocks/PriceCard/schema';
10
10
  export * from '../../sub-blocks/HubspotForm/schema';
11
+ export * from '../../sub-blocks/ImageCard/schema';
@@ -8,3 +8,4 @@ export * from '../../sub-blocks/Divider/schema';
8
8
  export * from '../../sub-blocks/BasicCard/schema';
9
9
  export * from '../../sub-blocks/PriceCard/schema';
10
10
  export * from '../../sub-blocks/HubspotForm/schema';
11
+ export * from '../../sub-blocks/ImageCard/schema';
@@ -9,12 +9,12 @@ import Content from '../Content/Content';
9
9
  import './BasicCard.css';
10
10
  const b = block('basic-card');
11
11
  const BasicCard = (props) => {
12
- const { title, text, icon, additionalInfo, links, buttons, iconPosition = IconPosition.Top } = props, cardParams = __rest(props, ["title", "text", "icon", "additionalInfo", "links", "buttons", "iconPosition"]);
12
+ const { title, text, icon, additionalInfo, links, list, buttons, iconPosition = IconPosition.Top } = props, cardParams = __rest(props, ["title", "text", "icon", "additionalInfo", "links", "list", "buttons", "iconPosition"]);
13
13
  const titleId = useUniqId();
14
14
  const descriptionId = useUniqId();
15
15
  return (React.createElement(CardBase, Object.assign({ className: b() }, cardParams, { extraProps: { 'aria-describedby': descriptionId, 'aria-labelledby': titleId } }),
16
16
  React.createElement(CardBase.Content, null,
17
17
  React.createElement(IconWrapper, { icon: icon ? { value: icon, position: iconPosition } : undefined },
18
- React.createElement(Content, { title: title, titleId: titleId, text: text, textId: descriptionId, additionalInfo: additionalInfo, links: links, buttons: buttons, size: "s", colSizes: { all: 12, md: 12 } })))));
18
+ React.createElement(Content, { title: title, titleId: titleId, text: text, textId: descriptionId, additionalInfo: additionalInfo, links: links, list: list, buttons: buttons, size: "s", colSizes: { all: 12, md: 12 } })))));
19
19
  };
20
20
  export default BasicCard;
@@ -2,15 +2,17 @@ import React, { forwardRef, useContext, useMemo } from 'react';
2
2
  import { MobileContext } from '../../context/mobileContext';
3
3
  import { useTheme } from '../../context/theme';
4
4
  import { useAnalytics, useHandleHubspotEvents } from '../../hooks';
5
+ import { useMetrika } from '../../hooks/useMetrika';
5
6
  import { DefaultEventNames } from '../../models';
6
7
  import { block } from '../../utils';
7
8
  import HubspotFormContainer from './HubspotFormContainer';
8
9
  import './HubspotForm.css';
9
10
  const b = block('hubspot-form');
10
11
  const HubspotForm = forwardRef((props, ref) => {
11
- const { className, theme: themeProp, isMobile: isMobileProp, formId, formInstanceId, portalId, region, formClassName,
12
+ const { className, theme: themeProp, isMobile: isMobileProp, formId, formInstanceId, portalId, region, formClassName, pixelEvents,
12
13
  // hubspotEvents, // TODO: decide how to handle them
13
14
  analyticsEvents, onBeforeSubmit, onSubmit, onBeforeLoad, onLoad, createDOMElement, onSubmitError, } = props;
15
+ const handleMetrika = useMetrika();
14
16
  const themeValue = useTheme();
15
17
  const handleAnalytics = useAnalytics(DefaultEventNames.HubspotFormSubmit);
16
18
  const isMobileValue = useContext(MobileContext);
@@ -22,6 +24,7 @@ const HubspotForm = forwardRef((props, ref) => {
22
24
  onLoad,
23
25
  onSubmitError,
24
26
  onSubmit: (event) => {
27
+ handleMetrika === null || handleMetrika === void 0 ? void 0 : handleMetrika({ pixelEvents });
25
28
  handleAnalytics(analyticsEvents);
26
29
  onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit(event);
27
30
  },
@@ -29,6 +32,8 @@ const HubspotForm = forwardRef((props, ref) => {
29
32
  onBeforeLoad,
30
33
  onBeforeSubmit,
31
34
  onLoad,
35
+ handleMetrika,
36
+ pixelEvents,
32
37
  handleAnalytics,
33
38
  analyticsEvents,
34
39
  onSubmit,
@@ -0,0 +1,59 @@
1
+ .pc-image-card_border_shadow {
2
+ box-shadow: 0px 4px 24px var(--pc-color-sfx-shadow), 0px 2px 8px var(--pc-color-sfx-shadow);
3
+ }
4
+
5
+ /* use this for style redefinitions to awoid problems with
6
+ unpredictable css rules order in build */
7
+ .pc-image-card {
8
+ min-height: 248px;
9
+ height: 100%;
10
+ overflow-x: hidden;
11
+ border-radius: var(--pc-border-radius);
12
+ background-color: var(--g-color-base-float);
13
+ transition: box-shadow 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
14
+ min-height: 1px;
15
+ }
16
+ .pc-image-card_border_line {
17
+ border: 1px solid var(--g-color-line-generic);
18
+ }
19
+ .pc-image-card .pc-image-card__content {
20
+ padding: 32px;
21
+ }
22
+ .pc-image-card .pc-image-card__image_inner {
23
+ width: 100%;
24
+ display: block;
25
+ }
26
+ .pc-image-card .pc-image-card__image_inner_radius {
27
+ border-radius: var(--pc-border-radius);
28
+ }
29
+ .pc-image-card .pc-image-card__image_margins_s {
30
+ padding: 4px;
31
+ }
32
+ .pc-image-card .pc-image-card__image_margins_s .pc-image-card__image_inner {
33
+ border-radius: calc(var(--pc-border-radius) - var(--pc-image-padding));
34
+ }
35
+ .pc-image-card .pc-image-card__image_margins_m {
36
+ padding: 32px;
37
+ }
38
+ .pc-image-card .pc-image-card__image_margins_m .pc-image-card__image_inner {
39
+ border-radius: initial;
40
+ }
41
+ .pc-image-card_with-content {
42
+ display: flex;
43
+ flex-direction: column;
44
+ }
45
+ .pc-image-card_with-content.pc-image-card_direction_direct .pc-image-card__image {
46
+ padding-bottom: 0;
47
+ }
48
+ .pc-image-card_with-content.pc-image-card_direction_direct .pc-image-card__content {
49
+ padding-top: 24px;
50
+ }
51
+ .pc-image-card_with-content.pc-image-card_direction_reverse {
52
+ flex-direction: column-reverse;
53
+ }
54
+ .pc-image-card_with-content.pc-image-card_direction_reverse .pc-image-card__image {
55
+ padding-top: 0;
56
+ }
57
+ .pc-image-card_with-content.pc-image-card_direction_reverse .pc-image-card__content {
58
+ padding-bottom: 24px;
59
+ }
@@ -0,0 +1,4 @@
1
+ import { ImageCardProps } from '../../models';
2
+ import './ImageCard.css';
3
+ declare const ImageCard: (props: ImageCardProps) => JSX.Element;
4
+ export default ImageCard;
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ import { Image } from '../../components';
3
+ import { getMediaImage } from '../../components/Media/Image/utils';
4
+ import { ImageCardDirection } from '../../models';
5
+ import { block } from '../../utils';
6
+ import Content from '../Content/Content';
7
+ import './ImageCard.css';
8
+ const b = block('image-card');
9
+ const ImageCard = (props) => {
10
+ const { border = 'shadow', title, text, image, enableImageBorderRadius = false, direction = ImageCardDirection.Direct, margins, backgroundColor, } = props;
11
+ const hasContent = Boolean(text || title);
12
+ const imageProps = getMediaImage(image);
13
+ return (React.createElement("div", { className: b({ border, 'with-content': hasContent, direction }), style: { backgroundColor } },
14
+ React.createElement("div", { className: b('image', { margins }) },
15
+ React.createElement(Image, Object.assign({ className: b('image_inner', { radius: enableImageBorderRadius }) }, imageProps))),
16
+ hasContent && (React.createElement("div", { className: b('content') },
17
+ React.createElement(Content, { title: title, text: text, colSizes: { all: 12, md: 12 }, size: "s" })))));
18
+ };
19
+ export default ImageCard;
@@ -0,0 +1,78 @@
1
+ export declare const ImageCard: {
2
+ 'image-card': {
3
+ additionalProperties: boolean;
4
+ required: string[];
5
+ properties: {
6
+ image: {
7
+ oneOf: ({
8
+ type: string;
9
+ properties: {
10
+ when: {
11
+ type: string;
12
+ };
13
+ };
14
+ } | {
15
+ type: string;
16
+ pattern: string;
17
+ optionName: string;
18
+ })[];
19
+ };
20
+ direction: {
21
+ type: string;
22
+ enum: string[];
23
+ };
24
+ margins: {
25
+ type: string;
26
+ enum: string[];
27
+ };
28
+ backgroundColor: {
29
+ type: string;
30
+ };
31
+ title: {
32
+ oneOf: ({
33
+ type: string;
34
+ contentType: string;
35
+ optionName: string;
36
+ } | {
37
+ optionName: string;
38
+ type: string;
39
+ additionalProperties: boolean;
40
+ required: string[];
41
+ properties: {
42
+ text: {
43
+ type: string;
44
+ contentType: string;
45
+ };
46
+ textSize: {
47
+ type: string;
48
+ enum: string[];
49
+ };
50
+ url: {
51
+ type: string;
52
+ };
53
+ urlTitle: {
54
+ type: string;
55
+ };
56
+ resetMargin: {
57
+ type: string;
58
+ };
59
+ };
60
+ contentType?: undefined;
61
+ })[];
62
+ };
63
+ text: {
64
+ type: string;
65
+ contentType: string;
66
+ inputType: string;
67
+ };
68
+ border: {
69
+ type: string;
70
+ enum: string[];
71
+ };
72
+ type: {};
73
+ when: {
74
+ type: string;
75
+ };
76
+ };
77
+ };
78
+ };
@@ -0,0 +1,20 @@
1
+ import pick from 'lodash/pick';
2
+ import { BaseProps, CardBase } from '../../schema/validators/common';
3
+ import { ImageProps } from '../../schema/validators/components';
4
+ import { ContentBase } from '../Content/schema';
5
+ const ImageCardBlockContentProps = pick(ContentBase, ['title', 'text']);
6
+ export const ImageCard = {
7
+ 'image-card': {
8
+ additionalProperties: false,
9
+ required: ['image'],
10
+ properties: Object.assign(Object.assign(Object.assign(Object.assign({}, BaseProps), CardBase), ImageCardBlockContentProps), { image: ImageProps, direction: {
11
+ type: 'string',
12
+ enum: ['direct', 'reverse'],
13
+ }, margins: {
14
+ type: 'string',
15
+ enum: ['s', 'm'],
16
+ }, backgroundColor: {
17
+ type: 'string',
18
+ } }),
19
+ },
20
+ };
@@ -8,8 +8,22 @@ export declare const getLayoutItemLinks: (links: LayoutItemProps['content']['lin
8
8
  colorTheme?: import("../../models").TextTheme | undefined;
9
9
  arrow?: boolean | undefined;
10
10
  target?: string | undefined;
11
+ metrikaGoals?: import("../../models").MetrikaGoal | undefined;
12
+ pixelEvents?: import("../../models").ButtonPixel | undefined;
11
13
  extraProps?: import("react").HTMLProps<HTMLAnchorElement> | undefined;
12
- analyticsEvents?: import("../../models").AnalyticsEventsProp | undefined;
14
+ analyticsEvents?: {
15
+ name: string;
16
+ type?: string | undefined;
17
+ counters?: import("../../models").AnalyticsCounters | undefined;
18
+ context?: string | undefined;
19
+ target?: string | undefined;
20
+ } | {
21
+ name: string;
22
+ type?: string | undefined;
23
+ counters?: import("../../models").AnalyticsCounters | undefined;
24
+ context?: string | undefined;
25
+ target?: string | undefined;
26
+ }[] | undefined;
13
27
  className?: string | undefined;
14
28
  tabIndex?: number | undefined;
15
29
  }[] | undefined;