@redneckz/wildless-cms-uni-blocks 0.14.170 → 0.14.171

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 (654) hide show
  1. package/bin/migration-scripts/0.14.169.js +139 -0
  2. package/bundle/blocks.schema.json +1 -1
  3. package/bundle/bundle.umd.js +362 -342
  4. package/bundle/bundle.umd.min.js +1 -1
  5. package/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +1 -15
  6. package/bundle/components/ApplicationForm/ApplicationFormFeedback.d.ts +1 -0
  7. package/bundle/components/ApplicationForm/EmbeddableForms.d.ts +0 -2
  8. package/bundle/components/ApplicationForm/getFormatData.d.ts +3 -0
  9. package/bundle/components/ApplicationForm/handleSubmitFeedback.d.ts +15 -0
  10. package/bundle/components/ApplicationForm/renderUserData.d.ts +1 -3
  11. package/bundle/components/ApplicationForm/validators.d.ts +1 -0
  12. package/bundle/components/ApplicationFormAntiFraud/ApplicationFormAntiFraud.d.ts +1 -0
  13. package/bundle/components/ApplicationFormAntiFraud/ApplicationFormAntiFraudContent.d.ts +2 -0
  14. package/bundle/components/ApplicationFormCorruption/ApplicationFormCorruption.d.ts +1 -0
  15. package/bundle/components/ApplicationFormCorruption/ApplicationFormCorruptionContent.d.ts +2 -0
  16. package/bundle/components/ApplicationFormCustom/ApplicationFormCustom.d.ts +6 -0
  17. package/bundle/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +53 -0
  18. package/bundle/components/ApplicationFormCustom/columnStyle.d.ts +2 -0
  19. package/bundle/components/ApplicationFormCustom/getField.d.ts +3 -0
  20. package/bundle/components/ApplicationFormCustom/getInitialFormState.d.ts +13 -0
  21. package/bundle/components/ApplicationFormCustom/getNamesFromInput.d.ts +2 -0
  22. package/bundle/components/ApplicationFormCustom/getObjectValidator.d.ts +3 -0
  23. package/bundle/ui-kit/ApplicationFormLayout/ApplicationFormLayout.d.ts +5 -0
  24. package/bundle/ui-kit/ApplicationFormLayout/ApplicationFormLayoutContent.d.ts +9 -0
  25. package/{dist/components/ApplicationForm → bundle/ui-kit/Input}/InputControl.d.ts +1 -1
  26. package/dist/components/ApplicationForm/AddressBranchField.js +1 -1
  27. package/dist/components/ApplicationForm/AddressBranchField.js.map +1 -1
  28. package/dist/components/ApplicationForm/ApplicationForm.js +1 -1
  29. package/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
  30. package/dist/components/ApplicationForm/ApplicationFormBusinessCard.js +1 -1
  31. package/dist/components/ApplicationForm/ApplicationFormBusinessCard.js.map +1 -1
  32. package/dist/components/ApplicationForm/ApplicationFormContent.d.ts +1 -15
  33. package/dist/components/ApplicationForm/ApplicationFormDeposit.js +1 -1
  34. package/dist/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
  35. package/dist/components/ApplicationForm/ApplicationFormFeedback.d.ts +1 -0
  36. package/dist/components/ApplicationForm/ApplicationFormFeedback.js +6 -14
  37. package/dist/components/ApplicationForm/ApplicationFormFeedback.js.map +1 -1
  38. package/dist/components/ApplicationForm/ApplicationFormIndividuals.js +1 -1
  39. package/dist/components/ApplicationForm/ApplicationFormIndividuals.js.map +1 -1
  40. package/dist/components/ApplicationForm/ApplicationFormSelfCollection.js +1 -1
  41. package/dist/components/ApplicationForm/ApplicationFormSelfCollection.js.map +1 -1
  42. package/dist/components/ApplicationForm/ApplicationFormUltraPremium.js +1 -1
  43. package/dist/components/ApplicationForm/ApplicationFormUltraPremium.js.map +1 -1
  44. package/dist/components/ApplicationForm/ApplicationFormWed.js +1 -1
  45. package/dist/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
  46. package/dist/components/ApplicationForm/DatePickerControl.js +1 -1
  47. package/dist/components/ApplicationForm/DatePickerControl.js.map +1 -1
  48. package/dist/components/ApplicationForm/EmbeddableForms.d.ts +0 -2
  49. package/dist/components/ApplicationForm/EmbeddableForms.js +0 -4
  50. package/dist/components/ApplicationForm/EmbeddableForms.js.map +1 -1
  51. package/dist/components/ApplicationForm/PhoneInputControl.js +1 -1
  52. package/dist/components/ApplicationForm/PhoneInputControl.js.map +1 -1
  53. package/dist/components/ApplicationForm/RegionField.js +1 -1
  54. package/dist/components/ApplicationForm/RegionField.js.map +1 -1
  55. package/dist/components/ApplicationForm/SelectControl.js +1 -1
  56. package/dist/components/ApplicationForm/SelectControl.js.map +1 -1
  57. package/dist/components/ApplicationForm/feedbackTypes.js +1 -1
  58. package/dist/components/ApplicationForm/feedbackTypes.js.map +1 -1
  59. package/dist/components/ApplicationForm/getFormatData.d.ts +3 -0
  60. package/dist/components/ApplicationForm/getFormatData.js +5 -0
  61. package/dist/components/ApplicationForm/getFormatData.js.map +1 -0
  62. package/dist/components/ApplicationForm/handleSubmitFeedback.d.ts +15 -0
  63. package/dist/components/ApplicationForm/handleSubmitFeedback.js +38 -0
  64. package/dist/components/ApplicationForm/handleSubmitFeedback.js.map +1 -0
  65. package/dist/components/ApplicationForm/renderAcquiringDataOrganization.js +1 -1
  66. package/dist/components/ApplicationForm/renderAcquiringDataOrganization.js.map +1 -1
  67. package/dist/components/ApplicationForm/renderAgreementWithSubmit.js +2 -2
  68. package/dist/components/ApplicationForm/renderAgreementWithSubmit.js.map +1 -1
  69. package/dist/components/ApplicationForm/renderCreditDataOrganization.js +1 -1
  70. package/dist/components/ApplicationForm/renderCreditDataOrganization.js.map +1 -1
  71. package/dist/components/ApplicationForm/renderUserData.d.ts +1 -3
  72. package/dist/components/ApplicationForm/renderUserData.js +1 -1
  73. package/dist/components/ApplicationForm/renderUserData.js.map +1 -1
  74. package/dist/components/ApplicationForm/renderWedDataOrganization.js +1 -1
  75. package/dist/components/ApplicationForm/renderWedDataOrganization.js.map +1 -1
  76. package/dist/components/ApplicationForm/validators.d.ts +1 -0
  77. package/dist/components/ApplicationForm/validators.js +2 -1
  78. package/dist/components/ApplicationForm/validators.js.map +1 -1
  79. package/dist/components/ApplicationFormAntiFraud/ApplicationFormAntiFraud.d.ts +1 -0
  80. package/dist/components/ApplicationFormAntiFraud/ApplicationFormAntiFraud.js +5 -0
  81. package/dist/components/ApplicationFormAntiFraud/ApplicationFormAntiFraud.js.map +1 -0
  82. package/dist/components/ApplicationFormAntiFraud/ApplicationFormAntiFraudContent.d.ts +2 -0
  83. package/dist/components/ApplicationFormAntiFraud/ApplicationFormAntiFraudContent.js +2 -0
  84. package/dist/components/ApplicationFormAntiFraud/ApplicationFormAntiFraudContent.js.map +1 -0
  85. package/dist/components/ApplicationFormCorruption/ApplicationFormCorruption.d.ts +1 -0
  86. package/dist/components/ApplicationFormCorruption/ApplicationFormCorruption.js +5 -0
  87. package/dist/components/ApplicationFormCorruption/ApplicationFormCorruption.js.map +1 -0
  88. package/dist/components/ApplicationFormCorruption/ApplicationFormCorruptionContent.d.ts +2 -0
  89. package/dist/components/ApplicationFormCorruption/ApplicationFormCorruptionContent.js +2 -0
  90. package/dist/components/ApplicationFormCorruption/ApplicationFormCorruptionContent.js.map +1 -0
  91. package/dist/components/ApplicationFormCustom/ApplicationFormCustom.d.ts +6 -0
  92. package/dist/components/ApplicationFormCustom/ApplicationFormCustom.js +39 -0
  93. package/dist/components/ApplicationFormCustom/ApplicationFormCustom.js.map +1 -0
  94. package/dist/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +53 -0
  95. package/dist/components/ApplicationFormCustom/ApplicationFormCustomContent.js +2 -0
  96. package/dist/components/ApplicationFormCustom/ApplicationFormCustomContent.js.map +1 -0
  97. package/dist/components/ApplicationFormCustom/columnStyle.d.ts +2 -0
  98. package/dist/components/ApplicationFormCustom/columnStyle.js +7 -0
  99. package/dist/components/ApplicationFormCustom/columnStyle.js.map +1 -0
  100. package/dist/components/ApplicationFormCustom/getField.d.ts +3 -0
  101. package/dist/components/ApplicationFormCustom/getField.js +29 -0
  102. package/dist/components/ApplicationFormCustom/getField.js.map +1 -0
  103. package/dist/components/ApplicationFormCustom/getInitialFormState.d.ts +13 -0
  104. package/dist/components/ApplicationFormCustom/getInitialFormState.js +20 -0
  105. package/dist/components/ApplicationFormCustom/getInitialFormState.js.map +1 -0
  106. package/dist/components/ApplicationFormCustom/getNamesFromInput.d.ts +2 -0
  107. package/dist/components/ApplicationFormCustom/getNamesFromInput.js +5 -0
  108. package/dist/components/ApplicationFormCustom/getNamesFromInput.js.map +1 -0
  109. package/dist/components/ApplicationFormCustom/getObjectValidator.d.ts +3 -0
  110. package/dist/components/ApplicationFormCustom/getObjectValidator.js +20 -0
  111. package/dist/components/ApplicationFormCustom/getObjectValidator.js.map +1 -0
  112. package/dist/components/Blocks.js +6 -0
  113. package/dist/components/Blocks.js.map +1 -1
  114. package/dist/components/Blocks.mobile.js +4 -0
  115. package/dist/components/Blocks.mobile.js.map +1 -1
  116. package/dist/ui-kit/ApplicationFormLayout/ApplicationFormLayout.d.ts +5 -0
  117. package/dist/ui-kit/ApplicationFormLayout/ApplicationFormLayout.js +12 -0
  118. package/dist/ui-kit/ApplicationFormLayout/ApplicationFormLayout.js.map +1 -0
  119. package/dist/ui-kit/ApplicationFormLayout/ApplicationFormLayoutContent.d.ts +9 -0
  120. package/dist/ui-kit/ApplicationFormLayout/ApplicationFormLayoutContent.js +2 -0
  121. package/dist/ui-kit/ApplicationFormLayout/ApplicationFormLayoutContent.js.map +1 -0
  122. package/dist/ui-kit/ApplicationFormLayout/ResponseNotification.js +15 -0
  123. package/dist/ui-kit/ApplicationFormLayout/ResponseNotification.js.map +1 -0
  124. package/dist/ui-kit/Checkbox/Checkbox.js +1 -1
  125. package/dist/ui-kit/Checkbox/Checkbox.js.map +1 -1
  126. package/dist/ui-kit/Checkbox/CheckboxWithError.js +1 -1
  127. package/dist/ui-kit/Checkbox/CheckboxWithError.js.map +1 -1
  128. package/{lib/components/ApplicationForm → dist/ui-kit/Input}/InputControl.d.ts +1 -1
  129. package/dist/{components/ApplicationForm → ui-kit/Input}/InputControl.js +1 -1
  130. package/dist/ui-kit/Input/InputControl.js.map +1 -0
  131. package/dist/{components/ApplicationForm → ui-kit/Input}/renderErrorText.js +1 -1
  132. package/dist/ui-kit/Input/renderErrorText.js.map +1 -0
  133. package/lib/common.css +1 -1
  134. package/lib/components/ApplicationForm/AddressBranchField.js +2 -2
  135. package/lib/components/ApplicationForm/AddressBranchField.js.map +1 -1
  136. package/lib/components/ApplicationForm/ApplicationForm.fixture.d.ts +2 -4
  137. package/lib/components/ApplicationForm/ApplicationForm.fixture.mobile.d.ts +0 -2
  138. package/lib/components/ApplicationForm/ApplicationForm.js +1 -1
  139. package/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
  140. package/lib/components/ApplicationForm/ApplicationFormBusinessCard.js +1 -1
  141. package/lib/components/ApplicationForm/ApplicationFormBusinessCard.js.map +1 -1
  142. package/lib/components/ApplicationForm/ApplicationFormContent.d.ts +1 -15
  143. package/lib/components/ApplicationForm/ApplicationFormDeposit.js +1 -1
  144. package/lib/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
  145. package/lib/components/ApplicationForm/ApplicationFormFeedback.d.ts +1 -0
  146. package/lib/components/ApplicationForm/ApplicationFormFeedback.js +4 -13
  147. package/lib/components/ApplicationForm/ApplicationFormFeedback.js.map +1 -1
  148. package/lib/components/ApplicationForm/ApplicationFormIndividuals.js +1 -1
  149. package/lib/components/ApplicationForm/ApplicationFormIndividuals.js.map +1 -1
  150. package/lib/components/ApplicationForm/ApplicationFormSelfCollection.js +1 -1
  151. package/lib/components/ApplicationForm/ApplicationFormSelfCollection.js.map +1 -1
  152. package/lib/components/ApplicationForm/ApplicationFormUltraPremium.js +1 -1
  153. package/lib/components/ApplicationForm/ApplicationFormUltraPremium.js.map +1 -1
  154. package/lib/components/ApplicationForm/ApplicationFormWed.js +1 -1
  155. package/lib/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
  156. package/lib/components/ApplicationForm/DatePickerControl.js +1 -1
  157. package/lib/components/ApplicationForm/DatePickerControl.js.map +1 -1
  158. package/lib/components/ApplicationForm/EmbeddableForms.d.ts +0 -2
  159. package/lib/components/ApplicationForm/EmbeddableForms.js +0 -4
  160. package/lib/components/ApplicationForm/EmbeddableForms.js.map +1 -1
  161. package/lib/components/ApplicationForm/PhoneInputControl.js +1 -1
  162. package/lib/components/ApplicationForm/PhoneInputControl.js.map +1 -1
  163. package/lib/components/ApplicationForm/RegionField.js +2 -2
  164. package/lib/components/ApplicationForm/RegionField.js.map +1 -1
  165. package/lib/components/ApplicationForm/SelectControl.js +1 -1
  166. package/lib/components/ApplicationForm/SelectControl.js.map +1 -1
  167. package/lib/components/ApplicationForm/feedbackTypes.js +1 -1
  168. package/lib/components/ApplicationForm/feedbackTypes.js.map +1 -1
  169. package/lib/components/ApplicationForm/getFormatData.d.ts +3 -0
  170. package/lib/components/ApplicationForm/getFormatData.js +2 -0
  171. package/lib/components/ApplicationForm/getFormatData.js.map +1 -0
  172. package/lib/components/ApplicationForm/handleSubmitFeedback.d.ts +15 -0
  173. package/lib/components/ApplicationForm/{handleSubmit.js → handleSubmitFeedback.js} +16 -18
  174. package/lib/components/ApplicationForm/handleSubmitFeedback.js.map +1 -0
  175. package/lib/components/ApplicationForm/renderAcquiringDataOrganization.js +1 -1
  176. package/lib/components/ApplicationForm/renderAcquiringDataOrganization.js.map +1 -1
  177. package/lib/components/ApplicationForm/renderAgreementWithSubmit.js +2 -2
  178. package/lib/components/ApplicationForm/renderAgreementWithSubmit.js.map +1 -1
  179. package/lib/components/ApplicationForm/renderCreditDataOrganization.js +1 -1
  180. package/lib/components/ApplicationForm/renderCreditDataOrganization.js.map +1 -1
  181. package/lib/components/ApplicationForm/renderUserData.d.ts +1 -3
  182. package/lib/components/ApplicationForm/renderUserData.js +1 -1
  183. package/lib/components/ApplicationForm/renderUserData.js.map +1 -1
  184. package/lib/components/ApplicationForm/renderWedDataOrganization.js +1 -1
  185. package/lib/components/ApplicationForm/renderWedDataOrganization.js.map +1 -1
  186. package/lib/components/ApplicationForm/validators.d.ts +1 -0
  187. package/lib/components/ApplicationForm/validators.js +1 -0
  188. package/lib/components/ApplicationForm/validators.js.map +1 -1
  189. package/lib/components/ApplicationFormAntiFraud/ApplicationFormAntiFraud.d.ts +1 -0
  190. package/lib/components/ApplicationFormAntiFraud/ApplicationFormAntiFraud.fixture.d.ts +6 -0
  191. package/lib/components/ApplicationFormAntiFraud/ApplicationFormAntiFraud.js +2 -0
  192. package/lib/components/ApplicationFormAntiFraud/ApplicationFormAntiFraud.js.map +1 -0
  193. package/lib/components/ApplicationFormAntiFraud/ApplicationFormAntiFraudContent.d.ts +2 -0
  194. package/lib/components/ApplicationFormAntiFraud/ApplicationFormAntiFraudContent.js +2 -0
  195. package/lib/components/ApplicationFormAntiFraud/ApplicationFormAntiFraudContent.js.map +1 -0
  196. package/lib/components/ApplicationFormCorruption/ApplicationFormCorruption.d.ts +1 -0
  197. package/lib/components/ApplicationFormCorruption/ApplicationFormCorruption.fixture.d.ts +6 -0
  198. package/lib/components/ApplicationFormCorruption/ApplicationFormCorruption.js +2 -0
  199. package/lib/components/ApplicationFormCorruption/ApplicationFormCorruption.js.map +1 -0
  200. package/lib/components/ApplicationFormCorruption/ApplicationFormCorruptionContent.d.ts +2 -0
  201. package/lib/components/ApplicationFormCorruption/ApplicationFormCorruptionContent.js +2 -0
  202. package/lib/components/ApplicationFormCorruption/ApplicationFormCorruptionContent.js.map +1 -0
  203. package/lib/components/ApplicationFormCustom/ApplicationFormCustom.d.ts +6 -0
  204. package/lib/components/ApplicationFormCustom/ApplicationFormCustom.fixture.d.ts +6 -0
  205. package/lib/components/ApplicationFormCustom/ApplicationFormCustom.js +37 -0
  206. package/lib/components/ApplicationFormCustom/ApplicationFormCustom.js.map +1 -0
  207. package/lib/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +53 -0
  208. package/lib/components/ApplicationFormCustom/ApplicationFormCustomContent.js +2 -0
  209. package/lib/components/ApplicationFormCustom/ApplicationFormCustomContent.js.map +1 -0
  210. package/lib/components/ApplicationFormCustom/columnStyle.d.ts +2 -0
  211. package/lib/components/ApplicationFormCustom/columnStyle.js +5 -0
  212. package/lib/components/ApplicationFormCustom/columnStyle.js.map +1 -0
  213. package/lib/components/ApplicationFormCustom/getField.d.ts +3 -0
  214. package/lib/components/ApplicationFormCustom/getField.js +26 -0
  215. package/lib/components/ApplicationFormCustom/getField.js.map +1 -0
  216. package/lib/components/ApplicationFormCustom/getInitialFormState.d.ts +13 -0
  217. package/lib/components/ApplicationFormCustom/getInitialFormState.js +17 -0
  218. package/lib/components/ApplicationFormCustom/getInitialFormState.js.map +1 -0
  219. package/lib/components/ApplicationFormCustom/getNamesFromInput.d.ts +2 -0
  220. package/lib/components/ApplicationFormCustom/getNamesFromInput.js +2 -0
  221. package/lib/components/ApplicationFormCustom/getNamesFromInput.js.map +1 -0
  222. package/lib/components/ApplicationFormCustom/getObjectValidator.d.ts +3 -0
  223. package/lib/components/ApplicationFormCustom/getObjectValidator.js +17 -0
  224. package/lib/components/ApplicationFormCustom/getObjectValidator.js.map +1 -0
  225. package/lib/components/Blocks.js +6 -0
  226. package/lib/components/Blocks.js.map +1 -1
  227. package/lib/components/Blocks.mobile.js +4 -0
  228. package/lib/components/Blocks.mobile.js.map +1 -1
  229. package/lib/ui-kit/ApplicationFormLayout/ApplicationFormLayout.d.ts +5 -0
  230. package/lib/ui-kit/ApplicationFormLayout/ApplicationFormLayout.js +10 -0
  231. package/lib/ui-kit/ApplicationFormLayout/ApplicationFormLayout.js.map +1 -0
  232. package/lib/ui-kit/ApplicationFormLayout/ApplicationFormLayoutContent.d.ts +9 -0
  233. package/lib/ui-kit/ApplicationFormLayout/ApplicationFormLayoutContent.js +2 -0
  234. package/lib/ui-kit/ApplicationFormLayout/ApplicationFormLayoutContent.js.map +1 -0
  235. package/lib/ui-kit/ApplicationFormLayout/ResponseNotification.js +13 -0
  236. package/lib/ui-kit/ApplicationFormLayout/ResponseNotification.js.map +1 -0
  237. package/lib/ui-kit/Checkbox/Checkbox.js +1 -1
  238. package/lib/ui-kit/Checkbox/Checkbox.js.map +1 -1
  239. package/lib/ui-kit/Checkbox/CheckboxWithError.js +1 -1
  240. package/lib/ui-kit/Checkbox/CheckboxWithError.js.map +1 -1
  241. package/{bundle/components/ApplicationForm → lib/ui-kit/Input}/InputControl.d.ts +1 -1
  242. package/{mobile/lib/components/ApplicationForm → lib/ui-kit/Input}/InputControl.js +1 -1
  243. package/lib/ui-kit/Input/InputControl.js.map +1 -0
  244. package/lib/{components/ApplicationForm → ui-kit/Input}/renderErrorText.js +1 -1
  245. package/lib/ui-kit/Input/renderErrorText.js.map +1 -0
  246. package/mobile/bundle/bundle.umd.js +361 -342
  247. package/mobile/bundle/bundle.umd.min.js +1 -1
  248. package/mobile/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +1 -15
  249. package/mobile/bundle/components/ApplicationForm/ApplicationFormFeedback.d.ts +1 -0
  250. package/mobile/bundle/components/ApplicationForm/EmbeddableForms.d.ts +0 -2
  251. package/mobile/bundle/components/ApplicationForm/getFormatData.d.ts +3 -0
  252. package/mobile/bundle/components/ApplicationForm/handleSubmitFeedback.d.ts +15 -0
  253. package/mobile/bundle/components/ApplicationForm/renderUserData.d.ts +1 -3
  254. package/mobile/bundle/components/ApplicationForm/validators.d.ts +1 -0
  255. package/mobile/bundle/components/ApplicationFormAntiFraud/ApplicationFormAntiFraud.d.ts +1 -0
  256. package/mobile/bundle/components/ApplicationFormAntiFraud/ApplicationFormAntiFraudContent.d.ts +2 -0
  257. package/mobile/bundle/components/ApplicationFormCorruption/ApplicationFormCorruption.d.ts +1 -0
  258. package/mobile/bundle/components/ApplicationFormCorruption/ApplicationFormCorruptionContent.d.ts +2 -0
  259. package/mobile/bundle/components/ApplicationFormCustom/ApplicationFormCustom.d.ts +6 -0
  260. package/mobile/bundle/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +53 -0
  261. package/mobile/bundle/components/ApplicationFormCustom/columnStyle.d.ts +2 -0
  262. package/mobile/bundle/components/ApplicationFormCustom/getField.d.ts +3 -0
  263. package/mobile/bundle/components/ApplicationFormCustom/getInitialFormState.d.ts +13 -0
  264. package/mobile/bundle/components/ApplicationFormCustom/getNamesFromInput.d.ts +2 -0
  265. package/mobile/bundle/components/ApplicationFormCustom/getObjectValidator.d.ts +3 -0
  266. package/mobile/bundle/ui-kit/ApplicationFormLayout/ApplicationFormLayout.d.ts +5 -0
  267. package/mobile/bundle/ui-kit/ApplicationFormLayout/ApplicationFormLayoutContent.d.ts +9 -0
  268. package/mobile/bundle/{components/ApplicationForm → ui-kit/Input}/InputControl.d.ts +1 -1
  269. package/mobile/dist/components/ApplicationForm/AddressBranchField.js +1 -1
  270. package/mobile/dist/components/ApplicationForm/AddressBranchField.js.map +1 -1
  271. package/mobile/dist/components/ApplicationForm/ApplicationForm.js +1 -1
  272. package/mobile/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
  273. package/mobile/dist/components/ApplicationForm/ApplicationFormBusinessCard.js +1 -1
  274. package/mobile/dist/components/ApplicationForm/ApplicationFormBusinessCard.js.map +1 -1
  275. package/mobile/dist/components/ApplicationForm/ApplicationFormContent.d.ts +1 -15
  276. package/mobile/dist/components/ApplicationForm/ApplicationFormDeposit.js +1 -1
  277. package/mobile/dist/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
  278. package/mobile/dist/components/ApplicationForm/ApplicationFormFeedback.d.ts +1 -0
  279. package/mobile/dist/components/ApplicationForm/ApplicationFormFeedback.js +6 -14
  280. package/mobile/dist/components/ApplicationForm/ApplicationFormFeedback.js.map +1 -1
  281. package/mobile/dist/components/ApplicationForm/ApplicationFormIndividuals.js +1 -1
  282. package/mobile/dist/components/ApplicationForm/ApplicationFormIndividuals.js.map +1 -1
  283. package/mobile/dist/components/ApplicationForm/ApplicationFormSelfCollection.js +1 -1
  284. package/mobile/dist/components/ApplicationForm/ApplicationFormSelfCollection.js.map +1 -1
  285. package/mobile/dist/components/ApplicationForm/ApplicationFormUltraPremium.js +1 -1
  286. package/mobile/dist/components/ApplicationForm/ApplicationFormUltraPremium.js.map +1 -1
  287. package/mobile/dist/components/ApplicationForm/ApplicationFormWed.js +1 -1
  288. package/mobile/dist/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
  289. package/mobile/dist/components/ApplicationForm/DatePickerControl.js +1 -1
  290. package/mobile/dist/components/ApplicationForm/DatePickerControl.js.map +1 -1
  291. package/mobile/dist/components/ApplicationForm/EmbeddableForms.d.ts +0 -2
  292. package/mobile/dist/components/ApplicationForm/EmbeddableForms.js +0 -4
  293. package/mobile/dist/components/ApplicationForm/EmbeddableForms.js.map +1 -1
  294. package/mobile/dist/components/ApplicationForm/PhoneInputControl.js +1 -1
  295. package/mobile/dist/components/ApplicationForm/PhoneInputControl.js.map +1 -1
  296. package/mobile/dist/components/ApplicationForm/RegionField.js +1 -1
  297. package/mobile/dist/components/ApplicationForm/RegionField.js.map +1 -1
  298. package/mobile/dist/components/ApplicationForm/SelectControl.js +1 -1
  299. package/mobile/dist/components/ApplicationForm/SelectControl.js.map +1 -1
  300. package/mobile/dist/components/ApplicationForm/feedbackTypes.js +1 -1
  301. package/mobile/dist/components/ApplicationForm/feedbackTypes.js.map +1 -1
  302. package/mobile/dist/components/ApplicationForm/getFormatData.d.ts +3 -0
  303. package/mobile/dist/components/ApplicationForm/getFormatData.js +5 -0
  304. package/mobile/dist/components/ApplicationForm/getFormatData.js.map +1 -0
  305. package/mobile/dist/components/ApplicationForm/handleSubmitFeedback.d.ts +15 -0
  306. package/mobile/dist/components/ApplicationForm/handleSubmitFeedback.js +38 -0
  307. package/mobile/dist/components/ApplicationForm/handleSubmitFeedback.js.map +1 -0
  308. package/mobile/dist/components/ApplicationForm/renderAcquiringDataOrganization.js +1 -1
  309. package/mobile/dist/components/ApplicationForm/renderAcquiringDataOrganization.js.map +1 -1
  310. package/mobile/dist/components/ApplicationForm/renderAgreementWithSubmit.js +2 -2
  311. package/mobile/dist/components/ApplicationForm/renderAgreementWithSubmit.js.map +1 -1
  312. package/mobile/dist/components/ApplicationForm/renderCreditDataOrganization.js +1 -1
  313. package/mobile/dist/components/ApplicationForm/renderCreditDataOrganization.js.map +1 -1
  314. package/mobile/dist/components/ApplicationForm/renderUserData.d.ts +1 -3
  315. package/mobile/dist/components/ApplicationForm/renderUserData.js +1 -1
  316. package/mobile/dist/components/ApplicationForm/renderUserData.js.map +1 -1
  317. package/mobile/dist/components/ApplicationForm/renderWedDataOrganization.js +1 -1
  318. package/mobile/dist/components/ApplicationForm/renderWedDataOrganization.js.map +1 -1
  319. package/mobile/dist/components/ApplicationForm/validators.d.ts +1 -0
  320. package/mobile/dist/components/ApplicationForm/validators.js +2 -1
  321. package/mobile/dist/components/ApplicationForm/validators.js.map +1 -1
  322. package/mobile/dist/components/ApplicationFormAntiFraud/ApplicationFormAntiFraud.d.ts +1 -0
  323. package/mobile/dist/components/ApplicationFormAntiFraud/ApplicationFormAntiFraud.js +5 -0
  324. package/mobile/dist/components/ApplicationFormAntiFraud/ApplicationFormAntiFraud.js.map +1 -0
  325. package/mobile/dist/components/ApplicationFormAntiFraud/ApplicationFormAntiFraudContent.d.ts +2 -0
  326. package/mobile/dist/components/ApplicationFormAntiFraud/ApplicationFormAntiFraudContent.js +2 -0
  327. package/mobile/dist/components/ApplicationFormAntiFraud/ApplicationFormAntiFraudContent.js.map +1 -0
  328. package/mobile/dist/components/ApplicationFormCorruption/ApplicationFormCorruption.d.ts +1 -0
  329. package/mobile/dist/components/ApplicationFormCorruption/ApplicationFormCorruption.js +5 -0
  330. package/mobile/dist/components/ApplicationFormCorruption/ApplicationFormCorruption.js.map +1 -0
  331. package/mobile/dist/components/ApplicationFormCorruption/ApplicationFormCorruptionContent.d.ts +2 -0
  332. package/mobile/dist/components/ApplicationFormCorruption/ApplicationFormCorruptionContent.js +2 -0
  333. package/mobile/dist/components/ApplicationFormCorruption/ApplicationFormCorruptionContent.js.map +1 -0
  334. package/mobile/dist/components/ApplicationFormCustom/ApplicationFormCustom.d.ts +6 -0
  335. package/mobile/dist/components/ApplicationFormCustom/ApplicationFormCustom.js +39 -0
  336. package/mobile/dist/components/ApplicationFormCustom/ApplicationFormCustom.js.map +1 -0
  337. package/mobile/dist/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +53 -0
  338. package/mobile/dist/components/ApplicationFormCustom/ApplicationFormCustomContent.js +2 -0
  339. package/mobile/dist/components/ApplicationFormCustom/ApplicationFormCustomContent.js.map +1 -0
  340. package/mobile/dist/components/ApplicationFormCustom/columnStyle.d.ts +2 -0
  341. package/mobile/dist/components/ApplicationFormCustom/columnStyle.js +7 -0
  342. package/mobile/dist/components/ApplicationFormCustom/columnStyle.js.map +1 -0
  343. package/mobile/dist/components/ApplicationFormCustom/getField.d.ts +3 -0
  344. package/mobile/dist/components/ApplicationFormCustom/getField.js +29 -0
  345. package/mobile/dist/components/ApplicationFormCustom/getField.js.map +1 -0
  346. package/mobile/dist/components/ApplicationFormCustom/getInitialFormState.d.ts +13 -0
  347. package/mobile/dist/components/ApplicationFormCustom/getInitialFormState.js +20 -0
  348. package/mobile/dist/components/ApplicationFormCustom/getInitialFormState.js.map +1 -0
  349. package/mobile/dist/components/ApplicationFormCustom/getNamesFromInput.d.ts +2 -0
  350. package/mobile/dist/components/ApplicationFormCustom/getNamesFromInput.js +5 -0
  351. package/mobile/dist/components/ApplicationFormCustom/getNamesFromInput.js.map +1 -0
  352. package/mobile/dist/components/ApplicationFormCustom/getObjectValidator.d.ts +3 -0
  353. package/mobile/dist/components/ApplicationFormCustom/getObjectValidator.js +20 -0
  354. package/mobile/dist/components/ApplicationFormCustom/getObjectValidator.js.map +1 -0
  355. package/mobile/dist/components/Blocks.js +4 -0
  356. package/mobile/dist/components/Blocks.js.map +1 -1
  357. package/mobile/dist/ui-kit/ApplicationFormLayout/ApplicationFormLayout.d.ts +5 -0
  358. package/mobile/dist/ui-kit/ApplicationFormLayout/ApplicationFormLayout.js +12 -0
  359. package/mobile/dist/ui-kit/ApplicationFormLayout/ApplicationFormLayout.js.map +1 -0
  360. package/mobile/dist/ui-kit/ApplicationFormLayout/ApplicationFormLayoutContent.d.ts +9 -0
  361. package/mobile/dist/ui-kit/ApplicationFormLayout/ApplicationFormLayoutContent.js +2 -0
  362. package/mobile/dist/ui-kit/ApplicationFormLayout/ApplicationFormLayoutContent.js.map +1 -0
  363. package/mobile/dist/ui-kit/ApplicationFormLayout/ResponseNotification.js +15 -0
  364. package/mobile/dist/ui-kit/ApplicationFormLayout/ResponseNotification.js.map +1 -0
  365. package/mobile/dist/ui-kit/Checkbox/Checkbox.js +1 -1
  366. package/mobile/dist/ui-kit/Checkbox/Checkbox.js.map +1 -1
  367. package/mobile/dist/ui-kit/Checkbox/CheckboxWithError.js +1 -1
  368. package/mobile/dist/ui-kit/Checkbox/CheckboxWithError.js.map +1 -1
  369. package/mobile/dist/ui-kit/Input/InputControl.d.ts +2 -0
  370. package/mobile/dist/{components/ApplicationForm → ui-kit/Input}/InputControl.js +1 -1
  371. package/mobile/dist/ui-kit/Input/InputControl.js.map +1 -0
  372. package/mobile/dist/{components/ApplicationForm → ui-kit/Input}/renderErrorText.js +1 -1
  373. package/mobile/dist/ui-kit/Input/renderErrorText.js.map +1 -0
  374. package/mobile/lib/common.css +1 -1
  375. package/mobile/lib/components/ApplicationForm/AddressBranchField.js +2 -2
  376. package/mobile/lib/components/ApplicationForm/AddressBranchField.js.map +1 -1
  377. package/mobile/lib/components/ApplicationForm/ApplicationForm.js +1 -1
  378. package/mobile/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
  379. package/mobile/lib/components/ApplicationForm/ApplicationFormBusinessCard.js +1 -1
  380. package/mobile/lib/components/ApplicationForm/ApplicationFormBusinessCard.js.map +1 -1
  381. package/mobile/lib/components/ApplicationForm/ApplicationFormContent.d.ts +1 -15
  382. package/mobile/lib/components/ApplicationForm/ApplicationFormDeposit.js +1 -1
  383. package/mobile/lib/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
  384. package/mobile/lib/components/ApplicationForm/ApplicationFormFeedback.d.ts +1 -0
  385. package/mobile/lib/components/ApplicationForm/ApplicationFormFeedback.js +4 -13
  386. package/mobile/lib/components/ApplicationForm/ApplicationFormFeedback.js.map +1 -1
  387. package/mobile/lib/components/ApplicationForm/ApplicationFormIndividuals.js +1 -1
  388. package/mobile/lib/components/ApplicationForm/ApplicationFormIndividuals.js.map +1 -1
  389. package/mobile/lib/components/ApplicationForm/ApplicationFormSelfCollection.js +1 -1
  390. package/mobile/lib/components/ApplicationForm/ApplicationFormSelfCollection.js.map +1 -1
  391. package/mobile/lib/components/ApplicationForm/ApplicationFormUltraPremium.js +1 -1
  392. package/mobile/lib/components/ApplicationForm/ApplicationFormUltraPremium.js.map +1 -1
  393. package/mobile/lib/components/ApplicationForm/ApplicationFormWed.js +1 -1
  394. package/mobile/lib/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
  395. package/mobile/lib/components/ApplicationForm/DatePickerControl.js +1 -1
  396. package/mobile/lib/components/ApplicationForm/DatePickerControl.js.map +1 -1
  397. package/mobile/lib/components/ApplicationForm/EmbeddableForms.d.ts +0 -2
  398. package/mobile/lib/components/ApplicationForm/EmbeddableForms.js +0 -4
  399. package/mobile/lib/components/ApplicationForm/EmbeddableForms.js.map +1 -1
  400. package/mobile/lib/components/ApplicationForm/PhoneInputControl.js +1 -1
  401. package/mobile/lib/components/ApplicationForm/PhoneInputControl.js.map +1 -1
  402. package/mobile/lib/components/ApplicationForm/RegionField.js +2 -2
  403. package/mobile/lib/components/ApplicationForm/RegionField.js.map +1 -1
  404. package/mobile/lib/components/ApplicationForm/SelectControl.js +1 -1
  405. package/mobile/lib/components/ApplicationForm/SelectControl.js.map +1 -1
  406. package/mobile/lib/components/ApplicationForm/feedbackTypes.js +1 -1
  407. package/mobile/lib/components/ApplicationForm/feedbackTypes.js.map +1 -1
  408. package/mobile/lib/components/ApplicationForm/getFormatData.d.ts +3 -0
  409. package/mobile/lib/components/ApplicationForm/getFormatData.js +2 -0
  410. package/mobile/lib/components/ApplicationForm/getFormatData.js.map +1 -0
  411. package/mobile/lib/components/ApplicationForm/handleSubmitFeedback.d.ts +15 -0
  412. package/mobile/lib/components/ApplicationForm/{handleSubmit.js → handleSubmitFeedback.js} +16 -18
  413. package/mobile/lib/components/ApplicationForm/handleSubmitFeedback.js.map +1 -0
  414. package/mobile/lib/components/ApplicationForm/renderAcquiringDataOrganization.js +1 -1
  415. package/mobile/lib/components/ApplicationForm/renderAcquiringDataOrganization.js.map +1 -1
  416. package/mobile/lib/components/ApplicationForm/renderAgreementWithSubmit.js +2 -2
  417. package/mobile/lib/components/ApplicationForm/renderAgreementWithSubmit.js.map +1 -1
  418. package/mobile/lib/components/ApplicationForm/renderCreditDataOrganization.js +1 -1
  419. package/mobile/lib/components/ApplicationForm/renderCreditDataOrganization.js.map +1 -1
  420. package/mobile/lib/components/ApplicationForm/renderUserData.d.ts +1 -3
  421. package/mobile/lib/components/ApplicationForm/renderUserData.js +1 -1
  422. package/mobile/lib/components/ApplicationForm/renderUserData.js.map +1 -1
  423. package/mobile/lib/components/ApplicationForm/renderWedDataOrganization.js +1 -1
  424. package/mobile/lib/components/ApplicationForm/renderWedDataOrganization.js.map +1 -1
  425. package/mobile/lib/components/ApplicationForm/validators.d.ts +1 -0
  426. package/mobile/lib/components/ApplicationForm/validators.js +1 -0
  427. package/mobile/lib/components/ApplicationForm/validators.js.map +1 -1
  428. package/mobile/lib/components/ApplicationFormAntiFraud/ApplicationFormAntiFraud.d.ts +1 -0
  429. package/mobile/lib/components/ApplicationFormAntiFraud/ApplicationFormAntiFraud.js +2 -0
  430. package/mobile/lib/components/ApplicationFormAntiFraud/ApplicationFormAntiFraud.js.map +1 -0
  431. package/mobile/lib/components/ApplicationFormAntiFraud/ApplicationFormAntiFraudContent.d.ts +2 -0
  432. package/mobile/lib/components/ApplicationFormAntiFraud/ApplicationFormAntiFraudContent.js +2 -0
  433. package/mobile/lib/components/ApplicationFormAntiFraud/ApplicationFormAntiFraudContent.js.map +1 -0
  434. package/mobile/lib/components/ApplicationFormCorruption/ApplicationFormCorruption.d.ts +1 -0
  435. package/mobile/lib/components/ApplicationFormCorruption/ApplicationFormCorruption.js +2 -0
  436. package/mobile/lib/components/ApplicationFormCorruption/ApplicationFormCorruption.js.map +1 -0
  437. package/mobile/lib/components/ApplicationFormCorruption/ApplicationFormCorruptionContent.d.ts +2 -0
  438. package/mobile/lib/components/ApplicationFormCorruption/ApplicationFormCorruptionContent.js +2 -0
  439. package/mobile/lib/components/ApplicationFormCorruption/ApplicationFormCorruptionContent.js.map +1 -0
  440. package/mobile/lib/components/ApplicationFormCustom/ApplicationFormCustom.d.ts +6 -0
  441. package/mobile/lib/components/ApplicationFormCustom/ApplicationFormCustom.js +37 -0
  442. package/mobile/lib/components/ApplicationFormCustom/ApplicationFormCustom.js.map +1 -0
  443. package/mobile/lib/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +53 -0
  444. package/mobile/lib/components/ApplicationFormCustom/ApplicationFormCustomContent.js +2 -0
  445. package/mobile/lib/components/ApplicationFormCustom/ApplicationFormCustomContent.js.map +1 -0
  446. package/mobile/lib/components/ApplicationFormCustom/columnStyle.d.ts +2 -0
  447. package/mobile/lib/components/ApplicationFormCustom/columnStyle.js +5 -0
  448. package/mobile/lib/components/ApplicationFormCustom/columnStyle.js.map +1 -0
  449. package/mobile/lib/components/ApplicationFormCustom/getField.d.ts +3 -0
  450. package/mobile/lib/components/ApplicationFormCustom/getField.js +26 -0
  451. package/mobile/lib/components/ApplicationFormCustom/getField.js.map +1 -0
  452. package/mobile/lib/components/ApplicationFormCustom/getInitialFormState.d.ts +13 -0
  453. package/mobile/lib/components/ApplicationFormCustom/getInitialFormState.js +17 -0
  454. package/mobile/lib/components/ApplicationFormCustom/getInitialFormState.js.map +1 -0
  455. package/mobile/lib/components/ApplicationFormCustom/getNamesFromInput.d.ts +2 -0
  456. package/mobile/lib/components/ApplicationFormCustom/getNamesFromInput.js +2 -0
  457. package/mobile/lib/components/ApplicationFormCustom/getNamesFromInput.js.map +1 -0
  458. package/mobile/lib/components/ApplicationFormCustom/getObjectValidator.d.ts +3 -0
  459. package/mobile/lib/components/ApplicationFormCustom/getObjectValidator.js +17 -0
  460. package/mobile/lib/components/ApplicationFormCustom/getObjectValidator.js.map +1 -0
  461. package/mobile/lib/components/Blocks.js +4 -0
  462. package/mobile/lib/components/Blocks.js.map +1 -1
  463. package/mobile/lib/ui-kit/ApplicationFormLayout/ApplicationFormLayout.d.ts +5 -0
  464. package/mobile/lib/ui-kit/ApplicationFormLayout/ApplicationFormLayout.js +10 -0
  465. package/mobile/lib/ui-kit/ApplicationFormLayout/ApplicationFormLayout.js.map +1 -0
  466. package/mobile/lib/ui-kit/ApplicationFormLayout/ApplicationFormLayoutContent.d.ts +9 -0
  467. package/mobile/lib/ui-kit/ApplicationFormLayout/ApplicationFormLayoutContent.js +2 -0
  468. package/mobile/lib/ui-kit/ApplicationFormLayout/ApplicationFormLayoutContent.js.map +1 -0
  469. package/mobile/lib/ui-kit/ApplicationFormLayout/ResponseNotification.js +13 -0
  470. package/mobile/lib/ui-kit/ApplicationFormLayout/ResponseNotification.js.map +1 -0
  471. package/mobile/lib/ui-kit/Checkbox/Checkbox.js +1 -1
  472. package/mobile/lib/ui-kit/Checkbox/Checkbox.js.map +1 -1
  473. package/mobile/lib/ui-kit/Checkbox/CheckboxWithError.js +1 -1
  474. package/mobile/lib/ui-kit/Checkbox/CheckboxWithError.js.map +1 -1
  475. package/mobile/lib/ui-kit/Input/InputControl.d.ts +2 -0
  476. package/{lib/components/ApplicationForm → mobile/lib/ui-kit/Input}/InputControl.js +1 -1
  477. package/mobile/lib/ui-kit/Input/InputControl.js.map +1 -0
  478. package/mobile/lib/{components/ApplicationForm → ui-kit/Input}/renderErrorText.js +1 -1
  479. package/mobile/lib/ui-kit/Input/renderErrorText.js.map +1 -0
  480. package/mobile/src/components/ApplicationForm/AddressBranchField.tsx +2 -2
  481. package/mobile/src/components/ApplicationForm/ApplicationForm.tsx +1 -1
  482. package/mobile/src/components/ApplicationForm/ApplicationFormBusinessCard.tsx +1 -1
  483. package/mobile/src/components/ApplicationForm/ApplicationFormContent.ts +0 -20
  484. package/mobile/src/components/ApplicationForm/ApplicationFormDeposit.tsx +1 -1
  485. package/mobile/src/components/ApplicationForm/ApplicationFormFeedback.tsx +4 -15
  486. package/mobile/src/components/ApplicationForm/ApplicationFormIndividuals.tsx +1 -1
  487. package/mobile/src/components/ApplicationForm/ApplicationFormSelfCollection.tsx +1 -1
  488. package/mobile/src/components/ApplicationForm/ApplicationFormUltraPremium.tsx +1 -1
  489. package/mobile/src/components/ApplicationForm/ApplicationFormWed.tsx +1 -1
  490. package/mobile/src/components/ApplicationForm/DatePickerControl.tsx +1 -1
  491. package/mobile/src/components/ApplicationForm/EmbeddableForms.tsx +0 -4
  492. package/mobile/src/components/ApplicationForm/PhoneInputControl.tsx +1 -1
  493. package/mobile/src/components/ApplicationForm/RegionField.tsx +2 -2
  494. package/mobile/src/components/ApplicationForm/SelectControl.tsx +1 -1
  495. package/mobile/src/components/ApplicationForm/feedbackTypes.ts +1 -1
  496. package/mobile/src/components/ApplicationForm/getFormatData.tsx +4 -0
  497. package/mobile/src/components/ApplicationForm/handleSubmitFeedback.tsx +54 -0
  498. package/mobile/src/components/ApplicationForm/renderAcquiringDataOrganization.tsx +1 -1
  499. package/mobile/src/components/ApplicationForm/renderAgreementWithSubmit.tsx +2 -2
  500. package/mobile/src/components/ApplicationForm/renderCreditDataOrganization.tsx +1 -1
  501. package/mobile/src/components/ApplicationForm/renderUserData.tsx +2 -6
  502. package/mobile/src/components/ApplicationForm/renderWedDataOrganization.tsx +1 -1
  503. package/mobile/src/components/ApplicationForm/validators.ts +2 -0
  504. package/mobile/src/components/ApplicationFormAntiFraud/ApplicationFormAntiFraud.example.json +27 -0
  505. package/mobile/src/components/ApplicationFormAntiFraud/ApplicationFormAntiFraud.tsx +1 -0
  506. package/mobile/src/components/ApplicationFormAntiFraud/ApplicationFormAntiFraudContent.ts +2 -0
  507. package/mobile/src/components/ApplicationFormCorruption/ApplicationFormCorruption.example.json +27 -0
  508. package/mobile/src/components/ApplicationFormCorruption/ApplicationFormCorruption.tsx +1 -0
  509. package/mobile/src/components/ApplicationFormCorruption/ApplicationFormCorruptionContent.ts +2 -0
  510. package/mobile/src/components/ApplicationFormCustom/ApplicationFormCustom.example.json +21 -0
  511. package/mobile/src/components/ApplicationFormCustom/ApplicationFormCustom.tsx +59 -0
  512. package/mobile/src/components/ApplicationFormCustom/ApplicationFormCustomContent.ts +74 -0
  513. package/mobile/src/components/ApplicationFormCustom/columnStyle.tsx +6 -0
  514. package/mobile/src/components/ApplicationFormCustom/getField.tsx +76 -0
  515. package/mobile/src/components/ApplicationFormCustom/getInitialFormState.tsx +34 -0
  516. package/mobile/src/components/ApplicationFormCustom/getNamesFromInput.tsx +3 -0
  517. package/mobile/src/components/ApplicationFormCustom/getObjectValidator.tsx +28 -0
  518. package/mobile/src/components/Blocks.ts +4 -0
  519. package/mobile/src/ui-kit/ApplicationFormLayout/ApplicationFormLayout.tsx +22 -0
  520. package/mobile/src/ui-kit/ApplicationFormLayout/ApplicationFormLayoutContent.ts +12 -0
  521. package/mobile/src/{components/ApplicationForm → ui-kit/ApplicationFormLayout}/ResponseNotification.tsx +3 -6
  522. package/mobile/src/ui-kit/Checkbox/Checkbox.tsx +1 -1
  523. package/mobile/src/ui-kit/Checkbox/CheckboxWithError.tsx +1 -1
  524. package/mobile/src/{components/ApplicationForm → ui-kit/Input}/InputControl.tsx +2 -2
  525. package/mobile/src/{components/ApplicationForm → ui-kit/Input}/renderErrorText.tsx +1 -1
  526. package/package.json +1 -1
  527. package/src/components/ApplicationForm/AddressBranchField.tsx +2 -2
  528. package/src/components/ApplicationForm/ApplicationForm.fixture.mobile.tsx +1 -28
  529. package/src/components/ApplicationForm/ApplicationForm.fixture.tsx +8 -36
  530. package/src/components/ApplicationForm/ApplicationForm.tsx +1 -1
  531. package/src/components/ApplicationForm/ApplicationFormBusinessCard.tsx +1 -1
  532. package/src/components/ApplicationForm/ApplicationFormContent.ts +0 -20
  533. package/src/components/ApplicationForm/ApplicationFormDeposit.tsx +1 -1
  534. package/src/components/ApplicationForm/ApplicationFormFeedback.tsx +4 -15
  535. package/src/components/ApplicationForm/ApplicationFormIndividuals.tsx +1 -1
  536. package/src/components/ApplicationForm/ApplicationFormSelfCollection.tsx +1 -1
  537. package/src/components/ApplicationForm/ApplicationFormUltraPremium.tsx +1 -1
  538. package/src/components/ApplicationForm/ApplicationFormWed.tsx +1 -1
  539. package/src/components/ApplicationForm/DatePickerControl.tsx +1 -1
  540. package/src/components/ApplicationForm/EmbeddableForms.tsx +0 -4
  541. package/src/components/ApplicationForm/PhoneInputControl.tsx +1 -1
  542. package/src/components/ApplicationForm/RegionField.tsx +2 -2
  543. package/src/components/ApplicationForm/SelectControl.tsx +1 -1
  544. package/src/components/ApplicationForm/feedbackTypes.ts +1 -1
  545. package/src/components/ApplicationForm/getFormatData.tsx +4 -0
  546. package/src/components/ApplicationForm/handleSubmitFeedback.tsx +54 -0
  547. package/src/components/ApplicationForm/renderAcquiringDataOrganization.tsx +1 -1
  548. package/src/components/ApplicationForm/renderAgreementWithSubmit.tsx +2 -2
  549. package/src/components/ApplicationForm/renderCreditDataOrganization.tsx +1 -1
  550. package/src/components/ApplicationForm/renderUserData.tsx +2 -6
  551. package/src/components/ApplicationForm/renderWedDataOrganization.tsx +1 -1
  552. package/src/components/ApplicationForm/validators.ts +2 -0
  553. package/src/components/ApplicationFormAntiFraud/ApplicationFormAntiFraud.example.json +27 -0
  554. package/src/components/ApplicationFormAntiFraud/ApplicationFormAntiFraud.fixture.tsx +36 -0
  555. package/src/components/ApplicationFormAntiFraud/ApplicationFormAntiFraud.tsx +1 -0
  556. package/src/components/ApplicationFormAntiFraud/ApplicationFormAntiFraudContent.ts +2 -0
  557. package/src/components/ApplicationFormCorruption/ApplicationFormCorruption.example.json +27 -0
  558. package/src/components/ApplicationFormCorruption/ApplicationFormCorruption.fixture.tsx +36 -0
  559. package/src/components/ApplicationFormCorruption/ApplicationFormCorruption.tsx +1 -0
  560. package/src/components/ApplicationFormCorruption/ApplicationFormCorruptionContent.ts +2 -0
  561. package/src/components/ApplicationFormCustom/ApplicationFormCustom.example.json +21 -0
  562. package/src/components/ApplicationFormCustom/ApplicationFormCustom.fixture.tsx +37 -0
  563. package/src/components/ApplicationFormCustom/ApplicationFormCustom.tsx +59 -0
  564. package/src/components/ApplicationFormCustom/ApplicationFormCustomContent.ts +74 -0
  565. package/src/components/ApplicationFormCustom/columnStyle.tsx +6 -0
  566. package/src/components/ApplicationFormCustom/getField.tsx +76 -0
  567. package/src/components/ApplicationFormCustom/getInitialFormState.tsx +34 -0
  568. package/src/components/ApplicationFormCustom/getNamesFromInput.tsx +3 -0
  569. package/src/components/ApplicationFormCustom/getObjectValidator.tsx +28 -0
  570. package/src/components/Blocks.mobile.ts +4 -0
  571. package/src/components/Blocks.ts +6 -0
  572. package/src/ui-kit/ApplicationFormLayout/ApplicationFormLayout.tsx +22 -0
  573. package/src/ui-kit/ApplicationFormLayout/ApplicationFormLayoutContent.ts +12 -0
  574. package/src/{components/ApplicationForm → ui-kit/ApplicationFormLayout}/ResponseNotification.tsx +3 -6
  575. package/src/ui-kit/Checkbox/Checkbox.tsx +1 -1
  576. package/src/ui-kit/Checkbox/CheckboxWithError.tsx +1 -1
  577. package/src/{components/ApplicationForm → ui-kit/Input}/InputControl.tsx +2 -2
  578. package/src/{components/ApplicationForm → ui-kit/Input}/renderErrorText.tsx +1 -1
  579. package/bundle/components/ApplicationForm/ApplicationFormAntiFraud.d.ts +0 -12
  580. package/bundle/components/ApplicationForm/ApplicationFormCorruption.d.ts +0 -12
  581. package/bundle/components/ApplicationForm/handleSubmit.d.ts +0 -16
  582. package/dist/components/ApplicationForm/ApplicationFormAntiFraud.d.ts +0 -12
  583. package/dist/components/ApplicationForm/ApplicationFormAntiFraud.js +0 -43
  584. package/dist/components/ApplicationForm/ApplicationFormAntiFraud.js.map +0 -1
  585. package/dist/components/ApplicationForm/ApplicationFormCorruption.d.ts +0 -12
  586. package/dist/components/ApplicationForm/ApplicationFormCorruption.js +0 -44
  587. package/dist/components/ApplicationForm/ApplicationFormCorruption.js.map +0 -1
  588. package/dist/components/ApplicationForm/InputControl.js.map +0 -1
  589. package/dist/components/ApplicationForm/ResponseNotification.js +0 -14
  590. package/dist/components/ApplicationForm/ResponseNotification.js.map +0 -1
  591. package/dist/components/ApplicationForm/handleSubmit.d.ts +0 -16
  592. package/dist/components/ApplicationForm/handleSubmit.js +0 -42
  593. package/dist/components/ApplicationForm/handleSubmit.js.map +0 -1
  594. package/dist/components/ApplicationForm/renderErrorText.js.map +0 -1
  595. package/lib/components/ApplicationForm/ApplicationFormAntiFraud.d.ts +0 -12
  596. package/lib/components/ApplicationForm/ApplicationFormAntiFraud.js +0 -41
  597. package/lib/components/ApplicationForm/ApplicationFormAntiFraud.js.map +0 -1
  598. package/lib/components/ApplicationForm/ApplicationFormCorruption.d.ts +0 -12
  599. package/lib/components/ApplicationForm/ApplicationFormCorruption.js +0 -42
  600. package/lib/components/ApplicationForm/ApplicationFormCorruption.js.map +0 -1
  601. package/lib/components/ApplicationForm/InputControl.js.map +0 -1
  602. package/lib/components/ApplicationForm/ResponseNotification.js +0 -12
  603. package/lib/components/ApplicationForm/ResponseNotification.js.map +0 -1
  604. package/lib/components/ApplicationForm/handleSubmit.d.ts +0 -16
  605. package/lib/components/ApplicationForm/handleSubmit.js.map +0 -1
  606. package/lib/components/ApplicationForm/renderErrorText.js.map +0 -1
  607. package/mobile/bundle/components/ApplicationForm/ApplicationFormAntiFraud.d.ts +0 -12
  608. package/mobile/bundle/components/ApplicationForm/ApplicationFormCorruption.d.ts +0 -12
  609. package/mobile/bundle/components/ApplicationForm/handleSubmit.d.ts +0 -16
  610. package/mobile/dist/components/ApplicationForm/ApplicationFormAntiFraud.d.ts +0 -12
  611. package/mobile/dist/components/ApplicationForm/ApplicationFormAntiFraud.js +0 -43
  612. package/mobile/dist/components/ApplicationForm/ApplicationFormAntiFraud.js.map +0 -1
  613. package/mobile/dist/components/ApplicationForm/ApplicationFormCorruption.d.ts +0 -12
  614. package/mobile/dist/components/ApplicationForm/ApplicationFormCorruption.js +0 -44
  615. package/mobile/dist/components/ApplicationForm/ApplicationFormCorruption.js.map +0 -1
  616. package/mobile/dist/components/ApplicationForm/InputControl.d.ts +0 -2
  617. package/mobile/dist/components/ApplicationForm/InputControl.js.map +0 -1
  618. package/mobile/dist/components/ApplicationForm/ResponseNotification.js +0 -14
  619. package/mobile/dist/components/ApplicationForm/ResponseNotification.js.map +0 -1
  620. package/mobile/dist/components/ApplicationForm/handleSubmit.d.ts +0 -16
  621. package/mobile/dist/components/ApplicationForm/handleSubmit.js +0 -42
  622. package/mobile/dist/components/ApplicationForm/handleSubmit.js.map +0 -1
  623. package/mobile/dist/components/ApplicationForm/renderErrorText.js.map +0 -1
  624. package/mobile/lib/components/ApplicationForm/ApplicationFormAntiFraud.d.ts +0 -12
  625. package/mobile/lib/components/ApplicationForm/ApplicationFormAntiFraud.js +0 -41
  626. package/mobile/lib/components/ApplicationForm/ApplicationFormAntiFraud.js.map +0 -1
  627. package/mobile/lib/components/ApplicationForm/ApplicationFormCorruption.d.ts +0 -12
  628. package/mobile/lib/components/ApplicationForm/ApplicationFormCorruption.js +0 -42
  629. package/mobile/lib/components/ApplicationForm/ApplicationFormCorruption.js.map +0 -1
  630. package/mobile/lib/components/ApplicationForm/InputControl.d.ts +0 -2
  631. package/mobile/lib/components/ApplicationForm/InputControl.js.map +0 -1
  632. package/mobile/lib/components/ApplicationForm/ResponseNotification.js +0 -12
  633. package/mobile/lib/components/ApplicationForm/ResponseNotification.js.map +0 -1
  634. package/mobile/lib/components/ApplicationForm/handleSubmit.d.ts +0 -16
  635. package/mobile/lib/components/ApplicationForm/handleSubmit.js.map +0 -1
  636. package/mobile/lib/components/ApplicationForm/renderErrorText.js.map +0 -1
  637. package/mobile/src/components/ApplicationForm/ApplicationFormAntiFraud.tsx +0 -77
  638. package/mobile/src/components/ApplicationForm/ApplicationFormCorruption.tsx +0 -82
  639. package/mobile/src/components/ApplicationForm/handleSubmit.tsx +0 -57
  640. package/src/components/ApplicationForm/ApplicationFormAntiFraud.tsx +0 -77
  641. package/src/components/ApplicationForm/ApplicationFormCorruption.tsx +0 -82
  642. package/src/components/ApplicationForm/handleSubmit.tsx +0 -57
  643. /package/bundle/{components/ApplicationForm → ui-kit/ApplicationFormLayout}/ResponseNotification.d.ts +0 -0
  644. /package/bundle/{components/ApplicationForm → ui-kit/Input}/renderErrorText.d.ts +0 -0
  645. /package/dist/{components/ApplicationForm → ui-kit/ApplicationFormLayout}/ResponseNotification.d.ts +0 -0
  646. /package/dist/{components/ApplicationForm → ui-kit/Input}/renderErrorText.d.ts +0 -0
  647. /package/lib/{components/ApplicationForm → ui-kit/ApplicationFormLayout}/ResponseNotification.d.ts +0 -0
  648. /package/lib/{components/ApplicationForm → ui-kit/Input}/renderErrorText.d.ts +0 -0
  649. /package/mobile/bundle/{components/ApplicationForm → ui-kit/ApplicationFormLayout}/ResponseNotification.d.ts +0 -0
  650. /package/mobile/bundle/{components/ApplicationForm → ui-kit/Input}/renderErrorText.d.ts +0 -0
  651. /package/mobile/dist/{components/ApplicationForm → ui-kit/ApplicationFormLayout}/ResponseNotification.d.ts +0 -0
  652. /package/mobile/dist/{components/ApplicationForm → ui-kit/Input}/renderErrorText.d.ts +0 -0
  653. /package/mobile/lib/{components/ApplicationForm → ui-kit/ApplicationFormLayout}/ResponseNotification.d.ts +0 -0
  654. /package/mobile/lib/{components/ApplicationForm → ui-kit/Input}/renderErrorText.d.ts +0 -0
@@ -856,6 +856,13 @@
856
856
  ? {}
857
857
  : { secondaryPhoneNumber: formatPhone(secondaryPhone) };
858
858
 
859
+ const ResponseNotification = JSX(({ responseType }) => {
860
+ const responseOK = responseType === 'OK';
861
+ const backgroundColor = responseOK ? 'bg-ok' : 'bg-fail';
862
+ const statusIcon = responseOK ? 'ResponseOKIcon' : 'ResponseFailIcon';
863
+ return (jsxs("div", { className: style('flex items-center p-lg rounded-md space-x-m', backgroundColor), children: [jsx(Img, { image: { icon: statusIcon, iconVersion: 'normal' }, width: "42", height: "42" }), jsxs("div", { children: [jsx(Heading, { headingType: "h6", title: responseOK ? 'Ваша заявка отправлена' : 'Не удалось отправить заявку', className: "mb-2xs" }), jsx(Text, { size: "text-l", font: "font-light", color: "text-secondary-text", children: responseOK ? 'Совсем скоро мы с вами свяжемся' : 'Пожалуйста, повторите позднее' })] })] }));
864
+ });
865
+
859
866
  const identity = (_) => _;
860
867
 
861
868
  const useForm = (initialState, { resetOnSubmit, onSubmit } = {}) => {
@@ -911,26 +918,13 @@
911
918
  [];
912
919
 
913
920
  const isValidationSuccess = (info) => !info?.length;
914
- const validator = (predicate) => (message) => (_) => predicate(_) ? [] : [message];
921
+ const validator$1 = (predicate) => (message) => (_) => predicate(_) ? [] : [message];
915
922
 
916
923
  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] })));
917
924
 
918
925
  const formStyle$1 = 'container space-y-lg';
919
926
  const oneColumnFormStyle = 'w-full max-w-xl space-y-s m-auto';
920
927
 
921
- const withValidator = (props, validator) => {
922
- const { value, isDirty } = props;
923
- const errors = isDirty ? validator(value) : [];
924
- return {
925
- ...props,
926
- errors,
927
- error: errors[0],
928
- };
929
- };
930
-
931
- const ApplicationFieldsetLayout = JSX(({ title, children }) => (jsxs("fieldset", { className: "grid @xl:flex @xl:justify-between gap-lg 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] })));
932
- const formChildrenStyle = '@xl:w-1/2 space-y-s';
933
-
934
928
  const Input = JSX(({ key, className = '', id, name, type = 'text', label, placeholder, value = '', valid = true, children, onChange, onFocus, onBlur, pattern, autoFocus = false, isTextarea = false, }) => {
935
929
  const inputRef = useRef(null);
936
930
  const handleChange = useCallback((e) => {
@@ -955,6 +949,19 @@
955
949
 
956
950
  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)] })));
957
951
 
952
+ const withValidator = (props, validator) => {
953
+ const { value, isDirty } = props;
954
+ const errors = isDirty ? validator(value) : [];
955
+ return {
956
+ ...props,
957
+ errors,
958
+ error: errors[0],
959
+ };
960
+ };
961
+
962
+ const ApplicationFieldsetLayout = JSX(({ title, children }) => (jsxs("fieldset", { className: "grid @xl:flex @xl:justify-between gap-lg 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] })));
963
+ const formChildrenStyle = '@xl:w-1/2 space-y-s';
964
+
958
965
  const isPlaceholder = (_) => _ === '_';
959
966
  const isDigit = (_) => /\d/.test(_);
960
967
  const isWildcard = (_) => isPlaceholder(_) || isDigit(_);
@@ -976,16 +983,17 @@
976
983
 
977
984
  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)] })));
978
985
 
979
- const pattern = (regexp) => validator((_) => typeof _ === 'string' && regexp.test(_));
986
+ const pattern = (regexp) => validator$1((_) => typeof _ === 'string' && regexp.test(_));
980
987
 
981
- const required = validator((_) => _ !== null && _ !== undefined && _ !== '');
988
+ const required = validator$1((_) => _ !== null && _ !== undefined && _ !== '');
982
989
 
983
990
  const ERROR_MESSAGE = 'Некорректно заполненное поле';
984
991
  const defaultValidator = required(ERROR_MESSAGE);
985
- const nameValidator = validator((_) => typeof _ === 'string' && _.length > 1)(ERROR_MESSAGE);
986
- const innValidator = validator((_) => typeof _ === 'string' && (_.length === 10 || _.length === 12))(ERROR_MESSAGE);
992
+ const defaultSelectValidator = validator$1((_) => _?.key && _?.key !== '')(ERROR_MESSAGE);
993
+ const nameValidator = validator$1((_) => typeof _ === 'string' && _.length > 1)(ERROR_MESSAGE);
994
+ const innValidator = validator$1((_) => typeof _ === 'string' && (_.length === 10 || _.length === 12))(ERROR_MESSAGE);
987
995
  const phoneValidator = pattern(/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/)(ERROR_MESSAGE);
988
- const checkboxValidator = validator((_) => typeof _ === 'boolean' && _)(ERROR_MESSAGE);
996
+ const checkboxValidator = validator$1((_) => typeof _ === 'boolean' && _)(ERROR_MESSAGE);
989
997
 
990
998
  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) })] })] }));
991
999
 
@@ -1186,7 +1194,7 @@
1186
1194
 
1187
1195
  const RegionField = JSX(({ field }) => {
1188
1196
  const regions = useRegions();
1189
- 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'), defaultValidator) }));
1197
+ 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'), defaultSelectValidator) }));
1190
1198
  });
1191
1199
 
1192
1200
  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 }) })] }));
@@ -1223,7 +1231,7 @@
1223
1231
 
1224
1232
  const renderSubmitButton = (button, className) => (jsx(Button, { className: style('w-full @xl:w-auto', className), type: "submit", children: button?.text ? button.text : 'Отправить заявку' }));
1225
1233
 
1226
- const initialFormState$a = {
1234
+ const initialFormState$9 = {
1227
1235
  typeForm: { key: 'acqr', text: 'Предупреждение о мошенничестве' },
1228
1236
  acquiringType: { key: 'trade', text: 'Торговый эквайринг' },
1229
1237
  fullName: '',
@@ -1255,12 +1263,236 @@
1255
1263
  };
1256
1264
  isValidationSuccess(acquiringValidator(formState)) && onSubmit(submitData, false);
1257
1265
  }, [onSubmit]);
1258
- const [, { field, ...formProps }] = useForm(initialFormState$a, { onSubmit: handleSubmit });
1266
+ const [, { field, ...formProps }] = useForm(initialFormState$9, { onSubmit: handleSubmit });
1259
1267
  const isSlideCheckboxes = getSlideCheckboxes(field('acquiringType').value?.key);
1260
1268
  return (jsxs("form", { className: formStyle$1, onSubmit: formProps.onSubmit, children: [renderAcquiringRegion({ field, title: 'Вид эквайринга и регион' }), renderAcquiringDataOrganization(field, 'Данные организации'), isSlideCheckboxes ? (jsxs("div", { children: [jsx(SlideCheckbox, { text: "\u0425\u043E\u0447\u0443 \u043A\u0443\u043F\u0438\u0442\u044C \u043E\u043D\u043B\u0430\u0439\u043D-\u043A\u0430\u0441\u0441\u0443", ...field('onlineCheckout') }), jsx(SlideCheckbox, { 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 })] }));
1261
1269
  });
1262
1270
  const getSlideCheckboxes = (type) => type === 'all' || type === 'trade';
1263
1271
 
1272
+ const initialFormState$8 = {
1273
+ typeForm: { key: 'bcrd', text: 'Заявка на бизнес-карту' },
1274
+ name: '',
1275
+ phone: '',
1276
+ inn: '',
1277
+ email: '',
1278
+ };
1279
+ const businessCardValidator = objectValidator({
1280
+ region: defaultValidator,
1281
+ name: nameValidator,
1282
+ phone: phoneValidator,
1283
+ inn: innValidator,
1284
+ email: defaultValidator,
1285
+ });
1286
+ const ApplicationFormBusinessCard = JSX((props) => {
1287
+ const { button, link, onSubmit } = props;
1288
+ const handleSubmit = useCallback((formState) => {
1289
+ isValidationSuccess(businessCardValidator(formState)) && onSubmit(formState);
1290
+ }, [onSubmit]);
1291
+ const [, { field, ...formProps }] = useForm(initialFormState$8, { onSubmit: handleSubmit });
1292
+ return (jsxs("form", { className: formStyle$1, onSubmit: formProps.onSubmit, children: [jsx(RegionField, { field: field }), jsxs(ApplicationFieldsetLayout, { children: [jsxs("div", { className: formChildrenStyle, children: [jsx(InputControl, { label: "\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E", ...withValidator(field('name'), nameValidator) }), jsx(InputControl, { label: "\u0418\u041D\u041D", ...withValidator(field('inn'), innValidator) })] }), jsxs("div", { className: formChildrenStyle, children: [jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) }), jsx(InputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...withValidator(field('email'), defaultValidator) })] })] }), renderSubmitButton(button), jsx(Footnote, { link: link })] }));
1293
+ });
1294
+
1295
+ const BRANCHES_URL = '/api/v1/branches';
1296
+ const EMPTY_VALUE$4 = [];
1297
+ function useBranches(regionCode) {
1298
+ const { data } = useAsyncData(regionCode ? `${BRANCHES_URL}?regionCode=${regionCode}` : null, fetchSafeBoxes$1);
1299
+ return data || EMPTY_VALUE$4;
1300
+ }
1301
+ const fetchSafeBoxes$1 = async (url) => {
1302
+ const result = await fetchJSON(url, { method: 'GET' });
1303
+ return result || EMPTY_VALUE$4;
1304
+ };
1305
+
1306
+ const REGIONS_URL = '/api/v1/premiumBranchesByRegions';
1307
+ function usePremiumBranchesByRegions() {
1308
+ const { data } = useAsyncData(REGIONS_URL, fetchJSONUnsafe);
1309
+ return data || [];
1310
+ }
1311
+
1312
+ const AddressBranchField = JSX(({ field, regionKey, isPremium = false }) => {
1313
+ const addressBranch = isPremium
1314
+ ? usePremiumBranchesByRegions().find((_) => _?.region === regionKey)?.branches
1315
+ : useBranches(regionKey).filter((branch) => branch?.address);
1316
+ 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 = '' }) => ({
1317
+ key: address,
1318
+ text: address,
1319
+ })), ...withValidator(field('addressBranch'), defaultSelectValidator) }));
1320
+ });
1321
+
1322
+ const MIN_CREDIT_AMOUNT = 1000;
1323
+ const MAX_CREDIT_AMOUNT = 1000000000;
1324
+ const ITEMS_CREDIT_AMOUNT = ['От 1 000 ₽', 'До 1 000 000 000 ₽'];
1325
+ const MIN_CREDIT_TERM = 1;
1326
+ const MAX_CREDIT_TERM = 180;
1327
+ const ITEMS_CREDIT_TERM = ['От 1 мес', 'До 15 лет'];
1328
+
1329
+ 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) })] })] }));
1330
+
1331
+ const useNormalizedInput = (props, { normalize, format }) => {
1332
+ const { value, onFocus, onBlur, onChange } = props;
1333
+ const [isFocused, setIsFocused] = useState(false);
1334
+ const handleFocus = useCallback((e) => {
1335
+ setIsFocused(true);
1336
+ onFocus && onFocus(e);
1337
+ }, []);
1338
+ const handleBlur = useCallback(() => {
1339
+ setIsFocused(false);
1340
+ onChange && onChange(normalize(value));
1341
+ onBlur && onBlur();
1342
+ }, [onChange, value]);
1343
+ return {
1344
+ value: (isFocused || !format ? value : format(value)),
1345
+ onFocus: handleFocus,
1346
+ onBlur: handleBlur,
1347
+ };
1348
+ };
1349
+
1350
+ const clamp = (value, min, max) => Math.max(min, Math.min(value, max));
1351
+
1352
+ function parseDecimal(value) {
1353
+ const rawValue = (value || '').replace(/\D/g, '');
1354
+ const unsafeDecimal = parseInt(rawValue, 10);
1355
+ return Number.isNaN(unsafeDecimal) ? 0 : unsafeDecimal;
1356
+ }
1357
+
1358
+ function renderRangeWithTicks({ list = [], min, max, step, value = list[0] || min, disabled, onChange, }) {
1359
+ const rangeValue = list.length ? list.indexOf(value) : value;
1360
+ const rangeValueShift = rangeValue > min ? rangeValue - min : 0;
1361
+ const percentage = (rangeValueShift * 100) / (max - min);
1362
+ const inputStyle = {
1363
+ backgroundSize: `${percentage.toFixed(2)}% 100%`,
1364
+ };
1365
+ return (jsxs("div", { children: [list.length ? (jsx("div", { className: "absolute w-full flex justify-between -bottom-[3px] px-m", children: list.map((_, i) => (jsx("div", { className: style('w-2 h-2 rounded-full', rangeValue <= i || disabled ? 'bg-gray' : 'bg-primary-main') }, String(i)))) })) : null, jsx("div", { className: "absolute inset-x-0 -bottom-1 px-m leading-[18px]", children: jsx("input", { className: "box-border w-full m-0 cursor-pointer slider relative z-10", style: inputStyle, type: "range", min: min, max: max, step: step, value: rangeValue, disabled: disabled, onInput: ((e) => {
1366
+ const rawValue = parseDecimal(e.target?.value);
1367
+ const newValue = list.length ? list[rawValue] : rawValue;
1368
+ onChange && onChange(newValue || 0);
1369
+ }) }) })] }));
1370
+ }
1371
+
1372
+ const DISABLED_INPUT_CLASSES = 'disabled:border-gray disabled:bg-main-divider';
1373
+ const DEFAULT_MIN = 1;
1374
+ const DEFAULT_MAX = 100;
1375
+ const InputRange = JSX((props) => {
1376
+ const { className, title, items = [], list = [], min = list.length ? 0 : DEFAULT_MIN, max = list.length ? list.length - 1 : DEFAULT_MAX, step = 1, value = list[0] || min, disabled = false, onChange, } = props;
1377
+ const normalizedProps = useNormalizedInput(props, {
1378
+ normalize: (_ = 0) => list.length ? closestValue(list)(_) : clamp(_, min, max),
1379
+ format: toLocalNumberFormat(),
1380
+ });
1381
+ const handleChange = useCallback((e) => {
1382
+ onChange && onChange(parseDecimal(e.target?.value));
1383
+ }, [onChange]);
1384
+ return (jsxs("div", { className: className, children: [jsxs("label", { className: "block relative", children: [title ? (jsx(Text, { size: "text-m", font: "font-light", color: "text-primary-text", children: title })) : null, jsx("input", { className: style('mt-xs font-sans text-h3 w-full h-14', 'border border-solid border-gray rounded-md outline-none', 'pl-m box-border', 'text-primary-text hover:border-primary-hover focus:border-primary-text', DISABLED_INPUT_CLASSES), disabled: disabled, onInput: handleChange, ...normalizedProps }), renderRangeWithTicks({ list, min, max, step, disabled, value, onChange })] }), renderRangeCaption(items)] }));
1385
+ });
1386
+ const closestValue = (list) => (_) => list.reduce((prev, curr) => (Math.abs(curr - _) < Math.abs(prev - _) ? curr : prev));
1387
+ 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)))) }));
1388
+
1389
+ 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') }) })] }));
1390
+
1391
+ const initialFormState$7 = {
1392
+ typeForm: { key: 'cred', text: 'Кредит' },
1393
+ amount: MIN_CREDIT_AMOUNT,
1394
+ term: 12,
1395
+ fullName: '',
1396
+ inn: '',
1397
+ name: '',
1398
+ phone: '',
1399
+ email: '',
1400
+ annualRevenue: '',
1401
+ };
1402
+ const creditValidator$1 = objectValidator({
1403
+ fullName: defaultValidator,
1404
+ annualRevenue: defaultValidator,
1405
+ inn: innValidator,
1406
+ name: nameValidator,
1407
+ phone: phoneValidator,
1408
+ region: defaultValidator,
1409
+ });
1410
+ const ApplicationFormCredit = JSX(({ button, link, onSubmit }) => {
1411
+ const handleSubmit = useCallback((formState) => {
1412
+ const { amount, term, addressBranch, annualRevenue, ...usedFields } = formState;
1413
+ isValidationSuccess(creditValidator$1(formState)) &&
1414
+ onSubmit({
1415
+ ...usedFields,
1416
+ addressBranch: addressBranch?.text || '',
1417
+ partnerComments: `Сумма=${amount}/Срок=${term}/Выручка=${annualRevenue}`,
1418
+ });
1419
+ }, [onSubmit]);
1420
+ const [formState, { field, ...formProps }] = useForm(initialFormState$7, {
1421
+ onSubmit: handleSubmit,
1422
+ });
1423
+ 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 })] }));
1424
+ });
1425
+
1426
+ const initialFormState$6 = {
1427
+ typeForm: { key: 'dpst', text: 'Заявка на депозит' },
1428
+ name: '',
1429
+ phone: '',
1430
+ };
1431
+ const depositValidator = objectValidator({
1432
+ name: nameValidator,
1433
+ phone: phoneValidator,
1434
+ });
1435
+ const ApplicationFormDeposit = JSX(({ button, link, onSubmit }) => {
1436
+ const handleSubmit = useCallback((formState) => {
1437
+ isValidationSuccess(depositValidator(formState)) && onSubmit(formState);
1438
+ }, [onSubmit]);
1439
+ const [, { field, ...formProps }] = useForm(initialFormState$6, {
1440
+ onSubmit: handleSubmit,
1441
+ resetOnSubmit: false,
1442
+ });
1443
+ 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 })] }) }) }));
1444
+ });
1445
+
1446
+ const FEEDBACK_TYPES = [
1447
+ {
1448
+ text: 'Задать вопрос по продуктам и услугам',
1449
+ key: 'FEEDBACK',
1450
+ },
1451
+ {
1452
+ text: 'Качество обслуживания',
1453
+ key: 'FEEDBACK_QS',
1454
+ },
1455
+ ];
1456
+ const FEEDBACK_METHOD = [
1457
+ { key: 'phone', text: 'Телефонный звонок' },
1458
+ { key: 'email', text: 'Электронное сообщение' },
1459
+ ];
1460
+ const SERVICE_DIRECTIONS = [
1461
+ { key: 'Физическое лицо' },
1462
+ { key: 'Юридическое лицо / ИП' },
1463
+ ];
1464
+
1465
+ const feedbackValidatorDefaultObject = {
1466
+ typeForm: defaultValidator,
1467
+ region: defaultValidator,
1468
+ surname: defaultValidator,
1469
+ name: nameValidator,
1470
+ feedbackMethod: defaultValidator,
1471
+ phone: phoneValidator,
1472
+ email: defaultValidator,
1473
+ comment: defaultValidator,
1474
+ consentDataProcessing: checkboxValidator,
1475
+ };
1476
+ const handleSubmitFeedback = (formState, onSubmit) => {
1477
+ const isLegal = getLegalEntity(formState?.typeForm.key, formState?.serviceDirection?.key);
1478
+ const feedbackValidator = objectValidator({
1479
+ ...feedbackValidatorDefaultObject,
1480
+ ...getFeedbackValidationObject(formState, isLegal),
1481
+ });
1482
+ isValidationSuccess(feedbackValidator(formState)) && onSubmit(formState, !isLegal);
1483
+ };
1484
+ const getFeedbackValidationObject = (formState, isLegal) => {
1485
+ if (isLegal) {
1486
+ return { addressBranch: defaultValidator, inn: innValidator };
1487
+ }
1488
+ else if (formState.typeForm.key === 'FEEDBACK') {
1489
+ return { birthday: defaultValidator };
1490
+ }
1491
+ else {
1492
+ return { addressBranch: defaultValidator };
1493
+ }
1494
+ };
1495
+
1264
1496
  const SVG = JSX(({ className, viewBox, fill = 'none', width, height, paths, ...commonOptions }) => {
1265
1497
  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) => {
1266
1498
  const resultOptions = { ...commonOptions, ...options };
@@ -1289,9 +1521,7 @@
1289
1521
  });
1290
1522
  const checkboxStyle = (value) => style('rounded border', value ? 'bg-primary-main' : '');
1291
1523
 
1292
- 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)] })));
1293
-
1294
- const renderAgreementWithSubmit = (consentDataProcessing, link, button) => (jsxs("div", { className: "flex gap-m flex-col lg:flex-row w-full justify-between items-baseline", children: [jsxs("div", { children: [jsxs("div", { className: "flex gap-3", children: [jsx(Checkbox, { ...consentDataProcessing }), jsx(Footnote, { text: "\u0421\u043E\u0433\u043B\u0430\u0441\u0435\u043D \u0441 ", link: link })] }), renderErrorText(withValidator(consentDataProcessing, checkboxValidator).error)] }), renderSubmitButton(button)] }));
1524
+ const renderAgreementWithSubmit = (consentDataProcessing, link, button) => (jsxs("div", { className: "flex col-span-2 gap-m flex-col lg:flex-row w-full justify-between items-baseline", children: [jsxs("div", { children: [jsxs("div", { className: "flex gap-3", children: [jsx(Checkbox, { ...consentDataProcessing }), jsx(Footnote, { text: "\u0421\u043E\u0433\u043B\u0430\u0441\u0435\u043D \u0441 ", link: link })] }), renderErrorText(withValidator(consentDataProcessing, checkboxValidator).error)] }), renderSubmitButton(button)] }));
1295
1525
 
1296
1526
  const formatDate = (date, toTimeStamp = false) => {
1297
1527
  if (typeof date === 'string') {
@@ -1455,310 +1685,22 @@
1455
1685
  };
1456
1686
  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] }));
1457
1687
 
1458
- const initialFormState$9 = {
1688
+ const initialFormState$5 = {
1459
1689
  ...initialUserFormState,
1460
- typeForm: { key: 'ANTIFRAUD', text: 'Предупреждение о мошенничестве' },
1461
- phone: '',
1690
+ typeForm: { key: 'FEEDBACK', text: 'Задать вопрос по продуктам и услугам' },
1691
+ serviceDirection: { key: 'Физическое лицо' },
1462
1692
  birthday: undefined,
1463
- isClient: false,
1464
- comment: '',
1465
- consentDataProcessing: false,
1466
- };
1467
- const feedbackValidator$2 = objectValidator({
1468
- typeForm: defaultValidator,
1469
- surname: defaultValidator,
1470
- name: nameValidator,
1471
- birthday: defaultValidator,
1472
- phone: phoneValidator,
1473
- comment: defaultValidator,
1474
- consentDataProcessing: checkboxValidator,
1475
- });
1476
- const ApplicationFormAntiFraud = JSX(({ button, link, onSubmit }) => {
1477
- const handleSubmit = useCallback((formState) => {
1478
- isValidationSuccess(feedbackValidator$2(formState)) && onSubmit(formState, true);
1479
- }, [onSubmit]);
1480
- const [, { field, ...formProps }] = useForm(initialFormState$9, { onSubmit: handleSubmit });
1481
- return (jsx("form", { className: formStyle$1, onSubmit: formProps.onSubmit, children: jsx(ApplicationFieldsetLayout, { children: jsxs("div", { className: oneColumnFormStyle, children: [renderUserData(field, true), jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) }), 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"' }), jsx(InputControl, { ...withValidator(field('comment'), defaultValidator), placeholder: "\u041A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0439", isTextarea: true }), renderAgreementWithSubmit(field('consentDataProcessing'), link, button)] }) }) }));
1482
- });
1483
-
1484
- const initialFormState$8 = {
1485
- typeForm: { key: 'bcrd', text: 'Заявка на бизнес-карту' },
1486
- name: '',
1487
- phone: '',
1488
- inn: '',
1489
- email: '',
1490
- };
1491
- const businessCardValidator = objectValidator({
1492
- region: defaultValidator,
1493
- name: nameValidator,
1494
- phone: phoneValidator,
1495
- inn: innValidator,
1496
- email: defaultValidator,
1497
- });
1498
- const ApplicationFormBusinessCard = JSX((props) => {
1499
- const { button, link, onSubmit } = props;
1500
- const handleSubmit = useCallback((formState) => {
1501
- isValidationSuccess(businessCardValidator(formState)) && onSubmit(formState);
1502
- }, [onSubmit]);
1503
- const [, { field, ...formProps }] = useForm(initialFormState$8, { onSubmit: handleSubmit });
1504
- return (jsxs("form", { className: formStyle$1, onSubmit: formProps.onSubmit, children: [jsx(RegionField, { field: field }), jsxs(ApplicationFieldsetLayout, { children: [jsxs("div", { className: formChildrenStyle, children: [jsx(InputControl, { label: "\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E", ...withValidator(field('name'), nameValidator) }), jsx(InputControl, { label: "\u0418\u041D\u041D", ...withValidator(field('inn'), innValidator) })] }), jsxs("div", { className: formChildrenStyle, children: [jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) }), jsx(InputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...withValidator(field('email'), defaultValidator) })] })] }), renderSubmitButton(button), jsx(Footnote, { link: link })] }));
1505
- });
1506
-
1507
- const initialFormState$7 = {
1508
- typeForm: { key: 'CORRUPTION', text: 'Факты коррупции' },
1509
- ...initialUserFormState,
1510
- phone: '',
1511
- email: '',
1512
- comment: '',
1513
- consentDataProcessing: false,
1514
- };
1515
- const feedbackValidator$1 = objectValidator({
1516
- typeForm: defaultValidator,
1517
- surname: defaultValidator,
1518
- name: nameValidator,
1519
- region: defaultValidator,
1520
- phone: phoneValidator,
1521
- email: defaultValidator,
1522
- comment: defaultValidator,
1523
- consentDataProcessing: checkboxValidator,
1524
- });
1525
- const ApplicationFormCorruption = JSX(({ button, link, onSubmit }) => {
1526
- const handleSubmit = useCallback((formState) => {
1527
- isValidationSuccess(feedbackValidator$1(formState)) && onSubmit(formState, true);
1528
- }, [onSubmit]);
1529
- const [, { field, ...formProps }] = useForm(initialFormState$7, { onSubmit: handleSubmit });
1530
- return (jsx("form", { className: formStyle$1, onSubmit: formProps.onSubmit, children: jsx(ApplicationFieldsetLayout, { children: jsxs("div", { className: oneColumnFormStyle, children: [renderUserData(field, false), jsx(RegionField, { field: field }), jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), 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, { ...withValidator(field('comment'), defaultValidator), placeholder: "\u0412\u0430\u0448\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435", isTextarea: true }), renderAgreementWithSubmit(field('consentDataProcessing'), link, button)] }) }) }));
1531
- });
1532
-
1533
- const BRANCHES_URL = '/api/v1/branches';
1534
- const EMPTY_VALUE$4 = [];
1535
- function useBranches(regionCode) {
1536
- const { data } = useAsyncData(regionCode ? `${BRANCHES_URL}?regionCode=${regionCode}` : null, fetchSafeBoxes$1);
1537
- return data || EMPTY_VALUE$4;
1538
- }
1539
- const fetchSafeBoxes$1 = async (url) => {
1540
- const result = await fetchJSON(url, { method: 'GET' });
1541
- return result || EMPTY_VALUE$4;
1542
- };
1543
-
1544
- const REGIONS_URL = '/api/v1/premiumBranchesByRegions';
1545
- function usePremiumBranchesByRegions() {
1546
- const { data } = useAsyncData(REGIONS_URL, fetchJSONUnsafe);
1547
- return data || [];
1548
- }
1549
-
1550
- const AddressBranchField = JSX(({ field, regionKey, isPremium = false }) => {
1551
- const addressBranch = isPremium
1552
- ? usePremiumBranchesByRegions().find((_) => _?.region === regionKey)?.branches
1553
- : useBranches(regionKey).filter((branch) => branch?.address);
1554
- 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 = '' }) => ({
1555
- key: address,
1556
- text: address,
1557
- })), ...withValidator(field('addressBranch'), defaultValidator) }));
1558
- });
1559
-
1560
- const MIN_CREDIT_AMOUNT = 1000;
1561
- const MAX_CREDIT_AMOUNT = 1000000000;
1562
- const ITEMS_CREDIT_AMOUNT = ['От 1 000 ₽', 'До 1 000 000 000 ₽'];
1563
- const MIN_CREDIT_TERM = 1;
1564
- const MAX_CREDIT_TERM = 180;
1565
- const ITEMS_CREDIT_TERM = ['От 1 мес', 'До 15 лет'];
1566
-
1567
- 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) })] })] }));
1568
-
1569
- const useNormalizedInput = (props, { normalize, format }) => {
1570
- const { value, onFocus, onBlur, onChange } = props;
1571
- const [isFocused, setIsFocused] = useState(false);
1572
- const handleFocus = useCallback((e) => {
1573
- setIsFocused(true);
1574
- onFocus && onFocus(e);
1575
- }, []);
1576
- const handleBlur = useCallback(() => {
1577
- setIsFocused(false);
1578
- onChange && onChange(normalize(value));
1579
- onBlur && onBlur();
1580
- }, [onChange, value]);
1581
- return {
1582
- value: (isFocused || !format ? value : format(value)),
1583
- onFocus: handleFocus,
1584
- onBlur: handleBlur,
1585
- };
1586
- };
1587
-
1588
- const clamp = (value, min, max) => Math.max(min, Math.min(value, max));
1589
-
1590
- function parseDecimal(value) {
1591
- const rawValue = (value || '').replace(/\D/g, '');
1592
- const unsafeDecimal = parseInt(rawValue, 10);
1593
- return Number.isNaN(unsafeDecimal) ? 0 : unsafeDecimal;
1594
- }
1595
-
1596
- function renderRangeWithTicks({ list = [], min, max, step, value = list[0] || min, disabled, onChange, }) {
1597
- const rangeValue = list.length ? list.indexOf(value) : value;
1598
- const rangeValueShift = rangeValue > min ? rangeValue - min : 0;
1599
- const percentage = (rangeValueShift * 100) / (max - min);
1600
- const inputStyle = {
1601
- backgroundSize: `${percentage.toFixed(2)}% 100%`,
1602
- };
1603
- return (jsxs("div", { children: [list.length ? (jsx("div", { className: "absolute w-full flex justify-between -bottom-[3px] px-m", children: list.map((_, i) => (jsx("div", { className: style('w-2 h-2 rounded-full', rangeValue <= i || disabled ? 'bg-gray' : 'bg-primary-main') }, String(i)))) })) : null, jsx("div", { className: "absolute inset-x-0 -bottom-1 px-m leading-[18px]", children: jsx("input", { className: "box-border w-full m-0 cursor-pointer slider relative z-10", style: inputStyle, type: "range", min: min, max: max, step: step, value: rangeValue, disabled: disabled, onInput: ((e) => {
1604
- const rawValue = parseDecimal(e.target?.value);
1605
- const newValue = list.length ? list[rawValue] : rawValue;
1606
- onChange && onChange(newValue || 0);
1607
- }) }) })] }));
1608
- }
1609
-
1610
- const DISABLED_INPUT_CLASSES = 'disabled:border-gray disabled:bg-main-divider';
1611
- const DEFAULT_MIN = 1;
1612
- const DEFAULT_MAX = 100;
1613
- const InputRange = JSX((props) => {
1614
- const { className, title, items = [], list = [], min = list.length ? 0 : DEFAULT_MIN, max = list.length ? list.length - 1 : DEFAULT_MAX, step = 1, value = list[0] || min, disabled = false, onChange, } = props;
1615
- const normalizedProps = useNormalizedInput(props, {
1616
- normalize: (_ = 0) => list.length ? closestValue(list)(_) : clamp(_, min, max),
1617
- format: toLocalNumberFormat(),
1618
- });
1619
- const handleChange = useCallback((e) => {
1620
- onChange && onChange(parseDecimal(e.target?.value));
1621
- }, [onChange]);
1622
- return (jsxs("div", { className: className, children: [jsxs("label", { className: "block relative", children: [title ? (jsx(Text, { size: "text-m", font: "font-light", color: "text-primary-text", children: title })) : null, jsx("input", { className: style('mt-xs font-sans text-h3 w-full h-14', 'border border-solid border-gray rounded-md outline-none', 'pl-m box-border', 'text-primary-text hover:border-primary-hover focus:border-primary-text', DISABLED_INPUT_CLASSES), disabled: disabled, onInput: handleChange, ...normalizedProps }), renderRangeWithTicks({ list, min, max, step, disabled, value, onChange })] }), renderRangeCaption(items)] }));
1623
- });
1624
- const closestValue = (list) => (_) => list.reduce((prev, curr) => (Math.abs(curr - _) < Math.abs(prev - _) ? curr : prev));
1625
- 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)))) }));
1626
-
1627
- 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') }) })] }));
1628
-
1629
- const initialFormState$6 = {
1630
- typeForm: { key: 'cred', text: 'Кредит' },
1631
- amount: MIN_CREDIT_AMOUNT,
1632
- term: 12,
1633
- fullName: '',
1634
- inn: '',
1635
- name: '',
1636
- phone: '',
1637
- email: '',
1638
- annualRevenue: '',
1639
- };
1640
- const creditValidator$1 = objectValidator({
1641
- fullName: defaultValidator,
1642
- annualRevenue: defaultValidator,
1643
- inn: innValidator,
1644
- name: nameValidator,
1645
- phone: phoneValidator,
1646
- region: defaultValidator,
1647
- });
1648
- const ApplicationFormCredit = JSX(({ button, link, onSubmit }) => {
1649
- const handleSubmit = useCallback((formState) => {
1650
- const { amount, term, addressBranch, annualRevenue, ...usedFields } = formState;
1651
- isValidationSuccess(creditValidator$1(formState)) &&
1652
- onSubmit({
1653
- ...usedFields,
1654
- addressBranch: addressBranch?.text || '',
1655
- partnerComments: `Сумма=${amount}/Срок=${term}/Выручка=${annualRevenue}`,
1656
- });
1657
- }, [onSubmit]);
1658
- const [formState, { field, ...formProps }] = useForm(initialFormState$6, {
1659
- onSubmit: handleSubmit,
1660
- });
1661
- 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 })] }));
1662
- });
1663
-
1664
- const initialFormState$5 = {
1665
- typeForm: { key: 'dpst', text: 'Заявка на депозит' },
1666
- name: '',
1667
- phone: '',
1668
- };
1669
- const depositValidator = objectValidator({
1670
- name: nameValidator,
1671
- phone: phoneValidator,
1672
- });
1673
- const ApplicationFormDeposit = JSX(({ button, link, onSubmit }) => {
1674
- const handleSubmit = useCallback((formState) => {
1675
- isValidationSuccess(depositValidator(formState)) && onSubmit(formState);
1676
- }, [onSubmit]);
1677
- const [, { field, ...formProps }] = useForm(initialFormState$5, {
1678
- onSubmit: handleSubmit,
1679
- resetOnSubmit: false,
1680
- });
1681
- 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 })] }) }) }));
1682
- });
1683
-
1684
- const FEEDBACK_TYPES = [
1685
- {
1686
- text: 'Задать вопрос по продуктам и услугам',
1687
- key: 'FEEDBACK',
1688
- },
1689
- {
1690
- text: 'Качество обслуживания',
1691
- key: 'FEEDBACK_QS',
1692
- },
1693
- ];
1694
- const FEEDBACK_METHOD = [
1695
- { key: 'phone', text: 'Телефонный звонок' },
1696
- { key: 'mail', text: 'Электронное сообщение' },
1697
- ];
1698
- const SERVICE_DIRECTIONS = [
1699
- { key: 'Физическое лицо' },
1700
- { key: 'Юридическое лицо / ИП' },
1701
- ];
1702
-
1703
- const feedbackValidatorDefaultObject = {
1704
- typeForm: defaultValidator,
1705
- region: defaultValidator,
1706
- surname: defaultValidator,
1707
- name: nameValidator,
1708
- feedbackMethod: defaultValidator,
1709
- phone: phoneValidator,
1710
- email: defaultValidator,
1711
- comment: defaultValidator,
1712
- consentDataProcessing: checkboxValidator,
1713
- };
1714
- const handleSubmitIndividual = (formState, onSubmit) => {
1715
- const feedbackValidator = objectValidator({
1716
- ...feedbackValidatorDefaultObject,
1717
- addressBranch: defaultValidator,
1718
- });
1719
- isValidationSuccess(feedbackValidator(formState)) && onSubmit(formState, true);
1720
- };
1721
- const handleSubmitLegal = (formState, onSubmit) => {
1722
- const feedbackValidator = objectValidator({
1723
- ...feedbackValidatorDefaultObject,
1724
- addressBranch: defaultValidator,
1725
- inn: innValidator,
1726
- });
1727
- isValidationSuccess(feedbackValidator(formState)) && onSubmit(formState, false);
1728
- };
1729
- const handleSubmitQuestion = (formState, onSubmit) => {
1730
- const feedbackValidator = objectValidator({
1731
- ...feedbackValidatorDefaultObject,
1732
- birthday: defaultValidator,
1733
- });
1734
- isValidationSuccess(feedbackValidator(formState)) && onSubmit(formState, true);
1735
- };
1736
-
1737
- const initialFormState$4 = {
1738
- ...initialUserFormState,
1739
- typeForm: { key: 'FEEDBACK', text: 'Задать вопрос по продуктам и услугам' },
1740
- serviceDirection: { key: 'Физическое лицо' },
1741
- birthday: undefined,
1742
- feedbackMethod: { key: 'Телефонный звонок' },
1743
- phone: '',
1744
- email: '',
1693
+ feedbackMethod: { key: 'Телефонный звонок' },
1694
+ phone: '',
1695
+ email: '',
1745
1696
  comment: '',
1746
1697
  consentDataProcessing: false,
1747
1698
  };
1748
1699
  const ApplicationFormFeedback = JSX(({ button, link, onSubmit }) => {
1749
1700
  const handleSubmit = useCallback((feedbackFormState) => {
1750
- const isLegal = getLegalEntity(feedbackFormState.typeForm.key, feedbackFormState.serviceDirection?.key);
1751
- if (isLegal) {
1752
- handleSubmitLegal(feedbackFormState, onSubmit);
1753
- }
1754
- else if (feedbackFormState.typeForm.key === 'FEEDBACK') {
1755
- handleSubmitQuestion(feedbackFormState, onSubmit);
1756
- }
1757
- else {
1758
- handleSubmitIndividual(feedbackFormState, onSubmit);
1759
- }
1701
+ handleSubmitFeedback(feedbackFormState, onSubmit);
1760
1702
  }, [onSubmit]);
1761
- const [formState, { field, ...formProps }] = useForm(initialFormState$4, {
1703
+ const [formState, { field, ...formProps }] = useForm(initialFormState$5, {
1762
1704
  onSubmit: handleSubmit,
1763
1705
  });
1764
1706
  const isQualityService = field('typeForm').value?.key === 'FEEDBACK_QS';
@@ -1789,7 +1731,7 @@
1789
1731
  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] }));
1790
1732
  });
1791
1733
 
1792
- const initialFormState$3 = {
1734
+ const initialFormState$4 = {
1793
1735
  ...initialUserFormState,
1794
1736
  phone: '',
1795
1737
  email: '',
@@ -1813,11 +1755,11 @@
1813
1755
  product,
1814
1756
  }, true);
1815
1757
  }, [onSubmit]);
1816
- const [, { field, ...formProps }] = useForm(initialFormState$3, { onSubmit: handleSubmit });
1758
+ const [, { field, ...formProps }] = useForm(initialFormState$4, { onSubmit: handleSubmit });
1817
1759
  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) })] })] }), renderAgreementWithSubmit(field('consentDataProcessing'), link, button)] }));
1818
1760
  });
1819
1761
 
1820
- const initialFormState$2 = {
1762
+ const initialFormState$3 = {
1821
1763
  typeForm: { key: 'SELFCOLLECTION', text: 'Самоинкассация' },
1822
1764
  fullName: '',
1823
1765
  phone: '',
@@ -1833,7 +1775,7 @@
1833
1775
  const handleSubmit = useCallback((formState) => {
1834
1776
  isValidationSuccess(feedbackValidator(formState)) && onSubmit(formState, false);
1835
1777
  }, [onSubmit]);
1836
- const [, { field, ...formProps }] = useForm(initialFormState$2, { onSubmit: handleSubmit });
1778
+ const [, { field, ...formProps }] = useForm(initialFormState$3, { onSubmit: handleSubmit });
1837
1779
  return (jsx("form", { className: formStyle$1, onSubmit: formProps.onSubmit, children: jsx(ApplicationFieldsetLayout, { children: jsxs("div", { className: oneColumnFormStyle, children: [jsx(InputControl, { label: "\u0424\u0418\u041E", ...withValidator(field('fullName'), defaultValidator) }), jsx(RegionField, { field: field }), jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) }), renderAgreementWithSubmit(field('consentDataProcessing'), link, button)] }) }) }));
1838
1780
  });
1839
1781
 
@@ -1850,7 +1792,7 @@
1850
1792
  { key: 'ULTRASERVICE', text: 'Ультра' },
1851
1793
  { key: 'PREMIUMSERVICE', text: 'Премиум' },
1852
1794
  ];
1853
- const initialFormState$1 = {
1795
+ const initialFormState$2 = {
1854
1796
  typeForm: SERVICE_TYPES[0],
1855
1797
  ...initialUserFormState,
1856
1798
  email: '',
@@ -1872,7 +1814,7 @@
1872
1814
  const isValid = isValidationSuccess(creditValidator(formState));
1873
1815
  isValid && onSubmit(formState, true);
1874
1816
  }, [onSubmit]);
1875
- const [formState, { field, ...formProps }] = useForm({ ...initialFormState$1, typeForm: getDefaultFormType(defaultType) }, { onSubmit: handleSubmit });
1817
+ const [formState, { field, ...formProps }] = useForm({ ...initialFormState$2, typeForm: getDefaultFormType(defaultType) }, { onSubmit: handleSubmit });
1876
1818
  const regionKey = formState?.region?.key;
1877
1819
  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 }), renderAgreementWithSubmit(field('consentDataProcessing'), link, button)] }));
1878
1820
  });
@@ -1892,7 +1834,7 @@
1892
1834
  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-lg 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] })] }));
1893
1835
  };
1894
1836
 
1895
- const initialFormState = {
1837
+ const initialFormState$1 = {
1896
1838
  typeForm: { key: 'KVED', text: 'Заявка на консультацию ВЭД' },
1897
1839
  vedTypes: 'currencyControl',
1898
1840
  fullName: '',
@@ -1938,7 +1880,7 @@
1938
1880
  };
1939
1881
  isValidationSuccess(getValidator(vedTypes)(formState)) && onSubmit(data);
1940
1882
  }, [onSubmit]);
1941
- const [, { field, ...formProps }] = useForm(initialFormState, { onSubmit: handleSubmit });
1883
+ const [, { field, ...formProps }] = useForm(initialFormState$1, { onSubmit: handleSubmit });
1942
1884
  return (jsxs("form", { className: "container space-y-lg", onSubmit: formProps.onSubmit, children: [renderQuestionsInterested(field), jsx(Heading, { headingType: "h6", title: "\u0414\u0430\u043D\u043D\u044B\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", className: "@xl:text-center" }), renderWedDataOrganization({ field }), jsx(InputControl, { label: "\u041E\u0431\u0440\u0430\u0449\u0435\u043D\u0438\u0435", placeholder: "\u0423\u043A\u0430\u0436\u0438\u0442\u0435 \u0438\u043D\u0442\u0435\u0440\u0435\u0441\u0443\u044E\u0449\u0438\u0439 \u0432\u0430\u0441 \u0432\u043E\u043F\u0440\u043E\u0441, \u043C\u0435\u0441\u0442\u043E \u0432\u0435\u0434\u0435\u043D\u0438\u044F \u0431\u0438\u0437\u043D\u0435\u0441\u0430 \u0438 \u0443\u0434\u043E\u0431\u043D\u043E\u0435 \u0432\u0440\u0435\u043C\u044F \u0434\u043B\u044F \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u043D\u043E\u0433\u043E \u0437\u0432\u043E\u043D\u043A\u0430", ...field('partnerComments'), isTextarea: true }), renderSubmitButton(button), jsx(Footnote, { link: link }), jsx(Heading, { headingType: "h6", title: "\u0418\u043B\u0438 \u0441\u0432\u044F\u0436\u0438\u0442\u0435\u0441\u044C \u0441 \u043D\u0430\u043C\u0438 \u0443\u0434\u043E\u0431\u043D\u044B\u043C \u0441\u043F\u043E\u0441\u043E\u0431\u043E\u043C", className: "@xl:text-center" }), renderContacts()] }));
1943
1885
  });
1944
1886
 
@@ -1951,26 +1893,17 @@
1951
1893
  ApplicationFormGrantSupport,
1952
1894
  ApplicationFormIndividuals,
1953
1895
  ApplicationFormFeedback,
1954
- ApplicationFormAntiFraud,
1955
- ApplicationFormCorruption,
1956
1896
  ApplicationFormSelfCollection,
1957
1897
  ApplicationFormUltraPremium,
1958
1898
  };
1959
1899
 
1960
- const ResponseNotification = JSX(({ responseType }) => {
1961
- const responseOK = responseType === 'OK';
1962
- const backgroundColor = responseOK ? 'bg-ok' : 'bg-fail';
1963
- const statusIcon = responseOK ? 'ResponseOKIcon' : 'ResponseFailIcon';
1964
- return (jsxs("div", { className: `flex items-center p-lg rounded-md space-x-m ${backgroundColor}`, children: [jsx(Img, { image: { icon: statusIcon ? 'ResponseOKIcon' : 'ResponseFailIcon', iconVersion: 'normal' }, width: "42", height: "42" }), jsxs("div", { children: [jsx(Heading, { headingType: "h6", title: responseOK ? 'Ваша заявка отправлена' : 'Не удалось отправить заявку', className: "mb-2xs" }), jsx(Text, { size: "text-l", font: "font-light", color: "text-secondary-text", children: responseOK ? 'Совсем скоро мы с вами свяжемся' : 'Пожалуйста, повторите позднее' })] })] }));
1965
- });
1966
-
1967
- const API = LeadServiceAPI();
1900
+ const API$1 = LeadServiceAPI();
1968
1901
  const ApplicationForm = JSX((props) => {
1969
1902
  const { className, formBlock, ...rest } = props;
1970
1903
  const [responseType, setResponseType] = useState('');
1971
1904
  const handleSubmit = useCallback(async (data, isIndividualType = false) => {
1972
- const formatData = getFormatData(data);
1973
- const status = (await API.send(formatData, isIndividualType)) ? 'OK' : 'Fail';
1905
+ const formatData = getFormatData$1(data);
1906
+ const status = (await API$1.send(formatData, isIndividualType)) ? 'OK' : 'Fail';
1974
1907
  setResponseType(status);
1975
1908
  return status;
1976
1909
  }, []);
@@ -1984,8 +1917,92 @@
1984
1917
  const EmbeddedForm = EmbeddableForms[type];
1985
1918
  return jsx(EmbeddedForm, { ...formBlock, onSubmit: handleSubmit });
1986
1919
  };
1920
+ const getFormatData$1 = (data) => Object.fromEntries(Object.entries(data).map(([k, v]) => [k, (v?.region ? v?.text : v?.key) || v]));
1921
+
1922
+ const ApplicationFormLayout = JSX((props) => {
1923
+ const { className, title, responseType, children, ...rest } = props;
1924
+ 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] }) }));
1925
+ });
1926
+
1987
1927
  const getFormatData = (data) => Object.fromEntries(Object.entries(data).map(([k, v]) => [k, (v?.region ? v?.text : v?.key) || v]));
1988
1928
 
1929
+ const columnStyle = {
1930
+ 1: 'space-y-s max-w-xl mx-auto',
1931
+ 2: 'grid @xl:grid-cols-2 gap-s',
1932
+ };
1933
+
1934
+ 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)] })));
1935
+
1936
+ const getField = (input, field, i) => {
1937
+ const InputsMap = {
1938
+ surname: (jsx(InputControl, { label: "\u0424\u0430\u043C\u0438\u043B\u0438\u044F", ...getValidation(field('surname'), nameValidator, input?.required) }, i)),
1939
+ name: (jsx(InputControl, { label: "\u0418\u043C\u044F", ...getValidation(field('name'), nameValidator, input?.required) }, i)),
1940
+ 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') }, i)),
1941
+ phone: (jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...getValidation(field('phone'), phoneValidator, input?.required) }, i)),
1942
+ email: (jsx(InputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...getValidation(field('email'), defaultValidator, input?.required) }, i)),
1943
+ comment: (jsx(InputControl, { className: "col-span-2", ...getValidation(field('comment'), defaultValidator, input?.required), placeholder: "\u0412\u0430\u0448\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435", isTextarea: true }, i)),
1944
+ region: jsx(RegionField, { field: field }, i),
1945
+ client: (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"' })),
1946
+ birthday: (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0440\u043E\u0436\u0434\u0435\u043D\u0438\u044F", ...getValidation(field('birthday'), defaultValidator) })),
1947
+ legend: (jsx("legend", { className: "w-full col-span-2", children: jsx(Heading, { title: input.label, headingType: "h6", className: "@xl:text-center" }) }, i)),
1948
+ };
1949
+ return InputsMap[input.name];
1950
+ };
1951
+ const getValidation = (field, validator, required = false) => required ? withValidator(field, validator) : field;
1952
+
1953
+ const getNamesFromInput = (inputs) => Object.values(inputs).map((_) => _.name);
1954
+
1955
+ const initialFormState = {
1956
+ typeForm: { key: '', text: '' },
1957
+ region: { key: '', text: '' },
1958
+ surname: '',
1959
+ name: '',
1960
+ middleName: '',
1961
+ phone: '',
1962
+ email: '',
1963
+ comment: '',
1964
+ consentDataProcessing: false,
1965
+ };
1966
+ const getInitialFormState = (inputs, typeForm = '') => {
1967
+ const formState = Object.fromEntries(getNamesFromInput(inputs).map((_) => [_, initialFormState[_]]));
1968
+ return { ...formState, typeForm: { key: typeForm, text: '' } };
1969
+ };
1970
+
1971
+ const validator = {
1972
+ typeForm: defaultValidator,
1973
+ surname: nameValidator,
1974
+ name: nameValidator,
1975
+ region: defaultValidator,
1976
+ phone: phoneValidator,
1977
+ email: defaultValidator,
1978
+ comment: defaultValidator,
1979
+ consentDataProcessing: checkboxValidator,
1980
+ };
1981
+ const getObjectValidator = (inputs) => {
1982
+ const requiredInputs = getNamesFromInput(inputs.filter((_) => ('required' in _ ? _.required : false)));
1983
+ return Object.fromEntries(requiredInputs.map((_) => [_, validator?.[_]]));
1984
+ };
1985
+
1986
+ const API = LeadServiceAPI();
1987
+ const ApplicationFormCustom = JSX(({ className, title, typeForm = '', inputs = [], button, link, formColumns = 2, endpoint }) => {
1988
+ const initialFormState = getInitialFormState(inputs, typeForm);
1989
+ const [responseType, setResponseType] = useState('');
1990
+ const feedbackValidator = objectValidator(getObjectValidator(inputs));
1991
+ const handleSubmit = useCallback(async (data) => {
1992
+ if (!isValidationSuccess(feedbackValidator(data))) {
1993
+ return 'Fail';
1994
+ }
1995
+ const formatData = getFormatData(data);
1996
+ const status = (await API.send(formatData, endpoint === 'lead')) ? 'OK' : 'Fail';
1997
+ setResponseType(status);
1998
+ return status;
1999
+ }, []);
2000
+ const [, { field, onSubmit }] = useForm(initialFormState, { onSubmit: handleSubmit });
2001
+ return (jsx(ApplicationFormLayout, { className: style(formStyle$1, className), title: title, responseType: responseType, children: jsxs("form", { className: columnStyle[formColumns], onSubmit: onSubmit, children: [inputs.map((_, index) => getField(_, field, String(index))), inputs.find((_) => _.name === 'consentDataProcessing')
2002
+ ? renderAgreementWithSubmit(field('consentDataProcessing'), link, button)
2003
+ : renderSubmitButton(button)] }) }));
2004
+ });
2005
+
1989
2006
  const AlignStyles = 'text-left';
1990
2007
 
1991
2008
  const iconBgStyles = {
@@ -5478,6 +5495,8 @@
5478
5495
 
5479
5496
  const Blocks = {
5480
5497
  AdTile,
5498
+ ApplicationFormCorruption: ApplicationFormCustom,
5499
+ ApplicationFormCustom,
5481
5500
  ApplicationForm,
5482
5501
  BenefitsBlock,
5483
5502
  BonusBenefitsBlock,
@@ -5629,7 +5648,7 @@
5629
5648
 
5630
5649
  const joinList = (sep) => (list) => list.reduce((acc, el, i) => (acc.length ? acc.concat({ ...sep, key: `sep-${i}` }, el) : [el]), []);
5631
5650
 
5632
- const packageVersion = "0.14.169";
5651
+ const packageVersion = "0.14.170";
5633
5652
 
5634
5653
  exports.Blocks = Blocks;
5635
5654
  exports.ContentPage = ContentPage;