@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
@@ -1990,11 +1990,13 @@
1990
1990
  });
1991
1991
 
1992
1992
  const ESIA_FIELD_NAME = 'esiaAccountTypeCd';
1993
- const isEsiaAuthorize = (field, name) => Boolean(field(ESIA_FIELD_NAME)?.value?.key) && field(name).value;
1993
+ const isEsiaAuthorize = (field, input, name = '') => input?.filledByEsia &&
1994
+ Boolean(field(ESIA_FIELD_NAME)?.value?.key) &&
1995
+ field(input?.name ?? name).value;
1994
1996
 
1995
- const MiddleNameField$1 = JSX(({ field, input }) => (jsx(InputControl, { label: "\u041E\u0442\u0447\u0435\u0441\u0442\u0432\u043E (\u041E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E, \u043F\u0440\u0438 \u043D\u0430\u043B\u0438\u0447\u0438\u0438)", maxLength: 60, disabled: input?.filledByEsia && isEsiaAuthorize(field, input.name ?? ''), ...field(input?.name ?? ''), ...input })));
1997
+ const MiddleNameField$1 = JSX(({ field, input }) => (jsx(InputControl, { label: "\u041E\u0442\u0447\u0435\u0441\u0442\u0432\u043E (\u041E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E, \u043F\u0440\u0438 \u043D\u0430\u043B\u0438\u0447\u0438\u0438)", maxLength: 60, disabled: isEsiaAuthorize(field, input), ...field(input?.name ?? ''), ...input })));
1996
1998
 
1997
- const NameField$1 = JSX(({ field, input }) => (jsx(InputControl, { label: "\u0418\u043C\u044F", maxLength: 60, disabled: input?.filledByEsia && isEsiaAuthorize(field, input.name ?? ''), ...field(input?.name ?? ''), ...input })));
1999
+ const NameField$1 = JSX(({ field, input }) => (jsx(InputControl, { label: "\u0418\u043C\u044F", maxLength: 60, disabled: isEsiaAuthorize(field, input), ...field(input?.name ?? ''), ...input })));
1998
2000
 
1999
2001
  const SlideCheckbox = JSX(({ value = false, text, type = 'checkbox', onChange }) => (jsxs("div", { role: type, "aria-checked": value, className: "flex justify-start items-center w-full cursor-pointer mb-s", onClick: () => onChange && onChange(!value), children: [jsx("div", { className: style('relative flex-shrink-0 duration-300 w-9 h-5 mr-s rounded-2xl', value ? 'bg-primary-main' : 'bg-main-divider'), children: jsx("div", { className: style('absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full', value ? 'left-1/2' : 'left-[5%]') }) }), text ? (jsx(Text, { size: "text-l", font: "font-light", color: "text-primary-text", children: text })) : null] })));
2000
2002
 
@@ -2030,7 +2032,7 @@
2030
2032
 
2031
2033
  const PhoneField = JSX(({ field, input }) => {
2032
2034
  const fieldName = input?.name || 'phone';
2033
- return jsx(InputPhoneControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...field(fieldName), ...input });
2035
+ return (jsx(InputPhoneControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", disabled: isEsiaAuthorize(field, input, fieldName), ...field(fieldName), ...input }));
2034
2036
  });
2035
2037
 
2036
2038
  const PosTerminalField = JSX(({ field }) => isAcquiringTrade(field('acquiringType')?.value?.key) ? (jsx(SlideCheckbox, { type: "radio", text: "\u0425\u043E\u0447\u0443 POS-\u0442\u0435\u0440\u043C\u0438\u043D\u0430\u043B", ...field('posTerminal') })) : null);
@@ -2174,7 +2176,7 @@
2174
2176
  ];
2175
2177
  const SufferedFromField = JSX(({ field, input }) => (jsx(SelectControl, { label: "\u041F\u043E\u0441\u0442\u0440\u0430\u0434\u0430\u043B \u0432", ...input, options: SUFFERED_FROM_TYPES, ...field('sufferedFrom') })));
2176
2178
 
2177
- const SurnameField$1 = JSX(({ field, input }) => (jsx(InputControl, { label: "\u0424\u0430\u043C\u0438\u043B\u0438\u044F", maxLength: 60, disabled: input?.filledByEsia && isEsiaAuthorize(field, input.name ?? ''), ...field(input?.name ?? ''), ...input })));
2179
+ const SurnameField$1 = JSX(({ field, input }) => (jsx(InputControl, { label: "\u0424\u0430\u043C\u0438\u043B\u0438\u044F", maxLength: 60, disabled: isEsiaAuthorize(field, input), ...field(input?.name ?? ''), ...input })));
2178
2180
 
2179
2181
  const MIN_CREDIT_TERM = 1;
2180
2182
  const MAX_CREDIT_TERM = 180;
@@ -2210,7 +2212,7 @@
2210
2212
  function shouldRenderField({ input, field, }) {
2211
2213
  const { condition } = input;
2212
2214
  const { value } = field(condition?.name || '');
2213
- return !condition || condition?.values?.find((_) => _ === (value?.key ?? value));
2215
+ return !condition || condition?.values?.includes(value?.key ?? value);
2214
2216
  }
2215
2217
 
2216
2218
  const PRODUCT_REF = {
@@ -2675,11 +2677,11 @@
2675
2677
  {
2676
2678
  columns: 2,
2677
2679
  inputs: [
2678
- { name: 'surname', required: true, dadata: true },
2679
- { name: 'name', required: true, dadata: true },
2680
- { name: 'middleName', dadata: true },
2681
- { name: 'limitedBirthday', required: true },
2682
- { name: 'phone', required: true },
2680
+ { name: 'surname', required: true, dadata: true, filledByEsia: true },
2681
+ { name: 'name', required: true, dadata: true, filledByEsia: true },
2682
+ { name: 'middleName', dadata: true, filledByEsia: true },
2683
+ { name: 'limitedBirthday', required: true, filledByEsia: true },
2684
+ { name: 'phone', required: true, filledByEsia: true },
2683
2685
  { name: 'email', required: true, dadata: true },
2684
2686
  ],
2685
2687
  },
@@ -2689,6 +2691,57 @@
2689
2691
  ];
2690
2692
  };
2691
2693
 
2694
+ const getTraceId = () => {
2695
+ const result = new Uint8Array(8);
2696
+ globalThis.crypto.getRandomValues(result);
2697
+ return result.reduce((acc, _) => `${acc}${_.toString(16).padStart(2, '0')}`, '');
2698
+ };
2699
+
2700
+ const fetchRetailJSON = async (url, method, body) => {
2701
+ try {
2702
+ const response = await doRequest(url, method, body);
2703
+ return response.json();
2704
+ }
2705
+ catch (err) {
2706
+ console.error(err);
2707
+ return null;
2708
+ }
2709
+ };
2710
+ async function doRequest(url, method, body) {
2711
+ const traceId = getTraceId();
2712
+ return globalThis?.fetch?.(`${RETAIL_API_BASE_URI}${url}`, {
2713
+ method,
2714
+ headers: {
2715
+ 'Content-Type': 'application/json',
2716
+ 'X-B3-Sampled': '1',
2717
+ 'X-B3-Spanid': traceId,
2718
+ 'X-B3-Traceid': traceId,
2719
+ ...getAuthorizationHeaders(),
2720
+ },
2721
+ credentials: 'include',
2722
+ body: body ? JSON.stringify(body) : null,
2723
+ });
2724
+ }
2725
+ const getAuthorizationHeaders = () => {
2726
+ const token = sessionStorage.getItem('accessToken');
2727
+ return token ? { Authorization: `Bearer ${token}` } : null;
2728
+ };
2729
+
2730
+ const getLink = (body) => fetchRetailJSON('/esia/getLink', 'POST', body);
2731
+
2732
+ const EsiaLoginBanner = JSX(() => {
2733
+ const navigator = locationNavigator();
2734
+ const handleAuth = useCallback(async () => {
2735
+ const resp = await getLink({
2736
+ redirectUri: globalThis.location.origin + globalThis.location.pathname,
2737
+ });
2738
+ if (resp?.link) {
2739
+ navigator.assign(resp.link);
2740
+ }
2741
+ }, []);
2742
+ return (jsxs("div", { className: "flex gap-lg items-center rounded-md bg-main-gray p-4xl", children: [jsxs("div", { className: "flex flex-col justify-around w-full", children: [jsx("p", { className: "mb-m text-xl", children: "\u0417\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u0435 \u0434\u0430\u043D\u043D\u044B\u0435 \u0447\u0435\u0440\u0435\u0437 \u0413\u043E\u0441\u0443\u0441\u043B\u0443\u0433\u0438" }), jsxs("ul", { className: "list-disc list-inside mb-4xl", children: [jsx("li", { children: "\u0412\u0435\u0440\u043E\u044F\u0442\u043D\u043E\u0441\u0442\u044C \u043E\u0434\u043E\u0431\u0440\u0435\u043D\u0438\u044F \u0432\u044B\u0448\u0435" }), jsx("li", { children: "\u0411\u0435\u0437 \u0441\u043F\u0440\u0430\u0432\u043E\u043A \u043E \u0434\u043E\u0445\u043E\u0434\u0430\u0445 \u0438 \u0442\u0440\u0443\u0434\u043E\u0443\u0441\u0442\u0440\u043E\u0439\u0441\u0442\u0432\u0435" }), jsx("li", { children: "\u0421 \u0437\u0430\u0449\u0438\u0442\u043E\u0439 \u0412\u0430\u0448\u0438\u0445 \u0434\u0430\u043D\u043D\u044B\u0445" })] }), jsx(Img, { className: "block mb-xl self-center @md:hidden", image: { icon: 'GosUslugiIcon', iconVersion: 'normal' }, height: "80", width: "80" }), jsx(Button, { type: "button", onClick: handleAuth, className: "w-full @md:w-fit", children: "\u0417\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u044C" })] }), jsx(Img, { className: "hidden @md:block", image: { icon: 'GosUslugiIcon', iconVersion: 'normal' }, height: "164" })] }));
2743
+ });
2744
+
2692
2745
  const debounce = (fn, delay = 600) => {
2693
2746
  let timerId;
2694
2747
  const debouncedCallback = (...args) => {
@@ -2929,7 +2982,7 @@
2929
2982
  qcHouse: '',
2930
2983
  });
2931
2984
  }, []);
2932
- return (jsx(DaDataInputControl, { disabled: input?.filledByEsia && isEsiaAuthorize(field, fieldName), label: "\u0410\u0434\u0440\u0435\u0441", ...field(fieldName), value: fieldValue?.fullAddress, onChange: onChange, ...input, onDaDataChange: onDaDataChange }));
2985
+ return (jsx(DaDataInputControl, { disabled: isEsiaAuthorize(field, input, fieldName), label: "\u0410\u0434\u0440\u0435\u0441", ...field(fieldName), value: fieldValue?.fullAddress, onChange: onChange, ...input, onDaDataChange: onDaDataChange }));
2933
2986
  });
2934
2987
  const getAddressFromDaDataItem = (item) => ({
2935
2988
  apartment: item?.data?.flat,
@@ -3575,42 +3628,6 @@
3575
3628
  const mapByIndex = (points, index) => points.map((_) => _.coords?.[index]);
3576
3629
  const getArraySumAndAverage = (arr) => arr.length && arr.reduce((a, b) => a + b) / arr.length;
3577
3630
 
3578
- const getTraceId = () => {
3579
- const result = new Uint8Array(8);
3580
- globalThis.crypto.getRandomValues(result);
3581
- return result.reduce((acc, _) => `${acc}${_.toString(16).padStart(2, '0')}`, '');
3582
- };
3583
-
3584
- const fetchRetailJSON = async (url, method, body) => {
3585
- try {
3586
- const response = await doRequest(url, method, body);
3587
- return response.json();
3588
- }
3589
- catch (err) {
3590
- console.error(err);
3591
- return null;
3592
- }
3593
- };
3594
- async function doRequest(url, method, body) {
3595
- const traceId = getTraceId();
3596
- return globalThis?.fetch?.(`${RETAIL_API_BASE_URI}${url}`, {
3597
- method,
3598
- headers: {
3599
- 'Content-Type': 'application/json',
3600
- 'X-B3-Sampled': '1',
3601
- 'X-B3-Spanid': traceId,
3602
- 'X-B3-Traceid': traceId,
3603
- ...getAuthorizationHeaders(),
3604
- },
3605
- credentials: 'include',
3606
- body: body ? JSON.stringify(body) : null,
3607
- });
3608
- }
3609
- const getAuthorizationHeaders = () => {
3610
- const token = sessionStorage.getItem('accessToken');
3611
- return token ? { Authorization: `Bearer ${token}` } : null;
3612
- };
3613
-
3614
3631
  const fetchRegionOffices = async (regionKey) => {
3615
3632
  const response = await fetchRetailJSON('/public-data/regionOffices', 'POST', {
3616
3633
  regionRfCd: {
@@ -3840,10 +3857,9 @@
3840
3857
 
3841
3858
  const BankruptcyFlgField = JSX(({ field, input }) => (jsx(CheckboxWithError, { text: "\u0412 \u043E\u0442\u043D\u043E\u0448\u0435\u043D\u0438\u0438 \u043C\u0435\u043D\u044F \u0432\u0435\u0434\u0451\u0442\u0441\u044F \u043F\u0440\u043E\u0438\u0437\u0432\u043E\u0434\u0441\u0442\u0432\u043E \u043F\u043E \u0434\u0435\u043B\u0443 \u043E \u0431\u0430\u043D\u043A\u0440\u043E\u0442\u0441\u0442\u0432\u0435", ...field(input?.name ?? '') })));
3842
3859
 
3843
- const BeginDateField = JSX(({ field, input }) => (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u043D\u0430\u0447\u0430\u043B\u0430 \u0440\u0430\u0431\u043E\u0442\u044B \u043D\u0430 \u0442\u0435\u043A\u0443\u0449\u0435\u043C \u043C\u0435\u0441\u0442\u0435", ...field(input?.name ?? ''), ...input })));
3860
+ const BeginDateField = JSX(({ field, input }) => (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u043D\u0430\u0447\u0430\u043B\u0430 \u0440\u0430\u0431\u043E\u0442\u044B \u043D\u0430 \u0442\u0435\u043A\u0443\u0449\u0435\u043C \u043C\u0435\u0441\u0442\u0435", ...field(input?.name ?? ''), ...input, disabled: isEsiaAuthorize(field, input) })));
3844
3861
 
3845
- const FIELD_NAME$2 = 'birthPlace';
3846
- const BirthPlaceField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u041C\u0435\u0441\u0442\u043E \u0440\u043E\u0436\u0434\u0435\u043D\u0438\u044F", ...field(input?.name ?? ''), ...input, disabled: input?.filledByEsia && isEsiaAuthorize(field, FIELD_NAME$2) })));
3862
+ const BirthPlaceField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u041C\u0435\u0441\u0442\u043E \u0440\u043E\u0436\u0434\u0435\u043D\u0438\u044F", ...field(input?.name ?? ''), ...input, disabled: isEsiaAuthorize(field, input) })));
3847
3863
 
3848
3864
  const safeJsonParse = (data) => {
3849
3865
  try {
@@ -3904,7 +3920,8 @@
3904
3920
 
3905
3921
  const ConfirmationIncomeField = JSX(({ field, input }) => {
3906
3922
  const { data: confirmationIncome } = useLeadFormData('INCOME_CERT_UNITED');
3907
- return (jsx(SelectField, { field: field, source: confirmationIncome, label: "\u0421\u043F\u043E\u0441\u043E\u0431 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F \u0434\u043E\u0445\u043E\u0434\u0430", fieldName: "confirmationIncome", input: input }));
3923
+ const filledByEsia = isEsiaAuthorize(field, input);
3924
+ return (jsxs("div", { className: "space-y-xl", children: [filledByEsia ? (jsx(InfoCard, { __html: "\u0414\u043B\u044F \u0432\u044B\u0431\u043E\u0440\u0430 \u0438\u043D\u043E\u0433\u043E \u0441\u043F\u043E\u0441\u043E\u0431\u0430 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F \u0434\u043E\u0445\u043E\u0434\u0430, \u043E\u0444\u043E\u0440\u043C\u0438\u0442\u0435 \u043D\u043E\u0432\u0443\u044E \u0437\u0430\u044F\u0432\u043A\u0443 \u043D\u0430 \u043A\u0440\u0435\u0434\u0438\u0442 \u0431\u0435\u0437 \u0430\u0432\u0442\u043E\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043D\u0430 \u043F\u043E\u0440\u0442\u0430\u043B\u0435 \u0413\u043E\u0441\u0443\u0441\u043B\u0443\u0433\u0438" })) : null, jsx(SelectField, { field: field, source: confirmationIncome, label: "\u0421\u043F\u043E\u0441\u043E\u0431 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F \u0434\u043E\u0445\u043E\u0434\u0430", fieldName: "confirmationIncome", input: input, disabled: filledByEsia })] }));
3908
3925
  });
3909
3926
 
3910
3927
  const ConscriptionField = JSX(({ field, input }) => {
@@ -4245,12 +4262,12 @@
4245
4262
  });
4246
4263
  const renderCreditParamsForm$1 = (params, field) => (jsxs("div", { className: "flex flex-col gap-y-2xl", children: [params.isShowSalaryClient ? (jsx(Checkbox, { text: `Получаю зарплату на счёт\nв Россельхозбанке`, ...field('isSalaryClient'), value: params.isSalaryClient, className: "whitespace-pre-line sm:whitespace-normal" })) : null, params.isShowStateEmployee ? (jsx(Checkbox, { text: "\u0420\u0430\u0431\u043E\u0442\u0430\u044E \u0432 \u0431\u044E\u0434\u0436\u0435\u0442\u043D\u043E\u0439 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", ...field('isStateEmployee'), value: params.isStateEmployee })) : null, params.isShowPensionClient ? (jsx(Checkbox, { text: "\u041F\u043E\u043B\u0443\u0447\u0430\u044E \u043F\u0435\u043D\u0441\u0438\u044E \u043D\u0430 \u043A\u0430\u0440\u0442\u0443 \u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A\u0430", ...field('isPensionClient'), value: params.isPensionClient })) : null, params.isShowInsurance ? (jsx(Checkbox, { text: "\u041A\u043E\u043C\u043F\u043B\u0435\u043A\u0441\u043D\u0430\u044F \u0441\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u044F \u0437\u0430\u0449\u0438\u0442\u0430", ...field('isInsurance'), value: params.isInsurance })) : null] }));
4247
4264
 
4248
- const FIELD_NAME$1 = 'calculator';
4265
+ const FIELD_NAME = 'calculator';
4249
4266
  const CreditCalcField = JSX(({ field, params }) => {
4250
4267
  const handleChange = useCallback((_) => {
4251
- field(FIELD_NAME$1).onChange?.(_);
4268
+ field(FIELD_NAME).onChange?.(_);
4252
4269
  }, []);
4253
- return (jsx(CalculatorCredit, { ...params?.calcData, padding: "p-0", defaultParams: defaultValueAdapter(field(FIELD_NAME$1).value), onChange: handleChange }));
4270
+ return (jsx(CalculatorCredit, { ...params?.calcData, padding: "p-0", defaultParams: defaultValueAdapter(field(FIELD_NAME).value), onChange: handleChange }));
4254
4271
  });
4255
4272
  const PARAMS_MAP = {
4256
4273
  moneyValue: 'sum',
@@ -4448,7 +4465,7 @@
4448
4465
  }
4449
4466
  })();
4450
4467
  }, [employerActivities, employerOrganization, organization, amountWorkers]);
4451
- return (jsx(DaDataInputControl, { label: "\u0418\u041D\u041D", isInteger: true, maxLength: 12, ...input, ...field(input?.name ?? ''), onDaDataChange: onDaDataChange }));
4468
+ return (jsx(DaDataInputControl, { label: "\u0418\u041D\u041D", isInteger: true, maxLength: 12, ...input, ...field(input?.name ?? ''), onDaDataChange: onDaDataChange, disabled: isEsiaAuthorize(field, input) }));
4452
4469
  });
4453
4470
 
4454
4471
  const DeliveryDateFiels = JSX(({ field, input }) => (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438", ...field(input?.name ?? ''), minDate: new Date() })));
@@ -4467,7 +4484,7 @@
4467
4484
  const DulIssueDateField = JSX(({ field, input }) => {
4468
4485
  const birthDate = field('limitedBirthday')?.value;
4469
4486
  const startDulIssueDate = useMemo(() => new Date(birthDate?.getFullYear() + 14, birthDate?.getMonth(), birthDate?.getDate()), [birthDate]);
4470
- 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 }));
4487
+ return (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0432\u044B\u0434\u0430\u0447\u0438", ...field(input?.name ?? ''), disabled: isEsiaAuthorize(field, input), minDate: startDulIssueDate }));
4471
4488
  });
4472
4489
 
4473
4490
  const DulIssuedByField = JSX(({ field, input }) => {
@@ -4475,18 +4492,18 @@
4475
4492
  const onDaDataChange = useCallback((item) => {
4476
4493
  changeDulSubdivisionCode?.(item?.data?.code?.replace('-', ''));
4477
4494
  }, []);
4478
- return (jsx(DaDataInputControl, { disabled: input?.filledByEsia && isEsiaAuthorize(field, input?.name ?? ''), label: "\u041A\u0435\u043C \u0432\u044B\u0434\u0430\u043D", ...input, ...field(input?.name ?? ''), onDaDataChange: onDaDataChange, daDataQueryPrefix: dulSubdivisionCode }));
4495
+ return (jsx(DaDataInputControl, { disabled: isEsiaAuthorize(field, input), label: "\u041A\u0435\u043C \u0432\u044B\u0434\u0430\u043D", ...input, ...field(input?.name ?? ''), onDaDataChange: onDaDataChange, daDataQueryPrefix: dulSubdivisionCode }));
4479
4496
  });
4480
4497
 
4481
- const DulNumberField = JSX(({ field, input }) => (jsx(DaDataInputControl, { disabled: input?.filledByEsia && isEsiaAuthorize(field, input.name ?? ''), label: "\u041D\u043E\u043C\u0435\u0440 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430", isInteger: true, maxLength: 6, ...field(input?.name ?? '') })));
4498
+ const DulNumberField = JSX(({ field, input }) => (jsx(DaDataInputControl, { disabled: isEsiaAuthorize(field, input), label: "\u041D\u043E\u043C\u0435\u0440 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430", isInteger: true, maxLength: 6, ...field(input?.name ?? '') })));
4482
4499
 
4483
- const DulSerieField = JSX(({ field, input }) => (jsx(DaDataInputControl, { disabled: input?.filledByEsia && isEsiaAuthorize(field, input.name ?? ''), label: "\u0421\u0435\u0440\u0438\u044F \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430", isInteger: true, maxLength: 4, ...field(input?.name ?? '') })));
4500
+ const DulSerieField = JSX(({ field, input }) => (jsx(DaDataInputControl, { disabled: isEsiaAuthorize(field, input), label: "\u0421\u0435\u0440\u0438\u044F \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430", isInteger: true, maxLength: 4, ...field(input?.name ?? '') })));
4484
4501
 
4485
4502
  const DulSubdivisionCodeField = JSX(({ field, input }) => {
4486
4503
  const onDaDataChange = useCallback((item) => {
4487
4504
  field?.('dulIssuedBy')?.onChange?.(item?.data?.name);
4488
4505
  }, []);
4489
- return (jsx(DaDataInputControl, { disabled: input?.filledByEsia && isEsiaAuthorize(field, input.name ?? ''), label: "\u041A\u043E\u0434 \u043F\u043E\u0434\u0440\u0430\u0437\u0434\u0435\u043B\u0435\u043D\u0438\u044F", isInteger: true, maxLength: 6, ...input, ...field(input?.name ?? ''), onDaDataChange: onDaDataChange }));
4506
+ return (jsx(DaDataInputControl, { disabled: isEsiaAuthorize(field, input), label: "\u041A\u043E\u0434 \u043F\u043E\u0434\u0440\u0430\u0437\u0434\u0435\u043B\u0435\u043D\u0438\u044F", isInteger: true, maxLength: 6, ...input, ...field(input?.name ?? ''), onDaDataChange: onDaDataChange }));
4490
4507
  });
4491
4508
 
4492
4509
  const EducationField = JSX(({ field, input }) => {
@@ -4531,7 +4548,7 @@
4531
4548
  const MIN_YEARS = 0;
4532
4549
  const Experience5YearsField = JSX(({ field, input }) => {
4533
4550
  const onChange = useCallback((value) => field(input?.name ?? '')?.onChange?.(String(clamp(Number(value), MIN_YEARS, MAX_YEARS))), []);
4534
- return (jsx(DaDataInputControl, { label: "\u0421\u0442\u0430\u0436", placeholder: "\u0417\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435 5 \u043B\u0435\u0442", type: "number", ...field(input?.name ?? ''), ...input, onChange: onChange }));
4551
+ return (jsx(DaDataInputControl, { label: "\u0421\u0442\u0430\u0436", placeholder: "\u0417\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435 5 \u043B\u0435\u0442", type: "number", ...field(input?.name ?? ''), ...input, onChange: onChange, disabled: isEsiaAuthorize(field, input) }));
4535
4552
  });
4536
4553
 
4537
4554
  const FamilyMembersField = JSX(({ field, input }) => {
@@ -4552,7 +4569,7 @@
4552
4569
  return (jsx(SelectField, { field: field, source: familyStatus, label: "\u0421\u0435\u043C\u0435\u0439\u043D\u043E\u0435 \u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0435", fieldName: "familyStatus", input: input }));
4553
4570
  });
4554
4571
 
4555
- const GeneralSeniorityField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u041E\u0431\u0449\u0438\u0439 \u0441\u0442\u0430\u0436", type: "number", maxLength: 2, placeholder: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043B\u0435\u0442", ...field(input?.name ?? ''), ...input })));
4572
+ const GeneralSeniorityField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u041E\u0431\u0449\u0438\u0439 \u0441\u0442\u0430\u0436", type: "number", maxLength: 2, placeholder: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043B\u0435\u0442", ...field(input?.name ?? ''), ...input, disabled: isEsiaAuthorize(field, input) })));
4556
4573
 
4557
4574
  const HousingField = JSX(({ field, input }) => {
4558
4575
  const { data: housing } = useLeadFormData('HOUSE_TYPE');
@@ -4561,9 +4578,9 @@
4561
4578
 
4562
4579
  const InfoCardField = JSX(({ input }) => (jsx(InfoCard, { __html: input?.label })));
4563
4580
 
4564
- const JobsNumberField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043C\u0435\u0441\u0442 \u0440\u0430\u0431\u043E\u0442\u044B \u0437\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435 5 \u043B\u0435\u0442", placeholder: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043C\u0435\u0441\u0442", isInteger: true, maxLength: 2, ...field(input?.name ?? ''), ...input })));
4581
+ const JobsNumberField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043C\u0435\u0441\u0442 \u0440\u0430\u0431\u043E\u0442\u044B \u0437\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435 5 \u043B\u0435\u0442", placeholder: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043C\u0435\u0441\u0442", isInteger: true, maxLength: 2, ...field(input?.name ?? ''), ...input, disabled: isEsiaAuthorize(field, input) })));
4565
4582
 
4566
- const LastJobExperienceField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u0421\u0442\u0430\u0436 \u043D\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u043C \u0440\u0430\u0431\u043E\u0447\u0435\u043C \u043C\u0435\u0441\u0442\u0435", placeholder: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043B\u0435\u0442", type: "number", maxLength: 2, ...field(input?.name ?? ''), ...input })));
4583
+ const LastJobExperienceField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u0421\u0442\u0430\u0436 \u043D\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u043C \u0440\u0430\u0431\u043E\u0447\u0435\u043C \u043C\u0435\u0441\u0442\u0435", placeholder: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043B\u0435\u0442", type: "number", maxLength: 2, ...field(input?.name ?? ''), ...input, disabled: isEsiaAuthorize(field, input) })));
4567
4584
 
4568
4585
  const latinPattern = /^[\u0041-\u005A\u0061-\u007A\s]+$/u;
4569
4586
  const isLatin = (_ = '') => latinPattern.test(_);
@@ -4684,7 +4701,7 @@
4684
4701
 
4685
4702
  const LegalFormField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u041E\u041F\u0424", placeholder: "\u041E\u041E\u041E, \u041F\u0410\u041E \u0438 \u0434\u0440.", ...field(input?.name ?? ''), ...input })));
4686
4703
 
4687
- const LimitedBirthdayField = JSX(({ field, input }) => (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0440\u043E\u0436\u0434\u0435\u043D\u0438\u044F", ...field(input?.name ?? ''), disabled: input?.filledByEsia && isEsiaAuthorize(field, input.name ?? '') })));
4704
+ const LimitedBirthdayField = JSX(({ field, input }) => (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0440\u043E\u0436\u0434\u0435\u043D\u0438\u044F", ...field(input?.name ?? ''), disabled: isEsiaAuthorize(field, input) })));
4688
4705
 
4689
4706
  const MandatoryPaymentsField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u041E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u044B\u0435 \u0432\u044B\u043F\u043B\u0430\u0442\u044B", placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435", isInteger: true, ...field(input?.name ?? ''), ...input })));
4690
4707
 
@@ -4700,7 +4717,7 @@
4700
4717
  field('middleName')?.onChange?.(value);
4701
4718
  }
4702
4719
  }, [field]);
4703
- return (jsx(DaDataInputControl, { label: "\u041E\u0442\u0447\u0435\u0441\u0442\u0432\u043E (\u041E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E, \u043F\u0440\u0438 \u043D\u0430\u043B\u0438\u0447\u0438\u0438)", maxLength: 60, disabled: input?.filledByEsia && isEsiaAuthorize(field, input?.name ?? ''), ...field(input?.name ?? ''), ...input, onChange: onChange }));
4720
+ return (jsx(DaDataInputControl, { label: "\u041E\u0442\u0447\u0435\u0441\u0442\u0432\u043E (\u041E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E, \u043F\u0440\u0438 \u043D\u0430\u043B\u0438\u0447\u0438\u0438)", maxLength: 60, disabled: isEsiaAuthorize(field, input), ...field(input?.name ?? ''), ...input, onChange: onChange }));
4704
4721
  });
4705
4722
 
4706
4723
  const NameField = JSX(({ field, input }) => {
@@ -4709,7 +4726,7 @@
4709
4726
  field('name')?.onChange?.(value);
4710
4727
  }
4711
4728
  }, [field]);
4712
- return (jsx(DaDataInputControl, { label: "\u0418\u043C\u044F", maxLength: 60, disabled: input?.filledByEsia && isEsiaAuthorize(field, input.name ?? ''), ...field(input?.name ?? ''), ...input, onChange: onChange }));
4729
+ return (jsx(DaDataInputControl, { label: "\u0418\u043C\u044F", maxLength: 60, disabled: isEsiaAuthorize(field, input), ...field(input?.name ?? ''), ...input, onChange: onChange }));
4713
4730
  });
4714
4731
 
4715
4732
  const OrganizationField = JSX(({ field, input }) => {
@@ -4729,7 +4746,7 @@
4729
4746
  field?.('inn')?.onChange?.(item.data?.inn);
4730
4747
  updateOrganizationFields(store, field, item);
4731
4748
  }, []);
4732
- return (jsx(DaDataInputControl, { label: "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", ...input, ...field(input?.name ?? ''), onDaDataChange: onDaDataChange }));
4749
+ return (jsx(DaDataInputControl, { label: "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", ...input, ...field(input?.name ?? ''), disabled: isEsiaAuthorize(field, input), onDaDataChange: onDaDataChange }));
4733
4750
  });
4734
4751
 
4735
4752
  const OtherIncomeField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u0418\u043D\u044B\u0435 \u0434\u043E\u0445\u043E\u0434\u044B", placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435", isInteger: true, ...field(input?.name ?? ''), ...input })));
@@ -4864,19 +4881,18 @@
4864
4881
 
4865
4882
  const SnilsField = JSX(({ field, input }) => (jsx(InputSnilsControl, { label: "\u0421\u041D\u0418\u041B\u0421", maxLength: 14, ...field(input?.name ?? ''), ...input })));
4866
4883
 
4867
- const FIELD_NAME = 'surname';
4868
4884
  const SurnameField = JSX(({ field, input }) => {
4869
4885
  const onChange = useCallback((value) => {
4870
4886
  if (retailCyrillicPattern.test(value) || value.length === 0) {
4871
4887
  field('surname')?.onChange?.(value);
4872
4888
  }
4873
4889
  }, [field]);
4874
- return (jsx(DaDataInputControl, { label: "\u0424\u0430\u043C\u0438\u043B\u0438\u044F", maxLength: 60, disabled: input?.filledByEsia && isEsiaAuthorize(field, FIELD_NAME), ...field(input?.name ?? ''), ...input, onChange: onChange }));
4890
+ return (jsx(DaDataInputControl, { label: "\u0424\u0430\u043C\u0438\u043B\u0438\u044F", maxLength: 60, disabled: isEsiaAuthorize(field, input), ...field(input?.name ?? ''), ...input, onChange: onChange }));
4875
4891
  });
4876
4892
 
4877
4893
  const TotalIncomeField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u0421\u043E\u0432\u043E\u043A\u0443\u043F\u043D\u044B\u0439 \u043E\u0444\u0438\u0446\u0438\u0430\u043B\u044C\u043D\u044B\u0439 \u0434\u043E\u0445\u043E\u0434 \u0432 \u043C\u0435\u0441\u044F\u0446 \u043F\u043E\u0441\u043B\u0435 \u0432\u044B\u0447\u0435\u0442\u0430 \u043D\u0430\u043B\u043E\u0433\u043E\u0432 (\u0437\u0430\u0440\u043F\u043B\u0430\u0442\u0430, \u043F\u0440\u0435\u043C\u0438\u0438)", placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435", isInteger: true, ...field(input?.name ?? ''), ...input })));
4878
4894
 
4879
- const WagesField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u0421\u043E\u0432\u043E\u043A\u0443\u043F\u043D\u044B\u0439 \u0434\u043E\u0445\u043E\u0434 \u0432 \u043C\u0435\u0441\u044F\u0446 \u043F\u043E\u0441\u043B\u0435 \u0432\u044B\u0447\u0435\u0442\u0430 \u043D\u0430\u043B\u043E\u0433\u043E\u0432 (\u0437\u0430\u0440\u043F\u043B\u0430\u0442\u0430, \u043F\u0440\u0435\u043C\u0438\u0438)", placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435", isInteger: true, ...field(input?.name ?? ''), ...input })));
4895
+ const WagesField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u0421\u043E\u0432\u043E\u043A\u0443\u043F\u043D\u044B\u0439 \u0434\u043E\u0445\u043E\u0434 \u0432 \u043C\u0435\u0441\u044F\u0446 \u043F\u043E\u0441\u043B\u0435 \u0432\u044B\u0447\u0435\u0442\u0430 \u043D\u0430\u043B\u043E\u0433\u043E\u0432 (\u0437\u0430\u0440\u043F\u043B\u0430\u0442\u0430, \u043F\u0440\u0435\u043C\u0438\u0438)", placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435", isInteger: true, ...field(input?.name ?? ''), ...input, disabled: isEsiaAuthorize(field, input) })));
4880
4896
 
4881
4897
  const DELIVERY_CITIES_REF = {
4882
4898
  $ref: '/wcms-resources/delivery-cities-data.json',
@@ -5506,7 +5522,7 @@
5506
5522
  const participant = task.participants[0];
5507
5523
  const { classCard: cardCategory, codeWord, paymentSystemTypeCd: paymentSystem, currencyCode: currency, } = task;
5508
5524
  const { loanAmount: moneyValue, creditPeriod: monthsValue, paymentTypeCd } = task;
5509
- const { birthDate: limitedBirthday, midname: middleName, name, surname, birthPlace, dulIssueDate: dulIssueDate, dulIssuedBy, dulNumber, dulSerie, dulSubdivisionCode, educationLevelCd: education, registrationDate: participantDateRegistration, houseTypeCd: housing, genderCd, participantContacts = [], participantAddresses = [], employmentContractDate: beginDate, employmentTypeCd: employment, organizationName, organizationInn: inn, organizationActivityTypeCd: employerActivities, organizationTypeCd: organization, organizationKindCd: employerOrganization, employeesNumberCd: amountWorkers, opf: legalForm, seniority: generalSeniority, generalSeniority: experience5Years, jobsNumber, lastWorkDuration: lastJobExperience, positionCd: positionOrganization, maritalStatusCd: familyStatus, childrenDependents: children, totalDependents: familyMembers, otherDependents: dependents, militaryStatusCd: conscription, participantIncomes, snils, armyIdFlg, bankruptcyFlg, shareholderFlg, nameLegalEntity: legalEntityName, creditInRshbCd, payrollCardRshbFlg: isInsurance, consentInsuranceFlg: isSalaryClient, incomeCertificateCd, } = participant;
5525
+ const { birthDate: limitedBirthday, midname: middleName, name, surname, birthPlace, dulIssueDate: dulIssueDate, dulIssuedBy, dulNumber, dulSerie, dulSubdivisionCode, educationLevelCd: education, registrationDate: participantDateRegistration, houseTypeCd: housing, genderCd, participantContacts = [], participantAddresses = [], employmentContractDate: beginDate, employmentTypeCd: employment, organizationName, organizationInn: inn, organizationActivityTypeCd: employerActivities, organizationTypeCd: organization, organizationKindCd: employerOrganization, employeesNumberCd: amountWorkers, opf: legalForm, seniority: generalSeniority, generalSeniority: experience5Years, jobsNumber, lastWorkDuration: lastJobExperience, positionCd: positionOrganization, maritalStatusCd: familyStatus, childrenDependents: children, totalDependents: familyMembers, otherDependents: dependents, militaryStatusCd: conscription, participantIncomes, snils, armyIdFlg, bankruptcyFlg, shareholderFlg, nameLegalEntity: legalEntityName, creditInRshbCd, payrollCardRshbFlg: isInsurance, consentInsuranceFlg: isSalaryClient, incomeCertificateCd, profile, } = participant;
5510
5526
  return {
5511
5527
  currency: currency?.key,
5512
5528
  paymentSystem: getSelectValue(paymentSystem),
@@ -5558,6 +5574,7 @@
5558
5574
  monthsValue,
5559
5575
  isAnnuity: paymentTypeCd?.key === 'ANNUITY',
5560
5576
  },
5577
+ esiaAccountTypeCd: profile?.esiaAccountTypeCd,
5561
5578
  ...getParticipantIncomes(participantIncomes),
5562
5579
  ...getParticipantAddresses(participantAddresses),
5563
5580
  ...getParticipantContacts(participantContacts),
@@ -5612,39 +5629,6 @@
5612
5629
  };
5613
5630
  };
5614
5631
 
5615
- const getLink = (body) => fetchRetailJSON('/esia/getLink', 'POST', body);
5616
-
5617
- const EsiaLoginDialog = JSX(({ onClose }) => {
5618
- const navigator = locationNavigator();
5619
- const retailFormStore = useRetailFormStore();
5620
- const handleAuth = useCallback(async () => {
5621
- const resp = await getLink({
5622
- redirectUri: globalThis.location.origin + globalThis.location.pathname,
5623
- });
5624
- if (resp?.link) {
5625
- navigator.assign(resp.link);
5626
- globalThis.location.href = resp.link;
5627
- }
5628
- }, []);
5629
- const handleClose = useCallback(() => {
5630
- if (retailFormStore.leadForm) {
5631
- const leadForm = { ...retailFormStore.leadForm };
5632
- delete leadForm.esiaAccountTypeCd;
5633
- retailFormStore.leadForm = leadForm;
5634
- }
5635
- onClose?.();
5636
- }, []);
5637
- 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" })] })] }) }));
5638
- });
5639
-
5640
- const useEsiaLoginDialog = (nextStepLink) => {
5641
- const { open } = useDialog(EsiaLoginDialog);
5642
- const navigator = locationNavigator();
5643
- return useCallback(() => {
5644
- open({ onClose: () => navigator.assign(nextStepLink) });
5645
- }, [open, nextStepLink]);
5646
- };
5647
-
5648
5632
  // TODO Не должно быть импортов из бизнес-слоя в API слой. Только наоборот.
5649
5633
  const getUpdateUserProfileData = (profileId, formData, consents) => {
5650
5634
  const { name = '', surname = '', middleName = '', limitedBirthday = '', phone = '', email = '', } = formData;
@@ -5766,79 +5750,80 @@
5766
5750
 
5767
5751
  /* eslint-disable max-lines */
5768
5752
  // eslint-disable-next-line max-lines-per-function
5769
- const useApplicationLeadApi = ({ programId, nextStepLink, productType, esiaError, data, }) => {
5753
+ const useApplicationLeadApi = ({ programId, nextStepLink, productType, data, }) => {
5770
5754
  const [isSending, { setTrue: startSending, setFalse: endSending }] = useBool(false);
5771
5755
  const [ok, setOK] = useState();
5772
5756
  const saveUserData = useSaveUserData();
5773
5757
  const sendAspects = useSendLeadFormAspects({ data });
5774
5758
  const navigator = locationNavigator();
5775
- const openEsiaLoginDialog = useEsiaLoginDialog(nextStepLink);
5776
- const consentBkiDialog = useConsentBkiDialog(openEsiaLoginDialog);
5759
+ const goToNextStep = useCallback(() => {
5760
+ navigator.assign(nextStepLink);
5761
+ }, []);
5762
+ const consentBkiDialog = useConsentBkiDialog(goToNextStep);
5777
5763
  const verifyPhoneDialog = useDialog(VerifyPhoneDialog);
5778
5764
  const draftDialog = useDraftDialog();
5779
5765
  const handleSubmit = useCallback(async (formData) => {
5780
- if (esiaError) {
5781
- navigator.assign(nextStepLink);
5782
- return;
5783
- }
5784
5766
  try {
5785
5767
  startSending();
5786
5768
  const transformedFormData = transformFormData(formData);
5787
5769
  const profileId = await createUserProfile({
5788
5770
  profile: { phone: formatPhone(transformedFormData.phone) },
5789
5771
  });
5790
- if (profileId && transformedFormData?.phone) {
5791
- const sendCurrentTask = async () => {
5792
- await updateUserData({
5793
- programId,
5794
- profileId,
5795
- formData: transformedFormData,
5796
- productType,
5797
- saveUserData,
5798
- sendAspects,
5799
- });
5800
- verifyPhoneDialog.close();
5801
- if (productType === 'debitCard') {
5802
- openEsiaLoginDialog();
5772
+ if (!profileId) {
5773
+ throw new Error();
5774
+ }
5775
+ const sendCurrentTask = async () => {
5776
+ await updateUserData({
5777
+ programId,
5778
+ profileId,
5779
+ formData: transformedFormData,
5780
+ productType,
5781
+ saveUserData,
5782
+ sendAspects,
5783
+ });
5784
+ verifyPhoneDialog.close();
5785
+ if (productType === 'debitCard') {
5786
+ goToNextStep();
5787
+ }
5788
+ else {
5789
+ consentBkiDialog.open(transformedFormData.phone, profileId);
5790
+ }
5791
+ };
5792
+ const handleSuccessVerify = async () => {
5793
+ try {
5794
+ const lastTaskId = await getLastTaskStatus({ profileId, programId });
5795
+ if (lastTaskId) {
5796
+ const task = await getTaskById({ taskId: lastTaskId });
5797
+ verifyPhoneDialog.close();
5798
+ draftDialog.open({
5799
+ task,
5800
+ isFromLead: true,
5801
+ sendAspects,
5802
+ onClose: sendCurrentTask,
5803
+ });
5803
5804
  }
5804
5805
  else {
5805
- consentBkiDialog.open(transformedFormData.phone, profileId);
5806
- }
5807
- };
5808
- const handleSuccessVerify = async () => {
5809
- try {
5810
- const lastTaskId = await getLastTaskStatus({ profileId, programId });
5811
- if (lastTaskId) {
5812
- const task = await getTaskById({ taskId: lastTaskId });
5813
- verifyPhoneDialog.close();
5814
- draftDialog.open({
5815
- task,
5816
- isFromLead: true,
5817
- sendAspects,
5818
- onClose: sendCurrentTask,
5819
- });
5820
- }
5821
- else {
5822
- await sendCurrentTask();
5823
- }
5806
+ await sendCurrentTask();
5824
5807
  }
5825
- catch {
5826
- setOK(false);
5827
- }
5828
- };
5829
- const acceptedConsents = getAcceptedConsents(formData, productType);
5830
- verifyPhoneDialog.open({
5831
- phone: transformedFormData?.phone,
5832
- consents: acceptedConsents,
5833
- onSuccess: handleSuccessVerify,
5834
- });
5835
- endSending();
5836
- }
5808
+ }
5809
+ catch {
5810
+ setOK(false);
5811
+ }
5812
+ };
5813
+ const acceptedConsents = getAcceptedConsents(transformedFormData, productType);
5814
+ verifyPhoneDialog.open({
5815
+ phone: transformedFormData.phone,
5816
+ consents: acceptedConsents,
5817
+ onSuccess: handleSuccessVerify,
5818
+ });
5837
5819
  }
5838
5820
  catch {
5839
5821
  setOK(false);
5840
5822
  }
5841
- }, [esiaError]);
5823
+ finally {
5824
+ endSending();
5825
+ }
5826
+ }, []);
5842
5827
  return { isSending, ok, handleSubmit };
5843
5828
  };
5844
5829
  const getAcceptedConsents = (formData, productType) => {
@@ -5927,7 +5912,10 @@
5927
5912
  }
5928
5913
  }, [target, key]);
5929
5914
 
5930
- const updateProfileEsia = (body) => fetchRetailJSON('/esia/updateProfileEsia', 'POST', body);
5915
+ const esiaRequestProfile = (body) => fetchRetailJSON('/esia/requestProfile', 'POST', body).then((res) => {
5916
+ saveToken(res);
5917
+ return res;
5918
+ });
5931
5919
 
5932
5920
  const initialFormState = {
5933
5921
  surname: '',
@@ -5945,19 +5933,24 @@
5945
5933
  consentPhotoFlg: false,
5946
5934
  consentFATCA: false,
5947
5935
  };
5948
- const getInitialFormState$1 = (inputs, savedForm) => {
5936
+ const getInitialFormState$1 = (inputs, savedForm, esiaAuthSuccess) => {
5949
5937
  if (savedForm) {
5950
- return { ...savedForm, limitedBirthday: new Date(savedForm?.limitedBirthday || 0) };
5938
+ return {
5939
+ ...savedForm,
5940
+ limitedBirthday: new Date(savedForm?.limitedBirthday || 0),
5941
+ ...(!esiaAuthSuccess && {
5942
+ esiaAccountTypeCd: { key: '' },
5943
+ }),
5944
+ };
5951
5945
  }
5952
5946
  const formState = Object.fromEntries(inputs.map((_) => [_.name, initialFormState[_.name || '']]));
5953
5947
  return { ...formState };
5954
5948
  };
5955
5949
 
5956
- const uploadFile = async (file, taskId, documentCategory) => {
5950
+ const uploadFile = async (file, documentCategory, isPDF = false) => {
5957
5951
  const fd = new FormData();
5958
- fd.append('taskId', taskId);
5959
5952
  fd.append('documentCategory', documentCategory);
5960
- fd.append('file', file, 'file.pdf');
5953
+ fd.append('file', file, `file.${isPDF ? 'pdf' : 'xml'}`);
5961
5954
  const res = await globalThis
5962
5955
  ?.fetch?.(`/light-api-cash/v1/file`, {
5963
5956
  method: 'POST',
@@ -5971,23 +5964,13 @@
5971
5964
  return res;
5972
5965
  };
5973
5966
 
5974
- const parseEsiaProfile = async (esiaProfile, taskId, isDebit) => {
5975
- isDebit ? checkEsiaDataForDebit(esiaProfile) : checkEsiaDataForCredit(esiaProfile);
5967
+ const parseEsiaProfile = async (esiaProfile, isDebit) => {
5968
+ checkEsiaData(esiaProfile);
5969
+ const isFullEsiaData = !isDebit && checkEsiaAdditionalDocument(esiaProfile);
5976
5970
  const { profile, addInfo, document, addressRegistration, addressFact, esiaAdditionalDocument } = esiaProfile;
5977
- const files = [];
5978
- if (!isDebit) {
5979
- await saveDocument({
5980
- document: esiaAdditionalDocument.pdfFileWorkbook,
5981
- taskId,
5982
- category: 'CONFIRMING_INCOME_DOC',
5983
- files,
5984
- });
5985
- await saveDocument({
5986
- document: esiaAdditionalDocument.pdfFilePayout,
5987
- taskId,
5988
- category: 'CONFIRMING_EMPLOYMENT_DOC',
5989
- files,
5990
- });
5971
+ let files = [];
5972
+ if (isFullEsiaData) {
5973
+ files = await saveDocuments(esiaAdditionalDocument);
5991
5974
  }
5992
5975
  const mainData = {
5993
5976
  name: profile.name,
@@ -6004,11 +5987,11 @@
6004
5987
  birthPlace: addInfo.birthPlace,
6005
5988
  addressRegistration: buildAddress(addressRegistration),
6006
5989
  addressFact: buildAddress(addressFact),
6007
- esiaAccountTypeCd: profile.esiaAccountType,
5990
+ esiaAccountTypeCd: isDebit ? profile.esiaAccountType : { key: '' },
6008
5991
  };
6009
5992
  return {
6010
5993
  ...mainData,
6011
- ...(!isDebit && {
5994
+ ...(isFullEsiaData && {
6012
5995
  snils: addInfo.snils,
6013
5996
  inn: esiaAdditionalDocument.inn,
6014
5997
  wages: Math.floor(esiaAdditionalDocument.averageMonthlyIncome)?.toString(),
@@ -6017,6 +6000,9 @@
6017
6000
  generalSeniority: getYearFromMonth(esiaAdditionalDocument.workLength).toString(),
6018
6001
  lastJobExperience: getYearFromMonth(esiaAdditionalDocument.workLengthLastJob).toString(),
6019
6002
  jobsNumber: esiaAdditionalDocument.jobsNumberInFiveYears.toString(),
6003
+ esiaAccountTypeCd: profile.esiaAccountType,
6004
+ confirmationIncome: { key: 'SFR_CERTIFICATE', text: 'Запрос Банком доходов из СФР' },
6005
+ employment: { key: 'WORK', text: 'Работаю' },
6020
6006
  files,
6021
6007
  }),
6022
6008
  };
@@ -6049,43 +6035,60 @@
6049
6035
  };
6050
6036
  };
6051
6037
  const getYearFromMonth = (month) => Math.floor(month / 12);
6052
- const saveDocument = async ({ document, taskId, category, files, }) => {
6053
- await fetch(`data:application/pdf;base64,${document}`)
6054
- .then((res) => res.blob())
6055
- .then((value) => uploadFile(value, taskId, category))
6056
- .then((file) => files.push(file));
6057
- };
6058
- const checkEsiaDataForCredit = (esiaProfile) => {
6059
- const { profile, document, addressRegistration, esiaAdditionalDocument } = esiaProfile;
6060
- const data = [
6061
- profile.name,
6062
- profile.surname,
6063
- profile.midname,
6064
- profile.birthDate,
6065
- profile.phone,
6066
- profile.email,
6067
- document.dulIssueDate,
6068
- document.dulIssuedBy,
6069
- document.dulNumber,
6070
- document.dulSerie,
6071
- document.dulSubdivisionCode,
6072
- addressRegistration,
6073
- profile.esiaAccountType,
6074
- esiaAdditionalDocument.inn,
6075
- esiaAdditionalDocument.averageMonthlyIncome.toString(),
6076
- esiaAdditionalDocument.startWorkDate,
6077
- esiaAdditionalDocument.workLengthInFiveYears.toString(),
6078
- esiaAdditionalDocument.workLength.toString(),
6079
- esiaAdditionalDocument.workLengthLastJob.toString(),
6080
- esiaAdditionalDocument.jobsNumberInFiveYears.toString(),
6081
- esiaAdditionalDocument.pdfFilePayout,
6082
- esiaAdditionalDocument.pdfFileWorkbook,
6038
+ const saveDocuments = async (esiaAdditionalDocument) => {
6039
+ const files = [];
6040
+ const documents = [
6041
+ {
6042
+ file: esiaAdditionalDocument.pdfFileWorkbook,
6043
+ category: 'CONFIRMING_INCOME_DOC',
6044
+ isPDF: true,
6045
+ },
6046
+ {
6047
+ file: esiaAdditionalDocument.pdfFilePayout,
6048
+ category: 'CONFIRMING_EMPLOYMENT_DOC',
6049
+ isPDF: true,
6050
+ },
6051
+ {
6052
+ file: esiaAdditionalDocument.pdfFileSigPayout,
6053
+ category: 'CONFIRMING_EMPLOYMENT_DOC',
6054
+ isPDF: true,
6055
+ },
6056
+ {
6057
+ file: esiaAdditionalDocument.xmlFilePayout,
6058
+ category: 'CONFIRMING_EMPLOYMENT_DOC',
6059
+ isPDF: false,
6060
+ },
6061
+ {
6062
+ file: esiaAdditionalDocument.xmlFileSigPayout,
6063
+ category: 'CONFIRMING_EMPLOYMENT_DOC',
6064
+ isPDF: false,
6065
+ },
6066
+ {
6067
+ file: esiaAdditionalDocument.xmlFileWorkbook,
6068
+ category: 'CONFIRMING_INCOME_DOC',
6069
+ isPDF: false,
6070
+ },
6071
+ {
6072
+ file: esiaAdditionalDocument.pdfFileSigWorkbook,
6073
+ category: 'CONFIRMING_INCOME_DOC',
6074
+ isPDF: true,
6075
+ },
6076
+ {
6077
+ file: esiaAdditionalDocument.xmlFileSigWorkbook,
6078
+ category: 'CONFIRMING_INCOME_DOC',
6079
+ isPDF: false,
6080
+ },
6083
6081
  ];
6084
- if (!data.every((_) => Boolean(_))) {
6085
- throw new Error();
6082
+ for (const doc of documents) {
6083
+ const contentType = doc.isPDF ? 'data:application/pdf;base64' : 'data:application/xml;base64';
6084
+ await fetch(`${contentType},${doc.file}`)
6085
+ .then((res) => res.blob())
6086
+ .then((value) => uploadFile(value, doc.category, doc.isPDF))
6087
+ .then((file) => files.push(file));
6086
6088
  }
6089
+ return files;
6087
6090
  };
6088
- const checkEsiaDataForDebit = (esiaProfile) => {
6091
+ const checkEsiaData = (esiaProfile) => {
6089
6092
  const { profile, document, addressRegistration } = esiaProfile;
6090
6093
  const data = [
6091
6094
  profile.name,
@@ -6093,7 +6096,6 @@
6093
6096
  profile.midname,
6094
6097
  profile.birthDate,
6095
6098
  profile.phone,
6096
- profile.email,
6097
6099
  document.dulIssueDate,
6098
6100
  document.dulIssuedBy,
6099
6101
  document.dulNumber,
@@ -6102,79 +6104,101 @@
6102
6104
  addressRegistration,
6103
6105
  profile.esiaAccountType,
6104
6106
  ];
6105
- if (!data.every((_) => Boolean(_))) {
6107
+ if (!data.every(Boolean)) {
6106
6108
  throw new Error();
6107
6109
  }
6108
6110
  };
6111
+ const checkEsiaAdditionalDocument = (esiaProfile) => {
6112
+ const { esiaAdditionalDocument } = esiaProfile;
6113
+ const data = [
6114
+ esiaAdditionalDocument?.inn,
6115
+ esiaAdditionalDocument?.averageMonthlyIncome?.toString(),
6116
+ esiaAdditionalDocument?.startWorkDate,
6117
+ esiaAdditionalDocument?.workLengthInFiveYears?.toString(),
6118
+ esiaAdditionalDocument?.workLength?.toString(),
6119
+ esiaAdditionalDocument?.workLengthLastJob?.toString(),
6120
+ esiaAdditionalDocument?.jobsNumberInFiveYears?.toString(),
6121
+ esiaAdditionalDocument?.pdfFilePayout,
6122
+ esiaAdditionalDocument?.pdfFileWorkbook,
6123
+ esiaAdditionalDocument?.pdfFileSigPayout,
6124
+ esiaAdditionalDocument?.xmlFilePayout,
6125
+ esiaAdditionalDocument?.xmlFileSigPayout,
6126
+ esiaAdditionalDocument?.xmlFileWorkbook,
6127
+ esiaAdditionalDocument?.pdfFileSigWorkbook,
6128
+ esiaAdditionalDocument?.xmlFileSigWorkbook,
6129
+ ];
6130
+ return data.every(Boolean);
6131
+ };
6109
6132
 
6110
- const useInitApplicationLead = ({ inputs, nextStepLink, productType, setEsiaError, }) => {
6111
- const navigator = locationNavigator();
6112
- const [isLoading, { setTrue: startLoading, setFalse: endLoading }] = useBool(false);
6133
+ const useInitApplicationLead = ({ inputs, productType, setEsiaStatus, esiaAuthSuccess, }) => {
6113
6134
  const leadFormStore = useLeadFormStore();
6114
6135
  const saveForm = useSetter(leadFormStore, 'leadForm');
6115
- const initialFormState = useMemo(() => getInitialFormState$1(inputs, leadFormStore.leadForm), [inputs, leadFormStore.leadForm]);
6116
- const updateEsiaProfile = useCallback(async (profileId, code, state) => {
6117
- startLoading();
6136
+ const initialFormState = useMemo(() => getInitialFormState$1(inputs, leadFormStore.leadForm, esiaAuthSuccess), [inputs, leadFormStore.leadForm]);
6137
+ const requestEsiaProfile = useCallback(async (code, state) => {
6138
+ setEsiaStatus(EsiaStatuses.Pending);
6118
6139
  try {
6119
- const data = await updateProfileEsia({
6120
- profileId,
6140
+ const data = await esiaRequestProfile({
6121
6141
  code,
6122
6142
  state,
6123
6143
  redirectUri: globalThis.location?.href,
6144
+ authorize: true,
6124
6145
  });
6125
- if (data && leadFormStore?.taskId) {
6126
- const parsedData = await parseEsiaProfile(data, leadFormStore.taskId.toString(), productType === 'debitCard');
6146
+ if (data) {
6147
+ const parsedData = await parseEsiaProfile(data, productType === 'debitCard');
6127
6148
  saveForm((_) => ({
6128
6149
  ..._,
6129
6150
  ...parsedData,
6130
6151
  }));
6152
+ setEsiaStatus(EsiaStatuses.Success);
6131
6153
  }
6132
- navigator.assign(nextStepLink);
6133
6154
  }
6134
6155
  catch {
6135
- setEsiaError();
6156
+ setEsiaStatus(EsiaStatuses.Error);
6136
6157
  }
6137
- finally {
6138
- endLoading();
6139
- }
6140
- }, [nextStepLink]);
6158
+ }, []);
6141
6159
  useEffect(() => {
6142
6160
  leadFormStore.productType = productType;
6143
- const profileId = (safeJsonParse(globalThis.localStorage?.getItem('profileId') ?? ''));
6144
6161
  const params = new URLSearchParams(decodeURIComponent(globalThis.location?.search));
6145
6162
  const code = params.get('code');
6146
6163
  const state = params.get('state');
6147
- if (profileId && code && state) {
6148
- updateEsiaProfile(profileId, code, state);
6164
+ if (code && state) {
6165
+ requestEsiaProfile(code, state);
6149
6166
  }
6150
6167
  else {
6151
6168
  sessionStorage.removeItem('accessToken');
6152
6169
  sessionStorage.removeItem('refreshToken');
6153
6170
  }
6154
6171
  }, []);
6155
- return [initialFormState, { isLoading }];
6172
+ return initialFormState;
6156
6173
  };
6157
6174
 
6175
+ var EsiaStatuses;
6176
+ (function (EsiaStatuses) {
6177
+ EsiaStatuses["Success"] = "SUCCESS";
6178
+ EsiaStatuses["Error"] = "ERROR";
6179
+ EsiaStatuses["Pending"] = "PENDING";
6180
+ })(EsiaStatuses || (EsiaStatuses = {}));
6158
6181
  const ApplicationLeadForm = JSX(({ className, title, programId = '', nextStepLink = '/credit-lead', button, productType = 'credit', data, ...rest }) => {
6159
- const [esiaError, { setTrue: setEsiaError }] = useBool(false);
6182
+ const [esiaStatus, setEsiaStatus] = useState();
6183
+ const leadForm = useRef(null);
6160
6184
  const applicationFormData = useMemo(() => getApplicationFormData(productType), [productType]);
6161
6185
  const inputs = useMemo(() => getInputs(applicationFormData), [applicationFormData]);
6162
6186
  const extendedValidatorObj = useMemo(() => getExtendedValidatorObj(productType), [productType]);
6163
6187
  const formValidator = useMemo(() => getFormValidator(inputs, extendedValidatorObj), [inputs, extendedValidatorObj]);
6164
- const [initialFormState, { isLoading }] = useInitApplicationLead({
6188
+ const initialFormState = useInitApplicationLead({
6165
6189
  inputs,
6166
6190
  nextStepLink,
6167
6191
  productType,
6168
- setEsiaError,
6192
+ setEsiaStatus,
6193
+ esiaAuthSuccess: esiaStatus === EsiaStatuses.Success,
6169
6194
  });
6170
6195
  const { isSending, ok, handleSubmit } = useApplicationLeadApi({
6171
6196
  programId,
6172
6197
  nextStepLink,
6173
6198
  productType,
6174
- esiaError,
6175
6199
  data,
6176
6200
  });
6177
- const [, { field, onSubmit }] = useForm(initialFormState, {
6201
+ const [, { field, onSubmit, reset }] = useForm(initialFormState, {
6178
6202
  formValidator,
6179
6203
  onSubmit: handleSubmit,
6180
6204
  });
@@ -6184,7 +6208,17 @@
6184
6208
  responseTypeDialog.open({ ok });
6185
6209
  }
6186
6210
  }, [ok]);
6187
- return (jsx(ApplicationFormLayout, { className: style('container space-y-m', className), title: title, ...rest, children: jsxs("form", { onSubmit: onSubmit, className: "space-y-m relative", children: [isLoading ? jsx(Loader, { blur: false }) : null, applicationFormData.map((_, i) => (jsxs("div", { className: style(inputColumnStyles(_.columns), 'grid gap-x-m'), children: [renderTitle(_.title), renderInputs$1({ field, inputs: _?.inputs }, productType)] }, `section-${i}`))), renderSubmitButton(button, isSending), esiaError ? (jsx(Text, { size: "text-m", font: "font-medium", color: "text-error", children: "\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0413\u043E\u0441\u0443\u0441\u043B\u0443\u0433\u0438 \u0434\u043B\u044F \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u044F \u0437\u0430\u044F\u0432\u043A\u0438 \u043D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E, \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E \u0437\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u044C \u043F\u043E\u043B\u044F \u0432\u0440\u0443\u0447\u043D\u0443\u044E." })) : null] }) }));
6211
+ useEffect(() => {
6212
+ if (esiaStatus && leadForm?.current) {
6213
+ leadForm.current.scrollIntoView({
6214
+ block: 'start',
6215
+ });
6216
+ }
6217
+ if (esiaStatus === EsiaStatuses.Success) {
6218
+ reset();
6219
+ }
6220
+ }, [leadForm?.current, esiaStatus]);
6221
+ return (jsxs(ApplicationFormLayout, { className: style('container space-y-m', className), title: title, ...rest, children: [!esiaStatus ? jsx(EsiaLoginBanner, {}) : null, jsxs("form", { onSubmit: onSubmit, className: "space-y-m relative", ref: leadForm, children: [esiaStatus === EsiaStatuses.Pending ? jsx(Loader, { blur: false }) : null, applicationFormData.map((_, i) => (jsxs("div", { className: style(inputColumnStyles(_.columns), 'grid gap-x-m'), children: [renderTitle(_.title), renderInputs$1({ field, inputs: _?.inputs }, productType)] }, `section-${i}`))), renderSubmitButton(button, isSending), esiaStatus === EsiaStatuses.Error ? (jsx(Text, { size: "text-m", font: "font-medium", color: "text-error", children: "\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0413\u043E\u0441\u0443\u0441\u043B\u0443\u0433\u0438 \u0434\u043B\u044F \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u044F \u0437\u0430\u044F\u0432\u043A\u0438 \u043D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E, \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E \u0437\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u044C \u043F\u043E\u043B\u044F \u0432\u0440\u0443\u0447\u043D\u0443\u044E." })) : null] })] }));
6188
6222
  });
6189
6223
  const getInputs = (applicationFormData) => (applicationFormData?.flatMap((_) => _?.inputs) || []);
6190
6224
  const getExtendedValidatorObj = (productType) => ({
@@ -7888,6 +7922,7 @@
7888
7922
  mandatoryPayments: undefined,
7889
7923
  snils: '',
7890
7924
  armyIdFlg: false,
7925
+ esiaAccountTypeCd: { key: '', text: '' },
7891
7926
  },
7892
7927
  {
7893
7928
  bankruptcyFlg: false,
@@ -8282,7 +8317,7 @@
8282
8317
  label: 'Телефон работодателя',
8283
8318
  required: true,
8284
8319
  },
8285
- { name: 'beginDate', required: true },
8320
+ { name: 'beginDate', required: true, filledByEsia: true },
8286
8321
  ],
8287
8322
  },
8288
8323
  {
@@ -8324,16 +8359,22 @@
8324
8359
  title: 'Совокупный доход',
8325
8360
  },
8326
8361
  {
8362
+ columns: 1,
8327
8363
  inputs: [
8328
8364
  {
8329
- name: 'infoCard',
8330
- label: 'Сумма основного и дополнительных доходов после вычета налога',
8365
+ name: 'confirmationIncome',
8366
+ required: true,
8367
+ filledByEsia: true,
8331
8368
  },
8332
8369
  ],
8333
8370
  },
8334
8371
  {
8335
- columns: 1,
8336
- inputs: [{ name: 'confirmationIncome', required: true }],
8372
+ inputs: [
8373
+ {
8374
+ name: 'infoCard',
8375
+ label: 'Сумма основного и дополнительных доходов после вычета налога',
8376
+ },
8377
+ ],
8337
8378
  },
8338
8379
  {
8339
8380
  columns: 1,
@@ -10929,7 +10970,7 @@
10929
10970
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
10930
10971
  });
10931
10972
 
10932
- const packageVersion = "0.14.825";
10973
+ const packageVersion = "0.14.826";
10933
10974
 
10934
10975
  exports.Blocks = Blocks;
10935
10976
  exports.ContentPage = ContentPage;