@redneckz/wildless-cms-uni-blocks 0.14.637 → 0.14.639

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 +215 -43
  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 +14 -74
  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 +13 -73
  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 +219 -39
  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 +14 -74
  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 +13 -73
  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 +13 -143
  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 +13 -143
  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
@@ -1068,6 +1068,7 @@
1068
1068
  ev.preventDefault();
1069
1069
  resetOnSubmit ? reset() : setDirtyForm(true);
1070
1070
  onSubmit && onSubmit(formState, ev);
1071
+ return formState;
1071
1072
  }, [onSubmit, formState]);
1072
1073
  return [
1073
1074
  formState,
@@ -4190,12 +4191,12 @@
4190
4191
  };
4191
4192
  };
4192
4193
 
4193
- const ApplicationLeadForm = JSX(({ className, title, programId = '', nextStepLink = '/credit-lead', typeForm = '', sections = [], button, ...rest }) => {
4194
+ const ApplicationLeadForm = JSX(({ className, title, programId = '', nextStepLink = '/credit-lead', sections = [], button, ...rest }) => {
4194
4195
  const inputs = (sections?.flatMap((_) => _?.inputs) || []);
4195
4196
  const [responseType, setResponseType] = useState('');
4196
4197
  const { isLoading } = useInitApplicationLead(nextStepLink);
4197
4198
  const [leadForm, setLeadForm] = useLocalStorage('leadForm');
4198
- const initialFormState = getInitialFormState$1(inputs, leadForm, typeForm);
4199
+ const initialFormState = getInitialFormState$1(inputs, leadForm);
4199
4200
  const { handleSubmit, responseStatus } = useApplicationLeadApi({
4200
4201
  inputs,
4201
4202
  programId,
@@ -4203,7 +4204,7 @@
4203
4204
  saveForm: setLeadForm,
4204
4205
  });
4205
4206
  if (responseStatus) {
4206
- const responseTypeDialog = useResponseTypeDialog({ responseType: responseStatus, typeForm });
4207
+ const responseTypeDialog = useResponseTypeDialog({ responseType: responseStatus });
4207
4208
  responseTypeDialog.open();
4208
4209
  }
4209
4210
  const [, { field, onSubmit, reset }] = useForm(initialFormState, { onSubmit: handleSubmit });
@@ -4226,17 +4227,17 @@
4226
4227
  } }), 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] })] }));
4227
4228
  });
4228
4229
 
4229
- const ApplicationStatus = 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: {
4230
+ const ApplicationStatus = 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$1, { title: sectionInfoTitle, items: sectionInfo }), jsx(SectionInfo$1, { title: sectionAdditionalTitle, items: sectionInfoAdditional, countColumns: true }), infoCard?.__html ? (jsx(InfoCard, { __html: infoCard?.__html, icon: infoCard?.icon, link: {
4230
4231
  text: infoCard?.link?.text,
4231
4232
  } })) : null, buttonText ? jsx(Button, { className: "w-full mt-lg", children: buttonText }) : null] })));
4232
- const SectionInfo = ({ title, items, countColumns = false, }) => {
4233
+ const SectionInfo$1 = ({ title, items, countColumns = false, }) => {
4233
4234
  const isMobile = useMobileMode();
4234
4235
  if (!items) {
4235
4236
  return null;
4236
4237
  }
4237
- 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] })] }));
4238
+ 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$1(item) }, index))) })) : null] })] }));
4238
4239
  };
4239
- 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 })] }));
4240
+ const renderItem$1 = ({ 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 })] }));
4240
4241
 
4241
4242
  const NotFound = JSX(({ title, description }) => {
4242
4243
  const isMobileMode = useMobileMode();
@@ -5143,9 +5144,9 @@
5143
5144
  isInsurance: 'isInsurance',
5144
5145
  moneyValue: 'maxSum',
5145
5146
  };
5146
- const CalculatorCredit = UniBlock(({ className, title, calcSource, buttons, footnote, paramsViewSettings, defaultParams, ...rest }) => {
5147
+ const CalculatorCredit = UniBlock(({ className, title, calcSource, buttons, footnote, paramsViewSettings, defaultParams, registerSubmit, ...rest }) => {
5147
5148
  const defaultParamsCals = getDefaultParamsMin(calcSource?.rateRows);
5148
- const [userInputParams, { field }] = useForm({
5149
+ const [userInputParams, { field, onSubmit }] = useForm({
5149
5150
  moneyValue: getMoneyDefaultValue(defaultParams, CREDIT_DEFAULT_SUM),
5150
5151
  monthsValue: getMonthsDefaultValue(defaultParams, DEFAULT_MONTHS),
5151
5152
  isAnnuity: Boolean(defaultParams?.isAnnuity),
@@ -5154,6 +5155,7 @@
5154
5155
  isPensionClient: Boolean(defaultParams?.isEnablePensionClient),
5155
5156
  isStateEmployee: Boolean(defaultParams?.isEnableStateEmployee),
5156
5157
  });
5158
+ registerSubmit?.(onSubmit);
5157
5159
  const calcParams = getCreditCalculatorParams(userInputParams, calcSource, paramsViewSettings);
5158
5160
  const paymentTypeElement = renderPaymentType({
5159
5161
  title: 'Тип платежа',
@@ -5865,13 +5867,149 @@
5865
5867
 
5866
5868
  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] })] })));
5867
5869
 
5868
- const CreditFormProgress = JSX(({ step = 0, totalSteps = 5, stepsTitles = [] }) => {
5869
- const progress = useMemo(() => ((step + 1) / totalSteps) * 100, [step, totalSteps]);
5870
- 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 })] }) }));
5870
+ const CreditFormProgress = JSX(({ step = 1, totalSteps = 5, stepsTitles = [] }) => {
5871
+ const progress = useMemo(() => (step / totalSteps) * 100, [step, totalSteps]);
5872
+ 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 })] }) }));
5873
+ });
5874
+
5875
+ var STATUS_TYPE;
5876
+ (function (STATUS_TYPE) {
5877
+ STATUS_TYPE["process"] = "IN_PROCESS";
5878
+ STATUS_TYPE["ok"] = "OK";
5879
+ STATUS_TYPE["fail"] = "FAILED";
5880
+ STATUS_TYPE["rework"] = "REWORK";
5881
+ })(STATUS_TYPE || (STATUS_TYPE = {}));
5882
+ const getTaskStatus = (body) => doRequest('/user-data/getTaskStatus', 'POST', body);
5883
+
5884
+ const sendSignalToProcess = (body) => doRequest('/public-data/sendSignalToProcess', 'POST', body);
5885
+
5886
+ 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: {
5887
+ text: infoCard?.link?.text,
5888
+ } })) : null, buttonText ? (jsx(LinkButton, { href: "/natural", text: buttonText, version: "primary", className: "w-full mt-lg" })) : null] })));
5889
+ const SectionInfo = ({ title, items, countColumns = false, }) => {
5890
+ const isMobile = useMobileMode();
5891
+ if (!items) {
5892
+ return null;
5893
+ }
5894
+ 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] })] }));
5895
+ };
5896
+ 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 })] }));
5897
+
5898
+ 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" })));
5899
+
5900
+ const PendingStatusContent = JSX(() => {
5901
+ const [leadForm] = useLocalStorage('leadForm');
5902
+ 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: [
5903
+ {
5904
+ label: 'Название продукта',
5905
+ description: 'Кредит на любые цели',
5906
+ },
5907
+ {
5908
+ label: 'Цель кредита',
5909
+ description: 'На любые цели',
5910
+ },
5911
+ {
5912
+ label: 'Сумма',
5913
+ description: leadForm?.moneyValue?.toLocaleString() + ' ₽',
5914
+ },
5915
+ {
5916
+ label: 'Срок кредита',
5917
+ description: leadForm?.monthsValue + ' мес',
5918
+ },
5919
+ {
5920
+ label: 'Тип платежа',
5921
+ description: leadForm?.isAnnuity ? 'Аннуитетный' : 'Дифференцированный',
5922
+ },
5923
+ ] }));
5924
+ });
5925
+
5926
+ const ReworkStatusContent = JSX(() => {
5927
+ const [leadForm] = useLocalStorage('leadForm');
5928
+ 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: [
5929
+ {
5930
+ label: 'Регион',
5931
+ description: leadForm?.regionRetail?.text,
5932
+ },
5933
+ {
5934
+ label: 'Адрес',
5935
+ description: leadForm?.addressRetail?.text,
5936
+ },
5937
+ ], sectionInfo: [
5938
+ {
5939
+ label: 'Основные документы:',
5940
+ description: '- Паспорт РФ',
5941
+ },
5942
+ ], buttonText: "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043D\u0430 \u0433\u043B\u0430\u0432\u043D\u0443\u044E" }));
5943
+ });
5944
+
5945
+ const SuccessStatusContent = JSX(() => {
5946
+ const [leadForm] = useLocalStorage('leadForm');
5947
+ 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: [
5948
+ {
5949
+ label: 'Название продукта',
5950
+ description: 'Кредит на любые цели',
5951
+ },
5952
+ {
5953
+ label: 'Ставка',
5954
+ description: '14,5%',
5955
+ },
5956
+ {
5957
+ label: 'Ежемесячный платеж',
5958
+ description: '86 052 ₽',
5959
+ },
5960
+ {
5961
+ label: 'Срок кредита',
5962
+ description: leadForm?.monthsValue + ' мес',
5963
+ },
5964
+ {
5965
+ label: 'Тип платежа',
5966
+ description: leadForm?.isAnnuity ? 'Аннуитетный' : 'Дифференцированный',
5967
+ },
5968
+ ], buttonText: "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043D\u0430 \u0433\u043B\u0430\u0432\u043D\u0443\u044E" }));
5871
5969
  });
5872
5970
 
5971
+ const TASK_ID = 2816419;
5972
+ const SIGNAL_TYPES = [
5973
+ 'CREATE_APPLICATION_SHORT_SIGNAL',
5974
+ 'CREATE_APPLICATION_LOAN_V3_SIGNAL',
5975
+ ];
5976
+ const CreditFormStatusTracker = JSX(() => {
5977
+ const [status, setStatus] = useState(STATUS_TYPE.process);
5978
+ useEffect(() => {
5979
+ for (const signalType of SIGNAL_TYPES) {
5980
+ sendSignalToProcess({ signalType, taskId: TASK_ID });
5981
+ }
5982
+ const trackStatus = () => getTaskStatus({ taskId: TASK_ID }).then((res) => {
5983
+ if (res.statusCd && res.statusCd !== STATUS_TYPE.process) {
5984
+ clearInterval(pullingInterval);
5985
+ setStatus(res.statusCd);
5986
+ }
5987
+ });
5988
+ const pullingInterval = setInterval(trackStatus, 30000);
5989
+ }, []);
5990
+ return renderStatus(status);
5991
+ });
5992
+ const renderStatus = (status) => {
5993
+ const statusesMap = {
5994
+ IN_PROCESS: jsx(PendingStatusContent, {}),
5995
+ FAILED: jsx(FailedStatusContent, {}),
5996
+ OK: jsx(SuccessStatusContent, {}),
5997
+ REWORK: jsx(ReworkStatusContent, {}),
5998
+ };
5999
+ return statusesMap[status] || null;
6000
+ };
6001
+
5873
6002
  const formStateMap = {
5874
6003
  0: {
6004
+ moneyValue: 0,
6005
+ monthsValue: 0,
6006
+ isAnnuity: false,
6007
+ isInsurance: false,
6008
+ isSalaryClient: false,
6009
+ isPensionClient: false,
6010
+ isStateEmployee: false,
6011
+ },
6012
+ 1: {
5875
6013
  surname: '',
5876
6014
  name: '',
5877
6015
  middleName: '',
@@ -5889,7 +6027,6 @@
5889
6027
  fullAddress: '',
5890
6028
  fiasCode: '',
5891
6029
  },
5892
- addressMatch: false,
5893
6030
  participantDateRegistration: undefined,
5894
6031
  addressFact: {
5895
6032
  fullAddress: '',
@@ -5897,7 +6034,7 @@
5897
6034
  },
5898
6035
  housing: '',
5899
6036
  },
5900
- 1: {
6037
+ 2: {
5901
6038
  amountWorkers: { key: '', text: '' },
5902
6039
  beginDate: undefined,
5903
6040
  employerActivities: { key: '', text: '' },
@@ -5918,7 +6055,7 @@
5918
6055
  partInBusiness: undefined,
5919
6056
  positionOrganization: { key: '', text: '' },
5920
6057
  },
5921
- 2: {
6058
+ 3: {
5922
6059
  familyStatus: { key: '', text: '' },
5923
6060
  dependents: undefined,
5924
6061
  familyMembers: undefined,
@@ -5927,26 +6064,36 @@
5927
6064
  snils: '',
5928
6065
  armyIdFlg: false,
5929
6066
  },
5930
- 3: {
6067
+ 4: {
5931
6068
  disablePeopleFlg: false,
5932
6069
  bankruptcyFlg: false,
5933
6070
  shareholderFlg: false,
5934
6071
  legalEntityName: '',
5935
6072
  creditInRshbCd: undefined,
5936
6073
  },
5937
- 4: {
6074
+ 5: {
5938
6075
  regionRetail: '',
5939
6076
  addressRetail: '',
5940
6077
  bankEmployeeCode: '',
5941
6078
  },
5942
6079
  };
6080
+
5943
6081
  const getInitialFormState = (step, localStorageData) => {
5944
6082
  if (localStorageData) {
5945
6083
  // TODO: Fill in for other fields with type Date
5946
6084
  // TODO: Take it out to the helper
5947
- localStorageData.birthday = localStorageData.dulIssueDateField = new Date(localStorageData?.birthday || Date.now());
5948
- localStorageData.participantDateRegistration = new Date(localStorageData?.participantDateRegistration || Date.now());
5949
- localStorageData.beginDate = new Date(localStorageData?.beginDate || Date.now());
6085
+ localStorageData.birthday = localStorageData.birthday
6086
+ ? new Date(localStorageData.birthday)
6087
+ : undefined;
6088
+ localStorageData.dulIssueDateField = localStorageData.dulIssueDateField
6089
+ ? new Date(localStorageData.dulIssueDateField)
6090
+ : undefined;
6091
+ localStorageData.participantDateRegistration = localStorageData.participantDateRegistration
6092
+ ? new Date(localStorageData.participantDateRegistration)
6093
+ : undefined;
6094
+ localStorageData.beginDate = localStorageData?.beginDate
6095
+ ? new Date(localStorageData.beginDate)
6096
+ : undefined;
5950
6097
  }
5951
6098
  return {
5952
6099
  ...formStateMap[step],
@@ -5954,10 +6101,17 @@
5954
6101
  };
5955
6102
  };
5956
6103
 
5957
- const renderInputs = ({ field, inputs }) => {
5958
- return (inputs || [])?.map(getField(field, ''));
6104
+ const renderInfo$1 = (inputs = []) => {
6105
+ const infoInputs = inputs.filter((_) => _.fieldType === 'info');
6106
+ return infoInputs.length
6107
+ ? infoInputs.map(({ text, name }, i) => jsx(InfoCard, { __html: text }, `${name}_${i}`))
6108
+ : null;
5959
6109
  };
5960
6110
 
6111
+ const renderInputs = ({ field, inputs }) => (inputs || [])?.map(getField(field, ''));
6112
+
6113
+ const renderStep$1 = ({ 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}`)));
6114
+
5961
6115
  const StepsNavigationButtons = JSX(({ step, onPrevStep }) => {
5962
6116
  const isFirstStep = step === 0;
5963
6117
  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" })] }));
@@ -6080,7 +6234,7 @@
6080
6234
  }
6081
6235
  };
6082
6236
 
6083
- const useCreditFormApi = ({ inputs, step, onNextStep, saveStep }) => {
6237
+ const useCreditFormAPI = ({ step, inputs, onNextStep, saveStep, finishForm, }) => {
6084
6238
  const [taskId] = useLocalStorage('taskId');
6085
6239
  const [profileId] = useLocalStorage('profileId');
6086
6240
  const [participantId] = useLocalStorage('participantId');
@@ -6105,6 +6259,9 @@
6105
6259
  return 'Fail';
6106
6260
  }
6107
6261
  onNextStep();
6262
+ if (step === 5) {
6263
+ finishForm?.(true);
6264
+ }
6108
6265
  return 'OK';
6109
6266
  }, []);
6110
6267
  return {
@@ -6112,29 +6269,34 @@
6112
6269
  };
6113
6270
  };
6114
6271
 
6115
- const CreditFormStep = JSX(({ step, sections, onPrevStep, onNextStep, inputs }) => {
6272
+ const CreditFormStep = JSX(({ step, sections, onPrevStep, onNextStep, inputs, renderStep = renderStep$1, isFormFinished, finishForm, }) => {
6116
6273
  const [localStorageData, saveStep] = useLocalStorage('leadForm');
6117
6274
  const initialState = getInitialFormState(step, localStorageData);
6118
- const { handleSubmit } = useCreditFormApi({
6119
- inputs,
6275
+ const customSubmit = useRef(undefined);
6276
+ const registerSubmit = useCallback((submit) => {
6277
+ customSubmit.current = submit;
6278
+ }, []);
6279
+ const { handleSubmit } = useCreditFormAPI({
6120
6280
  step,
6121
- onNextStep: onNextStep,
6281
+ inputs,
6282
+ onNextStep,
6122
6283
  saveStep,
6284
+ finishForm,
6285
+ });
6286
+ const [, { field, onSubmit }] = useForm(initialState, {
6287
+ onSubmit: (formData, ev) => {
6288
+ handleSubmit({ ...formData, ...customSubmit.current?.(ev) });
6289
+ },
6123
6290
  });
6124
- const [, { field, onSubmit }] = useForm(initialState, { onSubmit: handleSubmit });
6125
- return (jsxs("form", { onSubmit: onSubmit, className: "space-y-m", children: [renderStep$1({ sections, field }), jsx(StepsNavigationButtons, { step: step, onPrevStep: onPrevStep })] }));
6291
+ return isFormFinished ? (jsx(CreditFormStatusTracker, {})) : (jsxs("form", { onSubmit: onSubmit, className: "space-y-m", children: [renderStep({ sections, field, registerSubmit }), jsx(StepsNavigationButtons, { step: step, onPrevStep: onPrevStep })] }));
6126
6292
  });
6127
- const renderStep$1 = ({ sections, field }) => {
6128
- 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}`)));
6129
- };
6130
- const renderInfo$1 = (inputs = []) => {
6131
- const infoInputs = inputs.filter((_) => _.fieldType === 'info');
6132
- return infoInputs.length ? infoInputs.map(({ text }) => jsx(InfoCard, { __html: text })) : null;
6133
- };
6134
6293
 
6135
6294
  /* eslint-disable max-lines */
6136
6295
  /* eslint-disable max-len */
6137
6296
  const stepsSectionsMap = [
6297
+ [
6298
+ // zero step for calculator
6299
+ ],
6138
6300
  [
6139
6301
  {
6140
6302
  title: 'Персональные данные',
@@ -6365,8 +6527,8 @@
6365
6527
  ],
6366
6528
  ];
6367
6529
 
6368
- const STEPS_COUNT = 5;
6369
- const STEPS_TITLES = [
6530
+ const WIZARD_STEPS = 5;
6531
+ const WIZARD_TITLES = [
6370
6532
  'Персональные данные',
6371
6533
  'Данные о трудоустройстве',
6372
6534
  'Данные о доходах и расходах',
@@ -6375,16 +6537,26 @@
6375
6537
  ];
6376
6538
  const CreditForm = JSX(({ className, ...rest }) => {
6377
6539
  const [step, setStep] = useState(0);
6378
- const sections = useMemo(() => stepsSectionsMap[step], [step]);
6379
- const inputs = (sections?.flatMap((_) => _?.inputs) || []);
6380
6540
  const handleNextStep = useCallback(() => {
6381
- setStep((_) => Math.min(_ + 1, STEPS_COUNT - 1));
6541
+ setStep((_) => Math.min(_ + 1, WIZARD_STEPS));
6382
6542
  }, []);
6383
6543
  const handlePrevStep = useCallback(() => {
6384
6544
  //TODO search hook - 1,
6385
6545
  setStep((_) => Math.max(_ - 1, 0));
6386
6546
  }, []);
6387
- 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)) })] }) }));
6547
+ const sections = useMemo(() => stepsSectionsMap[step], [step]);
6548
+ const inputs = (sections?.flatMap((_) => _?.inputs) || []);
6549
+ const isStartStep = step === 0;
6550
+ const [isFormFinished, setIsFormFinished] = useState(false);
6551
+ 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
6552
+ ? ({ registerSubmit }) => (jsx(CalculatorCredit, { ...{
6553
+ title: 'Калькулятор кредита',
6554
+ footnote: 'Расчёт является предварительным. Точные условия будут предоставлены в отделении Банка.',
6555
+ calcSource: {
6556
+ $ref: '/wcms-resources/credit-calculator-data.json',
6557
+ },
6558
+ }, registerSubmit: registerSubmit }))
6559
+ : undefined }, String(step)) })] }) }));
6388
6560
  });
6389
6561
 
6390
6562
  const isRateRow = (rateRow) => typeof rateRow?.minMonths === 'number' && typeof rateRow?.maxMonths === 'number';
@@ -8646,7 +8818,7 @@
8646
8818
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
8647
8819
  });
8648
8820
 
8649
- const packageVersion = "0.14.636";
8821
+ const packageVersion = "0.14.638";
8650
8822
 
8651
8823
  exports.Blocks = Blocks;
8652
8824
  exports.ContentPage = ContentPage;