@redneckz/wildless-cms-uni-blocks 0.14.211 → 0.14.213

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 (658) hide show
  1. package/bin/migration-scripts/0.14.169.js +3 -2
  2. package/bin/migration-scripts/0.14.213.js +235 -0
  3. package/bundle/blocks.schema.json +1 -1
  4. package/bundle/bundle.umd.js +525 -625
  5. package/bundle/bundle.umd.min.js +1 -1
  6. package/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +1 -44
  7. package/bundle/components/ApplicationForm/ApplicationFormFeedback.d.ts +5 -2
  8. package/bundle/components/ApplicationForm/ApplicationFormsProps.d.ts +1 -2
  9. package/bundle/components/ApplicationForm/EmbeddableForms.d.ts +0 -5
  10. package/bundle/components/ApplicationFormCustom/AcquiringField.d.ts +5 -0
  11. package/bundle/components/ApplicationFormCustom/AddressBranchField.d.ts +6 -0
  12. package/bundle/components/ApplicationFormCustom/AmountField.d.ts +2 -0
  13. package/bundle/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +7 -4
  14. package/bundle/components/ApplicationFormCustom/CommentField.d.ts +2 -0
  15. package/bundle/components/ApplicationFormCustom/CustomFieldProps.d.ts +6 -0
  16. package/bundle/components/ApplicationFormCustom/OnlineCheckoutField.d.ts +2 -0
  17. package/bundle/components/ApplicationFormCustom/PosTerminalField.d.ts +2 -0
  18. package/bundle/components/ApplicationFormCustom/RegionField.d.ts +2 -0
  19. package/bundle/components/ApplicationFormCustom/RegionPremiumField.d.ts +2 -0
  20. package/bundle/components/ApplicationFormCustom/TermField.d.ts +2 -0
  21. package/bundle/components/ApplicationFormCustom/UltraPremiumField.d.ts +4 -0
  22. package/bundle/components/ApplicationFormCustom/getField.d.ts +4 -2
  23. package/bundle/components/ApplicationFormCustom/getInitialFormState.d.ts +6 -0
  24. package/bundle/components/ApplicationFormCustom/getPartnerComments.d.ts +2 -0
  25. package/bundle/ui-kit/Input/InputPhoneControl.d.ts +2 -0
  26. package/dist/components/ApplicationForm/ApplicationFormContent.d.ts +1 -44
  27. package/dist/components/ApplicationForm/ApplicationFormFeedback.d.ts +5 -2
  28. package/dist/components/ApplicationForm/ApplicationFormFeedback.js +9 -7
  29. package/dist/components/ApplicationForm/ApplicationFormFeedback.js.map +1 -1
  30. package/dist/components/ApplicationForm/ApplicationFormsProps.d.ts +1 -2
  31. package/dist/components/ApplicationForm/EmbeddableForms.d.ts +0 -5
  32. package/dist/components/ApplicationForm/EmbeddableForms.js +0 -10
  33. package/dist/components/ApplicationForm/EmbeddableForms.js.map +1 -1
  34. package/dist/components/ApplicationForm/renderWedDataOrganization.js +3 -3
  35. package/dist/components/ApplicationForm/renderWedDataOrganization.js.map +1 -1
  36. package/dist/components/ApplicationFormCustom/AcquiringField.d.ts +5 -0
  37. package/dist/components/ApplicationFormCustom/AcquiringField.js +29 -0
  38. package/dist/components/ApplicationFormCustom/AcquiringField.js.map +1 -0
  39. package/dist/components/ApplicationFormCustom/AddressBranchField.d.ts +6 -0
  40. package/dist/components/{ApplicationForm → ApplicationFormCustom}/AddressBranchField.js +12 -5
  41. package/dist/components/ApplicationFormCustom/AddressBranchField.js.map +1 -0
  42. package/dist/components/ApplicationFormCustom/AmountField.d.ts +2 -0
  43. package/dist/components/ApplicationFormCustom/AmountField.js +10 -0
  44. package/dist/components/ApplicationFormCustom/AmountField.js.map +1 -0
  45. package/dist/components/ApplicationFormCustom/ApplicationFormCustom.js +4 -4
  46. package/dist/components/ApplicationFormCustom/ApplicationFormCustom.js.map +1 -1
  47. package/dist/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +7 -4
  48. package/dist/components/ApplicationFormCustom/CommentField.d.ts +2 -0
  49. package/dist/components/ApplicationFormCustom/CommentField.js +9 -0
  50. package/dist/components/ApplicationFormCustom/CommentField.js.map +1 -0
  51. package/dist/components/ApplicationFormCustom/CustomFieldProps.d.ts +6 -0
  52. package/dist/components/{ApplicationForm/models.js → ApplicationFormCustom/CustomFieldProps.js} +1 -1
  53. package/dist/components/ApplicationFormCustom/CustomFieldProps.js.map +1 -0
  54. package/dist/components/ApplicationFormCustom/OnlineCheckoutField.d.ts +2 -0
  55. package/dist/components/ApplicationFormCustom/OnlineCheckoutField.js +8 -0
  56. package/dist/components/ApplicationFormCustom/OnlineCheckoutField.js.map +1 -0
  57. package/dist/components/ApplicationFormCustom/PosTerminalField.d.ts +2 -0
  58. package/dist/components/ApplicationFormCustom/PosTerminalField.js +8 -0
  59. package/dist/components/ApplicationFormCustom/PosTerminalField.js.map +1 -0
  60. package/dist/components/ApplicationFormCustom/RegionField.d.ts +2 -0
  61. package/dist/components/ApplicationFormCustom/RegionField.js +14 -0
  62. package/dist/components/ApplicationFormCustom/RegionField.js.map +1 -0
  63. package/dist/components/ApplicationFormCustom/RegionPremiumField.d.ts +2 -0
  64. package/{mobile/dist/components/ApplicationForm → dist/components/ApplicationFormCustom}/RegionPremiumField.js +7 -6
  65. package/dist/components/ApplicationFormCustom/RegionPremiumField.js.map +1 -0
  66. package/dist/components/ApplicationFormCustom/TermField.d.ts +2 -0
  67. package/dist/components/ApplicationFormCustom/TermField.js +10 -0
  68. package/dist/components/ApplicationFormCustom/TermField.js.map +1 -0
  69. package/dist/components/ApplicationFormCustom/UltraPremiumField.d.ts +4 -0
  70. package/dist/components/ApplicationFormCustom/UltraPremiumField.js +13 -0
  71. package/dist/components/ApplicationFormCustom/UltraPremiumField.js.map +1 -0
  72. package/dist/components/ApplicationFormCustom/getField.d.ts +4 -2
  73. package/dist/components/ApplicationFormCustom/getField.js +35 -14
  74. package/dist/components/ApplicationFormCustom/getField.js.map +1 -1
  75. package/dist/components/ApplicationFormCustom/getFormatData.js +15 -0
  76. package/dist/components/ApplicationFormCustom/getFormatData.js.map +1 -0
  77. package/dist/components/ApplicationFormCustom/getInitialFormState.d.ts +6 -0
  78. package/dist/components/ApplicationFormCustom/getInitialFormState.js +18 -3
  79. package/dist/components/ApplicationFormCustom/getInitialFormState.js.map +1 -1
  80. package/dist/components/ApplicationFormCustom/getObjectValidator.js +4 -0
  81. package/dist/components/ApplicationFormCustom/getObjectValidator.js.map +1 -1
  82. package/dist/components/ApplicationFormCustom/getPartnerComments.d.ts +2 -0
  83. package/dist/components/ApplicationFormCustom/getPartnerComments.js +16 -0
  84. package/dist/components/ApplicationFormCustom/getPartnerComments.js.map +1 -0
  85. package/dist/ui-kit/Input/InputPhoneControl.d.ts +2 -0
  86. package/{mobile/dist/components/ApplicationForm/PhoneInputControl.js → dist/ui-kit/Input/InputPhoneControl.js} +5 -5
  87. package/dist/ui-kit/Input/InputPhoneControl.js.map +1 -0
  88. package/dist/ui-kit/Pagination/PaginationContainer.js +2 -2
  89. package/dist/ui-kit/Pagination/PaginationContainer.js.map +1 -1
  90. package/dist/ui-kit/Pagination/shouldRenderPage.js +4 -4
  91. package/lib/components/ApplicationForm/ApplicationForm.fixture.d.ts +0 -5
  92. package/lib/components/ApplicationForm/ApplicationForm.fixture.mobile.d.ts +0 -5
  93. package/lib/components/ApplicationForm/ApplicationFormContent.d.ts +1 -44
  94. package/lib/components/ApplicationForm/ApplicationFormFeedback.d.ts +5 -2
  95. package/lib/components/ApplicationForm/ApplicationFormFeedback.js +9 -7
  96. package/lib/components/ApplicationForm/ApplicationFormFeedback.js.map +1 -1
  97. package/lib/components/ApplicationForm/ApplicationFormsProps.d.ts +1 -2
  98. package/lib/components/ApplicationForm/EmbeddableForms.d.ts +0 -5
  99. package/lib/components/ApplicationForm/EmbeddableForms.js +0 -10
  100. package/lib/components/ApplicationForm/EmbeddableForms.js.map +1 -1
  101. package/lib/components/ApplicationForm/renderWedDataOrganization.js +3 -3
  102. package/lib/components/ApplicationForm/renderWedDataOrganization.js.map +1 -1
  103. package/lib/components/ApplicationFormCustom/AcquiringField.d.ts +5 -0
  104. package/lib/components/ApplicationFormCustom/AcquiringField.js +26 -0
  105. package/lib/components/ApplicationFormCustom/AcquiringField.js.map +1 -0
  106. package/lib/components/ApplicationFormCustom/AddressBranchField.d.ts +6 -0
  107. package/{mobile/lib/components/ApplicationForm → lib/components/ApplicationFormCustom}/AddressBranchField.js +12 -5
  108. package/lib/components/ApplicationFormCustom/AddressBranchField.js.map +1 -0
  109. package/lib/components/ApplicationFormCustom/AmountField.d.ts +2 -0
  110. package/lib/components/ApplicationFormCustom/AmountField.js +8 -0
  111. package/lib/components/ApplicationFormCustom/AmountField.js.map +1 -0
  112. package/lib/components/ApplicationFormCustom/ApplicationFormCustom.fixture.d.ts +5 -0
  113. package/lib/components/ApplicationFormCustom/ApplicationFormCustom.js +4 -4
  114. package/lib/components/ApplicationFormCustom/ApplicationFormCustom.js.map +1 -1
  115. package/lib/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +7 -4
  116. package/lib/components/ApplicationFormCustom/CommentField.d.ts +2 -0
  117. package/lib/components/ApplicationFormCustom/CommentField.js +7 -0
  118. package/lib/components/ApplicationFormCustom/CommentField.js.map +1 -0
  119. package/lib/components/ApplicationFormCustom/CustomFieldProps.d.ts +6 -0
  120. package/lib/components/ApplicationFormCustom/CustomFieldProps.js +2 -0
  121. package/lib/components/ApplicationFormCustom/CustomFieldProps.js.map +1 -0
  122. package/lib/components/ApplicationFormCustom/OnlineCheckoutField.d.ts +2 -0
  123. package/lib/components/ApplicationFormCustom/OnlineCheckoutField.js +6 -0
  124. package/lib/components/ApplicationFormCustom/OnlineCheckoutField.js.map +1 -0
  125. package/lib/components/ApplicationFormCustom/PosTerminalField.d.ts +2 -0
  126. package/lib/components/ApplicationFormCustom/PosTerminalField.js +6 -0
  127. package/lib/components/ApplicationFormCustom/PosTerminalField.js.map +1 -0
  128. package/lib/components/ApplicationFormCustom/RegionField.d.ts +2 -0
  129. package/lib/components/ApplicationFormCustom/RegionField.js +12 -0
  130. package/lib/components/ApplicationFormCustom/RegionField.js.map +1 -0
  131. package/lib/components/ApplicationFormCustom/RegionPremiumField.d.ts +2 -0
  132. package/{mobile/lib/components/ApplicationForm → lib/components/ApplicationFormCustom}/RegionPremiumField.js +7 -6
  133. package/lib/components/ApplicationFormCustom/RegionPremiumField.js.map +1 -0
  134. package/lib/components/ApplicationFormCustom/TermField.d.ts +2 -0
  135. package/lib/components/ApplicationFormCustom/TermField.js +8 -0
  136. package/lib/components/ApplicationFormCustom/TermField.js.map +1 -0
  137. package/lib/components/ApplicationFormCustom/UltraPremiumField.d.ts +4 -0
  138. package/lib/components/ApplicationFormCustom/UltraPremiumField.js +11 -0
  139. package/lib/components/ApplicationFormCustom/UltraPremiumField.js.map +1 -0
  140. package/lib/components/ApplicationFormCustom/getField.d.ts +4 -2
  141. package/lib/components/ApplicationFormCustom/getField.js +28 -8
  142. package/lib/components/ApplicationFormCustom/getField.js.map +1 -1
  143. package/lib/components/ApplicationFormCustom/getFormatData.js +12 -0
  144. package/lib/components/ApplicationFormCustom/getFormatData.js.map +1 -0
  145. package/lib/components/ApplicationFormCustom/getInitialFormState.d.ts +6 -0
  146. package/lib/components/ApplicationFormCustom/getInitialFormState.js +18 -3
  147. package/lib/components/ApplicationFormCustom/getInitialFormState.js.map +1 -1
  148. package/lib/components/ApplicationFormCustom/getObjectValidator.js +4 -0
  149. package/lib/components/ApplicationFormCustom/getObjectValidator.js.map +1 -1
  150. package/lib/components/ApplicationFormCustom/getPartnerComments.d.ts +2 -0
  151. package/lib/components/ApplicationFormCustom/getPartnerComments.js +13 -0
  152. package/lib/components/ApplicationFormCustom/getPartnerComments.js.map +1 -0
  153. package/lib/ui-kit/Input/InputPhoneControl.d.ts +2 -0
  154. package/lib/{components/ApplicationForm/PhoneInputControl.js → ui-kit/Input/InputPhoneControl.js} +4 -4
  155. package/lib/ui-kit/Input/InputPhoneControl.js.map +1 -0
  156. package/lib/ui-kit/Pagination/PaginationContainer.js +2 -2
  157. package/lib/ui-kit/Pagination/PaginationContainer.js.map +1 -1
  158. package/lib/ui-kit/Pagination/shouldRenderPage.js +4 -4
  159. package/mobile/bundle/bundle.umd.js +519 -619
  160. package/mobile/bundle/bundle.umd.min.js +1 -1
  161. package/mobile/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +1 -44
  162. package/mobile/bundle/components/ApplicationForm/ApplicationFormFeedback.d.ts +5 -2
  163. package/mobile/bundle/components/ApplicationForm/ApplicationFormsProps.d.ts +1 -2
  164. package/mobile/bundle/components/ApplicationForm/EmbeddableForms.d.ts +0 -5
  165. package/mobile/bundle/components/ApplicationFormCustom/AcquiringField.d.ts +5 -0
  166. package/mobile/bundle/components/ApplicationFormCustom/AddressBranchField.d.ts +6 -0
  167. package/mobile/bundle/components/ApplicationFormCustom/AmountField.d.ts +2 -0
  168. package/mobile/bundle/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +7 -4
  169. package/mobile/bundle/components/ApplicationFormCustom/CommentField.d.ts +2 -0
  170. package/mobile/bundle/components/ApplicationFormCustom/CustomFieldProps.d.ts +6 -0
  171. package/mobile/bundle/components/ApplicationFormCustom/OnlineCheckoutField.d.ts +2 -0
  172. package/mobile/bundle/components/ApplicationFormCustom/PosTerminalField.d.ts +2 -0
  173. package/mobile/bundle/components/ApplicationFormCustom/RegionField.d.ts +2 -0
  174. package/mobile/bundle/components/ApplicationFormCustom/RegionPremiumField.d.ts +2 -0
  175. package/mobile/bundle/components/ApplicationFormCustom/TermField.d.ts +2 -0
  176. package/mobile/bundle/components/ApplicationFormCustom/UltraPremiumField.d.ts +4 -0
  177. package/mobile/bundle/components/ApplicationFormCustom/getField.d.ts +4 -2
  178. package/mobile/bundle/components/ApplicationFormCustom/getInitialFormState.d.ts +6 -0
  179. package/mobile/bundle/components/ApplicationFormCustom/getPartnerComments.d.ts +2 -0
  180. package/mobile/bundle/ui-kit/Input/InputPhoneControl.d.ts +2 -0
  181. package/mobile/dist/components/ApplicationForm/ApplicationFormContent.d.ts +1 -44
  182. package/mobile/dist/components/ApplicationForm/ApplicationFormFeedback.d.ts +5 -2
  183. package/mobile/dist/components/ApplicationForm/ApplicationFormFeedback.js +9 -7
  184. package/mobile/dist/components/ApplicationForm/ApplicationFormFeedback.js.map +1 -1
  185. package/mobile/dist/components/ApplicationForm/ApplicationFormsProps.d.ts +1 -2
  186. package/mobile/dist/components/ApplicationForm/EmbeddableForms.d.ts +0 -5
  187. package/mobile/dist/components/ApplicationForm/EmbeddableForms.js +0 -10
  188. package/mobile/dist/components/ApplicationForm/EmbeddableForms.js.map +1 -1
  189. package/mobile/dist/components/ApplicationForm/renderWedDataOrganization.js +3 -3
  190. package/mobile/dist/components/ApplicationForm/renderWedDataOrganization.js.map +1 -1
  191. package/mobile/dist/components/ApplicationFormCustom/AcquiringField.d.ts +5 -0
  192. package/mobile/dist/components/ApplicationFormCustom/AcquiringField.js +29 -0
  193. package/mobile/dist/components/ApplicationFormCustom/AcquiringField.js.map +1 -0
  194. package/mobile/dist/components/ApplicationFormCustom/AddressBranchField.d.ts +6 -0
  195. package/mobile/dist/components/{ApplicationForm → ApplicationFormCustom}/AddressBranchField.js +12 -5
  196. package/mobile/dist/components/ApplicationFormCustom/AddressBranchField.js.map +1 -0
  197. package/mobile/dist/components/ApplicationFormCustom/AmountField.d.ts +2 -0
  198. package/mobile/dist/components/ApplicationFormCustom/AmountField.js +10 -0
  199. package/mobile/dist/components/ApplicationFormCustom/AmountField.js.map +1 -0
  200. package/mobile/dist/components/ApplicationFormCustom/ApplicationFormCustom.js +4 -4
  201. package/mobile/dist/components/ApplicationFormCustom/ApplicationFormCustom.js.map +1 -1
  202. package/mobile/dist/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +7 -4
  203. package/mobile/dist/components/ApplicationFormCustom/CommentField.d.ts +2 -0
  204. package/mobile/dist/components/ApplicationFormCustom/CommentField.js +9 -0
  205. package/mobile/dist/components/ApplicationFormCustom/CommentField.js.map +1 -0
  206. package/mobile/dist/components/ApplicationFormCustom/CustomFieldProps.d.ts +6 -0
  207. package/mobile/dist/components/{ApplicationForm/models.js → ApplicationFormCustom/CustomFieldProps.js} +1 -1
  208. package/mobile/dist/components/ApplicationFormCustom/CustomFieldProps.js.map +1 -0
  209. package/mobile/dist/components/ApplicationFormCustom/OnlineCheckoutField.d.ts +2 -0
  210. package/mobile/dist/components/ApplicationFormCustom/OnlineCheckoutField.js +8 -0
  211. package/mobile/dist/components/ApplicationFormCustom/OnlineCheckoutField.js.map +1 -0
  212. package/mobile/dist/components/ApplicationFormCustom/PosTerminalField.d.ts +2 -0
  213. package/mobile/dist/components/ApplicationFormCustom/PosTerminalField.js +8 -0
  214. package/mobile/dist/components/ApplicationFormCustom/PosTerminalField.js.map +1 -0
  215. package/mobile/dist/components/ApplicationFormCustom/RegionField.d.ts +2 -0
  216. package/mobile/dist/components/ApplicationFormCustom/RegionField.js +14 -0
  217. package/mobile/dist/components/ApplicationFormCustom/RegionField.js.map +1 -0
  218. package/mobile/dist/components/ApplicationFormCustom/RegionPremiumField.d.ts +2 -0
  219. package/{dist/components/ApplicationForm → mobile/dist/components/ApplicationFormCustom}/RegionPremiumField.js +7 -6
  220. package/mobile/dist/components/ApplicationFormCustom/RegionPremiumField.js.map +1 -0
  221. package/mobile/dist/components/ApplicationFormCustom/TermField.d.ts +2 -0
  222. package/mobile/dist/components/ApplicationFormCustom/TermField.js +10 -0
  223. package/mobile/dist/components/ApplicationFormCustom/TermField.js.map +1 -0
  224. package/mobile/dist/components/ApplicationFormCustom/UltraPremiumField.d.ts +4 -0
  225. package/mobile/dist/components/ApplicationFormCustom/UltraPremiumField.js +13 -0
  226. package/mobile/dist/components/ApplicationFormCustom/UltraPremiumField.js.map +1 -0
  227. package/mobile/dist/components/ApplicationFormCustom/getField.d.ts +4 -2
  228. package/mobile/dist/components/ApplicationFormCustom/getField.js +35 -14
  229. package/mobile/dist/components/ApplicationFormCustom/getField.js.map +1 -1
  230. package/mobile/dist/components/ApplicationFormCustom/getFormatData.js +15 -0
  231. package/mobile/dist/components/ApplicationFormCustom/getFormatData.js.map +1 -0
  232. package/mobile/dist/components/ApplicationFormCustom/getInitialFormState.d.ts +6 -0
  233. package/mobile/dist/components/ApplicationFormCustom/getInitialFormState.js +18 -3
  234. package/mobile/dist/components/ApplicationFormCustom/getInitialFormState.js.map +1 -1
  235. package/mobile/dist/components/ApplicationFormCustom/getObjectValidator.js +4 -0
  236. package/mobile/dist/components/ApplicationFormCustom/getObjectValidator.js.map +1 -1
  237. package/mobile/dist/components/ApplicationFormCustom/getPartnerComments.d.ts +2 -0
  238. package/mobile/dist/components/ApplicationFormCustom/getPartnerComments.js +16 -0
  239. package/mobile/dist/components/ApplicationFormCustom/getPartnerComments.js.map +1 -0
  240. package/mobile/dist/ui-kit/Input/InputPhoneControl.d.ts +2 -0
  241. package/{dist/components/ApplicationForm/PhoneInputControl.js → mobile/dist/ui-kit/Input/InputPhoneControl.js} +5 -5
  242. package/mobile/dist/ui-kit/Input/InputPhoneControl.js.map +1 -0
  243. package/mobile/dist/ui-kit/Pagination/PaginationContainer.js +2 -2
  244. package/mobile/dist/ui-kit/Pagination/PaginationContainer.js.map +1 -1
  245. package/mobile/dist/ui-kit/Pagination/shouldRenderPage.js +4 -4
  246. package/mobile/lib/components/ApplicationForm/ApplicationFormContent.d.ts +1 -44
  247. package/mobile/lib/components/ApplicationForm/ApplicationFormFeedback.d.ts +5 -2
  248. package/mobile/lib/components/ApplicationForm/ApplicationFormFeedback.js +9 -7
  249. package/mobile/lib/components/ApplicationForm/ApplicationFormFeedback.js.map +1 -1
  250. package/mobile/lib/components/ApplicationForm/ApplicationFormsProps.d.ts +1 -2
  251. package/mobile/lib/components/ApplicationForm/EmbeddableForms.d.ts +0 -5
  252. package/mobile/lib/components/ApplicationForm/EmbeddableForms.js +0 -10
  253. package/mobile/lib/components/ApplicationForm/EmbeddableForms.js.map +1 -1
  254. package/mobile/lib/components/ApplicationForm/renderWedDataOrganization.js +3 -3
  255. package/mobile/lib/components/ApplicationForm/renderWedDataOrganization.js.map +1 -1
  256. package/mobile/lib/components/ApplicationFormCustom/AcquiringField.d.ts +5 -0
  257. package/mobile/lib/components/ApplicationFormCustom/AcquiringField.js +26 -0
  258. package/mobile/lib/components/ApplicationFormCustom/AcquiringField.js.map +1 -0
  259. package/mobile/lib/components/ApplicationFormCustom/AddressBranchField.d.ts +6 -0
  260. package/{lib/components/ApplicationForm → mobile/lib/components/ApplicationFormCustom}/AddressBranchField.js +12 -5
  261. package/mobile/lib/components/ApplicationFormCustom/AddressBranchField.js.map +1 -0
  262. package/mobile/lib/components/ApplicationFormCustom/AmountField.d.ts +2 -0
  263. package/mobile/lib/components/ApplicationFormCustom/AmountField.js +8 -0
  264. package/mobile/lib/components/ApplicationFormCustom/AmountField.js.map +1 -0
  265. package/mobile/lib/components/ApplicationFormCustom/ApplicationFormCustom.js +4 -4
  266. package/mobile/lib/components/ApplicationFormCustom/ApplicationFormCustom.js.map +1 -1
  267. package/mobile/lib/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +7 -4
  268. package/mobile/lib/components/ApplicationFormCustom/CommentField.d.ts +2 -0
  269. package/mobile/lib/components/ApplicationFormCustom/CommentField.js +7 -0
  270. package/mobile/lib/components/ApplicationFormCustom/CommentField.js.map +1 -0
  271. package/mobile/lib/components/ApplicationFormCustom/CustomFieldProps.d.ts +6 -0
  272. package/mobile/lib/components/ApplicationFormCustom/CustomFieldProps.js +2 -0
  273. package/mobile/lib/components/ApplicationFormCustom/CustomFieldProps.js.map +1 -0
  274. package/mobile/lib/components/ApplicationFormCustom/OnlineCheckoutField.d.ts +2 -0
  275. package/mobile/lib/components/ApplicationFormCustom/OnlineCheckoutField.js +6 -0
  276. package/mobile/lib/components/ApplicationFormCustom/OnlineCheckoutField.js.map +1 -0
  277. package/mobile/lib/components/ApplicationFormCustom/PosTerminalField.d.ts +2 -0
  278. package/mobile/lib/components/ApplicationFormCustom/PosTerminalField.js +6 -0
  279. package/mobile/lib/components/ApplicationFormCustom/PosTerminalField.js.map +1 -0
  280. package/mobile/lib/components/ApplicationFormCustom/RegionField.d.ts +2 -0
  281. package/mobile/lib/components/ApplicationFormCustom/RegionField.js +12 -0
  282. package/mobile/lib/components/ApplicationFormCustom/RegionField.js.map +1 -0
  283. package/mobile/lib/components/ApplicationFormCustom/RegionPremiumField.d.ts +2 -0
  284. package/{lib/components/ApplicationForm → mobile/lib/components/ApplicationFormCustom}/RegionPremiumField.js +7 -6
  285. package/mobile/lib/components/ApplicationFormCustom/RegionPremiumField.js.map +1 -0
  286. package/mobile/lib/components/ApplicationFormCustom/TermField.d.ts +2 -0
  287. package/mobile/lib/components/ApplicationFormCustom/TermField.js +8 -0
  288. package/mobile/lib/components/ApplicationFormCustom/TermField.js.map +1 -0
  289. package/mobile/lib/components/ApplicationFormCustom/UltraPremiumField.d.ts +4 -0
  290. package/mobile/lib/components/ApplicationFormCustom/UltraPremiumField.js +11 -0
  291. package/mobile/lib/components/ApplicationFormCustom/UltraPremiumField.js.map +1 -0
  292. package/mobile/lib/components/ApplicationFormCustom/getField.d.ts +4 -2
  293. package/mobile/lib/components/ApplicationFormCustom/getField.js +28 -8
  294. package/mobile/lib/components/ApplicationFormCustom/getField.js.map +1 -1
  295. package/mobile/lib/components/ApplicationFormCustom/getFormatData.js +12 -0
  296. package/mobile/lib/components/ApplicationFormCustom/getFormatData.js.map +1 -0
  297. package/mobile/lib/components/ApplicationFormCustom/getInitialFormState.d.ts +6 -0
  298. package/mobile/lib/components/ApplicationFormCustom/getInitialFormState.js +18 -3
  299. package/mobile/lib/components/ApplicationFormCustom/getInitialFormState.js.map +1 -1
  300. package/mobile/lib/components/ApplicationFormCustom/getObjectValidator.js +4 -0
  301. package/mobile/lib/components/ApplicationFormCustom/getObjectValidator.js.map +1 -1
  302. package/mobile/lib/components/ApplicationFormCustom/getPartnerComments.d.ts +2 -0
  303. package/mobile/lib/components/ApplicationFormCustom/getPartnerComments.js +13 -0
  304. package/mobile/lib/components/ApplicationFormCustom/getPartnerComments.js.map +1 -0
  305. package/mobile/lib/ui-kit/Input/InputPhoneControl.d.ts +2 -0
  306. package/mobile/lib/{components/ApplicationForm/PhoneInputControl.js → ui-kit/Input/InputPhoneControl.js} +4 -4
  307. package/mobile/lib/ui-kit/Input/InputPhoneControl.js.map +1 -0
  308. package/mobile/lib/ui-kit/Pagination/PaginationContainer.js +2 -2
  309. package/mobile/lib/ui-kit/Pagination/PaginationContainer.js.map +1 -1
  310. package/mobile/lib/ui-kit/Pagination/shouldRenderPage.js +4 -4
  311. package/mobile/src/components/ApplicationForm/ApplicationForm.ui.json +0 -6
  312. package/mobile/src/components/ApplicationForm/ApplicationFormContent.ts +1 -60
  313. package/mobile/src/components/ApplicationForm/ApplicationFormFeedback.tsx +27 -13
  314. package/mobile/src/components/ApplicationForm/ApplicationFormsProps.ts +1 -2
  315. package/mobile/src/components/ApplicationForm/EmbeddableForms.tsx +0 -10
  316. package/mobile/src/components/ApplicationForm/renderWedDataOrganization.tsx +3 -3
  317. package/mobile/src/components/ApplicationFormCustom/AcquiringField.tsx +36 -0
  318. package/{src/components/ApplicationForm → mobile/src/components/ApplicationFormCustom}/AddressBranchField.tsx +15 -9
  319. package/mobile/src/components/ApplicationFormCustom/AmountField.tsx +17 -0
  320. package/mobile/src/components/ApplicationFormCustom/ApplicationFormCustom.example.json +221 -21
  321. package/mobile/src/components/ApplicationFormCustom/ApplicationFormCustom.tsx +13 -4
  322. package/mobile/src/components/ApplicationFormCustom/ApplicationFormCustom.ui.json +12 -1
  323. package/mobile/src/components/ApplicationFormCustom/ApplicationFormCustomContent.ts +18 -4
  324. package/mobile/src/components/ApplicationFormCustom/CommentField.tsx +14 -0
  325. package/mobile/src/components/ApplicationFormCustom/CustomFieldProps.ts +7 -0
  326. package/mobile/src/components/ApplicationFormCustom/OnlineCheckoutField.tsx +10 -0
  327. package/mobile/src/components/ApplicationFormCustom/PosTerminalField.tsx +10 -0
  328. package/mobile/src/components/ApplicationFormCustom/RegionField.tsx +24 -0
  329. package/mobile/src/components/ApplicationFormCustom/RegionPremiumField.tsx +29 -0
  330. package/mobile/src/components/ApplicationFormCustom/TermField.tsx +17 -0
  331. package/mobile/src/components/ApplicationFormCustom/UltraPremiumField.tsx +19 -0
  332. package/mobile/src/components/ApplicationFormCustom/getField.tsx +97 -69
  333. package/mobile/src/components/ApplicationFormCustom/getFormatData.tsx +25 -0
  334. package/mobile/src/components/ApplicationFormCustom/getInitialFormState.tsx +24 -3
  335. package/mobile/src/components/ApplicationFormCustom/getObjectValidator.tsx +4 -0
  336. package/mobile/src/components/ApplicationFormCustom/getPartnerComments.tsx +22 -0
  337. package/mobile/src/{components/ApplicationForm/PhoneInputControl.tsx → ui-kit/Input/InputPhoneControl.tsx} +4 -4
  338. package/mobile/src/ui-kit/Pagination/PaginationContainer.tsx +4 -4
  339. package/mobile/src/ui-kit/Pagination/shouldRenderPage.ts +4 -4
  340. package/package.json +1 -1
  341. package/src/components/ApplicationForm/ApplicationForm.fixture.mobile.tsx +1 -59
  342. package/src/components/ApplicationForm/ApplicationForm.fixture.tsx +2 -61
  343. package/src/components/ApplicationForm/ApplicationForm.ui.json +0 -6
  344. package/src/components/ApplicationForm/ApplicationFormContent.ts +1 -60
  345. package/src/components/ApplicationForm/ApplicationFormFeedback.tsx +27 -13
  346. package/src/components/ApplicationForm/ApplicationFormsProps.ts +1 -2
  347. package/src/components/ApplicationForm/EmbeddableForms.tsx +0 -10
  348. package/src/components/ApplicationForm/renderWedDataOrganization.tsx +3 -3
  349. package/src/components/ApplicationFormCustom/AcquiringField.tsx +36 -0
  350. package/{mobile/src/components/ApplicationForm → src/components/ApplicationFormCustom}/AddressBranchField.tsx +15 -9
  351. package/src/components/ApplicationFormCustom/AmountField.tsx +17 -0
  352. package/src/components/ApplicationFormCustom/ApplicationFormCustom.example.json +221 -21
  353. package/src/components/ApplicationFormCustom/ApplicationFormCustom.fixture.tsx +175 -11
  354. package/src/components/ApplicationFormCustom/ApplicationFormCustom.tsx +13 -4
  355. package/src/components/ApplicationFormCustom/ApplicationFormCustom.ui.json +12 -1
  356. package/src/components/ApplicationFormCustom/ApplicationFormCustomContent.ts +18 -4
  357. package/src/components/ApplicationFormCustom/CommentField.tsx +14 -0
  358. package/src/components/ApplicationFormCustom/CustomFieldProps.ts +7 -0
  359. package/src/components/ApplicationFormCustom/OnlineCheckoutField.tsx +10 -0
  360. package/src/components/ApplicationFormCustom/PosTerminalField.tsx +10 -0
  361. package/src/components/ApplicationFormCustom/RegionField.tsx +24 -0
  362. package/src/components/ApplicationFormCustom/RegionPremiumField.tsx +29 -0
  363. package/src/components/ApplicationFormCustom/TermField.tsx +17 -0
  364. package/src/components/ApplicationFormCustom/UltraPremiumField.tsx +19 -0
  365. package/src/components/ApplicationFormCustom/getField.tsx +97 -69
  366. package/src/components/ApplicationFormCustom/getFormatData.tsx +25 -0
  367. package/src/components/ApplicationFormCustom/getInitialFormState.tsx +24 -3
  368. package/src/components/ApplicationFormCustom/getObjectValidator.tsx +4 -0
  369. package/src/components/ApplicationFormCustom/getPartnerComments.tsx +22 -0
  370. package/src/{components/ApplicationForm/PhoneInputControl.tsx → ui-kit/Input/InputPhoneControl.tsx} +4 -4
  371. package/src/ui-kit/Pagination/PaginationContainer.tsx +4 -4
  372. package/src/ui-kit/Pagination/shouldRenderPage.ts +4 -4
  373. package/bundle/components/ApplicationForm/AddressBranchField.d.ts +0 -8
  374. package/bundle/components/ApplicationForm/ApplicationFormAcquiring.d.ts +0 -14
  375. package/bundle/components/ApplicationForm/ApplicationFormCredit.d.ts +0 -16
  376. package/bundle/components/ApplicationForm/ApplicationFormDeposit.d.ts +0 -2
  377. package/bundle/components/ApplicationForm/ApplicationFormIndividuals.d.ts +0 -8
  378. package/bundle/components/ApplicationForm/ApplicationFormUltraPremium.d.ts +0 -14
  379. package/bundle/components/ApplicationForm/CreditParameters.d.ts +0 -6
  380. package/bundle/components/ApplicationForm/PhoneInputControl.d.ts +0 -2
  381. package/bundle/components/ApplicationForm/RegionField.d.ts +0 -8
  382. package/bundle/components/ApplicationForm/RegionPremiumField.d.ts +0 -6
  383. package/bundle/components/ApplicationForm/acquiringTypes.d.ts +0 -2
  384. package/bundle/components/ApplicationForm/models.d.ts +0 -5
  385. package/bundle/components/ApplicationForm/renderAcquiringDataOrganization.d.ts +0 -4
  386. package/bundle/components/ApplicationForm/renderAcquiringRegion.d.ts +0 -9
  387. package/bundle/components/ApplicationForm/renderCreditDataOrganization.d.ts +0 -4
  388. package/bundle/components/ApplicationForm/renderCreditParameters.d.ts +0 -4
  389. package/bundle/components/ApplicationForm/renderRegionDepartment.d.ts +0 -9
  390. package/bundle/components/ApplicationForm/renderUserData.d.ts +0 -15
  391. package/dist/components/ApplicationForm/AddressBranchField.d.ts +0 -8
  392. package/dist/components/ApplicationForm/AddressBranchField.js.map +0 -1
  393. package/dist/components/ApplicationForm/ApplicationFormAcquiring.d.ts +0 -14
  394. package/dist/components/ApplicationForm/ApplicationFormAcquiring.js +0 -53
  395. package/dist/components/ApplicationForm/ApplicationFormAcquiring.js.map +0 -1
  396. package/dist/components/ApplicationForm/ApplicationFormCredit.d.ts +0 -16
  397. package/dist/components/ApplicationForm/ApplicationFormCredit.js +0 -53
  398. package/dist/components/ApplicationForm/ApplicationFormCredit.js.map +0 -1
  399. package/dist/components/ApplicationForm/ApplicationFormDeposit.d.ts +0 -2
  400. package/dist/components/ApplicationForm/ApplicationFormDeposit.js +0 -36
  401. package/dist/components/ApplicationForm/ApplicationFormDeposit.js.map +0 -1
  402. package/dist/components/ApplicationForm/ApplicationFormIndividuals.d.ts +0 -8
  403. package/dist/components/ApplicationForm/ApplicationFormIndividuals.js +0 -45
  404. package/dist/components/ApplicationForm/ApplicationFormIndividuals.js.map +0 -1
  405. package/dist/components/ApplicationForm/ApplicationFormUltraPremium.d.ts +0 -14
  406. package/dist/components/ApplicationForm/ApplicationFormUltraPremium.js +0 -51
  407. package/dist/components/ApplicationForm/ApplicationFormUltraPremium.js.map +0 -1
  408. package/dist/components/ApplicationForm/CreditParameters.d.ts +0 -6
  409. package/dist/components/ApplicationForm/CreditParameters.js +0 -9
  410. package/dist/components/ApplicationForm/CreditParameters.js.map +0 -1
  411. package/dist/components/ApplicationForm/PhoneInputControl.d.ts +0 -2
  412. package/dist/components/ApplicationForm/PhoneInputControl.js.map +0 -1
  413. package/dist/components/ApplicationForm/RegionField.d.ts +0 -8
  414. package/dist/components/ApplicationForm/RegionField.js +0 -13
  415. package/dist/components/ApplicationForm/RegionField.js.map +0 -1
  416. package/dist/components/ApplicationForm/RegionPremiumField.d.ts +0 -6
  417. package/dist/components/ApplicationForm/RegionPremiumField.js.map +0 -1
  418. package/dist/components/ApplicationForm/acquiringTypes.d.ts +0 -2
  419. package/dist/components/ApplicationForm/acquiringTypes.js +0 -21
  420. package/dist/components/ApplicationForm/acquiringTypes.js.map +0 -1
  421. package/dist/components/ApplicationForm/getFormatData.js +0 -5
  422. package/dist/components/ApplicationForm/getFormatData.js.map +0 -1
  423. package/dist/components/ApplicationForm/models.d.ts +0 -5
  424. package/dist/components/ApplicationForm/models.js.map +0 -1
  425. package/dist/components/ApplicationForm/renderAcquiringDataOrganization.d.ts +0 -4
  426. package/dist/components/ApplicationForm/renderAcquiringDataOrganization.js +0 -11
  427. package/dist/components/ApplicationForm/renderAcquiringDataOrganization.js.map +0 -1
  428. package/dist/components/ApplicationForm/renderAcquiringRegion.d.ts +0 -9
  429. package/dist/components/ApplicationForm/renderAcquiringRegion.js +0 -12
  430. package/dist/components/ApplicationForm/renderAcquiringRegion.js.map +0 -1
  431. package/dist/components/ApplicationForm/renderCreditDataOrganization.d.ts +0 -4
  432. package/dist/components/ApplicationForm/renderCreditDataOrganization.js +0 -11
  433. package/dist/components/ApplicationForm/renderCreditDataOrganization.js.map +0 -1
  434. package/dist/components/ApplicationForm/renderCreditParameters.d.ts +0 -4
  435. package/dist/components/ApplicationForm/renderCreditParameters.js +0 -9
  436. package/dist/components/ApplicationForm/renderCreditParameters.js.map +0 -1
  437. package/dist/components/ApplicationForm/renderRegionDepartment.d.ts +0 -9
  438. package/dist/components/ApplicationForm/renderRegionDepartment.js +0 -9
  439. package/dist/components/ApplicationForm/renderRegionDepartment.js.map +0 -1
  440. package/dist/components/ApplicationForm/renderUserData.d.ts +0 -15
  441. package/dist/components/ApplicationForm/renderUserData.js +0 -15
  442. package/dist/components/ApplicationForm/renderUserData.js.map +0 -1
  443. package/lib/components/ApplicationForm/AddressBranchField.d.ts +0 -8
  444. package/lib/components/ApplicationForm/AddressBranchField.js.map +0 -1
  445. package/lib/components/ApplicationForm/ApplicationFormAcquiring.d.ts +0 -14
  446. package/lib/components/ApplicationForm/ApplicationFormAcquiring.js +0 -51
  447. package/lib/components/ApplicationForm/ApplicationFormAcquiring.js.map +0 -1
  448. package/lib/components/ApplicationForm/ApplicationFormCredit.d.ts +0 -16
  449. package/lib/components/ApplicationForm/ApplicationFormCredit.js +0 -51
  450. package/lib/components/ApplicationForm/ApplicationFormCredit.js.map +0 -1
  451. package/lib/components/ApplicationForm/ApplicationFormDeposit.d.ts +0 -2
  452. package/lib/components/ApplicationForm/ApplicationFormDeposit.js +0 -34
  453. package/lib/components/ApplicationForm/ApplicationFormDeposit.js.map +0 -1
  454. package/lib/components/ApplicationForm/ApplicationFormIndividuals.d.ts +0 -8
  455. package/lib/components/ApplicationForm/ApplicationFormIndividuals.js +0 -43
  456. package/lib/components/ApplicationForm/ApplicationFormIndividuals.js.map +0 -1
  457. package/lib/components/ApplicationForm/ApplicationFormUltraPremium.d.ts +0 -14
  458. package/lib/components/ApplicationForm/ApplicationFormUltraPremium.js +0 -49
  459. package/lib/components/ApplicationForm/ApplicationFormUltraPremium.js.map +0 -1
  460. package/lib/components/ApplicationForm/CreditParameters.d.ts +0 -6
  461. package/lib/components/ApplicationForm/CreditParameters.js +0 -7
  462. package/lib/components/ApplicationForm/CreditParameters.js.map +0 -1
  463. package/lib/components/ApplicationForm/PhoneInputControl.d.ts +0 -2
  464. package/lib/components/ApplicationForm/PhoneInputControl.js.map +0 -1
  465. package/lib/components/ApplicationForm/RegionField.d.ts +0 -8
  466. package/lib/components/ApplicationForm/RegionField.js +0 -11
  467. package/lib/components/ApplicationForm/RegionField.js.map +0 -1
  468. package/lib/components/ApplicationForm/RegionPremiumField.d.ts +0 -6
  469. package/lib/components/ApplicationForm/RegionPremiumField.js.map +0 -1
  470. package/lib/components/ApplicationForm/acquiringTypes.d.ts +0 -2
  471. package/lib/components/ApplicationForm/acquiringTypes.js +0 -19
  472. package/lib/components/ApplicationForm/acquiringTypes.js.map +0 -1
  473. package/lib/components/ApplicationForm/getFormatData.js +0 -2
  474. package/lib/components/ApplicationForm/getFormatData.js.map +0 -1
  475. package/lib/components/ApplicationForm/models.d.ts +0 -5
  476. package/lib/components/ApplicationForm/models.js +0 -2
  477. package/lib/components/ApplicationForm/models.js.map +0 -1
  478. package/lib/components/ApplicationForm/renderAcquiringDataOrganization.d.ts +0 -3
  479. package/lib/components/ApplicationForm/renderAcquiringDataOrganization.js +0 -8
  480. package/lib/components/ApplicationForm/renderAcquiringDataOrganization.js.map +0 -1
  481. package/lib/components/ApplicationForm/renderAcquiringRegion.d.ts +0 -8
  482. package/lib/components/ApplicationForm/renderAcquiringRegion.js +0 -9
  483. package/lib/components/ApplicationForm/renderAcquiringRegion.js.map +0 -1
  484. package/lib/components/ApplicationForm/renderCreditDataOrganization.d.ts +0 -3
  485. package/lib/components/ApplicationForm/renderCreditDataOrganization.js +0 -8
  486. package/lib/components/ApplicationForm/renderCreditDataOrganization.js.map +0 -1
  487. package/lib/components/ApplicationForm/renderCreditParameters.d.ts +0 -3
  488. package/lib/components/ApplicationForm/renderCreditParameters.js +0 -6
  489. package/lib/components/ApplicationForm/renderCreditParameters.js.map +0 -1
  490. package/lib/components/ApplicationForm/renderRegionDepartment.d.ts +0 -9
  491. package/lib/components/ApplicationForm/renderRegionDepartment.js +0 -6
  492. package/lib/components/ApplicationForm/renderRegionDepartment.js.map +0 -1
  493. package/lib/components/ApplicationForm/renderUserData.d.ts +0 -14
  494. package/lib/components/ApplicationForm/renderUserData.js +0 -12
  495. package/lib/components/ApplicationForm/renderUserData.js.map +0 -1
  496. package/mobile/bundle/components/ApplicationForm/AddressBranchField.d.ts +0 -8
  497. package/mobile/bundle/components/ApplicationForm/ApplicationFormAcquiring.d.ts +0 -14
  498. package/mobile/bundle/components/ApplicationForm/ApplicationFormCredit.d.ts +0 -16
  499. package/mobile/bundle/components/ApplicationForm/ApplicationFormDeposit.d.ts +0 -2
  500. package/mobile/bundle/components/ApplicationForm/ApplicationFormIndividuals.d.ts +0 -8
  501. package/mobile/bundle/components/ApplicationForm/ApplicationFormUltraPremium.d.ts +0 -14
  502. package/mobile/bundle/components/ApplicationForm/CreditParameters.d.ts +0 -6
  503. package/mobile/bundle/components/ApplicationForm/PhoneInputControl.d.ts +0 -2
  504. package/mobile/bundle/components/ApplicationForm/RegionField.d.ts +0 -8
  505. package/mobile/bundle/components/ApplicationForm/RegionPremiumField.d.ts +0 -6
  506. package/mobile/bundle/components/ApplicationForm/acquiringTypes.d.ts +0 -2
  507. package/mobile/bundle/components/ApplicationForm/models.d.ts +0 -5
  508. package/mobile/bundle/components/ApplicationForm/renderAcquiringDataOrganization.d.ts +0 -4
  509. package/mobile/bundle/components/ApplicationForm/renderAcquiringRegion.d.ts +0 -9
  510. package/mobile/bundle/components/ApplicationForm/renderCreditDataOrganization.d.ts +0 -4
  511. package/mobile/bundle/components/ApplicationForm/renderCreditParameters.d.ts +0 -4
  512. package/mobile/bundle/components/ApplicationForm/renderRegionDepartment.d.ts +0 -9
  513. package/mobile/bundle/components/ApplicationForm/renderUserData.d.ts +0 -15
  514. package/mobile/dist/components/ApplicationForm/AddressBranchField.d.ts +0 -8
  515. package/mobile/dist/components/ApplicationForm/AddressBranchField.js.map +0 -1
  516. package/mobile/dist/components/ApplicationForm/ApplicationFormAcquiring.d.ts +0 -14
  517. package/mobile/dist/components/ApplicationForm/ApplicationFormAcquiring.js +0 -53
  518. package/mobile/dist/components/ApplicationForm/ApplicationFormAcquiring.js.map +0 -1
  519. package/mobile/dist/components/ApplicationForm/ApplicationFormCredit.d.ts +0 -16
  520. package/mobile/dist/components/ApplicationForm/ApplicationFormCredit.js +0 -53
  521. package/mobile/dist/components/ApplicationForm/ApplicationFormCredit.js.map +0 -1
  522. package/mobile/dist/components/ApplicationForm/ApplicationFormDeposit.d.ts +0 -2
  523. package/mobile/dist/components/ApplicationForm/ApplicationFormDeposit.js +0 -36
  524. package/mobile/dist/components/ApplicationForm/ApplicationFormDeposit.js.map +0 -1
  525. package/mobile/dist/components/ApplicationForm/ApplicationFormIndividuals.d.ts +0 -8
  526. package/mobile/dist/components/ApplicationForm/ApplicationFormIndividuals.js +0 -45
  527. package/mobile/dist/components/ApplicationForm/ApplicationFormIndividuals.js.map +0 -1
  528. package/mobile/dist/components/ApplicationForm/ApplicationFormUltraPremium.d.ts +0 -14
  529. package/mobile/dist/components/ApplicationForm/ApplicationFormUltraPremium.js +0 -51
  530. package/mobile/dist/components/ApplicationForm/ApplicationFormUltraPremium.js.map +0 -1
  531. package/mobile/dist/components/ApplicationForm/CreditParameters.d.ts +0 -6
  532. package/mobile/dist/components/ApplicationForm/CreditParameters.js +0 -9
  533. package/mobile/dist/components/ApplicationForm/CreditParameters.js.map +0 -1
  534. package/mobile/dist/components/ApplicationForm/PhoneInputControl.d.ts +0 -2
  535. package/mobile/dist/components/ApplicationForm/PhoneInputControl.js.map +0 -1
  536. package/mobile/dist/components/ApplicationForm/RegionField.d.ts +0 -8
  537. package/mobile/dist/components/ApplicationForm/RegionField.js +0 -13
  538. package/mobile/dist/components/ApplicationForm/RegionField.js.map +0 -1
  539. package/mobile/dist/components/ApplicationForm/RegionPremiumField.d.ts +0 -6
  540. package/mobile/dist/components/ApplicationForm/RegionPremiumField.js.map +0 -1
  541. package/mobile/dist/components/ApplicationForm/acquiringTypes.d.ts +0 -2
  542. package/mobile/dist/components/ApplicationForm/acquiringTypes.js +0 -21
  543. package/mobile/dist/components/ApplicationForm/acquiringTypes.js.map +0 -1
  544. package/mobile/dist/components/ApplicationForm/getFormatData.js +0 -5
  545. package/mobile/dist/components/ApplicationForm/getFormatData.js.map +0 -1
  546. package/mobile/dist/components/ApplicationForm/models.d.ts +0 -5
  547. package/mobile/dist/components/ApplicationForm/models.js.map +0 -1
  548. package/mobile/dist/components/ApplicationForm/renderAcquiringDataOrganization.d.ts +0 -4
  549. package/mobile/dist/components/ApplicationForm/renderAcquiringDataOrganization.js +0 -11
  550. package/mobile/dist/components/ApplicationForm/renderAcquiringDataOrganization.js.map +0 -1
  551. package/mobile/dist/components/ApplicationForm/renderAcquiringRegion.d.ts +0 -9
  552. package/mobile/dist/components/ApplicationForm/renderAcquiringRegion.js +0 -12
  553. package/mobile/dist/components/ApplicationForm/renderAcquiringRegion.js.map +0 -1
  554. package/mobile/dist/components/ApplicationForm/renderCreditDataOrganization.d.ts +0 -4
  555. package/mobile/dist/components/ApplicationForm/renderCreditDataOrganization.js +0 -11
  556. package/mobile/dist/components/ApplicationForm/renderCreditDataOrganization.js.map +0 -1
  557. package/mobile/dist/components/ApplicationForm/renderCreditParameters.d.ts +0 -4
  558. package/mobile/dist/components/ApplicationForm/renderCreditParameters.js +0 -9
  559. package/mobile/dist/components/ApplicationForm/renderCreditParameters.js.map +0 -1
  560. package/mobile/dist/components/ApplicationForm/renderRegionDepartment.d.ts +0 -9
  561. package/mobile/dist/components/ApplicationForm/renderRegionDepartment.js +0 -9
  562. package/mobile/dist/components/ApplicationForm/renderRegionDepartment.js.map +0 -1
  563. package/mobile/dist/components/ApplicationForm/renderUserData.d.ts +0 -15
  564. package/mobile/dist/components/ApplicationForm/renderUserData.js +0 -15
  565. package/mobile/dist/components/ApplicationForm/renderUserData.js.map +0 -1
  566. package/mobile/lib/components/ApplicationForm/AddressBranchField.d.ts +0 -8
  567. package/mobile/lib/components/ApplicationForm/AddressBranchField.js.map +0 -1
  568. package/mobile/lib/components/ApplicationForm/ApplicationFormAcquiring.d.ts +0 -14
  569. package/mobile/lib/components/ApplicationForm/ApplicationFormAcquiring.js +0 -51
  570. package/mobile/lib/components/ApplicationForm/ApplicationFormAcquiring.js.map +0 -1
  571. package/mobile/lib/components/ApplicationForm/ApplicationFormCredit.d.ts +0 -16
  572. package/mobile/lib/components/ApplicationForm/ApplicationFormCredit.js +0 -51
  573. package/mobile/lib/components/ApplicationForm/ApplicationFormCredit.js.map +0 -1
  574. package/mobile/lib/components/ApplicationForm/ApplicationFormDeposit.d.ts +0 -2
  575. package/mobile/lib/components/ApplicationForm/ApplicationFormDeposit.js +0 -34
  576. package/mobile/lib/components/ApplicationForm/ApplicationFormDeposit.js.map +0 -1
  577. package/mobile/lib/components/ApplicationForm/ApplicationFormIndividuals.d.ts +0 -8
  578. package/mobile/lib/components/ApplicationForm/ApplicationFormIndividuals.js +0 -43
  579. package/mobile/lib/components/ApplicationForm/ApplicationFormIndividuals.js.map +0 -1
  580. package/mobile/lib/components/ApplicationForm/ApplicationFormUltraPremium.d.ts +0 -14
  581. package/mobile/lib/components/ApplicationForm/ApplicationFormUltraPremium.js +0 -49
  582. package/mobile/lib/components/ApplicationForm/ApplicationFormUltraPremium.js.map +0 -1
  583. package/mobile/lib/components/ApplicationForm/CreditParameters.d.ts +0 -6
  584. package/mobile/lib/components/ApplicationForm/CreditParameters.js +0 -7
  585. package/mobile/lib/components/ApplicationForm/CreditParameters.js.map +0 -1
  586. package/mobile/lib/components/ApplicationForm/PhoneInputControl.d.ts +0 -2
  587. package/mobile/lib/components/ApplicationForm/PhoneInputControl.js.map +0 -1
  588. package/mobile/lib/components/ApplicationForm/RegionField.d.ts +0 -8
  589. package/mobile/lib/components/ApplicationForm/RegionField.js +0 -11
  590. package/mobile/lib/components/ApplicationForm/RegionField.js.map +0 -1
  591. package/mobile/lib/components/ApplicationForm/RegionPremiumField.d.ts +0 -6
  592. package/mobile/lib/components/ApplicationForm/RegionPremiumField.js.map +0 -1
  593. package/mobile/lib/components/ApplicationForm/acquiringTypes.d.ts +0 -2
  594. package/mobile/lib/components/ApplicationForm/acquiringTypes.js +0 -19
  595. package/mobile/lib/components/ApplicationForm/acquiringTypes.js.map +0 -1
  596. package/mobile/lib/components/ApplicationForm/getFormatData.js +0 -2
  597. package/mobile/lib/components/ApplicationForm/getFormatData.js.map +0 -1
  598. package/mobile/lib/components/ApplicationForm/models.d.ts +0 -5
  599. package/mobile/lib/components/ApplicationForm/models.js +0 -2
  600. package/mobile/lib/components/ApplicationForm/models.js.map +0 -1
  601. package/mobile/lib/components/ApplicationForm/renderAcquiringDataOrganization.d.ts +0 -4
  602. package/mobile/lib/components/ApplicationForm/renderAcquiringDataOrganization.js +0 -8
  603. package/mobile/lib/components/ApplicationForm/renderAcquiringDataOrganization.js.map +0 -1
  604. package/mobile/lib/components/ApplicationForm/renderAcquiringRegion.d.ts +0 -9
  605. package/mobile/lib/components/ApplicationForm/renderAcquiringRegion.js +0 -9
  606. package/mobile/lib/components/ApplicationForm/renderAcquiringRegion.js.map +0 -1
  607. package/mobile/lib/components/ApplicationForm/renderCreditDataOrganization.d.ts +0 -4
  608. package/mobile/lib/components/ApplicationForm/renderCreditDataOrganization.js +0 -8
  609. package/mobile/lib/components/ApplicationForm/renderCreditDataOrganization.js.map +0 -1
  610. package/mobile/lib/components/ApplicationForm/renderCreditParameters.d.ts +0 -4
  611. package/mobile/lib/components/ApplicationForm/renderCreditParameters.js +0 -6
  612. package/mobile/lib/components/ApplicationForm/renderCreditParameters.js.map +0 -1
  613. package/mobile/lib/components/ApplicationForm/renderRegionDepartment.d.ts +0 -9
  614. package/mobile/lib/components/ApplicationForm/renderRegionDepartment.js +0 -6
  615. package/mobile/lib/components/ApplicationForm/renderRegionDepartment.js.map +0 -1
  616. package/mobile/lib/components/ApplicationForm/renderUserData.d.ts +0 -15
  617. package/mobile/lib/components/ApplicationForm/renderUserData.js +0 -12
  618. package/mobile/lib/components/ApplicationForm/renderUserData.js.map +0 -1
  619. package/mobile/src/components/ApplicationForm/ApplicationFormAcquiring.tsx +0 -90
  620. package/mobile/src/components/ApplicationForm/ApplicationFormCredit.tsx +0 -89
  621. package/mobile/src/components/ApplicationForm/ApplicationFormDeposit.tsx +0 -59
  622. package/mobile/src/components/ApplicationForm/ApplicationFormIndividuals.tsx +0 -83
  623. package/mobile/src/components/ApplicationForm/ApplicationFormUltraPremium.tsx +0 -112
  624. package/mobile/src/components/ApplicationForm/CreditParameters.ts +0 -6
  625. package/mobile/src/components/ApplicationForm/RegionField.tsx +0 -27
  626. package/mobile/src/components/ApplicationForm/RegionPremiumField.tsx +0 -28
  627. package/mobile/src/components/ApplicationForm/acquiringTypes.ts +0 -21
  628. package/mobile/src/components/ApplicationForm/getFormatData.tsx +0 -4
  629. package/mobile/src/components/ApplicationForm/models.ts +0 -5
  630. package/mobile/src/components/ApplicationForm/renderAcquiringDataOrganization.tsx +0 -26
  631. package/mobile/src/components/ApplicationForm/renderAcquiringRegion.tsx +0 -29
  632. package/mobile/src/components/ApplicationForm/renderCreditDataOrganization.tsx +0 -34
  633. package/mobile/src/components/ApplicationForm/renderCreditParameters.tsx +0 -38
  634. package/mobile/src/components/ApplicationForm/renderRegionDepartment.tsx +0 -21
  635. package/mobile/src/components/ApplicationForm/renderUserData.tsx +0 -36
  636. package/src/components/ApplicationForm/ApplicationFormAcquiring.tsx +0 -90
  637. package/src/components/ApplicationForm/ApplicationFormCredit.tsx +0 -89
  638. package/src/components/ApplicationForm/ApplicationFormDeposit.tsx +0 -59
  639. package/src/components/ApplicationForm/ApplicationFormIndividuals.tsx +0 -83
  640. package/src/components/ApplicationForm/ApplicationFormUltraPremium.tsx +0 -112
  641. package/src/components/ApplicationForm/CreditParameters.ts +0 -6
  642. package/src/components/ApplicationForm/RegionField.tsx +0 -27
  643. package/src/components/ApplicationForm/RegionPremiumField.tsx +0 -28
  644. package/src/components/ApplicationForm/acquiringTypes.ts +0 -21
  645. package/src/components/ApplicationForm/getFormatData.tsx +0 -4
  646. package/src/components/ApplicationForm/models.ts +0 -5
  647. package/src/components/ApplicationForm/renderAcquiringDataOrganization.tsx +0 -26
  648. package/src/components/ApplicationForm/renderAcquiringRegion.tsx +0 -29
  649. package/src/components/ApplicationForm/renderCreditDataOrganization.tsx +0 -34
  650. package/src/components/ApplicationForm/renderCreditParameters.tsx +0 -38
  651. package/src/components/ApplicationForm/renderRegionDepartment.tsx +0 -21
  652. package/src/components/ApplicationForm/renderUserData.tsx +0 -36
  653. /package/bundle/components/{ApplicationForm → ApplicationFormCustom}/getFormatData.d.ts +0 -0
  654. /package/dist/components/{ApplicationForm → ApplicationFormCustom}/getFormatData.d.ts +0 -0
  655. /package/lib/components/{ApplicationForm → ApplicationFormCustom}/getFormatData.d.ts +0 -0
  656. /package/mobile/bundle/components/{ApplicationForm → ApplicationFormCustom}/getFormatData.d.ts +0 -0
  657. /package/mobile/dist/components/{ApplicationForm → ApplicationFormCustom}/getFormatData.d.ts +0 -0
  658. /package/mobile/lib/components/{ApplicationForm → ApplicationFormCustom}/getFormatData.d.ts +0 -0
@@ -924,19 +924,27 @@
924
924
  ];
925
925
  };
926
926
 
927
- 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-s", onClick: () => onChange && onChange(!value), children: [jsx("div", { className: style('relative flex-shrink-0 duration-300 w-9 h-5 mr-s rounded-2xl', value ? 'bg-primary-main' : 'bg-main-divider'), children: jsx("div", { className: style('absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full', value ? 'left-1/2' : 'left-[5%]') }) }), text ? (jsx(Text, { size: "text-l", font: "font-light", color: "text-primary-text", children: text })) : null] })));
928
-
929
- const objectValidator = (validatorsMap) => (o) => (o &&
930
- Object.entries(validatorsMap).flatMap(([key, validator]) => validator(o[key]))) ||
931
- [];
932
-
933
- const isValidationSuccess = (info) => !info?.length;
934
- const validator = (predicate) => (message) => (_) => predicate(_) ? [] : [message];
927
+ const renderErrorText = (error) => (jsx("div", { className: "h-6", children: error ? (jsx(Text, { size: "text-xs", font: "font-light", color: "text-error", children: error })) : null }));
935
928
 
936
- const Footnote = JSX(({ text, link }) => (jsxs(Paragraph, { size: "text-s", font: "font-light", color: "text-secondary-text", children: [jsx(Text, { children: text }), link ? (jsx(LinkButton, { 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] })));
929
+ function useBool(defaultValue = false) {
930
+ const [value, setValue] = useState(defaultValue);
931
+ const setTrue = useCallback(() => setValue(true), []);
932
+ const setFalse = useCallback(() => setValue(false), []);
933
+ const toggle = useCallback(() => setValue(_ => !_), []);
934
+ return [value, { setValue, setTrue, setFalse, toggle }];
935
+ }
937
936
 
938
- const formStyle$1 = 'container space-y-m';
939
- const oneColumnFormStyle = 'w-full max-w-xl space-y-s m-auto';
937
+ const formatDate = (date, toTimeStamp = false) => {
938
+ if (typeof date === 'string') {
939
+ return date.split('-').reverse().join('.');
940
+ }
941
+ else {
942
+ const day = String(date.getDate()).padStart(2, '0');
943
+ const month = String(date.getMonth() + 1).padStart(2, '0');
944
+ const year = toTimeStamp ? String(date.getFullYear()) : String(date.getFullYear()).slice(-2);
945
+ return toTimeStamp ? `${year}-${month}-${day}` : `${day}.${month}.${year}`;
946
+ }
947
+ };
940
948
 
941
949
  const renderLabel = (label) => label ? (jsx(Text, { size: "text-m", color: "text-primary-text", font: "font-light", children: label })) : null;
942
950
 
@@ -959,66 +967,6 @@
959
967
  ? 'border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text'
960
968
  : 'border-error';
961
969
 
962
- const renderErrorText = (error) => (jsx("div", { className: "h-6", children: error ? (jsx(Text, { size: "text-xs", font: "font-light", color: "text-error", children: error })) : null }));
963
-
964
- const InputControl = JSX(({ className, label, value = '', placeholder, error, onChange, onBlur, isTextarea, ...rest }) => (jsxs("div", { className: style('shrink-0 w-full', className), children: [jsx(Input, { type: "text", "aria-label": label, label: label && rest?.errors ? `${label}*` : label, valid: Boolean(!error), value: value, onChange: onChange, onBlur: onBlur, isTextarea: isTextarea, placeholder: rest?.errors && !label ? `${placeholder}*` : placeholder }), renderErrorText(error)] })));
965
-
966
- const withValidator = (props, validator) => {
967
- const { value, isDirty } = props;
968
- const errors = isDirty ? validator(value) : [];
969
- return {
970
- ...props,
971
- errors,
972
- error: errors[0],
973
- };
974
- };
975
-
976
- const ApplicationFieldsetLayout = JSX(({ title, children }) => (jsxs("fieldset", { className: "grid @xl:flex @xl:justify-between gap-m border-b border-b-main-divider @xl:border-none", children: [title ? (jsx("legend", { className: "w-full", children: jsx(Heading, { title: title, headingType: "h6", className: "@xl:text-center" }) })) : null, children] })));
977
- const formChildrenStyle = '@xl:w-1/2 space-y-s';
978
-
979
- const isPlaceholder = (_) => _ === '_';
980
- const isDigit = (_) => /\d/.test(_);
981
- const isWildcard = (_) => isPlaceholder(_) || isDigit(_);
982
- const phonePattern = [...'+7 (___) ___-__-__'];
983
- const firstPlaceholderIndex = phonePattern.findIndex(isPlaceholder);
984
- const phoneWildcardIndicies = phonePattern.map((_, i) => isWildcard(_) ? phonePattern.slice(0, i).filter(isWildcard).length : -1);
985
- function normalizePhone(phone) {
986
- const phoneNumbers = phone.replace(/\D/g, '');
987
- const applyPlaceholder = (_, i) => isDigit(_) ? _ : phoneNumbers.charAt(phoneWildcardIndicies[i]) || _;
988
- const result = phonePattern.map(applyPlaceholder);
989
- const resultLength = phoneWildcardIndicies.indexOf(phoneNumbers.length - 1) + 1;
990
- return (resultLength ? result.slice(0, Math.max(firstPlaceholderIndex, resultLength)) : result).join('');
991
- }
992
-
993
- const PhoneInput = JSX(({ children, onChange, ...inputProps }) => {
994
- const handleChange = useCallback((value) => onChange && onChange(normalizePhone(value)), [onChange]);
995
- return (jsx(Input, { onChange: handleChange, onFocus: (event) => handleChange(event?.target?.value || ''), ...inputProps, children: children }));
996
- });
997
-
998
- const PhoneInputControl = JSX(({ className, label, value, error, onChange, onBlur, ...rest }) => (jsxs("div", { className: style('shrink-0 w-full', className), children: [jsx(PhoneInput, { "aria-label": label, label: rest?.errors ? `${label}*` : label, valid: Boolean(!error), value: value, onChange: onChange, onBlur: onBlur, placeholder: "+7 (___) ___-__-__" }), renderErrorText(error)] })));
999
-
1000
- const pattern = (regexp) => validator((_) => typeof _ === 'string' && regexp.test(_));
1001
-
1002
- const required = validator((_) => _ !== null && _ !== undefined && _ !== '');
1003
-
1004
- const ERROR_MESSAGE = 'Некорректно заполненное поле';
1005
- const defaultValidator = required(ERROR_MESSAGE);
1006
- const defaultSelectValidator = validator((_) => _?.key && _?.key !== '')(ERROR_MESSAGE);
1007
- const nameValidator = validator((_) => typeof _ === 'string' && _.length > 1)(ERROR_MESSAGE);
1008
- const innValidator = validator((_) => typeof _ === 'string' && (_.length === 10 || _.length === 12))(ERROR_MESSAGE);
1009
- const phoneValidator = pattern(/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/)(ERROR_MESSAGE);
1010
- const checkboxValidator = validator((_) => typeof _ === 'boolean' && _)(ERROR_MESSAGE);
1011
-
1012
- const renderAcquiringDataOrganization = (field, title) => (jsxs(ApplicationFieldsetLayout, { title: title, children: [jsxs("div", { className: formChildrenStyle, children: [jsx(InputControl, { label: "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", ...withValidator(field('fullName'), defaultValidator) }), jsx(InputControl, { label: "\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E", ...withValidator(field('name'), nameValidator) })] }), jsxs("div", { className: formChildrenStyle, children: [jsx(InputControl, { label: "\u0418\u041D\u041D", ...withValidator(field('inn'), innValidator) }), jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) })] })] }));
1013
-
1014
- function useBool(defaultValue = false) {
1015
- const [value, setValue] = useState(defaultValue);
1016
- const setTrue = useCallback(() => setValue(true), []);
1017
- const setFalse = useCallback(() => setValue(false), []);
1018
- const toggle = useCallback(() => setValue(_ => !_), []);
1019
- return [value, { setValue, setTrue, setFalse, toggle }];
1020
- }
1021
-
1022
970
  const formatOption = (_) => _?.text || _?.key || '';
1023
971
 
1024
972
  function useEventListener(target, type, listener, options) {
@@ -1116,196 +1064,256 @@
1116
1064
  const renderIcon$1 = (isOpen, iconVersion) => (jsx(Icon, { className: style('absolute right-3 flex self-center', isOpen ? '' : 'rotate-180'), iconVersion: iconVersion, name: "ArrowUpIcon", width: "16", height: "16" }));
1117
1065
  const getStyle = (isBorder, valid, disabled) => style(isBorder ? 'border rounded-md ' : '', isBorder && !disabled ? 'hover:border-primary-hover' : '', disabled ? 'bg-main-divider' : 'cursor-pointer ', valid ? 'border-gray' : 'border-error');
1118
1066
 
1119
- const SelectControl = JSX(({ className = '', label, error, ...rest }) => (jsxs("div", { className: className, children: [jsx(Select, { ...rest, valid: !error, label: rest?.errors ? `${label}*` : label }), renderErrorText(error)] })));
1120
-
1121
- const ACQUIRING_TYPES = [
1122
- {
1123
- text: 'Торговый эквайринг',
1124
- key: 'trade',
1125
- },
1126
- {
1127
- text: 'СБП-эквайринг',
1128
- key: 'sbp',
1129
- },
1130
- {
1131
- text: 'Интернет-эквайринг',
1132
- key: 'internet',
1133
- },
1134
- {
1135
- text: 'Все виды эквайринга',
1136
- key: 'all',
1137
- },
1138
- ];
1139
-
1140
- const isFilled = (_) => _ !== null && _ !== undefined;
1141
-
1142
- const defaultCache = new Map();
1143
- const applyCache = (fetcher, cache = defaultCache) => (args) => {
1144
- const key = computeKey(args);
1145
- const cachedData = cache.get(key);
1146
- if (key && isFilled(cachedData)) {
1147
- return cachedData;
1148
- }
1149
- const data = fetcher(...args);
1150
- if (key && isFilled(data)) {
1151
- cache.set(key, Promise.resolve(data));
1152
- }
1153
- return data;
1154
- };
1155
- const isKey = (args) => Boolean(args?.every(_ => (Array.isArray(_) ? isKey(_) : !_ || typeof _ === 'string')));
1156
- const computeKey = (args) => (isKey(args) ? args.toString() : '');
1157
-
1158
- const isFallbackKey = (args) => Boolean(args && Array.isArray(args) && args.length === 1 && typeof args[0] === 'string');
1159
- function useAsyncData(key, fetcher, { fallback, cache } = {}) {
1160
- const args = useMemo(() => keyToArgs(key), [key]);
1161
- const [data, setData] = useState(undefined);
1162
- const [error, setError] = useState(undefined);
1163
- useEffect(() => {
1164
- const isEmptyKey = !args.some(isFilled);
1165
- if (isEmptyKey) {
1166
- return;
1167
- }
1168
- let canceled = false;
1169
- const setResult = (newData, err) => {
1170
- if (!canceled) {
1171
- setData(newData);
1172
- setError(err);
1173
- }
1174
- };
1175
- (async () => {
1176
- try {
1177
- setResult(await applyCache(fetcher, cache)(args));
1178
- }
1179
- catch (err) {
1180
- setResult(undefined, err);
1181
- }
1182
- })();
1183
- return () => {
1184
- canceled = true;
1185
- };
1186
- }, [fetcher, cache, args]);
1187
- const fallbackData = fallback && isFallbackKey(args) && fallback[args[0]];
1188
- return {
1189
- data: !data && fallbackData ? fallbackData : data,
1190
- error,
1191
- mutate: () => Promise.resolve(undefined) // TODO Clean up cache
1192
- };
1193
- }
1194
- function keyToArgs(key) {
1195
- if (Array.isArray(key)) {
1196
- return key;
1197
- }
1198
- else if (key instanceof Function) {
1199
- return keyToArgs(key());
1200
- }
1201
- else {
1202
- return [key];
1203
- }
1204
- }
1205
-
1206
- const REGIONS_URL$1 = '/api/v1/regions';
1207
- function useRegions() {
1208
- const { data } = useAsyncData(REGIONS_URL$1, fetchJSONUnsafe);
1209
- return data || [];
1210
- }
1211
-
1212
- const getNamesFromInput = (inputs) => Object.values(inputs).map((_) => _.name);
1213
-
1214
- const validatorObj = {
1215
- typeForm: defaultValidator,
1216
- surname: nameValidator,
1217
- name: nameValidator,
1218
- region: defaultSelectValidator,
1219
- phone: phoneValidator,
1220
- birthday: defaultValidator,
1221
- email: defaultValidator,
1222
- fullName: defaultValidator,
1223
- inn: innValidator,
1224
- partnerComments: defaultValidator,
1225
- comment: defaultValidator,
1226
- consentDataProcessing: checkboxValidator,
1067
+ const noop = () => {
1068
+ // Do nothing
1227
1069
  };
1228
- const getObjectValidator = (inputs) => {
1229
- const requiredInputs = getNamesFromInput(inputs.filter((_) => ('required' in _ ? _.required : false)));
1230
- return Object.fromEntries(requiredInputs.map((_) => [_, validatorObj?.[_]]));
1070
+
1071
+ const DAY_COUNT = 6;
1072
+ const WEEK_COUNT = 7;
1073
+ const renderCalendarCells = ({ today, firstDayOfWeek, totalDays, currentMonth, currentYear, min, max, onDateClick, }) => {
1074
+ const calendarCells = [];
1075
+ let dayCounter = 1;
1076
+ for (let i = 0; i < DAY_COUNT; i++) {
1077
+ const rowCells = [];
1078
+ for (let j = 0; j < WEEK_COUNT; j++) {
1079
+ if (i === 0 && j < firstDayOfWeek) {
1080
+ rowCells.push(jsx("td", {}, `empty-${j}`));
1081
+ }
1082
+ else if (dayCounter > totalDays) {
1083
+ rowCells.push(jsx("td", {}, `empty-${j}`));
1084
+ }
1085
+ else {
1086
+ const currentDate = new Date(currentYear, currentMonth, dayCounter);
1087
+ const isToday = checkIsToday(currentDate, today);
1088
+ const isDisabled = checkIsDisabled(currentDate, min, max);
1089
+ rowCells.push(jsx("td", { children: jsx("div", { className: getDayStyles(isToday, isDisabled), onClick: () => !isDisabled && onDateClick(currentDate), children: dayCounter }) }, `day-${dayCounter}`));
1090
+ dayCounter++;
1091
+ }
1092
+ }
1093
+ calendarCells.push(jsx("tr", { children: rowCells }, `row-${i}`));
1094
+ }
1095
+ return calendarCells;
1231
1096
  };
1097
+ const checkIsToday = (currentDate, today) => today && currentDate.toDateString() === today.toDateString();
1098
+ const checkIsDisabled = (currentDate, min, max) => (min && currentDate.getTime() < min.getTime()) || (max && currentDate.getTime() > max.getTime());
1099
+ const getDayStyles = (isToday, isDisabled) => style('p-s text-center rounded-md border', isToday ? '' : 'border-transparent hover:bg-gray', isDisabled ? 'text-gray hover:bg-transparent' : 'cursor-pointer');
1232
1100
 
1233
- const RegionField = JSX(({ field }) => {
1234
- const regions = useRegions();
1235
- return (jsx(SelectControl, { className: "w-full", label: "\u0424\u0438\u043B\u0438\u0430\u043B", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0438\u043B\u0438\u0430\u043B", isSearch: true, options: regions.map(({ code = '', name = '' }) => ({ key: code, text: name })), ...withValidator(field('region'), validatorObj.region) }));
1101
+ const WEEK_DAYS = ['Пн', 'Вт', 'Ср', 'Чт', 'Пт', 'Сб', 'Вс'];
1102
+ const Calendar = JSX(({ today, currentMonth, currentYear, min, max, onDateSelect = noop }) => {
1103
+ const handleDateClick = useCallback((date) => onDateSelect(date), []);
1104
+ const { firstDayOfWeek, totalDays } = useMemo(() => ({
1105
+ firstDayOfWeek: new Date(currentYear, currentMonth, 1).getDay() - 1,
1106
+ totalDays: new Date(currentYear, currentMonth + 1, 0).getDate(),
1107
+ }), [currentYear, currentMonth]);
1108
+ return (jsxs("table", { className: "mx-auto", children: [jsx("thead", { className: "text-gray font-light", children: jsx("tr", { children: WEEK_DAYS.map((day, index) => (jsx("th", { className: "p-s", children: day }, String(index)))) }) }), jsx("tbody", { children: renderCalendarCells({
1109
+ firstDayOfWeek,
1110
+ today,
1111
+ totalDays,
1112
+ currentYear,
1113
+ currentMonth,
1114
+ min,
1115
+ max,
1116
+ onDateClick: handleDateClick,
1117
+ }) })] }));
1236
1118
  });
1237
1119
 
1238
- const renderAcquiringRegion = ({ field, title }) => (jsxs(ApplicationFieldsetLayout, { title: title, children: [jsx("div", { className: formChildrenStyle, children: jsx(SelectControl, { 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", options: ACQUIRING_TYPES, ...withValidator(field('acquiringType'), defaultValidator) }) }), jsx("div", { className: formChildrenStyle, children: jsx(RegionField, { field: field }) })] }));
1239
-
1240
- function useButton() {
1241
- return (props) => ({
1242
- ...props,
1243
- onClick: handlerDecorator(handleClick(props), props),
1244
- });
1245
- }
1246
- function handleClick({ disabled, onClick }) {
1247
- return (ev) => {
1248
- !disabled && onClick && onClick(ev);
1249
- };
1250
- }
1120
+ const months = [
1121
+ 'Январь',
1122
+ 'Февраль',
1123
+ 'Март',
1124
+ 'Апрель',
1125
+ 'Май',
1126
+ 'Июнь',
1127
+ 'Июль',
1128
+ 'Август',
1129
+ 'Сентябрь',
1130
+ 'Октябрь',
1131
+ 'Ноябрь',
1132
+ 'Декабрь',
1133
+ ];
1251
1134
 
1252
- const activeButtonStyleMap = 'text-white bg-primary-active';
1253
- const disabledButtonStyle = 'bg-main-gray text-main-disabled cursor-not-allowed';
1254
- const buttonStyleMap = {
1255
- primary: 'text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active',
1256
- secondary: 'text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active',
1135
+ const START_YEAR = 1940;
1136
+ const getYears = () => Array.from({ length: new Date().getFullYear() - START_YEAR + 1 }, (_, i) => START_YEAR + i);
1137
+
1138
+ const MONTHS_COUNT = 11;
1139
+ const MONTHS_OPTIONS = months.map((key) => ({ key }));
1140
+ const YEARS_OPTIONS = getYears()
1141
+ .reverse()
1142
+ .map((key) => ({ key: String(key) }));
1143
+ const useDatePickerManager = ({ onShowCalendar, showCalendar, selectedMonth, onMonthSelect, onYearSelect, selectedYear, }) => {
1144
+ const close = useCallback(() => showCalendar && onShowCalendar(false), [showCalendar]);
1145
+ const ref = useOutsideClick(close);
1146
+ const handleChangeVisibleCalendar = useCallback(() => onShowCalendar(!showCalendar), [showCalendar]);
1147
+ const handleNextMonth = useCallback(() => {
1148
+ if (selectedMonth + 1 <= MONTHS_COUNT) {
1149
+ onMonthSelect(selectedMonth + 1);
1150
+ }
1151
+ else {
1152
+ onMonthSelect(0);
1153
+ onYearSelect(selectedYear + 1);
1154
+ }
1155
+ }, [selectedMonth]);
1156
+ const handlePrevMonth = useCallback(() => {
1157
+ if (selectedMonth - 1 >= 0) {
1158
+ onMonthSelect(selectedMonth - 1);
1159
+ }
1160
+ else {
1161
+ onMonthSelect(11);
1162
+ onYearSelect(selectedYear - 1);
1163
+ }
1164
+ }, [selectedMonth]);
1165
+ const handleSelectMonth = useCallback(({ key }) => onMonthSelect(months.indexOf(key)), []);
1166
+ const handleSelectYear = useCallback(({ key }) => onYearSelect(Number(key)), []);
1167
+ return {
1168
+ handleChangeVisibleCalendar,
1169
+ handleNextMonth,
1170
+ handlePrevMonth,
1171
+ handleSelectMonth,
1172
+ handleSelectYear,
1173
+ monthsOptions: MONTHS_OPTIONS,
1174
+ yearsOptions: YEARS_OPTIONS,
1175
+ ref,
1176
+ };
1257
1177
  };
1258
- const secondaryButtonStyleMap = {
1259
- primary: style('group-data-secondary:text-primary-main group-data-secondary:bg-white', 'group-data-secondary:hover:text-white group-data-secondary:hover:bg-primary-hover', 'group-data-secondary:active:bg-primary-active'),
1260
- secondary: style('group-data-secondary:text-white group-data-secondary:bg-white/20', 'group-data-secondary:hover:bg-primary-hover', 'group-data-secondary:active:bg-primary-active'),
1178
+
1179
+ const ICON_PROPS = {
1180
+ name: 'ArrowUpIcon',
1181
+ iconVersion: 'black',
1182
+ width: '24',
1183
+ height: '24',
1261
1184
  };
1262
- const Button = JSX(({ children, ...props }) => {
1263
- const button = useButton();
1264
- const { className, version = 'primary', active, disabled, type = 'button', rounded = true, role, onClick, } = button(props);
1265
- return (jsx("button", { className: style('font-sans px-9 py-4', 'flex justify-center items-center gap-xs', active ? activeButtonStyleMap : '', disabled ? disabledButtonStyle : '', !active && !disabled
1266
- ? style(buttonStyleMap[version], secondaryButtonStyleMap[version])
1267
- : '', rounded ? 'rounded-md' : '', className), type: type, role: role, onClick: onClick, children: children }));
1185
+ const SELECT_PROPS = {
1186
+ className: 'min-w-32',
1187
+ iconVersion: 'black',
1188
+ isBorder: false,
1189
+ };
1190
+ const formStyle$1 = 'flex justify-between items-center h-14 px-m py-s border rounded-md cursor-pointer ' +
1191
+ 'hover:border-black active:border-black focus:border-black';
1192
+ const DatePicker = JSX(({ className = '', label = '', value, valid = true, minDate, maxDate, onChange }) => {
1193
+ const [showCalendar, { setValue }] = useBool(false);
1194
+ const [selectedMonth, setSelectedMonth] = useState(value?.getMonth() || new Date().getMonth());
1195
+ const [selectedYear, setSelectedYear] = useState(value?.getFullYear() || new Date().getFullYear());
1196
+ const { handlePrevMonth, handleNextMonth, handleSelectMonth, handleSelectYear, monthsOptions, yearsOptions, handleChangeVisibleCalendar, ref, } = useDatePickerManager({
1197
+ onYearSelect: setSelectedYear,
1198
+ onMonthSelect: setSelectedMonth,
1199
+ onShowCalendar: setValue,
1200
+ selectedYear,
1201
+ selectedMonth,
1202
+ showCalendar,
1203
+ });
1204
+ return (jsxs("div", { className: style('space-y-xs', className), ref: ref, children: [renderLabel(label), jsxs("div", { className: "relative", children: [renderDatePickerForm(handleChangeVisibleCalendar, value, valid), showCalendar ? (jsxs("div", { className: "absolute bg-white z-20 select-none", children: [jsxs("div", { className: "flex gap-s", children: [jsx("div", { className: "my-auto", onClick: handlePrevMonth, children: jsx(Icon, { ...ICON_PROPS, className: "-rotate-90 cursor-pointer" }) }), jsx(Select, { onChange: handleSelectMonth, value: { key: months[selectedMonth] }, options: monthsOptions, ...SELECT_PROPS }), jsx(Select, { onChange: handleSelectYear, value: { key: String(selectedYear) }, options: yearsOptions, ...SELECT_PROPS }), jsx("div", { className: "my-auto", onClick: handleNextMonth, children: jsx(Icon, { ...ICON_PROPS, className: "rotate-90 cursor-pointer" }) })] }), jsx(Calendar, { today: value, currentMonth: selectedMonth, currentYear: selectedYear, onDateSelect: onChange, min: minDate, max: maxDate })] })) : null] })] }));
1268
1205
  });
1206
+ const renderDatePickerForm = (handleChangeVisibleCalendar, value, valid) => (jsxs("div", { onClick: handleChangeVisibleCalendar, className: style(formStyle$1, valid ? 'border-gray' : 'border-error'), children: [jsx(Paragraph, { children: value && formatDate(value) }), jsx(Icon, { ...ICON_PROPS, name: "CalendarIcon" })] }));
1269
1207
 
1270
- const renderSubmitButton = (button, className) => (jsx(Button, { className: style('w-full @xl:w-auto', className), type: "submit", children: button?.text ? button.text : 'Отправить заявку' }));
1208
+ const DatePickerControl = JSX(({ className, label, error, ...rest }) => (jsxs("div", { className: style('shrink-0 w-full', className), children: [jsx(DatePicker, { label: label && rest?.errors ? `${label}*` : label, valid: Boolean(!error), ...rest }), renderErrorText(error)] })));
1271
1209
 
1272
- const initialFormState$7 = {
1273
- typeForm: { key: 'acqr', text: 'Предупреждение о мошенничестве' },
1274
- acquiringType: { key: 'trade', text: 'Торговый эквайринг' },
1275
- fullName: '',
1276
- inn: '',
1277
- name: '',
1278
- phone: '',
1279
- onlineCheckout: false,
1280
- posTerminal: false,
1281
- };
1282
- const acquiringValidator = objectValidator({
1283
- acquiringType: defaultValidator,
1284
- region: defaultValidator,
1285
- fullName: defaultValidator,
1286
- inn: innValidator,
1287
- name: nameValidator,
1288
- phone: phoneValidator,
1289
- });
1290
- const ApplicationFormAcquiring = JSX((props) => {
1291
- const { button, link, onSubmit } = props;
1292
- const handleSubmit = useCallback((formState) => {
1293
- const { acquiringType, onlineCheckout, posTerminal, ...usedForm } = formState;
1294
- const isTradeAcquiring = getSlideCheckboxes(acquiringType?.key);
1295
- const partnerComments = `Вид эквайринга=${acquiringType?.text || ''}${isTradeAcquiring
1296
- ? `/Онлайн касса=${onlineCheckout}/POS-терминал=${posTerminal}`
1297
- : '/Онлайн касса=false/POS-терминал=false'}`;
1298
- const submitData = {
1299
- partnerComments,
1300
- ...usedForm,
1301
- };
1302
- isValidationSuccess(acquiringValidator(formState)) && onSubmit(submitData, false);
1303
- }, [onSubmit]);
1304
- const [, { field, ...formProps }] = useForm(initialFormState$7, { onSubmit: handleSubmit });
1305
- const isSlideCheckboxes = getSlideCheckboxes(field('acquiringType').value?.key);
1306
- return (jsxs("form", { className: formStyle$1, onSubmit: formProps.onSubmit, children: [renderAcquiringRegion({ field, title: 'Вид эквайринга и регион' }), renderAcquiringDataOrganization(field, 'Данные организации'), isSlideCheckboxes ? (jsxs("div", { role: "radiogroup", children: [jsx(SlideCheckbox, { type: "radio", text: "\u0425\u043E\u0447\u0443 \u043E\u043D\u043B\u0430\u0439\u043D-\u043A\u0430\u0441\u0441\u0443", ...field('onlineCheckout') }), jsx(SlideCheckbox, { type: "radio", text: "\u0425\u043E\u0447\u0443 \u043A\u0443\u043F\u0438\u0442\u044C POS-\u0442\u0435\u0440\u043C\u0438\u043D\u0430\u043B", ...field('posTerminal') })] })) : null, renderSubmitButton(button), jsx(Footnote, { link: link })] }));
1210
+ const InputControl = JSX(({ className, label, value = '', placeholder, error, onChange, onBlur, isTextarea, ...rest }) => (jsxs("div", { className: style('shrink-0 w-full', className), children: [jsx(Input, { type: "text", "aria-label": label, label: label && rest?.errors ? `${label}*` : label, valid: Boolean(!error), value: value, onChange: onChange, onBlur: onBlur, isTextarea: isTextarea, placeholder: rest?.errors && !label ? `${placeholder}*` : placeholder }), renderErrorText(error)] })));
1211
+
1212
+ const isPlaceholder = (_) => _ === '_';
1213
+ const isDigit = (_) => /\d/.test(_);
1214
+ const isWildcard = (_) => isPlaceholder(_) || isDigit(_);
1215
+ const phonePattern = [...'+7 (___) ___-__-__'];
1216
+ const firstPlaceholderIndex = phonePattern.findIndex(isPlaceholder);
1217
+ const phoneWildcardIndicies = phonePattern.map((_, i) => isWildcard(_) ? phonePattern.slice(0, i).filter(isWildcard).length : -1);
1218
+ function normalizePhone(phone) {
1219
+ const phoneNumbers = phone.replace(/\D/g, '');
1220
+ const applyPlaceholder = (_, i) => isDigit(_) ? _ : phoneNumbers.charAt(phoneWildcardIndicies[i]) || _;
1221
+ const result = phonePattern.map(applyPlaceholder);
1222
+ const resultLength = phoneWildcardIndicies.indexOf(phoneNumbers.length - 1) + 1;
1223
+ return (resultLength ? result.slice(0, Math.max(firstPlaceholderIndex, resultLength)) : result).join('');
1224
+ }
1225
+
1226
+ const PhoneInput = JSX(({ children, onChange, ...inputProps }) => {
1227
+ const handleChange = useCallback((value) => onChange && onChange(normalizePhone(value)), [onChange]);
1228
+ return (jsx(Input, { onChange: handleChange, onFocus: (event) => handleChange(event?.target?.value || ''), ...inputProps, children: children }));
1307
1229
  });
1308
- const getSlideCheckboxes = (type) => type === 'all' || type === 'trade';
1230
+
1231
+ const InputPhoneControl = JSX(({ className, label, value, error, onChange, onBlur, ...rest }) => (jsxs("div", { className: style('shrink-0 w-full', className), children: [jsx(PhoneInput, { "aria-label": label, label: rest?.errors ? `${label}*` : label, valid: Boolean(!error), value: value, onChange: onChange, onBlur: onBlur, placeholder: "+7 (___) ___-__-__" }), renderErrorText(error)] })));
1232
+
1233
+ const SelectControl = JSX(({ className = '', label, error, ...rest }) => (jsxs("div", { className: className, children: [jsx(Select, { ...rest, valid: !error, label: rest?.errors ? `${label}*` : label }), renderErrorText(error)] })));
1234
+
1235
+ const objectValidator = (validatorsMap) => (o) => (o &&
1236
+ Object.entries(validatorsMap).flatMap(([key, validator]) => validator(o[key]))) ||
1237
+ [];
1238
+
1239
+ const isValidationSuccess = (info) => !info?.length;
1240
+ const validator = (predicate) => (message) => (_) => predicate(_) ? [] : [message];
1241
+
1242
+ const withValidator = (props, validator) => {
1243
+ const { value, isDirty } = props;
1244
+ const errors = isDirty ? validator(value) : [];
1245
+ return {
1246
+ ...props,
1247
+ errors,
1248
+ error: errors[0],
1249
+ };
1250
+ };
1251
+
1252
+ const isFilled = (_) => _ !== null && _ !== undefined;
1253
+
1254
+ const defaultCache = new Map();
1255
+ const applyCache = (fetcher, cache = defaultCache) => (args) => {
1256
+ const key = computeKey(args);
1257
+ const cachedData = cache.get(key);
1258
+ if (key && isFilled(cachedData)) {
1259
+ return cachedData;
1260
+ }
1261
+ const data = fetcher(...args);
1262
+ if (key && isFilled(data)) {
1263
+ cache.set(key, Promise.resolve(data));
1264
+ }
1265
+ return data;
1266
+ };
1267
+ const isKey = (args) => Boolean(args?.every(_ => (Array.isArray(_) ? isKey(_) : !_ || typeof _ === 'string')));
1268
+ const computeKey = (args) => (isKey(args) ? args.toString() : '');
1269
+
1270
+ const isFallbackKey = (args) => Boolean(args && Array.isArray(args) && args.length === 1 && typeof args[0] === 'string');
1271
+ function useAsyncData(key, fetcher, { fallback, cache } = {}) {
1272
+ const args = useMemo(() => keyToArgs(key), [key]);
1273
+ const [data, setData] = useState(undefined);
1274
+ const [error, setError] = useState(undefined);
1275
+ useEffect(() => {
1276
+ const isEmptyKey = !args.some(isFilled);
1277
+ if (isEmptyKey) {
1278
+ return;
1279
+ }
1280
+ let canceled = false;
1281
+ const setResult = (newData, err) => {
1282
+ if (!canceled) {
1283
+ setData(newData);
1284
+ setError(err);
1285
+ }
1286
+ };
1287
+ (async () => {
1288
+ try {
1289
+ setResult(await applyCache(fetcher, cache)(args));
1290
+ }
1291
+ catch (err) {
1292
+ setResult(undefined, err);
1293
+ }
1294
+ })();
1295
+ return () => {
1296
+ canceled = true;
1297
+ };
1298
+ }, [fetcher, cache, args]);
1299
+ const fallbackData = fallback && isFallbackKey(args) && fallback[args[0]];
1300
+ return {
1301
+ data: !data && fallbackData ? fallbackData : data,
1302
+ error,
1303
+ mutate: () => Promise.resolve(undefined) // TODO Clean up cache
1304
+ };
1305
+ }
1306
+ function keyToArgs(key) {
1307
+ if (Array.isArray(key)) {
1308
+ return key;
1309
+ }
1310
+ else if (key instanceof Function) {
1311
+ return keyToArgs(key());
1312
+ }
1313
+ else {
1314
+ return [key];
1315
+ }
1316
+ }
1309
1317
 
1310
1318
  const BRANCHES_URL = '/api/v1/branches';
1311
1319
  const EMPTY_VALUE$3 = [];
@@ -1318,31 +1326,100 @@
1318
1326
  return result || EMPTY_VALUE$3;
1319
1327
  };
1320
1328
 
1321
- const REGIONS_URL = '/api/v1/premiumBranchesByRegions';
1329
+ const REGIONS_URL$1 = '/api/v1/premiumBranchesByRegions';
1322
1330
  function usePremiumBranchesByRegions() {
1323
- const { data } = useAsyncData(REGIONS_URL, fetchJSONUnsafe);
1331
+ const { data } = useAsyncData(REGIONS_URL$1, fetchJSONUnsafe);
1324
1332
  return data || [];
1325
1333
  }
1326
1334
 
1327
- const AddressBranchField = JSX(({ field, isPremium = false }) => {
1328
- const regionKey = field('region')?.value?.key;
1329
- const addressBranch = isPremium
1330
- ? usePremiumBranchesByRegions().find((_) => _?.region === regionKey)?.branches
1331
- : useBranches(regionKey).filter((branch) => branch?.address);
1332
- return (jsx(SelectControl, { label: "\u0410\u0434\u0440\u0435\u0441", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0430\u0434\u0440\u0435\u0441", options: (addressBranch || []).map(({ address = '' }) => ({
1333
- key: address,
1334
- text: address,
1335
- })), ...withValidator(field('addressBranch'), defaultSelectValidator) }));
1335
+ const SVG = JSX(({ className, viewBox, fill = 'none', width, height, paths, ...commonOptions }) => {
1336
+ return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: className, viewBox: viewBox, fill: fill, width: width, height: height, children: paths.map(({ d, fill: pathFill, ...options }, i) => {
1337
+ const resultOptions = { ...commonOptions, ...options };
1338
+ return (jsx("path", { d: d, fill: pathFill || 'currentColor', stroke: resultOptions.stroke, strokeLinecap: resultOptions.strokeLinecap, strokeLinejoin: resultOptions.strokeLinejoin, strokeWidth: resultOptions.strokeWidth, strokeMiterlimit: resultOptions.strokeMiterlimit }, i));
1339
+ }) }));
1336
1340
  });
1337
1341
 
1338
- const MIN_CREDIT_AMOUNT = 1000;
1339
- const MAX_CREDIT_AMOUNT = 1000000000;
1340
- const ITEMS_CREDIT_AMOUNT = ['От 1 000 ₽', 'До 1 000 000 000 ₽'];
1341
- const MIN_CREDIT_TERM = 1;
1342
- const MAX_CREDIT_TERM = 180;
1343
- const ITEMS_CREDIT_TERM = ['От 1 мес', 'До 15 лет'];
1342
+ const CHECK_PATHS = [
1343
+ {
1344
+ d: 'M10.207.793a1 1 0 0 1 0 1.414l-6 6a1 1 0 0 1-1.414 0l-2.5-2.5a1 1 0 0 1 1.414-1.414L3.5 6.086 8.793.793a1 1 0 0 1 1.414 0Z',
1345
+ fillRule: 'evenodd',
1346
+ clipRule: 'evenodd',
1347
+ fill: 'white',
1348
+ },
1349
+ ];
1350
+ const Checkbox = JSX(({ className, value, text, disabled, isRadio, onChange }) => {
1351
+ const handleChange = useCallback((e) => {
1352
+ if (disabled) {
1353
+ return;
1354
+ }
1355
+ e.preventDefault();
1356
+ onChange && onChange(!value);
1357
+ }, [onChange, disabled, value]);
1358
+ const icon = isRadio ? (jsx("div", { className: "absolute left-1 w-3 h-3 rounded-full bg-primary-main" })) : (jsx(SVG, { paths: CHECK_PATHS, className: "absolute left-1 ml-px block", width: "11", height: "9", fill: "white", viewBox: "0 0 11 9" }));
1359
+ return (jsx("div", { className: className, children: jsxs("label", { className: "flex items-center relative cursor-pointer group/box", onClick: handleChange, children: [jsx("div", { className: style('appearance-none w-5 h-5 border-solid cursor-pointer m-0', isRadio ? 'rounded-full border-2' : checkboxStyle(value), value ? 'border-primary-main' : 'border-gray', disabled ? 'bg-main-disabled' : 'group-hover/box:border-primary-hover'), role: role(isRadio), "aria-checked": Boolean(value), "aria-disabled": Boolean(disabled) }), value ? icon : null, text ? (jsx("div", { className: "ml-s", children: jsx(Text, { size: "text-l", font: "font-light", children: text }) })) : null] }) }));
1360
+ });
1361
+ const role = (isRadio) => (isRadio ? 'radio' : 'checkbox');
1362
+ const checkboxStyle = (value) => style('rounded border', value ? 'bg-primary-main' : '');
1363
+
1364
+ const CheckboxWithError = JSX(({ className, text, value, key, disabled, error, onChange }) => (jsxs("div", { className: style('shrink-0 w-full', className), children: [jsx(Checkbox, { text: text, value: value, disabled: disabled, onChange: onChange }, key), renderErrorText(error)] })));
1365
+
1366
+ const pattern = (regexp) => validator((_) => typeof _ === 'string' && regexp.test(_));
1367
+
1368
+ const required = validator((_) => _ !== null && _ !== undefined && _ !== '');
1369
+
1370
+ const ERROR_MESSAGE = 'Некорректно заполненное поле';
1371
+ const defaultValidator = required(ERROR_MESSAGE);
1372
+ const defaultSelectValidator = validator((_) => _?.key && _?.key !== '')(ERROR_MESSAGE);
1373
+ const nameValidator = validator((_) => typeof _ === 'string' && _.length > 1)(ERROR_MESSAGE);
1374
+ const innValidator = validator((_) => typeof _ === 'string' && (_.length === 10 || _.length === 12))(ERROR_MESSAGE);
1375
+ const phoneValidator = pattern(/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/)(ERROR_MESSAGE);
1376
+ const checkboxValidator = validator((_) => typeof _ === 'boolean' && _)(ERROR_MESSAGE);
1344
1377
 
1345
- const renderCreditDataOrganization = (field, title) => (jsxs(ApplicationFieldsetLayout, { title: title, children: [jsxs("div", { className: formChildrenStyle, children: [jsx(InputControl, { label: "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", ...withValidator(field('fullName'), defaultValidator) }), jsx(InputControl, { label: "\u0418\u041D\u041D", ...withValidator(field('inn'), innValidator) }), jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) })] }), jsxs("div", { className: formChildrenStyle, children: [jsx(InputControl, { label: "\u0413\u043E\u0434\u043E\u0432\u0430\u044F \u0432\u044B\u0440\u0443\u0447\u043A\u0430, \u20BD", ...withValidator(field('annualRevenue'), defaultValidator) }), jsx(InputControl, { label: "\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E", ...withValidator(field('name'), nameValidator) }), jsx(InputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...withValidator(field('email'), defaultValidator) })] })] }));
1378
+ const getNamesFromInput = (inputs) => Object.values(inputs).map((_) => _.name);
1379
+
1380
+ const validatorObj = {
1381
+ typeForm: defaultValidator,
1382
+ surname: nameValidator,
1383
+ name: nameValidator,
1384
+ region: defaultSelectValidator,
1385
+ addressBranch: defaultSelectValidator,
1386
+ phone: phoneValidator,
1387
+ birthday: defaultValidator,
1388
+ email: defaultValidator,
1389
+ fullName: defaultValidator,
1390
+ inn: innValidator,
1391
+ partnerComments: defaultValidator,
1392
+ comment: defaultValidator,
1393
+ acquiringType: defaultSelectValidator,
1394
+ serviceType: defaultSelectValidator,
1395
+ consentDataProcessing: checkboxValidator,
1396
+ annualRevenue: defaultValidator,
1397
+ };
1398
+ const getObjectValidator = (inputs) => {
1399
+ const requiredInputs = getNamesFromInput(inputs.filter((_) => ('required' in _ ? _.required : false)));
1400
+ return Object.fromEntries(requiredInputs.map((_) => [_, validatorObj?.[_]]));
1401
+ };
1402
+
1403
+ const ACQUIRING_TYPES = [
1404
+ {
1405
+ text: 'Торговый эквайринг',
1406
+ key: 'trade',
1407
+ },
1408
+ {
1409
+ text: 'СБП-эквайринг',
1410
+ key: 'sbp',
1411
+ },
1412
+ {
1413
+ text: 'Интернет-эквайринг',
1414
+ key: 'internet',
1415
+ },
1416
+ {
1417
+ text: 'Все виды эквайринга',
1418
+ key: 'all',
1419
+ },
1420
+ ];
1421
+ const AcquiringField = JSX(({ field, input }) => (jsx(SelectControl, { 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", options: ACQUIRING_TYPES, ...getValidation(field('acquiringType'), validatorObj.acquiringType, input?.required) })));
1422
+ const isAcquiringTrade = (key = '') => Boolean(key === 'trade' || key === 'all');
1346
1423
 
1347
1424
  const useNormalizedInput = (props, { normalize, format }) => {
1348
1425
  const { value, onFocus, onBlur, onChange } = props;
@@ -1402,278 +1479,163 @@
1402
1479
  const closestValue = (list) => (_) => list.reduce((prev, curr) => (Math.abs(curr - _) < Math.abs(prev - _) ? curr : prev));
1403
1480
  const renderRangeCaption = (items) => (jsx("div", { className: "flex justify-between my-xs", children: items.map((item, i) => (jsx(Text, { size: "text-s", font: "font-light", color: "text-secondary-text", children: item }, String(i)))) }));
1404
1481
 
1405
- const renderCreditParameters = (field, title) => (jsxs(ApplicationFieldsetLayout, { title: title, children: [jsx("div", { className: formChildrenStyle, children: jsx(InputRange, { title: "\u0421\u0443\u043C\u043C\u0430, \u20BD", items: ITEMS_CREDIT_AMOUNT, min: MIN_CREDIT_AMOUNT, max: MAX_CREDIT_AMOUNT, ...field('amount') }) }), jsx("div", { className: formChildrenStyle, children: jsx(InputRange, { title: "\u0421\u0440\u043E\u043A, \u043C\u0435\u0441\u044F\u0446\u0435\u0432", items: ITEMS_CREDIT_TERM, min: MIN_CREDIT_TERM, max: MAX_CREDIT_TERM, ...field('term') }) })] }));
1406
-
1407
- const initialFormState$6 = {
1408
- typeForm: { key: 'cred', text: 'Кредит' },
1409
- amount: MIN_CREDIT_AMOUNT,
1410
- term: 12,
1411
- fullName: '',
1412
- inn: '',
1413
- name: '',
1414
- phone: '',
1415
- email: '',
1416
- annualRevenue: '',
1417
- };
1418
- const creditValidator$1 = objectValidator({
1419
- fullName: defaultValidator,
1420
- annualRevenue: defaultValidator,
1421
- inn: innValidator,
1422
- name: nameValidator,
1423
- phone: phoneValidator,
1424
- region: defaultValidator,
1425
- });
1426
- const ApplicationFormCredit = JSX(({ button, link, onSubmit }) => {
1427
- const handleSubmit = useCallback((formState) => {
1428
- const { amount, term, addressBranch, annualRevenue, ...usedFields } = formState;
1429
- isValidationSuccess(creditValidator$1(formState)) &&
1430
- onSubmit({
1431
- ...usedFields,
1432
- addressBranch: addressBranch?.text || '',
1433
- partnerComments: `Сумма=${amount}/Срок=${term}/Выручка=${annualRevenue}`,
1434
- });
1435
- }, [onSubmit]);
1436
- const [formState, { field, ...formProps }] = useForm(initialFormState$6, {
1437
- onSubmit: handleSubmit,
1438
- });
1439
- return (jsxs("form", { className: formStyle$1, onSubmit: formProps.onSubmit, children: [renderCreditParameters(field, 'Параметры'), renderCreditDataOrganization(field, 'Данные организации'), jsxs(ApplicationFieldsetLayout, { title: "\u041E\u0444\u0438\u0441 \u0431\u0430\u043D\u043A\u0430", children: [jsx("div", { className: formChildrenStyle, children: jsx(RegionField, { field: field }) }), jsx("div", { className: formChildrenStyle, children: jsx(AddressBranchField, { field: field, regionKey: formState.region?.key }) })] }), renderSubmitButton(button), jsx(Footnote, { link: link })] }));
1440
- });
1482
+ const MIN_CREDIT_AMOUNT = 1000;
1483
+ const MAX_CREDIT_AMOUNT = 1000000000;
1484
+ const ITEMS_CREDIT_AMOUNT = ['От 1 000 ₽', 'До 1 000 000 000 ₽'];
1485
+ const AmountField = JSX(({ field }) => (jsx(InputRange, { title: "\u0421\u0443\u043C\u043C\u0430, \u20BD", items: ITEMS_CREDIT_AMOUNT, min: MIN_CREDIT_AMOUNT, max: MAX_CREDIT_AMOUNT, ...field('amount') })));
1441
1486
 
1442
- const initialFormState$5 = {
1443
- typeForm: { key: 'dpst', text: 'Заявка на депозит' },
1444
- name: '',
1445
- phone: '',
1446
- };
1447
- const depositValidator = objectValidator({
1448
- name: nameValidator,
1449
- phone: phoneValidator,
1450
- });
1451
- const ApplicationFormDeposit = JSX(({ button, link, onSubmit }) => {
1452
- const handleSubmit = useCallback((formState) => {
1453
- isValidationSuccess(depositValidator(formState)) && onSubmit(formState);
1454
- }, [onSubmit]);
1455
- const [, { field, ...formProps }] = useForm(initialFormState$5, {
1456
- onSubmit: handleSubmit,
1457
- resetOnSubmit: false,
1458
- });
1459
- return (jsx("form", { className: formStyle$1, onSubmit: formProps.onSubmit, children: jsx(ApplicationFieldsetLayout, { 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", children: jsxs("div", { className: oneColumnFormStyle, children: [jsx(InputControl, { label: "\u0418\u043C\u044F", ...withValidator(field('name'), nameValidator) }), jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) }), renderSubmitButton(button), jsx(Footnote, { link: link })] }) }) }));
1460
- });
1487
+ const CommentField = JSX(({ field, input }) => (jsx(InputControl, { className: "col-span-2", ...getValidation(field('comment'), validatorObj.comment, input?.required), placeholder: "\u0412\u0430\u0448\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435", isTextarea: true })));
1461
1488
 
1462
- const FEEDBACK_TYPES = [
1463
- {
1464
- text: 'Задать вопрос по продуктам и услугам',
1465
- key: 'FEEDBACK',
1466
- },
1467
- {
1468
- text: 'Качество обслуживания',
1469
- key: 'FEEDBACK_QS',
1470
- },
1471
- ];
1472
- const FEEDBACK_METHOD = [
1473
- { key: 'phone', text: 'Телефонный звонок' },
1474
- { key: 'email', text: 'Электронное сообщение' },
1475
- ];
1476
- const SERVICE_DIRECTIONS = [
1477
- { key: 'Физическое лицо' },
1478
- { key: 'Юридическое лицо / ИП' },
1479
- ];
1489
+ 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-s", onClick: () => onChange && onChange(!value), children: [jsx("div", { className: style('relative flex-shrink-0 duration-300 w-9 h-5 mr-s rounded-2xl', value ? 'bg-primary-main' : 'bg-main-divider'), children: jsx("div", { className: style('absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full', value ? 'left-1/2' : 'left-[5%]') }) }), text ? (jsx(Text, { size: "text-l", font: "font-light", color: "text-primary-text", children: text })) : null] })));
1480
1490
 
1481
- const SVG = JSX(({ className, viewBox, fill = 'none', width, height, paths, ...commonOptions }) => {
1482
- return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: className, viewBox: viewBox, fill: fill, width: width, height: height, children: paths.map(({ d, fill: pathFill, ...options }, i) => {
1483
- const resultOptions = { ...commonOptions, ...options };
1484
- return (jsx("path", { d: d, fill: pathFill || 'currentColor', stroke: resultOptions.stroke, strokeLinecap: resultOptions.strokeLinecap, strokeLinejoin: resultOptions.strokeLinejoin, strokeWidth: resultOptions.strokeWidth, strokeMiterlimit: resultOptions.strokeMiterlimit }, i));
1485
- }) }));
1486
- });
1491
+ const OnlineCheckoutField = JSX(({ field }) => isAcquiringTrade(field('acquiringType')?.value?.key) ? (jsx(SlideCheckbox, { type: "radio", text: "\u0425\u043E\u0447\u0443 \u043E\u043D\u043B\u0430\u0439\u043D-\u043A\u0430\u0441\u0441\u0443", ...field('onlineCheckout') })) : null);
1487
1492
 
1488
- const CHECK_PATHS = [
1489
- {
1490
- d: 'M10.207.793a1 1 0 0 1 0 1.414l-6 6a1 1 0 0 1-1.414 0l-2.5-2.5a1 1 0 0 1 1.414-1.414L3.5 6.086 8.793.793a1 1 0 0 1 1.414 0Z',
1491
- fillRule: 'evenodd',
1492
- clipRule: 'evenodd',
1493
- fill: 'white',
1494
- },
1495
- ];
1496
- const Checkbox = JSX(({ className, value, text, disabled, isRadio, onChange }) => {
1497
- const handleChange = useCallback((e) => {
1498
- if (disabled) {
1499
- return;
1500
- }
1501
- e.preventDefault();
1502
- onChange && onChange(!value);
1503
- }, [onChange, disabled, value]);
1504
- const icon = isRadio ? (jsx("div", { className: "absolute left-1 w-3 h-3 rounded-full bg-primary-main" })) : (jsx(SVG, { paths: CHECK_PATHS, className: "absolute left-1 ml-px block", width: "11", height: "9", fill: "white", viewBox: "0 0 11 9" }));
1505
- return (jsx("div", { className: className, children: jsxs("label", { className: "flex items-center relative cursor-pointer group/box", onClick: handleChange, children: [jsx("div", { className: style('appearance-none w-5 h-5 border-solid cursor-pointer m-0', isRadio ? 'rounded-full border-2' : checkboxStyle(value), value ? 'border-primary-main' : 'border-gray', disabled ? 'bg-main-disabled' : 'group-hover/box:border-primary-hover'), role: role(isRadio), "aria-checked": Boolean(value), "aria-disabled": Boolean(disabled) }), value ? icon : null, text ? (jsx("div", { className: "ml-s", children: jsx(Text, { size: "text-l", font: "font-light", children: text }) })) : null] }) }));
1506
- });
1507
- const role = (isRadio) => (isRadio ? 'radio' : 'checkbox');
1508
- const checkboxStyle = (value) => style('rounded border', value ? 'bg-primary-main' : '');
1493
+ const PosTerminalField = JSX(({ field }) => isAcquiringTrade(field('acquiringType')?.value?.key) ? (jsx(SlideCheckbox, { type: "radio", text: "\u0425\u043E\u0447\u0443 \u043A\u0443\u043F\u0438\u0442\u044C POS-\u0442\u0435\u0440\u043C\u0438\u043D\u0430\u043B", ...field('posTerminal') })) : null);
1509
1494
 
1510
- const agreementText = 'Нажимая кнопку, вы подтверждаете согласие с ';
1511
- const renderAgreementSubmit = (consentDataProcessing, link, button) => (jsxs("div", { className: "flex col-span-2 gap-m flex-col lg:flex-row w-full justify-between items-baseline", children: [consentDataProcessing ? (jsxs("div", { children: [jsxs("div", { className: "flex gap-3", children: [jsx(Checkbox, { ...consentDataProcessing }), jsx(Footnote, { link: link })] }), renderErrorText(withValidator(consentDataProcessing, checkboxValidator).error)] })) : (jsx(Footnote, { text: agreementText, link: link })), renderSubmitButton(button)] }));
1495
+ const REGIONS_URL = '/api/v1/regions';
1496
+ function useRegions() {
1497
+ const { data } = useAsyncData(REGIONS_URL, fetchJSONUnsafe);
1498
+ return data || [];
1499
+ }
1512
1500
 
1513
- const formatDate = (date, toTimeStamp = false) => {
1514
- if (typeof date === 'string') {
1515
- return date.split('-').reverse().join('.');
1516
- }
1517
- else {
1518
- const day = String(date.getDate()).padStart(2, '0');
1519
- const month = String(date.getMonth() + 1).padStart(2, '0');
1520
- const year = toTimeStamp ? String(date.getFullYear()) : String(date.getFullYear()).slice(-2);
1521
- return toTimeStamp ? `${year}-${month}-${day}` : `${day}.${month}.${year}`;
1522
- }
1523
- };
1501
+ const RegionField = JSX(({ field, input }) => {
1502
+ const regions = useRegions();
1503
+ return (jsx(SelectControl, { label: "\u0424\u0438\u043B\u0438\u0430\u043B", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0438\u043B\u0438\u0430\u043B", isSearch: true, options: useMemo(() => regions.map(({ code = '', name = '' }) => ({ key: code, text: name })), [regions]), ...getValidation(field('region'), validatorObj.region, input?.required) }));
1504
+ });
1524
1505
 
1525
- const noop = () => {
1526
- // Do nothing
1527
- };
1506
+ const RegionPremiumField = JSX(({ field, input }) => {
1507
+ const branchByRegions = usePremiumBranchesByRegions();
1508
+ const regions = useMemo(() => branchByRegions.map(({ region }) => ({
1509
+ key: region,
1510
+ text: region,
1511
+ })), []);
1512
+ return (jsx(SelectControl, { label: "\u0420\u0435\u0433\u0438\u043E\u043D", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0433\u0438\u043E\u043D", options: regions, ...getValidation(field('region'), validatorObj.region, input?.required) }));
1513
+ });
1528
1514
 
1529
- const DAY_COUNT = 6;
1530
- const WEEK_COUNT = 7;
1531
- const renderCalendarCells = ({ today, firstDayOfWeek, totalDays, currentMonth, currentYear, min, max, onDateClick, }) => {
1532
- const calendarCells = [];
1533
- let dayCounter = 1;
1534
- for (let i = 0; i < DAY_COUNT; i++) {
1535
- const rowCells = [];
1536
- for (let j = 0; j < WEEK_COUNT; j++) {
1537
- if (i === 0 && j < firstDayOfWeek) {
1538
- rowCells.push(jsx("td", {}, `empty-${j}`));
1539
- }
1540
- else if (dayCounter > totalDays) {
1541
- rowCells.push(jsx("td", {}, `empty-${j}`));
1542
- }
1543
- else {
1544
- const currentDate = new Date(currentYear, currentMonth, dayCounter);
1545
- const isToday = checkIsToday(currentDate, today);
1546
- const isDisabled = checkIsDisabled(currentDate, min, max);
1547
- rowCells.push(jsx("td", { children: jsx("div", { className: getDayStyles(isToday, isDisabled), onClick: () => !isDisabled && onDateClick(currentDate), children: dayCounter }) }, `day-${dayCounter}`));
1548
- dayCounter++;
1549
- }
1550
- }
1551
- calendarCells.push(jsx("tr", { children: rowCells }, `row-${i}`));
1552
- }
1553
- return calendarCells;
1515
+ const MIN_CREDIT_TERM = 1;
1516
+ const MAX_CREDIT_TERM = 180;
1517
+ const ITEMS_CREDIT_TERM = ['От 1 мес', 'До 15 лет'];
1518
+ const TermField = JSX(({ field }) => (jsx(InputRange, { title: "\u0421\u0440\u043E\u043A, \u043C\u0435\u0441\u044F\u0446\u0435\u0432", items: ITEMS_CREDIT_TERM, min: MIN_CREDIT_TERM, max: MAX_CREDIT_TERM, ...field('term') })));
1519
+
1520
+ const SERVICE_TYPES = [
1521
+ { key: 'ULTRASERVICE', text: 'Ультра' },
1522
+ { key: 'PREMIUMSERVICE', text: 'Премиум' },
1523
+ ];
1524
+ const UltraPremiumField = JSX(({ field }) => (jsx(SelectControl, { label: "\u0422\u0438\u043F \u043E\u0431\u0441\u043B\u0443\u0436\u0438\u0432\u0430\u043D\u0438\u044F", options: SERVICE_TYPES, ...withValidator(field('serviceType'), defaultValidator) })));
1525
+
1526
+ const getField =
1527
+ // eslint-disable-next-line max-lines-per-function
1528
+ (field, typeForm) => (input, index) => {
1529
+ const { required, ...rest } = input;
1530
+ const isPremium = typeForm === 'ULTRASERVICE' || typeForm === 'PREMIUMSERVICE';
1531
+ const InputsMap = {
1532
+ surname: (jsx(InputControl, { label: "\u0424\u0430\u043C\u0438\u043B\u0438\u044F", ...getValidation(field('surname'), validatorObj.surname, required) })),
1533
+ name: (jsx(InputControl, { label: "\u0418\u043C\u044F", ...getValidation(field('name'), validatorObj.name, required), ...rest })),
1534
+ middleName: (jsx(InputControl, { label: "\u041E\u0442\u0447\u0435\u0441\u0442\u0432\u043E (\u041E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E, \u043F\u0440\u0438 \u043D\u0430\u043B\u0438\u0447\u0438\u0438)", ...field('middleName') })),
1535
+ phone: (jsx(InputPhoneControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...getValidation(field('phone'), validatorObj.phone, required) })),
1536
+ email: (jsx(InputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...getValidation(field('email'), validatorObj.email, required) })),
1537
+ fullName: (jsx(InputControl, { label: "\u0424\u0418\u041E", ...getValidation(field('fullName'), validatorObj.fullName, required), ...rest })),
1538
+ inn: (jsx(InputControl, { label: "\u0418\u041D\u041D", ...getValidation(field('inn'), validatorObj.inn, required) })),
1539
+ comment: jsx(CommentField, { field: field, input: input }),
1540
+ region: isPremium ? (jsx(RegionPremiumField, { field: field })) : (jsx(RegionField, { field: field, input: input })),
1541
+ addressBranch: jsx(AddressBranchField, { field: field, input: input, isPremium: isPremium }),
1542
+ birthday: (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0440\u043E\u0436\u0434\u0435\u043D\u0438\u044F", ...getValidation(field('birthday'), validatorObj.birthday, required) })),
1543
+ isClient: (jsx(CheckboxWithError, { ...field('isClient'), text: '\u042F\u0432\u043B\u044F\u044E\u0441\u044C \u043A\u043B\u0438\u0435\u043D\u0442\u043E\u043C \u0431\u0430\u043D\u043A\u0430 \u0410\u041E "\u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A"' })),
1544
+ partnerComments: (jsx(InputControl, { label: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043E\u0431\u044A\u0435\u043A\u0442\u043E\u0432 \u0438\u043D\u043A\u0430\u0441\u0441\u0430\u0446\u0438\u0438", ...getValidation(field('partnerComments'), validatorObj.partnerComments, required) })),
1545
+ acquiringType: jsx(AcquiringField, { field: field, input: input }),
1546
+ onlineCheckout: jsx(OnlineCheckoutField, { field: field }),
1547
+ posTerminal: jsx(PosTerminalField, { field: field }),
1548
+ serviceType: jsx(UltraPremiumField, { field: field }),
1549
+ term: jsx(TermField, { field: field }),
1550
+ amount: jsx(AmountField, { field: field }),
1551
+ annualRevenue: (jsx(InputControl, { label: "\u0413\u043E\u0434\u043E\u0432\u0430\u044F \u0432\u044B\u0440\u0443\u0447\u043A\u0430, \u20BD", ...getValidation(field('annualRevenue'), validatorObj.annualRevenue, required) })),
1552
+ };
1553
+ return jsx("div", { children: InputsMap[input.name] }, String(index));
1554
1554
  };
1555
- const checkIsToday = (currentDate, today) => today && currentDate.toDateString() === today.toDateString();
1556
- const checkIsDisabled = (currentDate, min, max) => (min && currentDate.getTime() < min.getTime()) || (max && currentDate.getTime() > max.getTime());
1557
- const getDayStyles = (isToday, isDisabled) => style('p-s text-center rounded-md border', isToday ? '' : 'border-transparent hover:bg-gray', isDisabled ? 'text-gray hover:bg-transparent' : 'cursor-pointer');
1555
+ const getValidation = (field, validator, required = false) => required ? withValidator(field, validator) : field;
1558
1556
 
1559
- const WEEK_DAYS = ['Пн', 'Вт', 'Ср', 'Чт', 'Пт', 'Сб', 'Вс'];
1560
- const Calendar = JSX(({ today, currentMonth, currentYear, min, max, onDateSelect = noop }) => {
1561
- const handleDateClick = useCallback((date) => onDateSelect(date), []);
1562
- const { firstDayOfWeek, totalDays } = useMemo(() => ({
1563
- firstDayOfWeek: new Date(currentYear, currentMonth, 1).getDay() - 1,
1564
- totalDays: new Date(currentYear, currentMonth + 1, 0).getDate(),
1565
- }), [currentYear, currentMonth]);
1566
- return (jsxs("table", { className: "mx-auto", children: [jsx("thead", { className: "text-gray font-light", children: jsx("tr", { children: WEEK_DAYS.map((day, index) => (jsx("th", { className: "p-s", children: day }, String(index)))) }) }), jsx("tbody", { children: renderCalendarCells({
1567
- firstDayOfWeek,
1568
- today,
1569
- totalDays,
1570
- currentYear,
1571
- currentMonth,
1572
- min,
1573
- max,
1574
- onDateClick: handleDateClick,
1575
- }) })] }));
1557
+ const AddressBranchField = JSX(({ field, input, isPremium = false }) => {
1558
+ const regionKey = field('region')?.value?.text;
1559
+ const addressBranch = isPremium
1560
+ ? usePremiumBranchesByRegions().find((_) => _?.region === regionKey)?.branches
1561
+ : useBranches(regionKey).filter((branch) => branch?.address);
1562
+ const { value, onChange } = field?.('addressBranch') || {};
1563
+ useEffect(() => {
1564
+ if (value?.key !== '') {
1565
+ onChange?.('');
1566
+ }
1567
+ }, [value]);
1568
+ return (jsx(SelectControl, { label: "\u0410\u0434\u0440\u0435\u0441", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0430\u0434\u0440\u0435\u0441", options: (addressBranch || []).map(({ address = '' }) => ({
1569
+ key: address,
1570
+ text: address,
1571
+ })), ...getValidation(field('addressBranch'), validatorObj.addressBranch, input?.required) }));
1576
1572
  });
1577
1573
 
1578
- const months = [
1579
- 'Январь',
1580
- 'Февраль',
1581
- 'Март',
1582
- 'Апрель',
1583
- 'Май',
1584
- 'Июнь',
1585
- 'Июль',
1586
- 'Август',
1587
- 'Сентябрь',
1588
- 'Октябрь',
1589
- 'Ноябрь',
1590
- 'Декабрь',
1574
+ const ApplicationFieldsetLayout = JSX(({ title, children }) => (jsxs("fieldset", { className: "grid @xl:flex @xl:justify-between gap-m border-b border-b-main-divider @xl:border-none", children: [title ? (jsx("legend", { className: "w-full", children: jsx(Heading, { title: title, headingType: "h6", className: "@xl:text-center" }) })) : null, children] })));
1575
+
1576
+ const FEEDBACK_TYPES = [
1577
+ {
1578
+ text: 'Задать вопрос по продуктам и услугам',
1579
+ key: 'FEEDBACK',
1580
+ },
1581
+ {
1582
+ text: 'Качество обслуживания',
1583
+ key: 'FEEDBACK_QS',
1584
+ },
1585
+ ];
1586
+ const FEEDBACK_METHOD = [
1587
+ { key: 'phone', text: 'Телефонный звонок' },
1588
+ { key: 'email', text: 'Электронное сообщение' },
1589
+ ];
1590
+ const SERVICE_DIRECTIONS = [
1591
+ { key: 'Физическое лицо' },
1592
+ { key: 'Юридическое лицо / ИП' },
1591
1593
  ];
1592
1594
 
1593
- const START_YEAR = 1940;
1594
- const getYears = () => Array.from({ length: new Date().getFullYear() - START_YEAR + 1 }, (_, i) => START_YEAR + i);
1595
+ const formStyle = 'container space-y-m';
1596
+ const oneColumnFormStyle = 'w-full max-w-xl space-y-s m-auto';
1595
1597
 
1596
- const MONTHS_COUNT = 11;
1597
- const MONTHS_OPTIONS = months.map((key) => ({ key }));
1598
- const YEARS_OPTIONS = getYears()
1599
- .reverse()
1600
- .map((key) => ({ key: String(key) }));
1601
- const useDatePickerManager = ({ onShowCalendar, showCalendar, selectedMonth, onMonthSelect, onYearSelect, selectedYear, }) => {
1602
- const close = useCallback(() => showCalendar && onShowCalendar(false), [showCalendar]);
1603
- const ref = useOutsideClick(close);
1604
- const handleChangeVisibleCalendar = useCallback(() => onShowCalendar(!showCalendar), [showCalendar]);
1605
- const handleNextMonth = useCallback(() => {
1606
- if (selectedMonth + 1 <= MONTHS_COUNT) {
1607
- onMonthSelect(selectedMonth + 1);
1608
- }
1609
- else {
1610
- onMonthSelect(0);
1611
- onYearSelect(selectedYear + 1);
1612
- }
1613
- }, [selectedMonth]);
1614
- const handlePrevMonth = useCallback(() => {
1615
- if (selectedMonth - 1 >= 0) {
1616
- onMonthSelect(selectedMonth - 1);
1617
- }
1618
- else {
1619
- onMonthSelect(11);
1620
- onYearSelect(selectedYear - 1);
1621
- }
1622
- }, [selectedMonth]);
1623
- const handleSelectMonth = useCallback(({ key }) => onMonthSelect(months.indexOf(key)), []);
1624
- const handleSelectYear = useCallback(({ key }) => onYearSelect(Number(key)), []);
1625
- return {
1626
- handleChangeVisibleCalendar,
1627
- handleNextMonth,
1628
- handlePrevMonth,
1629
- handleSelectMonth,
1630
- handleSelectYear,
1631
- monthsOptions: MONTHS_OPTIONS,
1632
- yearsOptions: YEARS_OPTIONS,
1633
- ref,
1598
+ const Footnote = JSX(({ text, link }) => (jsxs(Paragraph, { size: "text-s", font: "font-light", color: "text-secondary-text", children: [jsx(Text, { children: text }), link ? (jsx(LinkButton, { 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] })));
1599
+
1600
+ function useButton() {
1601
+ return (props) => ({
1602
+ ...props,
1603
+ onClick: handlerDecorator(handleClick(props), props),
1604
+ });
1605
+ }
1606
+ function handleClick({ disabled, onClick }) {
1607
+ return (ev) => {
1608
+ !disabled && onClick && onClick(ev);
1634
1609
  };
1635
- };
1610
+ }
1636
1611
 
1637
- const ICON_PROPS = {
1638
- name: 'ArrowUpIcon',
1639
- iconVersion: 'black',
1640
- width: '24',
1641
- height: '24',
1612
+ const activeButtonStyleMap = 'text-white bg-primary-active';
1613
+ const disabledButtonStyle = 'bg-main-gray text-main-disabled cursor-not-allowed';
1614
+ const buttonStyleMap = {
1615
+ primary: 'text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active',
1616
+ secondary: 'text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active',
1642
1617
  };
1643
- const SELECT_PROPS = {
1644
- className: 'min-w-32',
1645
- iconVersion: 'black',
1646
- isBorder: false,
1618
+ const secondaryButtonStyleMap = {
1619
+ primary: style('group-data-secondary:text-primary-main group-data-secondary:bg-white', 'group-data-secondary:hover:text-white group-data-secondary:hover:bg-primary-hover', 'group-data-secondary:active:bg-primary-active'),
1620
+ secondary: style('group-data-secondary:text-white group-data-secondary:bg-white/20', 'group-data-secondary:hover:bg-primary-hover', 'group-data-secondary:active:bg-primary-active'),
1647
1621
  };
1648
- const formStyle = 'flex justify-between items-center h-14 px-m py-s border rounded-md cursor-pointer ' +
1649
- 'hover:border-black active:border-black focus:border-black';
1650
- const DatePicker = JSX(({ className = '', label = '', value, valid = true, minDate, maxDate, onChange }) => {
1651
- const [showCalendar, { setValue }] = useBool(false);
1652
- const [selectedMonth, setSelectedMonth] = useState(value?.getMonth() || new Date().getMonth());
1653
- const [selectedYear, setSelectedYear] = useState(value?.getFullYear() || new Date().getFullYear());
1654
- const { handlePrevMonth, handleNextMonth, handleSelectMonth, handleSelectYear, monthsOptions, yearsOptions, handleChangeVisibleCalendar, ref, } = useDatePickerManager({
1655
- onYearSelect: setSelectedYear,
1656
- onMonthSelect: setSelectedMonth,
1657
- onShowCalendar: setValue,
1658
- selectedYear,
1659
- selectedMonth,
1660
- showCalendar,
1661
- });
1662
- return (jsxs("div", { className: style('space-y-xs', className), ref: ref, children: [renderLabel(label), jsxs("div", { className: "relative", children: [renderDatePickerForm(handleChangeVisibleCalendar, value, valid), showCalendar ? (jsxs("div", { className: "absolute bg-white z-20 select-none", children: [jsxs("div", { className: "flex gap-s", children: [jsx("div", { className: "my-auto", onClick: handlePrevMonth, children: jsx(Icon, { ...ICON_PROPS, className: "-rotate-90 cursor-pointer" }) }), jsx(Select, { onChange: handleSelectMonth, value: { key: months[selectedMonth] }, options: monthsOptions, ...SELECT_PROPS }), jsx(Select, { onChange: handleSelectYear, value: { key: String(selectedYear) }, options: yearsOptions, ...SELECT_PROPS }), jsx("div", { className: "my-auto", onClick: handleNextMonth, children: jsx(Icon, { ...ICON_PROPS, className: "rotate-90 cursor-pointer" }) })] }), jsx(Calendar, { today: value, currentMonth: selectedMonth, currentYear: selectedYear, onDateSelect: onChange, min: minDate, max: maxDate })] })) : null] })] }));
1622
+ const Button = JSX(({ children, ...props }) => {
1623
+ const button = useButton();
1624
+ const { className, version = 'primary', active, disabled, type = 'button', rounded = true, role, onClick, } = button(props);
1625
+ return (jsx("button", { className: style('font-sans px-9 py-4', 'flex justify-center items-center gap-xs', active ? activeButtonStyleMap : '', disabled ? disabledButtonStyle : '', !active && !disabled
1626
+ ? style(buttonStyleMap[version], secondaryButtonStyleMap[version])
1627
+ : '', rounded ? 'rounded-md' : '', className), type: type, role: role, onClick: onClick, children: children }));
1663
1628
  });
1664
- const renderDatePickerForm = (handleChangeVisibleCalendar, value, valid) => (jsxs("div", { onClick: handleChangeVisibleCalendar, className: style(formStyle, valid ? 'border-gray' : 'border-error'), children: [jsx(Paragraph, { children: value && formatDate(value) }), jsx(Icon, { ...ICON_PROPS, name: "CalendarIcon" })] }));
1665
1629
 
1666
- const DatePickerControl = JSX(({ className, label, error, ...rest }) => (jsxs("div", { className: style('shrink-0 w-full', className), children: [jsx(DatePicker, { label: label && rest?.errors ? `${label}*` : label, valid: Boolean(!error), ...rest }), renderErrorText(error)] })));
1630
+ const renderSubmitButton = (button, className) => (jsx(Button, { className: style('w-full @xl:w-auto', className), type: "submit", children: button?.text ? button.text : 'Отправить заявку' }));
1667
1631
 
1668
- const initialUserFormState = {
1632
+ const agreementText = 'Нажимая кнопку, вы подтверждаете согласие с ';
1633
+ const renderAgreementSubmit = (consentDataProcessing, link, button) => (jsxs("div", { className: "flex col-span-2 gap-m flex-col lg:flex-row w-full justify-between items-baseline", children: [consentDataProcessing ? (jsxs("div", { children: [jsxs("div", { className: "flex gap-3", children: [jsx(Checkbox, { ...consentDataProcessing }), jsx(Footnote, { link: link })] }), renderErrorText(withValidator(consentDataProcessing, checkboxValidator).error)] })) : (jsx(Footnote, { text: agreementText, link: link })), renderSubmitButton(button)] }));
1634
+
1635
+ const initialFormState$2 = {
1669
1636
  surname: '',
1670
1637
  name: '',
1671
1638
  middleName: '',
1672
- };
1673
- const renderUserData = (field, isBirthday = true) => (jsxs("div", { className: "space-y-s", children: [jsx(InputControl, { label: "\u0424\u0430\u043C\u0438\u043B\u0438\u044F", ...withValidator(field('surname'), nameValidator) }), jsx(InputControl, { label: "\u0418\u043C\u044F", ...withValidator(field('name'), nameValidator) }), jsx(InputControl, { label: "\u041E\u0442\u0447\u0435\u0441\u0442\u0432\u043E (\u041E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E, \u043F\u0440\u0438 \u043D\u0430\u043B\u0438\u0447\u0438\u0438)", ...field('middleName') }), isBirthday ? (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0440\u043E\u0436\u0434\u0435\u043D\u0438\u044F", ...withValidator(field('birthday'), defaultValidator) })) : null] }));
1674
-
1675
- const initialFormState$4 = {
1676
- ...initialUserFormState,
1677
1639
  typeForm: { key: 'FEEDBACK', text: 'Задать вопрос по продуктам и услугам' },
1678
1640
  serviceDirection: { key: 'Физическое лицо' },
1679
1641
  birthday: undefined,
@@ -1698,12 +1660,12 @@
1698
1660
  const handleSubmit = useCallback((feedbackFormState) => {
1699
1661
  handleSubmitFeedback(feedbackFormState, onSubmit);
1700
1662
  }, [onSubmit]);
1701
- const [formState, { field, ...formProps }] = useForm(initialFormState$4, {
1663
+ const [, { field, ...formProps }] = useForm(initialFormState$2, {
1702
1664
  onSubmit: handleSubmit,
1703
1665
  });
1704
1666
  const isQualityService = field('typeForm').value?.key === 'FEEDBACK_QS';
1705
1667
  const isLegalEntity = getLegalEntity(field('typeForm').value?.key, field('serviceDirection').value?.key);
1706
- return (jsx("form", { className: formStyle$1, onSubmit: formProps.onSubmit, children: jsx(ApplicationFieldsetLayout, { children: jsxs("div", { className: oneColumnFormStyle, children: [jsx(SelectControl, { label: "\u0422\u0435\u043C\u0430", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0442\u0435\u043C\u0443", options: FEEDBACK_TYPES, ...withValidator(field('typeForm'), defaultValidator) }), isQualityService ? (jsx(SelectControl, { label: "\u041D\u0430\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u043E\u0431\u0441\u043B\u0443\u0436\u0438\u0432\u0430\u043D\u0438\u044F", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435", options: SERVICE_DIRECTIONS, ...withValidator(field('serviceDirection'), defaultValidator) })) : null, jsx(RegionField, { field: field }), isQualityService ? (jsx(AddressBranchField, { field: field, regionKey: formState?.region?.key })) : null, renderUserData(field, true), isLegalEntity ? (jsxs("div", { children: [jsx(InputControl, { label: "\u0418\u041D\u041D", ...withValidator(field('inn'), innValidator) }), jsx(InputControl, { label: "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", ...field('fullName') })] })) : null, jsx(SelectControl, { label: "\u0421\u043F\u043E\u0441\u043E\u0431 \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u0438\u044F \u043E\u0442\u0432\u0435\u0442\u0430", options: FEEDBACK_METHOD, ...withValidator(field('feedbackMethod'), defaultValidator) }), jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) }), isQualityService ? (jsxs("div", { children: [jsx(PhoneInputControl, { label: "\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0439 \u0442\u0435\u043B\u0435\u0444\u043E\u043D", ...(!field('secondaryPhone').value || field('secondaryPhone').value === '+7 ('
1668
+ return (jsx("form", { className: formStyle, onSubmit: formProps.onSubmit, children: jsx(ApplicationFieldsetLayout, { children: jsxs("div", { className: oneColumnFormStyle, children: [jsx(SelectControl, { label: "\u0422\u0435\u043C\u0430", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0442\u0435\u043C\u0443", options: FEEDBACK_TYPES, ...withValidator(field('typeForm'), defaultValidator) }), isQualityService ? (jsx(SelectControl, { label: "\u041D\u0430\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u043E\u0431\u0441\u043B\u0443\u0436\u0438\u0432\u0430\u043D\u0438\u044F", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435", options: SERVICE_DIRECTIONS, ...withValidator(field('serviceDirection'), defaultValidator) })) : null, jsx(RegionField, { field: field }), isQualityService ? jsx(AddressBranchField, { field: field }) : null, jsxs("div", { className: "space-y-s", children: [jsx(InputControl, { label: "\u0424\u0430\u043C\u0438\u043B\u0438\u044F", ...withValidator(field('surname'), nameValidator) }), jsx(InputControl, { label: "\u0418\u043C\u044F", ...withValidator(field('name'), nameValidator) }), jsx(InputControl, { label: "\u041E\u0442\u0447\u0435\u0441\u0442\u0432\u043E (\u041E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E, \u043F\u0440\u0438 \u043D\u0430\u043B\u0438\u0447\u0438\u0438)", ...field('middleName') }), jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0440\u043E\u0436\u0434\u0435\u043D\u0438\u044F", ...withValidator(field('birthday'), defaultValidator) })] }), isLegalEntity ? (jsxs("div", { children: [jsx(InputControl, { label: "\u0418\u041D\u041D", ...withValidator(field('inn'), innValidator) }), jsx(InputControl, { label: "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", ...field('fullName') })] })) : null, jsx(SelectControl, { label: "\u0421\u043F\u043E\u0441\u043E\u0431 \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u0438\u044F \u043E\u0442\u0432\u0435\u0442\u0430", options: FEEDBACK_METHOD, ...withValidator(field('feedbackMethod'), defaultValidator) }), jsx(InputPhoneControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) }), isQualityService ? (jsxs("div", { children: [jsx(InputPhoneControl, { label: "\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0439 \u0442\u0435\u043B\u0435\u0444\u043E\u043D", ...(!field('secondaryPhone').value || field('secondaryPhone').value === '+7 ('
1707
1669
  ? field('secondaryPhone')
1708
1670
  : withValidator(field('secondaryPhone'), phoneValidator)) }), jsx(InputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...withValidator(field('email'), defaultValidator) }), jsx(InputControl, { label: "\u0424\u0418\u041E \u0438\u043B\u0438 \u0434\u043E\u043B\u0436\u043D\u043E\u0441\u0442\u044C \u043E\u0431\u0441\u043B\u0443\u0436\u0438\u0432\u0430\u0432\u0448\u0435\u0433\u043E \u0412\u0430\u0441 \u0441\u043E\u0442\u0440\u0443\u0434\u043D\u0438\u043A\u0430 \u0411\u0430\u043D\u043A\u0430", ...field('bankEmpolee') }), jsx(InputControl, { label: "\u0414\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F \u043E\u0431\u0440\u0430\u0449\u0435\u043D\u0438\u044F \u0432 \u0411\u0430\u043D\u043A", ...field('applicationDate') })] })) : (jsx(InputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...withValidator(field('email'), defaultValidator) })), jsx(InputControl, { ...withValidator(field('comment'), defaultValidator), placeholder: "\u0412\u0430\u0448\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435", isTextarea: true }), renderAgreementSubmit(field('consentDataProcessing'), link, button)] }) }) }));
1709
1671
  });
@@ -1740,75 +1702,6 @@
1740
1702
  return (jsxs("div", { className: "container space-y-s", children: [regions ? (jsx(SelectControl, { label: "\u0412\u0430\u0448 \u0440\u0435\u0433\u0438\u043E\u043D", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0433\u0438\u043E\u043D", isSearch: true, options: regions.map(({ name = '' }) => ({ key: name, text: name })), value: region, onChange: setRegion })) : null, regionHref ? (jsx("div", { className: "text-center", children: jsx(LinkButton, { href: regionHref, target: "_blank", className: style('p-m w-full @xl:w-auto', buttonStyle), children: button?.text ? button.text : 'Перейти' }) })) : null] }));
1741
1703
  });
1742
1704
 
1743
- const initialFormState$3 = {
1744
- ...initialUserFormState,
1745
- phone: '',
1746
- email: '',
1747
- birthday: undefined,
1748
- consentDataProcessing: false,
1749
- };
1750
- const individualsValidator = objectValidator({
1751
- surname: nameValidator,
1752
- name: nameValidator,
1753
- phone: phoneValidator,
1754
- email: defaultValidator,
1755
- birthday: defaultValidator,
1756
- consentDataProcessing: checkboxValidator,
1757
- });
1758
- const ApplicationFormIndividuals = JSX((props) => {
1759
- const { button, link, product = '', onSubmit } = props;
1760
- const handleSubmit = useCallback((formState) => {
1761
- isValidationSuccess(individualsValidator(formState)) &&
1762
- onSubmit({
1763
- ...formState,
1764
- product,
1765
- }, true);
1766
- }, [onSubmit]);
1767
- const [, { field, ...formProps }] = useForm(initialFormState$3, { onSubmit: handleSubmit });
1768
- return (jsxs("form", { className: formStyle$1, onSubmit: formProps.onSubmit, children: [jsxs(ApplicationFieldsetLayout, { children: [jsxs("div", { className: formChildrenStyle, children: [jsx(InputControl, { label: "\u0424\u0430\u043C\u0438\u043B\u0438\u044F", ...withValidator(field('surname'), nameValidator) }), jsx(InputControl, { label: "\u041E\u0442\u0447\u0435\u0441\u0442\u0432\u043E (\u041E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E, \u043F\u0440\u0438 \u043D\u0430\u043B\u0438\u0447\u0438\u0438)", ...field('middleName') }), jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) })] }), jsxs("div", { className: formChildrenStyle, children: [jsx(InputControl, { label: "\u0418\u043C\u044F", ...withValidator(field('name'), nameValidator) }), jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0440\u043E\u0436\u0434\u0435\u043D\u0438\u044F", ...withValidator(field('birthday'), defaultValidator) }), jsx(InputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...withValidator(field('email'), defaultValidator) })] })] }), renderAgreementSubmit(field('consentDataProcessing'), link, button)] }));
1769
- });
1770
-
1771
- const RegionPremiumField = JSX(({ field }) => {
1772
- const branchByRegions = usePremiumBranchesByRegions();
1773
- const regions = branchByRegions.map(({ region }) => ({
1774
- key: region,
1775
- text: region,
1776
- }));
1777
- return (jsx(SelectControl, { label: "\u0420\u0435\u0433\u0438\u043E\u043D", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0433\u0438\u043E\u043D", options: regions, ...withValidator(field('region'), defaultValidator) }));
1778
- });
1779
-
1780
- const SERVICE_TYPES = [
1781
- { key: 'ULTRASERVICE', text: 'Ультра' },
1782
- { key: 'PREMIUMSERVICE', text: 'Премиум' },
1783
- ];
1784
- const initialFormState$2 = {
1785
- typeForm: SERVICE_TYPES[0],
1786
- ...initialUserFormState,
1787
- email: '',
1788
- phone: '',
1789
- comment: '',
1790
- consentDataProcessing: false,
1791
- };
1792
- const creditValidator = objectValidator({
1793
- typeForm: defaultValidator,
1794
- surname: defaultValidator,
1795
- name: nameValidator,
1796
- phone: phoneValidator,
1797
- email: defaultValidator,
1798
- addressBranch: defaultValidator,
1799
- consentDataProcessing: checkboxValidator,
1800
- });
1801
- const ApplicationFormUltraPremium = JSX(({ button, link, onSubmit, defaultType = 'PREMIUMSERVICE' }) => {
1802
- const handleSubmit = useCallback((formState) => {
1803
- const isValid = isValidationSuccess(creditValidator(formState));
1804
- isValid && onSubmit(formState, true);
1805
- }, [onSubmit]);
1806
- const [formState, { field, ...formProps }] = useForm({ ...initialFormState$2, typeForm: getDefaultFormType(defaultType) }, { onSubmit: handleSubmit });
1807
- const regionKey = formState?.region?.key;
1808
- return (jsxs("form", { className: formStyle$1, onSubmit: formProps.onSubmit, children: [jsxs(ApplicationFieldsetLayout, { title: "\u0412\u0430\u0448\u0438 \u0434\u0430\u043D\u043D\u044B\u0435", children: [jsxs("div", { className: formChildrenStyle, children: [jsx(InputControl, { label: "\u0424\u0430\u043C\u0438\u043B\u0438\u044F", ...withValidator(field('surname'), nameValidator) }), jsx(InputControl, { label: "\u041E\u0442\u0447\u0435\u0441\u0442\u0432\u043E (\u041E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E, \u043F\u0440\u0438 \u043D\u0430\u043B\u0438\u0447\u0438\u0438)", ...field('middleName') }), jsx(InputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...withValidator(field('email'), defaultValidator) })] }), jsxs("div", { className: formChildrenStyle, children: [jsx(InputControl, { label: "\u0418\u043C\u044F", ...withValidator(field('name'), nameValidator) }), jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) }), jsx(SelectControl, { label: "\u0422\u0438\u043F \u043E\u0431\u0441\u043B\u0443\u0436\u0438\u0432\u0430\u043D\u0438\u044F", options: SERVICE_TYPES, ...withValidator(field('typeForm'), defaultValidator) })] })] }), jsxs(ApplicationFieldsetLayout, { title: "\u041E\u0444\u0438\u0441 \u0431\u0430\u043D\u043A\u0430", children: [jsx("div", { className: formChildrenStyle, children: jsx(RegionPremiumField, { field: field }) }), jsx("div", { className: formChildrenStyle, children: jsx(AddressBranchField, { field: field, regionKey: regionKey, isPremium: true }) })] }), jsx(InputControl, { ...field('comment'), placeholder: "\u041A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0439, \u0443\u0434\u043E\u0431\u043D\u043E\u0435 \u0432\u0440\u0435\u043C\u044F \u0438 \u043F\u0440\u043E\u0447\u0435\u0435", isTextarea: true }), renderAgreementSubmit(field('consentDataProcessing'), link, button)] }));
1809
- });
1810
- const getDefaultFormType = (defaultType) => SERVICE_TYPES.find((_) => _.key === defaultType);
1811
-
1812
1705
  const renderContacts = () => (jsxs("div", { className: "flex gap-xl", children: [jsxs("a", { className: "flex gap-s items-center text-primary-text no-underline", href: `tel:8 (800) 200-78-70`, "aria-label": "8 (800) 200-78-70", children: [jsx(Img, { image: { icon: 'PhoneIcon' }, width: "24", height: "24" }), jsx("span", { children: "8 (800) 200-78-70" })] }), jsxs("a", { className: "flex gap-s items-center text-primary-text no-underline", "aria-label": "ved@rshb.ru", href: `mailto:ved@rshb.ru`, children: [jsx(Img, { image: { icon: 'MailIcon' }, width: "24", height: "24" }), jsx("span", { children: "ved@rshb.ru" })] })] }));
1813
1706
 
1814
1707
  const Radio = JSX(({ name, text, value, checked, onChange, className }) => (jsx("div", { className: className, children: jsxs("label", { className: "font-sans flex gap-s items-center relative cursor-pointer", children: [jsx("input", { className: "appearance-none flex justify-center items-center shrink-0 w-5 h-5 border border-gray hover:border-primary-hover\n checked:border-2 checked:!border-primary-main focus:checked:border-primary-main focus:border-primary-text active:border-primary-text\n after:block after:w-2.5 after:h-2.5 after:rounded-full checked:after:bg-primary-main outline-none rounded-full cursor-pointer", type: "radio", value: value, name: name, checked: checked, onChange: (_) => onChange(_.target.value), role: "radio" }), text ? jsx(Text, { color: "text-primary-text", children: text }) : null] }) })));
@@ -1820,7 +1713,7 @@
1820
1713
 
1821
1714
  const renderWedDataOrganization = ({ field }) => {
1822
1715
  const isCurrencyControl = field('vedTypes').value === 'currencyControl';
1823
- return (jsxs("div", { className: "space-y-s", children: [isCurrencyControl ? jsx(RegionField, { field: field }) : null, jsxs("div", { className: "grid @xl:grid-cols-2 @xl:gap-x-m gap-s", children: [isCurrencyControl ? (jsx(InputControl, { label: "\u0418\u041D\u041D", ...withValidator(field('inn'), innValidator) })) : null, jsx(InputControl, { label: "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", ...withValidator(field('fullName'), defaultValidator) }), jsx(InputControl, { label: "\u0424\u0418\u041E", ...withValidator(field('name'), nameValidator) }), jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) }), !isCurrencyControl ? jsx(InputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...field('email') }) : null] })] }));
1716
+ return (jsxs("div", { className: "space-y-s", children: [isCurrencyControl ? jsx(RegionField, { field: field }) : null, jsxs("div", { className: "grid @xl:grid-cols-2 @xl:gap-x-m gap-s", children: [isCurrencyControl ? (jsx(InputControl, { label: "\u0418\u041D\u041D", ...withValidator(field('inn'), innValidator) })) : null, jsx(InputControl, { label: "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", ...withValidator(field('fullName'), defaultValidator) }), jsx(InputControl, { label: "\u0424\u0418\u041E", ...withValidator(field('name'), nameValidator) }), jsx(InputPhoneControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) }), !isCurrencyControl ? jsx(InputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...field('email') }) : null] })] }));
1824
1717
  };
1825
1718
 
1826
1719
  const initialFormState$1 = {
@@ -1875,13 +1768,8 @@
1875
1768
 
1876
1769
  const EmbeddableForms = {
1877
1770
  ApplicationFormWed,
1878
- ApplicationFormDeposit,
1879
- ApplicationFormCredit,
1880
- ApplicationFormAcquiring,
1881
1771
  ApplicationFormGrantSupport,
1882
- ApplicationFormIndividuals,
1883
1772
  ApplicationFormFeedback,
1884
- ApplicationFormUltraPremium,
1885
1773
  };
1886
1774
 
1887
1775
  const API$1 = LeadServiceAPI();
@@ -1910,50 +1798,62 @@
1910
1798
  return (jsx(BlockWrapper, { className: className, defaultPadding: "p-6xl", ...rest, children: jsxs("div", { className: "container max-w-[978px] space-y-lg", children: [title ? jsx(Heading, { headingType: "h3", title: title, className: "@xl:text-center" }) : null, children, responseType ? jsx(ResponseNotification, { responseType: responseType }) : null] }) }));
1911
1799
  });
1912
1800
 
1913
- const getFormatData = (data) => Object.fromEntries(Object.entries(data).map(([k, v]) => [k, (k === 'region' ? v?.text : v?.key) || v]));
1914
-
1915
- const CheckboxWithError = JSX(({ className, text, value, key, disabled, error, onChange }) => (jsxs("div", { className: style('shrink-0 w-full', className), children: [jsx(Checkbox, { text: text, value: value, disabled: disabled, onChange: onChange }, key), renderErrorText(error)] })));
1801
+ const getPartnerComments = (data) => {
1802
+ const { acquiringType, onlineCheckout = false, posTerminal = false, term, amount, annualRevenue, } = data;
1803
+ if (acquiringType) {
1804
+ return `Вид эквайринга=${acquiringType?.text || ''}${isAcquiringTrade(acquiringType?.key)
1805
+ ? `/Онлайн касса=${onlineCheckout}/POS-терминал=${posTerminal}`
1806
+ : '/Онлайн касса=false/POS-терминал=false'}`;
1807
+ }
1808
+ else {
1809
+ return `Сумма=${amount}/Срок=${term}/Выручка=${annualRevenue}`;
1810
+ }
1811
+ };
1916
1812
 
1917
- const getField = (field) => (input, index) => {
1918
- const { required, ...rest } = input;
1919
- const InputsMap = {
1920
- surname: (jsx(InputControl, { label: "\u0424\u0430\u043C\u0438\u043B\u0438\u044F", ...getValidation(field('surname'), validatorObj.surname, required) })),
1921
- name: (jsx(InputControl, { label: "\u0418\u043C\u044F", ...getValidation(field('name'), validatorObj.name, required), ...rest })),
1922
- middleName: (jsx(InputControl, { label: "\u041E\u0442\u0447\u0435\u0441\u0442\u0432\u043E (\u041E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E, \u043F\u0440\u0438 \u043D\u0430\u043B\u0438\u0447\u0438\u0438)", ...field('middleName') })),
1923
- phone: (jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...getValidation(field('phone'), validatorObj.phone, required) })),
1924
- email: (jsx(InputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...getValidation(field('email'), validatorObj.email, required) })),
1925
- fullName: (jsx(InputControl, { label: "\u0424\u0418\u041E", ...getValidation(field('fullName'), validatorObj.fullName, required), ...rest })),
1926
- inn: jsx(InputControl, { label: "\u0418\u041D\u041D", ...getValidation(field('inn'), validatorObj.inn, required) }),
1927
- comment: (jsx(InputControl, { className: "col-span-2", ...getValidation(field('comment'), validatorObj.comment, required), placeholder: "\u0412\u0430\u0448\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435", isTextarea: true })),
1928
- region: jsx(RegionField, { field: field, input: input }),
1929
- birthday: (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0440\u043E\u0436\u0434\u0435\u043D\u0438\u044F", ...getValidation(field('birthday'), validatorObj.birthday, required) })),
1930
- isClient: (jsx(CheckboxWithError, { ...field('isClient'), text: '\u042F\u0432\u043B\u044F\u044E\u0441\u044C \u043A\u043B\u0438\u0435\u043D\u0442\u043E\u043C \u0431\u0430\u043D\u043A\u0430 \u0410\u041E "\u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A"' })),
1931
- partnerComments: (jsx(InputControl, { label: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043E\u0431\u044A\u0435\u043A\u0442\u043E\u0432 \u0438\u043D\u043A\u0430\u0441\u0441\u0430\u0446\u0438\u0438", ...getValidation(field('partnerComments'), validatorObj.partnerComments, required) })),
1932
- };
1933
- return jsx("div", { children: InputsMap[input.name] }, String(index));
1813
+ /* eslint-disable @typescript-eslint/no-unused-vars */
1814
+ const getFormatData = (data) => {
1815
+ const { acquiringType, onlineCheckout, posTerminal, amount, term, annualRevenue, serviceType, ...usedData } = data;
1816
+ const partnerComments = acquiringType || annualRevenue ? getPartnerComments(data) : null;
1817
+ const formatData = { ...usedData, ...(partnerComments ? { partnerComments } : {}) };
1818
+ return Object.fromEntries(Object.entries(formatData).map(([k, v]) => [
1819
+ k,
1820
+ (k === 'region' ? v?.text : v?.key) || v,
1821
+ ]));
1934
1822
  };
1935
- const getValidation = (field, validator, required = false) => required ? withValidator(field, validator) : field;
1936
1823
 
1937
1824
  const initialFormState = {
1938
- typeForm: { key: '', text: '' },
1825
+ typeForm: '',
1939
1826
  region: { key: '', text: '' },
1827
+ addressBranch: { key: '', text: '' },
1940
1828
  surname: '',
1941
1829
  name: '',
1942
1830
  middleName: '',
1943
1831
  phone: '',
1944
1832
  email: '',
1945
- birthday: undefined,
1946
1833
  comment: '',
1947
- consentDataProcessing: false,
1948
1834
  product: '',
1835
+ partnerComments: '',
1836
+ annualRevenue: '',
1837
+ term: 12,
1838
+ amount: 1000,
1839
+ acquiringType: ACQUIRING_TYPES[0],
1840
+ serviceType: SERVICE_TYPES[0],
1841
+ birthday: undefined,
1842
+ isClient: false,
1843
+ onlineCheckout: false,
1844
+ posTerminal: false,
1845
+ consentDataProcessing: false,
1949
1846
  };
1950
1847
  const getInitialFormState = (inputs, typeForm = '') => {
1951
1848
  const formState = Object.fromEntries(getNamesFromInput(inputs).map((_) => [_, initialFormState[_]]));
1849
+ if (formState?.serviceType && typeForm === 'PREMIUMSERVICE') {
1850
+ formState.serviceType = SERVICE_TYPES[1];
1851
+ }
1952
1852
  return { ...formState, typeForm: { key: typeForm, text: '' } };
1953
1853
  };
1954
1854
 
1955
1855
  const API = LeadServiceAPI();
1956
- const ApplicationFormCustom = JSX(({ className, title, typeForm = '', sections = [], button, link, endpoint }) => {
1856
+ const ApplicationFormCustom = JSX(({ className, title, typeForm = '', sections = [], button, link, endpoint, additionalParams, }) => {
1957
1857
  const inputs = (sections?.flatMap((_) => _?.inputs) || []);
1958
1858
  const initialFormState = getInitialFormState(inputs, typeForm);
1959
1859
  const [responseType, setResponseType] = useState('');
@@ -1962,14 +1862,14 @@
1962
1862
  if (!isValidationSuccess(feedbackValidator(data))) {
1963
1863
  return 'Fail';
1964
1864
  }
1965
- const formatData = getFormatData(data);
1865
+ const formatData = getFormatData({ ...data, ...additionalParams });
1966
1866
  const status = (await API.send(formatData, endpoint === 'lead')) ? 'OK' : 'Fail';
1967
1867
  setResponseType(status);
1968
1868
  return status;
1969
1869
  }, []);
1970
1870
  const [, { field, onSubmit }] = useForm(initialFormState, { onSubmit: handleSubmit });
1971
1871
  const fieldName = getConsentDataProcessing(inputs)?.name;
1972
- return (jsx(ApplicationFormLayout, { className: style(formStyle$1, className), title: title, responseType: responseType, children: jsxs("form", { className: "", onSubmit: onSubmit, children: [sections.map((_, i) => (jsxs("div", { className: style(inputColumnStyles(_.columns), 'grid gap-x-m'), children: [_?.title ? jsx("div", { className: "@xl:text-center @xl:col-span-2", children: _.title }) : null, _?.inputs?.map(getField(field))] }, `section-${i}`))), renderAgreementSubmit(fieldName ? field('consentDataProcessing') : undefined, link, button)] }) }));
1872
+ return (jsx(ApplicationFormLayout, { className: style(formStyle, className), title: title, responseType: responseType, children: jsxs("form", { className: "", onSubmit: onSubmit, children: [sections.map((_, i) => (jsxs("div", { className: style(inputColumnStyles(_.columns), 'grid gap-x-m'), children: [_?.title ? jsx("div", { className: "@xl:text-center @xl:col-span-2", children: _.title }) : null, _?.inputs?.map(getField(field, typeForm))] }, `section-${i}`))), renderAgreementSubmit(fieldName ? field('consentDataProcessing') : undefined, link, button)] }) }));
1973
1873
  });
1974
1874
  const inputColumnStyles = (column) => column === 2 ? '@xl:grid-cols-2' : '';
1975
1875
  const getConsentDataProcessing = (inputs) => inputs.find((_) => _?.name === 'consentDataProcessing');
@@ -5680,7 +5580,7 @@
5680
5580
 
5681
5581
  const joinList = (sep) => (list) => list.reduce((acc, el, i) => (acc.length ? acc.concat({ ...sep, key: `sep-${i}` }, el) : [el]), []);
5682
5582
 
5683
- const packageVersion = "0.14.210";
5583
+ const packageVersion = "0.14.212";
5684
5584
 
5685
5585
  exports.Blocks = Blocks;
5686
5586
  exports.ContentPage = ContentPage;