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

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 (605) hide show
  1. package/bundle/api/RetailAPI/getTaskStatus.d.ts +1 -1
  2. package/bundle/api/RetailAPI/updateUserTask.d.ts +4 -0
  3. package/bundle/blocks.schema.json +1 -1
  4. package/bundle/bundle.umd.js +928 -119
  5. package/bundle/bundle.umd.min.js +1 -1
  6. package/bundle/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +0 -9
  7. package/bundle/components/ApplicationLeadForm/getInitialFormState.d.ts +7 -0
  8. package/bundle/components/CreditCardForm/CreditCardForm.d.ts +6 -0
  9. package/bundle/components/CreditCardForm/CreditCardFormContent.d.ts +22 -0
  10. package/bundle/components/CreditCardForm/CreditCardFormProgress.d.ts +6 -0
  11. package/bundle/components/CreditCardForm/CreditCardFormStatus.d.ts +16 -0
  12. package/bundle/components/CreditCardForm/CreditCardFormStatusTracker.d.ts +2 -0
  13. package/bundle/components/CreditCardForm/CreditCardFormStep.d.ts +12 -0
  14. package/bundle/components/CreditCardForm/FailedStatusContent.d.ts +2 -0
  15. package/bundle/components/CreditCardForm/PendingStatusContent.d.ts +2 -0
  16. package/bundle/components/CreditCardForm/ReworkStatusContent.d.ts +2 -0
  17. package/bundle/components/CreditCardForm/StepsNavigationButtons.d.ts +5 -0
  18. package/bundle/components/CreditCardForm/SuccessStatusContent.d.ts +2 -0
  19. package/bundle/components/CreditCardForm/creditCardFormStepsData.d.ts +2 -0
  20. package/bundle/components/CreditCardForm/formStateMap.d.ts +74 -0
  21. package/bundle/components/CreditCardForm/getCreditCardFormTaskData.d.ts +11 -0
  22. package/bundle/components/CreditCardForm/getFifthStepData.d.ts +3 -0
  23. package/bundle/components/CreditCardForm/getFirstStepData.d.ts +3 -0
  24. package/bundle/components/CreditCardForm/getFourthStepData.d.ts +3 -0
  25. package/bundle/components/CreditCardForm/getInitialFormState.d.ts +2 -0
  26. package/bundle/components/CreditCardForm/getSecondStepData.d.ts +3 -0
  27. package/bundle/components/CreditCardForm/getThirdStepData.d.ts +3 -0
  28. package/bundle/components/CreditCardForm/renderInfo.d.ts +3 -0
  29. package/bundle/components/CreditCardForm/renderInputs.d.ts +3 -0
  30. package/bundle/components/CreditCardForm/renderStep.d.ts +13 -0
  31. package/bundle/components/CreditCardForm/useCreditCardFormAPI.d.ts +13 -0
  32. package/bundle/components/CreditForm/CreditFormStep.d.ts +1 -1
  33. package/bundle/components/CreditForm/creditFormStepsData.d.ts +1 -1
  34. package/bundle/model/InputSectionsType.d.ts +9 -1
  35. package/bundle/ui-kit/FormField/Fields/DeliveryDateFiels.d.ts +2 -0
  36. package/bundle/ui-kit/FormField/Fields/MethodObtainField.d.ts +4 -0
  37. package/bundle/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  38. package/dist/api/RetailAPI/getTaskStatus.d.ts +1 -1
  39. package/dist/api/RetailAPI/getTaskStatus.js.map +1 -1
  40. package/dist/api/RetailAPI/updateUserTask.d.ts +4 -0
  41. package/dist/api/RetailAPI/updateUserTask.js.map +1 -1
  42. package/dist/api/dadataHints/hintsListsOptions.js +1 -0
  43. package/dist/api/dadataHints/hintsListsOptions.js.map +1 -1
  44. package/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +0 -9
  45. package/dist/components/ApplicationLeadForm/getInitialFormState.d.ts +7 -0
  46. package/dist/components/ApplicationLeadForm/getInitialFormState.js +4 -0
  47. package/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  48. package/dist/components/Blocks.js +2 -0
  49. package/dist/components/Blocks.js.map +1 -1
  50. package/dist/components/Blocks.mobile.js +2 -0
  51. package/dist/components/Blocks.mobile.js.map +1 -1
  52. package/dist/components/CreditCardForm/CreditCardForm.d.ts +6 -0
  53. package/dist/components/CreditCardForm/CreditCardForm.js +34 -0
  54. package/dist/components/CreditCardForm/CreditCardForm.js.map +1 -0
  55. package/dist/components/CreditCardForm/CreditCardFormContent.d.ts +22 -0
  56. package/dist/components/CreditCardForm/CreditCardFormContent.js +2 -0
  57. package/dist/components/CreditCardForm/CreditCardFormContent.js.map +1 -0
  58. package/dist/components/CreditCardForm/CreditCardFormProgress.d.ts +6 -0
  59. package/dist/components/CreditCardForm/CreditCardFormProgress.js +11 -0
  60. package/dist/components/CreditCardForm/CreditCardFormProgress.js.map +1 -0
  61. package/dist/components/CreditCardForm/CreditCardFormStatus.d.ts +16 -0
  62. package/dist/components/CreditCardForm/CreditCardFormStatus.js +25 -0
  63. package/dist/components/CreditCardForm/CreditCardFormStatus.js.map +1 -0
  64. package/dist/components/CreditCardForm/CreditCardFormStatusTracker.d.ts +2 -0
  65. package/dist/components/CreditCardForm/CreditCardFormStatusTracker.js +43 -0
  66. package/dist/components/CreditCardForm/CreditCardFormStatusTracker.js.map +1 -0
  67. package/dist/components/CreditCardForm/CreditCardFormStep.d.ts +12 -0
  68. package/dist/components/CreditCardForm/CreditCardFormStep.js +41 -0
  69. package/dist/components/CreditCardForm/CreditCardFormStep.js.map +1 -0
  70. package/dist/components/CreditCardForm/FailedStatusContent.d.ts +2 -0
  71. package/dist/components/CreditCardForm/FailedStatusContent.js +7 -0
  72. package/dist/components/CreditCardForm/FailedStatusContent.js.map +1 -0
  73. package/dist/components/CreditCardForm/PendingStatusContent.d.ts +2 -0
  74. package/dist/components/CreditCardForm/PendingStatusContent.js +32 -0
  75. package/dist/components/CreditCardForm/PendingStatusContent.js.map +1 -0
  76. package/dist/components/CreditCardForm/ReworkStatusContent.d.ts +2 -0
  77. package/dist/components/CreditCardForm/ReworkStatusContent.js +25 -0
  78. package/dist/components/CreditCardForm/ReworkStatusContent.js.map +1 -0
  79. package/dist/components/CreditCardForm/StepsNavigationButtons.d.ts +5 -0
  80. package/dist/components/CreditCardForm/StepsNavigationButtons.js +11 -0
  81. package/dist/components/CreditCardForm/StepsNavigationButtons.js.map +1 -0
  82. package/dist/components/CreditCardForm/SuccessStatusContent.d.ts +2 -0
  83. package/dist/components/CreditCardForm/SuccessStatusContent.js +32 -0
  84. package/dist/components/CreditCardForm/SuccessStatusContent.js.map +1 -0
  85. package/dist/components/CreditCardForm/creditCardFormStepsData.d.ts +2 -0
  86. package/dist/components/CreditCardForm/creditCardFormStepsData.js +310 -0
  87. package/dist/components/CreditCardForm/creditCardFormStepsData.js.map +1 -0
  88. package/dist/components/CreditCardForm/formStateMap.d.ts +74 -0
  89. package/dist/components/CreditCardForm/formStateMap.js +93 -0
  90. package/dist/components/CreditCardForm/formStateMap.js.map +1 -0
  91. package/dist/components/CreditCardForm/getCreditCardFormTaskData.d.ts +11 -0
  92. package/dist/components/CreditCardForm/getCreditCardFormTaskData.js +54 -0
  93. package/dist/components/CreditCardForm/getCreditCardFormTaskData.js.map +1 -0
  94. package/dist/components/CreditCardForm/getFifthStepData.d.ts +3 -0
  95. package/dist/components/CreditCardForm/getFifthStepData.js +13 -0
  96. package/dist/components/CreditCardForm/getFifthStepData.js.map +1 -0
  97. package/dist/components/CreditCardForm/getFirstStepData.d.ts +3 -0
  98. package/dist/components/CreditCardForm/getFirstStepData.js +13 -0
  99. package/dist/components/CreditCardForm/getFirstStepData.js.map +1 -0
  100. package/dist/components/CreditCardForm/getFourthStepData.d.ts +3 -0
  101. package/dist/components/CreditCardForm/getFourthStepData.js +19 -0
  102. package/dist/components/CreditCardForm/getFourthStepData.js.map +1 -0
  103. package/dist/components/CreditCardForm/getInitialFormState.d.ts +2 -0
  104. package/dist/components/CreditCardForm/getInitialFormState.js +27 -0
  105. package/dist/components/CreditCardForm/getInitialFormState.js.map +1 -0
  106. package/dist/components/CreditCardForm/getSecondStepData.d.ts +3 -0
  107. package/dist/components/CreditCardForm/getSecondStepData.js +35 -0
  108. package/dist/components/CreditCardForm/getSecondStepData.js.map +1 -0
  109. package/dist/components/CreditCardForm/getThirdStepData.d.ts +3 -0
  110. package/dist/components/CreditCardForm/getThirdStepData.js +28 -0
  111. package/dist/components/CreditCardForm/getThirdStepData.js.map +1 -0
  112. package/dist/components/CreditCardForm/renderInfo.d.ts +3 -0
  113. package/dist/components/CreditCardForm/renderInfo.js +12 -0
  114. package/dist/components/CreditCardForm/renderInfo.js.map +1 -0
  115. package/dist/components/CreditCardForm/renderInputs.d.ts +3 -0
  116. package/dist/components/CreditCardForm/renderInputs.js +6 -0
  117. package/dist/components/CreditCardForm/renderInputs.js.map +1 -0
  118. package/dist/components/CreditCardForm/renderStep.d.ts +13 -0
  119. package/dist/components/CreditCardForm/renderStep.js +19 -0
  120. package/dist/components/CreditCardForm/renderStep.js.map +1 -0
  121. package/dist/components/CreditCardForm/useCreditCardFormAPI.d.ts +13 -0
  122. package/dist/components/CreditCardForm/useCreditCardFormAPI.js +46 -0
  123. package/dist/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -0
  124. package/dist/components/CreditForm/CreditForm.js.map +1 -1
  125. package/dist/components/CreditForm/CreditFormStatusTracker.js +1 -2
  126. package/dist/components/CreditForm/CreditFormStatusTracker.js.map +1 -1
  127. package/dist/components/CreditForm/CreditFormStep.d.ts +1 -1
  128. package/dist/components/CreditForm/FailedStatusContent.js +1 -1
  129. package/dist/components/CreditForm/FailedStatusContent.js.map +1 -1
  130. package/dist/components/CreditForm/creditFormStepsData.d.ts +1 -1
  131. package/dist/components/CreditForm/getCreditFormTaskData.js +1 -1
  132. package/dist/components/CreditForm/getCreditFormTaskData.js.map +1 -1
  133. package/dist/model/InputSectionsType.d.ts +9 -1
  134. package/dist/ui-kit/FormField/Fields/CurrencyField.js +6 -5
  135. package/dist/ui-kit/FormField/Fields/CurrencyField.js.map +1 -1
  136. package/dist/ui-kit/FormField/Fields/DeliveryDateFiels.d.ts +2 -0
  137. package/dist/ui-kit/FormField/Fields/DeliveryDateFiels.js +9 -0
  138. package/dist/ui-kit/FormField/Fields/DeliveryDateFiels.js.map +1 -0
  139. package/dist/ui-kit/FormField/Fields/MethodObtainField.d.ts +4 -0
  140. package/dist/ui-kit/FormField/Fields/MethodObtainField.js +13 -0
  141. package/dist/ui-kit/FormField/Fields/MethodObtainField.js.map +1 -0
  142. package/dist/ui-kit/FormField/Fields/PaymentSystemField.js +6 -5
  143. package/dist/ui-kit/FormField/Fields/PaymentSystemField.js.map +1 -1
  144. package/dist/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  145. package/dist/ui-kit/FormField/getField.js +5 -0
  146. package/dist/ui-kit/FormField/getField.js.map +1 -1
  147. package/dist/ui-kit/FormField/getObjectValidator.js +6 -1
  148. package/dist/ui-kit/FormField/getObjectValidator.js.map +1 -1
  149. package/lib/api/RetailAPI/getTaskStatus.d.ts +1 -1
  150. package/lib/api/RetailAPI/getTaskStatus.js.map +1 -1
  151. package/lib/api/RetailAPI/updateUserTask.d.ts +4 -0
  152. package/lib/api/RetailAPI/updateUserTask.js.map +1 -1
  153. package/lib/api/dadataHints/hintsListsOptions.js +1 -0
  154. package/lib/api/dadataHints/hintsListsOptions.js.map +1 -1
  155. package/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +0 -9
  156. package/lib/components/ApplicationLeadForm/getInitialFormState.d.ts +7 -0
  157. package/lib/components/ApplicationLeadForm/getInitialFormState.js +4 -0
  158. package/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  159. package/lib/components/Blocks.js +2 -0
  160. package/lib/components/Blocks.js.map +1 -1
  161. package/lib/components/Blocks.mobile.js +2 -0
  162. package/lib/components/Blocks.mobile.js.map +1 -1
  163. package/lib/components/CreditCardForm/CreditCardForm.d.ts +6 -0
  164. package/lib/components/CreditCardForm/CreditCardForm.fixture.d.ts +6 -0
  165. package/lib/components/CreditCardForm/CreditCardForm.js +32 -0
  166. package/lib/components/CreditCardForm/CreditCardForm.js.map +1 -0
  167. package/lib/components/CreditCardForm/CreditCardFormContent.d.ts +22 -0
  168. package/lib/components/CreditCardForm/CreditCardFormContent.js +2 -0
  169. package/lib/components/CreditCardForm/CreditCardFormContent.js.map +1 -0
  170. package/lib/components/CreditCardForm/CreditCardFormProgress.d.ts +6 -0
  171. package/lib/components/CreditCardForm/CreditCardFormProgress.js +9 -0
  172. package/lib/components/CreditCardForm/CreditCardFormProgress.js.map +1 -0
  173. package/lib/components/CreditCardForm/CreditCardFormStatus.d.ts +16 -0
  174. package/lib/components/CreditCardForm/CreditCardFormStatus.js +23 -0
  175. package/lib/components/CreditCardForm/CreditCardFormStatus.js.map +1 -0
  176. package/lib/components/CreditCardForm/CreditCardFormStatusTracker.d.ts +2 -0
  177. package/lib/components/CreditCardForm/CreditCardFormStatusTracker.js +41 -0
  178. package/lib/components/CreditCardForm/CreditCardFormStatusTracker.js.map +1 -0
  179. package/lib/components/CreditCardForm/CreditCardFormStep.d.ts +12 -0
  180. package/lib/components/CreditCardForm/CreditCardFormStep.js +39 -0
  181. package/lib/components/CreditCardForm/CreditCardFormStep.js.map +1 -0
  182. package/lib/components/CreditCardForm/FailedStatusContent.d.ts +2 -0
  183. package/lib/components/CreditCardForm/FailedStatusContent.js +5 -0
  184. package/lib/components/CreditCardForm/FailedStatusContent.js.map +1 -0
  185. package/lib/components/CreditCardForm/PendingStatusContent.d.ts +2 -0
  186. package/lib/components/CreditCardForm/PendingStatusContent.js +30 -0
  187. package/lib/components/CreditCardForm/PendingStatusContent.js.map +1 -0
  188. package/lib/components/CreditCardForm/ReworkStatusContent.d.ts +2 -0
  189. package/lib/components/CreditCardForm/ReworkStatusContent.js +23 -0
  190. package/lib/components/CreditCardForm/ReworkStatusContent.js.map +1 -0
  191. package/lib/components/CreditCardForm/StepsNavigationButtons.d.ts +5 -0
  192. package/lib/components/CreditCardForm/StepsNavigationButtons.js +9 -0
  193. package/lib/components/CreditCardForm/StepsNavigationButtons.js.map +1 -0
  194. package/lib/components/CreditCardForm/SuccessStatusContent.d.ts +2 -0
  195. package/lib/components/CreditCardForm/SuccessStatusContent.js +30 -0
  196. package/lib/components/CreditCardForm/SuccessStatusContent.js.map +1 -0
  197. package/lib/components/CreditCardForm/creditCardFormStepsData.d.ts +2 -0
  198. package/lib/components/CreditCardForm/creditCardFormStepsData.js +308 -0
  199. package/lib/components/CreditCardForm/creditCardFormStepsData.js.map +1 -0
  200. package/lib/components/CreditCardForm/formStateMap.d.ts +74 -0
  201. package/lib/components/CreditCardForm/formStateMap.js +91 -0
  202. package/lib/components/CreditCardForm/formStateMap.js.map +1 -0
  203. package/lib/components/CreditCardForm/getCreditCardFormTaskData.d.ts +11 -0
  204. package/lib/components/CreditCardForm/getCreditCardFormTaskData.js +51 -0
  205. package/lib/components/CreditCardForm/getCreditCardFormTaskData.js.map +1 -0
  206. package/lib/components/CreditCardForm/getFifthStepData.d.ts +3 -0
  207. package/lib/components/CreditCardForm/getFifthStepData.js +10 -0
  208. package/lib/components/CreditCardForm/getFifthStepData.js.map +1 -0
  209. package/lib/components/CreditCardForm/getFirstStepData.d.ts +3 -0
  210. package/lib/components/CreditCardForm/getFirstStepData.js +10 -0
  211. package/lib/components/CreditCardForm/getFirstStepData.js.map +1 -0
  212. package/lib/components/CreditCardForm/getFourthStepData.d.ts +3 -0
  213. package/lib/components/CreditCardForm/getFourthStepData.js +16 -0
  214. package/lib/components/CreditCardForm/getFourthStepData.js.map +1 -0
  215. package/lib/components/CreditCardForm/getInitialFormState.d.ts +2 -0
  216. package/lib/components/CreditCardForm/getInitialFormState.js +24 -0
  217. package/lib/components/CreditCardForm/getInitialFormState.js.map +1 -0
  218. package/lib/components/CreditCardForm/getSecondStepData.d.ts +3 -0
  219. package/lib/components/CreditCardForm/getSecondStepData.js +32 -0
  220. package/lib/components/CreditCardForm/getSecondStepData.js.map +1 -0
  221. package/lib/components/CreditCardForm/getThirdStepData.d.ts +3 -0
  222. package/lib/components/CreditCardForm/getThirdStepData.js +25 -0
  223. package/lib/components/CreditCardForm/getThirdStepData.js.map +1 -0
  224. package/lib/components/CreditCardForm/renderInfo.d.ts +2 -0
  225. package/lib/components/CreditCardForm/renderInfo.js +9 -0
  226. package/lib/components/CreditCardForm/renderInfo.js.map +1 -0
  227. package/lib/components/CreditCardForm/renderInputs.d.ts +2 -0
  228. package/lib/components/CreditCardForm/renderInputs.js +3 -0
  229. package/lib/components/CreditCardForm/renderInputs.js.map +1 -0
  230. package/lib/components/CreditCardForm/renderStep.d.ts +12 -0
  231. package/lib/components/CreditCardForm/renderStep.js +16 -0
  232. package/lib/components/CreditCardForm/renderStep.js.map +1 -0
  233. package/lib/components/CreditCardForm/useCreditCardFormAPI.d.ts +13 -0
  234. package/lib/components/CreditCardForm/useCreditCardFormAPI.js +43 -0
  235. package/lib/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -0
  236. package/lib/components/CreditForm/CreditForm.js.map +1 -1
  237. package/lib/components/CreditForm/CreditFormStatusTracker.js +1 -2
  238. package/lib/components/CreditForm/CreditFormStatusTracker.js.map +1 -1
  239. package/lib/components/CreditForm/CreditFormStep.d.ts +1 -1
  240. package/lib/components/CreditForm/FailedStatusContent.js +1 -1
  241. package/lib/components/CreditForm/FailedStatusContent.js.map +1 -1
  242. package/lib/components/CreditForm/creditFormStepsData.d.ts +1 -1
  243. package/lib/components/CreditForm/getCreditFormTaskData.js +1 -1
  244. package/lib/components/CreditForm/getCreditFormTaskData.js.map +1 -1
  245. package/lib/model/InputSectionsType.d.ts +9 -1
  246. package/lib/ui-kit/FormField/Fields/CurrencyField.js +7 -6
  247. package/lib/ui-kit/FormField/Fields/CurrencyField.js.map +1 -1
  248. package/lib/ui-kit/FormField/Fields/DeliveryDateFiels.d.ts +2 -0
  249. package/lib/ui-kit/FormField/Fields/DeliveryDateFiels.js +7 -0
  250. package/lib/ui-kit/FormField/Fields/DeliveryDateFiels.js.map +1 -0
  251. package/lib/ui-kit/FormField/Fields/MethodObtainField.d.ts +4 -0
  252. package/lib/ui-kit/FormField/Fields/MethodObtainField.js +11 -0
  253. package/lib/ui-kit/FormField/Fields/MethodObtainField.js.map +1 -0
  254. package/lib/ui-kit/FormField/Fields/PaymentSystemField.js +7 -6
  255. package/lib/ui-kit/FormField/Fields/PaymentSystemField.js.map +1 -1
  256. package/lib/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  257. package/lib/ui-kit/FormField/getField.js +5 -0
  258. package/lib/ui-kit/FormField/getField.js.map +1 -1
  259. package/lib/ui-kit/FormField/getObjectValidator.js +6 -1
  260. package/lib/ui-kit/FormField/getObjectValidator.js.map +1 -1
  261. package/mobile/bundle/api/RetailAPI/getTaskStatus.d.ts +1 -1
  262. package/mobile/bundle/api/RetailAPI/updateUserTask.d.ts +4 -0
  263. package/mobile/bundle/bundle.umd.js +924 -115
  264. package/mobile/bundle/bundle.umd.min.js +1 -1
  265. package/mobile/bundle/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +0 -9
  266. package/mobile/bundle/components/ApplicationLeadForm/getInitialFormState.d.ts +7 -0
  267. package/mobile/bundle/components/CreditCardForm/CreditCardForm.d.ts +6 -0
  268. package/mobile/bundle/components/CreditCardForm/CreditCardFormContent.d.ts +22 -0
  269. package/mobile/bundle/components/CreditCardForm/CreditCardFormProgress.d.ts +6 -0
  270. package/mobile/bundle/components/CreditCardForm/CreditCardFormStatus.d.ts +16 -0
  271. package/mobile/bundle/components/CreditCardForm/CreditCardFormStatusTracker.d.ts +2 -0
  272. package/mobile/bundle/components/CreditCardForm/CreditCardFormStep.d.ts +12 -0
  273. package/mobile/bundle/components/CreditCardForm/FailedStatusContent.d.ts +2 -0
  274. package/mobile/bundle/components/CreditCardForm/PendingStatusContent.d.ts +2 -0
  275. package/mobile/bundle/components/CreditCardForm/ReworkStatusContent.d.ts +2 -0
  276. package/mobile/bundle/components/CreditCardForm/StepsNavigationButtons.d.ts +5 -0
  277. package/mobile/bundle/components/CreditCardForm/SuccessStatusContent.d.ts +2 -0
  278. package/mobile/bundle/components/CreditCardForm/creditCardFormStepsData.d.ts +2 -0
  279. package/mobile/bundle/components/CreditCardForm/formStateMap.d.ts +74 -0
  280. package/mobile/bundle/components/CreditCardForm/getCreditCardFormTaskData.d.ts +11 -0
  281. package/mobile/bundle/components/CreditCardForm/getFifthStepData.d.ts +3 -0
  282. package/mobile/bundle/components/CreditCardForm/getFirstStepData.d.ts +3 -0
  283. package/mobile/bundle/components/CreditCardForm/getFourthStepData.d.ts +3 -0
  284. package/mobile/bundle/components/CreditCardForm/getInitialFormState.d.ts +2 -0
  285. package/mobile/bundle/components/CreditCardForm/getSecondStepData.d.ts +3 -0
  286. package/mobile/bundle/components/CreditCardForm/getThirdStepData.d.ts +3 -0
  287. package/mobile/bundle/components/CreditCardForm/renderInfo.d.ts +3 -0
  288. package/mobile/bundle/components/CreditCardForm/renderInputs.d.ts +3 -0
  289. package/mobile/bundle/components/CreditCardForm/renderStep.d.ts +13 -0
  290. package/mobile/bundle/components/CreditCardForm/useCreditCardFormAPI.d.ts +13 -0
  291. package/mobile/bundle/components/CreditForm/CreditFormStep.d.ts +1 -1
  292. package/mobile/bundle/components/CreditForm/creditFormStepsData.d.ts +1 -1
  293. package/mobile/bundle/model/InputSectionsType.d.ts +9 -1
  294. package/mobile/bundle/ui-kit/FormField/Fields/DeliveryDateFiels.d.ts +2 -0
  295. package/mobile/bundle/ui-kit/FormField/Fields/MethodObtainField.d.ts +4 -0
  296. package/mobile/bundle/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  297. package/mobile/dist/api/RetailAPI/getTaskStatus.d.ts +1 -1
  298. package/mobile/dist/api/RetailAPI/getTaskStatus.js.map +1 -1
  299. package/mobile/dist/api/RetailAPI/updateUserTask.d.ts +4 -0
  300. package/mobile/dist/api/RetailAPI/updateUserTask.js.map +1 -1
  301. package/mobile/dist/api/dadataHints/hintsListsOptions.js +1 -0
  302. package/mobile/dist/api/dadataHints/hintsListsOptions.js.map +1 -1
  303. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +0 -9
  304. package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.d.ts +7 -0
  305. package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.js +4 -0
  306. package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  307. package/mobile/dist/components/Blocks.js +2 -0
  308. package/mobile/dist/components/Blocks.js.map +1 -1
  309. package/mobile/dist/components/CreditCardForm/CreditCardForm.d.ts +6 -0
  310. package/mobile/dist/components/CreditCardForm/CreditCardForm.js +34 -0
  311. package/mobile/dist/components/CreditCardForm/CreditCardForm.js.map +1 -0
  312. package/mobile/dist/components/CreditCardForm/CreditCardFormContent.d.ts +22 -0
  313. package/mobile/dist/components/CreditCardForm/CreditCardFormContent.js +2 -0
  314. package/mobile/dist/components/CreditCardForm/CreditCardFormContent.js.map +1 -0
  315. package/mobile/dist/components/CreditCardForm/CreditCardFormProgress.d.ts +6 -0
  316. package/mobile/dist/components/CreditCardForm/CreditCardFormProgress.js +11 -0
  317. package/mobile/dist/components/CreditCardForm/CreditCardFormProgress.js.map +1 -0
  318. package/mobile/dist/components/CreditCardForm/CreditCardFormStatus.d.ts +16 -0
  319. package/mobile/dist/components/CreditCardForm/CreditCardFormStatus.js +25 -0
  320. package/mobile/dist/components/CreditCardForm/CreditCardFormStatus.js.map +1 -0
  321. package/mobile/dist/components/CreditCardForm/CreditCardFormStatusTracker.d.ts +2 -0
  322. package/mobile/dist/components/CreditCardForm/CreditCardFormStatusTracker.js +43 -0
  323. package/mobile/dist/components/CreditCardForm/CreditCardFormStatusTracker.js.map +1 -0
  324. package/mobile/dist/components/CreditCardForm/CreditCardFormStep.d.ts +12 -0
  325. package/mobile/dist/components/CreditCardForm/CreditCardFormStep.js +41 -0
  326. package/mobile/dist/components/CreditCardForm/CreditCardFormStep.js.map +1 -0
  327. package/mobile/dist/components/CreditCardForm/FailedStatusContent.d.ts +2 -0
  328. package/mobile/dist/components/CreditCardForm/FailedStatusContent.js +7 -0
  329. package/mobile/dist/components/CreditCardForm/FailedStatusContent.js.map +1 -0
  330. package/mobile/dist/components/CreditCardForm/PendingStatusContent.d.ts +2 -0
  331. package/mobile/dist/components/CreditCardForm/PendingStatusContent.js +32 -0
  332. package/mobile/dist/components/CreditCardForm/PendingStatusContent.js.map +1 -0
  333. package/mobile/dist/components/CreditCardForm/ReworkStatusContent.d.ts +2 -0
  334. package/mobile/dist/components/CreditCardForm/ReworkStatusContent.js +25 -0
  335. package/mobile/dist/components/CreditCardForm/ReworkStatusContent.js.map +1 -0
  336. package/mobile/dist/components/CreditCardForm/StepsNavigationButtons.d.ts +5 -0
  337. package/mobile/dist/components/CreditCardForm/StepsNavigationButtons.js +11 -0
  338. package/mobile/dist/components/CreditCardForm/StepsNavigationButtons.js.map +1 -0
  339. package/mobile/dist/components/CreditCardForm/SuccessStatusContent.d.ts +2 -0
  340. package/mobile/dist/components/CreditCardForm/SuccessStatusContent.js +32 -0
  341. package/mobile/dist/components/CreditCardForm/SuccessStatusContent.js.map +1 -0
  342. package/mobile/dist/components/CreditCardForm/creditCardFormStepsData.d.ts +2 -0
  343. package/mobile/dist/components/CreditCardForm/creditCardFormStepsData.js +310 -0
  344. package/mobile/dist/components/CreditCardForm/creditCardFormStepsData.js.map +1 -0
  345. package/mobile/dist/components/CreditCardForm/formStateMap.d.ts +74 -0
  346. package/mobile/dist/components/CreditCardForm/formStateMap.js +93 -0
  347. package/mobile/dist/components/CreditCardForm/formStateMap.js.map +1 -0
  348. package/mobile/dist/components/CreditCardForm/getCreditCardFormTaskData.d.ts +11 -0
  349. package/mobile/dist/components/CreditCardForm/getCreditCardFormTaskData.js +54 -0
  350. package/mobile/dist/components/CreditCardForm/getCreditCardFormTaskData.js.map +1 -0
  351. package/mobile/dist/components/CreditCardForm/getFifthStepData.d.ts +3 -0
  352. package/mobile/dist/components/CreditCardForm/getFifthStepData.js +13 -0
  353. package/mobile/dist/components/CreditCardForm/getFifthStepData.js.map +1 -0
  354. package/mobile/dist/components/CreditCardForm/getFirstStepData.d.ts +3 -0
  355. package/mobile/dist/components/CreditCardForm/getFirstStepData.js +13 -0
  356. package/mobile/dist/components/CreditCardForm/getFirstStepData.js.map +1 -0
  357. package/mobile/dist/components/CreditCardForm/getFourthStepData.d.ts +3 -0
  358. package/mobile/dist/components/CreditCardForm/getFourthStepData.js +19 -0
  359. package/mobile/dist/components/CreditCardForm/getFourthStepData.js.map +1 -0
  360. package/mobile/dist/components/CreditCardForm/getInitialFormState.d.ts +2 -0
  361. package/mobile/dist/components/CreditCardForm/getInitialFormState.js +27 -0
  362. package/mobile/dist/components/CreditCardForm/getInitialFormState.js.map +1 -0
  363. package/mobile/dist/components/CreditCardForm/getSecondStepData.d.ts +3 -0
  364. package/mobile/dist/components/CreditCardForm/getSecondStepData.js +35 -0
  365. package/mobile/dist/components/CreditCardForm/getSecondStepData.js.map +1 -0
  366. package/mobile/dist/components/CreditCardForm/getThirdStepData.d.ts +3 -0
  367. package/mobile/dist/components/CreditCardForm/getThirdStepData.js +28 -0
  368. package/mobile/dist/components/CreditCardForm/getThirdStepData.js.map +1 -0
  369. package/mobile/dist/components/CreditCardForm/renderInfo.d.ts +3 -0
  370. package/mobile/dist/components/CreditCardForm/renderInfo.js +12 -0
  371. package/mobile/dist/components/CreditCardForm/renderInfo.js.map +1 -0
  372. package/mobile/dist/components/CreditCardForm/renderInputs.d.ts +3 -0
  373. package/mobile/dist/components/CreditCardForm/renderInputs.js +6 -0
  374. package/mobile/dist/components/CreditCardForm/renderInputs.js.map +1 -0
  375. package/mobile/dist/components/CreditCardForm/renderStep.d.ts +13 -0
  376. package/mobile/dist/components/CreditCardForm/renderStep.js +19 -0
  377. package/mobile/dist/components/CreditCardForm/renderStep.js.map +1 -0
  378. package/mobile/dist/components/CreditCardForm/useCreditCardFormAPI.d.ts +13 -0
  379. package/mobile/dist/components/CreditCardForm/useCreditCardFormAPI.js +46 -0
  380. package/mobile/dist/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -0
  381. package/mobile/dist/components/CreditForm/CreditForm.js.map +1 -1
  382. package/mobile/dist/components/CreditForm/CreditFormStatusTracker.js +1 -2
  383. package/mobile/dist/components/CreditForm/CreditFormStatusTracker.js.map +1 -1
  384. package/mobile/dist/components/CreditForm/CreditFormStep.d.ts +1 -1
  385. package/mobile/dist/components/CreditForm/FailedStatusContent.js +1 -1
  386. package/mobile/dist/components/CreditForm/FailedStatusContent.js.map +1 -1
  387. package/mobile/dist/components/CreditForm/creditFormStepsData.d.ts +1 -1
  388. package/mobile/dist/components/CreditForm/getCreditFormTaskData.js +1 -1
  389. package/mobile/dist/components/CreditForm/getCreditFormTaskData.js.map +1 -1
  390. package/mobile/dist/model/InputSectionsType.d.ts +9 -1
  391. package/mobile/dist/ui-kit/FormField/Fields/CurrencyField.js +6 -5
  392. package/mobile/dist/ui-kit/FormField/Fields/CurrencyField.js.map +1 -1
  393. package/mobile/dist/ui-kit/FormField/Fields/DeliveryDateFiels.d.ts +2 -0
  394. package/mobile/dist/ui-kit/FormField/Fields/DeliveryDateFiels.js +9 -0
  395. package/mobile/dist/ui-kit/FormField/Fields/DeliveryDateFiels.js.map +1 -0
  396. package/mobile/dist/ui-kit/FormField/Fields/MethodObtainField.d.ts +4 -0
  397. package/mobile/dist/ui-kit/FormField/Fields/MethodObtainField.js +13 -0
  398. package/mobile/dist/ui-kit/FormField/Fields/MethodObtainField.js.map +1 -0
  399. package/mobile/dist/ui-kit/FormField/Fields/PaymentSystemField.js +6 -5
  400. package/mobile/dist/ui-kit/FormField/Fields/PaymentSystemField.js.map +1 -1
  401. package/mobile/dist/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  402. package/mobile/dist/ui-kit/FormField/getField.js +5 -0
  403. package/mobile/dist/ui-kit/FormField/getField.js.map +1 -1
  404. package/mobile/dist/ui-kit/FormField/getObjectValidator.js +6 -1
  405. package/mobile/dist/ui-kit/FormField/getObjectValidator.js.map +1 -1
  406. package/mobile/lib/api/RetailAPI/getTaskStatus.d.ts +1 -1
  407. package/mobile/lib/api/RetailAPI/getTaskStatus.js.map +1 -1
  408. package/mobile/lib/api/RetailAPI/updateUserTask.d.ts +4 -0
  409. package/mobile/lib/api/RetailAPI/updateUserTask.js.map +1 -1
  410. package/mobile/lib/api/dadataHints/hintsListsOptions.js +1 -0
  411. package/mobile/lib/api/dadataHints/hintsListsOptions.js.map +1 -1
  412. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +0 -9
  413. package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.d.ts +7 -0
  414. package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.js +4 -0
  415. package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  416. package/mobile/lib/components/Blocks.js +2 -0
  417. package/mobile/lib/components/Blocks.js.map +1 -1
  418. package/mobile/lib/components/CreditCardForm/CreditCardForm.d.ts +6 -0
  419. package/mobile/lib/components/CreditCardForm/CreditCardForm.js +32 -0
  420. package/mobile/lib/components/CreditCardForm/CreditCardForm.js.map +1 -0
  421. package/mobile/lib/components/CreditCardForm/CreditCardFormContent.d.ts +22 -0
  422. package/mobile/lib/components/CreditCardForm/CreditCardFormContent.js +2 -0
  423. package/mobile/lib/components/CreditCardForm/CreditCardFormContent.js.map +1 -0
  424. package/mobile/lib/components/CreditCardForm/CreditCardFormProgress.d.ts +6 -0
  425. package/mobile/lib/components/CreditCardForm/CreditCardFormProgress.js +9 -0
  426. package/mobile/lib/components/CreditCardForm/CreditCardFormProgress.js.map +1 -0
  427. package/mobile/lib/components/CreditCardForm/CreditCardFormStatus.d.ts +16 -0
  428. package/mobile/lib/components/CreditCardForm/CreditCardFormStatus.js +23 -0
  429. package/mobile/lib/components/CreditCardForm/CreditCardFormStatus.js.map +1 -0
  430. package/mobile/lib/components/CreditCardForm/CreditCardFormStatusTracker.d.ts +2 -0
  431. package/mobile/lib/components/CreditCardForm/CreditCardFormStatusTracker.js +41 -0
  432. package/mobile/lib/components/CreditCardForm/CreditCardFormStatusTracker.js.map +1 -0
  433. package/mobile/lib/components/CreditCardForm/CreditCardFormStep.d.ts +12 -0
  434. package/mobile/lib/components/CreditCardForm/CreditCardFormStep.js +39 -0
  435. package/mobile/lib/components/CreditCardForm/CreditCardFormStep.js.map +1 -0
  436. package/mobile/lib/components/CreditCardForm/FailedStatusContent.d.ts +2 -0
  437. package/mobile/lib/components/CreditCardForm/FailedStatusContent.js +5 -0
  438. package/mobile/lib/components/CreditCardForm/FailedStatusContent.js.map +1 -0
  439. package/mobile/lib/components/CreditCardForm/PendingStatusContent.d.ts +2 -0
  440. package/mobile/lib/components/CreditCardForm/PendingStatusContent.js +30 -0
  441. package/mobile/lib/components/CreditCardForm/PendingStatusContent.js.map +1 -0
  442. package/mobile/lib/components/CreditCardForm/ReworkStatusContent.d.ts +2 -0
  443. package/mobile/lib/components/CreditCardForm/ReworkStatusContent.js +23 -0
  444. package/mobile/lib/components/CreditCardForm/ReworkStatusContent.js.map +1 -0
  445. package/mobile/lib/components/CreditCardForm/StepsNavigationButtons.d.ts +5 -0
  446. package/mobile/lib/components/CreditCardForm/StepsNavigationButtons.js +9 -0
  447. package/mobile/lib/components/CreditCardForm/StepsNavigationButtons.js.map +1 -0
  448. package/mobile/lib/components/CreditCardForm/SuccessStatusContent.d.ts +2 -0
  449. package/mobile/lib/components/CreditCardForm/SuccessStatusContent.js +30 -0
  450. package/mobile/lib/components/CreditCardForm/SuccessStatusContent.js.map +1 -0
  451. package/mobile/lib/components/CreditCardForm/creditCardFormStepsData.d.ts +2 -0
  452. package/mobile/lib/components/CreditCardForm/creditCardFormStepsData.js +308 -0
  453. package/mobile/lib/components/CreditCardForm/creditCardFormStepsData.js.map +1 -0
  454. package/mobile/lib/components/CreditCardForm/formStateMap.d.ts +74 -0
  455. package/mobile/lib/components/CreditCardForm/formStateMap.js +91 -0
  456. package/mobile/lib/components/CreditCardForm/formStateMap.js.map +1 -0
  457. package/mobile/lib/components/CreditCardForm/getCreditCardFormTaskData.d.ts +11 -0
  458. package/mobile/lib/components/CreditCardForm/getCreditCardFormTaskData.js +51 -0
  459. package/mobile/lib/components/CreditCardForm/getCreditCardFormTaskData.js.map +1 -0
  460. package/mobile/lib/components/CreditCardForm/getFifthStepData.d.ts +3 -0
  461. package/mobile/lib/components/CreditCardForm/getFifthStepData.js +10 -0
  462. package/mobile/lib/components/CreditCardForm/getFifthStepData.js.map +1 -0
  463. package/mobile/lib/components/CreditCardForm/getFirstStepData.d.ts +3 -0
  464. package/mobile/lib/components/CreditCardForm/getFirstStepData.js +10 -0
  465. package/mobile/lib/components/CreditCardForm/getFirstStepData.js.map +1 -0
  466. package/mobile/lib/components/CreditCardForm/getFourthStepData.d.ts +3 -0
  467. package/mobile/lib/components/CreditCardForm/getFourthStepData.js +16 -0
  468. package/mobile/lib/components/CreditCardForm/getFourthStepData.js.map +1 -0
  469. package/mobile/lib/components/CreditCardForm/getInitialFormState.d.ts +2 -0
  470. package/mobile/lib/components/CreditCardForm/getInitialFormState.js +24 -0
  471. package/mobile/lib/components/CreditCardForm/getInitialFormState.js.map +1 -0
  472. package/mobile/lib/components/CreditCardForm/getSecondStepData.d.ts +3 -0
  473. package/mobile/lib/components/CreditCardForm/getSecondStepData.js +32 -0
  474. package/mobile/lib/components/CreditCardForm/getSecondStepData.js.map +1 -0
  475. package/mobile/lib/components/CreditCardForm/getThirdStepData.d.ts +3 -0
  476. package/mobile/lib/components/CreditCardForm/getThirdStepData.js +25 -0
  477. package/mobile/lib/components/CreditCardForm/getThirdStepData.js.map +1 -0
  478. package/mobile/lib/components/CreditCardForm/renderInfo.d.ts +3 -0
  479. package/mobile/lib/components/CreditCardForm/renderInfo.js +9 -0
  480. package/mobile/lib/components/CreditCardForm/renderInfo.js.map +1 -0
  481. package/mobile/lib/components/CreditCardForm/renderInputs.d.ts +3 -0
  482. package/mobile/lib/components/CreditCardForm/renderInputs.js +3 -0
  483. package/mobile/lib/components/CreditCardForm/renderInputs.js.map +1 -0
  484. package/mobile/lib/components/CreditCardForm/renderStep.d.ts +13 -0
  485. package/mobile/lib/components/CreditCardForm/renderStep.js +16 -0
  486. package/mobile/lib/components/CreditCardForm/renderStep.js.map +1 -0
  487. package/mobile/lib/components/CreditCardForm/useCreditCardFormAPI.d.ts +13 -0
  488. package/mobile/lib/components/CreditCardForm/useCreditCardFormAPI.js +43 -0
  489. package/mobile/lib/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -0
  490. package/mobile/lib/components/CreditForm/CreditForm.js.map +1 -1
  491. package/mobile/lib/components/CreditForm/CreditFormStatusTracker.js +1 -2
  492. package/mobile/lib/components/CreditForm/CreditFormStatusTracker.js.map +1 -1
  493. package/mobile/lib/components/CreditForm/CreditFormStep.d.ts +1 -1
  494. package/mobile/lib/components/CreditForm/FailedStatusContent.js +1 -1
  495. package/mobile/lib/components/CreditForm/FailedStatusContent.js.map +1 -1
  496. package/mobile/lib/components/CreditForm/creditFormStepsData.d.ts +1 -1
  497. package/mobile/lib/components/CreditForm/getCreditFormTaskData.js +1 -1
  498. package/mobile/lib/components/CreditForm/getCreditFormTaskData.js.map +1 -1
  499. package/mobile/lib/model/InputSectionsType.d.ts +9 -1
  500. package/mobile/lib/ui-kit/FormField/Fields/CurrencyField.js +7 -6
  501. package/mobile/lib/ui-kit/FormField/Fields/CurrencyField.js.map +1 -1
  502. package/mobile/lib/ui-kit/FormField/Fields/DeliveryDateFiels.d.ts +2 -0
  503. package/mobile/lib/ui-kit/FormField/Fields/DeliveryDateFiels.js +7 -0
  504. package/mobile/lib/ui-kit/FormField/Fields/DeliveryDateFiels.js.map +1 -0
  505. package/mobile/lib/ui-kit/FormField/Fields/MethodObtainField.d.ts +4 -0
  506. package/mobile/lib/ui-kit/FormField/Fields/MethodObtainField.js +11 -0
  507. package/mobile/lib/ui-kit/FormField/Fields/MethodObtainField.js.map +1 -0
  508. package/mobile/lib/ui-kit/FormField/Fields/PaymentSystemField.js +7 -6
  509. package/mobile/lib/ui-kit/FormField/Fields/PaymentSystemField.js.map +1 -1
  510. package/mobile/lib/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  511. package/mobile/lib/ui-kit/FormField/getField.js +5 -0
  512. package/mobile/lib/ui-kit/FormField/getField.js.map +1 -1
  513. package/mobile/lib/ui-kit/FormField/getObjectValidator.js +6 -1
  514. package/mobile/lib/ui-kit/FormField/getObjectValidator.js.map +1 -1
  515. package/mobile/src/api/RetailAPI/getTaskStatus.ts +1 -1
  516. package/mobile/src/api/RetailAPI/updateUserTask.ts +4 -0
  517. package/mobile/src/api/dadataHints/hintsListsOptions.ts +1 -0
  518. package/mobile/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +0 -11
  519. package/mobile/src/components/ApplicationLeadForm/getInitialFormState.tsx +8 -0
  520. package/mobile/src/components/Blocks.ts +2 -0
  521. package/mobile/src/components/CreditCardForm/CreditCardForm.tsx +69 -0
  522. package/mobile/src/components/CreditCardForm/CreditCardFormContent.ts +27 -0
  523. package/mobile/src/components/CreditCardForm/CreditCardFormProgress.tsx +27 -0
  524. package/mobile/src/components/CreditCardForm/CreditCardFormStatus.tsx +119 -0
  525. package/mobile/src/components/CreditCardForm/CreditCardFormStatusTracker.tsx +48 -0
  526. package/mobile/src/components/CreditCardForm/CreditCardFormStep.tsx +66 -0
  527. package/mobile/src/components/CreditCardForm/FailedStatusContent.tsx +10 -0
  528. package/mobile/src/components/CreditCardForm/PendingStatusContent.tsx +38 -0
  529. package/mobile/src/components/CreditCardForm/ReworkStatusContent.tsx +32 -0
  530. package/mobile/src/components/CreditCardForm/StepsNavigationButtons.tsx +29 -0
  531. package/mobile/src/components/CreditCardForm/SuccessStatusContent.tsx +37 -0
  532. package/mobile/src/components/CreditCardForm/creditCardFormStepsData.tsx +310 -0
  533. package/mobile/src/components/CreditCardForm/formStateMap.tsx +165 -0
  534. package/mobile/src/components/CreditCardForm/getCreditCardFormTaskData.ts +68 -0
  535. package/mobile/src/components/CreditCardForm/getFifthStepData.ts +13 -0
  536. package/mobile/src/components/CreditCardForm/getFirstStepData.tsx +13 -0
  537. package/mobile/src/components/CreditCardForm/getFourthStepData.ts +27 -0
  538. package/mobile/src/components/CreditCardForm/getInitialFormState.tsx +28 -0
  539. package/mobile/src/components/CreditCardForm/getSecondStepData.tsx +54 -0
  540. package/mobile/src/components/CreditCardForm/getThirdStepData.tsx +44 -0
  541. package/mobile/src/components/CreditCardForm/renderInfo.tsx +10 -0
  542. package/mobile/src/components/CreditCardForm/renderInputs.tsx +5 -0
  543. package/mobile/src/components/CreditCardForm/renderStep.tsx +43 -0
  544. package/mobile/src/components/CreditCardForm/useCreditCardFormAPI.tsx +75 -0
  545. package/mobile/src/components/CreditForm/CreditForm.tsx +2 -4
  546. package/mobile/src/components/CreditForm/CreditFormStatusTracker.tsx +1 -2
  547. package/mobile/src/components/CreditForm/CreditFormStep.tsx +1 -1
  548. package/mobile/src/components/CreditForm/FailedStatusContent.tsx +1 -2
  549. package/mobile/src/components/CreditForm/creditFormStepsData.tsx +1 -1
  550. package/mobile/src/components/CreditForm/getCreditFormTaskData.ts +1 -1
  551. package/mobile/src/model/InputSectionsType.ts +13 -1
  552. package/mobile/src/ui-kit/FormField/Fields/CurrencyField.tsx +14 -15
  553. package/mobile/src/ui-kit/FormField/Fields/DeliveryDateFiels.tsx +12 -0
  554. package/mobile/src/ui-kit/FormField/Fields/MethodObtainField.tsx +19 -0
  555. package/mobile/src/ui-kit/FormField/Fields/PaymentSystemField.tsx +14 -16
  556. package/mobile/src/ui-kit/FormField/NameFieldDef.ts +3 -0
  557. package/mobile/src/ui-kit/FormField/getField.tsx +6 -0
  558. package/mobile/src/ui-kit/FormField/getObjectValidator.tsx +6 -1
  559. package/package.json +2 -2
  560. package/src/api/RetailAPI/getTaskStatus.ts +1 -1
  561. package/src/api/RetailAPI/updateUserTask.ts +4 -0
  562. package/src/api/dadataHints/hintsListsOptions.ts +1 -0
  563. package/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +0 -11
  564. package/src/components/ApplicationLeadForm/getInitialFormState.tsx +8 -0
  565. package/src/components/Blocks.mobile.ts +2 -0
  566. package/src/components/Blocks.ts +2 -0
  567. package/src/components/CreditCardForm/CreditCardForm.fixture.tsx +14 -0
  568. package/src/components/CreditCardForm/CreditCardForm.tsx +69 -0
  569. package/src/components/CreditCardForm/CreditCardFormContent.ts +27 -0
  570. package/src/components/CreditCardForm/CreditCardFormProgress.tsx +27 -0
  571. package/src/components/CreditCardForm/CreditCardFormStatus.tsx +119 -0
  572. package/src/components/CreditCardForm/CreditCardFormStatusTracker.tsx +48 -0
  573. package/src/components/CreditCardForm/CreditCardFormStep.tsx +66 -0
  574. package/src/components/CreditCardForm/FailedStatusContent.tsx +10 -0
  575. package/src/components/CreditCardForm/PendingStatusContent.tsx +38 -0
  576. package/src/components/CreditCardForm/ReworkStatusContent.tsx +32 -0
  577. package/src/components/CreditCardForm/StepsNavigationButtons.tsx +29 -0
  578. package/src/components/CreditCardForm/SuccessStatusContent.tsx +37 -0
  579. package/src/components/CreditCardForm/creditCardFormStepsData.tsx +310 -0
  580. package/src/components/CreditCardForm/formStateMap.tsx +165 -0
  581. package/src/components/CreditCardForm/getCreditCardFormTaskData.ts +68 -0
  582. package/src/components/CreditCardForm/getFifthStepData.ts +13 -0
  583. package/src/components/CreditCardForm/getFirstStepData.tsx +13 -0
  584. package/src/components/CreditCardForm/getFourthStepData.ts +27 -0
  585. package/src/components/CreditCardForm/getInitialFormState.tsx +28 -0
  586. package/src/components/CreditCardForm/getSecondStepData.tsx +54 -0
  587. package/src/components/CreditCardForm/getThirdStepData.tsx +44 -0
  588. package/src/components/CreditCardForm/renderInfo.tsx +10 -0
  589. package/src/components/CreditCardForm/renderInputs.tsx +5 -0
  590. package/src/components/CreditCardForm/renderStep.tsx +43 -0
  591. package/src/components/CreditCardForm/useCreditCardFormAPI.tsx +75 -0
  592. package/src/components/CreditForm/CreditForm.tsx +2 -4
  593. package/src/components/CreditForm/CreditFormStatusTracker.tsx +1 -2
  594. package/src/components/CreditForm/CreditFormStep.tsx +1 -1
  595. package/src/components/CreditForm/FailedStatusContent.tsx +1 -2
  596. package/src/components/CreditForm/creditFormStepsData.tsx +1 -1
  597. package/src/components/CreditForm/getCreditFormTaskData.ts +1 -1
  598. package/src/model/InputSectionsType.ts +13 -1
  599. package/src/ui-kit/FormField/Fields/CurrencyField.tsx +14 -15
  600. package/src/ui-kit/FormField/Fields/DeliveryDateFiels.tsx +12 -0
  601. package/src/ui-kit/FormField/Fields/MethodObtainField.tsx +19 -0
  602. package/src/ui-kit/FormField/Fields/PaymentSystemField.tsx +14 -16
  603. package/src/ui-kit/FormField/NameFieldDef.ts +3 -0
  604. package/src/ui-kit/FormField/getField.tsx +6 -0
  605. package/src/ui-kit/FormField/getObjectValidator.tsx +6 -1
@@ -1255,6 +1255,7 @@
1255
1255
  addressRegistration: ADDRESS_HINTS_LIST_OPTIONS,
1256
1256
  addressFact: ADDRESS_HINTS_LIST_OPTIONS,
1257
1257
  organizationAddress: ADDRESS_HINTS_LIST_OPTIONS,
1258
+ addressCourier: ADDRESS_HINTS_LIST_OPTIONS,
1258
1259
  };
1259
1260
 
1260
1261
  const debounce = (fn, delay = 600) => {
@@ -1533,6 +1534,8 @@
1533
1534
  sex: defaultValidator('Укажите свой пол'),
1534
1535
  addressRegistration: addressDaDataValidator(),
1535
1536
  organizationAddress: addressDaDataValidator(),
1537
+ deliveryDate: defaultValidator('Укажите дату доставки'),
1538
+ addressCourier: addressDaDataValidator(),
1536
1539
  participantDateRegistration: defaultValidator('Укажите дату регистрации'),
1537
1540
  retirementIncome: defaultValidator(),
1538
1541
  otherIncome: defaultValidator(),
@@ -1547,7 +1550,10 @@
1547
1550
  regionRetail: defaultSelectValidator('Выберите филиал банка'),
1548
1551
  addressRetail: defaultSelectValidator('Выберите адрес банка'),
1549
1552
  addressMatch: defaultValidator(),
1550
- codeWord: codeWordValidator('Необходимо ввести кодовое слово'),
1553
+ codeWord: codeWordValidator('Необходимо ввести кодовое слово латиницей'),
1554
+ currency: defaultValidator(),
1555
+ paymentSystem: defaultValidator(),
1556
+ cardCategory: defaultSelectValidator(),
1551
1557
  confirmationIncome: defaultValidator(),
1552
1558
  };
1553
1559
  const getObjectValidator = (inputs) => {
@@ -2321,12 +2327,16 @@
2321
2327
  };
2322
2328
  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)))) })] })));
2323
2329
 
2330
+ 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)] })));
2331
+
2324
2332
  const CURRENCY_TYPES = [{ id: 'rub', text: 'Рубль' }];
2325
- const CurrencyField = JSX(({ field }) => {
2326
- const { value } = field('currency');
2327
- 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' }) })] }));
2333
+ const CurrencyField = JSX(({ field, input }) => {
2334
+ const { value, onChange } = field('currency');
2335
+ 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) }));
2328
2336
  });
2329
2337
 
2338
+ 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) })));
2339
+
2330
2340
  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 })));
2331
2341
 
2332
2342
  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) })));
@@ -2468,6 +2478,12 @@
2468
2478
 
2469
2479
  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 })));
2470
2480
 
2481
+ const METHODS_OF_OBTAIN = [
2482
+ { id: 'office', text: 'В отделении Банка' },
2483
+ { id: 'courier', text: 'Курьерская доставка' },
2484
+ ];
2485
+ const MethodObtainField = JSX(({ field, input }) => (jsx(RadioButtonGroupControl, { orientation: "horizontal", items: METHODS_OF_OBTAIN, ...getValidation(field('methodObtain'), validatorObj.methodObtain, input?.required) })));
2486
+
2471
2487
  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 })));
2472
2488
 
2473
2489
  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 })));
@@ -2515,12 +2531,12 @@
2515
2531
  { id: 'mir', text: 'Карта МИР' },
2516
2532
  { id: 'union_pay', text: 'UnionPay' },
2517
2533
  { id: 'payment_system_j', text: 'Платежная система (Дж)' },
2518
- { id: 'payment_system_b', text: 'Платежная система (B)* ' },
2534
+ { id: 'payment_system_b', text: 'Платежная система (B) ' },
2519
2535
  { id: 'free_card', text: 'Бесплатная карта' },
2520
2536
  ];
2521
- const PaymentSystemField = JSX(({ field }) => {
2537
+ const PaymentSystemField = JSX(({ field, input }) => {
2522
2538
  const { value, onChange } = field('paymentSystem');
2523
- 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(_) }) })] }));
2539
+ 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) }));
2524
2540
  });
2525
2541
 
2526
2542
  const isPlaceholder = (_) => _ === '_';
@@ -3255,8 +3271,6 @@
3255
3271
 
3256
3272
  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) })));
3257
3273
 
3258
- 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)] })));
3259
-
3260
3274
  const SEX_TYPES = [
3261
3275
  { id: 'male', text: 'Мужской' },
3262
3276
  { id: 'female', text: 'Женский' },
@@ -3393,6 +3407,7 @@
3393
3407
  dulSubdivisionCode: jsx(DulSubdivisionCodeField, { field: field, input: input }),
3394
3408
  dulIssuedBy: jsx(DulIssuedByField, { field: field, input: input }),
3395
3409
  addressRegistration: jsx(AddressField, { field: field, input: input }),
3410
+ addressCourier: jsx(AddressField, { field: field, input: input }),
3396
3411
  participantDateRegistration: jsx(ParticipantDateRegistrationField, { field: field, input: input }),
3397
3412
  retirementIncome: jsx(RetirementIncomeField, { field: field, input: input }),
3398
3413
  otherIncome: jsx(OtherIncomeField, { field: field, input: input }),
@@ -3413,6 +3428,8 @@
3413
3428
  cardCategory: jsx(CardCategoryField, { field: field, input: input }),
3414
3429
  codeWord: jsx(CodeWordField, { field: field, input: input }),
3415
3430
  confirmationIncome: jsx(ConfirmationIncomeField, { field: field, input: input }),
3431
+ methodObtain: jsx(MethodObtainField, { field: field, input: input }),
3432
+ deliveryDate: jsx(DeliveryDateFiels, { field: field, input: input }),
3416
3433
  };
3417
3434
  return isRenderField({ input, field }) ? (jsx("div", { children: InputsMap[input?.name || ''] }, String(i))) : null;
3418
3435
  };
@@ -3506,7 +3523,7 @@
3506
3523
  consentToReceiveMaterials: false,
3507
3524
  consentDataProcessing: false,
3508
3525
  };
3509
- const getInitialFormState$2 = (inputs, typeForm = '') => {
3526
+ const getInitialFormState$3 = (inputs, typeForm = '') => {
3510
3527
  const formState = Object.fromEntries(inputs.map((_) => [
3511
3528
  _.name,
3512
3529
  (_.fieldType === 'ved' && _?.defaultValue) || initialFormState$1[_.name || ''],
@@ -3531,7 +3548,7 @@
3531
3548
  // eslint-disable-next-line max-lines-per-function
3532
3549
  ({ className, title, typeForm = '', sections = [], button, link, endpoint, additionalParams, isContacts, data, ...rest }) => {
3533
3550
  const inputs = (sections?.flatMap((_) => _?.inputs) || []);
3534
- const initialFormState = getInitialFormState$2(inputs, typeForm);
3551
+ const initialFormState = getInitialFormState$3(inputs, typeForm);
3535
3552
  const [responseType, setResponseType] = useState('');
3536
3553
  const responseTypeDialog = useResponseTypeDialog({ typeForm });
3537
3554
  const handleSubmit = useCallback(async (formData, ev) => {
@@ -3596,7 +3613,7 @@
3596
3613
  });
3597
3614
  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" }) })] }));
3598
3615
 
3599
- const renderInputs$1 = ({ field, typeForm = '', inputs, isRetailForm = false, }) => {
3616
+ const renderInputs$2 = ({ field, typeForm = '', inputs, isRetailForm = false, }) => {
3600
3617
  const { consentInputs, restInputs } = splitInputs(inputs || []);
3601
3618
  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)));
3602
3619
  };
@@ -3638,8 +3655,12 @@
3638
3655
  consentInformFlg: false,
3639
3656
  addressRegistration: '',
3640
3657
  participantDateRegistration: undefined,
3658
+ currency: '',
3659
+ paymentSystem: '',
3660
+ cardCategory: { key: '', text: '' },
3661
+ codeWord: '',
3641
3662
  };
3642
- const getInitialFormState$1 = (inputs, savedForm, typeForm = '') => {
3663
+ const getInitialFormState$2 = (inputs, savedForm, typeForm = '') => {
3643
3664
  if (savedForm) {
3644
3665
  const formStateCopy = { ...savedForm };
3645
3666
  formStateCopy.birthday = new Date(formStateCopy?.birthday || 0);
@@ -4295,7 +4316,7 @@
4295
4316
  const [responseType, setResponseType] = useState('');
4296
4317
  const { isLoading } = useInitApplicationLead(nextStepLink);
4297
4318
  const [leadForm, setLeadForm] = useLocalStorage('leadForm');
4298
- const initialFormState = getInitialFormState$1(inputs, leadForm);
4319
+ const initialFormState = getInitialFormState$2(inputs, leadForm);
4299
4320
  const { handleSubmit, responseStatus } = useApplicationLeadApi({
4300
4321
  inputs,
4301
4322
  programId,
@@ -4313,7 +4334,7 @@
4313
4334
  reset();
4314
4335
  }
4315
4336
  }, [responseType]);
4316
- 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)] }) }));
4337
+ 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)] }) }));
4317
4338
  });
4318
4339
 
4319
4340
  const NotFound = JSX(({ title, description }) => {
@@ -5928,9 +5949,9 @@
5928
5949
 
5929
5950
  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] })] })));
5930
5951
 
5931
- const CreditFormProgress = JSX(({ step = 1, totalSteps = 5, stepsTitles = [] }) => {
5932
- const progress = useMemo(() => (step / totalSteps) * 100, [step, totalSteps]);
5933
- 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 })] }) }));
5952
+ const CreditCardFormProgress = JSX(({ step = 1, totalSteps = 6, stepsTitles = [] }) => {
5953
+ const progress = useMemo(() => ((step + 1) / totalSteps) * 100, [step, totalSteps]);
5954
+ 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 })] }) }));
5934
5955
  });
5935
5956
 
5936
5957
  var STATUS_TYPE;
@@ -5954,23 +5975,23 @@
5954
5975
  } }), 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] })] }));
5955
5976
  });
5956
5977
 
5957
- 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: {
5978
+ 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: {
5958
5979
  text: infoCard?.link?.text,
5959
5980
  } })) : null, buttonText ? (jsx(LinkButton, { href: "/natural", text: buttonText, version: "primary", className: "w-full mt-lg" })) : null] })));
5960
- const SectionInfo = ({ title, items, countColumns = false, }) => {
5981
+ const SectionInfo$1 = ({ title, items, countColumns = false, }) => {
5961
5982
  const isMobile = useMobileMode();
5962
5983
  if (!items) {
5963
5984
  return null;
5964
5985
  }
5965
- 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] })] }));
5986
+ 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] })] }));
5966
5987
  };
5967
- 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 })] }));
5988
+ 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 })] }));
5968
5989
 
5969
- 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" })));
5990
+ 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" })));
5970
5991
 
5971
- const PendingStatusContent = JSX(() => {
5992
+ const PendingStatusContent$1 = JSX(() => {
5972
5993
  const [leadForm] = useLocalStorage('leadForm');
5973
- 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: [
5994
+ 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: [
5974
5995
  {
5975
5996
  label: 'Название продукта',
5976
5997
  description: 'Кредит на любые цели',
@@ -5994,9 +6015,9 @@
5994
6015
  ] }));
5995
6016
  });
5996
6017
 
5997
- const ReworkStatusContent = JSX(() => {
6018
+ const ReworkStatusContent$1 = JSX(() => {
5998
6019
  const [leadForm] = useLocalStorage('leadForm');
5999
- 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: [
6020
+ 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: [
6000
6021
  {
6001
6022
  label: 'Регион',
6002
6023
  description: leadForm?.regionRetail?.text,
@@ -6013,9 +6034,9 @@
6013
6034
  ], buttonText: "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043D\u0430 \u0433\u043B\u0430\u0432\u043D\u0443\u044E" }));
6014
6035
  });
6015
6036
 
6016
- const SuccessStatusContent = JSX(() => {
6037
+ const SuccessStatusContent$1 = JSX(() => {
6017
6038
  const [leadForm] = useLocalStorage('leadForm');
6018
- 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: [
6039
+ 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: [
6019
6040
  {
6020
6041
  label: 'Название продукта',
6021
6042
  description: 'Кредит на любые цели',
@@ -6039,19 +6060,18 @@
6039
6060
  ], buttonText: "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043D\u0430 \u0433\u043B\u0430\u0432\u043D\u0443\u044E" }));
6040
6061
  });
6041
6062
 
6042
- const TASK_ID = 2816419;
6043
- const SIGNAL_TYPES = [
6063
+ const SIGNAL_TYPES$1 = [
6044
6064
  'CREATE_APPLICATION_SHORT_SIGNAL',
6045
6065
  'CREATE_APPLICATION_LOAN_V3_SIGNAL',
6046
6066
  ];
6047
- const CreditFormStatusTracker = JSX(() => {
6067
+ const CreditCardFormStatusTracker = JSX(() => {
6048
6068
  const [status, setStatus] = useState(STATUS_TYPE.process);
6049
6069
  const [taskId] = useLocalStorage('taskId');
6050
6070
  useEffect(() => {
6051
- for (const signalType of SIGNAL_TYPES) {
6071
+ for (const signalType of SIGNAL_TYPES$1) {
6052
6072
  sendSignalToProcess({ signalType, taskId });
6053
6073
  }
6054
- const trackStatus = () => getTaskStatus({ taskId: TASK_ID }).then((res) => {
6074
+ const trackStatus = () => getTaskStatus({ taskId }).then((res) => {
6055
6075
  if (res.statusCd && res.statusCd !== STATUS_TYPE.process) {
6056
6076
  clearInterval(pullingInterval);
6057
6077
  setStatus(res.statusCd);
@@ -6059,27 +6079,24 @@
6059
6079
  });
6060
6080
  const pullingInterval = setInterval(trackStatus, 30000);
6061
6081
  }, []);
6062
- return renderStatus(status);
6082
+ return renderStatus$1(status);
6063
6083
  });
6064
- const renderStatus = (status) => {
6084
+ const renderStatus$1 = (status) => {
6065
6085
  const statusesMap = {
6066
- IN_PROCESS: jsx(PendingStatusContent, {}),
6067
- FAILED: jsx(FailedStatusContent, {}),
6068
- OK: jsx(SuccessStatusContent, {}),
6069
- REWORK: jsx(ReworkStatusContent, {}),
6086
+ IN_PROCESS: jsx(PendingStatusContent$1, {}),
6087
+ FAILED: jsx(FailedStatusContent$1, {}),
6088
+ OK: jsx(SuccessStatusContent$1, {}),
6089
+ REWORK: jsx(ReworkStatusContent$1, {}),
6070
6090
  };
6071
6091
  return statusesMap[status] || null;
6072
6092
  };
6073
6093
 
6074
- const formStateMap = {
6094
+ /* eslint-disable max-lines */
6095
+ const formStateMap$1 = {
6075
6096
  0: {
6076
- moneyValue: 0,
6077
- monthsValue: 0,
6078
- isAnnuity: false,
6079
- isInsurance: false,
6080
- isSalaryClient: false,
6081
- isPensionClient: false,
6082
- isStateEmployee: false,
6097
+ paymentSystem: PAYMENT_SYSTEM_TYPES[0].id,
6098
+ currency: 'rub',
6099
+ codeWord: '',
6083
6100
  },
6084
6101
  1: {
6085
6102
  surname: '',
@@ -6105,6 +6122,11 @@
6105
6122
  fiasCode: '',
6106
6123
  },
6107
6124
  housing: '',
6125
+ methodObtain: 'office',
6126
+ addressCourier: {
6127
+ fullAddress: '',
6128
+ fiasCode: '',
6129
+ },
6108
6130
  },
6109
6131
  2: {
6110
6132
  amountWorkers: { key: '', text: '' },
@@ -6131,7 +6153,6 @@
6131
6153
  familyStatus: { key: '', text: '' },
6132
6154
  dependents: undefined,
6133
6155
  familyMembers: undefined,
6134
- confirmationIncome: { key: '', text: '' },
6135
6156
  mandatoryIncome: undefined,
6136
6157
  otherPayments: undefined,
6137
6158
  snils: '',
@@ -6146,12 +6167,21 @@
6146
6167
  },
6147
6168
  5: {
6148
6169
  regionRetail: '',
6149
- addressRetail: '',
6170
+ addressRetail: {
6171
+ fullAddress: '',
6172
+ fiasCode: '',
6173
+ },
6150
6174
  bankEmployeeCode: '',
6175
+ addressCoutier: {
6176
+ fullAddress: '',
6177
+ fiasCode: '',
6178
+ },
6179
+ methodObtain: 'office',
6180
+ deliveryDate: undefined,
6151
6181
  },
6152
6182
  };
6153
6183
 
6154
- const getInitialFormState = (step, localStorageData) => {
6184
+ const getInitialFormState$1 = (step, localStorageData) => {
6155
6185
  if (localStorageData) {
6156
6186
  // TODO: Fill in for other fields with type Date
6157
6187
  // TODO: Take it out to the helper
@@ -6169,28 +6199,71 @@
6169
6199
  : undefined;
6170
6200
  }
6171
6201
  return {
6172
- ...formStateMap[step],
6202
+ ...formStateMap$1[step],
6173
6203
  ...localStorageData,
6174
6204
  };
6175
6205
  };
6176
6206
 
6177
- const renderInfo$1 = (inputs = []) => {
6207
+ const renderInfo$2 = (inputs = []) => {
6178
6208
  const infoInputs = inputs.filter((_) => _.fieldType === 'info');
6179
6209
  return infoInputs.length
6180
6210
  ? infoInputs.map(({ text, name }, i) => jsx(InfoCard, { __html: text }, `${name}_${i}`))
6181
6211
  : null;
6182
6212
  };
6183
6213
 
6184
- const renderInputs = ({ field, inputs }) => (inputs || [])?.map(getField(field, ''));
6214
+ const renderInputs$1 = ({ field, inputs }) => (inputs || [])?.map(getField(field, ''));
6185
6215
 
6186
- const renderStep = ({ sections, field }) => sections?.map(({ inputs, columns, title }, i) => (jsxs("div", { className: style(inputColumnStyles(columns), 'grid gap-x-m'), children: [renderInfo$1(inputs), renderTitle(title), renderInputs({ field, inputs })] }, `section-${i}`)));
6216
+ const renderLastStep = ({ sections, field, methodObtain }) => sections
6217
+ ?.filter(({ type }) => type === methodObtain || !type)
6218
+ .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}`)));
6219
+ const renderStep$1 = ({ sections, field, isLastStep, methodObtain }) => {
6220
+ if (isLastStep) {
6221
+ return renderLastStep({ sections, field, methodObtain });
6222
+ }
6223
+ 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}`)));
6224
+ };
6187
6225
 
6188
- const StepsNavigationButtons = JSX(({ step, onPrevStep }) => {
6226
+ const StepsNavigationButtons$1 = JSX(({ step, onPrevStep }) => {
6189
6227
  const isFirstStep = step === 0;
6190
- 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" })] }));
6228
+ 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" })] }));
6191
6229
  });
6192
6230
 
6193
- const getFirstStepData = (formData) => {
6231
+ const getFifthStepData = (formData) => {
6232
+ const { bankruptcyFlg, shareholderFlg, legalEntityName, creditInRshbCd } = formData;
6233
+ return {
6234
+ bankruptcyFlg,
6235
+ shareholderFlg,
6236
+ nameLegalEntity: legalEntityName,
6237
+ creditInRshbCd,
6238
+ };
6239
+ };
6240
+
6241
+ const getFirstStepData$1 = (formData) => {
6242
+ const { currency, paymentSystem, cardCategory, codeWord } = formData;
6243
+ return {
6244
+ currencyCode: currency,
6245
+ paymentSystemTypeCd: paymentSystem,
6246
+ classCard: cardCategory,
6247
+ codeWord: codeWord,
6248
+ };
6249
+ };
6250
+
6251
+ const getFourthStepData$1 = (formData) => {
6252
+ const { familyStatus, dependents, familyMembers, mandatoryIncome, otherPayments, snils, armyIdFlg, } = formData;
6253
+ return {
6254
+ maritalStatusCd: familyStatus,
6255
+ totalDependents: familyMembers,
6256
+ otherDependents: dependents,
6257
+ participantIncomes: getParticipantIncomes({
6258
+ mandatoryIncome,
6259
+ otherPayments,
6260
+ }),
6261
+ snils: snils?.replaceAll(' ', ''),
6262
+ armyIdFlg,
6263
+ };
6264
+ };
6265
+
6266
+ const getSecondStepData$1 = (formData) => {
6194
6267
  const { name, surname, middleName, birthday = '', phone = '', email, sex, birthPlace, dulIssueDateField = '', dulIssuedBy, dulNumber, dulSerie, dulSubdivisionCode, education, participantDateRegistration = '', housing, addressRegistration, addressFact, } = formData;
6195
6268
  return {
6196
6269
  birthDate: formatDate(birthday, true),
@@ -6219,17 +6292,7 @@
6219
6292
  };
6220
6293
  };
6221
6294
 
6222
- const getFourthStepData = (formData) => {
6223
- const { bankruptcyFlg, shareholderFlg, legalEntityName, creditInRshbCd } = formData;
6224
- return {
6225
- bankruptcyFlg,
6226
- shareholderFlg,
6227
- nameLegalEntity: legalEntityName,
6228
- creditInRshbCd,
6229
- };
6230
- };
6231
-
6232
- const getSecondStepData = (formData) => {
6295
+ const getThirdStepData$1 = (formData) => {
6233
6296
  const { employment, organizationName, inn, legalForm, organization, amountWorkers, employerActivities, employerOrganization, generalSeniority, lastJobExperience, experience5Years, jobsNumber, organizationPhone, organizationAddress, positionOrganization, } = formData;
6234
6297
  return {
6235
6298
  employmentTypeCd: employment,
@@ -6252,60 +6315,805 @@
6252
6315
  };
6253
6316
  };
6254
6317
 
6255
- const getThirdStepData = (formData) => {
6256
- const { familyStatus, dependents, familyMembers, confirmationIncome, mandatoryIncome, otherPayments, snils, armyIdFlg, } = formData;
6318
+ const getCreditCardFormTaskData = ({ participantId, taskId, profileId, formData, step = 0, }) => {
6257
6319
  return {
6258
- maritalStatusCd: familyStatus,
6259
- totalDependents: familyMembers,
6260
- incomeCertificateCd: confirmationIncome,
6261
- otherDependents: dependents,
6262
- participantIncomes: getParticipantIncomes({
6263
- mandatoryIncome,
6264
- otherPayments,
6265
- }),
6266
- snils: snils?.replaceAll(' ', ''),
6267
- armyIdFlg,
6268
- };
6269
- };
6270
-
6271
- const getCreditFormTaskData = ({ participantId, taskId, profileId, formData, step = 0, }) => ({
6272
- sendToBank: true,
6273
- taskKind: 'UNITED',
6274
- task: {
6275
- taskSource: globalThis.location.origin,
6276
- id: taskId,
6277
- //TODO: Добавить id офиса
6278
- authorizedAgentId: formData?.bankEmployeeCode,
6279
- participants: [
6280
- {
6281
- id: participantId,
6282
- profile: {
6283
- id: profileId,
6284
- },
6285
- roleCd: {
6286
- key: 'BORROWER',
6287
- value: 'Заемщик',
6320
+ sendToBank: true,
6321
+ taskKind: 'UNITED',
6322
+ task: {
6323
+ taskSource: globalThis.location.origin,
6324
+ id: taskId,
6325
+ //TODO: Добавить id офиса
6326
+ authorizedAgentId: formData?.bankEmployeeCode,
6327
+ participants: [
6328
+ {
6329
+ id: participantId,
6330
+ profile: {
6331
+ id: profileId,
6332
+ },
6333
+ roleCd: {
6334
+ key: 'BORROWER',
6335
+ value: 'Заемщик',
6336
+ },
6337
+ ...getCurrentStepData$1(step, formData),
6288
6338
  },
6289
- ...getCurrentStepData(step, formData),
6290
- },
6291
- ],
6292
- esiaAccountTypeCd: {
6293
- key: formData?.esiaAccountTypeCd?.key,
6339
+ ],
6294
6340
  },
6295
- },
6296
- });
6297
- const getCurrentStepData = (step, formData) => {
6341
+ };
6342
+ };
6343
+ const getCurrentStepData$1 = (step, formData) => {
6298
6344
  switch (step) {
6345
+ case 0:
6346
+ return getFirstStepData$1(formData);
6299
6347
  case 1:
6300
- return getFirstStepData(formData);
6348
+ return getSecondStepData$1(formData);
6301
6349
  case 2:
6302
- return getSecondStepData(formData);
6350
+ return getThirdStepData$1(formData);
6303
6351
  case 3:
6304
- return getThirdStepData(formData);
6352
+ return getFourthStepData$1(formData);
6305
6353
  case 4:
6306
- return getFourthStepData(formData);
6354
+ return getFifthStepData(formData);
6355
+ case 5:
6356
+ return {
6357
+ //TODO: Сделать адаптер данных способа получения карты
6358
+ };
6307
6359
  default:
6308
- return getFirstStepData(formData);
6360
+ return {};
6361
+ }
6362
+ };
6363
+
6364
+ const useCreditCardFormAPI = ({ step, inputs, onNextStep, saveStep, finishForm, }) => {
6365
+ const [taskId] = useLocalStorage('taskId');
6366
+ const [profileId] = useLocalStorage('profileId');
6367
+ const [participantId] = useLocalStorage('participantId');
6368
+ const handleSubmit = useCallback(async (formData) => {
6369
+ const feedbackValidator = objectValidator(getObjectValidator(calculateInputs$1(formData, inputs, step)));
6370
+ if (!isValidationSuccess(feedbackValidator(formData))) {
6371
+ return console.warn('validation fail');
6372
+ }
6373
+ saveStep(formData);
6374
+ try {
6375
+ if (taskId && profileId && participantId) {
6376
+ await updateUserTask(getCreditCardFormTaskData({
6377
+ participantId,
6378
+ taskId,
6379
+ profileId,
6380
+ step,
6381
+ formData: formData,
6382
+ }));
6383
+ }
6384
+ }
6385
+ catch (ex) {
6386
+ return 'Fail';
6387
+ }
6388
+ onNextStep();
6389
+ if (step === 5) {
6390
+ finishForm?.(true);
6391
+ }
6392
+ return 'OK';
6393
+ }, []);
6394
+ return {
6395
+ handleSubmit,
6396
+ };
6397
+ };
6398
+ const calculateInputs$1 = (formData, inputs, step) => step === 2 && 'employment' in formData && formData?.employment?.key === 'RETIREE' ? [] : inputs;
6399
+
6400
+ const CreditCardFormStep = JSX(({ step, sections, onPrevStep, onNextStep, inputs, isFormFinished, finishForm }) => {
6401
+ const [localStorageData, saveStep] = useLocalStorage('leadForm');
6402
+ const initialState = getInitialFormState$1(step, localStorageData);
6403
+ const customSubmit = useRef(undefined);
6404
+ const registerSubmit = useCallback((submit) => {
6405
+ customSubmit.current = submit;
6406
+ }, []);
6407
+ const { handleSubmit } = useCreditCardFormAPI({
6408
+ step,
6409
+ inputs,
6410
+ onNextStep,
6411
+ saveStep,
6412
+ finishForm,
6413
+ });
6414
+ const [state, { field, onSubmit }] = useForm(initialState, {
6415
+ onSubmit: (formData, ev) => {
6416
+ handleSubmit({ ...formData, ...customSubmit.current?.(ev) });
6417
+ },
6418
+ });
6419
+ const methodObtain = 'methodObtain' in state ? state.methodObtain : undefined;
6420
+ return isFormFinished ? (jsx(CreditCardFormStatusTracker, {})) : (jsxs("form", { onSubmit: onSubmit, className: "space-y-m", children: [renderStep$1({
6421
+ sections,
6422
+ field,
6423
+ registerSubmit,
6424
+ methodObtain,
6425
+ isLastStep: step === 5,
6426
+ }), jsx(StepsNavigationButtons$1, { step: step, onPrevStep: onPrevStep })] }));
6427
+ });
6428
+
6429
+ /* eslint-disable max-lines */
6430
+ /* eslint-disable max-len */
6431
+ const stepsSectionsMap$1 = [
6432
+ [
6433
+ {
6434
+ title: 'Параметры карты',
6435
+ inputs: [],
6436
+ },
6437
+ {
6438
+ inputs: [
6439
+ { fieldType: 'common', name: 'currency', required: true },
6440
+ { fieldType: 'common', name: 'paymentSystem', required: true },
6441
+ { fieldType: 'common', name: 'cardCategory', required: true },
6442
+ { fieldType: 'common', name: 'codeWord', required: true },
6443
+ ],
6444
+ },
6445
+ ],
6446
+ [
6447
+ {
6448
+ title: 'Персональные данные',
6449
+ columns: 2,
6450
+ inputs: [
6451
+ {
6452
+ fieldType: 'common',
6453
+ name: 'surname',
6454
+ required: true,
6455
+ dadata: true,
6456
+ filledByEsia: true,
6457
+ },
6458
+ { fieldType: 'common', name: 'name', required: true, dadata: true, filledByEsia: true },
6459
+ { fieldType: 'common', name: 'middleName', dadata: true, filledByEsia: true },
6460
+ { fieldType: 'common', name: 'sex', required: true },
6461
+ { fieldType: 'common', name: 'birthday', required: true, filledByEsia: true },
6462
+ { fieldType: 'common', name: 'birthPlace', required: true },
6463
+ { fieldType: 'common', name: 'phone', required: true },
6464
+ { fieldType: 'common', name: 'email', required: true, dadata: true },
6465
+ ],
6466
+ },
6467
+ {
6468
+ title: 'Паспортные данные',
6469
+ columns: 2,
6470
+ inputs: [
6471
+ { fieldType: 'common', name: 'dulSerie', required: true, filledByEsia: true },
6472
+ { fieldType: 'common', name: 'dulNumber', required: true, filledByEsia: true },
6473
+ { fieldType: 'common', name: 'dulIssueDateField', required: true, filledByEsia: true },
6474
+ {
6475
+ fieldType: 'common',
6476
+ name: 'dulSubdivisionCode',
6477
+ required: true,
6478
+ dadata: true,
6479
+ filledByEsia: true,
6480
+ },
6481
+ ],
6482
+ },
6483
+ {
6484
+ inputs: [
6485
+ {
6486
+ fieldType: 'common',
6487
+ name: 'dulIssuedBy',
6488
+ required: true,
6489
+ dadata: true,
6490
+ filledByEsia: true,
6491
+ },
6492
+ {
6493
+ fieldType: 'common',
6494
+ name: 'education',
6495
+ required: true,
6496
+ },
6497
+ ],
6498
+ },
6499
+ {
6500
+ title: 'Адрес регистрации по месту жительства',
6501
+ columns: 1,
6502
+ inputs: [],
6503
+ },
6504
+ {
6505
+ inputs: [
6506
+ {
6507
+ fieldType: 'common',
6508
+ name: 'addressRegistration',
6509
+ required: true,
6510
+ dadata: true,
6511
+ filledByEsia: true,
6512
+ },
6513
+ { fieldType: 'common', name: 'addressMatch' },
6514
+ ],
6515
+ },
6516
+ {
6517
+ columns: 2,
6518
+ inputs: [{ fieldType: 'common', name: 'participantDateRegistration', required: true }],
6519
+ },
6520
+ {
6521
+ title: 'Адрес фактического проживания (место пребывания РФ)',
6522
+ inputs: [],
6523
+ },
6524
+ {
6525
+ columns: 2,
6526
+ inputs: [{ fieldType: 'common', name: 'housing', required: true }],
6527
+ },
6528
+ {
6529
+ inputs: [{ fieldType: 'common', name: 'addressFact', required: true, dadata: true }],
6530
+ },
6531
+ ],
6532
+ [
6533
+ {
6534
+ title: 'Данные о трудоустройстве',
6535
+ inputs: [],
6536
+ },
6537
+ {
6538
+ inputs: [
6539
+ {
6540
+ fieldType: 'info',
6541
+ text: 'Клиент на момент оформления заявки на кредит должен быть: официально трудоустроен более 6 месяцев, если Клиент получает з/п на счет РСХБ, то трудоустроен более 3 месяцев, не должен находиться в декретном отпуске',
6542
+ },
6543
+ ],
6544
+ },
6545
+ {
6546
+ inputs: [
6547
+ { fieldType: 'common', name: 'employment' },
6548
+ { fieldType: 'common', name: 'organizationName', required: true, dadata: true },
6549
+ ],
6550
+ },
6551
+ {
6552
+ columns: 2,
6553
+ inputs: [
6554
+ { fieldType: 'common', name: 'inn', required: true, dadata: true },
6555
+ { fieldType: 'common', name: 'legalForm', required: true },
6556
+ ],
6557
+ },
6558
+ {
6559
+ inputs: [
6560
+ { fieldType: 'common', name: 'organization', required: false },
6561
+ { fieldType: 'common', name: 'amountWorkers', required: false },
6562
+ ],
6563
+ },
6564
+ {
6565
+ columns: 2,
6566
+ inputs: [
6567
+ { fieldType: 'common', name: 'employerActivities', required: false },
6568
+ { fieldType: 'common', name: 'employerOrganization', required: false },
6569
+ { fieldType: 'common', name: 'generalSeniority', required: true },
6570
+ { fieldType: 'common', name: 'lastJobExperience', required: true },
6571
+ { fieldType: 'common', name: 'experience5Years', required: true },
6572
+ { fieldType: 'common', name: 'jobsNumber', required: true },
6573
+ ],
6574
+ },
6575
+ {
6576
+ inputs: [
6577
+ {
6578
+ fieldType: 'common',
6579
+ name: 'organizationPhone',
6580
+ label: 'Телефон работодателя',
6581
+ required: true,
6582
+ },
6583
+ { fieldType: 'common', name: 'beginDate', required: true },
6584
+ ],
6585
+ },
6586
+ {
6587
+ columns: 2,
6588
+ inputs: [
6589
+ { fieldType: 'common', name: 'positionOrganization', required: false },
6590
+ { fieldType: 'common', name: 'partInBusiness', required: true },
6591
+ ],
6592
+ },
6593
+ {
6594
+ title: 'Адрес работодателя',
6595
+ inputs: [],
6596
+ },
6597
+ {
6598
+ inputs: [{ fieldType: 'common', name: 'organizationAddress', required: true, dadata: true }],
6599
+ },
6600
+ ],
6601
+ [
6602
+ {
6603
+ title: 'Семейное положение',
6604
+ },
6605
+ {
6606
+ columns: 1,
6607
+ inputs: [{ fieldType: 'common', name: 'familyStatus', required: true }],
6608
+ },
6609
+ {
6610
+ columns: 1,
6611
+ inputs: [{ fieldType: 'common', name: 'dependents', required: true }],
6612
+ },
6613
+ {
6614
+ columns: 2,
6615
+ inputs: [
6616
+ { fieldType: 'common', name: 'familyMembers' },
6617
+ { fieldType: 'common', name: 'children', required: true },
6618
+ ],
6619
+ },
6620
+ {
6621
+ title: 'Совокупный доход',
6622
+ },
6623
+ {
6624
+ inputs: [
6625
+ {
6626
+ fieldType: 'info',
6627
+ text: 'Сумма основного и дополнительных доходов после вычета налога',
6628
+ },
6629
+ ],
6630
+ },
6631
+ {
6632
+ columns: 1,
6633
+ inputs: [{ fieldType: 'common', name: 'mandatoryIncome', required: true }],
6634
+ },
6635
+ {
6636
+ columns: 1,
6637
+ inputs: [{ fieldType: 'common', name: 'otherPayments', required: true }],
6638
+ },
6639
+ {
6640
+ columns: 1,
6641
+ inputs: [{ fieldType: 'common', name: 'snils', required: true }],
6642
+ },
6643
+ {
6644
+ columns: 1,
6645
+ inputs: [{ fieldType: 'common', name: 'conscription', required: true }],
6646
+ },
6647
+ {
6648
+ columns: 2,
6649
+ inputs: [{ fieldType: 'common', name: 'armyIdFlg' }],
6650
+ },
6651
+ ],
6652
+ [
6653
+ {
6654
+ title: 'Дополнительные сведения',
6655
+ columns: 1,
6656
+ inputs: [],
6657
+ },
6658
+ {
6659
+ inputs: [{ fieldType: 'common', name: 'disablePeopleFlg' }],
6660
+ },
6661
+ {
6662
+ inputs: [{ fieldType: 'common', name: 'bankruptcyFlg' }],
6663
+ },
6664
+ {
6665
+ inputs: [{ fieldType: 'common', name: 'shareholderFlg' }],
6666
+ },
6667
+ {
6668
+ inputs: [{ fieldType: 'common', name: 'legalEntityName' }],
6669
+ },
6670
+ {
6671
+ inputs: [{ fieldType: 'common', name: 'creditInRshbCd' }],
6672
+ },
6673
+ ],
6674
+ [
6675
+ {
6676
+ title: 'Способ получения',
6677
+ columns: 1,
6678
+ inputs: [],
6679
+ },
6680
+ {
6681
+ inputs: [{ fieldType: 'common', name: 'methodObtain' }],
6682
+ },
6683
+ {
6684
+ type: 'courier',
6685
+ title: 'Адрес',
6686
+ columns: 1,
6687
+ inputs: [],
6688
+ },
6689
+ {
6690
+ type: 'courier',
6691
+ inputs: [{ fieldType: 'common', name: 'addressCourier', dadata: true }],
6692
+ },
6693
+ {
6694
+ type: 'courier',
6695
+ inputs: [{ fieldType: 'common', name: 'deliveryDate' }],
6696
+ },
6697
+ {
6698
+ type: 'courier',
6699
+ inputs: [{ fieldType: 'common', name: 'comment' }],
6700
+ },
6701
+ {
6702
+ type: 'office',
6703
+ title: 'Отделение Банка',
6704
+ columns: 1,
6705
+ inputs: [],
6706
+ },
6707
+ {
6708
+ type: 'office',
6709
+ inputs: [{ fieldType: 'common', name: 'regionRetail', required: true }],
6710
+ },
6711
+ {
6712
+ type: 'office',
6713
+ inputs: [{ fieldType: 'common', name: 'addressRetail', required: true }],
6714
+ },
6715
+ {
6716
+ type: 'office',
6717
+ title: 'Код представителя Банка',
6718
+ columns: 1,
6719
+ inputs: [],
6720
+ },
6721
+ {
6722
+ type: 'office',
6723
+ inputs: [
6724
+ {
6725
+ fieldType: 'info',
6726
+ text: 'Если представитель Банка помогал Вам в заведении заявки, введите здесь его код',
6727
+ },
6728
+ ],
6729
+ },
6730
+ {
6731
+ type: 'office',
6732
+ inputs: [{ fieldType: 'common', name: 'bankEmployeeCode' }],
6733
+ },
6734
+ ],
6735
+ ];
6736
+
6737
+ const WIZARD_STEPS$1 = 6;
6738
+ const WIZARD_TITLES$1 = [
6739
+ 'Параметры карты',
6740
+ 'Персональные данные',
6741
+ 'Данные о трудоустройстве',
6742
+ 'Данные о доходах и расходах',
6743
+ 'Дополнительные сведения',
6744
+ 'Выбор способа получения',
6745
+ ];
6746
+ const CreditCardForm = JSX(({ className, ...rest }) => {
6747
+ const [step, setStep] = useState(0);
6748
+ const handleNextStep = useCallback(() => {
6749
+ setStep((_) => Math.min(_ + 1, WIZARD_STEPS$1));
6750
+ }, []);
6751
+ const handlePrevStep = useCallback(() => {
6752
+ //TODO search hook - 1,
6753
+ setStep((_) => Math.max(_ - 1, 0));
6754
+ }, []);
6755
+ const sections = useMemo(() => stepsSectionsMap$1[step], [step]);
6756
+ const inputs = (sections?.flatMap((_) => _?.inputs) || []);
6757
+ const [isFormFinished, setIsFormFinished] = useState(false);
6758
+ 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)) })] }) }));
6759
+ });
6760
+
6761
+ const CreditFormProgress = JSX(({ step = 1, totalSteps = 5, stepsTitles = [] }) => {
6762
+ const progress = useMemo(() => (step / totalSteps) * 100, [step, totalSteps]);
6763
+ 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 })] }) }));
6764
+ });
6765
+
6766
+ 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: {
6767
+ text: infoCard?.link?.text,
6768
+ } })) : null, buttonText ? (jsx(LinkButton, { href: "/natural", text: buttonText, version: "primary", className: "w-full mt-lg" })) : null] })));
6769
+ const SectionInfo = ({ title, items, countColumns = false, }) => {
6770
+ const isMobile = useMobileMode();
6771
+ if (!items) {
6772
+ return null;
6773
+ }
6774
+ 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] })] }));
6775
+ };
6776
+ 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 })] }));
6777
+
6778
+ 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" })));
6779
+
6780
+ const PendingStatusContent = JSX(() => {
6781
+ const [leadForm] = useLocalStorage('leadForm');
6782
+ 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: [
6783
+ {
6784
+ label: 'Название продукта',
6785
+ description: 'Кредит на любые цели',
6786
+ },
6787
+ {
6788
+ label: 'Цель кредита',
6789
+ description: 'На любые цели',
6790
+ },
6791
+ {
6792
+ label: 'Сумма',
6793
+ description: leadForm?.moneyValue?.toLocaleString() + ' ₽',
6794
+ },
6795
+ {
6796
+ label: 'Срок кредита',
6797
+ description: leadForm?.monthsValue + ' мес',
6798
+ },
6799
+ {
6800
+ label: 'Тип платежа',
6801
+ description: leadForm?.isAnnuity ? 'Аннуитетный' : 'Дифференцированный',
6802
+ },
6803
+ ] }));
6804
+ });
6805
+
6806
+ const ReworkStatusContent = JSX(() => {
6807
+ const [leadForm] = useLocalStorage('leadForm');
6808
+ 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: [
6809
+ {
6810
+ label: 'Регион',
6811
+ description: leadForm?.regionRetail?.text,
6812
+ },
6813
+ {
6814
+ label: 'Адрес',
6815
+ description: leadForm?.addressRetail?.text,
6816
+ },
6817
+ ], sectionInfo: [
6818
+ {
6819
+ label: 'Основные документы:',
6820
+ description: '- Паспорт РФ',
6821
+ },
6822
+ ], buttonText: "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043D\u0430 \u0433\u043B\u0430\u0432\u043D\u0443\u044E" }));
6823
+ });
6824
+
6825
+ const SuccessStatusContent = JSX(() => {
6826
+ const [leadForm] = useLocalStorage('leadForm');
6827
+ 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: [
6828
+ {
6829
+ label: 'Название продукта',
6830
+ description: 'Кредит на любые цели',
6831
+ },
6832
+ {
6833
+ label: 'Ставка',
6834
+ description: '14,5%',
6835
+ },
6836
+ {
6837
+ label: 'Ежемесячный платеж',
6838
+ description: '86 052 ₽',
6839
+ },
6840
+ {
6841
+ label: 'Срок кредита',
6842
+ description: leadForm?.monthsValue + ' мес',
6843
+ },
6844
+ {
6845
+ label: 'Тип платежа',
6846
+ description: leadForm?.isAnnuity ? 'Аннуитетный' : 'Дифференцированный',
6847
+ },
6848
+ ], buttonText: "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043D\u0430 \u0433\u043B\u0430\u0432\u043D\u0443\u044E" }));
6849
+ });
6850
+
6851
+ const SIGNAL_TYPES = [
6852
+ 'CREATE_APPLICATION_SHORT_SIGNAL',
6853
+ 'CREATE_APPLICATION_LOAN_V3_SIGNAL',
6854
+ ];
6855
+ const CreditFormStatusTracker = JSX(() => {
6856
+ const [status, setStatus] = useState(STATUS_TYPE.process);
6857
+ const [taskId] = useLocalStorage('taskId');
6858
+ useEffect(() => {
6859
+ for (const signalType of SIGNAL_TYPES) {
6860
+ sendSignalToProcess({ signalType, taskId });
6861
+ }
6862
+ const trackStatus = () => getTaskStatus({ taskId }).then((res) => {
6863
+ if (res.statusCd && res.statusCd !== STATUS_TYPE.process) {
6864
+ clearInterval(pullingInterval);
6865
+ setStatus(res.statusCd);
6866
+ }
6867
+ });
6868
+ const pullingInterval = setInterval(trackStatus, 30000);
6869
+ }, []);
6870
+ return renderStatus(status);
6871
+ });
6872
+ const renderStatus = (status) => {
6873
+ const statusesMap = {
6874
+ IN_PROCESS: jsx(PendingStatusContent, {}),
6875
+ FAILED: jsx(FailedStatusContent, {}),
6876
+ OK: jsx(SuccessStatusContent, {}),
6877
+ REWORK: jsx(ReworkStatusContent, {}),
6878
+ };
6879
+ return statusesMap[status] || null;
6880
+ };
6881
+
6882
+ const formStateMap = {
6883
+ 0: {
6884
+ moneyValue: 0,
6885
+ monthsValue: 0,
6886
+ isAnnuity: false,
6887
+ isInsurance: false,
6888
+ isSalaryClient: false,
6889
+ isPensionClient: false,
6890
+ isStateEmployee: false,
6891
+ },
6892
+ 1: {
6893
+ surname: '',
6894
+ name: '',
6895
+ middleName: '',
6896
+ sex: '',
6897
+ birthday: undefined,
6898
+ birthPlace: '',
6899
+ phone: '',
6900
+ email: '',
6901
+ dulSerie: undefined,
6902
+ dulNumber: undefined,
6903
+ dulIssueDateField: undefined,
6904
+ dulSubdivisionCode: '',
6905
+ dulIssuedBy: '',
6906
+ addressRegistration: {
6907
+ fullAddress: '',
6908
+ fiasCode: '',
6909
+ },
6910
+ participantDateRegistration: undefined,
6911
+ addressFact: {
6912
+ fullAddress: '',
6913
+ fiasCode: '',
6914
+ },
6915
+ housing: '',
6916
+ },
6917
+ 2: {
6918
+ amountWorkers: { key: '', text: '' },
6919
+ beginDate: undefined,
6920
+ employerActivities: { key: '', text: '' },
6921
+ employerOrganization: { key: '', text: '' },
6922
+ employment: { key: '', text: '' },
6923
+ experience5Years: '',
6924
+ inn: undefined,
6925
+ jobsNumber: '',
6926
+ lastJobExperience: '',
6927
+ legalForm: '',
6928
+ organization: { key: '', text: '' },
6929
+ organizationAddress: {
6930
+ fullAddress: '',
6931
+ fiasCode: '',
6932
+ },
6933
+ organizationName: '',
6934
+ organizationPhone: '',
6935
+ partInBusiness: undefined,
6936
+ positionOrganization: { key: '', text: '' },
6937
+ },
6938
+ 3: {
6939
+ familyStatus: { key: '', text: '' },
6940
+ dependents: undefined,
6941
+ familyMembers: undefined,
6942
+ confirmationIncome: { key: '', text: '' },
6943
+ mandatoryIncome: undefined,
6944
+ otherPayments: undefined,
6945
+ snils: '',
6946
+ armyIdFlg: false,
6947
+ },
6948
+ 4: {
6949
+ disablePeopleFlg: false,
6950
+ bankruptcyFlg: false,
6951
+ shareholderFlg: false,
6952
+ legalEntityName: '',
6953
+ creditInRshbCd: undefined,
6954
+ },
6955
+ 5: {
6956
+ regionRetail: '',
6957
+ addressRetail: '',
6958
+ bankEmployeeCode: '',
6959
+ },
6960
+ };
6961
+
6962
+ const getInitialFormState = (step, localStorageData) => {
6963
+ if (localStorageData) {
6964
+ // TODO: Fill in for other fields with type Date
6965
+ // TODO: Take it out to the helper
6966
+ localStorageData.birthday = localStorageData.birthday
6967
+ ? new Date(localStorageData.birthday)
6968
+ : undefined;
6969
+ localStorageData.dulIssueDateField = localStorageData.dulIssueDateField
6970
+ ? new Date(localStorageData.dulIssueDateField)
6971
+ : undefined;
6972
+ localStorageData.participantDateRegistration = localStorageData.participantDateRegistration
6973
+ ? new Date(localStorageData.participantDateRegistration)
6974
+ : undefined;
6975
+ localStorageData.beginDate = localStorageData?.beginDate
6976
+ ? new Date(localStorageData.beginDate)
6977
+ : undefined;
6978
+ }
6979
+ return {
6980
+ ...formStateMap[step],
6981
+ ...localStorageData,
6982
+ };
6983
+ };
6984
+
6985
+ const renderInfo$1 = (inputs = []) => {
6986
+ const infoInputs = inputs.filter((_) => _.fieldType === 'info');
6987
+ return infoInputs.length
6988
+ ? infoInputs.map(({ text, name }, i) => jsx(InfoCard, { __html: text }, `${name}_${i}`))
6989
+ : null;
6990
+ };
6991
+
6992
+ const renderInputs = ({ field, inputs }) => (inputs || [])?.map(getField(field, ''));
6993
+
6994
+ const renderStep = ({ sections, field }) => sections?.map(({ inputs, columns, title }, i) => (jsxs("div", { className: style(inputColumnStyles(columns), 'grid gap-x-m'), children: [renderInfo$1(inputs), renderTitle(title), renderInputs({ field, inputs })] }, `section-${i}`)));
6995
+
6996
+ const StepsNavigationButtons = JSX(({ step, onPrevStep }) => {
6997
+ const isFirstStep = step === 0;
6998
+ 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" })] }));
6999
+ });
7000
+
7001
+ const getFirstStepData = (formData) => {
7002
+ const { name, surname, middleName, birthday = '', phone = '', email, sex, birthPlace, dulIssueDateField = '', dulIssuedBy, dulNumber, dulSerie, dulSubdivisionCode, education, participantDateRegistration = '', housing, addressRegistration, addressFact, } = formData;
7003
+ return {
7004
+ birthDate: formatDate(birthday, true),
7005
+ midname: middleName,
7006
+ name,
7007
+ surname,
7008
+ birthPlace,
7009
+ dulIssueDate: formatDate(dulIssueDateField, true),
7010
+ dulIssuedBy,
7011
+ dulNumber,
7012
+ dulSerie,
7013
+ dulSubdivisionCode,
7014
+ educationLevelCd: education,
7015
+ registrationDate: formatDate(participantDateRegistration, true),
7016
+ houseTypeCd: housing,
7017
+ participantContacts: getParticipantContacts({
7018
+ phone: formatPhone(phone),
7019
+ email,
7020
+ }),
7021
+ participantAddresses: getParticipantAddresses({ addressRegistration, addressFact }),
7022
+ genderCd: sex
7023
+ ? {
7024
+ key: sex === 'male' ? 'MAN' : 'WOMAN',
7025
+ }
7026
+ : undefined,
7027
+ };
7028
+ };
7029
+
7030
+ const getFourthStepData = (formData) => {
7031
+ const { bankruptcyFlg, shareholderFlg, legalEntityName, creditInRshbCd } = formData;
7032
+ return {
7033
+ bankruptcyFlg,
7034
+ shareholderFlg,
7035
+ nameLegalEntity: legalEntityName,
7036
+ creditInRshbCd,
7037
+ };
7038
+ };
7039
+
7040
+ const getSecondStepData = (formData) => {
7041
+ const { employment, organizationName, inn, legalForm, organization, amountWorkers, employerActivities, employerOrganization, generalSeniority, lastJobExperience, experience5Years, jobsNumber, organizationPhone, organizationAddress, positionOrganization, } = formData;
7042
+ return {
7043
+ employmentTypeCd: employment,
7044
+ organizationName,
7045
+ organizationInn: inn,
7046
+ organizationActivityTypeCd: employerActivities,
7047
+ organizationTypeCd: organization,
7048
+ organizationKindCd: employerOrganization,
7049
+ employeesNumberCd: amountWorkers,
7050
+ opf: legalForm,
7051
+ seniority: generalSeniority,
7052
+ generalSeniority: experience5Years,
7053
+ jobsNumber,
7054
+ lastWorkDuration: lastJobExperience,
7055
+ positionCd: positionOrganization,
7056
+ participantContacts: getParticipantContacts({
7057
+ organizationPhone: organizationPhone && formatPhone(organizationPhone),
7058
+ }),
7059
+ participantAddresses: getParticipantAddresses({ organizationAddress }),
7060
+ };
7061
+ };
7062
+
7063
+ const getThirdStepData = (formData) => {
7064
+ const { familyStatus, dependents, familyMembers, confirmationIncome, mandatoryIncome, otherPayments, snils, armyIdFlg, } = formData;
7065
+ return {
7066
+ maritalStatusCd: familyStatus,
7067
+ totalDependents: familyMembers,
7068
+ incomeCertificateCd: confirmationIncome,
7069
+ otherDependents: dependents,
7070
+ participantIncomes: getParticipantIncomes({
7071
+ mandatoryIncome,
7072
+ otherPayments,
7073
+ }),
7074
+ snils: snils?.replaceAll(' ', ''),
7075
+ armyIdFlg,
7076
+ };
7077
+ };
7078
+
7079
+ const getCreditFormTaskData = ({ participantId, taskId, profileId, formData, step = 0, }) => ({
7080
+ sendToBank: true,
7081
+ taskKind: 'UNITED',
7082
+ task: {
7083
+ taskSource: globalThis.location.origin,
7084
+ id: taskId,
7085
+ //TODO: Добавить id офиса
7086
+ authorizedAgentId: formData?.bankEmployeeCode,
7087
+ participants: [
7088
+ {
7089
+ id: participantId,
7090
+ profile: {
7091
+ id: profileId,
7092
+ },
7093
+ roleCd: {
7094
+ key: 'BORROWER',
7095
+ value: 'Заемщик',
7096
+ },
7097
+ ...getCurrentStepData(step, formData),
7098
+ },
7099
+ ],
7100
+ esiaAccountTypeCd: {
7101
+ key: formData?.esiaAccountTypeCd?.key,
7102
+ },
7103
+ },
7104
+ });
7105
+ const getCurrentStepData = (step, formData) => {
7106
+ switch (step) {
7107
+ case 1:
7108
+ return getFirstStepData(formData);
7109
+ case 2:
7110
+ return getSecondStepData(formData);
7111
+ case 3:
7112
+ return getThirdStepData(formData);
7113
+ case 4:
7114
+ return getFourthStepData(formData);
7115
+ default:
7116
+ return {};
6309
7117
  }
6310
7118
  };
6311
7119
 
@@ -8404,6 +9212,7 @@
8404
9212
  CarouselLinks,
8405
9213
  CarouselRecommendationCard,
8406
9214
  CarouselTariffsCard,
9215
+ CreditCardForm,
8407
9216
  CreditForm,
8408
9217
  DepositFiltration,
8409
9218
  Depository,
@@ -8573,7 +9382,7 @@
8573
9382
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
8574
9383
  });
8575
9384
 
8576
- const packageVersion = "0.14.650";
9385
+ const packageVersion = "0.14.651";
8577
9386
 
8578
9387
  exports.Blocks = Blocks;
8579
9388
  exports.ContentPage = ContentPage;