@redneckz/wildless-cms-uni-blocks 0.9.16 → 0.10.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 (566) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +372 -223
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/bundle/components/ApplicationForm/InputControl.d.ts +10 -0
  5. package/bundle/components/ApplicationForm/{WrapperSelect.d.ts → SelectControl.d.ts} +4 -2
  6. package/bundle/components/ApplicationForm/models.d.ts +5 -0
  7. package/bundle/components/ApplicationForm/normalizeSelected.d.ts +2 -0
  8. package/bundle/components/ApplicationForm/renderAcquiringDataOrganization.d.ts +11 -0
  9. package/{lib/components/ApplicationForm/renderSelects.d.ts → bundle/components/ApplicationForm/renderAcquiringRegion.d.ts} +4 -2
  10. package/bundle/components/ApplicationForm/renderBusinessCardDataOrganization.d.ts +11 -0
  11. package/bundle/components/ApplicationForm/renderCreditDataOrganization.d.ts +13 -0
  12. package/bundle/components/ApplicationForm/renderRegion.d.ts +12 -0
  13. package/{dist/components/ApplicationForm/renderBankOffices.d.ts → bundle/components/ApplicationForm/renderRegionDepartment.d.ts} +4 -2
  14. package/bundle/components/ApplicationForm/renderWedDataOrganization.d.ts +11 -0
  15. package/bundle/components/ApplicationForm/useForm.d.ts +14 -0
  16. package/bundle/components/ApplicationForm/validate.d.ts +1 -0
  17. package/bundle/components/Carousel/CarouselContent.d.ts +2 -0
  18. package/bundle/components/ExchangeRateOffice/Currencies.d.ts +8 -0
  19. package/bundle/components/ExchangeRateOffice/ExchangeRateOffice.d.ts +5 -0
  20. package/bundle/components/ExchangeRateOffice/ExchangeRateOfficeContent.d.ts +36 -0
  21. package/bundle/components/ExchangeRateOffice/renderCurrencies.d.ts +3 -0
  22. package/bundle/components/ExchangeRateOffice/renderTableHeader.d.ts +2 -0
  23. package/bundle/ui-kit/RichText/RichTextProps.d.ts +2 -2
  24. package/bundle/ui-kit/Select/Select.d.ts +2 -0
  25. package/dist/components/ApplicationForm/ApplicationForm.js +3 -3
  26. package/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
  27. package/dist/components/ApplicationForm/ApplicationFormAcquiring.js +47 -40
  28. package/dist/components/ApplicationForm/ApplicationFormAcquiring.js.map +1 -1
  29. package/dist/components/ApplicationForm/ApplicationFormBusinessCard.js +34 -28
  30. package/dist/components/ApplicationForm/ApplicationFormBusinessCard.js.map +1 -1
  31. package/dist/components/ApplicationForm/ApplicationFormCredit.js +52 -41
  32. package/dist/components/ApplicationForm/ApplicationFormCredit.js.map +1 -1
  33. package/dist/components/ApplicationForm/ApplicationFormDeposit.js +24 -17
  34. package/dist/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
  35. package/dist/components/ApplicationForm/ApplicationFormWed.js +38 -25
  36. package/dist/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
  37. package/dist/components/ApplicationForm/InputControl.d.ts +10 -0
  38. package/dist/components/ApplicationForm/InputControl.js +10 -0
  39. package/dist/components/ApplicationForm/InputControl.js.map +1 -0
  40. package/{lib/components/ApplicationForm/WrapperSelect.d.ts → dist/components/ApplicationForm/SelectControl.d.ts} +4 -2
  41. package/dist/components/ApplicationForm/SelectControl.js +14 -0
  42. package/dist/components/ApplicationForm/SelectControl.js.map +1 -0
  43. package/dist/components/ApplicationForm/models.d.ts +5 -0
  44. package/dist/components/ApplicationForm/normalizeSelected.d.ts +2 -0
  45. package/dist/components/ApplicationForm/normalizeSelected.js +5 -0
  46. package/dist/components/ApplicationForm/normalizeSelected.js.map +1 -0
  47. package/dist/components/ApplicationForm/renderAcquiringDataOrganization.d.ts +11 -0
  48. package/dist/components/ApplicationForm/renderAcquiringDataOrganization.js +8 -0
  49. package/dist/components/ApplicationForm/renderAcquiringDataOrganization.js.map +1 -0
  50. package/{bundle/components/ApplicationForm/renderSelects.d.ts → dist/components/ApplicationForm/renderAcquiringRegion.d.ts} +4 -2
  51. package/dist/components/ApplicationForm/renderAcquiringRegion.js +9 -0
  52. package/dist/components/ApplicationForm/renderAcquiringRegion.js.map +1 -0
  53. package/dist/components/ApplicationForm/renderBusinessCardDataOrganization.d.ts +11 -0
  54. package/dist/components/ApplicationForm/renderBusinessCardDataOrganization.js +8 -0
  55. package/dist/components/ApplicationForm/renderBusinessCardDataOrganization.js.map +1 -0
  56. package/dist/components/ApplicationForm/renderCreditDataOrganization.d.ts +13 -0
  57. package/dist/components/ApplicationForm/renderCreditDataOrganization.js +8 -0
  58. package/dist/components/ApplicationForm/renderCreditDataOrganization.js.map +1 -0
  59. package/dist/components/ApplicationForm/renderRegion.d.ts +12 -0
  60. package/dist/components/ApplicationForm/renderRegion.js +8 -0
  61. package/dist/components/ApplicationForm/renderRegion.js.map +1 -0
  62. package/{lib/components/ApplicationForm/renderBankOffices.d.ts → dist/components/ApplicationForm/renderRegionDepartment.d.ts} +4 -2
  63. package/dist/components/ApplicationForm/renderRegionDepartment.js +8 -0
  64. package/dist/components/ApplicationForm/renderRegionDepartment.js.map +1 -0
  65. package/dist/components/ApplicationForm/renderWedDataOrganization.d.ts +11 -0
  66. package/dist/components/ApplicationForm/renderWedDataOrganization.js +8 -0
  67. package/dist/components/ApplicationForm/renderWedDataOrganization.js.map +1 -0
  68. package/dist/components/ApplicationForm/useForm.d.ts +14 -0
  69. package/dist/components/ApplicationForm/useForm.js +37 -0
  70. package/dist/components/ApplicationForm/useForm.js.map +1 -0
  71. package/dist/components/ApplicationForm/validate.d.ts +1 -0
  72. package/dist/components/ApplicationForm/validate.js +22 -0
  73. package/dist/components/ApplicationForm/validate.js.map +1 -0
  74. package/dist/components/Blocks.js +2 -0
  75. package/dist/components/Blocks.js.map +1 -1
  76. package/dist/components/Bonus/Bonus.js +5 -3
  77. package/dist/components/Bonus/Bonus.js.map +1 -1
  78. package/dist/components/Carousel/Carousel.js +4 -3
  79. package/dist/components/Carousel/Carousel.js.map +1 -1
  80. package/dist/components/Carousel/CarouselContent.d.ts +2 -0
  81. package/dist/components/CarouselRichTextCard/CarouselRichTextCard.js +1 -3
  82. package/dist/components/CarouselRichTextCard/CarouselRichTextCard.js.map +1 -1
  83. package/dist/components/CarouselTariffsCard/CarouselTariffsCard.js +2 -2
  84. package/dist/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
  85. package/dist/components/ExchangeRateOffice/Currencies.d.ts +8 -0
  86. package/dist/components/ExchangeRateOffice/Currencies.js +12 -0
  87. package/dist/components/ExchangeRateOffice/Currencies.js.map +1 -0
  88. package/dist/components/ExchangeRateOffice/ExchangeRateOffice.d.ts +5 -0
  89. package/dist/components/ExchangeRateOffice/ExchangeRateOffice.js +16 -0
  90. package/dist/components/ExchangeRateOffice/ExchangeRateOffice.js.map +1 -0
  91. package/dist/components/ExchangeRateOffice/ExchangeRateOfficeContent.d.ts +36 -0
  92. package/dist/components/ExchangeRateOffice/ExchangeRateOfficeContent.js +2 -0
  93. package/dist/components/ExchangeRateOffice/ExchangeRateOfficeContent.js.map +1 -0
  94. package/dist/components/ExchangeRateOffice/renderCurrencies.d.ts +3 -0
  95. package/dist/components/ExchangeRateOffice/renderCurrencies.js +30 -0
  96. package/dist/components/ExchangeRateOffice/renderCurrencies.js.map +1 -0
  97. package/dist/components/ExchangeRateOffice/renderTableHeader.d.ts +2 -0
  98. package/dist/components/ExchangeRateOffice/renderTableHeader.js +9 -0
  99. package/dist/components/ExchangeRateOffice/renderTableHeader.js.map +1 -0
  100. package/dist/components/RichTextBlock/RichTextBlock.js +2 -2
  101. package/dist/components/RichTextBlock/RichTextBlock.js.map +1 -1
  102. package/dist/components/TariffsTable/EmbeddableCellData.js +1 -3
  103. package/dist/components/TariffsTable/EmbeddableCellData.js.map +1 -1
  104. package/dist/ui-kit/Button/getRegularButtonClasses.js +1 -1
  105. package/dist/ui-kit/Button/getRegularButtonClasses.js.map +1 -1
  106. package/dist/ui-kit/Button/renderButtonsSection.js +2 -2
  107. package/dist/ui-kit/Button/renderButtonsSection.js.map +1 -1
  108. package/dist/ui-kit/RichText/RichText.js +3 -2
  109. package/dist/ui-kit/RichText/RichText.js.map +1 -1
  110. package/dist/ui-kit/RichText/RichTextProps.d.ts +2 -2
  111. package/dist/ui-kit/Select/Select.d.ts +2 -0
  112. package/dist/ui-kit/Select/Select.js +5 -3
  113. package/dist/ui-kit/Select/Select.js.map +1 -1
  114. package/lib/common.css +1 -1
  115. package/lib/components/ApplicationForm/ApplicationForm.js +3 -3
  116. package/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
  117. package/lib/components/ApplicationForm/ApplicationFormAcquiring.js +47 -40
  118. package/lib/components/ApplicationForm/ApplicationFormAcquiring.js.map +1 -1
  119. package/lib/components/ApplicationForm/ApplicationFormBusinessCard.js +34 -28
  120. package/lib/components/ApplicationForm/ApplicationFormBusinessCard.js.map +1 -1
  121. package/lib/components/ApplicationForm/ApplicationFormCredit.js +53 -42
  122. package/lib/components/ApplicationForm/ApplicationFormCredit.js.map +1 -1
  123. package/lib/components/ApplicationForm/ApplicationFormDeposit.js +24 -17
  124. package/lib/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
  125. package/lib/components/ApplicationForm/ApplicationFormWed.js +38 -25
  126. package/lib/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
  127. package/lib/components/ApplicationForm/InputControl.d.ts +10 -0
  128. package/lib/components/ApplicationForm/InputControl.js +8 -0
  129. package/lib/components/ApplicationForm/InputControl.js.map +1 -0
  130. package/{mobile/bundle/components/ApplicationForm/WrapperSelect.d.ts → lib/components/ApplicationForm/SelectControl.d.ts} +4 -2
  131. package/lib/components/ApplicationForm/SelectControl.js +12 -0
  132. package/lib/components/ApplicationForm/SelectControl.js.map +1 -0
  133. package/lib/components/ApplicationForm/models.d.ts +5 -0
  134. package/lib/components/ApplicationForm/normalizeSelected.d.ts +2 -0
  135. package/lib/components/ApplicationForm/normalizeSelected.js +2 -0
  136. package/lib/components/ApplicationForm/normalizeSelected.js.map +1 -0
  137. package/lib/components/ApplicationForm/renderAcquiringDataOrganization.d.ts +11 -0
  138. package/lib/components/ApplicationForm/renderAcquiringDataOrganization.js +5 -0
  139. package/lib/components/ApplicationForm/renderAcquiringDataOrganization.js.map +1 -0
  140. package/{mobile/bundle/components/ApplicationForm/renderSelects.d.ts → lib/components/ApplicationForm/renderAcquiringRegion.d.ts} +4 -2
  141. package/lib/components/ApplicationForm/renderAcquiringRegion.js +6 -0
  142. package/lib/components/ApplicationForm/renderAcquiringRegion.js.map +1 -0
  143. package/lib/components/ApplicationForm/renderBusinessCardDataOrganization.d.ts +11 -0
  144. package/lib/components/ApplicationForm/renderBusinessCardDataOrganization.js +5 -0
  145. package/lib/components/ApplicationForm/renderBusinessCardDataOrganization.js.map +1 -0
  146. package/lib/components/ApplicationForm/renderCreditDataOrganization.d.ts +13 -0
  147. package/lib/components/ApplicationForm/renderCreditDataOrganization.js +5 -0
  148. package/lib/components/ApplicationForm/renderCreditDataOrganization.js.map +1 -0
  149. package/lib/components/ApplicationForm/renderRegion.d.ts +12 -0
  150. package/lib/components/ApplicationForm/renderRegion.js +5 -0
  151. package/lib/components/ApplicationForm/renderRegion.js.map +1 -0
  152. package/{bundle/components/ApplicationForm/renderBankOffices.d.ts → lib/components/ApplicationForm/renderRegionDepartment.d.ts} +4 -2
  153. package/lib/components/ApplicationForm/renderRegionDepartment.js +5 -0
  154. package/lib/components/ApplicationForm/renderRegionDepartment.js.map +1 -0
  155. package/lib/components/ApplicationForm/renderWedDataOrganization.d.ts +11 -0
  156. package/lib/components/ApplicationForm/renderWedDataOrganization.js +5 -0
  157. package/lib/components/ApplicationForm/renderWedDataOrganization.js.map +1 -0
  158. package/lib/components/ApplicationForm/useForm.d.ts +14 -0
  159. package/lib/components/ApplicationForm/useForm.js +34 -0
  160. package/lib/components/ApplicationForm/useForm.js.map +1 -0
  161. package/lib/components/ApplicationForm/validate.d.ts +1 -0
  162. package/lib/components/ApplicationForm/validate.js +19 -0
  163. package/lib/components/ApplicationForm/validate.js.map +1 -0
  164. package/lib/components/Blocks.js +2 -0
  165. package/lib/components/Blocks.js.map +1 -1
  166. package/lib/components/Bonus/Bonus.js +5 -3
  167. package/lib/components/Bonus/Bonus.js.map +1 -1
  168. package/lib/components/Carousel/Carousel.js +4 -3
  169. package/lib/components/Carousel/Carousel.js.map +1 -1
  170. package/lib/components/Carousel/CarouselContent.d.ts +2 -0
  171. package/lib/components/CarouselRichTextCard/CarouselRichTextCard.js +1 -3
  172. package/lib/components/CarouselRichTextCard/CarouselRichTextCard.js.map +1 -1
  173. package/lib/components/CarouselTariffsCard/CarouselTariffsCard.js +2 -2
  174. package/lib/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
  175. package/lib/components/ExchangeRateOffice/Currencies.d.ts +8 -0
  176. package/lib/components/ExchangeRateOffice/Currencies.js +10 -0
  177. package/lib/components/ExchangeRateOffice/Currencies.js.map +1 -0
  178. package/lib/components/ExchangeRateOffice/ExchangeRateOffice.d.ts +5 -0
  179. package/lib/components/ExchangeRateOffice/ExchangeRateOffice.fixture.d.ts +6 -0
  180. package/lib/components/ExchangeRateOffice/ExchangeRateOffice.js +14 -0
  181. package/lib/components/ExchangeRateOffice/ExchangeRateOffice.js.map +1 -0
  182. package/lib/components/ExchangeRateOffice/ExchangeRateOfficeContent.d.ts +36 -0
  183. package/lib/components/ExchangeRateOffice/ExchangeRateOfficeContent.js +2 -0
  184. package/lib/components/ExchangeRateOffice/ExchangeRateOfficeContent.js.map +1 -0
  185. package/lib/components/ExchangeRateOffice/renderCurrencies.d.ts +3 -0
  186. package/lib/components/ExchangeRateOffice/renderCurrencies.js +27 -0
  187. package/lib/components/ExchangeRateOffice/renderCurrencies.js.map +1 -0
  188. package/lib/components/ExchangeRateOffice/renderTableHeader.d.ts +2 -0
  189. package/lib/components/ExchangeRateOffice/renderTableHeader.js +6 -0
  190. package/lib/components/ExchangeRateOffice/renderTableHeader.js.map +1 -0
  191. package/lib/components/RichTextBlock/RichTextBlock.fixture.d.ts +3 -0
  192. package/lib/components/RichTextBlock/RichTextBlock.js +2 -2
  193. package/lib/components/RichTextBlock/RichTextBlock.js.map +1 -1
  194. package/lib/components/TariffsTable/EmbeddableCellData.js +1 -3
  195. package/lib/components/TariffsTable/EmbeddableCellData.js.map +1 -1
  196. package/lib/ui-kit/Button/getRegularButtonClasses.js +1 -1
  197. package/lib/ui-kit/Button/getRegularButtonClasses.js.map +1 -1
  198. package/lib/ui-kit/Button/renderButtonsSection.js +2 -2
  199. package/lib/ui-kit/Button/renderButtonsSection.js.map +1 -1
  200. package/lib/ui-kit/RichText/RichText.js +3 -2
  201. package/lib/ui-kit/RichText/RichText.js.map +1 -1
  202. package/lib/ui-kit/RichText/RichTextProps.d.ts +2 -2
  203. package/lib/ui-kit/Select/Select.d.ts +2 -0
  204. package/lib/ui-kit/Select/Select.js +5 -3
  205. package/lib/ui-kit/Select/Select.js.map +1 -1
  206. package/mobile/bundle/bundle.umd.js +6 -6
  207. package/mobile/bundle/bundle.umd.min.js +1 -1
  208. package/mobile/bundle/components/ApplicationForm/InputControl.d.ts +10 -0
  209. package/{dist/components/ApplicationForm/WrapperSelect.d.ts → mobile/bundle/components/ApplicationForm/SelectControl.d.ts} +4 -2
  210. package/mobile/bundle/components/ApplicationForm/models.d.ts +5 -0
  211. package/mobile/bundle/components/ApplicationForm/normalizeSelected.d.ts +2 -0
  212. package/mobile/bundle/components/ApplicationForm/renderAcquiringDataOrganization.d.ts +11 -0
  213. package/{dist/components/ApplicationForm/renderSelects.d.ts → mobile/bundle/components/ApplicationForm/renderAcquiringRegion.d.ts} +4 -2
  214. package/mobile/bundle/components/ApplicationForm/renderBusinessCardDataOrganization.d.ts +11 -0
  215. package/mobile/bundle/components/ApplicationForm/renderCreditDataOrganization.d.ts +13 -0
  216. package/mobile/bundle/components/ApplicationForm/renderRegion.d.ts +12 -0
  217. package/mobile/bundle/components/ApplicationForm/{renderBankOffices.d.ts → renderRegionDepartment.d.ts} +4 -2
  218. package/mobile/bundle/components/ApplicationForm/renderWedDataOrganization.d.ts +11 -0
  219. package/mobile/bundle/components/ApplicationForm/useForm.d.ts +14 -0
  220. package/mobile/bundle/components/ApplicationForm/validate.d.ts +1 -0
  221. package/mobile/bundle/components/Carousel/CarouselContent.d.ts +2 -0
  222. package/mobile/bundle/components/ExchangeRateOffice/Currencies.d.ts +8 -0
  223. package/mobile/bundle/components/ExchangeRateOffice/ExchangeRateOffice.d.ts +5 -0
  224. package/mobile/bundle/components/ExchangeRateOffice/ExchangeRateOfficeContent.d.ts +36 -0
  225. package/mobile/bundle/components/ExchangeRateOffice/renderCurrencies.d.ts +3 -0
  226. package/mobile/bundle/components/ExchangeRateOffice/renderTableHeader.d.ts +2 -0
  227. package/mobile/bundle/ui-kit/RichText/RichTextProps.d.ts +2 -2
  228. package/mobile/bundle/ui-kit/Select/Select.d.ts +2 -0
  229. package/mobile/dist/components/ApplicationForm/ApplicationForm.js +3 -3
  230. package/mobile/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
  231. package/mobile/dist/components/ApplicationForm/ApplicationFormAcquiring.js +47 -40
  232. package/mobile/dist/components/ApplicationForm/ApplicationFormAcquiring.js.map +1 -1
  233. package/mobile/dist/components/ApplicationForm/ApplicationFormBusinessCard.js +34 -28
  234. package/mobile/dist/components/ApplicationForm/ApplicationFormBusinessCard.js.map +1 -1
  235. package/mobile/dist/components/ApplicationForm/ApplicationFormCredit.js +52 -41
  236. package/mobile/dist/components/ApplicationForm/ApplicationFormCredit.js.map +1 -1
  237. package/mobile/dist/components/ApplicationForm/ApplicationFormDeposit.js +24 -17
  238. package/mobile/dist/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
  239. package/mobile/dist/components/ApplicationForm/ApplicationFormWed.js +38 -25
  240. package/mobile/dist/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
  241. package/mobile/dist/components/ApplicationForm/InputControl.d.ts +10 -0
  242. package/mobile/dist/components/ApplicationForm/InputControl.js +10 -0
  243. package/mobile/dist/components/ApplicationForm/InputControl.js.map +1 -0
  244. package/mobile/dist/components/ApplicationForm/SelectControl.d.ts +13 -0
  245. package/mobile/dist/components/ApplicationForm/SelectControl.js +14 -0
  246. package/mobile/dist/components/ApplicationForm/SelectControl.js.map +1 -0
  247. package/mobile/dist/components/ApplicationForm/models.d.ts +5 -0
  248. package/mobile/dist/components/ApplicationForm/normalizeSelected.d.ts +2 -0
  249. package/mobile/dist/components/ApplicationForm/normalizeSelected.js +5 -0
  250. package/mobile/dist/components/ApplicationForm/normalizeSelected.js.map +1 -0
  251. package/mobile/dist/components/ApplicationForm/renderAcquiringDataOrganization.d.ts +11 -0
  252. package/mobile/dist/components/ApplicationForm/renderAcquiringDataOrganization.js +8 -0
  253. package/mobile/dist/components/ApplicationForm/renderAcquiringDataOrganization.js.map +1 -0
  254. package/mobile/dist/components/ApplicationForm/renderAcquiringRegion.d.ts +13 -0
  255. package/mobile/dist/components/ApplicationForm/renderAcquiringRegion.js +9 -0
  256. package/mobile/dist/components/ApplicationForm/renderAcquiringRegion.js.map +1 -0
  257. package/mobile/dist/components/ApplicationForm/renderBusinessCardDataOrganization.d.ts +11 -0
  258. package/mobile/dist/components/ApplicationForm/renderBusinessCardDataOrganization.js +8 -0
  259. package/mobile/dist/components/ApplicationForm/renderBusinessCardDataOrganization.js.map +1 -0
  260. package/mobile/dist/components/ApplicationForm/renderCreditDataOrganization.d.ts +13 -0
  261. package/mobile/dist/components/ApplicationForm/renderCreditDataOrganization.js +8 -0
  262. package/mobile/dist/components/ApplicationForm/renderCreditDataOrganization.js.map +1 -0
  263. package/mobile/dist/components/ApplicationForm/renderRegion.d.ts +12 -0
  264. package/mobile/dist/components/ApplicationForm/renderRegion.js +8 -0
  265. package/mobile/dist/components/ApplicationForm/renderRegion.js.map +1 -0
  266. package/mobile/dist/components/ApplicationForm/renderRegionDepartment.d.ts +15 -0
  267. package/mobile/dist/components/ApplicationForm/renderRegionDepartment.js +8 -0
  268. package/mobile/dist/components/ApplicationForm/renderRegionDepartment.js.map +1 -0
  269. package/mobile/dist/components/ApplicationForm/renderWedDataOrganization.d.ts +11 -0
  270. package/mobile/dist/components/ApplicationForm/renderWedDataOrganization.js +8 -0
  271. package/mobile/dist/components/ApplicationForm/renderWedDataOrganization.js.map +1 -0
  272. package/mobile/dist/components/ApplicationForm/useForm.d.ts +14 -0
  273. package/mobile/dist/components/ApplicationForm/useForm.js +37 -0
  274. package/mobile/dist/components/ApplicationForm/useForm.js.map +1 -0
  275. package/mobile/dist/components/ApplicationForm/validate.d.ts +1 -0
  276. package/mobile/dist/components/ApplicationForm/validate.js +22 -0
  277. package/mobile/dist/components/ApplicationForm/validate.js.map +1 -0
  278. package/mobile/dist/components/Bonus/Bonus.js +5 -3
  279. package/mobile/dist/components/Bonus/Bonus.js.map +1 -1
  280. package/mobile/dist/components/Carousel/Carousel.js +4 -3
  281. package/mobile/dist/components/Carousel/Carousel.js.map +1 -1
  282. package/mobile/dist/components/Carousel/CarouselContent.d.ts +2 -0
  283. package/mobile/dist/components/CarouselRichTextCard/CarouselRichTextCard.js +1 -3
  284. package/mobile/dist/components/CarouselRichTextCard/CarouselRichTextCard.js.map +1 -1
  285. package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCard.js +2 -2
  286. package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
  287. package/mobile/dist/components/ExchangeRateOffice/Currencies.d.ts +8 -0
  288. package/mobile/dist/components/ExchangeRateOffice/Currencies.js +12 -0
  289. package/mobile/dist/components/ExchangeRateOffice/Currencies.js.map +1 -0
  290. package/mobile/dist/components/ExchangeRateOffice/ExchangeRateOffice.d.ts +5 -0
  291. package/mobile/dist/components/ExchangeRateOffice/ExchangeRateOffice.js +16 -0
  292. package/mobile/dist/components/ExchangeRateOffice/ExchangeRateOffice.js.map +1 -0
  293. package/mobile/dist/components/ExchangeRateOffice/ExchangeRateOfficeContent.d.ts +36 -0
  294. package/mobile/dist/components/ExchangeRateOffice/ExchangeRateOfficeContent.js +2 -0
  295. package/mobile/dist/components/ExchangeRateOffice/ExchangeRateOfficeContent.js.map +1 -0
  296. package/mobile/dist/components/ExchangeRateOffice/renderCurrencies.d.ts +3 -0
  297. package/mobile/dist/components/ExchangeRateOffice/renderCurrencies.js +30 -0
  298. package/mobile/dist/components/ExchangeRateOffice/renderCurrencies.js.map +1 -0
  299. package/mobile/dist/components/ExchangeRateOffice/renderTableHeader.d.ts +2 -0
  300. package/mobile/dist/components/ExchangeRateOffice/renderTableHeader.js +9 -0
  301. package/mobile/dist/components/ExchangeRateOffice/renderTableHeader.js.map +1 -0
  302. package/mobile/dist/components/RichTextBlock/RichTextBlock.js +2 -2
  303. package/mobile/dist/components/RichTextBlock/RichTextBlock.js.map +1 -1
  304. package/mobile/dist/ui-kit/Button/getRegularButtonClasses.js +1 -1
  305. package/mobile/dist/ui-kit/Button/getRegularButtonClasses.js.map +1 -1
  306. package/mobile/dist/ui-kit/Button/renderButtonsSection.js +2 -2
  307. package/mobile/dist/ui-kit/Button/renderButtonsSection.js.map +1 -1
  308. package/mobile/dist/ui-kit/RichText/RichText.js +3 -2
  309. package/mobile/dist/ui-kit/RichText/RichText.js.map +1 -1
  310. package/mobile/dist/ui-kit/RichText/RichTextProps.d.ts +2 -2
  311. package/mobile/dist/ui-kit/Select/Select.d.ts +2 -0
  312. package/mobile/dist/ui-kit/Select/Select.js +5 -3
  313. package/mobile/dist/ui-kit/Select/Select.js.map +1 -1
  314. package/mobile/lib/components/ApplicationForm/ApplicationForm.js +3 -3
  315. package/mobile/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
  316. package/mobile/lib/components/ApplicationForm/ApplicationFormAcquiring.js +47 -40
  317. package/mobile/lib/components/ApplicationForm/ApplicationFormAcquiring.js.map +1 -1
  318. package/mobile/lib/components/ApplicationForm/ApplicationFormBusinessCard.js +34 -28
  319. package/mobile/lib/components/ApplicationForm/ApplicationFormBusinessCard.js.map +1 -1
  320. package/mobile/lib/components/ApplicationForm/ApplicationFormCredit.js +53 -42
  321. package/mobile/lib/components/ApplicationForm/ApplicationFormCredit.js.map +1 -1
  322. package/mobile/lib/components/ApplicationForm/ApplicationFormDeposit.js +24 -17
  323. package/mobile/lib/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
  324. package/mobile/lib/components/ApplicationForm/ApplicationFormWed.js +38 -25
  325. package/mobile/lib/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
  326. package/mobile/lib/components/ApplicationForm/InputControl.d.ts +10 -0
  327. package/mobile/lib/components/ApplicationForm/InputControl.js +8 -0
  328. package/mobile/lib/components/ApplicationForm/InputControl.js.map +1 -0
  329. package/mobile/lib/components/ApplicationForm/SelectControl.d.ts +13 -0
  330. package/mobile/lib/components/ApplicationForm/SelectControl.js +12 -0
  331. package/mobile/lib/components/ApplicationForm/SelectControl.js.map +1 -0
  332. package/mobile/lib/components/ApplicationForm/models.d.ts +5 -0
  333. package/mobile/lib/components/ApplicationForm/normalizeSelected.d.ts +2 -0
  334. package/mobile/lib/components/ApplicationForm/normalizeSelected.js +2 -0
  335. package/mobile/lib/components/ApplicationForm/normalizeSelected.js.map +1 -0
  336. package/mobile/lib/components/ApplicationForm/renderAcquiringDataOrganization.d.ts +11 -0
  337. package/mobile/lib/components/ApplicationForm/renderAcquiringDataOrganization.js +5 -0
  338. package/mobile/lib/components/ApplicationForm/renderAcquiringDataOrganization.js.map +1 -0
  339. package/mobile/lib/components/ApplicationForm/renderAcquiringRegion.d.ts +13 -0
  340. package/mobile/lib/components/ApplicationForm/renderAcquiringRegion.js +6 -0
  341. package/mobile/lib/components/ApplicationForm/renderAcquiringRegion.js.map +1 -0
  342. package/mobile/lib/components/ApplicationForm/renderBusinessCardDataOrganization.d.ts +11 -0
  343. package/mobile/lib/components/ApplicationForm/renderBusinessCardDataOrganization.js +5 -0
  344. package/mobile/lib/components/ApplicationForm/renderBusinessCardDataOrganization.js.map +1 -0
  345. package/mobile/lib/components/ApplicationForm/renderCreditDataOrganization.d.ts +13 -0
  346. package/mobile/lib/components/ApplicationForm/renderCreditDataOrganization.js +5 -0
  347. package/mobile/lib/components/ApplicationForm/renderCreditDataOrganization.js.map +1 -0
  348. package/mobile/lib/components/ApplicationForm/renderRegion.d.ts +12 -0
  349. package/mobile/lib/components/ApplicationForm/renderRegion.js +5 -0
  350. package/mobile/lib/components/ApplicationForm/renderRegion.js.map +1 -0
  351. package/mobile/lib/components/ApplicationForm/renderRegionDepartment.d.ts +15 -0
  352. package/mobile/lib/components/ApplicationForm/renderRegionDepartment.js +5 -0
  353. package/mobile/lib/components/ApplicationForm/renderRegionDepartment.js.map +1 -0
  354. package/mobile/lib/components/ApplicationForm/renderWedDataOrganization.d.ts +11 -0
  355. package/mobile/lib/components/ApplicationForm/renderWedDataOrganization.js +5 -0
  356. package/mobile/lib/components/ApplicationForm/renderWedDataOrganization.js.map +1 -0
  357. package/mobile/lib/components/ApplicationForm/useForm.d.ts +14 -0
  358. package/mobile/lib/components/ApplicationForm/useForm.js +34 -0
  359. package/mobile/lib/components/ApplicationForm/useForm.js.map +1 -0
  360. package/mobile/lib/components/ApplicationForm/validate.d.ts +1 -0
  361. package/mobile/lib/components/ApplicationForm/validate.js +19 -0
  362. package/mobile/lib/components/ApplicationForm/validate.js.map +1 -0
  363. package/mobile/lib/components/Bonus/Bonus.js +5 -3
  364. package/mobile/lib/components/Bonus/Bonus.js.map +1 -1
  365. package/mobile/lib/components/Carousel/Carousel.js +4 -3
  366. package/mobile/lib/components/Carousel/Carousel.js.map +1 -1
  367. package/mobile/lib/components/Carousel/CarouselContent.d.ts +2 -0
  368. package/mobile/lib/components/CarouselRichTextCard/CarouselRichTextCard.js +1 -3
  369. package/mobile/lib/components/CarouselRichTextCard/CarouselRichTextCard.js.map +1 -1
  370. package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCard.js +2 -2
  371. package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
  372. package/mobile/lib/components/ExchangeRateOffice/Currencies.d.ts +8 -0
  373. package/mobile/lib/components/ExchangeRateOffice/Currencies.js +10 -0
  374. package/mobile/lib/components/ExchangeRateOffice/Currencies.js.map +1 -0
  375. package/mobile/lib/components/ExchangeRateOffice/ExchangeRateOffice.d.ts +5 -0
  376. package/mobile/lib/components/ExchangeRateOffice/ExchangeRateOffice.js +14 -0
  377. package/mobile/lib/components/ExchangeRateOffice/ExchangeRateOffice.js.map +1 -0
  378. package/mobile/lib/components/ExchangeRateOffice/ExchangeRateOfficeContent.d.ts +36 -0
  379. package/mobile/lib/components/ExchangeRateOffice/ExchangeRateOfficeContent.js +2 -0
  380. package/mobile/lib/components/ExchangeRateOffice/ExchangeRateOfficeContent.js.map +1 -0
  381. package/mobile/lib/components/ExchangeRateOffice/renderCurrencies.d.ts +3 -0
  382. package/mobile/lib/components/ExchangeRateOffice/renderCurrencies.js +27 -0
  383. package/mobile/lib/components/ExchangeRateOffice/renderCurrencies.js.map +1 -0
  384. package/mobile/lib/components/ExchangeRateOffice/renderTableHeader.d.ts +2 -0
  385. package/mobile/lib/components/ExchangeRateOffice/renderTableHeader.js +6 -0
  386. package/mobile/lib/components/ExchangeRateOffice/renderTableHeader.js.map +1 -0
  387. package/mobile/lib/components/RichTextBlock/RichTextBlock.js +2 -2
  388. package/mobile/lib/components/RichTextBlock/RichTextBlock.js.map +1 -1
  389. package/mobile/lib/ui-kit/Button/getRegularButtonClasses.js +1 -1
  390. package/mobile/lib/ui-kit/Button/getRegularButtonClasses.js.map +1 -1
  391. package/mobile/lib/ui-kit/Button/renderButtonsSection.js +2 -2
  392. package/mobile/lib/ui-kit/Button/renderButtonsSection.js.map +1 -1
  393. package/mobile/lib/ui-kit/RichText/RichText.js +3 -2
  394. package/mobile/lib/ui-kit/RichText/RichText.js.map +1 -1
  395. package/mobile/lib/ui-kit/RichText/RichTextProps.d.ts +2 -2
  396. package/mobile/lib/ui-kit/Select/Select.d.ts +2 -0
  397. package/mobile/lib/ui-kit/Select/Select.js +5 -3
  398. package/mobile/lib/ui-kit/Select/Select.js.map +1 -1
  399. package/mobile/src/common.css +24 -5
  400. package/mobile/src/components/ApplicationForm/ApplicationForm.example.json +2 -1
  401. package/mobile/src/components/ApplicationForm/ApplicationForm.tsx +3 -3
  402. package/mobile/src/components/ApplicationForm/ApplicationFormAcquiring.tsx +52 -102
  403. package/mobile/src/components/ApplicationForm/ApplicationFormBusinessCard.tsx +38 -109
  404. package/mobile/src/components/ApplicationForm/ApplicationFormCredit.tsx +75 -64
  405. package/mobile/src/components/ApplicationForm/ApplicationFormDeposit.tsx +44 -31
  406. package/mobile/src/components/ApplicationForm/ApplicationFormWed.tsx +43 -93
  407. package/mobile/src/components/ApplicationForm/InputControl.tsx +35 -0
  408. package/mobile/src/components/ApplicationForm/SelectControl.tsx +54 -0
  409. package/mobile/src/components/ApplicationForm/models.ts +6 -0
  410. package/mobile/src/components/ApplicationForm/normalizeSelected.ts +4 -0
  411. package/mobile/src/components/ApplicationForm/renderAcquiringDataOrganization.tsx +60 -0
  412. package/{src/components/ApplicationForm/renderSelects.tsx → mobile/src/components/ApplicationForm/renderAcquiringRegion.tsx} +22 -6
  413. package/mobile/src/components/ApplicationForm/renderBusinessCardDataOrganization.tsx +60 -0
  414. package/mobile/src/components/ApplicationForm/renderCreditDataOrganization.tsx +76 -0
  415. package/mobile/src/components/ApplicationForm/renderRegion.tsx +36 -0
  416. package/{src/components/ApplicationForm/renderBankOffices.tsx → mobile/src/components/ApplicationForm/renderRegionDepartment.tsx} +16 -7
  417. package/mobile/src/components/ApplicationForm/renderWedDataOrganization.tsx +68 -0
  418. package/mobile/src/components/ApplicationForm/useForm.ts +65 -0
  419. package/mobile/src/components/ApplicationForm/validate.ts +22 -0
  420. package/mobile/src/components/Bonus/Bonus.tsx +12 -7
  421. package/mobile/src/components/Carousel/Carousel.example.json +2 -1
  422. package/mobile/src/components/Carousel/Carousel.tsx +6 -2
  423. package/mobile/src/components/Carousel/CarouselContent.ts +2 -0
  424. package/mobile/src/components/CarouselRichTextCard/CarouselRichTextCard.tsx +5 -10
  425. package/mobile/src/components/CarouselTariffsCard/CarouselTariffsCard.tsx +2 -2
  426. package/mobile/src/components/ExchangeRateOffice/Currencies.ts +8 -0
  427. package/mobile/src/components/ExchangeRateOffice/ExchangeRateOffice.example.json +32 -0
  428. package/mobile/src/components/ExchangeRateOffice/ExchangeRateOffice.tsx +60 -0
  429. package/mobile/src/components/ExchangeRateOffice/ExchangeRateOffice.ui.json +1 -0
  430. package/mobile/src/components/ExchangeRateOffice/ExchangeRateOfficeContent.ts +36 -0
  431. package/mobile/src/components/ExchangeRateOffice/renderCurrencies.tsx +73 -0
  432. package/mobile/src/components/ExchangeRateOffice/renderTableHeader.tsx +11 -0
  433. package/mobile/src/components/RichTextBlock/RichTextBlock.tsx +2 -2
  434. package/mobile/src/ui-kit/Button/getRegularButtonClasses.ts +1 -1
  435. package/mobile/src/ui-kit/Button/renderButtonsSection.tsx +2 -2
  436. package/mobile/src/ui-kit/RichText/RichText.tsx +5 -2
  437. package/mobile/src/ui-kit/RichText/RichTextProps.ts +2 -2
  438. package/mobile/src/ui-kit/Select/Select.tsx +19 -4
  439. package/package.json +2 -2
  440. package/src/common.css +24 -5
  441. package/src/components/ApplicationForm/ApplicationForm.example.json +2 -1
  442. package/src/components/ApplicationForm/ApplicationForm.tsx +3 -3
  443. package/src/components/ApplicationForm/ApplicationFormAcquiring.tsx +52 -102
  444. package/src/components/ApplicationForm/ApplicationFormBusinessCard.tsx +38 -109
  445. package/src/components/ApplicationForm/ApplicationFormCredit.tsx +75 -64
  446. package/src/components/ApplicationForm/ApplicationFormDeposit.tsx +44 -31
  447. package/src/components/ApplicationForm/ApplicationFormWed.tsx +43 -93
  448. package/src/components/ApplicationForm/InputControl.tsx +35 -0
  449. package/src/components/ApplicationForm/SelectControl.tsx +54 -0
  450. package/src/components/ApplicationForm/models.ts +6 -0
  451. package/src/components/ApplicationForm/normalizeSelected.ts +4 -0
  452. package/src/components/ApplicationForm/renderAcquiringDataOrganization.tsx +60 -0
  453. package/{mobile/src/components/ApplicationForm/renderSelects.tsx → src/components/ApplicationForm/renderAcquiringRegion.tsx} +22 -6
  454. package/src/components/ApplicationForm/renderBusinessCardDataOrganization.tsx +60 -0
  455. package/src/components/ApplicationForm/renderCreditDataOrganization.tsx +76 -0
  456. package/src/components/ApplicationForm/renderRegion.tsx +36 -0
  457. package/{mobile/src/components/ApplicationForm/renderBankOffices.tsx → src/components/ApplicationForm/renderRegionDepartment.tsx} +16 -7
  458. package/src/components/ApplicationForm/renderWedDataOrganization.tsx +68 -0
  459. package/src/components/ApplicationForm/useForm.ts +65 -0
  460. package/src/components/ApplicationForm/validate.ts +22 -0
  461. package/src/components/Blocks.ts +2 -0
  462. package/src/components/Bonus/Bonus.tsx +12 -7
  463. package/src/components/Carousel/Carousel.example.json +2 -1
  464. package/src/components/Carousel/Carousel.fixture.tsx +2 -1
  465. package/src/components/Carousel/Carousel.tsx +6 -2
  466. package/src/components/Carousel/CarouselContent.ts +2 -0
  467. package/src/components/CarouselRichTextCard/CarouselRichTextCard.tsx +5 -10
  468. package/src/components/CarouselTariffsCard/CarouselTariffsCard.fixture.tsx +4 -2
  469. package/src/components/CarouselTariffsCard/CarouselTariffsCard.tsx +2 -2
  470. package/src/components/ExchangeRateOffice/Currencies.ts +8 -0
  471. package/src/components/ExchangeRateOffice/ExchangeRateOffice.example.json +32 -0
  472. package/src/components/ExchangeRateOffice/ExchangeRateOffice.fixture.tsx +78 -0
  473. package/src/components/ExchangeRateOffice/ExchangeRateOffice.tsx +60 -0
  474. package/src/components/ExchangeRateOffice/ExchangeRateOffice.ui.json +1 -0
  475. package/src/components/ExchangeRateOffice/ExchangeRateOfficeContent.ts +36 -0
  476. package/src/components/ExchangeRateOffice/renderCurrencies.tsx +73 -0
  477. package/src/components/ExchangeRateOffice/renderTableHeader.tsx +11 -0
  478. package/src/components/RichTextBlock/RichTextBlock.fixture.tsx +22 -0
  479. package/src/components/RichTextBlock/RichTextBlock.tsx +2 -2
  480. package/src/components/TariffsTable/EmbeddableCellData.tsx +1 -4
  481. package/src/components/VerticalLayout/VerticalLayout.fixture.tsx +14 -0
  482. package/src/ui-kit/Button/getRegularButtonClasses.ts +1 -1
  483. package/src/ui-kit/Button/renderButtonsSection.tsx +2 -2
  484. package/src/ui-kit/RichText/RichText.tsx +5 -2
  485. package/src/ui-kit/RichText/RichTextProps.ts +2 -2
  486. package/src/ui-kit/Select/Select.tsx +19 -4
  487. package/bundle/components/ApplicationForm/normalizeSelectedRegion.d.ts +0 -2
  488. package/bundle/components/ApplicationForm/renderDataOrganization.d.ts +0 -14
  489. package/bundle/components/ApplicationForm/useFormHandlers.d.ts +0 -9
  490. package/dist/components/ApplicationForm/WrapperSelect.js +0 -13
  491. package/dist/components/ApplicationForm/WrapperSelect.js.map +0 -1
  492. package/dist/components/ApplicationForm/normalizeSelectedRegion.d.ts +0 -2
  493. package/dist/components/ApplicationForm/normalizeSelectedRegion.js +0 -5
  494. package/dist/components/ApplicationForm/normalizeSelectedRegion.js.map +0 -1
  495. package/dist/components/ApplicationForm/renderBankOffices.js +0 -7
  496. package/dist/components/ApplicationForm/renderBankOffices.js.map +0 -1
  497. package/dist/components/ApplicationForm/renderDataOrganization.d.ts +0 -14
  498. package/dist/components/ApplicationForm/renderDataOrganization.js +0 -7
  499. package/dist/components/ApplicationForm/renderDataOrganization.js.map +0 -1
  500. package/dist/components/ApplicationForm/renderSelects.js +0 -8
  501. package/dist/components/ApplicationForm/renderSelects.js.map +0 -1
  502. package/dist/components/ApplicationForm/useFormHandlers.d.ts +0 -9
  503. package/dist/components/ApplicationForm/useFormHandlers.js +0 -11
  504. package/dist/components/ApplicationForm/useFormHandlers.js.map +0 -1
  505. package/lib/components/ApplicationForm/WrapperSelect.js +0 -11
  506. package/lib/components/ApplicationForm/WrapperSelect.js.map +0 -1
  507. package/lib/components/ApplicationForm/normalizeSelectedRegion.d.ts +0 -2
  508. package/lib/components/ApplicationForm/normalizeSelectedRegion.js +0 -2
  509. package/lib/components/ApplicationForm/normalizeSelectedRegion.js.map +0 -1
  510. package/lib/components/ApplicationForm/renderBankOffices.js +0 -4
  511. package/lib/components/ApplicationForm/renderBankOffices.js.map +0 -1
  512. package/lib/components/ApplicationForm/renderDataOrganization.d.ts +0 -14
  513. package/lib/components/ApplicationForm/renderDataOrganization.js +0 -4
  514. package/lib/components/ApplicationForm/renderDataOrganization.js.map +0 -1
  515. package/lib/components/ApplicationForm/renderSelects.js +0 -5
  516. package/lib/components/ApplicationForm/renderSelects.js.map +0 -1
  517. package/lib/components/ApplicationForm/useFormHandlers.d.ts +0 -9
  518. package/lib/components/ApplicationForm/useFormHandlers.js +0 -8
  519. package/lib/components/ApplicationForm/useFormHandlers.js.map +0 -1
  520. package/mobile/bundle/components/ApplicationForm/normalizeSelectedRegion.d.ts +0 -2
  521. package/mobile/bundle/components/ApplicationForm/renderDataOrganization.d.ts +0 -14
  522. package/mobile/bundle/components/ApplicationForm/useFormHandlers.d.ts +0 -9
  523. package/mobile/dist/components/ApplicationForm/WrapperSelect.d.ts +0 -11
  524. package/mobile/dist/components/ApplicationForm/WrapperSelect.js +0 -13
  525. package/mobile/dist/components/ApplicationForm/WrapperSelect.js.map +0 -1
  526. package/mobile/dist/components/ApplicationForm/normalizeSelectedRegion.d.ts +0 -2
  527. package/mobile/dist/components/ApplicationForm/normalizeSelectedRegion.js +0 -5
  528. package/mobile/dist/components/ApplicationForm/normalizeSelectedRegion.js.map +0 -1
  529. package/mobile/dist/components/ApplicationForm/renderBankOffices.d.ts +0 -13
  530. package/mobile/dist/components/ApplicationForm/renderBankOffices.js +0 -7
  531. package/mobile/dist/components/ApplicationForm/renderBankOffices.js.map +0 -1
  532. package/mobile/dist/components/ApplicationForm/renderDataOrganization.d.ts +0 -14
  533. package/mobile/dist/components/ApplicationForm/renderDataOrganization.js +0 -7
  534. package/mobile/dist/components/ApplicationForm/renderDataOrganization.js.map +0 -1
  535. package/mobile/dist/components/ApplicationForm/renderSelects.d.ts +0 -11
  536. package/mobile/dist/components/ApplicationForm/renderSelects.js +0 -8
  537. package/mobile/dist/components/ApplicationForm/renderSelects.js.map +0 -1
  538. package/mobile/dist/components/ApplicationForm/useFormHandlers.d.ts +0 -9
  539. package/mobile/dist/components/ApplicationForm/useFormHandlers.js +0 -11
  540. package/mobile/dist/components/ApplicationForm/useFormHandlers.js.map +0 -1
  541. package/mobile/lib/components/ApplicationForm/WrapperSelect.d.ts +0 -11
  542. package/mobile/lib/components/ApplicationForm/WrapperSelect.js +0 -11
  543. package/mobile/lib/components/ApplicationForm/WrapperSelect.js.map +0 -1
  544. package/mobile/lib/components/ApplicationForm/normalizeSelectedRegion.d.ts +0 -2
  545. package/mobile/lib/components/ApplicationForm/normalizeSelectedRegion.js +0 -2
  546. package/mobile/lib/components/ApplicationForm/normalizeSelectedRegion.js.map +0 -1
  547. package/mobile/lib/components/ApplicationForm/renderBankOffices.d.ts +0 -13
  548. package/mobile/lib/components/ApplicationForm/renderBankOffices.js +0 -4
  549. package/mobile/lib/components/ApplicationForm/renderBankOffices.js.map +0 -1
  550. package/mobile/lib/components/ApplicationForm/renderDataOrganization.d.ts +0 -14
  551. package/mobile/lib/components/ApplicationForm/renderDataOrganization.js +0 -4
  552. package/mobile/lib/components/ApplicationForm/renderDataOrganization.js.map +0 -1
  553. package/mobile/lib/components/ApplicationForm/renderSelects.d.ts +0 -11
  554. package/mobile/lib/components/ApplicationForm/renderSelects.js +0 -5
  555. package/mobile/lib/components/ApplicationForm/renderSelects.js.map +0 -1
  556. package/mobile/lib/components/ApplicationForm/useFormHandlers.d.ts +0 -9
  557. package/mobile/lib/components/ApplicationForm/useFormHandlers.js +0 -8
  558. package/mobile/lib/components/ApplicationForm/useFormHandlers.js.map +0 -1
  559. package/mobile/src/components/ApplicationForm/WrapperSelect.tsx +0 -32
  560. package/mobile/src/components/ApplicationForm/normalizeSelectedRegion.ts +0 -4
  561. package/mobile/src/components/ApplicationForm/renderDataOrganization.tsx +0 -78
  562. package/mobile/src/components/ApplicationForm/useFormHandlers.ts +0 -18
  563. package/src/components/ApplicationForm/WrapperSelect.tsx +0 -32
  564. package/src/components/ApplicationForm/normalizeSelectedRegion.ts +0 -4
  565. package/src/components/ApplicationForm/renderDataOrganization.tsx +0 -78
  566. package/src/components/ApplicationForm/useFormHandlers.ts +0 -18
@@ -358,25 +358,6 @@
358
358
  };
359
359
  const Heading = JSX(({ className = '', headingType = 'h3', as: Tag = 'h3', title, children }) => (jsx(Tag, { className: `font-sans m-0 ${styles$4[headingType]} ${className}`, children: title || children })));
360
360
 
361
- const Input = JSX(({ className = '', inputClassName = '', id, name, type = 'text', label, value = '', valid = true, children, onChange, onBlur, ...inputProps }) => {
362
- const handleChange = useCallback((e) => {
363
- const validInputValue = e.target.validity.valid ? e.target.value : value;
364
- onChange(validInputValue);
365
- }, [onChange]);
366
- const handleBlur = useCallback((e) => {
367
- if (!onBlur) {
368
- return;
369
- }
370
- const validInputValue = e.target.validity.valid ? e.target.value : value;
371
- onBlur(validInputValue);
372
- }, [onBlur]);
373
- const paddingStyle = children ? 'pr-8' : '';
374
- const validStyle = valid
375
- ? 'border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text'
376
- : 'border-error';
377
- return (jsxs("div", { className: `relative ${className}`, children: [label ? jsx("label", { className: "block text-m-light mb-2", children: label }) : null, jsx("input", { className: `w-full border rounded-md text-primary-text outline-none p-4 ${paddingStyle} ${validStyle} ${inputClassName}`, id: id, name: name || id, type: type, value: value, onChange: handleChange, onBlur: handleBlur, ...inputProps }), children] }));
378
- });
379
-
380
361
  const consistentDataMap = new Map();
381
362
  function useAsyncData(key, fetcher, { fallback } = {}) {
382
363
  const args = useMemo(() => keyToArgs(key), [key]);
@@ -463,24 +444,6 @@
463
444
  return data || [];
464
445
  }
465
446
 
466
- const ACQUIRING_TYPES = [
467
- {
468
- name: 'Торговый эквайринг',
469
- },
470
- {
471
- name: 'Мобильный эквайринг',
472
- },
473
- {
474
- name: 'Интернет-эквайринг',
475
- },
476
- {
477
- name: 'QR-эквайринг (СБП)',
478
- },
479
- {
480
- name: 'Все виды эквайринга',
481
- },
482
- ];
483
-
484
447
  const useDialog = (id = '') => ({
485
448
  open: (message) => defaultEventBus.fire('dialog', { type: 'open', id, message }),
486
449
  close: () => defaultEventBus.fire('dialog', { type: 'close' }),
@@ -622,7 +585,7 @@
622
585
 
623
586
  const getRegularButtonClasses = ({ className, rounded, version, }) => [
624
587
  buttonStyle,
625
- 'border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border',
588
+ 'border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit',
626
589
  version ? buttonStyleMap[version] : '',
627
590
  rounded ? 'rounded-full' : 'rounded-md',
628
591
  className,
@@ -643,7 +606,67 @@
643
606
 
644
607
  const Footnote = JSX(({ link }) => (jsxs(Paragraph, { size: "text-s-light", color: "text-secondary-text", children: [jsx(Text, { children: "\u041D\u0430\u0436\u0438\u043C\u0430\u044F \u043A\u043D\u043E\u043F\u043A\u0443, \u0432\u044B \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442\u0435 \u0441\u043E\u0433\u043B\u0430\u0441\u0438\u0435 \u0441 " }), link ? (jsx(Button, { href: link.href, ariaLabel: "\u0443\u0441\u043B\u043E\u0432\u0438\u044F \u043F\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043D\u043D\u044B\u0445", target: link.target, className: "text-primary-main", children: jsx(Text, { children: link.text }) })) : null] })));
645
608
 
646
- const normalizeSelectedRegion$1 = (selectedRegion, regions) => !selectedRegion && regions?.length && regions[0]?.code ? regions[0].code : selectedRegion;
609
+ const Input = JSX(({ className = '', inputClassName = '', id, name, type = 'text', label, value = '', valid = true, children, onChange, onBlur, ...inputProps }) => {
610
+ const handleChange = useCallback((e) => {
611
+ const validInputValue = e.target.validity.valid ? e.target.value : value;
612
+ onChange(validInputValue);
613
+ }, [onChange]);
614
+ const handleBlur = useCallback((e) => {
615
+ if (!onBlur) {
616
+ return;
617
+ }
618
+ const validInputValue = e.target.validity.valid ? e.target.value : value;
619
+ onBlur(validInputValue);
620
+ }, [onBlur]);
621
+ const paddingStyle = children ? 'pr-8' : '';
622
+ const validStyle = valid
623
+ ? 'border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text'
624
+ : 'border-error';
625
+ return (jsxs("div", { className: `relative ${className}`, children: [label ? jsx("label", { className: "block text-m-light mb-2", children: label }) : null, jsx("input", { className: `w-full border rounded-md text-primary-text outline-none p-4 ${paddingStyle} ${validStyle} ${inputClassName}`, id: id, name: name || id, type: type, value: value, onChange: handleChange, onBlur: handleBlur, ...inputProps }), children] }));
626
+ });
627
+
628
+ const InputControl = JSX(({ className, label, value, error, onChange, onBlur }) => {
629
+ return (jsxs("div", { className: className, children: [jsx(Input, { type: "text", "aria-label": label, label: label, valid: Boolean(!error), value: value, onChange: onChange, onBlur: onBlur }), jsx("div", { className: "h-2", children: jsx(Text, { size: "text-xs-light", color: "text-error", children: error ? error : null }) })] }));
630
+ });
631
+
632
+ const ERROR_EMPTY = 'Некорректно заполненное поле';
633
+ const validate = (key, value) => {
634
+ switch (key) {
635
+ case 'name':
636
+ return isName(value);
637
+ case 'inn':
638
+ return isTin(value);
639
+ case 'mail':
640
+ return isEmpty(value);
641
+ case 'phone':
642
+ return isEmpty(value);
643
+ default:
644
+ return isEmpty(value);
645
+ }
646
+ };
647
+ const isEmpty = (value) => (value ? '' : ERROR_EMPTY);
648
+ const isName = (value) => (value.length > 1 ? '' : ERROR_EMPTY);
649
+ const isTin = (value) => (value.length === 10 || value.length === 12 ? '' : ERROR_EMPTY);
650
+
651
+ const renderAcquiringDataOrganization = ({ fullName, inn, name, phone, handleChange, errors, handleChangeErrors, }) => (jsxs("div", { className: "flex justify-between gap-5 mb-5", children: [jsxs("div", { className: "w-1/2", children: [jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", error: errors['fullName'], value: fullName, onChange: (value) => handleChange({ fullName: value }), onBlur: (value) => handleChangeErrors({ fullName: validate('fullName', value) }) }), jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E", error: errors['name'], value: name, onChange: (value) => handleChange({ name: value }), onBlur: (value) => handleChangeErrors({ name: validate('name', value) }) })] }), jsxs("div", { className: "w-1/2", children: [jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u0418\u041D\u041D", error: errors['inn'], value: inn, onChange: (value) => handleChange({ inn: value }), onBlur: (value) => handleChangeErrors({ inn: validate('inn', value) }) }), jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", error: errors['phone'], value: phone, onChange: (value) => handleChange({ phone: value }), onBlur: (value) => handleChangeErrors({ phone: validate('phone', value) }) })] })] }));
652
+
653
+ const ACQUIRING_TYPES = [
654
+ {
655
+ name: 'Торговый эквайринг',
656
+ },
657
+ {
658
+ name: 'Мобильный эквайринг',
659
+ },
660
+ {
661
+ name: 'Интернет-эквайринг',
662
+ },
663
+ {
664
+ name: 'QR-эквайринг (СБП)',
665
+ },
666
+ {
667
+ name: 'Все виды эквайринга',
668
+ },
669
+ ];
647
670
 
648
671
  function useOutsideClick(onClick) {
649
672
  const targetRef = useRef(null);
@@ -684,7 +707,7 @@
684
707
  const getSvgSize = (width) => (width ? '' : 'w-full h-full');
685
708
  const Background = JSX(({ className, children }) => className ? jsx("div", { className: className, children: children }) : children);
686
709
 
687
- const Select = JSX(({ className = '', isBorder = true, label, options = [], value, onChange, placeholder = '' }) => {
710
+ const Select = JSX(({ className = '', isBorder = true, label, options = [], value, onChange, placeholder = '', valid = true, onValidate, }) => {
688
711
  const [selectedItem, setSelectedItem] = useState(options[0] || { key: '', text: '' });
689
712
  const [isOpen, setIsOpen] = useState(false);
690
713
  const handleClickOutside = useCallback(() => setIsOpen(false), []);
@@ -693,13 +716,14 @@
693
716
  setSelectedItem(option);
694
717
  setIsOpen(false);
695
718
  onChange(option);
719
+ onValidate && onValidate(option.text);
696
720
  };
697
721
  const isSelected = (option) => Boolean(option.key === selectedItem.key);
698
722
  useEffect(() => {
699
723
  setSelectedItem(value || { key: '', text: '' });
700
724
  }, [value]);
701
725
  return (jsxs("div", { className: `${className}`, ref: wrapperRef, children: [label ? (jsx("div", { className: "mb-2", children: jsx(Text, { size: "text-m", color: "text-primary-text", font: "font-light", children: label }) })) : null, jsxs("div", { className: `relative ${isOpen ? 'z-20' : 'z-10'}`, children: [jsxs("div", { className: `text-l flex justify-between items-center mb-0.5 text-primary-text cursor-pointer
702
- ${getBorderStyle(isBorder)}`, onClick: () => setIsOpen(!isOpen), children: [jsx("p", { className: "p-4 pr-8 h-14 overflow-hidden text-ellipsis whitespace-nowrap", children: selectedItem?.text || placeholder }), jsx(Icon, { name: "ArrowUpIcon", width: "16", height: "16", className: `absolute right-3 ${isOpen ? '' : 'rotate-180'}` })] }), options?.length ? (jsx("div", { className: `h-0 ${renderOptionsStyle(isOpen)}`, children: jsx("div", { className: `bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-[0_4px_25px_rgba(0,0,0,0.07)]`, children: options.map(renderOption(choiceOption, isOpen, isSelected)) }) })) : null] })] }));
726
+ ${getBorderStyle(isBorder, valid)}`, onClick: () => setIsOpen(!isOpen), children: [jsx("p", { className: "p-4 pr-8 h-14 overflow-hidden text-ellipsis whitespace-nowrap", children: selectedItem?.text || placeholder }), jsx(Icon, { name: "ArrowUpIcon", width: "16", height: "16", className: `absolute right-3 ${isOpen ? '' : 'rotate-180'}` })] }), options?.length ? (jsx("div", { className: `h-0 ${renderOptionsStyle(isOpen)}`, children: jsx("div", { className: `bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-[0_4px_25px_rgba(0,0,0,0.07)]`, children: options.map(renderOption(choiceOption, isOpen, isSelected)) }) })) : null] })] }));
703
727
  });
704
728
  const renderOptionsStyle = (isOpen) => (isOpen ? '' : 'overflow-hidden');
705
729
  const renderOption = (choiceOption, isOpen, isSelected) => (option, i) => {
@@ -707,17 +731,18 @@
707
731
  choiceOption(option);
708
732
  }, className: "flex px-4 py-3 cursor-pointer hover:bg-main-divider pr-11 relative", children: [jsx("span", { className: "min-h-6", children: option.text }), jsx(Icon, { name: "DoneSimpleIcon", width: "16", height: "16", className: ['absolute right-4 pt-0.5', isSelected(option) && isOpen ? '' : 'hidden'].join(' ') })] }, String(i)));
709
733
  };
710
- const getBorderStyle = (isBorder) => isBorder ? 'border border-gray rounded-md hover:border-primary-hover' : '';
734
+ const getBorderStyle = (isBorder, valid) => `
735
+ ${isBorder ? 'border rounded-md hover:border-primary-hover' : ''} ${valid ? ' border-gray' : 'border-error'} `;
711
736
 
712
- const WrapperSelect$1 = JSX(({ data, fieldLabel, fieldValue, selected, placeholder = '', setSelected, label }) => {
737
+ const SelectControl = JSX(({ data, fieldLabel, fieldValue, selected, placeholder = '', setSelected, label, error, onValidate, }) => {
713
738
  const dataFormat = data
714
739
  .filter(Boolean)
715
740
  .map((_) => ({ key: _?.[fieldValue || fieldLabel], text: _?.[fieldLabel] }));
716
741
  const selectedObj = dataFormat.find((_) => _.key === selected);
717
- return (jsx(Select, { options: dataFormat, label: label, placeholder: placeholder || selected, onChange: (_) => setSelected(_.key), value: selectedObj }));
742
+ return (jsxs("div", { children: [jsx(Select, { options: dataFormat, label: label, valid: Boolean(!error), placeholder: placeholder || selected, onChange: (_) => setSelected(_.key), value: selectedObj, onValidate: onValidate }), jsx("div", { className: "h-2", children: jsx(Text, { size: "text-xs-light", color: "text-error", children: error ? error : null }) })] }));
718
743
  });
719
744
 
720
- const renderSelects = ({ acquiringType, regions, region, handleChange }) => (jsxs("div", { className: "flex justify-between gap-5 mb-7", children: [jsx("div", { className: "w-1/2", children: jsx(WrapperSelect$1, { data: ACQUIRING_TYPES, fieldValue: "name", fieldLabel: "name", selected: acquiringType, setSelected: (value) => handleChange({ acquiringType: value }), label: "\u0412\u0438\u0434 \u044D\u043A\u0432\u0430\u0439\u0440\u0438\u043D\u0433\u0430", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u044D\u043A\u0432\u0430\u0439\u0440\u0438\u043D\u0433" }) }), jsx("div", { className: "w-1/2", children: jsx(WrapperSelect$1, { data: regions, fieldValue: "code", fieldLabel: "name", selected: region, setSelected: (value) => handleChange({ region: value }), label: "\u0410\u0434\u0440\u0435\u0441", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0430\u0434\u0440\u0435\u0441" }) })] }));
745
+ const renderAcquiringRegion = ({ acquiringType, regions, region, handleChange, errors, handleChangeErrors, }) => (jsxs("div", { className: "flex justify-between gap-5 mb-7", children: [jsx("div", { className: "w-1/2", children: jsx(SelectControl, { data: ACQUIRING_TYPES, fieldValue: "name", fieldLabel: "name", error: errors['acquiringType'], selected: acquiringType, setSelected: (value) => handleChange({ acquiringType: value }), onValidate: (value) => handleChangeErrors({ acquiringType: validate('acquiringType', value) }), label: "\u0412\u0438\u0434 \u044D\u043A\u0432\u0430\u0439\u0440\u0438\u043D\u0433\u0430", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u044D\u043A\u0432\u0430\u0439\u0440\u0438\u043D\u0433" }) }), jsx("div", { className: "w-1/2", children: jsx(SelectControl, { data: regions, fieldValue: "code", fieldLabel: "name", error: errors['region'], selected: region, setSelected: (value) => handleChange({ region: value }), onValidate: (value) => handleChangeErrors({ region: validate('region', value) }), label: "\u0410\u0434\u0440\u0435\u0441", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0430\u0434\u0440\u0435\u0441" }) })] }));
721
746
 
722
747
  const SlideCheckbox = JSX(({ value = false, text, type = 'checkbox', onChange }) => (jsxs("div", { role: type, "aria-checked": value, className: "flex justify-start items-center w-full cursor-pointer mb-4", onClick: () => onChange && onChange(!value), children: [jsx("div", { className: `relative flex-shrink-0 duration-300 w-9 h-5 mr-3 rounded-2xl ${value ? 'bg-primary-main' : 'bg-main-divider'}`, children: jsx("div", { className: `absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full ${value ? 'left-[50%]' : 'left-[5%]'}` }) }), jsx("div", { children: jsx(Text, { size: "text-m", font: "font-light", color: "text-primary-text", children: text }) })] })));
723
748
 
@@ -731,99 +756,146 @@
731
756
  return (jsx("button", { type: "submit", className: `p-4 ${buttonStyle} ${className}`, children: button?.text ? button.text : 'Отправить заявку' }));
732
757
  };
733
758
 
734
- const useFormHandlers = ({ setFormState }) => {
759
+ const useForm$1 = ({ initialFormState, errorsInitialState, handleSubmit, }) => {
760
+ const [formState, setFormState] = useState(initialFormState);
761
+ const [errors, setErrors] = useState(errorsInitialState || {});
735
762
  const handleChange = useCallback((state) => setFormState((oldState) => ({ ...oldState, ...state })), []);
763
+ const handleChangeErrors = useCallback((state) => setErrors((oldState) => ({ ...oldState, ...state })), []);
764
+ const sendForm = useCallback(async (sendData) => {
765
+ const errorsTemp = [];
766
+ const validateData = Object.keys(formState)
767
+ .filter((_) => Object.keys(errors).includes(_))
768
+ .reduce((obj, key) => {
769
+ obj[key] = formState[key];
770
+ return obj;
771
+ }, {});
772
+ for (const [key, value] of Object.entries(validateData)) {
773
+ const error = validate(key, value);
774
+ errorsTemp.push(error);
775
+ handleChangeErrors({ [key]: error });
776
+ }
777
+ if (errorsTemp.some((_) => _.length !== 0)) {
778
+ return;
779
+ }
780
+ handleSubmit && (await handleSubmit(sendData));
781
+ }, [formState]);
736
782
  return {
783
+ formState,
737
784
  handleChange,
785
+ errors,
786
+ handleChangeErrors,
787
+ sendForm,
738
788
  };
739
789
  };
740
790
 
791
+ const initialFormState$4 = {
792
+ acquiringType: 'Торговый эквайринг',
793
+ region: '',
794
+ fullName: '',
795
+ inn: '',
796
+ name: '',
797
+ phone: '',
798
+ onlineСheckout: false,
799
+ posTerminal: false,
800
+ };
801
+ const errorsInitialState$2 = {
802
+ acquiringType: '',
803
+ region: '',
804
+ fullName: '',
805
+ inn: '',
806
+ name: '',
807
+ phone: '',
808
+ };
741
809
  const ApplicationFormAcquiring = JSX((props) => {
742
810
  const { button, link, handleSubmit } = props;
743
- const [formState, setFormState] = useState({
744
- acquiringType: '',
745
- region: '',
746
- fullName: '',
747
- inn: '',
748
- name: '',
749
- phone: '',
750
- onlineСheckout: false,
751
- posTerminal: false,
811
+ const { formState, errors, handleChange, handleChangeErrors, sendForm } = useForm$1({
812
+ initialFormState: initialFormState$4,
813
+ errorsInitialState: errorsInitialState$2,
814
+ handleSubmit,
752
815
  });
753
816
  const { acquiringType, region, fullName, inn, name, phone, onlineСheckout, posTerminal } = formState;
754
817
  const regions = useGetRegions();
755
- const { handleChange } = useFormHandlers({
756
- setFormState,
757
- });
758
- const selectedRegion = normalizeSelectedRegion$1(region, regions);
759
- useEffect(() => {
760
- setFormState((oldState) => ({
761
- ...oldState,
762
- acquiringType: ACQUIRING_TYPES?.length && ACQUIRING_TYPES[0]?.name ? ACQUIRING_TYPES[0].name : '',
763
- }));
764
- }, []);
765
- const onSubmit = async (e) => {
818
+ const onSubmit = (e) => {
766
819
  e.preventDefault();
767
- const partnerComments = `Вид эквайринга=${acquiringType}/Онлайн касса=${onlineСheckout}/POS-терминал=${posTerminal}`;
768
- handleSubmit &&
769
- (await handleSubmit({
770
- typeForm: 'acqr',
771
- region: regions.find((_) => _.code === selectedRegion)?.name || '',
772
- partnerComments,
820
+ sendForm({
821
+ typeForm: 'acqr',
822
+ region: regions.find((_) => _.code === region)?.name || '',
823
+ partnerComments: `Вид эквайринга=${acquiringType}/Онлайн касса=${onlineСheckout}/POS-терминал=${posTerminal}`,
824
+ fullName,
825
+ inn,
826
+ name,
827
+ phone,
828
+ });
829
+ };
830
+ return (jsxs("form", { onSubmit: onSubmit, className: "container", children: [jsx(Heading, { headingType: "h6", title: "\u0412\u0438\u0434 \u044D\u043A\u0432\u0430\u0439\u0440\u0438\u043D\u0433\u0430 \u0438 \u0440\u0435\u0433\u0438\u043E\u043D", className: "text-center mb-4" }), renderAcquiringRegion({
831
+ acquiringType,
832
+ regions,
833
+ region,
834
+ handleChange,
835
+ errors,
836
+ handleChangeErrors,
837
+ }), jsx(Heading, { headingType: "h6", title: "\u0414\u0430\u043D\u043D\u044B\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", className: "text-center mb-4" }), renderAcquiringDataOrganization({
773
838
  fullName,
774
839
  inn,
775
840
  name,
776
841
  phone,
777
- }));
778
- };
779
- return (jsxs("form", { onSubmit: onSubmit, className: "container", children: [jsx(Heading, { headingType: "h6", title: "\u0412\u0438\u0434 \u044D\u043A\u0432\u0430\u0439\u0440\u0438\u043D\u0433\u0430 \u0438 \u0440\u0435\u0433\u0438\u043E\u043D", className: "text-center mb-4" }), renderSelects({
780
- acquiringType,
781
- regions,
782
- region: selectedRegion,
783
842
  handleChange,
784
- }), jsx(Heading, { headingType: "h6", title: "\u0414\u0430\u043D\u043D\u044B\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", className: "text-center mb-4" }), renderDataOrganization$4({ fullName, inn, name, phone, handleChange }), renderSlideCheckboxes({
843
+ errors,
844
+ handleChangeErrors,
845
+ }), renderSlideCheckboxes({
785
846
  onlineСheckout,
786
847
  posTerminal,
787
848
  handleChange,
788
849
  }), renderSubmitButton(button, 'mb-4'), jsx(Footnote, { link: link })] }));
789
850
  });
790
- const renderDataOrganization$4 = ({ fullName, inn, name, phone, handleChange, }) => (jsxs("div", { className: "flex justify-between gap-5 mb-5", children: [jsxs("div", { className: "w-1/2", children: [jsx(Input, { className: "shrink-0 text-l w-full mb-5", type: "text", "aria-label": "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", label: "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", value: fullName, onChange: (value) => handleChange({ fullName: value }) }), jsx(Input, { className: "shrink-0 text-l w-full", type: "text", "aria-label": "\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E", label: "\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E", value: name, onChange: (value) => handleChange({ name: value }) })] }), jsxs("div", { className: "w-1/2", children: [jsx(Input, { className: "shrink-0 text-l w-full mb-5", type: "text", label: "\u0418\u041D\u041D", "aria-label": "\u0418\u041D\u041D", value: inn, onChange: (value) => handleChange({ inn: value }) }), jsx(Input, { className: "shrink-0 text-l w-full", type: "text", label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", "aria-label": "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", value: phone, onChange: (value) => handleChange({ phone: value }) })] })] }));
791
851
 
852
+ const renderBusinessCardDataOrganization = ({ name, phone, mail, inn, handleChange, errors, handleChangeErrors, }) => (jsxs("div", { className: "flex justify-between gap-5", children: [jsxs("div", { className: "w-1/2", children: [jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E", error: errors['name'], value: name, onChange: (value) => handleChange({ name: value }), onBlur: (value) => handleChangeErrors({ name: validate('name', value) }) }), jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u0418\u041D\u041D", error: errors['inn'], value: inn, onChange: (value) => handleChange({ inn: value }), onBlur: (value) => handleChangeErrors({ inn: validate('inn', value) }) })] }), jsxs("div", { className: "w-1/2", children: [jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", error: errors['phone'], value: phone, onChange: (value) => handleChange({ phone: value }), onBlur: (value) => handleChangeErrors({ phone: validate('phone', value) }) }), jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", error: errors['mail'], value: mail, onChange: (value) => handleChange({ mail: value }), onBlur: (value) => handleChangeErrors({ mail: validate('mail', value) }) })] })] }));
853
+
854
+ const renderRegion$1 = ({ regions, region, handleChange, errors, handleChangeErrors, }) => (jsx("div", { className: "flex justify-between gap-5 mb-5", children: jsx("div", { className: "w-full", children: jsx(SelectControl, { data: regions, fieldValue: "code", fieldLabel: "name", error: errors['region'], selected: region, setSelected: (value) => handleChange({ region: value }), onValidate: (value) => handleChangeErrors({ region: validate('region', value) }), label: "\u0420\u0435\u0433\u0438\u043E\u043D", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0433\u0438\u043E\u043D" }) }) }));
855
+
856
+ const initialFormState$3 = {
857
+ region: '',
858
+ name: '',
859
+ phone: '',
860
+ inn: '',
861
+ mail: '',
862
+ };
792
863
  const ApplicationFormBusinessCard = JSX((props) => {
793
864
  const { button, link, handleSubmit } = props;
794
- const [formState, setFormState] = useState({
795
- region: '',
796
- name: '',
797
- phone: '',
798
- inn: '',
799
- mail: '',
865
+ const { formState, errors, handleChange, handleChangeErrors, sendForm } = useForm$1({
866
+ initialFormState: initialFormState$3,
867
+ errorsInitialState: initialFormState$3,
868
+ handleSubmit,
800
869
  });
801
870
  const { region, name, phone, inn, mail } = formState;
802
871
  const regions = useGetRegions();
803
- const { handleChange } = useFormHandlers({
804
- setFormState,
805
- });
806
- const selectedRegion = normalizeSelectedRegion$1(region, regions);
807
- const onSubmit = async (e) => {
872
+ const onSubmit = (e) => {
808
873
  e.preventDefault();
809
- handleSubmit &&
810
- (await handleSubmit({
811
- typeForm: 'bcrd',
812
- region: regions.find((_) => _.code === selectedRegion)?.name || '',
874
+ sendForm({
875
+ typeForm: 'bcrd',
876
+ region: regions.find((_) => _.code === region)?.name || '',
877
+ name,
878
+ phone,
879
+ inn,
880
+ mail,
881
+ });
882
+ };
883
+ return (jsxs("form", { onSubmit: onSubmit, className: "container", children: [renderRegion$1({
884
+ regions,
885
+ region,
886
+ handleChange,
887
+ errors,
888
+ handleChangeErrors,
889
+ }), renderBusinessCardDataOrganization({
813
890
  name,
814
891
  phone,
815
892
  inn,
816
893
  mail,
817
- }));
818
- };
819
- return (jsxs("form", { onSubmit: onSubmit, className: "container", children: [renderRegion$1({
820
- regions,
821
- region: selectedRegion,
822
894
  handleChange,
823
- }), renderDataOrganization$3({ name, phone, inn, mail, handleChange }), renderSubmitButton(button, 'mb-4'), jsx(Footnote, { link: link })] }));
895
+ errors,
896
+ handleChangeErrors,
897
+ }), renderSubmitButton(button, 'mb-4'), jsx(Footnote, { link: link })] }));
824
898
  });
825
- const renderDataOrganization$3 = ({ name, phone, mail, inn, handleChange, }) => (jsxs("div", { className: "flex justify-between gap-5", children: [jsxs("div", { className: "w-1/2", children: [jsx(Input, { className: "shrink-0 text-l w-full mb-5", type: "text", "aria-label": "\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E", label: "\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E", value: name, onChange: (value) => handleChange({ name: value }) }), jsx(Input, { className: "shrink-0 text-l w-full mb-5", type: "text", "aria-label": "\u0418\u041D\u041D", label: "\u0418\u041D\u041D", value: inn, onChange: (value) => handleChange({ inn: value }) })] }), jsxs("div", { className: "w-1/2", children: [jsx(Input, { className: "shrink-0 text-l w-full mb-5", type: "text", "aria-label": "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", value: phone, onChange: (value) => handleChange({ phone: value }) }), jsx(Input, { className: "shrink-0 text-l w-full ", type: "text", "aria-label": "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", value: mail, onChange: (value) => handleChange({ mail: value }) })] })] }));
826
- const renderRegion$1 = ({ regions, region, handleChange }) => (jsx("div", { className: "flex justify-between gap-5 mb-5", children: jsx("div", { className: "w-full", children: jsx(WrapperSelect$1, { data: regions, fieldValue: "code", fieldLabel: "name", selected: region, setSelected: (value) => handleChange({ region: value }), label: "\u0420\u0435\u0433\u0438\u043E\u043D", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0433\u0438\u043E\u043D" }) }) }));
827
899
 
828
900
  const BRANCHES_URL = '/api/v1/branches';
829
901
  const EMPTY_VALUE$1 = [];
@@ -843,7 +915,7 @@
843
915
  const MAX_CREDIT_TERM = 60;
844
916
  const ITEMS_CREDIT_TERM = ['От 1 года', 'До 5 лет'];
845
917
 
846
- const renderBankOffices = ({ regions, region, branches, department, handleChange, }) => (jsxs("div", { className: "flex justify-between gap-5 mb-7", children: [jsx("div", { className: "w-1/2", children: jsx(WrapperSelect$1, { data: regions, fieldValue: "code", fieldLabel: "name", selected: region, setSelected: (value) => handleChange({ region: value }), label: "\u0420\u0435\u0433\u0438\u043E\u043D", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0433\u0438\u043E\u043D" }) }), jsx("div", { className: "w-1/2", children: jsx(WrapperSelect$1, { data: branches, fieldValue: "branchCode", fieldLabel: "address", selected: department, setSelected: (value) => handleChange({ department: value }), label: "\u0410\u0434\u0440\u0435\u0441", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0430\u0434\u0440\u0435\u0441" }) })] }));
918
+ const renderCreditDataOrganization = ({ fullName, inn, name, phone, mail, annualRevenue, handleChange, errors, handleChangeErrors, }) => (jsxs("div", { className: "flex justify-between gap-5 mb-7", children: [jsxs("div", { className: "w-1/2", children: [jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", value: fullName, onChange: (value) => handleChange({ fullName: value }) }), jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u0418\u041D\u041D", error: errors['inn'], value: inn, onChange: (value) => handleChange({ inn: value }), onBlur: (value) => handleChangeErrors({ inn: validate('inn', value) }) }), jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", error: errors['phone'], value: phone, onChange: (value) => handleChange({ phone: value }), onBlur: (value) => handleChangeErrors({ phone: validate('phone', value) }) })] }), jsxs("div", { className: "w-1/2", children: [jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u0413\u043E\u0434\u043E\u0432\u0430\u044F \u0432\u044B\u0440\u0443\u0447\u043A\u0430, \u20BD", error: errors['annualRevenue'], value: annualRevenue, onChange: (value) => handleChange({ annualRevenue: value }), onBlur: (value) => handleChangeErrors({ annualRevenue: validate('annualRevenue', value) }) }), jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E", error: errors['name'], value: name, onChange: (value) => handleChange({ name: value }), onBlur: (value) => handleChangeErrors({ name: validate('name', value) }) }), jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", value: mail, onChange: (value) => handleChange({ mail: value }) })] })] }));
847
919
 
848
920
  const addSpacesBetweenNumbers = (number) => new Intl.NumberFormat('ru-RU', {}).format(number);
849
921
 
@@ -887,81 +959,101 @@
887
959
  items: ITEMS_CREDIT_TERM,
888
960
  })] }));
889
961
 
890
- const renderDataOrganization$2 = ({ fullName, inn, name, phone, mail, annualRevenue, handleChange, }) => (jsxs("div", { className: "flex justify-between gap-5 mb-7", children: [jsxs("div", { className: "w-1/2", children: [jsx(Input, { className: "shrink-0 text-l w-full mb-5", type: "text", "aria-label": "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", label: "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", value: fullName, onChange: (value) => handleChange({ fullName: value }) }), jsx(Input, { className: "shrink-0 text-l w-full mb-5", type: "text", "aria-label": "\u0418\u041D\u041D", label: "\u0418\u041D\u041D", value: inn, onChange: (value) => handleChange({ inn: value }) }), jsx(Input, { className: "shrink-0 text-l w-full ", type: "text", "aria-label": "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", value: phone, onChange: (value) => handleChange({ phone: value }) })] }), jsxs("div", { className: "w-1/2", children: [jsx(Input, { className: "shrink-0 text-l w-full mb-5", type: "text", "aria-label": "\u0413\u043E\u0434\u043E\u0432\u0430\u044F \u0432\u044B\u0440\u0443\u0447\u043A\u0430, \u20BD", label: "\u0413\u043E\u0434\u043E\u0432\u0430\u044F \u0432\u044B\u0440\u0443\u0447\u043A\u0430, \u20BD", value: annualRevenue, onChange: (value) => handleChange({ annualRevenue: value }) }), jsx(Input, { className: "shrink-0 text-l w-full mb-5", type: "text", "aria-label": "\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E", label: "\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E", value: name, onChange: (value) => handleChange({ name: value }) }), jsx(Input, { className: "shrink-0 text-l w-full ", type: "text", "aria-label": "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", value: mail, onChange: (value) => handleChange({ mail: value }) })] })] }));
891
-
892
- const ApplicationFormCredit = JSX((props) => {
893
- const { button, link, handleSubmit } = props;
894
- const [formState, setFormState] = useState({
895
- amount: MIN_CREDIT_AMOUNT,
896
- term: MIN_CREDIT_TERM,
897
- fullName: '',
898
- inn: '',
899
- name: '',
900
- phone: '',
901
- mail: '',
902
- region: '',
903
- department: '',
904
- annualRevenue: '',
905
- });
906
- const { amount, term, fullName, inn, name, phone, mail, region, department, annualRevenue } = formState;
962
+ const renderRegionDepartment = ({ regions, region, branches, department, handleChange, errors, handleChangeErrors, }) => (jsxs("div", { className: "flex justify-between gap-5 mb-7", children: [jsx("div", { className: "w-1/2", children: jsx(SelectControl, { data: regions, fieldValue: "code", fieldLabel: "name", error: errors['region'], selected: region, setSelected: (value) => handleChange({ region: value, department: '' }), onValidate: (value) => handleChangeErrors({ region: validate('region', value) }), label: "\u0420\u0435\u0433\u0438\u043E\u043D", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0433\u0438\u043E\u043D" }) }), jsx("div", { className: "w-1/2", children: jsx(SelectControl, { data: branches, fieldValue: "branchCode", fieldLabel: "address", error: errors['department'], selected: department, setSelected: (value) => handleChange({ department: value }), onValidate: (value) => handleChangeErrors({ department: validate('department', value) }), label: "\u0410\u0434\u0440\u0435\u0441", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0430\u0434\u0440\u0435\u0441" }) })] }));
963
+
964
+ const initialFormState$2 = {
965
+ amount: MIN_CREDIT_AMOUNT,
966
+ term: 12,
967
+ fullName: '',
968
+ inn: '',
969
+ name: '',
970
+ phone: '',
971
+ mail: '',
972
+ region: '',
973
+ department: '',
974
+ annualRevenue: '',
975
+ };
976
+ const errorsInitialState$1 = {
977
+ annualRevenue: '',
978
+ inn: '',
979
+ name: '',
980
+ phone: '',
981
+ region: '',
982
+ department: '',
983
+ };
984
+ const ApplicationFormCredit = JSX(({ button, link, handleSubmit }) => {
907
985
  const regions = useGetRegions();
908
- const { handleChange } = useFormHandlers({
909
- setFormState,
986
+ const { formState, errors, handleChange, handleChangeErrors, sendForm } = useForm$1({
987
+ initialFormState: initialFormState$2,
988
+ errorsInitialState: errorsInitialState$1,
989
+ handleSubmit,
910
990
  });
911
- const selectedRegion = normalizeSelectedRegion$1(region, regions);
912
- const branches = useBranches(selectedRegion).filter((branch) => branch.address);
913
- useEffect(() => {
914
- handleChange({
915
- department: '',
916
- });
917
- }, [formState.region, handleChange]);
918
- const onSubmit = async (e) => {
991
+ const { amount, term, fullName, inn, name, phone, mail, region, department, annualRevenue } = formState;
992
+ const branches = useBranches(region).filter((branch) => branch.address);
993
+ const onSubmit = (e) => {
919
994
  e.preventDefault();
920
- const partnerComments = `Сумма=${amount}/Срок=${term}/Выручка=${annualRevenue}`;
921
- handleSubmit &&
922
- (await handleSubmit({
923
- typeForm: 'cred',
995
+ sendForm({
996
+ typeForm: 'cred',
997
+ fullName,
998
+ inn,
999
+ name,
1000
+ phone,
1001
+ mail,
1002
+ region: regions.find((_) => _.code === region)?.name || '',
1003
+ department: branches.find((_) => _.branchCode === department)?.address || '',
1004
+ partnerComments: `Сумма=${amount}/Срок=${term}/Выручка=${annualRevenue}`,
1005
+ });
1006
+ };
1007
+ return (jsxs("form", { onSubmit: onSubmit, className: "container", children: [jsx(Heading, { headingType: "h6", title: "\u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B \u043A\u0440\u0435\u0434\u0438\u0442\u0430", className: "text-center mb-4" }), renderCreditParameters({ amount, term, handleChange }), jsx(Heading, { headingType: "h6", title: "\u0414\u0430\u043D\u043D\u044B\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", className: "text-center mb-4" }), renderCreditDataOrganization({
924
1008
  fullName,
925
1009
  inn,
926
1010
  name,
927
1011
  phone,
928
1012
  mail,
929
- region: regions.find((_) => _.code === selectedRegion)?.name || '',
930
- department: branches.find((_) => _.branchCode === department)?.address || '',
931
- partnerComments,
932
- }));
933
- };
934
- return (jsxs("form", { onSubmit: onSubmit, className: "container", children: [jsx(Heading, { headingType: "h6", title: "\u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B \u043A\u0440\u0435\u0434\u0438\u0442\u0430", className: "text-center mb-4" }), renderCreditParameters({ amount, term, handleChange }), jsx(Heading, { headingType: "h6", title: "\u0414\u0430\u043D\u043D\u044B\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", className: "text-center mb-4" }), renderDataOrganization$2({ fullName, inn, name, phone, mail, annualRevenue, handleChange }), jsx(Heading, { headingType: "h6", title: "\u041E\u0444\u0438\u0441 \u0411\u0430\u043D\u043A\u0430", className: "text-center mb-4" }), renderBankOffices({
1013
+ annualRevenue,
1014
+ handleChange,
1015
+ errors,
1016
+ handleChangeErrors,
1017
+ }), jsx(Heading, { headingType: "h6", title: "\u041E\u0444\u0438\u0441 \u0431\u0430\u043D\u043A\u0430", className: "text-center mb-4" }), renderRegionDepartment({
935
1018
  regions,
936
- region: selectedRegion,
1019
+ region,
937
1020
  branches,
938
1021
  department,
939
1022
  handleChange,
1023
+ errors,
1024
+ handleChangeErrors,
940
1025
  }), renderSubmitButton(button, 'mb-4'), jsx(Footnote, { link: link })] }));
941
1026
  });
942
1027
 
1028
+ const initialFormState$1 = {
1029
+ name: '',
1030
+ phone: '',
1031
+ };
943
1032
  const ApplicationFormDeposit = JSX((props) => {
944
1033
  const { button, link, handleSubmit } = props;
945
- const [formState, setFormState] = useState({
946
- name: '',
947
- phone: '',
1034
+ const { formState, errors, handleChange, handleChangeErrors, sendForm } = useForm$1({
1035
+ initialFormState: initialFormState$1,
1036
+ errorsInitialState: initialFormState$1,
1037
+ handleSubmit,
948
1038
  });
949
1039
  const { name, phone } = formState;
950
- const { handleChange } = useFormHandlers({
951
- setFormState,
952
- });
953
- const onSubmit = async (e) => {
1040
+ const onSubmit = (e) => {
954
1041
  e.preventDefault();
955
- handleSubmit &&
956
- (await handleSubmit({
957
- typeForm: 'dpst',
1042
+ sendForm({
1043
+ typeForm: 'dpst',
1044
+ name,
1045
+ phone,
1046
+ });
1047
+ };
1048
+ return (jsxs("form", { onSubmit: onSubmit, className: "container", children: [jsx(Heading, { headingType: "h6", title: "\u041E\u0441\u0442\u0430\u0432\u044C\u0442\u0435 \u0437\u0430\u044F\u0432\u043A\u0443 \u0438 \u043C\u044B \u043E\u0442\u0432\u0435\u0442\u0438\u043C \u043D\u0430 \u043B\u044E\u0431\u044B\u0435 \u0432\u043E\u043F\u0440\u043E\u0441\u044B \u043F\u043E \u0434\u0435\u043F\u043E\u0437\u0438\u0442\u0430\u043C", className: "text-center mb-4" }), renderDataOrganization({
958
1049
  name,
959
1050
  phone,
960
- }));
961
- };
962
- return (jsxs("form", { onSubmit: onSubmit, className: "container", children: [jsx(Heading, { headingType: "h6", title: "\u041E\u0441\u0442\u0430\u0432\u044C\u0442\u0435 \u0437\u0430\u044F\u0432\u043A\u0443 \u0438 \u043C\u044B \u043E\u0442\u0432\u0435\u0442\u0438\u043C \u043D\u0430 \u043B\u044E\u0431\u044B\u0435 \u0432\u043E\u043F\u0440\u043E\u0441\u044B \u043F\u043E \u0434\u0435\u043F\u043E\u0437\u0438\u0442\u0430\u043C", className: "text-center mb-4" }), renderDataOrganization$1({ name: formState.name, phone: formState.phone, handleChange }), jsxs("div", { className: "flex justify-between items-center max-w-[560px] m-auto", children: [jsx("div", { className: "flex-1", children: jsx(Footnote, { link: link }) }), renderSubmitButton(button)] })] }));
1051
+ handleChange,
1052
+ errors,
1053
+ handleChangeErrors,
1054
+ }), jsxs("div", { className: "flex justify-between items-center max-w-[560px] m-auto", children: [jsx("div", { className: "flex-1", children: jsx(Footnote, { link: link }) }), renderSubmitButton(button)] })] }));
963
1055
  });
964
- const renderDataOrganization$1 = ({ name, phone, handleChange }) => (jsxs("div", { className: "max-w-[560px] m-auto", children: [jsx(Input, { className: "shrink-0 text-l w-full mb-5", type: "text", "aria-label": "\u0418\u043C\u044F", label: "\u0418\u043C\u044F", value: name, onChange: (value) => handleChange({ name: value }) }), jsx(Input, { className: "shrink-0 text-l w-full mb-5", type: "text", "aria-label": "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", value: phone, onChange: (value) => handleChange({ phone: value }) })] }));
1056
+ const renderDataOrganization = ({ name, phone, handleChange, errors, handleChangeErrors, }) => (jsxs("div", { className: "max-w-[560px] m-auto", children: [jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u0418\u043C\u044F", error: errors['name'], value: name, onChange: (value) => handleChange({ name: value }), onBlur: (value) => handleChangeErrors({ name: validate('name', value) }) }), jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", error: errors['phone'], value: phone, onChange: (value) => handleChange({ phone: value }), onBlur: (value) => handleChangeErrors({ phone: validate('phone', value) }) })] }));
965
1057
 
966
1058
  const sourcesComparator = (a, b) => a?.media && b?.media ? a.media - b.media : 0;
967
1059
  const ImgAsPicture = JSX(({ className = '', image, imageClassName = '', isMobile = false, pathPrefix }) => {
@@ -1018,36 +1110,53 @@
1018
1110
 
1019
1111
  const renderQuestionsInterested = ({ currencyControl, documentaryOperations, conversionOperations, text, handleChange, }) => (jsxs("div", { className: "mb-6", children: [jsxs("div", { className: "flex items-center mb-4 gap-6", children: [jsx(Checkbox, { text: "\u0412\u0430\u043B\u044E\u0442\u043D\u044B\u0439 \u043A\u043E\u043D\u0442\u0440\u043E\u043B\u044C", checked: currencyControl, onChange: (value) => handleChange({ currencyControl: value }) }), jsx(Checkbox, { text: "\u0414\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430\u0440\u043D\u044B\u0435 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438", checked: documentaryOperations, onChange: (value) => handleChange({ documentaryOperations: value }) }), jsx(Checkbox, { text: "\u041A\u043E\u043D\u0432\u0435\u0440\u0441\u0438\u043E\u043D\u043D\u044B\u0435 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438", checked: conversionOperations, onChange: (value) => handleChange({ conversionOperations: value }) })] }), jsx("textarea", { placeholder: "\u0423\u043A\u0430\u0436\u0438\u0442\u0435 \u0438\u043D\u0442\u0435\u0440\u0435\u0441\u0443\u044E\u0449\u0438\u0439 \u0432\u0430\u0441 \u0432\u043E\u043F\u0440\u043E\u0441, \u043C\u0435\u0441\u0442\u043E \u0432\u0435\u0434\u0435\u043D\u0438\u044F \u0431\u0438\u0437\u043D\u0435\u0441\u0430 \u0438 \u0443\u0434\u043E\u0431\u043D\u043E\u0435 \u0432\u0440\u0435\u043C\u044F \u0434\u043B\u044F \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u043D\u043E\u0433\u043E \u0437\u0432\u043E\u043D\u043A\u0430", className: "block w-full resize-y min-h-24 p-4 outline-none border rounded-md border-main-stroke hover:border-primary-hover active:focus:border-primary-text", value: text, onChange: (e) => handleChange({ text: e.target.value }) })] }));
1020
1112
 
1113
+ const renderWedDataOrganization = ({ fullName, name, phone, mail, handleChange, errors, handleChangeErrors, }) => (jsxs("div", { children: [jsxs("div", { className: "flex justify-between gap-5", children: [jsx("div", { className: "w-1/2", children: jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", error: errors['fullName'], value: fullName, onChange: (value) => handleChange({ fullName: value }), onBlur: (value) => handleChangeErrors({ fullName: validate('fullName', value) }) }) }), jsx("div", { className: "w-1/2", children: jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u0424\u0418\u041E", error: errors['name'], value: name, onChange: (value) => handleChange({ name: value }), onBlur: (value) => handleChangeErrors({ name: validate('name', value) }) }) })] }), jsxs("div", { className: "flex justify-between gap-5 mb-7", children: [jsx("div", { className: "w-1/2", children: jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", error: errors['phone'], value: phone, onChange: (value) => handleChange({ phone: value }), onBlur: (value) => handleChangeErrors({ phone: validate('phone', value) }) }) }), jsx("div", { className: "w-1/2", children: jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", error: errors['mail'], value: mail, onChange: (value) => handleChange({ mail: value }), onBlur: (value) => handleChangeErrors({ mail: validate('mail', value) }) }) })] })] }));
1114
+
1115
+ const initialFormState = {
1116
+ fullName: '',
1117
+ name: '',
1118
+ phone: '',
1119
+ mail: '',
1120
+ currencyControl: false,
1121
+ documentaryOperations: false,
1122
+ conversionOperations: false,
1123
+ text: '',
1124
+ };
1125
+ const errorsInitialState = {
1126
+ fullName: '',
1127
+ name: '',
1128
+ phone: '',
1129
+ mail: '',
1130
+ text: '',
1131
+ };
1021
1132
  const ApplicationFormWed = JSX((props) => {
1022
1133
  const { button, link, handleSubmit } = props;
1023
- const [formState, setFormState] = useState({
1024
- fullName: '',
1025
- name: '',
1026
- phone: '',
1027
- mail: '',
1028
- currencyControl: false,
1029
- documentaryOperations: false,
1030
- conversionOperations: false,
1031
- text: '',
1134
+ const { formState, errors, handleChange, handleChangeErrors, sendForm } = useForm$1({
1135
+ initialFormState,
1136
+ errorsInitialState,
1137
+ handleSubmit,
1032
1138
  });
1033
1139
  const { fullName, name, phone, mail, currencyControl, documentaryOperations, conversionOperations, text, } = formState;
1034
- const { handleChange } = useFormHandlers({
1035
- setFormState,
1036
- });
1037
- const onSubmit = async (e) => {
1140
+ const onSubmit = (e) => {
1038
1141
  e.preventDefault();
1039
- const partnerComments = `Валютный контроль=${currencyControl}/Документарные операции=${documentaryOperations}/Конверсионные операции=${conversionOperations}/Доп инф=${text}`;
1040
- handleSubmit &&
1041
- (await handleSubmit({
1042
- typeForm: 'kved',
1142
+ sendForm({
1143
+ typeForm: 'kved',
1144
+ fullName,
1145
+ name,
1146
+ phone,
1147
+ mail,
1148
+ partnerComments: `Валютный контроль=${currencyControl}/Документарные операции=${documentaryOperations}/Конверсионные операции=${conversionOperations}/Доп инф=${text}`,
1149
+ });
1150
+ };
1151
+ return (jsxs("form", { onSubmit: onSubmit, className: "container", children: [jsx(Heading, { headingType: "h6", title: "\u0414\u0430\u043D\u043D\u044B\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", className: "text-center mb-4" }), renderWedDataOrganization({
1043
1152
  fullName,
1044
1153
  name,
1045
1154
  phone,
1046
1155
  mail,
1047
- partnerComments,
1048
- }));
1049
- };
1050
- return (jsxs("form", { onSubmit: onSubmit, className: "container", children: [jsx(Heading, { headingType: "h6", title: "\u0414\u0430\u043D\u043D\u044B\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", className: "text-center mb-4" }), renderDataOrganization({ fullName, name, phone, mail, handleChange }), jsx(Heading, { headingType: "h6", title: "\u0418\u043D\u0442\u0435\u0440\u0435\u0441\u0443\u044E\u0449\u0438\u0439 \u0432\u043E\u043F\u0440\u043E\u0441", className: "text-center mb-4" }), renderQuestionsInterested({
1156
+ handleChange,
1157
+ errors,
1158
+ handleChangeErrors,
1159
+ }), jsx(Heading, { headingType: "h6", title: "\u0418\u043D\u0442\u0435\u0440\u0435\u0441\u0443\u044E\u0449\u0438\u0439 \u0432\u043E\u043F\u0440\u043E\u0441", className: "text-center mb-4" }), renderQuestionsInterested({
1051
1160
  currencyControl,
1052
1161
  documentaryOperations,
1053
1162
  conversionOperations,
@@ -1055,7 +1164,6 @@
1055
1164
  handleChange,
1056
1165
  }), jsxs("div", { className: "flex items-center pb-9 mb-9 border-b border-main-divider", children: [renderSubmitButton(button, 'mr-5'), jsx(Footnote, { link: link })] }), jsx(Heading, { headingType: "h6", title: "\u0418\u043B\u0438 \u0441\u0432\u044F\u0436\u0438\u0442\u0435\u0441\u044C \u0441 \u043D\u0430\u043C\u0438 \u0443\u0434\u043E\u0431\u043D\u044B\u043C \u0441\u043F\u043E\u0441\u043E\u0431\u043E\u043C", className: "text-center mb-4" }), renderContacts()] }));
1057
1166
  });
1058
- const renderDataOrganization = ({ fullName, name, phone, mail, handleChange, }) => (jsxs("div", { children: [jsxs("div", { className: "flex justify-between gap-5 mb-5", children: [jsx("div", { className: "w-1/2", children: jsx(Input, { className: "shrink-0 text-l w-full", type: "text", "aria-label": "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", label: "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", value: fullName, onChange: (value) => handleChange({ fullName: value }) }) }), jsx("div", { className: "w-1/2", children: jsx(Input, { className: "shrink-0 text-l w-full", type: "text", "aria-label": "\u0424\u0418\u041E", label: "\u0424\u0418\u041E", value: name, onChange: (value) => handleChange({ name: value }) }) })] }), jsxs("div", { className: "flex justify-between gap-5 mb-7", children: [jsx("div", { className: "w-1/2", children: jsx(Input, { className: "shrink-0 text-l w-full", type: "text", "aria-label": "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", value: phone, onChange: (value) => handleChange({ phone: value }) }) }), jsx("div", { className: "w-1/2", children: jsx(Input, { className: "shrink-0 text-l w-full", type: "text", "aria-label": "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", value: mail, onChange: (value) => handleChange({ mail: value }) }) })] })] }));
1059
1167
 
1060
1168
  const ResponseNotification = JSX(({ responceType }) => {
1061
1169
  const responceOK = responceType === 'OK';
@@ -1075,9 +1183,9 @@
1075
1183
  const { className = '', title, typeForm = 'credit', button, link, ...rest } = props;
1076
1184
  const [responceType, setResponseType] = useState('');
1077
1185
  const handleSubmit = useCallback(async (data) => {
1078
- const status = await API.send(data);
1079
- setResponseType(status ? 'OK' : 'Fail');
1080
- return 'OK';
1186
+ const status = (await API.send(data)) ? 'OK' : 'Fail';
1187
+ setResponseType(status);
1188
+ return status;
1081
1189
  }, []);
1082
1190
  return (jsx(BlockWrapper, { className: `font-sans bg-white p-[50px] pb-9 ${className}`, ...rest, children: jsxs("div", { className: "container max-w-[978px]", children: [title ? jsx(Heading, { headingType: "h3", title: title, className: "text-center mb-8" }) : null, COMPONENTS_MAP[typeForm]({ button, link, handleSubmit }), responceType ? jsx(ResponseNotification, { responceType: responceType }) : null] }) }));
1083
1191
  });
@@ -1099,11 +1207,11 @@
1099
1207
  return description?.items && description.items.length > 0 ? (jsx("ul", { className: listStyleType, children: description.items.map((_, i) => (jsx("li", { children: _ }, `benefitListItem-${i}`))) })) : null;
1100
1208
  };
1101
1209
 
1102
- const renderButtonsSection = (buttons, { className = '', buttonClassName, isVertical } = {}) => buttons?.length && buttons.some((_) => _?.text) ? (jsx("div", { className: style('flex', isVertical ? 'flex-col gap-2' : 'gap-4', className), children: buttons.map(renderButton(buttonClassName)) })) : null;
1210
+ const renderButtonsSection = (buttons, { className = '', buttonClassName, isVertical } = {}) => buttons?.length && buttons.some((_) => _?.text || _?.icon?.icon) ? (jsx("div", { className: style('flex', isVertical ? 'flex-col gap-2' : 'gap-4', className), children: buttons.map(renderButton(buttonClassName)) })) : null;
1103
1211
  const renderButton = (buttonClassName = '') => (button, index) => {
1104
1212
  const { text, icon, iconRight, version, ...rest } = button || {};
1105
1213
  const iconVersion = version === 'secondary' ? 'color' : 'white';
1106
- return text ? (jsx(Button, { className: buttonClassName, appendLeft: renderButtonIcon({ ...icon, iconVersion }), appendRight: renderButtonIcon({ ...iconRight, iconVersion }), version: version, text: text, ...rest }, index ? String(index) : '')) : null;
1214
+ return text || icon?.icon ? (jsx(Button, { className: buttonClassName, appendLeft: renderButtonIcon({ ...icon, iconVersion }), appendRight: renderButtonIcon({ ...iconRight, iconVersion }), version: version, text: text, ...rest }, index ? String(index) : '')) : null;
1107
1215
  };
1108
1216
  const DEFAULT_ICON_W = 24;
1109
1217
  const renderButtonIcon = (icon) => icon?.icon || icon?.src ? (jsx(ImgInner, { image: icon, width: String(icon?.size?.width || DEFAULT_ICON_W), height: String(DEFAULT_ICON_W), asSVG: true })) : null;
@@ -1161,9 +1269,9 @@
1161
1269
  const Bonus = JSX((props) => {
1162
1270
  const { className = '', title, description, bonusItems, ...rest } = props;
1163
1271
  return (jsx(BlockWrapper, { className: `p-12 pb-9 ${className}`, ...rest, children: jsxs("div", { className: "container", children: [jsx(Headline, { className: "!p-0", title: title, description: description, headlineVersion: "M" }), jsx("div", { className: "flex flex-wrap w-full mt-9", children: bonusItems?.length
1164
- ? bonusItems.map((_, i) => (jsx("div", { className: "flex-grow w-[49%] border border-gray p-9 mb-3 mx-2 even:mr-0 odd:ml-0 last:odd:mx-0", children: jsxs("div", { className: "flex justify-between w-full", children: [jsxs("div", { className: "flex flex-col justify-between mr-4", children: [jsxs("div", { children: [jsx("div", { className: "text-h4", children: _.title }), jsx("div", { className: "text-xl-light mt-2 max-w-[488px]", children: _.description })] }), renderButtonsSection(_?.buttons)] }), _.bonusItemContent?.bonusType
1165
- ? renderBonusItemContent(_.bonusItemContent)
1166
- : null] }) }, String(i))))
1272
+ ? bonusItems.map((_, i) => (jsxs("div", { className: "flex-grow w-[49%] border border-gray p-9 mb-3 mx-2 even:mr-0 odd:ml-0 last:odd:mx-0", children: [_?.title ? jsx(Text, { size: "text-h4", children: _.title }) : null, _?.description ? (jsx("div", { className: "mt-2", children: jsx(Paragraph, { size: "text-xl", font: "font-light", children: _.description }) })) : null, jsxs("div", { className: "flex justify-between items-end mt-3", children: [renderButtonsSection(_?.buttons), _.bonusItemContent?.bonusType
1273
+ ? renderBonusItemContent(_.bonusItemContent)
1274
+ : null] })] }, String(i))))
1167
1275
  : null })] }) }));
1168
1276
  });
1169
1277
  const renderBonusItemContent = (bonusItemContent) => (jsx("div", { children: bonusItemContent.bonusType === 'count'
@@ -2031,6 +2139,28 @@
2031
2139
  .filter(([_]) => _ && _.intersectionRatio >= 0.9)
2032
2140
  .map(([, i]) => i);
2033
2141
 
2142
+ const containerStyles = {
2143
+ 'horizontal-list': 'mx-auto mt-5 w-fit',
2144
+ 'vertical-list': 'absolute flex-col justify-center h-full top-0 left-4',
2145
+ };
2146
+ const activeDotStyles = {
2147
+ 'horizontal-list': 'w-6',
2148
+ 'vertical-list': 'h-6',
2149
+ };
2150
+ const dotStyle = 'cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white group-data-transparent:bg-white';
2151
+ const inactiveDotStyle = 'w-2 h-2 opacity-30';
2152
+ const SwipeListControlDots = JSX(({ containerRef, activeIndex, dotCount = 0, listType = 'horizontal-list', version }) => {
2153
+ const handleClick = (idx) => {
2154
+ if (idx !== activeIndex && containerRef?.current) {
2155
+ containerRef.current.children[idx]?.scrollIntoView({
2156
+ behavior: 'smooth',
2157
+ block: 'nearest',
2158
+ });
2159
+ }
2160
+ };
2161
+ return dotCount ? (jsx("div", { className: style('flex gap-2', containerStyles[listType], version ? 'group' : ''), ...(version ? { 'data-ver': version } : {}), children: new Array(dotCount).fill(null).map((_, idx) => (jsx("div", { className: `${dotStyle} ${idx === activeIndex ? activeDotStyles[listType] : inactiveDotStyle}`, role: "button", "aria-hidden": true, onClick: () => handleClick(idx) }, String(idx)))) })) : null;
2162
+ });
2163
+
2034
2164
  const areArraysEqual = (as, bs) => as === bs || Boolean(as && bs && as?.length === bs?.length && as.every((_, i) => _ === bs[i]));
2035
2165
 
2036
2166
  const getItemWidth = (container) => (itemCount) => container.scrollWidth / itemCount;
@@ -2121,30 +2251,8 @@
2121
2251
  });
2122
2252
  const renderBlur = (isBlur, scroll) => (scroll.canScrollLeft || scroll.canScrollRight) && isBlur ? (jsxs("div", { children: [jsx("div", { className: style(blurBaseStyle, 'left-0 bg-opacity-from-white') }), jsx("div", { className: style(blurBaseStyle, 'right-0 bg-opacity-to-white') })] })) : null;
2123
2253
 
2124
- const containerStyles = {
2125
- 'horizontal-list': 'mx-auto mt-5 w-fit',
2126
- 'vertical-list': 'absolute flex-col justify-center h-full top-0 left-4',
2127
- };
2128
- const activeDotStyles = {
2129
- 'horizontal-list': 'w-6',
2130
- 'vertical-list': 'h-6',
2131
- };
2132
- const dotStyle = 'cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white group-data-transparent:bg-white';
2133
- const inactiveDotStyle = 'w-2 h-2 opacity-30';
2134
- const SwipeListControlDots = JSX(({ containerRef, activeIndex, dotCount = 0, listType = 'horizontal-list', version }) => {
2135
- const handleClick = (idx) => {
2136
- if (idx !== activeIndex && containerRef?.current) {
2137
- containerRef.current.children[idx]?.scrollIntoView({
2138
- behavior: 'smooth',
2139
- block: 'nearest',
2140
- });
2141
- }
2142
- };
2143
- return dotCount ? (jsx("div", { className: style('flex gap-2', containerStyles[listType], version ? 'group' : ''), ...(version ? { 'data-ver': version } : {}), children: new Array(dotCount).fill(null).map((_, idx) => (jsx("div", { className: `${dotStyle} ${idx === activeIndex ? activeDotStyles[listType] : inactiveDotStyle}`, role: "button", "aria-hidden": true, onClick: () => handleClick(idx) }, String(idx)))) })) : null;
2144
- });
2145
-
2146
2254
  const ITEMS_GAP = 4;
2147
- const Carousel = JSX(({ className = '', itemCount, visibleItemCount, isBlur = true, isCyclic = false, arrowsPadded = true, isPadding = true, showDots = false, ...rest }) => {
2255
+ const Carousel = JSX(({ className = '', itemCount, visibleItemCount, isBlur = true, isCyclic = false, arrowsPadded = true, isPadding = true, showDots = false, isAlignCenter = false, ...rest }) => {
2148
2256
  const { blocks: childBlocks = [] } = rest.block || {};
2149
2257
  const count = itemCount || childBlocks?.length;
2150
2258
  const [activeIndex, setActiveIndex] = useState(Math.floor((visibleItemCount || 0) / 2));
@@ -2156,7 +2264,7 @@
2156
2264
  });
2157
2265
  const [dotsActiveIndex] = scroll.visibleIndicesRange;
2158
2266
  const isBankHistoryCarousel = childBlocks && childBlocks[0]?.type === 'CarouselBankHistoryCard';
2159
- return (jsx(BlockWrapper, { className: style(getPaddingStyle(isPadding), 'group-data-secondary:bg-primary-main group-data-secondary:text-white', className), ...rest, children: jsxs("div", { className: "relative max-w-full", children: [jsx(SwipeListContainer, { containerRef: containerRef, visibleItemCount: visibleItemCount, snapAlign: "snap-start", gap: ITEMS_GAP, onVisibleIndicesChange: scroll.handleVisibleIndicesChange, children: renderChildren({
2267
+ return (jsx(BlockWrapper, { className: style(getPaddingStyle(isPadding), 'group-data-secondary:bg-primary-main group-data-secondary:text-white', className), ...rest, children: jsxs("div", { className: style(getAlignStyle(isAlignCenter), 'relative max-w-full'), children: [jsx(SwipeListContainer, { containerRef: containerRef, visibleItemCount: visibleItemCount, snapAlign: "snap-start", gap: ITEMS_GAP, onVisibleIndicesChange: scroll.handleVisibleIndicesChange, children: renderChildren({
2160
2268
  ...rest,
2161
2269
  renderProps: isBankHistoryCarousel
2162
2270
  ? (block, options) => renderBlock(block, options, {
@@ -2180,6 +2288,7 @@
2180
2288
  'CarouselEventCard',
2181
2289
  ];
2182
2290
  const getPaddingStyle = (isPadding) => (isPadding ? 'p-12' : '');
2291
+ const getAlignStyle = (isAlignCenter) => isAlignCenter ? 'flex justify-center' : '';
2183
2292
  const renderDots = (containerRef, dotsActiveIndex, itemCount) => (jsx(SwipeListControlDots, { containerRef: containerRef, activeIndex: dotsActiveIndex, dotCount: itemCount, listType: 'horizontal-list' }));
2184
2293
 
2185
2294
  const CarouselBankHistoryCard = JSX(({ title, description, blocksLength = 0, activeIndex, options }) => {
@@ -2389,13 +2498,11 @@
2389
2498
  const renderIconBlock$1 = (icon) => (jsxs("div", { className: "absolute bottom-0 right-0", children: [icon?.icon ? jsx(ImgInner, { image: getIconWithVersion(icon), asSVG: true }) : null, icon?.src ? jsx(ImgInner, { image: icon }) : null] }));
2390
2499
 
2391
2500
  const RichText = JSX((props) => {
2392
- const { __html = '' } = props;
2393
- return jsx("div", { className: "md-container", dangerouslySetInnerHTML: { __html } });
2501
+ const { __html = '', richVersion = '' } = props;
2502
+ return (jsx("div", { className: style(richVersion, 'md-container'), dangerouslySetInnerHTML: { __html } }));
2394
2503
  });
2395
2504
 
2396
- const CarouselRichTextCard = JSX(({ className = '', __html, richVersion = 'striped', ...rest }) => {
2397
- return (jsx(BlockWrapper, { className: style('p-9 border border-gray min-w-96', richVersion, className), ...rest, children: jsx(RichText, { __html: __html }) }));
2398
- });
2505
+ const CarouselRichTextCard = JSX(({ className = '', __html, richVersion = 'striped', ...rest }) => (jsx(BlockWrapper, { className: style('p-9 border border-gray min-w-96', className), ...rest, children: jsx(RichText, { __html: __html, richVersion: richVersion }) })));
2399
2506
 
2400
2507
  const Foldable = JSX(({ className = '', isFoldButtonOnTop = false, unfoldedByDefault = false, renderFoldableSection, renderFoldButton, }) => {
2401
2508
  const [isUnfolded, setIsUnfolded] = useState(unfoldedByDefault);
@@ -2424,10 +2531,10 @@
2424
2531
  const cellsNode = cardCells.map(renderCardInfo);
2425
2532
  const visibleCells = cellsNode.slice(0, VISIBLE_CELLS_COUNT);
2426
2533
  const hiddenCells = cellsNode.slice(VISIBLE_CELLS_COUNT);
2427
- return (jsxs(BlockWrapper, { className: style('relative border border-gray min-w-[322px] p-8 flex flex-col', getHitStyle(isHighlighting), className), ...rest, children: [isHighlighting ? renderHitIcon() : null, renderIconBlock(icon), title ? jsx(Heading, { className: "text-center pt-2", headingType: "h5", title: title }) : null, button ? jsx(Button, { className: "w-full mt-4", ...button }) : null, cardCells.length ? (jsx(Foldable, { renderFoldableSection: ({ isUnfolded }) => (jsxs("div", { children: [visibleCells, jsx(FoldableSection, { isUnfolded: isUnfolded, children: hiddenCells })] })), renderFoldButton: cardCells.length > 1 ? renderFoldButton$1 : null })) : null] }));
2534
+ return (jsxs(BlockWrapper, { className: style('relative border border-gray p-8 flex flex-col', getHitStyle(isHighlighting), className), ...rest, children: [isHighlighting ? renderHitIcon() : null, renderIconBlock(icon), title ? jsx(Heading, { className: "text-center pt-2", headingType: "h5", title: title }) : null, button ? jsx(Button, { className: "w-full mt-4", ...button }) : null, cardCells.length ? (jsx(Foldable, { renderFoldableSection: ({ isUnfolded }) => (jsxs("div", { children: [visibleCells, jsx(FoldableSection, { isUnfolded: isUnfolded, children: hiddenCells })] })), renderFoldButton: cardCells.length > 1 ? renderFoldButton$1 : null })) : null] }));
2428
2535
  });
2429
2536
  const renderIconBlock = (icon) => (jsxs("div", { className: "w-[267px] min-w-[267px] self-center", children: [icon?.src ? jsx(ImgInner, { image: icon }) : null, icon?.icon ? jsx(ImgInner, { image: getIconWithVersion(icon), asSVG: true }) : null] }));
2430
- const getHitStyle = (isHighlighting) => isHighlighting ? 'mt-9 pt-[70px]' : 'mt-[70px] pt-7';
2537
+ const getHitStyle = (isHighlighting) => isHighlighting ? 'mt-8 pt-20' : 'mt-20 pt-8';
2431
2538
  const renderFoldButton$1 = ({ isUnfolded, onToggle }) => (jsxs("button", { className: "w-full cursor-pointer text-primary-main pt-5 flex justify-between items-center", onClick: onToggle, children: [jsx("div", { children: isUnfolded ? 'Скрыть' : 'Подробнее о тарифе' }), jsx(Icon, { className: "text-primary-text", name: isUnfolded ? 'ArrowUpIcon' : 'ArrowDownIcon', width: "16", height: "16", asSVG: true })] }));
2432
2539
  const renderCardInfo = (cell, i) => (jsxs("div", { className: "py-5 border-b border-main-divider", children: [cell?.title ? (jsx("div", { className: "text-secondary-text text-m-light opacity-80", children: cell.title })) : null, cell?.description ? (jsx("div", { className: "text-primary-text text-h6 mt-1", children: cell.description })) : null] }, String(i)));
2433
2540
  const renderHitIcon = () => (jsxs("div", { className: "absolute -top-7 -right-4 h-[60px] w-[60px] bg-white flex flex-col items-center justify-center rounded-md shadow-[0_4px_25px_rgba(0,0,0,0.07)]", children: [jsx(Icon, { iconVersion: "black", name: "HeartIcon", width: "23", height: "22", asSVG: true }), jsx(Paragraph, { size: "text-s", font: "font-normal", align: "text-center", color: "text-primary-text", children: "\u0425\u0418\u0422" })] }));
@@ -2517,6 +2624,49 @@
2517
2624
  const getErrorBlockStyle = (text) => (text ? 'py-20 pt-3 pb-1' : 'mb-16 pb-2 mt-24 pt-3');
2518
2625
  const ErrorBlock = JSX(({ className = '', title, subtitle, error, button, ...rest }) => (jsxs(BlockWrapper, { className: style('flex flex-col justify-center items-center', getErrorBlockStyle(button?.text), className), version: "transparent", ...rest, children: [jsx("div", { className: "flex justify-center py-20", children: renderErrorContent(error) }), title ? jsx(Heading, { headingType: "h1", className: "text-left mb-4", title: title }) : null, subtitle ? (jsx("div", { className: "font-sans text-xl-light mb-7 max-w-[613px] text-center", children: subtitle })) : null, button?.text ? (jsx(Button, { className: "py-4 px-9", version: button?.version, ...button, children: button.text })) : null] })));
2519
2626
 
2627
+ var Currencies;
2628
+ (function (Currencies) {
2629
+ Currencies["EUR"] = "EUR";
2630
+ Currencies["USD"] = "USD";
2631
+ Currencies["GBP"] = "GBP";
2632
+ Currencies["AUD"] = "AUD";
2633
+ Currencies["CNY"] = "CNY";
2634
+ Currencies["RUB"] = "RUB";
2635
+ })(Currencies || (Currencies = {}));
2636
+
2637
+ const CURRENCY_ICONS_MAP$1 = {
2638
+ USD: 'DollarIcon',
2639
+ EUR: 'EuroIcon',
2640
+ GBP: 'DollarIcon',
2641
+ AUD: 'DollarIcon',
2642
+ CNY: 'DollarIcon',
2643
+ RUB: 'RoundRubleIcon',
2644
+ };
2645
+ const renderCurrencyRow$1 = ({ title, buyPrice, buyDifference, sellPrice, sellDifference, buyOfficeName, sellOfficeName, }) => {
2646
+ return (jsxs("tr", { className: "pb-1 text-h6", children: [jsx("td", { className: "pt-4", children: jsxs("div", { className: "flex items-center", children: [title ? (jsx(ImgInner, { image: { icon: CURRENCY_ICONS_MAP$1[title] }, width: "24", height: "24" })) : null, jsx("span", { className: "ml-2", children: title })] }) }), renderCurrency(buyPrice, buyDifference), renderCurrency(sellPrice, sellDifference), renderOffice(buyPrice, buyOfficeName), renderOffice(sellPrice, sellOfficeName)] }, title));
2647
+ };
2648
+ const formatCurrency$1 = (value) => (value ? currencyNumberFormat$1.format(value) : '');
2649
+ const renderCurrency = (price, difference) => {
2650
+ return (jsxs("td", { className: "pt-4 pl-11", children: [jsx("div", { children: formatCurrency$1(price) }), jsx("div", { className: style('font-normal text-sm text-secondary-text', (difference || 0) >= 0 ? 'text-green' : 'text-red'), children: formatCurrency$1(difference) })] }));
2651
+ };
2652
+ const renderOffice = (price, officeName = '') => {
2653
+ return (jsxs("td", { className: "pt-4 pl-11", children: [jsx("div", { children: formatCurrency$1(price) }), jsx("div", { className: "font-normal text-sm text-green", children: officeName })] }));
2654
+ };
2655
+ const currencyNumberFormat$1 = new Intl.NumberFormat('ru', {
2656
+ style: 'currency',
2657
+ currency: Currencies.RUB,
2658
+ });
2659
+
2660
+ const renderTableHeader = (title) => {
2661
+ return (jsx("th", { className: "pl-11", children: jsx(Text, { size: "text-m-light", align: "text-left", color: "text-secondary-text", children: title }) }));
2662
+ };
2663
+
2664
+ const ExchangeRateOffice = JSX(({ className = '', currencies = [], actuality = '', officeName = '', ...rest }) => {
2665
+ const fourRates = topNRates(currencies, 4);
2666
+ return (jsxs(BlockWrapper, { className: style('font-sans text-primary-text py-10 bg-white', className), ...rest, children: [jsxs("div", { className: "flex flex-row flex-grow-0 justify-between mx-10 mb-8", children: [jsx(Heading, { headingType: "h4", title: 'Курс обмена валют в ' + officeName, className: "whitespace-pre-wrap text-h4 mb-5" }), jsx("div", { className: "pl-11", children: jsx(Text, { size: "text-m-light", align: "text-left", color: "text-secondary-text", children: actuality }) })] }), jsx("div", { className: "flex flex-row ml-8 mr-14 pt-4 text-left", children: fourRates.length > 0 ? (jsxs("table", { className: style('h-fit w-fit', className), children: [jsx("thead", { children: jsxs("tr", { children: [jsx("th", { children: jsx(Text, { size: "text-m-light", align: "text-left", color: "text-secondary-text", children: "\u0412\u0430\u043B\u044E\u0442\u0430" }) }), renderTableHeader('Купить'), renderTableHeader('Продать'), renderTableHeader('Лучшая покупка'), renderTableHeader('Лучшая продажа')] }) }), jsx("tbody", { children: fourRates.map((item) => renderCurrencyRow$1(item)) })] })) : null })] }));
2667
+ });
2668
+ const topNRates = (rates, n) => rates.sort((a, b) => Number(a.id) - Number(b.id)).slice(0, n);
2669
+
2520
2670
  var Currency;
2521
2671
  (function (Currency) {
2522
2672
  Currency["RUB"] = "RUB";
@@ -4198,8 +4348,8 @@
4198
4348
  }
4199
4349
 
4200
4350
  const RichTextBlock = JSX((props) => {
4201
- const { __html, ...rest } = props;
4202
- return (jsx(BlockWrapper, { ...rest, children: jsx(RichText, { __html: __html }) }));
4351
+ const { __html, richVersion, ...rest } = props;
4352
+ return (jsx(BlockWrapper, { ...rest, children: jsx(RichText, { __html: __html, richVersion: richVersion }) }));
4203
4353
  });
4204
4354
 
4205
4355
  const RollupItem = JSX(({ className = '', label = 'Развернуть', isExpanded, isFoldButtonOnTop = true, version = 'primary', ...rest }) => (jsx(BlockWrapper, { className: `w-full border-0 border-b border-solid border-main-divider last:border-b-0 ${className}`, tag: "div", version: "transparent", ...rest, children: jsx(Foldable, { isFoldButtonOnTop: isFoldButtonOnTop, unfoldedByDefault: isExpanded, renderFoldableSection: ({ isUnfolded }) => (jsx(FoldableSection, { className: `grid grid-cols-12 gap-5 [&>*]:p-0`, isUnfolded: isUnfolded, children: renderChildren(rest) })), renderFoldButton: ({ isUnfolded, onToggle }) => renderFoldButton({ version, label, isUnfolded, onToggle }) }) })));
@@ -4585,9 +4735,7 @@
4585
4735
  return (jsxs(Button, { version: "primary", onClick: onClick, className: "w-full flex items-center justify-center rounded-none py-5", children: [jsx("div", { className: "text-h4", children: isOpen ? 'Скрыть' : 'Показать ставки по вкладу' }), jsx(Icon, { name: isOpen ? 'ArrowUpIcon' : 'ArrowDownIcon', className: "ml-3", iconVersion: "white", width: "20", height: "20", asSVG: true })] }));
4586
4736
  });
4587
4737
 
4588
- const renderButtonsCellData = ({ buttons }) => renderButtonsSection(buttons, {
4589
- buttonClassName: 'w-12 h-12',
4590
- });
4738
+ const renderButtonsCellData = ({ buttons }) => renderButtonsSection(buttons);
4591
4739
  const renderLabelDescriptionCellData = ({ label, description }) => {
4592
4740
  const labelClassName = `text-h6 m-0 ${description ? 'mb-1' : ''}`;
4593
4741
  return (jsxs("div", { children: [label ? jsx("div", { className: labelClassName, children: label }) : null, description ? jsx("div", { className: "text-secondary-text text-l-light", children: description }) : null] }));
@@ -4855,6 +5003,7 @@
4855
5003
  Tile,
4856
5004
  VerticalLayout,
4857
5005
  Video,
5006
+ ExchangeRateOffice,
4858
5007
  };
4859
5008
 
4860
5009
  const debounce = (fn, delay = 600) => {
@@ -4985,7 +5134,7 @@
4985
5134
  return (jsx("div", { className: "flex items-end absolute bottom-0 right-0 h-full pointer-events-none", children: jsx(LikeControl, { className: "rounded-tl-lg sticky bottom-0 pointer-events-auto" }) }));
4986
5135
  }
4987
5136
 
4988
- const packageVersion = "0.9.16";
5137
+ const packageVersion = "0.10.0";
4989
5138
 
4990
5139
  exports.Blocks = Blocks;
4991
5140
  exports.ContentPage = ContentPage;