@redneckz/wildless-cms-uni-blocks 0.14.826 → 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 (533) hide show
  1. package/bundle/bundle.umd.js +291 -250
  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/model/NameFieldDef.d.ts +1 -1
  15. package/bundle/retail/utils/isEsiaAuthorize.d.ts +2 -1
  16. package/bundle/ui-kit/FormField/shouldRenderField.d.ts +1 -1
  17. package/dist/components/ApplicationLeadForm/ApplicationLeadForm.d.ts +5 -0
  18. package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +26 -8
  19. package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  20. package/dist/components/ApplicationLeadForm/EsiaLoginBanner.d.ts +4 -0
  21. package/dist/components/ApplicationLeadForm/EsiaLoginBanner.js +22 -0
  22. package/dist/components/ApplicationLeadForm/EsiaLoginBanner.js.map +1 -0
  23. package/dist/components/ApplicationLeadForm/applicationFormData.d.ts +0 -1
  24. package/dist/components/ApplicationLeadForm/applicationFormData.js +6 -31
  25. package/dist/components/ApplicationLeadForm/applicationFormData.js.map +1 -1
  26. package/dist/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -1
  27. package/dist/components/ApplicationLeadForm/getInitialFormState.js +8 -2
  28. package/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  29. package/dist/components/ApplicationLeadForm/parseEsiaProfile.d.ts +2 -2
  30. package/dist/components/ApplicationLeadForm/parseEsiaProfile.js +84 -54
  31. package/dist/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
  32. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +1 -2
  33. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +53 -53
  34. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  35. package/dist/components/ApplicationLeadForm/useInitApplicationLead.d.ts +4 -4
  36. package/dist/components/ApplicationLeadForm/useInitApplicationLead.js +16 -24
  37. package/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  38. package/dist/retail/api/checkCode.d.ts +1 -0
  39. package/dist/retail/api/checkCode.js +3 -2
  40. package/dist/retail/api/checkCode.js.map +1 -1
  41. package/{lib/retail/api/updateProfileEsia.d.ts → dist/retail/api/esiaRequestProfile.d.ts} +11 -4
  42. package/dist/retail/api/esiaRequestProfile.js +10 -0
  43. package/dist/retail/api/esiaRequestProfile.js.map +1 -0
  44. package/dist/retail/api/updateUserTask.d.ts +1 -0
  45. package/dist/retail/api/updateUserTask.js.map +1 -1
  46. package/dist/retail/api/uploadFile.d.ts +1 -1
  47. package/dist/retail/api/uploadFile.js +2 -3
  48. package/dist/retail/api/uploadFile.js.map +1 -1
  49. package/dist/retail/components/DraftDialog/parseDraftTask.js +2 -1
  50. package/dist/retail/components/DraftDialog/parseDraftTask.js.map +1 -1
  51. package/dist/retail/components/Fields/AddressField.js +1 -1
  52. package/dist/retail/components/Fields/AddressField.js.map +1 -1
  53. package/dist/retail/components/Fields/BeginDateField.js +2 -1
  54. package/dist/retail/components/Fields/BeginDateField.js.map +1 -1
  55. package/dist/retail/components/Fields/BirthPlaceField.js +1 -2
  56. package/dist/retail/components/Fields/BirthPlaceField.js.map +1 -1
  57. package/dist/retail/components/Fields/ConfirmationIncomeField.js +4 -1
  58. package/dist/retail/components/Fields/ConfirmationIncomeField.js.map +1 -1
  59. package/dist/retail/components/Fields/DaDataInnField.js +2 -1
  60. package/dist/retail/components/Fields/DaDataInnField.js.map +1 -1
  61. package/dist/retail/components/Fields/DulIssueDateField.js +1 -1
  62. package/dist/retail/components/Fields/DulIssueDateField.js.map +1 -1
  63. package/dist/retail/components/Fields/DulIssuedByField.js +1 -1
  64. package/dist/retail/components/Fields/DulIssuedByField.js.map +1 -1
  65. package/dist/retail/components/Fields/DulNumberField.js +1 -1
  66. package/dist/retail/components/Fields/DulNumberField.js.map +1 -1
  67. package/dist/retail/components/Fields/DulSerieField.js +1 -1
  68. package/dist/retail/components/Fields/DulSerieField.js.map +1 -1
  69. package/dist/retail/components/Fields/DulSubdivisionCodeField.js +1 -1
  70. package/dist/retail/components/Fields/DulSubdivisionCodeField.js.map +1 -1
  71. package/dist/retail/components/Fields/Experience5YearsField.js +2 -1
  72. package/dist/retail/components/Fields/Experience5YearsField.js.map +1 -1
  73. package/dist/retail/components/Fields/GeneralSeniorityField.js +2 -1
  74. package/dist/retail/components/Fields/GeneralSeniorityField.js.map +1 -1
  75. package/dist/retail/components/Fields/JobsNumberField.js +2 -1
  76. package/dist/retail/components/Fields/JobsNumberField.js.map +1 -1
  77. package/dist/retail/components/Fields/LastJobExperienceField.js +2 -1
  78. package/dist/retail/components/Fields/LastJobExperienceField.js.map +1 -1
  79. package/dist/retail/components/Fields/LimitedBirthdayField.js +1 -1
  80. package/dist/retail/components/Fields/LimitedBirthdayField.js.map +1 -1
  81. package/dist/retail/components/Fields/MiddleNameField.js +1 -1
  82. package/dist/retail/components/Fields/MiddleNameField.js.map +1 -1
  83. package/dist/retail/components/Fields/NameField.js +1 -1
  84. package/dist/retail/components/Fields/NameField.js.map +1 -1
  85. package/dist/retail/components/Fields/OrganizationNameField.js +2 -1
  86. package/dist/retail/components/Fields/OrganizationNameField.js.map +1 -1
  87. package/dist/retail/components/Fields/SurnameField.js +1 -2
  88. package/dist/retail/components/Fields/SurnameField.js.map +1 -1
  89. package/dist/retail/components/Fields/WagesField.js +2 -1
  90. package/dist/retail/components/Fields/WagesField.js.map +1 -1
  91. package/dist/retail/content.js +11 -5
  92. package/dist/retail/content.js.map +1 -1
  93. package/dist/retail/model/NameFieldDef.d.ts +1 -1
  94. package/dist/retail/utils/isEsiaAuthorize.d.ts +2 -1
  95. package/dist/retail/utils/isEsiaAuthorize.js +3 -1
  96. package/dist/retail/utils/isEsiaAuthorize.js.map +1 -1
  97. package/dist/retail/utils/mainFormStateMap.js +1 -0
  98. package/dist/retail/utils/mainFormStateMap.js.map +1 -1
  99. package/dist/ui-kit/FormField/Fields/MiddleNameField.js +1 -1
  100. package/dist/ui-kit/FormField/Fields/MiddleNameField.js.map +1 -1
  101. package/dist/ui-kit/FormField/Fields/NameField.js +1 -1
  102. package/dist/ui-kit/FormField/Fields/NameField.js.map +1 -1
  103. package/dist/ui-kit/FormField/Fields/PhoneField.js +2 -1
  104. package/dist/ui-kit/FormField/Fields/PhoneField.js.map +1 -1
  105. package/dist/ui-kit/FormField/Fields/SurnameField.js +1 -1
  106. package/dist/ui-kit/FormField/Fields/SurnameField.js.map +1 -1
  107. package/dist/ui-kit/FormField/shouldRenderField.d.ts +1 -1
  108. package/dist/ui-kit/FormField/shouldRenderField.js +1 -1
  109. package/dist/ui-kit/FormField/shouldRenderField.js.map +1 -1
  110. package/lib/common.css +1 -1
  111. package/lib/components/ApplicationLeadForm/ApplicationLeadForm.d.ts +5 -0
  112. package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +26 -8
  113. package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  114. package/lib/components/ApplicationLeadForm/EsiaLoginBanner.d.ts +4 -0
  115. package/lib/components/ApplicationLeadForm/EsiaLoginBanner.js +20 -0
  116. package/lib/components/ApplicationLeadForm/EsiaLoginBanner.js.map +1 -0
  117. package/lib/components/ApplicationLeadForm/applicationFormData.d.ts +0 -1
  118. package/lib/components/ApplicationLeadForm/applicationFormData.js +5 -30
  119. package/lib/components/ApplicationLeadForm/applicationFormData.js.map +1 -1
  120. package/lib/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -1
  121. package/lib/components/ApplicationLeadForm/getInitialFormState.js +8 -2
  122. package/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  123. package/lib/components/ApplicationLeadForm/parseEsiaProfile.d.ts +2 -2
  124. package/lib/components/ApplicationLeadForm/parseEsiaProfile.js +84 -54
  125. package/lib/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
  126. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +1 -2
  127. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +53 -53
  128. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  129. package/lib/components/ApplicationLeadForm/useInitApplicationLead.d.ts +4 -4
  130. package/lib/components/ApplicationLeadForm/useInitApplicationLead.js +16 -24
  131. package/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  132. package/lib/retail/api/checkCode.d.ts +1 -0
  133. package/lib/retail/api/checkCode.js +1 -1
  134. package/lib/retail/api/checkCode.js.map +1 -1
  135. package/{mobile/bundle/retail/api/updateProfileEsia.d.ts → lib/retail/api/esiaRequestProfile.d.ts} +11 -4
  136. package/lib/retail/api/esiaRequestProfile.js +7 -0
  137. package/lib/retail/api/esiaRequestProfile.js.map +1 -0
  138. package/lib/retail/api/updateUserTask.d.ts +1 -0
  139. package/lib/retail/api/updateUserTask.js.map +1 -1
  140. package/lib/retail/api/uploadFile.d.ts +1 -1
  141. package/lib/retail/api/uploadFile.js +2 -3
  142. package/lib/retail/api/uploadFile.js.map +1 -1
  143. package/lib/retail/components/DraftDialog/parseDraftTask.js +2 -1
  144. package/lib/retail/components/DraftDialog/parseDraftTask.js.map +1 -1
  145. package/lib/retail/components/Fields/AddressField.js +1 -1
  146. package/lib/retail/components/Fields/AddressField.js.map +1 -1
  147. package/lib/retail/components/Fields/BeginDateField.js +2 -1
  148. package/lib/retail/components/Fields/BeginDateField.js.map +1 -1
  149. package/lib/retail/components/Fields/BirthPlaceField.js +1 -2
  150. package/lib/retail/components/Fields/BirthPlaceField.js.map +1 -1
  151. package/lib/retail/components/Fields/ConfirmationIncomeField.js +5 -2
  152. package/lib/retail/components/Fields/ConfirmationIncomeField.js.map +1 -1
  153. package/lib/retail/components/Fields/DaDataInnField.js +2 -1
  154. package/lib/retail/components/Fields/DaDataInnField.js.map +1 -1
  155. package/lib/retail/components/Fields/DulIssueDateField.js +1 -1
  156. package/lib/retail/components/Fields/DulIssueDateField.js.map +1 -1
  157. package/lib/retail/components/Fields/DulIssuedByField.js +1 -1
  158. package/lib/retail/components/Fields/DulIssuedByField.js.map +1 -1
  159. package/lib/retail/components/Fields/DulNumberField.js +1 -1
  160. package/lib/retail/components/Fields/DulNumberField.js.map +1 -1
  161. package/lib/retail/components/Fields/DulSerieField.js +1 -1
  162. package/lib/retail/components/Fields/DulSerieField.js.map +1 -1
  163. package/lib/retail/components/Fields/DulSubdivisionCodeField.js +1 -1
  164. package/lib/retail/components/Fields/DulSubdivisionCodeField.js.map +1 -1
  165. package/lib/retail/components/Fields/Experience5YearsField.js +2 -1
  166. package/lib/retail/components/Fields/Experience5YearsField.js.map +1 -1
  167. package/lib/retail/components/Fields/GeneralSeniorityField.js +2 -1
  168. package/lib/retail/components/Fields/GeneralSeniorityField.js.map +1 -1
  169. package/lib/retail/components/Fields/JobsNumberField.js +2 -1
  170. package/lib/retail/components/Fields/JobsNumberField.js.map +1 -1
  171. package/lib/retail/components/Fields/LastJobExperienceField.js +2 -1
  172. package/lib/retail/components/Fields/LastJobExperienceField.js.map +1 -1
  173. package/lib/retail/components/Fields/LimitedBirthdayField.js +1 -1
  174. package/lib/retail/components/Fields/LimitedBirthdayField.js.map +1 -1
  175. package/lib/retail/components/Fields/MiddleNameField.js +1 -1
  176. package/lib/retail/components/Fields/MiddleNameField.js.map +1 -1
  177. package/lib/retail/components/Fields/NameField.js +1 -1
  178. package/lib/retail/components/Fields/NameField.js.map +1 -1
  179. package/lib/retail/components/Fields/OrganizationNameField.js +2 -1
  180. package/lib/retail/components/Fields/OrganizationNameField.js.map +1 -1
  181. package/lib/retail/components/Fields/SurnameField.js +1 -2
  182. package/lib/retail/components/Fields/SurnameField.js.map +1 -1
  183. package/lib/retail/components/Fields/WagesField.js +2 -1
  184. package/lib/retail/components/Fields/WagesField.js.map +1 -1
  185. package/lib/retail/content.js +11 -5
  186. package/lib/retail/content.js.map +1 -1
  187. package/lib/retail/model/NameFieldDef.d.ts +1 -1
  188. package/lib/retail/utils/isEsiaAuthorize.d.ts +2 -1
  189. package/lib/retail/utils/isEsiaAuthorize.js +3 -1
  190. package/lib/retail/utils/isEsiaAuthorize.js.map +1 -1
  191. package/lib/retail/utils/mainFormStateMap.js +1 -0
  192. package/lib/retail/utils/mainFormStateMap.js.map +1 -1
  193. package/lib/ui-kit/FormField/Fields/MiddleNameField.js +1 -1
  194. package/lib/ui-kit/FormField/Fields/MiddleNameField.js.map +1 -1
  195. package/lib/ui-kit/FormField/Fields/NameField.js +1 -1
  196. package/lib/ui-kit/FormField/Fields/NameField.js.map +1 -1
  197. package/lib/ui-kit/FormField/Fields/PhoneField.js +2 -1
  198. package/lib/ui-kit/FormField/Fields/PhoneField.js.map +1 -1
  199. package/lib/ui-kit/FormField/Fields/SurnameField.js +1 -1
  200. package/lib/ui-kit/FormField/Fields/SurnameField.js.map +1 -1
  201. package/lib/ui-kit/FormField/shouldRenderField.d.ts +1 -1
  202. package/lib/ui-kit/FormField/shouldRenderField.js +1 -1
  203. package/lib/ui-kit/FormField/shouldRenderField.js.map +1 -1
  204. package/mobile/bundle/bundle.umd.js +291 -250
  205. package/mobile/bundle/bundle.umd.min.js +1 -1
  206. package/mobile/bundle/components/ApplicationLeadForm/ApplicationLeadForm.d.ts +5 -0
  207. package/mobile/bundle/components/ApplicationLeadForm/EsiaLoginBanner.d.ts +4 -0
  208. package/mobile/bundle/components/ApplicationLeadForm/applicationFormData.d.ts +0 -1
  209. package/mobile/bundle/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -1
  210. package/mobile/bundle/components/ApplicationLeadForm/parseEsiaProfile.d.ts +2 -2
  211. package/mobile/bundle/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +1 -2
  212. package/mobile/bundle/components/ApplicationLeadForm/useInitApplicationLead.d.ts +4 -4
  213. package/mobile/bundle/retail/api/checkCode.d.ts +1 -0
  214. package/{dist/retail/api/updateProfileEsia.d.ts → mobile/bundle/retail/api/esiaRequestProfile.d.ts} +11 -4
  215. package/mobile/bundle/retail/api/updateUserTask.d.ts +1 -0
  216. package/mobile/bundle/retail/api/uploadFile.d.ts +1 -1
  217. package/mobile/bundle/retail/model/NameFieldDef.d.ts +1 -1
  218. package/mobile/bundle/retail/utils/isEsiaAuthorize.d.ts +2 -1
  219. package/mobile/bundle/ui-kit/FormField/shouldRenderField.d.ts +1 -1
  220. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.d.ts +5 -0
  221. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +26 -8
  222. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  223. package/mobile/dist/components/ApplicationLeadForm/EsiaLoginBanner.d.ts +4 -0
  224. package/mobile/dist/components/ApplicationLeadForm/EsiaLoginBanner.js +22 -0
  225. package/mobile/dist/components/ApplicationLeadForm/EsiaLoginBanner.js.map +1 -0
  226. package/mobile/dist/components/ApplicationLeadForm/applicationFormData.d.ts +0 -1
  227. package/mobile/dist/components/ApplicationLeadForm/applicationFormData.js +6 -31
  228. package/mobile/dist/components/ApplicationLeadForm/applicationFormData.js.map +1 -1
  229. package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -1
  230. package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.js +8 -2
  231. package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  232. package/mobile/dist/components/ApplicationLeadForm/parseEsiaProfile.d.ts +2 -2
  233. package/mobile/dist/components/ApplicationLeadForm/parseEsiaProfile.js +84 -54
  234. package/mobile/dist/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
  235. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +1 -2
  236. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +53 -53
  237. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  238. package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.d.ts +4 -4
  239. package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js +16 -24
  240. package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  241. package/mobile/dist/retail/api/checkCode.d.ts +1 -0
  242. package/mobile/dist/retail/api/checkCode.js +3 -2
  243. package/mobile/dist/retail/api/checkCode.js.map +1 -1
  244. package/mobile/dist/retail/api/esiaRequestProfile.d.ts +84 -0
  245. package/mobile/dist/retail/api/esiaRequestProfile.js +10 -0
  246. package/mobile/dist/retail/api/esiaRequestProfile.js.map +1 -0
  247. package/mobile/dist/retail/api/updateUserTask.d.ts +1 -0
  248. package/mobile/dist/retail/api/updateUserTask.js.map +1 -1
  249. package/mobile/dist/retail/api/uploadFile.d.ts +1 -1
  250. package/mobile/dist/retail/api/uploadFile.js +2 -3
  251. package/mobile/dist/retail/api/uploadFile.js.map +1 -1
  252. package/mobile/dist/retail/components/DraftDialog/parseDraftTask.js +2 -1
  253. package/mobile/dist/retail/components/DraftDialog/parseDraftTask.js.map +1 -1
  254. package/mobile/dist/retail/components/Fields/AddressField.js +1 -1
  255. package/mobile/dist/retail/components/Fields/AddressField.js.map +1 -1
  256. package/mobile/dist/retail/components/Fields/BeginDateField.js +2 -1
  257. package/mobile/dist/retail/components/Fields/BeginDateField.js.map +1 -1
  258. package/mobile/dist/retail/components/Fields/BirthPlaceField.js +1 -2
  259. package/mobile/dist/retail/components/Fields/BirthPlaceField.js.map +1 -1
  260. package/mobile/dist/retail/components/Fields/ConfirmationIncomeField.js +4 -1
  261. package/mobile/dist/retail/components/Fields/ConfirmationIncomeField.js.map +1 -1
  262. package/mobile/dist/retail/components/Fields/DaDataInnField.js +2 -1
  263. package/mobile/dist/retail/components/Fields/DaDataInnField.js.map +1 -1
  264. package/mobile/dist/retail/components/Fields/DulIssueDateField.js +1 -1
  265. package/mobile/dist/retail/components/Fields/DulIssueDateField.js.map +1 -1
  266. package/mobile/dist/retail/components/Fields/DulIssuedByField.js +1 -1
  267. package/mobile/dist/retail/components/Fields/DulIssuedByField.js.map +1 -1
  268. package/mobile/dist/retail/components/Fields/DulNumberField.js +1 -1
  269. package/mobile/dist/retail/components/Fields/DulNumberField.js.map +1 -1
  270. package/mobile/dist/retail/components/Fields/DulSerieField.js +1 -1
  271. package/mobile/dist/retail/components/Fields/DulSerieField.js.map +1 -1
  272. package/mobile/dist/retail/components/Fields/DulSubdivisionCodeField.js +1 -1
  273. package/mobile/dist/retail/components/Fields/DulSubdivisionCodeField.js.map +1 -1
  274. package/mobile/dist/retail/components/Fields/Experience5YearsField.js +2 -1
  275. package/mobile/dist/retail/components/Fields/Experience5YearsField.js.map +1 -1
  276. package/mobile/dist/retail/components/Fields/GeneralSeniorityField.js +2 -1
  277. package/mobile/dist/retail/components/Fields/GeneralSeniorityField.js.map +1 -1
  278. package/mobile/dist/retail/components/Fields/JobsNumberField.js +2 -1
  279. package/mobile/dist/retail/components/Fields/JobsNumberField.js.map +1 -1
  280. package/mobile/dist/retail/components/Fields/LastJobExperienceField.js +2 -1
  281. package/mobile/dist/retail/components/Fields/LastJobExperienceField.js.map +1 -1
  282. package/mobile/dist/retail/components/Fields/LimitedBirthdayField.js +1 -1
  283. package/mobile/dist/retail/components/Fields/LimitedBirthdayField.js.map +1 -1
  284. package/mobile/dist/retail/components/Fields/MiddleNameField.js +1 -1
  285. package/mobile/dist/retail/components/Fields/MiddleNameField.js.map +1 -1
  286. package/mobile/dist/retail/components/Fields/NameField.js +1 -1
  287. package/mobile/dist/retail/components/Fields/NameField.js.map +1 -1
  288. package/mobile/dist/retail/components/Fields/OrganizationNameField.js +2 -1
  289. package/mobile/dist/retail/components/Fields/OrganizationNameField.js.map +1 -1
  290. package/mobile/dist/retail/components/Fields/SurnameField.js +1 -2
  291. package/mobile/dist/retail/components/Fields/SurnameField.js.map +1 -1
  292. package/mobile/dist/retail/components/Fields/WagesField.js +2 -1
  293. package/mobile/dist/retail/components/Fields/WagesField.js.map +1 -1
  294. package/mobile/dist/retail/content.js +11 -5
  295. package/mobile/dist/retail/content.js.map +1 -1
  296. package/mobile/dist/retail/model/NameFieldDef.d.ts +1 -1
  297. package/mobile/dist/retail/utils/isEsiaAuthorize.d.ts +2 -1
  298. package/mobile/dist/retail/utils/isEsiaAuthorize.js +3 -1
  299. package/mobile/dist/retail/utils/isEsiaAuthorize.js.map +1 -1
  300. package/mobile/dist/retail/utils/mainFormStateMap.js +1 -0
  301. package/mobile/dist/retail/utils/mainFormStateMap.js.map +1 -1
  302. package/mobile/dist/ui-kit/FormField/Fields/MiddleNameField.js +1 -1
  303. package/mobile/dist/ui-kit/FormField/Fields/MiddleNameField.js.map +1 -1
  304. package/mobile/dist/ui-kit/FormField/Fields/NameField.js +1 -1
  305. package/mobile/dist/ui-kit/FormField/Fields/NameField.js.map +1 -1
  306. package/mobile/dist/ui-kit/FormField/Fields/PhoneField.js +2 -1
  307. package/mobile/dist/ui-kit/FormField/Fields/PhoneField.js.map +1 -1
  308. package/mobile/dist/ui-kit/FormField/Fields/SurnameField.js +1 -1
  309. package/mobile/dist/ui-kit/FormField/Fields/SurnameField.js.map +1 -1
  310. package/mobile/dist/ui-kit/FormField/shouldRenderField.d.ts +1 -1
  311. package/mobile/dist/ui-kit/FormField/shouldRenderField.js +1 -1
  312. package/mobile/dist/ui-kit/FormField/shouldRenderField.js.map +1 -1
  313. package/mobile/lib/common.css +1 -1
  314. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.d.ts +5 -0
  315. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +26 -8
  316. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  317. package/mobile/lib/components/ApplicationLeadForm/EsiaLoginBanner.d.ts +4 -0
  318. package/mobile/lib/components/ApplicationLeadForm/EsiaLoginBanner.js +20 -0
  319. package/mobile/lib/components/ApplicationLeadForm/EsiaLoginBanner.js.map +1 -0
  320. package/mobile/lib/components/ApplicationLeadForm/applicationFormData.d.ts +0 -1
  321. package/mobile/lib/components/ApplicationLeadForm/applicationFormData.js +5 -30
  322. package/mobile/lib/components/ApplicationLeadForm/applicationFormData.js.map +1 -1
  323. package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -1
  324. package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.js +8 -2
  325. package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  326. package/mobile/lib/components/ApplicationLeadForm/parseEsiaProfile.d.ts +2 -2
  327. package/mobile/lib/components/ApplicationLeadForm/parseEsiaProfile.js +84 -54
  328. package/mobile/lib/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
  329. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +1 -2
  330. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +53 -53
  331. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  332. package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.d.ts +4 -4
  333. package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js +16 -24
  334. package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  335. package/mobile/lib/retail/api/checkCode.d.ts +1 -0
  336. package/mobile/lib/retail/api/checkCode.js +1 -1
  337. package/mobile/lib/retail/api/checkCode.js.map +1 -1
  338. package/mobile/lib/retail/api/esiaRequestProfile.d.ts +84 -0
  339. package/mobile/lib/retail/api/esiaRequestProfile.js +7 -0
  340. package/mobile/lib/retail/api/esiaRequestProfile.js.map +1 -0
  341. package/mobile/lib/retail/api/updateUserTask.d.ts +1 -0
  342. package/mobile/lib/retail/api/updateUserTask.js.map +1 -1
  343. package/mobile/lib/retail/api/uploadFile.d.ts +1 -1
  344. package/mobile/lib/retail/api/uploadFile.js +2 -3
  345. package/mobile/lib/retail/api/uploadFile.js.map +1 -1
  346. package/mobile/lib/retail/components/DraftDialog/parseDraftTask.js +2 -1
  347. package/mobile/lib/retail/components/DraftDialog/parseDraftTask.js.map +1 -1
  348. package/mobile/lib/retail/components/Fields/AddressField.js +1 -1
  349. package/mobile/lib/retail/components/Fields/AddressField.js.map +1 -1
  350. package/mobile/lib/retail/components/Fields/BeginDateField.js +2 -1
  351. package/mobile/lib/retail/components/Fields/BeginDateField.js.map +1 -1
  352. package/mobile/lib/retail/components/Fields/BirthPlaceField.js +1 -2
  353. package/mobile/lib/retail/components/Fields/BirthPlaceField.js.map +1 -1
  354. package/mobile/lib/retail/components/Fields/ConfirmationIncomeField.js +5 -2
  355. package/mobile/lib/retail/components/Fields/ConfirmationIncomeField.js.map +1 -1
  356. package/mobile/lib/retail/components/Fields/DaDataInnField.js +2 -1
  357. package/mobile/lib/retail/components/Fields/DaDataInnField.js.map +1 -1
  358. package/mobile/lib/retail/components/Fields/DulIssueDateField.js +1 -1
  359. package/mobile/lib/retail/components/Fields/DulIssueDateField.js.map +1 -1
  360. package/mobile/lib/retail/components/Fields/DulIssuedByField.js +1 -1
  361. package/mobile/lib/retail/components/Fields/DulIssuedByField.js.map +1 -1
  362. package/mobile/lib/retail/components/Fields/DulNumberField.js +1 -1
  363. package/mobile/lib/retail/components/Fields/DulNumberField.js.map +1 -1
  364. package/mobile/lib/retail/components/Fields/DulSerieField.js +1 -1
  365. package/mobile/lib/retail/components/Fields/DulSerieField.js.map +1 -1
  366. package/mobile/lib/retail/components/Fields/DulSubdivisionCodeField.js +1 -1
  367. package/mobile/lib/retail/components/Fields/DulSubdivisionCodeField.js.map +1 -1
  368. package/mobile/lib/retail/components/Fields/Experience5YearsField.js +2 -1
  369. package/mobile/lib/retail/components/Fields/Experience5YearsField.js.map +1 -1
  370. package/mobile/lib/retail/components/Fields/GeneralSeniorityField.js +2 -1
  371. package/mobile/lib/retail/components/Fields/GeneralSeniorityField.js.map +1 -1
  372. package/mobile/lib/retail/components/Fields/JobsNumberField.js +2 -1
  373. package/mobile/lib/retail/components/Fields/JobsNumberField.js.map +1 -1
  374. package/mobile/lib/retail/components/Fields/LastJobExperienceField.js +2 -1
  375. package/mobile/lib/retail/components/Fields/LastJobExperienceField.js.map +1 -1
  376. package/mobile/lib/retail/components/Fields/LimitedBirthdayField.js +1 -1
  377. package/mobile/lib/retail/components/Fields/LimitedBirthdayField.js.map +1 -1
  378. package/mobile/lib/retail/components/Fields/MiddleNameField.js +1 -1
  379. package/mobile/lib/retail/components/Fields/MiddleNameField.js.map +1 -1
  380. package/mobile/lib/retail/components/Fields/NameField.js +1 -1
  381. package/mobile/lib/retail/components/Fields/NameField.js.map +1 -1
  382. package/mobile/lib/retail/components/Fields/OrganizationNameField.js +2 -1
  383. package/mobile/lib/retail/components/Fields/OrganizationNameField.js.map +1 -1
  384. package/mobile/lib/retail/components/Fields/SurnameField.js +1 -2
  385. package/mobile/lib/retail/components/Fields/SurnameField.js.map +1 -1
  386. package/mobile/lib/retail/components/Fields/WagesField.js +2 -1
  387. package/mobile/lib/retail/components/Fields/WagesField.js.map +1 -1
  388. package/mobile/lib/retail/content.js +11 -5
  389. package/mobile/lib/retail/content.js.map +1 -1
  390. package/mobile/lib/retail/model/NameFieldDef.d.ts +1 -1
  391. package/mobile/lib/retail/utils/isEsiaAuthorize.d.ts +2 -1
  392. package/mobile/lib/retail/utils/isEsiaAuthorize.js +3 -1
  393. package/mobile/lib/retail/utils/isEsiaAuthorize.js.map +1 -1
  394. package/mobile/lib/retail/utils/mainFormStateMap.js +1 -0
  395. package/mobile/lib/retail/utils/mainFormStateMap.js.map +1 -1
  396. package/mobile/lib/ui-kit/FormField/Fields/MiddleNameField.js +1 -1
  397. package/mobile/lib/ui-kit/FormField/Fields/MiddleNameField.js.map +1 -1
  398. package/mobile/lib/ui-kit/FormField/Fields/NameField.js +1 -1
  399. package/mobile/lib/ui-kit/FormField/Fields/NameField.js.map +1 -1
  400. package/mobile/lib/ui-kit/FormField/Fields/PhoneField.js +2 -1
  401. package/mobile/lib/ui-kit/FormField/Fields/PhoneField.js.map +1 -1
  402. package/mobile/lib/ui-kit/FormField/Fields/SurnameField.js +1 -1
  403. package/mobile/lib/ui-kit/FormField/Fields/SurnameField.js.map +1 -1
  404. package/mobile/lib/ui-kit/FormField/shouldRenderField.d.ts +1 -1
  405. package/mobile/lib/ui-kit/FormField/shouldRenderField.js +1 -1
  406. package/mobile/lib/ui-kit/FormField/shouldRenderField.js.map +1 -1
  407. package/mobile/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +31 -10
  408. package/mobile/src/components/ApplicationLeadForm/EsiaLoginBanner.tsx +51 -0
  409. package/mobile/src/components/ApplicationLeadForm/applicationFormData.tsx +5 -31
  410. package/mobile/src/components/ApplicationLeadForm/getInitialFormState.tsx +8 -1
  411. package/mobile/src/components/ApplicationLeadForm/parseEsiaProfile.ts +92 -67
  412. package/mobile/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +60 -65
  413. package/mobile/src/components/ApplicationLeadForm/useInitApplicationLead.ts +32 -48
  414. package/mobile/src/retail/api/checkCode.ts +1 -1
  415. package/mobile/src/retail/api/{updateProfileEsia.ts → esiaRequestProfile.ts} +16 -5
  416. package/mobile/src/retail/api/updateUserTask.ts +1 -0
  417. package/mobile/src/retail/api/uploadFile.ts +2 -3
  418. package/mobile/src/retail/components/DraftDialog/parseDraftTask.ts +2 -0
  419. package/mobile/src/retail/components/Fields/AddressField.tsx +1 -1
  420. package/mobile/src/retail/components/Fields/BeginDateField.tsx +2 -0
  421. package/mobile/src/retail/components/Fields/BirthPlaceField.tsx +1 -3
  422. package/mobile/src/retail/components/Fields/ConfirmationIncomeField.tsx +16 -7
  423. package/mobile/src/retail/components/Fields/DaDataInnField.tsx +2 -0
  424. package/mobile/src/retail/components/Fields/DulIssueDateField.tsx +1 -1
  425. package/mobile/src/retail/components/Fields/DulIssuedByField.tsx +1 -1
  426. package/mobile/src/retail/components/Fields/DulNumberField.tsx +1 -1
  427. package/mobile/src/retail/components/Fields/DulSerieField.tsx +1 -1
  428. package/mobile/src/retail/components/Fields/DulSubdivisionCodeField.tsx +1 -1
  429. package/mobile/src/retail/components/Fields/Experience5YearsField.tsx +2 -0
  430. package/mobile/src/retail/components/Fields/GeneralSeniorityField.tsx +2 -0
  431. package/mobile/src/retail/components/Fields/JobsNumberField.tsx +2 -0
  432. package/mobile/src/retail/components/Fields/LastJobExperienceField.tsx +2 -0
  433. package/mobile/src/retail/components/Fields/LimitedBirthdayField.tsx +1 -1
  434. package/mobile/src/retail/components/Fields/MiddleNameField.tsx +1 -1
  435. package/mobile/src/retail/components/Fields/NameField.tsx +1 -1
  436. package/mobile/src/retail/components/Fields/OrganizationNameField.tsx +2 -0
  437. package/mobile/src/retail/components/Fields/SurnameField.tsx +1 -3
  438. package/mobile/src/retail/components/Fields/WagesField.tsx +2 -0
  439. package/mobile/src/retail/content.tsx +11 -5
  440. package/mobile/src/retail/model/NameFieldDef.ts +1 -0
  441. package/mobile/src/retail/utils/isEsiaAuthorize.ts +5 -2
  442. package/mobile/src/retail/utils/mainFormStateMap.ts +1 -0
  443. package/mobile/src/ui-kit/FormField/Fields/MiddleNameField.tsx +1 -1
  444. package/mobile/src/ui-kit/FormField/Fields/NameField.tsx +1 -1
  445. package/mobile/src/ui-kit/FormField/Fields/PhoneField.tsx +9 -1
  446. package/mobile/src/ui-kit/FormField/Fields/SurnameField.tsx +1 -1
  447. package/mobile/src/ui-kit/FormField/shouldRenderField.tsx +2 -1
  448. package/package.json +2 -2
  449. package/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +31 -10
  450. package/src/components/ApplicationLeadForm/EsiaLoginBanner.tsx +51 -0
  451. package/src/components/ApplicationLeadForm/applicationFormData.tsx +5 -31
  452. package/src/components/ApplicationLeadForm/getInitialFormState.tsx +8 -1
  453. package/src/components/ApplicationLeadForm/parseEsiaProfile.ts +92 -67
  454. package/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +60 -65
  455. package/src/components/ApplicationLeadForm/useInitApplicationLead.ts +32 -48
  456. package/src/retail/api/checkCode.ts +1 -1
  457. package/src/retail/api/{updateProfileEsia.ts → esiaRequestProfile.ts} +16 -5
  458. package/src/retail/api/updateUserTask.ts +1 -0
  459. package/src/retail/api/uploadFile.ts +2 -3
  460. package/src/retail/components/DraftDialog/parseDraftTask.ts +2 -0
  461. package/src/retail/components/Fields/AddressField.tsx +1 -1
  462. package/src/retail/components/Fields/BeginDateField.tsx +2 -0
  463. package/src/retail/components/Fields/BirthPlaceField.tsx +1 -3
  464. package/src/retail/components/Fields/ConfirmationIncomeField.tsx +16 -7
  465. package/src/retail/components/Fields/DaDataInnField.tsx +2 -0
  466. package/src/retail/components/Fields/DulIssueDateField.tsx +1 -1
  467. package/src/retail/components/Fields/DulIssuedByField.tsx +1 -1
  468. package/src/retail/components/Fields/DulNumberField.tsx +1 -1
  469. package/src/retail/components/Fields/DulSerieField.tsx +1 -1
  470. package/src/retail/components/Fields/DulSubdivisionCodeField.tsx +1 -1
  471. package/src/retail/components/Fields/Experience5YearsField.tsx +2 -0
  472. package/src/retail/components/Fields/GeneralSeniorityField.tsx +2 -0
  473. package/src/retail/components/Fields/JobsNumberField.tsx +2 -0
  474. package/src/retail/components/Fields/LastJobExperienceField.tsx +2 -0
  475. package/src/retail/components/Fields/LimitedBirthdayField.tsx +1 -1
  476. package/src/retail/components/Fields/MiddleNameField.tsx +1 -1
  477. package/src/retail/components/Fields/NameField.tsx +1 -1
  478. package/src/retail/components/Fields/OrganizationNameField.tsx +2 -0
  479. package/src/retail/components/Fields/SurnameField.tsx +1 -3
  480. package/src/retail/components/Fields/WagesField.tsx +2 -0
  481. package/src/retail/content.tsx +11 -5
  482. package/src/retail/model/NameFieldDef.ts +1 -0
  483. package/src/retail/utils/isEsiaAuthorize.ts +5 -2
  484. package/src/retail/utils/mainFormStateMap.ts +1 -0
  485. package/src/ui-kit/FormField/Fields/MiddleNameField.tsx +1 -1
  486. package/src/ui-kit/FormField/Fields/NameField.tsx +1 -1
  487. package/src/ui-kit/FormField/Fields/PhoneField.tsx +9 -1
  488. package/src/ui-kit/FormField/Fields/SurnameField.tsx +1 -1
  489. package/src/ui-kit/FormField/shouldRenderField.tsx +2 -1
  490. package/bundle/retail/components/EsiaLoginDialog/EsiaLoginDialog.d.ts +0 -4
  491. package/bundle/retail/components/EsiaLoginDialog/useEsiaLoginDialog.d.ts +0 -1
  492. package/dist/retail/api/updateProfileEsia.js +0 -6
  493. package/dist/retail/api/updateProfileEsia.js.map +0 -1
  494. package/dist/retail/components/EsiaLoginDialog/EsiaLoginDialog.d.ts +0 -4
  495. package/dist/retail/components/EsiaLoginDialog/EsiaLoginDialog.js +0 -34
  496. package/dist/retail/components/EsiaLoginDialog/EsiaLoginDialog.js.map +0 -1
  497. package/dist/retail/components/EsiaLoginDialog/useEsiaLoginDialog.d.ts +0 -1
  498. package/dist/retail/components/EsiaLoginDialog/useEsiaLoginDialog.js +0 -15
  499. package/dist/retail/components/EsiaLoginDialog/useEsiaLoginDialog.js.map +0 -1
  500. package/lib/retail/api/updateProfileEsia.js +0 -3
  501. package/lib/retail/api/updateProfileEsia.js.map +0 -1
  502. package/lib/retail/components/EsiaLoginDialog/EsiaLoginDialog.d.ts +0 -4
  503. package/lib/retail/components/EsiaLoginDialog/EsiaLoginDialog.fixture.d.ts +0 -5
  504. package/lib/retail/components/EsiaLoginDialog/EsiaLoginDialog.js +0 -32
  505. package/lib/retail/components/EsiaLoginDialog/EsiaLoginDialog.js.map +0 -1
  506. package/lib/retail/components/EsiaLoginDialog/useEsiaLoginDialog.d.ts +0 -1
  507. package/lib/retail/components/EsiaLoginDialog/useEsiaLoginDialog.js +0 -12
  508. package/lib/retail/components/EsiaLoginDialog/useEsiaLoginDialog.js.map +0 -1
  509. package/mobile/bundle/retail/components/EsiaLoginDialog/EsiaLoginDialog.d.ts +0 -4
  510. package/mobile/bundle/retail/components/EsiaLoginDialog/useEsiaLoginDialog.d.ts +0 -1
  511. package/mobile/dist/retail/api/updateProfileEsia.d.ts +0 -77
  512. package/mobile/dist/retail/api/updateProfileEsia.js +0 -6
  513. package/mobile/dist/retail/api/updateProfileEsia.js.map +0 -1
  514. package/mobile/dist/retail/components/EsiaLoginDialog/EsiaLoginDialog.d.ts +0 -4
  515. package/mobile/dist/retail/components/EsiaLoginDialog/EsiaLoginDialog.js +0 -34
  516. package/mobile/dist/retail/components/EsiaLoginDialog/EsiaLoginDialog.js.map +0 -1
  517. package/mobile/dist/retail/components/EsiaLoginDialog/useEsiaLoginDialog.d.ts +0 -1
  518. package/mobile/dist/retail/components/EsiaLoginDialog/useEsiaLoginDialog.js +0 -15
  519. package/mobile/dist/retail/components/EsiaLoginDialog/useEsiaLoginDialog.js.map +0 -1
  520. package/mobile/lib/retail/api/updateProfileEsia.d.ts +0 -77
  521. package/mobile/lib/retail/api/updateProfileEsia.js +0 -3
  522. package/mobile/lib/retail/api/updateProfileEsia.js.map +0 -1
  523. package/mobile/lib/retail/components/EsiaLoginDialog/EsiaLoginDialog.d.ts +0 -4
  524. package/mobile/lib/retail/components/EsiaLoginDialog/EsiaLoginDialog.js +0 -32
  525. package/mobile/lib/retail/components/EsiaLoginDialog/EsiaLoginDialog.js.map +0 -1
  526. package/mobile/lib/retail/components/EsiaLoginDialog/useEsiaLoginDialog.d.ts +0 -1
  527. package/mobile/lib/retail/components/EsiaLoginDialog/useEsiaLoginDialog.js +0 -12
  528. package/mobile/lib/retail/components/EsiaLoginDialog/useEsiaLoginDialog.js.map +0 -1
  529. package/mobile/src/retail/components/EsiaLoginDialog/EsiaLoginDialog.tsx +0 -65
  530. package/mobile/src/retail/components/EsiaLoginDialog/useEsiaLoginDialog.tsx +0 -13
  531. package/src/retail/components/EsiaLoginDialog/EsiaLoginDialog.fixture.tsx +0 -7
  532. package/src/retail/components/EsiaLoginDialog/EsiaLoginDialog.tsx +0 -65
  533. package/src/retail/components/EsiaLoginDialog/useEsiaLoginDialog.tsx +0 -13
@@ -1982,11 +1982,13 @@
1982
1982
  });
1983
1983
 
1984
1984
  const ESIA_FIELD_NAME = 'esiaAccountTypeCd';
1985
- const isEsiaAuthorize = (field, name) => Boolean(field(ESIA_FIELD_NAME)?.value?.key) && field(name).value;
1985
+ const isEsiaAuthorize = (field, input, name = '') => input?.filledByEsia &&
1986
+ Boolean(field(ESIA_FIELD_NAME)?.value?.key) &&
1987
+ field(input?.name ?? name).value;
1986
1988
 
1987
- const MiddleNameField$1 = JSX(({ field, input }) => (jsx(InputControl, { label: "\u041E\u0442\u0447\u0435\u0441\u0442\u0432\u043E (\u041E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E, \u043F\u0440\u0438 \u043D\u0430\u043B\u0438\u0447\u0438\u0438)", maxLength: 60, disabled: input?.filledByEsia && isEsiaAuthorize(field, input.name ?? ''), ...field(input?.name ?? ''), ...input })));
1989
+ const MiddleNameField$1 = JSX(({ field, input }) => (jsx(InputControl, { label: "\u041E\u0442\u0447\u0435\u0441\u0442\u0432\u043E (\u041E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E, \u043F\u0440\u0438 \u043D\u0430\u043B\u0438\u0447\u0438\u0438)", maxLength: 60, disabled: isEsiaAuthorize(field, input), ...field(input?.name ?? ''), ...input })));
1988
1990
 
1989
- const NameField$1 = JSX(({ field, input }) => (jsx(InputControl, { label: "\u0418\u043C\u044F", maxLength: 60, disabled: input?.filledByEsia && isEsiaAuthorize(field, input.name ?? ''), ...field(input?.name ?? ''), ...input })));
1991
+ const NameField$1 = JSX(({ field, input }) => (jsx(InputControl, { label: "\u0418\u043C\u044F", maxLength: 60, disabled: isEsiaAuthorize(field, input), ...field(input?.name ?? ''), ...input })));
1990
1992
 
1991
1993
  const SlideCheckbox = JSX(({ value = false, text, type = 'checkbox', onChange }) => (jsxs("div", { role: type, "aria-checked": value, className: "flex justify-start items-center w-full cursor-pointer mb-s", onClick: () => onChange && onChange(!value), children: [jsx("div", { className: style('relative flex-shrink-0 duration-300 w-9 h-5 mr-s rounded-2xl', value ? 'bg-primary-main' : 'bg-main-divider'), children: jsx("div", { className: style('absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full', value ? 'left-1/2' : 'left-[5%]') }) }), text ? (jsx(Text, { size: "text-l", font: "font-light", color: "text-primary-text", children: text })) : null] })));
1992
1994
 
@@ -2022,7 +2024,7 @@
2022
2024
 
2023
2025
  const PhoneField = JSX(({ field, input }) => {
2024
2026
  const fieldName = input?.name || 'phone';
2025
- return jsx(InputPhoneControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...field(fieldName), ...input });
2027
+ return (jsx(InputPhoneControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", disabled: isEsiaAuthorize(field, input, fieldName), ...field(fieldName), ...input }));
2026
2028
  });
2027
2029
 
2028
2030
  const PosTerminalField = JSX(({ field }) => isAcquiringTrade(field('acquiringType')?.value?.key) ? (jsx(SlideCheckbox, { type: "radio", text: "\u0425\u043E\u0447\u0443 POS-\u0442\u0435\u0440\u043C\u0438\u043D\u0430\u043B", ...field('posTerminal') })) : null);
@@ -2166,7 +2168,7 @@
2166
2168
  ];
2167
2169
  const SufferedFromField = JSX(({ field, input }) => (jsx(SelectControl, { label: "\u041F\u043E\u0441\u0442\u0440\u0430\u0434\u0430\u043B \u0432", ...input, options: SUFFERED_FROM_TYPES, ...field('sufferedFrom') })));
2168
2170
 
2169
- const SurnameField$1 = JSX(({ field, input }) => (jsx(InputControl, { label: "\u0424\u0430\u043C\u0438\u043B\u0438\u044F", maxLength: 60, disabled: input?.filledByEsia && isEsiaAuthorize(field, input.name ?? ''), ...field(input?.name ?? ''), ...input })));
2171
+ const SurnameField$1 = JSX(({ field, input }) => (jsx(InputControl, { label: "\u0424\u0430\u043C\u0438\u043B\u0438\u044F", maxLength: 60, disabled: isEsiaAuthorize(field, input), ...field(input?.name ?? ''), ...input })));
2170
2172
 
2171
2173
  const MIN_CREDIT_TERM = 1;
2172
2174
  const MAX_CREDIT_TERM = 180;
@@ -2202,7 +2204,7 @@
2202
2204
  function shouldRenderField({ input, field, }) {
2203
2205
  const { condition } = input;
2204
2206
  const { value } = field(condition?.name || '');
2205
- return !condition || condition?.values?.find((_) => _ === (value?.key ?? value));
2207
+ return !condition || condition?.values?.includes(value?.key ?? value);
2206
2208
  }
2207
2209
 
2208
2210
  const PRODUCT_REF = {
@@ -2667,11 +2669,11 @@
2667
2669
  {
2668
2670
  columns: 2,
2669
2671
  inputs: [
2670
- { name: 'surname', required: true, dadata: true },
2671
- { name: 'name', required: true, dadata: true },
2672
- { name: 'middleName', dadata: true },
2673
- { name: 'limitedBirthday', required: true },
2674
- { name: 'phone', required: true },
2672
+ { name: 'surname', required: true, dadata: true, filledByEsia: true },
2673
+ { name: 'name', required: true, dadata: true, filledByEsia: true },
2674
+ { name: 'middleName', dadata: true, filledByEsia: true },
2675
+ { name: 'limitedBirthday', required: true, filledByEsia: true },
2676
+ { name: 'phone', required: true, filledByEsia: true },
2675
2677
  { name: 'email', required: true, dadata: true },
2676
2678
  ],
2677
2679
  },
@@ -2681,6 +2683,57 @@
2681
2683
  ];
2682
2684
  };
2683
2685
 
2686
+ const getTraceId = () => {
2687
+ const result = new Uint8Array(8);
2688
+ globalThis.crypto.getRandomValues(result);
2689
+ return result.reduce((acc, _) => `${acc}${_.toString(16).padStart(2, '0')}`, '');
2690
+ };
2691
+
2692
+ const fetchRetailJSON = async (url, method, body) => {
2693
+ try {
2694
+ const response = await doRequest(url, method, body);
2695
+ return response.json();
2696
+ }
2697
+ catch (err) {
2698
+ console.error(err);
2699
+ return null;
2700
+ }
2701
+ };
2702
+ async function doRequest(url, method, body) {
2703
+ const traceId = getTraceId();
2704
+ return globalThis?.fetch?.(`${RETAIL_API_BASE_URI}${url}`, {
2705
+ method,
2706
+ headers: {
2707
+ 'Content-Type': 'application/json',
2708
+ 'X-B3-Sampled': '1',
2709
+ 'X-B3-Spanid': traceId,
2710
+ 'X-B3-Traceid': traceId,
2711
+ ...getAuthorizationHeaders(),
2712
+ },
2713
+ credentials: 'include',
2714
+ body: body ? JSON.stringify(body) : null,
2715
+ });
2716
+ }
2717
+ const getAuthorizationHeaders = () => {
2718
+ const token = sessionStorage.getItem('accessToken');
2719
+ return token ? { Authorization: `Bearer ${token}` } : null;
2720
+ };
2721
+
2722
+ const getLink = (body) => fetchRetailJSON('/esia/getLink', 'POST', body);
2723
+
2724
+ const EsiaLoginBanner = JSX(() => {
2725
+ const navigator = locationNavigator();
2726
+ const handleAuth = useCallback(async () => {
2727
+ const resp = await getLink({
2728
+ redirectUri: globalThis.location.origin + globalThis.location.pathname,
2729
+ });
2730
+ if (resp?.link) {
2731
+ navigator.assign(resp.link);
2732
+ }
2733
+ }, []);
2734
+ return (jsxs("div", { className: "flex gap-lg items-center rounded-md bg-main-gray p-4xl", children: [jsxs("div", { className: "flex flex-col justify-around w-full", children: [jsx("p", { className: "mb-m text-xl", children: "\u0417\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u0435 \u0434\u0430\u043D\u043D\u044B\u0435 \u0447\u0435\u0440\u0435\u0437 \u0413\u043E\u0441\u0443\u0441\u043B\u0443\u0433\u0438" }), jsxs("ul", { className: "list-disc list-inside mb-4xl", children: [jsx("li", { children: "\u0412\u0435\u0440\u043E\u044F\u0442\u043D\u043E\u0441\u0442\u044C \u043E\u0434\u043E\u0431\u0440\u0435\u043D\u0438\u044F \u0432\u044B\u0448\u0435" }), jsx("li", { children: "\u0411\u0435\u0437 \u0441\u043F\u0440\u0430\u0432\u043E\u043A \u043E \u0434\u043E\u0445\u043E\u0434\u0430\u0445 \u0438 \u0442\u0440\u0443\u0434\u043E\u0443\u0441\u0442\u0440\u043E\u0439\u0441\u0442\u0432\u0435" }), jsx("li", { children: "\u0421 \u0437\u0430\u0449\u0438\u0442\u043E\u0439 \u0412\u0430\u0448\u0438\u0445 \u0434\u0430\u043D\u043D\u044B\u0445" })] }), jsx(Img, { className: "block mb-xl self-center @md:hidden", image: { icon: 'GosUslugiIcon', iconVersion: 'normal' }, height: "80", width: "80" }), jsx(Button, { type: "button", onClick: handleAuth, className: "w-full @md:w-fit", children: "\u0417\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u044C" })] }), jsx(Img, { className: "hidden @md:block", image: { icon: 'GosUslugiIcon', iconVersion: 'normal' }, height: "164" })] }));
2735
+ });
2736
+
2684
2737
  const debounce = (fn, delay = 600) => {
2685
2738
  let timerId;
2686
2739
  const debouncedCallback = (...args) => {
@@ -2921,7 +2974,7 @@
2921
2974
  qcHouse: '',
2922
2975
  });
2923
2976
  }, []);
2924
- return (jsx(DaDataInputControl, { disabled: input?.filledByEsia && isEsiaAuthorize(field, fieldName), label: "\u0410\u0434\u0440\u0435\u0441", ...field(fieldName), value: fieldValue?.fullAddress, onChange: onChange, ...input, onDaDataChange: onDaDataChange }));
2977
+ return (jsx(DaDataInputControl, { disabled: isEsiaAuthorize(field, input, fieldName), label: "\u0410\u0434\u0440\u0435\u0441", ...field(fieldName), value: fieldValue?.fullAddress, onChange: onChange, ...input, onDaDataChange: onDaDataChange }));
2925
2978
  });
2926
2979
  const getAddressFromDaDataItem = (item) => ({
2927
2980
  apartment: item?.data?.flat,
@@ -3567,42 +3620,6 @@
3567
3620
  const mapByIndex = (points, index) => points.map((_) => _.coords?.[index]);
3568
3621
  const getArraySumAndAverage = (arr) => arr.length && arr.reduce((a, b) => a + b) / arr.length;
3569
3622
 
3570
- const getTraceId = () => {
3571
- const result = new Uint8Array(8);
3572
- globalThis.crypto.getRandomValues(result);
3573
- return result.reduce((acc, _) => `${acc}${_.toString(16).padStart(2, '0')}`, '');
3574
- };
3575
-
3576
- const fetchRetailJSON = async (url, method, body) => {
3577
- try {
3578
- const response = await doRequest(url, method, body);
3579
- return response.json();
3580
- }
3581
- catch (err) {
3582
- console.error(err);
3583
- return null;
3584
- }
3585
- };
3586
- async function doRequest(url, method, body) {
3587
- const traceId = getTraceId();
3588
- return globalThis?.fetch?.(`${RETAIL_API_BASE_URI}${url}`, {
3589
- method,
3590
- headers: {
3591
- 'Content-Type': 'application/json',
3592
- 'X-B3-Sampled': '1',
3593
- 'X-B3-Spanid': traceId,
3594
- 'X-B3-Traceid': traceId,
3595
- ...getAuthorizationHeaders(),
3596
- },
3597
- credentials: 'include',
3598
- body: body ? JSON.stringify(body) : null,
3599
- });
3600
- }
3601
- const getAuthorizationHeaders = () => {
3602
- const token = sessionStorage.getItem('accessToken');
3603
- return token ? { Authorization: `Bearer ${token}` } : null;
3604
- };
3605
-
3606
3623
  const fetchRegionOffices = async (regionKey) => {
3607
3624
  const response = await fetchRetailJSON('/public-data/regionOffices', 'POST', {
3608
3625
  regionRfCd: {
@@ -3832,10 +3849,9 @@
3832
3849
 
3833
3850
  const BankruptcyFlgField = JSX(({ field, input }) => (jsx(CheckboxWithError, { text: "\u0412 \u043E\u0442\u043D\u043E\u0448\u0435\u043D\u0438\u0438 \u043C\u0435\u043D\u044F \u0432\u0435\u0434\u0451\u0442\u0441\u044F \u043F\u0440\u043E\u0438\u0437\u0432\u043E\u0434\u0441\u0442\u0432\u043E \u043F\u043E \u0434\u0435\u043B\u0443 \u043E \u0431\u0430\u043D\u043A\u0440\u043E\u0442\u0441\u0442\u0432\u0435", ...field(input?.name ?? '') })));
3834
3851
 
3835
- const BeginDateField = JSX(({ field, input }) => (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u043D\u0430\u0447\u0430\u043B\u0430 \u0440\u0430\u0431\u043E\u0442\u044B \u043D\u0430 \u0442\u0435\u043A\u0443\u0449\u0435\u043C \u043C\u0435\u0441\u0442\u0435", ...field(input?.name ?? ''), ...input })));
3852
+ const BeginDateField = JSX(({ field, input }) => (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u043D\u0430\u0447\u0430\u043B\u0430 \u0440\u0430\u0431\u043E\u0442\u044B \u043D\u0430 \u0442\u0435\u043A\u0443\u0449\u0435\u043C \u043C\u0435\u0441\u0442\u0435", ...field(input?.name ?? ''), ...input, disabled: isEsiaAuthorize(field, input) })));
3836
3853
 
3837
- const FIELD_NAME$2 = 'birthPlace';
3838
- const BirthPlaceField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u041C\u0435\u0441\u0442\u043E \u0440\u043E\u0436\u0434\u0435\u043D\u0438\u044F", ...field(input?.name ?? ''), ...input, disabled: input?.filledByEsia && isEsiaAuthorize(field, FIELD_NAME$2) })));
3854
+ const BirthPlaceField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u041C\u0435\u0441\u0442\u043E \u0440\u043E\u0436\u0434\u0435\u043D\u0438\u044F", ...field(input?.name ?? ''), ...input, disabled: isEsiaAuthorize(field, input) })));
3839
3855
 
3840
3856
  const safeJsonParse = (data) => {
3841
3857
  try {
@@ -3896,7 +3912,8 @@
3896
3912
 
3897
3913
  const ConfirmationIncomeField = JSX(({ field, input }) => {
3898
3914
  const { data: confirmationIncome } = useLeadFormData('INCOME_CERT_UNITED');
3899
- return (jsx(SelectField, { field: field, source: confirmationIncome, label: "\u0421\u043F\u043E\u0441\u043E\u0431 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F \u0434\u043E\u0445\u043E\u0434\u0430", fieldName: "confirmationIncome", input: input }));
3915
+ const filledByEsia = isEsiaAuthorize(field, input);
3916
+ return (jsxs("div", { className: "space-y-xl", children: [filledByEsia ? (jsx(InfoCard, { __html: "\u0414\u043B\u044F \u0432\u044B\u0431\u043E\u0440\u0430 \u0438\u043D\u043E\u0433\u043E \u0441\u043F\u043E\u0441\u043E\u0431\u0430 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F \u0434\u043E\u0445\u043E\u0434\u0430, \u043E\u0444\u043E\u0440\u043C\u0438\u0442\u0435 \u043D\u043E\u0432\u0443\u044E \u0437\u0430\u044F\u0432\u043A\u0443 \u043D\u0430 \u043A\u0440\u0435\u0434\u0438\u0442 \u0431\u0435\u0437 \u0430\u0432\u0442\u043E\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043D\u0430 \u043F\u043E\u0440\u0442\u0430\u043B\u0435 \u0413\u043E\u0441\u0443\u0441\u043B\u0443\u0433\u0438" })) : null, jsx(SelectField, { field: field, source: confirmationIncome, label: "\u0421\u043F\u043E\u0441\u043E\u0431 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F \u0434\u043E\u0445\u043E\u0434\u0430", fieldName: "confirmationIncome", input: input, disabled: filledByEsia })] }));
3900
3917
  });
3901
3918
 
3902
3919
  const ConscriptionField = JSX(({ field, input }) => {
@@ -4237,12 +4254,12 @@
4237
4254
  });
4238
4255
  const renderCreditParamsForm$1 = (params, field) => (jsxs("div", { className: "flex flex-col gap-y-2xl", children: [params.isShowSalaryClient ? (jsx(Checkbox, { text: `Получаю зарплату на счёт\nв Россельхозбанке`, ...field('isSalaryClient'), value: params.isSalaryClient, className: "whitespace-pre-line sm:whitespace-normal" })) : null, params.isShowStateEmployee ? (jsx(Checkbox, { text: "\u0420\u0430\u0431\u043E\u0442\u0430\u044E \u0432 \u0431\u044E\u0434\u0436\u0435\u0442\u043D\u043E\u0439 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", ...field('isStateEmployee'), value: params.isStateEmployee })) : null, params.isShowPensionClient ? (jsx(Checkbox, { text: "\u041F\u043E\u043B\u0443\u0447\u0430\u044E \u043F\u0435\u043D\u0441\u0438\u044E \u043D\u0430 \u043A\u0430\u0440\u0442\u0443 \u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A\u0430", ...field('isPensionClient'), value: params.isPensionClient })) : null, params.isShowInsurance ? (jsx(Checkbox, { text: "\u041A\u043E\u043C\u043F\u043B\u0435\u043A\u0441\u043D\u0430\u044F \u0441\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u044F \u0437\u0430\u0449\u0438\u0442\u0430", ...field('isInsurance'), value: params.isInsurance })) : null] }));
4239
4256
 
4240
- const FIELD_NAME$1 = 'calculator';
4257
+ const FIELD_NAME = 'calculator';
4241
4258
  const CreditCalcField = JSX(({ field, params }) => {
4242
4259
  const handleChange = useCallback((_) => {
4243
- field(FIELD_NAME$1).onChange?.(_);
4260
+ field(FIELD_NAME).onChange?.(_);
4244
4261
  }, []);
4245
- return (jsx(CalculatorCredit, { ...params?.calcData, padding: "p-0", defaultParams: defaultValueAdapter(field(FIELD_NAME$1).value), onChange: handleChange }));
4262
+ return (jsx(CalculatorCredit, { ...params?.calcData, padding: "p-0", defaultParams: defaultValueAdapter(field(FIELD_NAME).value), onChange: handleChange }));
4246
4263
  });
4247
4264
  const PARAMS_MAP = {
4248
4265
  moneyValue: 'sum',
@@ -4440,7 +4457,7 @@
4440
4457
  }
4441
4458
  })();
4442
4459
  }, [employerActivities, employerOrganization, organization, amountWorkers]);
4443
- return (jsx(DaDataInputControl, { label: "\u0418\u041D\u041D", isInteger: true, maxLength: 12, ...input, ...field(input?.name ?? ''), onDaDataChange: onDaDataChange }));
4460
+ return (jsx(DaDataInputControl, { label: "\u0418\u041D\u041D", isInteger: true, maxLength: 12, ...input, ...field(input?.name ?? ''), onDaDataChange: onDaDataChange, disabled: isEsiaAuthorize(field, input) }));
4444
4461
  });
4445
4462
 
4446
4463
  const DeliveryDateFiels = JSX(({ field, input }) => (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438", ...field(input?.name ?? ''), minDate: new Date() })));
@@ -4459,7 +4476,7 @@
4459
4476
  const DulIssueDateField = JSX(({ field, input }) => {
4460
4477
  const birthDate = field('limitedBirthday')?.value;
4461
4478
  const startDulIssueDate = useMemo(() => new Date(birthDate?.getFullYear() + 14, birthDate?.getMonth(), birthDate?.getDate()), [birthDate]);
4462
- 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 }));
4479
+ return (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0432\u044B\u0434\u0430\u0447\u0438", ...field(input?.name ?? ''), disabled: isEsiaAuthorize(field, input), minDate: startDulIssueDate }));
4463
4480
  });
4464
4481
 
4465
4482
  const DulIssuedByField = JSX(({ field, input }) => {
@@ -4467,18 +4484,18 @@
4467
4484
  const onDaDataChange = useCallback((item) => {
4468
4485
  changeDulSubdivisionCode?.(item?.data?.code?.replace('-', ''));
4469
4486
  }, []);
4470
- return (jsx(DaDataInputControl, { disabled: input?.filledByEsia && isEsiaAuthorize(field, input?.name ?? ''), label: "\u041A\u0435\u043C \u0432\u044B\u0434\u0430\u043D", ...input, ...field(input?.name ?? ''), onDaDataChange: onDaDataChange, daDataQueryPrefix: dulSubdivisionCode }));
4487
+ return (jsx(DaDataInputControl, { disabled: isEsiaAuthorize(field, input), label: "\u041A\u0435\u043C \u0432\u044B\u0434\u0430\u043D", ...input, ...field(input?.name ?? ''), onDaDataChange: onDaDataChange, daDataQueryPrefix: dulSubdivisionCode }));
4471
4488
  });
4472
4489
 
4473
- const DulNumberField = JSX(({ field, input }) => (jsx(DaDataInputControl, { disabled: input?.filledByEsia && isEsiaAuthorize(field, input.name ?? ''), label: "\u041D\u043E\u043C\u0435\u0440 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430", isInteger: true, maxLength: 6, ...field(input?.name ?? '') })));
4490
+ const DulNumberField = JSX(({ field, input }) => (jsx(DaDataInputControl, { disabled: isEsiaAuthorize(field, input), label: "\u041D\u043E\u043C\u0435\u0440 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430", isInteger: true, maxLength: 6, ...field(input?.name ?? '') })));
4474
4491
 
4475
- const DulSerieField = JSX(({ field, input }) => (jsx(DaDataInputControl, { disabled: input?.filledByEsia && isEsiaAuthorize(field, input.name ?? ''), label: "\u0421\u0435\u0440\u0438\u044F \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430", isInteger: true, maxLength: 4, ...field(input?.name ?? '') })));
4492
+ const DulSerieField = JSX(({ field, input }) => (jsx(DaDataInputControl, { disabled: isEsiaAuthorize(field, input), label: "\u0421\u0435\u0440\u0438\u044F \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430", isInteger: true, maxLength: 4, ...field(input?.name ?? '') })));
4476
4493
 
4477
4494
  const DulSubdivisionCodeField = JSX(({ field, input }) => {
4478
4495
  const onDaDataChange = useCallback((item) => {
4479
4496
  field?.('dulIssuedBy')?.onChange?.(item?.data?.name);
4480
4497
  }, []);
4481
- return (jsx(DaDataInputControl, { disabled: input?.filledByEsia && isEsiaAuthorize(field, input.name ?? ''), label: "\u041A\u043E\u0434 \u043F\u043E\u0434\u0440\u0430\u0437\u0434\u0435\u043B\u0435\u043D\u0438\u044F", isInteger: true, maxLength: 6, ...input, ...field(input?.name ?? ''), onDaDataChange: onDaDataChange }));
4498
+ return (jsx(DaDataInputControl, { disabled: isEsiaAuthorize(field, input), label: "\u041A\u043E\u0434 \u043F\u043E\u0434\u0440\u0430\u0437\u0434\u0435\u043B\u0435\u043D\u0438\u044F", isInteger: true, maxLength: 6, ...input, ...field(input?.name ?? ''), onDaDataChange: onDaDataChange }));
4482
4499
  });
4483
4500
 
4484
4501
  const EducationField = JSX(({ field, input }) => {
@@ -4523,7 +4540,7 @@
4523
4540
  const MIN_YEARS = 0;
4524
4541
  const Experience5YearsField = JSX(({ field, input }) => {
4525
4542
  const onChange = useCallback((value) => field(input?.name ?? '')?.onChange?.(String(clamp(Number(value), MIN_YEARS, MAX_YEARS))), []);
4526
- return (jsx(DaDataInputControl, { label: "\u0421\u0442\u0430\u0436", placeholder: "\u0417\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435 5 \u043B\u0435\u0442", type: "number", ...field(input?.name ?? ''), ...input, onChange: onChange }));
4543
+ return (jsx(DaDataInputControl, { label: "\u0421\u0442\u0430\u0436", placeholder: "\u0417\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435 5 \u043B\u0435\u0442", type: "number", ...field(input?.name ?? ''), ...input, onChange: onChange, disabled: isEsiaAuthorize(field, input) }));
4527
4544
  });
4528
4545
 
4529
4546
  const FamilyMembersField = JSX(({ field, input }) => {
@@ -4544,7 +4561,7 @@
4544
4561
  return (jsx(SelectField, { field: field, source: familyStatus, label: "\u0421\u0435\u043C\u0435\u0439\u043D\u043E\u0435 \u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0435", fieldName: "familyStatus", input: input }));
4545
4562
  });
4546
4563
 
4547
- const GeneralSeniorityField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u041E\u0431\u0449\u0438\u0439 \u0441\u0442\u0430\u0436", type: "number", maxLength: 2, placeholder: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043B\u0435\u0442", ...field(input?.name ?? ''), ...input })));
4564
+ const GeneralSeniorityField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u041E\u0431\u0449\u0438\u0439 \u0441\u0442\u0430\u0436", type: "number", maxLength: 2, placeholder: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043B\u0435\u0442", ...field(input?.name ?? ''), ...input, disabled: isEsiaAuthorize(field, input) })));
4548
4565
 
4549
4566
  const HousingField = JSX(({ field, input }) => {
4550
4567
  const { data: housing } = useLeadFormData('HOUSE_TYPE');
@@ -4553,9 +4570,9 @@
4553
4570
 
4554
4571
  const InfoCardField = JSX(({ input }) => (jsx(InfoCard, { __html: input?.label })));
4555
4572
 
4556
- const JobsNumberField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043C\u0435\u0441\u0442 \u0440\u0430\u0431\u043E\u0442\u044B \u0437\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435 5 \u043B\u0435\u0442", placeholder: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043C\u0435\u0441\u0442", isInteger: true, maxLength: 2, ...field(input?.name ?? ''), ...input })));
4573
+ const JobsNumberField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043C\u0435\u0441\u0442 \u0440\u0430\u0431\u043E\u0442\u044B \u0437\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435 5 \u043B\u0435\u0442", placeholder: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043C\u0435\u0441\u0442", isInteger: true, maxLength: 2, ...field(input?.name ?? ''), ...input, disabled: isEsiaAuthorize(field, input) })));
4557
4574
 
4558
- const LastJobExperienceField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u0421\u0442\u0430\u0436 \u043D\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u043C \u0440\u0430\u0431\u043E\u0447\u0435\u043C \u043C\u0435\u0441\u0442\u0435", placeholder: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043B\u0435\u0442", type: "number", maxLength: 2, ...field(input?.name ?? ''), ...input })));
4575
+ const LastJobExperienceField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u0421\u0442\u0430\u0436 \u043D\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u043C \u0440\u0430\u0431\u043E\u0447\u0435\u043C \u043C\u0435\u0441\u0442\u0435", placeholder: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043B\u0435\u0442", type: "number", maxLength: 2, ...field(input?.name ?? ''), ...input, disabled: isEsiaAuthorize(field, input) })));
4559
4576
 
4560
4577
  const latinPattern = /^[\u0041-\u005A\u0061-\u007A\s]+$/u;
4561
4578
  const isLatin = (_ = '') => latinPattern.test(_);
@@ -4676,7 +4693,7 @@
4676
4693
 
4677
4694
  const LegalFormField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u041E\u041F\u0424", placeholder: "\u041E\u041E\u041E, \u041F\u0410\u041E \u0438 \u0434\u0440.", ...field(input?.name ?? ''), ...input })));
4678
4695
 
4679
- const LimitedBirthdayField = JSX(({ field, input }) => (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0440\u043E\u0436\u0434\u0435\u043D\u0438\u044F", ...field(input?.name ?? ''), disabled: input?.filledByEsia && isEsiaAuthorize(field, input.name ?? '') })));
4696
+ const LimitedBirthdayField = JSX(({ field, input }) => (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0440\u043E\u0436\u0434\u0435\u043D\u0438\u044F", ...field(input?.name ?? ''), disabled: isEsiaAuthorize(field, input) })));
4680
4697
 
4681
4698
  const MandatoryPaymentsField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u041E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u044B\u0435 \u0432\u044B\u043F\u043B\u0430\u0442\u044B", placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435", isInteger: true, ...field(input?.name ?? ''), ...input })));
4682
4699
 
@@ -4692,7 +4709,7 @@
4692
4709
  field('middleName')?.onChange?.(value);
4693
4710
  }
4694
4711
  }, [field]);
4695
- return (jsx(DaDataInputControl, { label: "\u041E\u0442\u0447\u0435\u0441\u0442\u0432\u043E (\u041E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E, \u043F\u0440\u0438 \u043D\u0430\u043B\u0438\u0447\u0438\u0438)", maxLength: 60, disabled: input?.filledByEsia && isEsiaAuthorize(field, input?.name ?? ''), ...field(input?.name ?? ''), ...input, onChange: onChange }));
4712
+ return (jsx(DaDataInputControl, { label: "\u041E\u0442\u0447\u0435\u0441\u0442\u0432\u043E (\u041E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E, \u043F\u0440\u0438 \u043D\u0430\u043B\u0438\u0447\u0438\u0438)", maxLength: 60, disabled: isEsiaAuthorize(field, input), ...field(input?.name ?? ''), ...input, onChange: onChange }));
4696
4713
  });
4697
4714
 
4698
4715
  const NameField = JSX(({ field, input }) => {
@@ -4701,7 +4718,7 @@
4701
4718
  field('name')?.onChange?.(value);
4702
4719
  }
4703
4720
  }, [field]);
4704
- return (jsx(DaDataInputControl, { label: "\u0418\u043C\u044F", maxLength: 60, disabled: input?.filledByEsia && isEsiaAuthorize(field, input.name ?? ''), ...field(input?.name ?? ''), ...input, onChange: onChange }));
4721
+ return (jsx(DaDataInputControl, { label: "\u0418\u043C\u044F", maxLength: 60, disabled: isEsiaAuthorize(field, input), ...field(input?.name ?? ''), ...input, onChange: onChange }));
4705
4722
  });
4706
4723
 
4707
4724
  const OrganizationField = JSX(({ field, input }) => {
@@ -4721,7 +4738,7 @@
4721
4738
  field?.('inn')?.onChange?.(item.data?.inn);
4722
4739
  updateOrganizationFields(store, field, item);
4723
4740
  }, []);
4724
- return (jsx(DaDataInputControl, { label: "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", ...input, ...field(input?.name ?? ''), onDaDataChange: onDaDataChange }));
4741
+ return (jsx(DaDataInputControl, { label: "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", ...input, ...field(input?.name ?? ''), disabled: isEsiaAuthorize(field, input), onDaDataChange: onDaDataChange }));
4725
4742
  });
4726
4743
 
4727
4744
  const OtherIncomeField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u0418\u043D\u044B\u0435 \u0434\u043E\u0445\u043E\u0434\u044B", placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435", isInteger: true, ...field(input?.name ?? ''), ...input })));
@@ -4856,19 +4873,18 @@
4856
4873
 
4857
4874
  const SnilsField = JSX(({ field, input }) => (jsx(InputSnilsControl, { label: "\u0421\u041D\u0418\u041B\u0421", maxLength: 14, ...field(input?.name ?? ''), ...input })));
4858
4875
 
4859
- const FIELD_NAME = 'surname';
4860
4876
  const SurnameField = JSX(({ field, input }) => {
4861
4877
  const onChange = useCallback((value) => {
4862
4878
  if (retailCyrillicPattern.test(value) || value.length === 0) {
4863
4879
  field('surname')?.onChange?.(value);
4864
4880
  }
4865
4881
  }, [field]);
4866
- return (jsx(DaDataInputControl, { label: "\u0424\u0430\u043C\u0438\u043B\u0438\u044F", maxLength: 60, disabled: input?.filledByEsia && isEsiaAuthorize(field, FIELD_NAME), ...field(input?.name ?? ''), ...input, onChange: onChange }));
4882
+ return (jsx(DaDataInputControl, { label: "\u0424\u0430\u043C\u0438\u043B\u0438\u044F", maxLength: 60, disabled: isEsiaAuthorize(field, input), ...field(input?.name ?? ''), ...input, onChange: onChange }));
4867
4883
  });
4868
4884
 
4869
4885
  const TotalIncomeField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u0421\u043E\u0432\u043E\u043A\u0443\u043F\u043D\u044B\u0439 \u043E\u0444\u0438\u0446\u0438\u0430\u043B\u044C\u043D\u044B\u0439 \u0434\u043E\u0445\u043E\u0434 \u0432 \u043C\u0435\u0441\u044F\u0446 \u043F\u043E\u0441\u043B\u0435 \u0432\u044B\u0447\u0435\u0442\u0430 \u043D\u0430\u043B\u043E\u0433\u043E\u0432 (\u0437\u0430\u0440\u043F\u043B\u0430\u0442\u0430, \u043F\u0440\u0435\u043C\u0438\u0438)", placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435", isInteger: true, ...field(input?.name ?? ''), ...input })));
4870
4886
 
4871
- const WagesField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u0421\u043E\u0432\u043E\u043A\u0443\u043F\u043D\u044B\u0439 \u0434\u043E\u0445\u043E\u0434 \u0432 \u043C\u0435\u0441\u044F\u0446 \u043F\u043E\u0441\u043B\u0435 \u0432\u044B\u0447\u0435\u0442\u0430 \u043D\u0430\u043B\u043E\u0433\u043E\u0432 (\u0437\u0430\u0440\u043F\u043B\u0430\u0442\u0430, \u043F\u0440\u0435\u043C\u0438\u0438)", placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435", isInteger: true, ...field(input?.name ?? ''), ...input })));
4887
+ const WagesField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u0421\u043E\u0432\u043E\u043A\u0443\u043F\u043D\u044B\u0439 \u0434\u043E\u0445\u043E\u0434 \u0432 \u043C\u0435\u0441\u044F\u0446 \u043F\u043E\u0441\u043B\u0435 \u0432\u044B\u0447\u0435\u0442\u0430 \u043D\u0430\u043B\u043E\u0433\u043E\u0432 (\u0437\u0430\u0440\u043F\u043B\u0430\u0442\u0430, \u043F\u0440\u0435\u043C\u0438\u0438)", placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435", isInteger: true, ...field(input?.name ?? ''), ...input, disabled: isEsiaAuthorize(field, input) })));
4872
4888
 
4873
4889
  const DELIVERY_CITIES_REF = {
4874
4890
  $ref: '/wcms-resources/delivery-cities-data.json',
@@ -5498,7 +5514,7 @@
5498
5514
  const participant = task.participants[0];
5499
5515
  const { classCard: cardCategory, codeWord, paymentSystemTypeCd: paymentSystem, currencyCode: currency, } = task;
5500
5516
  const { loanAmount: moneyValue, creditPeriod: monthsValue, paymentTypeCd } = task;
5501
- const { birthDate: limitedBirthday, midname: middleName, name, surname, birthPlace, dulIssueDate: dulIssueDate, dulIssuedBy, dulNumber, dulSerie, dulSubdivisionCode, educationLevelCd: education, registrationDate: participantDateRegistration, houseTypeCd: housing, genderCd, participantContacts = [], participantAddresses = [], employmentContractDate: beginDate, employmentTypeCd: employment, organizationName, organizationInn: inn, organizationActivityTypeCd: employerActivities, organizationTypeCd: organization, organizationKindCd: employerOrganization, employeesNumberCd: amountWorkers, opf: legalForm, seniority: generalSeniority, generalSeniority: experience5Years, jobsNumber, lastWorkDuration: lastJobExperience, positionCd: positionOrganization, maritalStatusCd: familyStatus, childrenDependents: children, totalDependents: familyMembers, otherDependents: dependents, militaryStatusCd: conscription, participantIncomes, snils, armyIdFlg, bankruptcyFlg, shareholderFlg, nameLegalEntity: legalEntityName, creditInRshbCd, payrollCardRshbFlg: isInsurance, consentInsuranceFlg: isSalaryClient, incomeCertificateCd, } = participant;
5517
+ const { birthDate: limitedBirthday, midname: middleName, name, surname, birthPlace, dulIssueDate: dulIssueDate, dulIssuedBy, dulNumber, dulSerie, dulSubdivisionCode, educationLevelCd: education, registrationDate: participantDateRegistration, houseTypeCd: housing, genderCd, participantContacts = [], participantAddresses = [], employmentContractDate: beginDate, employmentTypeCd: employment, organizationName, organizationInn: inn, organizationActivityTypeCd: employerActivities, organizationTypeCd: organization, organizationKindCd: employerOrganization, employeesNumberCd: amountWorkers, opf: legalForm, seniority: generalSeniority, generalSeniority: experience5Years, jobsNumber, lastWorkDuration: lastJobExperience, positionCd: positionOrganization, maritalStatusCd: familyStatus, childrenDependents: children, totalDependents: familyMembers, otherDependents: dependents, militaryStatusCd: conscription, participantIncomes, snils, armyIdFlg, bankruptcyFlg, shareholderFlg, nameLegalEntity: legalEntityName, creditInRshbCd, payrollCardRshbFlg: isInsurance, consentInsuranceFlg: isSalaryClient, incomeCertificateCd, profile, } = participant;
5502
5518
  return {
5503
5519
  currency: currency?.key,
5504
5520
  paymentSystem: getSelectValue(paymentSystem),
@@ -5550,6 +5566,7 @@
5550
5566
  monthsValue,
5551
5567
  isAnnuity: paymentTypeCd?.key === 'ANNUITY',
5552
5568
  },
5569
+ esiaAccountTypeCd: profile?.esiaAccountTypeCd,
5553
5570
  ...getParticipantIncomes(participantIncomes),
5554
5571
  ...getParticipantAddresses(participantAddresses),
5555
5572
  ...getParticipantContacts(participantContacts),
@@ -5604,39 +5621,6 @@
5604
5621
  };
5605
5622
  };
5606
5623
 
5607
- const getLink = (body) => fetchRetailJSON('/esia/getLink', 'POST', body);
5608
-
5609
- const EsiaLoginDialog = JSX(({ onClose }) => {
5610
- const navigator = locationNavigator();
5611
- const retailFormStore = useRetailFormStore();
5612
- const handleAuth = useCallback(async () => {
5613
- const resp = await getLink({
5614
- redirectUri: globalThis.location.origin + globalThis.location.pathname,
5615
- });
5616
- if (resp?.link) {
5617
- navigator.assign(resp.link);
5618
- globalThis.location.href = resp.link;
5619
- }
5620
- }, []);
5621
- const handleClose = useCallback(() => {
5622
- if (retailFormStore.leadForm) {
5623
- const leadForm = { ...retailFormStore.leadForm };
5624
- delete leadForm.esiaAccountTypeCd;
5625
- retailFormStore.leadForm = leadForm;
5626
- }
5627
- onClose?.();
5628
- }, []);
5629
- 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" })] })] }) }));
5630
- });
5631
-
5632
- const useEsiaLoginDialog = (nextStepLink) => {
5633
- const { open } = useDialog(EsiaLoginDialog);
5634
- const navigator = locationNavigator();
5635
- return useCallback(() => {
5636
- open({ onClose: () => navigator.assign(nextStepLink) });
5637
- }, [open, nextStepLink]);
5638
- };
5639
-
5640
5624
  // TODO Не должно быть импортов из бизнес-слоя в API слой. Только наоборот.
5641
5625
  const getUpdateUserProfileData = (profileId, formData, consents) => {
5642
5626
  const { name = '', surname = '', middleName = '', limitedBirthday = '', phone = '', email = '', } = formData;
@@ -5758,79 +5742,80 @@
5758
5742
 
5759
5743
  /* eslint-disable max-lines */
5760
5744
  // eslint-disable-next-line max-lines-per-function
5761
- const useApplicationLeadApi = ({ programId, nextStepLink, productType, esiaError, data, }) => {
5745
+ const useApplicationLeadApi = ({ programId, nextStepLink, productType, data, }) => {
5762
5746
  const [isSending, { setTrue: startSending, setFalse: endSending }] = useBool(false);
5763
5747
  const [ok, setOK] = useState();
5764
5748
  const saveUserData = useSaveUserData();
5765
5749
  const sendAspects = useSendLeadFormAspects({ data });
5766
5750
  const navigator = locationNavigator();
5767
- const openEsiaLoginDialog = useEsiaLoginDialog(nextStepLink);
5768
- const consentBkiDialog = useConsentBkiDialog(openEsiaLoginDialog);
5751
+ const goToNextStep = useCallback(() => {
5752
+ navigator.assign(nextStepLink);
5753
+ }, []);
5754
+ const consentBkiDialog = useConsentBkiDialog(goToNextStep);
5769
5755
  const verifyPhoneDialog = useDialog(VerifyPhoneDialog);
5770
5756
  const draftDialog = useDraftDialog();
5771
5757
  const handleSubmit = useCallback(async (formData) => {
5772
- if (esiaError) {
5773
- navigator.assign(nextStepLink);
5774
- return;
5775
- }
5776
5758
  try {
5777
5759
  startSending();
5778
5760
  const transformedFormData = transformFormData(formData);
5779
5761
  const profileId = await createUserProfile({
5780
5762
  profile: { phone: formatPhone(transformedFormData.phone) },
5781
5763
  });
5782
- if (profileId && transformedFormData?.phone) {
5783
- const sendCurrentTask = async () => {
5784
- await updateUserData({
5785
- programId,
5786
- profileId,
5787
- formData: transformedFormData,
5788
- productType,
5789
- saveUserData,
5790
- sendAspects,
5791
- });
5792
- verifyPhoneDialog.close();
5793
- if (productType === 'debitCard') {
5794
- openEsiaLoginDialog();
5764
+ if (!profileId) {
5765
+ throw new Error();
5766
+ }
5767
+ const sendCurrentTask = async () => {
5768
+ await updateUserData({
5769
+ programId,
5770
+ profileId,
5771
+ formData: transformedFormData,
5772
+ productType,
5773
+ saveUserData,
5774
+ sendAspects,
5775
+ });
5776
+ verifyPhoneDialog.close();
5777
+ if (productType === 'debitCard') {
5778
+ goToNextStep();
5779
+ }
5780
+ else {
5781
+ consentBkiDialog.open(transformedFormData.phone, profileId);
5782
+ }
5783
+ };
5784
+ const handleSuccessVerify = async () => {
5785
+ try {
5786
+ const lastTaskId = await getLastTaskStatus({ profileId, programId });
5787
+ if (lastTaskId) {
5788
+ const task = await getTaskById({ taskId: lastTaskId });
5789
+ verifyPhoneDialog.close();
5790
+ draftDialog.open({
5791
+ task,
5792
+ isFromLead: true,
5793
+ sendAspects,
5794
+ onClose: sendCurrentTask,
5795
+ });
5795
5796
  }
5796
5797
  else {
5797
- consentBkiDialog.open(transformedFormData.phone, profileId);
5798
+ await sendCurrentTask();
5798
5799
  }
5799
- };
5800
- const handleSuccessVerify = async () => {
5801
- try {
5802
- const lastTaskId = await getLastTaskStatus({ profileId, programId });
5803
- if (lastTaskId) {
5804
- const task = await getTaskById({ taskId: lastTaskId });
5805
- verifyPhoneDialog.close();
5806
- draftDialog.open({
5807
- task,
5808
- isFromLead: true,
5809
- sendAspects,
5810
- onClose: sendCurrentTask,
5811
- });
5812
- }
5813
- else {
5814
- await sendCurrentTask();
5815
- }
5816
- }
5817
- catch {
5818
- setOK(false);
5819
- }
5820
- };
5821
- const acceptedConsents = getAcceptedConsents(formData, productType);
5822
- verifyPhoneDialog.open({
5823
- phone: transformedFormData?.phone,
5824
- consents: acceptedConsents,
5825
- onSuccess: handleSuccessVerify,
5826
- });
5827
- endSending();
5828
- }
5800
+ }
5801
+ catch {
5802
+ setOK(false);
5803
+ }
5804
+ };
5805
+ const acceptedConsents = getAcceptedConsents(transformedFormData, productType);
5806
+ verifyPhoneDialog.open({
5807
+ phone: transformedFormData.phone,
5808
+ consents: acceptedConsents,
5809
+ onSuccess: handleSuccessVerify,
5810
+ });
5829
5811
  }
5830
5812
  catch {
5831
5813
  setOK(false);
5832
5814
  }
5833
- }, [esiaError]);
5815
+ finally {
5816
+ endSending();
5817
+ }
5818
+ }, []);
5834
5819
  return { isSending, ok, handleSubmit };
5835
5820
  };
5836
5821
  const getAcceptedConsents = (formData, productType) => {
@@ -5919,7 +5904,10 @@
5919
5904
  }
5920
5905
  }, [target, key]);
5921
5906
 
5922
- const updateProfileEsia = (body) => fetchRetailJSON('/esia/updateProfileEsia', 'POST', body);
5907
+ const esiaRequestProfile = (body) => fetchRetailJSON('/esia/requestProfile', 'POST', body).then((res) => {
5908
+ saveToken(res);
5909
+ return res;
5910
+ });
5923
5911
 
5924
5912
  const initialFormState = {
5925
5913
  surname: '',
@@ -5937,19 +5925,24 @@
5937
5925
  consentPhotoFlg: false,
5938
5926
  consentFATCA: false,
5939
5927
  };
5940
- const getInitialFormState$1 = (inputs, savedForm) => {
5928
+ const getInitialFormState$1 = (inputs, savedForm, esiaAuthSuccess) => {
5941
5929
  if (savedForm) {
5942
- return { ...savedForm, limitedBirthday: new Date(savedForm?.limitedBirthday || 0) };
5930
+ return {
5931
+ ...savedForm,
5932
+ limitedBirthday: new Date(savedForm?.limitedBirthday || 0),
5933
+ ...(!esiaAuthSuccess && {
5934
+ esiaAccountTypeCd: { key: '' },
5935
+ }),
5936
+ };
5943
5937
  }
5944
5938
  const formState = Object.fromEntries(inputs.map((_) => [_.name, initialFormState[_.name || '']]));
5945
5939
  return { ...formState };
5946
5940
  };
5947
5941
 
5948
- const uploadFile = async (file, taskId, documentCategory) => {
5942
+ const uploadFile = async (file, documentCategory, isPDF = false) => {
5949
5943
  const fd = new FormData();
5950
- fd.append('taskId', taskId);
5951
5944
  fd.append('documentCategory', documentCategory);
5952
- fd.append('file', file, 'file.pdf');
5945
+ fd.append('file', file, `file.${isPDF ? 'pdf' : 'xml'}`);
5953
5946
  const res = await globalThis
5954
5947
  ?.fetch?.(`/light-api-cash/v1/file`, {
5955
5948
  method: 'POST',
@@ -5963,23 +5956,13 @@
5963
5956
  return res;
5964
5957
  };
5965
5958
 
5966
- const parseEsiaProfile = async (esiaProfile, taskId, isDebit) => {
5967
- isDebit ? checkEsiaDataForDebit(esiaProfile) : checkEsiaDataForCredit(esiaProfile);
5959
+ const parseEsiaProfile = async (esiaProfile, isDebit) => {
5960
+ checkEsiaData(esiaProfile);
5961
+ const isFullEsiaData = !isDebit && checkEsiaAdditionalDocument(esiaProfile);
5968
5962
  const { profile, addInfo, document, addressRegistration, addressFact, esiaAdditionalDocument } = esiaProfile;
5969
- const files = [];
5970
- if (!isDebit) {
5971
- await saveDocument({
5972
- document: esiaAdditionalDocument.pdfFileWorkbook,
5973
- taskId,
5974
- category: 'CONFIRMING_INCOME_DOC',
5975
- files,
5976
- });
5977
- await saveDocument({
5978
- document: esiaAdditionalDocument.pdfFilePayout,
5979
- taskId,
5980
- category: 'CONFIRMING_EMPLOYMENT_DOC',
5981
- files,
5982
- });
5963
+ let files = [];
5964
+ if (isFullEsiaData) {
5965
+ files = await saveDocuments(esiaAdditionalDocument);
5983
5966
  }
5984
5967
  const mainData = {
5985
5968
  name: profile.name,
@@ -5996,11 +5979,11 @@
5996
5979
  birthPlace: addInfo.birthPlace,
5997
5980
  addressRegistration: buildAddress(addressRegistration),
5998
5981
  addressFact: buildAddress(addressFact),
5999
- esiaAccountTypeCd: profile.esiaAccountType,
5982
+ esiaAccountTypeCd: isDebit ? profile.esiaAccountType : { key: '' },
6000
5983
  };
6001
5984
  return {
6002
5985
  ...mainData,
6003
- ...(!isDebit && {
5986
+ ...(isFullEsiaData && {
6004
5987
  snils: addInfo.snils,
6005
5988
  inn: esiaAdditionalDocument.inn,
6006
5989
  wages: Math.floor(esiaAdditionalDocument.averageMonthlyIncome)?.toString(),
@@ -6009,6 +5992,9 @@
6009
5992
  generalSeniority: getYearFromMonth(esiaAdditionalDocument.workLength).toString(),
6010
5993
  lastJobExperience: getYearFromMonth(esiaAdditionalDocument.workLengthLastJob).toString(),
6011
5994
  jobsNumber: esiaAdditionalDocument.jobsNumberInFiveYears.toString(),
5995
+ esiaAccountTypeCd: profile.esiaAccountType,
5996
+ confirmationIncome: { key: 'SFR_CERTIFICATE', text: 'Запрос Банком доходов из СФР' },
5997
+ employment: { key: 'WORK', text: 'Работаю' },
6012
5998
  files,
6013
5999
  }),
6014
6000
  };
@@ -6041,43 +6027,60 @@
6041
6027
  };
6042
6028
  };
6043
6029
  const getYearFromMonth = (month) => Math.floor(month / 12);
6044
- const saveDocument = async ({ document, taskId, category, files, }) => {
6045
- await fetch(`data:application/pdf;base64,${document}`)
6046
- .then((res) => res.blob())
6047
- .then((value) => uploadFile(value, taskId, category))
6048
- .then((file) => files.push(file));
6049
- };
6050
- const checkEsiaDataForCredit = (esiaProfile) => {
6051
- const { profile, document, addressRegistration, esiaAdditionalDocument } = esiaProfile;
6052
- const data = [
6053
- profile.name,
6054
- profile.surname,
6055
- profile.midname,
6056
- profile.birthDate,
6057
- profile.phone,
6058
- profile.email,
6059
- document.dulIssueDate,
6060
- document.dulIssuedBy,
6061
- document.dulNumber,
6062
- document.dulSerie,
6063
- document.dulSubdivisionCode,
6064
- addressRegistration,
6065
- profile.esiaAccountType,
6066
- esiaAdditionalDocument.inn,
6067
- esiaAdditionalDocument.averageMonthlyIncome.toString(),
6068
- esiaAdditionalDocument.startWorkDate,
6069
- esiaAdditionalDocument.workLengthInFiveYears.toString(),
6070
- esiaAdditionalDocument.workLength.toString(),
6071
- esiaAdditionalDocument.workLengthLastJob.toString(),
6072
- esiaAdditionalDocument.jobsNumberInFiveYears.toString(),
6073
- esiaAdditionalDocument.pdfFilePayout,
6074
- esiaAdditionalDocument.pdfFileWorkbook,
6030
+ const saveDocuments = async (esiaAdditionalDocument) => {
6031
+ const files = [];
6032
+ const documents = [
6033
+ {
6034
+ file: esiaAdditionalDocument.pdfFileWorkbook,
6035
+ category: 'CONFIRMING_INCOME_DOC',
6036
+ isPDF: true,
6037
+ },
6038
+ {
6039
+ file: esiaAdditionalDocument.pdfFilePayout,
6040
+ category: 'CONFIRMING_EMPLOYMENT_DOC',
6041
+ isPDF: true,
6042
+ },
6043
+ {
6044
+ file: esiaAdditionalDocument.pdfFileSigPayout,
6045
+ category: 'CONFIRMING_EMPLOYMENT_DOC',
6046
+ isPDF: true,
6047
+ },
6048
+ {
6049
+ file: esiaAdditionalDocument.xmlFilePayout,
6050
+ category: 'CONFIRMING_EMPLOYMENT_DOC',
6051
+ isPDF: false,
6052
+ },
6053
+ {
6054
+ file: esiaAdditionalDocument.xmlFileSigPayout,
6055
+ category: 'CONFIRMING_EMPLOYMENT_DOC',
6056
+ isPDF: false,
6057
+ },
6058
+ {
6059
+ file: esiaAdditionalDocument.xmlFileWorkbook,
6060
+ category: 'CONFIRMING_INCOME_DOC',
6061
+ isPDF: false,
6062
+ },
6063
+ {
6064
+ file: esiaAdditionalDocument.pdfFileSigWorkbook,
6065
+ category: 'CONFIRMING_INCOME_DOC',
6066
+ isPDF: true,
6067
+ },
6068
+ {
6069
+ file: esiaAdditionalDocument.xmlFileSigWorkbook,
6070
+ category: 'CONFIRMING_INCOME_DOC',
6071
+ isPDF: false,
6072
+ },
6075
6073
  ];
6076
- if (!data.every((_) => Boolean(_))) {
6077
- throw new Error();
6074
+ for (const doc of documents) {
6075
+ const contentType = doc.isPDF ? 'data:application/pdf;base64' : 'data:application/xml;base64';
6076
+ await fetch(`${contentType},${doc.file}`)
6077
+ .then((res) => res.blob())
6078
+ .then((value) => uploadFile(value, doc.category, doc.isPDF))
6079
+ .then((file) => files.push(file));
6078
6080
  }
6081
+ return files;
6079
6082
  };
6080
- const checkEsiaDataForDebit = (esiaProfile) => {
6083
+ const checkEsiaData = (esiaProfile) => {
6081
6084
  const { profile, document, addressRegistration } = esiaProfile;
6082
6085
  const data = [
6083
6086
  profile.name,
@@ -6085,7 +6088,6 @@
6085
6088
  profile.midname,
6086
6089
  profile.birthDate,
6087
6090
  profile.phone,
6088
- profile.email,
6089
6091
  document.dulIssueDate,
6090
6092
  document.dulIssuedBy,
6091
6093
  document.dulNumber,
@@ -6094,79 +6096,101 @@
6094
6096
  addressRegistration,
6095
6097
  profile.esiaAccountType,
6096
6098
  ];
6097
- if (!data.every((_) => Boolean(_))) {
6099
+ if (!data.every(Boolean)) {
6098
6100
  throw new Error();
6099
6101
  }
6100
6102
  };
6103
+ const checkEsiaAdditionalDocument = (esiaProfile) => {
6104
+ const { esiaAdditionalDocument } = esiaProfile;
6105
+ const data = [
6106
+ esiaAdditionalDocument?.inn,
6107
+ esiaAdditionalDocument?.averageMonthlyIncome?.toString(),
6108
+ esiaAdditionalDocument?.startWorkDate,
6109
+ esiaAdditionalDocument?.workLengthInFiveYears?.toString(),
6110
+ esiaAdditionalDocument?.workLength?.toString(),
6111
+ esiaAdditionalDocument?.workLengthLastJob?.toString(),
6112
+ esiaAdditionalDocument?.jobsNumberInFiveYears?.toString(),
6113
+ esiaAdditionalDocument?.pdfFilePayout,
6114
+ esiaAdditionalDocument?.pdfFileWorkbook,
6115
+ esiaAdditionalDocument?.pdfFileSigPayout,
6116
+ esiaAdditionalDocument?.xmlFilePayout,
6117
+ esiaAdditionalDocument?.xmlFileSigPayout,
6118
+ esiaAdditionalDocument?.xmlFileWorkbook,
6119
+ esiaAdditionalDocument?.pdfFileSigWorkbook,
6120
+ esiaAdditionalDocument?.xmlFileSigWorkbook,
6121
+ ];
6122
+ return data.every(Boolean);
6123
+ };
6101
6124
 
6102
- const useInitApplicationLead = ({ inputs, nextStepLink, productType, setEsiaError, }) => {
6103
- const navigator = locationNavigator();
6104
- const [isLoading, { setTrue: startLoading, setFalse: endLoading }] = useBool(false);
6125
+ const useInitApplicationLead = ({ inputs, productType, setEsiaStatus, esiaAuthSuccess, }) => {
6105
6126
  const leadFormStore = useLeadFormStore();
6106
6127
  const saveForm = useSetter(leadFormStore, 'leadForm');
6107
- const initialFormState = useMemo(() => getInitialFormState$1(inputs, leadFormStore.leadForm), [inputs, leadFormStore.leadForm]);
6108
- const updateEsiaProfile = useCallback(async (profileId, code, state) => {
6109
- startLoading();
6128
+ const initialFormState = useMemo(() => getInitialFormState$1(inputs, leadFormStore.leadForm, esiaAuthSuccess), [inputs, leadFormStore.leadForm]);
6129
+ const requestEsiaProfile = useCallback(async (code, state) => {
6130
+ setEsiaStatus(EsiaStatuses.Pending);
6110
6131
  try {
6111
- const data = await updateProfileEsia({
6112
- profileId,
6132
+ const data = await esiaRequestProfile({
6113
6133
  code,
6114
6134
  state,
6115
6135
  redirectUri: globalThis.location?.href,
6136
+ authorize: true,
6116
6137
  });
6117
- if (data && leadFormStore?.taskId) {
6118
- const parsedData = await parseEsiaProfile(data, leadFormStore.taskId.toString(), productType === 'debitCard');
6138
+ if (data) {
6139
+ const parsedData = await parseEsiaProfile(data, productType === 'debitCard');
6119
6140
  saveForm((_) => ({
6120
6141
  ..._,
6121
6142
  ...parsedData,
6122
6143
  }));
6144
+ setEsiaStatus(EsiaStatuses.Success);
6123
6145
  }
6124
- navigator.assign(nextStepLink);
6125
6146
  }
6126
6147
  catch {
6127
- setEsiaError();
6148
+ setEsiaStatus(EsiaStatuses.Error);
6128
6149
  }
6129
- finally {
6130
- endLoading();
6131
- }
6132
- }, [nextStepLink]);
6150
+ }, []);
6133
6151
  useEffect(() => {
6134
6152
  leadFormStore.productType = productType;
6135
- const profileId = (safeJsonParse(globalThis.localStorage?.getItem('profileId') ?? ''));
6136
6153
  const params = new URLSearchParams(decodeURIComponent(globalThis.location?.search));
6137
6154
  const code = params.get('code');
6138
6155
  const state = params.get('state');
6139
- if (profileId && code && state) {
6140
- updateEsiaProfile(profileId, code, state);
6156
+ if (code && state) {
6157
+ requestEsiaProfile(code, state);
6141
6158
  }
6142
6159
  else {
6143
6160
  sessionStorage.removeItem('accessToken');
6144
6161
  sessionStorage.removeItem('refreshToken');
6145
6162
  }
6146
6163
  }, []);
6147
- return [initialFormState, { isLoading }];
6164
+ return initialFormState;
6148
6165
  };
6149
6166
 
6167
+ var EsiaStatuses;
6168
+ (function (EsiaStatuses) {
6169
+ EsiaStatuses["Success"] = "SUCCESS";
6170
+ EsiaStatuses["Error"] = "ERROR";
6171
+ EsiaStatuses["Pending"] = "PENDING";
6172
+ })(EsiaStatuses || (EsiaStatuses = {}));
6150
6173
  const ApplicationLeadForm = JSX(({ className, title, programId = '', nextStepLink = '/credit-lead', button, productType = 'credit', data, ...rest }) => {
6151
- const [esiaError, { setTrue: setEsiaError }] = useBool(false);
6174
+ const [esiaStatus, setEsiaStatus] = useState();
6175
+ const leadForm = useRef(null);
6152
6176
  const applicationFormData = useMemo(() => getApplicationFormData(productType), [productType]);
6153
6177
  const inputs = useMemo(() => getInputs(applicationFormData), [applicationFormData]);
6154
6178
  const extendedValidatorObj = useMemo(() => getExtendedValidatorObj(productType), [productType]);
6155
6179
  const formValidator = useMemo(() => getFormValidator(inputs, extendedValidatorObj), [inputs, extendedValidatorObj]);
6156
- const [initialFormState, { isLoading }] = useInitApplicationLead({
6180
+ const initialFormState = useInitApplicationLead({
6157
6181
  inputs,
6158
6182
  nextStepLink,
6159
6183
  productType,
6160
- setEsiaError,
6184
+ setEsiaStatus,
6185
+ esiaAuthSuccess: esiaStatus === EsiaStatuses.Success,
6161
6186
  });
6162
6187
  const { isSending, ok, handleSubmit } = useApplicationLeadApi({
6163
6188
  programId,
6164
6189
  nextStepLink,
6165
6190
  productType,
6166
- esiaError,
6167
6191
  data,
6168
6192
  });
6169
- const [, { field, onSubmit }] = useForm(initialFormState, {
6193
+ const [, { field, onSubmit, reset }] = useForm(initialFormState, {
6170
6194
  formValidator,
6171
6195
  onSubmit: handleSubmit,
6172
6196
  });
@@ -6176,7 +6200,17 @@
6176
6200
  responseTypeDialog.open({ ok });
6177
6201
  }
6178
6202
  }, [ok]);
6179
- return (jsx(ApplicationFormLayout, { className: style('container space-y-m', className), title: title, ...rest, children: jsxs("form", { onSubmit: onSubmit, className: "space-y-m relative", children: [isLoading ? jsx(Loader, { blur: false }) : null, applicationFormData.map((_, i) => (jsxs("div", { className: style(inputColumnStyles(_.columns), 'grid gap-x-m'), children: [renderTitle(_.title), renderInputs$1({ field, inputs: _?.inputs }, productType)] }, `section-${i}`))), renderSubmitButton(button, isSending), esiaError ? (jsx(Text, { size: "text-m", font: "font-medium", color: "text-error", children: "\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0413\u043E\u0441\u0443\u0441\u043B\u0443\u0433\u0438 \u0434\u043B\u044F \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u044F \u0437\u0430\u044F\u0432\u043A\u0438 \u043D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E, \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E \u0437\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u044C \u043F\u043E\u043B\u044F \u0432\u0440\u0443\u0447\u043D\u0443\u044E." })) : null] }) }));
6203
+ useEffect(() => {
6204
+ if (esiaStatus && leadForm?.current) {
6205
+ leadForm.current.scrollIntoView({
6206
+ block: 'start',
6207
+ });
6208
+ }
6209
+ if (esiaStatus === EsiaStatuses.Success) {
6210
+ reset();
6211
+ }
6212
+ }, [leadForm?.current, esiaStatus]);
6213
+ return (jsxs(ApplicationFormLayout, { className: style('container space-y-m', className), title: title, ...rest, children: [!esiaStatus ? jsx(EsiaLoginBanner, {}) : null, jsxs("form", { onSubmit: onSubmit, className: "space-y-m relative", ref: leadForm, children: [esiaStatus === EsiaStatuses.Pending ? jsx(Loader, { blur: false }) : null, applicationFormData.map((_, i) => (jsxs("div", { className: style(inputColumnStyles(_.columns), 'grid gap-x-m'), children: [renderTitle(_.title), renderInputs$1({ field, inputs: _?.inputs }, productType)] }, `section-${i}`))), renderSubmitButton(button, isSending), esiaStatus === EsiaStatuses.Error ? (jsx(Text, { size: "text-m", font: "font-medium", color: "text-error", children: "\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0413\u043E\u0441\u0443\u0441\u043B\u0443\u0433\u0438 \u0434\u043B\u044F \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u044F \u0437\u0430\u044F\u0432\u043A\u0438 \u043D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E, \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E \u0437\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u044C \u043F\u043E\u043B\u044F \u0432\u0440\u0443\u0447\u043D\u0443\u044E." })) : null] })] }));
6180
6214
  });
6181
6215
  const getInputs = (applicationFormData) => (applicationFormData?.flatMap((_) => _?.inputs) || []);
6182
6216
  const getExtendedValidatorObj = (productType) => ({
@@ -7896,6 +7930,7 @@
7896
7930
  mandatoryPayments: undefined,
7897
7931
  snils: '',
7898
7932
  armyIdFlg: false,
7933
+ esiaAccountTypeCd: { key: '', text: '' },
7899
7934
  },
7900
7935
  {
7901
7936
  bankruptcyFlg: false,
@@ -8290,7 +8325,7 @@
8290
8325
  label: 'Телефон работодателя',
8291
8326
  required: true,
8292
8327
  },
8293
- { name: 'beginDate', required: true },
8328
+ { name: 'beginDate', required: true, filledByEsia: true },
8294
8329
  ],
8295
8330
  },
8296
8331
  {
@@ -8332,16 +8367,22 @@
8332
8367
  title: 'Совокупный доход',
8333
8368
  },
8334
8369
  {
8370
+ columns: 1,
8335
8371
  inputs: [
8336
8372
  {
8337
- name: 'infoCard',
8338
- label: 'Сумма основного и дополнительных доходов после вычета налога',
8373
+ name: 'confirmationIncome',
8374
+ required: true,
8375
+ filledByEsia: true,
8339
8376
  },
8340
8377
  ],
8341
8378
  },
8342
8379
  {
8343
- columns: 1,
8344
- inputs: [{ name: 'confirmationIncome', required: true }],
8380
+ inputs: [
8381
+ {
8382
+ name: 'infoCard',
8383
+ label: 'Сумма основного и дополнительных доходов после вычета налога',
8384
+ },
8385
+ ],
8345
8386
  },
8346
8387
  {
8347
8388
  columns: 1,
@@ -11640,7 +11681,7 @@
11640
11681
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
11641
11682
  });
11642
11683
 
11643
- const packageVersion = "0.14.825";
11684
+ const packageVersion = "0.14.826";
11644
11685
 
11645
11686
  exports.Blocks = Blocks;
11646
11687
  exports.ContentPage = ContentPage;