@redneckz/wildless-cms-uni-blocks 0.14.636 → 0.14.638

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 (424) hide show
  1. package/bundle/api/RetailAPI/getTaskStatus.d.ts +14 -0
  2. package/bundle/api/RetailAPI/sendSignalToProcess.d.ts +11 -0
  3. package/bundle/api/RetailAPI/updateProfileEsia.d.ts +7 -7
  4. package/bundle/blocks.schema.json +1 -1
  5. package/bundle/bundle.umd.js +256 -43
  6. package/bundle/bundle.umd.min.js +1 -1
  7. package/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +2 -3
  8. package/bundle/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -16
  9. package/bundle/components/ApplicationLeadForm/pasreEsiaProfile.d.ts +3 -0
  10. package/bundle/components/CalculatorCredit/CalculatorCredit.d.ts +2 -0
  11. package/bundle/components/CreditForm/CreditForm.d.ts +2 -2
  12. package/bundle/components/CreditForm/CreditFormContent.d.ts +5 -23
  13. package/bundle/components/CreditForm/CreditFormProgress.d.ts +1 -1
  14. package/bundle/components/CreditForm/CreditFormStatus.d.ts +16 -0
  15. package/bundle/components/CreditForm/CreditFormStatusTracker.d.ts +2 -0
  16. package/bundle/components/CreditForm/CreditFormStep.d.ts +5 -6
  17. package/bundle/components/CreditForm/FailedStatusContent.d.ts +2 -0
  18. package/bundle/components/CreditForm/PendingStatusContent.d.ts +2 -0
  19. package/bundle/components/CreditForm/ReworkStatusContent.d.ts +2 -0
  20. package/bundle/components/CreditForm/SuccessStatusContent.d.ts +2 -0
  21. package/bundle/components/CreditForm/formStateMap.d.ts +72 -0
  22. package/bundle/components/CreditForm/getInitialFormState.d.ts +1 -63
  23. package/bundle/components/CreditForm/renderInfo.d.ts +3 -0
  24. package/bundle/components/CreditForm/renderStep.d.ts +11 -0
  25. package/{lib/components/CreditForm/useCreditFormApi.d.ts → bundle/components/CreditForm/useCreditFormAPI.d.ts} +4 -3
  26. package/bundle/hooks/useForm.d.ts +1 -1
  27. package/bundle/model/InputSectionsType.d.ts +5 -0
  28. package/dist/api/RetailAPI/getTaskStatus.d.ts +14 -0
  29. package/dist/api/RetailAPI/getTaskStatus.js +13 -0
  30. package/dist/api/RetailAPI/getTaskStatus.js.map +1 -0
  31. package/dist/api/RetailAPI/sendSignalToProcess.d.ts +11 -0
  32. package/dist/api/RetailAPI/sendSignalToProcess.js +6 -0
  33. package/dist/api/RetailAPI/sendSignalToProcess.js.map +1 -0
  34. package/dist/api/RetailAPI/updateProfileEsia.d.ts +7 -7
  35. package/dist/components/ApplicationForm/ApplicationFormContent.d.ts +2 -3
  36. package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +3 -3
  37. package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  38. package/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -16
  39. package/dist/components/ApplicationLeadForm/pasreEsiaProfile.d.ts +3 -0
  40. package/dist/components/ApplicationLeadForm/pasreEsiaProfile.js +52 -0
  41. package/dist/components/ApplicationLeadForm/pasreEsiaProfile.js.map +1 -0
  42. package/dist/components/ApplicationLeadForm/useInitApplicationLead.js +6 -3
  43. package/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  44. package/dist/components/CalculatorCredit/CalculatorCredit.d.ts +2 -0
  45. package/dist/components/CalculatorCredit/CalculatorCredit.js +3 -2
  46. package/dist/components/CalculatorCredit/CalculatorCredit.js.map +1 -1
  47. package/dist/components/CreditForm/CreditForm.d.ts +2 -2
  48. package/dist/components/CreditForm/CreditForm.js +17 -6
  49. package/dist/components/CreditForm/CreditForm.js.map +1 -1
  50. package/dist/components/CreditForm/CreditFormContent.d.ts +5 -23
  51. package/dist/components/CreditForm/CreditFormProgress.d.ts +1 -1
  52. package/dist/components/CreditForm/CreditFormProgress.js +3 -3
  53. package/dist/components/CreditForm/CreditFormProgress.js.map +1 -1
  54. package/dist/components/CreditForm/CreditFormStatus.d.ts +16 -0
  55. package/dist/components/CreditForm/CreditFormStatus.js +25 -0
  56. package/dist/components/CreditForm/CreditFormStatus.js.map +1 -0
  57. package/dist/components/CreditForm/CreditFormStatusTracker.d.ts +2 -0
  58. package/dist/components/CreditForm/CreditFormStatusTracker.js +42 -0
  59. package/dist/components/CreditForm/CreditFormStatusTracker.js.map +1 -0
  60. package/dist/components/CreditForm/CreditFormStep.d.ts +5 -6
  61. package/dist/components/CreditForm/CreditFormStep.js +19 -19
  62. package/dist/components/CreditForm/CreditFormStep.js.map +1 -1
  63. package/dist/components/CreditForm/FailedStatusContent.d.ts +2 -0
  64. package/dist/components/CreditForm/FailedStatusContent.js +7 -0
  65. package/dist/components/CreditForm/FailedStatusContent.js.map +1 -0
  66. package/dist/components/CreditForm/PendingStatusContent.d.ts +2 -0
  67. package/dist/components/CreditForm/PendingStatusContent.js +32 -0
  68. package/dist/components/CreditForm/PendingStatusContent.js.map +1 -0
  69. package/dist/components/CreditForm/ReworkStatusContent.d.ts +2 -0
  70. package/dist/components/CreditForm/ReworkStatusContent.js +25 -0
  71. package/dist/components/CreditForm/ReworkStatusContent.js.map +1 -0
  72. package/dist/components/CreditForm/SuccessStatusContent.d.ts +2 -0
  73. package/dist/components/CreditForm/SuccessStatusContent.js +32 -0
  74. package/dist/components/CreditForm/SuccessStatusContent.js.map +1 -0
  75. package/dist/components/CreditForm/creditFormStepsData.js +3 -0
  76. package/dist/components/CreditForm/creditFormStepsData.js.map +1 -1
  77. package/dist/components/CreditForm/formStateMap.d.ts +72 -0
  78. package/dist/components/CreditForm/formStateMap.js +81 -0
  79. package/dist/components/CreditForm/formStateMap.js.map +1 -0
  80. package/dist/components/CreditForm/getInitialFormState.d.ts +1 -63
  81. package/dist/components/CreditForm/getInitialFormState.js +2 -71
  82. package/dist/components/CreditForm/getInitialFormState.js.map +1 -1
  83. package/dist/components/CreditForm/renderInfo.d.ts +3 -0
  84. package/dist/components/CreditForm/renderInfo.js +12 -0
  85. package/dist/components/CreditForm/renderInfo.js.map +1 -0
  86. package/dist/components/CreditForm/renderInputs.js +1 -3
  87. package/dist/components/CreditForm/renderInputs.js.map +1 -1
  88. package/dist/components/CreditForm/renderStep.d.ts +11 -0
  89. package/dist/components/CreditForm/renderStep.js +11 -0
  90. package/dist/components/CreditForm/renderStep.js.map +1 -0
  91. package/{bundle/components/CreditForm/useCreditFormApi.d.ts → dist/components/CreditForm/useCreditFormAPI.d.ts} +4 -3
  92. package/dist/components/CreditForm/{useCreditFormApi.js → useCreditFormAPI.js} +7 -4
  93. package/dist/components/CreditForm/useCreditFormAPI.js.map +1 -0
  94. package/dist/hooks/useForm.d.ts +1 -1
  95. package/dist/hooks/useForm.js +1 -0
  96. package/dist/hooks/useForm.js.map +1 -1
  97. package/dist/model/InputSectionsType.d.ts +5 -0
  98. package/dist/model/InputSectionsType.js +2 -0
  99. package/dist/model/InputSectionsType.js.map +1 -0
  100. package/lib/api/RetailAPI/getTaskStatus.d.ts +14 -0
  101. package/lib/api/RetailAPI/getTaskStatus.js +10 -0
  102. package/lib/api/RetailAPI/getTaskStatus.js.map +1 -0
  103. package/lib/api/RetailAPI/sendSignalToProcess.d.ts +11 -0
  104. package/lib/api/RetailAPI/sendSignalToProcess.js +3 -0
  105. package/lib/api/RetailAPI/sendSignalToProcess.js.map +1 -0
  106. package/lib/api/RetailAPI/updateProfileEsia.d.ts +7 -7
  107. package/lib/common.css +1 -1
  108. package/lib/components/ApplicationForm/ApplicationFormContent.d.ts +2 -3
  109. package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +3 -3
  110. package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  111. package/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -16
  112. package/lib/components/ApplicationLeadForm/pasreEsiaProfile.d.ts +3 -0
  113. package/lib/components/ApplicationLeadForm/pasreEsiaProfile.js +49 -0
  114. package/lib/components/ApplicationLeadForm/pasreEsiaProfile.js.map +1 -0
  115. package/lib/components/ApplicationLeadForm/useInitApplicationLead.js +6 -3
  116. package/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  117. package/lib/components/CalculatorCredit/CalculatorCredit.d.ts +2 -0
  118. package/lib/components/CalculatorCredit/CalculatorCredit.js +3 -2
  119. package/lib/components/CalculatorCredit/CalculatorCredit.js.map +1 -1
  120. package/lib/components/CreditForm/CreditForm.d.ts +2 -2
  121. package/lib/components/CreditForm/CreditForm.js +17 -6
  122. package/lib/components/CreditForm/CreditForm.js.map +1 -1
  123. package/lib/components/CreditForm/CreditFormContent.d.ts +5 -23
  124. package/lib/components/CreditForm/CreditFormProgress.d.ts +1 -1
  125. package/lib/components/CreditForm/CreditFormProgress.js +3 -3
  126. package/lib/components/CreditForm/CreditFormProgress.js.map +1 -1
  127. package/lib/components/CreditForm/CreditFormStatus.d.ts +16 -0
  128. package/lib/components/CreditForm/CreditFormStatus.js +23 -0
  129. package/lib/components/CreditForm/CreditFormStatus.js.map +1 -0
  130. package/lib/components/CreditForm/CreditFormStatusTracker.d.ts +2 -0
  131. package/lib/components/CreditForm/CreditFormStatusTracker.js +40 -0
  132. package/lib/components/CreditForm/CreditFormStatusTracker.js.map +1 -0
  133. package/lib/components/CreditForm/CreditFormStep.d.ts +5 -6
  134. package/lib/components/CreditForm/CreditFormStep.js +19 -19
  135. package/lib/components/CreditForm/CreditFormStep.js.map +1 -1
  136. package/lib/components/CreditForm/FailedStatusContent.d.ts +2 -0
  137. package/lib/components/CreditForm/FailedStatusContent.js +5 -0
  138. package/lib/components/CreditForm/FailedStatusContent.js.map +1 -0
  139. package/lib/components/CreditForm/PendingStatusContent.d.ts +2 -0
  140. package/lib/components/CreditForm/PendingStatusContent.js +30 -0
  141. package/lib/components/CreditForm/PendingStatusContent.js.map +1 -0
  142. package/lib/components/CreditForm/ReworkStatusContent.d.ts +2 -0
  143. package/lib/components/CreditForm/ReworkStatusContent.js +23 -0
  144. package/lib/components/CreditForm/ReworkStatusContent.js.map +1 -0
  145. package/lib/components/CreditForm/SuccessStatusContent.d.ts +2 -0
  146. package/lib/components/CreditForm/SuccessStatusContent.js +30 -0
  147. package/lib/components/CreditForm/SuccessStatusContent.js.map +1 -0
  148. package/lib/components/CreditForm/creditFormStepsData.js +3 -0
  149. package/lib/components/CreditForm/creditFormStepsData.js.map +1 -1
  150. package/lib/components/CreditForm/formStateMap.d.ts +72 -0
  151. package/lib/components/CreditForm/formStateMap.js +79 -0
  152. package/lib/components/CreditForm/formStateMap.js.map +1 -0
  153. package/lib/components/CreditForm/getInitialFormState.d.ts +1 -63
  154. package/lib/components/CreditForm/getInitialFormState.js +1 -70
  155. package/lib/components/CreditForm/getInitialFormState.js.map +1 -1
  156. package/lib/components/CreditForm/renderInfo.d.ts +2 -0
  157. package/lib/components/CreditForm/renderInfo.js +9 -0
  158. package/lib/components/CreditForm/renderInfo.js.map +1 -0
  159. package/lib/components/CreditForm/renderInputs.js +1 -3
  160. package/lib/components/CreditForm/renderInputs.js.map +1 -1
  161. package/lib/components/CreditForm/renderStep.d.ts +10 -0
  162. package/lib/components/CreditForm/renderStep.js +8 -0
  163. package/lib/components/CreditForm/renderStep.js.map +1 -0
  164. package/{mobile/bundle/components/CreditForm/useCreditFormApi.d.ts → lib/components/CreditForm/useCreditFormAPI.d.ts} +4 -3
  165. package/lib/components/CreditForm/{useCreditFormApi.js → useCreditFormAPI.js} +5 -2
  166. package/lib/components/CreditForm/useCreditFormAPI.js.map +1 -0
  167. package/lib/hooks/useForm.d.ts +1 -1
  168. package/lib/hooks/useForm.js +1 -0
  169. package/lib/hooks/useForm.js.map +1 -1
  170. package/lib/model/InputSectionsType.d.ts +5 -0
  171. package/lib/model/InputSectionsType.js +2 -0
  172. package/lib/model/InputSectionsType.js.map +1 -0
  173. package/mobile/bundle/api/RetailAPI/getTaskStatus.d.ts +14 -0
  174. package/mobile/bundle/api/RetailAPI/sendSignalToProcess.d.ts +11 -0
  175. package/mobile/bundle/api/RetailAPI/updateProfileEsia.d.ts +7 -7
  176. package/mobile/bundle/bundle.umd.js +260 -39
  177. package/mobile/bundle/bundle.umd.min.js +1 -1
  178. package/mobile/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +2 -3
  179. package/mobile/bundle/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -16
  180. package/mobile/bundle/components/ApplicationLeadForm/pasreEsiaProfile.d.ts +3 -0
  181. package/mobile/bundle/components/CalculatorCredit/CalculatorCredit.d.ts +2 -0
  182. package/mobile/bundle/components/CreditForm/CreditForm.d.ts +2 -2
  183. package/mobile/bundle/components/CreditForm/CreditFormContent.d.ts +5 -23
  184. package/mobile/bundle/components/CreditForm/CreditFormProgress.d.ts +1 -1
  185. package/mobile/bundle/components/CreditForm/CreditFormStatus.d.ts +16 -0
  186. package/mobile/bundle/components/CreditForm/CreditFormStatusTracker.d.ts +2 -0
  187. package/mobile/bundle/components/CreditForm/CreditFormStep.d.ts +5 -6
  188. package/mobile/bundle/components/CreditForm/FailedStatusContent.d.ts +2 -0
  189. package/mobile/bundle/components/CreditForm/PendingStatusContent.d.ts +2 -0
  190. package/mobile/bundle/components/CreditForm/ReworkStatusContent.d.ts +2 -0
  191. package/mobile/bundle/components/CreditForm/SuccessStatusContent.d.ts +2 -0
  192. package/mobile/bundle/components/CreditForm/formStateMap.d.ts +72 -0
  193. package/mobile/bundle/components/CreditForm/getInitialFormState.d.ts +1 -63
  194. package/mobile/bundle/components/CreditForm/renderInfo.d.ts +3 -0
  195. package/mobile/bundle/components/CreditForm/renderStep.d.ts +11 -0
  196. package/{dist/components/CreditForm/useCreditFormApi.d.ts → mobile/bundle/components/CreditForm/useCreditFormAPI.d.ts} +4 -3
  197. package/mobile/bundle/hooks/useForm.d.ts +1 -1
  198. package/mobile/bundle/model/InputSectionsType.d.ts +5 -0
  199. package/mobile/dist/api/RetailAPI/getTaskStatus.d.ts +14 -0
  200. package/mobile/dist/api/RetailAPI/getTaskStatus.js +13 -0
  201. package/mobile/dist/api/RetailAPI/getTaskStatus.js.map +1 -0
  202. package/mobile/dist/api/RetailAPI/sendSignalToProcess.d.ts +11 -0
  203. package/mobile/dist/api/RetailAPI/sendSignalToProcess.js +6 -0
  204. package/mobile/dist/api/RetailAPI/sendSignalToProcess.js.map +1 -0
  205. package/mobile/dist/api/RetailAPI/updateProfileEsia.d.ts +7 -7
  206. package/mobile/dist/components/ApplicationForm/ApplicationFormContent.d.ts +2 -3
  207. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +3 -3
  208. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  209. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -16
  210. package/mobile/dist/components/ApplicationLeadForm/pasreEsiaProfile.d.ts +3 -0
  211. package/mobile/dist/components/ApplicationLeadForm/pasreEsiaProfile.js +52 -0
  212. package/mobile/dist/components/ApplicationLeadForm/pasreEsiaProfile.js.map +1 -0
  213. package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js +6 -3
  214. package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  215. package/mobile/dist/components/CalculatorCredit/CalculatorCredit.d.ts +2 -0
  216. package/mobile/dist/components/CalculatorCredit/CalculatorCredit.js +3 -2
  217. package/mobile/dist/components/CalculatorCredit/CalculatorCredit.js.map +1 -1
  218. package/mobile/dist/components/CreditForm/CreditForm.d.ts +2 -2
  219. package/mobile/dist/components/CreditForm/CreditForm.js +17 -6
  220. package/mobile/dist/components/CreditForm/CreditForm.js.map +1 -1
  221. package/mobile/dist/components/CreditForm/CreditFormContent.d.ts +5 -23
  222. package/mobile/dist/components/CreditForm/CreditFormProgress.d.ts +1 -1
  223. package/mobile/dist/components/CreditForm/CreditFormProgress.js +3 -3
  224. package/mobile/dist/components/CreditForm/CreditFormProgress.js.map +1 -1
  225. package/mobile/dist/components/CreditForm/CreditFormStatus.d.ts +16 -0
  226. package/mobile/dist/components/CreditForm/CreditFormStatus.js +25 -0
  227. package/mobile/dist/components/CreditForm/CreditFormStatus.js.map +1 -0
  228. package/mobile/dist/components/CreditForm/CreditFormStatusTracker.d.ts +2 -0
  229. package/mobile/dist/components/CreditForm/CreditFormStatusTracker.js +42 -0
  230. package/mobile/dist/components/CreditForm/CreditFormStatusTracker.js.map +1 -0
  231. package/mobile/dist/components/CreditForm/CreditFormStep.d.ts +5 -6
  232. package/mobile/dist/components/CreditForm/CreditFormStep.js +19 -19
  233. package/mobile/dist/components/CreditForm/CreditFormStep.js.map +1 -1
  234. package/mobile/dist/components/CreditForm/FailedStatusContent.d.ts +2 -0
  235. package/mobile/dist/components/CreditForm/FailedStatusContent.js +7 -0
  236. package/mobile/dist/components/CreditForm/FailedStatusContent.js.map +1 -0
  237. package/mobile/dist/components/CreditForm/PendingStatusContent.d.ts +2 -0
  238. package/mobile/dist/components/CreditForm/PendingStatusContent.js +32 -0
  239. package/mobile/dist/components/CreditForm/PendingStatusContent.js.map +1 -0
  240. package/mobile/dist/components/CreditForm/ReworkStatusContent.d.ts +2 -0
  241. package/mobile/dist/components/CreditForm/ReworkStatusContent.js +25 -0
  242. package/mobile/dist/components/CreditForm/ReworkStatusContent.js.map +1 -0
  243. package/mobile/dist/components/CreditForm/SuccessStatusContent.d.ts +2 -0
  244. package/mobile/dist/components/CreditForm/SuccessStatusContent.js +32 -0
  245. package/mobile/dist/components/CreditForm/SuccessStatusContent.js.map +1 -0
  246. package/mobile/dist/components/CreditForm/creditFormStepsData.js +3 -0
  247. package/mobile/dist/components/CreditForm/creditFormStepsData.js.map +1 -1
  248. package/mobile/dist/components/CreditForm/formStateMap.d.ts +72 -0
  249. package/mobile/dist/components/CreditForm/formStateMap.js +81 -0
  250. package/mobile/dist/components/CreditForm/formStateMap.js.map +1 -0
  251. package/mobile/dist/components/CreditForm/getInitialFormState.d.ts +1 -63
  252. package/mobile/dist/components/CreditForm/getInitialFormState.js +2 -71
  253. package/mobile/dist/components/CreditForm/getInitialFormState.js.map +1 -1
  254. package/mobile/dist/components/CreditForm/renderInfo.d.ts +3 -0
  255. package/mobile/dist/components/CreditForm/renderInfo.js +12 -0
  256. package/mobile/dist/components/CreditForm/renderInfo.js.map +1 -0
  257. package/mobile/dist/components/CreditForm/renderInputs.js +1 -3
  258. package/mobile/dist/components/CreditForm/renderInputs.js.map +1 -1
  259. package/mobile/dist/components/CreditForm/renderStep.d.ts +11 -0
  260. package/mobile/dist/components/CreditForm/renderStep.js +11 -0
  261. package/mobile/dist/components/CreditForm/renderStep.js.map +1 -0
  262. package/mobile/dist/components/CreditForm/useCreditFormAPI.d.ts +13 -0
  263. package/mobile/dist/components/CreditForm/{useCreditFormApi.js → useCreditFormAPI.js} +7 -4
  264. package/mobile/dist/components/CreditForm/useCreditFormAPI.js.map +1 -0
  265. package/mobile/dist/hooks/useForm.d.ts +1 -1
  266. package/mobile/dist/hooks/useForm.js +1 -0
  267. package/mobile/dist/hooks/useForm.js.map +1 -1
  268. package/mobile/dist/model/InputSectionsType.d.ts +5 -0
  269. package/mobile/dist/model/InputSectionsType.js +2 -0
  270. package/mobile/dist/model/InputSectionsType.js.map +1 -0
  271. package/mobile/lib/api/RetailAPI/getTaskStatus.d.ts +14 -0
  272. package/mobile/lib/api/RetailAPI/getTaskStatus.js +10 -0
  273. package/mobile/lib/api/RetailAPI/getTaskStatus.js.map +1 -0
  274. package/mobile/lib/api/RetailAPI/sendSignalToProcess.d.ts +11 -0
  275. package/mobile/lib/api/RetailAPI/sendSignalToProcess.js +3 -0
  276. package/mobile/lib/api/RetailAPI/sendSignalToProcess.js.map +1 -0
  277. package/mobile/lib/api/RetailAPI/updateProfileEsia.d.ts +7 -7
  278. package/mobile/lib/common.css +1 -1
  279. package/mobile/lib/components/ApplicationForm/ApplicationFormContent.d.ts +2 -3
  280. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +3 -3
  281. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  282. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -16
  283. package/mobile/lib/components/ApplicationLeadForm/pasreEsiaProfile.d.ts +3 -0
  284. package/mobile/lib/components/ApplicationLeadForm/pasreEsiaProfile.js +49 -0
  285. package/mobile/lib/components/ApplicationLeadForm/pasreEsiaProfile.js.map +1 -0
  286. package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js +6 -3
  287. package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  288. package/mobile/lib/components/CalculatorCredit/CalculatorCredit.d.ts +2 -0
  289. package/mobile/lib/components/CalculatorCredit/CalculatorCredit.js +3 -2
  290. package/mobile/lib/components/CalculatorCredit/CalculatorCredit.js.map +1 -1
  291. package/mobile/lib/components/CreditForm/CreditForm.d.ts +2 -2
  292. package/mobile/lib/components/CreditForm/CreditForm.js +17 -6
  293. package/mobile/lib/components/CreditForm/CreditForm.js.map +1 -1
  294. package/mobile/lib/components/CreditForm/CreditFormContent.d.ts +5 -23
  295. package/mobile/lib/components/CreditForm/CreditFormProgress.d.ts +1 -1
  296. package/mobile/lib/components/CreditForm/CreditFormProgress.js +3 -3
  297. package/mobile/lib/components/CreditForm/CreditFormProgress.js.map +1 -1
  298. package/mobile/lib/components/CreditForm/CreditFormStatus.d.ts +16 -0
  299. package/mobile/lib/components/CreditForm/CreditFormStatus.js +23 -0
  300. package/mobile/lib/components/CreditForm/CreditFormStatus.js.map +1 -0
  301. package/mobile/lib/components/CreditForm/CreditFormStatusTracker.d.ts +2 -0
  302. package/mobile/lib/components/CreditForm/CreditFormStatusTracker.js +40 -0
  303. package/mobile/lib/components/CreditForm/CreditFormStatusTracker.js.map +1 -0
  304. package/mobile/lib/components/CreditForm/CreditFormStep.d.ts +5 -6
  305. package/mobile/lib/components/CreditForm/CreditFormStep.js +19 -19
  306. package/mobile/lib/components/CreditForm/CreditFormStep.js.map +1 -1
  307. package/mobile/lib/components/CreditForm/FailedStatusContent.d.ts +2 -0
  308. package/mobile/lib/components/CreditForm/FailedStatusContent.js +5 -0
  309. package/mobile/lib/components/CreditForm/FailedStatusContent.js.map +1 -0
  310. package/mobile/lib/components/CreditForm/PendingStatusContent.d.ts +2 -0
  311. package/mobile/lib/components/CreditForm/PendingStatusContent.js +30 -0
  312. package/mobile/lib/components/CreditForm/PendingStatusContent.js.map +1 -0
  313. package/mobile/lib/components/CreditForm/ReworkStatusContent.d.ts +2 -0
  314. package/mobile/lib/components/CreditForm/ReworkStatusContent.js +23 -0
  315. package/mobile/lib/components/CreditForm/ReworkStatusContent.js.map +1 -0
  316. package/mobile/lib/components/CreditForm/SuccessStatusContent.d.ts +2 -0
  317. package/mobile/lib/components/CreditForm/SuccessStatusContent.js +30 -0
  318. package/mobile/lib/components/CreditForm/SuccessStatusContent.js.map +1 -0
  319. package/mobile/lib/components/CreditForm/creditFormStepsData.js +3 -0
  320. package/mobile/lib/components/CreditForm/creditFormStepsData.js.map +1 -1
  321. package/mobile/lib/components/CreditForm/formStateMap.d.ts +72 -0
  322. package/mobile/lib/components/CreditForm/formStateMap.js +79 -0
  323. package/mobile/lib/components/CreditForm/formStateMap.js.map +1 -0
  324. package/mobile/lib/components/CreditForm/getInitialFormState.d.ts +1 -63
  325. package/mobile/lib/components/CreditForm/getInitialFormState.js +1 -70
  326. package/mobile/lib/components/CreditForm/getInitialFormState.js.map +1 -1
  327. package/mobile/lib/components/CreditForm/renderInfo.d.ts +3 -0
  328. package/mobile/lib/components/CreditForm/renderInfo.js +9 -0
  329. package/mobile/lib/components/CreditForm/renderInfo.js.map +1 -0
  330. package/mobile/lib/components/CreditForm/renderInputs.js +1 -3
  331. package/mobile/lib/components/CreditForm/renderInputs.js.map +1 -1
  332. package/mobile/lib/components/CreditForm/renderStep.d.ts +11 -0
  333. package/mobile/lib/components/CreditForm/renderStep.js +8 -0
  334. package/mobile/lib/components/CreditForm/renderStep.js.map +1 -0
  335. package/mobile/lib/components/CreditForm/useCreditFormAPI.d.ts +13 -0
  336. package/mobile/lib/components/CreditForm/{useCreditFormApi.js → useCreditFormAPI.js} +5 -2
  337. package/mobile/lib/components/CreditForm/useCreditFormAPI.js.map +1 -0
  338. package/mobile/lib/hooks/useForm.d.ts +1 -1
  339. package/mobile/lib/hooks/useForm.js +1 -0
  340. package/mobile/lib/hooks/useForm.js.map +1 -1
  341. package/mobile/lib/model/InputSectionsType.d.ts +5 -0
  342. package/mobile/lib/model/InputSectionsType.js +2 -0
  343. package/mobile/lib/model/InputSectionsType.js.map +1 -0
  344. package/mobile/src/api/RetailAPI/getTaskStatus.ts +16 -0
  345. package/mobile/src/api/RetailAPI/sendSignalToProcess.ts +19 -0
  346. package/mobile/src/api/RetailAPI/updateProfileEsia.ts +7 -7
  347. package/mobile/src/components/ApplicationForm/ApplicationFormContent.ts +3 -3
  348. package/mobile/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +2 -3
  349. package/mobile/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +3 -16
  350. package/mobile/src/components/ApplicationLeadForm/pasreEsiaProfile.ts +69 -0
  351. package/mobile/src/components/ApplicationLeadForm/useInitApplicationLead.ts +8 -3
  352. package/mobile/src/components/CalculatorCredit/CalculatorCredit.tsx +8 -1
  353. package/mobile/src/components/CreditForm/CreditForm.tsx +38 -11
  354. package/mobile/src/components/CreditForm/CreditFormContent.ts +6 -30
  355. package/mobile/src/components/CreditForm/CreditFormProgress.tsx +5 -5
  356. package/mobile/src/components/CreditForm/CreditFormStatus.tsx +119 -0
  357. package/mobile/src/components/CreditForm/CreditFormStatusTracker.tsx +47 -0
  358. package/mobile/src/components/CreditForm/CreditFormStep.tsx +39 -36
  359. package/mobile/src/components/CreditForm/FailedStatusContent.tsx +11 -0
  360. package/mobile/src/components/CreditForm/PendingStatusContent.tsx +38 -0
  361. package/mobile/src/components/CreditForm/ReworkStatusContent.tsx +32 -0
  362. package/mobile/src/components/CreditForm/SuccessStatusContent.tsx +37 -0
  363. package/mobile/src/components/CreditForm/creditFormStepsData.tsx +3 -0
  364. package/mobile/src/components/CreditForm/formStateMap.tsx +151 -0
  365. package/mobile/src/components/CreditForm/getInitialFormState.tsx +1 -136
  366. package/mobile/src/components/CreditForm/renderInfo.tsx +10 -0
  367. package/mobile/src/components/CreditForm/renderInputs.tsx +2 -3
  368. package/mobile/src/components/CreditForm/renderStep.tsx +25 -0
  369. package/mobile/src/components/CreditForm/{useCreditFormApi.tsx → useCreditFormAPI.tsx} +14 -3
  370. package/mobile/src/hooks/useForm.ts +3 -1
  371. package/mobile/src/model/InputSectionsType.ts +6 -0
  372. package/package.json +2 -2
  373. package/src/api/RetailAPI/getTaskStatus.ts +16 -0
  374. package/src/api/RetailAPI/sendSignalToProcess.ts +19 -0
  375. package/src/api/RetailAPI/updateProfileEsia.ts +7 -7
  376. package/src/components/ApplicationForm/ApplicationFormContent.ts +3 -3
  377. package/src/components/ApplicationLeadForm/ApplicationLeadForm.fixture.mobile.tsx +0 -2
  378. package/src/components/ApplicationLeadForm/ApplicationLeadForm.fixture.tsx +0 -2
  379. package/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +2 -3
  380. package/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +3 -16
  381. package/src/components/ApplicationLeadForm/pasreEsiaProfile.ts +69 -0
  382. package/src/components/ApplicationLeadForm/useInitApplicationLead.ts +8 -3
  383. package/src/components/CalculatorCredit/CalculatorCredit.tsx +8 -1
  384. package/src/components/CreditForm/CreditForm.tsx +38 -11
  385. package/src/components/CreditForm/CreditFormContent.ts +6 -30
  386. package/src/components/CreditForm/CreditFormProgress.tsx +5 -5
  387. package/src/components/CreditForm/CreditFormStatus.tsx +119 -0
  388. package/src/components/CreditForm/CreditFormStatusTracker.tsx +47 -0
  389. package/src/components/CreditForm/CreditFormStep.tsx +39 -36
  390. package/src/components/CreditForm/FailedStatusContent.tsx +11 -0
  391. package/src/components/CreditForm/PendingStatusContent.tsx +38 -0
  392. package/src/components/CreditForm/ReworkStatusContent.tsx +32 -0
  393. package/src/components/CreditForm/SuccessStatusContent.tsx +37 -0
  394. package/src/components/CreditForm/creditFormStepsData.tsx +3 -0
  395. package/src/components/CreditForm/formStateMap.tsx +151 -0
  396. package/src/components/CreditForm/getInitialFormState.tsx +1 -136
  397. package/src/components/CreditForm/renderInfo.tsx +10 -0
  398. package/src/components/CreditForm/renderInputs.tsx +2 -3
  399. package/src/components/CreditForm/renderStep.tsx +25 -0
  400. package/src/components/CreditForm/{useCreditFormApi.tsx → useCreditFormAPI.tsx} +14 -3
  401. package/src/hooks/useForm.ts +3 -1
  402. package/src/model/InputSectionsType.ts +6 -0
  403. package/bundle/api/FileStorage.d.ts +0 -18
  404. package/dist/api/FileStorage.d.ts +0 -18
  405. package/dist/api/FileStorage.js +0 -60
  406. package/dist/api/FileStorage.js.map +0 -1
  407. package/dist/components/CreditForm/useCreditFormApi.js.map +0 -1
  408. package/lib/api/FileStorage.d.ts +0 -18
  409. package/lib/api/FileStorage.js +0 -58
  410. package/lib/api/FileStorage.js.map +0 -1
  411. package/lib/components/CreditForm/useCreditFormApi.js.map +0 -1
  412. package/mobile/bundle/api/FileStorage.d.ts +0 -18
  413. package/mobile/dist/api/FileStorage.d.ts +0 -18
  414. package/mobile/dist/api/FileStorage.js +0 -60
  415. package/mobile/dist/api/FileStorage.js.map +0 -1
  416. package/mobile/dist/components/CreditForm/useCreditFormApi.d.ts +0 -12
  417. package/mobile/dist/components/CreditForm/useCreditFormApi.js.map +0 -1
  418. package/mobile/lib/api/FileStorage.d.ts +0 -18
  419. package/mobile/lib/api/FileStorage.js +0 -58
  420. package/mobile/lib/api/FileStorage.js.map +0 -1
  421. package/mobile/lib/components/CreditForm/useCreditFormApi.d.ts +0 -12
  422. package/mobile/lib/components/CreditForm/useCreditFormApi.js.map +0 -1
  423. package/mobile/src/api/FileStorage.ts +0 -99
  424. package/src/api/FileStorage.ts +0 -99
@@ -1076,6 +1076,7 @@
1076
1076
  ev.preventDefault();
1077
1077
  resetOnSubmit ? reset() : setDirtyForm(true);
1078
1078
  onSubmit && onSubmit(formState, ev);
1079
+ return formState;
1079
1080
  }, [onSubmit, formState]);
1080
1081
  return [
1081
1082
  formState,
@@ -4113,10 +4114,58 @@
4113
4114
 
4114
4115
  const updateProfileEsia = (body) => doRequest('/esia/updateProfileEsia', 'POST', body);
4115
4116
 
4117
+ const parseEsiaProfile = (esiaProfile) => {
4118
+ const { profile, addInfo, document, addressRegistration, addressFact } = esiaProfile;
4119
+ return {
4120
+ name: profile?.name,
4121
+ surname: profile?.surname,
4122
+ middleName: profile?.midname,
4123
+ birthday: profile?.birthDate,
4124
+ phone: normalizePhone(profile?.phone),
4125
+ email: profile?.email,
4126
+ dulIssueDateField: document?.dulIssueDate,
4127
+ dulIssuedBy: document?.dulIssuedBy,
4128
+ dulNumber: document?.dulNumber,
4129
+ dulSerie: document?.dulSerie,
4130
+ dulSubdivisionCode: document?.dulSubdivisionCode,
4131
+ snils: addInfo?.snils,
4132
+ birthPlace: addInfo?.birthPlace,
4133
+ addressRegistration: buildAddress(addressRegistration),
4134
+ addressFact: buildAddress(addressFact),
4135
+ };
4136
+ };
4137
+ const concatFullAddress = (address) => {
4138
+ return address.reduce((acc, value) => {
4139
+ if (value) {
4140
+ return acc ? `${acc}, ${value}` : value;
4141
+ }
4142
+ return acc;
4143
+ }, '');
4144
+ };
4145
+ const buildAddress = (fields) => {
4146
+ const { postcode, region, regionCode, locality, city, street, house, building, block, apartment, } = fields;
4147
+ const place = locality || city;
4148
+ const fullAddress = concatFullAddress([
4149
+ postcode,
4150
+ region,
4151
+ place,
4152
+ street ? `ул ${street}` : undefined,
4153
+ house ? `д ${house}` : undefined,
4154
+ block ? `к ${block}` : undefined,
4155
+ building ? `стр ${building}` : undefined,
4156
+ apartment ? `кв ${apartment}` : undefined,
4157
+ ]);
4158
+ return {
4159
+ ...fields,
4160
+ regionCode: regionCode?.key,
4161
+ fullAddress,
4162
+ };
4163
+ };
4164
+
4116
4165
  const useInitApplicationLead = (nextStepLink) => {
4117
4166
  const [isLoading, setIsLoading] = useState(false);
4118
4167
  const [profileId] = useLocalStorage('profileId');
4119
- const [, setEsiaData] = useLocalStorage('esiaData');
4168
+ const [leadForm, setLeadForm] = useLocalStorage('leadForm');
4120
4169
  const params = new URLSearchParams(decodeURIComponent(globalThis.location?.search));
4121
4170
  const code = params.get('code');
4122
4171
  const state = params.get('state');
@@ -4128,7 +4177,10 @@
4128
4177
  state,
4129
4178
  redirectUri: globalThis.location?.href,
4130
4179
  });
4131
- setEsiaData(JSON.stringify(data));
4180
+ setLeadForm({
4181
+ ...leadForm,
4182
+ ...parseEsiaProfile(data),
4183
+ });
4132
4184
  globalThis.location.href = nextStepLink;
4133
4185
  }
4134
4186
  }, []);
@@ -4138,7 +4190,6 @@
4138
4190
  updateEsiaProfile();
4139
4191
  }
4140
4192
  else {
4141
- setEsiaData('');
4142
4193
  sessionStorage.removeItem('accessToken');
4143
4194
  sessionStorage.removeItem('refreshToken');
4144
4195
  }
@@ -4148,12 +4199,12 @@
4148
4199
  };
4149
4200
  };
4150
4201
 
4151
- const ApplicationLeadForm = JSX(({ className, title, programId = '', nextStepLink = '/credit-lead', typeForm = '', sections = [], button, ...rest }) => {
4202
+ const ApplicationLeadForm = JSX(({ className, title, programId = '', nextStepLink = '/credit-lead', sections = [], button, ...rest }) => {
4152
4203
  const inputs = (sections?.flatMap((_) => _?.inputs) || []);
4153
4204
  const [responseType, setResponseType] = useState('');
4154
4205
  const { isLoading } = useInitApplicationLead(nextStepLink);
4155
4206
  const [leadForm, setLeadForm] = useLocalStorage('leadForm');
4156
- const initialFormState = getInitialFormState$1(inputs, leadForm, typeForm);
4207
+ const initialFormState = getInitialFormState$1(inputs, leadForm);
4157
4208
  const { handleSubmit, responseStatus } = useApplicationLeadApi({
4158
4209
  inputs,
4159
4210
  programId,
@@ -4161,7 +4212,7 @@
4161
4212
  saveForm: setLeadForm,
4162
4213
  });
4163
4214
  if (responseStatus) {
4164
- const responseTypeDialog = useResponseTypeDialog({ responseType: responseStatus, typeForm });
4215
+ const responseTypeDialog = useResponseTypeDialog({ responseType: responseStatus });
4165
4216
  responseTypeDialog.open();
4166
4217
  }
4167
4218
  const [, { field, onSubmit, reset }] = useForm(initialFormState, { onSubmit: handleSubmit });
@@ -5067,9 +5118,9 @@
5067
5118
  isInsurance: 'isInsurance',
5068
5119
  moneyValue: 'maxSum',
5069
5120
  };
5070
- const CalculatorCredit = UniBlock(({ className, title, calcSource, buttons, footnote, paramsViewSettings, defaultParams, ...rest }) => {
5121
+ const CalculatorCredit = UniBlock(({ className, title, calcSource, buttons, footnote, paramsViewSettings, defaultParams, registerSubmit, ...rest }) => {
5071
5122
  const defaultParamsCals = getDefaultParamsMin(calcSource?.rateRows);
5072
- const [userInputParams, { field }] = useForm({
5123
+ const [userInputParams, { field, onSubmit }] = useForm({
5073
5124
  moneyValue: getMoneyDefaultValue(defaultParams, CREDIT_DEFAULT_SUM),
5074
5125
  monthsValue: getMonthsDefaultValue(defaultParams, DEFAULT_MONTHS),
5075
5126
  isAnnuity: Boolean(defaultParams?.isAnnuity),
@@ -5078,6 +5129,7 @@
5078
5129
  isPensionClient: Boolean(defaultParams?.isEnablePensionClient),
5079
5130
  isStateEmployee: Boolean(defaultParams?.isEnableStateEmployee),
5080
5131
  });
5132
+ registerSubmit?.(onSubmit);
5081
5133
  const calcParams = getCreditCalculatorParams(userInputParams, calcSource, paramsViewSettings);
5082
5134
  const paymentTypeElement = renderPaymentType({
5083
5135
  title: 'Тип платежа',
@@ -5785,15 +5837,159 @@
5785
5837
 
5786
5838
  const ProgressBar = JSX(({ step = 10, description, showPercentage = true }) => (jsxs("div", { children: [jsx("div", { className: "h-4 w-full bg-gray relative", children: jsx("div", { className: "h-4 bg-green", style: { width: `${step}%` } }) }), jsxs("div", { className: "relative", children: [showPercentage ? jsxs("div", { className: "absolute left-2/4 text-green", children: [step, "%"] }) : null, description ? jsx("div", { className: "text-right mr-4 text-gray", children: description }) : null] })] })));
5787
5839
 
5788
- const CreditFormProgress = JSX(({ step = 0, totalSteps = 5, stepsTitles = [] }) => {
5789
- const progress = useMemo(() => ((step + 1) / totalSteps) * 100, [step, totalSteps]);
5790
- return (jsx("div", { className: "py-lg px-5xl bg-white col-span-12", children: jsxs("div", { children: [jsxs("span", { className: "font-bold", children: ["\u0428\u0430\u0433 ", step + 1, " \u0438\u0437 ", totalSteps, "."] }), stepsTitles[step] || null, jsx(ProgressBar, { step: progress, showPercentage: false })] }) }));
5840
+ const CreditFormProgress = JSX(({ step = 1, totalSteps = 5, stepsTitles = [] }) => {
5841
+ const progress = useMemo(() => (step / totalSteps) * 100, [step, totalSteps]);
5842
+ return (jsx("div", { className: "py-lg px-5xl bg-white col-span-12", children: jsxs("div", { children: [jsxs("span", { className: "font-bold mr-s", children: ["\u0428\u0430\u0433 ", step, " \u0438\u0437 ", totalSteps, "."] }), stepsTitles[step] || null, jsx(ProgressBar, { step: progress, showPercentage: false })] }) }));
5791
5843
  });
5792
5844
 
5845
+ var STATUS_TYPE;
5846
+ (function (STATUS_TYPE) {
5847
+ STATUS_TYPE["process"] = "IN_PROCESS";
5848
+ STATUS_TYPE["ok"] = "OK";
5849
+ STATUS_TYPE["fail"] = "FAILED";
5850
+ STATUS_TYPE["rework"] = "REWORK";
5851
+ })(STATUS_TYPE || (STATUS_TYPE = {}));
5852
+ const getTaskStatus = (body) => doRequest('/user-data/getTaskStatus', 'POST', body);
5853
+
5854
+ const sendSignalToProcess = (body) => doRequest('/public-data/sendSignalToProcess', 'POST', body);
5855
+
5793
5856
  const InfoCard = JSX(({ __html, icon = 'InfoCircleIcon', iconVersion = 'black', link }) => (jsxs("div", { className: "flex flex-row items-center w-full min-h-14 bg-main-gray rounded-lg gap-m p-m", children: [jsx("div", { className: "rounded-full bg-white p-xs", children: jsx(Icon, { name: icon, width: "24", height: "24", iconVersion: iconVersion }) }), jsxs("div", { className: "", children: [jsx(RichText, { __html: __html }), link?.text ? jsx(LinkButton, { className: "text-primary-main", children: link.text }) : null] })] })));
5794
5857
 
5858
+ const TimerCircle = JSX(({ interval = 0, title, __html }) => {
5859
+ const [time, setTime] = useState(interval);
5860
+ const gradientPercentage = 100 - ((interval - time) / interval) * 100;
5861
+ return (jsxs("div", { children: [title ? jsx(Headline, { title: title, headlineVersion: "S" }) : null, jsxs("div", { className: "flex justify-center items-center flex-col", children: [jsxs("div", { className: style(`relative flex items-center justify-center w-24 h-24 rounded-full bg-gray text-transparent mb-5`), children: [jsx("div", { className: "absolute inset-0 rounded-full", style: {
5862
+ background: `conic-gradient(rgb(66, 171, 68) ${gradientPercentage}%, rgb(125, 126, 127) 0deg)`,
5863
+ } }), jsx("div", { className: "z-10 flex items-center justify-center px-4 py-2 rounded-full w-20 h-20 bg-white text-primary-text text-m", children: jsx(Timer, { interval: interval, time: time, setTime: setTime }) })] }), __html ? jsx(RichText, { __html: __html }) : null] })] }));
5864
+ });
5865
+
5866
+ const CreditFormStatus = JSX(({ title, description: dsc, infoCard, sectionInfoTitle, sectionInfo, sectionAdditionalTitle, sectionInfoAdditional, buttonText, interval, ...props }) => (jsxs(BlockWrapper, { ...props, children: [jsxs("div", { className: "flex flex-col md:flex-row items-center", children: [jsx(Headline, { headlineVersion: "M", title: title, description: dsc, align: "text-left", padding: "p-xl", className: "w-full" }), interval ? jsx(TimerCircle, { interval: interval }) : null] }), jsx(SectionInfo, { title: sectionInfoTitle, items: sectionInfo }), jsx(SectionInfo, { title: sectionAdditionalTitle, items: sectionInfoAdditional, countColumns: true }), infoCard?.__html ? (jsx(InfoCard, { __html: infoCard?.__html, icon: infoCard?.icon, link: {
5867
+ text: infoCard?.link?.text,
5868
+ } })) : null, buttonText ? (jsx(LinkButton, { href: "/natural", text: buttonText, version: "primary", className: "w-full mt-lg" })) : null] })));
5869
+ const SectionInfo = ({ title, items, countColumns = false, }) => {
5870
+ const isMobile = useMobileMode();
5871
+ if (!items) {
5872
+ return null;
5873
+ }
5874
+ return (jsxs("div", { children: [jsx("hr", { className: "w-full h-px bg-main-gray border-0" }), jsxs("div", { className: "p-xl", children: [title ? (jsx(Text, { color: "text-primary-text", size: "text-h5", children: jsx("div", { className: style({ 'mb-m': Boolean(title) }), children: title }) })) : null, items ? (jsx("div", { className: style('grid grid-cols-1 gap-m', inputColumnStyles(countColumns || isMobile ? 1 : 2)), children: items.map((item, index) => (jsx("div", { children: renderItem(item) }, index))) })) : null] })] }));
5875
+ };
5876
+ const renderItem = ({ label, description }) => (jsxs("div", { className: "flex flex-col", children: [jsx(Text, { color: "text-secondary-text", size: "text-l", children: label }), jsx(Text, { color: "text-primary-text", size: "text-xl", children: description })] }));
5877
+
5878
+ const FailedStatusContent = JSX(() => (jsx(CreditFormStatus, { title: "\u0411\u043B\u0430\u0433\u043E\u0434\u0430\u0440\u0438\u043C \u0412\u0430\u0441 \u0437\u0430 \u043E\u0436\u0438\u0434\u0430\u043D\u0438\u0435", description: "\u0412 \u043D\u0430\u0441\u0442\u043E\u044F\u0449\u0438\u0439 \u043C\u043E\u043C\u0435\u043D\u0442 \u0411\u0430\u043D\u043A \u043D\u0435 \u043C\u043E\u0436\u0435\u0442 \u043E\u0434\u043E\u0431\u0440\u0438\u0442\u044C \u0412\u0430\u0448\u0443 \u0437\u0430\u044F\u0432\u043A\u0443 \u043D\u0430 \u043A\u0440\u0435\u0434\u0438\u0442.\n \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u043F\u043E\u0434\u0430\u0442\u044C \u0437\u0430\u044F\u0432\u043A\u0443 \u043F\u043E\u0437\u0436\u0435. \u0421\u043F\u0430\u0441\u0438\u0431\u043E \u0437\u0430 \u043E\u0431\u0440\u0430\u0449\u0435\u043D\u0438\u0435 \u0432 \u0410\u041E \u00AB\u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A\u00BB.", buttonText: "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043D\u0430 \u0433\u043B\u0430\u0432\u043D\u0443\u044E" })));
5879
+
5880
+ const PendingStatusContent = JSX(() => {
5881
+ const [leadForm] = useLocalStorage('leadForm');
5882
+ return (jsx(CreditFormStatus, { interval: 300, title: "\u0417\u0430\u044F\u0432\u043A\u0430 \u0443\u0441\u043F\u0435\u0448\u043D\u043E \u043E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0430", description: "\u041D\u0435 \u0437\u0430\u043A\u0440\u044B\u0432\u0430\u0439\u0442\u0435 \u043E\u043A\u043D\u043E, \u0441\u043A\u043E\u0440\u043E \u0441\u043E\u043E\u0431\u0449\u0438\u043C \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442", sectionInfoTitle: "\u0417\u0430\u044F\u0432\u043B\u0435\u043D\u043D\u044B\u0435 \u0443\u0441\u043B\u043E\u0432\u0438\u044F \u043F\u043E \u043A\u0440\u0435\u0434\u0438\u0442\u0443", sectionInfo: [
5883
+ {
5884
+ label: 'Название продукта',
5885
+ description: 'Кредит на любые цели',
5886
+ },
5887
+ {
5888
+ label: 'Цель кредита',
5889
+ description: 'На любые цели',
5890
+ },
5891
+ {
5892
+ label: 'Сумма',
5893
+ description: leadForm?.moneyValue?.toLocaleString() + ' ₽',
5894
+ },
5895
+ {
5896
+ label: 'Срок кредита',
5897
+ description: leadForm?.monthsValue + ' мес',
5898
+ },
5899
+ {
5900
+ label: 'Тип платежа',
5901
+ description: leadForm?.isAnnuity ? 'Аннуитетный' : 'Дифференцированный',
5902
+ },
5903
+ ] }));
5904
+ });
5905
+
5906
+ const ReworkStatusContent = JSX(() => {
5907
+ const [leadForm] = useLocalStorage('leadForm');
5908
+ return (jsx(CreditFormStatus, { title: "\u0411\u043B\u0430\u0433\u043E\u0434\u0430\u0440\u0438\u043C \u0432\u0430\u0441 \u0437\u0430 \u043E\u0436\u0438\u0434\u0430\u043D\u0438\u0435, \u043D\u043E \u043D\u0430\u043C \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F \u0431\u043E\u043B\u044C\u0448\u0435 \u0432\u0440\u0435\u043C\u0435\u043D\u0438 \u0434\u043B\u044F \u043F\u0440\u0438\u043D\u044F\u0442\u0438\u044F \u0440\u0435\u0448\u0435\u043D\u0438\u044F", description: "\u041F\u043E\u0441\u0435\u0442\u0438\u0442\u0435 \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u043E\u0435 \u043E\u0442\u0434\u0435\u043B\u0435\u043D\u0438\u0435 \u0431\u0430\u043D\u043A\u0430 \u0441 \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u044B\u043C\u0438 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430\u043C\u0438 \u0438 \u0442\u0430\u043A \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u0435 \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u0435 \u043A\u0440\u0435\u0434\u0438\u0442\u0430.", sectionAdditionalTitle: "\u0412 \u043E\u0442\u0434\u0435\u043B\u0435\u043D\u0438\u0438 \u0411\u0430\u043D\u043A\u0430", sectionInfoAdditional: [
5909
+ {
5910
+ label: 'Регион',
5911
+ description: leadForm?.regionRetail?.text,
5912
+ },
5913
+ {
5914
+ label: 'Адрес',
5915
+ description: leadForm?.addressRetail?.text,
5916
+ },
5917
+ ], sectionInfo: [
5918
+ {
5919
+ label: 'Основные документы:',
5920
+ description: '- Паспорт РФ',
5921
+ },
5922
+ ], buttonText: "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043D\u0430 \u0433\u043B\u0430\u0432\u043D\u0443\u044E" }));
5923
+ });
5924
+
5925
+ const SuccessStatusContent = JSX(() => {
5926
+ const [leadForm] = useLocalStorage('leadForm');
5927
+ return (jsx(CreditFormStatus, { title: "\u0411\u0430\u043D\u043A \u043E\u0434\u043E\u0431\u0440\u0438\u043B \u0432\u0430\u043C \u043A\u0440\u0435\u0434\u0438\u0442", description: "\u041E\u0431\u0440\u0430\u0442\u0438\u0442\u0435\u0441\u044C \u0432 \u043E\u0442\u0434\u0435\u043B\u0435\u043D\u0438\u0435 \u0431\u0430\u043D\u043A\u0430, \u0447\u0442\u043E\u0431\u044B \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044C \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u0435 \u0438 \u043F\u043E\u043B\u0443\u0447\u0438\u0442 \u0432\u0430\u0448 \u043A\u0440\u0435\u0434\u0438\u0442", sectionInfo: [
5928
+ {
5929
+ label: 'Название продукта',
5930
+ description: 'Кредит на любые цели',
5931
+ },
5932
+ {
5933
+ label: 'Ставка',
5934
+ description: '14,5%',
5935
+ },
5936
+ {
5937
+ label: 'Ежемесячный платеж',
5938
+ description: '86 052 ₽',
5939
+ },
5940
+ {
5941
+ label: 'Срок кредита',
5942
+ description: leadForm?.monthsValue + ' мес',
5943
+ },
5944
+ {
5945
+ label: 'Тип платежа',
5946
+ description: leadForm?.isAnnuity ? 'Аннуитетный' : 'Дифференцированный',
5947
+ },
5948
+ ], buttonText: "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043D\u0430 \u0433\u043B\u0430\u0432\u043D\u0443\u044E" }));
5949
+ });
5950
+
5951
+ const TASK_ID = 2816419;
5952
+ const SIGNAL_TYPES = [
5953
+ 'CREATE_APPLICATION_SHORT_SIGNAL',
5954
+ 'CREATE_APPLICATION_LOAN_V3_SIGNAL',
5955
+ ];
5956
+ const CreditFormStatusTracker = JSX(() => {
5957
+ const [status, setStatus] = useState(STATUS_TYPE.process);
5958
+ useEffect(() => {
5959
+ for (const signalType of SIGNAL_TYPES) {
5960
+ sendSignalToProcess({ signalType, taskId: TASK_ID });
5961
+ }
5962
+ const trackStatus = () => getTaskStatus({ taskId: TASK_ID }).then((res) => {
5963
+ if (res.statusCd && res.statusCd !== STATUS_TYPE.process) {
5964
+ clearInterval(pullingInterval);
5965
+ setStatus(res.statusCd);
5966
+ }
5967
+ });
5968
+ const pullingInterval = setInterval(trackStatus, 30000);
5969
+ }, []);
5970
+ return renderStatus(status);
5971
+ });
5972
+ const renderStatus = (status) => {
5973
+ const statusesMap = {
5974
+ IN_PROCESS: jsx(PendingStatusContent, {}),
5975
+ FAILED: jsx(FailedStatusContent, {}),
5976
+ OK: jsx(SuccessStatusContent, {}),
5977
+ REWORK: jsx(ReworkStatusContent, {}),
5978
+ };
5979
+ return statusesMap[status] || null;
5980
+ };
5981
+
5795
5982
  const formStateMap = {
5796
5983
  0: {
5984
+ moneyValue: 0,
5985
+ monthsValue: 0,
5986
+ isAnnuity: false,
5987
+ isInsurance: false,
5988
+ isSalaryClient: false,
5989
+ isPensionClient: false,
5990
+ isStateEmployee: false,
5991
+ },
5992
+ 1: {
5797
5993
  surname: '',
5798
5994
  name: '',
5799
5995
  middleName: '',
@@ -5811,7 +6007,6 @@
5811
6007
  fullAddress: '',
5812
6008
  fiasCode: '',
5813
6009
  },
5814
- addressMatch: false,
5815
6010
  participantDateRegistration: undefined,
5816
6011
  addressFact: {
5817
6012
  fullAddress: '',
@@ -5819,7 +6014,7 @@
5819
6014
  },
5820
6015
  housing: '',
5821
6016
  },
5822
- 1: {
6017
+ 2: {
5823
6018
  amountWorkers: { key: '', text: '' },
5824
6019
  beginDate: undefined,
5825
6020
  employerActivities: { key: '', text: '' },
@@ -5840,7 +6035,7 @@
5840
6035
  partInBusiness: undefined,
5841
6036
  positionOrganization: { key: '', text: '' },
5842
6037
  },
5843
- 2: {
6038
+ 3: {
5844
6039
  familyStatus: { key: '', text: '' },
5845
6040
  dependents: undefined,
5846
6041
  familyMembers: undefined,
@@ -5849,19 +6044,20 @@
5849
6044
  snils: '',
5850
6045
  armyIdFlg: false,
5851
6046
  },
5852
- 3: {
6047
+ 4: {
5853
6048
  disablePeopleFlg: false,
5854
6049
  bankruptcyFlg: false,
5855
6050
  shareholderFlg: false,
5856
6051
  legalEntityName: '',
5857
6052
  creditInRshbCd: undefined,
5858
6053
  },
5859
- 4: {
6054
+ 5: {
5860
6055
  regionRetail: '',
5861
6056
  addressRetail: '',
5862
6057
  bankEmployeeCode: '',
5863
6058
  },
5864
6059
  };
6060
+
5865
6061
  const getInitialFormState = (step, localStorageData) => {
5866
6062
  if (localStorageData) {
5867
6063
  // TODO: Fill in for other fields with type Date
@@ -5876,10 +6072,17 @@
5876
6072
  };
5877
6073
  };
5878
6074
 
5879
- const renderInputs = ({ field, inputs }) => {
5880
- return (inputs || [])?.map(getField(field, ''));
6075
+ const renderInfo$1 = (inputs = []) => {
6076
+ const infoInputs = inputs.filter((_) => _.fieldType === 'info');
6077
+ return infoInputs.length
6078
+ ? infoInputs.map(({ text, name }, i) => jsx(InfoCard, { __html: text }, `${name}_${i}`))
6079
+ : null;
5881
6080
  };
5882
6081
 
6082
+ const renderInputs = ({ field, inputs }) => (inputs || [])?.map(getField(field, ''));
6083
+
6084
+ const renderStep = ({ sections, field }) => sections?.map(({ inputs, columns, title }, i) => (jsxs("div", { className: style(inputColumnStyles(columns), 'grid gap-x-m'), children: [renderInfo$1(inputs), renderTitle(title), renderInputs({ field, inputs })] }, `section-${i}`)));
6085
+
5883
6086
  const StepsNavigationButtons = JSX(({ step, onPrevStep }) => {
5884
6087
  const isFirstStep = step === 0;
5885
6088
  return (jsxs("div", { className: 'flex justify-between', children: [jsx(Button, { onClick: onPrevStep, className: style('w-full @xl:w-auto'), type: "button", version: "secondary", disabled: isFirstStep, children: "\u041D\u0430\u0437\u0430\u0434" }), jsx(Button, { className: style('w-full @xl:w-auto'), type: "submit", children: "\u0414\u0430\u043B\u0435\u0435" })] }));
@@ -6002,7 +6205,7 @@
6002
6205
  }
6003
6206
  };
6004
6207
 
6005
- const useCreditFormApi = ({ inputs, step, onNextStep, saveStep }) => {
6208
+ const useCreditFormAPI = ({ step, inputs, onNextStep, saveStep, finishForm, }) => {
6006
6209
  const [taskId] = useLocalStorage('taskId');
6007
6210
  const [profileId] = useLocalStorage('profileId');
6008
6211
  const [participantId] = useLocalStorage('participantId');
@@ -6027,6 +6230,9 @@
6027
6230
  return 'Fail';
6028
6231
  }
6029
6232
  onNextStep();
6233
+ if (step === 5) {
6234
+ finishForm?.(true);
6235
+ }
6030
6236
  return 'OK';
6031
6237
  }, []);
6032
6238
  return {
@@ -6034,29 +6240,34 @@
6034
6240
  };
6035
6241
  };
6036
6242
 
6037
- const CreditFormStep = JSX(({ step, sections, onPrevStep, onNextStep, inputs }) => {
6243
+ const CreditFormStep = JSX(({ step, sections, onPrevStep, onNextStep, inputs, renderStep: renderStep$1 = renderStep, isFormFinished, finishForm, }) => {
6038
6244
  const [localStorageData, saveStep] = useLocalStorage('leadForm');
6039
6245
  const initialState = getInitialFormState(step, localStorageData);
6040
- const { handleSubmit } = useCreditFormApi({
6041
- inputs,
6246
+ const customSubmit = useRef(undefined);
6247
+ const registerSubmit = useCallback((submit) => {
6248
+ customSubmit.current = submit;
6249
+ }, []);
6250
+ const { handleSubmit } = useCreditFormAPI({
6042
6251
  step,
6043
- onNextStep: onNextStep,
6252
+ inputs,
6253
+ onNextStep,
6044
6254
  saveStep,
6255
+ finishForm,
6045
6256
  });
6046
- const [, { field, onSubmit }] = useForm(initialState, { onSubmit: handleSubmit });
6047
- return (jsxs("form", { onSubmit: onSubmit, className: "space-y-m", children: [renderStep({ sections, field }), jsx(StepsNavigationButtons, { step: step, onPrevStep: onPrevStep })] }));
6257
+ const [, { field, onSubmit }] = useForm(initialState, {
6258
+ onSubmit: (formData, ev) => {
6259
+ handleSubmit({ ...formData, ...customSubmit.current?.(ev) });
6260
+ },
6261
+ });
6262
+ return isFormFinished ? (jsx(CreditFormStatusTracker, {})) : (jsxs("form", { onSubmit: onSubmit, className: "space-y-m", children: [renderStep$1({ sections, field, registerSubmit }), jsx(StepsNavigationButtons, { step: step, onPrevStep: onPrevStep })] }));
6048
6263
  });
6049
- const renderStep = ({ sections, field }) => {
6050
- return sections?.map((_, i) => (jsxs("div", { className: style(inputColumnStyles(_.columns), 'grid gap-x-m'), children: [renderInfo$1(_?.inputs), renderTitle(_?.title), renderInputs({ field, inputs: _?.inputs })] }, `section-${i}`)));
6051
- };
6052
- const renderInfo$1 = (inputs = []) => {
6053
- const infoInputs = inputs.filter((_) => _.fieldType === 'info');
6054
- return infoInputs.length ? infoInputs.map(({ text }) => jsx(InfoCard, { __html: text })) : null;
6055
- };
6056
6264
 
6057
6265
  /* eslint-disable max-lines */
6058
6266
  /* eslint-disable max-len */
6059
6267
  const stepsSectionsMap = [
6268
+ [
6269
+ // zero step for calculator
6270
+ ],
6060
6271
  [
6061
6272
  {
6062
6273
  title: 'Персональные данные',
@@ -6287,8 +6498,8 @@
6287
6498
  ],
6288
6499
  ];
6289
6500
 
6290
- const STEPS_COUNT = 5;
6291
- const STEPS_TITLES = [
6501
+ const WIZARD_STEPS = 5;
6502
+ const WIZARD_TITLES = [
6292
6503
  'Персональные данные',
6293
6504
  'Данные о трудоустройстве',
6294
6505
  'Данные о доходах и расходах',
@@ -6297,16 +6508,26 @@
6297
6508
  ];
6298
6509
  const CreditForm = JSX(({ className, ...rest }) => {
6299
6510
  const [step, setStep] = useState(0);
6300
- const sections = useMemo(() => stepsSectionsMap[step], [step]);
6301
- const inputs = (sections?.flatMap((_) => _?.inputs) || []);
6302
6511
  const handleNextStep = useCallback(() => {
6303
- setStep((_) => Math.min(_ + 1, STEPS_COUNT - 1));
6512
+ setStep((_) => Math.min(_ + 1, WIZARD_STEPS));
6304
6513
  }, []);
6305
6514
  const handlePrevStep = useCallback(() => {
6306
6515
  //TODO search hook - 1,
6307
6516
  setStep((_) => Math.max(_ - 1, 0));
6308
6517
  }, []);
6309
- return (jsx(BlockWrapper, { className: style('bg-transparent', className), defaultPadding: "p-6xl", ...rest, children: jsxs("div", { className: "container grid grid-cols-12", children: [jsx(CreditFormProgress, { stepsTitles: STEPS_TITLES, step: step, totalSteps: STEPS_COUNT }), jsx("div", { className: "py-lg px-5xl mt-2xs bg-white col-span-12", children: jsx(CreditFormStep, { inputs: inputs, step: step, sections: sections, onNextStep: handleNextStep, onPrevStep: handlePrevStep }, String(step)) })] }) }));
6518
+ const sections = useMemo(() => stepsSectionsMap[step], [step]);
6519
+ const inputs = (sections?.flatMap((_) => _?.inputs) || []);
6520
+ const isStartStep = step === 0;
6521
+ const [isFormFinished, setIsFormFinished] = useState(false);
6522
+ return (jsx(BlockWrapper, { className: style('bg-transparent', className), defaultPadding: "p-6xl", ...rest, children: jsxs("div", { className: "container grid grid-cols-12", children: [isStartStep || isFormFinished ? null : (jsx(CreditFormProgress, { stepsTitles: WIZARD_TITLES, step: step, totalSteps: WIZARD_STEPS })), jsx("div", { className: "py-lg px-5xl mt-2xs bg-white col-span-12", children: jsx(CreditFormStep, { step: step, inputs: inputs, sections: sections, onNextStep: handleNextStep, onPrevStep: handlePrevStep, isFormFinished: isFormFinished, finishForm: setIsFormFinished, renderStep: isStartStep
6523
+ ? ({ registerSubmit }) => (jsx(CalculatorCredit, { ...{
6524
+ title: 'Калькулятор кредита',
6525
+ footnote: 'Расчёт является предварительным. Точные условия будут предоставлены в отделении Банка.',
6526
+ calcSource: {
6527
+ $ref: '/wcms-resources/credit-calculator-data.json',
6528
+ },
6529
+ }, registerSubmit: registerSubmit }))
6530
+ : undefined }, String(step)) })] }) }));
6310
6531
  });
6311
6532
 
6312
6533
  const isRateRow = (rateRow) => typeof rateRow?.minMonths === 'number' && typeof rateRow?.maxMonths === 'number';
@@ -8202,7 +8423,7 @@
8202
8423
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
8203
8424
  });
8204
8425
 
8205
- const packageVersion = "0.14.635";
8426
+ const packageVersion = "0.14.637";
8206
8427
 
8207
8428
  exports.Blocks = Blocks;
8208
8429
  exports.ContentPage = ContentPage;