@redneckz/wildless-cms-uni-blocks 0.14.825 → 0.14.827

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 (622) hide show
  1. package/bundle/bundle.umd.js +326 -275
  2. package/bundle/bundle.umd.min.js +1 -1
  3. package/bundle/components/ApplicationLeadForm/ApplicationLeadForm.d.ts +5 -0
  4. package/bundle/components/ApplicationLeadForm/EsiaLoginBanner.d.ts +4 -0
  5. package/bundle/components/ApplicationLeadForm/applicationFormData.d.ts +0 -1
  6. package/bundle/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -1
  7. package/bundle/components/ApplicationLeadForm/parseEsiaProfile.d.ts +2 -2
  8. package/bundle/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +1 -2
  9. package/bundle/components/ApplicationLeadForm/useInitApplicationLead.d.ts +4 -4
  10. package/bundle/retail/api/checkCode.d.ts +1 -0
  11. package/bundle/retail/api/{updateProfileEsia.d.ts → esiaRequestProfile.d.ts} +11 -4
  12. package/bundle/retail/api/updateUserTask.d.ts +1 -0
  13. package/bundle/retail/api/uploadFile.d.ts +1 -1
  14. package/bundle/retail/inputs.d.ts +5 -1
  15. package/bundle/retail/model/NameFieldDef.d.ts +1 -1
  16. package/bundle/retail/utils/isEsiaAuthorize.d.ts +2 -1
  17. package/bundle/retail/validator/getRetailFormValidator.d.ts +11 -0
  18. package/bundle/retail/validator/validators.d.ts +2 -0
  19. package/bundle/ui-kit/FormField/shouldRenderField.d.ts +1 -1
  20. package/dist/components/ApplicationLeadForm/ApplicationLeadForm.d.ts +5 -0
  21. package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +26 -8
  22. package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  23. package/dist/components/ApplicationLeadForm/EsiaLoginBanner.d.ts +4 -0
  24. package/dist/components/ApplicationLeadForm/EsiaLoginBanner.js +22 -0
  25. package/dist/components/ApplicationLeadForm/EsiaLoginBanner.js.map +1 -0
  26. package/dist/components/ApplicationLeadForm/applicationFormData.d.ts +0 -1
  27. package/dist/components/ApplicationLeadForm/applicationFormData.js +6 -31
  28. package/dist/components/ApplicationLeadForm/applicationFormData.js.map +1 -1
  29. package/dist/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -1
  30. package/dist/components/ApplicationLeadForm/getInitialFormState.js +8 -2
  31. package/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  32. package/dist/components/ApplicationLeadForm/parseEsiaProfile.d.ts +2 -2
  33. package/dist/components/ApplicationLeadForm/parseEsiaProfile.js +84 -54
  34. package/dist/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
  35. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +1 -2
  36. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +53 -53
  37. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  38. package/dist/components/ApplicationLeadForm/useInitApplicationLead.d.ts +4 -4
  39. package/dist/components/ApplicationLeadForm/useInitApplicationLead.js +16 -24
  40. package/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  41. package/dist/components/CreditCardForm/CreditCardFormStep.js +7 -11
  42. package/dist/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
  43. package/dist/components/CreditForm/CreditFormStep.js +7 -11
  44. package/dist/components/CreditForm/CreditFormStep.js.map +1 -1
  45. package/dist/components/DebitForm/DebitFormStep.js +7 -11
  46. package/dist/components/DebitForm/DebitFormStep.js.map +1 -1
  47. package/dist/retail/api/checkCode.d.ts +1 -0
  48. package/dist/retail/api/checkCode.js +3 -2
  49. package/dist/retail/api/checkCode.js.map +1 -1
  50. package/{lib/retail/api/updateProfileEsia.d.ts → dist/retail/api/esiaRequestProfile.d.ts} +11 -4
  51. package/dist/retail/api/esiaRequestProfile.js +10 -0
  52. package/dist/retail/api/esiaRequestProfile.js.map +1 -0
  53. package/dist/retail/api/updateUserTask.d.ts +1 -0
  54. package/dist/retail/api/updateUserTask.js.map +1 -1
  55. package/dist/retail/api/uploadFile.d.ts +1 -1
  56. package/dist/retail/api/uploadFile.js +2 -3
  57. package/dist/retail/api/uploadFile.js.map +1 -1
  58. package/dist/retail/components/DraftDialog/parseDraftTask.js +2 -1
  59. package/dist/retail/components/DraftDialog/parseDraftTask.js.map +1 -1
  60. package/dist/retail/components/Fields/AddressField.js +1 -1
  61. package/dist/retail/components/Fields/AddressField.js.map +1 -1
  62. package/dist/retail/components/Fields/BeginDateField.js +2 -1
  63. package/dist/retail/components/Fields/BeginDateField.js.map +1 -1
  64. package/dist/retail/components/Fields/BirthPlaceField.js +1 -2
  65. package/dist/retail/components/Fields/BirthPlaceField.js.map +1 -1
  66. package/dist/retail/components/Fields/ConfirmationIncomeField.js +4 -1
  67. package/dist/retail/components/Fields/ConfirmationIncomeField.js.map +1 -1
  68. package/dist/retail/components/Fields/DaDataInnField.js +2 -1
  69. package/dist/retail/components/Fields/DaDataInnField.js.map +1 -1
  70. package/dist/retail/components/Fields/DulIssueDateField.js +2 -2
  71. package/dist/retail/components/Fields/DulIssueDateField.js.map +1 -1
  72. package/dist/retail/components/Fields/DulIssuedByField.js +1 -1
  73. package/dist/retail/components/Fields/DulIssuedByField.js.map +1 -1
  74. package/dist/retail/components/Fields/DulNumberField.js +1 -1
  75. package/dist/retail/components/Fields/DulNumberField.js.map +1 -1
  76. package/dist/retail/components/Fields/DulSerieField.js +1 -1
  77. package/dist/retail/components/Fields/DulSerieField.js.map +1 -1
  78. package/dist/retail/components/Fields/DulSubdivisionCodeField.js +1 -1
  79. package/dist/retail/components/Fields/DulSubdivisionCodeField.js.map +1 -1
  80. package/dist/retail/components/Fields/Experience5YearsField.js +2 -1
  81. package/dist/retail/components/Fields/Experience5YearsField.js.map +1 -1
  82. package/dist/retail/components/Fields/GeneralSeniorityField.js +2 -1
  83. package/dist/retail/components/Fields/GeneralSeniorityField.js.map +1 -1
  84. package/dist/retail/components/Fields/JobsNumberField.js +2 -1
  85. package/dist/retail/components/Fields/JobsNumberField.js.map +1 -1
  86. package/dist/retail/components/Fields/LastJobExperienceField.js +2 -1
  87. package/dist/retail/components/Fields/LastJobExperienceField.js.map +1 -1
  88. package/dist/retail/components/Fields/LimitedBirthdayField.js +1 -1
  89. package/dist/retail/components/Fields/LimitedBirthdayField.js.map +1 -1
  90. package/dist/retail/components/Fields/MiddleNameField.js +1 -1
  91. package/dist/retail/components/Fields/MiddleNameField.js.map +1 -1
  92. package/dist/retail/components/Fields/NameField.js +1 -1
  93. package/dist/retail/components/Fields/NameField.js.map +1 -1
  94. package/dist/retail/components/Fields/OrganizationNameField.js +2 -1
  95. package/dist/retail/components/Fields/OrganizationNameField.js.map +1 -1
  96. package/dist/retail/components/Fields/SurnameField.js +1 -2
  97. package/dist/retail/components/Fields/SurnameField.js.map +1 -1
  98. package/dist/retail/components/Fields/WagesField.js +2 -1
  99. package/dist/retail/components/Fields/WagesField.js.map +1 -1
  100. package/dist/retail/content.js +11 -5
  101. package/dist/retail/content.js.map +1 -1
  102. package/dist/retail/inputs.d.ts +5 -1
  103. package/dist/retail/inputs.js +1 -1
  104. package/dist/retail/inputs.js.map +1 -1
  105. package/dist/retail/model/NameFieldDef.d.ts +1 -1
  106. package/dist/retail/utils/isEsiaAuthorize.d.ts +2 -1
  107. package/dist/retail/utils/isEsiaAuthorize.js +3 -1
  108. package/dist/retail/utils/isEsiaAuthorize.js.map +1 -1
  109. package/dist/retail/utils/mainFormStateMap.js +1 -0
  110. package/dist/retail/utils/mainFormStateMap.js.map +1 -1
  111. package/dist/retail/validator/getRetailFormValidator.d.ts +11 -0
  112. package/dist/retail/validator/getRetailFormValidator.js +14 -0
  113. package/dist/retail/validator/getRetailFormValidator.js.map +1 -0
  114. package/dist/retail/validator/validatorObj.js +1 -2
  115. package/dist/retail/validator/validatorObj.js.map +1 -1
  116. package/dist/retail/validator/validators.d.ts +2 -0
  117. package/dist/retail/validator/validators.js +11 -1
  118. package/dist/retail/validator/validators.js.map +1 -1
  119. package/dist/ui-kit/FormField/Fields/MiddleNameField.js +1 -1
  120. package/dist/ui-kit/FormField/Fields/MiddleNameField.js.map +1 -1
  121. package/dist/ui-kit/FormField/Fields/NameField.js +1 -1
  122. package/dist/ui-kit/FormField/Fields/NameField.js.map +1 -1
  123. package/dist/ui-kit/FormField/Fields/PhoneField.js +2 -1
  124. package/dist/ui-kit/FormField/Fields/PhoneField.js.map +1 -1
  125. package/dist/ui-kit/FormField/Fields/SurnameField.js +1 -1
  126. package/dist/ui-kit/FormField/Fields/SurnameField.js.map +1 -1
  127. package/dist/ui-kit/FormField/shouldRenderField.d.ts +1 -1
  128. package/dist/ui-kit/FormField/shouldRenderField.js +1 -1
  129. package/dist/ui-kit/FormField/shouldRenderField.js.map +1 -1
  130. package/lib/common.css +1 -1
  131. package/lib/components/ApplicationLeadForm/ApplicationLeadForm.d.ts +5 -0
  132. package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +26 -8
  133. package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  134. package/lib/components/ApplicationLeadForm/EsiaLoginBanner.d.ts +4 -0
  135. package/lib/components/ApplicationLeadForm/EsiaLoginBanner.js +20 -0
  136. package/lib/components/ApplicationLeadForm/EsiaLoginBanner.js.map +1 -0
  137. package/lib/components/ApplicationLeadForm/applicationFormData.d.ts +0 -1
  138. package/lib/components/ApplicationLeadForm/applicationFormData.js +5 -30
  139. package/lib/components/ApplicationLeadForm/applicationFormData.js.map +1 -1
  140. package/lib/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -1
  141. package/lib/components/ApplicationLeadForm/getInitialFormState.js +8 -2
  142. package/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  143. package/lib/components/ApplicationLeadForm/parseEsiaProfile.d.ts +2 -2
  144. package/lib/components/ApplicationLeadForm/parseEsiaProfile.js +84 -54
  145. package/lib/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
  146. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +1 -2
  147. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +53 -53
  148. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  149. package/lib/components/ApplicationLeadForm/useInitApplicationLead.d.ts +4 -4
  150. package/lib/components/ApplicationLeadForm/useInitApplicationLead.js +16 -24
  151. package/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  152. package/lib/components/CreditCardForm/CreditCardFormStep.js +7 -11
  153. package/lib/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
  154. package/lib/components/CreditForm/CreditFormStep.js +7 -11
  155. package/lib/components/CreditForm/CreditFormStep.js.map +1 -1
  156. package/lib/components/DebitForm/DebitFormStep.js +7 -11
  157. package/lib/components/DebitForm/DebitFormStep.js.map +1 -1
  158. package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +1 -1
  159. package/lib/retail/api/checkCode.d.ts +1 -0
  160. package/lib/retail/api/checkCode.js +1 -1
  161. package/lib/retail/api/checkCode.js.map +1 -1
  162. package/{mobile/bundle/retail/api/updateProfileEsia.d.ts → lib/retail/api/esiaRequestProfile.d.ts} +11 -4
  163. package/lib/retail/api/esiaRequestProfile.js +7 -0
  164. package/lib/retail/api/esiaRequestProfile.js.map +1 -0
  165. package/lib/retail/api/updateUserTask.d.ts +1 -0
  166. package/lib/retail/api/updateUserTask.js.map +1 -1
  167. package/lib/retail/api/uploadFile.d.ts +1 -1
  168. package/lib/retail/api/uploadFile.js +2 -3
  169. package/lib/retail/api/uploadFile.js.map +1 -1
  170. package/lib/retail/components/DraftDialog/parseDraftTask.js +2 -1
  171. package/lib/retail/components/DraftDialog/parseDraftTask.js.map +1 -1
  172. package/lib/retail/components/Fields/AddressField.js +1 -1
  173. package/lib/retail/components/Fields/AddressField.js.map +1 -1
  174. package/lib/retail/components/Fields/BeginDateField.js +2 -1
  175. package/lib/retail/components/Fields/BeginDateField.js.map +1 -1
  176. package/lib/retail/components/Fields/BirthPlaceField.js +1 -2
  177. package/lib/retail/components/Fields/BirthPlaceField.js.map +1 -1
  178. package/lib/retail/components/Fields/ConfirmationIncomeField.js +5 -2
  179. package/lib/retail/components/Fields/ConfirmationIncomeField.js.map +1 -1
  180. package/lib/retail/components/Fields/DaDataInnField.js +2 -1
  181. package/lib/retail/components/Fields/DaDataInnField.js.map +1 -1
  182. package/lib/retail/components/Fields/DulIssueDateField.js +2 -2
  183. package/lib/retail/components/Fields/DulIssueDateField.js.map +1 -1
  184. package/lib/retail/components/Fields/DulIssuedByField.js +1 -1
  185. package/lib/retail/components/Fields/DulIssuedByField.js.map +1 -1
  186. package/lib/retail/components/Fields/DulNumberField.js +1 -1
  187. package/lib/retail/components/Fields/DulNumberField.js.map +1 -1
  188. package/lib/retail/components/Fields/DulSerieField.js +1 -1
  189. package/lib/retail/components/Fields/DulSerieField.js.map +1 -1
  190. package/lib/retail/components/Fields/DulSubdivisionCodeField.js +1 -1
  191. package/lib/retail/components/Fields/DulSubdivisionCodeField.js.map +1 -1
  192. package/lib/retail/components/Fields/Experience5YearsField.js +2 -1
  193. package/lib/retail/components/Fields/Experience5YearsField.js.map +1 -1
  194. package/lib/retail/components/Fields/GeneralSeniorityField.js +2 -1
  195. package/lib/retail/components/Fields/GeneralSeniorityField.js.map +1 -1
  196. package/lib/retail/components/Fields/JobsNumberField.js +2 -1
  197. package/lib/retail/components/Fields/JobsNumberField.js.map +1 -1
  198. package/lib/retail/components/Fields/LastJobExperienceField.js +2 -1
  199. package/lib/retail/components/Fields/LastJobExperienceField.js.map +1 -1
  200. package/lib/retail/components/Fields/LimitedBirthdayField.js +1 -1
  201. package/lib/retail/components/Fields/LimitedBirthdayField.js.map +1 -1
  202. package/lib/retail/components/Fields/MiddleNameField.js +1 -1
  203. package/lib/retail/components/Fields/MiddleNameField.js.map +1 -1
  204. package/lib/retail/components/Fields/NameField.js +1 -1
  205. package/lib/retail/components/Fields/NameField.js.map +1 -1
  206. package/lib/retail/components/Fields/OrganizationNameField.js +2 -1
  207. package/lib/retail/components/Fields/OrganizationNameField.js.map +1 -1
  208. package/lib/retail/components/Fields/SurnameField.js +1 -2
  209. package/lib/retail/components/Fields/SurnameField.js.map +1 -1
  210. package/lib/retail/components/Fields/WagesField.js +2 -1
  211. package/lib/retail/components/Fields/WagesField.js.map +1 -1
  212. package/lib/retail/content.js +11 -5
  213. package/lib/retail/content.js.map +1 -1
  214. package/lib/retail/inputs.d.ts +5 -1
  215. package/lib/retail/inputs.js +1 -1
  216. package/lib/retail/inputs.js.map +1 -1
  217. package/lib/retail/model/NameFieldDef.d.ts +1 -1
  218. package/lib/retail/utils/isEsiaAuthorize.d.ts +2 -1
  219. package/lib/retail/utils/isEsiaAuthorize.js +3 -1
  220. package/lib/retail/utils/isEsiaAuthorize.js.map +1 -1
  221. package/lib/retail/utils/mainFormStateMap.js +1 -0
  222. package/lib/retail/utils/mainFormStateMap.js.map +1 -1
  223. package/lib/retail/validator/getRetailFormValidator.d.ts +11 -0
  224. package/lib/retail/validator/getRetailFormValidator.js +11 -0
  225. package/lib/retail/validator/getRetailFormValidator.js.map +1 -0
  226. package/lib/retail/validator/validatorObj.js +2 -3
  227. package/lib/retail/validator/validatorObj.js.map +1 -1
  228. package/lib/retail/validator/validators.d.ts +2 -0
  229. package/lib/retail/validator/validators.js +8 -0
  230. package/lib/retail/validator/validators.js.map +1 -1
  231. package/lib/ui-kit/FormField/Fields/MiddleNameField.js +1 -1
  232. package/lib/ui-kit/FormField/Fields/MiddleNameField.js.map +1 -1
  233. package/lib/ui-kit/FormField/Fields/NameField.js +1 -1
  234. package/lib/ui-kit/FormField/Fields/NameField.js.map +1 -1
  235. package/lib/ui-kit/FormField/Fields/PhoneField.js +2 -1
  236. package/lib/ui-kit/FormField/Fields/PhoneField.js.map +1 -1
  237. package/lib/ui-kit/FormField/Fields/SurnameField.js +1 -1
  238. package/lib/ui-kit/FormField/Fields/SurnameField.js.map +1 -1
  239. package/lib/ui-kit/FormField/shouldRenderField.d.ts +1 -1
  240. package/lib/ui-kit/FormField/shouldRenderField.js +1 -1
  241. package/lib/ui-kit/FormField/shouldRenderField.js.map +1 -1
  242. package/mobile/bundle/bundle.umd.js +320 -268
  243. package/mobile/bundle/bundle.umd.min.js +1 -1
  244. package/mobile/bundle/components/ApplicationLeadForm/ApplicationLeadForm.d.ts +5 -0
  245. package/mobile/bundle/components/ApplicationLeadForm/EsiaLoginBanner.d.ts +4 -0
  246. package/mobile/bundle/components/ApplicationLeadForm/applicationFormData.d.ts +0 -1
  247. package/mobile/bundle/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -1
  248. package/mobile/bundle/components/ApplicationLeadForm/parseEsiaProfile.d.ts +2 -2
  249. package/mobile/bundle/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +1 -2
  250. package/mobile/bundle/components/ApplicationLeadForm/useInitApplicationLead.d.ts +4 -4
  251. package/mobile/bundle/retail/api/checkCode.d.ts +1 -0
  252. package/{dist/retail/api/updateProfileEsia.d.ts → mobile/bundle/retail/api/esiaRequestProfile.d.ts} +11 -4
  253. package/mobile/bundle/retail/api/updateUserTask.d.ts +1 -0
  254. package/mobile/bundle/retail/api/uploadFile.d.ts +1 -1
  255. package/mobile/bundle/retail/inputs.d.ts +5 -1
  256. package/mobile/bundle/retail/model/NameFieldDef.d.ts +1 -1
  257. package/mobile/bundle/retail/utils/isEsiaAuthorize.d.ts +2 -1
  258. package/mobile/bundle/retail/validator/getRetailFormValidator.d.ts +11 -0
  259. package/mobile/bundle/retail/validator/validators.d.ts +2 -0
  260. package/mobile/bundle/ui-kit/FormField/shouldRenderField.d.ts +1 -1
  261. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.d.ts +5 -0
  262. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +26 -8
  263. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  264. package/mobile/dist/components/ApplicationLeadForm/EsiaLoginBanner.d.ts +4 -0
  265. package/mobile/dist/components/ApplicationLeadForm/EsiaLoginBanner.js +22 -0
  266. package/mobile/dist/components/ApplicationLeadForm/EsiaLoginBanner.js.map +1 -0
  267. package/mobile/dist/components/ApplicationLeadForm/applicationFormData.d.ts +0 -1
  268. package/mobile/dist/components/ApplicationLeadForm/applicationFormData.js +6 -31
  269. package/mobile/dist/components/ApplicationLeadForm/applicationFormData.js.map +1 -1
  270. package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -1
  271. package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.js +8 -2
  272. package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  273. package/mobile/dist/components/ApplicationLeadForm/parseEsiaProfile.d.ts +2 -2
  274. package/mobile/dist/components/ApplicationLeadForm/parseEsiaProfile.js +84 -54
  275. package/mobile/dist/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
  276. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +1 -2
  277. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +53 -53
  278. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  279. package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.d.ts +4 -4
  280. package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js +16 -24
  281. package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  282. package/mobile/dist/components/CreditCardForm/CreditCardFormStep.js +7 -11
  283. package/mobile/dist/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
  284. package/mobile/dist/components/CreditForm/CreditFormStep.js +7 -11
  285. package/mobile/dist/components/CreditForm/CreditFormStep.js.map +1 -1
  286. package/mobile/dist/components/DebitForm/DebitFormStep.js +7 -11
  287. package/mobile/dist/components/DebitForm/DebitFormStep.js.map +1 -1
  288. package/mobile/dist/retail/api/checkCode.d.ts +1 -0
  289. package/mobile/dist/retail/api/checkCode.js +3 -2
  290. package/mobile/dist/retail/api/checkCode.js.map +1 -1
  291. package/mobile/dist/retail/api/esiaRequestProfile.d.ts +84 -0
  292. package/mobile/dist/retail/api/esiaRequestProfile.js +10 -0
  293. package/mobile/dist/retail/api/esiaRequestProfile.js.map +1 -0
  294. package/mobile/dist/retail/api/updateUserTask.d.ts +1 -0
  295. package/mobile/dist/retail/api/updateUserTask.js.map +1 -1
  296. package/mobile/dist/retail/api/uploadFile.d.ts +1 -1
  297. package/mobile/dist/retail/api/uploadFile.js +2 -3
  298. package/mobile/dist/retail/api/uploadFile.js.map +1 -1
  299. package/mobile/dist/retail/components/DraftDialog/parseDraftTask.js +2 -1
  300. package/mobile/dist/retail/components/DraftDialog/parseDraftTask.js.map +1 -1
  301. package/mobile/dist/retail/components/Fields/AddressField.js +1 -1
  302. package/mobile/dist/retail/components/Fields/AddressField.js.map +1 -1
  303. package/mobile/dist/retail/components/Fields/BeginDateField.js +2 -1
  304. package/mobile/dist/retail/components/Fields/BeginDateField.js.map +1 -1
  305. package/mobile/dist/retail/components/Fields/BirthPlaceField.js +1 -2
  306. package/mobile/dist/retail/components/Fields/BirthPlaceField.js.map +1 -1
  307. package/mobile/dist/retail/components/Fields/ConfirmationIncomeField.js +4 -1
  308. package/mobile/dist/retail/components/Fields/ConfirmationIncomeField.js.map +1 -1
  309. package/mobile/dist/retail/components/Fields/DaDataInnField.js +2 -1
  310. package/mobile/dist/retail/components/Fields/DaDataInnField.js.map +1 -1
  311. package/mobile/dist/retail/components/Fields/DulIssueDateField.js +2 -2
  312. package/mobile/dist/retail/components/Fields/DulIssueDateField.js.map +1 -1
  313. package/mobile/dist/retail/components/Fields/DulIssuedByField.js +1 -1
  314. package/mobile/dist/retail/components/Fields/DulIssuedByField.js.map +1 -1
  315. package/mobile/dist/retail/components/Fields/DulNumberField.js +1 -1
  316. package/mobile/dist/retail/components/Fields/DulNumberField.js.map +1 -1
  317. package/mobile/dist/retail/components/Fields/DulSerieField.js +1 -1
  318. package/mobile/dist/retail/components/Fields/DulSerieField.js.map +1 -1
  319. package/mobile/dist/retail/components/Fields/DulSubdivisionCodeField.js +1 -1
  320. package/mobile/dist/retail/components/Fields/DulSubdivisionCodeField.js.map +1 -1
  321. package/mobile/dist/retail/components/Fields/Experience5YearsField.js +2 -1
  322. package/mobile/dist/retail/components/Fields/Experience5YearsField.js.map +1 -1
  323. package/mobile/dist/retail/components/Fields/GeneralSeniorityField.js +2 -1
  324. package/mobile/dist/retail/components/Fields/GeneralSeniorityField.js.map +1 -1
  325. package/mobile/dist/retail/components/Fields/JobsNumberField.js +2 -1
  326. package/mobile/dist/retail/components/Fields/JobsNumberField.js.map +1 -1
  327. package/mobile/dist/retail/components/Fields/LastJobExperienceField.js +2 -1
  328. package/mobile/dist/retail/components/Fields/LastJobExperienceField.js.map +1 -1
  329. package/mobile/dist/retail/components/Fields/LimitedBirthdayField.js +1 -1
  330. package/mobile/dist/retail/components/Fields/LimitedBirthdayField.js.map +1 -1
  331. package/mobile/dist/retail/components/Fields/MiddleNameField.js +1 -1
  332. package/mobile/dist/retail/components/Fields/MiddleNameField.js.map +1 -1
  333. package/mobile/dist/retail/components/Fields/NameField.js +1 -1
  334. package/mobile/dist/retail/components/Fields/NameField.js.map +1 -1
  335. package/mobile/dist/retail/components/Fields/OrganizationNameField.js +2 -1
  336. package/mobile/dist/retail/components/Fields/OrganizationNameField.js.map +1 -1
  337. package/mobile/dist/retail/components/Fields/SurnameField.js +1 -2
  338. package/mobile/dist/retail/components/Fields/SurnameField.js.map +1 -1
  339. package/mobile/dist/retail/components/Fields/WagesField.js +2 -1
  340. package/mobile/dist/retail/components/Fields/WagesField.js.map +1 -1
  341. package/mobile/dist/retail/content.js +11 -5
  342. package/mobile/dist/retail/content.js.map +1 -1
  343. package/mobile/dist/retail/inputs.d.ts +5 -1
  344. package/mobile/dist/retail/inputs.js +1 -1
  345. package/mobile/dist/retail/inputs.js.map +1 -1
  346. package/mobile/dist/retail/model/NameFieldDef.d.ts +1 -1
  347. package/mobile/dist/retail/utils/isEsiaAuthorize.d.ts +2 -1
  348. package/mobile/dist/retail/utils/isEsiaAuthorize.js +3 -1
  349. package/mobile/dist/retail/utils/isEsiaAuthorize.js.map +1 -1
  350. package/mobile/dist/retail/utils/mainFormStateMap.js +1 -0
  351. package/mobile/dist/retail/utils/mainFormStateMap.js.map +1 -1
  352. package/mobile/dist/retail/validator/getRetailFormValidator.d.ts +11 -0
  353. package/mobile/dist/retail/validator/getRetailFormValidator.js +14 -0
  354. package/mobile/dist/retail/validator/getRetailFormValidator.js.map +1 -0
  355. package/mobile/dist/retail/validator/validatorObj.js +1 -2
  356. package/mobile/dist/retail/validator/validatorObj.js.map +1 -1
  357. package/mobile/dist/retail/validator/validators.d.ts +2 -0
  358. package/mobile/dist/retail/validator/validators.js +11 -1
  359. package/mobile/dist/retail/validator/validators.js.map +1 -1
  360. package/mobile/dist/ui-kit/FormField/Fields/MiddleNameField.js +1 -1
  361. package/mobile/dist/ui-kit/FormField/Fields/MiddleNameField.js.map +1 -1
  362. package/mobile/dist/ui-kit/FormField/Fields/NameField.js +1 -1
  363. package/mobile/dist/ui-kit/FormField/Fields/NameField.js.map +1 -1
  364. package/mobile/dist/ui-kit/FormField/Fields/PhoneField.js +2 -1
  365. package/mobile/dist/ui-kit/FormField/Fields/PhoneField.js.map +1 -1
  366. package/mobile/dist/ui-kit/FormField/Fields/SurnameField.js +1 -1
  367. package/mobile/dist/ui-kit/FormField/Fields/SurnameField.js.map +1 -1
  368. package/mobile/dist/ui-kit/FormField/shouldRenderField.d.ts +1 -1
  369. package/mobile/dist/ui-kit/FormField/shouldRenderField.js +1 -1
  370. package/mobile/dist/ui-kit/FormField/shouldRenderField.js.map +1 -1
  371. package/mobile/lib/common.css +1 -1
  372. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.d.ts +5 -0
  373. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +26 -8
  374. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  375. package/mobile/lib/components/ApplicationLeadForm/EsiaLoginBanner.d.ts +4 -0
  376. package/mobile/lib/components/ApplicationLeadForm/EsiaLoginBanner.js +20 -0
  377. package/mobile/lib/components/ApplicationLeadForm/EsiaLoginBanner.js.map +1 -0
  378. package/mobile/lib/components/ApplicationLeadForm/applicationFormData.d.ts +0 -1
  379. package/mobile/lib/components/ApplicationLeadForm/applicationFormData.js +5 -30
  380. package/mobile/lib/components/ApplicationLeadForm/applicationFormData.js.map +1 -1
  381. package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -1
  382. package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.js +8 -2
  383. package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  384. package/mobile/lib/components/ApplicationLeadForm/parseEsiaProfile.d.ts +2 -2
  385. package/mobile/lib/components/ApplicationLeadForm/parseEsiaProfile.js +84 -54
  386. package/mobile/lib/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
  387. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +1 -2
  388. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +53 -53
  389. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  390. package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.d.ts +4 -4
  391. package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js +16 -24
  392. package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  393. package/mobile/lib/components/CreditCardForm/CreditCardFormStep.js +7 -11
  394. package/mobile/lib/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
  395. package/mobile/lib/components/CreditForm/CreditFormStep.js +7 -11
  396. package/mobile/lib/components/CreditForm/CreditFormStep.js.map +1 -1
  397. package/mobile/lib/components/DebitForm/DebitFormStep.js +7 -11
  398. package/mobile/lib/components/DebitForm/DebitFormStep.js.map +1 -1
  399. package/mobile/lib/retail/api/checkCode.d.ts +1 -0
  400. package/mobile/lib/retail/api/checkCode.js +1 -1
  401. package/mobile/lib/retail/api/checkCode.js.map +1 -1
  402. package/mobile/lib/retail/api/esiaRequestProfile.d.ts +84 -0
  403. package/mobile/lib/retail/api/esiaRequestProfile.js +7 -0
  404. package/mobile/lib/retail/api/esiaRequestProfile.js.map +1 -0
  405. package/mobile/lib/retail/api/updateUserTask.d.ts +1 -0
  406. package/mobile/lib/retail/api/updateUserTask.js.map +1 -1
  407. package/mobile/lib/retail/api/uploadFile.d.ts +1 -1
  408. package/mobile/lib/retail/api/uploadFile.js +2 -3
  409. package/mobile/lib/retail/api/uploadFile.js.map +1 -1
  410. package/mobile/lib/retail/components/DraftDialog/parseDraftTask.js +2 -1
  411. package/mobile/lib/retail/components/DraftDialog/parseDraftTask.js.map +1 -1
  412. package/mobile/lib/retail/components/Fields/AddressField.js +1 -1
  413. package/mobile/lib/retail/components/Fields/AddressField.js.map +1 -1
  414. package/mobile/lib/retail/components/Fields/BeginDateField.js +2 -1
  415. package/mobile/lib/retail/components/Fields/BeginDateField.js.map +1 -1
  416. package/mobile/lib/retail/components/Fields/BirthPlaceField.js +1 -2
  417. package/mobile/lib/retail/components/Fields/BirthPlaceField.js.map +1 -1
  418. package/mobile/lib/retail/components/Fields/ConfirmationIncomeField.js +5 -2
  419. package/mobile/lib/retail/components/Fields/ConfirmationIncomeField.js.map +1 -1
  420. package/mobile/lib/retail/components/Fields/DaDataInnField.js +2 -1
  421. package/mobile/lib/retail/components/Fields/DaDataInnField.js.map +1 -1
  422. package/mobile/lib/retail/components/Fields/DulIssueDateField.js +2 -2
  423. package/mobile/lib/retail/components/Fields/DulIssueDateField.js.map +1 -1
  424. package/mobile/lib/retail/components/Fields/DulIssuedByField.js +1 -1
  425. package/mobile/lib/retail/components/Fields/DulIssuedByField.js.map +1 -1
  426. package/mobile/lib/retail/components/Fields/DulNumberField.js +1 -1
  427. package/mobile/lib/retail/components/Fields/DulNumberField.js.map +1 -1
  428. package/mobile/lib/retail/components/Fields/DulSerieField.js +1 -1
  429. package/mobile/lib/retail/components/Fields/DulSerieField.js.map +1 -1
  430. package/mobile/lib/retail/components/Fields/DulSubdivisionCodeField.js +1 -1
  431. package/mobile/lib/retail/components/Fields/DulSubdivisionCodeField.js.map +1 -1
  432. package/mobile/lib/retail/components/Fields/Experience5YearsField.js +2 -1
  433. package/mobile/lib/retail/components/Fields/Experience5YearsField.js.map +1 -1
  434. package/mobile/lib/retail/components/Fields/GeneralSeniorityField.js +2 -1
  435. package/mobile/lib/retail/components/Fields/GeneralSeniorityField.js.map +1 -1
  436. package/mobile/lib/retail/components/Fields/JobsNumberField.js +2 -1
  437. package/mobile/lib/retail/components/Fields/JobsNumberField.js.map +1 -1
  438. package/mobile/lib/retail/components/Fields/LastJobExperienceField.js +2 -1
  439. package/mobile/lib/retail/components/Fields/LastJobExperienceField.js.map +1 -1
  440. package/mobile/lib/retail/components/Fields/LimitedBirthdayField.js +1 -1
  441. package/mobile/lib/retail/components/Fields/LimitedBirthdayField.js.map +1 -1
  442. package/mobile/lib/retail/components/Fields/MiddleNameField.js +1 -1
  443. package/mobile/lib/retail/components/Fields/MiddleNameField.js.map +1 -1
  444. package/mobile/lib/retail/components/Fields/NameField.js +1 -1
  445. package/mobile/lib/retail/components/Fields/NameField.js.map +1 -1
  446. package/mobile/lib/retail/components/Fields/OrganizationNameField.js +2 -1
  447. package/mobile/lib/retail/components/Fields/OrganizationNameField.js.map +1 -1
  448. package/mobile/lib/retail/components/Fields/SurnameField.js +1 -2
  449. package/mobile/lib/retail/components/Fields/SurnameField.js.map +1 -1
  450. package/mobile/lib/retail/components/Fields/WagesField.js +2 -1
  451. package/mobile/lib/retail/components/Fields/WagesField.js.map +1 -1
  452. package/mobile/lib/retail/content.js +11 -5
  453. package/mobile/lib/retail/content.js.map +1 -1
  454. package/mobile/lib/retail/inputs.d.ts +5 -1
  455. package/mobile/lib/retail/inputs.js +1 -1
  456. package/mobile/lib/retail/inputs.js.map +1 -1
  457. package/mobile/lib/retail/model/NameFieldDef.d.ts +1 -1
  458. package/mobile/lib/retail/utils/isEsiaAuthorize.d.ts +2 -1
  459. package/mobile/lib/retail/utils/isEsiaAuthorize.js +3 -1
  460. package/mobile/lib/retail/utils/isEsiaAuthorize.js.map +1 -1
  461. package/mobile/lib/retail/utils/mainFormStateMap.js +1 -0
  462. package/mobile/lib/retail/utils/mainFormStateMap.js.map +1 -1
  463. package/mobile/lib/retail/validator/getRetailFormValidator.d.ts +11 -0
  464. package/mobile/lib/retail/validator/getRetailFormValidator.js +11 -0
  465. package/mobile/lib/retail/validator/getRetailFormValidator.js.map +1 -0
  466. package/mobile/lib/retail/validator/validatorObj.js +2 -3
  467. package/mobile/lib/retail/validator/validatorObj.js.map +1 -1
  468. package/mobile/lib/retail/validator/validators.d.ts +2 -0
  469. package/mobile/lib/retail/validator/validators.js +8 -0
  470. package/mobile/lib/retail/validator/validators.js.map +1 -1
  471. package/mobile/lib/ui-kit/FormField/Fields/MiddleNameField.js +1 -1
  472. package/mobile/lib/ui-kit/FormField/Fields/MiddleNameField.js.map +1 -1
  473. package/mobile/lib/ui-kit/FormField/Fields/NameField.js +1 -1
  474. package/mobile/lib/ui-kit/FormField/Fields/NameField.js.map +1 -1
  475. package/mobile/lib/ui-kit/FormField/Fields/PhoneField.js +2 -1
  476. package/mobile/lib/ui-kit/FormField/Fields/PhoneField.js.map +1 -1
  477. package/mobile/lib/ui-kit/FormField/Fields/SurnameField.js +1 -1
  478. package/mobile/lib/ui-kit/FormField/Fields/SurnameField.js.map +1 -1
  479. package/mobile/lib/ui-kit/FormField/shouldRenderField.d.ts +1 -1
  480. package/mobile/lib/ui-kit/FormField/shouldRenderField.js +1 -1
  481. package/mobile/lib/ui-kit/FormField/shouldRenderField.js.map +1 -1
  482. package/mobile/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +31 -10
  483. package/mobile/src/components/ApplicationLeadForm/EsiaLoginBanner.tsx +51 -0
  484. package/mobile/src/components/ApplicationLeadForm/applicationFormData.tsx +5 -31
  485. package/mobile/src/components/ApplicationLeadForm/getInitialFormState.tsx +8 -1
  486. package/mobile/src/components/ApplicationLeadForm/parseEsiaProfile.ts +92 -67
  487. package/mobile/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +60 -65
  488. package/mobile/src/components/ApplicationLeadForm/useInitApplicationLead.ts +32 -48
  489. package/mobile/src/components/CreditCardForm/CreditCardFormStep.tsx +7 -14
  490. package/mobile/src/components/CreditForm/CreditFormStep.tsx +7 -14
  491. package/mobile/src/components/DebitForm/DebitFormStep.tsx +7 -14
  492. package/mobile/src/retail/api/checkCode.ts +1 -1
  493. package/mobile/src/retail/api/{updateProfileEsia.ts → esiaRequestProfile.ts} +16 -5
  494. package/mobile/src/retail/api/updateUserTask.ts +1 -0
  495. package/mobile/src/retail/api/uploadFile.ts +2 -3
  496. package/mobile/src/retail/components/DraftDialog/parseDraftTask.ts +2 -0
  497. package/mobile/src/retail/components/Fields/AddressField.tsx +1 -1
  498. package/mobile/src/retail/components/Fields/BeginDateField.tsx +2 -0
  499. package/mobile/src/retail/components/Fields/BirthPlaceField.tsx +1 -3
  500. package/mobile/src/retail/components/Fields/ConfirmationIncomeField.tsx +16 -7
  501. package/mobile/src/retail/components/Fields/DaDataInnField.tsx +2 -0
  502. package/mobile/src/retail/components/Fields/DulIssueDateField.tsx +2 -2
  503. package/mobile/src/retail/components/Fields/DulIssuedByField.tsx +1 -1
  504. package/mobile/src/retail/components/Fields/DulNumberField.tsx +1 -1
  505. package/mobile/src/retail/components/Fields/DulSerieField.tsx +1 -1
  506. package/mobile/src/retail/components/Fields/DulSubdivisionCodeField.tsx +1 -1
  507. package/mobile/src/retail/components/Fields/Experience5YearsField.tsx +2 -0
  508. package/mobile/src/retail/components/Fields/GeneralSeniorityField.tsx +2 -0
  509. package/mobile/src/retail/components/Fields/JobsNumberField.tsx +2 -0
  510. package/mobile/src/retail/components/Fields/LastJobExperienceField.tsx +2 -0
  511. package/mobile/src/retail/components/Fields/LimitedBirthdayField.tsx +1 -1
  512. package/mobile/src/retail/components/Fields/MiddleNameField.tsx +1 -1
  513. package/mobile/src/retail/components/Fields/NameField.tsx +1 -1
  514. package/mobile/src/retail/components/Fields/OrganizationNameField.tsx +2 -0
  515. package/mobile/src/retail/components/Fields/SurnameField.tsx +1 -3
  516. package/mobile/src/retail/components/Fields/WagesField.tsx +2 -0
  517. package/mobile/src/retail/content.tsx +11 -5
  518. package/mobile/src/retail/inputs.tsx +1 -1
  519. package/mobile/src/retail/model/NameFieldDef.ts +1 -0
  520. package/mobile/src/retail/utils/isEsiaAuthorize.ts +5 -2
  521. package/mobile/src/retail/utils/mainFormStateMap.ts +1 -0
  522. package/mobile/src/retail/validator/getRetailFormValidator.ts +27 -0
  523. package/mobile/src/retail/validator/validatorObj.ts +2 -2
  524. package/mobile/src/retail/validator/validators.ts +19 -0
  525. package/mobile/src/ui-kit/FormField/Fields/MiddleNameField.tsx +1 -1
  526. package/mobile/src/ui-kit/FormField/Fields/NameField.tsx +1 -1
  527. package/mobile/src/ui-kit/FormField/Fields/PhoneField.tsx +9 -1
  528. package/mobile/src/ui-kit/FormField/Fields/SurnameField.tsx +1 -1
  529. package/mobile/src/ui-kit/FormField/shouldRenderField.tsx +2 -1
  530. package/package.json +2 -2
  531. package/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +31 -10
  532. package/src/components/ApplicationLeadForm/EsiaLoginBanner.tsx +51 -0
  533. package/src/components/ApplicationLeadForm/applicationFormData.tsx +5 -31
  534. package/src/components/ApplicationLeadForm/getInitialFormState.tsx +8 -1
  535. package/src/components/ApplicationLeadForm/parseEsiaProfile.ts +92 -67
  536. package/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +60 -65
  537. package/src/components/ApplicationLeadForm/useInitApplicationLead.ts +32 -48
  538. package/src/components/CreditCardForm/CreditCardFormStep.tsx +7 -14
  539. package/src/components/CreditForm/CreditFormStep.tsx +7 -14
  540. package/src/components/DebitForm/DebitFormStep.tsx +7 -14
  541. package/src/retail/api/checkCode.ts +1 -1
  542. package/src/retail/api/{updateProfileEsia.ts → esiaRequestProfile.ts} +16 -5
  543. package/src/retail/api/updateUserTask.ts +1 -0
  544. package/src/retail/api/uploadFile.ts +2 -3
  545. package/src/retail/components/DraftDialog/parseDraftTask.ts +2 -0
  546. package/src/retail/components/Fields/AddressField.tsx +1 -1
  547. package/src/retail/components/Fields/BeginDateField.tsx +2 -0
  548. package/src/retail/components/Fields/BirthPlaceField.tsx +1 -3
  549. package/src/retail/components/Fields/ConfirmationIncomeField.tsx +16 -7
  550. package/src/retail/components/Fields/DaDataInnField.tsx +2 -0
  551. package/src/retail/components/Fields/DulIssueDateField.tsx +2 -2
  552. package/src/retail/components/Fields/DulIssuedByField.tsx +1 -1
  553. package/src/retail/components/Fields/DulNumberField.tsx +1 -1
  554. package/src/retail/components/Fields/DulSerieField.tsx +1 -1
  555. package/src/retail/components/Fields/DulSubdivisionCodeField.tsx +1 -1
  556. package/src/retail/components/Fields/Experience5YearsField.tsx +2 -0
  557. package/src/retail/components/Fields/GeneralSeniorityField.tsx +2 -0
  558. package/src/retail/components/Fields/JobsNumberField.tsx +2 -0
  559. package/src/retail/components/Fields/LastJobExperienceField.tsx +2 -0
  560. package/src/retail/components/Fields/LimitedBirthdayField.tsx +1 -1
  561. package/src/retail/components/Fields/MiddleNameField.tsx +1 -1
  562. package/src/retail/components/Fields/NameField.tsx +1 -1
  563. package/src/retail/components/Fields/OrganizationNameField.tsx +2 -0
  564. package/src/retail/components/Fields/SurnameField.tsx +1 -3
  565. package/src/retail/components/Fields/WagesField.tsx +2 -0
  566. package/src/retail/content.tsx +11 -5
  567. package/src/retail/inputs.tsx +1 -1
  568. package/src/retail/model/NameFieldDef.ts +1 -0
  569. package/src/retail/utils/isEsiaAuthorize.ts +5 -2
  570. package/src/retail/utils/mainFormStateMap.ts +1 -0
  571. package/src/retail/validator/getRetailFormValidator.ts +27 -0
  572. package/src/retail/validator/validatorObj.ts +2 -2
  573. package/src/retail/validator/validators.ts +19 -0
  574. package/src/ui-kit/FormField/Fields/MiddleNameField.tsx +1 -1
  575. package/src/ui-kit/FormField/Fields/NameField.tsx +1 -1
  576. package/src/ui-kit/FormField/Fields/PhoneField.tsx +9 -1
  577. package/src/ui-kit/FormField/Fields/SurnameField.tsx +1 -1
  578. package/src/ui-kit/FormField/shouldRenderField.tsx +2 -1
  579. package/bundle/retail/components/EsiaLoginDialog/EsiaLoginDialog.d.ts +0 -4
  580. package/bundle/retail/components/EsiaLoginDialog/useEsiaLoginDialog.d.ts +0 -1
  581. package/dist/retail/api/updateProfileEsia.js +0 -6
  582. package/dist/retail/api/updateProfileEsia.js.map +0 -1
  583. package/dist/retail/components/EsiaLoginDialog/EsiaLoginDialog.d.ts +0 -4
  584. package/dist/retail/components/EsiaLoginDialog/EsiaLoginDialog.js +0 -34
  585. package/dist/retail/components/EsiaLoginDialog/EsiaLoginDialog.js.map +0 -1
  586. package/dist/retail/components/EsiaLoginDialog/useEsiaLoginDialog.d.ts +0 -1
  587. package/dist/retail/components/EsiaLoginDialog/useEsiaLoginDialog.js +0 -15
  588. package/dist/retail/components/EsiaLoginDialog/useEsiaLoginDialog.js.map +0 -1
  589. package/lib/retail/api/updateProfileEsia.js +0 -3
  590. package/lib/retail/api/updateProfileEsia.js.map +0 -1
  591. package/lib/retail/components/EsiaLoginDialog/EsiaLoginDialog.d.ts +0 -4
  592. package/lib/retail/components/EsiaLoginDialog/EsiaLoginDialog.fixture.d.ts +0 -5
  593. package/lib/retail/components/EsiaLoginDialog/EsiaLoginDialog.js +0 -32
  594. package/lib/retail/components/EsiaLoginDialog/EsiaLoginDialog.js.map +0 -1
  595. package/lib/retail/components/EsiaLoginDialog/useEsiaLoginDialog.d.ts +0 -1
  596. package/lib/retail/components/EsiaLoginDialog/useEsiaLoginDialog.js +0 -12
  597. package/lib/retail/components/EsiaLoginDialog/useEsiaLoginDialog.js.map +0 -1
  598. package/mobile/bundle/retail/components/EsiaLoginDialog/EsiaLoginDialog.d.ts +0 -4
  599. package/mobile/bundle/retail/components/EsiaLoginDialog/useEsiaLoginDialog.d.ts +0 -1
  600. package/mobile/dist/retail/api/updateProfileEsia.d.ts +0 -77
  601. package/mobile/dist/retail/api/updateProfileEsia.js +0 -6
  602. package/mobile/dist/retail/api/updateProfileEsia.js.map +0 -1
  603. package/mobile/dist/retail/components/EsiaLoginDialog/EsiaLoginDialog.d.ts +0 -4
  604. package/mobile/dist/retail/components/EsiaLoginDialog/EsiaLoginDialog.js +0 -34
  605. package/mobile/dist/retail/components/EsiaLoginDialog/EsiaLoginDialog.js.map +0 -1
  606. package/mobile/dist/retail/components/EsiaLoginDialog/useEsiaLoginDialog.d.ts +0 -1
  607. package/mobile/dist/retail/components/EsiaLoginDialog/useEsiaLoginDialog.js +0 -15
  608. package/mobile/dist/retail/components/EsiaLoginDialog/useEsiaLoginDialog.js.map +0 -1
  609. package/mobile/lib/retail/api/updateProfileEsia.d.ts +0 -77
  610. package/mobile/lib/retail/api/updateProfileEsia.js +0 -3
  611. package/mobile/lib/retail/api/updateProfileEsia.js.map +0 -1
  612. package/mobile/lib/retail/components/EsiaLoginDialog/EsiaLoginDialog.d.ts +0 -4
  613. package/mobile/lib/retail/components/EsiaLoginDialog/EsiaLoginDialog.js +0 -32
  614. package/mobile/lib/retail/components/EsiaLoginDialog/EsiaLoginDialog.js.map +0 -1
  615. package/mobile/lib/retail/components/EsiaLoginDialog/useEsiaLoginDialog.d.ts +0 -1
  616. package/mobile/lib/retail/components/EsiaLoginDialog/useEsiaLoginDialog.js +0 -12
  617. package/mobile/lib/retail/components/EsiaLoginDialog/useEsiaLoginDialog.js.map +0 -1
  618. package/mobile/src/retail/components/EsiaLoginDialog/EsiaLoginDialog.tsx +0 -65
  619. package/mobile/src/retail/components/EsiaLoginDialog/useEsiaLoginDialog.tsx +0 -13
  620. package/src/retail/components/EsiaLoginDialog/EsiaLoginDialog.fixture.tsx +0 -7
  621. package/src/retail/components/EsiaLoginDialog/EsiaLoginDialog.tsx +0 -65
  622. package/src/retail/components/EsiaLoginDialog/useEsiaLoginDialog.tsx +0 -13
@@ -1982,11 +1982,13 @@
1982
1982
  });
1983
1983
 
1984
1984
  const ESIA_FIELD_NAME = 'esiaAccountTypeCd';
1985
- const isEsiaAuthorize = (field, name) => Boolean(field(ESIA_FIELD_NAME)?.value?.key) && field(name).value;
1985
+ const isEsiaAuthorize = (field, input, name = '') => input?.filledByEsia &&
1986
+ Boolean(field(ESIA_FIELD_NAME)?.value?.key) &&
1987
+ field(input?.name ?? name).value;
1986
1988
 
1987
- const MiddleNameField$1 = JSX(({ field, input }) => (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)", maxLength: 60, disabled: input?.filledByEsia && isEsiaAuthorize(field, input.name ?? ''), ...field(input?.name ?? ''), ...input })));
1989
+ const MiddleNameField$1 = JSX(({ field, input }) => (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)", maxLength: 60, disabled: isEsiaAuthorize(field, input), ...field(input?.name ?? ''), ...input })));
1988
1990
 
1989
- const NameField$1 = JSX(({ field, input }) => (jsx(InputControl, { label: "\u0418\u043C\u044F", maxLength: 60, disabled: input?.filledByEsia && isEsiaAuthorize(field, input.name ?? ''), ...field(input?.name ?? ''), ...input })));
1991
+ const NameField$1 = JSX(({ field, input }) => (jsx(InputControl, { label: "\u0418\u043C\u044F", maxLength: 60, disabled: isEsiaAuthorize(field, input), ...field(input?.name ?? ''), ...input })));
1990
1992
 
1991
1993
  const SlideCheckbox = JSX(({ value = false, text, type = 'checkbox', onChange }) => (jsxs("div", { role: type, "aria-checked": value, className: "flex justify-start items-center w-full cursor-pointer mb-s", onClick: () => onChange && onChange(!value), children: [jsx("div", { className: style('relative flex-shrink-0 duration-300 w-9 h-5 mr-s rounded-2xl', value ? 'bg-primary-main' : 'bg-main-divider'), children: jsx("div", { className: style('absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full', value ? 'left-1/2' : 'left-[5%]') }) }), text ? (jsx(Text, { size: "text-l", font: "font-light", color: "text-primary-text", children: text })) : null] })));
1992
1994
 
@@ -2022,7 +2024,7 @@
2022
2024
 
2023
2025
  const PhoneField = JSX(({ field, input }) => {
2024
2026
  const fieldName = input?.name || 'phone';
2025
- return jsx(InputPhoneControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...field(fieldName), ...input });
2027
+ return (jsx(InputPhoneControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", disabled: isEsiaAuthorize(field, input, fieldName), ...field(fieldName), ...input }));
2026
2028
  });
2027
2029
 
2028
2030
  const PosTerminalField = JSX(({ field }) => isAcquiringTrade(field('acquiringType')?.value?.key) ? (jsx(SlideCheckbox, { type: "radio", text: "\u0425\u043E\u0447\u0443 POS-\u0442\u0435\u0440\u043C\u0438\u043D\u0430\u043B", ...field('posTerminal') })) : null);
@@ -2166,7 +2168,7 @@
2166
2168
  ];
2167
2169
  const SufferedFromField = JSX(({ field, input }) => (jsx(SelectControl, { label: "\u041F\u043E\u0441\u0442\u0440\u0430\u0434\u0430\u043B \u0432", ...input, options: SUFFERED_FROM_TYPES, ...field('sufferedFrom') })));
2168
2170
 
2169
- const SurnameField$1 = JSX(({ field, input }) => (jsx(InputControl, { label: "\u0424\u0430\u043C\u0438\u043B\u0438\u044F", maxLength: 60, disabled: input?.filledByEsia && isEsiaAuthorize(field, input.name ?? ''), ...field(input?.name ?? ''), ...input })));
2171
+ const SurnameField$1 = JSX(({ field, input }) => (jsx(InputControl, { label: "\u0424\u0430\u043C\u0438\u043B\u0438\u044F", maxLength: 60, disabled: isEsiaAuthorize(field, input), ...field(input?.name ?? ''), ...input })));
2170
2172
 
2171
2173
  const MIN_CREDIT_TERM = 1;
2172
2174
  const MAX_CREDIT_TERM = 180;
@@ -2202,7 +2204,7 @@
2202
2204
  function shouldRenderField({ input, field, }) {
2203
2205
  const { condition } = input;
2204
2206
  const { value } = field(condition?.name || '');
2205
- return !condition || condition?.values?.find((_) => _ === (value?.key ?? value));
2207
+ return !condition || condition?.values?.includes(value?.key ?? value);
2206
2208
  }
2207
2209
 
2208
2210
  const PRODUCT_REF = {
@@ -2452,6 +2454,14 @@
2452
2454
  return true;
2453
2455
  };
2454
2456
  const limitedBirthdayValidator = (params) => validator(limitedBirthdayValidate(params))(params.errorMessage);
2457
+ const passportValidator = (birthDate) => validator((_) => {
2458
+ if (_ && birthDate) {
2459
+ return (_.getTime() >=
2460
+ new Date(birthDate?.getFullYear() + 14, birthDate?.getMonth(), birthDate?.getDate()).getTime());
2461
+ }
2462
+ return false;
2463
+ })('Укажите дату выдачи паспорта');
2464
+ const deliveryDateValidator = (errorMsg) => validator((_) => _?.getTime() >= new Date().getTime())(errorMsg);
2455
2465
  const numberValidator = (errorMsg) => validator((_) => typeof _ === 'string' && _.length === 6)(errorMsg);
2456
2466
  const serieValidator = (errorMsg) => validator((_) => typeof _ === 'string' && _.length === 4)(errorMsg);
2457
2467
  const snilsValidate = (snils) => {
@@ -2506,7 +2516,7 @@
2506
2516
  codeWord: codeWordValidator('Необходимо ввести кодовое слово'),
2507
2517
  confirmationIncome: defaultSelectValidator(),
2508
2518
  methodObtain: defaultValidator(),
2509
- deliveryDate: defaultValidator('Укажите дату доставки'),
2519
+ deliveryDate: deliveryDateValidator('Укажите дату доставки'),
2510
2520
  };
2511
2521
  const validatorRetailObj = {
2512
2522
  organization: defaultSelectValidator('Выберите тип организации'),
@@ -2543,7 +2553,6 @@
2543
2553
  armyIdFlg: agreementValidator,
2544
2554
  dulSerie: serieValidator('Укажите серию паспорта'),
2545
2555
  dulNumber: numberValidator('Укажите номер паспорта'),
2546
- dulIssueDate: defaultValidator('Укажите дату выдачи паспорта'),
2547
2556
  dulSubdivisionCode: numberValidator('Укажите код подразделения'),
2548
2557
  dulIssuedBy: defaultValidator('Укажите организацию, выдавшую паспорт'),
2549
2558
  participantDateRegistration: defaultValidator('Укажите дату регистрации'),
@@ -2660,11 +2669,11 @@
2660
2669
  {
2661
2670
  columns: 2,
2662
2671
  inputs: [
2663
- { name: 'surname', required: true, dadata: true },
2664
- { name: 'name', required: true, dadata: true },
2665
- { name: 'middleName', dadata: true },
2666
- { name: 'limitedBirthday', required: true },
2667
- { name: 'phone', required: true },
2672
+ { name: 'surname', required: true, dadata: true, filledByEsia: true },
2673
+ { name: 'name', required: true, dadata: true, filledByEsia: true },
2674
+ { name: 'middleName', dadata: true, filledByEsia: true },
2675
+ { name: 'limitedBirthday', required: true, filledByEsia: true },
2676
+ { name: 'phone', required: true, filledByEsia: true },
2668
2677
  { name: 'email', required: true, dadata: true },
2669
2678
  ],
2670
2679
  },
@@ -2674,6 +2683,57 @@
2674
2683
  ];
2675
2684
  };
2676
2685
 
2686
+ const getTraceId = () => {
2687
+ const result = new Uint8Array(8);
2688
+ globalThis.crypto.getRandomValues(result);
2689
+ return result.reduce((acc, _) => `${acc}${_.toString(16).padStart(2, '0')}`, '');
2690
+ };
2691
+
2692
+ const fetchRetailJSON = async (url, method, body) => {
2693
+ try {
2694
+ const response = await doRequest(url, method, body);
2695
+ return response.json();
2696
+ }
2697
+ catch (err) {
2698
+ console.error(err);
2699
+ return null;
2700
+ }
2701
+ };
2702
+ async function doRequest(url, method, body) {
2703
+ const traceId = getTraceId();
2704
+ return globalThis?.fetch?.(`${RETAIL_API_BASE_URI}${url}`, {
2705
+ method,
2706
+ headers: {
2707
+ 'Content-Type': 'application/json',
2708
+ 'X-B3-Sampled': '1',
2709
+ 'X-B3-Spanid': traceId,
2710
+ 'X-B3-Traceid': traceId,
2711
+ ...getAuthorizationHeaders(),
2712
+ },
2713
+ credentials: 'include',
2714
+ body: body ? JSON.stringify(body) : null,
2715
+ });
2716
+ }
2717
+ const getAuthorizationHeaders = () => {
2718
+ const token = sessionStorage.getItem('accessToken');
2719
+ return token ? { Authorization: `Bearer ${token}` } : null;
2720
+ };
2721
+
2722
+ const getLink = (body) => fetchRetailJSON('/esia/getLink', 'POST', body);
2723
+
2724
+ const EsiaLoginBanner = JSX(() => {
2725
+ const navigator = locationNavigator();
2726
+ const handleAuth = useCallback(async () => {
2727
+ const resp = await getLink({
2728
+ redirectUri: globalThis.location.origin + globalThis.location.pathname,
2729
+ });
2730
+ if (resp?.link) {
2731
+ navigator.assign(resp.link);
2732
+ }
2733
+ }, []);
2734
+ return (jsxs("div", { className: "flex gap-lg items-center rounded-md bg-main-gray p-4xl", children: [jsxs("div", { className: "flex flex-col justify-around w-full", children: [jsx("p", { className: "mb-m text-xl", children: "\u0417\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u0435 \u0434\u0430\u043D\u043D\u044B\u0435 \u0447\u0435\u0440\u0435\u0437 \u0413\u043E\u0441\u0443\u0441\u043B\u0443\u0433\u0438" }), jsxs("ul", { className: "list-disc list-inside mb-4xl", children: [jsx("li", { children: "\u0412\u0435\u0440\u043E\u044F\u0442\u043D\u043E\u0441\u0442\u044C \u043E\u0434\u043E\u0431\u0440\u0435\u043D\u0438\u044F \u0432\u044B\u0448\u0435" }), jsx("li", { children: "\u0411\u0435\u0437 \u0441\u043F\u0440\u0430\u0432\u043E\u043A \u043E \u0434\u043E\u0445\u043E\u0434\u0430\u0445 \u0438 \u0442\u0440\u0443\u0434\u043E\u0443\u0441\u0442\u0440\u043E\u0439\u0441\u0442\u0432\u0435" }), jsx("li", { children: "\u0421 \u0437\u0430\u0449\u0438\u0442\u043E\u0439 \u0412\u0430\u0448\u0438\u0445 \u0434\u0430\u043D\u043D\u044B\u0445" })] }), jsx(Img, { className: "block mb-xl self-center @md:hidden", image: { icon: 'GosUslugiIcon', iconVersion: 'normal' }, height: "80", width: "80" }), jsx(Button, { type: "button", onClick: handleAuth, className: "w-full @md:w-fit", children: "\u0417\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u044C" })] }), jsx(Img, { className: "hidden @md:block", image: { icon: 'GosUslugiIcon', iconVersion: 'normal' }, height: "164" })] }));
2735
+ });
2736
+
2677
2737
  const debounce = (fn, delay = 600) => {
2678
2738
  let timerId;
2679
2739
  const debouncedCallback = (...args) => {
@@ -2914,7 +2974,7 @@
2914
2974
  qcHouse: '',
2915
2975
  });
2916
2976
  }, []);
2917
- return (jsx(DaDataInputControl, { disabled: input?.filledByEsia && isEsiaAuthorize(field, fieldName), label: "\u0410\u0434\u0440\u0435\u0441", ...field(fieldName), value: fieldValue?.fullAddress, onChange: onChange, ...input, onDaDataChange: onDaDataChange }));
2977
+ return (jsx(DaDataInputControl, { disabled: isEsiaAuthorize(field, input, fieldName), label: "\u0410\u0434\u0440\u0435\u0441", ...field(fieldName), value: fieldValue?.fullAddress, onChange: onChange, ...input, onDaDataChange: onDaDataChange }));
2918
2978
  });
2919
2979
  const getAddressFromDaDataItem = (item) => ({
2920
2980
  apartment: item?.data?.flat,
@@ -3560,42 +3620,6 @@
3560
3620
  const mapByIndex = (points, index) => points.map((_) => _.coords?.[index]);
3561
3621
  const getArraySumAndAverage = (arr) => arr.length && arr.reduce((a, b) => a + b) / arr.length;
3562
3622
 
3563
- const getTraceId = () => {
3564
- const result = new Uint8Array(8);
3565
- globalThis.crypto.getRandomValues(result);
3566
- return result.reduce((acc, _) => `${acc}${_.toString(16).padStart(2, '0')}`, '');
3567
- };
3568
-
3569
- const fetchRetailJSON = async (url, method, body) => {
3570
- try {
3571
- const response = await doRequest(url, method, body);
3572
- return response.json();
3573
- }
3574
- catch (err) {
3575
- console.error(err);
3576
- return null;
3577
- }
3578
- };
3579
- async function doRequest(url, method, body) {
3580
- const traceId = getTraceId();
3581
- return globalThis?.fetch?.(`${RETAIL_API_BASE_URI}${url}`, {
3582
- method,
3583
- headers: {
3584
- 'Content-Type': 'application/json',
3585
- 'X-B3-Sampled': '1',
3586
- 'X-B3-Spanid': traceId,
3587
- 'X-B3-Traceid': traceId,
3588
- ...getAuthorizationHeaders(),
3589
- },
3590
- credentials: 'include',
3591
- body: body ? JSON.stringify(body) : null,
3592
- });
3593
- }
3594
- const getAuthorizationHeaders = () => {
3595
- const token = sessionStorage.getItem('accessToken');
3596
- return token ? { Authorization: `Bearer ${token}` } : null;
3597
- };
3598
-
3599
3623
  const fetchRegionOffices = async (regionKey) => {
3600
3624
  const response = await fetchRetailJSON('/public-data/regionOffices', 'POST', {
3601
3625
  regionRfCd: {
@@ -3825,10 +3849,9 @@
3825
3849
 
3826
3850
  const BankruptcyFlgField = JSX(({ field, input }) => (jsx(CheckboxWithError, { text: "\u0412 \u043E\u0442\u043D\u043E\u0448\u0435\u043D\u0438\u0438 \u043C\u0435\u043D\u044F \u0432\u0435\u0434\u0451\u0442\u0441\u044F \u043F\u0440\u043E\u0438\u0437\u0432\u043E\u0434\u0441\u0442\u0432\u043E \u043F\u043E \u0434\u0435\u043B\u0443 \u043E \u0431\u0430\u043D\u043A\u0440\u043E\u0442\u0441\u0442\u0432\u0435", ...field(input?.name ?? '') })));
3827
3851
 
3828
- const BeginDateField = JSX(({ field, input }) => (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u043D\u0430\u0447\u0430\u043B\u0430 \u0440\u0430\u0431\u043E\u0442\u044B \u043D\u0430 \u0442\u0435\u043A\u0443\u0449\u0435\u043C \u043C\u0435\u0441\u0442\u0435", ...field(input?.name ?? ''), ...input })));
3852
+ const BeginDateField = JSX(({ field, input }) => (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u043D\u0430\u0447\u0430\u043B\u0430 \u0440\u0430\u0431\u043E\u0442\u044B \u043D\u0430 \u0442\u0435\u043A\u0443\u0449\u0435\u043C \u043C\u0435\u0441\u0442\u0435", ...field(input?.name ?? ''), ...input, disabled: isEsiaAuthorize(field, input) })));
3829
3853
 
3830
- const FIELD_NAME$2 = 'birthPlace';
3831
- const BirthPlaceField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u041C\u0435\u0441\u0442\u043E \u0440\u043E\u0436\u0434\u0435\u043D\u0438\u044F", ...field(input?.name ?? ''), ...input, disabled: input?.filledByEsia && isEsiaAuthorize(field, FIELD_NAME$2) })));
3854
+ const BirthPlaceField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u041C\u0435\u0441\u0442\u043E \u0440\u043E\u0436\u0434\u0435\u043D\u0438\u044F", ...field(input?.name ?? ''), ...input, disabled: isEsiaAuthorize(field, input) })));
3832
3855
 
3833
3856
  const safeJsonParse = (data) => {
3834
3857
  try {
@@ -3889,7 +3912,8 @@
3889
3912
 
3890
3913
  const ConfirmationIncomeField = JSX(({ field, input }) => {
3891
3914
  const { data: confirmationIncome } = useLeadFormData('INCOME_CERT_UNITED');
3892
- return (jsx(SelectField, { field: field, source: confirmationIncome, label: "\u0421\u043F\u043E\u0441\u043E\u0431 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F \u0434\u043E\u0445\u043E\u0434\u0430", fieldName: "confirmationIncome", input: input }));
3915
+ const filledByEsia = isEsiaAuthorize(field, input);
3916
+ return (jsxs("div", { className: "space-y-xl", children: [filledByEsia ? (jsx(InfoCard, { __html: "\u0414\u043B\u044F \u0432\u044B\u0431\u043E\u0440\u0430 \u0438\u043D\u043E\u0433\u043E \u0441\u043F\u043E\u0441\u043E\u0431\u0430 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F \u0434\u043E\u0445\u043E\u0434\u0430, \u043E\u0444\u043E\u0440\u043C\u0438\u0442\u0435 \u043D\u043E\u0432\u0443\u044E \u0437\u0430\u044F\u0432\u043A\u0443 \u043D\u0430 \u043A\u0440\u0435\u0434\u0438\u0442 \u0431\u0435\u0437 \u0430\u0432\u0442\u043E\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043D\u0430 \u043F\u043E\u0440\u0442\u0430\u043B\u0435 \u0413\u043E\u0441\u0443\u0441\u043B\u0443\u0433\u0438" })) : null, jsx(SelectField, { field: field, source: confirmationIncome, label: "\u0421\u043F\u043E\u0441\u043E\u0431 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F \u0434\u043E\u0445\u043E\u0434\u0430", fieldName: "confirmationIncome", input: input, disabled: filledByEsia })] }));
3893
3917
  });
3894
3918
 
3895
3919
  const ConscriptionField = JSX(({ field, input }) => {
@@ -4230,12 +4254,12 @@
4230
4254
  });
4231
4255
  const renderCreditParamsForm$1 = (params, field) => (jsxs("div", { className: "flex flex-col gap-y-2xl", children: [params.isShowSalaryClient ? (jsx(Checkbox, { text: `Получаю зарплату на счёт\nв Россельхозбанке`, ...field('isSalaryClient'), value: params.isSalaryClient, className: "whitespace-pre-line sm:whitespace-normal" })) : null, params.isShowStateEmployee ? (jsx(Checkbox, { text: "\u0420\u0430\u0431\u043E\u0442\u0430\u044E \u0432 \u0431\u044E\u0434\u0436\u0435\u0442\u043D\u043E\u0439 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", ...field('isStateEmployee'), value: params.isStateEmployee })) : null, params.isShowPensionClient ? (jsx(Checkbox, { text: "\u041F\u043E\u043B\u0443\u0447\u0430\u044E \u043F\u0435\u043D\u0441\u0438\u044E \u043D\u0430 \u043A\u0430\u0440\u0442\u0443 \u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A\u0430", ...field('isPensionClient'), value: params.isPensionClient })) : null, params.isShowInsurance ? (jsx(Checkbox, { text: "\u041A\u043E\u043C\u043F\u043B\u0435\u043A\u0441\u043D\u0430\u044F \u0441\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u044F \u0437\u0430\u0449\u0438\u0442\u0430", ...field('isInsurance'), value: params.isInsurance })) : null] }));
4232
4256
 
4233
- const FIELD_NAME$1 = 'calculator';
4257
+ const FIELD_NAME = 'calculator';
4234
4258
  const CreditCalcField = JSX(({ field, params }) => {
4235
4259
  const handleChange = useCallback((_) => {
4236
- field(FIELD_NAME$1).onChange?.(_);
4260
+ field(FIELD_NAME).onChange?.(_);
4237
4261
  }, []);
4238
- return (jsx(CalculatorCredit, { ...params?.calcData, padding: "p-0", defaultParams: defaultValueAdapter(field(FIELD_NAME$1).value), onChange: handleChange }));
4262
+ return (jsx(CalculatorCredit, { ...params?.calcData, padding: "p-0", defaultParams: defaultValueAdapter(field(FIELD_NAME).value), onChange: handleChange }));
4239
4263
  });
4240
4264
  const PARAMS_MAP = {
4241
4265
  moneyValue: 'sum',
@@ -4433,7 +4457,7 @@
4433
4457
  }
4434
4458
  })();
4435
4459
  }, [employerActivities, employerOrganization, organization, amountWorkers]);
4436
- return (jsx(DaDataInputControl, { label: "\u0418\u041D\u041D", isInteger: true, maxLength: 12, ...input, ...field(input?.name ?? ''), onDaDataChange: onDaDataChange }));
4460
+ return (jsx(DaDataInputControl, { label: "\u0418\u041D\u041D", isInteger: true, maxLength: 12, ...input, ...field(input?.name ?? ''), onDaDataChange: onDaDataChange, disabled: isEsiaAuthorize(field, input) }));
4437
4461
  });
4438
4462
 
4439
4463
  const DeliveryDateFiels = JSX(({ field, input }) => (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438", ...field(input?.name ?? ''), minDate: new Date() })));
@@ -4451,8 +4475,8 @@
4451
4475
 
4452
4476
  const DulIssueDateField = JSX(({ field, input }) => {
4453
4477
  const birthDate = field('limitedBirthday')?.value;
4454
- const startDulIssueDate = useMemo(() => new Date(birthDate.getFullYear() + 14, birthDate.getMonth(), birthDate.getDate()), [birthDate]);
4455
- return (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0432\u044B\u0434\u0430\u0447\u0438", ...field(input?.name ?? ''), disabled: input?.filledByEsia && isEsiaAuthorize(field, input?.name ?? ''), minDate: startDulIssueDate }));
4478
+ const startDulIssueDate = useMemo(() => new Date(birthDate?.getFullYear() + 14, birthDate?.getMonth(), birthDate?.getDate()), [birthDate]);
4479
+ return (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0432\u044B\u0434\u0430\u0447\u0438", ...field(input?.name ?? ''), disabled: isEsiaAuthorize(field, input), minDate: startDulIssueDate }));
4456
4480
  });
4457
4481
 
4458
4482
  const DulIssuedByField = JSX(({ field, input }) => {
@@ -4460,18 +4484,18 @@
4460
4484
  const onDaDataChange = useCallback((item) => {
4461
4485
  changeDulSubdivisionCode?.(item?.data?.code?.replace('-', ''));
4462
4486
  }, []);
4463
- return (jsx(DaDataInputControl, { disabled: input?.filledByEsia && isEsiaAuthorize(field, input?.name ?? ''), label: "\u041A\u0435\u043C \u0432\u044B\u0434\u0430\u043D", ...input, ...field(input?.name ?? ''), onDaDataChange: onDaDataChange, daDataQueryPrefix: dulSubdivisionCode }));
4487
+ return (jsx(DaDataInputControl, { disabled: isEsiaAuthorize(field, input), label: "\u041A\u0435\u043C \u0432\u044B\u0434\u0430\u043D", ...input, ...field(input?.name ?? ''), onDaDataChange: onDaDataChange, daDataQueryPrefix: dulSubdivisionCode }));
4464
4488
  });
4465
4489
 
4466
- const DulNumberField = JSX(({ field, input }) => (jsx(DaDataInputControl, { disabled: input?.filledByEsia && isEsiaAuthorize(field, input.name ?? ''), label: "\u041D\u043E\u043C\u0435\u0440 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430", isInteger: true, maxLength: 6, ...field(input?.name ?? '') })));
4490
+ const DulNumberField = JSX(({ field, input }) => (jsx(DaDataInputControl, { disabled: isEsiaAuthorize(field, input), label: "\u041D\u043E\u043C\u0435\u0440 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430", isInteger: true, maxLength: 6, ...field(input?.name ?? '') })));
4467
4491
 
4468
- const DulSerieField = JSX(({ field, input }) => (jsx(DaDataInputControl, { disabled: input?.filledByEsia && isEsiaAuthorize(field, input.name ?? ''), label: "\u0421\u0435\u0440\u0438\u044F \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430", isInteger: true, maxLength: 4, ...field(input?.name ?? '') })));
4492
+ const DulSerieField = JSX(({ field, input }) => (jsx(DaDataInputControl, { disabled: isEsiaAuthorize(field, input), label: "\u0421\u0435\u0440\u0438\u044F \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430", isInteger: true, maxLength: 4, ...field(input?.name ?? '') })));
4469
4493
 
4470
4494
  const DulSubdivisionCodeField = JSX(({ field, input }) => {
4471
4495
  const onDaDataChange = useCallback((item) => {
4472
4496
  field?.('dulIssuedBy')?.onChange?.(item?.data?.name);
4473
4497
  }, []);
4474
- return (jsx(DaDataInputControl, { disabled: input?.filledByEsia && isEsiaAuthorize(field, input.name ?? ''), label: "\u041A\u043E\u0434 \u043F\u043E\u0434\u0440\u0430\u0437\u0434\u0435\u043B\u0435\u043D\u0438\u044F", isInteger: true, maxLength: 6, ...input, ...field(input?.name ?? ''), onDaDataChange: onDaDataChange }));
4498
+ return (jsx(DaDataInputControl, { disabled: isEsiaAuthorize(field, input), label: "\u041A\u043E\u0434 \u043F\u043E\u0434\u0440\u0430\u0437\u0434\u0435\u043B\u0435\u043D\u0438\u044F", isInteger: true, maxLength: 6, ...input, ...field(input?.name ?? ''), onDaDataChange: onDaDataChange }));
4475
4499
  });
4476
4500
 
4477
4501
  const EducationField = JSX(({ field, input }) => {
@@ -4516,7 +4540,7 @@
4516
4540
  const MIN_YEARS = 0;
4517
4541
  const Experience5YearsField = JSX(({ field, input }) => {
4518
4542
  const onChange = useCallback((value) => field(input?.name ?? '')?.onChange?.(String(clamp(Number(value), MIN_YEARS, MAX_YEARS))), []);
4519
- return (jsx(DaDataInputControl, { label: "\u0421\u0442\u0430\u0436", placeholder: "\u0417\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435 5 \u043B\u0435\u0442", type: "number", ...field(input?.name ?? ''), ...input, onChange: onChange }));
4543
+ return (jsx(DaDataInputControl, { label: "\u0421\u0442\u0430\u0436", placeholder: "\u0417\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435 5 \u043B\u0435\u0442", type: "number", ...field(input?.name ?? ''), ...input, onChange: onChange, disabled: isEsiaAuthorize(field, input) }));
4520
4544
  });
4521
4545
 
4522
4546
  const FamilyMembersField = JSX(({ field, input }) => {
@@ -4537,7 +4561,7 @@
4537
4561
  return (jsx(SelectField, { field: field, source: familyStatus, label: "\u0421\u0435\u043C\u0435\u0439\u043D\u043E\u0435 \u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0435", fieldName: "familyStatus", input: input }));
4538
4562
  });
4539
4563
 
4540
- const GeneralSeniorityField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u041E\u0431\u0449\u0438\u0439 \u0441\u0442\u0430\u0436", type: "number", maxLength: 2, placeholder: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043B\u0435\u0442", ...field(input?.name ?? ''), ...input })));
4564
+ const GeneralSeniorityField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u041E\u0431\u0449\u0438\u0439 \u0441\u0442\u0430\u0436", type: "number", maxLength: 2, placeholder: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043B\u0435\u0442", ...field(input?.name ?? ''), ...input, disabled: isEsiaAuthorize(field, input) })));
4541
4565
 
4542
4566
  const HousingField = JSX(({ field, input }) => {
4543
4567
  const { data: housing } = useLeadFormData('HOUSE_TYPE');
@@ -4546,9 +4570,9 @@
4546
4570
 
4547
4571
  const InfoCardField = JSX(({ input }) => (jsx(InfoCard, { __html: input?.label })));
4548
4572
 
4549
- const JobsNumberField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043C\u0435\u0441\u0442 \u0440\u0430\u0431\u043E\u0442\u044B \u0437\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435 5 \u043B\u0435\u0442", placeholder: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043C\u0435\u0441\u0442", isInteger: true, maxLength: 2, ...field(input?.name ?? ''), ...input })));
4573
+ const JobsNumberField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043C\u0435\u0441\u0442 \u0440\u0430\u0431\u043E\u0442\u044B \u0437\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435 5 \u043B\u0435\u0442", placeholder: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043C\u0435\u0441\u0442", isInteger: true, maxLength: 2, ...field(input?.name ?? ''), ...input, disabled: isEsiaAuthorize(field, input) })));
4550
4574
 
4551
- const LastJobExperienceField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u0421\u0442\u0430\u0436 \u043D\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u043C \u0440\u0430\u0431\u043E\u0447\u0435\u043C \u043C\u0435\u0441\u0442\u0435", placeholder: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043B\u0435\u0442", type: "number", maxLength: 2, ...field(input?.name ?? ''), ...input })));
4575
+ const LastJobExperienceField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u0421\u0442\u0430\u0436 \u043D\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u043C \u0440\u0430\u0431\u043E\u0447\u0435\u043C \u043C\u0435\u0441\u0442\u0435", placeholder: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043B\u0435\u0442", type: "number", maxLength: 2, ...field(input?.name ?? ''), ...input, disabled: isEsiaAuthorize(field, input) })));
4552
4576
 
4553
4577
  const latinPattern = /^[\u0041-\u005A\u0061-\u007A\s]+$/u;
4554
4578
  const isLatin = (_ = '') => latinPattern.test(_);
@@ -4669,7 +4693,7 @@
4669
4693
 
4670
4694
  const LegalFormField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u041E\u041F\u0424", placeholder: "\u041E\u041E\u041E, \u041F\u0410\u041E \u0438 \u0434\u0440.", ...field(input?.name ?? ''), ...input })));
4671
4695
 
4672
- const LimitedBirthdayField = JSX(({ field, input }) => (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0440\u043E\u0436\u0434\u0435\u043D\u0438\u044F", ...field(input?.name ?? ''), disabled: input?.filledByEsia && isEsiaAuthorize(field, input.name ?? '') })));
4696
+ const LimitedBirthdayField = JSX(({ field, input }) => (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0440\u043E\u0436\u0434\u0435\u043D\u0438\u044F", ...field(input?.name ?? ''), disabled: isEsiaAuthorize(field, input) })));
4673
4697
 
4674
4698
  const MandatoryPaymentsField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u041E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u044B\u0435 \u0432\u044B\u043F\u043B\u0430\u0442\u044B", placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435", isInteger: true, ...field(input?.name ?? ''), ...input })));
4675
4699
 
@@ -4685,7 +4709,7 @@
4685
4709
  field('middleName')?.onChange?.(value);
4686
4710
  }
4687
4711
  }, [field]);
4688
- return (jsx(DaDataInputControl, { 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)", maxLength: 60, disabled: input?.filledByEsia && isEsiaAuthorize(field, input?.name ?? ''), ...field(input?.name ?? ''), ...input, onChange: onChange }));
4712
+ return (jsx(DaDataInputControl, { 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)", maxLength: 60, disabled: isEsiaAuthorize(field, input), ...field(input?.name ?? ''), ...input, onChange: onChange }));
4689
4713
  });
4690
4714
 
4691
4715
  const NameField = JSX(({ field, input }) => {
@@ -4694,7 +4718,7 @@
4694
4718
  field('name')?.onChange?.(value);
4695
4719
  }
4696
4720
  }, [field]);
4697
- return (jsx(DaDataInputControl, { label: "\u0418\u043C\u044F", maxLength: 60, disabled: input?.filledByEsia && isEsiaAuthorize(field, input.name ?? ''), ...field(input?.name ?? ''), ...input, onChange: onChange }));
4721
+ return (jsx(DaDataInputControl, { label: "\u0418\u043C\u044F", maxLength: 60, disabled: isEsiaAuthorize(field, input), ...field(input?.name ?? ''), ...input, onChange: onChange }));
4698
4722
  });
4699
4723
 
4700
4724
  const OrganizationField = JSX(({ field, input }) => {
@@ -4714,7 +4738,7 @@
4714
4738
  field?.('inn')?.onChange?.(item.data?.inn);
4715
4739
  updateOrganizationFields(store, field, item);
4716
4740
  }, []);
4717
- return (jsx(DaDataInputControl, { label: "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", ...input, ...field(input?.name ?? ''), onDaDataChange: onDaDataChange }));
4741
+ return (jsx(DaDataInputControl, { label: "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", ...input, ...field(input?.name ?? ''), disabled: isEsiaAuthorize(field, input), onDaDataChange: onDaDataChange }));
4718
4742
  });
4719
4743
 
4720
4744
  const OtherIncomeField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u0418\u043D\u044B\u0435 \u0434\u043E\u0445\u043E\u0434\u044B", placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435", isInteger: true, ...field(input?.name ?? ''), ...input })));
@@ -4849,19 +4873,18 @@
4849
4873
 
4850
4874
  const SnilsField = JSX(({ field, input }) => (jsx(InputSnilsControl, { label: "\u0421\u041D\u0418\u041B\u0421", maxLength: 14, ...field(input?.name ?? ''), ...input })));
4851
4875
 
4852
- const FIELD_NAME = 'surname';
4853
4876
  const SurnameField = JSX(({ field, input }) => {
4854
4877
  const onChange = useCallback((value) => {
4855
4878
  if (retailCyrillicPattern.test(value) || value.length === 0) {
4856
4879
  field('surname')?.onChange?.(value);
4857
4880
  }
4858
4881
  }, [field]);
4859
- return (jsx(DaDataInputControl, { label: "\u0424\u0430\u043C\u0438\u043B\u0438\u044F", maxLength: 60, disabled: input?.filledByEsia && isEsiaAuthorize(field, FIELD_NAME), ...field(input?.name ?? ''), ...input, onChange: onChange }));
4882
+ return (jsx(DaDataInputControl, { label: "\u0424\u0430\u043C\u0438\u043B\u0438\u044F", maxLength: 60, disabled: isEsiaAuthorize(field, input), ...field(input?.name ?? ''), ...input, onChange: onChange }));
4860
4883
  });
4861
4884
 
4862
4885
  const TotalIncomeField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u0421\u043E\u0432\u043E\u043A\u0443\u043F\u043D\u044B\u0439 \u043E\u0444\u0438\u0446\u0438\u0430\u043B\u044C\u043D\u044B\u0439 \u0434\u043E\u0445\u043E\u0434 \u0432 \u043C\u0435\u0441\u044F\u0446 \u043F\u043E\u0441\u043B\u0435 \u0432\u044B\u0447\u0435\u0442\u0430 \u043D\u0430\u043B\u043E\u0433\u043E\u0432 (\u0437\u0430\u0440\u043F\u043B\u0430\u0442\u0430, \u043F\u0440\u0435\u043C\u0438\u0438)", placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435", isInteger: true, ...field(input?.name ?? ''), ...input })));
4863
4886
 
4864
- const WagesField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u0421\u043E\u0432\u043E\u043A\u0443\u043F\u043D\u044B\u0439 \u0434\u043E\u0445\u043E\u0434 \u0432 \u043C\u0435\u0441\u044F\u0446 \u043F\u043E\u0441\u043B\u0435 \u0432\u044B\u0447\u0435\u0442\u0430 \u043D\u0430\u043B\u043E\u0433\u043E\u0432 (\u0437\u0430\u0440\u043F\u043B\u0430\u0442\u0430, \u043F\u0440\u0435\u043C\u0438\u0438)", placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435", isInteger: true, ...field(input?.name ?? ''), ...input })));
4887
+ const WagesField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u0421\u043E\u0432\u043E\u043A\u0443\u043F\u043D\u044B\u0439 \u0434\u043E\u0445\u043E\u0434 \u0432 \u043C\u0435\u0441\u044F\u0446 \u043F\u043E\u0441\u043B\u0435 \u0432\u044B\u0447\u0435\u0442\u0430 \u043D\u0430\u043B\u043E\u0433\u043E\u0432 (\u0437\u0430\u0440\u043F\u043B\u0430\u0442\u0430, \u043F\u0440\u0435\u043C\u0438\u0438)", placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435", isInteger: true, ...field(input?.name ?? ''), ...input, disabled: isEsiaAuthorize(field, input) })));
4865
4888
 
4866
4889
  const DELIVERY_CITIES_REF = {
4867
4890
  $ref: '/wcms-resources/delivery-cities-data.json',
@@ -4899,7 +4922,6 @@
4899
4922
  addressRetail: AddressRetailField,
4900
4923
  addressMatch: AddressMatchField,
4901
4924
  sex: SexField,
4902
- limitedBirthday: LimitedBirthdayField,
4903
4925
  birthPlace: BirthPlaceField,
4904
4926
  education: EducationField,
4905
4927
  housing: HousingField,
@@ -4938,6 +4960,7 @@
4938
4960
  calculator: CreditCalcField,
4939
4961
  confirmationIncome: ConfirmationIncomeField,
4940
4962
  inn: DaDataInnField,
4963
+ ...InputsApplicationLeadMap,
4941
4964
  };
4942
4965
  const InputRetailCardMap = {
4943
4966
  addressCourier: (props) => (jsx(AddressCourierField, { ...props, source: DELIVERY_CITIES_REF })),
@@ -5491,7 +5514,7 @@
5491
5514
  const participant = task.participants[0];
5492
5515
  const { classCard: cardCategory, codeWord, paymentSystemTypeCd: paymentSystem, currencyCode: currency, } = task;
5493
5516
  const { loanAmount: moneyValue, creditPeriod: monthsValue, paymentTypeCd } = task;
5494
- const { birthDate: limitedBirthday, midname: middleName, name, surname, birthPlace, dulIssueDate: dulIssueDate, dulIssuedBy, dulNumber, dulSerie, dulSubdivisionCode, educationLevelCd: education, registrationDate: participantDateRegistration, houseTypeCd: housing, genderCd, participantContacts = [], participantAddresses = [], employmentContractDate: beginDate, employmentTypeCd: employment, organizationName, organizationInn: inn, organizationActivityTypeCd: employerActivities, organizationTypeCd: organization, organizationKindCd: employerOrganization, employeesNumberCd: amountWorkers, opf: legalForm, seniority: generalSeniority, generalSeniority: experience5Years, jobsNumber, lastWorkDuration: lastJobExperience, positionCd: positionOrganization, maritalStatusCd: familyStatus, childrenDependents: children, totalDependents: familyMembers, otherDependents: dependents, militaryStatusCd: conscription, participantIncomes, snils, armyIdFlg, bankruptcyFlg, shareholderFlg, nameLegalEntity: legalEntityName, creditInRshbCd, payrollCardRshbFlg: isInsurance, consentInsuranceFlg: isSalaryClient, incomeCertificateCd, } = participant;
5517
+ const { birthDate: limitedBirthday, midname: middleName, name, surname, birthPlace, dulIssueDate: dulIssueDate, dulIssuedBy, dulNumber, dulSerie, dulSubdivisionCode, educationLevelCd: education, registrationDate: participantDateRegistration, houseTypeCd: housing, genderCd, participantContacts = [], participantAddresses = [], employmentContractDate: beginDate, employmentTypeCd: employment, organizationName, organizationInn: inn, organizationActivityTypeCd: employerActivities, organizationTypeCd: organization, organizationKindCd: employerOrganization, employeesNumberCd: amountWorkers, opf: legalForm, seniority: generalSeniority, generalSeniority: experience5Years, jobsNumber, lastWorkDuration: lastJobExperience, positionCd: positionOrganization, maritalStatusCd: familyStatus, childrenDependents: children, totalDependents: familyMembers, otherDependents: dependents, militaryStatusCd: conscription, participantIncomes, snils, armyIdFlg, bankruptcyFlg, shareholderFlg, nameLegalEntity: legalEntityName, creditInRshbCd, payrollCardRshbFlg: isInsurance, consentInsuranceFlg: isSalaryClient, incomeCertificateCd, profile, } = participant;
5495
5518
  return {
5496
5519
  currency: currency?.key,
5497
5520
  paymentSystem: getSelectValue(paymentSystem),
@@ -5543,6 +5566,7 @@
5543
5566
  monthsValue,
5544
5567
  isAnnuity: paymentTypeCd?.key === 'ANNUITY',
5545
5568
  },
5569
+ esiaAccountTypeCd: profile?.esiaAccountTypeCd,
5546
5570
  ...getParticipantIncomes(participantIncomes),
5547
5571
  ...getParticipantAddresses(participantAddresses),
5548
5572
  ...getParticipantContacts(participantContacts),
@@ -5597,39 +5621,6 @@
5597
5621
  };
5598
5622
  };
5599
5623
 
5600
- const getLink = (body) => fetchRetailJSON('/esia/getLink', 'POST', body);
5601
-
5602
- const EsiaLoginDialog = JSX(({ onClose }) => {
5603
- const navigator = locationNavigator();
5604
- const retailFormStore = useRetailFormStore();
5605
- const handleAuth = useCallback(async () => {
5606
- const resp = await getLink({
5607
- redirectUri: globalThis.location.origin + globalThis.location.pathname,
5608
- });
5609
- if (resp?.link) {
5610
- navigator.assign(resp.link);
5611
- globalThis.location.href = resp.link;
5612
- }
5613
- }, []);
5614
- const handleClose = useCallback(() => {
5615
- if (retailFormStore.leadForm) {
5616
- const leadForm = { ...retailFormStore.leadForm };
5617
- delete leadForm.esiaAccountTypeCd;
5618
- retailFormStore.leadForm = leadForm;
5619
- }
5620
- onClose?.();
5621
- }, []);
5622
- return (jsx(Dialog, { className: "my-6xl max-w-lg w-full min-h-fit mx-auto rounded-lg", onClose: handleClose, children: jsxs("div", { className: "flex flex-col gap-lg items-center rounded-md", children: [jsxs("div", { className: "flex items-center justify-around w-full px-m", children: [jsxs("ul", { className: "list-disc", children: [jsx("li", { children: "\u0412\u0435\u0440\u043E\u044F\u0442\u043D\u043E\u0441\u0442\u044C \u043E\u0434\u043E\u0431\u0440\u0435\u043D\u0438\u044F \u0432\u044B\u0448\u0435" }), jsx("li", { children: "\u0411\u0435\u0437 \u0441\u043F\u0440\u0430\u0432\u043E\u043A \u043E \u0434\u043E\u0445\u043E\u0434\u0430\u0445 \u0438 \u0442\u0440\u0443\u0434\u043E\u0443\u0441\u0442\u0440\u043E\u0439\u0441\u0442\u0432\u0435" }), jsx("li", { children: "\u0421 \u0437\u0430\u0449\u0438\u0442\u043E\u0439 \u0412\u0430\u0448\u0438\u0445 \u0434\u0430\u043D\u043D\u044B\u0445" })] }), jsx(Img, { image: { icon: 'GosUslugiIcon', iconVersion: 'normal' }, height: "70" })] }), jsxs("div", { className: "@container flex flex-wrap gap-lg w-full", children: [jsx(Button, { type: "button", onClick: handleAuth, className: "w-full md:w-auto", children: "\u0417\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u044C \u0447\u0435\u0440\u0435\u0437 \u0413\u043E\u0441\u0443\u0441\u043B\u0443\u0433\u0438" }), jsx(Button, { type: "button", version: "secondary", onClick: handleClose, className: "w-full md:w-auto", children: "\u041F\u0440\u043E\u043F\u0443\u0441\u0442\u0438\u0442\u044C" })] })] }) }));
5623
- });
5624
-
5625
- const useEsiaLoginDialog = (nextStepLink) => {
5626
- const { open } = useDialog(EsiaLoginDialog);
5627
- const navigator = locationNavigator();
5628
- return useCallback(() => {
5629
- open({ onClose: () => navigator.assign(nextStepLink) });
5630
- }, [open, nextStepLink]);
5631
- };
5632
-
5633
5624
  // TODO Не должно быть импортов из бизнес-слоя в API слой. Только наоборот.
5634
5625
  const getUpdateUserProfileData = (profileId, formData, consents) => {
5635
5626
  const { name = '', surname = '', middleName = '', limitedBirthday = '', phone = '', email = '', } = formData;
@@ -5751,79 +5742,80 @@
5751
5742
 
5752
5743
  /* eslint-disable max-lines */
5753
5744
  // eslint-disable-next-line max-lines-per-function
5754
- const useApplicationLeadApi = ({ programId, nextStepLink, productType, esiaError, data, }) => {
5745
+ const useApplicationLeadApi = ({ programId, nextStepLink, productType, data, }) => {
5755
5746
  const [isSending, { setTrue: startSending, setFalse: endSending }] = useBool(false);
5756
5747
  const [ok, setOK] = useState();
5757
5748
  const saveUserData = useSaveUserData();
5758
5749
  const sendAspects = useSendLeadFormAspects({ data });
5759
5750
  const navigator = locationNavigator();
5760
- const openEsiaLoginDialog = useEsiaLoginDialog(nextStepLink);
5761
- const consentBkiDialog = useConsentBkiDialog(openEsiaLoginDialog);
5751
+ const goToNextStep = useCallback(() => {
5752
+ navigator.assign(nextStepLink);
5753
+ }, []);
5754
+ const consentBkiDialog = useConsentBkiDialog(goToNextStep);
5762
5755
  const verifyPhoneDialog = useDialog(VerifyPhoneDialog);
5763
5756
  const draftDialog = useDraftDialog();
5764
5757
  const handleSubmit = useCallback(async (formData) => {
5765
- if (esiaError) {
5766
- navigator.assign(nextStepLink);
5767
- return;
5768
- }
5769
5758
  try {
5770
5759
  startSending();
5771
5760
  const transformedFormData = transformFormData(formData);
5772
5761
  const profileId = await createUserProfile({
5773
5762
  profile: { phone: formatPhone(transformedFormData.phone) },
5774
5763
  });
5775
- if (profileId && transformedFormData?.phone) {
5776
- const sendCurrentTask = async () => {
5777
- await updateUserData({
5778
- programId,
5779
- profileId,
5780
- formData: transformedFormData,
5781
- productType,
5782
- saveUserData,
5783
- sendAspects,
5784
- });
5785
- verifyPhoneDialog.close();
5786
- if (productType === 'debitCard') {
5787
- openEsiaLoginDialog();
5764
+ if (!profileId) {
5765
+ throw new Error();
5766
+ }
5767
+ const sendCurrentTask = async () => {
5768
+ await updateUserData({
5769
+ programId,
5770
+ profileId,
5771
+ formData: transformedFormData,
5772
+ productType,
5773
+ saveUserData,
5774
+ sendAspects,
5775
+ });
5776
+ verifyPhoneDialog.close();
5777
+ if (productType === 'debitCard') {
5778
+ goToNextStep();
5779
+ }
5780
+ else {
5781
+ consentBkiDialog.open(transformedFormData.phone, profileId);
5782
+ }
5783
+ };
5784
+ const handleSuccessVerify = async () => {
5785
+ try {
5786
+ const lastTaskId = await getLastTaskStatus({ profileId, programId });
5787
+ if (lastTaskId) {
5788
+ const task = await getTaskById({ taskId: lastTaskId });
5789
+ verifyPhoneDialog.close();
5790
+ draftDialog.open({
5791
+ task,
5792
+ isFromLead: true,
5793
+ sendAspects,
5794
+ onClose: sendCurrentTask,
5795
+ });
5788
5796
  }
5789
5797
  else {
5790
- consentBkiDialog.open(transformedFormData.phone, profileId);
5798
+ await sendCurrentTask();
5791
5799
  }
5792
- };
5793
- const handleSuccessVerify = async () => {
5794
- try {
5795
- const lastTaskId = await getLastTaskStatus({ profileId, programId });
5796
- if (lastTaskId) {
5797
- const task = await getTaskById({ taskId: lastTaskId });
5798
- verifyPhoneDialog.close();
5799
- draftDialog.open({
5800
- task,
5801
- isFromLead: true,
5802
- sendAspects,
5803
- onClose: sendCurrentTask,
5804
- });
5805
- }
5806
- else {
5807
- await sendCurrentTask();
5808
- }
5809
- }
5810
- catch {
5811
- setOK(false);
5812
- }
5813
- };
5814
- const acceptedConsents = getAcceptedConsents(formData, productType);
5815
- verifyPhoneDialog.open({
5816
- phone: transformedFormData?.phone,
5817
- consents: acceptedConsents,
5818
- onSuccess: handleSuccessVerify,
5819
- });
5820
- endSending();
5821
- }
5800
+ }
5801
+ catch {
5802
+ setOK(false);
5803
+ }
5804
+ };
5805
+ const acceptedConsents = getAcceptedConsents(transformedFormData, productType);
5806
+ verifyPhoneDialog.open({
5807
+ phone: transformedFormData.phone,
5808
+ consents: acceptedConsents,
5809
+ onSuccess: handleSuccessVerify,
5810
+ });
5822
5811
  }
5823
5812
  catch {
5824
5813
  setOK(false);
5825
5814
  }
5826
- }, [esiaError]);
5815
+ finally {
5816
+ endSending();
5817
+ }
5818
+ }, []);
5827
5819
  return { isSending, ok, handleSubmit };
5828
5820
  };
5829
5821
  const getAcceptedConsents = (formData, productType) => {
@@ -5912,7 +5904,10 @@
5912
5904
  }
5913
5905
  }, [target, key]);
5914
5906
 
5915
- const updateProfileEsia = (body) => fetchRetailJSON('/esia/updateProfileEsia', 'POST', body);
5907
+ const esiaRequestProfile = (body) => fetchRetailJSON('/esia/requestProfile', 'POST', body).then((res) => {
5908
+ saveToken(res);
5909
+ return res;
5910
+ });
5916
5911
 
5917
5912
  const initialFormState = {
5918
5913
  surname: '',
@@ -5930,19 +5925,24 @@
5930
5925
  consentPhotoFlg: false,
5931
5926
  consentFATCA: false,
5932
5927
  };
5933
- const getInitialFormState$1 = (inputs, savedForm) => {
5928
+ const getInitialFormState$1 = (inputs, savedForm, esiaAuthSuccess) => {
5934
5929
  if (savedForm) {
5935
- return { ...savedForm, limitedBirthday: new Date(savedForm?.limitedBirthday || 0) };
5930
+ return {
5931
+ ...savedForm,
5932
+ limitedBirthday: new Date(savedForm?.limitedBirthday || 0),
5933
+ ...(!esiaAuthSuccess && {
5934
+ esiaAccountTypeCd: { key: '' },
5935
+ }),
5936
+ };
5936
5937
  }
5937
5938
  const formState = Object.fromEntries(inputs.map((_) => [_.name, initialFormState[_.name || '']]));
5938
5939
  return { ...formState };
5939
5940
  };
5940
5941
 
5941
- const uploadFile = async (file, taskId, documentCategory) => {
5942
+ const uploadFile = async (file, documentCategory, isPDF = false) => {
5942
5943
  const fd = new FormData();
5943
- fd.append('taskId', taskId);
5944
5944
  fd.append('documentCategory', documentCategory);
5945
- fd.append('file', file, 'file.pdf');
5945
+ fd.append('file', file, `file.${isPDF ? 'pdf' : 'xml'}`);
5946
5946
  const res = await globalThis
5947
5947
  ?.fetch?.(`/light-api-cash/v1/file`, {
5948
5948
  method: 'POST',
@@ -5956,23 +5956,13 @@
5956
5956
  return res;
5957
5957
  };
5958
5958
 
5959
- const parseEsiaProfile = async (esiaProfile, taskId, isDebit) => {
5960
- isDebit ? checkEsiaDataForDebit(esiaProfile) : checkEsiaDataForCredit(esiaProfile);
5959
+ const parseEsiaProfile = async (esiaProfile, isDebit) => {
5960
+ checkEsiaData(esiaProfile);
5961
+ const isFullEsiaData = !isDebit && checkEsiaAdditionalDocument(esiaProfile);
5961
5962
  const { profile, addInfo, document, addressRegistration, addressFact, esiaAdditionalDocument } = esiaProfile;
5962
- const files = [];
5963
- if (!isDebit) {
5964
- await saveDocument({
5965
- document: esiaAdditionalDocument.pdfFileWorkbook,
5966
- taskId,
5967
- category: 'CONFIRMING_INCOME_DOC',
5968
- files,
5969
- });
5970
- await saveDocument({
5971
- document: esiaAdditionalDocument.pdfFilePayout,
5972
- taskId,
5973
- category: 'CONFIRMING_EMPLOYMENT_DOC',
5974
- files,
5975
- });
5963
+ let files = [];
5964
+ if (isFullEsiaData) {
5965
+ files = await saveDocuments(esiaAdditionalDocument);
5976
5966
  }
5977
5967
  const mainData = {
5978
5968
  name: profile.name,
@@ -5989,11 +5979,11 @@
5989
5979
  birthPlace: addInfo.birthPlace,
5990
5980
  addressRegistration: buildAddress(addressRegistration),
5991
5981
  addressFact: buildAddress(addressFact),
5992
- esiaAccountTypeCd: profile.esiaAccountType,
5982
+ esiaAccountTypeCd: isDebit ? profile.esiaAccountType : { key: '' },
5993
5983
  };
5994
5984
  return {
5995
5985
  ...mainData,
5996
- ...(!isDebit && {
5986
+ ...(isFullEsiaData && {
5997
5987
  snils: addInfo.snils,
5998
5988
  inn: esiaAdditionalDocument.inn,
5999
5989
  wages: Math.floor(esiaAdditionalDocument.averageMonthlyIncome)?.toString(),
@@ -6002,6 +5992,9 @@
6002
5992
  generalSeniority: getYearFromMonth(esiaAdditionalDocument.workLength).toString(),
6003
5993
  lastJobExperience: getYearFromMonth(esiaAdditionalDocument.workLengthLastJob).toString(),
6004
5994
  jobsNumber: esiaAdditionalDocument.jobsNumberInFiveYears.toString(),
5995
+ esiaAccountTypeCd: profile.esiaAccountType,
5996
+ confirmationIncome: { key: 'SFR_CERTIFICATE', text: 'Запрос Банком доходов из СФР' },
5997
+ employment: { key: 'WORK', text: 'Работаю' },
6005
5998
  files,
6006
5999
  }),
6007
6000
  };
@@ -6034,43 +6027,60 @@
6034
6027
  };
6035
6028
  };
6036
6029
  const getYearFromMonth = (month) => Math.floor(month / 12);
6037
- const saveDocument = async ({ document, taskId, category, files, }) => {
6038
- await fetch(`data:application/pdf;base64,${document}`)
6039
- .then((res) => res.blob())
6040
- .then((value) => uploadFile(value, taskId, category))
6041
- .then((file) => files.push(file));
6042
- };
6043
- const checkEsiaDataForCredit = (esiaProfile) => {
6044
- const { profile, document, addressRegistration, esiaAdditionalDocument } = esiaProfile;
6045
- const data = [
6046
- profile.name,
6047
- profile.surname,
6048
- profile.midname,
6049
- profile.birthDate,
6050
- profile.phone,
6051
- profile.email,
6052
- document.dulIssueDate,
6053
- document.dulIssuedBy,
6054
- document.dulNumber,
6055
- document.dulSerie,
6056
- document.dulSubdivisionCode,
6057
- addressRegistration,
6058
- profile.esiaAccountType,
6059
- esiaAdditionalDocument.inn,
6060
- esiaAdditionalDocument.averageMonthlyIncome.toString(),
6061
- esiaAdditionalDocument.startWorkDate,
6062
- esiaAdditionalDocument.workLengthInFiveYears.toString(),
6063
- esiaAdditionalDocument.workLength.toString(),
6064
- esiaAdditionalDocument.workLengthLastJob.toString(),
6065
- esiaAdditionalDocument.jobsNumberInFiveYears.toString(),
6066
- esiaAdditionalDocument.pdfFilePayout,
6067
- esiaAdditionalDocument.pdfFileWorkbook,
6030
+ const saveDocuments = async (esiaAdditionalDocument) => {
6031
+ const files = [];
6032
+ const documents = [
6033
+ {
6034
+ file: esiaAdditionalDocument.pdfFileWorkbook,
6035
+ category: 'CONFIRMING_INCOME_DOC',
6036
+ isPDF: true,
6037
+ },
6038
+ {
6039
+ file: esiaAdditionalDocument.pdfFilePayout,
6040
+ category: 'CONFIRMING_EMPLOYMENT_DOC',
6041
+ isPDF: true,
6042
+ },
6043
+ {
6044
+ file: esiaAdditionalDocument.pdfFileSigPayout,
6045
+ category: 'CONFIRMING_EMPLOYMENT_DOC',
6046
+ isPDF: true,
6047
+ },
6048
+ {
6049
+ file: esiaAdditionalDocument.xmlFilePayout,
6050
+ category: 'CONFIRMING_EMPLOYMENT_DOC',
6051
+ isPDF: false,
6052
+ },
6053
+ {
6054
+ file: esiaAdditionalDocument.xmlFileSigPayout,
6055
+ category: 'CONFIRMING_EMPLOYMENT_DOC',
6056
+ isPDF: false,
6057
+ },
6058
+ {
6059
+ file: esiaAdditionalDocument.xmlFileWorkbook,
6060
+ category: 'CONFIRMING_INCOME_DOC',
6061
+ isPDF: false,
6062
+ },
6063
+ {
6064
+ file: esiaAdditionalDocument.pdfFileSigWorkbook,
6065
+ category: 'CONFIRMING_INCOME_DOC',
6066
+ isPDF: true,
6067
+ },
6068
+ {
6069
+ file: esiaAdditionalDocument.xmlFileSigWorkbook,
6070
+ category: 'CONFIRMING_INCOME_DOC',
6071
+ isPDF: false,
6072
+ },
6068
6073
  ];
6069
- if (!data.every((_) => Boolean(_))) {
6070
- throw new Error();
6074
+ for (const doc of documents) {
6075
+ const contentType = doc.isPDF ? 'data:application/pdf;base64' : 'data:application/xml;base64';
6076
+ await fetch(`${contentType},${doc.file}`)
6077
+ .then((res) => res.blob())
6078
+ .then((value) => uploadFile(value, doc.category, doc.isPDF))
6079
+ .then((file) => files.push(file));
6071
6080
  }
6081
+ return files;
6072
6082
  };
6073
- const checkEsiaDataForDebit = (esiaProfile) => {
6083
+ const checkEsiaData = (esiaProfile) => {
6074
6084
  const { profile, document, addressRegistration } = esiaProfile;
6075
6085
  const data = [
6076
6086
  profile.name,
@@ -6078,7 +6088,6 @@
6078
6088
  profile.midname,
6079
6089
  profile.birthDate,
6080
6090
  profile.phone,
6081
- profile.email,
6082
6091
  document.dulIssueDate,
6083
6092
  document.dulIssuedBy,
6084
6093
  document.dulNumber,
@@ -6087,79 +6096,101 @@
6087
6096
  addressRegistration,
6088
6097
  profile.esiaAccountType,
6089
6098
  ];
6090
- if (!data.every((_) => Boolean(_))) {
6099
+ if (!data.every(Boolean)) {
6091
6100
  throw new Error();
6092
6101
  }
6093
6102
  };
6103
+ const checkEsiaAdditionalDocument = (esiaProfile) => {
6104
+ const { esiaAdditionalDocument } = esiaProfile;
6105
+ const data = [
6106
+ esiaAdditionalDocument?.inn,
6107
+ esiaAdditionalDocument?.averageMonthlyIncome?.toString(),
6108
+ esiaAdditionalDocument?.startWorkDate,
6109
+ esiaAdditionalDocument?.workLengthInFiveYears?.toString(),
6110
+ esiaAdditionalDocument?.workLength?.toString(),
6111
+ esiaAdditionalDocument?.workLengthLastJob?.toString(),
6112
+ esiaAdditionalDocument?.jobsNumberInFiveYears?.toString(),
6113
+ esiaAdditionalDocument?.pdfFilePayout,
6114
+ esiaAdditionalDocument?.pdfFileWorkbook,
6115
+ esiaAdditionalDocument?.pdfFileSigPayout,
6116
+ esiaAdditionalDocument?.xmlFilePayout,
6117
+ esiaAdditionalDocument?.xmlFileSigPayout,
6118
+ esiaAdditionalDocument?.xmlFileWorkbook,
6119
+ esiaAdditionalDocument?.pdfFileSigWorkbook,
6120
+ esiaAdditionalDocument?.xmlFileSigWorkbook,
6121
+ ];
6122
+ return data.every(Boolean);
6123
+ };
6094
6124
 
6095
- const useInitApplicationLead = ({ inputs, nextStepLink, productType, setEsiaError, }) => {
6096
- const navigator = locationNavigator();
6097
- const [isLoading, { setTrue: startLoading, setFalse: endLoading }] = useBool(false);
6125
+ const useInitApplicationLead = ({ inputs, productType, setEsiaStatus, esiaAuthSuccess, }) => {
6098
6126
  const leadFormStore = useLeadFormStore();
6099
6127
  const saveForm = useSetter(leadFormStore, 'leadForm');
6100
- const initialFormState = useMemo(() => getInitialFormState$1(inputs, leadFormStore.leadForm), [inputs, leadFormStore.leadForm]);
6101
- const updateEsiaProfile = useCallback(async (profileId, code, state) => {
6102
- startLoading();
6128
+ const initialFormState = useMemo(() => getInitialFormState$1(inputs, leadFormStore.leadForm, esiaAuthSuccess), [inputs, leadFormStore.leadForm]);
6129
+ const requestEsiaProfile = useCallback(async (code, state) => {
6130
+ setEsiaStatus(EsiaStatuses.Pending);
6103
6131
  try {
6104
- const data = await updateProfileEsia({
6105
- profileId,
6132
+ const data = await esiaRequestProfile({
6106
6133
  code,
6107
6134
  state,
6108
6135
  redirectUri: globalThis.location?.href,
6136
+ authorize: true,
6109
6137
  });
6110
- if (data && leadFormStore?.taskId) {
6111
- const parsedData = await parseEsiaProfile(data, leadFormStore.taskId.toString(), productType === 'debitCard');
6138
+ if (data) {
6139
+ const parsedData = await parseEsiaProfile(data, productType === 'debitCard');
6112
6140
  saveForm((_) => ({
6113
6141
  ..._,
6114
6142
  ...parsedData,
6115
6143
  }));
6144
+ setEsiaStatus(EsiaStatuses.Success);
6116
6145
  }
6117
- navigator.assign(nextStepLink);
6118
6146
  }
6119
6147
  catch {
6120
- setEsiaError();
6121
- }
6122
- finally {
6123
- endLoading();
6148
+ setEsiaStatus(EsiaStatuses.Error);
6124
6149
  }
6125
- }, [nextStepLink]);
6150
+ }, []);
6126
6151
  useEffect(() => {
6127
6152
  leadFormStore.productType = productType;
6128
- const profileId = (safeJsonParse(globalThis.localStorage?.getItem('profileId') ?? ''));
6129
6153
  const params = new URLSearchParams(decodeURIComponent(globalThis.location?.search));
6130
6154
  const code = params.get('code');
6131
6155
  const state = params.get('state');
6132
- if (profileId && code && state) {
6133
- updateEsiaProfile(profileId, code, state);
6156
+ if (code && state) {
6157
+ requestEsiaProfile(code, state);
6134
6158
  }
6135
6159
  else {
6136
6160
  sessionStorage.removeItem('accessToken');
6137
6161
  sessionStorage.removeItem('refreshToken');
6138
6162
  }
6139
6163
  }, []);
6140
- return [initialFormState, { isLoading }];
6164
+ return initialFormState;
6141
6165
  };
6142
6166
 
6167
+ var EsiaStatuses;
6168
+ (function (EsiaStatuses) {
6169
+ EsiaStatuses["Success"] = "SUCCESS";
6170
+ EsiaStatuses["Error"] = "ERROR";
6171
+ EsiaStatuses["Pending"] = "PENDING";
6172
+ })(EsiaStatuses || (EsiaStatuses = {}));
6143
6173
  const ApplicationLeadForm = JSX(({ className, title, programId = '', nextStepLink = '/credit-lead', button, productType = 'credit', data, ...rest }) => {
6144
- const [esiaError, { setTrue: setEsiaError }] = useBool(false);
6174
+ const [esiaStatus, setEsiaStatus] = useState();
6175
+ const leadForm = useRef(null);
6145
6176
  const applicationFormData = useMemo(() => getApplicationFormData(productType), [productType]);
6146
6177
  const inputs = useMemo(() => getInputs(applicationFormData), [applicationFormData]);
6147
6178
  const extendedValidatorObj = useMemo(() => getExtendedValidatorObj(productType), [productType]);
6148
6179
  const formValidator = useMemo(() => getFormValidator(inputs, extendedValidatorObj), [inputs, extendedValidatorObj]);
6149
- const [initialFormState, { isLoading }] = useInitApplicationLead({
6180
+ const initialFormState = useInitApplicationLead({
6150
6181
  inputs,
6151
6182
  nextStepLink,
6152
6183
  productType,
6153
- setEsiaError,
6184
+ setEsiaStatus,
6185
+ esiaAuthSuccess: esiaStatus === EsiaStatuses.Success,
6154
6186
  });
6155
6187
  const { isSending, ok, handleSubmit } = useApplicationLeadApi({
6156
6188
  programId,
6157
6189
  nextStepLink,
6158
6190
  productType,
6159
- esiaError,
6160
6191
  data,
6161
6192
  });
6162
- const [, { field, onSubmit }] = useForm(initialFormState, {
6193
+ const [, { field, onSubmit, reset }] = useForm(initialFormState, {
6163
6194
  formValidator,
6164
6195
  onSubmit: handleSubmit,
6165
6196
  });
@@ -6169,7 +6200,17 @@
6169
6200
  responseTypeDialog.open({ ok });
6170
6201
  }
6171
6202
  }, [ok]);
6172
- return (jsx(ApplicationFormLayout, { className: style('container space-y-m', className), title: title, ...rest, children: jsxs("form", { onSubmit: onSubmit, className: "space-y-m relative", children: [isLoading ? jsx(Loader, { blur: false }) : null, applicationFormData.map((_, i) => (jsxs("div", { className: style(inputColumnStyles(_.columns), 'grid gap-x-m'), children: [renderTitle(_.title), renderInputs$1({ field, inputs: _?.inputs }, productType)] }, `section-${i}`))), renderSubmitButton(button, isSending), esiaError ? (jsx(Text, { size: "text-m", font: "font-medium", color: "text-error", children: "\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0413\u043E\u0441\u0443\u0441\u043B\u0443\u0433\u0438 \u0434\u043B\u044F \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u044F \u0437\u0430\u044F\u0432\u043A\u0438 \u043D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E, \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E \u0437\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u044C \u043F\u043E\u043B\u044F \u0432\u0440\u0443\u0447\u043D\u0443\u044E." })) : null] }) }));
6203
+ useEffect(() => {
6204
+ if (esiaStatus && leadForm?.current) {
6205
+ leadForm.current.scrollIntoView({
6206
+ block: 'start',
6207
+ });
6208
+ }
6209
+ if (esiaStatus === EsiaStatuses.Success) {
6210
+ reset();
6211
+ }
6212
+ }, [leadForm?.current, esiaStatus]);
6213
+ return (jsxs(ApplicationFormLayout, { className: style('container space-y-m', className), title: title, ...rest, children: [!esiaStatus ? jsx(EsiaLoginBanner, {}) : null, jsxs("form", { onSubmit: onSubmit, className: "space-y-m relative", ref: leadForm, children: [esiaStatus === EsiaStatuses.Pending ? jsx(Loader, { blur: false }) : null, applicationFormData.map((_, i) => (jsxs("div", { className: style(inputColumnStyles(_.columns), 'grid gap-x-m'), children: [renderTitle(_.title), renderInputs$1({ field, inputs: _?.inputs }, productType)] }, `section-${i}`))), renderSubmitButton(button, isSending), esiaStatus === EsiaStatuses.Error ? (jsx(Text, { size: "text-m", font: "font-medium", color: "text-error", children: "\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0413\u043E\u0441\u0443\u0441\u043B\u0443\u0433\u0438 \u0434\u043B\u044F \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u044F \u0437\u0430\u044F\u0432\u043A\u0438 \u043D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E, \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E \u0437\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u044C \u043F\u043E\u043B\u044F \u0432\u0440\u0443\u0447\u043D\u0443\u044E." })) : null] })] }));
6173
6214
  });
6174
6215
  const getInputs = (applicationFormData) => (applicationFormData?.flatMap((_) => _?.inputs) || []);
6175
6216
  const getExtendedValidatorObj = (productType) => ({
@@ -7803,6 +7844,12 @@
7803
7844
  });
7804
7845
  const getValue = (field) => (name) => field(name)?.value;
7805
7846
 
7847
+ const getRetailFormValidator = ({ formState, inputs, step, productType, }) => getFormValidator(calculateInputs((_) => formState[_])(inputs, step), {
7848
+ ...validatorObj,
7849
+ limitedBirthday: getLimitedBirthdayValidation(productType),
7850
+ dulIssueDate: passportValidator(formState.limitedBirthday),
7851
+ })(formState);
7852
+
7806
7853
  const StepsNavigationButtons$2 = JSX(({ step, isSending, onPrevStep }) => {
7807
7854
  const isFirstStep = step === 0;
7808
7855
  const isFinalStep = step === 5;
@@ -7883,6 +7930,7 @@
7883
7930
  mandatoryPayments: undefined,
7884
7931
  snils: '',
7885
7932
  armyIdFlg: false,
7933
+ esiaAccountTypeCd: { key: '', text: '' },
7886
7934
  },
7887
7935
  {
7888
7936
  bankruptcyFlg: false,
@@ -8121,15 +8169,14 @@
8121
8169
  };
8122
8170
 
8123
8171
  const PRODUCT_TYPE$2 = 'creditCard';
8124
- const extendedValidatorObj$2 = {
8125
- ...validatorObj,
8126
- limitedBirthday: getLimitedBirthdayValidation(PRODUCT_TYPE$2),
8127
- };
8128
8172
  const CreditCardFormStep = JSX(({ step, sections, onPrevStep, onNextStep, onFinish }) => {
8129
8173
  const inputs = useMemo(() => sections?.flatMap((_) => _?.inputs || []), [sections]);
8130
- const formValidator = useCallback((formState) =>
8131
- // TODO Слишком сложно
8132
- getFormValidator(calculateInputs((_) => formState[_])(inputs, step), extendedValidatorObj$2)(formState), [inputs]);
8174
+ const formValidator = useCallback((formState) => getRetailFormValidator({
8175
+ formState,
8176
+ inputs,
8177
+ step,
8178
+ productType: PRODUCT_TYPE$2,
8179
+ }), [inputs]);
8133
8180
  const [initialState, onSubmit, isSending] = useCreditCardFormAPI({
8134
8181
  step,
8135
8182
  onNextStep,
@@ -8278,7 +8325,7 @@
8278
8325
  label: 'Телефон работодателя',
8279
8326
  required: true,
8280
8327
  },
8281
- { name: 'beginDate', required: true },
8328
+ { name: 'beginDate', required: true, filledByEsia: true },
8282
8329
  ],
8283
8330
  },
8284
8331
  {
@@ -8320,16 +8367,22 @@
8320
8367
  title: 'Совокупный доход',
8321
8368
  },
8322
8369
  {
8370
+ columns: 1,
8323
8371
  inputs: [
8324
8372
  {
8325
- name: 'infoCard',
8326
- label: 'Сумма основного и дополнительных доходов после вычета налога',
8373
+ name: 'confirmationIncome',
8374
+ required: true,
8375
+ filledByEsia: true,
8327
8376
  },
8328
8377
  ],
8329
8378
  },
8330
8379
  {
8331
- columns: 1,
8332
- inputs: [{ name: 'confirmationIncome', required: true }],
8380
+ inputs: [
8381
+ {
8382
+ name: 'infoCard',
8383
+ label: 'Сумма основного и дополнительных доходов после вычета налога',
8384
+ },
8385
+ ],
8333
8386
  },
8334
8387
  {
8335
8388
  columns: 1,
@@ -8944,17 +8997,16 @@
8944
8997
  };
8945
8998
 
8946
8999
  const PRODUCT_TYPE$1 = 'credit';
8947
- const extendedValidatorObj$1 = {
8948
- ...validatorObj,
8949
- limitedBirthday: getLimitedBirthdayValidation(PRODUCT_TYPE$1),
8950
- };
8951
9000
  const CreditFormStep = JSX(({ step, sections, programsSource, onPrevStep, onNextStep, onFinish }) => {
8952
9001
  const { programId } = useRetailFormStore();
8953
9002
  const calcData = programsSource?.[programId ?? '']; // Need normalizator useForm, to be save defaultParams
8954
9003
  const inputs = useMemo(() => sections?.flatMap((_) => _?.inputs ?? []), [sections]);
8955
- const formValidator = useCallback((formState) =>
8956
- // TODO Слишком сложно
8957
- getFormValidator(calculateInputs((_) => formState[_])(inputs, step), extendedValidatorObj$1)(formState), [inputs]);
9004
+ const formValidator = useCallback((formState) => getRetailFormValidator({
9005
+ formState,
9006
+ inputs,
9007
+ step,
9008
+ productType: PRODUCT_TYPE$1,
9009
+ }), [inputs]);
8958
9010
  const [initialState, onSubmit, isSending] = useCreditFormAPI({
8959
9011
  step,
8960
9012
  onNextStep,
@@ -9265,15 +9317,14 @@
9265
9317
  };
9266
9318
 
9267
9319
  const PRODUCT_TYPE = 'debitCard';
9268
- const extendedValidatorObj = {
9269
- ...validatorObj,
9270
- limitedBirthday: getLimitedBirthdayValidation(PRODUCT_TYPE),
9271
- };
9272
9320
  const DebitFormStep = JSX(({ step, sections, onPrevStep, onNextStep, onFinish }) => {
9273
9321
  const inputs = useMemo(() => sections?.flatMap((_) => _?.inputs ?? []), [sections]);
9274
- const formValidator = useCallback((formState) =>
9275
- // TODO Слишком сложно
9276
- getFormValidator(calculateInputs((_) => formState[_])(inputs, step), extendedValidatorObj)(formState), [inputs]);
9322
+ const formValidator = useCallback((formState) => getRetailFormValidator({
9323
+ formState,
9324
+ inputs,
9325
+ step,
9326
+ productType: PRODUCT_TYPE,
9327
+ }), [inputs]);
9277
9328
  const [initialState, onSubmit, isSending] = useDebitFormAPI({
9278
9329
  step,
9279
9330
  onNextStep,
@@ -11630,7 +11681,7 @@
11630
11681
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
11631
11682
  });
11632
11683
 
11633
- const packageVersion = "0.14.824";
11684
+ const packageVersion = "0.14.826";
11634
11685
 
11635
11686
  exports.Blocks = Blocks;
11636
11687
  exports.ContentPage = ContentPage;