@redneckz/wildless-cms-uni-blocks 0.14.608 → 0.14.616

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 (676) hide show
  1. package/bundle/api/RetailAPI/updateUserProfile.d.ts +2 -0
  2. package/bundle/api/RetailAPI/utils/getUpdateUserTask.d.ts +2 -1
  3. package/bundle/blocks.schema.json +1 -1
  4. package/bundle/bundle.umd.js +483 -177
  5. package/bundle/bundle.umd.min.js +1 -1
  6. package/bundle/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -0
  7. package/bundle/components/ApplicationStatus/ApplicationStatus.d.ts +5 -0
  8. package/bundle/components/ApplicationStatus/ApplicationStatusContent.d.ts +18 -0
  9. package/bundle/components/CreditForm/CreditForm.d.ts +2 -9
  10. package/bundle/components/CreditForm/CreditFormContent.d.ts +9 -1
  11. package/bundle/components/CreditForm/CreditFormStep.d.ts +17 -0
  12. package/bundle/components/CreditForm/StepsNavigationButtons.d.ts +1 -1
  13. package/bundle/components/CreditForm/creditFormStepsData.d.ts +40 -2
  14. package/bundle/components/CreditForm/getInitialFormState.d.ts +62 -0
  15. package/bundle/components/CreditForm/renderInputs.d.ts +3 -0
  16. package/bundle/components/CreditForm/useCreditFormApi.d.ts +11 -0
  17. package/bundle/ui-kit/ConsentBkiDialog/ConsentBkiDialog.d.ts +5 -0
  18. package/bundle/ui-kit/ConsentBkiDialog/useConsentBkiDialog.d.ts +3 -0
  19. package/bundle/ui-kit/DatePicker/DatePickerInput.d.ts +10 -0
  20. package/bundle/ui-kit/DatePicker/getYears.d.ts +1 -0
  21. package/bundle/ui-kit/DatePicker/useDatePickerManager.d.ts +3 -1
  22. package/bundle/ui-kit/DialogManager/openDocument.d.ts +2 -0
  23. package/bundle/ui-kit/FormField/Fields/PartInBusinessField.d.ts +2 -0
  24. package/bundle/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  25. package/bundle/ui-kit/FormField/validators.d.ts +1 -0
  26. package/bundle/ui-kit/InfoCard/InfoCard.d.ts +3 -2
  27. package/bundle/ui-kit/Input/InputNumberControl.d.ts +2 -0
  28. package/bundle/ui-kit/Input/InputProps.d.ts +2 -1
  29. package/bundle/ui-kit/InputNumber/InputNumber.d.ts +2 -0
  30. package/bundle/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +1 -1
  31. package/bundle/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.d.ts +2 -3
  32. package/bundle/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +1 -1
  33. package/bundle/utils/normalizeWithMask.d.ts +1 -0
  34. package/dist/api/RetailAPI/updateUserProfile.d.ts +2 -0
  35. package/dist/api/RetailAPI/updateUserProfile.js +1 -1
  36. package/dist/api/RetailAPI/updateUserProfile.js.map +1 -1
  37. package/dist/api/RetailAPI/utils/getUpdateUserTask.d.ts +2 -1
  38. package/dist/api/RetailAPI/utils/getUpdateUserTask.js +39 -34
  39. package/dist/api/RetailAPI/utils/getUpdateUserTask.js.map +1 -1
  40. package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +1 -1
  41. package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  42. package/dist/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -0
  43. package/dist/components/ApplicationLeadForm/getInitialFormState.js +2 -1
  44. package/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  45. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +8 -7
  46. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  47. package/dist/components/ApplicationStatus/ApplicationStatus.d.ts +5 -0
  48. package/dist/components/ApplicationStatus/ApplicationStatus.js +25 -0
  49. package/dist/components/ApplicationStatus/ApplicationStatus.js.map +1 -0
  50. package/dist/components/ApplicationStatus/ApplicationStatusContent.d.ts +18 -0
  51. package/dist/components/ApplicationStatus/ApplicationStatusContent.js +2 -0
  52. package/dist/components/ApplicationStatus/ApplicationStatusContent.js.map +1 -0
  53. package/dist/components/Blocks.js +2 -0
  54. package/dist/components/Blocks.js.map +1 -1
  55. package/dist/components/CreditForm/CreditForm.d.ts +2 -9
  56. package/dist/components/CreditForm/CreditForm.js +11 -19
  57. package/dist/components/CreditForm/CreditForm.js.map +1 -1
  58. package/dist/components/CreditForm/CreditFormContent.d.ts +9 -1
  59. package/dist/components/CreditForm/CreditFormStep.d.ts +17 -0
  60. package/dist/components/CreditForm/CreditFormStep.js +33 -0
  61. package/dist/components/CreditForm/CreditFormStep.js.map +1 -0
  62. package/dist/components/CreditForm/StepsNavigationButtons.d.ts +1 -1
  63. package/dist/components/CreditForm/StepsNavigationButtons.js +2 -12
  64. package/dist/components/CreditForm/StepsNavigationButtons.js.map +1 -1
  65. package/dist/components/CreditForm/creditFormStepsData.d.ts +40 -2
  66. package/dist/components/CreditForm/creditFormStepsData.js +31 -26
  67. package/dist/components/CreditForm/creditFormStepsData.js.map +1 -1
  68. package/dist/components/CreditForm/getInitialFormState.d.ts +62 -0
  69. package/dist/components/CreditForm/getInitialFormState.js +77 -0
  70. package/dist/components/CreditForm/getInitialFormState.js.map +1 -0
  71. package/dist/components/CreditForm/renderInputs.d.ts +3 -0
  72. package/dist/components/CreditForm/renderInputs.js +8 -0
  73. package/dist/components/CreditForm/renderInputs.js.map +1 -0
  74. package/dist/components/CreditForm/useCreditFormApi.d.ts +11 -0
  75. package/dist/components/CreditForm/useCreditFormApi.js +28 -0
  76. package/dist/components/CreditForm/useCreditFormApi.js.map +1 -0
  77. package/dist/ui-kit/Checkbox/CheckboxWithDoc.js +2 -7
  78. package/dist/ui-kit/Checkbox/CheckboxWithDoc.js.map +1 -1
  79. package/dist/ui-kit/ConsentBkiDialog/ConsentBkiDialog.d.ts +5 -0
  80. package/dist/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js +44 -0
  81. package/dist/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js.map +1 -0
  82. package/dist/ui-kit/ConsentBkiDialog/useConsentBkiDialog.d.ts +3 -0
  83. package/dist/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js +49 -0
  84. package/dist/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js.map +1 -0
  85. package/dist/ui-kit/DatePicker/DatePicker.js +16 -5
  86. package/dist/ui-kit/DatePicker/DatePicker.js.map +1 -1
  87. package/dist/ui-kit/DatePicker/DatePickerInput.d.ts +10 -0
  88. package/dist/ui-kit/DatePicker/DatePickerInput.js +66 -0
  89. package/dist/ui-kit/DatePicker/DatePickerInput.js.map +1 -0
  90. package/dist/ui-kit/DatePicker/getYears.d.ts +1 -0
  91. package/dist/ui-kit/DatePicker/getYears.js +3 -3
  92. package/dist/ui-kit/DatePicker/getYears.js.map +1 -1
  93. package/dist/ui-kit/DatePicker/useDatePickerManager.d.ts +3 -1
  94. package/dist/ui-kit/DatePicker/useDatePickerManager.js +29 -3
  95. package/dist/ui-kit/DatePicker/useDatePickerManager.js.map +1 -1
  96. package/dist/ui-kit/DialogManager/openDocument.d.ts +2 -0
  97. package/dist/ui-kit/DialogManager/openDocument.js +11 -0
  98. package/dist/ui-kit/DialogManager/openDocument.js.map +1 -0
  99. package/dist/ui-kit/FormField/Fields/DependentsField.js +2 -2
  100. package/dist/ui-kit/FormField/Fields/DependentsField.js.map +1 -1
  101. package/dist/ui-kit/FormField/Fields/DulNumberField.js +2 -2
  102. package/dist/ui-kit/FormField/Fields/DulNumberField.js.map +1 -1
  103. package/dist/ui-kit/FormField/Fields/DulSerieField.js +2 -2
  104. package/dist/ui-kit/FormField/Fields/DulSerieField.js.map +1 -1
  105. package/dist/ui-kit/FormField/Fields/DulSubdivisionCodeField.js +2 -2
  106. package/dist/ui-kit/FormField/Fields/DulSubdivisionCodeField.js.map +1 -1
  107. package/dist/ui-kit/FormField/Fields/Experience5YearsField.js +2 -2
  108. package/dist/ui-kit/FormField/Fields/Experience5YearsField.js.map +1 -1
  109. package/dist/ui-kit/FormField/Fields/FamilyMembersField.js +2 -2
  110. package/dist/ui-kit/FormField/Fields/FamilyMembersField.js.map +1 -1
  111. package/dist/ui-kit/FormField/Fields/GeneralSeniorityField.js +2 -2
  112. package/dist/ui-kit/FormField/Fields/GeneralSeniorityField.js.map +1 -1
  113. package/dist/ui-kit/FormField/Fields/InnField.js +2 -2
  114. package/dist/ui-kit/FormField/Fields/InnField.js.map +1 -1
  115. package/dist/ui-kit/FormField/Fields/JobsNumberField.js +2 -2
  116. package/dist/ui-kit/FormField/Fields/JobsNumberField.js.map +1 -1
  117. package/dist/ui-kit/FormField/Fields/LastJobExperienceField.js +2 -2
  118. package/dist/ui-kit/FormField/Fields/LastJobExperienceField.js.map +1 -1
  119. package/dist/ui-kit/FormField/Fields/PartInBusinessField.d.ts +2 -0
  120. package/dist/ui-kit/FormField/Fields/PartInBusinessField.js +9 -0
  121. package/dist/ui-kit/FormField/Fields/PartInBusinessField.js.map +1 -0
  122. package/dist/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  123. package/dist/ui-kit/FormField/SelectField.js +1 -1
  124. package/dist/ui-kit/FormField/SelectField.js.map +1 -1
  125. package/dist/ui-kit/FormField/getField.js +2 -0
  126. package/dist/ui-kit/FormField/getField.js.map +1 -1
  127. package/dist/ui-kit/FormField/getObjectValidator.js +6 -5
  128. package/dist/ui-kit/FormField/getObjectValidator.js.map +1 -1
  129. package/dist/ui-kit/FormField/validators.d.ts +1 -0
  130. package/dist/ui-kit/FormField/validators.js +3 -1
  131. package/dist/ui-kit/FormField/validators.js.map +1 -1
  132. package/dist/ui-kit/InfoCard/InfoCard.d.ts +3 -2
  133. package/dist/ui-kit/InfoCard/InfoCard.js +2 -1
  134. package/dist/ui-kit/InfoCard/InfoCard.js.map +1 -1
  135. package/dist/ui-kit/Input/InputNumberControl.d.ts +2 -0
  136. package/dist/ui-kit/Input/InputNumberControl.js +10 -0
  137. package/dist/ui-kit/Input/InputNumberControl.js.map +1 -0
  138. package/dist/ui-kit/Input/InputProps.d.ts +2 -1
  139. package/dist/ui-kit/InputNumber/InputNumber.d.ts +2 -0
  140. package/dist/ui-kit/InputNumber/InputNumber.js +12 -0
  141. package/dist/ui-kit/InputNumber/InputNumber.js.map +1 -0
  142. package/dist/ui-kit/SnilsInput/SnilsInput.js +2 -2
  143. package/dist/ui-kit/SnilsInput/SnilsInput.js.map +1 -1
  144. package/dist/ui-kit/TimerCircle/TimerCircle.js +3 -2
  145. package/dist/ui-kit/TimerCircle/TimerCircle.js.map +1 -1
  146. package/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +1 -1
  147. package/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.d.ts +2 -3
  148. package/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.js +2 -2
  149. package/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.js.map +1 -1
  150. package/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +1 -1
  151. package/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js +1 -1
  152. package/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -1
  153. package/dist/utils/normalizeWithMask.d.ts +1 -0
  154. package/dist/utils/normalizeWithMask.js +20 -0
  155. package/dist/utils/normalizeWithMask.js.map +1 -0
  156. package/lib/api/RetailAPI/updateUserProfile.d.ts +2 -0
  157. package/lib/api/RetailAPI/updateUserProfile.js +1 -1
  158. package/lib/api/RetailAPI/updateUserProfile.js.map +1 -1
  159. package/lib/api/RetailAPI/utils/getUpdateUserTask.d.ts +2 -1
  160. package/lib/api/RetailAPI/utils/getUpdateUserTask.js +39 -34
  161. package/lib/api/RetailAPI/utils/getUpdateUserTask.js.map +1 -1
  162. package/lib/common.css +1 -1
  163. package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +1 -1
  164. package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  165. package/lib/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -0
  166. package/lib/components/ApplicationLeadForm/getInitialFormState.js +2 -1
  167. package/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  168. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +8 -7
  169. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  170. package/lib/components/ApplicationStatus/ApplicationStatus.d.ts +5 -0
  171. package/lib/components/ApplicationStatus/ApplicationStatus.fixture.d.ts +9 -0
  172. package/lib/components/ApplicationStatus/ApplicationStatus.js +23 -0
  173. package/lib/components/ApplicationStatus/ApplicationStatus.js.map +1 -0
  174. package/lib/components/ApplicationStatus/ApplicationStatusContent.d.ts +18 -0
  175. package/lib/components/ApplicationStatus/ApplicationStatusContent.js +2 -0
  176. package/lib/components/ApplicationStatus/ApplicationStatusContent.js.map +1 -0
  177. package/lib/components/Blocks.js +2 -0
  178. package/lib/components/Blocks.js.map +1 -1
  179. package/lib/components/CreditForm/CreditForm.d.ts +2 -9
  180. package/lib/components/CreditForm/CreditForm.js +12 -20
  181. package/lib/components/CreditForm/CreditForm.js.map +1 -1
  182. package/lib/components/CreditForm/CreditFormContent.d.ts +9 -1
  183. package/lib/components/CreditForm/CreditFormStep.d.ts +17 -0
  184. package/lib/components/CreditForm/CreditFormStep.js +31 -0
  185. package/lib/components/CreditForm/CreditFormStep.js.map +1 -0
  186. package/lib/components/CreditForm/StepsNavigationButtons.d.ts +1 -1
  187. package/lib/components/CreditForm/StepsNavigationButtons.js +2 -12
  188. package/lib/components/CreditForm/StepsNavigationButtons.js.map +1 -1
  189. package/lib/components/CreditForm/creditFormStepsData.d.ts +40 -2
  190. package/lib/components/CreditForm/creditFormStepsData.js +31 -26
  191. package/lib/components/CreditForm/creditFormStepsData.js.map +1 -1
  192. package/lib/components/CreditForm/getInitialFormState.d.ts +62 -0
  193. package/lib/components/CreditForm/getInitialFormState.js +74 -0
  194. package/lib/components/CreditForm/getInitialFormState.js.map +1 -0
  195. package/lib/components/CreditForm/renderInputs.d.ts +2 -0
  196. package/lib/components/CreditForm/renderInputs.js +5 -0
  197. package/lib/components/CreditForm/renderInputs.js.map +1 -0
  198. package/lib/components/CreditForm/useCreditFormApi.d.ts +11 -0
  199. package/lib/components/CreditForm/useCreditFormApi.js +25 -0
  200. package/lib/components/CreditForm/useCreditFormApi.js.map +1 -0
  201. package/lib/ui-kit/Checkbox/CheckboxWithDoc.js +2 -7
  202. package/lib/ui-kit/Checkbox/CheckboxWithDoc.js.map +1 -1
  203. package/lib/ui-kit/ConsentBkiDialog/ConsentBkiDialog.d.ts +5 -0
  204. package/lib/ui-kit/ConsentBkiDialog/ConsentBkiDialog.fixture.d.ts +6 -0
  205. package/lib/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js +42 -0
  206. package/lib/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js.map +1 -0
  207. package/lib/ui-kit/ConsentBkiDialog/useConsentBkiDialog.d.ts +3 -0
  208. package/lib/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js +46 -0
  209. package/lib/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js.map +1 -0
  210. package/lib/ui-kit/DatePicker/DatePicker.js +16 -5
  211. package/lib/ui-kit/DatePicker/DatePicker.js.map +1 -1
  212. package/lib/ui-kit/DatePicker/DatePickerInput.d.ts +10 -0
  213. package/lib/ui-kit/DatePicker/DatePickerInput.js +64 -0
  214. package/lib/ui-kit/DatePicker/DatePickerInput.js.map +1 -0
  215. package/lib/ui-kit/DatePicker/getYears.d.ts +1 -0
  216. package/lib/ui-kit/DatePicker/getYears.js +1 -1
  217. package/lib/ui-kit/DatePicker/getYears.js.map +1 -1
  218. package/lib/ui-kit/DatePicker/useDatePickerManager.d.ts +3 -1
  219. package/lib/ui-kit/DatePicker/useDatePickerManager.js +29 -3
  220. package/lib/ui-kit/DatePicker/useDatePickerManager.js.map +1 -1
  221. package/lib/ui-kit/DialogManager/openDocument.d.ts +2 -0
  222. package/lib/ui-kit/DialogManager/openDocument.js +8 -0
  223. package/lib/ui-kit/DialogManager/openDocument.js.map +1 -0
  224. package/lib/ui-kit/FormField/Fields/DependentsField.js +2 -2
  225. package/lib/ui-kit/FormField/Fields/DependentsField.js.map +1 -1
  226. package/lib/ui-kit/FormField/Fields/DulNumberField.js +2 -2
  227. package/lib/ui-kit/FormField/Fields/DulNumberField.js.map +1 -1
  228. package/lib/ui-kit/FormField/Fields/DulSerieField.js +2 -2
  229. package/lib/ui-kit/FormField/Fields/DulSerieField.js.map +1 -1
  230. package/lib/ui-kit/FormField/Fields/DulSubdivisionCodeField.js +2 -2
  231. package/lib/ui-kit/FormField/Fields/DulSubdivisionCodeField.js.map +1 -1
  232. package/lib/ui-kit/FormField/Fields/Experience5YearsField.js +2 -2
  233. package/lib/ui-kit/FormField/Fields/Experience5YearsField.js.map +1 -1
  234. package/lib/ui-kit/FormField/Fields/FamilyMembersField.js +2 -2
  235. package/lib/ui-kit/FormField/Fields/FamilyMembersField.js.map +1 -1
  236. package/lib/ui-kit/FormField/Fields/GeneralSeniorityField.js +2 -2
  237. package/lib/ui-kit/FormField/Fields/GeneralSeniorityField.js.map +1 -1
  238. package/lib/ui-kit/FormField/Fields/InnField.js +2 -2
  239. package/lib/ui-kit/FormField/Fields/InnField.js.map +1 -1
  240. package/lib/ui-kit/FormField/Fields/JobsNumberField.js +2 -2
  241. package/lib/ui-kit/FormField/Fields/JobsNumberField.js.map +1 -1
  242. package/lib/ui-kit/FormField/Fields/LastJobExperienceField.js +2 -2
  243. package/lib/ui-kit/FormField/Fields/LastJobExperienceField.js.map +1 -1
  244. package/lib/ui-kit/FormField/Fields/PartInBusinessField.d.ts +2 -0
  245. package/lib/ui-kit/FormField/Fields/PartInBusinessField.js +7 -0
  246. package/lib/ui-kit/FormField/Fields/PartInBusinessField.js.map +1 -0
  247. package/lib/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  248. package/lib/ui-kit/FormField/SelectField.js +1 -1
  249. package/lib/ui-kit/FormField/SelectField.js.map +1 -1
  250. package/lib/ui-kit/FormField/getField.js +2 -0
  251. package/lib/ui-kit/FormField/getField.js.map +1 -1
  252. package/lib/ui-kit/FormField/getObjectValidator.js +7 -6
  253. package/lib/ui-kit/FormField/getObjectValidator.js.map +1 -1
  254. package/lib/ui-kit/FormField/validators.d.ts +1 -0
  255. package/lib/ui-kit/FormField/validators.js +1 -0
  256. package/lib/ui-kit/FormField/validators.js.map +1 -1
  257. package/lib/ui-kit/InfoCard/InfoCard.d.ts +3 -2
  258. package/lib/ui-kit/InfoCard/InfoCard.js +2 -1
  259. package/lib/ui-kit/InfoCard/InfoCard.js.map +1 -1
  260. package/lib/ui-kit/Input/InputNumberControl.d.ts +2 -0
  261. package/lib/ui-kit/Input/InputNumberControl.js +8 -0
  262. package/lib/ui-kit/Input/InputNumberControl.js.map +1 -0
  263. package/lib/ui-kit/Input/InputProps.d.ts +2 -1
  264. package/lib/ui-kit/InputNumber/InputNumber.d.ts +2 -0
  265. package/lib/ui-kit/InputNumber/InputNumber.js +10 -0
  266. package/lib/ui-kit/InputNumber/InputNumber.js.map +1 -0
  267. package/lib/ui-kit/SnilsInput/SnilsInput.js +2 -2
  268. package/lib/ui-kit/SnilsInput/SnilsInput.js.map +1 -1
  269. package/lib/ui-kit/TimerCircle/TimerCircle.js +3 -2
  270. package/lib/ui-kit/TimerCircle/TimerCircle.js.map +1 -1
  271. package/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +1 -1
  272. package/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.d.ts +2 -3
  273. package/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.js +2 -2
  274. package/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.js.map +1 -1
  275. package/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +1 -1
  276. package/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js +1 -1
  277. package/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -1
  278. package/lib/utils/normalizeWithMask.d.ts +1 -0
  279. package/lib/utils/normalizeWithMask.js +17 -0
  280. package/lib/utils/normalizeWithMask.js.map +1 -0
  281. package/mobile/bundle/api/RetailAPI/updateUserProfile.d.ts +2 -0
  282. package/mobile/bundle/api/RetailAPI/utils/getUpdateUserTask.d.ts +2 -1
  283. package/mobile/bundle/bundle.umd.js +462 -177
  284. package/mobile/bundle/bundle.umd.min.js +1 -1
  285. package/mobile/bundle/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -0
  286. package/mobile/bundle/components/ApplicationStatus/ApplicationStatus.d.ts +5 -0
  287. package/mobile/bundle/components/ApplicationStatus/ApplicationStatusContent.d.ts +18 -0
  288. package/mobile/bundle/components/CreditForm/CreditForm.d.ts +2 -9
  289. package/mobile/bundle/components/CreditForm/CreditFormContent.d.ts +9 -1
  290. package/mobile/bundle/components/CreditForm/CreditFormStep.d.ts +17 -0
  291. package/mobile/bundle/components/CreditForm/StepsNavigationButtons.d.ts +1 -1
  292. package/mobile/bundle/components/CreditForm/creditFormStepsData.d.ts +40 -2
  293. package/mobile/bundle/components/CreditForm/getInitialFormState.d.ts +62 -0
  294. package/mobile/bundle/components/CreditForm/renderInputs.d.ts +3 -0
  295. package/mobile/bundle/components/CreditForm/useCreditFormApi.d.ts +11 -0
  296. package/mobile/bundle/ui-kit/ConsentBkiDialog/ConsentBkiDialog.d.ts +5 -0
  297. package/mobile/bundle/ui-kit/ConsentBkiDialog/useConsentBkiDialog.d.ts +3 -0
  298. package/mobile/bundle/ui-kit/DatePicker/DatePickerInput.d.ts +10 -0
  299. package/mobile/bundle/ui-kit/DatePicker/getYears.d.ts +1 -0
  300. package/mobile/bundle/ui-kit/DatePicker/useDatePickerManager.d.ts +3 -1
  301. package/mobile/bundle/ui-kit/DialogManager/openDocument.d.ts +2 -0
  302. package/mobile/bundle/ui-kit/FormField/Fields/PartInBusinessField.d.ts +2 -0
  303. package/mobile/bundle/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  304. package/mobile/bundle/ui-kit/FormField/validators.d.ts +1 -0
  305. package/mobile/bundle/ui-kit/InfoCard/InfoCard.d.ts +3 -2
  306. package/mobile/bundle/ui-kit/Input/InputNumberControl.d.ts +2 -0
  307. package/mobile/bundle/ui-kit/Input/InputProps.d.ts +2 -1
  308. package/mobile/bundle/ui-kit/InputNumber/InputNumber.d.ts +2 -0
  309. package/mobile/bundle/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +1 -1
  310. package/mobile/bundle/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.d.ts +2 -3
  311. package/mobile/bundle/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +1 -1
  312. package/mobile/bundle/utils/normalizeWithMask.d.ts +1 -0
  313. package/mobile/dist/api/RetailAPI/updateUserProfile.d.ts +2 -0
  314. package/mobile/dist/api/RetailAPI/updateUserProfile.js +1 -1
  315. package/mobile/dist/api/RetailAPI/updateUserProfile.js.map +1 -1
  316. package/mobile/dist/api/RetailAPI/utils/getUpdateUserTask.d.ts +2 -1
  317. package/mobile/dist/api/RetailAPI/utils/getUpdateUserTask.js +39 -34
  318. package/mobile/dist/api/RetailAPI/utils/getUpdateUserTask.js.map +1 -1
  319. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +1 -1
  320. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  321. package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -0
  322. package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.js +2 -1
  323. package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  324. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +8 -7
  325. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  326. package/mobile/dist/components/ApplicationStatus/ApplicationStatus.d.ts +5 -0
  327. package/mobile/dist/components/ApplicationStatus/ApplicationStatus.js +25 -0
  328. package/mobile/dist/components/ApplicationStatus/ApplicationStatus.js.map +1 -0
  329. package/mobile/dist/components/ApplicationStatus/ApplicationStatusContent.d.ts +18 -0
  330. package/mobile/dist/components/ApplicationStatus/ApplicationStatusContent.js +2 -0
  331. package/mobile/dist/components/ApplicationStatus/ApplicationStatusContent.js.map +1 -0
  332. package/mobile/dist/components/CreditForm/CreditForm.d.ts +2 -9
  333. package/mobile/dist/components/CreditForm/CreditForm.js +11 -19
  334. package/mobile/dist/components/CreditForm/CreditForm.js.map +1 -1
  335. package/mobile/dist/components/CreditForm/CreditFormContent.d.ts +9 -1
  336. package/mobile/dist/components/CreditForm/CreditFormStep.d.ts +17 -0
  337. package/mobile/dist/components/CreditForm/CreditFormStep.js +33 -0
  338. package/mobile/dist/components/CreditForm/CreditFormStep.js.map +1 -0
  339. package/mobile/dist/components/CreditForm/StepsNavigationButtons.d.ts +1 -1
  340. package/mobile/dist/components/CreditForm/StepsNavigationButtons.js +2 -12
  341. package/mobile/dist/components/CreditForm/StepsNavigationButtons.js.map +1 -1
  342. package/mobile/dist/components/CreditForm/creditFormStepsData.d.ts +40 -2
  343. package/mobile/dist/components/CreditForm/creditFormStepsData.js +31 -26
  344. package/mobile/dist/components/CreditForm/creditFormStepsData.js.map +1 -1
  345. package/mobile/dist/components/CreditForm/getInitialFormState.d.ts +62 -0
  346. package/mobile/dist/components/CreditForm/getInitialFormState.js +77 -0
  347. package/mobile/dist/components/CreditForm/getInitialFormState.js.map +1 -0
  348. package/mobile/dist/components/CreditForm/renderInputs.d.ts +3 -0
  349. package/mobile/dist/components/CreditForm/renderInputs.js +8 -0
  350. package/mobile/dist/components/CreditForm/renderInputs.js.map +1 -0
  351. package/mobile/dist/components/CreditForm/useCreditFormApi.d.ts +11 -0
  352. package/mobile/dist/components/CreditForm/useCreditFormApi.js +28 -0
  353. package/mobile/dist/components/CreditForm/useCreditFormApi.js.map +1 -0
  354. package/mobile/dist/ui-kit/Checkbox/CheckboxWithDoc.js +2 -7
  355. package/mobile/dist/ui-kit/Checkbox/CheckboxWithDoc.js.map +1 -1
  356. package/mobile/dist/ui-kit/ConsentBkiDialog/ConsentBkiDialog.d.ts +5 -0
  357. package/mobile/dist/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js +44 -0
  358. package/mobile/dist/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js.map +1 -0
  359. package/mobile/dist/ui-kit/ConsentBkiDialog/useConsentBkiDialog.d.ts +3 -0
  360. package/mobile/dist/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js +49 -0
  361. package/mobile/dist/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js.map +1 -0
  362. package/mobile/dist/ui-kit/DatePicker/DatePicker.js +16 -5
  363. package/mobile/dist/ui-kit/DatePicker/DatePicker.js.map +1 -1
  364. package/mobile/dist/ui-kit/DatePicker/DatePickerInput.d.ts +10 -0
  365. package/mobile/dist/ui-kit/DatePicker/DatePickerInput.js +66 -0
  366. package/mobile/dist/ui-kit/DatePicker/DatePickerInput.js.map +1 -0
  367. package/mobile/dist/ui-kit/DatePicker/getYears.d.ts +1 -0
  368. package/mobile/dist/ui-kit/DatePicker/getYears.js +3 -3
  369. package/mobile/dist/ui-kit/DatePicker/getYears.js.map +1 -1
  370. package/mobile/dist/ui-kit/DatePicker/useDatePickerManager.d.ts +3 -1
  371. package/mobile/dist/ui-kit/DatePicker/useDatePickerManager.js +29 -3
  372. package/mobile/dist/ui-kit/DatePicker/useDatePickerManager.js.map +1 -1
  373. package/mobile/dist/ui-kit/DialogManager/openDocument.d.ts +2 -0
  374. package/mobile/dist/ui-kit/DialogManager/openDocument.js +11 -0
  375. package/mobile/dist/ui-kit/DialogManager/openDocument.js.map +1 -0
  376. package/mobile/dist/ui-kit/FormField/Fields/DependentsField.js +2 -2
  377. package/mobile/dist/ui-kit/FormField/Fields/DependentsField.js.map +1 -1
  378. package/mobile/dist/ui-kit/FormField/Fields/DulNumberField.js +2 -2
  379. package/mobile/dist/ui-kit/FormField/Fields/DulNumberField.js.map +1 -1
  380. package/mobile/dist/ui-kit/FormField/Fields/DulSerieField.js +2 -2
  381. package/mobile/dist/ui-kit/FormField/Fields/DulSerieField.js.map +1 -1
  382. package/mobile/dist/ui-kit/FormField/Fields/DulSubdivisionCodeField.js +2 -2
  383. package/mobile/dist/ui-kit/FormField/Fields/DulSubdivisionCodeField.js.map +1 -1
  384. package/mobile/dist/ui-kit/FormField/Fields/Experience5YearsField.js +2 -2
  385. package/mobile/dist/ui-kit/FormField/Fields/Experience5YearsField.js.map +1 -1
  386. package/mobile/dist/ui-kit/FormField/Fields/FamilyMembersField.js +2 -2
  387. package/mobile/dist/ui-kit/FormField/Fields/FamilyMembersField.js.map +1 -1
  388. package/mobile/dist/ui-kit/FormField/Fields/GeneralSeniorityField.js +2 -2
  389. package/mobile/dist/ui-kit/FormField/Fields/GeneralSeniorityField.js.map +1 -1
  390. package/mobile/dist/ui-kit/FormField/Fields/InnField.js +2 -2
  391. package/mobile/dist/ui-kit/FormField/Fields/InnField.js.map +1 -1
  392. package/mobile/dist/ui-kit/FormField/Fields/JobsNumberField.js +2 -2
  393. package/mobile/dist/ui-kit/FormField/Fields/JobsNumberField.js.map +1 -1
  394. package/mobile/dist/ui-kit/FormField/Fields/LastJobExperienceField.js +2 -2
  395. package/mobile/dist/ui-kit/FormField/Fields/LastJobExperienceField.js.map +1 -1
  396. package/mobile/dist/ui-kit/FormField/Fields/PartInBusinessField.d.ts +2 -0
  397. package/mobile/dist/ui-kit/FormField/Fields/PartInBusinessField.js +9 -0
  398. package/mobile/dist/ui-kit/FormField/Fields/PartInBusinessField.js.map +1 -0
  399. package/mobile/dist/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  400. package/mobile/dist/ui-kit/FormField/SelectField.js +1 -1
  401. package/mobile/dist/ui-kit/FormField/SelectField.js.map +1 -1
  402. package/mobile/dist/ui-kit/FormField/getField.js +2 -0
  403. package/mobile/dist/ui-kit/FormField/getField.js.map +1 -1
  404. package/mobile/dist/ui-kit/FormField/getObjectValidator.js +6 -5
  405. package/mobile/dist/ui-kit/FormField/getObjectValidator.js.map +1 -1
  406. package/mobile/dist/ui-kit/FormField/validators.d.ts +1 -0
  407. package/mobile/dist/ui-kit/FormField/validators.js +3 -1
  408. package/mobile/dist/ui-kit/FormField/validators.js.map +1 -1
  409. package/mobile/dist/ui-kit/InfoCard/InfoCard.d.ts +3 -2
  410. package/mobile/dist/ui-kit/InfoCard/InfoCard.js +2 -1
  411. package/mobile/dist/ui-kit/InfoCard/InfoCard.js.map +1 -1
  412. package/mobile/dist/ui-kit/Input/InputNumberControl.d.ts +2 -0
  413. package/mobile/dist/ui-kit/Input/InputNumberControl.js +10 -0
  414. package/mobile/dist/ui-kit/Input/InputNumberControl.js.map +1 -0
  415. package/mobile/dist/ui-kit/Input/InputProps.d.ts +2 -1
  416. package/mobile/dist/ui-kit/InputNumber/InputNumber.d.ts +2 -0
  417. package/mobile/dist/ui-kit/InputNumber/InputNumber.js +12 -0
  418. package/mobile/dist/ui-kit/InputNumber/InputNumber.js.map +1 -0
  419. package/mobile/dist/ui-kit/SnilsInput/SnilsInput.js +2 -2
  420. package/mobile/dist/ui-kit/SnilsInput/SnilsInput.js.map +1 -1
  421. package/mobile/dist/ui-kit/TimerCircle/TimerCircle.js +3 -2
  422. package/mobile/dist/ui-kit/TimerCircle/TimerCircle.js.map +1 -1
  423. package/mobile/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +1 -1
  424. package/mobile/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.d.ts +2 -3
  425. package/mobile/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.js +2 -2
  426. package/mobile/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.js.map +1 -1
  427. package/mobile/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +1 -1
  428. package/mobile/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js +1 -1
  429. package/mobile/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -1
  430. package/mobile/dist/utils/normalizeWithMask.d.ts +1 -0
  431. package/mobile/dist/utils/normalizeWithMask.js +20 -0
  432. package/mobile/dist/utils/normalizeWithMask.js.map +1 -0
  433. package/mobile/lib/api/RetailAPI/updateUserProfile.d.ts +2 -0
  434. package/mobile/lib/api/RetailAPI/updateUserProfile.js +1 -1
  435. package/mobile/lib/api/RetailAPI/updateUserProfile.js.map +1 -1
  436. package/mobile/lib/api/RetailAPI/utils/getUpdateUserTask.d.ts +2 -1
  437. package/mobile/lib/api/RetailAPI/utils/getUpdateUserTask.js +39 -34
  438. package/mobile/lib/api/RetailAPI/utils/getUpdateUserTask.js.map +1 -1
  439. package/mobile/lib/common.css +1 -1
  440. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +1 -1
  441. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  442. package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -0
  443. package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.js +2 -1
  444. package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  445. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +8 -7
  446. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  447. package/mobile/lib/components/ApplicationStatus/ApplicationStatus.d.ts +5 -0
  448. package/mobile/lib/components/ApplicationStatus/ApplicationStatus.js +23 -0
  449. package/mobile/lib/components/ApplicationStatus/ApplicationStatus.js.map +1 -0
  450. package/mobile/lib/components/ApplicationStatus/ApplicationStatusContent.d.ts +18 -0
  451. package/mobile/lib/components/ApplicationStatus/ApplicationStatusContent.js +2 -0
  452. package/mobile/lib/components/ApplicationStatus/ApplicationStatusContent.js.map +1 -0
  453. package/mobile/lib/components/CreditForm/CreditForm.d.ts +2 -9
  454. package/mobile/lib/components/CreditForm/CreditForm.js +12 -20
  455. package/mobile/lib/components/CreditForm/CreditForm.js.map +1 -1
  456. package/mobile/lib/components/CreditForm/CreditFormContent.d.ts +9 -1
  457. package/mobile/lib/components/CreditForm/CreditFormStep.d.ts +17 -0
  458. package/mobile/lib/components/CreditForm/CreditFormStep.js +31 -0
  459. package/mobile/lib/components/CreditForm/CreditFormStep.js.map +1 -0
  460. package/mobile/lib/components/CreditForm/StepsNavigationButtons.d.ts +1 -1
  461. package/mobile/lib/components/CreditForm/StepsNavigationButtons.js +2 -12
  462. package/mobile/lib/components/CreditForm/StepsNavigationButtons.js.map +1 -1
  463. package/mobile/lib/components/CreditForm/creditFormStepsData.d.ts +40 -2
  464. package/mobile/lib/components/CreditForm/creditFormStepsData.js +31 -26
  465. package/mobile/lib/components/CreditForm/creditFormStepsData.js.map +1 -1
  466. package/mobile/lib/components/CreditForm/getInitialFormState.d.ts +62 -0
  467. package/mobile/lib/components/CreditForm/getInitialFormState.js +74 -0
  468. package/mobile/lib/components/CreditForm/getInitialFormState.js.map +1 -0
  469. package/mobile/lib/components/CreditForm/renderInputs.d.ts +3 -0
  470. package/mobile/lib/components/CreditForm/renderInputs.js +5 -0
  471. package/mobile/lib/components/CreditForm/renderInputs.js.map +1 -0
  472. package/mobile/lib/components/CreditForm/useCreditFormApi.d.ts +11 -0
  473. package/mobile/lib/components/CreditForm/useCreditFormApi.js +25 -0
  474. package/mobile/lib/components/CreditForm/useCreditFormApi.js.map +1 -0
  475. package/mobile/lib/ui-kit/Checkbox/CheckboxWithDoc.js +2 -7
  476. package/mobile/lib/ui-kit/Checkbox/CheckboxWithDoc.js.map +1 -1
  477. package/mobile/lib/ui-kit/ConsentBkiDialog/ConsentBkiDialog.d.ts +5 -0
  478. package/mobile/lib/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js +42 -0
  479. package/mobile/lib/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js.map +1 -0
  480. package/mobile/lib/ui-kit/ConsentBkiDialog/useConsentBkiDialog.d.ts +3 -0
  481. package/mobile/lib/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js +46 -0
  482. package/mobile/lib/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js.map +1 -0
  483. package/mobile/lib/ui-kit/DatePicker/DatePicker.js +16 -5
  484. package/mobile/lib/ui-kit/DatePicker/DatePicker.js.map +1 -1
  485. package/mobile/lib/ui-kit/DatePicker/DatePickerInput.d.ts +10 -0
  486. package/mobile/lib/ui-kit/DatePicker/DatePickerInput.js +64 -0
  487. package/mobile/lib/ui-kit/DatePicker/DatePickerInput.js.map +1 -0
  488. package/mobile/lib/ui-kit/DatePicker/getYears.d.ts +1 -0
  489. package/mobile/lib/ui-kit/DatePicker/getYears.js +1 -1
  490. package/mobile/lib/ui-kit/DatePicker/getYears.js.map +1 -1
  491. package/mobile/lib/ui-kit/DatePicker/useDatePickerManager.d.ts +3 -1
  492. package/mobile/lib/ui-kit/DatePicker/useDatePickerManager.js +29 -3
  493. package/mobile/lib/ui-kit/DatePicker/useDatePickerManager.js.map +1 -1
  494. package/mobile/lib/ui-kit/DialogManager/openDocument.d.ts +2 -0
  495. package/mobile/lib/ui-kit/DialogManager/openDocument.js +8 -0
  496. package/mobile/lib/ui-kit/DialogManager/openDocument.js.map +1 -0
  497. package/mobile/lib/ui-kit/FormField/Fields/DependentsField.js +2 -2
  498. package/mobile/lib/ui-kit/FormField/Fields/DependentsField.js.map +1 -1
  499. package/mobile/lib/ui-kit/FormField/Fields/DulNumberField.js +2 -2
  500. package/mobile/lib/ui-kit/FormField/Fields/DulNumberField.js.map +1 -1
  501. package/mobile/lib/ui-kit/FormField/Fields/DulSerieField.js +2 -2
  502. package/mobile/lib/ui-kit/FormField/Fields/DulSerieField.js.map +1 -1
  503. package/mobile/lib/ui-kit/FormField/Fields/DulSubdivisionCodeField.js +2 -2
  504. package/mobile/lib/ui-kit/FormField/Fields/DulSubdivisionCodeField.js.map +1 -1
  505. package/mobile/lib/ui-kit/FormField/Fields/Experience5YearsField.js +2 -2
  506. package/mobile/lib/ui-kit/FormField/Fields/Experience5YearsField.js.map +1 -1
  507. package/mobile/lib/ui-kit/FormField/Fields/FamilyMembersField.js +2 -2
  508. package/mobile/lib/ui-kit/FormField/Fields/FamilyMembersField.js.map +1 -1
  509. package/mobile/lib/ui-kit/FormField/Fields/GeneralSeniorityField.js +2 -2
  510. package/mobile/lib/ui-kit/FormField/Fields/GeneralSeniorityField.js.map +1 -1
  511. package/mobile/lib/ui-kit/FormField/Fields/InnField.js +2 -2
  512. package/mobile/lib/ui-kit/FormField/Fields/InnField.js.map +1 -1
  513. package/mobile/lib/ui-kit/FormField/Fields/JobsNumberField.js +2 -2
  514. package/mobile/lib/ui-kit/FormField/Fields/JobsNumberField.js.map +1 -1
  515. package/mobile/lib/ui-kit/FormField/Fields/LastJobExperienceField.js +2 -2
  516. package/mobile/lib/ui-kit/FormField/Fields/LastJobExperienceField.js.map +1 -1
  517. package/mobile/lib/ui-kit/FormField/Fields/PartInBusinessField.d.ts +2 -0
  518. package/mobile/lib/ui-kit/FormField/Fields/PartInBusinessField.js +7 -0
  519. package/mobile/lib/ui-kit/FormField/Fields/PartInBusinessField.js.map +1 -0
  520. package/mobile/lib/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  521. package/mobile/lib/ui-kit/FormField/SelectField.js +1 -1
  522. package/mobile/lib/ui-kit/FormField/SelectField.js.map +1 -1
  523. package/mobile/lib/ui-kit/FormField/getField.js +2 -0
  524. package/mobile/lib/ui-kit/FormField/getField.js.map +1 -1
  525. package/mobile/lib/ui-kit/FormField/getObjectValidator.js +7 -6
  526. package/mobile/lib/ui-kit/FormField/getObjectValidator.js.map +1 -1
  527. package/mobile/lib/ui-kit/FormField/validators.d.ts +1 -0
  528. package/mobile/lib/ui-kit/FormField/validators.js +1 -0
  529. package/mobile/lib/ui-kit/FormField/validators.js.map +1 -1
  530. package/mobile/lib/ui-kit/InfoCard/InfoCard.d.ts +3 -2
  531. package/mobile/lib/ui-kit/InfoCard/InfoCard.js +2 -1
  532. package/mobile/lib/ui-kit/InfoCard/InfoCard.js.map +1 -1
  533. package/mobile/lib/ui-kit/Input/InputNumberControl.d.ts +2 -0
  534. package/mobile/lib/ui-kit/Input/InputNumberControl.js +8 -0
  535. package/mobile/lib/ui-kit/Input/InputNumberControl.js.map +1 -0
  536. package/mobile/lib/ui-kit/Input/InputProps.d.ts +2 -1
  537. package/mobile/lib/ui-kit/InputNumber/InputNumber.d.ts +2 -0
  538. package/mobile/lib/ui-kit/InputNumber/InputNumber.js +10 -0
  539. package/mobile/lib/ui-kit/InputNumber/InputNumber.js.map +1 -0
  540. package/mobile/lib/ui-kit/SnilsInput/SnilsInput.js +2 -2
  541. package/mobile/lib/ui-kit/SnilsInput/SnilsInput.js.map +1 -1
  542. package/mobile/lib/ui-kit/TimerCircle/TimerCircle.js +3 -2
  543. package/mobile/lib/ui-kit/TimerCircle/TimerCircle.js.map +1 -1
  544. package/mobile/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +1 -1
  545. package/mobile/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.d.ts +2 -3
  546. package/mobile/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.js +2 -2
  547. package/mobile/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.js.map +1 -1
  548. package/mobile/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +1 -1
  549. package/mobile/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js +1 -1
  550. package/mobile/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -1
  551. package/mobile/lib/utils/normalizeWithMask.d.ts +1 -0
  552. package/mobile/lib/utils/normalizeWithMask.js +17 -0
  553. package/mobile/lib/utils/normalizeWithMask.js.map +1 -0
  554. package/mobile/src/api/RetailAPI/updateUserProfile.ts +3 -1
  555. package/mobile/src/api/RetailAPI/utils/getUpdateUserTask.ts +49 -35
  556. package/mobile/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +1 -1
  557. package/mobile/src/components/ApplicationLeadForm/getInitialFormState.tsx +4 -1
  558. package/mobile/src/components/ApplicationLeadForm/useApplicationLeadApi.ts +12 -7
  559. package/mobile/src/components/ApplicationStatus/ApplicationStatus.example.json +6 -0
  560. package/mobile/src/components/ApplicationStatus/ApplicationStatus.tsx +108 -0
  561. package/mobile/src/components/ApplicationStatus/ApplicationStatus.ui.json +1 -0
  562. package/mobile/src/components/ApplicationStatus/ApplicationStatusContent.ts +19 -0
  563. package/mobile/src/components/CreditForm/CreditForm.tsx +36 -56
  564. package/mobile/src/components/CreditForm/CreditFormContent.ts +13 -1
  565. package/mobile/src/components/CreditForm/CreditFormStep.tsx +65 -0
  566. package/mobile/src/components/CreditForm/StepsNavigationButtons.tsx +19 -38
  567. package/mobile/src/components/CreditForm/creditFormStepsData.tsx +31 -26
  568. package/mobile/src/components/CreditForm/getInitialFormState.tsx +145 -0
  569. package/mobile/src/components/CreditForm/renderInputs.tsx +6 -0
  570. package/mobile/src/components/CreditForm/useCreditFormApi.tsx +36 -0
  571. package/mobile/src/ui-kit/Checkbox/CheckboxWithDoc.tsx +2 -16
  572. package/mobile/src/ui-kit/ConsentBkiDialog/ConsentBkiDialog.tsx +73 -0
  573. package/mobile/src/ui-kit/ConsentBkiDialog/useConsentBkiDialog.tsx +58 -0
  574. package/mobile/src/ui-kit/DatePicker/DatePicker.tsx +34 -13
  575. package/mobile/src/ui-kit/DatePicker/DatePickerInput.tsx +100 -0
  576. package/mobile/src/ui-kit/DatePicker/getYears.ts +1 -1
  577. package/mobile/src/ui-kit/DatePicker/useDatePickerManager.ts +51 -3
  578. package/mobile/src/ui-kit/DialogManager/openDocument.tsx +13 -0
  579. package/mobile/src/ui-kit/FormField/Fields/DependentsField.tsx +3 -3
  580. package/mobile/src/ui-kit/FormField/Fields/DulNumberField.tsx +3 -3
  581. package/mobile/src/ui-kit/FormField/Fields/DulSerieField.tsx +3 -3
  582. package/mobile/src/ui-kit/FormField/Fields/DulSubdivisionCodeField.tsx +3 -3
  583. package/mobile/src/ui-kit/FormField/Fields/Experience5YearsField.tsx +3 -2
  584. package/mobile/src/ui-kit/FormField/Fields/FamilyMembersField.tsx +3 -3
  585. package/mobile/src/ui-kit/FormField/Fields/GeneralSeniorityField.tsx +3 -2
  586. package/mobile/src/ui-kit/FormField/Fields/InnField.tsx +3 -3
  587. package/mobile/src/ui-kit/FormField/Fields/JobsNumberField.tsx +5 -5
  588. package/mobile/src/ui-kit/FormField/Fields/LastJobExperienceField.tsx +3 -2
  589. package/mobile/src/ui-kit/FormField/Fields/PartInBusinessField.tsx +15 -0
  590. package/mobile/src/ui-kit/FormField/NameFieldDef.ts +2 -1
  591. package/mobile/src/ui-kit/FormField/SelectField.tsx +3 -1
  592. package/mobile/src/ui-kit/FormField/getField.tsx +2 -0
  593. package/mobile/src/ui-kit/FormField/getObjectValidator.tsx +7 -7
  594. package/mobile/src/ui-kit/FormField/validators.ts +5 -0
  595. package/mobile/src/ui-kit/InfoCard/InfoCard.tsx +9 -3
  596. package/mobile/src/ui-kit/Input/InputNumberControl.tsx +18 -0
  597. package/mobile/src/ui-kit/Input/InputProps.ts +2 -1
  598. package/mobile/src/ui-kit/InputNumber/InputNumber.tsx +24 -0
  599. package/mobile/src/ui-kit/SnilsInput/SnilsInput.tsx +2 -2
  600. package/mobile/src/ui-kit/TimerCircle/TimerCircle.tsx +9 -4
  601. package/mobile/src/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.tsx +1 -1
  602. package/mobile/src/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.tsx +4 -4
  603. package/mobile/src/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.tsx +2 -2
  604. package/mobile/src/utils/normalizeWithMask.ts +23 -0
  605. package/package.json +2 -2
  606. package/src/api/RetailAPI/updateUserProfile.ts +3 -1
  607. package/src/api/RetailAPI/utils/getUpdateUserTask.ts +49 -35
  608. package/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +1 -1
  609. package/src/components/ApplicationLeadForm/getInitialFormState.tsx +4 -1
  610. package/src/components/ApplicationLeadForm/useApplicationLeadApi.ts +12 -7
  611. package/src/components/ApplicationStatus/ApplicationStatus.example.json +6 -0
  612. package/src/components/ApplicationStatus/ApplicationStatus.fixture.tsx +129 -0
  613. package/src/components/ApplicationStatus/ApplicationStatus.tsx +108 -0
  614. package/src/components/ApplicationStatus/ApplicationStatus.ui.json +1 -0
  615. package/src/components/ApplicationStatus/ApplicationStatusContent.ts +19 -0
  616. package/src/components/Blocks.ts +2 -0
  617. package/src/components/CreditForm/CreditForm.fixture.tsx +27 -1
  618. package/src/components/CreditForm/CreditForm.tsx +36 -56
  619. package/src/components/CreditForm/CreditFormContent.ts +13 -1
  620. package/src/components/CreditForm/CreditFormStep.tsx +65 -0
  621. package/src/components/CreditForm/StepsNavigationButtons.tsx +19 -38
  622. package/src/components/CreditForm/creditFormStepsData.tsx +31 -26
  623. package/src/components/CreditForm/getInitialFormState.tsx +145 -0
  624. package/src/components/CreditForm/renderInputs.tsx +6 -0
  625. package/src/components/CreditForm/useCreditFormApi.tsx +36 -0
  626. package/src/ui-kit/Checkbox/CheckboxWithDoc.tsx +2 -16
  627. package/src/ui-kit/ConsentBkiDialog/ConsentBkiDialog.fixture.tsx +7 -0
  628. package/src/ui-kit/ConsentBkiDialog/ConsentBkiDialog.tsx +73 -0
  629. package/src/ui-kit/ConsentBkiDialog/useConsentBkiDialog.tsx +58 -0
  630. package/src/ui-kit/DatePicker/DatePicker.tsx +34 -13
  631. package/src/ui-kit/DatePicker/DatePickerInput.tsx +100 -0
  632. package/src/ui-kit/DatePicker/getYears.ts +1 -1
  633. package/src/ui-kit/DatePicker/useDatePickerManager.ts +51 -3
  634. package/src/ui-kit/DialogManager/openDocument.tsx +13 -0
  635. package/src/ui-kit/FormField/Fields/DependentsField.tsx +3 -3
  636. package/src/ui-kit/FormField/Fields/DulNumberField.tsx +3 -3
  637. package/src/ui-kit/FormField/Fields/DulSerieField.tsx +3 -3
  638. package/src/ui-kit/FormField/Fields/DulSubdivisionCodeField.tsx +3 -3
  639. package/src/ui-kit/FormField/Fields/Experience5YearsField.tsx +3 -2
  640. package/src/ui-kit/FormField/Fields/FamilyMembersField.tsx +3 -3
  641. package/src/ui-kit/FormField/Fields/GeneralSeniorityField.tsx +3 -2
  642. package/src/ui-kit/FormField/Fields/InnField.tsx +3 -3
  643. package/src/ui-kit/FormField/Fields/JobsNumberField.tsx +5 -5
  644. package/src/ui-kit/FormField/Fields/LastJobExperienceField.tsx +3 -2
  645. package/src/ui-kit/FormField/Fields/PartInBusinessField.tsx +15 -0
  646. package/src/ui-kit/FormField/NameFieldDef.ts +2 -1
  647. package/src/ui-kit/FormField/SelectField.tsx +3 -1
  648. package/src/ui-kit/FormField/getField.tsx +2 -0
  649. package/src/ui-kit/FormField/getObjectValidator.tsx +7 -7
  650. package/src/ui-kit/FormField/validators.ts +5 -0
  651. package/src/ui-kit/InfoCard/InfoCard.tsx +9 -3
  652. package/src/ui-kit/Input/InputNumberControl.tsx +18 -0
  653. package/src/ui-kit/Input/InputProps.ts +2 -1
  654. package/src/ui-kit/InputNumber/InputNumber.tsx +24 -0
  655. package/src/ui-kit/SnilsInput/SnilsInput.tsx +2 -2
  656. package/src/ui-kit/TimerCircle/TimerCircle.tsx +9 -4
  657. package/src/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.tsx +1 -1
  658. package/src/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.tsx +4 -4
  659. package/src/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.tsx +2 -2
  660. package/src/utils/normalizeWithMask.ts +23 -0
  661. package/bundle/ui-kit/SnilsInput/normalizeSnils.d.ts +0 -1
  662. package/dist/ui-kit/SnilsInput/normalizeSnils.d.ts +0 -1
  663. package/dist/ui-kit/SnilsInput/normalizeSnils.js +0 -23
  664. package/dist/ui-kit/SnilsInput/normalizeSnils.js.map +0 -1
  665. package/lib/ui-kit/SnilsInput/normalizeSnils.d.ts +0 -1
  666. package/lib/ui-kit/SnilsInput/normalizeSnils.js +0 -20
  667. package/lib/ui-kit/SnilsInput/normalizeSnils.js.map +0 -1
  668. package/mobile/bundle/ui-kit/SnilsInput/normalizeSnils.d.ts +0 -1
  669. package/mobile/dist/ui-kit/SnilsInput/normalizeSnils.d.ts +0 -1
  670. package/mobile/dist/ui-kit/SnilsInput/normalizeSnils.js +0 -23
  671. package/mobile/dist/ui-kit/SnilsInput/normalizeSnils.js.map +0 -1
  672. package/mobile/lib/ui-kit/SnilsInput/normalizeSnils.d.ts +0 -1
  673. package/mobile/lib/ui-kit/SnilsInput/normalizeSnils.js +0 -20
  674. package/mobile/lib/ui-kit/SnilsInput/normalizeSnils.js.map +0 -1
  675. package/mobile/src/ui-kit/SnilsInput/normalizeSnils.ts +0 -29
  676. package/src/ui-kit/SnilsInput/normalizeSnils.ts +0 -29
@@ -1,6 +1,7 @@
1
1
  /* eslint-disable max-lines */
2
2
  /* eslint-disable max-len */
3
3
 
4
+ //TODO: DO List
4
5
  export const stepsSectionsMap = {
5
6
  1: [
6
7
  {
@@ -33,24 +34,27 @@ export const stepsSectionsMap = {
33
34
  {
34
35
  fieldType: 'common',
35
36
  name: 'education',
36
- required: true,
37
37
  },
38
38
  ],
39
39
  },
40
40
  {
41
41
  title: 'Адрес регистрации по месту жительства',
42
+ columns: 1,
43
+ inputs: [],
44
+ },
45
+ {
46
+ inputs: [{ fieldType: 'common', name: 'participantAddress', required: true, dadata: true }],
47
+ },
48
+ {
42
49
  columns: 2,
43
- inputs: [
44
- { fieldType: 'common', name: 'participantAddress', required: true },
45
- { fieldType: 'common', name: 'participantAddress', required: true, dadata: true },
46
- ],
50
+ inputs: [{ fieldType: 'common', name: 'participantDateRegistration', required: true }],
47
51
  },
48
52
  {
49
53
  title: 'Адрес фактического проживания (место пребывания РФ)',
50
54
  columns: 2,
51
55
  inputs: [
52
56
  { fieldType: 'common', name: 'fullAddress', required: true, dadata: true },
53
- { fieldType: 'common', name: 'housing', required: true },
57
+ { fieldType: 'common', name: 'housing' },
54
58
  ],
55
59
  },
56
60
  ],
@@ -69,7 +73,7 @@ export const stepsSectionsMap = {
69
73
  },
70
74
  {
71
75
  inputs: [
72
- { fieldType: 'common', name: 'employment', required: true },
76
+ { fieldType: 'common', name: 'employment' },
73
77
  { fieldType: 'common', name: 'organizationName', required: true, dadata: true },
74
78
  ],
75
79
  },
@@ -82,15 +86,15 @@ export const stepsSectionsMap = {
82
86
  },
83
87
  {
84
88
  inputs: [
85
- { fieldType: 'common', name: 'organization', required: true },
86
- { fieldType: 'common', name: 'amountWorkers', required: true },
89
+ { fieldType: 'common', name: 'organization', required: false },
90
+ { fieldType: 'common', name: 'amountWorkers', required: false },
87
91
  ],
88
92
  },
89
93
  {
90
94
  columns: 2,
91
95
  inputs: [
92
- { fieldType: 'common', name: 'employerActivities', required: true },
93
- { fieldType: 'common', name: 'employerOrganization', required: true },
96
+ { fieldType: 'common', name: 'employerActivities', required: false },
97
+ { fieldType: 'common', name: 'employerOrganization', required: false },
94
98
  { fieldType: 'common', name: 'generalSeniority', required: true },
95
99
  { fieldType: 'common', name: 'lastJobExperience', required: true },
96
100
  { fieldType: 'common', name: 'experience5Years', required: true },
@@ -101,7 +105,13 @@ export const stepsSectionsMap = {
101
105
  inputs: [
102
106
  { fieldType: 'common', name: 'phone', label: 'Телефон работодателя', required: true },
103
107
  { fieldType: 'common', name: 'beginDate', required: true },
104
- { fieldType: 'common', name: 'positionOrganization', required: true },
108
+ ],
109
+ },
110
+ {
111
+ columns: 2,
112
+ inputs: [
113
+ { fieldType: 'common', name: 'positionOrganization', required: false },
114
+ { fieldType: 'common', name: 'partInBusiness', required: true },
105
115
  ],
106
116
  },
107
117
  {
@@ -118,20 +128,15 @@ export const stepsSectionsMap = {
118
128
  },
119
129
  {
120
130
  columns: 1,
121
- inputs: [{ fieldType: 'common', name: 'familyStatus' }],
131
+ inputs: [{ fieldType: 'common', name: 'familyStatus', required: true }],
122
132
  },
123
133
  {
124
134
  columns: 1,
125
- inputs: [{ fieldType: 'common', name: 'dependents' }],
135
+ inputs: [{ fieldType: 'common', name: 'dependents', required: true }],
126
136
  },
127
137
  {
128
- columns: 2,
129
- inputs: [
130
- { fieldType: 'common', name: 'familyMembers' },
131
- { fieldType: 'common', name: 'familyMembers' },
132
- { fieldType: 'common', name: 'retirementIncome' },
133
- { fieldType: 'common', name: 'otherIncome' },
134
- ],
138
+ columns: 1,
139
+ inputs: [{ fieldType: 'common', name: 'familyMembers', required: true }],
135
140
  },
136
141
  {
137
142
  title: 'Совокупный доход',
@@ -146,15 +151,15 @@ export const stepsSectionsMap = {
146
151
  },
147
152
  {
148
153
  columns: 1,
149
- inputs: [{ fieldType: 'common', name: 'mandatoryIncome' }],
154
+ inputs: [{ fieldType: 'common', name: 'mandatoryIncome', required: true }],
150
155
  },
151
156
  {
152
157
  columns: 1,
153
- inputs: [{ fieldType: 'common', name: 'otherPayments' }],
158
+ inputs: [{ fieldType: 'common', name: 'otherPayments', required: true }],
154
159
  },
155
160
  {
156
161
  columns: 1,
157
- inputs: [{ fieldType: 'common', name: 'snils' }],
162
+ inputs: [{ fieldType: 'common', name: 'snils', required: true }],
158
163
  },
159
164
  {
160
165
  columns: 2,
@@ -190,10 +195,10 @@ export const stepsSectionsMap = {
190
195
  inputs: [],
191
196
  },
192
197
  {
193
- inputs: [{ fieldType: 'common', name: 'region' }],
198
+ inputs: [{ fieldType: 'common', name: 'region', required: true }],
194
199
  },
195
200
  {
196
- inputs: [{ fieldType: 'common', name: 'addressBranch' }],
201
+ inputs: [{ fieldType: 'common', name: 'addressBranch', required: true }],
197
202
  },
198
203
  {
199
204
  title: 'Код представителя Банка',
@@ -0,0 +1,145 @@
1
+ import type { Option } from '../../ui-kit/Select/Option';
2
+
3
+ export interface FormStateMap {
4
+ 1: {
5
+ surname?: string;
6
+ name?: string;
7
+ middleName?: string;
8
+ sex?: string;
9
+ birthday?: Date;
10
+ birthPlace?: string;
11
+ phone?: string;
12
+ email?: string;
13
+ dulSerie?: number;
14
+ dulNumber?: number;
15
+ dulIssueDateField?: Date;
16
+ dulSubdivisionCode?: string;
17
+ dulIssuedBy?: string;
18
+ participantAddress?: string;
19
+ participantDateRegistration?: Date;
20
+ fullAddress?: string;
21
+ housing?: string;
22
+ };
23
+ 2: {
24
+ employment?: Option;
25
+ organizationName?: string;
26
+ inn?: number;
27
+ legalForm?: string;
28
+ organization?: Option;
29
+ amountWorkers?: Option;
30
+ employerActivities?: Option;
31
+ employerOrganization?: Option;
32
+ lastJobExperience?: string;
33
+ experience5Years?: string;
34
+ jobsNumber?: string;
35
+ phone?: string;
36
+ beginDate?: Date;
37
+ positionOrganization?: Option;
38
+ partInBusiness?: number;
39
+ fullAddress?: string;
40
+ };
41
+ 3: {
42
+ familyStatus?: Option;
43
+ dependents?: number;
44
+ familyMembers?: number;
45
+ mandatoryIncome?: number;
46
+ otherPayments?: number;
47
+ snils?: string;
48
+ armyIdFlg?: boolean;
49
+ };
50
+ 4: {
51
+ disablePeopleFlg?: string;
52
+ bankruptcyFlg?: string;
53
+ shareholderFlg?: string;
54
+ legalEntityName?: string;
55
+ creditInRshbCd?: string;
56
+ };
57
+ 5: {
58
+ region?: string;
59
+ addressBranch?: string;
60
+ bankEmployeeCode?: string;
61
+ };
62
+ }
63
+
64
+ const formStateMap: FormStateMap = {
65
+ 1: {
66
+ surname: '',
67
+ name: '',
68
+ middleName: '',
69
+ sex: '',
70
+ birthday: undefined,
71
+ birthPlace: '',
72
+ phone: '',
73
+ email: '',
74
+ dulSerie: undefined,
75
+ dulNumber: undefined,
76
+ dulIssueDateField: undefined,
77
+ dulSubdivisionCode: '',
78
+ dulIssuedBy: '',
79
+ participantAddress: '',
80
+ participantDateRegistration: undefined,
81
+ fullAddress: '',
82
+ housing: '',
83
+ },
84
+ 2: {
85
+ employment: { key: '', text: '' },
86
+ organizationName: '',
87
+ inn: undefined,
88
+ legalForm: '',
89
+ organization: { key: '', text: '' },
90
+ amountWorkers: { key: '', text: '' },
91
+ employerActivities: { key: '', text: '' },
92
+ employerOrganization: { key: '', text: '' },
93
+ lastJobExperience: '',
94
+ experience5Years: '',
95
+ jobsNumber: '',
96
+ phone: '',
97
+ beginDate: undefined,
98
+ positionOrganization: { key: '', text: '' },
99
+ partInBusiness: undefined,
100
+ fullAddress: '',
101
+ },
102
+ 3: {
103
+ familyStatus: { key: '', text: '' },
104
+ dependents: undefined,
105
+ familyMembers: undefined,
106
+ mandatoryIncome: undefined,
107
+ otherPayments: undefined,
108
+ snils: '',
109
+ armyIdFlg: false,
110
+ },
111
+ 4: {
112
+ disablePeopleFlg: '',
113
+ bankruptcyFlg: '',
114
+ shareholderFlg: '',
115
+ legalEntityName: '',
116
+ creditInRshbCd: '',
117
+ },
118
+ 5: {
119
+ region: '',
120
+ addressBranch: '',
121
+ bankEmployeeCode: '',
122
+ },
123
+ };
124
+
125
+ export const getInitialFormState = <Step extends keyof FormStateMap>(
126
+ step: Step,
127
+ localStorageData: Record<string, any> | null,
128
+ ): FormStateMap[Step] => {
129
+ if (localStorageData) {
130
+ // TODO: Fill in for other fields with type Date
131
+ // TODO: Take it out to the helper
132
+ localStorageData.birthday = localStorageData.dulIssueDateField = new Date(
133
+ (localStorageData?.birthday as string) || Date.now(),
134
+ );
135
+ localStorageData.participantDateRegistration = new Date(
136
+ (localStorageData?.participantDateRegistration as string) || Date.now(),
137
+ );
138
+ localStorageData.beginDate = new Date((localStorageData?.beginDate as string) || Date.now());
139
+ }
140
+
141
+ return {
142
+ ...formStateMap[step],
143
+ ...localStorageData,
144
+ };
145
+ };
@@ -0,0 +1,6 @@
1
+ import { getField } from '../../ui-kit/FormField/getField';
2
+ import { type RenderInputsProps } from './CreditFormContent';
3
+
4
+ export const renderInputs = ({ field, inputs }: RenderInputsProps) => {
5
+ return (inputs || [])?.map(getField(field, ''));
6
+ };
@@ -0,0 +1,36 @@
1
+ import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
2
+ import { getObjectValidator } from '../../ui-kit/FormField/getObjectValidator';
3
+ import { objectValidator } from '../../validation/objectValidator';
4
+ import { isValidationSuccess } from '../../validation/validator';
5
+ import { type FieldDef } from '../ApplicationLeadForm/ApplicationLeadFormContent';
6
+ import { type FormStateMap } from './getInitialFormState';
7
+
8
+ type CreditFormApiProps = {
9
+ inputs: FieldDef[];
10
+ onNextStep: () => void;
11
+ saveStep: (value: Record<string, any>) => void;
12
+ };
13
+
14
+ export const useCreditFormApi = ({ inputs, onNextStep, saveStep }: CreditFormApiProps) => {
15
+ const handleSubmit = useCallback(async (formData: FormStateMap[keyof FormStateMap]) => {
16
+ const feedbackValidator = objectValidator(getObjectValidator(inputs));
17
+ if (!isValidationSuccess(feedbackValidator(formData))) {
18
+ return 'Fail';
19
+ }
20
+
21
+ try {
22
+ // TODO: add updateUserTask here
23
+ } catch (ex) {
24
+ return 'Fail';
25
+ }
26
+
27
+ saveStep(formData);
28
+ onNextStep();
29
+
30
+ return 'OK';
31
+ }, []);
32
+
33
+ return {
34
+ handleSubmit,
35
+ };
36
+ };
@@ -1,13 +1,11 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
- import { type VNode } from '../../model/VNode';
3
- import { Dialog } from '../DialogManager/Dialog';
2
+ import { openDocument } from '../DialogManager/openDocument';
4
3
  import { useDialogManager } from '../DialogManager/useDialogManager';
5
4
  import { renderErrorText } from '../Input/renderErrorText';
6
5
  import { LinkButton } from '../LinkButton/LinkButton';
7
6
  import { Text } from '../Text/Text';
8
7
  import { Checkbox } from './Checkbox';
9
8
  import { type CheckboxProps } from './CheckboxProps';
10
- import { getDocument } from './getDocument';
11
9
 
12
10
  const OPEN_DOC_BUTTON_TEXT = 'Ознакомиться';
13
11
 
@@ -24,10 +22,7 @@ export const CheckboxWithDoc = JSX<CheckboxWithDocProps>(
24
22
  <div className="flex flex-wrap gap-x-m">
25
23
  <Checkbox {...props} />
26
24
  {docId ? (
27
- <LinkButton
28
- className="text-primary-main"
29
- onClick={() => handleOpenDocument(docId, open)}
30
- >
25
+ <LinkButton className="text-primary-main" onClick={() => openDocument(docId, open)}>
31
26
  <Text>{OPEN_DOC_BUTTON_TEXT}</Text>
32
27
  </LinkButton>
33
28
  ) : null}
@@ -37,12 +32,3 @@ export const CheckboxWithDoc = JSX<CheckboxWithDocProps>(
37
32
  );
38
33
  },
39
34
  );
40
-
41
- const handleOpenDocument = async (id: number, open: (dialog: VNode) => void) => {
42
- const document = await getDocument(id);
43
- open(
44
- <Dialog className="my-6xl max-w-4xl mx-auto px-0 min-h-0 pb-0">
45
- <iframe src={`${document}#toolbar=0`} className="w-full h-[80vh]" id="iframe-dialog" />
46
- </Dialog>,
47
- );
48
- };
@@ -0,0 +1,73 @@
1
+ import { JSX } from '@redneckz/uni-jsx';
2
+ import { useCallback, useState } from '@redneckz/uni-jsx/lib/hooks';
3
+ import { noop } from '../../utils/noop';
4
+ import { Button } from '../Button/Button';
5
+ import { Dialog } from '../DialogManager/Dialog';
6
+ import { openDocument } from '../DialogManager/openDocument';
7
+ import { useDialogManager } from '../DialogManager/useDialogManager';
8
+ import { Heading } from '../Heading/Heading';
9
+ import { Paragraph } from '../Paragraph/Paragraph';
10
+ import { RadioButtonGroup } from '../RadioButtonGroup/RadioButtonGroup';
11
+ export interface ConsentBkiDialogProps {
12
+ handleSubmit?: (confirmStatus: string) => void;
13
+ onClose?: () => void;
14
+ }
15
+
16
+ const defaultConsentText = {
17
+ title: 'Подпишите согласие на запрос в БКИ',
18
+ description: 'Согласие на запрос в Бюро кредитных историй (БКИ) ускорит решение по кредиту',
19
+ };
20
+
21
+ const refuseConsentText = {
22
+ title: 'Вы уверены, что хотите отказаться от запроса в БКИ',
23
+ description: 'Согласие на запрос в Бюро кредитных историй (БКИ) повысит вероятность одобрения',
24
+ };
25
+
26
+ export const ConsentBkiDialog = JSX<ConsentBkiDialogProps>(function ({
27
+ handleSubmit = noop,
28
+ onClose = noop,
29
+ }) {
30
+ const [confirmStatus, setConfirmStatus] = useState('');
31
+ const [showRefuceContent, setShowRefuceContent] = useState(false);
32
+ const { open, close } = useDialogManager();
33
+ const handleClose = useCallback(() => {
34
+ close();
35
+ handleSubmit(confirmStatus);
36
+ }, [confirmStatus]);
37
+
38
+ const handleConfirmChange = useCallback((value: string) => {
39
+ setConfirmStatus(value);
40
+ if (value === 'REFUSE') {
41
+ setShowRefuceContent(true);
42
+ }
43
+ }, []);
44
+ const consentText = showRefuceContent ? refuseConsentText : defaultConsentText;
45
+
46
+ return (
47
+ <Dialog className="my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-lg" onClose={onClose}>
48
+ <div className="flex flex-col gap-lg items-center">
49
+ <div role="button" onClick={() => openDocument(CONSENT_BKI_ID, open)}>
50
+ <Heading className="text-center text-balance" title={consentText.title} />
51
+ </div>
52
+ <Paragraph align="text-center">{consentText.description}</Paragraph>
53
+ <RadioButtonGroup
54
+ className="whitespace-normal"
55
+ orientation="horizontal"
56
+ items={ITEMS}
57
+ value={confirmStatus}
58
+ onChange={handleConfirmChange}
59
+ />
60
+ <Button disabled={!confirmStatus} type="button" onClick={handleClose}>
61
+ Продолжить
62
+ </Button>
63
+ </div>
64
+ </Dialog>
65
+ );
66
+ });
67
+
68
+ const ITEMS = [
69
+ { id: 'SIGNED', text: 'Подписать' },
70
+ { id: 'REFUSE', text: 'Отказаться' },
71
+ ];
72
+
73
+ const CONSENT_BKI_ID = 2;
@@ -0,0 +1,58 @@
1
+ import { updateUserProfile } from '../../api/RetailAPI/updateUserProfile';
2
+ import { formatPhone } from '../../utils/formatPhone';
3
+ import { useDialogManager } from '../DialogManager/useDialogManager';
4
+ import { useVerifyPhoneDialog } from '../VerifyPhoneDialog/useVerifyPhoneDialog';
5
+ import { ConsentBkiDialog } from './ConsentBkiDialog';
6
+
7
+ export const useConsentBkiDialog = () => {
8
+ const { open, closeAll } = useDialogManager();
9
+ const verifyPhoneDialog = useVerifyPhoneDialog();
10
+
11
+ const redirectToCreditForm = () => {
12
+ globalThis.location.href = '/credit-lead';
13
+ };
14
+
15
+ const handleSuccessVerify = (profileId?: number) => async (smsCode?: string) => {
16
+ if (profileId) {
17
+ await updateUserProfile({
18
+ profile: {
19
+ id: profileId,
20
+ consentBkiFlg: true,
21
+ smsConsentBki: smsCode,
22
+ },
23
+ });
24
+ }
25
+
26
+ redirectToCreditForm();
27
+ };
28
+
29
+ const handleSubmitBkiConstent =
30
+ (phone?: string, profileId?: number) => async (confirmStatus: string) => {
31
+ await closeAll();
32
+
33
+ if (confirmStatus === 'SIGNED' && phone) {
34
+ verifyPhoneDialog.open(handleSuccessVerify(profileId), verifyPhoneContent(phone));
35
+ } else {
36
+ redirectToCreditForm();
37
+ }
38
+ };
39
+
40
+ return {
41
+ open: (phone?: string, profileId?: number) =>
42
+ open(
43
+ <ConsentBkiDialog
44
+ handleSubmit={handleSubmitBkiConstent(phone, profileId)}
45
+ onClose={redirectToCreditForm}
46
+ />,
47
+ ),
48
+ };
49
+ };
50
+
51
+ const verifyPhoneContent = (phone: string) => ({
52
+ title: 'Подтвердите номер телефона',
53
+ description: `Мы отправили код на ${phone}`,
54
+ phoneNumber: formatPhone(phone),
55
+ textButton: 'Отправить',
56
+ __html: `<span>Вводя код, я подтверждаю, что ознакомлен и подписываю:</span>
57
+ <ul><li>согласие на запрос информации в БКИ</li></ul>`,
58
+ });
@@ -10,9 +10,9 @@ import { type ControlProps } from '../ControlProps';
10
10
  import { Icon } from '../Icon/Icon';
11
11
  import { type IconName } from '../Icon/IconProps';
12
12
  import { renderLabel } from '../Input/renderLabel';
13
- import { Paragraph } from '../Paragraph/Paragraph';
14
13
  import { Select } from '../Select/Select';
15
14
  import { Calendar } from './Calendar';
15
+ import { DatePickerInput } from './DatePickerInput';
16
16
  import { months } from './months';
17
17
  import { useDatePickerManager } from './useDatePickerManager';
18
18
 
@@ -30,7 +30,7 @@ const SELECT_PROPS: { className: string; iconVersion: IconVersion; isBorder: boo
30
30
  };
31
31
 
32
32
  const formStyle =
33
- 'flex justify-between items-center h-14 px-m py-s border rounded-md cursor-pointer ' +
33
+ 'flex justify-between items-center h-14 py-s border rounded-md cursor-pointer ' +
34
34
  'hover:border-black active:border-black focus:border-black';
35
35
 
36
36
  interface DatePickerProps extends ControlProps<Date>, LabelProps {
@@ -41,6 +41,7 @@ interface DatePickerProps extends ControlProps<Date>, LabelProps {
41
41
  }
42
42
 
43
43
  export const DatePicker = JSX<DatePickerProps>(
44
+ // eslint-disable-next-line max-lines-per-function
44
45
  ({ className = '', label = '', value, valid = true, minDate, maxDate, onChange }) => {
45
46
  const [showCalendar, { setValue }] = useBool(false);
46
47
  const [selectedMonth, setSelectedMonth] = useState(value?.getMonth() || new Date().getMonth());
@@ -64,6 +65,8 @@ export const DatePicker = JSX<DatePickerProps>(
64
65
  selectedYear,
65
66
  selectedMonth,
66
67
  showCalendar,
68
+ onChange,
69
+ value,
67
70
  });
68
71
 
69
72
  const spaceAbove = useElementSpace(ref, 370);
@@ -72,7 +75,14 @@ export const DatePicker = JSX<DatePickerProps>(
72
75
  <div className={style('space-y-xs', className)} ref={ref}>
73
76
  {renderLabel(label)}
74
77
  <div className="relative">
75
- {renderDatePickerForm(handleChangeVisibleCalendar, value, valid)}
78
+ {renderDatePickerForm({
79
+ handleChangeVisibleCalendar,
80
+ value,
81
+ valid,
82
+ onChange,
83
+ setSelectedMonth,
84
+ setSelectedYear,
85
+ })}
76
86
  {showCalendar ? (
77
87
  <div
78
88
  className={style('absolute bg-white z-20 select-none', {
@@ -116,16 +126,27 @@ export const DatePicker = JSX<DatePickerProps>(
116
126
  },
117
127
  );
118
128
 
119
- const renderDatePickerForm = (
120
- handleChangeVisibleCalendar: () => void,
121
- value: Date | undefined,
122
- valid: boolean,
123
- ) => (
124
- <div
129
+ const renderDatePickerForm = ({
130
+ handleChangeVisibleCalendar,
131
+ value,
132
+ valid,
133
+ onChange,
134
+ setSelectedMonth,
135
+ setSelectedYear,
136
+ }: {
137
+ handleChangeVisibleCalendar: () => void;
138
+ value: Date | undefined;
139
+ valid: boolean;
140
+ setSelectedMonth: (selectedMonth: number) => void;
141
+ setSelectedYear: (selectedYear: number) => void;
142
+ onChange?: (value: Date) => void;
143
+ }) => (
144
+ <DatePickerInput
145
+ onChange={onChange}
125
146
  onClick={handleChangeVisibleCalendar}
147
+ value={value && formatDate(value)}
148
+ setSelectedMonth={setSelectedMonth}
149
+ setSelectedYear={setSelectedYear}
126
150
  className={style(formStyle, valid ? 'border-gray' : 'border-error')}
127
- >
128
- <Paragraph>{value && formatDate(value)}</Paragraph>
129
- <Icon {...ICON_PROPS} name="CalendarIcon" />
130
- </div>
151
+ ></DatePickerInput>
131
152
  );
@@ -0,0 +1,100 @@
1
+ import { JSX } from '@redneckz/uni-jsx';
2
+ import { useEffect, useRef, useState } from '@redneckz/uni-jsx/lib/hooks';
3
+ import { type IconVersion } from '../../model/IconVersion';
4
+ import { normalizeWithMask } from '../../utils/normalizeWithMask';
5
+ import { style } from '../../utils/style';
6
+ import { Icon } from '../Icon/Icon';
7
+ import { type IconName } from '../Icon/IconProps';
8
+ import { START_YEAR } from './getYears';
9
+
10
+ const ICON_PROPS: { name: IconName; iconVersion: IconVersion; width: string; height: string } = {
11
+ name: 'CalendarIcon',
12
+ iconVersion: 'black',
13
+ width: '24',
14
+ height: '24',
15
+ };
16
+
17
+ interface DatePickerInputProps {
18
+ setSelectedMonth: (selectedMonth: number) => void;
19
+ setSelectedYear: (selectedYear: number) => void;
20
+ className?: string;
21
+ value?: string;
22
+ onChange?: (value: Date) => void;
23
+ onClick?: () => void;
24
+ }
25
+
26
+ export const DatePickerInput = JSX<DatePickerInputProps>(
27
+ ({ setSelectedMonth, setSelectedYear, className, value, onChange, onClick }) => {
28
+ const ref = useRef<HTMLInputElement | null>(null);
29
+ const [inputValue, setInputValue] = useState<string>(value || '');
30
+
31
+ const handleChange = (ev: { target?: { value?: string } }) => {
32
+ const val = ev.target?.value;
33
+ if (typeof val === 'string' && val?.length < 11) {
34
+ setInputValue(normalizeWithMask(val, '__.__.____'));
35
+ }
36
+ };
37
+
38
+ const onBlur = () => {
39
+ if (checkIsValidDate(inputValue)) {
40
+ const [day, month, year] = inputValue.split('.');
41
+ onChange?.(new Date(Number(year), Number(month) - 1, Number(day)));
42
+ setSelectedMonth(Number(month) - 1);
43
+ setSelectedYear(Number(year));
44
+ } else {
45
+ setInputValue(value || '');
46
+ }
47
+ };
48
+
49
+ const onInputClick = () => {
50
+ if (ref.current !== null) {
51
+ ref.current.focus();
52
+ }
53
+ onClick?.();
54
+ };
55
+
56
+ useEffect(() => {
57
+ setInputValue(value || '');
58
+ }, [value]);
59
+
60
+ return (
61
+ <div onClick={onInputClick} className={style('relative', className)}>
62
+ <input
63
+ ref={ref}
64
+ className="h-full w-full px-m text-l text-black focus-visible:outline-none"
65
+ value={inputValue}
66
+ type="text"
67
+ onChange={handleChange}
68
+ onBlur={onBlur}
69
+ />
70
+ <Icon className="mr-s" {...ICON_PROPS} />
71
+ </div>
72
+ );
73
+ },
74
+ );
75
+
76
+ const isValidYear = (year: string) =>
77
+ Number(year) >= START_YEAR && Number(year) <= new Date().getFullYear();
78
+
79
+ const isValidMonth = (month: string) => Number(month) > 0 && Number(month) < 13;
80
+
81
+ const checkIsValidDate = (date: string) => {
82
+ const [day, month, year] = date.split('.');
83
+
84
+ if (isValidYear(year)) {
85
+ if (isValidMonth(month)) {
86
+ const currentDate = new Date(Number(year), Number(month) - 1, 1);
87
+ let maxDateOfMonth = 0;
88
+ while (currentDate.getMonth() === Number(month) - 1) {
89
+ currentDate.setDate(currentDate.getDate() + 1);
90
+ maxDateOfMonth++;
91
+ }
92
+
93
+ if (Number(day) > 0 && Number(day) <= maxDateOfMonth) {
94
+ return true;
95
+ }
96
+ }
97
+ }
98
+
99
+ return false;
100
+ };