@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
@@ -1990,11 +1990,13 @@
1990
1990
  });
1991
1991
 
1992
1992
  const ESIA_FIELD_NAME = 'esiaAccountTypeCd';
1993
- const isEsiaAuthorize = (field, name) => Boolean(field(ESIA_FIELD_NAME)?.value?.key) && field(name).value;
1993
+ const isEsiaAuthorize = (field, input, name = '') => input?.filledByEsia &&
1994
+ Boolean(field(ESIA_FIELD_NAME)?.value?.key) &&
1995
+ field(input?.name ?? name).value;
1994
1996
 
1995
- 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 })));
1997
+ 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 })));
1996
1998
 
1997
- 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 })));
1999
+ const NameField$1 = JSX(({ field, input }) => (jsx(InputControl, { label: "\u0418\u043C\u044F", maxLength: 60, disabled: isEsiaAuthorize(field, input), ...field(input?.name ?? ''), ...input })));
1998
2000
 
1999
2001
  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] })));
2000
2002
 
@@ -2030,7 +2032,7 @@
2030
2032
 
2031
2033
  const PhoneField = JSX(({ field, input }) => {
2032
2034
  const fieldName = input?.name || 'phone';
2033
- return jsx(InputPhoneControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...field(fieldName), ...input });
2035
+ return (jsx(InputPhoneControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", disabled: isEsiaAuthorize(field, input, fieldName), ...field(fieldName), ...input }));
2034
2036
  });
2035
2037
 
2036
2038
  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);
@@ -2174,7 +2176,7 @@
2174
2176
  ];
2175
2177
  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') })));
2176
2178
 
2177
- 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 })));
2179
+ 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 })));
2178
2180
 
2179
2181
  const MIN_CREDIT_TERM = 1;
2180
2182
  const MAX_CREDIT_TERM = 180;
@@ -2210,7 +2212,7 @@
2210
2212
  function shouldRenderField({ input, field, }) {
2211
2213
  const { condition } = input;
2212
2214
  const { value } = field(condition?.name || '');
2213
- return !condition || condition?.values?.find((_) => _ === (value?.key ?? value));
2215
+ return !condition || condition?.values?.includes(value?.key ?? value);
2214
2216
  }
2215
2217
 
2216
2218
  const PRODUCT_REF = {
@@ -2460,6 +2462,14 @@
2460
2462
  return true;
2461
2463
  };
2462
2464
  const limitedBirthdayValidator = (params) => validator(limitedBirthdayValidate(params))(params.errorMessage);
2465
+ const passportValidator = (birthDate) => validator((_) => {
2466
+ if (_ && birthDate) {
2467
+ return (_.getTime() >=
2468
+ new Date(birthDate?.getFullYear() + 14, birthDate?.getMonth(), birthDate?.getDate()).getTime());
2469
+ }
2470
+ return false;
2471
+ })('Укажите дату выдачи паспорта');
2472
+ const deliveryDateValidator = (errorMsg) => validator((_) => _?.getTime() >= new Date().getTime())(errorMsg);
2463
2473
  const numberValidator = (errorMsg) => validator((_) => typeof _ === 'string' && _.length === 6)(errorMsg);
2464
2474
  const serieValidator = (errorMsg) => validator((_) => typeof _ === 'string' && _.length === 4)(errorMsg);
2465
2475
  const snilsValidate = (snils) => {
@@ -2514,7 +2524,7 @@
2514
2524
  codeWord: codeWordValidator('Необходимо ввести кодовое слово'),
2515
2525
  confirmationIncome: defaultSelectValidator(),
2516
2526
  methodObtain: defaultValidator(),
2517
- deliveryDate: defaultValidator('Укажите дату доставки'),
2527
+ deliveryDate: deliveryDateValidator('Укажите дату доставки'),
2518
2528
  };
2519
2529
  const validatorRetailObj = {
2520
2530
  organization: defaultSelectValidator('Выберите тип организации'),
@@ -2551,7 +2561,6 @@
2551
2561
  armyIdFlg: agreementValidator,
2552
2562
  dulSerie: serieValidator('Укажите серию паспорта'),
2553
2563
  dulNumber: numberValidator('Укажите номер паспорта'),
2554
- dulIssueDate: defaultValidator('Укажите дату выдачи паспорта'),
2555
2564
  dulSubdivisionCode: numberValidator('Укажите код подразделения'),
2556
2565
  dulIssuedBy: defaultValidator('Укажите организацию, выдавшую паспорт'),
2557
2566
  participantDateRegistration: defaultValidator('Укажите дату регистрации'),
@@ -2668,11 +2677,11 @@
2668
2677
  {
2669
2678
  columns: 2,
2670
2679
  inputs: [
2671
- { name: 'surname', required: true, dadata: true },
2672
- { name: 'name', required: true, dadata: true },
2673
- { name: 'middleName', dadata: true },
2674
- { name: 'limitedBirthday', required: true },
2675
- { name: 'phone', required: true },
2680
+ { name: 'surname', required: true, dadata: true, filledByEsia: true },
2681
+ { name: 'name', required: true, dadata: true, filledByEsia: true },
2682
+ { name: 'middleName', dadata: true, filledByEsia: true },
2683
+ { name: 'limitedBirthday', required: true, filledByEsia: true },
2684
+ { name: 'phone', required: true, filledByEsia: true },
2676
2685
  { name: 'email', required: true, dadata: true },
2677
2686
  ],
2678
2687
  },
@@ -2682,6 +2691,57 @@
2682
2691
  ];
2683
2692
  };
2684
2693
 
2694
+ const getTraceId = () => {
2695
+ const result = new Uint8Array(8);
2696
+ globalThis.crypto.getRandomValues(result);
2697
+ return result.reduce((acc, _) => `${acc}${_.toString(16).padStart(2, '0')}`, '');
2698
+ };
2699
+
2700
+ const fetchRetailJSON = async (url, method, body) => {
2701
+ try {
2702
+ const response = await doRequest(url, method, body);
2703
+ return response.json();
2704
+ }
2705
+ catch (err) {
2706
+ console.error(err);
2707
+ return null;
2708
+ }
2709
+ };
2710
+ async function doRequest(url, method, body) {
2711
+ const traceId = getTraceId();
2712
+ return globalThis?.fetch?.(`${RETAIL_API_BASE_URI}${url}`, {
2713
+ method,
2714
+ headers: {
2715
+ 'Content-Type': 'application/json',
2716
+ 'X-B3-Sampled': '1',
2717
+ 'X-B3-Spanid': traceId,
2718
+ 'X-B3-Traceid': traceId,
2719
+ ...getAuthorizationHeaders(),
2720
+ },
2721
+ credentials: 'include',
2722
+ body: body ? JSON.stringify(body) : null,
2723
+ });
2724
+ }
2725
+ const getAuthorizationHeaders = () => {
2726
+ const token = sessionStorage.getItem('accessToken');
2727
+ return token ? { Authorization: `Bearer ${token}` } : null;
2728
+ };
2729
+
2730
+ const getLink = (body) => fetchRetailJSON('/esia/getLink', 'POST', body);
2731
+
2732
+ const EsiaLoginBanner = JSX(() => {
2733
+ const navigator = locationNavigator();
2734
+ const handleAuth = useCallback(async () => {
2735
+ const resp = await getLink({
2736
+ redirectUri: globalThis.location.origin + globalThis.location.pathname,
2737
+ });
2738
+ if (resp?.link) {
2739
+ navigator.assign(resp.link);
2740
+ }
2741
+ }, []);
2742
+ 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" })] }));
2743
+ });
2744
+
2685
2745
  const debounce = (fn, delay = 600) => {
2686
2746
  let timerId;
2687
2747
  const debouncedCallback = (...args) => {
@@ -2922,7 +2982,7 @@
2922
2982
  qcHouse: '',
2923
2983
  });
2924
2984
  }, []);
2925
- 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 }));
2985
+ return (jsx(DaDataInputControl, { disabled: isEsiaAuthorize(field, input, fieldName), label: "\u0410\u0434\u0440\u0435\u0441", ...field(fieldName), value: fieldValue?.fullAddress, onChange: onChange, ...input, onDaDataChange: onDaDataChange }));
2926
2986
  });
2927
2987
  const getAddressFromDaDataItem = (item) => ({
2928
2988
  apartment: item?.data?.flat,
@@ -3568,42 +3628,6 @@
3568
3628
  const mapByIndex = (points, index) => points.map((_) => _.coords?.[index]);
3569
3629
  const getArraySumAndAverage = (arr) => arr.length && arr.reduce((a, b) => a + b) / arr.length;
3570
3630
 
3571
- const getTraceId = () => {
3572
- const result = new Uint8Array(8);
3573
- globalThis.crypto.getRandomValues(result);
3574
- return result.reduce((acc, _) => `${acc}${_.toString(16).padStart(2, '0')}`, '');
3575
- };
3576
-
3577
- const fetchRetailJSON = async (url, method, body) => {
3578
- try {
3579
- const response = await doRequest(url, method, body);
3580
- return response.json();
3581
- }
3582
- catch (err) {
3583
- console.error(err);
3584
- return null;
3585
- }
3586
- };
3587
- async function doRequest(url, method, body) {
3588
- const traceId = getTraceId();
3589
- return globalThis?.fetch?.(`${RETAIL_API_BASE_URI}${url}`, {
3590
- method,
3591
- headers: {
3592
- 'Content-Type': 'application/json',
3593
- 'X-B3-Sampled': '1',
3594
- 'X-B3-Spanid': traceId,
3595
- 'X-B3-Traceid': traceId,
3596
- ...getAuthorizationHeaders(),
3597
- },
3598
- credentials: 'include',
3599
- body: body ? JSON.stringify(body) : null,
3600
- });
3601
- }
3602
- const getAuthorizationHeaders = () => {
3603
- const token = sessionStorage.getItem('accessToken');
3604
- return token ? { Authorization: `Bearer ${token}` } : null;
3605
- };
3606
-
3607
3631
  const fetchRegionOffices = async (regionKey) => {
3608
3632
  const response = await fetchRetailJSON('/public-data/regionOffices', 'POST', {
3609
3633
  regionRfCd: {
@@ -3833,10 +3857,9 @@
3833
3857
 
3834
3858
  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 ?? '') })));
3835
3859
 
3836
- 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 })));
3860
+ 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) })));
3837
3861
 
3838
- const FIELD_NAME$2 = 'birthPlace';
3839
- 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) })));
3862
+ 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) })));
3840
3863
 
3841
3864
  const safeJsonParse = (data) => {
3842
3865
  try {
@@ -3897,7 +3920,8 @@
3897
3920
 
3898
3921
  const ConfirmationIncomeField = JSX(({ field, input }) => {
3899
3922
  const { data: confirmationIncome } = useLeadFormData('INCOME_CERT_UNITED');
3900
- 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 }));
3923
+ const filledByEsia = isEsiaAuthorize(field, input);
3924
+ 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 })] }));
3901
3925
  });
3902
3926
 
3903
3927
  const ConscriptionField = JSX(({ field, input }) => {
@@ -4238,12 +4262,12 @@
4238
4262
  });
4239
4263
  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] }));
4240
4264
 
4241
- const FIELD_NAME$1 = 'calculator';
4265
+ const FIELD_NAME = 'calculator';
4242
4266
  const CreditCalcField = JSX(({ field, params }) => {
4243
4267
  const handleChange = useCallback((_) => {
4244
- field(FIELD_NAME$1).onChange?.(_);
4268
+ field(FIELD_NAME).onChange?.(_);
4245
4269
  }, []);
4246
- return (jsx(CalculatorCredit, { ...params?.calcData, padding: "p-0", defaultParams: defaultValueAdapter(field(FIELD_NAME$1).value), onChange: handleChange }));
4270
+ return (jsx(CalculatorCredit, { ...params?.calcData, padding: "p-0", defaultParams: defaultValueAdapter(field(FIELD_NAME).value), onChange: handleChange }));
4247
4271
  });
4248
4272
  const PARAMS_MAP = {
4249
4273
  moneyValue: 'sum',
@@ -4441,7 +4465,7 @@
4441
4465
  }
4442
4466
  })();
4443
4467
  }, [employerActivities, employerOrganization, organization, amountWorkers]);
4444
- return (jsx(DaDataInputControl, { label: "\u0418\u041D\u041D", isInteger: true, maxLength: 12, ...input, ...field(input?.name ?? ''), onDaDataChange: onDaDataChange }));
4468
+ return (jsx(DaDataInputControl, { label: "\u0418\u041D\u041D", isInteger: true, maxLength: 12, ...input, ...field(input?.name ?? ''), onDaDataChange: onDaDataChange, disabled: isEsiaAuthorize(field, input) }));
4445
4469
  });
4446
4470
 
4447
4471
  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() })));
@@ -4459,8 +4483,8 @@
4459
4483
 
4460
4484
  const DulIssueDateField = JSX(({ field, input }) => {
4461
4485
  const birthDate = field('limitedBirthday')?.value;
4462
- const startDulIssueDate = useMemo(() => new Date(birthDate.getFullYear() + 14, birthDate.getMonth(), birthDate.getDate()), [birthDate]);
4463
- 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 }));
4486
+ const startDulIssueDate = useMemo(() => new Date(birthDate?.getFullYear() + 14, birthDate?.getMonth(), birthDate?.getDate()), [birthDate]);
4487
+ return (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0432\u044B\u0434\u0430\u0447\u0438", ...field(input?.name ?? ''), disabled: isEsiaAuthorize(field, input), minDate: startDulIssueDate }));
4464
4488
  });
4465
4489
 
4466
4490
  const DulIssuedByField = JSX(({ field, input }) => {
@@ -4468,18 +4492,18 @@
4468
4492
  const onDaDataChange = useCallback((item) => {
4469
4493
  changeDulSubdivisionCode?.(item?.data?.code?.replace('-', ''));
4470
4494
  }, []);
4471
- 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 }));
4495
+ return (jsx(DaDataInputControl, { disabled: isEsiaAuthorize(field, input), label: "\u041A\u0435\u043C \u0432\u044B\u0434\u0430\u043D", ...input, ...field(input?.name ?? ''), onDaDataChange: onDaDataChange, daDataQueryPrefix: dulSubdivisionCode }));
4472
4496
  });
4473
4497
 
4474
- 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 ?? '') })));
4498
+ 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 ?? '') })));
4475
4499
 
4476
- 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 ?? '') })));
4500
+ 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 ?? '') })));
4477
4501
 
4478
4502
  const DulSubdivisionCodeField = JSX(({ field, input }) => {
4479
4503
  const onDaDataChange = useCallback((item) => {
4480
4504
  field?.('dulIssuedBy')?.onChange?.(item?.data?.name);
4481
4505
  }, []);
4482
- 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 }));
4506
+ 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 }));
4483
4507
  });
4484
4508
 
4485
4509
  const EducationField = JSX(({ field, input }) => {
@@ -4524,7 +4548,7 @@
4524
4548
  const MIN_YEARS = 0;
4525
4549
  const Experience5YearsField = JSX(({ field, input }) => {
4526
4550
  const onChange = useCallback((value) => field(input?.name ?? '')?.onChange?.(String(clamp(Number(value), MIN_YEARS, MAX_YEARS))), []);
4527
- 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 }));
4551
+ 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) }));
4528
4552
  });
4529
4553
 
4530
4554
  const FamilyMembersField = JSX(({ field, input }) => {
@@ -4545,7 +4569,7 @@
4545
4569
  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 }));
4546
4570
  });
4547
4571
 
4548
- 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 })));
4572
+ 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) })));
4549
4573
 
4550
4574
  const HousingField = JSX(({ field, input }) => {
4551
4575
  const { data: housing } = useLeadFormData('HOUSE_TYPE');
@@ -4554,9 +4578,9 @@
4554
4578
 
4555
4579
  const InfoCardField = JSX(({ input }) => (jsx(InfoCard, { __html: input?.label })));
4556
4580
 
4557
- 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 })));
4581
+ 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) })));
4558
4582
 
4559
- 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 })));
4583
+ 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) })));
4560
4584
 
4561
4585
  const latinPattern = /^[\u0041-\u005A\u0061-\u007A\s]+$/u;
4562
4586
  const isLatin = (_ = '') => latinPattern.test(_);
@@ -4677,7 +4701,7 @@
4677
4701
 
4678
4702
  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 })));
4679
4703
 
4680
- 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 ?? '') })));
4704
+ 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) })));
4681
4705
 
4682
4706
  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 })));
4683
4707
 
@@ -4693,7 +4717,7 @@
4693
4717
  field('middleName')?.onChange?.(value);
4694
4718
  }
4695
4719
  }, [field]);
4696
- 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 }));
4720
+ 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 }));
4697
4721
  });
4698
4722
 
4699
4723
  const NameField = JSX(({ field, input }) => {
@@ -4702,7 +4726,7 @@
4702
4726
  field('name')?.onChange?.(value);
4703
4727
  }
4704
4728
  }, [field]);
4705
- return (jsx(DaDataInputControl, { label: "\u0418\u043C\u044F", maxLength: 60, disabled: input?.filledByEsia && isEsiaAuthorize(field, input.name ?? ''), ...field(input?.name ?? ''), ...input, onChange: onChange }));
4729
+ return (jsx(DaDataInputControl, { label: "\u0418\u043C\u044F", maxLength: 60, disabled: isEsiaAuthorize(field, input), ...field(input?.name ?? ''), ...input, onChange: onChange }));
4706
4730
  });
4707
4731
 
4708
4732
  const OrganizationField = JSX(({ field, input }) => {
@@ -4722,7 +4746,7 @@
4722
4746
  field?.('inn')?.onChange?.(item.data?.inn);
4723
4747
  updateOrganizationFields(store, field, item);
4724
4748
  }, []);
4725
- 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 }));
4749
+ 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 }));
4726
4750
  });
4727
4751
 
4728
4752
  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 })));
@@ -4857,19 +4881,18 @@
4857
4881
 
4858
4882
  const SnilsField = JSX(({ field, input }) => (jsx(InputSnilsControl, { label: "\u0421\u041D\u0418\u041B\u0421", maxLength: 14, ...field(input?.name ?? ''), ...input })));
4859
4883
 
4860
- const FIELD_NAME = 'surname';
4861
4884
  const SurnameField = JSX(({ field, input }) => {
4862
4885
  const onChange = useCallback((value) => {
4863
4886
  if (retailCyrillicPattern.test(value) || value.length === 0) {
4864
4887
  field('surname')?.onChange?.(value);
4865
4888
  }
4866
4889
  }, [field]);
4867
- 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 }));
4890
+ return (jsx(DaDataInputControl, { label: "\u0424\u0430\u043C\u0438\u043B\u0438\u044F", maxLength: 60, disabled: isEsiaAuthorize(field, input), ...field(input?.name ?? ''), ...input, onChange: onChange }));
4868
4891
  });
4869
4892
 
4870
4893
  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 })));
4871
4894
 
4872
- 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 })));
4895
+ 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) })));
4873
4896
 
4874
4897
  const DELIVERY_CITIES_REF = {
4875
4898
  $ref: '/wcms-resources/delivery-cities-data.json',
@@ -4907,7 +4930,6 @@
4907
4930
  addressRetail: AddressRetailField,
4908
4931
  addressMatch: AddressMatchField,
4909
4932
  sex: SexField,
4910
- limitedBirthday: LimitedBirthdayField,
4911
4933
  birthPlace: BirthPlaceField,
4912
4934
  education: EducationField,
4913
4935
  housing: HousingField,
@@ -4946,6 +4968,7 @@
4946
4968
  calculator: CreditCalcField,
4947
4969
  confirmationIncome: ConfirmationIncomeField,
4948
4970
  inn: DaDataInnField,
4971
+ ...InputsApplicationLeadMap,
4949
4972
  };
4950
4973
  const InputRetailCardMap = {
4951
4974
  addressCourier: (props) => (jsx(AddressCourierField, { ...props, source: DELIVERY_CITIES_REF })),
@@ -5499,7 +5522,7 @@
5499
5522
  const participant = task.participants[0];
5500
5523
  const { classCard: cardCategory, codeWord, paymentSystemTypeCd: paymentSystem, currencyCode: currency, } = task;
5501
5524
  const { loanAmount: moneyValue, creditPeriod: monthsValue, paymentTypeCd } = task;
5502
- 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;
5525
+ 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;
5503
5526
  return {
5504
5527
  currency: currency?.key,
5505
5528
  paymentSystem: getSelectValue(paymentSystem),
@@ -5551,6 +5574,7 @@
5551
5574
  monthsValue,
5552
5575
  isAnnuity: paymentTypeCd?.key === 'ANNUITY',
5553
5576
  },
5577
+ esiaAccountTypeCd: profile?.esiaAccountTypeCd,
5554
5578
  ...getParticipantIncomes(participantIncomes),
5555
5579
  ...getParticipantAddresses(participantAddresses),
5556
5580
  ...getParticipantContacts(participantContacts),
@@ -5605,39 +5629,6 @@
5605
5629
  };
5606
5630
  };
5607
5631
 
5608
- const getLink = (body) => fetchRetailJSON('/esia/getLink', 'POST', body);
5609
-
5610
- const EsiaLoginDialog = JSX(({ onClose }) => {
5611
- const navigator = locationNavigator();
5612
- const retailFormStore = useRetailFormStore();
5613
- const handleAuth = useCallback(async () => {
5614
- const resp = await getLink({
5615
- redirectUri: globalThis.location.origin + globalThis.location.pathname,
5616
- });
5617
- if (resp?.link) {
5618
- navigator.assign(resp.link);
5619
- globalThis.location.href = resp.link;
5620
- }
5621
- }, []);
5622
- const handleClose = useCallback(() => {
5623
- if (retailFormStore.leadForm) {
5624
- const leadForm = { ...retailFormStore.leadForm };
5625
- delete leadForm.esiaAccountTypeCd;
5626
- retailFormStore.leadForm = leadForm;
5627
- }
5628
- onClose?.();
5629
- }, []);
5630
- 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" })] })] }) }));
5631
- });
5632
-
5633
- const useEsiaLoginDialog = (nextStepLink) => {
5634
- const { open } = useDialog(EsiaLoginDialog);
5635
- const navigator = locationNavigator();
5636
- return useCallback(() => {
5637
- open({ onClose: () => navigator.assign(nextStepLink) });
5638
- }, [open, nextStepLink]);
5639
- };
5640
-
5641
5632
  // TODO Не должно быть импортов из бизнес-слоя в API слой. Только наоборот.
5642
5633
  const getUpdateUserProfileData = (profileId, formData, consents) => {
5643
5634
  const { name = '', surname = '', middleName = '', limitedBirthday = '', phone = '', email = '', } = formData;
@@ -5759,79 +5750,80 @@
5759
5750
 
5760
5751
  /* eslint-disable max-lines */
5761
5752
  // eslint-disable-next-line max-lines-per-function
5762
- const useApplicationLeadApi = ({ programId, nextStepLink, productType, esiaError, data, }) => {
5753
+ const useApplicationLeadApi = ({ programId, nextStepLink, productType, data, }) => {
5763
5754
  const [isSending, { setTrue: startSending, setFalse: endSending }] = useBool(false);
5764
5755
  const [ok, setOK] = useState();
5765
5756
  const saveUserData = useSaveUserData();
5766
5757
  const sendAspects = useSendLeadFormAspects({ data });
5767
5758
  const navigator = locationNavigator();
5768
- const openEsiaLoginDialog = useEsiaLoginDialog(nextStepLink);
5769
- const consentBkiDialog = useConsentBkiDialog(openEsiaLoginDialog);
5759
+ const goToNextStep = useCallback(() => {
5760
+ navigator.assign(nextStepLink);
5761
+ }, []);
5762
+ const consentBkiDialog = useConsentBkiDialog(goToNextStep);
5770
5763
  const verifyPhoneDialog = useDialog(VerifyPhoneDialog);
5771
5764
  const draftDialog = useDraftDialog();
5772
5765
  const handleSubmit = useCallback(async (formData) => {
5773
- if (esiaError) {
5774
- navigator.assign(nextStepLink);
5775
- return;
5776
- }
5777
5766
  try {
5778
5767
  startSending();
5779
5768
  const transformedFormData = transformFormData(formData);
5780
5769
  const profileId = await createUserProfile({
5781
5770
  profile: { phone: formatPhone(transformedFormData.phone) },
5782
5771
  });
5783
- if (profileId && transformedFormData?.phone) {
5784
- const sendCurrentTask = async () => {
5785
- await updateUserData({
5786
- programId,
5787
- profileId,
5788
- formData: transformedFormData,
5789
- productType,
5790
- saveUserData,
5791
- sendAspects,
5792
- });
5793
- verifyPhoneDialog.close();
5794
- if (productType === 'debitCard') {
5795
- openEsiaLoginDialog();
5772
+ if (!profileId) {
5773
+ throw new Error();
5774
+ }
5775
+ const sendCurrentTask = async () => {
5776
+ await updateUserData({
5777
+ programId,
5778
+ profileId,
5779
+ formData: transformedFormData,
5780
+ productType,
5781
+ saveUserData,
5782
+ sendAspects,
5783
+ });
5784
+ verifyPhoneDialog.close();
5785
+ if (productType === 'debitCard') {
5786
+ goToNextStep();
5787
+ }
5788
+ else {
5789
+ consentBkiDialog.open(transformedFormData.phone, profileId);
5790
+ }
5791
+ };
5792
+ const handleSuccessVerify = async () => {
5793
+ try {
5794
+ const lastTaskId = await getLastTaskStatus({ profileId, programId });
5795
+ if (lastTaskId) {
5796
+ const task = await getTaskById({ taskId: lastTaskId });
5797
+ verifyPhoneDialog.close();
5798
+ draftDialog.open({
5799
+ task,
5800
+ isFromLead: true,
5801
+ sendAspects,
5802
+ onClose: sendCurrentTask,
5803
+ });
5796
5804
  }
5797
5805
  else {
5798
- consentBkiDialog.open(transformedFormData.phone, profileId);
5806
+ await sendCurrentTask();
5799
5807
  }
5800
- };
5801
- const handleSuccessVerify = async () => {
5802
- try {
5803
- const lastTaskId = await getLastTaskStatus({ profileId, programId });
5804
- if (lastTaskId) {
5805
- const task = await getTaskById({ taskId: lastTaskId });
5806
- verifyPhoneDialog.close();
5807
- draftDialog.open({
5808
- task,
5809
- isFromLead: true,
5810
- sendAspects,
5811
- onClose: sendCurrentTask,
5812
- });
5813
- }
5814
- else {
5815
- await sendCurrentTask();
5816
- }
5817
- }
5818
- catch {
5819
- setOK(false);
5820
- }
5821
- };
5822
- const acceptedConsents = getAcceptedConsents(formData, productType);
5823
- verifyPhoneDialog.open({
5824
- phone: transformedFormData?.phone,
5825
- consents: acceptedConsents,
5826
- onSuccess: handleSuccessVerify,
5827
- });
5828
- endSending();
5829
- }
5808
+ }
5809
+ catch {
5810
+ setOK(false);
5811
+ }
5812
+ };
5813
+ const acceptedConsents = getAcceptedConsents(transformedFormData, productType);
5814
+ verifyPhoneDialog.open({
5815
+ phone: transformedFormData.phone,
5816
+ consents: acceptedConsents,
5817
+ onSuccess: handleSuccessVerify,
5818
+ });
5830
5819
  }
5831
5820
  catch {
5832
5821
  setOK(false);
5833
5822
  }
5834
- }, [esiaError]);
5823
+ finally {
5824
+ endSending();
5825
+ }
5826
+ }, []);
5835
5827
  return { isSending, ok, handleSubmit };
5836
5828
  };
5837
5829
  const getAcceptedConsents = (formData, productType) => {
@@ -5920,7 +5912,10 @@
5920
5912
  }
5921
5913
  }, [target, key]);
5922
5914
 
5923
- const updateProfileEsia = (body) => fetchRetailJSON('/esia/updateProfileEsia', 'POST', body);
5915
+ const esiaRequestProfile = (body) => fetchRetailJSON('/esia/requestProfile', 'POST', body).then((res) => {
5916
+ saveToken(res);
5917
+ return res;
5918
+ });
5924
5919
 
5925
5920
  const initialFormState = {
5926
5921
  surname: '',
@@ -5938,19 +5933,24 @@
5938
5933
  consentPhotoFlg: false,
5939
5934
  consentFATCA: false,
5940
5935
  };
5941
- const getInitialFormState$1 = (inputs, savedForm) => {
5936
+ const getInitialFormState$1 = (inputs, savedForm, esiaAuthSuccess) => {
5942
5937
  if (savedForm) {
5943
- return { ...savedForm, limitedBirthday: new Date(savedForm?.limitedBirthday || 0) };
5938
+ return {
5939
+ ...savedForm,
5940
+ limitedBirthday: new Date(savedForm?.limitedBirthday || 0),
5941
+ ...(!esiaAuthSuccess && {
5942
+ esiaAccountTypeCd: { key: '' },
5943
+ }),
5944
+ };
5944
5945
  }
5945
5946
  const formState = Object.fromEntries(inputs.map((_) => [_.name, initialFormState[_.name || '']]));
5946
5947
  return { ...formState };
5947
5948
  };
5948
5949
 
5949
- const uploadFile = async (file, taskId, documentCategory) => {
5950
+ const uploadFile = async (file, documentCategory, isPDF = false) => {
5950
5951
  const fd = new FormData();
5951
- fd.append('taskId', taskId);
5952
5952
  fd.append('documentCategory', documentCategory);
5953
- fd.append('file', file, 'file.pdf');
5953
+ fd.append('file', file, `file.${isPDF ? 'pdf' : 'xml'}`);
5954
5954
  const res = await globalThis
5955
5955
  ?.fetch?.(`/light-api-cash/v1/file`, {
5956
5956
  method: 'POST',
@@ -5964,23 +5964,13 @@
5964
5964
  return res;
5965
5965
  };
5966
5966
 
5967
- const parseEsiaProfile = async (esiaProfile, taskId, isDebit) => {
5968
- isDebit ? checkEsiaDataForDebit(esiaProfile) : checkEsiaDataForCredit(esiaProfile);
5967
+ const parseEsiaProfile = async (esiaProfile, isDebit) => {
5968
+ checkEsiaData(esiaProfile);
5969
+ const isFullEsiaData = !isDebit && checkEsiaAdditionalDocument(esiaProfile);
5969
5970
  const { profile, addInfo, document, addressRegistration, addressFact, esiaAdditionalDocument } = esiaProfile;
5970
- const files = [];
5971
- if (!isDebit) {
5972
- await saveDocument({
5973
- document: esiaAdditionalDocument.pdfFileWorkbook,
5974
- taskId,
5975
- category: 'CONFIRMING_INCOME_DOC',
5976
- files,
5977
- });
5978
- await saveDocument({
5979
- document: esiaAdditionalDocument.pdfFilePayout,
5980
- taskId,
5981
- category: 'CONFIRMING_EMPLOYMENT_DOC',
5982
- files,
5983
- });
5971
+ let files = [];
5972
+ if (isFullEsiaData) {
5973
+ files = await saveDocuments(esiaAdditionalDocument);
5984
5974
  }
5985
5975
  const mainData = {
5986
5976
  name: profile.name,
@@ -5997,11 +5987,11 @@
5997
5987
  birthPlace: addInfo.birthPlace,
5998
5988
  addressRegistration: buildAddress(addressRegistration),
5999
5989
  addressFact: buildAddress(addressFact),
6000
- esiaAccountTypeCd: profile.esiaAccountType,
5990
+ esiaAccountTypeCd: isDebit ? profile.esiaAccountType : { key: '' },
6001
5991
  };
6002
5992
  return {
6003
5993
  ...mainData,
6004
- ...(!isDebit && {
5994
+ ...(isFullEsiaData && {
6005
5995
  snils: addInfo.snils,
6006
5996
  inn: esiaAdditionalDocument.inn,
6007
5997
  wages: Math.floor(esiaAdditionalDocument.averageMonthlyIncome)?.toString(),
@@ -6010,6 +6000,9 @@
6010
6000
  generalSeniority: getYearFromMonth(esiaAdditionalDocument.workLength).toString(),
6011
6001
  lastJobExperience: getYearFromMonth(esiaAdditionalDocument.workLengthLastJob).toString(),
6012
6002
  jobsNumber: esiaAdditionalDocument.jobsNumberInFiveYears.toString(),
6003
+ esiaAccountTypeCd: profile.esiaAccountType,
6004
+ confirmationIncome: { key: 'SFR_CERTIFICATE', text: 'Запрос Банком доходов из СФР' },
6005
+ employment: { key: 'WORK', text: 'Работаю' },
6013
6006
  files,
6014
6007
  }),
6015
6008
  };
@@ -6042,43 +6035,60 @@
6042
6035
  };
6043
6036
  };
6044
6037
  const getYearFromMonth = (month) => Math.floor(month / 12);
6045
- const saveDocument = async ({ document, taskId, category, files, }) => {
6046
- await fetch(`data:application/pdf;base64,${document}`)
6047
- .then((res) => res.blob())
6048
- .then((value) => uploadFile(value, taskId, category))
6049
- .then((file) => files.push(file));
6050
- };
6051
- const checkEsiaDataForCredit = (esiaProfile) => {
6052
- const { profile, document, addressRegistration, esiaAdditionalDocument } = esiaProfile;
6053
- const data = [
6054
- profile.name,
6055
- profile.surname,
6056
- profile.midname,
6057
- profile.birthDate,
6058
- profile.phone,
6059
- profile.email,
6060
- document.dulIssueDate,
6061
- document.dulIssuedBy,
6062
- document.dulNumber,
6063
- document.dulSerie,
6064
- document.dulSubdivisionCode,
6065
- addressRegistration,
6066
- profile.esiaAccountType,
6067
- esiaAdditionalDocument.inn,
6068
- esiaAdditionalDocument.averageMonthlyIncome.toString(),
6069
- esiaAdditionalDocument.startWorkDate,
6070
- esiaAdditionalDocument.workLengthInFiveYears.toString(),
6071
- esiaAdditionalDocument.workLength.toString(),
6072
- esiaAdditionalDocument.workLengthLastJob.toString(),
6073
- esiaAdditionalDocument.jobsNumberInFiveYears.toString(),
6074
- esiaAdditionalDocument.pdfFilePayout,
6075
- esiaAdditionalDocument.pdfFileWorkbook,
6038
+ const saveDocuments = async (esiaAdditionalDocument) => {
6039
+ const files = [];
6040
+ const documents = [
6041
+ {
6042
+ file: esiaAdditionalDocument.pdfFileWorkbook,
6043
+ category: 'CONFIRMING_INCOME_DOC',
6044
+ isPDF: true,
6045
+ },
6046
+ {
6047
+ file: esiaAdditionalDocument.pdfFilePayout,
6048
+ category: 'CONFIRMING_EMPLOYMENT_DOC',
6049
+ isPDF: true,
6050
+ },
6051
+ {
6052
+ file: esiaAdditionalDocument.pdfFileSigPayout,
6053
+ category: 'CONFIRMING_EMPLOYMENT_DOC',
6054
+ isPDF: true,
6055
+ },
6056
+ {
6057
+ file: esiaAdditionalDocument.xmlFilePayout,
6058
+ category: 'CONFIRMING_EMPLOYMENT_DOC',
6059
+ isPDF: false,
6060
+ },
6061
+ {
6062
+ file: esiaAdditionalDocument.xmlFileSigPayout,
6063
+ category: 'CONFIRMING_EMPLOYMENT_DOC',
6064
+ isPDF: false,
6065
+ },
6066
+ {
6067
+ file: esiaAdditionalDocument.xmlFileWorkbook,
6068
+ category: 'CONFIRMING_INCOME_DOC',
6069
+ isPDF: false,
6070
+ },
6071
+ {
6072
+ file: esiaAdditionalDocument.pdfFileSigWorkbook,
6073
+ category: 'CONFIRMING_INCOME_DOC',
6074
+ isPDF: true,
6075
+ },
6076
+ {
6077
+ file: esiaAdditionalDocument.xmlFileSigWorkbook,
6078
+ category: 'CONFIRMING_INCOME_DOC',
6079
+ isPDF: false,
6080
+ },
6076
6081
  ];
6077
- if (!data.every((_) => Boolean(_))) {
6078
- throw new Error();
6082
+ for (const doc of documents) {
6083
+ const contentType = doc.isPDF ? 'data:application/pdf;base64' : 'data:application/xml;base64';
6084
+ await fetch(`${contentType},${doc.file}`)
6085
+ .then((res) => res.blob())
6086
+ .then((value) => uploadFile(value, doc.category, doc.isPDF))
6087
+ .then((file) => files.push(file));
6079
6088
  }
6089
+ return files;
6080
6090
  };
6081
- const checkEsiaDataForDebit = (esiaProfile) => {
6091
+ const checkEsiaData = (esiaProfile) => {
6082
6092
  const { profile, document, addressRegistration } = esiaProfile;
6083
6093
  const data = [
6084
6094
  profile.name,
@@ -6086,7 +6096,6 @@
6086
6096
  profile.midname,
6087
6097
  profile.birthDate,
6088
6098
  profile.phone,
6089
- profile.email,
6090
6099
  document.dulIssueDate,
6091
6100
  document.dulIssuedBy,
6092
6101
  document.dulNumber,
@@ -6095,79 +6104,101 @@
6095
6104
  addressRegistration,
6096
6105
  profile.esiaAccountType,
6097
6106
  ];
6098
- if (!data.every((_) => Boolean(_))) {
6107
+ if (!data.every(Boolean)) {
6099
6108
  throw new Error();
6100
6109
  }
6101
6110
  };
6111
+ const checkEsiaAdditionalDocument = (esiaProfile) => {
6112
+ const { esiaAdditionalDocument } = esiaProfile;
6113
+ const data = [
6114
+ esiaAdditionalDocument?.inn,
6115
+ esiaAdditionalDocument?.averageMonthlyIncome?.toString(),
6116
+ esiaAdditionalDocument?.startWorkDate,
6117
+ esiaAdditionalDocument?.workLengthInFiveYears?.toString(),
6118
+ esiaAdditionalDocument?.workLength?.toString(),
6119
+ esiaAdditionalDocument?.workLengthLastJob?.toString(),
6120
+ esiaAdditionalDocument?.jobsNumberInFiveYears?.toString(),
6121
+ esiaAdditionalDocument?.pdfFilePayout,
6122
+ esiaAdditionalDocument?.pdfFileWorkbook,
6123
+ esiaAdditionalDocument?.pdfFileSigPayout,
6124
+ esiaAdditionalDocument?.xmlFilePayout,
6125
+ esiaAdditionalDocument?.xmlFileSigPayout,
6126
+ esiaAdditionalDocument?.xmlFileWorkbook,
6127
+ esiaAdditionalDocument?.pdfFileSigWorkbook,
6128
+ esiaAdditionalDocument?.xmlFileSigWorkbook,
6129
+ ];
6130
+ return data.every(Boolean);
6131
+ };
6102
6132
 
6103
- const useInitApplicationLead = ({ inputs, nextStepLink, productType, setEsiaError, }) => {
6104
- const navigator = locationNavigator();
6105
- const [isLoading, { setTrue: startLoading, setFalse: endLoading }] = useBool(false);
6133
+ const useInitApplicationLead = ({ inputs, productType, setEsiaStatus, esiaAuthSuccess, }) => {
6106
6134
  const leadFormStore = useLeadFormStore();
6107
6135
  const saveForm = useSetter(leadFormStore, 'leadForm');
6108
- const initialFormState = useMemo(() => getInitialFormState$1(inputs, leadFormStore.leadForm), [inputs, leadFormStore.leadForm]);
6109
- const updateEsiaProfile = useCallback(async (profileId, code, state) => {
6110
- startLoading();
6136
+ const initialFormState = useMemo(() => getInitialFormState$1(inputs, leadFormStore.leadForm, esiaAuthSuccess), [inputs, leadFormStore.leadForm]);
6137
+ const requestEsiaProfile = useCallback(async (code, state) => {
6138
+ setEsiaStatus(EsiaStatuses.Pending);
6111
6139
  try {
6112
- const data = await updateProfileEsia({
6113
- profileId,
6140
+ const data = await esiaRequestProfile({
6114
6141
  code,
6115
6142
  state,
6116
6143
  redirectUri: globalThis.location?.href,
6144
+ authorize: true,
6117
6145
  });
6118
- if (data && leadFormStore?.taskId) {
6119
- const parsedData = await parseEsiaProfile(data, leadFormStore.taskId.toString(), productType === 'debitCard');
6146
+ if (data) {
6147
+ const parsedData = await parseEsiaProfile(data, productType === 'debitCard');
6120
6148
  saveForm((_) => ({
6121
6149
  ..._,
6122
6150
  ...parsedData,
6123
6151
  }));
6152
+ setEsiaStatus(EsiaStatuses.Success);
6124
6153
  }
6125
- navigator.assign(nextStepLink);
6126
6154
  }
6127
6155
  catch {
6128
- setEsiaError();
6156
+ setEsiaStatus(EsiaStatuses.Error);
6129
6157
  }
6130
- finally {
6131
- endLoading();
6132
- }
6133
- }, [nextStepLink]);
6158
+ }, []);
6134
6159
  useEffect(() => {
6135
6160
  leadFormStore.productType = productType;
6136
- const profileId = (safeJsonParse(globalThis.localStorage?.getItem('profileId') ?? ''));
6137
6161
  const params = new URLSearchParams(decodeURIComponent(globalThis.location?.search));
6138
6162
  const code = params.get('code');
6139
6163
  const state = params.get('state');
6140
- if (profileId && code && state) {
6141
- updateEsiaProfile(profileId, code, state);
6164
+ if (code && state) {
6165
+ requestEsiaProfile(code, state);
6142
6166
  }
6143
6167
  else {
6144
6168
  sessionStorage.removeItem('accessToken');
6145
6169
  sessionStorage.removeItem('refreshToken');
6146
6170
  }
6147
6171
  }, []);
6148
- return [initialFormState, { isLoading }];
6172
+ return initialFormState;
6149
6173
  };
6150
6174
 
6175
+ var EsiaStatuses;
6176
+ (function (EsiaStatuses) {
6177
+ EsiaStatuses["Success"] = "SUCCESS";
6178
+ EsiaStatuses["Error"] = "ERROR";
6179
+ EsiaStatuses["Pending"] = "PENDING";
6180
+ })(EsiaStatuses || (EsiaStatuses = {}));
6151
6181
  const ApplicationLeadForm = JSX(({ className, title, programId = '', nextStepLink = '/credit-lead', button, productType = 'credit', data, ...rest }) => {
6152
- const [esiaError, { setTrue: setEsiaError }] = useBool(false);
6182
+ const [esiaStatus, setEsiaStatus] = useState();
6183
+ const leadForm = useRef(null);
6153
6184
  const applicationFormData = useMemo(() => getApplicationFormData(productType), [productType]);
6154
6185
  const inputs = useMemo(() => getInputs(applicationFormData), [applicationFormData]);
6155
6186
  const extendedValidatorObj = useMemo(() => getExtendedValidatorObj(productType), [productType]);
6156
6187
  const formValidator = useMemo(() => getFormValidator(inputs, extendedValidatorObj), [inputs, extendedValidatorObj]);
6157
- const [initialFormState, { isLoading }] = useInitApplicationLead({
6188
+ const initialFormState = useInitApplicationLead({
6158
6189
  inputs,
6159
6190
  nextStepLink,
6160
6191
  productType,
6161
- setEsiaError,
6192
+ setEsiaStatus,
6193
+ esiaAuthSuccess: esiaStatus === EsiaStatuses.Success,
6162
6194
  });
6163
6195
  const { isSending, ok, handleSubmit } = useApplicationLeadApi({
6164
6196
  programId,
6165
6197
  nextStepLink,
6166
6198
  productType,
6167
- esiaError,
6168
6199
  data,
6169
6200
  });
6170
- const [, { field, onSubmit }] = useForm(initialFormState, {
6201
+ const [, { field, onSubmit, reset }] = useForm(initialFormState, {
6171
6202
  formValidator,
6172
6203
  onSubmit: handleSubmit,
6173
6204
  });
@@ -6177,7 +6208,17 @@
6177
6208
  responseTypeDialog.open({ ok });
6178
6209
  }
6179
6210
  }, [ok]);
6180
- 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] }) }));
6211
+ useEffect(() => {
6212
+ if (esiaStatus && leadForm?.current) {
6213
+ leadForm.current.scrollIntoView({
6214
+ block: 'start',
6215
+ });
6216
+ }
6217
+ if (esiaStatus === EsiaStatuses.Success) {
6218
+ reset();
6219
+ }
6220
+ }, [leadForm?.current, esiaStatus]);
6221
+ 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] })] }));
6181
6222
  });
6182
6223
  const getInputs = (applicationFormData) => (applicationFormData?.flatMap((_) => _?.inputs) || []);
6183
6224
  const getExtendedValidatorObj = (productType) => ({
@@ -7795,6 +7836,12 @@
7795
7836
  });
7796
7837
  const getValue = (field) => (name) => field(name)?.value;
7797
7838
 
7839
+ const getRetailFormValidator = ({ formState, inputs, step, productType, }) => getFormValidator(calculateInputs((_) => formState[_])(inputs, step), {
7840
+ ...validatorObj,
7841
+ limitedBirthday: getLimitedBirthdayValidation(productType),
7842
+ dulIssueDate: passportValidator(formState.limitedBirthday),
7843
+ })(formState);
7844
+
7798
7845
  const StepsNavigationButtons$1 = JSX(({ step, isSending, onPrevStep }) => {
7799
7846
  const isFirstStep = step === 0;
7800
7847
  const isFinalStep = step === 5;
@@ -7875,6 +7922,7 @@
7875
7922
  mandatoryPayments: undefined,
7876
7923
  snils: '',
7877
7924
  armyIdFlg: false,
7925
+ esiaAccountTypeCd: { key: '', text: '' },
7878
7926
  },
7879
7927
  {
7880
7928
  bankruptcyFlg: false,
@@ -8113,15 +8161,14 @@
8113
8161
  };
8114
8162
 
8115
8163
  const PRODUCT_TYPE$1 = 'creditCard';
8116
- const extendedValidatorObj$1 = {
8117
- ...validatorObj,
8118
- limitedBirthday: getLimitedBirthdayValidation(PRODUCT_TYPE$1),
8119
- };
8120
8164
  const CreditCardFormStep = JSX(({ step, sections, onPrevStep, onNextStep, onFinish }) => {
8121
8165
  const inputs = useMemo(() => sections?.flatMap((_) => _?.inputs || []), [sections]);
8122
- const formValidator = useCallback((formState) =>
8123
- // TODO Слишком сложно
8124
- getFormValidator(calculateInputs((_) => formState[_])(inputs, step), extendedValidatorObj$1)(formState), [inputs]);
8166
+ const formValidator = useCallback((formState) => getRetailFormValidator({
8167
+ formState,
8168
+ inputs,
8169
+ step,
8170
+ productType: PRODUCT_TYPE$1,
8171
+ }), [inputs]);
8125
8172
  const [initialState, onSubmit, isSending] = useCreditCardFormAPI({
8126
8173
  step,
8127
8174
  onNextStep,
@@ -8270,7 +8317,7 @@
8270
8317
  label: 'Телефон работодателя',
8271
8318
  required: true,
8272
8319
  },
8273
- { name: 'beginDate', required: true },
8320
+ { name: 'beginDate', required: true, filledByEsia: true },
8274
8321
  ],
8275
8322
  },
8276
8323
  {
@@ -8312,16 +8359,22 @@
8312
8359
  title: 'Совокупный доход',
8313
8360
  },
8314
8361
  {
8362
+ columns: 1,
8315
8363
  inputs: [
8316
8364
  {
8317
- name: 'infoCard',
8318
- label: 'Сумма основного и дополнительных доходов после вычета налога',
8365
+ name: 'confirmationIncome',
8366
+ required: true,
8367
+ filledByEsia: true,
8319
8368
  },
8320
8369
  ],
8321
8370
  },
8322
8371
  {
8323
- columns: 1,
8324
- inputs: [{ name: 'confirmationIncome', required: true }],
8372
+ inputs: [
8373
+ {
8374
+ name: 'infoCard',
8375
+ label: 'Сумма основного и дополнительных доходов после вычета налога',
8376
+ },
8377
+ ],
8325
8378
  },
8326
8379
  {
8327
8380
  columns: 1,
@@ -8858,17 +8911,16 @@
8858
8911
  };
8859
8912
 
8860
8913
  const PRODUCT_TYPE = 'credit';
8861
- const extendedValidatorObj = {
8862
- ...validatorObj,
8863
- limitedBirthday: getLimitedBirthdayValidation(PRODUCT_TYPE),
8864
- };
8865
8914
  const CreditFormStep = JSX(({ step, sections, programsSource, onPrevStep, onNextStep, onFinish }) => {
8866
8915
  const { programId } = useRetailFormStore();
8867
8916
  const calcData = programsSource?.[programId ?? '']; // Need normalizator useForm, to be save defaultParams
8868
8917
  const inputs = useMemo(() => sections?.flatMap((_) => _?.inputs ?? []), [sections]);
8869
- const formValidator = useCallback((formState) =>
8870
- // TODO Слишком сложно
8871
- getFormValidator(calculateInputs((_) => formState[_])(inputs, step), extendedValidatorObj)(formState), [inputs]);
8918
+ const formValidator = useCallback((formState) => getRetailFormValidator({
8919
+ formState,
8920
+ inputs,
8921
+ step,
8922
+ productType: PRODUCT_TYPE,
8923
+ }), [inputs]);
8872
8924
  const [initialState, onSubmit, isSending] = useCreditFormAPI({
8873
8925
  step,
8874
8926
  onNextStep,
@@ -10918,7 +10970,7 @@
10918
10970
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
10919
10971
  });
10920
10972
 
10921
- const packageVersion = "0.14.824";
10973
+ const packageVersion = "0.14.826";
10922
10974
 
10923
10975
  exports.Blocks = Blocks;
10924
10976
  exports.ContentPage = ContentPage;