@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
@@ -0,0 +1,151 @@
1
+ import type { Option } from '../../ui-kit/Select/Option';
2
+ import { type Address } from '../ApplicationLeadForm/getInitialFormState';
3
+
4
+ export interface FormStateMap {
5
+ 0: {
6
+ moneyValue?: number;
7
+ monthsValue?: number;
8
+ isAnnuity?: boolean;
9
+ isInsurance?: boolean;
10
+ isSalaryClient?: boolean;
11
+ isPensionClient?: boolean;
12
+ isStateEmployee?: boolean;
13
+ };
14
+ 1: {
15
+ surname?: string;
16
+ name?: string;
17
+ middleName?: string;
18
+ sex?: string;
19
+ birthday?: Date;
20
+ birthPlace?: string;
21
+ phone?: string;
22
+ email?: string;
23
+ dulSerie?: number;
24
+ dulNumber?: number;
25
+ dulIssueDateField?: Date;
26
+ dulSubdivisionCode?: string;
27
+ dulIssuedBy?: string;
28
+ addressRegistration?: Address;
29
+ participantDateRegistration?: Date;
30
+ addressFact?: Address;
31
+ housing?: string;
32
+ };
33
+ 2: {
34
+ amountWorkers?: Option;
35
+ beginDate?: Date;
36
+ employerActivities?: Option;
37
+ employerOrganization?: Option;
38
+ employment?: Option;
39
+ experience5Years?: string;
40
+ inn?: number;
41
+ jobsNumber?: string;
42
+ lastJobExperience?: string;
43
+ legalForm?: string;
44
+ organization?: Option;
45
+ organizationAddress?: Address;
46
+ organizationName?: string;
47
+ organizationPhone?: string;
48
+ partInBusiness?: number;
49
+ positionOrganization?: Option;
50
+ };
51
+ 3: {
52
+ familyStatus?: Option;
53
+ dependents?: number;
54
+ familyMembers?: number;
55
+ mandatoryIncome?: number;
56
+ otherPayments?: number;
57
+ snils?: string;
58
+ armyIdFlg?: boolean;
59
+ };
60
+ 4: {
61
+ disablePeopleFlg?: boolean;
62
+ bankruptcyFlg?: boolean;
63
+ shareholderFlg?: boolean;
64
+ legalEntityName?: string;
65
+ creditInRshbCd?: Option;
66
+ };
67
+ 5: {
68
+ regionRetail?: string;
69
+ addressRetail?: string;
70
+ bankEmployeeCode?: string;
71
+ };
72
+ }
73
+
74
+ export const formStateMap: FormStateMap = {
75
+ 0: {
76
+ moneyValue: 0,
77
+ monthsValue: 0,
78
+ isAnnuity: false,
79
+ isInsurance: false,
80
+ isSalaryClient: false,
81
+ isPensionClient: false,
82
+ isStateEmployee: false,
83
+ },
84
+ 1: {
85
+ surname: '',
86
+ name: '',
87
+ middleName: '',
88
+ sex: '',
89
+ birthday: undefined,
90
+ birthPlace: '',
91
+ phone: '',
92
+ email: '',
93
+ dulSerie: undefined,
94
+ dulNumber: undefined,
95
+ dulIssueDateField: undefined,
96
+ dulSubdivisionCode: '',
97
+ dulIssuedBy: '',
98
+ addressRegistration: {
99
+ fullAddress: '',
100
+ fiasCode: '',
101
+ },
102
+ participantDateRegistration: undefined,
103
+ addressFact: {
104
+ fullAddress: '',
105
+ fiasCode: '',
106
+ },
107
+ housing: '',
108
+ },
109
+ 2: {
110
+ amountWorkers: { key: '', text: '' },
111
+ beginDate: undefined,
112
+ employerActivities: { key: '', text: '' },
113
+ employerOrganization: { key: '', text: '' },
114
+ employment: { key: '', text: '' },
115
+ experience5Years: '',
116
+ inn: undefined,
117
+ jobsNumber: '',
118
+ lastJobExperience: '',
119
+ legalForm: '',
120
+ organization: { key: '', text: '' },
121
+ organizationAddress: {
122
+ fullAddress: '',
123
+ fiasCode: '',
124
+ },
125
+ organizationName: '',
126
+ organizationPhone: '',
127
+ partInBusiness: undefined,
128
+ positionOrganization: { key: '', text: '' },
129
+ },
130
+ 3: {
131
+ familyStatus: { key: '', text: '' },
132
+ dependents: undefined,
133
+ familyMembers: undefined,
134
+ mandatoryIncome: undefined,
135
+ otherPayments: undefined,
136
+ snils: '',
137
+ armyIdFlg: false,
138
+ },
139
+ 4: {
140
+ disablePeopleFlg: false,
141
+ bankruptcyFlg: false,
142
+ shareholderFlg: false,
143
+ legalEntityName: '',
144
+ creditInRshbCd: undefined,
145
+ },
146
+ 5: {
147
+ regionRetail: '',
148
+ addressRetail: '',
149
+ bankEmployeeCode: '',
150
+ },
151
+ };
@@ -1,139 +1,4 @@
1
- /* eslint-disable max-len, max-lines */
2
- import type { Option } from '../../ui-kit/Select/Option';
3
- import { type Address } from '../ApplicationLeadForm/getInitialFormState';
4
-
5
- export interface FormStateMap {
6
- 0: {
7
- surname?: string;
8
- name?: string;
9
- middleName?: string;
10
- sex?: string;
11
- birthday?: Date;
12
- birthPlace?: string;
13
- phone?: string;
14
- email?: string;
15
- dulSerie?: number;
16
- dulNumber?: number;
17
- dulIssueDateField?: Date;
18
- dulSubdivisionCode?: string;
19
- dulIssuedBy?: string;
20
- addressRegistration?: Address;
21
- addressMatch?: boolean;
22
- participantDateRegistration?: Date;
23
- addressFact?: Address;
24
- housing?: string;
25
- };
26
- 1: {
27
- amountWorkers?: Option;
28
- beginDate?: Date;
29
- employerActivities?: Option;
30
- employerOrganization?: Option;
31
- employment?: Option;
32
- experience5Years?: string;
33
- inn?: number;
34
- jobsNumber?: string;
35
- lastJobExperience?: string;
36
- legalForm?: string;
37
- organization?: Option;
38
- organizationAddress?: Address;
39
- organizationName?: string;
40
- organizationPhone?: string;
41
- partInBusiness?: number;
42
- positionOrganization?: Option;
43
- };
44
- 2: {
45
- familyStatus?: Option;
46
- dependents?: number;
47
- familyMembers?: number;
48
- mandatoryIncome?: number;
49
- otherPayments?: number;
50
- snils?: string;
51
- armyIdFlg?: boolean;
52
- };
53
- 3: {
54
- disablePeopleFlg?: boolean;
55
- bankruptcyFlg?: boolean;
56
- shareholderFlg?: boolean;
57
- legalEntityName?: string;
58
- creditInRshbCd?: Option;
59
- };
60
- 4: {
61
- regionRetail?: string;
62
- addressRetail?: string;
63
- bankEmployeeCode?: string;
64
- };
65
- }
66
-
67
- const formStateMap: FormStateMap = {
68
- 0: {
69
- surname: '',
70
- name: '',
71
- middleName: '',
72
- sex: '',
73
- birthday: undefined,
74
- birthPlace: '',
75
- phone: '',
76
- email: '',
77
- dulSerie: undefined,
78
- dulNumber: undefined,
79
- dulIssueDateField: undefined,
80
- dulSubdivisionCode: '',
81
- dulIssuedBy: '',
82
- addressRegistration: {
83
- fullAddress: '',
84
- fiasCode: '',
85
- },
86
- addressMatch: false,
87
- participantDateRegistration: undefined,
88
- addressFact: {
89
- fullAddress: '',
90
- fiasCode: '',
91
- },
92
- housing: '',
93
- },
94
- 1: {
95
- amountWorkers: { key: '', text: '' },
96
- beginDate: undefined,
97
- employerActivities: { key: '', text: '' },
98
- employerOrganization: { key: '', text: '' },
99
- employment: { key: '', text: '' },
100
- experience5Years: '',
101
- inn: undefined,
102
- jobsNumber: '',
103
- lastJobExperience: '',
104
- legalForm: '',
105
- organization: { key: '', text: '' },
106
- organizationAddress: {
107
- fullAddress: '',
108
- fiasCode: '',
109
- },
110
- organizationName: '',
111
- organizationPhone: '',
112
- partInBusiness: undefined,
113
- positionOrganization: { key: '', text: '' },
114
- },
115
- 2: {
116
- familyStatus: { key: '', text: '' },
117
- dependents: undefined,
118
- familyMembers: undefined,
119
- mandatoryIncome: undefined,
120
- otherPayments: undefined,
121
- snils: '',
122
- armyIdFlg: false,
123
- },
124
- 3: {
125
- disablePeopleFlg: false,
126
- bankruptcyFlg: false,
127
- shareholderFlg: false,
128
- legalEntityName: '',
129
- creditInRshbCd: undefined,
130
- },
131
- 4: {
132
- regionRetail: '',
133
- addressRetail: '',
134
- bankEmployeeCode: '',
135
- },
136
- };
1
+ import { formStateMap, type FormStateMap } from './formStateMap';
137
2
 
138
3
  export const getInitialFormState = <Step extends keyof FormStateMap>(
139
4
  step: Step,
@@ -0,0 +1,10 @@
1
+ import { InfoCard } from '../../ui-kit/InfoCard/InfoCard';
2
+ import { type FieldDef } from '../ApplicationLeadForm/ApplicationLeadFormContent';
3
+
4
+ export const renderInfo = (inputs: FieldDef[] = []) => {
5
+ const infoInputs = inputs.filter((_) => _.fieldType === 'info');
6
+
7
+ return infoInputs.length
8
+ ? infoInputs.map(({ text, name }, i) => <InfoCard key={`${name}_${i}`} __html={text} />)
9
+ : null;
10
+ };
@@ -1,6 +1,5 @@
1
1
  import { getField } from '../../ui-kit/FormField/getField';
2
2
  import { type RenderInputsProps } from './CreditFormContent';
3
3
 
4
- export const renderInputs = ({ field, inputs }: RenderInputsProps) => {
5
- return (inputs || [])?.map(getField(field, ''));
6
- };
4
+ export const renderInputs = ({ field, inputs }: RenderInputsProps) =>
5
+ (inputs || [])?.map(getField(field, ''));
@@ -0,0 +1,25 @@
1
+ import { type FormFieldRegisterer, type FormOperatorProps } from '../../hooks/useForm';
2
+ import { inputColumnStyles } from '../../ui-kit/FormField/inputColumnStyle';
3
+ import { renderTitle } from '../../ui-kit/FormField/renderTitle';
4
+ import { style } from '../../utils/style';
5
+ import { type SectionsProps } from '../ApplicationForm/ApplicationFormContent';
6
+ import { type FormStateMap } from './formStateMap';
7
+ import { renderInfo } from './renderInfo';
8
+ import { renderInputs } from './renderInputs';
9
+
10
+ export type CustomSubmit = FormOperatorProps<FormStateMap[keyof FormStateMap]>['onSubmit'];
11
+
12
+ export interface StepProps {
13
+ sections?: SectionsProps[];
14
+ field: FormFieldRegisterer<FormStateMap[keyof FormStateMap]>;
15
+ registerSubmit?: (submit: CustomSubmit) => void;
16
+ }
17
+
18
+ export const renderStep = ({ sections, field }: StepProps) =>
19
+ sections?.map(({ inputs, columns, title }, i) => (
20
+ <div key={`section-${i}`} className={style(inputColumnStyles(columns), 'grid gap-x-m')}>
21
+ {renderInfo(inputs)}
22
+ {renderTitle(title)}
23
+ {renderInputs({ field, inputs })}
24
+ </div>
25
+ ));
@@ -5,17 +5,24 @@ import { getObjectValidator } from '../../ui-kit/FormField/getObjectValidator';
5
5
  import { objectValidator } from '../../validation/objectValidator';
6
6
  import { isValidationSuccess } from '../../validation/validator';
7
7
  import { type FieldDef } from '../ApplicationLeadForm/ApplicationLeadFormContent';
8
+ import { type FormStateMap } from './formStateMap';
8
9
  import { getCreditFormTaskData } from './getCreditFormTaskData';
9
- import { type FormStateMap } from './getInitialFormState';
10
10
 
11
11
  type CreditFormApiProps = {
12
- inputs: FieldDef[];
13
12
  step: number;
13
+ inputs: FieldDef[];
14
14
  onNextStep: () => void;
15
15
  saveStep: (value: Record<string, any>) => void;
16
+ finishForm?: (bool: boolean) => void;
16
17
  };
17
18
 
18
- export const useCreditFormApi = ({ inputs, step, onNextStep, saveStep }: CreditFormApiProps) => {
19
+ export const useCreditFormAPI = ({
20
+ step,
21
+ inputs,
22
+ onNextStep,
23
+ saveStep,
24
+ finishForm,
25
+ }: CreditFormApiProps) => {
19
26
  const [taskId] = useLocalStorage<number>('taskId');
20
27
  const [profileId] = useLocalStorage<number>('profileId');
21
28
  const [participantId] = useLocalStorage<number>('participantId');
@@ -46,6 +53,10 @@ export const useCreditFormApi = ({ inputs, step, onNextStep, saveStep }: CreditF
46
53
 
47
54
  onNextStep();
48
55
 
56
+ if (step === 5) {
57
+ finishForm?.(true);
58
+ }
59
+
49
60
  return 'OK';
50
61
  }, []);
51
62
 
@@ -22,7 +22,7 @@ export interface FormOperatorProps<FormState extends Record<string, any>> {
22
22
  field: FormFieldRegisterer<FormState>;
23
23
  update: (_: FormState) => void;
24
24
  reset: () => void;
25
- onSubmit?: (ev: PreventableEvent) => void;
25
+ onSubmit?: (ev: PreventableEvent) => FormState;
26
26
  }
27
27
 
28
28
  // eslint-disable-next-line max-lines-per-function
@@ -98,6 +98,8 @@ export const useForm = <FormState extends Record<string, any>>(
98
98
  resetOnSubmit ? reset() : setDirtyForm(true);
99
99
 
100
100
  onSubmit && onSubmit(formState, ev);
101
+
102
+ return formState;
101
103
  },
102
104
  [onSubmit, formState],
103
105
  );
@@ -0,0 +1,6 @@
1
+ import { type SectionsProps } from '../components/ApplicationForm/ApplicationFormContent';
2
+
3
+ export interface InputSectionsType {
4
+ /** @hidden */
5
+ sections?: SectionsProps[];
6
+ }
@@ -1,18 +0,0 @@
1
- export declare type FileId = string;
2
- export declare type ProjectId = string | number;
3
- export declare type SearchParams = Record<string, string>;
4
- export interface FileMeta {
5
- id?: FileId;
6
- path?: string;
7
- timestamp?: Date;
8
- size?: number;
9
- }
10
- export interface SearchResult {
11
- rows: FileMeta[];
12
- total: number;
13
- }
14
- export declare const FileStorage: {
15
- getById: <T>(id: FileId) => Promise<T | null>;
16
- getByName: (projectId: ProjectId, name: string) => Promise<any>;
17
- find: (projectId: ProjectId, params?: SearchParams) => Promise<SearchResult>;
18
- };
@@ -1,18 +0,0 @@
1
- export declare type FileId = string;
2
- export declare type ProjectId = string | number;
3
- export declare type SearchParams = Record<string, string>;
4
- export interface FileMeta {
5
- id?: FileId;
6
- path?: string;
7
- timestamp?: Date;
8
- size?: number;
9
- }
10
- export interface SearchResult {
11
- rows: FileMeta[];
12
- total: number;
13
- }
14
- export declare const FileStorage: {
15
- getById: <T>(id: FileId) => Promise<T | null>;
16
- getByName: (projectId: ProjectId, name: string) => Promise<any>;
17
- find: (projectId: ProjectId, params?: SearchParams) => Promise<SearchResult>;
18
- };
@@ -1,60 +0,0 @@
1
- Object.defineProperty(exports, "__esModule", { value: true });
2
- exports.FileStorage = void 0;
3
- const apiBaseUrl_1 = require("./apiBaseUrl");
4
- const WCMS_FILE_STORAGE_API_URI = '/wcms-file-storage';
5
- const fileStorageApi = process?.env?.NEXT_PUBLIC_FILE_STORAGE_URL
6
- ? `${process.env.NEXT_PUBLIC_FILE_STORAGE_URL}/${apiBaseUrl_1.API_BASE_URI}${WCMS_FILE_STORAGE_API_URI}`
7
- : `${apiBaseUrl_1.API_BASE_URI}${WCMS_FILE_STORAGE_API_URI}`;
8
- const toFileMeta = (meta) => ({
9
- id: meta.publicId,
10
- path: meta.name || 'blank',
11
- timestamp: meta.timestamp ? new Date(meta.timestamp) : undefined,
12
- size: meta.size,
13
- });
14
- const parseNDJson = async (response) => {
15
- return (await response.text())
16
- .split('\n')
17
- .filter(Boolean)
18
- .map((_) => JSON.parse(_));
19
- };
20
- const parseTotalCount = (response) => parseInt(response.headers.get('x-total-count') || '0');
21
- const getById = async (id) => {
22
- try {
23
- return fetch(`${fileStorageApi}/${id}/file`).then(async (response) => response.json());
24
- }
25
- catch (e) {
26
- console.error(e);
27
- return null;
28
- }
29
- };
30
- const getByName = async (projectId, name) => {
31
- try {
32
- return fetch(`${fileStorageApi}/project/${projectId}/file/${encodeURIComponent(name)}`).then(async (response) => response.json());
33
- }
34
- catch (e) {
35
- console.error(e);
36
- return {};
37
- }
38
- };
39
- const find = async (projectId, params) => {
40
- const response = await fetch(`${fileStorageApi}/project/${projectId}/doc?${new URLSearchParams(params)}`);
41
- try {
42
- return {
43
- rows: (await parseNDJson(response)).map(toFileMeta),
44
- total: parseTotalCount(response),
45
- };
46
- }
47
- catch (e) {
48
- console.error(e);
49
- return {
50
- rows: [],
51
- total: 0,
52
- };
53
- }
54
- };
55
- exports.FileStorage = {
56
- getById,
57
- getByName,
58
- find,
59
- };
60
- //# sourceMappingURL=FileStorage.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FileStorage.js","sourceRoot":"","sources":["../../src/api/FileStorage.ts"],"names":[],"mappings":";;AAAA,6CAA4C;AAE5C,MAAM,yBAAyB,GAAG,oBAAoB,CAAC;AA6BvD,MAAM,cAAc,GAAG,OAAO,EAAE,GAAG,EAAE,4BAA4B;IAC/D,CAAC,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,4BAA4B,IAAI,yBAAY,GAAG,yBAAyB,EAAE;IAC3F,CAAC,CAAC,GAAG,yBAAY,GAAG,yBAAyB,EAAE,CAAC;AAElD,MAAM,UAAU,GAAG,CAAC,IAAU,EAAY,EAAE,CAAC,CAAC;IAC5C,EAAE,EAAE,IAAI,CAAC,QAAQ;IACjB,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,OAAO;IAC1B,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS;IAChE,IAAI,EAAE,IAAI,CAAC,IAAI;CAChB,CAAC,CAAC;AAEH,MAAM,WAAW,GAAG,KAAK,EAAK,QAAkB,EAAgB,EAAE;IAChE,OAAO,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;SAC3B,KAAK,CAAC,IAAI,CAAC;SACX,MAAM,CAAC,OAAO,CAAC;SACf,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,C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AI,SAAS,IAAI,aAAa,EAAE;gBACxC,MAAM,IAAA,+BAAc,EAClB,IAAA,6CAAqB,EAAC;oBACpB,aAAa;oBACb,MAAM;oBACN,SAAS;oBACT,IAAI;oBACJ,QAAQ,EAAE,QAAe;iBAC1B,CAAC,CACH,CAAC;aACH;SACF;QAAC,OAAO,EAAE,EAAE;YACX,OAAO,MAAM,CAAC;SACf;QAED,UAAU,EAAE,CAAC;QAEb,OAAO,IAAI,CAAC;IACd,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO;QACL,YAAY;KACb,CAAC;AACJ,CAAC,CAAC;AArCW,QAAA,gBAAgB,oBAqC3B"}
@@ -1,18 +0,0 @@
1
- export declare type FileId = string;
2
- export declare type ProjectId = string | number;
3
- export declare type SearchParams = Record<string, string>;
4
- export interface FileMeta {
5
- id?: FileId;
6
- path?: string;
7
- timestamp?: Date;
8
- size?: number;
9
- }
10
- export interface SearchResult {
11
- rows: FileMeta[];
12
- total: number;
13
- }
14
- export declare const FileStorage: {
15
- getById: <T>(id: FileId) => Promise<T | null>;
16
- getByName: (projectId: ProjectId, name: string) => Promise<any>;
17
- find: (projectId: ProjectId, params?: SearchParams) => Promise<SearchResult>;
18
- };
@@ -1,58 +0,0 @@
1
- import { API_BASE_URI } from './apiBaseUrl.js';
2
- const WCMS_FILE_STORAGE_API_URI = '/wcms-file-storage';
3
- const fileStorageApi = process?.env?.NEXT_PUBLIC_FILE_STORAGE_URL
4
- ? `${process.env.NEXT_PUBLIC_FILE_STORAGE_URL}/${API_BASE_URI}${WCMS_FILE_STORAGE_API_URI}`
5
- : `${API_BASE_URI}${WCMS_FILE_STORAGE_API_URI}`;
6
- const toFileMeta = (meta) => ({
7
- id: meta.publicId,
8
- path: meta.name || 'blank',
9
- timestamp: meta.timestamp ? new Date(meta.timestamp) : undefined,
10
- size: meta.size,
11
- });
12
- const parseNDJson = async (response) => {
13
- return (await response.text())
14
- .split('\n')
15
- .filter(Boolean)
16
- .map((_) => JSON.parse(_));
17
- };
18
- const parseTotalCount = (response) => parseInt(response.headers.get('x-total-count') || '0');
19
- const getById = async (id) => {
20
- try {
21
- return fetch(`${fileStorageApi}/${id}/file`).then(async (response) => response.json());
22
- }
23
- catch (e) {
24
- console.error(e);
25
- return null;
26
- }
27
- };
28
- const getByName = async (projectId, name) => {
29
- try {
30
- return fetch(`${fileStorageApi}/project/${projectId}/file/${encodeURIComponent(name)}`).then(async (response) => response.json());
31
- }
32
- catch (e) {
33
- console.error(e);
34
- return {};
35
- }
36
- };
37
- const find = async (projectId, params) => {
38
- const response = await fetch(`${fileStorageApi}/project/${projectId}/doc?${new URLSearchParams(params)}`);
39
- try {
40
- return {
41
- rows: (await parseNDJson(response)).map(toFileMeta),
42
- total: parseTotalCount(response),
43
- };
44
- }
45
- catch (e) {
46
- console.error(e);
47
- return {
48
- rows: [],
49
- total: 0,
50
- };
51
- }
52
- };
53
- export const FileStorage = {
54
- getById,
55
- getByName,
56
- find,
57
- };
58
- //# sourceMappingURL=FileStorage.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FileStorage.js","sourceRoot":"","sources":["../../src/api/FileStorage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,MAAM,yBAAyB,GAAG,oBAAoB,CAAC;AA6BvD,MAAM,cAAc,GAAG,OAAO,EAAE,GAAG,EAAE,4BAA4B;IAC/D,CAAC,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,4BAA4B,IAAI,YAAY,GAAG,yBAAyB,EAAE;IAC3F,CAAC,CAAC,GAAG,YAAY,GAAG,yBAAyB,EAAE,CAAC;AAElD,MAAM,UAAU,GAAG,CAAC,IAAU,EAAY,EAAE,CAAC,CAAC;IAC5C,EAAE,EAAE,IAAI,CAAC,QAAQ;IACjB,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,OAAO;IAC1B,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,IAAI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,EAAE;IAC7F,MAAM,CAAC,MAAM,CAAC,GAAG,eAAe,CAAS,QAAQ,CAAC,CAAC;IACnD,MAAM,CAAC,SAAS,CAAC,GAAG,eAAe,CAAS,WAAW,CAAC,CAAC;IACzD,MAAM,CAAC,aAAa,CAAC,GAAG,eAAe,CAAS,eAAe,CAAC,CAAC;IAEjE,MAAM,YAAY,GAAG,WAAW,CAAC,KAAK,EAAE,QAA0C,EAAE,EAAE;QACpF,MAAM,iBAAiB,GAAG,eAAe,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC,CAAC;QACtE,IAAI,CAAC,mBAAmB,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC,EAAE;YACrD,OAAO,OAAO,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;SACxC;QAED,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAEnB,IAAI;YACF,IAAI,MAAM,IAAI,SAAS,IAAI,aAAa,EAAE;gBACxC,MAAM,cAAc,CAClB,qBAAqB,CAAC;oBACpB,aAAa;oBACb,MAAM;oBACN,SAAS;oBACT,IAAI;oBACJ,QAAQ,EAAE,QAAe;iBAC1B,CAAC,CACH,CAAC;aACH;SACF;QAAC,OAAO,EAAE,EAAE;YACX,OAAO,MAAM,CAAC;SACf;QAED,UAAU,EAAE,CAAC;QAEb,OAAO,IAAI,CAAC;IACd,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO;QACL,YAAY;KACb,CAAC;AACJ,CAAC,CAAC"}
@@ -1,18 +0,0 @@
1
- export declare type FileId = string;
2
- export declare type ProjectId = string | number;
3
- export declare type SearchParams = Record<string, string>;
4
- export interface FileMeta {
5
- id?: FileId;
6
- path?: string;
7
- timestamp?: Date;
8
- size?: number;
9
- }
10
- export interface SearchResult {
11
- rows: FileMeta[];
12
- total: number;
13
- }
14
- export declare const FileStorage: {
15
- getById: <T>(id: FileId) => Promise<T | null>;
16
- getByName: (projectId: ProjectId, name: string) => Promise<any>;
17
- find: (projectId: ProjectId, params?: SearchParams) => Promise<SearchResult>;
18
- };
@@ -1,18 +0,0 @@
1
- export declare type FileId = string;
2
- export declare type ProjectId = string | number;
3
- export declare type SearchParams = Record<string, string>;
4
- export interface FileMeta {
5
- id?: FileId;
6
- path?: string;
7
- timestamp?: Date;
8
- size?: number;
9
- }
10
- export interface SearchResult {
11
- rows: FileMeta[];
12
- total: number;
13
- }
14
- export declare const FileStorage: {
15
- getById: <T>(id: FileId) => Promise<T | null>;
16
- getByName: (projectId: ProjectId, name: string) => Promise<any>;
17
- find: (projectId: ProjectId, params?: SearchParams) => Promise<SearchResult>;
18
- };