@redneckz/wildless-cms-uni-blocks 0.12.12 → 0.12.13

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 (374) hide show
  1. package/bin/migration-scripts/0.12.10.js +59 -0
  2. package/bundle/blocks.schema.json +1 -1
  3. package/bundle/bundle.umd.js +90 -66
  4. package/bundle/bundle.umd.min.js +1 -1
  5. package/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +52 -6
  6. package/bundle/components/ApplicationForm/ApplicationFormGrantSupport.d.ts +2 -0
  7. package/bundle/components/ApplicationForm/ApplicationFormsProps.d.ts +1 -0
  8. package/bundle/components/ApplicationForm/EmbeddableForms.d.ts +8 -0
  9. package/bundle/components/Carousel/Carousel.d.ts +1 -1
  10. package/bundle/components/CarouselLinks/CarouselLinks.d.ts +1 -0
  11. package/bundle/components/CarouselLinks/CarouselLinksContent.d.ts +2 -0
  12. package/bundle/components/Footer/Contacts.d.ts +0 -1
  13. package/bundle/components/Footer/MediaButton.d.ts +1 -1
  14. package/bundle/components/Footer/buttonSizeStyles.d.ts +4 -0
  15. package/bundle/components/Footer/buttonSizeStyles.mobile.d.ts +4 -0
  16. package/bundle/services/regionsGrantSupport/RegionsGrantSupportData.d.ts +7 -0
  17. package/dist/components/ApplicationForm/ApplicationForm.js +16 -14
  18. package/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
  19. package/dist/components/ApplicationForm/ApplicationFormContent.d.ts +52 -6
  20. package/dist/components/ApplicationForm/ApplicationFormGrantSupport.d.ts +2 -0
  21. package/dist/components/ApplicationForm/ApplicationFormGrantSupport.js +22 -0
  22. package/dist/components/ApplicationForm/ApplicationFormGrantSupport.js.map +1 -0
  23. package/dist/components/ApplicationForm/ApplicationFormsProps.d.ts +1 -0
  24. package/dist/components/ApplicationForm/EmbeddableForms.d.ts +8 -0
  25. package/dist/components/ApplicationForm/EmbeddableForms.js +17 -0
  26. package/dist/components/ApplicationForm/EmbeddableForms.js.map +1 -0
  27. package/dist/components/BenefitsBlock/BenefitsBlock.js +1 -1
  28. package/dist/components/Bonus/Bonus.js +10 -13
  29. package/dist/components/Bonus/Bonus.js.map +1 -1
  30. package/dist/components/Calculator/BusinessDepositCalculatorForm.js +4 -4
  31. package/dist/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
  32. package/dist/components/Calculator/CreditCalculatorForm.js +1 -1
  33. package/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
  34. package/dist/components/Calculator/DepositCalculatorForm.js +3 -3
  35. package/dist/components/Calculator/DepositCalculatorForm.js.map +1 -1
  36. package/dist/components/Carousel/Carousel.d.ts +1 -1
  37. package/dist/components/Carousel/Carousel.js.map +1 -1
  38. package/dist/components/Carousel/CarouselScrollButtons.js +2 -2
  39. package/dist/components/Carousel/CarouselScrollButtons.js.map +1 -1
  40. package/dist/components/CarouselLinks/CarouselLinks.d.ts +1 -0
  41. package/dist/components/CarouselLinks/CarouselLinks.js +7 -8
  42. package/dist/components/CarouselLinks/CarouselLinks.js.map +1 -1
  43. package/dist/components/CarouselLinks/CarouselLinksContent.d.ts +2 -0
  44. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +1 -1
  45. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  46. package/dist/components/ContentPage/ContentPage.js +2 -2
  47. package/dist/components/ContentPage/ContentPage.js.map +1 -1
  48. package/dist/components/Footer/Contacts.d.ts +0 -1
  49. package/dist/components/Footer/Contacts.js +3 -4
  50. package/dist/components/Footer/Contacts.js.map +1 -1
  51. package/dist/components/Footer/Footer.js +2 -2
  52. package/dist/components/Footer/Footer.js.map +1 -1
  53. package/dist/components/Footer/Footer.mobile.js +4 -3
  54. package/dist/components/Footer/Footer.mobile.js.map +1 -1
  55. package/dist/components/Footer/HorizontalNavigation.js +1 -1
  56. package/dist/components/Footer/HorizontalNavigation.js.map +1 -1
  57. package/dist/components/Footer/HorizontalNavigation.mobile.js +1 -1
  58. package/dist/components/Footer/HorizontalNavigation.mobile.js.map +1 -1
  59. package/dist/components/Footer/MediaButton.d.ts +1 -1
  60. package/dist/components/Footer/SocialMedia.js +2 -1
  61. package/dist/components/Footer/SocialMedia.js.map +1 -1
  62. package/dist/components/Footer/TextInformation.js +1 -1
  63. package/dist/components/Footer/TextInformation.js.map +1 -1
  64. package/dist/components/Footer/buttonSizeStyles.d.ts +4 -0
  65. package/dist/components/Footer/buttonSizeStyles.js +7 -0
  66. package/dist/components/Footer/buttonSizeStyles.js.map +1 -0
  67. package/dist/components/Footer/buttonSizeStyles.mobile.d.ts +4 -0
  68. package/dist/components/Footer/buttonSizeStyles.mobile.js +7 -0
  69. package/dist/components/Footer/buttonSizeStyles.mobile.js.map +1 -0
  70. package/dist/components/Footer/buttonStylesWithText.js +2 -5
  71. package/dist/components/Footer/buttonStylesWithText.js.map +1 -1
  72. package/dist/components/MobileAppTile/renderDescription.js +1 -1
  73. package/dist/components/MobileAppTile/renderDescription.js.map +1 -1
  74. package/dist/components/RollupItem/RollupItem.js +1 -1
  75. package/dist/components/RollupItem/RollupItem.js.map +1 -1
  76. package/dist/services/regionsGrantSupport/RegionsGrantSupportData.d.ts +7 -0
  77. package/dist/services/regionsGrantSupport/RegionsGrantSupportData.js +2 -0
  78. package/dist/services/regionsGrantSupport/RegionsGrantSupportData.js.map +1 -0
  79. package/dist/ui-kit/LinkButton/LinkButton.js +4 -3
  80. package/dist/ui-kit/LinkButton/LinkButton.js.map +1 -1
  81. package/dist/ui-kit/LinkList/LinkList.js +2 -2
  82. package/dist/ui-kit/LinkList/LinkList.js.map +1 -1
  83. package/lib/common.css +1 -1
  84. package/lib/components/ApplicationForm/ApplicationForm.fixture.d.ts +1 -0
  85. package/lib/components/ApplicationForm/ApplicationForm.fixture.mobile.d.ts +1 -0
  86. package/lib/components/ApplicationForm/ApplicationForm.js +16 -14
  87. package/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
  88. package/lib/components/ApplicationForm/ApplicationFormContent.d.ts +52 -6
  89. package/lib/components/ApplicationForm/ApplicationFormGrantSupport.d.ts +2 -0
  90. package/lib/components/ApplicationForm/ApplicationFormGrantSupport.js +20 -0
  91. package/lib/components/ApplicationForm/ApplicationFormGrantSupport.js.map +1 -0
  92. package/lib/components/ApplicationForm/ApplicationFormsProps.d.ts +1 -0
  93. package/lib/components/ApplicationForm/EmbeddableForms.d.ts +8 -0
  94. package/lib/components/ApplicationForm/EmbeddableForms.js +15 -0
  95. package/lib/components/ApplicationForm/EmbeddableForms.js.map +1 -0
  96. package/lib/components/BenefitsBlock/BenefitsBlock.js +1 -1
  97. package/lib/components/Bonus/Bonus.fixture.mobile.d.ts +8 -0
  98. package/lib/components/Bonus/Bonus.js +10 -13
  99. package/lib/components/Bonus/Bonus.js.map +1 -1
  100. package/lib/components/Calculator/BusinessDepositCalculatorForm.js +4 -4
  101. package/lib/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
  102. package/lib/components/Calculator/CreditCalculatorForm.js +1 -1
  103. package/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
  104. package/lib/components/Calculator/DepositCalculatorForm.js +3 -3
  105. package/lib/components/Calculator/DepositCalculatorForm.js.map +1 -1
  106. package/lib/components/Carousel/Carousel.d.ts +1 -1
  107. package/lib/components/Carousel/Carousel.js.map +1 -1
  108. package/lib/components/Carousel/CarouselScrollButtons.js +2 -2
  109. package/lib/components/Carousel/CarouselScrollButtons.js.map +1 -1
  110. package/lib/components/CarouselLinks/CarouselLinks.d.ts +1 -0
  111. package/lib/components/CarouselLinks/CarouselLinks.fixture.mobile.d.ts +6 -0
  112. package/lib/components/CarouselLinks/CarouselLinks.js +7 -8
  113. package/lib/components/CarouselLinks/CarouselLinks.js.map +1 -1
  114. package/lib/components/CarouselLinks/CarouselLinksContent.d.ts +2 -0
  115. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +1 -1
  116. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  117. package/lib/components/ContentPage/ContentPage.js +2 -2
  118. package/lib/components/ContentPage/ContentPage.js.map +1 -1
  119. package/lib/components/Footer/Contacts.d.ts +0 -1
  120. package/lib/components/Footer/Contacts.js +3 -4
  121. package/lib/components/Footer/Contacts.js.map +1 -1
  122. package/lib/components/Footer/Footer.js +2 -2
  123. package/lib/components/Footer/Footer.js.map +1 -1
  124. package/lib/components/Footer/Footer.mobile.js +4 -3
  125. package/lib/components/Footer/Footer.mobile.js.map +1 -1
  126. package/lib/components/Footer/HorizontalNavigation.js +1 -1
  127. package/lib/components/Footer/HorizontalNavigation.js.map +1 -1
  128. package/lib/components/Footer/HorizontalNavigation.mobile.js +1 -1
  129. package/lib/components/Footer/HorizontalNavigation.mobile.js.map +1 -1
  130. package/lib/components/Footer/MediaButton.d.ts +1 -1
  131. package/lib/components/Footer/SocialMedia.js +2 -1
  132. package/lib/components/Footer/SocialMedia.js.map +1 -1
  133. package/lib/components/Footer/TextInformation.js +1 -1
  134. package/lib/components/Footer/TextInformation.js.map +1 -1
  135. package/lib/components/Footer/buttonSizeStyles.d.ts +4 -0
  136. package/lib/components/Footer/buttonSizeStyles.js +5 -0
  137. package/lib/components/Footer/buttonSizeStyles.js.map +1 -0
  138. package/lib/components/Footer/buttonSizeStyles.mobile.d.ts +4 -0
  139. package/lib/components/Footer/buttonSizeStyles.mobile.js +5 -0
  140. package/lib/components/Footer/buttonSizeStyles.mobile.js.map +1 -0
  141. package/lib/components/Footer/buttonStylesWithText.js +1 -4
  142. package/lib/components/Footer/buttonStylesWithText.js.map +1 -1
  143. package/lib/components/MobileAppTile/renderDescription.js +1 -1
  144. package/lib/components/MobileAppTile/renderDescription.js.map +1 -1
  145. package/lib/components/RollupItem/RollupItem.js +1 -1
  146. package/lib/components/RollupItem/RollupItem.js.map +1 -1
  147. package/lib/services/regionsGrantSupport/RegionsGrantSupportData.d.ts +7 -0
  148. package/lib/services/regionsGrantSupport/RegionsGrantSupportData.js +2 -0
  149. package/lib/services/regionsGrantSupport/RegionsGrantSupportData.js.map +1 -0
  150. package/lib/ui-kit/LinkButton/LinkButton.fixture.mobile.d.ts +6 -0
  151. package/lib/ui-kit/LinkButton/LinkButton.js +4 -3
  152. package/lib/ui-kit/LinkButton/LinkButton.js.map +1 -1
  153. package/lib/ui-kit/LinkList/LinkList.js +2 -2
  154. package/lib/ui-kit/LinkList/LinkList.js.map +1 -1
  155. package/mobile/bundle/bundle.umd.js +65 -37
  156. package/mobile/bundle/bundle.umd.min.js +1 -1
  157. package/mobile/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +52 -6
  158. package/mobile/bundle/components/ApplicationForm/ApplicationFormGrantSupport.d.ts +2 -0
  159. package/mobile/bundle/components/ApplicationForm/ApplicationFormsProps.d.ts +1 -0
  160. package/mobile/bundle/components/ApplicationForm/EmbeddableForms.d.ts +8 -0
  161. package/mobile/bundle/components/Carousel/Carousel.d.ts +1 -1
  162. package/mobile/bundle/components/CarouselLinks/CarouselLinks.d.ts +1 -0
  163. package/mobile/bundle/components/CarouselLinks/CarouselLinksContent.d.ts +2 -0
  164. package/mobile/bundle/components/Footer/Contacts.d.ts +0 -1
  165. package/mobile/bundle/components/Footer/MediaButton.d.ts +1 -1
  166. package/mobile/bundle/components/Footer/SocialMedia.d.ts +4 -2
  167. package/mobile/bundle/components/Footer/buttonSizeStyles.d.ts +4 -0
  168. package/mobile/bundle/services/regionsGrantSupport/RegionsGrantSupportData.d.ts +7 -0
  169. package/mobile/dist/components/ApplicationForm/ApplicationForm.js +16 -14
  170. package/mobile/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
  171. package/mobile/dist/components/ApplicationForm/ApplicationFormContent.d.ts +52 -6
  172. package/mobile/dist/components/ApplicationForm/ApplicationFormGrantSupport.d.ts +2 -0
  173. package/mobile/dist/components/ApplicationForm/ApplicationFormGrantSupport.js +22 -0
  174. package/mobile/dist/components/ApplicationForm/ApplicationFormGrantSupport.js.map +1 -0
  175. package/mobile/dist/components/ApplicationForm/ApplicationFormsProps.d.ts +1 -0
  176. package/mobile/dist/components/ApplicationForm/EmbeddableForms.d.ts +8 -0
  177. package/mobile/dist/components/ApplicationForm/EmbeddableForms.js +17 -0
  178. package/mobile/dist/components/ApplicationForm/EmbeddableForms.js.map +1 -0
  179. package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js +1 -1
  180. package/mobile/dist/components/Bonus/Bonus.js +10 -13
  181. package/mobile/dist/components/Bonus/Bonus.js.map +1 -1
  182. package/mobile/dist/components/Calculator/BusinessDepositCalculatorForm.js +4 -4
  183. package/mobile/dist/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
  184. package/mobile/dist/components/Calculator/CreditCalculatorForm.js +1 -1
  185. package/mobile/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
  186. package/mobile/dist/components/Calculator/DepositCalculatorForm.js +3 -3
  187. package/mobile/dist/components/Calculator/DepositCalculatorForm.js.map +1 -1
  188. package/mobile/dist/components/Carousel/Carousel.d.ts +1 -1
  189. package/mobile/dist/components/Carousel/Carousel.js.map +1 -1
  190. package/mobile/dist/components/Carousel/CarouselScrollButtons.js +2 -2
  191. package/mobile/dist/components/Carousel/CarouselScrollButtons.js.map +1 -1
  192. package/mobile/dist/components/CarouselLinks/CarouselLinks.d.ts +1 -0
  193. package/mobile/dist/components/CarouselLinks/CarouselLinks.js +7 -8
  194. package/mobile/dist/components/CarouselLinks/CarouselLinks.js.map +1 -1
  195. package/mobile/dist/components/CarouselLinks/CarouselLinksContent.d.ts +2 -0
  196. package/mobile/dist/components/ContentPage/ContentPage.js +2 -2
  197. package/mobile/dist/components/ContentPage/ContentPage.js.map +1 -1
  198. package/mobile/dist/components/Footer/Contacts.d.ts +0 -1
  199. package/mobile/dist/components/Footer/Contacts.js +3 -4
  200. package/mobile/dist/components/Footer/Contacts.js.map +1 -1
  201. package/mobile/dist/components/Footer/Footer.js +4 -3
  202. package/mobile/dist/components/Footer/Footer.js.map +1 -1
  203. package/mobile/dist/components/Footer/HorizontalNavigation.js +1 -1
  204. package/mobile/dist/components/Footer/HorizontalNavigation.js.map +1 -1
  205. package/mobile/dist/components/Footer/MediaButton.d.ts +1 -1
  206. package/mobile/dist/components/Footer/SocialMedia.d.ts +4 -2
  207. package/mobile/dist/components/Footer/SocialMedia.js +3 -1
  208. package/mobile/dist/components/Footer/SocialMedia.js.map +1 -1
  209. package/mobile/dist/components/Footer/TextInformation.js +1 -1
  210. package/mobile/dist/components/Footer/TextInformation.js.map +1 -1
  211. package/mobile/dist/components/Footer/buttonSizeStyles.d.ts +4 -0
  212. package/mobile/dist/components/Footer/buttonSizeStyles.js +7 -0
  213. package/mobile/dist/components/Footer/buttonSizeStyles.js.map +1 -0
  214. package/mobile/dist/components/Footer/buttonStylesWithText.js +2 -5
  215. package/mobile/dist/components/Footer/buttonStylesWithText.js.map +1 -1
  216. package/mobile/dist/components/MobileAppTile/renderDescription.js +1 -1
  217. package/mobile/dist/components/MobileAppTile/renderDescription.js.map +1 -1
  218. package/mobile/dist/components/RollupItem/RollupItem.js +1 -1
  219. package/mobile/dist/components/RollupItem/RollupItem.js.map +1 -1
  220. package/mobile/dist/services/regionsGrantSupport/RegionsGrantSupportData.d.ts +7 -0
  221. package/mobile/dist/services/regionsGrantSupport/RegionsGrantSupportData.js +2 -0
  222. package/mobile/dist/services/regionsGrantSupport/RegionsGrantSupportData.js.map +1 -0
  223. package/mobile/dist/ui-kit/LinkButton/LinkButton.js +4 -3
  224. package/mobile/dist/ui-kit/LinkButton/LinkButton.js.map +1 -1
  225. package/mobile/dist/ui-kit/LinkList/LinkList.js +2 -2
  226. package/mobile/dist/ui-kit/LinkList/LinkList.js.map +1 -1
  227. package/mobile/lib/common.css +1 -1
  228. package/mobile/lib/components/ApplicationForm/ApplicationForm.js +16 -14
  229. package/mobile/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
  230. package/mobile/lib/components/ApplicationForm/ApplicationFormContent.d.ts +52 -6
  231. package/mobile/lib/components/ApplicationForm/ApplicationFormGrantSupport.d.ts +2 -0
  232. package/mobile/lib/components/ApplicationForm/ApplicationFormGrantSupport.js +20 -0
  233. package/mobile/lib/components/ApplicationForm/ApplicationFormGrantSupport.js.map +1 -0
  234. package/mobile/lib/components/ApplicationForm/ApplicationFormsProps.d.ts +1 -0
  235. package/mobile/lib/components/ApplicationForm/EmbeddableForms.d.ts +8 -0
  236. package/mobile/lib/components/ApplicationForm/EmbeddableForms.js +15 -0
  237. package/mobile/lib/components/ApplicationForm/EmbeddableForms.js.map +1 -0
  238. package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js +1 -1
  239. package/mobile/lib/components/Bonus/Bonus.js +10 -13
  240. package/mobile/lib/components/Bonus/Bonus.js.map +1 -1
  241. package/mobile/lib/components/Calculator/BusinessDepositCalculatorForm.js +4 -4
  242. package/mobile/lib/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
  243. package/mobile/lib/components/Calculator/CreditCalculatorForm.js +1 -1
  244. package/mobile/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
  245. package/mobile/lib/components/Calculator/DepositCalculatorForm.js +3 -3
  246. package/mobile/lib/components/Calculator/DepositCalculatorForm.js.map +1 -1
  247. package/mobile/lib/components/Carousel/Carousel.d.ts +1 -1
  248. package/mobile/lib/components/Carousel/Carousel.js.map +1 -1
  249. package/mobile/lib/components/Carousel/CarouselScrollButtons.js +2 -2
  250. package/mobile/lib/components/Carousel/CarouselScrollButtons.js.map +1 -1
  251. package/mobile/lib/components/CarouselLinks/CarouselLinks.d.ts +1 -0
  252. package/mobile/lib/components/CarouselLinks/CarouselLinks.js +7 -8
  253. package/mobile/lib/components/CarouselLinks/CarouselLinks.js.map +1 -1
  254. package/mobile/lib/components/CarouselLinks/CarouselLinksContent.d.ts +2 -0
  255. package/mobile/lib/components/ContentPage/ContentPage.js +2 -2
  256. package/mobile/lib/components/ContentPage/ContentPage.js.map +1 -1
  257. package/mobile/lib/components/Footer/Contacts.d.ts +0 -1
  258. package/mobile/lib/components/Footer/Contacts.js +3 -4
  259. package/mobile/lib/components/Footer/Contacts.js.map +1 -1
  260. package/mobile/lib/components/Footer/Footer.js +4 -3
  261. package/mobile/lib/components/Footer/Footer.js.map +1 -1
  262. package/mobile/lib/components/Footer/HorizontalNavigation.js +1 -1
  263. package/mobile/lib/components/Footer/HorizontalNavigation.js.map +1 -1
  264. package/mobile/lib/components/Footer/MediaButton.d.ts +1 -1
  265. package/mobile/lib/components/Footer/SocialMedia.d.ts +4 -2
  266. package/mobile/lib/components/Footer/SocialMedia.js +4 -2
  267. package/mobile/lib/components/Footer/SocialMedia.js.map +1 -1
  268. package/mobile/lib/components/Footer/TextInformation.js +1 -1
  269. package/mobile/lib/components/Footer/TextInformation.js.map +1 -1
  270. package/mobile/lib/components/Footer/buttonSizeStyles.d.ts +4 -0
  271. package/mobile/lib/components/Footer/buttonSizeStyles.js +5 -0
  272. package/mobile/lib/components/Footer/buttonSizeStyles.js.map +1 -0
  273. package/mobile/lib/components/Footer/buttonStylesWithText.js +1 -4
  274. package/mobile/lib/components/Footer/buttonStylesWithText.js.map +1 -1
  275. package/mobile/lib/components/MobileAppTile/renderDescription.js +1 -1
  276. package/mobile/lib/components/MobileAppTile/renderDescription.js.map +1 -1
  277. package/mobile/lib/components/RollupItem/RollupItem.js +1 -1
  278. package/mobile/lib/components/RollupItem/RollupItem.js.map +1 -1
  279. package/mobile/lib/services/regionsGrantSupport/RegionsGrantSupportData.d.ts +7 -0
  280. package/mobile/lib/services/regionsGrantSupport/RegionsGrantSupportData.js +2 -0
  281. package/mobile/lib/services/regionsGrantSupport/RegionsGrantSupportData.js.map +1 -0
  282. package/mobile/lib/ui-kit/LinkButton/LinkButton.js +4 -3
  283. package/mobile/lib/ui-kit/LinkButton/LinkButton.js.map +1 -1
  284. package/mobile/lib/ui-kit/LinkList/LinkList.js +2 -2
  285. package/mobile/lib/ui-kit/LinkList/LinkList.js.map +1 -1
  286. package/mobile/src/common.css +1 -1
  287. package/mobile/src/components/ApplicationForm/ApplicationForm.tsx +31 -19
  288. package/mobile/src/components/ApplicationForm/ApplicationForm.ui.json +12 -0
  289. package/mobile/src/components/ApplicationForm/ApplicationFormContent.ts +70 -11
  290. package/mobile/src/components/ApplicationForm/ApplicationFormGrantSupport.tsx +51 -0
  291. package/mobile/src/components/ApplicationForm/ApplicationFormsProps.ts +1 -0
  292. package/mobile/src/components/ApplicationForm/EmbeddableForms.tsx +15 -0
  293. package/mobile/src/components/BenefitsBlock/BenefitsBlock.tsx +1 -1
  294. package/mobile/src/components/Bonus/Bonus.tsx +33 -28
  295. package/mobile/src/components/Calculator/BusinessDepositCalculatorForm.tsx +11 -6
  296. package/mobile/src/components/Calculator/CreditCalculatorForm.tsx +1 -1
  297. package/mobile/src/components/Calculator/DepositCalculatorForm.tsx +3 -3
  298. package/mobile/src/components/Carousel/Carousel.tsx +5 -3
  299. package/mobile/src/components/Carousel/CarouselScrollButtons.tsx +10 -3
  300. package/mobile/src/components/CarouselLinks/CarouselLinks.tsx +25 -14
  301. package/mobile/src/components/CarouselLinks/CarouselLinksContent.ts +2 -0
  302. package/mobile/src/components/ContentPage/ContentPage.tsx +3 -3
  303. package/mobile/src/components/Footer/Contacts.tsx +15 -19
  304. package/mobile/src/components/Footer/Footer.tsx +27 -13
  305. package/mobile/src/components/Footer/HorizontalNavigation.tsx +10 -3
  306. package/mobile/src/components/Footer/MediaButton.tsx +1 -1
  307. package/mobile/src/components/Footer/SocialMedia.tsx +22 -9
  308. package/mobile/src/components/Footer/TextInformation.tsx +2 -2
  309. package/mobile/src/components/Footer/buttonSizeStyles.ts +6 -0
  310. package/mobile/src/components/Footer/buttonStylesWithText.ts +1 -5
  311. package/mobile/src/components/MobileAppTile/renderDescription.tsx +1 -1
  312. package/mobile/src/components/RollupItem/RollupItem.tsx +1 -1
  313. package/mobile/src/services/regionsGrantSupport/RegionsGrantSupportData.ts +8 -0
  314. package/mobile/src/ui-kit/LinkButton/LinkButton.tsx +22 -9
  315. package/mobile/src/ui-kit/LinkList/LinkList.tsx +3 -3
  316. package/package.json +1 -1
  317. package/src/common.css +1 -1
  318. package/src/components/ApplicationForm/ApplicationForm.fixture.mobile.tsx +41 -7
  319. package/src/components/ApplicationForm/ApplicationForm.fixture.tsx +41 -7
  320. package/src/components/ApplicationForm/ApplicationForm.tsx +31 -19
  321. package/src/components/ApplicationForm/ApplicationForm.ui.json +12 -0
  322. package/src/components/ApplicationForm/ApplicationFormContent.ts +70 -11
  323. package/src/components/ApplicationForm/ApplicationFormGrantSupport.tsx +51 -0
  324. package/src/components/ApplicationForm/ApplicationFormsProps.ts +1 -0
  325. package/src/components/ApplicationForm/EmbeddableForms.tsx +15 -0
  326. package/src/components/BenefitsBlock/BenefitsBlock.tsx +1 -1
  327. package/src/components/Bonus/Bonus.fixture.mobile.tsx +72 -0
  328. package/src/components/Bonus/Bonus.tsx +33 -28
  329. package/src/components/Calculator/BusinessDepositCalculatorForm.tsx +11 -6
  330. package/src/components/Calculator/CreditCalculatorForm.tsx +1 -1
  331. package/src/components/Calculator/DepositCalculatorForm.tsx +3 -3
  332. package/src/components/Carousel/Carousel.tsx +5 -3
  333. package/src/components/Carousel/CarouselScrollButtons.tsx +10 -3
  334. package/src/components/CarouselLinks/CarouselLinks.fixture.mobile.tsx +34 -0
  335. package/src/components/CarouselLinks/CarouselLinks.fixture.tsx +3 -0
  336. package/src/components/CarouselLinks/CarouselLinks.tsx +25 -14
  337. package/src/components/CarouselLinks/CarouselLinksContent.ts +2 -0
  338. package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +1 -1
  339. package/src/components/ContentPage/ContentPage.tsx +3 -3
  340. package/src/components/Footer/Contacts.tsx +15 -19
  341. package/src/components/Footer/Footer.mobile.tsx +27 -13
  342. package/src/components/Footer/Footer.tsx +6 -8
  343. package/src/components/Footer/HorizontalNavigation.mobile.tsx +10 -3
  344. package/src/components/Footer/HorizontalNavigation.tsx +1 -1
  345. package/src/components/Footer/MediaButton.tsx +1 -1
  346. package/src/components/Footer/SocialMedia.tsx +9 -6
  347. package/src/components/Footer/TextInformation.tsx +2 -2
  348. package/src/components/Footer/buttonSizeStyles.mobile.ts +6 -0
  349. package/src/components/Footer/buttonSizeStyles.ts +6 -0
  350. package/src/components/Footer/buttonStylesWithText.ts +1 -5
  351. package/src/components/MobileAppTile/renderDescription.tsx +1 -1
  352. package/src/components/RollupItem/RollupItem.tsx +1 -1
  353. package/src/services/regionsGrantSupport/RegionsGrantSupportData.ts +8 -0
  354. package/src/ui-kit/LinkButton/LinkButton.fixture.mobile.tsx +11 -0
  355. package/src/ui-kit/LinkButton/LinkButton.fixture.tsx +1 -1
  356. package/src/ui-kit/LinkButton/LinkButton.tsx +22 -9
  357. package/src/ui-kit/LinkList/LinkList.tsx +3 -3
  358. package/tailwind.config.cjs +5 -5
  359. package/bundle/components/Footer/SocialMedia.mobile.d.ts +0 -6
  360. package/bundle/components/Footer/buttonStylesWithText.mobile.d.ts +0 -2
  361. package/dist/components/Footer/SocialMedia.mobile.d.ts +0 -6
  362. package/dist/components/Footer/SocialMedia.mobile.js +0 -7
  363. package/dist/components/Footer/SocialMedia.mobile.js.map +0 -1
  364. package/dist/components/Footer/buttonStylesWithText.mobile.d.ts +0 -2
  365. package/dist/components/Footer/buttonStylesWithText.mobile.js +0 -12
  366. package/dist/components/Footer/buttonStylesWithText.mobile.js.map +0 -1
  367. package/lib/components/Footer/SocialMedia.mobile.d.ts +0 -6
  368. package/lib/components/Footer/SocialMedia.mobile.js +0 -5
  369. package/lib/components/Footer/SocialMedia.mobile.js.map +0 -1
  370. package/lib/components/Footer/buttonStylesWithText.mobile.d.ts +0 -2
  371. package/lib/components/Footer/buttonStylesWithText.mobile.js +0 -9
  372. package/lib/components/Footer/buttonStylesWithText.mobile.js.map +0 -1
  373. package/src/components/Footer/SocialMedia.mobile.tsx +0 -16
  374. package/src/components/Footer/buttonStylesWithText.mobile.ts +0 -15
@@ -9,11 +9,18 @@ export interface HorizontalNavigationProps extends FooterLink, TitleProps {}
9
9
  export const HorizontalNavigation = JSX<HorizontalNavigationProps>(
10
10
  ({ title, links, className = '' }) => (
11
11
  <div className={className}>
12
- <Text size="text-h6">{title}</Text>
12
+ <Text size="text-l" font="font-normal">
13
+ {title}
14
+ </Text>
13
15
  {links?.length ? (
14
- <div className="flex flex-col gap-6 mt-7">
16
+ <div className="flex flex-col gap-lg mt-lg">
15
17
  {links.map((_, i) => (
16
- <HorizontalNavigationLink key={String(i)} index={i} {..._} />
18
+ <HorizontalNavigationLink
19
+ className="text-l font-light"
20
+ key={String(i)}
21
+ index={i}
22
+ {..._}
23
+ />
17
24
  ))}
18
25
  </div>
19
26
  ) : null}
@@ -7,7 +7,7 @@ import { style } from '../../utils/style';
7
7
  import { buttonStylesWithText } from './buttonStylesWithText';
8
8
  import { findIconByHref } from './findIconByHref';
9
9
 
10
- export type ButtonSize = 'default' | 'small';
10
+ export type ButtonSize = 'default' | 'stretched';
11
11
 
12
12
  interface MediaButtonProps extends ButtonProps, IconProps {
13
13
  buttonSize?: ButtonSize;
@@ -1,16 +1,29 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
- import type { LinkProps } from '../../model/LinkProps';
2
+ import type { ButtonWithIconProps } from '../../ui-kit/Button/ButtonProps';
3
+ import { Text } from '../../ui-kit/Text/Text';
3
4
  import { MediaButton } from './MediaButton';
5
+ import type { ButtonSize } from './MediaButton';
6
+ import { style } from '../../utils/style';
4
7
 
5
8
  export interface SocialMediaProps {
6
9
  className?: string;
7
- media?: Omit<LinkProps, 'text'>[];
10
+ media?: ButtonWithIconProps[];
11
+ buttonSize?: ButtonSize;
8
12
  }
9
13
 
10
- export const SocialMedia = JSX<SocialMediaProps>(({ className = '', media }) => (
11
- <div className={`flex gap-2 items-start justify-start ${className}`}>
12
- {media?.map((_, index) => (
13
- <MediaButton key={String(index)} {..._} />
14
- ))}
15
- </div>
16
- ));
14
+ export const SocialMedia = JSX<SocialMediaProps>(
15
+ ({ className = '', media, children, buttonSize }) => (
16
+ <div className="flex flex-col sm:flex-col-reverse gap-xs">
17
+ {children ? (
18
+ <Text size="text-s" font="font-light" color="text-secondary-text">
19
+ {children}
20
+ </Text>
21
+ ) : null}
22
+ <div className={style('flex gap-xs', className)}>
23
+ {media?.map((_, index) => (
24
+ <MediaButton key={String(index)} buttonSize={buttonSize} {..._} />
25
+ ))}
26
+ </div>
27
+ </div>
28
+ ),
29
+ );
@@ -5,13 +5,13 @@ import { TextInformationLink } from './TextInformationLink';
5
5
 
6
6
  export const TextInformation = JSX<FooterLink>(({ className = '', links }) => (
7
7
  <div className={className}>
8
- <div className="pt-4 xl:pt-5">
8
+ <div className="pt-lg">
9
9
  <Text size="text-xs" font="font-light" color="text-secondary-text">
10
10
  {`\u00a9\u00A02000-${new Date().getFullYear()}\u00A0АО \u00ABРоссельхозбанк\u00BB Генеральная лицензия Банка России \u2116\u00A03349 от\u00A012.08.2015\u00A0г.`}
11
11
  </Text>
12
12
  </div>
13
13
  {links?.length ? (
14
- <div className="flex justify-start items-start gap-5 pt-4">
14
+ <div className="flex flex-col sm:flex-row justify-start items-start gap-x-lg gap-y-xs pt-lg">
15
15
  {links.map((_, i) => (
16
16
  <TextInformationLink key={String(i)} index={i} {..._} />
17
17
  ))}
@@ -0,0 +1,6 @@
1
+ import { ButtonSize } from './MediaButton';
2
+
3
+ export const buttonSizeStyles: { [key in ButtonSize]: string } = {
4
+ default: 'w-24 h-14',
5
+ stretched: 'flex-1 h-14',
6
+ };
@@ -1,10 +1,6 @@
1
1
  import { style } from '../../utils/style';
2
2
  import { ButtonSize } from './MediaButton';
3
-
4
- const buttonSizeStyles = {
5
- default: 'w-24 h-14',
6
- small: 'w-12 h-12',
7
- };
3
+ import { buttonSizeStyles } from './buttonSizeStyles';
8
4
 
9
5
  export const buttonStylesWithText = (text: string, buttonSize: ButtonSize) =>
10
6
  text
@@ -2,7 +2,7 @@ import { Text } from '../../ui-kit/Text/Text';
2
2
 
3
3
  export const renderDescription = (description?: string) =>
4
4
  description ? (
5
- <div className="mb-5 pt-3xs sm:mb-0 sm:pt-0">
5
+ <div className="mb-lg pt-3xs">
6
6
  <Text size="text-xl" font-weight="light">
7
7
  {description}
8
8
  </Text>
@@ -127,7 +127,7 @@ const renderPrimaryFoldButton = ({
127
127
  return (
128
128
  <button
129
129
  className={style(
130
- 'border-none bg-transparent px-0 flex justify-between items-center w-full group/button',
130
+ 'border-none bg-transparent flex justify-between items-center w-full group/button',
131
131
  labelIcon?.icon ? 'py-xs' : 'py-lg',
132
132
  )}
133
133
  onClick={onToggle}
@@ -0,0 +1,8 @@
1
+ export interface RegionProps {
2
+ name?: string;
3
+ href?: string;
4
+ }
5
+
6
+ export interface RegionsGrantSupportData {
7
+ regions?: RegionProps[];
8
+ }
@@ -2,9 +2,10 @@ import { JSX } from '@redneckz/uni-jsx';
2
2
  import { useLink } from '../../hooks/useLink';
3
3
  import type { LinkProps } from '../../model/LinkProps';
4
4
  import { Img } from '../Img/Img';
5
+ import { style } from '../../utils/style';
5
6
 
6
- const LINK_CLASS_NAME = `absolute border border-primary-main ml-s px-xl py-lg
7
- text-l font-light bg-white text-primary-text flex w-80
7
+ const LINK_CLASS_NAME = `absolute border border-primary-main px-xl py-lg
8
+ text-l font-light bg-white text-primary-text flex
8
9
  justify-between items-center group-hover/link:text-primary-main z-10`;
9
10
 
10
11
  const LINK_BORDER_CLASS_NAME =
@@ -20,12 +21,24 @@ export const LinkButton = JSX<LinkButtonProps>(
20
21
  const adjustedProps = link({ href, target });
21
22
 
22
23
  return text ? (
23
- <div className={`relative group/link cursor-pointer w-[328px] h-[82px] ${className}`}>
24
- <a className={LINK_CLASS_NAME} role="link" {...adjustedProps}>
25
- <div className="p-3xs">{text}</div>
26
- <div className="w-6 h-6">
24
+ <div
25
+ className={style(
26
+ 'flex max-w-sm relative group/link cursor-pointer w-64 h-16 sm:w-[47%] sm:h-20 sm:mr-m',
27
+ className,
28
+ )}
29
+ >
30
+ <a
31
+ className={style(
32
+ LINK_CLASS_NAME,
33
+ 'rounded-md sm:rounded-none w-full h-12 sm:ml-s sm:w-full sm:h-auto',
34
+ )}
35
+ role="link"
36
+ {...adjustedProps}
37
+ >
38
+ <div className="p-0.5">{text}</div>
39
+ <div className="w-6 h-6 hidden sm:block">
27
40
  <Img
28
- className="w-4 h-4 min-w-4 min-h-4 rounded-full box-border brightness-0 group-hover/link:brightness-100"
41
+ className="w-4 h-4 rounded-full box-border brightness-0 group-hover/link:brightness-100"
29
42
  image={{ icon: 'ArrowRightIcon', iconVersion: 'black' }}
30
43
  imageClassName="group-hover/link:text-primary-main"
31
44
  width="24"
@@ -33,8 +46,8 @@ export const LinkButton = JSX<LinkButtonProps>(
33
46
  />
34
47
  </div>
35
48
  </a>
36
- <div className={`${LINK_BORDER_CLASS_NAME} mx-1.5 mt-1.5`} />
37
- <div className={`${LINK_BORDER_CLASS_NAME} mt-3 mr-3`} />
49
+ <div className={LINK_BORDER_CLASS_NAME + ' hidden sm:block mx-1.5 mt-1.5'} />
50
+ <div className={LINK_BORDER_CLASS_NAME + ' hidden sm:block mt-3 mr-3'} />
38
51
  </div>
39
52
  ) : null;
40
53
  },
@@ -6,7 +6,7 @@ import { linkListStyles } from './linkListStyles';
6
6
 
7
7
  export const LinkList = JSX<LinkListProps>(({ className = '', items }) =>
8
8
  items?.length ? (
9
- <ul className={style('flex flex-col p-0 gap-m sm:gap-xl', linkListStyles, className)}>
9
+ <ul className={style('flex flex-col', linkListStyles, className)}>
10
10
  {items.map(renderLinkListItem)}
11
11
  </ul>
12
12
  ) : null,
@@ -16,8 +16,8 @@ const renderLinkListItem = (item: LinkProps, i: number) => {
16
16
  const { text, ...linkProps } = item;
17
17
 
18
18
  return (
19
- <li key={`list_item_${String(i)}`} className="list-none">
20
- <a className="hover:text-primary-main sm:font-light" role="link" {...linkProps}>
19
+ <li key={`list_item_${String(i)}`} className="list-none my-xs">
20
+ <a className="hover:text-primary-main font-light" role="link" {...linkProps}>
21
21
  {text ? text : null}
22
22
  </a>
23
23
  </li>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redneckz/wildless-cms-uni-blocks",
3
- "version": "0.12.12",
3
+ "version": "0.12.13",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "author": "ЦК",
package/src/common.css CHANGED
@@ -249,7 +249,7 @@ html {
249
249
  }
250
250
 
251
251
  .md-container strong {
252
- @apply font-bold;
252
+ @apply font-normal;
253
253
  }
254
254
 
255
255
  .striped.md-container table {
@@ -1,9 +1,9 @@
1
1
  import '../../setup-fixture';
2
2
 
3
3
  import { ApplicationForm } from './ApplicationForm';
4
- import type { ApplicationFormContent } from './ApplicationFormContent';
4
+ import type { ApplicationFormBlockDef, ApplicationFormContent } from './ApplicationFormContent';
5
5
 
6
- const ApplicationFormProps: ApplicationFormContent = {
6
+ const formBlockProps: ApplicationFormBlockDef = {
7
7
  title: 'Форма заявки',
8
8
  button: {
9
9
  text: 'Отправить заявку',
@@ -13,32 +13,66 @@ const ApplicationFormProps: ApplicationFormContent = {
13
13
  text: 'условиями передачи данных',
14
14
  href: '#',
15
15
  },
16
+ formType: 'ApplicationFormCredit',
17
+ };
18
+
19
+ const ApplicationFormCredit: ApplicationFormContent = {
20
+ formBlock: { ...formBlockProps, formType: 'ApplicationFormCredit' },
21
+ };
22
+
23
+ const ApplicationFormAcquiring: ApplicationFormContent = {
24
+ formBlock: { ...formBlockProps, formType: 'ApplicationFormAcquiring' },
25
+ };
26
+
27
+ const ApplicationFormBusinessCard: ApplicationFormContent = {
28
+ formBlock: { ...formBlockProps, formType: 'ApplicationFormBusinessCard' },
29
+ };
30
+
31
+ const ApplicationFormDeposit: ApplicationFormContent = {
32
+ formBlock: { ...formBlockProps, formType: 'ApplicationFormDeposit' },
33
+ };
34
+
35
+ const ApplicationFormWed: ApplicationFormContent = {
36
+ formBlock: { ...formBlockProps, formType: 'ApplicationFormWed' },
37
+ };
38
+
39
+ const ApplicationFormGrantSupport: ApplicationFormContent = {
40
+ formBlock: {
41
+ ...formBlockProps,
42
+ formType: 'ApplicationFormGrantSupport',
43
+ sourceBookDir: 'regions-grant-support',
44
+ },
16
45
  };
17
46
 
18
47
  export default {
19
48
  credit: (
20
49
  <div className="container grid grid-cols-12">
21
- <ApplicationForm className="col-span-12" {...ApplicationFormProps} typeForm="credit" />
50
+ <ApplicationForm className="col-span-12" {...ApplicationFormCredit} />
22
51
  </div>
23
52
  ),
24
53
  acquiring: (
25
54
  <div className="container grid grid-cols-12">
26
- <ApplicationForm className="col-span-12" {...ApplicationFormProps} typeForm="acquiring" />
55
+ <ApplicationForm className="col-span-12" {...ApplicationFormAcquiring} />
27
56
  </div>
28
57
  ),
29
58
  'business-card': (
30
59
  <div className="container grid grid-cols-12">
31
- <ApplicationForm className="col-span-12" {...ApplicationFormProps} typeForm="business-card" />
60
+ <ApplicationForm className="col-span-12" {...ApplicationFormBusinessCard} />
32
61
  </div>
33
62
  ),
34
63
  deposit: (
35
64
  <div className="container grid grid-cols-12">
36
- <ApplicationForm className="col-span-12" {...ApplicationFormProps} typeForm="deposit" />
65
+ <ApplicationForm className="col-span-12" {...ApplicationFormDeposit} />
37
66
  </div>
38
67
  ),
39
68
  wed: (
40
69
  <div className="container grid grid-cols-12">
41
- <ApplicationForm className="col-span-12" {...ApplicationFormProps} typeForm="wed" />
70
+ <ApplicationForm className="col-span-12" {...ApplicationFormWed} />
71
+ </div>
72
+ ),
73
+ 'grant-support': (
74
+ <div className="container grid grid-cols-12">
75
+ <ApplicationForm className="col-span-12" {...ApplicationFormGrantSupport} />
42
76
  </div>
43
77
  ),
44
78
  };
@@ -1,9 +1,9 @@
1
1
  import '../../setup-fixture';
2
2
 
3
3
  import { ApplicationForm } from './ApplicationForm';
4
- import type { ApplicationFormContent } from './ApplicationFormContent';
4
+ import type { ApplicationFormBlockDef, ApplicationFormContent } from './ApplicationFormContent';
5
5
 
6
- const ApplicationFormProps: ApplicationFormContent = {
6
+ const formBlockProps: ApplicationFormBlockDef = {
7
7
  title: 'Форма заявки',
8
8
  button: {
9
9
  text: 'Отправить заявку',
@@ -13,32 +13,66 @@ const ApplicationFormProps: ApplicationFormContent = {
13
13
  text: 'условиями передачи данных',
14
14
  href: '#',
15
15
  },
16
+ formType: 'ApplicationFormCredit',
17
+ };
18
+
19
+ const ApplicationFormCredit: ApplicationFormContent = {
20
+ formBlock: { ...formBlockProps, formType: 'ApplicationFormCredit' },
21
+ };
22
+
23
+ const ApplicationFormAcquiring: ApplicationFormContent = {
24
+ formBlock: { ...formBlockProps, formType: 'ApplicationFormAcquiring' },
25
+ };
26
+
27
+ const ApplicationFormBusinessCard: ApplicationFormContent = {
28
+ formBlock: { ...formBlockProps, formType: 'ApplicationFormBusinessCard' },
29
+ };
30
+
31
+ const ApplicationFormDeposit: ApplicationFormContent = {
32
+ formBlock: { ...formBlockProps, formType: 'ApplicationFormDeposit' },
33
+ };
34
+
35
+ const ApplicationFormWed: ApplicationFormContent = {
36
+ formBlock: { ...formBlockProps, formType: 'ApplicationFormWed' },
37
+ };
38
+
39
+ const ApplicationFormGrantSupport: ApplicationFormContent = {
40
+ formBlock: {
41
+ ...formBlockProps,
42
+ formType: 'ApplicationFormGrantSupport',
43
+ sourceBookDir: 'regions-grant-support',
44
+ },
16
45
  };
17
46
 
18
47
  export default {
19
48
  credit: (
20
49
  <div className="container grid grid-cols-12">
21
- <ApplicationForm className="col-span-12" {...ApplicationFormProps} typeForm="credit" />
50
+ <ApplicationForm className="col-span-12" {...ApplicationFormCredit} />
22
51
  </div>
23
52
  ),
24
53
  acquiring: (
25
54
  <div className="container grid grid-cols-12">
26
- <ApplicationForm className="col-span-12" {...ApplicationFormProps} typeForm="acquiring" />
55
+ <ApplicationForm className="col-span-12" {...ApplicationFormAcquiring} />
27
56
  </div>
28
57
  ),
29
58
  'business-card': (
30
59
  <div className="container grid grid-cols-12">
31
- <ApplicationForm className="col-span-12" {...ApplicationFormProps} typeForm="business-card" />
60
+ <ApplicationForm className="col-span-12" {...ApplicationFormBusinessCard} />
32
61
  </div>
33
62
  ),
34
63
  deposit: (
35
64
  <div className="container grid grid-cols-12">
36
- <ApplicationForm className="col-span-12" {...ApplicationFormProps} typeForm="deposit" />
65
+ <ApplicationForm className="col-span-12" {...ApplicationFormDeposit} />
37
66
  </div>
38
67
  ),
39
68
  wed: (
40
69
  <div className="container grid grid-cols-12">
41
- <ApplicationForm className="col-span-12" {...ApplicationFormProps} typeForm="wed" />
70
+ <ApplicationForm className="col-span-12" {...ApplicationFormWed} />
71
+ </div>
72
+ ),
73
+ 'grant-support': (
74
+ <div className="container grid grid-cols-12">
75
+ <ApplicationForm className="col-span-12" {...ApplicationFormGrantSupport} />
42
76
  </div>
43
77
  ),
44
78
  };
@@ -4,29 +4,22 @@ import { CorporateLeadAPI } from '../../api/CorporateLeadAPI';
4
4
  import type { UniBlockProps } from '../../model/JSXBlock';
5
5
  import { BlockWrapper } from '../../ui-kit/BlockWrapper';
6
6
  import { Heading } from '../../ui-kit/Heading/Heading';
7
- import { ApplicationFormAcquiring } from './ApplicationFormAcquiring';
8
- import { ApplicationFormBusinessCard } from './ApplicationFormBusinessCard';
9
- import type { ApplicationFormContent } from './ApplicationFormContent';
10
- import { ApplicationFormCredit } from './ApplicationFormCredit';
11
- import { ApplicationFormDeposit } from './ApplicationFormDeposit';
12
- import type { ApplicationFormsProps } from './ApplicationFormsProps';
13
- import { ApplicationFormWed } from './ApplicationFormWed';
7
+ import type { ApplicationFormBlockDef, ApplicationFormContent } from './ApplicationFormContent';
8
+ import { EmbeddableForms } from './EmbeddableForms';
14
9
  import { ResponseNotification } from './ResponseNotification';
15
10
 
16
11
  export interface ApplicationFormProps extends ApplicationFormContent, UniBlockProps {}
17
12
 
18
- const COMPONENTS_MAP = {
19
- credit: (props: ApplicationFormsProps) => <ApplicationFormCredit {...props} />,
20
- acquiring: (props: ApplicationFormsProps) => <ApplicationFormAcquiring {...props} />,
21
- 'business-card': (props: ApplicationFormsProps) => <ApplicationFormBusinessCard {...props} />,
22
- deposit: (props: ApplicationFormsProps) => <ApplicationFormDeposit {...props} />,
23
- wed: (props: ApplicationFormsProps) => <ApplicationFormWed {...props} />,
24
- };
25
-
26
13
  const API = CorporateLeadAPI();
27
14
 
28
15
  export const ApplicationForm = JSX<ApplicationFormProps>((props) => {
29
- const { className, title, typeForm = 'credit', button, link, ...rest } = props;
16
+ const { className, formBlock, ...rest } = props;
17
+
18
+ // const type = formBlock?.formType;
19
+ // if (!type || !(type in EmbeddableForms)) {
20
+ // return null;
21
+ // }
22
+ // const EmbeddedForm = EmbeddableForms[type];
30
23
 
31
24
  const [responseType, setResponseType] = useState<'OK' | 'Fail' | ''>('');
32
25
 
@@ -40,12 +33,31 @@ export const ApplicationForm = JSX<ApplicationFormProps>((props) => {
40
33
  return (
41
34
  <BlockWrapper className={className} defaultPadding="p-6xl" {...rest}>
42
35
  <div className="container max-w-[978px]">
43
- {title ? (
44
- <Heading headingType="h3" title={title} className="mb-4 sm:mb-8 sm:text-center" />
36
+ {formBlock?.title ? (
37
+ <Heading
38
+ headingType="h3"
39
+ title={formBlock.title}
40
+ className="mb-4 sm:mb-8 sm:text-center"
41
+ />
45
42
  ) : null}
46
- {COMPONENTS_MAP[typeForm]({ button, link, onSubmit: handleSubmit })}
43
+ {/* <EmbeddedForm {...formBlock} onSubmit={handleSubmit} /> */}
44
+ {formBlock ? renderEmbeddedForm(formBlock, handleSubmit) : null}
45
+ {/* {COMPONENTS_MAP[typeForm]({ button, link, onSubmit: handleSubmit })} */}
47
46
  {responseType ? <ResponseNotification responseType={responseType} /> : null}
48
47
  </div>
49
48
  </BlockWrapper>
50
49
  );
51
50
  });
51
+
52
+ const renderEmbeddedForm = (
53
+ formBlock: ApplicationFormBlockDef,
54
+ handleSubmit: (data: Record<string, string>) => Promise<'OK' | 'Fail'>,
55
+ ) => {
56
+ const type = formBlock?.formType;
57
+ if (!type || !(type in EmbeddableForms)) {
58
+ return null;
59
+ }
60
+ const EmbeddedForm = EmbeddableForms[type];
61
+
62
+ return <EmbeddedForm {...formBlock} onSubmit={handleSubmit} />;
63
+ };
@@ -0,0 +1,12 @@
1
+ {
2
+ "content": {
3
+ "formBlock": {
4
+ "formType": {
5
+ "ui:widget": "hidden"
6
+ },
7
+ "sourceBookDir": {
8
+ "ui:widget": "sourceBook"
9
+ }
10
+ }
11
+ }
12
+ }
@@ -13,17 +13,76 @@ export interface SubmitButtonProps extends ButtonAdditionalProps {
13
13
  version?: ButtonVersion;
14
14
  }
15
15
 
16
+ export type CommonApplicationFormProps = TitleProps & {
17
+ button?: SubmitButtonProps;
18
+ /** @title Условия передачи данных */
19
+ link?: LinkProps;
20
+ };
21
+
22
+ export type ApplicationFormBlockDef =
23
+ | BusinessCardFormParamsDef
24
+ | WedFormParamsDef
25
+ | DepositFormParamsDef
26
+ | CreditFormParamsDef
27
+ | AcquiringFormParamsDef
28
+ | GrantSupportFormParamsDef;
29
+
30
+ /**
31
+ * @title Бизнес-карта
32
+ * @default {"formType": "ApplicationFormBusinessCard"}
33
+ */
34
+ export type BusinessCardFormParamsDef = CommonApplicationFormProps & {
35
+ formType: 'ApplicationFormBusinessCard';
36
+ };
37
+
38
+ /**
39
+ * @title ВЭД
40
+ * @default {"formType": "ApplicationFormWed"}
41
+ */
42
+ export type WedFormParamsDef = CommonApplicationFormProps & {
43
+ formType: 'ApplicationFormWed';
44
+ };
45
+
46
+ /**
47
+ * @title Депозит
48
+ * @default {"formType": "ApplicationFormDeposit"}
49
+ */
50
+ export type DepositFormParamsDef = CommonApplicationFormProps & {
51
+ formType: 'ApplicationFormDeposit';
52
+ };
53
+
54
+ /**
55
+ * @title Кредит
56
+ * @default {"formType": "ApplicationFormCredit"}
57
+ */
58
+ export type CreditFormParamsDef = CommonApplicationFormProps & {
59
+ formType: 'ApplicationFormCredit';
60
+ };
61
+
62
+ /**
63
+ * @title Эквайринг
64
+ * @default {"formType": "ApplicationFormAcquiring"}
65
+ */
66
+ export type AcquiringFormParamsDef = CommonApplicationFormProps & {
67
+ formType: 'ApplicationFormAcquiring';
68
+ };
69
+
70
+ /**
71
+ * @title Грантовая поддержка
72
+ * @default {"formType": "ApplicationFormGrantSupport"}
73
+ */
74
+ export type GrantSupportFormParamsDef = CommonApplicationFormProps & {
75
+ formType: 'ApplicationFormGrantSupport';
76
+ /** @title Адрес справочника */
77
+ sourceBookDir?: string;
78
+ };
79
+
16
80
  /**
17
81
  * @title Форма заявки
18
82
  */
19
- export type ApplicationFormContent = UniBlockContent &
20
- TitleProps & {
21
- /**
22
- * @title Вид заявки
23
- * @enumNames ["Бизнес-карта", "ВЭД", "Депозит", "Кредит", "Эквайринг"]
24
- */
25
- typeForm?: 'business-card' | 'wed' | 'deposit' | 'credit' | 'acquiring';
26
- button?: SubmitButtonProps;
27
- /** @title Условия передачи данных */
28
- link?: LinkProps;
29
- };
83
+ export type ApplicationFormContent = UniBlockContent & {
84
+ /**
85
+ * @title Вид заявки
86
+ */
87
+ formBlock?: ApplicationFormBlockDef;
88
+ };
@@ -0,0 +1,51 @@
1
+ import { JSX } from '@redneckz/uni-jsx';
2
+ import { useState } from '@redneckz/uni-jsx/lib/hooks';
3
+ import { useSWRResource } from '../../hooks/useSWRResource';
4
+ import { RegionsGrantSupportData } from '../../services/regionsGrantSupport/RegionsGrantSupportData';
5
+ import { Button } from '../../ui-kit/Button/Button';
6
+ import { getRegularButtonClasses } from '../../ui-kit/Button/getRegularButtonClasses';
7
+ import { style } from '../../utils/style';
8
+ import type { ApplicationFormsProps } from './ApplicationFormsProps';
9
+ import { SelectControl } from './SelectControl';
10
+
11
+ export const ApplicationFormGrantSupport = JSX<ApplicationFormsProps>((props) => {
12
+ const { button, sourceBookDir } = props;
13
+
14
+ const { regions } = useSWRResource<RegionsGrantSupportData>(
15
+ sourceBookDir || 'regions-grant-support',
16
+ );
17
+
18
+ const [region, setRegion] = useState({ key: '' });
19
+
20
+ const buttonStyle = getRegularButtonClasses({
21
+ className: 'text-white',
22
+ version: button?.version,
23
+ });
24
+
25
+ const regionHref = regions?.find((_) => _.name === region.key)?.href;
26
+
27
+ return (
28
+ <div className="container space-y-s sm:space-y-lg">
29
+ {regions ? (
30
+ <SelectControl
31
+ label="Ваш регион"
32
+ placeholder="Выберите регион"
33
+ options={regions.map(({ name = '' }) => ({ key: name }))}
34
+ value={region}
35
+ onChange={setRegion}
36
+ />
37
+ ) : null}
38
+ {regionHref ? (
39
+ <div className="text-center">
40
+ <Button
41
+ href={regionHref}
42
+ target="_blank"
43
+ className={style('p-4 w-full sm:w-auto', buttonStyle)}
44
+ >
45
+ {button?.text ? button.text : 'Перейти'}
46
+ </Button>
47
+ </div>
48
+ ) : null}
49
+ </div>
50
+ );
51
+ });
@@ -4,5 +4,6 @@ import type { SubmitButtonProps } from './ApplicationFormContent';
4
4
  export interface ApplicationFormsProps<S extends Record<string, any> = Record<string, any>> {
5
5
  button?: SubmitButtonProps;
6
6
  link?: LinkProps;
7
+ sourceBookDir?: string;
7
8
  onSubmit: (data: S) => void;
8
9
  }
@@ -0,0 +1,15 @@
1
+ import { ApplicationFormAcquiring } from './ApplicationFormAcquiring';
2
+ import { ApplicationFormBusinessCard } from './ApplicationFormBusinessCard';
3
+ import { ApplicationFormCredit } from './ApplicationFormCredit';
4
+ import { ApplicationFormDeposit } from './ApplicationFormDeposit';
5
+ import { ApplicationFormGrantSupport } from './ApplicationFormGrantSupport';
6
+ import { ApplicationFormWed } from './ApplicationFormWed';
7
+
8
+ export const EmbeddableForms = {
9
+ ApplicationFormBusinessCard,
10
+ ApplicationFormWed,
11
+ ApplicationFormDeposit,
12
+ ApplicationFormCredit,
13
+ ApplicationFormAcquiring,
14
+ ApplicationFormGrantSupport,
15
+ };