@redneckz/wildless-cms-uni-blocks 0.14.796 → 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 (289) hide show
  1. package/bundle/bundle.umd.js +181 -66
  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/components/Header/useChatBot.js +1 -3
  24. package/dist/components/Header/useChatBot.js.map +1 -1
  25. package/dist/retail/adaptors/getCreditFormTaskData.js +1 -0
  26. package/dist/retail/adaptors/getCreditFormTaskData.js.map +1 -1
  27. package/dist/retail/api/doRequest.d.ts +3 -0
  28. package/dist/retail/api/doRequest.js +3 -2
  29. package/dist/retail/api/doRequest.js.map +1 -1
  30. package/dist/retail/api/updateUserTask.d.ts +2 -0
  31. package/dist/retail/api/updateUserTask.js.map +1 -1
  32. package/dist/retail/api/uploadFile.d.ts +3 -0
  33. package/dist/retail/api/uploadFile.js +22 -0
  34. package/dist/retail/api/uploadFile.js.map +1 -0
  35. package/dist/retail/components/EsiaLoginDialog/EsiaLoginDialog.js +1 -0
  36. package/dist/retail/components/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
  37. package/dist/retail/components/Fields/DaDataInnField.js +10 -8
  38. package/dist/retail/components/Fields/DaDataInnField.js.map +1 -1
  39. package/dist/retail/components/Fields/Experience5YearsField.js +2 -1
  40. package/dist/retail/components/Fields/Experience5YearsField.js.map +1 -1
  41. package/dist/retail/components/Fields/GeneralSeniorityField.js +2 -1
  42. package/dist/retail/components/Fields/GeneralSeniorityField.js.map +1 -1
  43. package/dist/retail/components/Fields/JobsNumberField.js +2 -1
  44. package/dist/retail/components/Fields/JobsNumberField.js.map +1 -1
  45. package/dist/retail/components/Fields/LastJobExperienceField.js +2 -1
  46. package/dist/retail/components/Fields/LastJobExperienceField.js.map +1 -1
  47. package/dist/retail/components/Fields/OrganizationNameField.js +2 -1
  48. package/dist/retail/components/Fields/OrganizationNameField.js.map +1 -1
  49. package/dist/retail/components/Fields/WagesField.js +2 -1
  50. package/dist/retail/components/Fields/WagesField.js.map +1 -1
  51. package/dist/retail/content.js +8 -8
  52. package/dist/retail/content.js.map +1 -1
  53. package/dist/retail/model/LeadFormState.d.ts +13 -0
  54. package/dist/retail/utils/updateOrganizationFields.js +3 -1
  55. package/dist/retail/utils/updateOrganizationFields.js.map +1 -1
  56. package/dist/ui-kit/FormField/Fields/MiddleNameField.js +2 -1
  57. package/dist/ui-kit/FormField/Fields/MiddleNameField.js.map +1 -1
  58. package/dist/ui-kit/FormField/Fields/NameField.js +2 -1
  59. package/dist/ui-kit/FormField/Fields/NameField.js.map +1 -1
  60. package/dist/ui-kit/FormField/Fields/SurnameField.js +2 -1
  61. package/dist/ui-kit/FormField/Fields/SurnameField.js.map +1 -1
  62. package/lib/common.css +1 -1
  63. package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +11 -2
  64. package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  65. package/lib/components/ApplicationLeadForm/{pasreEsiaProfile.d.ts → parseEsiaProfile.d.ts} +1 -1
  66. package/lib/components/ApplicationLeadForm/parseEsiaProfile.js +138 -0
  67. package/lib/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -0
  68. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -1
  69. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +8 -2
  70. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  71. package/lib/components/ApplicationLeadForm/useInitApplicationLead.d.ts +8 -1
  72. package/lib/components/ApplicationLeadForm/useInitApplicationLead.js +8 -4
  73. package/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  74. package/lib/components/CreditCardForm/getCreditCardFormTaskData.js +1 -0
  75. package/lib/components/CreditCardForm/getCreditCardFormTaskData.js.map +1 -1
  76. package/lib/components/Header/useChatBot.js +1 -3
  77. package/lib/components/Header/useChatBot.js.map +1 -1
  78. package/lib/retail/adaptors/getCreditFormTaskData.js +1 -0
  79. package/lib/retail/adaptors/getCreditFormTaskData.js.map +1 -1
  80. package/lib/retail/api/doRequest.d.ts +3 -0
  81. package/lib/retail/api/doRequest.js +1 -1
  82. package/lib/retail/api/doRequest.js.map +1 -1
  83. package/lib/retail/api/updateUserTask.d.ts +2 -0
  84. package/lib/retail/api/updateUserTask.js.map +1 -1
  85. package/lib/retail/api/uploadFile.d.ts +3 -0
  86. package/lib/retail/api/uploadFile.js +19 -0
  87. package/lib/retail/api/uploadFile.js.map +1 -0
  88. package/lib/retail/components/EsiaLoginDialog/EsiaLoginDialog.js +1 -0
  89. package/lib/retail/components/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
  90. package/lib/retail/components/Fields/DaDataInnField.js +10 -8
  91. package/lib/retail/components/Fields/DaDataInnField.js.map +1 -1
  92. package/lib/retail/components/Fields/Experience5YearsField.js +2 -1
  93. package/lib/retail/components/Fields/Experience5YearsField.js.map +1 -1
  94. package/lib/retail/components/Fields/GeneralSeniorityField.js +2 -1
  95. package/lib/retail/components/Fields/GeneralSeniorityField.js.map +1 -1
  96. package/lib/retail/components/Fields/JobsNumberField.js +2 -1
  97. package/lib/retail/components/Fields/JobsNumberField.js.map +1 -1
  98. package/lib/retail/components/Fields/LastJobExperienceField.js +2 -1
  99. package/lib/retail/components/Fields/LastJobExperienceField.js.map +1 -1
  100. package/lib/retail/components/Fields/OrganizationNameField.js +2 -1
  101. package/lib/retail/components/Fields/OrganizationNameField.js.map +1 -1
  102. package/lib/retail/components/Fields/WagesField.js +2 -1
  103. package/lib/retail/components/Fields/WagesField.js.map +1 -1
  104. package/lib/retail/content.js +8 -8
  105. package/lib/retail/content.js.map +1 -1
  106. package/lib/retail/model/LeadFormState.d.ts +13 -0
  107. package/lib/retail/utils/updateOrganizationFields.js +3 -1
  108. package/lib/retail/utils/updateOrganizationFields.js.map +1 -1
  109. package/lib/ui-kit/FormField/Fields/MiddleNameField.js +2 -1
  110. package/lib/ui-kit/FormField/Fields/MiddleNameField.js.map +1 -1
  111. package/lib/ui-kit/FormField/Fields/NameField.js +2 -1
  112. package/lib/ui-kit/FormField/Fields/NameField.js.map +1 -1
  113. package/lib/ui-kit/FormField/Fields/SurnameField.js +2 -1
  114. package/lib/ui-kit/FormField/Fields/SurnameField.js.map +1 -1
  115. package/mobile/bundle/bundle.umd.js +181 -66
  116. package/mobile/bundle/bundle.umd.min.js +1 -1
  117. package/mobile/bundle/components/ApplicationLeadForm/{pasreEsiaProfile.d.ts → parseEsiaProfile.d.ts} +1 -1
  118. package/mobile/bundle/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -1
  119. package/mobile/bundle/components/ApplicationLeadForm/useInitApplicationLead.d.ts +8 -1
  120. package/mobile/bundle/retail/api/doRequest.d.ts +3 -0
  121. package/mobile/bundle/retail/api/updateUserTask.d.ts +2 -0
  122. package/mobile/bundle/retail/api/uploadFile.d.ts +3 -0
  123. package/mobile/bundle/retail/model/LeadFormState.d.ts +13 -0
  124. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +11 -2
  125. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  126. package/mobile/dist/components/ApplicationLeadForm/parseEsiaProfile.d.ts +3 -0
  127. package/mobile/dist/components/ApplicationLeadForm/parseEsiaProfile.js +141 -0
  128. package/mobile/dist/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -0
  129. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -1
  130. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +8 -2
  131. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  132. package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.d.ts +8 -1
  133. package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js +8 -4
  134. package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  135. package/mobile/dist/components/CreditCardForm/getCreditCardFormTaskData.js +1 -0
  136. package/mobile/dist/components/CreditCardForm/getCreditCardFormTaskData.js.map +1 -1
  137. package/mobile/dist/components/Header/useChatBot.js +1 -3
  138. package/mobile/dist/components/Header/useChatBot.js.map +1 -1
  139. package/mobile/dist/retail/adaptors/getCreditFormTaskData.js +1 -0
  140. package/mobile/dist/retail/adaptors/getCreditFormTaskData.js.map +1 -1
  141. package/mobile/dist/retail/api/doRequest.d.ts +3 -0
  142. package/mobile/dist/retail/api/doRequest.js +3 -2
  143. package/mobile/dist/retail/api/doRequest.js.map +1 -1
  144. package/mobile/dist/retail/api/updateUserTask.d.ts +2 -0
  145. package/mobile/dist/retail/api/updateUserTask.js.map +1 -1
  146. package/mobile/dist/retail/api/uploadFile.d.ts +3 -0
  147. package/mobile/dist/retail/api/uploadFile.js +22 -0
  148. package/mobile/dist/retail/api/uploadFile.js.map +1 -0
  149. package/mobile/dist/retail/components/EsiaLoginDialog/EsiaLoginDialog.js +1 -0
  150. package/mobile/dist/retail/components/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
  151. package/mobile/dist/retail/components/Fields/DaDataInnField.js +10 -8
  152. package/mobile/dist/retail/components/Fields/DaDataInnField.js.map +1 -1
  153. package/mobile/dist/retail/components/Fields/Experience5YearsField.js +2 -1
  154. package/mobile/dist/retail/components/Fields/Experience5YearsField.js.map +1 -1
  155. package/mobile/dist/retail/components/Fields/GeneralSeniorityField.js +2 -1
  156. package/mobile/dist/retail/components/Fields/GeneralSeniorityField.js.map +1 -1
  157. package/mobile/dist/retail/components/Fields/JobsNumberField.js +2 -1
  158. package/mobile/dist/retail/components/Fields/JobsNumberField.js.map +1 -1
  159. package/mobile/dist/retail/components/Fields/LastJobExperienceField.js +2 -1
  160. package/mobile/dist/retail/components/Fields/LastJobExperienceField.js.map +1 -1
  161. package/mobile/dist/retail/components/Fields/OrganizationNameField.js +2 -1
  162. package/mobile/dist/retail/components/Fields/OrganizationNameField.js.map +1 -1
  163. package/mobile/dist/retail/components/Fields/WagesField.js +2 -1
  164. package/mobile/dist/retail/components/Fields/WagesField.js.map +1 -1
  165. package/mobile/dist/retail/content.js +8 -8
  166. package/mobile/dist/retail/content.js.map +1 -1
  167. package/mobile/dist/retail/model/LeadFormState.d.ts +13 -0
  168. package/mobile/dist/retail/utils/updateOrganizationFields.js +3 -1
  169. package/mobile/dist/retail/utils/updateOrganizationFields.js.map +1 -1
  170. package/mobile/dist/ui-kit/FormField/Fields/MiddleNameField.js +2 -1
  171. package/mobile/dist/ui-kit/FormField/Fields/MiddleNameField.js.map +1 -1
  172. package/mobile/dist/ui-kit/FormField/Fields/NameField.js +2 -1
  173. package/mobile/dist/ui-kit/FormField/Fields/NameField.js.map +1 -1
  174. package/mobile/dist/ui-kit/FormField/Fields/SurnameField.js +2 -1
  175. package/mobile/dist/ui-kit/FormField/Fields/SurnameField.js.map +1 -1
  176. package/mobile/lib/common.css +1 -1
  177. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +11 -2
  178. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  179. package/mobile/lib/components/ApplicationLeadForm/parseEsiaProfile.d.ts +3 -0
  180. package/mobile/lib/components/ApplicationLeadForm/parseEsiaProfile.js +138 -0
  181. package/mobile/lib/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -0
  182. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -1
  183. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +8 -2
  184. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  185. package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.d.ts +8 -1
  186. package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js +8 -4
  187. package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  188. package/mobile/lib/components/CreditCardForm/getCreditCardFormTaskData.js +1 -0
  189. package/mobile/lib/components/CreditCardForm/getCreditCardFormTaskData.js.map +1 -1
  190. package/mobile/lib/components/Header/useChatBot.js +1 -3
  191. package/mobile/lib/components/Header/useChatBot.js.map +1 -1
  192. package/mobile/lib/retail/adaptors/getCreditFormTaskData.js +1 -0
  193. package/mobile/lib/retail/adaptors/getCreditFormTaskData.js.map +1 -1
  194. package/mobile/lib/retail/api/doRequest.d.ts +3 -0
  195. package/mobile/lib/retail/api/doRequest.js +1 -1
  196. package/mobile/lib/retail/api/doRequest.js.map +1 -1
  197. package/mobile/lib/retail/api/updateUserTask.d.ts +2 -0
  198. package/mobile/lib/retail/api/updateUserTask.js.map +1 -1
  199. package/mobile/lib/retail/api/uploadFile.d.ts +3 -0
  200. package/mobile/lib/retail/api/uploadFile.js +19 -0
  201. package/mobile/lib/retail/api/uploadFile.js.map +1 -0
  202. package/mobile/lib/retail/components/EsiaLoginDialog/EsiaLoginDialog.js +1 -0
  203. package/mobile/lib/retail/components/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
  204. package/mobile/lib/retail/components/Fields/DaDataInnField.js +10 -8
  205. package/mobile/lib/retail/components/Fields/DaDataInnField.js.map +1 -1
  206. package/mobile/lib/retail/components/Fields/Experience5YearsField.js +2 -1
  207. package/mobile/lib/retail/components/Fields/Experience5YearsField.js.map +1 -1
  208. package/mobile/lib/retail/components/Fields/GeneralSeniorityField.js +2 -1
  209. package/mobile/lib/retail/components/Fields/GeneralSeniorityField.js.map +1 -1
  210. package/mobile/lib/retail/components/Fields/JobsNumberField.js +2 -1
  211. package/mobile/lib/retail/components/Fields/JobsNumberField.js.map +1 -1
  212. package/mobile/lib/retail/components/Fields/LastJobExperienceField.js +2 -1
  213. package/mobile/lib/retail/components/Fields/LastJobExperienceField.js.map +1 -1
  214. package/mobile/lib/retail/components/Fields/OrganizationNameField.js +2 -1
  215. package/mobile/lib/retail/components/Fields/OrganizationNameField.js.map +1 -1
  216. package/mobile/lib/retail/components/Fields/WagesField.js +2 -1
  217. package/mobile/lib/retail/components/Fields/WagesField.js.map +1 -1
  218. package/mobile/lib/retail/content.js +8 -8
  219. package/mobile/lib/retail/content.js.map +1 -1
  220. package/mobile/lib/retail/model/LeadFormState.d.ts +13 -0
  221. package/mobile/lib/retail/utils/updateOrganizationFields.js +3 -1
  222. package/mobile/lib/retail/utils/updateOrganizationFields.js.map +1 -1
  223. package/mobile/lib/ui-kit/FormField/Fields/MiddleNameField.js +2 -1
  224. package/mobile/lib/ui-kit/FormField/Fields/MiddleNameField.js.map +1 -1
  225. package/mobile/lib/ui-kit/FormField/Fields/NameField.js +2 -1
  226. package/mobile/lib/ui-kit/FormField/Fields/NameField.js.map +1 -1
  227. package/mobile/lib/ui-kit/FormField/Fields/SurnameField.js +2 -1
  228. package/mobile/lib/ui-kit/FormField/Fields/SurnameField.js.map +1 -1
  229. package/mobile/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +13 -2
  230. package/mobile/src/components/ApplicationLeadForm/parseEsiaProfile.ts +185 -0
  231. package/mobile/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +64 -52
  232. package/mobile/src/components/ApplicationLeadForm/useInitApplicationLead.ts +24 -8
  233. package/mobile/src/components/CreditCardForm/getCreditCardFormTaskData.ts +1 -0
  234. package/mobile/src/components/Header/useChatBot.ts +1 -3
  235. package/mobile/src/retail/adaptors/getCreditFormTaskData.ts +1 -0
  236. package/mobile/src/retail/api/doRequest.ts +1 -1
  237. package/mobile/src/retail/api/updateUserTask.ts +3 -0
  238. package/mobile/src/retail/api/uploadFile.ts +28 -0
  239. package/mobile/src/retail/components/EsiaLoginDialog/EsiaLoginDialog.tsx +1 -0
  240. package/mobile/src/retail/components/Fields/DaDataInnField.tsx +12 -7
  241. package/mobile/src/retail/components/Fields/Experience5YearsField.tsx +2 -0
  242. package/mobile/src/retail/components/Fields/GeneralSeniorityField.tsx +2 -0
  243. package/mobile/src/retail/components/Fields/JobsNumberField.tsx +2 -0
  244. package/mobile/src/retail/components/Fields/LastJobExperienceField.tsx +2 -0
  245. package/mobile/src/retail/components/Fields/OrganizationNameField.tsx +2 -0
  246. package/mobile/src/retail/components/Fields/WagesField.tsx +2 -0
  247. package/mobile/src/retail/content.tsx +8 -8
  248. package/mobile/src/retail/model/LeadFormState.ts +14 -0
  249. package/mobile/src/retail/utils/updateOrganizationFields.ts +3 -1
  250. package/mobile/src/ui-kit/FormField/Fields/MiddleNameField.tsx +2 -0
  251. package/mobile/src/ui-kit/FormField/Fields/NameField.tsx +8 -1
  252. package/mobile/src/ui-kit/FormField/Fields/SurnameField.tsx +8 -1
  253. package/package.json +2 -2
  254. package/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +13 -2
  255. package/src/components/ApplicationLeadForm/parseEsiaProfile.ts +185 -0
  256. package/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +64 -52
  257. package/src/components/ApplicationLeadForm/useInitApplicationLead.ts +24 -8
  258. package/src/components/CreditCardForm/getCreditCardFormTaskData.ts +1 -0
  259. package/src/components/Header/useChatBot.ts +1 -3
  260. package/src/retail/adaptors/getCreditFormTaskData.ts +1 -0
  261. package/src/retail/api/doRequest.ts +1 -1
  262. package/src/retail/api/updateUserTask.ts +3 -0
  263. package/src/retail/api/uploadFile.ts +28 -0
  264. package/src/retail/components/EsiaLoginDialog/EsiaLoginDialog.tsx +1 -0
  265. package/src/retail/components/Fields/DaDataInnField.tsx +12 -7
  266. package/src/retail/components/Fields/Experience5YearsField.tsx +2 -0
  267. package/src/retail/components/Fields/GeneralSeniorityField.tsx +2 -0
  268. package/src/retail/components/Fields/JobsNumberField.tsx +2 -0
  269. package/src/retail/components/Fields/LastJobExperienceField.tsx +2 -0
  270. package/src/retail/components/Fields/OrganizationNameField.tsx +2 -0
  271. package/src/retail/components/Fields/WagesField.tsx +2 -0
  272. package/src/retail/content.tsx +8 -8
  273. package/src/retail/model/LeadFormState.ts +14 -0
  274. package/src/retail/utils/updateOrganizationFields.ts +3 -1
  275. package/src/ui-kit/FormField/Fields/MiddleNameField.tsx +2 -0
  276. package/src/ui-kit/FormField/Fields/NameField.tsx +8 -1
  277. package/src/ui-kit/FormField/Fields/SurnameField.tsx +8 -1
  278. package/dist/components/ApplicationLeadForm/pasreEsiaProfile.js +0 -63
  279. package/dist/components/ApplicationLeadForm/pasreEsiaProfile.js.map +0 -1
  280. package/lib/components/ApplicationLeadForm/pasreEsiaProfile.js +0 -60
  281. package/lib/components/ApplicationLeadForm/pasreEsiaProfile.js.map +0 -1
  282. package/mobile/dist/components/ApplicationLeadForm/pasreEsiaProfile.d.ts +0 -3
  283. package/mobile/dist/components/ApplicationLeadForm/pasreEsiaProfile.js +0 -63
  284. package/mobile/dist/components/ApplicationLeadForm/pasreEsiaProfile.js.map +0 -1
  285. package/mobile/lib/components/ApplicationLeadForm/pasreEsiaProfile.d.ts +0 -3
  286. package/mobile/lib/components/ApplicationLeadForm/pasreEsiaProfile.js +0 -60
  287. package/mobile/lib/components/ApplicationLeadForm/pasreEsiaProfile.js.map +0 -1
  288. package/mobile/src/components/ApplicationLeadForm/pasreEsiaProfile.ts +0 -82
  289. package/src/components/ApplicationLeadForm/pasreEsiaProfile.ts +0 -82
@@ -1978,9 +1978,12 @@
1978
1978
  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 }));
1979
1979
  });
1980
1980
 
1981
- 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 })));
1981
+ const ESIA_FIELD_NAME = 'esiaAccountTypeCd';
1982
+ const isEsiaAuthorize = (field, name) => Boolean(field(ESIA_FIELD_NAME)?.value?.key) && field(name).value;
1983
+
1984
+ 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 })));
1982
1985
 
1983
- const NameField$1 = JSX(({ field, input }) => (jsx(InputControl, { label: "\u0418\u043C\u044F", maxLength: 60, ...field(input?.name ?? ''), ...input })));
1986
+ 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 })));
1984
1987
 
1985
1988
  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] })));
1986
1989
 
@@ -2160,7 +2163,7 @@
2160
2163
  ];
2161
2164
  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') })));
2162
2165
 
2163
- const SurnameField$1 = JSX(({ field, input }) => (jsx(InputControl, { label: "\u0424\u0430\u043C\u0438\u043B\u0438\u044F", maxLength: 60, ...field(input?.name ?? ''), ...input })));
2166
+ 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 })));
2164
2167
 
2165
2168
  const MIN_CREDIT_TERM = 1;
2166
2169
  const MAX_CREDIT_TERM = 180;
@@ -2862,9 +2865,6 @@
2862
2865
  const normalizeInteger = (val = '') => val.replace(/[^\d]+/g, '');
2863
2866
  const getPlaceholder = (placeholder, errors, label) => errors && !label ? `${placeholder}*` : placeholder;
2864
2867
 
2865
- const ESIA_FIELD_NAME = 'esiaAccountTypeCd';
2866
- const isEsiaAuthorize = (field, name) => Boolean(field(ESIA_FIELD_NAME)?.value?.key) && field(name).value;
2867
-
2868
2868
  const AddressField = JSX(({ field, input }) => {
2869
2869
  const fieldName = input?.name || 'addressRegistration';
2870
2870
  const fieldValue = field(fieldName).value;
@@ -4357,7 +4357,7 @@
4357
4357
  .find((_) => _.key === key) ?? null;
4358
4358
 
4359
4359
  const updateOrganizationFields = (store, field, item) => {
4360
- const { okved, okopf, inn } = getOrganizationRequisites(item);
4360
+ const { okved, okopf, inn, organizationName } = getOrganizationRequisites(item);
4361
4361
  field?.('legalForm')?.onChange?.(item.data?.opf?.short);
4362
4362
  field?.('organizationAddress')?.onChange?.(getAddressFromDaDataItem(item.data?.address));
4363
4363
  const organizationData = {
@@ -4365,6 +4365,7 @@
4365
4365
  employerActivities: getOrganizationActivityType(store?.employerActivities ?? [], okved),
4366
4366
  organization: getOrganizationType(store?.organization ?? [], okopf, inn),
4367
4367
  employerOrganization: getOrganizationKind(store?.employerOrganization ?? [], okopf),
4368
+ organizationName,
4368
4369
  };
4369
4370
  for (const fieldName in organizationData) {
4370
4371
  organizationData[fieldName] && field?.(fieldName)?.onChange?.(organizationData[fieldName]);
@@ -4374,29 +4375,31 @@
4374
4375
  inn: item.data?.inn ?? '',
4375
4376
  okopf: Number(item.data?.opf?.code),
4376
4377
  okved: item.data?.okved ?? '',
4378
+ organizationName: item.data?.name?.short_with_opf ?? '',
4377
4379
  });
4378
4380
 
4379
4381
  const DaDataInnField = JSX(({ field, input }) => {
4380
4382
  const store = useRetailFormStore();
4383
+ const { employerActivities, employerOrganization, organization, amountWorkers } = store;
4381
4384
  const esiaAccountTypeCd = field?.('esiaAccountTypeCd')?.value;
4382
4385
  const inn = field?.('inn')?.value;
4383
4386
  const onDaDataChange = useCallback((item) => {
4384
- field?.('organizationName')?.onChange?.(item.data?.name?.short_with_opf);
4385
4387
  updateOrganizationFields(store, field, item);
4386
4388
  }, []);
4387
4389
  useEffect(() => {
4388
- if (!esiaAccountTypeCd || !inn) {
4390
+ if (!esiaAccountTypeCd ||
4391
+ !inn ||
4392
+ !(employerActivities && employerOrganization && organization && amountWorkers)) {
4389
4393
  return;
4390
4394
  }
4391
4395
  (async () => {
4392
- const organization = await getOrganizationFromInn(inn);
4393
- if (organization) {
4394
- field?.('organizationName')?.onChange?.(organization.data?.name?.short_with_opf);
4395
- updateOrganizationFields(store, field, organization);
4396
+ const organizationData = await getOrganizationFromInn(inn);
4397
+ if (organizationData) {
4398
+ updateOrganizationFields(store, field, organizationData);
4396
4399
  }
4397
4400
  })();
4398
- }, []);
4399
- return (jsx(DaDataInputControl, { label: "\u0418\u041D\u041D", isInteger: true, maxLength: 12, ...input, ...field(input?.name ?? ''), onDaDataChange: onDaDataChange }));
4401
+ }, [employerActivities, employerOrganization, organization, amountWorkers]);
4402
+ return (jsx(DaDataInputControl, { label: "\u0418\u041D\u041D", isInteger: true, maxLength: 12, disabled: input?.filledByEsia && isEsiaAuthorize(field, input.name ?? ''), ...input, ...field(input?.name ?? ''), onDaDataChange: onDaDataChange }));
4400
4403
  });
4401
4404
 
4402
4405
  const DeliveryDateFiels = JSX(({ field, input }) => (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438", ...field(input?.name ?? '') })));
@@ -4466,7 +4469,7 @@
4466
4469
  const MIN_YEARS = 0;
4467
4470
  const Experience5YearsField = JSX(({ field, input }) => {
4468
4471
  const onChange = useCallback((value) => field(input?.name ?? '')?.onChange?.(String(clamp(Number(value), MIN_YEARS, MAX_YEARS))), []);
4469
- 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 }));
4472
+ 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 }));
4470
4473
  });
4471
4474
 
4472
4475
  const FamilyMembersField = JSX(({ field, input }) => {
@@ -4487,7 +4490,7 @@
4487
4490
  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 }));
4488
4491
  });
4489
4492
 
4490
- 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 })));
4493
+ 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 })));
4491
4494
 
4492
4495
  const HousingField = JSX(({ field, input }) => {
4493
4496
  const { data: housing } = useLeadFormData('HOUSE_TYPE');
@@ -4496,9 +4499,9 @@
4496
4499
 
4497
4500
  const InfoCardField = JSX(({ input }) => (jsx(InfoCard, { __html: input?.label })));
4498
4501
 
4499
- 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 })));
4502
+ 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 })));
4500
4503
 
4501
- 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 })));
4504
+ 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 })));
4502
4505
 
4503
4506
  const latinPattern = /^[\u0041-\u005A\u0061-\u007A\s]+$/u;
4504
4507
  const isLatin = (_ = '') => latinPattern.test(_);
@@ -4650,7 +4653,7 @@
4650
4653
  field?.('inn')?.onChange?.(item.data?.inn);
4651
4654
  updateOrganizationFields(store, field, item);
4652
4655
  }, []);
4653
- 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 }));
4656
+ 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 }));
4654
4657
  });
4655
4658
 
4656
4659
  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 })));
@@ -4790,7 +4793,7 @@
4790
4793
 
4791
4794
  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 })));
4792
4795
 
4793
- 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 })));
4796
+ 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 })));
4794
4797
 
4795
4798
  const DELIVERY_CITIES_REF = {
4796
4799
  $ref: '/wcms-resources/delivery-cities-data.json',
@@ -5536,6 +5539,7 @@
5536
5539
  });
5537
5540
  if (resp?.link) {
5538
5541
  navigator.assign(resp.link);
5542
+ globalThis.location.href = resp.link;
5539
5543
  }
5540
5544
  }, []);
5541
5545
  const handleClose = useCallback(() => {
@@ -5678,16 +5682,21 @@
5678
5682
 
5679
5683
  /* eslint-disable max-lines */
5680
5684
  // eslint-disable-next-line max-lines-per-function
5681
- const useApplicationLeadApi = ({ programId, nextStepLink, productType, data, }) => {
5685
+ const useApplicationLeadApi = ({ programId, nextStepLink, productType, esiaError, data, }) => {
5682
5686
  const [isSending, { setTrue: startSending, setFalse: endSending }] = useBool(false);
5683
5687
  const [ok, setOK] = useState();
5684
5688
  const saveUserData = useSaveUserData();
5685
5689
  const sendAspects = useSendLeadFormAspects({ data });
5690
+ const navigator = locationNavigator();
5686
5691
  const openEsiaLoginDialog = useEsiaLoginDialog(nextStepLink);
5687
5692
  const consentBkiDialog = useConsentBkiDialog(openEsiaLoginDialog);
5688
5693
  const verifyPhoneDialog = useDialog(VerifyPhoneDialog);
5689
5694
  const draftDialog = useDraftDialog();
5690
5695
  const handleSubmit = useCallback(async (formData) => {
5696
+ if (esiaError) {
5697
+ navigator.assign(nextStepLink);
5698
+ return;
5699
+ }
5691
5700
  try {
5692
5701
  startSending();
5693
5702
  const profileId = await createUserProfile({
@@ -5744,7 +5753,7 @@
5744
5753
  catch {
5745
5754
  setOK(false);
5746
5755
  }
5747
- }, []);
5756
+ }, [esiaError]);
5748
5757
  return { isSending, ok, handleSubmit };
5749
5758
  };
5750
5759
  const getAcceptedConsents = (formData, productType) => {
@@ -5853,34 +5862,72 @@
5853
5862
  return { ...formState };
5854
5863
  };
5855
5864
 
5856
- const parseEsiaProfile = (esiaProfile) => {
5865
+ const uploadFile = async (file, taskId, documentCategory) => {
5866
+ const fd = new FormData();
5867
+ fd.append('taskId', taskId);
5868
+ fd.append('documentCategory', documentCategory);
5869
+ fd.append('file', file, 'file.pdf');
5870
+ const res = await globalThis
5871
+ ?.fetch?.(`/light-api-cash/v1/file`, {
5872
+ method: 'POST',
5873
+ headers: {
5874
+ ...getAuthorizationHeaders(),
5875
+ },
5876
+ credentials: 'include',
5877
+ body: fd,
5878
+ })
5879
+ .then((response) => response.json());
5880
+ return res;
5881
+ };
5882
+
5883
+ const parseEsiaProfile = async (esiaProfile, taskId, isDebit) => {
5884
+ isDebit ? checkEsiaDataForDebit(esiaProfile) : checkEsiaDataForCredit(esiaProfile);
5857
5885
  const { profile, addInfo, document, addressRegistration, addressFact, esiaAdditionalDocument } = esiaProfile;
5858
- return {
5859
- name: profile?.name,
5860
- surname: profile?.surname,
5861
- middleName: profile?.midname,
5862
- limitedBirthday: profile?.birthDate,
5863
- phone: normalizePhone(profile?.phone),
5864
- email: profile?.email,
5865
- dulIssueDate: document?.dulIssueDate,
5866
- dulIssuedBy: document?.dulIssuedBy,
5867
- dulNumber: document?.dulNumber,
5868
- dulSerie: document?.dulSerie,
5869
- dulSubdivisionCode: document?.dulSubdivisionCode,
5870
- snils: addInfo?.snils,
5871
- birthPlace: addInfo?.birthPlace,
5886
+ const files = [];
5887
+ if (!isDebit) {
5888
+ await saveDocument({
5889
+ document: esiaAdditionalDocument.pdfFileWorkbook,
5890
+ taskId,
5891
+ category: 'CONFIRMING_INCOME_DOC',
5892
+ files,
5893
+ });
5894
+ await saveDocument({
5895
+ document: esiaAdditionalDocument.pdfFilePayout,
5896
+ taskId,
5897
+ category: 'CONFIRMING_EMPLOYMENT_DOC',
5898
+ files,
5899
+ });
5900
+ }
5901
+ const mainData = {
5902
+ name: profile.name,
5903
+ surname: profile.surname,
5904
+ middleName: profile.midname,
5905
+ limitedBirthday: profile.birthDate,
5906
+ phone: normalizePhone(profile.phone),
5907
+ email: profile.email,
5908
+ dulIssueDate: document.dulIssueDate,
5909
+ dulIssuedBy: document.dulIssuedBy,
5910
+ dulNumber: document.dulNumber,
5911
+ dulSerie: document.dulSerie,
5912
+ dulSubdivisionCode: document.dulSubdivisionCode,
5913
+ birthPlace: addInfo.birthPlace,
5872
5914
  addressRegistration: buildAddress(addressRegistration),
5873
5915
  addressFact: buildAddress(addressFact),
5874
- esiaAccountTypeCd: profile?.esiaAccountType,
5875
- inn: esiaAdditionalDocument?.inn,
5876
- wages: esiaAdditionalDocument?.averageMonthlyIncome
5877
- ? Math.floor(esiaAdditionalDocument.averageMonthlyIncome)?.toString()
5878
- : undefined,
5879
- beginDate: esiaAdditionalDocument?.startWorkDate,
5880
- experience5Years: getYearFromMonth(esiaAdditionalDocument?.workLengthInFiveYears)?.toString(),
5881
- generalSeniority: getYearFromMonth(esiaAdditionalDocument?.workLength)?.toString(),
5882
- lastJobExperience: getYearFromMonth(esiaAdditionalDocument?.workLengthLastJob)?.toString(),
5883
- jobsNumber: esiaAdditionalDocument?.jobsNumberInFiveYears?.toString(),
5916
+ esiaAccountTypeCd: profile.esiaAccountType,
5917
+ };
5918
+ return {
5919
+ ...mainData,
5920
+ ...(!isDebit && {
5921
+ snils: addInfo.snils,
5922
+ inn: esiaAdditionalDocument.inn,
5923
+ wages: Math.floor(esiaAdditionalDocument.averageMonthlyIncome)?.toString(),
5924
+ beginDate: esiaAdditionalDocument.startWorkDate,
5925
+ experience5Years: getYearFromMonth(esiaAdditionalDocument.workLengthInFiveYears).toString(),
5926
+ generalSeniority: getYearFromMonth(esiaAdditionalDocument.workLength).toString(),
5927
+ lastJobExperience: getYearFromMonth(esiaAdditionalDocument.workLengthLastJob).toString(),
5928
+ jobsNumber: esiaAdditionalDocument.jobsNumberInFiveYears.toString(),
5929
+ files,
5930
+ }),
5884
5931
  };
5885
5932
  };
5886
5933
  const concatFullAddress = (address) => {
@@ -5910,9 +5957,66 @@
5910
5957
  fullAddress,
5911
5958
  };
5912
5959
  };
5913
- const getYearFromMonth = (month) => (month ? Math.floor(month / 12) : null);
5960
+ const getYearFromMonth = (month) => Math.floor(month / 12);
5961
+ const saveDocument = async ({ document, taskId, category, files, }) => {
5962
+ await fetch(`data:'application/pdf';base64,${document}`)
5963
+ .then((res) => res.blob())
5964
+ .then((value) => uploadFile(value, taskId, category))
5965
+ .then((file) => files.push(file));
5966
+ };
5967
+ const checkEsiaDataForCredit = (esiaProfile) => {
5968
+ const { profile, document, addressRegistration, esiaAdditionalDocument } = esiaProfile;
5969
+ const data = [
5970
+ profile.name,
5971
+ profile.surname,
5972
+ profile.midname,
5973
+ profile.birthDate,
5974
+ profile.phone,
5975
+ profile.email,
5976
+ document.dulIssueDate,
5977
+ document.dulIssuedBy,
5978
+ document.dulNumber,
5979
+ document.dulSerie,
5980
+ document.dulSubdivisionCode,
5981
+ addressRegistration,
5982
+ profile.esiaAccountType,
5983
+ esiaAdditionalDocument.inn,
5984
+ esiaAdditionalDocument.averageMonthlyIncome.toString(),
5985
+ esiaAdditionalDocument.startWorkDate,
5986
+ esiaAdditionalDocument.workLengthInFiveYears.toString(),
5987
+ esiaAdditionalDocument.workLength.toString(),
5988
+ esiaAdditionalDocument.workLengthLastJob.toString(),
5989
+ esiaAdditionalDocument.jobsNumberInFiveYears.toString(),
5990
+ esiaAdditionalDocument.pdfFilePayout,
5991
+ esiaAdditionalDocument.pdfFileWorkbook,
5992
+ ];
5993
+ if (!data.every((_) => Boolean(_))) {
5994
+ throw new Error();
5995
+ }
5996
+ };
5997
+ const checkEsiaDataForDebit = (esiaProfile) => {
5998
+ const { profile, document, addressRegistration } = esiaProfile;
5999
+ const data = [
6000
+ profile.name,
6001
+ profile.surname,
6002
+ profile.midname,
6003
+ profile.birthDate,
6004
+ profile.phone,
6005
+ profile.email,
6006
+ document.dulIssueDate,
6007
+ document.dulIssuedBy,
6008
+ document.dulNumber,
6009
+ document.dulSerie,
6010
+ document.dulSubdivisionCode,
6011
+ addressRegistration,
6012
+ profile.esiaAccountType,
6013
+ ];
6014
+ if (!data.every((_) => Boolean(_))) {
6015
+ throw new Error();
6016
+ }
6017
+ };
5914
6018
 
5915
- const useInitApplicationLead = (inputs, nextStepLink, productType) => {
6019
+ const useInitApplicationLead = ({ inputs, nextStepLink, productType, setEsiaError, }) => {
5916
6020
  const navigator = locationNavigator();
5917
6021
  const [isLoading, { setTrue: startLoading, setFalse: endLoading }] = useBool(false);
5918
6022
  const leadFormStore = useLeadFormStore();
@@ -5927,14 +6031,18 @@
5927
6031
  state,
5928
6032
  redirectUri: globalThis.location?.href,
5929
6033
  });
5930
- if (data) {
6034
+ if (data && leadFormStore?.taskId) {
6035
+ const parsedData = await parseEsiaProfile(data, leadFormStore.taskId.toString(), productType === 'debitCard');
5931
6036
  saveForm((_) => ({
5932
6037
  ..._,
5933
- ...parseEsiaProfile(data),
6038
+ ...parsedData,
5934
6039
  }));
5935
6040
  }
5936
6041
  navigator.assign(nextStepLink);
5937
6042
  }
6043
+ catch {
6044
+ setEsiaError();
6045
+ }
5938
6046
  finally {
5939
6047
  endLoading();
5940
6048
  }
@@ -5957,14 +6065,21 @@
5957
6065
  };
5958
6066
 
5959
6067
  const ApplicationLeadForm = JSX(({ className, title, programId = '', nextStepLink = '/credit-lead', button, productType = 'credit', data, ...rest }) => {
6068
+ const [esiaError, { setTrue: setEsiaError }] = useBool(false);
5960
6069
  const applicationFormData = useMemo(() => getApplicationFormData(productType), [productType]);
5961
6070
  const inputs = useMemo(() => (applicationFormData?.flatMap((_) => _?.inputs) || []), [applicationFormData]);
5962
6071
  const formValidator = useMemo(() => getFormValidator(inputs, validatorObj), [inputs]);
5963
- const [initialFormState, { isLoading }] = useInitApplicationLead(inputs, nextStepLink, productType);
6072
+ const [initialFormState, { isLoading }] = useInitApplicationLead({
6073
+ inputs,
6074
+ nextStepLink,
6075
+ productType,
6076
+ setEsiaError,
6077
+ });
5964
6078
  const { isSending, ok, handleSubmit } = useApplicationLeadApi({
5965
6079
  programId,
5966
6080
  nextStepLink,
5967
6081
  productType,
6082
+ esiaError,
5968
6083
  data,
5969
6084
  });
5970
6085
  const [, { field, onSubmit }] = useForm(initialFormState, {
@@ -5977,7 +6092,7 @@
5977
6092
  responseTypeDialog.open({ ok });
5978
6093
  }
5979
6094
  }, [ok]);
5980
- 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)] }) }));
6095
+ 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] }) }));
5981
6096
  });
5982
6097
 
5983
6098
  const NotFound = JSX(({ title, description }) => {
@@ -7836,6 +7951,7 @@
7836
7951
  ],
7837
7952
  ...getCardOptionsData(formData),
7838
7953
  ...getDeliveryData(formData),
7954
+ files: formData?.files,
7839
7955
  },
7840
7956
  };
7841
7957
  };
@@ -7937,7 +8053,7 @@
7937
8053
  { name: 'sex', required: true },
7938
8054
  { name: 'limitedBirthday', required: true, filledByEsia: true },
7939
8055
  { name: 'birthPlace', required: true, filledByEsia: true },
7940
- { name: 'phone', required: true, filledByEsia: true },
8056
+ { name: 'phone', required: true },
7941
8057
  { name: 'email', required: true, dadata: true },
7942
8058
  ],
7943
8059
  },
@@ -8022,13 +8138,13 @@
8022
8138
  {
8023
8139
  inputs: [
8024
8140
  { name: 'employment', required: true },
8025
- { name: 'organizationName', required: true, dadata: true },
8141
+ { name: 'organizationName', required: true, dadata: true, filledByEsia: true },
8026
8142
  ],
8027
8143
  },
8028
8144
  {
8029
8145
  columns: 2,
8030
8146
  inputs: [
8031
- { name: 'inn', required: true, dadata: true },
8147
+ { name: 'inn', required: true, dadata: true, filledByEsia: true },
8032
8148
  { name: 'legalForm', required: true },
8033
8149
  ],
8034
8150
  },
@@ -8043,10 +8159,10 @@
8043
8159
  inputs: [
8044
8160
  { name: 'employerActivities', required: true },
8045
8161
  { name: 'employerOrganization', required: true },
8046
- { name: 'generalSeniority', required: true },
8047
- { name: 'lastJobExperience', required: true },
8048
- { name: 'experience5Years', required: true },
8049
- { name: 'jobsNumber', required: true },
8162
+ { name: 'generalSeniority', required: true, filledByEsia: true },
8163
+ { name: 'lastJobExperience', required: true, filledByEsia: true },
8164
+ { name: 'experience5Years', required: true, filledByEsia: true },
8165
+ { name: 'jobsNumber', required: true, filledByEsia: true },
8050
8166
  ],
8051
8167
  },
8052
8168
  {
@@ -8111,7 +8227,7 @@
8111
8227
  },
8112
8228
  {
8113
8229
  columns: 1,
8114
- inputs: [{ name: 'wages', required: true }],
8230
+ inputs: [{ name: 'wages', required: true, filledByEsia: true }],
8115
8231
  },
8116
8232
  {
8117
8233
  columns: 1,
@@ -8535,6 +8651,7 @@
8535
8651
  esiaAccountTypeCd: {
8536
8652
  key: formData?.esiaAccountTypeCd?.key,
8537
8653
  },
8654
+ files: formData?.files,
8538
8655
  },
8539
8656
  };
8540
8657
  };
@@ -9186,9 +9303,7 @@
9186
9303
  const createChatFrame = () => {
9187
9304
  const chatFrame = globalThis.document.createElement('div');
9188
9305
  chatFrame.id = CHAT_FRAME_ID;
9189
- chatFrame.style.position = 'fixed';
9190
- chatFrame.style.right = '0';
9191
- chatFrame.style.bottom = '0';
9306
+ chatFrame.className = 'fixed right-0 bottom-0 h-full w-full z-10 @3xl:w-auto h-fit';
9192
9307
  globalThis.document.body.appendChild(chatFrame);
9193
9308
  };
9194
9309
 
@@ -10610,7 +10725,7 @@
10610
10725
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
10611
10726
  });
10612
10727
 
10613
- const packageVersion = "0.14.795";
10728
+ const packageVersion = "0.14.797";
10614
10729
 
10615
10730
  exports.Blocks = Blocks;
10616
10731
  exports.ContentPage = ContentPage;