@redneckz/wildless-cms-uni-blocks 0.14.797 → 0.14.798

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 (277) hide show
  1. package/bundle/bundle.umd.js +180 -63
  2. package/bundle/bundle.umd.min.js +1 -1
  3. package/bundle/components/ApplicationLeadForm/{pasreEsiaProfile.d.ts → parseEsiaProfile.d.ts} +1 -1
  4. package/bundle/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -1
  5. package/bundle/components/ApplicationLeadForm/useInitApplicationLead.d.ts +8 -1
  6. package/bundle/retail/api/doRequest.d.ts +3 -0
  7. package/bundle/retail/api/updateUserTask.d.ts +2 -0
  8. package/bundle/retail/api/uploadFile.d.ts +3 -0
  9. package/bundle/retail/model/LeadFormState.d.ts +13 -0
  10. package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +11 -2
  11. package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  12. package/dist/components/ApplicationLeadForm/{pasreEsiaProfile.d.ts → parseEsiaProfile.d.ts} +1 -1
  13. package/dist/components/ApplicationLeadForm/parseEsiaProfile.js +141 -0
  14. package/dist/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -0
  15. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -1
  16. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +8 -2
  17. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  18. package/dist/components/ApplicationLeadForm/useInitApplicationLead.d.ts +8 -1
  19. package/dist/components/ApplicationLeadForm/useInitApplicationLead.js +8 -4
  20. package/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  21. package/dist/components/CreditCardForm/getCreditCardFormTaskData.js +1 -0
  22. package/dist/components/CreditCardForm/getCreditCardFormTaskData.js.map +1 -1
  23. package/dist/retail/adaptors/getCreditFormTaskData.js +1 -0
  24. package/dist/retail/adaptors/getCreditFormTaskData.js.map +1 -1
  25. package/dist/retail/api/doRequest.d.ts +3 -0
  26. package/dist/retail/api/doRequest.js +3 -2
  27. package/dist/retail/api/doRequest.js.map +1 -1
  28. package/dist/retail/api/updateUserTask.d.ts +2 -0
  29. package/dist/retail/api/updateUserTask.js.map +1 -1
  30. package/dist/retail/api/uploadFile.d.ts +3 -0
  31. package/dist/retail/api/uploadFile.js +22 -0
  32. package/dist/retail/api/uploadFile.js.map +1 -0
  33. package/dist/retail/components/EsiaLoginDialog/EsiaLoginDialog.js +1 -0
  34. package/dist/retail/components/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
  35. package/dist/retail/components/Fields/DaDataInnField.js +10 -8
  36. package/dist/retail/components/Fields/DaDataInnField.js.map +1 -1
  37. package/dist/retail/components/Fields/Experience5YearsField.js +2 -1
  38. package/dist/retail/components/Fields/Experience5YearsField.js.map +1 -1
  39. package/dist/retail/components/Fields/GeneralSeniorityField.js +2 -1
  40. package/dist/retail/components/Fields/GeneralSeniorityField.js.map +1 -1
  41. package/dist/retail/components/Fields/JobsNumberField.js +2 -1
  42. package/dist/retail/components/Fields/JobsNumberField.js.map +1 -1
  43. package/dist/retail/components/Fields/LastJobExperienceField.js +2 -1
  44. package/dist/retail/components/Fields/LastJobExperienceField.js.map +1 -1
  45. package/dist/retail/components/Fields/OrganizationNameField.js +2 -1
  46. package/dist/retail/components/Fields/OrganizationNameField.js.map +1 -1
  47. package/dist/retail/components/Fields/WagesField.js +2 -1
  48. package/dist/retail/components/Fields/WagesField.js.map +1 -1
  49. package/dist/retail/content.js +8 -8
  50. package/dist/retail/content.js.map +1 -1
  51. package/dist/retail/model/LeadFormState.d.ts +13 -0
  52. package/dist/retail/utils/updateOrganizationFields.js +3 -1
  53. package/dist/retail/utils/updateOrganizationFields.js.map +1 -1
  54. package/dist/ui-kit/FormField/Fields/MiddleNameField.js +2 -1
  55. package/dist/ui-kit/FormField/Fields/MiddleNameField.js.map +1 -1
  56. package/dist/ui-kit/FormField/Fields/NameField.js +2 -1
  57. package/dist/ui-kit/FormField/Fields/NameField.js.map +1 -1
  58. package/dist/ui-kit/FormField/Fields/SurnameField.js +2 -1
  59. package/dist/ui-kit/FormField/Fields/SurnameField.js.map +1 -1
  60. package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +11 -2
  61. package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  62. package/lib/components/ApplicationLeadForm/{pasreEsiaProfile.d.ts → parseEsiaProfile.d.ts} +1 -1
  63. package/lib/components/ApplicationLeadForm/parseEsiaProfile.js +138 -0
  64. package/lib/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -0
  65. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -1
  66. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +8 -2
  67. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  68. package/lib/components/ApplicationLeadForm/useInitApplicationLead.d.ts +8 -1
  69. package/lib/components/ApplicationLeadForm/useInitApplicationLead.js +8 -4
  70. package/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  71. package/lib/components/CreditCardForm/getCreditCardFormTaskData.js +1 -0
  72. package/lib/components/CreditCardForm/getCreditCardFormTaskData.js.map +1 -1
  73. package/lib/retail/adaptors/getCreditFormTaskData.js +1 -0
  74. package/lib/retail/adaptors/getCreditFormTaskData.js.map +1 -1
  75. package/lib/retail/api/doRequest.d.ts +3 -0
  76. package/lib/retail/api/doRequest.js +1 -1
  77. package/lib/retail/api/doRequest.js.map +1 -1
  78. package/lib/retail/api/updateUserTask.d.ts +2 -0
  79. package/lib/retail/api/updateUserTask.js.map +1 -1
  80. package/lib/retail/api/uploadFile.d.ts +3 -0
  81. package/lib/retail/api/uploadFile.js +19 -0
  82. package/lib/retail/api/uploadFile.js.map +1 -0
  83. package/lib/retail/components/EsiaLoginDialog/EsiaLoginDialog.js +1 -0
  84. package/lib/retail/components/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
  85. package/lib/retail/components/Fields/DaDataInnField.js +10 -8
  86. package/lib/retail/components/Fields/DaDataInnField.js.map +1 -1
  87. package/lib/retail/components/Fields/Experience5YearsField.js +2 -1
  88. package/lib/retail/components/Fields/Experience5YearsField.js.map +1 -1
  89. package/lib/retail/components/Fields/GeneralSeniorityField.js +2 -1
  90. package/lib/retail/components/Fields/GeneralSeniorityField.js.map +1 -1
  91. package/lib/retail/components/Fields/JobsNumberField.js +2 -1
  92. package/lib/retail/components/Fields/JobsNumberField.js.map +1 -1
  93. package/lib/retail/components/Fields/LastJobExperienceField.js +2 -1
  94. package/lib/retail/components/Fields/LastJobExperienceField.js.map +1 -1
  95. package/lib/retail/components/Fields/OrganizationNameField.js +2 -1
  96. package/lib/retail/components/Fields/OrganizationNameField.js.map +1 -1
  97. package/lib/retail/components/Fields/WagesField.js +2 -1
  98. package/lib/retail/components/Fields/WagesField.js.map +1 -1
  99. package/lib/retail/content.js +8 -8
  100. package/lib/retail/content.js.map +1 -1
  101. package/lib/retail/model/LeadFormState.d.ts +13 -0
  102. package/lib/retail/utils/updateOrganizationFields.js +3 -1
  103. package/lib/retail/utils/updateOrganizationFields.js.map +1 -1
  104. package/lib/ui-kit/FormField/Fields/MiddleNameField.js +2 -1
  105. package/lib/ui-kit/FormField/Fields/MiddleNameField.js.map +1 -1
  106. package/lib/ui-kit/FormField/Fields/NameField.js +2 -1
  107. package/lib/ui-kit/FormField/Fields/NameField.js.map +1 -1
  108. package/lib/ui-kit/FormField/Fields/SurnameField.js +2 -1
  109. package/lib/ui-kit/FormField/Fields/SurnameField.js.map +1 -1
  110. package/mobile/bundle/bundle.umd.js +180 -63
  111. package/mobile/bundle/bundle.umd.min.js +1 -1
  112. package/mobile/bundle/components/ApplicationLeadForm/{pasreEsiaProfile.d.ts → parseEsiaProfile.d.ts} +1 -1
  113. package/mobile/bundle/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -1
  114. package/mobile/bundle/components/ApplicationLeadForm/useInitApplicationLead.d.ts +8 -1
  115. package/mobile/bundle/retail/api/doRequest.d.ts +3 -0
  116. package/mobile/bundle/retail/api/updateUserTask.d.ts +2 -0
  117. package/mobile/bundle/retail/api/uploadFile.d.ts +3 -0
  118. package/mobile/bundle/retail/model/LeadFormState.d.ts +13 -0
  119. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +11 -2
  120. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  121. package/mobile/dist/components/ApplicationLeadForm/parseEsiaProfile.d.ts +3 -0
  122. package/mobile/dist/components/ApplicationLeadForm/parseEsiaProfile.js +141 -0
  123. package/mobile/dist/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -0
  124. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -1
  125. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +8 -2
  126. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  127. package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.d.ts +8 -1
  128. package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js +8 -4
  129. package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  130. package/mobile/dist/components/CreditCardForm/getCreditCardFormTaskData.js +1 -0
  131. package/mobile/dist/components/CreditCardForm/getCreditCardFormTaskData.js.map +1 -1
  132. package/mobile/dist/retail/adaptors/getCreditFormTaskData.js +1 -0
  133. package/mobile/dist/retail/adaptors/getCreditFormTaskData.js.map +1 -1
  134. package/mobile/dist/retail/api/doRequest.d.ts +3 -0
  135. package/mobile/dist/retail/api/doRequest.js +3 -2
  136. package/mobile/dist/retail/api/doRequest.js.map +1 -1
  137. package/mobile/dist/retail/api/updateUserTask.d.ts +2 -0
  138. package/mobile/dist/retail/api/updateUserTask.js.map +1 -1
  139. package/mobile/dist/retail/api/uploadFile.d.ts +3 -0
  140. package/mobile/dist/retail/api/uploadFile.js +22 -0
  141. package/mobile/dist/retail/api/uploadFile.js.map +1 -0
  142. package/mobile/dist/retail/components/EsiaLoginDialog/EsiaLoginDialog.js +1 -0
  143. package/mobile/dist/retail/components/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
  144. package/mobile/dist/retail/components/Fields/DaDataInnField.js +10 -8
  145. package/mobile/dist/retail/components/Fields/DaDataInnField.js.map +1 -1
  146. package/mobile/dist/retail/components/Fields/Experience5YearsField.js +2 -1
  147. package/mobile/dist/retail/components/Fields/Experience5YearsField.js.map +1 -1
  148. package/mobile/dist/retail/components/Fields/GeneralSeniorityField.js +2 -1
  149. package/mobile/dist/retail/components/Fields/GeneralSeniorityField.js.map +1 -1
  150. package/mobile/dist/retail/components/Fields/JobsNumberField.js +2 -1
  151. package/mobile/dist/retail/components/Fields/JobsNumberField.js.map +1 -1
  152. package/mobile/dist/retail/components/Fields/LastJobExperienceField.js +2 -1
  153. package/mobile/dist/retail/components/Fields/LastJobExperienceField.js.map +1 -1
  154. package/mobile/dist/retail/components/Fields/OrganizationNameField.js +2 -1
  155. package/mobile/dist/retail/components/Fields/OrganizationNameField.js.map +1 -1
  156. package/mobile/dist/retail/components/Fields/WagesField.js +2 -1
  157. package/mobile/dist/retail/components/Fields/WagesField.js.map +1 -1
  158. package/mobile/dist/retail/content.js +8 -8
  159. package/mobile/dist/retail/content.js.map +1 -1
  160. package/mobile/dist/retail/model/LeadFormState.d.ts +13 -0
  161. package/mobile/dist/retail/utils/updateOrganizationFields.js +3 -1
  162. package/mobile/dist/retail/utils/updateOrganizationFields.js.map +1 -1
  163. package/mobile/dist/ui-kit/FormField/Fields/MiddleNameField.js +2 -1
  164. package/mobile/dist/ui-kit/FormField/Fields/MiddleNameField.js.map +1 -1
  165. package/mobile/dist/ui-kit/FormField/Fields/NameField.js +2 -1
  166. package/mobile/dist/ui-kit/FormField/Fields/NameField.js.map +1 -1
  167. package/mobile/dist/ui-kit/FormField/Fields/SurnameField.js +2 -1
  168. package/mobile/dist/ui-kit/FormField/Fields/SurnameField.js.map +1 -1
  169. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +11 -2
  170. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  171. package/mobile/lib/components/ApplicationLeadForm/parseEsiaProfile.d.ts +3 -0
  172. package/mobile/lib/components/ApplicationLeadForm/parseEsiaProfile.js +138 -0
  173. package/mobile/lib/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -0
  174. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -1
  175. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +8 -2
  176. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  177. package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.d.ts +8 -1
  178. package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js +8 -4
  179. package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  180. package/mobile/lib/components/CreditCardForm/getCreditCardFormTaskData.js +1 -0
  181. package/mobile/lib/components/CreditCardForm/getCreditCardFormTaskData.js.map +1 -1
  182. package/mobile/lib/retail/adaptors/getCreditFormTaskData.js +1 -0
  183. package/mobile/lib/retail/adaptors/getCreditFormTaskData.js.map +1 -1
  184. package/mobile/lib/retail/api/doRequest.d.ts +3 -0
  185. package/mobile/lib/retail/api/doRequest.js +1 -1
  186. package/mobile/lib/retail/api/doRequest.js.map +1 -1
  187. package/mobile/lib/retail/api/updateUserTask.d.ts +2 -0
  188. package/mobile/lib/retail/api/updateUserTask.js.map +1 -1
  189. package/mobile/lib/retail/api/uploadFile.d.ts +3 -0
  190. package/mobile/lib/retail/api/uploadFile.js +19 -0
  191. package/mobile/lib/retail/api/uploadFile.js.map +1 -0
  192. package/mobile/lib/retail/components/EsiaLoginDialog/EsiaLoginDialog.js +1 -0
  193. package/mobile/lib/retail/components/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
  194. package/mobile/lib/retail/components/Fields/DaDataInnField.js +10 -8
  195. package/mobile/lib/retail/components/Fields/DaDataInnField.js.map +1 -1
  196. package/mobile/lib/retail/components/Fields/Experience5YearsField.js +2 -1
  197. package/mobile/lib/retail/components/Fields/Experience5YearsField.js.map +1 -1
  198. package/mobile/lib/retail/components/Fields/GeneralSeniorityField.js +2 -1
  199. package/mobile/lib/retail/components/Fields/GeneralSeniorityField.js.map +1 -1
  200. package/mobile/lib/retail/components/Fields/JobsNumberField.js +2 -1
  201. package/mobile/lib/retail/components/Fields/JobsNumberField.js.map +1 -1
  202. package/mobile/lib/retail/components/Fields/LastJobExperienceField.js +2 -1
  203. package/mobile/lib/retail/components/Fields/LastJobExperienceField.js.map +1 -1
  204. package/mobile/lib/retail/components/Fields/OrganizationNameField.js +2 -1
  205. package/mobile/lib/retail/components/Fields/OrganizationNameField.js.map +1 -1
  206. package/mobile/lib/retail/components/Fields/WagesField.js +2 -1
  207. package/mobile/lib/retail/components/Fields/WagesField.js.map +1 -1
  208. package/mobile/lib/retail/content.js +8 -8
  209. package/mobile/lib/retail/content.js.map +1 -1
  210. package/mobile/lib/retail/model/LeadFormState.d.ts +13 -0
  211. package/mobile/lib/retail/utils/updateOrganizationFields.js +3 -1
  212. package/mobile/lib/retail/utils/updateOrganizationFields.js.map +1 -1
  213. package/mobile/lib/ui-kit/FormField/Fields/MiddleNameField.js +2 -1
  214. package/mobile/lib/ui-kit/FormField/Fields/MiddleNameField.js.map +1 -1
  215. package/mobile/lib/ui-kit/FormField/Fields/NameField.js +2 -1
  216. package/mobile/lib/ui-kit/FormField/Fields/NameField.js.map +1 -1
  217. package/mobile/lib/ui-kit/FormField/Fields/SurnameField.js +2 -1
  218. package/mobile/lib/ui-kit/FormField/Fields/SurnameField.js.map +1 -1
  219. package/mobile/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +13 -2
  220. package/mobile/src/components/ApplicationLeadForm/parseEsiaProfile.ts +185 -0
  221. package/mobile/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +64 -52
  222. package/mobile/src/components/ApplicationLeadForm/useInitApplicationLead.ts +24 -8
  223. package/mobile/src/components/CreditCardForm/getCreditCardFormTaskData.ts +1 -0
  224. package/mobile/src/retail/adaptors/getCreditFormTaskData.ts +1 -0
  225. package/mobile/src/retail/api/doRequest.ts +1 -1
  226. package/mobile/src/retail/api/updateUserTask.ts +3 -0
  227. package/mobile/src/retail/api/uploadFile.ts +28 -0
  228. package/mobile/src/retail/components/EsiaLoginDialog/EsiaLoginDialog.tsx +1 -0
  229. package/mobile/src/retail/components/Fields/DaDataInnField.tsx +12 -7
  230. package/mobile/src/retail/components/Fields/Experience5YearsField.tsx +2 -0
  231. package/mobile/src/retail/components/Fields/GeneralSeniorityField.tsx +2 -0
  232. package/mobile/src/retail/components/Fields/JobsNumberField.tsx +2 -0
  233. package/mobile/src/retail/components/Fields/LastJobExperienceField.tsx +2 -0
  234. package/mobile/src/retail/components/Fields/OrganizationNameField.tsx +2 -0
  235. package/mobile/src/retail/components/Fields/WagesField.tsx +2 -0
  236. package/mobile/src/retail/content.tsx +8 -8
  237. package/mobile/src/retail/model/LeadFormState.ts +14 -0
  238. package/mobile/src/retail/utils/updateOrganizationFields.ts +3 -1
  239. package/mobile/src/ui-kit/FormField/Fields/MiddleNameField.tsx +2 -0
  240. package/mobile/src/ui-kit/FormField/Fields/NameField.tsx +8 -1
  241. package/mobile/src/ui-kit/FormField/Fields/SurnameField.tsx +8 -1
  242. package/package.json +2 -2
  243. package/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +13 -2
  244. package/src/components/ApplicationLeadForm/parseEsiaProfile.ts +185 -0
  245. package/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +64 -52
  246. package/src/components/ApplicationLeadForm/useInitApplicationLead.ts +24 -8
  247. package/src/components/CreditCardForm/getCreditCardFormTaskData.ts +1 -0
  248. package/src/retail/adaptors/getCreditFormTaskData.ts +1 -0
  249. package/src/retail/api/doRequest.ts +1 -1
  250. package/src/retail/api/updateUserTask.ts +3 -0
  251. package/src/retail/api/uploadFile.ts +28 -0
  252. package/src/retail/components/EsiaLoginDialog/EsiaLoginDialog.tsx +1 -0
  253. package/src/retail/components/Fields/DaDataInnField.tsx +12 -7
  254. package/src/retail/components/Fields/Experience5YearsField.tsx +2 -0
  255. package/src/retail/components/Fields/GeneralSeniorityField.tsx +2 -0
  256. package/src/retail/components/Fields/JobsNumberField.tsx +2 -0
  257. package/src/retail/components/Fields/LastJobExperienceField.tsx +2 -0
  258. package/src/retail/components/Fields/OrganizationNameField.tsx +2 -0
  259. package/src/retail/components/Fields/WagesField.tsx +2 -0
  260. package/src/retail/content.tsx +8 -8
  261. package/src/retail/model/LeadFormState.ts +14 -0
  262. package/src/retail/utils/updateOrganizationFields.ts +3 -1
  263. package/src/ui-kit/FormField/Fields/MiddleNameField.tsx +2 -0
  264. package/src/ui-kit/FormField/Fields/NameField.tsx +8 -1
  265. package/src/ui-kit/FormField/Fields/SurnameField.tsx +8 -1
  266. package/dist/components/ApplicationLeadForm/pasreEsiaProfile.js +0 -63
  267. package/dist/components/ApplicationLeadForm/pasreEsiaProfile.js.map +0 -1
  268. package/lib/components/ApplicationLeadForm/pasreEsiaProfile.js +0 -60
  269. package/lib/components/ApplicationLeadForm/pasreEsiaProfile.js.map +0 -1
  270. package/mobile/dist/components/ApplicationLeadForm/pasreEsiaProfile.d.ts +0 -3
  271. package/mobile/dist/components/ApplicationLeadForm/pasreEsiaProfile.js +0 -63
  272. package/mobile/dist/components/ApplicationLeadForm/pasreEsiaProfile.js.map +0 -1
  273. package/mobile/lib/components/ApplicationLeadForm/pasreEsiaProfile.d.ts +0 -3
  274. package/mobile/lib/components/ApplicationLeadForm/pasreEsiaProfile.js +0 -60
  275. package/mobile/lib/components/ApplicationLeadForm/pasreEsiaProfile.js.map +0 -1
  276. package/mobile/src/components/ApplicationLeadForm/pasreEsiaProfile.ts +0 -82
  277. package/src/components/ApplicationLeadForm/pasreEsiaProfile.ts +0 -82
@@ -1970,9 +1970,12 @@
1970
1970
  return (jsx(SelectControl, { label: "\u041D\u0430\u0441\u0435\u043B\u0435\u043D\u043D\u044B\u0439 \u043F\u0443\u043D\u043A\u0442", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0433\u043E\u0440\u043E\u0434, \u0433\u0434\u0435 \u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D \u0441\u0435\u0440\u0432\u0438\u0441", options: localities, ...field(input?.name ?? ''), isSearch: true }));
1971
1971
  });
1972
1972
 
1973
- 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, ...field(input?.name ?? ''), ...input })));
1973
+ const ESIA_FIELD_NAME = 'esiaAccountTypeCd';
1974
+ const isEsiaAuthorize = (field, name) => Boolean(field(ESIA_FIELD_NAME)?.value?.key) && field(name).value;
1975
+
1976
+ 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 })));
1974
1977
 
1975
- const NameField$1 = JSX(({ field, input }) => (jsx(InputControl, { label: "\u0418\u043C\u044F", maxLength: 60, ...field(input?.name ?? ''), ...input })));
1978
+ 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 })));
1976
1979
 
1977
1980
  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] })));
1978
1981
 
@@ -2152,7 +2155,7 @@
2152
2155
  ];
2153
2156
  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') })));
2154
2157
 
2155
- const SurnameField$1 = JSX(({ field, input }) => (jsx(InputControl, { label: "\u0424\u0430\u043C\u0438\u043B\u0438\u044F", maxLength: 60, ...field(input?.name ?? ''), ...input })));
2158
+ 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 })));
2156
2159
 
2157
2160
  const MIN_CREDIT_TERM = 1;
2158
2161
  const MAX_CREDIT_TERM = 180;
@@ -2854,9 +2857,6 @@
2854
2857
  const normalizeInteger = (val = '') => val.replace(/[^\d]+/g, '');
2855
2858
  const getPlaceholder = (placeholder, errors, label) => errors && !label ? `${placeholder}*` : placeholder;
2856
2859
 
2857
- const ESIA_FIELD_NAME = 'esiaAccountTypeCd';
2858
- const isEsiaAuthorize = (field, name) => Boolean(field(ESIA_FIELD_NAME)?.value?.key) && field(name).value;
2859
-
2860
2860
  const AddressField = JSX(({ field, input }) => {
2861
2861
  const fieldName = input?.name || 'addressRegistration';
2862
2862
  const fieldValue = field(fieldName).value;
@@ -4349,7 +4349,7 @@
4349
4349
  .find((_) => _.key === key) ?? null;
4350
4350
 
4351
4351
  const updateOrganizationFields = (store, field, item) => {
4352
- const { okved, okopf, inn } = getOrganizationRequisites(item);
4352
+ const { okved, okopf, inn, organizationName } = getOrganizationRequisites(item);
4353
4353
  field?.('legalForm')?.onChange?.(item.data?.opf?.short);
4354
4354
  field?.('organizationAddress')?.onChange?.(getAddressFromDaDataItem(item.data?.address));
4355
4355
  const organizationData = {
@@ -4357,6 +4357,7 @@
4357
4357
  employerActivities: getOrganizationActivityType(store?.employerActivities ?? [], okved),
4358
4358
  organization: getOrganizationType(store?.organization ?? [], okopf, inn),
4359
4359
  employerOrganization: getOrganizationKind(store?.employerOrganization ?? [], okopf),
4360
+ organizationName,
4360
4361
  };
4361
4362
  for (const fieldName in organizationData) {
4362
4363
  organizationData[fieldName] && field?.(fieldName)?.onChange?.(organizationData[fieldName]);
@@ -4366,29 +4367,31 @@
4366
4367
  inn: item.data?.inn ?? '',
4367
4368
  okopf: Number(item.data?.opf?.code),
4368
4369
  okved: item.data?.okved ?? '',
4370
+ organizationName: item.data?.name?.short_with_opf ?? '',
4369
4371
  });
4370
4372
 
4371
4373
  const DaDataInnField = JSX(({ field, input }) => {
4372
4374
  const store = useRetailFormStore();
4375
+ const { employerActivities, employerOrganization, organization, amountWorkers } = store;
4373
4376
  const esiaAccountTypeCd = field?.('esiaAccountTypeCd')?.value;
4374
4377
  const inn = field?.('inn')?.value;
4375
4378
  const onDaDataChange = useCallback((item) => {
4376
- field?.('organizationName')?.onChange?.(item.data?.name?.short_with_opf);
4377
4379
  updateOrganizationFields(store, field, item);
4378
4380
  }, []);
4379
4381
  useEffect(() => {
4380
- if (!esiaAccountTypeCd || !inn) {
4382
+ if (!esiaAccountTypeCd ||
4383
+ !inn ||
4384
+ !(employerActivities && employerOrganization && organization && amountWorkers)) {
4381
4385
  return;
4382
4386
  }
4383
4387
  (async () => {
4384
- const organization = await getOrganizationFromInn(inn);
4385
- if (organization) {
4386
- field?.('organizationName')?.onChange?.(organization.data?.name?.short_with_opf);
4387
- updateOrganizationFields(store, field, organization);
4388
+ const organizationData = await getOrganizationFromInn(inn);
4389
+ if (organizationData) {
4390
+ updateOrganizationFields(store, field, organizationData);
4388
4391
  }
4389
4392
  })();
4390
- }, []);
4391
- return (jsx(DaDataInputControl, { label: "\u0418\u041D\u041D", isInteger: true, maxLength: 12, ...input, ...field(input?.name ?? ''), onDaDataChange: onDaDataChange }));
4393
+ }, [employerActivities, employerOrganization, organization, amountWorkers]);
4394
+ return (jsx(DaDataInputControl, { label: "\u0418\u041D\u041D", isInteger: true, maxLength: 12, disabled: input?.filledByEsia && isEsiaAuthorize(field, input.name ?? ''), ...input, ...field(input?.name ?? ''), onDaDataChange: onDaDataChange }));
4392
4395
  });
4393
4396
 
4394
4397
  const DeliveryDateFiels = JSX(({ field, input }) => (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438", ...field(input?.name ?? '') })));
@@ -4458,7 +4461,7 @@
4458
4461
  const MIN_YEARS = 0;
4459
4462
  const Experience5YearsField = JSX(({ field, input }) => {
4460
4463
  const onChange = useCallback((value) => field(input?.name ?? '')?.onChange?.(String(clamp(Number(value), MIN_YEARS, MAX_YEARS))), []);
4461
- 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 }));
4464
+ 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", disabled: input?.filledByEsia && isEsiaAuthorize(field, input.name ?? ''), ...field(input?.name ?? ''), ...input, onChange: onChange }));
4462
4465
  });
4463
4466
 
4464
4467
  const FamilyMembersField = JSX(({ field, input }) => {
@@ -4479,7 +4482,7 @@
4479
4482
  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 }));
4480
4483
  });
4481
4484
 
4482
- 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 })));
4485
+ 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", disabled: input?.filledByEsia && isEsiaAuthorize(field, input.name ?? ''), ...field(input?.name ?? ''), ...input })));
4483
4486
 
4484
4487
  const HousingField = JSX(({ field, input }) => {
4485
4488
  const { data: housing } = useLeadFormData('HOUSE_TYPE');
@@ -4488,9 +4491,9 @@
4488
4491
 
4489
4492
  const InfoCardField = JSX(({ input }) => (jsx(InfoCard, { __html: input?.label })));
4490
4493
 
4491
- 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 })));
4494
+ 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, disabled: input?.filledByEsia && isEsiaAuthorize(field, input.name ?? ''), ...field(input?.name ?? ''), ...input })));
4492
4495
 
4493
- 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 })));
4496
+ 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, disabled: input?.filledByEsia && isEsiaAuthorize(field, input.name ?? ''), ...field(input?.name ?? ''), ...input })));
4494
4497
 
4495
4498
  const latinPattern = /^[\u0041-\u005A\u0061-\u007A\s]+$/u;
4496
4499
  const isLatin = (_ = '') => latinPattern.test(_);
@@ -4642,7 +4645,7 @@
4642
4645
  field?.('inn')?.onChange?.(item.data?.inn);
4643
4646
  updateOrganizationFields(store, field, item);
4644
4647
  }, []);
4645
- 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 }));
4648
+ 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", disabled: input?.filledByEsia && isEsiaAuthorize(field, input.name ?? ''), ...input, ...field(input?.name ?? ''), onDaDataChange: onDaDataChange }));
4646
4649
  });
4647
4650
 
4648
4651
  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 })));
@@ -4782,7 +4785,7 @@
4782
4785
 
4783
4786
  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 })));
4784
4787
 
4785
- 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 })));
4788
+ 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, disabled: input?.filledByEsia && isEsiaAuthorize(field, input.name ?? ''), ...field(input?.name ?? ''), ...input })));
4786
4789
 
4787
4790
  const DELIVERY_CITIES_REF = {
4788
4791
  $ref: '/wcms-resources/delivery-cities-data.json',
@@ -5528,6 +5531,7 @@
5528
5531
  });
5529
5532
  if (resp?.link) {
5530
5533
  navigator.assign(resp.link);
5534
+ globalThis.location.href = resp.link;
5531
5535
  }
5532
5536
  }, []);
5533
5537
  const handleClose = useCallback(() => {
@@ -5670,16 +5674,21 @@
5670
5674
 
5671
5675
  /* eslint-disable max-lines */
5672
5676
  // eslint-disable-next-line max-lines-per-function
5673
- const useApplicationLeadApi = ({ programId, nextStepLink, productType, data, }) => {
5677
+ const useApplicationLeadApi = ({ programId, nextStepLink, productType, esiaError, data, }) => {
5674
5678
  const [isSending, { setTrue: startSending, setFalse: endSending }] = useBool(false);
5675
5679
  const [ok, setOK] = useState();
5676
5680
  const saveUserData = useSaveUserData();
5677
5681
  const sendAspects = useSendLeadFormAspects({ data });
5682
+ const navigator = locationNavigator();
5678
5683
  const openEsiaLoginDialog = useEsiaLoginDialog(nextStepLink);
5679
5684
  const consentBkiDialog = useConsentBkiDialog(openEsiaLoginDialog);
5680
5685
  const verifyPhoneDialog = useDialog(VerifyPhoneDialog);
5681
5686
  const draftDialog = useDraftDialog();
5682
5687
  const handleSubmit = useCallback(async (formData) => {
5688
+ if (esiaError) {
5689
+ navigator.assign(nextStepLink);
5690
+ return;
5691
+ }
5683
5692
  try {
5684
5693
  startSending();
5685
5694
  const profileId = await createUserProfile({
@@ -5736,7 +5745,7 @@
5736
5745
  catch {
5737
5746
  setOK(false);
5738
5747
  }
5739
- }, []);
5748
+ }, [esiaError]);
5740
5749
  return { isSending, ok, handleSubmit };
5741
5750
  };
5742
5751
  const getAcceptedConsents = (formData, productType) => {
@@ -5845,34 +5854,72 @@
5845
5854
  return { ...formState };
5846
5855
  };
5847
5856
 
5848
- const parseEsiaProfile = (esiaProfile) => {
5857
+ const uploadFile = async (file, taskId, documentCategory) => {
5858
+ const fd = new FormData();
5859
+ fd.append('taskId', taskId);
5860
+ fd.append('documentCategory', documentCategory);
5861
+ fd.append('file', file, 'file.pdf');
5862
+ const res = await globalThis
5863
+ ?.fetch?.(`/light-api-cash/v1/file`, {
5864
+ method: 'POST',
5865
+ headers: {
5866
+ ...getAuthorizationHeaders(),
5867
+ },
5868
+ credentials: 'include',
5869
+ body: fd,
5870
+ })
5871
+ .then((response) => response.json());
5872
+ return res;
5873
+ };
5874
+
5875
+ const parseEsiaProfile = async (esiaProfile, taskId, isDebit) => {
5876
+ isDebit ? checkEsiaDataForDebit(esiaProfile) : checkEsiaDataForCredit(esiaProfile);
5849
5877
  const { profile, addInfo, document, addressRegistration, addressFact, esiaAdditionalDocument } = esiaProfile;
5850
- return {
5851
- name: profile?.name,
5852
- surname: profile?.surname,
5853
- middleName: profile?.midname,
5854
- limitedBirthday: profile?.birthDate,
5855
- phone: normalizePhone(profile?.phone),
5856
- email: profile?.email,
5857
- dulIssueDate: document?.dulIssueDate,
5858
- dulIssuedBy: document?.dulIssuedBy,
5859
- dulNumber: document?.dulNumber,
5860
- dulSerie: document?.dulSerie,
5861
- dulSubdivisionCode: document?.dulSubdivisionCode,
5862
- snils: addInfo?.snils,
5863
- birthPlace: addInfo?.birthPlace,
5878
+ const files = [];
5879
+ if (!isDebit) {
5880
+ await saveDocument({
5881
+ document: esiaAdditionalDocument.pdfFileWorkbook,
5882
+ taskId,
5883
+ category: 'CONFIRMING_INCOME_DOC',
5884
+ files,
5885
+ });
5886
+ await saveDocument({
5887
+ document: esiaAdditionalDocument.pdfFilePayout,
5888
+ taskId,
5889
+ category: 'CONFIRMING_EMPLOYMENT_DOC',
5890
+ files,
5891
+ });
5892
+ }
5893
+ const mainData = {
5894
+ name: profile.name,
5895
+ surname: profile.surname,
5896
+ middleName: profile.midname,
5897
+ limitedBirthday: profile.birthDate,
5898
+ phone: normalizePhone(profile.phone),
5899
+ email: profile.email,
5900
+ dulIssueDate: document.dulIssueDate,
5901
+ dulIssuedBy: document.dulIssuedBy,
5902
+ dulNumber: document.dulNumber,
5903
+ dulSerie: document.dulSerie,
5904
+ dulSubdivisionCode: document.dulSubdivisionCode,
5905
+ birthPlace: addInfo.birthPlace,
5864
5906
  addressRegistration: buildAddress(addressRegistration),
5865
5907
  addressFact: buildAddress(addressFact),
5866
- esiaAccountTypeCd: profile?.esiaAccountType,
5867
- inn: esiaAdditionalDocument?.inn,
5868
- wages: esiaAdditionalDocument?.averageMonthlyIncome
5869
- ? Math.floor(esiaAdditionalDocument.averageMonthlyIncome)?.toString()
5870
- : undefined,
5871
- beginDate: esiaAdditionalDocument?.startWorkDate,
5872
- experience5Years: getYearFromMonth(esiaAdditionalDocument?.workLengthInFiveYears)?.toString(),
5873
- generalSeniority: getYearFromMonth(esiaAdditionalDocument?.workLength)?.toString(),
5874
- lastJobExperience: getYearFromMonth(esiaAdditionalDocument?.workLengthLastJob)?.toString(),
5875
- jobsNumber: esiaAdditionalDocument?.jobsNumberInFiveYears?.toString(),
5908
+ esiaAccountTypeCd: profile.esiaAccountType,
5909
+ };
5910
+ return {
5911
+ ...mainData,
5912
+ ...(!isDebit && {
5913
+ snils: addInfo.snils,
5914
+ inn: esiaAdditionalDocument.inn,
5915
+ wages: Math.floor(esiaAdditionalDocument.averageMonthlyIncome)?.toString(),
5916
+ beginDate: esiaAdditionalDocument.startWorkDate,
5917
+ experience5Years: getYearFromMonth(esiaAdditionalDocument.workLengthInFiveYears).toString(),
5918
+ generalSeniority: getYearFromMonth(esiaAdditionalDocument.workLength).toString(),
5919
+ lastJobExperience: getYearFromMonth(esiaAdditionalDocument.workLengthLastJob).toString(),
5920
+ jobsNumber: esiaAdditionalDocument.jobsNumberInFiveYears.toString(),
5921
+ files,
5922
+ }),
5876
5923
  };
5877
5924
  };
5878
5925
  const concatFullAddress = (address) => {
@@ -5902,9 +5949,66 @@
5902
5949
  fullAddress,
5903
5950
  };
5904
5951
  };
5905
- const getYearFromMonth = (month) => (month ? Math.floor(month / 12) : null);
5952
+ const getYearFromMonth = (month) => Math.floor(month / 12);
5953
+ const saveDocument = async ({ document, taskId, category, files, }) => {
5954
+ await fetch(`data:'application/pdf';base64,${document}`)
5955
+ .then((res) => res.blob())
5956
+ .then((value) => uploadFile(value, taskId, category))
5957
+ .then((file) => files.push(file));
5958
+ };
5959
+ const checkEsiaDataForCredit = (esiaProfile) => {
5960
+ const { profile, document, addressRegistration, esiaAdditionalDocument } = esiaProfile;
5961
+ const data = [
5962
+ profile.name,
5963
+ profile.surname,
5964
+ profile.midname,
5965
+ profile.birthDate,
5966
+ profile.phone,
5967
+ profile.email,
5968
+ document.dulIssueDate,
5969
+ document.dulIssuedBy,
5970
+ document.dulNumber,
5971
+ document.dulSerie,
5972
+ document.dulSubdivisionCode,
5973
+ addressRegistration,
5974
+ profile.esiaAccountType,
5975
+ esiaAdditionalDocument.inn,
5976
+ esiaAdditionalDocument.averageMonthlyIncome.toString(),
5977
+ esiaAdditionalDocument.startWorkDate,
5978
+ esiaAdditionalDocument.workLengthInFiveYears.toString(),
5979
+ esiaAdditionalDocument.workLength.toString(),
5980
+ esiaAdditionalDocument.workLengthLastJob.toString(),
5981
+ esiaAdditionalDocument.jobsNumberInFiveYears.toString(),
5982
+ esiaAdditionalDocument.pdfFilePayout,
5983
+ esiaAdditionalDocument.pdfFileWorkbook,
5984
+ ];
5985
+ if (!data.every((_) => Boolean(_))) {
5986
+ throw new Error();
5987
+ }
5988
+ };
5989
+ const checkEsiaDataForDebit = (esiaProfile) => {
5990
+ const { profile, document, addressRegistration } = esiaProfile;
5991
+ const data = [
5992
+ profile.name,
5993
+ profile.surname,
5994
+ profile.midname,
5995
+ profile.birthDate,
5996
+ profile.phone,
5997
+ profile.email,
5998
+ document.dulIssueDate,
5999
+ document.dulIssuedBy,
6000
+ document.dulNumber,
6001
+ document.dulSerie,
6002
+ document.dulSubdivisionCode,
6003
+ addressRegistration,
6004
+ profile.esiaAccountType,
6005
+ ];
6006
+ if (!data.every((_) => Boolean(_))) {
6007
+ throw new Error();
6008
+ }
6009
+ };
5906
6010
 
5907
- const useInitApplicationLead = (inputs, nextStepLink, productType) => {
6011
+ const useInitApplicationLead = ({ inputs, nextStepLink, productType, setEsiaError, }) => {
5908
6012
  const navigator = locationNavigator();
5909
6013
  const [isLoading, { setTrue: startLoading, setFalse: endLoading }] = useBool(false);
5910
6014
  const leadFormStore = useLeadFormStore();
@@ -5919,14 +6023,18 @@
5919
6023
  state,
5920
6024
  redirectUri: globalThis.location?.href,
5921
6025
  });
5922
- if (data) {
6026
+ if (data && leadFormStore?.taskId) {
6027
+ const parsedData = await parseEsiaProfile(data, leadFormStore.taskId.toString(), productType === 'debitCard');
5923
6028
  saveForm((_) => ({
5924
6029
  ..._,
5925
- ...parseEsiaProfile(data),
6030
+ ...parsedData,
5926
6031
  }));
5927
6032
  }
5928
6033
  navigator.assign(nextStepLink);
5929
6034
  }
6035
+ catch {
6036
+ setEsiaError();
6037
+ }
5930
6038
  finally {
5931
6039
  endLoading();
5932
6040
  }
@@ -5949,14 +6057,21 @@
5949
6057
  };
5950
6058
 
5951
6059
  const ApplicationLeadForm = JSX(({ className, title, programId = '', nextStepLink = '/credit-lead', button, productType = 'credit', data, ...rest }) => {
6060
+ const [esiaError, { setTrue: setEsiaError }] = useBool(false);
5952
6061
  const applicationFormData = useMemo(() => getApplicationFormData(productType), [productType]);
5953
6062
  const inputs = useMemo(() => (applicationFormData?.flatMap((_) => _?.inputs) || []), [applicationFormData]);
5954
6063
  const formValidator = useMemo(() => getFormValidator(inputs, validatorObj), [inputs]);
5955
- const [initialFormState, { isLoading }] = useInitApplicationLead(inputs, nextStepLink, productType);
6064
+ const [initialFormState, { isLoading }] = useInitApplicationLead({
6065
+ inputs,
6066
+ nextStepLink,
6067
+ productType,
6068
+ setEsiaError,
6069
+ });
5956
6070
  const { isSending, ok, handleSubmit } = useApplicationLeadApi({
5957
6071
  programId,
5958
6072
  nextStepLink,
5959
6073
  productType,
6074
+ esiaError,
5960
6075
  data,
5961
6076
  });
5962
6077
  const [, { field, onSubmit }] = useForm(initialFormState, {
@@ -5969,7 +6084,7 @@
5969
6084
  responseTypeDialog.open({ ok });
5970
6085
  }
5971
6086
  }, [ok]);
5972
- 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)] }) }));
6087
+ 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] }) }));
5973
6088
  });
5974
6089
 
5975
6090
  const NotFound = JSX(({ title, description }) => {
@@ -7844,6 +7959,7 @@
7844
7959
  ],
7845
7960
  ...getCardOptionsData(formData),
7846
7961
  ...getDeliveryData$1(formData),
7962
+ files: formData?.files,
7847
7963
  },
7848
7964
  };
7849
7965
  };
@@ -7945,7 +8061,7 @@
7945
8061
  { name: 'sex', required: true },
7946
8062
  { name: 'limitedBirthday', required: true, filledByEsia: true },
7947
8063
  { name: 'birthPlace', required: true, filledByEsia: true },
7948
- { name: 'phone', required: true, filledByEsia: true },
8064
+ { name: 'phone', required: true },
7949
8065
  { name: 'email', required: true, dadata: true },
7950
8066
  ],
7951
8067
  },
@@ -8030,13 +8146,13 @@
8030
8146
  {
8031
8147
  inputs: [
8032
8148
  { name: 'employment', required: true },
8033
- { name: 'organizationName', required: true, dadata: true },
8149
+ { name: 'organizationName', required: true, dadata: true, filledByEsia: true },
8034
8150
  ],
8035
8151
  },
8036
8152
  {
8037
8153
  columns: 2,
8038
8154
  inputs: [
8039
- { name: 'inn', required: true, dadata: true },
8155
+ { name: 'inn', required: true, dadata: true, filledByEsia: true },
8040
8156
  { name: 'legalForm', required: true },
8041
8157
  ],
8042
8158
  },
@@ -8051,10 +8167,10 @@
8051
8167
  inputs: [
8052
8168
  { name: 'employerActivities', required: true },
8053
8169
  { name: 'employerOrganization', required: true },
8054
- { name: 'generalSeniority', required: true },
8055
- { name: 'lastJobExperience', required: true },
8056
- { name: 'experience5Years', required: true },
8057
- { name: 'jobsNumber', required: true },
8170
+ { name: 'generalSeniority', required: true, filledByEsia: true },
8171
+ { name: 'lastJobExperience', required: true, filledByEsia: true },
8172
+ { name: 'experience5Years', required: true, filledByEsia: true },
8173
+ { name: 'jobsNumber', required: true, filledByEsia: true },
8058
8174
  ],
8059
8175
  },
8060
8176
  {
@@ -8119,7 +8235,7 @@
8119
8235
  },
8120
8236
  {
8121
8237
  columns: 1,
8122
- inputs: [{ name: 'wages', required: true }],
8238
+ inputs: [{ name: 'wages', required: true, filledByEsia: true }],
8123
8239
  },
8124
8240
  {
8125
8241
  columns: 1,
@@ -8621,6 +8737,7 @@
8621
8737
  esiaAccountTypeCd: {
8622
8738
  key: formData?.esiaAccountTypeCd?.key,
8623
8739
  },
8740
+ files: formData?.files,
8624
8741
  },
8625
8742
  };
8626
8743
  };
@@ -11314,7 +11431,7 @@
11314
11431
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
11315
11432
  });
11316
11433
 
11317
- const packageVersion = "0.14.796";
11434
+ const packageVersion = "0.14.797";
11318
11435
 
11319
11436
  exports.Blocks = Blocks;
11320
11437
  exports.ContentPage = ContentPage;