@redneckz/wildless-cms-uni-blocks 0.14.637 → 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 (390) 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/blocks.schema.json +1 -1
  4. package/bundle/bundle.umd.js +203 -40
  5. package/bundle/bundle.umd.min.js +1 -1
  6. package/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +2 -3
  7. package/bundle/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -16
  8. package/bundle/components/CalculatorCredit/CalculatorCredit.d.ts +2 -0
  9. package/bundle/components/CreditForm/CreditForm.d.ts +2 -2
  10. package/bundle/components/CreditForm/CreditFormContent.d.ts +5 -23
  11. package/bundle/components/CreditForm/CreditFormProgress.d.ts +1 -1
  12. package/bundle/components/CreditForm/CreditFormStatus.d.ts +16 -0
  13. package/bundle/components/CreditForm/CreditFormStatusTracker.d.ts +2 -0
  14. package/bundle/components/CreditForm/CreditFormStep.d.ts +5 -6
  15. package/bundle/components/CreditForm/FailedStatusContent.d.ts +2 -0
  16. package/bundle/components/CreditForm/PendingStatusContent.d.ts +2 -0
  17. package/bundle/components/CreditForm/ReworkStatusContent.d.ts +2 -0
  18. package/bundle/components/CreditForm/SuccessStatusContent.d.ts +2 -0
  19. package/bundle/components/CreditForm/formStateMap.d.ts +72 -0
  20. package/bundle/components/CreditForm/getInitialFormState.d.ts +1 -63
  21. package/bundle/components/CreditForm/renderInfo.d.ts +3 -0
  22. package/bundle/components/CreditForm/renderStep.d.ts +11 -0
  23. package/{lib/components/CreditForm/useCreditFormApi.d.ts → bundle/components/CreditForm/useCreditFormAPI.d.ts} +4 -3
  24. package/bundle/hooks/useForm.d.ts +1 -1
  25. package/bundle/model/InputSectionsType.d.ts +5 -0
  26. package/dist/api/RetailAPI/getTaskStatus.d.ts +14 -0
  27. package/dist/api/RetailAPI/getTaskStatus.js +13 -0
  28. package/dist/api/RetailAPI/getTaskStatus.js.map +1 -0
  29. package/dist/api/RetailAPI/sendSignalToProcess.d.ts +11 -0
  30. package/dist/api/RetailAPI/sendSignalToProcess.js +6 -0
  31. package/dist/api/RetailAPI/sendSignalToProcess.js.map +1 -0
  32. package/dist/components/ApplicationForm/ApplicationFormContent.d.ts +2 -3
  33. package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +3 -3
  34. package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  35. package/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -16
  36. package/dist/components/CalculatorCredit/CalculatorCredit.d.ts +2 -0
  37. package/dist/components/CalculatorCredit/CalculatorCredit.js +3 -2
  38. package/dist/components/CalculatorCredit/CalculatorCredit.js.map +1 -1
  39. package/dist/components/CreditForm/CreditForm.d.ts +2 -2
  40. package/dist/components/CreditForm/CreditForm.js +17 -6
  41. package/dist/components/CreditForm/CreditForm.js.map +1 -1
  42. package/dist/components/CreditForm/CreditFormContent.d.ts +5 -23
  43. package/dist/components/CreditForm/CreditFormProgress.d.ts +1 -1
  44. package/dist/components/CreditForm/CreditFormProgress.js +3 -3
  45. package/dist/components/CreditForm/CreditFormProgress.js.map +1 -1
  46. package/dist/components/CreditForm/CreditFormStatus.d.ts +16 -0
  47. package/dist/components/CreditForm/CreditFormStatus.js +25 -0
  48. package/dist/components/CreditForm/CreditFormStatus.js.map +1 -0
  49. package/dist/components/CreditForm/CreditFormStatusTracker.d.ts +2 -0
  50. package/dist/components/CreditForm/CreditFormStatusTracker.js +42 -0
  51. package/dist/components/CreditForm/CreditFormStatusTracker.js.map +1 -0
  52. package/dist/components/CreditForm/CreditFormStep.d.ts +5 -6
  53. package/dist/components/CreditForm/CreditFormStep.js +19 -19
  54. package/dist/components/CreditForm/CreditFormStep.js.map +1 -1
  55. package/dist/components/CreditForm/FailedStatusContent.d.ts +2 -0
  56. package/dist/components/CreditForm/FailedStatusContent.js +7 -0
  57. package/dist/components/CreditForm/FailedStatusContent.js.map +1 -0
  58. package/dist/components/CreditForm/PendingStatusContent.d.ts +2 -0
  59. package/dist/components/CreditForm/PendingStatusContent.js +32 -0
  60. package/dist/components/CreditForm/PendingStatusContent.js.map +1 -0
  61. package/dist/components/CreditForm/ReworkStatusContent.d.ts +2 -0
  62. package/dist/components/CreditForm/ReworkStatusContent.js +25 -0
  63. package/dist/components/CreditForm/ReworkStatusContent.js.map +1 -0
  64. package/dist/components/CreditForm/SuccessStatusContent.d.ts +2 -0
  65. package/dist/components/CreditForm/SuccessStatusContent.js +32 -0
  66. package/dist/components/CreditForm/SuccessStatusContent.js.map +1 -0
  67. package/dist/components/CreditForm/creditFormStepsData.js +3 -0
  68. package/dist/components/CreditForm/creditFormStepsData.js.map +1 -1
  69. package/dist/components/CreditForm/formStateMap.d.ts +72 -0
  70. package/dist/components/CreditForm/formStateMap.js +81 -0
  71. package/dist/components/CreditForm/formStateMap.js.map +1 -0
  72. package/dist/components/CreditForm/getInitialFormState.d.ts +1 -63
  73. package/dist/components/CreditForm/getInitialFormState.js +2 -71
  74. package/dist/components/CreditForm/getInitialFormState.js.map +1 -1
  75. package/dist/components/CreditForm/renderInfo.d.ts +3 -0
  76. package/dist/components/CreditForm/renderInfo.js +12 -0
  77. package/dist/components/CreditForm/renderInfo.js.map +1 -0
  78. package/dist/components/CreditForm/renderInputs.js +1 -3
  79. package/dist/components/CreditForm/renderInputs.js.map +1 -1
  80. package/dist/components/CreditForm/renderStep.d.ts +11 -0
  81. package/dist/components/CreditForm/renderStep.js +11 -0
  82. package/dist/components/CreditForm/renderStep.js.map +1 -0
  83. package/{bundle/components/CreditForm/useCreditFormApi.d.ts → dist/components/CreditForm/useCreditFormAPI.d.ts} +4 -3
  84. package/dist/components/CreditForm/{useCreditFormApi.js → useCreditFormAPI.js} +7 -4
  85. package/dist/components/CreditForm/useCreditFormAPI.js.map +1 -0
  86. package/dist/hooks/useForm.d.ts +1 -1
  87. package/dist/hooks/useForm.js +1 -0
  88. package/dist/hooks/useForm.js.map +1 -1
  89. package/dist/model/InputSectionsType.d.ts +5 -0
  90. package/dist/model/InputSectionsType.js +2 -0
  91. package/dist/model/InputSectionsType.js.map +1 -0
  92. package/lib/api/RetailAPI/getTaskStatus.d.ts +14 -0
  93. package/lib/api/RetailAPI/getTaskStatus.js +10 -0
  94. package/lib/api/RetailAPI/getTaskStatus.js.map +1 -0
  95. package/lib/api/RetailAPI/sendSignalToProcess.d.ts +11 -0
  96. package/lib/api/RetailAPI/sendSignalToProcess.js +3 -0
  97. package/lib/api/RetailAPI/sendSignalToProcess.js.map +1 -0
  98. package/lib/common.css +1 -1
  99. package/lib/components/ApplicationForm/ApplicationFormContent.d.ts +2 -3
  100. package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +3 -3
  101. package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  102. package/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -16
  103. package/lib/components/CalculatorCredit/CalculatorCredit.d.ts +2 -0
  104. package/lib/components/CalculatorCredit/CalculatorCredit.js +3 -2
  105. package/lib/components/CalculatorCredit/CalculatorCredit.js.map +1 -1
  106. package/lib/components/CreditForm/CreditForm.d.ts +2 -2
  107. package/lib/components/CreditForm/CreditForm.js +17 -6
  108. package/lib/components/CreditForm/CreditForm.js.map +1 -1
  109. package/lib/components/CreditForm/CreditFormContent.d.ts +5 -23
  110. package/lib/components/CreditForm/CreditFormProgress.d.ts +1 -1
  111. package/lib/components/CreditForm/CreditFormProgress.js +3 -3
  112. package/lib/components/CreditForm/CreditFormProgress.js.map +1 -1
  113. package/lib/components/CreditForm/CreditFormStatus.d.ts +16 -0
  114. package/lib/components/CreditForm/CreditFormStatus.js +23 -0
  115. package/lib/components/CreditForm/CreditFormStatus.js.map +1 -0
  116. package/lib/components/CreditForm/CreditFormStatusTracker.d.ts +2 -0
  117. package/lib/components/CreditForm/CreditFormStatusTracker.js +40 -0
  118. package/lib/components/CreditForm/CreditFormStatusTracker.js.map +1 -0
  119. package/lib/components/CreditForm/CreditFormStep.d.ts +5 -6
  120. package/lib/components/CreditForm/CreditFormStep.js +19 -19
  121. package/lib/components/CreditForm/CreditFormStep.js.map +1 -1
  122. package/lib/components/CreditForm/FailedStatusContent.d.ts +2 -0
  123. package/lib/components/CreditForm/FailedStatusContent.js +5 -0
  124. package/lib/components/CreditForm/FailedStatusContent.js.map +1 -0
  125. package/lib/components/CreditForm/PendingStatusContent.d.ts +2 -0
  126. package/lib/components/CreditForm/PendingStatusContent.js +30 -0
  127. package/lib/components/CreditForm/PendingStatusContent.js.map +1 -0
  128. package/lib/components/CreditForm/ReworkStatusContent.d.ts +2 -0
  129. package/lib/components/CreditForm/ReworkStatusContent.js +23 -0
  130. package/lib/components/CreditForm/ReworkStatusContent.js.map +1 -0
  131. package/lib/components/CreditForm/SuccessStatusContent.d.ts +2 -0
  132. package/lib/components/CreditForm/SuccessStatusContent.js +30 -0
  133. package/lib/components/CreditForm/SuccessStatusContent.js.map +1 -0
  134. package/lib/components/CreditForm/creditFormStepsData.js +3 -0
  135. package/lib/components/CreditForm/creditFormStepsData.js.map +1 -1
  136. package/lib/components/CreditForm/formStateMap.d.ts +72 -0
  137. package/lib/components/CreditForm/formStateMap.js +79 -0
  138. package/lib/components/CreditForm/formStateMap.js.map +1 -0
  139. package/lib/components/CreditForm/getInitialFormState.d.ts +1 -63
  140. package/lib/components/CreditForm/getInitialFormState.js +1 -70
  141. package/lib/components/CreditForm/getInitialFormState.js.map +1 -1
  142. package/lib/components/CreditForm/renderInfo.d.ts +2 -0
  143. package/lib/components/CreditForm/renderInfo.js +9 -0
  144. package/lib/components/CreditForm/renderInfo.js.map +1 -0
  145. package/lib/components/CreditForm/renderInputs.js +1 -3
  146. package/lib/components/CreditForm/renderInputs.js.map +1 -1
  147. package/lib/components/CreditForm/renderStep.d.ts +10 -0
  148. package/lib/components/CreditForm/renderStep.js +8 -0
  149. package/lib/components/CreditForm/renderStep.js.map +1 -0
  150. package/{mobile/bundle/components/CreditForm/useCreditFormApi.d.ts → lib/components/CreditForm/useCreditFormAPI.d.ts} +4 -3
  151. package/lib/components/CreditForm/{useCreditFormApi.js → useCreditFormAPI.js} +5 -2
  152. package/lib/components/CreditForm/useCreditFormAPI.js.map +1 -0
  153. package/lib/hooks/useForm.d.ts +1 -1
  154. package/lib/hooks/useForm.js +1 -0
  155. package/lib/hooks/useForm.js.map +1 -1
  156. package/lib/model/InputSectionsType.d.ts +5 -0
  157. package/lib/model/InputSectionsType.js +2 -0
  158. package/lib/model/InputSectionsType.js.map +1 -0
  159. package/mobile/bundle/api/RetailAPI/getTaskStatus.d.ts +14 -0
  160. package/mobile/bundle/api/RetailAPI/sendSignalToProcess.d.ts +11 -0
  161. package/mobile/bundle/bundle.umd.js +207 -36
  162. package/mobile/bundle/bundle.umd.min.js +1 -1
  163. package/mobile/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +2 -3
  164. package/mobile/bundle/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -16
  165. package/mobile/bundle/components/CalculatorCredit/CalculatorCredit.d.ts +2 -0
  166. package/mobile/bundle/components/CreditForm/CreditForm.d.ts +2 -2
  167. package/mobile/bundle/components/CreditForm/CreditFormContent.d.ts +5 -23
  168. package/mobile/bundle/components/CreditForm/CreditFormProgress.d.ts +1 -1
  169. package/mobile/bundle/components/CreditForm/CreditFormStatus.d.ts +16 -0
  170. package/mobile/bundle/components/CreditForm/CreditFormStatusTracker.d.ts +2 -0
  171. package/mobile/bundle/components/CreditForm/CreditFormStep.d.ts +5 -6
  172. package/mobile/bundle/components/CreditForm/FailedStatusContent.d.ts +2 -0
  173. package/mobile/bundle/components/CreditForm/PendingStatusContent.d.ts +2 -0
  174. package/mobile/bundle/components/CreditForm/ReworkStatusContent.d.ts +2 -0
  175. package/mobile/bundle/components/CreditForm/SuccessStatusContent.d.ts +2 -0
  176. package/mobile/bundle/components/CreditForm/formStateMap.d.ts +72 -0
  177. package/mobile/bundle/components/CreditForm/getInitialFormState.d.ts +1 -63
  178. package/mobile/bundle/components/CreditForm/renderInfo.d.ts +3 -0
  179. package/mobile/bundle/components/CreditForm/renderStep.d.ts +11 -0
  180. package/{dist/components/CreditForm/useCreditFormApi.d.ts → mobile/bundle/components/CreditForm/useCreditFormAPI.d.ts} +4 -3
  181. package/mobile/bundle/hooks/useForm.d.ts +1 -1
  182. package/mobile/bundle/model/InputSectionsType.d.ts +5 -0
  183. package/mobile/dist/api/RetailAPI/getTaskStatus.d.ts +14 -0
  184. package/mobile/dist/api/RetailAPI/getTaskStatus.js +13 -0
  185. package/mobile/dist/api/RetailAPI/getTaskStatus.js.map +1 -0
  186. package/mobile/dist/api/RetailAPI/sendSignalToProcess.d.ts +11 -0
  187. package/mobile/dist/api/RetailAPI/sendSignalToProcess.js +6 -0
  188. package/mobile/dist/api/RetailAPI/sendSignalToProcess.js.map +1 -0
  189. package/mobile/dist/components/ApplicationForm/ApplicationFormContent.d.ts +2 -3
  190. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +3 -3
  191. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  192. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -16
  193. package/mobile/dist/components/CalculatorCredit/CalculatorCredit.d.ts +2 -0
  194. package/mobile/dist/components/CalculatorCredit/CalculatorCredit.js +3 -2
  195. package/mobile/dist/components/CalculatorCredit/CalculatorCredit.js.map +1 -1
  196. package/mobile/dist/components/CreditForm/CreditForm.d.ts +2 -2
  197. package/mobile/dist/components/CreditForm/CreditForm.js +17 -6
  198. package/mobile/dist/components/CreditForm/CreditForm.js.map +1 -1
  199. package/mobile/dist/components/CreditForm/CreditFormContent.d.ts +5 -23
  200. package/mobile/dist/components/CreditForm/CreditFormProgress.d.ts +1 -1
  201. package/mobile/dist/components/CreditForm/CreditFormProgress.js +3 -3
  202. package/mobile/dist/components/CreditForm/CreditFormProgress.js.map +1 -1
  203. package/mobile/dist/components/CreditForm/CreditFormStatus.d.ts +16 -0
  204. package/mobile/dist/components/CreditForm/CreditFormStatus.js +25 -0
  205. package/mobile/dist/components/CreditForm/CreditFormStatus.js.map +1 -0
  206. package/mobile/dist/components/CreditForm/CreditFormStatusTracker.d.ts +2 -0
  207. package/mobile/dist/components/CreditForm/CreditFormStatusTracker.js +42 -0
  208. package/mobile/dist/components/CreditForm/CreditFormStatusTracker.js.map +1 -0
  209. package/mobile/dist/components/CreditForm/CreditFormStep.d.ts +5 -6
  210. package/mobile/dist/components/CreditForm/CreditFormStep.js +19 -19
  211. package/mobile/dist/components/CreditForm/CreditFormStep.js.map +1 -1
  212. package/mobile/dist/components/CreditForm/FailedStatusContent.d.ts +2 -0
  213. package/mobile/dist/components/CreditForm/FailedStatusContent.js +7 -0
  214. package/mobile/dist/components/CreditForm/FailedStatusContent.js.map +1 -0
  215. package/mobile/dist/components/CreditForm/PendingStatusContent.d.ts +2 -0
  216. package/mobile/dist/components/CreditForm/PendingStatusContent.js +32 -0
  217. package/mobile/dist/components/CreditForm/PendingStatusContent.js.map +1 -0
  218. package/mobile/dist/components/CreditForm/ReworkStatusContent.d.ts +2 -0
  219. package/mobile/dist/components/CreditForm/ReworkStatusContent.js +25 -0
  220. package/mobile/dist/components/CreditForm/ReworkStatusContent.js.map +1 -0
  221. package/mobile/dist/components/CreditForm/SuccessStatusContent.d.ts +2 -0
  222. package/mobile/dist/components/CreditForm/SuccessStatusContent.js +32 -0
  223. package/mobile/dist/components/CreditForm/SuccessStatusContent.js.map +1 -0
  224. package/mobile/dist/components/CreditForm/creditFormStepsData.js +3 -0
  225. package/mobile/dist/components/CreditForm/creditFormStepsData.js.map +1 -1
  226. package/mobile/dist/components/CreditForm/formStateMap.d.ts +72 -0
  227. package/mobile/dist/components/CreditForm/formStateMap.js +81 -0
  228. package/mobile/dist/components/CreditForm/formStateMap.js.map +1 -0
  229. package/mobile/dist/components/CreditForm/getInitialFormState.d.ts +1 -63
  230. package/mobile/dist/components/CreditForm/getInitialFormState.js +2 -71
  231. package/mobile/dist/components/CreditForm/getInitialFormState.js.map +1 -1
  232. package/mobile/dist/components/CreditForm/renderInfo.d.ts +3 -0
  233. package/mobile/dist/components/CreditForm/renderInfo.js +12 -0
  234. package/mobile/dist/components/CreditForm/renderInfo.js.map +1 -0
  235. package/mobile/dist/components/CreditForm/renderInputs.js +1 -3
  236. package/mobile/dist/components/CreditForm/renderInputs.js.map +1 -1
  237. package/mobile/dist/components/CreditForm/renderStep.d.ts +11 -0
  238. package/mobile/dist/components/CreditForm/renderStep.js +11 -0
  239. package/mobile/dist/components/CreditForm/renderStep.js.map +1 -0
  240. package/mobile/dist/components/CreditForm/useCreditFormAPI.d.ts +13 -0
  241. package/mobile/dist/components/CreditForm/{useCreditFormApi.js → useCreditFormAPI.js} +7 -4
  242. package/mobile/dist/components/CreditForm/useCreditFormAPI.js.map +1 -0
  243. package/mobile/dist/hooks/useForm.d.ts +1 -1
  244. package/mobile/dist/hooks/useForm.js +1 -0
  245. package/mobile/dist/hooks/useForm.js.map +1 -1
  246. package/mobile/dist/model/InputSectionsType.d.ts +5 -0
  247. package/mobile/dist/model/InputSectionsType.js +2 -0
  248. package/mobile/dist/model/InputSectionsType.js.map +1 -0
  249. package/mobile/lib/api/RetailAPI/getTaskStatus.d.ts +14 -0
  250. package/mobile/lib/api/RetailAPI/getTaskStatus.js +10 -0
  251. package/mobile/lib/api/RetailAPI/getTaskStatus.js.map +1 -0
  252. package/mobile/lib/api/RetailAPI/sendSignalToProcess.d.ts +11 -0
  253. package/mobile/lib/api/RetailAPI/sendSignalToProcess.js +3 -0
  254. package/mobile/lib/api/RetailAPI/sendSignalToProcess.js.map +1 -0
  255. package/mobile/lib/common.css +1 -1
  256. package/mobile/lib/components/ApplicationForm/ApplicationFormContent.d.ts +2 -3
  257. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +3 -3
  258. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  259. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -16
  260. package/mobile/lib/components/CalculatorCredit/CalculatorCredit.d.ts +2 -0
  261. package/mobile/lib/components/CalculatorCredit/CalculatorCredit.js +3 -2
  262. package/mobile/lib/components/CalculatorCredit/CalculatorCredit.js.map +1 -1
  263. package/mobile/lib/components/CreditForm/CreditForm.d.ts +2 -2
  264. package/mobile/lib/components/CreditForm/CreditForm.js +17 -6
  265. package/mobile/lib/components/CreditForm/CreditForm.js.map +1 -1
  266. package/mobile/lib/components/CreditForm/CreditFormContent.d.ts +5 -23
  267. package/mobile/lib/components/CreditForm/CreditFormProgress.d.ts +1 -1
  268. package/mobile/lib/components/CreditForm/CreditFormProgress.js +3 -3
  269. package/mobile/lib/components/CreditForm/CreditFormProgress.js.map +1 -1
  270. package/mobile/lib/components/CreditForm/CreditFormStatus.d.ts +16 -0
  271. package/mobile/lib/components/CreditForm/CreditFormStatus.js +23 -0
  272. package/mobile/lib/components/CreditForm/CreditFormStatus.js.map +1 -0
  273. package/mobile/lib/components/CreditForm/CreditFormStatusTracker.d.ts +2 -0
  274. package/mobile/lib/components/CreditForm/CreditFormStatusTracker.js +40 -0
  275. package/mobile/lib/components/CreditForm/CreditFormStatusTracker.js.map +1 -0
  276. package/mobile/lib/components/CreditForm/CreditFormStep.d.ts +5 -6
  277. package/mobile/lib/components/CreditForm/CreditFormStep.js +19 -19
  278. package/mobile/lib/components/CreditForm/CreditFormStep.js.map +1 -1
  279. package/mobile/lib/components/CreditForm/FailedStatusContent.d.ts +2 -0
  280. package/mobile/lib/components/CreditForm/FailedStatusContent.js +5 -0
  281. package/mobile/lib/components/CreditForm/FailedStatusContent.js.map +1 -0
  282. package/mobile/lib/components/CreditForm/PendingStatusContent.d.ts +2 -0
  283. package/mobile/lib/components/CreditForm/PendingStatusContent.js +30 -0
  284. package/mobile/lib/components/CreditForm/PendingStatusContent.js.map +1 -0
  285. package/mobile/lib/components/CreditForm/ReworkStatusContent.d.ts +2 -0
  286. package/mobile/lib/components/CreditForm/ReworkStatusContent.js +23 -0
  287. package/mobile/lib/components/CreditForm/ReworkStatusContent.js.map +1 -0
  288. package/mobile/lib/components/CreditForm/SuccessStatusContent.d.ts +2 -0
  289. package/mobile/lib/components/CreditForm/SuccessStatusContent.js +30 -0
  290. package/mobile/lib/components/CreditForm/SuccessStatusContent.js.map +1 -0
  291. package/mobile/lib/components/CreditForm/creditFormStepsData.js +3 -0
  292. package/mobile/lib/components/CreditForm/creditFormStepsData.js.map +1 -1
  293. package/mobile/lib/components/CreditForm/formStateMap.d.ts +72 -0
  294. package/mobile/lib/components/CreditForm/formStateMap.js +79 -0
  295. package/mobile/lib/components/CreditForm/formStateMap.js.map +1 -0
  296. package/mobile/lib/components/CreditForm/getInitialFormState.d.ts +1 -63
  297. package/mobile/lib/components/CreditForm/getInitialFormState.js +1 -70
  298. package/mobile/lib/components/CreditForm/getInitialFormState.js.map +1 -1
  299. package/mobile/lib/components/CreditForm/renderInfo.d.ts +3 -0
  300. package/mobile/lib/components/CreditForm/renderInfo.js +9 -0
  301. package/mobile/lib/components/CreditForm/renderInfo.js.map +1 -0
  302. package/mobile/lib/components/CreditForm/renderInputs.js +1 -3
  303. package/mobile/lib/components/CreditForm/renderInputs.js.map +1 -1
  304. package/mobile/lib/components/CreditForm/renderStep.d.ts +11 -0
  305. package/mobile/lib/components/CreditForm/renderStep.js +8 -0
  306. package/mobile/lib/components/CreditForm/renderStep.js.map +1 -0
  307. package/mobile/lib/components/CreditForm/useCreditFormAPI.d.ts +13 -0
  308. package/mobile/lib/components/CreditForm/{useCreditFormApi.js → useCreditFormAPI.js} +5 -2
  309. package/mobile/lib/components/CreditForm/useCreditFormAPI.js.map +1 -0
  310. package/mobile/lib/hooks/useForm.d.ts +1 -1
  311. package/mobile/lib/hooks/useForm.js +1 -0
  312. package/mobile/lib/hooks/useForm.js.map +1 -1
  313. package/mobile/lib/model/InputSectionsType.d.ts +5 -0
  314. package/mobile/lib/model/InputSectionsType.js +2 -0
  315. package/mobile/lib/model/InputSectionsType.js.map +1 -0
  316. package/mobile/src/api/RetailAPI/getTaskStatus.ts +16 -0
  317. package/mobile/src/api/RetailAPI/sendSignalToProcess.ts +19 -0
  318. package/mobile/src/components/ApplicationForm/ApplicationFormContent.ts +3 -3
  319. package/mobile/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +2 -3
  320. package/mobile/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +3 -16
  321. package/mobile/src/components/CalculatorCredit/CalculatorCredit.tsx +8 -1
  322. package/mobile/src/components/CreditForm/CreditForm.tsx +38 -11
  323. package/mobile/src/components/CreditForm/CreditFormContent.ts +6 -30
  324. package/mobile/src/components/CreditForm/CreditFormProgress.tsx +5 -5
  325. package/mobile/src/components/CreditForm/CreditFormStatus.tsx +119 -0
  326. package/mobile/src/components/CreditForm/CreditFormStatusTracker.tsx +47 -0
  327. package/mobile/src/components/CreditForm/CreditFormStep.tsx +39 -36
  328. package/mobile/src/components/CreditForm/FailedStatusContent.tsx +11 -0
  329. package/mobile/src/components/CreditForm/PendingStatusContent.tsx +38 -0
  330. package/mobile/src/components/CreditForm/ReworkStatusContent.tsx +32 -0
  331. package/mobile/src/components/CreditForm/SuccessStatusContent.tsx +37 -0
  332. package/mobile/src/components/CreditForm/creditFormStepsData.tsx +3 -0
  333. package/mobile/src/components/CreditForm/formStateMap.tsx +151 -0
  334. package/mobile/src/components/CreditForm/getInitialFormState.tsx +1 -136
  335. package/mobile/src/components/CreditForm/renderInfo.tsx +10 -0
  336. package/mobile/src/components/CreditForm/renderInputs.tsx +2 -3
  337. package/mobile/src/components/CreditForm/renderStep.tsx +25 -0
  338. package/mobile/src/components/CreditForm/{useCreditFormApi.tsx → useCreditFormAPI.tsx} +14 -3
  339. package/mobile/src/hooks/useForm.ts +3 -1
  340. package/mobile/src/model/InputSectionsType.ts +6 -0
  341. package/package.json +2 -2
  342. package/src/api/RetailAPI/getTaskStatus.ts +16 -0
  343. package/src/api/RetailAPI/sendSignalToProcess.ts +19 -0
  344. package/src/components/ApplicationForm/ApplicationFormContent.ts +3 -3
  345. package/src/components/ApplicationLeadForm/ApplicationLeadForm.fixture.mobile.tsx +0 -2
  346. package/src/components/ApplicationLeadForm/ApplicationLeadForm.fixture.tsx +0 -2
  347. package/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +2 -3
  348. package/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +3 -16
  349. package/src/components/CalculatorCredit/CalculatorCredit.tsx +8 -1
  350. package/src/components/CreditForm/CreditForm.tsx +38 -11
  351. package/src/components/CreditForm/CreditFormContent.ts +6 -30
  352. package/src/components/CreditForm/CreditFormProgress.tsx +5 -5
  353. package/src/components/CreditForm/CreditFormStatus.tsx +119 -0
  354. package/src/components/CreditForm/CreditFormStatusTracker.tsx +47 -0
  355. package/src/components/CreditForm/CreditFormStep.tsx +39 -36
  356. package/src/components/CreditForm/FailedStatusContent.tsx +11 -0
  357. package/src/components/CreditForm/PendingStatusContent.tsx +38 -0
  358. package/src/components/CreditForm/ReworkStatusContent.tsx +32 -0
  359. package/src/components/CreditForm/SuccessStatusContent.tsx +37 -0
  360. package/src/components/CreditForm/creditFormStepsData.tsx +3 -0
  361. package/src/components/CreditForm/formStateMap.tsx +151 -0
  362. package/src/components/CreditForm/getInitialFormState.tsx +1 -136
  363. package/src/components/CreditForm/renderInfo.tsx +10 -0
  364. package/src/components/CreditForm/renderInputs.tsx +2 -3
  365. package/src/components/CreditForm/renderStep.tsx +25 -0
  366. package/src/components/CreditForm/{useCreditFormApi.tsx → useCreditFormAPI.tsx} +14 -3
  367. package/src/hooks/useForm.ts +3 -1
  368. package/src/model/InputSectionsType.ts +6 -0
  369. package/bundle/api/FileStorage.d.ts +0 -18
  370. package/dist/api/FileStorage.d.ts +0 -18
  371. package/dist/api/FileStorage.js +0 -60
  372. package/dist/api/FileStorage.js.map +0 -1
  373. package/dist/components/CreditForm/useCreditFormApi.js.map +0 -1
  374. package/lib/api/FileStorage.d.ts +0 -18
  375. package/lib/api/FileStorage.js +0 -58
  376. package/lib/api/FileStorage.js.map +0 -1
  377. package/lib/components/CreditForm/useCreditFormApi.js.map +0 -1
  378. package/mobile/bundle/api/FileStorage.d.ts +0 -18
  379. package/mobile/dist/api/FileStorage.d.ts +0 -18
  380. package/mobile/dist/api/FileStorage.js +0 -60
  381. package/mobile/dist/api/FileStorage.js.map +0 -1
  382. package/mobile/dist/components/CreditForm/useCreditFormApi.d.ts +0 -12
  383. package/mobile/dist/components/CreditForm/useCreditFormApi.js.map +0 -1
  384. package/mobile/lib/api/FileStorage.d.ts +0 -18
  385. package/mobile/lib/api/FileStorage.js +0 -58
  386. package/mobile/lib/api/FileStorage.js.map +0 -1
  387. package/mobile/lib/components/CreditForm/useCreditFormApi.d.ts +0 -12
  388. package/mobile/lib/components/CreditForm/useCreditFormApi.js.map +0 -1
  389. package/mobile/src/api/FileStorage.ts +0 -99
  390. package/src/api/FileStorage.ts +0 -99
@@ -0,0 +1,2 @@
1
+ import { type FieldDef } from '../ApplicationLeadForm/ApplicationLeadFormContent';
2
+ export declare const renderInfo: (inputs?: FieldDef[]) => JSX.Element[] | null;
@@ -0,0 +1,9 @@
1
+ import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
2
+ import { InfoCard } from '../../ui-kit/InfoCard/InfoCard.js';
3
+ export const renderInfo = (inputs = []) => {
4
+ const infoInputs = inputs.filter((_) => _.fieldType === 'info');
5
+ return infoInputs.length
6
+ ? infoInputs.map(({ text, name }, i) => _jsx(InfoCard, { __html: text }, `${name}_${i}`))
7
+ : null;
8
+ };
9
+ //# sourceMappingURL=renderInfo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderInfo.js","sourceRoot":"","sources":["../../../src/components/CreditForm/renderInfo.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAG1D,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,SAAqB,EAAE,EAAE,EAAE;IACpD,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,KAAK,MAAM,CAAC,CAAC;IAEhE,OAAO,UAAU,CAAC,MAAM;QACtB,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,KAAC,QAAQ,IAAsB,MAAM,EAAE,IAAI,IAA5B,GAAG,IAAI,IAAI,CAAC,EAAE,CAAkB,CAAC;QACxF,CAAC,CAAC,IAAI,CAAC;AACX,CAAC,CAAC"}
@@ -1,5 +1,3 @@
1
1
  import { getField } from '../../ui-kit/FormField/getField.js';
2
- export const renderInputs = ({ field, inputs }) => {
3
- return (inputs || [])?.map(getField(field, ''));
4
- };
2
+ export const renderInputs = ({ field, inputs }) => (inputs || [])?.map(getField(field, ''));
5
3
  //# sourceMappingURL=renderInputs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"renderInputs.js","sourceRoot":"","sources":["../../../src/components/CreditForm/renderInputs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAG3D,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAAE,KAAK,EAAE,MAAM,EAAqB,EAAE,EAAE;IACnE,OAAO,CAAC,MAAM,IAAI,EAAE,CAAC,EAAE,GAAG,CAAC,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC;AAClD,CAAC,CAAC"}
1
+ {"version":3,"file":"renderInputs.js","sourceRoot":"","sources":["../../../src/components/CreditForm/renderInputs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAG3D,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAAE,KAAK,EAAE,MAAM,EAAqB,EAAE,EAAE,CACnE,CAAC,MAAM,IAAI,EAAE,CAAC,EAAE,GAAG,CAAC,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { type FormFieldRegisterer, type FormOperatorProps } from '../../hooks/useForm';
2
+ import { type SectionsProps } from '../ApplicationForm/ApplicationFormContent';
3
+ import { type FormStateMap } from './formStateMap';
4
+ export declare type CustomSubmit = FormOperatorProps<FormStateMap[keyof FormStateMap]>['onSubmit'];
5
+ export interface StepProps {
6
+ sections?: SectionsProps[];
7
+ field: FormFieldRegisterer<FormStateMap[keyof FormStateMap]>;
8
+ registerSubmit?: (submit: CustomSubmit) => void;
9
+ }
10
+ export declare const renderStep: ({ sections, field }: StepProps) => JSX.Element[] | undefined;
@@ -0,0 +1,8 @@
1
+ import { jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
2
+ import { inputColumnStyles } from '../../ui-kit/FormField/inputColumnStyle.js';
3
+ import { renderTitle } from '../../ui-kit/FormField/renderTitle.js';
4
+ import { style } from '../../utils/style.js';
5
+ import { renderInfo } from './renderInfo.js';
6
+ import { renderInputs } from './renderInputs.js';
7
+ export const renderStep = ({ sections, field }) => sections?.map(({ inputs, columns, title }, i) => (_jsxs("div", { className: style(inputColumnStyles(columns), 'grid gap-x-m'), children: [renderInfo(inputs), renderTitle(title), renderInputs({ field, inputs })] }, `section-${i}`)));
8
+ //# sourceMappingURL=renderStep.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderStep.js","sourceRoot":"","sources":["../../../src/components/CreditForm/renderStep.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACjE,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAG1C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAU9C,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAa,EAAE,EAAE,CAC3D,QAAQ,EAAE,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAC/C,eAA0B,SAAS,EAAE,KAAK,CAAC,iBAAiB,CAAC,OAAO,CAAC,EAAE,cAAc,CAAC,aACnF,UAAU,CAAC,MAAM,CAAC,EAClB,WAAW,CAAC,KAAK,CAAC,EAClB,YAAY,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,KAHxB,WAAW,CAAC,EAAE,CAIlB,CACP,CAAC,CAAC"}
@@ -1,12 +1,13 @@
1
1
  import { type FieldDef } from '../ApplicationLeadForm/ApplicationLeadFormContent';
2
- import { type FormStateMap } from './getInitialFormState';
2
+ import { type FormStateMap } from './formStateMap';
3
3
  declare type CreditFormApiProps = {
4
- inputs: FieldDef[];
5
4
  step: number;
5
+ inputs: FieldDef[];
6
6
  onNextStep: () => void;
7
7
  saveStep: (value: Record<string, any>) => void;
8
+ finishForm?: (bool: boolean) => void;
8
9
  };
9
- export declare const useCreditFormApi: ({ inputs, step, onNextStep, saveStep }: CreditFormApiProps) => {
10
+ export declare const useCreditFormAPI: ({ step, inputs, onNextStep, saveStep, finishForm, }: CreditFormApiProps) => {
10
11
  handleSubmit: (formData: FormStateMap[keyof FormStateMap]) => Promise<void | "OK" | "Fail">;
11
12
  };
12
13
  export {};
@@ -5,7 +5,7 @@ import { getObjectValidator } from '../../ui-kit/FormField/getObjectValidator.js
5
5
  import { objectValidator } from '../../validation/objectValidator.js';
6
6
  import { isValidationSuccess } from '../../validation/validator.js';
7
7
  import { getCreditFormTaskData } from './getCreditFormTaskData.js';
8
- export const useCreditFormApi = ({ inputs, step, onNextStep, saveStep }) => {
8
+ export const useCreditFormAPI = ({ step, inputs, onNextStep, saveStep, finishForm, }) => {
9
9
  const [taskId] = useLocalStorage('taskId');
10
10
  const [profileId] = useLocalStorage('profileId');
11
11
  const [participantId] = useLocalStorage('participantId');
@@ -30,10 +30,13 @@ export const useCreditFormApi = ({ inputs, step, onNextStep, saveStep }) => {
30
30
  return 'Fail';
31
31
  }
32
32
  onNextStep();
33
+ if (step === 5) {
34
+ finishForm?.(true);
35
+ }
33
36
  return 'OK';
34
37
  }, []);
35
38
  return {
36
39
  handleSubmit,
37
40
  };
38
41
  };
39
- //# sourceMappingURL=useCreditFormApi.js.map
42
+ //# sourceMappingURL=useCreditFormAPI.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCreditFormAPI.js","sourceRoot":"","sources":["../../../src/components/CreditForm/useCreditFormAPI.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,2CAA2C,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAGjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAUhE,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,EAC/B,IAAI,EACJ,MAAM,EACN,UAAU,EACV,QAAQ,EACR,UAAU,GACS,EAAE,EAAE;IACvB,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,IAAI,IAAI,KAAK,CAAC,EAAE;YACd,UAAU,EAAE,CAAC,IAAI,CAAC,CAAC;SACpB;QAED,OAAO,IAAI,CAAC;IACd,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO;QACL,YAAY;KACb,CAAC;AACJ,CAAC,CAAC"}
@@ -13,7 +13,7 @@ export interface FormOperatorProps<FormState extends Record<string, any>> {
13
13
  field: FormFieldRegisterer<FormState>;
14
14
  update: (_: FormState) => void;
15
15
  reset: () => void;
16
- onSubmit?: (ev: PreventableEvent) => void;
16
+ onSubmit?: (ev: PreventableEvent) => FormState;
17
17
  }
18
18
  export declare const useForm: <FormState extends Record<string, any>>(initialState: FormState, { resetOnSubmit, onSubmit, normalize, }?: {
19
19
  resetOnSubmit?: boolean | undefined;
@@ -42,6 +42,7 @@ export const useForm = (initialState, { resetOnSubmit, onSubmit, normalize, } =
42
42
  ev.preventDefault();
43
43
  resetOnSubmit ? reset() : setDirtyForm(true);
44
44
  onSubmit && onSubmit(formState, ev);
45
+ return formState;
45
46
  }, [onSubmit, form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,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { type SectionsProps } from '../components/ApplicationForm/ApplicationFormContent';
2
+ export interface InputSectionsType {
3
+ /** @hidden */
4
+ sections?: SectionsProps[];
5
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=InputSectionsType.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InputSectionsType.js","sourceRoot":"","sources":["../../src/model/InputSectionsType.ts"],"names":[],"mappings":""}
@@ -0,0 +1,14 @@
1
+ export declare enum STATUS_TYPE {
2
+ process = "IN_PROCESS",
3
+ ok = "OK",
4
+ fail = "FAILED",
5
+ rework = "REWORK"
6
+ }
7
+ interface GetTaskStatusResponse {
8
+ statusCd: STATUS_TYPE;
9
+ taskId: number;
10
+ }
11
+ export declare const getTaskStatus: (body: {
12
+ taskId: number;
13
+ }) => Promise<GetTaskStatusResponse>;
14
+ export {};
@@ -0,0 +1,11 @@
1
+ export declare type SignalType = 'CREATE_APPLICATION_SHORT_SIGNAL' | 'CREATE_APPLICATION_LOAN_V3_SIGNAL' | 'KILL_DRAFT_PROCESS_SIGNAL';
2
+ interface SendSignalToProcess {
3
+ signalType: SignalType;
4
+ taskId: number;
5
+ }
6
+ interface SendSignalToProcessResponse {
7
+ statusCd: string;
8
+ taskId: number;
9
+ }
10
+ export declare const sendSignalToProcess: (body: SendSignalToProcess) => Promise<SendSignalToProcessResponse>;
11
+ export {};
@@ -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,
@@ -4198,12 +4199,12 @@
4198
4199
  };
4199
4200
  };
4200
4201
 
4201
- 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 }) => {
4202
4203
  const inputs = (sections?.flatMap((_) => _?.inputs) || []);
4203
4204
  const [responseType, setResponseType] = useState('');
4204
4205
  const { isLoading } = useInitApplicationLead(nextStepLink);
4205
4206
  const [leadForm, setLeadForm] = useLocalStorage('leadForm');
4206
- const initialFormState = getInitialFormState$1(inputs, leadForm, typeForm);
4207
+ const initialFormState = getInitialFormState$1(inputs, leadForm);
4207
4208
  const { handleSubmit, responseStatus } = useApplicationLeadApi({
4208
4209
  inputs,
4209
4210
  programId,
@@ -4211,7 +4212,7 @@
4211
4212
  saveForm: setLeadForm,
4212
4213
  });
4213
4214
  if (responseStatus) {
4214
- const responseTypeDialog = useResponseTypeDialog({ responseType: responseStatus, typeForm });
4215
+ const responseTypeDialog = useResponseTypeDialog({ responseType: responseStatus });
4215
4216
  responseTypeDialog.open();
4216
4217
  }
4217
4218
  const [, { field, onSubmit, reset }] = useForm(initialFormState, { onSubmit: handleSubmit });
@@ -5117,9 +5118,9 @@
5117
5118
  isInsurance: 'isInsurance',
5118
5119
  moneyValue: 'maxSum',
5119
5120
  };
5120
- const CalculatorCredit = UniBlock(({ className, title, calcSource, buttons, footnote, paramsViewSettings, defaultParams, ...rest }) => {
5121
+ const CalculatorCredit = UniBlock(({ className, title, calcSource, buttons, footnote, paramsViewSettings, defaultParams, registerSubmit, ...rest }) => {
5121
5122
  const defaultParamsCals = getDefaultParamsMin(calcSource?.rateRows);
5122
- const [userInputParams, { field }] = useForm({
5123
+ const [userInputParams, { field, onSubmit }] = useForm({
5123
5124
  moneyValue: getMoneyDefaultValue(defaultParams, CREDIT_DEFAULT_SUM),
5124
5125
  monthsValue: getMonthsDefaultValue(defaultParams, DEFAULT_MONTHS),
5125
5126
  isAnnuity: Boolean(defaultParams?.isAnnuity),
@@ -5128,6 +5129,7 @@
5128
5129
  isPensionClient: Boolean(defaultParams?.isEnablePensionClient),
5129
5130
  isStateEmployee: Boolean(defaultParams?.isEnableStateEmployee),
5130
5131
  });
5132
+ registerSubmit?.(onSubmit);
5131
5133
  const calcParams = getCreditCalculatorParams(userInputParams, calcSource, paramsViewSettings);
5132
5134
  const paymentTypeElement = renderPaymentType({
5133
5135
  title: 'Тип платежа',
@@ -5835,15 +5837,159 @@
5835
5837
 
5836
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] })] })));
5837
5839
 
5838
- const CreditFormProgress = JSX(({ step = 0, totalSteps = 5, stepsTitles = [] }) => {
5839
- const progress = useMemo(() => ((step + 1) / totalSteps) * 100, [step, totalSteps]);
5840
- 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 })] }) }));
5841
5843
  });
5842
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
+
5843
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] })] })));
5844
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
+
5845
5982
  const formStateMap = {
5846
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: {
5847
5993
  surname: '',
5848
5994
  name: '',
5849
5995
  middleName: '',
@@ -5861,7 +6007,6 @@
5861
6007
  fullAddress: '',
5862
6008
  fiasCode: '',
5863
6009
  },
5864
- addressMatch: false,
5865
6010
  participantDateRegistration: undefined,
5866
6011
  addressFact: {
5867
6012
  fullAddress: '',
@@ -5869,7 +6014,7 @@
5869
6014
  },
5870
6015
  housing: '',
5871
6016
  },
5872
- 1: {
6017
+ 2: {
5873
6018
  amountWorkers: { key: '', text: '' },
5874
6019
  beginDate: undefined,
5875
6020
  employerActivities: { key: '', text: '' },
@@ -5890,7 +6035,7 @@
5890
6035
  partInBusiness: undefined,
5891
6036
  positionOrganization: { key: '', text: '' },
5892
6037
  },
5893
- 2: {
6038
+ 3: {
5894
6039
  familyStatus: { key: '', text: '' },
5895
6040
  dependents: undefined,
5896
6041
  familyMembers: undefined,
@@ -5899,19 +6044,20 @@
5899
6044
  snils: '',
5900
6045
  armyIdFlg: false,
5901
6046
  },
5902
- 3: {
6047
+ 4: {
5903
6048
  disablePeopleFlg: false,
5904
6049
  bankruptcyFlg: false,
5905
6050
  shareholderFlg: false,
5906
6051
  legalEntityName: '',
5907
6052
  creditInRshbCd: undefined,
5908
6053
  },
5909
- 4: {
6054
+ 5: {
5910
6055
  regionRetail: '',
5911
6056
  addressRetail: '',
5912
6057
  bankEmployeeCode: '',
5913
6058
  },
5914
6059
  };
6060
+
5915
6061
  const getInitialFormState = (step, localStorageData) => {
5916
6062
  if (localStorageData) {
5917
6063
  // TODO: Fill in for other fields with type Date
@@ -5926,10 +6072,17 @@
5926
6072
  };
5927
6073
  };
5928
6074
 
5929
- const renderInputs = ({ field, inputs }) => {
5930
- 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;
5931
6080
  };
5932
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
+
5933
6086
  const StepsNavigationButtons = JSX(({ step, onPrevStep }) => {
5934
6087
  const isFirstStep = step === 0;
5935
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" })] }));
@@ -6052,7 +6205,7 @@
6052
6205
  }
6053
6206
  };
6054
6207
 
6055
- const useCreditFormApi = ({ inputs, step, onNextStep, saveStep }) => {
6208
+ const useCreditFormAPI = ({ step, inputs, onNextStep, saveStep, finishForm, }) => {
6056
6209
  const [taskId] = useLocalStorage('taskId');
6057
6210
  const [profileId] = useLocalStorage('profileId');
6058
6211
  const [participantId] = useLocalStorage('participantId');
@@ -6077,6 +6230,9 @@
6077
6230
  return 'Fail';
6078
6231
  }
6079
6232
  onNextStep();
6233
+ if (step === 5) {
6234
+ finishForm?.(true);
6235
+ }
6080
6236
  return 'OK';
6081
6237
  }, []);
6082
6238
  return {
@@ -6084,29 +6240,34 @@
6084
6240
  };
6085
6241
  };
6086
6242
 
6087
- const CreditFormStep = JSX(({ step, sections, onPrevStep, onNextStep, inputs }) => {
6243
+ const CreditFormStep = JSX(({ step, sections, onPrevStep, onNextStep, inputs, renderStep: renderStep$1 = renderStep, isFormFinished, finishForm, }) => {
6088
6244
  const [localStorageData, saveStep] = useLocalStorage('leadForm');
6089
6245
  const initialState = getInitialFormState(step, localStorageData);
6090
- const { handleSubmit } = useCreditFormApi({
6091
- inputs,
6246
+ const customSubmit = useRef(undefined);
6247
+ const registerSubmit = useCallback((submit) => {
6248
+ customSubmit.current = submit;
6249
+ }, []);
6250
+ const { handleSubmit } = useCreditFormAPI({
6092
6251
  step,
6093
- onNextStep: onNextStep,
6252
+ inputs,
6253
+ onNextStep,
6094
6254
  saveStep,
6255
+ finishForm,
6256
+ });
6257
+ const [, { field, onSubmit }] = useForm(initialState, {
6258
+ onSubmit: (formData, ev) => {
6259
+ handleSubmit({ ...formData, ...customSubmit.current?.(ev) });
6260
+ },
6095
6261
  });
6096
- const [, { field, onSubmit }] = useForm(initialState, { onSubmit: handleSubmit });
6097
- return (jsxs("form", { onSubmit: onSubmit, className: "space-y-m", children: [renderStep({ sections, field }), jsx(StepsNavigationButtons, { step: step, onPrevStep: onPrevStep })] }));
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 })] }));
6098
6263
  });
6099
- const renderStep = ({ sections, field }) => {
6100
- 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}`)));
6101
- };
6102
- const renderInfo$1 = (inputs = []) => {
6103
- const infoInputs = inputs.filter((_) => _.fieldType === 'info');
6104
- return infoInputs.length ? infoInputs.map(({ text }) => jsx(InfoCard, { __html: text })) : null;
6105
- };
6106
6264
 
6107
6265
  /* eslint-disable max-lines */
6108
6266
  /* eslint-disable max-len */
6109
6267
  const stepsSectionsMap = [
6268
+ [
6269
+ // zero step for calculator
6270
+ ],
6110
6271
  [
6111
6272
  {
6112
6273
  title: 'Персональные данные',
@@ -6337,8 +6498,8 @@
6337
6498
  ],
6338
6499
  ];
6339
6500
 
6340
- const STEPS_COUNT = 5;
6341
- const STEPS_TITLES = [
6501
+ const WIZARD_STEPS = 5;
6502
+ const WIZARD_TITLES = [
6342
6503
  'Персональные данные',
6343
6504
  'Данные о трудоустройстве',
6344
6505
  'Данные о доходах и расходах',
@@ -6347,16 +6508,26 @@
6347
6508
  ];
6348
6509
  const CreditForm = JSX(({ className, ...rest }) => {
6349
6510
  const [step, setStep] = useState(0);
6350
- const sections = useMemo(() => stepsSectionsMap[step], [step]);
6351
- const inputs = (sections?.flatMap((_) => _?.inputs) || []);
6352
6511
  const handleNextStep = useCallback(() => {
6353
- setStep((_) => Math.min(_ + 1, STEPS_COUNT - 1));
6512
+ setStep((_) => Math.min(_ + 1, WIZARD_STEPS));
6354
6513
  }, []);
6355
6514
  const handlePrevStep = useCallback(() => {
6356
6515
  //TODO search hook - 1,
6357
6516
  setStep((_) => Math.max(_ - 1, 0));
6358
6517
  }, []);
6359
- 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)) })] }) }));
6360
6531
  });
6361
6532
 
6362
6533
  const isRateRow = (rateRow) => typeof rateRow?.minMonths === 'number' && typeof rateRow?.maxMonths === 'number';
@@ -8252,7 +8423,7 @@
8252
8423
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
8253
8424
  });
8254
8425
 
8255
- const packageVersion = "0.14.636";
8426
+ const packageVersion = "0.14.637";
8256
8427
 
8257
8428
  exports.Blocks = Blocks;
8258
8429
  exports.ContentPage = ContentPage;