@redneckz/wildless-cms-uni-blocks 0.14.651 → 0.14.653

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 (652) hide show
  1. package/bundle/api/RetailAPI/getTaskStatus.d.ts +1 -1
  2. package/bundle/api/RetailAPI/updateRefreshToken.d.ts +1 -0
  3. package/bundle/api/RetailAPI/updateUserTask.d.ts +4 -0
  4. package/bundle/blocks.schema.json +1 -1
  5. package/bundle/bundle.umd.js +959 -119
  6. package/bundle/bundle.umd.min.js +1 -1
  7. package/bundle/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +0 -9
  8. package/bundle/components/ApplicationLeadForm/getInitialFormState.d.ts +7 -0
  9. package/bundle/components/CreditCardForm/CreditCardForm.d.ts +6 -0
  10. package/bundle/components/CreditCardForm/CreditCardFormContent.d.ts +22 -0
  11. package/bundle/components/CreditCardForm/CreditCardFormProgress.d.ts +6 -0
  12. package/bundle/components/CreditCardForm/CreditCardFormStatus.d.ts +16 -0
  13. package/bundle/components/CreditCardForm/CreditCardFormStatusTracker.d.ts +2 -0
  14. package/bundle/components/CreditCardForm/CreditCardFormStep.d.ts +12 -0
  15. package/bundle/components/CreditCardForm/FailedStatusContent.d.ts +2 -0
  16. package/bundle/components/CreditCardForm/PendingStatusContent.d.ts +2 -0
  17. package/bundle/components/CreditCardForm/ReworkStatusContent.d.ts +2 -0
  18. package/bundle/components/CreditCardForm/StepsNavigationButtons.d.ts +5 -0
  19. package/bundle/components/CreditCardForm/SuccessStatusContent.d.ts +2 -0
  20. package/bundle/components/CreditCardForm/creditCardFormStepsData.d.ts +2 -0
  21. package/bundle/components/CreditCardForm/formStateMap.d.ts +74 -0
  22. package/bundle/components/CreditCardForm/getCreditCardFormTaskData.d.ts +11 -0
  23. package/bundle/components/CreditCardForm/getFifthStepData.d.ts +3 -0
  24. package/bundle/components/CreditCardForm/getFirstStepData.d.ts +3 -0
  25. package/bundle/components/CreditCardForm/getFourthStepData.d.ts +3 -0
  26. package/bundle/components/CreditCardForm/getInitialFormState.d.ts +2 -0
  27. package/bundle/components/CreditCardForm/getSecondStepData.d.ts +3 -0
  28. package/bundle/components/CreditCardForm/getThirdStepData.d.ts +3 -0
  29. package/bundle/components/CreditCardForm/renderInfo.d.ts +3 -0
  30. package/bundle/components/CreditCardForm/renderInputs.d.ts +3 -0
  31. package/bundle/components/CreditCardForm/renderStep.d.ts +13 -0
  32. package/bundle/components/CreditCardForm/useCreditCardFormAPI.d.ts +13 -0
  33. package/bundle/components/CreditForm/CreditFormStep.d.ts +1 -1
  34. package/bundle/components/CreditForm/creditFormStepsData.d.ts +1 -1
  35. package/bundle/hooks/useInterval.d.ts +1 -0
  36. package/bundle/model/InputSectionsType.d.ts +9 -1
  37. package/bundle/ui-kit/FormField/Fields/DeliveryDateFiels.d.ts +2 -0
  38. package/bundle/ui-kit/FormField/Fields/MethodObtainField.d.ts +4 -0
  39. package/bundle/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  40. package/dist/api/RetailAPI/doRequest.js +1 -0
  41. package/dist/api/RetailAPI/doRequest.js.map +1 -1
  42. package/dist/api/RetailAPI/getTaskStatus.d.ts +1 -1
  43. package/dist/api/RetailAPI/getTaskStatus.js.map +1 -1
  44. package/dist/api/RetailAPI/updateRefreshToken.d.ts +1 -0
  45. package/dist/api/RetailAPI/updateRefreshToken.js +31 -0
  46. package/dist/api/RetailAPI/updateRefreshToken.js.map +1 -0
  47. package/dist/api/RetailAPI/updateUserTask.d.ts +4 -0
  48. package/dist/api/RetailAPI/updateUserTask.js.map +1 -1
  49. package/dist/api/dadataHints/hintsListsOptions.js +1 -0
  50. package/dist/api/dadataHints/hintsListsOptions.js.map +1 -1
  51. package/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +0 -9
  52. package/dist/components/ApplicationLeadForm/getInitialFormState.d.ts +7 -0
  53. package/dist/components/ApplicationLeadForm/getInitialFormState.js +4 -0
  54. package/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  55. package/dist/components/Blocks.js +2 -0
  56. package/dist/components/Blocks.js.map +1 -1
  57. package/dist/components/Blocks.mobile.js +2 -0
  58. package/dist/components/Blocks.mobile.js.map +1 -1
  59. package/dist/components/CreditCardForm/CreditCardForm.d.ts +6 -0
  60. package/dist/components/CreditCardForm/CreditCardForm.js +34 -0
  61. package/dist/components/CreditCardForm/CreditCardForm.js.map +1 -0
  62. package/dist/components/CreditCardForm/CreditCardFormContent.d.ts +22 -0
  63. package/dist/components/CreditCardForm/CreditCardFormContent.js +2 -0
  64. package/dist/components/CreditCardForm/CreditCardFormContent.js.map +1 -0
  65. package/dist/components/CreditCardForm/CreditCardFormProgress.d.ts +6 -0
  66. package/dist/components/CreditCardForm/CreditCardFormProgress.js +11 -0
  67. package/dist/components/CreditCardForm/CreditCardFormProgress.js.map +1 -0
  68. package/dist/components/CreditCardForm/CreditCardFormStatus.d.ts +16 -0
  69. package/dist/components/CreditCardForm/CreditCardFormStatus.js +25 -0
  70. package/dist/components/CreditCardForm/CreditCardFormStatus.js.map +1 -0
  71. package/dist/components/CreditCardForm/CreditCardFormStatusTracker.d.ts +2 -0
  72. package/dist/components/CreditCardForm/CreditCardFormStatusTracker.js +43 -0
  73. package/dist/components/CreditCardForm/CreditCardFormStatusTracker.js.map +1 -0
  74. package/dist/components/CreditCardForm/CreditCardFormStep.d.ts +12 -0
  75. package/dist/components/CreditCardForm/CreditCardFormStep.js +41 -0
  76. package/dist/components/CreditCardForm/CreditCardFormStep.js.map +1 -0
  77. package/dist/components/CreditCardForm/FailedStatusContent.d.ts +2 -0
  78. package/dist/components/CreditCardForm/FailedStatusContent.js +7 -0
  79. package/dist/components/CreditCardForm/FailedStatusContent.js.map +1 -0
  80. package/dist/components/CreditCardForm/PendingStatusContent.d.ts +2 -0
  81. package/dist/components/CreditCardForm/PendingStatusContent.js +32 -0
  82. package/dist/components/CreditCardForm/PendingStatusContent.js.map +1 -0
  83. package/dist/components/CreditCardForm/ReworkStatusContent.d.ts +2 -0
  84. package/dist/components/CreditCardForm/ReworkStatusContent.js +25 -0
  85. package/dist/components/CreditCardForm/ReworkStatusContent.js.map +1 -0
  86. package/dist/components/CreditCardForm/StepsNavigationButtons.d.ts +5 -0
  87. package/dist/components/CreditCardForm/StepsNavigationButtons.js +11 -0
  88. package/dist/components/CreditCardForm/StepsNavigationButtons.js.map +1 -0
  89. package/dist/components/CreditCardForm/SuccessStatusContent.d.ts +2 -0
  90. package/dist/components/CreditCardForm/SuccessStatusContent.js +32 -0
  91. package/dist/components/CreditCardForm/SuccessStatusContent.js.map +1 -0
  92. package/dist/components/CreditCardForm/creditCardFormStepsData.d.ts +2 -0
  93. package/dist/components/CreditCardForm/creditCardFormStepsData.js +310 -0
  94. package/dist/components/CreditCardForm/creditCardFormStepsData.js.map +1 -0
  95. package/dist/components/CreditCardForm/formStateMap.d.ts +74 -0
  96. package/dist/components/CreditCardForm/formStateMap.js +93 -0
  97. package/dist/components/CreditCardForm/formStateMap.js.map +1 -0
  98. package/dist/components/CreditCardForm/getCreditCardFormTaskData.d.ts +11 -0
  99. package/dist/components/CreditCardForm/getCreditCardFormTaskData.js +54 -0
  100. package/dist/components/CreditCardForm/getCreditCardFormTaskData.js.map +1 -0
  101. package/dist/components/CreditCardForm/getFifthStepData.d.ts +3 -0
  102. package/dist/components/CreditCardForm/getFifthStepData.js +13 -0
  103. package/dist/components/CreditCardForm/getFifthStepData.js.map +1 -0
  104. package/dist/components/CreditCardForm/getFirstStepData.d.ts +3 -0
  105. package/dist/components/CreditCardForm/getFirstStepData.js +13 -0
  106. package/dist/components/CreditCardForm/getFirstStepData.js.map +1 -0
  107. package/dist/components/CreditCardForm/getFourthStepData.d.ts +3 -0
  108. package/dist/components/CreditCardForm/getFourthStepData.js +19 -0
  109. package/dist/components/CreditCardForm/getFourthStepData.js.map +1 -0
  110. package/dist/components/CreditCardForm/getInitialFormState.d.ts +2 -0
  111. package/dist/components/CreditCardForm/getInitialFormState.js +27 -0
  112. package/dist/components/CreditCardForm/getInitialFormState.js.map +1 -0
  113. package/dist/components/CreditCardForm/getSecondStepData.d.ts +3 -0
  114. package/dist/components/CreditCardForm/getSecondStepData.js +35 -0
  115. package/dist/components/CreditCardForm/getSecondStepData.js.map +1 -0
  116. package/dist/components/CreditCardForm/getThirdStepData.d.ts +3 -0
  117. package/dist/components/CreditCardForm/getThirdStepData.js +28 -0
  118. package/dist/components/CreditCardForm/getThirdStepData.js.map +1 -0
  119. package/dist/components/CreditCardForm/renderInfo.d.ts +3 -0
  120. package/dist/components/CreditCardForm/renderInfo.js +12 -0
  121. package/dist/components/CreditCardForm/renderInfo.js.map +1 -0
  122. package/dist/components/CreditCardForm/renderInputs.d.ts +3 -0
  123. package/dist/components/CreditCardForm/renderInputs.js +6 -0
  124. package/dist/components/CreditCardForm/renderInputs.js.map +1 -0
  125. package/dist/components/CreditCardForm/renderStep.d.ts +13 -0
  126. package/dist/components/CreditCardForm/renderStep.js +19 -0
  127. package/dist/components/CreditCardForm/renderStep.js.map +1 -0
  128. package/dist/components/CreditCardForm/useCreditCardFormAPI.d.ts +13 -0
  129. package/dist/components/CreditCardForm/useCreditCardFormAPI.js +46 -0
  130. package/dist/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -0
  131. package/dist/components/CreditForm/CreditForm.js +2 -0
  132. package/dist/components/CreditForm/CreditForm.js.map +1 -1
  133. package/dist/components/CreditForm/CreditFormStatusTracker.js +8 -7
  134. package/dist/components/CreditForm/CreditFormStatusTracker.js.map +1 -1
  135. package/dist/components/CreditForm/CreditFormStep.d.ts +1 -1
  136. package/dist/components/CreditForm/FailedStatusContent.js +1 -1
  137. package/dist/components/CreditForm/FailedStatusContent.js.map +1 -1
  138. package/dist/components/CreditForm/creditFormStepsData.d.ts +1 -1
  139. package/dist/components/CreditForm/getCreditFormTaskData.js +1 -1
  140. package/dist/components/CreditForm/getCreditFormTaskData.js.map +1 -1
  141. package/dist/hooks/useInterval.d.ts +1 -0
  142. package/dist/hooks/useInterval.js +14 -0
  143. package/dist/hooks/useInterval.js.map +1 -0
  144. package/dist/model/InputSectionsType.d.ts +9 -1
  145. package/dist/ui-kit/FormField/Fields/CurrencyField.js +6 -5
  146. package/dist/ui-kit/FormField/Fields/CurrencyField.js.map +1 -1
  147. package/dist/ui-kit/FormField/Fields/DeliveryDateFiels.d.ts +2 -0
  148. package/dist/ui-kit/FormField/Fields/DeliveryDateFiels.js +9 -0
  149. package/dist/ui-kit/FormField/Fields/DeliveryDateFiels.js.map +1 -0
  150. package/dist/ui-kit/FormField/Fields/MethodObtainField.d.ts +4 -0
  151. package/dist/ui-kit/FormField/Fields/MethodObtainField.js +13 -0
  152. package/dist/ui-kit/FormField/Fields/MethodObtainField.js.map +1 -0
  153. package/dist/ui-kit/FormField/Fields/PaymentSystemField.js +6 -5
  154. package/dist/ui-kit/FormField/Fields/PaymentSystemField.js.map +1 -1
  155. package/dist/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  156. package/dist/ui-kit/FormField/getField.js +5 -0
  157. package/dist/ui-kit/FormField/getField.js.map +1 -1
  158. package/dist/ui-kit/FormField/getObjectValidator.js +6 -1
  159. package/dist/ui-kit/FormField/getObjectValidator.js.map +1 -1
  160. package/lib/api/RetailAPI/doRequest.js +1 -0
  161. package/lib/api/RetailAPI/doRequest.js.map +1 -1
  162. package/lib/api/RetailAPI/getTaskStatus.d.ts +1 -1
  163. package/lib/api/RetailAPI/getTaskStatus.js.map +1 -1
  164. package/lib/api/RetailAPI/updateRefreshToken.d.ts +1 -0
  165. package/lib/api/RetailAPI/updateRefreshToken.js +28 -0
  166. package/lib/api/RetailAPI/updateRefreshToken.js.map +1 -0
  167. package/lib/api/RetailAPI/updateUserTask.d.ts +4 -0
  168. package/lib/api/RetailAPI/updateUserTask.js.map +1 -1
  169. package/lib/api/dadataHints/hintsListsOptions.js +1 -0
  170. package/lib/api/dadataHints/hintsListsOptions.js.map +1 -1
  171. package/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +0 -9
  172. package/lib/components/ApplicationLeadForm/getInitialFormState.d.ts +7 -0
  173. package/lib/components/ApplicationLeadForm/getInitialFormState.js +4 -0
  174. package/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  175. package/lib/components/Blocks.js +2 -0
  176. package/lib/components/Blocks.js.map +1 -1
  177. package/lib/components/Blocks.mobile.js +2 -0
  178. package/lib/components/Blocks.mobile.js.map +1 -1
  179. package/lib/components/CreditCardForm/CreditCardForm.d.ts +6 -0
  180. package/lib/components/CreditCardForm/CreditCardForm.fixture.d.ts +6 -0
  181. package/lib/components/CreditCardForm/CreditCardForm.js +32 -0
  182. package/lib/components/CreditCardForm/CreditCardForm.js.map +1 -0
  183. package/lib/components/CreditCardForm/CreditCardFormContent.d.ts +22 -0
  184. package/lib/components/CreditCardForm/CreditCardFormContent.js +2 -0
  185. package/lib/components/CreditCardForm/CreditCardFormContent.js.map +1 -0
  186. package/lib/components/CreditCardForm/CreditCardFormProgress.d.ts +6 -0
  187. package/lib/components/CreditCardForm/CreditCardFormProgress.js +9 -0
  188. package/lib/components/CreditCardForm/CreditCardFormProgress.js.map +1 -0
  189. package/lib/components/CreditCardForm/CreditCardFormStatus.d.ts +16 -0
  190. package/lib/components/CreditCardForm/CreditCardFormStatus.js +23 -0
  191. package/lib/components/CreditCardForm/CreditCardFormStatus.js.map +1 -0
  192. package/lib/components/CreditCardForm/CreditCardFormStatusTracker.d.ts +2 -0
  193. package/lib/components/CreditCardForm/CreditCardFormStatusTracker.js +41 -0
  194. package/lib/components/CreditCardForm/CreditCardFormStatusTracker.js.map +1 -0
  195. package/lib/components/CreditCardForm/CreditCardFormStep.d.ts +12 -0
  196. package/lib/components/CreditCardForm/CreditCardFormStep.js +39 -0
  197. package/lib/components/CreditCardForm/CreditCardFormStep.js.map +1 -0
  198. package/lib/components/CreditCardForm/FailedStatusContent.d.ts +2 -0
  199. package/lib/components/CreditCardForm/FailedStatusContent.js +5 -0
  200. package/lib/components/CreditCardForm/FailedStatusContent.js.map +1 -0
  201. package/lib/components/CreditCardForm/PendingStatusContent.d.ts +2 -0
  202. package/lib/components/CreditCardForm/PendingStatusContent.js +30 -0
  203. package/lib/components/CreditCardForm/PendingStatusContent.js.map +1 -0
  204. package/lib/components/CreditCardForm/ReworkStatusContent.d.ts +2 -0
  205. package/lib/components/CreditCardForm/ReworkStatusContent.js +23 -0
  206. package/lib/components/CreditCardForm/ReworkStatusContent.js.map +1 -0
  207. package/lib/components/CreditCardForm/StepsNavigationButtons.d.ts +5 -0
  208. package/lib/components/CreditCardForm/StepsNavigationButtons.js +9 -0
  209. package/lib/components/CreditCardForm/StepsNavigationButtons.js.map +1 -0
  210. package/lib/components/CreditCardForm/SuccessStatusContent.d.ts +2 -0
  211. package/lib/components/CreditCardForm/SuccessStatusContent.js +30 -0
  212. package/lib/components/CreditCardForm/SuccessStatusContent.js.map +1 -0
  213. package/lib/components/CreditCardForm/creditCardFormStepsData.d.ts +2 -0
  214. package/lib/components/CreditCardForm/creditCardFormStepsData.js +308 -0
  215. package/lib/components/CreditCardForm/creditCardFormStepsData.js.map +1 -0
  216. package/lib/components/CreditCardForm/formStateMap.d.ts +74 -0
  217. package/lib/components/CreditCardForm/formStateMap.js +91 -0
  218. package/lib/components/CreditCardForm/formStateMap.js.map +1 -0
  219. package/lib/components/CreditCardForm/getCreditCardFormTaskData.d.ts +11 -0
  220. package/lib/components/CreditCardForm/getCreditCardFormTaskData.js +51 -0
  221. package/lib/components/CreditCardForm/getCreditCardFormTaskData.js.map +1 -0
  222. package/lib/components/CreditCardForm/getFifthStepData.d.ts +3 -0
  223. package/lib/components/CreditCardForm/getFifthStepData.js +10 -0
  224. package/lib/components/CreditCardForm/getFifthStepData.js.map +1 -0
  225. package/lib/components/CreditCardForm/getFirstStepData.d.ts +3 -0
  226. package/lib/components/CreditCardForm/getFirstStepData.js +10 -0
  227. package/lib/components/CreditCardForm/getFirstStepData.js.map +1 -0
  228. package/lib/components/CreditCardForm/getFourthStepData.d.ts +3 -0
  229. package/lib/components/CreditCardForm/getFourthStepData.js +16 -0
  230. package/lib/components/CreditCardForm/getFourthStepData.js.map +1 -0
  231. package/lib/components/CreditCardForm/getInitialFormState.d.ts +2 -0
  232. package/lib/components/CreditCardForm/getInitialFormState.js +24 -0
  233. package/lib/components/CreditCardForm/getInitialFormState.js.map +1 -0
  234. package/lib/components/CreditCardForm/getSecondStepData.d.ts +3 -0
  235. package/lib/components/CreditCardForm/getSecondStepData.js +32 -0
  236. package/lib/components/CreditCardForm/getSecondStepData.js.map +1 -0
  237. package/lib/components/CreditCardForm/getThirdStepData.d.ts +3 -0
  238. package/lib/components/CreditCardForm/getThirdStepData.js +25 -0
  239. package/lib/components/CreditCardForm/getThirdStepData.js.map +1 -0
  240. package/lib/components/CreditCardForm/renderInfo.d.ts +2 -0
  241. package/lib/components/CreditCardForm/renderInfo.js +9 -0
  242. package/lib/components/CreditCardForm/renderInfo.js.map +1 -0
  243. package/lib/components/CreditCardForm/renderInputs.d.ts +2 -0
  244. package/lib/components/CreditCardForm/renderInputs.js +3 -0
  245. package/lib/components/CreditCardForm/renderInputs.js.map +1 -0
  246. package/lib/components/CreditCardForm/renderStep.d.ts +12 -0
  247. package/lib/components/CreditCardForm/renderStep.js +16 -0
  248. package/lib/components/CreditCardForm/renderStep.js.map +1 -0
  249. package/lib/components/CreditCardForm/useCreditCardFormAPI.d.ts +13 -0
  250. package/lib/components/CreditCardForm/useCreditCardFormAPI.js +43 -0
  251. package/lib/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -0
  252. package/lib/components/CreditForm/CreditForm.js +3 -1
  253. package/lib/components/CreditForm/CreditForm.js.map +1 -1
  254. package/lib/components/CreditForm/CreditFormStatusTracker.js +8 -7
  255. package/lib/components/CreditForm/CreditFormStatusTracker.js.map +1 -1
  256. package/lib/components/CreditForm/CreditFormStep.d.ts +1 -1
  257. package/lib/components/CreditForm/FailedStatusContent.js +1 -1
  258. package/lib/components/CreditForm/FailedStatusContent.js.map +1 -1
  259. package/lib/components/CreditForm/creditFormStepsData.d.ts +1 -1
  260. package/lib/components/CreditForm/getCreditFormTaskData.js +1 -1
  261. package/lib/components/CreditForm/getCreditFormTaskData.js.map +1 -1
  262. package/lib/hooks/useInterval.d.ts +1 -0
  263. package/lib/hooks/useInterval.js +11 -0
  264. package/lib/hooks/useInterval.js.map +1 -0
  265. package/lib/model/InputSectionsType.d.ts +9 -1
  266. package/lib/ui-kit/FormField/Fields/CurrencyField.js +7 -6
  267. package/lib/ui-kit/FormField/Fields/CurrencyField.js.map +1 -1
  268. package/lib/ui-kit/FormField/Fields/DeliveryDateFiels.d.ts +2 -0
  269. package/lib/ui-kit/FormField/Fields/DeliveryDateFiels.js +7 -0
  270. package/lib/ui-kit/FormField/Fields/DeliveryDateFiels.js.map +1 -0
  271. package/lib/ui-kit/FormField/Fields/MethodObtainField.d.ts +4 -0
  272. package/lib/ui-kit/FormField/Fields/MethodObtainField.js +11 -0
  273. package/lib/ui-kit/FormField/Fields/MethodObtainField.js.map +1 -0
  274. package/lib/ui-kit/FormField/Fields/PaymentSystemField.js +7 -6
  275. package/lib/ui-kit/FormField/Fields/PaymentSystemField.js.map +1 -1
  276. package/lib/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  277. package/lib/ui-kit/FormField/getField.js +5 -0
  278. package/lib/ui-kit/FormField/getField.js.map +1 -1
  279. package/lib/ui-kit/FormField/getObjectValidator.js +6 -1
  280. package/lib/ui-kit/FormField/getObjectValidator.js.map +1 -1
  281. package/mobile/bundle/api/RetailAPI/getTaskStatus.d.ts +1 -1
  282. package/mobile/bundle/api/RetailAPI/updateRefreshToken.d.ts +1 -0
  283. package/mobile/bundle/api/RetailAPI/updateUserTask.d.ts +4 -0
  284. package/mobile/bundle/bundle.umd.js +955 -115
  285. package/mobile/bundle/bundle.umd.min.js +1 -1
  286. package/mobile/bundle/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +0 -9
  287. package/mobile/bundle/components/ApplicationLeadForm/getInitialFormState.d.ts +7 -0
  288. package/mobile/bundle/components/CreditCardForm/CreditCardForm.d.ts +6 -0
  289. package/mobile/bundle/components/CreditCardForm/CreditCardFormContent.d.ts +22 -0
  290. package/mobile/bundle/components/CreditCardForm/CreditCardFormProgress.d.ts +6 -0
  291. package/mobile/bundle/components/CreditCardForm/CreditCardFormStatus.d.ts +16 -0
  292. package/mobile/bundle/components/CreditCardForm/CreditCardFormStatusTracker.d.ts +2 -0
  293. package/mobile/bundle/components/CreditCardForm/CreditCardFormStep.d.ts +12 -0
  294. package/mobile/bundle/components/CreditCardForm/FailedStatusContent.d.ts +2 -0
  295. package/mobile/bundle/components/CreditCardForm/PendingStatusContent.d.ts +2 -0
  296. package/mobile/bundle/components/CreditCardForm/ReworkStatusContent.d.ts +2 -0
  297. package/mobile/bundle/components/CreditCardForm/StepsNavigationButtons.d.ts +5 -0
  298. package/mobile/bundle/components/CreditCardForm/SuccessStatusContent.d.ts +2 -0
  299. package/mobile/bundle/components/CreditCardForm/creditCardFormStepsData.d.ts +2 -0
  300. package/mobile/bundle/components/CreditCardForm/formStateMap.d.ts +74 -0
  301. package/mobile/bundle/components/CreditCardForm/getCreditCardFormTaskData.d.ts +11 -0
  302. package/mobile/bundle/components/CreditCardForm/getFifthStepData.d.ts +3 -0
  303. package/mobile/bundle/components/CreditCardForm/getFirstStepData.d.ts +3 -0
  304. package/mobile/bundle/components/CreditCardForm/getFourthStepData.d.ts +3 -0
  305. package/mobile/bundle/components/CreditCardForm/getInitialFormState.d.ts +2 -0
  306. package/mobile/bundle/components/CreditCardForm/getSecondStepData.d.ts +3 -0
  307. package/mobile/bundle/components/CreditCardForm/getThirdStepData.d.ts +3 -0
  308. package/mobile/bundle/components/CreditCardForm/renderInfo.d.ts +3 -0
  309. package/mobile/bundle/components/CreditCardForm/renderInputs.d.ts +3 -0
  310. package/mobile/bundle/components/CreditCardForm/renderStep.d.ts +13 -0
  311. package/mobile/bundle/components/CreditCardForm/useCreditCardFormAPI.d.ts +13 -0
  312. package/mobile/bundle/components/CreditForm/CreditFormStep.d.ts +1 -1
  313. package/mobile/bundle/components/CreditForm/creditFormStepsData.d.ts +1 -1
  314. package/mobile/bundle/hooks/useInterval.d.ts +1 -0
  315. package/mobile/bundle/model/InputSectionsType.d.ts +9 -1
  316. package/mobile/bundle/ui-kit/FormField/Fields/DeliveryDateFiels.d.ts +2 -0
  317. package/mobile/bundle/ui-kit/FormField/Fields/MethodObtainField.d.ts +4 -0
  318. package/mobile/bundle/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  319. package/mobile/dist/api/RetailAPI/doRequest.js +1 -0
  320. package/mobile/dist/api/RetailAPI/doRequest.js.map +1 -1
  321. package/mobile/dist/api/RetailAPI/getTaskStatus.d.ts +1 -1
  322. package/mobile/dist/api/RetailAPI/getTaskStatus.js.map +1 -1
  323. package/mobile/dist/api/RetailAPI/updateRefreshToken.d.ts +1 -0
  324. package/mobile/dist/api/RetailAPI/updateRefreshToken.js +31 -0
  325. package/mobile/dist/api/RetailAPI/updateRefreshToken.js.map +1 -0
  326. package/mobile/dist/api/RetailAPI/updateUserTask.d.ts +4 -0
  327. package/mobile/dist/api/RetailAPI/updateUserTask.js.map +1 -1
  328. package/mobile/dist/api/dadataHints/hintsListsOptions.js +1 -0
  329. package/mobile/dist/api/dadataHints/hintsListsOptions.js.map +1 -1
  330. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +0 -9
  331. package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.d.ts +7 -0
  332. package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.js +4 -0
  333. package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  334. package/mobile/dist/components/Blocks.js +2 -0
  335. package/mobile/dist/components/Blocks.js.map +1 -1
  336. package/mobile/dist/components/CreditCardForm/CreditCardForm.d.ts +6 -0
  337. package/mobile/dist/components/CreditCardForm/CreditCardForm.js +34 -0
  338. package/mobile/dist/components/CreditCardForm/CreditCardForm.js.map +1 -0
  339. package/mobile/dist/components/CreditCardForm/CreditCardFormContent.d.ts +22 -0
  340. package/mobile/dist/components/CreditCardForm/CreditCardFormContent.js +2 -0
  341. package/mobile/dist/components/CreditCardForm/CreditCardFormContent.js.map +1 -0
  342. package/mobile/dist/components/CreditCardForm/CreditCardFormProgress.d.ts +6 -0
  343. package/mobile/dist/components/CreditCardForm/CreditCardFormProgress.js +11 -0
  344. package/mobile/dist/components/CreditCardForm/CreditCardFormProgress.js.map +1 -0
  345. package/mobile/dist/components/CreditCardForm/CreditCardFormStatus.d.ts +16 -0
  346. package/mobile/dist/components/CreditCardForm/CreditCardFormStatus.js +25 -0
  347. package/mobile/dist/components/CreditCardForm/CreditCardFormStatus.js.map +1 -0
  348. package/mobile/dist/components/CreditCardForm/CreditCardFormStatusTracker.d.ts +2 -0
  349. package/mobile/dist/components/CreditCardForm/CreditCardFormStatusTracker.js +43 -0
  350. package/mobile/dist/components/CreditCardForm/CreditCardFormStatusTracker.js.map +1 -0
  351. package/mobile/dist/components/CreditCardForm/CreditCardFormStep.d.ts +12 -0
  352. package/mobile/dist/components/CreditCardForm/CreditCardFormStep.js +41 -0
  353. package/mobile/dist/components/CreditCardForm/CreditCardFormStep.js.map +1 -0
  354. package/mobile/dist/components/CreditCardForm/FailedStatusContent.d.ts +2 -0
  355. package/mobile/dist/components/CreditCardForm/FailedStatusContent.js +7 -0
  356. package/mobile/dist/components/CreditCardForm/FailedStatusContent.js.map +1 -0
  357. package/mobile/dist/components/CreditCardForm/PendingStatusContent.d.ts +2 -0
  358. package/mobile/dist/components/CreditCardForm/PendingStatusContent.js +32 -0
  359. package/mobile/dist/components/CreditCardForm/PendingStatusContent.js.map +1 -0
  360. package/mobile/dist/components/CreditCardForm/ReworkStatusContent.d.ts +2 -0
  361. package/mobile/dist/components/CreditCardForm/ReworkStatusContent.js +25 -0
  362. package/mobile/dist/components/CreditCardForm/ReworkStatusContent.js.map +1 -0
  363. package/mobile/dist/components/CreditCardForm/StepsNavigationButtons.d.ts +5 -0
  364. package/mobile/dist/components/CreditCardForm/StepsNavigationButtons.js +11 -0
  365. package/mobile/dist/components/CreditCardForm/StepsNavigationButtons.js.map +1 -0
  366. package/mobile/dist/components/CreditCardForm/SuccessStatusContent.d.ts +2 -0
  367. package/mobile/dist/components/CreditCardForm/SuccessStatusContent.js +32 -0
  368. package/mobile/dist/components/CreditCardForm/SuccessStatusContent.js.map +1 -0
  369. package/mobile/dist/components/CreditCardForm/creditCardFormStepsData.d.ts +2 -0
  370. package/mobile/dist/components/CreditCardForm/creditCardFormStepsData.js +310 -0
  371. package/mobile/dist/components/CreditCardForm/creditCardFormStepsData.js.map +1 -0
  372. package/mobile/dist/components/CreditCardForm/formStateMap.d.ts +74 -0
  373. package/mobile/dist/components/CreditCardForm/formStateMap.js +93 -0
  374. package/mobile/dist/components/CreditCardForm/formStateMap.js.map +1 -0
  375. package/mobile/dist/components/CreditCardForm/getCreditCardFormTaskData.d.ts +11 -0
  376. package/mobile/dist/components/CreditCardForm/getCreditCardFormTaskData.js +54 -0
  377. package/mobile/dist/components/CreditCardForm/getCreditCardFormTaskData.js.map +1 -0
  378. package/mobile/dist/components/CreditCardForm/getFifthStepData.d.ts +3 -0
  379. package/mobile/dist/components/CreditCardForm/getFifthStepData.js +13 -0
  380. package/mobile/dist/components/CreditCardForm/getFifthStepData.js.map +1 -0
  381. package/mobile/dist/components/CreditCardForm/getFirstStepData.d.ts +3 -0
  382. package/mobile/dist/components/CreditCardForm/getFirstStepData.js +13 -0
  383. package/mobile/dist/components/CreditCardForm/getFirstStepData.js.map +1 -0
  384. package/mobile/dist/components/CreditCardForm/getFourthStepData.d.ts +3 -0
  385. package/mobile/dist/components/CreditCardForm/getFourthStepData.js +19 -0
  386. package/mobile/dist/components/CreditCardForm/getFourthStepData.js.map +1 -0
  387. package/mobile/dist/components/CreditCardForm/getInitialFormState.d.ts +2 -0
  388. package/mobile/dist/components/CreditCardForm/getInitialFormState.js +27 -0
  389. package/mobile/dist/components/CreditCardForm/getInitialFormState.js.map +1 -0
  390. package/mobile/dist/components/CreditCardForm/getSecondStepData.d.ts +3 -0
  391. package/mobile/dist/components/CreditCardForm/getSecondStepData.js +35 -0
  392. package/mobile/dist/components/CreditCardForm/getSecondStepData.js.map +1 -0
  393. package/mobile/dist/components/CreditCardForm/getThirdStepData.d.ts +3 -0
  394. package/mobile/dist/components/CreditCardForm/getThirdStepData.js +28 -0
  395. package/mobile/dist/components/CreditCardForm/getThirdStepData.js.map +1 -0
  396. package/mobile/dist/components/CreditCardForm/renderInfo.d.ts +3 -0
  397. package/mobile/dist/components/CreditCardForm/renderInfo.js +12 -0
  398. package/mobile/dist/components/CreditCardForm/renderInfo.js.map +1 -0
  399. package/mobile/dist/components/CreditCardForm/renderInputs.d.ts +3 -0
  400. package/mobile/dist/components/CreditCardForm/renderInputs.js +6 -0
  401. package/mobile/dist/components/CreditCardForm/renderInputs.js.map +1 -0
  402. package/mobile/dist/components/CreditCardForm/renderStep.d.ts +13 -0
  403. package/mobile/dist/components/CreditCardForm/renderStep.js +19 -0
  404. package/mobile/dist/components/CreditCardForm/renderStep.js.map +1 -0
  405. package/mobile/dist/components/CreditCardForm/useCreditCardFormAPI.d.ts +13 -0
  406. package/mobile/dist/components/CreditCardForm/useCreditCardFormAPI.js +46 -0
  407. package/mobile/dist/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -0
  408. package/mobile/dist/components/CreditForm/CreditForm.js +2 -0
  409. package/mobile/dist/components/CreditForm/CreditForm.js.map +1 -1
  410. package/mobile/dist/components/CreditForm/CreditFormStatusTracker.js +8 -7
  411. package/mobile/dist/components/CreditForm/CreditFormStatusTracker.js.map +1 -1
  412. package/mobile/dist/components/CreditForm/CreditFormStep.d.ts +1 -1
  413. package/mobile/dist/components/CreditForm/FailedStatusContent.js +1 -1
  414. package/mobile/dist/components/CreditForm/FailedStatusContent.js.map +1 -1
  415. package/mobile/dist/components/CreditForm/creditFormStepsData.d.ts +1 -1
  416. package/mobile/dist/components/CreditForm/getCreditFormTaskData.js +1 -1
  417. package/mobile/dist/components/CreditForm/getCreditFormTaskData.js.map +1 -1
  418. package/mobile/dist/hooks/useInterval.d.ts +1 -0
  419. package/mobile/dist/hooks/useInterval.js +14 -0
  420. package/mobile/dist/hooks/useInterval.js.map +1 -0
  421. package/mobile/dist/model/InputSectionsType.d.ts +9 -1
  422. package/mobile/dist/ui-kit/FormField/Fields/CurrencyField.js +6 -5
  423. package/mobile/dist/ui-kit/FormField/Fields/CurrencyField.js.map +1 -1
  424. package/mobile/dist/ui-kit/FormField/Fields/DeliveryDateFiels.d.ts +2 -0
  425. package/mobile/dist/ui-kit/FormField/Fields/DeliveryDateFiels.js +9 -0
  426. package/mobile/dist/ui-kit/FormField/Fields/DeliveryDateFiels.js.map +1 -0
  427. package/mobile/dist/ui-kit/FormField/Fields/MethodObtainField.d.ts +4 -0
  428. package/mobile/dist/ui-kit/FormField/Fields/MethodObtainField.js +13 -0
  429. package/mobile/dist/ui-kit/FormField/Fields/MethodObtainField.js.map +1 -0
  430. package/mobile/dist/ui-kit/FormField/Fields/PaymentSystemField.js +6 -5
  431. package/mobile/dist/ui-kit/FormField/Fields/PaymentSystemField.js.map +1 -1
  432. package/mobile/dist/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  433. package/mobile/dist/ui-kit/FormField/getField.js +5 -0
  434. package/mobile/dist/ui-kit/FormField/getField.js.map +1 -1
  435. package/mobile/dist/ui-kit/FormField/getObjectValidator.js +6 -1
  436. package/mobile/dist/ui-kit/FormField/getObjectValidator.js.map +1 -1
  437. package/mobile/lib/api/RetailAPI/doRequest.js +1 -0
  438. package/mobile/lib/api/RetailAPI/doRequest.js.map +1 -1
  439. package/mobile/lib/api/RetailAPI/getTaskStatus.d.ts +1 -1
  440. package/mobile/lib/api/RetailAPI/getTaskStatus.js.map +1 -1
  441. package/mobile/lib/api/RetailAPI/updateRefreshToken.d.ts +1 -0
  442. package/mobile/lib/api/RetailAPI/updateRefreshToken.js +28 -0
  443. package/mobile/lib/api/RetailAPI/updateRefreshToken.js.map +1 -0
  444. package/mobile/lib/api/RetailAPI/updateUserTask.d.ts +4 -0
  445. package/mobile/lib/api/RetailAPI/updateUserTask.js.map +1 -1
  446. package/mobile/lib/api/dadataHints/hintsListsOptions.js +1 -0
  447. package/mobile/lib/api/dadataHints/hintsListsOptions.js.map +1 -1
  448. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +0 -9
  449. package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.d.ts +7 -0
  450. package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.js +4 -0
  451. package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  452. package/mobile/lib/components/Blocks.js +2 -0
  453. package/mobile/lib/components/Blocks.js.map +1 -1
  454. package/mobile/lib/components/CreditCardForm/CreditCardForm.d.ts +6 -0
  455. package/mobile/lib/components/CreditCardForm/CreditCardForm.js +32 -0
  456. package/mobile/lib/components/CreditCardForm/CreditCardForm.js.map +1 -0
  457. package/mobile/lib/components/CreditCardForm/CreditCardFormContent.d.ts +22 -0
  458. package/mobile/lib/components/CreditCardForm/CreditCardFormContent.js +2 -0
  459. package/mobile/lib/components/CreditCardForm/CreditCardFormContent.js.map +1 -0
  460. package/mobile/lib/components/CreditCardForm/CreditCardFormProgress.d.ts +6 -0
  461. package/mobile/lib/components/CreditCardForm/CreditCardFormProgress.js +9 -0
  462. package/mobile/lib/components/CreditCardForm/CreditCardFormProgress.js.map +1 -0
  463. package/mobile/lib/components/CreditCardForm/CreditCardFormStatus.d.ts +16 -0
  464. package/mobile/lib/components/CreditCardForm/CreditCardFormStatus.js +23 -0
  465. package/mobile/lib/components/CreditCardForm/CreditCardFormStatus.js.map +1 -0
  466. package/mobile/lib/components/CreditCardForm/CreditCardFormStatusTracker.d.ts +2 -0
  467. package/mobile/lib/components/CreditCardForm/CreditCardFormStatusTracker.js +41 -0
  468. package/mobile/lib/components/CreditCardForm/CreditCardFormStatusTracker.js.map +1 -0
  469. package/mobile/lib/components/CreditCardForm/CreditCardFormStep.d.ts +12 -0
  470. package/mobile/lib/components/CreditCardForm/CreditCardFormStep.js +39 -0
  471. package/mobile/lib/components/CreditCardForm/CreditCardFormStep.js.map +1 -0
  472. package/mobile/lib/components/CreditCardForm/FailedStatusContent.d.ts +2 -0
  473. package/mobile/lib/components/CreditCardForm/FailedStatusContent.js +5 -0
  474. package/mobile/lib/components/CreditCardForm/FailedStatusContent.js.map +1 -0
  475. package/mobile/lib/components/CreditCardForm/PendingStatusContent.d.ts +2 -0
  476. package/mobile/lib/components/CreditCardForm/PendingStatusContent.js +30 -0
  477. package/mobile/lib/components/CreditCardForm/PendingStatusContent.js.map +1 -0
  478. package/mobile/lib/components/CreditCardForm/ReworkStatusContent.d.ts +2 -0
  479. package/mobile/lib/components/CreditCardForm/ReworkStatusContent.js +23 -0
  480. package/mobile/lib/components/CreditCardForm/ReworkStatusContent.js.map +1 -0
  481. package/mobile/lib/components/CreditCardForm/StepsNavigationButtons.d.ts +5 -0
  482. package/mobile/lib/components/CreditCardForm/StepsNavigationButtons.js +9 -0
  483. package/mobile/lib/components/CreditCardForm/StepsNavigationButtons.js.map +1 -0
  484. package/mobile/lib/components/CreditCardForm/SuccessStatusContent.d.ts +2 -0
  485. package/mobile/lib/components/CreditCardForm/SuccessStatusContent.js +30 -0
  486. package/mobile/lib/components/CreditCardForm/SuccessStatusContent.js.map +1 -0
  487. package/mobile/lib/components/CreditCardForm/creditCardFormStepsData.d.ts +2 -0
  488. package/mobile/lib/components/CreditCardForm/creditCardFormStepsData.js +308 -0
  489. package/mobile/lib/components/CreditCardForm/creditCardFormStepsData.js.map +1 -0
  490. package/mobile/lib/components/CreditCardForm/formStateMap.d.ts +74 -0
  491. package/mobile/lib/components/CreditCardForm/formStateMap.js +91 -0
  492. package/mobile/lib/components/CreditCardForm/formStateMap.js.map +1 -0
  493. package/mobile/lib/components/CreditCardForm/getCreditCardFormTaskData.d.ts +11 -0
  494. package/mobile/lib/components/CreditCardForm/getCreditCardFormTaskData.js +51 -0
  495. package/mobile/lib/components/CreditCardForm/getCreditCardFormTaskData.js.map +1 -0
  496. package/mobile/lib/components/CreditCardForm/getFifthStepData.d.ts +3 -0
  497. package/mobile/lib/components/CreditCardForm/getFifthStepData.js +10 -0
  498. package/mobile/lib/components/CreditCardForm/getFifthStepData.js.map +1 -0
  499. package/mobile/lib/components/CreditCardForm/getFirstStepData.d.ts +3 -0
  500. package/mobile/lib/components/CreditCardForm/getFirstStepData.js +10 -0
  501. package/mobile/lib/components/CreditCardForm/getFirstStepData.js.map +1 -0
  502. package/mobile/lib/components/CreditCardForm/getFourthStepData.d.ts +3 -0
  503. package/mobile/lib/components/CreditCardForm/getFourthStepData.js +16 -0
  504. package/mobile/lib/components/CreditCardForm/getFourthStepData.js.map +1 -0
  505. package/mobile/lib/components/CreditCardForm/getInitialFormState.d.ts +2 -0
  506. package/mobile/lib/components/CreditCardForm/getInitialFormState.js +24 -0
  507. package/mobile/lib/components/CreditCardForm/getInitialFormState.js.map +1 -0
  508. package/mobile/lib/components/CreditCardForm/getSecondStepData.d.ts +3 -0
  509. package/mobile/lib/components/CreditCardForm/getSecondStepData.js +32 -0
  510. package/mobile/lib/components/CreditCardForm/getSecondStepData.js.map +1 -0
  511. package/mobile/lib/components/CreditCardForm/getThirdStepData.d.ts +3 -0
  512. package/mobile/lib/components/CreditCardForm/getThirdStepData.js +25 -0
  513. package/mobile/lib/components/CreditCardForm/getThirdStepData.js.map +1 -0
  514. package/mobile/lib/components/CreditCardForm/renderInfo.d.ts +3 -0
  515. package/mobile/lib/components/CreditCardForm/renderInfo.js +9 -0
  516. package/mobile/lib/components/CreditCardForm/renderInfo.js.map +1 -0
  517. package/mobile/lib/components/CreditCardForm/renderInputs.d.ts +3 -0
  518. package/mobile/lib/components/CreditCardForm/renderInputs.js +3 -0
  519. package/mobile/lib/components/CreditCardForm/renderInputs.js.map +1 -0
  520. package/mobile/lib/components/CreditCardForm/renderStep.d.ts +13 -0
  521. package/mobile/lib/components/CreditCardForm/renderStep.js +16 -0
  522. package/mobile/lib/components/CreditCardForm/renderStep.js.map +1 -0
  523. package/mobile/lib/components/CreditCardForm/useCreditCardFormAPI.d.ts +13 -0
  524. package/mobile/lib/components/CreditCardForm/useCreditCardFormAPI.js +43 -0
  525. package/mobile/lib/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -0
  526. package/mobile/lib/components/CreditForm/CreditForm.js +3 -1
  527. package/mobile/lib/components/CreditForm/CreditForm.js.map +1 -1
  528. package/mobile/lib/components/CreditForm/CreditFormStatusTracker.js +8 -7
  529. package/mobile/lib/components/CreditForm/CreditFormStatusTracker.js.map +1 -1
  530. package/mobile/lib/components/CreditForm/CreditFormStep.d.ts +1 -1
  531. package/mobile/lib/components/CreditForm/FailedStatusContent.js +1 -1
  532. package/mobile/lib/components/CreditForm/FailedStatusContent.js.map +1 -1
  533. package/mobile/lib/components/CreditForm/creditFormStepsData.d.ts +1 -1
  534. package/mobile/lib/components/CreditForm/getCreditFormTaskData.js +1 -1
  535. package/mobile/lib/components/CreditForm/getCreditFormTaskData.js.map +1 -1
  536. package/mobile/lib/hooks/useInterval.d.ts +1 -0
  537. package/mobile/lib/hooks/useInterval.js +11 -0
  538. package/mobile/lib/hooks/useInterval.js.map +1 -0
  539. package/mobile/lib/model/InputSectionsType.d.ts +9 -1
  540. package/mobile/lib/ui-kit/FormField/Fields/CurrencyField.js +7 -6
  541. package/mobile/lib/ui-kit/FormField/Fields/CurrencyField.js.map +1 -1
  542. package/mobile/lib/ui-kit/FormField/Fields/DeliveryDateFiels.d.ts +2 -0
  543. package/mobile/lib/ui-kit/FormField/Fields/DeliveryDateFiels.js +7 -0
  544. package/mobile/lib/ui-kit/FormField/Fields/DeliveryDateFiels.js.map +1 -0
  545. package/mobile/lib/ui-kit/FormField/Fields/MethodObtainField.d.ts +4 -0
  546. package/mobile/lib/ui-kit/FormField/Fields/MethodObtainField.js +11 -0
  547. package/mobile/lib/ui-kit/FormField/Fields/MethodObtainField.js.map +1 -0
  548. package/mobile/lib/ui-kit/FormField/Fields/PaymentSystemField.js +7 -6
  549. package/mobile/lib/ui-kit/FormField/Fields/PaymentSystemField.js.map +1 -1
  550. package/mobile/lib/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  551. package/mobile/lib/ui-kit/FormField/getField.js +5 -0
  552. package/mobile/lib/ui-kit/FormField/getField.js.map +1 -1
  553. package/mobile/lib/ui-kit/FormField/getObjectValidator.js +6 -1
  554. package/mobile/lib/ui-kit/FormField/getObjectValidator.js.map +1 -1
  555. package/mobile/src/api/RetailAPI/doRequest.ts +1 -0
  556. package/mobile/src/api/RetailAPI/getTaskStatus.ts +1 -1
  557. package/mobile/src/api/RetailAPI/updateRefreshToken.ts +42 -0
  558. package/mobile/src/api/RetailAPI/updateUserTask.ts +4 -0
  559. package/mobile/src/api/dadataHints/hintsListsOptions.ts +1 -0
  560. package/mobile/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +0 -11
  561. package/mobile/src/components/ApplicationLeadForm/getInitialFormState.tsx +8 -0
  562. package/mobile/src/components/Blocks.ts +2 -0
  563. package/mobile/src/components/CreditCardForm/CreditCardForm.tsx +69 -0
  564. package/mobile/src/components/CreditCardForm/CreditCardFormContent.ts +27 -0
  565. package/mobile/src/components/CreditCardForm/CreditCardFormProgress.tsx +27 -0
  566. package/mobile/src/components/CreditCardForm/CreditCardFormStatus.tsx +119 -0
  567. package/mobile/src/components/CreditCardForm/CreditCardFormStatusTracker.tsx +48 -0
  568. package/mobile/src/components/CreditCardForm/CreditCardFormStep.tsx +66 -0
  569. package/mobile/src/components/CreditCardForm/FailedStatusContent.tsx +10 -0
  570. package/mobile/src/components/CreditCardForm/PendingStatusContent.tsx +38 -0
  571. package/mobile/src/components/CreditCardForm/ReworkStatusContent.tsx +32 -0
  572. package/mobile/src/components/CreditCardForm/StepsNavigationButtons.tsx +29 -0
  573. package/mobile/src/components/CreditCardForm/SuccessStatusContent.tsx +37 -0
  574. package/mobile/src/components/CreditCardForm/creditCardFormStepsData.tsx +310 -0
  575. package/mobile/src/components/CreditCardForm/formStateMap.tsx +165 -0
  576. package/mobile/src/components/CreditCardForm/getCreditCardFormTaskData.ts +68 -0
  577. package/mobile/src/components/CreditCardForm/getFifthStepData.ts +13 -0
  578. package/mobile/src/components/CreditCardForm/getFirstStepData.tsx +13 -0
  579. package/mobile/src/components/CreditCardForm/getFourthStepData.ts +27 -0
  580. package/mobile/src/components/CreditCardForm/getInitialFormState.tsx +28 -0
  581. package/mobile/src/components/CreditCardForm/getSecondStepData.tsx +54 -0
  582. package/mobile/src/components/CreditCardForm/getThirdStepData.tsx +44 -0
  583. package/mobile/src/components/CreditCardForm/renderInfo.tsx +10 -0
  584. package/mobile/src/components/CreditCardForm/renderInputs.tsx +5 -0
  585. package/mobile/src/components/CreditCardForm/renderStep.tsx +43 -0
  586. package/mobile/src/components/CreditCardForm/useCreditCardFormAPI.tsx +75 -0
  587. package/mobile/src/components/CreditForm/CreditForm.tsx +6 -5
  588. package/mobile/src/components/CreditForm/CreditFormStatusTracker.tsx +4 -2
  589. package/mobile/src/components/CreditForm/CreditFormStep.tsx +1 -1
  590. package/mobile/src/components/CreditForm/FailedStatusContent.tsx +1 -2
  591. package/mobile/src/components/CreditForm/creditFormStepsData.tsx +1 -1
  592. package/mobile/src/components/CreditForm/getCreditFormTaskData.ts +1 -1
  593. package/mobile/src/hooks/useInterval.ts +14 -0
  594. package/mobile/src/model/InputSectionsType.ts +13 -1
  595. package/mobile/src/ui-kit/FormField/Fields/CurrencyField.tsx +14 -15
  596. package/mobile/src/ui-kit/FormField/Fields/DeliveryDateFiels.tsx +12 -0
  597. package/mobile/src/ui-kit/FormField/Fields/MethodObtainField.tsx +19 -0
  598. package/mobile/src/ui-kit/FormField/Fields/PaymentSystemField.tsx +14 -16
  599. package/mobile/src/ui-kit/FormField/NameFieldDef.ts +3 -0
  600. package/mobile/src/ui-kit/FormField/getField.tsx +6 -0
  601. package/mobile/src/ui-kit/FormField/getObjectValidator.tsx +6 -1
  602. package/package.json +2 -2
  603. package/src/api/RetailAPI/doRequest.ts +1 -0
  604. package/src/api/RetailAPI/getTaskStatus.ts +1 -1
  605. package/src/api/RetailAPI/updateRefreshToken.ts +42 -0
  606. package/src/api/RetailAPI/updateUserTask.ts +4 -0
  607. package/src/api/dadataHints/hintsListsOptions.ts +1 -0
  608. package/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +0 -11
  609. package/src/components/ApplicationLeadForm/getInitialFormState.tsx +8 -0
  610. package/src/components/Blocks.mobile.ts +2 -0
  611. package/src/components/Blocks.ts +2 -0
  612. package/src/components/CreditCardForm/CreditCardForm.fixture.tsx +14 -0
  613. package/src/components/CreditCardForm/CreditCardForm.tsx +69 -0
  614. package/src/components/CreditCardForm/CreditCardFormContent.ts +27 -0
  615. package/src/components/CreditCardForm/CreditCardFormProgress.tsx +27 -0
  616. package/src/components/CreditCardForm/CreditCardFormStatus.tsx +119 -0
  617. package/src/components/CreditCardForm/CreditCardFormStatusTracker.tsx +48 -0
  618. package/src/components/CreditCardForm/CreditCardFormStep.tsx +66 -0
  619. package/src/components/CreditCardForm/FailedStatusContent.tsx +10 -0
  620. package/src/components/CreditCardForm/PendingStatusContent.tsx +38 -0
  621. package/src/components/CreditCardForm/ReworkStatusContent.tsx +32 -0
  622. package/src/components/CreditCardForm/StepsNavigationButtons.tsx +29 -0
  623. package/src/components/CreditCardForm/SuccessStatusContent.tsx +37 -0
  624. package/src/components/CreditCardForm/creditCardFormStepsData.tsx +310 -0
  625. package/src/components/CreditCardForm/formStateMap.tsx +165 -0
  626. package/src/components/CreditCardForm/getCreditCardFormTaskData.ts +68 -0
  627. package/src/components/CreditCardForm/getFifthStepData.ts +13 -0
  628. package/src/components/CreditCardForm/getFirstStepData.tsx +13 -0
  629. package/src/components/CreditCardForm/getFourthStepData.ts +27 -0
  630. package/src/components/CreditCardForm/getInitialFormState.tsx +28 -0
  631. package/src/components/CreditCardForm/getSecondStepData.tsx +54 -0
  632. package/src/components/CreditCardForm/getThirdStepData.tsx +44 -0
  633. package/src/components/CreditCardForm/renderInfo.tsx +10 -0
  634. package/src/components/CreditCardForm/renderInputs.tsx +5 -0
  635. package/src/components/CreditCardForm/renderStep.tsx +43 -0
  636. package/src/components/CreditCardForm/useCreditCardFormAPI.tsx +75 -0
  637. package/src/components/CreditForm/CreditForm.fixture.tsx +7 -0
  638. package/src/components/CreditForm/CreditForm.tsx +6 -5
  639. package/src/components/CreditForm/CreditFormStatusTracker.tsx +4 -2
  640. package/src/components/CreditForm/CreditFormStep.tsx +1 -1
  641. package/src/components/CreditForm/FailedStatusContent.tsx +1 -2
  642. package/src/components/CreditForm/creditFormStepsData.tsx +1 -1
  643. package/src/components/CreditForm/getCreditFormTaskData.ts +1 -1
  644. package/src/hooks/useInterval.ts +14 -0
  645. package/src/model/InputSectionsType.ts +13 -1
  646. package/src/ui-kit/FormField/Fields/CurrencyField.tsx +14 -15
  647. package/src/ui-kit/FormField/Fields/DeliveryDateFiels.tsx +12 -0
  648. package/src/ui-kit/FormField/Fields/MethodObtainField.tsx +19 -0
  649. package/src/ui-kit/FormField/Fields/PaymentSystemField.tsx +14 -16
  650. package/src/ui-kit/FormField/NameFieldDef.ts +3 -0
  651. package/src/ui-kit/FormField/getField.tsx +6 -0
  652. package/src/ui-kit/FormField/getObjectValidator.tsx +6 -1
@@ -1247,6 +1247,7 @@
1247
1247
  addressRegistration: ADDRESS_HINTS_LIST_OPTIONS,
1248
1248
  addressFact: ADDRESS_HINTS_LIST_OPTIONS,
1249
1249
  organizationAddress: ADDRESS_HINTS_LIST_OPTIONS,
1250
+ addressCourier: ADDRESS_HINTS_LIST_OPTIONS,
1250
1251
  };
1251
1252
 
1252
1253
  const debounce = (fn, delay = 600) => {
@@ -1525,6 +1526,8 @@
1525
1526
  sex: defaultValidator('Укажите свой пол'),
1526
1527
  addressRegistration: addressDaDataValidator(),
1527
1528
  organizationAddress: addressDaDataValidator(),
1529
+ deliveryDate: defaultValidator('Укажите дату доставки'),
1530
+ addressCourier: addressDaDataValidator(),
1528
1531
  participantDateRegistration: defaultValidator('Укажите дату регистрации'),
1529
1532
  retirementIncome: defaultValidator(),
1530
1533
  otherIncome: defaultValidator(),
@@ -1539,7 +1542,10 @@
1539
1542
  regionRetail: defaultSelectValidator('Выберите филиал банка'),
1540
1543
  addressRetail: defaultSelectValidator('Выберите адрес банка'),
1541
1544
  addressMatch: defaultValidator(),
1542
- codeWord: codeWordValidator('Необходимо ввести кодовое слово'),
1545
+ codeWord: codeWordValidator('Необходимо ввести кодовое слово латиницей'),
1546
+ currency: defaultValidator(),
1547
+ paymentSystem: defaultValidator(),
1548
+ cardCategory: defaultSelectValidator(),
1543
1549
  confirmationIncome: defaultValidator(),
1544
1550
  };
1545
1551
  const getObjectValidator = (inputs) => {
@@ -2255,6 +2261,7 @@
2255
2261
  credentials: 'include',
2256
2262
  body: body ? JSON.stringify(body) : null,
2257
2263
  });
2264
+ // TODO: add error handling
2258
2265
  return isJSON(response) ? response.json() : response;
2259
2266
  }
2260
2267
  // TODO: Need delete isJSON
@@ -2313,12 +2320,16 @@
2313
2320
  };
2314
2321
  const RadioButtonGroup = JSX(({ label, items, value, className, onChange: onChangeCheckedItem, disabled = false, orientation = 'horizontal', }) => (jsxs("div", { className: "grid gap-xs whitespace-nowrap", children: [label ? (jsx("div", { role: "radiogroup", "aria-label": label, children: jsx(Text, { color: "text-secondary-text", font: "font-light", children: label }) })) : null, jsx("div", { className: style('flex flex-col gap-s', orientationStyleMap[orientation], className), role: "radiogroup", "aria-label": "\u0413\u0440\u0443\u043F\u043F\u0430 \u043A\u043D\u043E\u043F\u043E\u043A", children: items?.map(({ id, text }) => (jsx(Checkbox, { isRadio: true, text: text, value: value === id, onChange: () => onChangeCheckedItem && onChangeCheckedItem(id), disabled: disabled }, String(id)))) })] })));
2315
2322
 
2323
+ const RadioButtonGroupControl = JSX(({ className, label, onChange, error, ...rest }) => (jsxs("div", { className: style('shrink-0 w-full', className), children: [jsx(RadioButtonGroup, { label: getRequiredLabel({ label, errors: rest?.errors }), onChange: (_) => onChange && onChange(_), ...rest }), renderErrorText(error)] })));
2324
+
2316
2325
  const CURRENCY_TYPES = [{ id: 'rub', text: 'Рубль' }];
2317
- const CurrencyField = JSX(({ field }) => {
2318
- const { value } = field('currency');
2319
- return (jsxs("div", { className: "", children: [jsx(Text, { font: "font-light", children: "\u0412\u0430\u043B\u044E\u0442\u0430 \u0434\u0435\u0431\u0435\u0442\u043E\u0432\u043E\u0439 \u043A\u0430\u0440\u0442\u044B" }), jsx("div", { className: "py-m gap-m grid @xl:flex @xl:items-center", children: jsx(RadioButtonGroup, { className: "whitespace-normal", orientation: "horizontal", items: CURRENCY_TYPES, value: value ?? 'rub' }) })] }));
2326
+ const CurrencyField = JSX(({ field, input }) => {
2327
+ const { value, onChange } = field('currency');
2328
+ return (jsx(RadioButtonGroupControl, { label: "\u0412\u0430\u043B\u044E\u0442\u0430", orientation: "horizontal", items: CURRENCY_TYPES, value: value, onChange: (_) => onChange?.(_), ...getValidation(field('currency'), validatorObj.currency, input?.required) }));
2320
2329
  });
2321
2330
 
2331
+ const DeliveryDateFiels = JSX(({ field, input }) => (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438", ...getValidation(field('deliveryDate'), validatorObj.deliveryDate, input?.required) })));
2332
+
2322
2333
  const DependentsField = JSX(({ field, input }) => (jsx(InputControl, { label: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u0438\u0436\u0434\u0438\u0432\u0435\u043D\u0446\u0435\u0432", placeholder: "\u0417\u0430 \u0438\u0441\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435 \u0434\u0435\u0442\u0435\u0439 \u0434\u043E 18 \u043B\u0435\u0442", type: "number", inputLength: 2, ...getValidation(field('dependents'), validatorObj.dependents, input?.required), ...input })));
2323
2334
 
2324
2335
  const DesiredMeetingDateField = JSX(({ field, input }) => (jsx(DatePickerControl, { label: "\u0416\u0435\u043B\u0430\u0435\u043C\u0430\u044F \u0434\u0430\u0442\u0430 \u0432\u0441\u0442\u0440\u0435\u0447\u0438", ...getValidation(field('desiredMeetingDate'), validatorObj.meetingDay, input?.required) })));
@@ -2460,6 +2471,12 @@
2460
2471
 
2461
2472
  const MandatoryIncomeField = JSX(({ field, input }) => (jsx(InputControl, { label: "\u0421\u043E\u0432\u043E\u043A\u0443\u043F\u043D\u044B\u0439 \u0434\u043E\u0445\u043E\u0434 \u0432 \u043C\u0435\u0441\u044F\u0446 \u043F\u043E\u0441\u043B\u0435 \u0432\u044B\u0447\u0435\u0442\u0430 \u043D\u0430\u043B\u043E\u0433\u043E\u0432 (\u0437\u0430\u0440\u043F\u043B\u0430\u0442\u0430, \u043F\u0440\u0435\u043C\u0438\u0438)", placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435", type: "number", ...getValidation(field('mandatoryIncome'), validatorObj.mandatoryIncome, input?.required), ...input })));
2462
2473
 
2474
+ const METHODS_OF_OBTAIN = [
2475
+ { id: 'office', text: 'В отделении Банка' },
2476
+ { id: 'courier', text: 'Курьерская доставка' },
2477
+ ];
2478
+ const MethodObtainField = JSX(({ field, input }) => (jsx(RadioButtonGroupControl, { orientation: "horizontal", items: METHODS_OF_OBTAIN, ...getValidation(field('methodObtain'), validatorObj.methodObtain, input?.required) })));
2479
+
2463
2480
  const MiddleNameField = JSX(({ field, input }) => (jsx(InputControl, { label: "\u041E\u0442\u0447\u0435\u0441\u0442\u0432\u043E (\u041E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E, \u043F\u0440\u0438 \u043D\u0430\u043B\u0438\u0447\u0438\u0438)", inputLength: 60, disabled: input?.filledByEsia && isEsiaAuthorize(field), ...getValidation(field('middleName'), validatorObj.middleName), ...input })));
2464
2481
 
2465
2482
  const NameField = JSX(({ field, input }) => (jsx(InputControl, { label: "\u0418\u043C\u044F", inputLength: 60, disabled: input?.filledByEsia && isEsiaAuthorize(field), ...getValidation(field('name'), validatorObj.name, input?.required), ...input })));
@@ -2507,12 +2524,12 @@
2507
2524
  { id: 'mir', text: 'Карта МИР' },
2508
2525
  { id: 'union_pay', text: 'UnionPay' },
2509
2526
  { id: 'payment_system_j', text: 'Платежная система (Дж)' },
2510
- { id: 'payment_system_b', text: 'Платежная система (B)* ' },
2527
+ { id: 'payment_system_b', text: 'Платежная система (B) ' },
2511
2528
  { id: 'free_card', text: 'Бесплатная карта' },
2512
2529
  ];
2513
- const PaymentSystemField = JSX(({ field }) => {
2530
+ const PaymentSystemField = JSX(({ field, input }) => {
2514
2531
  const { value, onChange } = field('paymentSystem');
2515
- return (jsxs("div", { className: "", children: [jsx(Text, { font: "font-light", children: "\u041F\u043B\u0430\u0442\u0435\u0436\u043D\u0430\u044F \u0441\u0438\u0441\u0442\u0435\u043C\u0430" }), jsx("div", { className: "py-m gap-m grid @xl:flex @xl:items-center", children: jsx(RadioButtonGroup, { className: "whitespace-normal", orientation: "horizontal", items: PAYMENT_SYSTEM_TYPES, value: value ?? 'mir', onChange: (_) => onChange && onChange(_) }) })] }));
2532
+ return (jsx(RadioButtonGroupControl, { label: "\u041F\u043B\u0430\u0442\u0435\u0436\u043D\u0430\u044F \u0441\u0438\u0441\u0442\u0435\u043C\u0430", orientation: "horizontal", items: PAYMENT_SYSTEM_TYPES, value: value, onChange: (_) => onChange?.(_), ...getValidation(field('paymentSystem'), validatorObj.paymentSystem, input?.required) }));
2516
2533
  });
2517
2534
 
2518
2535
  const isPlaceholder = (_) => _ === '_';
@@ -3247,8 +3264,6 @@
3247
3264
 
3248
3265
  const ServiceDirectionField = JSX(({ field, input }) => (jsx(SelectControl, { label: "\u041D\u0430\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u043E\u0431\u0441\u043B\u0443\u0436\u0438\u0432\u0430\u043D\u0438\u044F", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435", options: SERVICE_DIRECTIONS, ...getValidation(field('serviceDirection'), validatorObj.serviceDirection, input?.required) })));
3249
3266
 
3250
- const RadioButtonGroupControl = JSX(({ className, label, onChange, error, ...rest }) => (jsxs("div", { className: style('shrink-0 w-full', className), children: [jsx(RadioButtonGroup, { label: getRequiredLabel({ label, errors: rest?.errors }), onChange: (_) => onChange && onChange(_), ...rest }), renderErrorText(error)] })));
3251
-
3252
3267
  const SEX_TYPES = [
3253
3268
  { id: 'male', text: 'Мужской' },
3254
3269
  { id: 'female', text: 'Женский' },
@@ -3385,6 +3400,7 @@
3385
3400
  dulSubdivisionCode: jsx(DulSubdivisionCodeField, { field: field, input: input }),
3386
3401
  dulIssuedBy: jsx(DulIssuedByField, { field: field, input: input }),
3387
3402
  addressRegistration: jsx(AddressField, { field: field, input: input }),
3403
+ addressCourier: jsx(AddressField, { field: field, input: input }),
3388
3404
  participantDateRegistration: jsx(ParticipantDateRegistrationField, { field: field, input: input }),
3389
3405
  retirementIncome: jsx(RetirementIncomeField, { field: field, input: input }),
3390
3406
  otherIncome: jsx(OtherIncomeField, { field: field, input: input }),
@@ -3405,6 +3421,8 @@
3405
3421
  cardCategory: jsx(CardCategoryField, { field: field, input: input }),
3406
3422
  codeWord: jsx(CodeWordField, { field: field, input: input }),
3407
3423
  confirmationIncome: jsx(ConfirmationIncomeField, { field: field, input: input }),
3424
+ methodObtain: jsx(MethodObtainField, { field: field, input: input }),
3425
+ deliveryDate: jsx(DeliveryDateFiels, { field: field, input: input }),
3408
3426
  };
3409
3427
  return isRenderField({ input, field }) ? (jsx("div", { children: InputsMap[input?.name || ''] }, String(i))) : null;
3410
3428
  };
@@ -3498,7 +3516,7 @@
3498
3516
  consentToReceiveMaterials: false,
3499
3517
  consentDataProcessing: false,
3500
3518
  };
3501
- const getInitialFormState$2 = (inputs, typeForm = '') => {
3519
+ const getInitialFormState$3 = (inputs, typeForm = '') => {
3502
3520
  const formState = Object.fromEntries(inputs.map((_) => [
3503
3521
  _.name,
3504
3522
  (_.fieldType === 'ved' && _?.defaultValue) || initialFormState$1[_.name || ''],
@@ -3523,7 +3541,7 @@
3523
3541
  // eslint-disable-next-line max-lines-per-function
3524
3542
  ({ className, title, typeForm = '', sections = [], button, link, endpoint, additionalParams, isContacts, data, ...rest }) => {
3525
3543
  const inputs = (sections?.flatMap((_) => _?.inputs) || []);
3526
- const initialFormState = getInitialFormState$2(inputs, typeForm);
3544
+ const initialFormState = getInitialFormState$3(inputs, typeForm);
3527
3545
  const [responseType, setResponseType] = useState('');
3528
3546
  const responseTypeDialog = useResponseTypeDialog({ typeForm });
3529
3547
  const handleSubmit = useCallback(async (formData, ev) => {
@@ -3588,7 +3606,7 @@
3588
3606
  });
3589
3607
  const renderGeneralCheckbox = (generalCheckBox) => (foldableData) => (jsxs("div", { className: "flex items-start", children: [generalCheckBox, jsx("button", { onClick: foldableData.onToggle, className: "px-m py-2xs", type: "button", children: jsx(Icon, { className: "text-primary-text", name: foldableData.isUnfolded ? 'ArrowUpIcon' : 'ArrowDownIcon', width: "16", height: "16" }) })] }));
3590
3608
 
3591
- const renderInputs$1 = ({ field, typeForm = '', inputs, isRetailForm = false, }) => {
3609
+ const renderInputs$2 = ({ field, typeForm = '', inputs, isRetailForm = false, }) => {
3592
3610
  const { consentInputs, restInputs } = splitInputs(inputs || []);
3593
3611
  return consentInputs.length > 2 ? (jsxs("div", { children: [restInputs.map(getField(field, typeForm, isRetailForm)), jsx(GroupedConsents, { inputs: consentInputs, field: field })] })) : ((inputs || [])?.map(getField(field, typeForm, isRetailForm)));
3594
3612
  };
@@ -3630,8 +3648,12 @@
3630
3648
  consentInformFlg: false,
3631
3649
  addressRegistration: '',
3632
3650
  participantDateRegistration: undefined,
3651
+ currency: '',
3652
+ paymentSystem: '',
3653
+ cardCategory: { key: '', text: '' },
3654
+ codeWord: '',
3633
3655
  };
3634
- const getInitialFormState$1 = (inputs, savedForm, typeForm = '') => {
3656
+ const getInitialFormState$2 = (inputs, savedForm, typeForm = '') => {
3635
3657
  if (savedForm) {
3636
3658
  const formStateCopy = { ...savedForm };
3637
3659
  formStateCopy.birthday = new Date(formStateCopy?.birthday || 0);
@@ -4287,7 +4309,7 @@
4287
4309
  const [responseType, setResponseType] = useState('');
4288
4310
  const { isLoading } = useInitApplicationLead(nextStepLink);
4289
4311
  const [leadForm, setLeadForm] = useLocalStorage('leadForm');
4290
- const initialFormState = getInitialFormState$1(inputs, leadForm);
4312
+ const initialFormState = getInitialFormState$2(inputs, leadForm);
4291
4313
  const { handleSubmit, responseStatus } = useApplicationLeadApi({
4292
4314
  inputs,
4293
4315
  programId,
@@ -4305,7 +4327,7 @@
4305
4327
  reset();
4306
4328
  }
4307
4329
  }, [responseType]);
4308
- return (jsx(ApplicationFormLayout, { className: style('container space-y-m', className), title: title, ...rest, children: jsxs("form", { onSubmit: onSubmit, className: "space-y-m relative", children: [isLoading ? jsx(Loader, { blur: false }) : null, sections.map((_, i) => (jsxs("div", { className: style(inputColumnStyles(_.columns), 'grid gap-x-m'), children: [renderTitle(_.title), renderInputs$1({ field, inputs: _?.inputs, isRetailForm: true })] }, `section-${i}`))), renderSubmitButton(button)] }) }));
4330
+ return (jsx(ApplicationFormLayout, { className: style('container space-y-m', className), title: title, ...rest, children: jsxs("form", { onSubmit: onSubmit, className: "space-y-m relative", children: [isLoading ? jsx(Loader, { blur: false }) : null, sections.map((_, i) => (jsxs("div", { className: style(inputColumnStyles(_.columns), 'grid gap-x-m'), children: [renderTitle(_.title), renderInputs$2({ field, inputs: _?.inputs, isRetailForm: true })] }, `section-${i}`))), renderSubmitButton(button)] }) }));
4309
4331
  });
4310
4332
 
4311
4333
  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] })] })));
@@ -4318,17 +4340,17 @@
4318
4340
  } }), 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] })] }));
4319
4341
  });
4320
4342
 
4321
- 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: {
4343
+ 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$2, { title: sectionInfoTitle, items: sectionInfo }), jsx(SectionInfo$2, { title: sectionAdditionalTitle, items: sectionInfoAdditional, countColumns: true }), infoCard?.__html ? (jsx(InfoCard, { __html: infoCard?.__html, icon: infoCard?.icon, link: {
4322
4344
  text: infoCard?.link?.text,
4323
4345
  } })) : null, buttonText ? jsx(Button, { className: "w-full mt-lg", children: buttonText }) : null] })));
4324
- const SectionInfo$1 = ({ title, items, countColumns = false, }) => {
4346
+ const SectionInfo$2 = ({ title, items, countColumns = false, }) => {
4325
4347
  const isMobile = useMobileMode();
4326
4348
  if (!items) {
4327
4349
  return null;
4328
4350
  }
4329
- 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] })] }));
4351
+ 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$2(item) }, index))) })) : null] })] }));
4330
4352
  };
4331
- 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 })] }));
4353
+ const renderItem$2 = ({ 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 })] }));
4332
4354
 
4333
4355
  const NotFound = JSX(({ title, description }) => {
4334
4356
  const isMobileMode = useMobileMode();
@@ -5958,9 +5980,9 @@
5958
5980
 
5959
5981
  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] })] })));
5960
5982
 
5961
- const CreditFormProgress = JSX(({ step = 1, totalSteps = 5, stepsTitles = [] }) => {
5962
- const progress = useMemo(() => (step / totalSteps) * 100, [step, totalSteps]);
5963
- 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 })] }) }));
5983
+ const CreditCardFormProgress = JSX(({ step = 1, totalSteps = 6, stepsTitles = [] }) => {
5984
+ const progress = useMemo(() => ((step + 1) / totalSteps) * 100, [step, totalSteps]);
5985
+ 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 + 1, " \u0438\u0437 ", totalSteps, "."] }), stepsTitles[step] || null, jsx(ProgressBar, { step: progress, showPercentage: false })] }) }));
5964
5986
  });
5965
5987
 
5966
5988
  var STATUS_TYPE;
@@ -5974,23 +5996,23 @@
5974
5996
 
5975
5997
  const sendSignalToProcess = (body) => doRequest('/user-data/sendSignalToProcess', 'POST', body);
5976
5998
 
5977
- 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: {
5999
+ const CreditCardFormStatus = 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: {
5978
6000
  text: infoCard?.link?.text,
5979
6001
  } })) : null, buttonText ? (jsx(LinkButton, { href: "/natural", text: buttonText, version: "primary", className: "w-full mt-lg" })) : null] })));
5980
- const SectionInfo = ({ title, items, countColumns = false, }) => {
6002
+ const SectionInfo$1 = ({ title, items, countColumns = false, }) => {
5981
6003
  const isMobile = useMobileMode();
5982
6004
  if (!items) {
5983
6005
  return null;
5984
6006
  }
5985
- 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] })] }));
6007
+ 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] })] }));
5986
6008
  };
5987
- 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 })] }));
6009
+ 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 })] }));
5988
6010
 
5989
- 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" })));
6011
+ const FailedStatusContent$1 = JSX(() => (jsx(CreditCardFormStatus, { 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. \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" })));
5990
6012
 
5991
- const PendingStatusContent = JSX(() => {
6013
+ const PendingStatusContent$1 = JSX(() => {
5992
6014
  const [leadForm] = useLocalStorage('leadForm');
5993
- 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: [
6015
+ return (jsx(CreditCardFormStatus, { 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: [
5994
6016
  {
5995
6017
  label: 'Название продукта',
5996
6018
  description: 'Кредит на любые цели',
@@ -6014,9 +6036,9 @@
6014
6036
  ] }));
6015
6037
  });
6016
6038
 
6017
- const ReworkStatusContent = JSX(() => {
6039
+ const ReworkStatusContent$1 = JSX(() => {
6018
6040
  const [leadForm] = useLocalStorage('leadForm');
6019
- 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: [
6041
+ return (jsx(CreditCardFormStatus, { 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: [
6020
6042
  {
6021
6043
  label: 'Регион',
6022
6044
  description: leadForm?.regionRetail?.text,
@@ -6033,9 +6055,9 @@
6033
6055
  ], buttonText: "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043D\u0430 \u0433\u043B\u0430\u0432\u043D\u0443\u044E" }));
6034
6056
  });
6035
6057
 
6036
- const SuccessStatusContent = JSX(() => {
6058
+ const SuccessStatusContent$1 = JSX(() => {
6037
6059
  const [leadForm] = useLocalStorage('leadForm');
6038
- 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: [
6060
+ return (jsx(CreditCardFormStatus, { 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: [
6039
6061
  {
6040
6062
  label: 'Название продукта',
6041
6063
  description: 'Кредит на любые цели',
@@ -6059,19 +6081,18 @@
6059
6081
  ], buttonText: "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043D\u0430 \u0433\u043B\u0430\u0432\u043D\u0443\u044E" }));
6060
6082
  });
6061
6083
 
6062
- const TASK_ID = 2816419;
6063
- const SIGNAL_TYPES = [
6084
+ const SIGNAL_TYPES$1 = [
6064
6085
  'CREATE_APPLICATION_SHORT_SIGNAL',
6065
6086
  'CREATE_APPLICATION_LOAN_V3_SIGNAL',
6066
6087
  ];
6067
- const CreditFormStatusTracker = JSX(() => {
6088
+ const CreditCardFormStatusTracker = JSX(() => {
6068
6089
  const [status, setStatus] = useState(STATUS_TYPE.process);
6069
6090
  const [taskId] = useLocalStorage('taskId');
6070
6091
  useEffect(() => {
6071
- for (const signalType of SIGNAL_TYPES) {
6092
+ for (const signalType of SIGNAL_TYPES$1) {
6072
6093
  sendSignalToProcess({ signalType, taskId });
6073
6094
  }
6074
- const trackStatus = () => getTaskStatus({ taskId: TASK_ID }).then((res) => {
6095
+ const trackStatus = () => getTaskStatus({ taskId }).then((res) => {
6075
6096
  if (res.statusCd && res.statusCd !== STATUS_TYPE.process) {
6076
6097
  clearInterval(pullingInterval);
6077
6098
  setStatus(res.statusCd);
@@ -6079,27 +6100,24 @@
6079
6100
  });
6080
6101
  const pullingInterval = setInterval(trackStatus, 30000);
6081
6102
  }, []);
6082
- return renderStatus(status);
6103
+ return renderStatus$1(status);
6083
6104
  });
6084
- const renderStatus = (status) => {
6105
+ const renderStatus$1 = (status) => {
6085
6106
  const statusesMap = {
6086
- IN_PROCESS: jsx(PendingStatusContent, {}),
6087
- FAILED: jsx(FailedStatusContent, {}),
6088
- OK: jsx(SuccessStatusContent, {}),
6089
- REWORK: jsx(ReworkStatusContent, {}),
6107
+ IN_PROCESS: jsx(PendingStatusContent$1, {}),
6108
+ FAILED: jsx(FailedStatusContent$1, {}),
6109
+ OK: jsx(SuccessStatusContent$1, {}),
6110
+ REWORK: jsx(ReworkStatusContent$1, {}),
6090
6111
  };
6091
6112
  return statusesMap[status] || null;
6092
6113
  };
6093
6114
 
6094
- const formStateMap = {
6115
+ /* eslint-disable max-lines */
6116
+ const formStateMap$1 = {
6095
6117
  0: {
6096
- moneyValue: 0,
6097
- monthsValue: 0,
6098
- isAnnuity: false,
6099
- isInsurance: false,
6100
- isSalaryClient: false,
6101
- isPensionClient: false,
6102
- isStateEmployee: false,
6118
+ paymentSystem: PAYMENT_SYSTEM_TYPES[0].id,
6119
+ currency: 'rub',
6120
+ codeWord: '',
6103
6121
  },
6104
6122
  1: {
6105
6123
  surname: '',
@@ -6125,6 +6143,11 @@
6125
6143
  fiasCode: '',
6126
6144
  },
6127
6145
  housing: '',
6146
+ methodObtain: 'office',
6147
+ addressCourier: {
6148
+ fullAddress: '',
6149
+ fiasCode: '',
6150
+ },
6128
6151
  },
6129
6152
  2: {
6130
6153
  amountWorkers: { key: '', text: '' },
@@ -6151,7 +6174,6 @@
6151
6174
  familyStatus: { key: '', text: '' },
6152
6175
  dependents: undefined,
6153
6176
  familyMembers: undefined,
6154
- confirmationIncome: { key: '', text: '' },
6155
6177
  mandatoryIncome: undefined,
6156
6178
  otherPayments: undefined,
6157
6179
  snils: '',
@@ -6166,12 +6188,21 @@
6166
6188
  },
6167
6189
  5: {
6168
6190
  regionRetail: '',
6169
- addressRetail: '',
6191
+ addressRetail: {
6192
+ fullAddress: '',
6193
+ fiasCode: '',
6194
+ },
6170
6195
  bankEmployeeCode: '',
6196
+ addressCoutier: {
6197
+ fullAddress: '',
6198
+ fiasCode: '',
6199
+ },
6200
+ methodObtain: 'office',
6201
+ deliveryDate: undefined,
6171
6202
  },
6172
6203
  };
6173
6204
 
6174
- const getInitialFormState = (step, localStorageData) => {
6205
+ const getInitialFormState$1 = (step, localStorageData) => {
6175
6206
  if (localStorageData) {
6176
6207
  // TODO: Fill in for other fields with type Date
6177
6208
  // TODO: Take it out to the helper
@@ -6189,28 +6220,71 @@
6189
6220
  : undefined;
6190
6221
  }
6191
6222
  return {
6192
- ...formStateMap[step],
6223
+ ...formStateMap$1[step],
6193
6224
  ...localStorageData,
6194
6225
  };
6195
6226
  };
6196
6227
 
6197
- const renderInfo$1 = (inputs = []) => {
6228
+ const renderInfo$2 = (inputs = []) => {
6198
6229
  const infoInputs = inputs.filter((_) => _.fieldType === 'info');
6199
6230
  return infoInputs.length
6200
6231
  ? infoInputs.map(({ text, name }, i) => jsx(InfoCard, { __html: text }, `${name}_${i}`))
6201
6232
  : null;
6202
6233
  };
6203
6234
 
6204
- const renderInputs = ({ field, inputs }) => (inputs || [])?.map(getField(field, ''));
6235
+ const renderInputs$1 = ({ field, inputs }) => (inputs || [])?.map(getField(field, ''));
6205
6236
 
6206
- 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}`)));
6237
+ const renderLastStep = ({ sections, field, methodObtain }) => sections
6238
+ ?.filter(({ type }) => type === methodObtain || !type)
6239
+ .map(({ inputs, columns, title }, i) => (jsxs("div", { className: style(inputColumnStyles(columns), 'grid gap-x-m'), children: [renderInfo$2(inputs), renderTitle(title), renderInputs$1({ field, inputs })] }, `section-${i}`)));
6240
+ const renderStep$2 = ({ sections, field, isLastStep, methodObtain }) => {
6241
+ if (isLastStep) {
6242
+ return renderLastStep({ sections, field, methodObtain });
6243
+ }
6244
+ return sections?.map(({ inputs, columns, title }, i) => (jsxs("div", { className: style(inputColumnStyles(columns), 'grid gap-x-m'), children: [renderInfo$2(inputs), renderTitle(title), renderInputs$1({ field, inputs })] }, `section-${i}`)));
6245
+ };
6207
6246
 
6208
- const StepsNavigationButtons = JSX(({ step, onPrevStep }) => {
6247
+ const StepsNavigationButtons$1 = JSX(({ step, onPrevStep }) => {
6209
6248
  const isFirstStep = step === 0;
6210
- 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" })] }));
6249
+ return (jsxs("div", { className: "flex justify-between gap-m", 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: "w-full @xl:w-auto", type: "submit", children: "\u0414\u0430\u043B\u0435\u0435" })] }));
6211
6250
  });
6212
6251
 
6213
- const getFirstStepData = (formData) => {
6252
+ const getFifthStepData = (formData) => {
6253
+ const { bankruptcyFlg, shareholderFlg, legalEntityName, creditInRshbCd } = formData;
6254
+ return {
6255
+ bankruptcyFlg,
6256
+ shareholderFlg,
6257
+ nameLegalEntity: legalEntityName,
6258
+ creditInRshbCd,
6259
+ };
6260
+ };
6261
+
6262
+ const getFirstStepData$1 = (formData) => {
6263
+ const { currency, paymentSystem, cardCategory, codeWord } = formData;
6264
+ return {
6265
+ currencyCode: currency,
6266
+ paymentSystemTypeCd: paymentSystem,
6267
+ classCard: cardCategory,
6268
+ codeWord: codeWord,
6269
+ };
6270
+ };
6271
+
6272
+ const getFourthStepData$1 = (formData) => {
6273
+ const { familyStatus, dependents, familyMembers, mandatoryIncome, otherPayments, snils, armyIdFlg, } = formData;
6274
+ return {
6275
+ maritalStatusCd: familyStatus,
6276
+ totalDependents: familyMembers,
6277
+ otherDependents: dependents,
6278
+ participantIncomes: getParticipantIncomes({
6279
+ mandatoryIncome,
6280
+ otherPayments,
6281
+ }),
6282
+ snils: snils?.replaceAll(' ', ''),
6283
+ armyIdFlg,
6284
+ };
6285
+ };
6286
+
6287
+ const getSecondStepData$1 = (formData) => {
6214
6288
  const { name, surname, middleName, birthday = '', phone = '', email, sex, birthPlace, dulIssueDateField = '', dulIssuedBy, dulNumber, dulSerie, dulSubdivisionCode, education, participantDateRegistration = '', housing, addressRegistration, addressFact, } = formData;
6215
6289
  return {
6216
6290
  birthDate: formatDate(birthday, true),
@@ -6239,17 +6313,7 @@
6239
6313
  };
6240
6314
  };
6241
6315
 
6242
- const getFourthStepData = (formData) => {
6243
- const { bankruptcyFlg, shareholderFlg, legalEntityName, creditInRshbCd } = formData;
6244
- return {
6245
- bankruptcyFlg,
6246
- shareholderFlg,
6247
- nameLegalEntity: legalEntityName,
6248
- creditInRshbCd,
6249
- };
6250
- };
6251
-
6252
- const getSecondStepData = (formData) => {
6316
+ const getThirdStepData$1 = (formData) => {
6253
6317
  const { employment, organizationName, inn, legalForm, organization, amountWorkers, employerActivities, employerOrganization, generalSeniority, lastJobExperience, experience5Years, jobsNumber, organizationPhone, organizationAddress, positionOrganization, } = formData;
6254
6318
  return {
6255
6319
  employmentTypeCd: employment,
@@ -6272,60 +6336,834 @@
6272
6336
  };
6273
6337
  };
6274
6338
 
6275
- const getThirdStepData = (formData) => {
6276
- const { familyStatus, dependents, familyMembers, confirmationIncome, mandatoryIncome, otherPayments, snils, armyIdFlg, } = formData;
6339
+ const getCreditCardFormTaskData = ({ participantId, taskId, profileId, formData, step = 0, }) => {
6277
6340
  return {
6278
- maritalStatusCd: familyStatus,
6279
- totalDependents: familyMembers,
6280
- incomeCertificateCd: confirmationIncome,
6281
- otherDependents: dependents,
6282
- participantIncomes: getParticipantIncomes({
6283
- mandatoryIncome,
6284
- otherPayments,
6285
- }),
6286
- snils: snils?.replaceAll(' ', ''),
6287
- armyIdFlg,
6288
- };
6289
- };
6290
-
6291
- const getCreditFormTaskData = ({ participantId, taskId, profileId, formData, step = 0, }) => ({
6292
- sendToBank: true,
6293
- taskKind: 'UNITED',
6294
- task: {
6295
- taskSource: globalThis.location.origin,
6296
- id: taskId,
6297
- //TODO: Добавить id офиса
6298
- authorizedAgentId: formData?.bankEmployeeCode,
6299
- participants: [
6300
- {
6301
- id: participantId,
6302
- profile: {
6303
- id: profileId,
6304
- },
6305
- roleCd: {
6306
- key: 'BORROWER',
6307
- value: 'Заемщик',
6341
+ sendToBank: true,
6342
+ taskKind: 'UNITED',
6343
+ task: {
6344
+ taskSource: globalThis.location.origin,
6345
+ id: taskId,
6346
+ //TODO: Добавить id офиса
6347
+ authorizedAgentId: formData?.bankEmployeeCode,
6348
+ participants: [
6349
+ {
6350
+ id: participantId,
6351
+ profile: {
6352
+ id: profileId,
6353
+ },
6354
+ roleCd: {
6355
+ key: 'BORROWER',
6356
+ value: 'Заемщик',
6357
+ },
6358
+ ...getCurrentStepData$1(step, formData),
6308
6359
  },
6309
- ...getCurrentStepData(step, formData),
6310
- },
6311
- ],
6312
- esiaAccountTypeCd: {
6313
- key: formData?.esiaAccountTypeCd?.key,
6360
+ ],
6314
6361
  },
6315
- },
6316
- });
6317
- const getCurrentStepData = (step, formData) => {
6362
+ };
6363
+ };
6364
+ const getCurrentStepData$1 = (step, formData) => {
6318
6365
  switch (step) {
6366
+ case 0:
6367
+ return getFirstStepData$1(formData);
6319
6368
  case 1:
6320
- return getFirstStepData(formData);
6369
+ return getSecondStepData$1(formData);
6321
6370
  case 2:
6322
- return getSecondStepData(formData);
6371
+ return getThirdStepData$1(formData);
6323
6372
  case 3:
6324
- return getThirdStepData(formData);
6373
+ return getFourthStepData$1(formData);
6325
6374
  case 4:
6326
- return getFourthStepData(formData);
6375
+ return getFifthStepData(formData);
6376
+ case 5:
6377
+ return {
6378
+ //TODO: Сделать адаптер данных способа получения карты
6379
+ };
6327
6380
  default:
6328
- return getFirstStepData(formData);
6381
+ return {};
6382
+ }
6383
+ };
6384
+
6385
+ const useCreditCardFormAPI = ({ step, inputs, onNextStep, saveStep, finishForm, }) => {
6386
+ const [taskId] = useLocalStorage('taskId');
6387
+ const [profileId] = useLocalStorage('profileId');
6388
+ const [participantId] = useLocalStorage('participantId');
6389
+ const handleSubmit = useCallback(async (formData) => {
6390
+ const feedbackValidator = objectValidator(getObjectValidator(calculateInputs$1(formData, inputs, step)));
6391
+ if (!isValidationSuccess(feedbackValidator(formData))) {
6392
+ return console.warn('validation fail');
6393
+ }
6394
+ saveStep(formData);
6395
+ try {
6396
+ if (taskId && profileId && participantId) {
6397
+ await updateUserTask(getCreditCardFormTaskData({
6398
+ participantId,
6399
+ taskId,
6400
+ profileId,
6401
+ step,
6402
+ formData: formData,
6403
+ }));
6404
+ }
6405
+ }
6406
+ catch (ex) {
6407
+ return 'Fail';
6408
+ }
6409
+ onNextStep();
6410
+ if (step === 5) {
6411
+ finishForm?.(true);
6412
+ }
6413
+ return 'OK';
6414
+ }, []);
6415
+ return {
6416
+ handleSubmit,
6417
+ };
6418
+ };
6419
+ const calculateInputs$1 = (formData, inputs, step) => step === 2 && 'employment' in formData && formData?.employment?.key === 'RETIREE' ? [] : inputs;
6420
+
6421
+ const CreditCardFormStep = JSX(({ step, sections, onPrevStep, onNextStep, inputs, isFormFinished, finishForm }) => {
6422
+ const [localStorageData, saveStep] = useLocalStorage('leadForm');
6423
+ const initialState = getInitialFormState$1(step, localStorageData);
6424
+ const customSubmit = useRef(undefined);
6425
+ const registerSubmit = useCallback((submit) => {
6426
+ customSubmit.current = submit;
6427
+ }, []);
6428
+ const { handleSubmit } = useCreditCardFormAPI({
6429
+ step,
6430
+ inputs,
6431
+ onNextStep,
6432
+ saveStep,
6433
+ finishForm,
6434
+ });
6435
+ const [state, { field, onSubmit }] = useForm(initialState, {
6436
+ onSubmit: (formData, ev) => {
6437
+ handleSubmit({ ...formData, ...customSubmit.current?.(ev) });
6438
+ },
6439
+ });
6440
+ const methodObtain = 'methodObtain' in state ? state.methodObtain : undefined;
6441
+ return isFormFinished ? (jsx(CreditCardFormStatusTracker, {})) : (jsxs("form", { onSubmit: onSubmit, className: "space-y-m", children: [renderStep$2({
6442
+ sections,
6443
+ field,
6444
+ registerSubmit,
6445
+ methodObtain,
6446
+ isLastStep: step === 5,
6447
+ }), jsx(StepsNavigationButtons$1, { step: step, onPrevStep: onPrevStep })] }));
6448
+ });
6449
+
6450
+ /* eslint-disable max-lines */
6451
+ /* eslint-disable max-len */
6452
+ const stepsSectionsMap$1 = [
6453
+ [
6454
+ {
6455
+ title: 'Параметры карты',
6456
+ inputs: [],
6457
+ },
6458
+ {
6459
+ inputs: [
6460
+ { fieldType: 'common', name: 'currency', required: true },
6461
+ { fieldType: 'common', name: 'paymentSystem', required: true },
6462
+ { fieldType: 'common', name: 'cardCategory', required: true },
6463
+ { fieldType: 'common', name: 'codeWord', required: true },
6464
+ ],
6465
+ },
6466
+ ],
6467
+ [
6468
+ {
6469
+ title: 'Персональные данные',
6470
+ columns: 2,
6471
+ inputs: [
6472
+ {
6473
+ fieldType: 'common',
6474
+ name: 'surname',
6475
+ required: true,
6476
+ dadata: true,
6477
+ filledByEsia: true,
6478
+ },
6479
+ { fieldType: 'common', name: 'name', required: true, dadata: true, filledByEsia: true },
6480
+ { fieldType: 'common', name: 'middleName', dadata: true, filledByEsia: true },
6481
+ { fieldType: 'common', name: 'sex', required: true },
6482
+ { fieldType: 'common', name: 'birthday', required: true, filledByEsia: true },
6483
+ { fieldType: 'common', name: 'birthPlace', required: true },
6484
+ { fieldType: 'common', name: 'phone', required: true },
6485
+ { fieldType: 'common', name: 'email', required: true, dadata: true },
6486
+ ],
6487
+ },
6488
+ {
6489
+ title: 'Паспортные данные',
6490
+ columns: 2,
6491
+ inputs: [
6492
+ { fieldType: 'common', name: 'dulSerie', required: true, filledByEsia: true },
6493
+ { fieldType: 'common', name: 'dulNumber', required: true, filledByEsia: true },
6494
+ { fieldType: 'common', name: 'dulIssueDateField', required: true, filledByEsia: true },
6495
+ {
6496
+ fieldType: 'common',
6497
+ name: 'dulSubdivisionCode',
6498
+ required: true,
6499
+ dadata: true,
6500
+ filledByEsia: true,
6501
+ },
6502
+ ],
6503
+ },
6504
+ {
6505
+ inputs: [
6506
+ {
6507
+ fieldType: 'common',
6508
+ name: 'dulIssuedBy',
6509
+ required: true,
6510
+ dadata: true,
6511
+ filledByEsia: true,
6512
+ },
6513
+ {
6514
+ fieldType: 'common',
6515
+ name: 'education',
6516
+ required: true,
6517
+ },
6518
+ ],
6519
+ },
6520
+ {
6521
+ title: 'Адрес регистрации по месту жительства',
6522
+ columns: 1,
6523
+ inputs: [],
6524
+ },
6525
+ {
6526
+ inputs: [
6527
+ {
6528
+ fieldType: 'common',
6529
+ name: 'addressRegistration',
6530
+ required: true,
6531
+ dadata: true,
6532
+ filledByEsia: true,
6533
+ },
6534
+ { fieldType: 'common', name: 'addressMatch' },
6535
+ ],
6536
+ },
6537
+ {
6538
+ columns: 2,
6539
+ inputs: [{ fieldType: 'common', name: 'participantDateRegistration', required: true }],
6540
+ },
6541
+ {
6542
+ title: 'Адрес фактического проживания (место пребывания РФ)',
6543
+ inputs: [],
6544
+ },
6545
+ {
6546
+ columns: 2,
6547
+ inputs: [{ fieldType: 'common', name: 'housing', required: true }],
6548
+ },
6549
+ {
6550
+ inputs: [{ fieldType: 'common', name: 'addressFact', required: true, dadata: true }],
6551
+ },
6552
+ ],
6553
+ [
6554
+ {
6555
+ title: 'Данные о трудоустройстве',
6556
+ inputs: [],
6557
+ },
6558
+ {
6559
+ inputs: [
6560
+ {
6561
+ fieldType: 'info',
6562
+ text: 'Клиент на момент оформления заявки на кредит должен быть: официально трудоустроен более 6 месяцев, если Клиент получает з/п на счет РСХБ, то трудоустроен более 3 месяцев, не должен находиться в декретном отпуске',
6563
+ },
6564
+ ],
6565
+ },
6566
+ {
6567
+ inputs: [
6568
+ { fieldType: 'common', name: 'employment' },
6569
+ { fieldType: 'common', name: 'organizationName', required: true, dadata: true },
6570
+ ],
6571
+ },
6572
+ {
6573
+ columns: 2,
6574
+ inputs: [
6575
+ { fieldType: 'common', name: 'inn', required: true, dadata: true },
6576
+ { fieldType: 'common', name: 'legalForm', required: true },
6577
+ ],
6578
+ },
6579
+ {
6580
+ inputs: [
6581
+ { fieldType: 'common', name: 'organization', required: false },
6582
+ { fieldType: 'common', name: 'amountWorkers', required: false },
6583
+ ],
6584
+ },
6585
+ {
6586
+ columns: 2,
6587
+ inputs: [
6588
+ { fieldType: 'common', name: 'employerActivities', required: false },
6589
+ { fieldType: 'common', name: 'employerOrganization', required: false },
6590
+ { fieldType: 'common', name: 'generalSeniority', required: true },
6591
+ { fieldType: 'common', name: 'lastJobExperience', required: true },
6592
+ { fieldType: 'common', name: 'experience5Years', required: true },
6593
+ { fieldType: 'common', name: 'jobsNumber', required: true },
6594
+ ],
6595
+ },
6596
+ {
6597
+ inputs: [
6598
+ {
6599
+ fieldType: 'common',
6600
+ name: 'organizationPhone',
6601
+ label: 'Телефон работодателя',
6602
+ required: true,
6603
+ },
6604
+ { fieldType: 'common', name: 'beginDate', required: true },
6605
+ ],
6606
+ },
6607
+ {
6608
+ columns: 2,
6609
+ inputs: [
6610
+ { fieldType: 'common', name: 'positionOrganization', required: false },
6611
+ { fieldType: 'common', name: 'partInBusiness', required: true },
6612
+ ],
6613
+ },
6614
+ {
6615
+ title: 'Адрес работодателя',
6616
+ inputs: [],
6617
+ },
6618
+ {
6619
+ inputs: [{ fieldType: 'common', name: 'organizationAddress', required: true, dadata: true }],
6620
+ },
6621
+ ],
6622
+ [
6623
+ {
6624
+ title: 'Семейное положение',
6625
+ },
6626
+ {
6627
+ columns: 1,
6628
+ inputs: [{ fieldType: 'common', name: 'familyStatus', required: true }],
6629
+ },
6630
+ {
6631
+ columns: 1,
6632
+ inputs: [{ fieldType: 'common', name: 'dependents', required: true }],
6633
+ },
6634
+ {
6635
+ columns: 2,
6636
+ inputs: [
6637
+ { fieldType: 'common', name: 'familyMembers' },
6638
+ { fieldType: 'common', name: 'children', required: true },
6639
+ ],
6640
+ },
6641
+ {
6642
+ title: 'Совокупный доход',
6643
+ },
6644
+ {
6645
+ inputs: [
6646
+ {
6647
+ fieldType: 'info',
6648
+ text: 'Сумма основного и дополнительных доходов после вычета налога',
6649
+ },
6650
+ ],
6651
+ },
6652
+ {
6653
+ columns: 1,
6654
+ inputs: [{ fieldType: 'common', name: 'mandatoryIncome', required: true }],
6655
+ },
6656
+ {
6657
+ columns: 1,
6658
+ inputs: [{ fieldType: 'common', name: 'otherPayments', required: true }],
6659
+ },
6660
+ {
6661
+ columns: 1,
6662
+ inputs: [{ fieldType: 'common', name: 'snils', required: true }],
6663
+ },
6664
+ {
6665
+ columns: 1,
6666
+ inputs: [{ fieldType: 'common', name: 'conscription', required: true }],
6667
+ },
6668
+ {
6669
+ columns: 2,
6670
+ inputs: [{ fieldType: 'common', name: 'armyIdFlg' }],
6671
+ },
6672
+ ],
6673
+ [
6674
+ {
6675
+ title: 'Дополнительные сведения',
6676
+ columns: 1,
6677
+ inputs: [],
6678
+ },
6679
+ {
6680
+ inputs: [{ fieldType: 'common', name: 'disablePeopleFlg' }],
6681
+ },
6682
+ {
6683
+ inputs: [{ fieldType: 'common', name: 'bankruptcyFlg' }],
6684
+ },
6685
+ {
6686
+ inputs: [{ fieldType: 'common', name: 'shareholderFlg' }],
6687
+ },
6688
+ {
6689
+ inputs: [{ fieldType: 'common', name: 'legalEntityName' }],
6690
+ },
6691
+ {
6692
+ inputs: [{ fieldType: 'common', name: 'creditInRshbCd' }],
6693
+ },
6694
+ ],
6695
+ [
6696
+ {
6697
+ title: 'Способ получения',
6698
+ columns: 1,
6699
+ inputs: [],
6700
+ },
6701
+ {
6702
+ inputs: [{ fieldType: 'common', name: 'methodObtain' }],
6703
+ },
6704
+ {
6705
+ type: 'courier',
6706
+ title: 'Адрес',
6707
+ columns: 1,
6708
+ inputs: [],
6709
+ },
6710
+ {
6711
+ type: 'courier',
6712
+ inputs: [{ fieldType: 'common', name: 'addressCourier', dadata: true }],
6713
+ },
6714
+ {
6715
+ type: 'courier',
6716
+ inputs: [{ fieldType: 'common', name: 'deliveryDate' }],
6717
+ },
6718
+ {
6719
+ type: 'courier',
6720
+ inputs: [{ fieldType: 'common', name: 'comment' }],
6721
+ },
6722
+ {
6723
+ type: 'office',
6724
+ title: 'Отделение Банка',
6725
+ columns: 1,
6726
+ inputs: [],
6727
+ },
6728
+ {
6729
+ type: 'office',
6730
+ inputs: [{ fieldType: 'common', name: 'regionRetail', required: true }],
6731
+ },
6732
+ {
6733
+ type: 'office',
6734
+ inputs: [{ fieldType: 'common', name: 'addressRetail', required: true }],
6735
+ },
6736
+ {
6737
+ type: 'office',
6738
+ title: 'Код представителя Банка',
6739
+ columns: 1,
6740
+ inputs: [],
6741
+ },
6742
+ {
6743
+ type: 'office',
6744
+ inputs: [
6745
+ {
6746
+ fieldType: 'info',
6747
+ text: 'Если представитель Банка помогал Вам в заведении заявки, введите здесь его код',
6748
+ },
6749
+ ],
6750
+ },
6751
+ {
6752
+ type: 'office',
6753
+ inputs: [{ fieldType: 'common', name: 'bankEmployeeCode' }],
6754
+ },
6755
+ ],
6756
+ ];
6757
+
6758
+ const WIZARD_STEPS$1 = 6;
6759
+ const WIZARD_TITLES$1 = [
6760
+ 'Параметры карты',
6761
+ 'Персональные данные',
6762
+ 'Данные о трудоустройстве',
6763
+ 'Данные о доходах и расходах',
6764
+ 'Дополнительные сведения',
6765
+ 'Выбор способа получения',
6766
+ ];
6767
+ const CreditCardForm = JSX(({ className, ...rest }) => {
6768
+ const [step, setStep] = useState(0);
6769
+ const handleNextStep = useCallback(() => {
6770
+ setStep((_) => Math.min(_ + 1, WIZARD_STEPS$1));
6771
+ }, []);
6772
+ const handlePrevStep = useCallback(() => {
6773
+ //TODO search hook - 1,
6774
+ setStep((_) => Math.max(_ - 1, 0));
6775
+ }, []);
6776
+ const sections = useMemo(() => stepsSectionsMap$1[step], [step]);
6777
+ const inputs = (sections?.flatMap((_) => _?.inputs) || []);
6778
+ const [isFormFinished, setIsFormFinished] = useState(false);
6779
+ return (jsx(BlockWrapper, { className: style('bg-transparent', className), defaultPadding: "p-0", ...rest, children: jsxs("div", { className: "container grid grid-cols-12", children: [isFormFinished ? null : (jsx(CreditCardFormProgress, { stepsTitles: WIZARD_TITLES$1, step: step, totalSteps: WIZARD_STEPS$1 })), jsx("div", { className: "py-lg px-5xl mt-2xs bg-white col-span-12", children: jsx(CreditCardFormStep, { step: step, inputs: inputs, sections: sections, onNextStep: handleNextStep, onPrevStep: handlePrevStep, isFormFinished: isFormFinished, finishForm: setIsFormFinished }, String(step)) })] }) }));
6780
+ });
6781
+
6782
+ const PORTAL_NATURAL_URL = '/';
6783
+ const UPDATING_INTERVAL = 60000 * 4;
6784
+ const updateRefreshToken = () => {
6785
+ const refreshToken = globalThis.sessionStorage?.getItem('refreshToken');
6786
+ const accessToken = globalThis.sessionStorage?.getItem('accessToken');
6787
+ const taskId = globalThis.localStorage.getItem('taskId');
6788
+ if (!accessToken || !refreshToken || !taskId) {
6789
+ globalThis.location.href = PORTAL_NATURAL_URL;
6790
+ return () => null;
6791
+ }
6792
+ const timer = setInterval(async () => {
6793
+ const res = await doRequest('/auth/refresh', 'POST', {
6794
+ // eslint-disable-next-line camelcase
6795
+ refresh_token: refreshToken,
6796
+ // eslint-disable-next-line camelcase
6797
+ access_token: accessToken,
6798
+ });
6799
+ if (res instanceof Response) {
6800
+ globalThis.location.href = PORTAL_NATURAL_URL;
6801
+ return;
6802
+ }
6803
+ sessionStorage.setItem('refreshToken', res.refresh_token);
6804
+ sessionStorage.setItem('accessToken', res.access_token);
6805
+ }, UPDATING_INTERVAL);
6806
+ return () => clearInterval(timer);
6807
+ };
6808
+
6809
+ const CreditFormProgress = JSX(({ step = 1, totalSteps = 5, stepsTitles = [] }) => {
6810
+ const progress = useMemo(() => (step / totalSteps) * 100, [step, totalSteps]);
6811
+ 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 })] }) }));
6812
+ });
6813
+
6814
+ 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: {
6815
+ text: infoCard?.link?.text,
6816
+ } })) : null, buttonText ? (jsx(LinkButton, { href: "/natural", text: buttonText, version: "primary", className: "w-full mt-lg" })) : null] })));
6817
+ const SectionInfo = ({ title, items, countColumns = false, }) => {
6818
+ const isMobile = useMobileMode();
6819
+ if (!items) {
6820
+ return null;
6821
+ }
6822
+ 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] })] }));
6823
+ };
6824
+ 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 })] }));
6825
+
6826
+ 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. \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" })));
6827
+
6828
+ const PendingStatusContent = JSX(() => {
6829
+ const [leadForm] = useLocalStorage('leadForm');
6830
+ 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: [
6831
+ {
6832
+ label: 'Название продукта',
6833
+ description: 'Кредит на любые цели',
6834
+ },
6835
+ {
6836
+ label: 'Цель кредита',
6837
+ description: 'На любые цели',
6838
+ },
6839
+ {
6840
+ label: 'Сумма',
6841
+ description: leadForm?.moneyValue?.toLocaleString() + ' ₽',
6842
+ },
6843
+ {
6844
+ label: 'Срок кредита',
6845
+ description: leadForm?.monthsValue + ' мес',
6846
+ },
6847
+ {
6848
+ label: 'Тип платежа',
6849
+ description: leadForm?.isAnnuity ? 'Аннуитетный' : 'Дифференцированный',
6850
+ },
6851
+ ] }));
6852
+ });
6853
+
6854
+ const ReworkStatusContent = JSX(() => {
6855
+ const [leadForm] = useLocalStorage('leadForm');
6856
+ 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: [
6857
+ {
6858
+ label: 'Регион',
6859
+ description: leadForm?.regionRetail?.text,
6860
+ },
6861
+ {
6862
+ label: 'Адрес',
6863
+ description: leadForm?.addressRetail?.text,
6864
+ },
6865
+ ], sectionInfo: [
6866
+ {
6867
+ label: 'Основные документы:',
6868
+ description: '- Паспорт РФ',
6869
+ },
6870
+ ], buttonText: "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043D\u0430 \u0433\u043B\u0430\u0432\u043D\u0443\u044E" }));
6871
+ });
6872
+
6873
+ const SuccessStatusContent = JSX(() => {
6874
+ const [leadForm] = useLocalStorage('leadForm');
6875
+ 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: [
6876
+ {
6877
+ label: 'Название продукта',
6878
+ description: 'Кредит на любые цели',
6879
+ },
6880
+ {
6881
+ label: 'Ставка',
6882
+ description: '14,5%',
6883
+ },
6884
+ {
6885
+ label: 'Ежемесячный платеж',
6886
+ description: '86 052 ₽',
6887
+ },
6888
+ {
6889
+ label: 'Срок кредита',
6890
+ description: leadForm?.monthsValue + ' мес',
6891
+ },
6892
+ {
6893
+ label: 'Тип платежа',
6894
+ description: leadForm?.isAnnuity ? 'Аннуитетный' : 'Дифференцированный',
6895
+ },
6896
+ ], buttonText: "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043D\u0430 \u0433\u043B\u0430\u0432\u043D\u0443\u044E" }));
6897
+ });
6898
+
6899
+ const SIGNAL_TYPES = [
6900
+ 'CREATE_APPLICATION_SHORT_SIGNAL',
6901
+ 'CREATE_APPLICATION_LOAN_V3_SIGNAL',
6902
+ ];
6903
+ const CreditFormStatusTracker = JSX(() => {
6904
+ const [status, setStatus] = useState(STATUS_TYPE.process);
6905
+ const [taskId] = useLocalStorage('taskId');
6906
+ useEffect(() => {
6907
+ for (const signalType of SIGNAL_TYPES) {
6908
+ sendSignalToProcess({ signalType, taskId });
6909
+ }
6910
+ const trackStatus = () => taskId &&
6911
+ getTaskStatus({ taskId }).then((res) => {
6912
+ if (res.statusCd && res.statusCd !== STATUS_TYPE.process) {
6913
+ clearInterval(pullingInterval);
6914
+ setStatus(res.statusCd);
6915
+ }
6916
+ });
6917
+ const pullingInterval = setInterval(trackStatus, 30000);
6918
+ return () => clearInterval(pullingInterval);
6919
+ }, []);
6920
+ return renderStatus(status);
6921
+ });
6922
+ const renderStatus = (status) => {
6923
+ const statusesMap = {
6924
+ IN_PROCESS: jsx(PendingStatusContent, {}),
6925
+ FAILED: jsx(FailedStatusContent, {}),
6926
+ OK: jsx(SuccessStatusContent, {}),
6927
+ REWORK: jsx(ReworkStatusContent, {}),
6928
+ };
6929
+ return statusesMap[status] || null;
6930
+ };
6931
+
6932
+ const formStateMap = {
6933
+ 0: {
6934
+ moneyValue: 0,
6935
+ monthsValue: 0,
6936
+ isAnnuity: false,
6937
+ isInsurance: false,
6938
+ isSalaryClient: false,
6939
+ isPensionClient: false,
6940
+ isStateEmployee: false,
6941
+ },
6942
+ 1: {
6943
+ surname: '',
6944
+ name: '',
6945
+ middleName: '',
6946
+ sex: '',
6947
+ birthday: undefined,
6948
+ birthPlace: '',
6949
+ phone: '',
6950
+ email: '',
6951
+ dulSerie: undefined,
6952
+ dulNumber: undefined,
6953
+ dulIssueDateField: undefined,
6954
+ dulSubdivisionCode: '',
6955
+ dulIssuedBy: '',
6956
+ addressRegistration: {
6957
+ fullAddress: '',
6958
+ fiasCode: '',
6959
+ },
6960
+ participantDateRegistration: undefined,
6961
+ addressFact: {
6962
+ fullAddress: '',
6963
+ fiasCode: '',
6964
+ },
6965
+ housing: '',
6966
+ },
6967
+ 2: {
6968
+ amountWorkers: { key: '', text: '' },
6969
+ beginDate: undefined,
6970
+ employerActivities: { key: '', text: '' },
6971
+ employerOrganization: { key: '', text: '' },
6972
+ employment: { key: '', text: '' },
6973
+ experience5Years: '',
6974
+ inn: undefined,
6975
+ jobsNumber: '',
6976
+ lastJobExperience: '',
6977
+ legalForm: '',
6978
+ organization: { key: '', text: '' },
6979
+ organizationAddress: {
6980
+ fullAddress: '',
6981
+ fiasCode: '',
6982
+ },
6983
+ organizationName: '',
6984
+ organizationPhone: '',
6985
+ partInBusiness: undefined,
6986
+ positionOrganization: { key: '', text: '' },
6987
+ },
6988
+ 3: {
6989
+ familyStatus: { key: '', text: '' },
6990
+ dependents: undefined,
6991
+ familyMembers: undefined,
6992
+ confirmationIncome: { key: '', text: '' },
6993
+ mandatoryIncome: undefined,
6994
+ otherPayments: undefined,
6995
+ snils: '',
6996
+ armyIdFlg: false,
6997
+ },
6998
+ 4: {
6999
+ disablePeopleFlg: false,
7000
+ bankruptcyFlg: false,
7001
+ shareholderFlg: false,
7002
+ legalEntityName: '',
7003
+ creditInRshbCd: undefined,
7004
+ },
7005
+ 5: {
7006
+ regionRetail: '',
7007
+ addressRetail: '',
7008
+ bankEmployeeCode: '',
7009
+ },
7010
+ };
7011
+
7012
+ const getInitialFormState = (step, localStorageData) => {
7013
+ if (localStorageData) {
7014
+ // TODO: Fill in for other fields with type Date
7015
+ // TODO: Take it out to the helper
7016
+ localStorageData.birthday = localStorageData.birthday
7017
+ ? new Date(localStorageData.birthday)
7018
+ : undefined;
7019
+ localStorageData.dulIssueDateField = localStorageData.dulIssueDateField
7020
+ ? new Date(localStorageData.dulIssueDateField)
7021
+ : undefined;
7022
+ localStorageData.participantDateRegistration = localStorageData.participantDateRegistration
7023
+ ? new Date(localStorageData.participantDateRegistration)
7024
+ : undefined;
7025
+ localStorageData.beginDate = localStorageData?.beginDate
7026
+ ? new Date(localStorageData.beginDate)
7027
+ : undefined;
7028
+ }
7029
+ return {
7030
+ ...formStateMap[step],
7031
+ ...localStorageData,
7032
+ };
7033
+ };
7034
+
7035
+ const renderInfo$1 = (inputs = []) => {
7036
+ const infoInputs = inputs.filter((_) => _.fieldType === 'info');
7037
+ return infoInputs.length
7038
+ ? infoInputs.map(({ text, name }, i) => jsx(InfoCard, { __html: text }, `${name}_${i}`))
7039
+ : null;
7040
+ };
7041
+
7042
+ const renderInputs = ({ field, inputs }) => (inputs || [])?.map(getField(field, ''));
7043
+
7044
+ 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}`)));
7045
+
7046
+ const StepsNavigationButtons = JSX(({ step, onPrevStep }) => {
7047
+ const isFirstStep = step === 0;
7048
+ 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" })] }));
7049
+ });
7050
+
7051
+ const getFirstStepData = (formData) => {
7052
+ const { name, surname, middleName, birthday = '', phone = '', email, sex, birthPlace, dulIssueDateField = '', dulIssuedBy, dulNumber, dulSerie, dulSubdivisionCode, education, participantDateRegistration = '', housing, addressRegistration, addressFact, } = formData;
7053
+ return {
7054
+ birthDate: formatDate(birthday, true),
7055
+ midname: middleName,
7056
+ name,
7057
+ surname,
7058
+ birthPlace,
7059
+ dulIssueDate: formatDate(dulIssueDateField, true),
7060
+ dulIssuedBy,
7061
+ dulNumber,
7062
+ dulSerie,
7063
+ dulSubdivisionCode,
7064
+ educationLevelCd: education,
7065
+ registrationDate: formatDate(participantDateRegistration, true),
7066
+ houseTypeCd: housing,
7067
+ participantContacts: getParticipantContacts({
7068
+ phone: formatPhone(phone),
7069
+ email,
7070
+ }),
7071
+ participantAddresses: getParticipantAddresses({ addressRegistration, addressFact }),
7072
+ genderCd: sex
7073
+ ? {
7074
+ key: sex === 'male' ? 'MAN' : 'WOMAN',
7075
+ }
7076
+ : undefined,
7077
+ };
7078
+ };
7079
+
7080
+ const getFourthStepData = (formData) => {
7081
+ const { bankruptcyFlg, shareholderFlg, legalEntityName, creditInRshbCd } = formData;
7082
+ return {
7083
+ bankruptcyFlg,
7084
+ shareholderFlg,
7085
+ nameLegalEntity: legalEntityName,
7086
+ creditInRshbCd,
7087
+ };
7088
+ };
7089
+
7090
+ const getSecondStepData = (formData) => {
7091
+ const { employment, organizationName, inn, legalForm, organization, amountWorkers, employerActivities, employerOrganization, generalSeniority, lastJobExperience, experience5Years, jobsNumber, organizationPhone, organizationAddress, positionOrganization, } = formData;
7092
+ return {
7093
+ employmentTypeCd: employment,
7094
+ organizationName,
7095
+ organizationInn: inn,
7096
+ organizationActivityTypeCd: employerActivities,
7097
+ organizationTypeCd: organization,
7098
+ organizationKindCd: employerOrganization,
7099
+ employeesNumberCd: amountWorkers,
7100
+ opf: legalForm,
7101
+ seniority: generalSeniority,
7102
+ generalSeniority: experience5Years,
7103
+ jobsNumber,
7104
+ lastWorkDuration: lastJobExperience,
7105
+ positionCd: positionOrganization,
7106
+ participantContacts: getParticipantContacts({
7107
+ organizationPhone: organizationPhone && formatPhone(organizationPhone),
7108
+ }),
7109
+ participantAddresses: getParticipantAddresses({ organizationAddress }),
7110
+ };
7111
+ };
7112
+
7113
+ const getThirdStepData = (formData) => {
7114
+ const { familyStatus, dependents, familyMembers, confirmationIncome, mandatoryIncome, otherPayments, snils, armyIdFlg, } = formData;
7115
+ return {
7116
+ maritalStatusCd: familyStatus,
7117
+ totalDependents: familyMembers,
7118
+ incomeCertificateCd: confirmationIncome,
7119
+ otherDependents: dependents,
7120
+ participantIncomes: getParticipantIncomes({
7121
+ mandatoryIncome,
7122
+ otherPayments,
7123
+ }),
7124
+ snils: snils?.replaceAll(' ', ''),
7125
+ armyIdFlg,
7126
+ };
7127
+ };
7128
+
7129
+ const getCreditFormTaskData = ({ participantId, taskId, profileId, formData, step = 0, }) => ({
7130
+ sendToBank: true,
7131
+ taskKind: 'UNITED',
7132
+ task: {
7133
+ taskSource: globalThis.location.origin,
7134
+ id: taskId,
7135
+ //TODO: Добавить id офиса
7136
+ authorizedAgentId: formData?.bankEmployeeCode,
7137
+ participants: [
7138
+ {
7139
+ id: participantId,
7140
+ profile: {
7141
+ id: profileId,
7142
+ },
7143
+ roleCd: {
7144
+ key: 'BORROWER',
7145
+ value: 'Заемщик',
7146
+ },
7147
+ ...getCurrentStepData(step, formData),
7148
+ },
7149
+ ],
7150
+ esiaAccountTypeCd: {
7151
+ key: formData?.esiaAccountTypeCd?.key,
7152
+ },
7153
+ },
7154
+ });
7155
+ const getCurrentStepData = (step, formData) => {
7156
+ switch (step) {
7157
+ case 1:
7158
+ return getFirstStepData(formData);
7159
+ case 2:
7160
+ return getSecondStepData(formData);
7161
+ case 3:
7162
+ return getThirdStepData(formData);
7163
+ case 4:
7164
+ return getFourthStepData(formData);
7165
+ default:
7166
+ return {};
6329
7167
  }
6330
7168
  };
6331
7169
 
@@ -6678,6 +7516,7 @@
6678
7516
  ];
6679
7517
  const CreditForm = JSX(({ className, ...rest }) => {
6680
7518
  const [step, setStep] = useState(0);
7519
+ useEffect(updateRefreshToken, []);
6681
7520
  const handleNextStep = useCallback(() => {
6682
7521
  setStep((_) => Math.min(_ + 1, WIZARD_STEPS));
6683
7522
  }, []);
@@ -8752,6 +9591,7 @@
8752
9591
  CarouselRecommendationCard,
8753
9592
  CarouselTariffsCard,
8754
9593
  ContactsBlock,
9594
+ CreditCardForm,
8755
9595
  CreditForm,
8756
9596
  DepositFiltration,
8757
9597
  Depository,
@@ -8959,7 +9799,7 @@
8959
9799
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
8960
9800
  });
8961
9801
 
8962
- const packageVersion = "0.14.650";
9802
+ const packageVersion = "0.14.652";
8963
9803
 
8964
9804
  exports.Blocks = Blocks;
8965
9805
  exports.ContentPage = ContentPage;