@redneckz/wildless-cms-uni-blocks 0.14.698 → 0.14.699

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 (750) hide show
  1. package/bundle/api/RetailAPI/model/EOrganizationActivityTypes.d.ts +23 -0
  2. package/bundle/api/RetailAPI/model/LeadFormData.d.ts +7 -0
  3. package/bundle/api/RetailAPI/utils/getOrganizationParams.d.ts +17 -0
  4. package/bundle/api/RetailAPI/utils/getUpdateUserProfile.d.ts +2 -2
  5. package/bundle/api/dadataHints/dadataHintsType.d.ts +3 -0
  6. package/bundle/bundle.umd.js +381 -256
  7. package/bundle/bundle.umd.min.js +1 -1
  8. package/bundle/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -2
  9. package/bundle/components/ApplicationLeadForm/LeadFormState.d.ts +147 -0
  10. package/bundle/components/ApplicationLeadForm/consents.d.ts +3 -3
  11. package/bundle/components/ApplicationLeadForm/getInitialFormState.d.ts +2 -148
  12. package/bundle/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +2 -2
  13. package/bundle/components/ApplicationLeadForm/pasreEsiaProfile.d.ts +2 -2
  14. package/bundle/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +5 -6
  15. package/bundle/components/ApplicationLeadForm/useInitApplicationLead.d.ts +4 -2
  16. package/bundle/components/ApplicationLeadForm/useLeadFormStore.d.ts +15 -0
  17. package/bundle/components/CreditCardForm/CreditCardFormContent.d.ts +2 -2
  18. package/bundle/components/CreditCardForm/calculateInputs.d.ts +2 -2
  19. package/bundle/components/CreditCardForm/formStateMap.d.ts +2 -2
  20. package/bundle/components/CreditCardForm/getCardData.d.ts +2 -2
  21. package/bundle/components/CreditCardForm/getCreditCardFormTaskData.d.ts +2 -2
  22. package/bundle/components/CreditCardForm/getFifthStepData.d.ts +2 -2
  23. package/bundle/components/CreditCardForm/getFourthStepData.d.ts +2 -2
  24. package/bundle/components/CreditCardForm/getInitialFormState.d.ts +2 -2
  25. package/bundle/components/CreditCardForm/getSecondStepData.d.ts +2 -2
  26. package/bundle/components/CreditCardForm/getSixthStepData.d.ts +4 -4
  27. package/bundle/components/CreditCardForm/getThirdStepData.d.ts +2 -2
  28. package/bundle/components/CreditCardForm/renderInputs.d.ts +2 -2
  29. package/bundle/components/CreditCardForm/renderStep.d.ts +3 -3
  30. package/bundle/components/CreditCardForm/useCreditCardFormAPI.d.ts +2 -2
  31. package/bundle/components/CreditForm/calculateInputs.d.ts +2 -2
  32. package/bundle/components/CreditForm/formStateMap.d.ts +2 -2
  33. package/bundle/components/CreditForm/getCalcData.d.ts +2 -2
  34. package/bundle/components/CreditForm/getCreditFormTaskData.d.ts +2 -2
  35. package/bundle/components/CreditForm/getFifthStepData.d.ts +2 -2
  36. package/bundle/components/CreditForm/getFirstStepData.d.ts +2 -2
  37. package/bundle/components/CreditForm/getFourthStepData.d.ts +2 -2
  38. package/bundle/components/CreditForm/getInitialFormState.d.ts +2 -2
  39. package/bundle/components/CreditForm/getSecondStepData.d.ts +2 -2
  40. package/bundle/components/CreditForm/getThirdStepData.d.ts +2 -2
  41. package/bundle/components/CreditForm/getZeroStepData.d.ts +2 -2
  42. package/bundle/components/CreditForm/renderInputs.d.ts +2 -2
  43. package/bundle/components/CreditForm/renderStep.d.ts +3 -3
  44. package/bundle/components/CreditForm/useCreditFormAPI.d.ts +2 -2
  45. package/bundle/components/CreditForm/utils.d.ts +1 -1
  46. package/bundle/hooks/useCreditFormStore.d.ts +13 -0
  47. package/bundle/hooks/useLeadFormData.d.ts +1 -1
  48. package/bundle/hooks/useSetter.d.ts +2 -0
  49. package/bundle/ui-kit/DialogManager/useDialog.d.ts +4 -1
  50. package/bundle/ui-kit/FormField/SelectField.d.ts +1 -7
  51. package/bundle/ui-kit/FormField/updateOrganizationFields.d.ts +4 -0
  52. package/bundle/ui-kit/FormField/validators.d.ts +1 -1
  53. package/bundle/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +2 -5
  54. package/dist/api/RetailAPI/model/EOrganizationActivityTypes.d.ts +23 -0
  55. package/dist/api/RetailAPI/model/EOrganizationActivityTypes.js +2 -0
  56. package/dist/api/RetailAPI/model/EOrganizationActivityTypes.js.map +1 -0
  57. package/dist/api/RetailAPI/model/LeadFormData.d.ts +7 -0
  58. package/dist/api/RetailAPI/model/LeadFormData.js +2 -0
  59. package/dist/api/RetailAPI/model/LeadFormData.js.map +1 -0
  60. package/dist/api/RetailAPI/utils/getOrganizationParams.d.ts +17 -0
  61. package/dist/api/RetailAPI/utils/getOrganizationParams.js +101 -0
  62. package/dist/api/RetailAPI/utils/getOrganizationParams.js.map +1 -0
  63. package/dist/api/RetailAPI/utils/getUpdateUserProfile.d.ts +2 -2
  64. package/dist/api/RetailAPI/utils/getUpdateUserProfile.js +1 -0
  65. package/dist/api/RetailAPI/utils/getUpdateUserProfile.js.map +1 -1
  66. package/dist/api/dadataHints/dadataHintsType.d.ts +3 -0
  67. package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +2 -7
  68. package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  69. package/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -2
  70. package/dist/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
  71. package/dist/components/ApplicationLeadForm/LeadFormState.d.ts +147 -0
  72. package/dist/components/ApplicationLeadForm/LeadFormState.js +2 -0
  73. package/dist/components/ApplicationLeadForm/LeadFormState.js.map +1 -0
  74. package/dist/components/ApplicationLeadForm/consents.d.ts +3 -3
  75. package/dist/components/ApplicationLeadForm/getInitialFormState.d.ts +2 -148
  76. package/dist/components/ApplicationLeadForm/getInitialFormState.js +3 -5
  77. package/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  78. package/dist/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +2 -2
  79. package/dist/components/ApplicationLeadForm/getLeadFormTaskData.js.map +1 -1
  80. package/dist/components/ApplicationLeadForm/pasreEsiaProfile.d.ts +2 -2
  81. package/dist/components/ApplicationLeadForm/pasreEsiaProfile.js.map +1 -1
  82. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +5 -6
  83. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +11 -19
  84. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  85. package/dist/components/ApplicationLeadForm/useInitApplicationLead.d.ts +4 -2
  86. package/dist/components/ApplicationLeadForm/useInitApplicationLead.js +9 -7
  87. package/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  88. package/dist/components/ApplicationLeadForm/useLeadFormStore.d.ts +15 -0
  89. package/dist/components/ApplicationLeadForm/useLeadFormStore.js +6 -0
  90. package/dist/components/ApplicationLeadForm/useLeadFormStore.js.map +1 -0
  91. package/dist/components/CreditCardForm/CreditCardFormContent.d.ts +2 -2
  92. package/dist/components/CreditCardForm/calculateInputs.d.ts +2 -2
  93. package/dist/components/CreditCardForm/formStateMap.d.ts +2 -2
  94. package/dist/components/CreditCardForm/formStateMap.js.map +1 -1
  95. package/dist/components/CreditCardForm/getCardData.d.ts +2 -2
  96. package/dist/components/CreditCardForm/getCardData.js.map +1 -1
  97. package/dist/components/CreditCardForm/getCreditCardFormTaskData.d.ts +2 -2
  98. package/dist/components/CreditCardForm/getCreditCardFormTaskData.js.map +1 -1
  99. package/dist/components/CreditCardForm/getFifthStepData.d.ts +2 -2
  100. package/dist/components/CreditCardForm/getFifthStepData.js.map +1 -1
  101. package/dist/components/CreditCardForm/getFourthStepData.d.ts +2 -2
  102. package/dist/components/CreditCardForm/getFourthStepData.js.map +1 -1
  103. package/dist/components/CreditCardForm/getInitialFormState.d.ts +2 -2
  104. package/dist/components/CreditCardForm/getInitialFormState.js.map +1 -1
  105. package/dist/components/CreditCardForm/getSecondStepData.d.ts +2 -2
  106. package/dist/components/CreditCardForm/getSecondStepData.js.map +1 -1
  107. package/dist/components/CreditCardForm/getSixthStepData.d.ts +4 -4
  108. package/dist/components/CreditCardForm/getSixthStepData.js.map +1 -1
  109. package/dist/components/CreditCardForm/getThirdStepData.d.ts +2 -2
  110. package/dist/components/CreditCardForm/getThirdStepData.js.map +1 -1
  111. package/dist/components/CreditCardForm/renderInputs.d.ts +2 -2
  112. package/dist/components/CreditCardForm/renderStep.d.ts +3 -3
  113. package/dist/components/CreditCardForm/renderStep.js.map +1 -1
  114. package/dist/components/CreditCardForm/useCreditCardFormAPI.d.ts +2 -2
  115. package/dist/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
  116. package/dist/components/CreditForm/PendingStatusContent.js.map +1 -1
  117. package/dist/components/CreditForm/calculateInputs.d.ts +2 -2
  118. package/dist/components/CreditForm/formStateMap.d.ts +2 -2
  119. package/dist/components/CreditForm/formStateMap.js.map +1 -1
  120. package/dist/components/CreditForm/getCalcData.d.ts +2 -2
  121. package/dist/components/CreditForm/getCalcData.js.map +1 -1
  122. package/dist/components/CreditForm/getCreditFormTaskData.d.ts +2 -2
  123. package/dist/components/CreditForm/getCreditFormTaskData.js.map +1 -1
  124. package/dist/components/CreditForm/getFifthStepData.d.ts +2 -2
  125. package/dist/components/CreditForm/getFifthStepData.js.map +1 -1
  126. package/dist/components/CreditForm/getFirstStepData.d.ts +2 -2
  127. package/dist/components/CreditForm/getFirstStepData.js.map +1 -1
  128. package/dist/components/CreditForm/getFourthStepData.d.ts +2 -2
  129. package/dist/components/CreditForm/getFourthStepData.js.map +1 -1
  130. package/dist/components/CreditForm/getInitialFormState.d.ts +2 -2
  131. package/dist/components/CreditForm/getInitialFormState.js.map +1 -1
  132. package/dist/components/CreditForm/getSecondStepData.d.ts +2 -2
  133. package/dist/components/CreditForm/getSecondStepData.js.map +1 -1
  134. package/dist/components/CreditForm/getThirdStepData.d.ts +2 -2
  135. package/dist/components/CreditForm/getThirdStepData.js.map +1 -1
  136. package/dist/components/CreditForm/getZeroStepData.d.ts +2 -2
  137. package/dist/components/CreditForm/getZeroStepData.js.map +1 -1
  138. package/dist/components/CreditForm/renderInputs.d.ts +2 -2
  139. package/dist/components/CreditForm/renderStep.d.ts +3 -3
  140. package/dist/components/CreditForm/renderStep.js.map +1 -1
  141. package/dist/components/CreditForm/useCreditFormAPI.d.ts +2 -2
  142. package/dist/components/CreditForm/useCreditFormAPI.js.map +1 -1
  143. package/dist/components/CreditForm/utils.d.ts +1 -1
  144. package/dist/hooks/useCreditFormStore.d.ts +13 -0
  145. package/dist/hooks/useCreditFormStore.js +8 -0
  146. package/dist/hooks/useCreditFormStore.js.map +1 -0
  147. package/dist/hooks/useLeadFormData.d.ts +1 -1
  148. package/dist/hooks/useSetter.d.ts +2 -0
  149. package/dist/hooks/useSetter.js +14 -0
  150. package/dist/hooks/useSetter.js.map +1 -0
  151. package/dist/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js +2 -10
  152. package/dist/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js.map +1 -1
  153. package/dist/ui-kit/DialogManager/useDialog.d.ts +4 -1
  154. package/dist/ui-kit/DialogManager/useDialog.js.map +1 -1
  155. package/dist/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
  156. package/dist/ui-kit/FormField/Fields/AmountWorkersField.js +10 -2
  157. package/dist/ui-kit/FormField/Fields/AmountWorkersField.js.map +1 -1
  158. package/dist/ui-kit/FormField/Fields/EmployerActivitiesField.js +10 -2
  159. package/dist/ui-kit/FormField/Fields/EmployerActivitiesField.js.map +1 -1
  160. package/dist/ui-kit/FormField/Fields/EmployerOrganizationField.js +10 -2
  161. package/dist/ui-kit/FormField/Fields/EmployerOrganizationField.js.map +1 -1
  162. package/dist/ui-kit/FormField/Fields/InnField.js +4 -3
  163. package/dist/ui-kit/FormField/Fields/InnField.js.map +1 -1
  164. package/dist/ui-kit/FormField/Fields/OrganizationField.js +10 -2
  165. package/dist/ui-kit/FormField/Fields/OrganizationField.js.map +1 -1
  166. package/dist/ui-kit/FormField/Fields/OrganizationNameField.js +4 -1
  167. package/dist/ui-kit/FormField/Fields/OrganizationNameField.js.map +1 -1
  168. package/dist/ui-kit/FormField/SelectField.d.ts +1 -7
  169. package/dist/ui-kit/FormField/SelectField.js.map +1 -1
  170. package/dist/ui-kit/FormField/updateOrganizationFields.d.ts +4 -0
  171. package/dist/ui-kit/FormField/updateOrganizationFields.js +17 -0
  172. package/dist/ui-kit/FormField/updateOrganizationFields.js.map +1 -0
  173. package/dist/ui-kit/FormField/validators.d.ts +1 -1
  174. package/dist/ui-kit/RichText/RichText.js +3 -6
  175. package/dist/ui-kit/RichText/RichText.js.map +1 -1
  176. package/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +2 -5
  177. package/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +5 -3
  178. package/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
  179. package/lib/api/RetailAPI/model/EOrganizationActivityTypes.d.ts +23 -0
  180. package/lib/api/RetailAPI/model/EOrganizationActivityTypes.js +2 -0
  181. package/lib/api/RetailAPI/model/EOrganizationActivityTypes.js.map +1 -0
  182. package/lib/api/RetailAPI/model/LeadFormData.d.ts +7 -0
  183. package/lib/api/RetailAPI/model/LeadFormData.js +2 -0
  184. package/lib/api/RetailAPI/model/LeadFormData.js.map +1 -0
  185. package/lib/api/RetailAPI/utils/getOrganizationParams.d.ts +17 -0
  186. package/lib/api/RetailAPI/utils/getOrganizationParams.js +95 -0
  187. package/lib/api/RetailAPI/utils/getOrganizationParams.js.map +1 -0
  188. package/lib/api/RetailAPI/utils/getUpdateUserProfile.d.ts +2 -2
  189. package/lib/api/RetailAPI/utils/getUpdateUserProfile.js +1 -0
  190. package/lib/api/RetailAPI/utils/getUpdateUserProfile.js.map +1 -1
  191. package/lib/api/dadataHints/dadataHintsType.d.ts +3 -0
  192. package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +3 -8
  193. package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  194. package/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -2
  195. package/lib/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
  196. package/lib/components/ApplicationLeadForm/LeadFormState.d.ts +147 -0
  197. package/lib/components/ApplicationLeadForm/LeadFormState.js +2 -0
  198. package/lib/components/ApplicationLeadForm/LeadFormState.js.map +1 -0
  199. package/lib/components/ApplicationLeadForm/consents.d.ts +3 -3
  200. package/lib/components/ApplicationLeadForm/getInitialFormState.d.ts +2 -148
  201. package/lib/components/ApplicationLeadForm/getInitialFormState.js +3 -5
  202. package/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  203. package/lib/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +2 -2
  204. package/lib/components/ApplicationLeadForm/getLeadFormTaskData.js.map +1 -1
  205. package/lib/components/ApplicationLeadForm/pasreEsiaProfile.d.ts +2 -2
  206. package/lib/components/ApplicationLeadForm/pasreEsiaProfile.js.map +1 -1
  207. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +5 -6
  208. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +11 -19
  209. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  210. package/lib/components/ApplicationLeadForm/useInitApplicationLead.d.ts +4 -2
  211. package/lib/components/ApplicationLeadForm/useInitApplicationLead.js +10 -8
  212. package/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  213. package/lib/components/ApplicationLeadForm/useLeadFormStore.d.ts +15 -0
  214. package/lib/components/ApplicationLeadForm/useLeadFormStore.js +3 -0
  215. package/lib/components/ApplicationLeadForm/useLeadFormStore.js.map +1 -0
  216. package/lib/components/CreditCardForm/CreditCardFormContent.d.ts +2 -2
  217. package/lib/components/CreditCardForm/calculateInputs.d.ts +2 -2
  218. package/lib/components/CreditCardForm/formStateMap.d.ts +2 -2
  219. package/lib/components/CreditCardForm/formStateMap.js.map +1 -1
  220. package/lib/components/CreditCardForm/getCardData.d.ts +2 -2
  221. package/lib/components/CreditCardForm/getCardData.js.map +1 -1
  222. package/lib/components/CreditCardForm/getCreditCardFormTaskData.d.ts +2 -2
  223. package/lib/components/CreditCardForm/getCreditCardFormTaskData.js.map +1 -1
  224. package/lib/components/CreditCardForm/getFifthStepData.d.ts +2 -2
  225. package/lib/components/CreditCardForm/getFifthStepData.js.map +1 -1
  226. package/lib/components/CreditCardForm/getFourthStepData.d.ts +2 -2
  227. package/lib/components/CreditCardForm/getFourthStepData.js.map +1 -1
  228. package/lib/components/CreditCardForm/getInitialFormState.d.ts +2 -2
  229. package/lib/components/CreditCardForm/getInitialFormState.js.map +1 -1
  230. package/lib/components/CreditCardForm/getSecondStepData.d.ts +2 -2
  231. package/lib/components/CreditCardForm/getSecondStepData.js.map +1 -1
  232. package/lib/components/CreditCardForm/getSixthStepData.d.ts +4 -4
  233. package/lib/components/CreditCardForm/getSixthStepData.js.map +1 -1
  234. package/lib/components/CreditCardForm/getThirdStepData.d.ts +2 -2
  235. package/lib/components/CreditCardForm/getThirdStepData.js.map +1 -1
  236. package/lib/components/CreditCardForm/renderInputs.d.ts +2 -2
  237. package/lib/components/CreditCardForm/renderStep.d.ts +3 -3
  238. package/lib/components/CreditCardForm/renderStep.js.map +1 -1
  239. package/lib/components/CreditCardForm/useCreditCardFormAPI.d.ts +2 -2
  240. package/lib/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
  241. package/lib/components/CreditForm/PendingStatusContent.js.map +1 -1
  242. package/lib/components/CreditForm/calculateInputs.d.ts +2 -2
  243. package/lib/components/CreditForm/formStateMap.d.ts +2 -2
  244. package/lib/components/CreditForm/formStateMap.js.map +1 -1
  245. package/lib/components/CreditForm/getCalcData.d.ts +2 -2
  246. package/lib/components/CreditForm/getCalcData.js.map +1 -1
  247. package/lib/components/CreditForm/getCreditFormTaskData.d.ts +2 -2
  248. package/lib/components/CreditForm/getCreditFormTaskData.js.map +1 -1
  249. package/lib/components/CreditForm/getFifthStepData.d.ts +2 -2
  250. package/lib/components/CreditForm/getFifthStepData.js.map +1 -1
  251. package/lib/components/CreditForm/getFirstStepData.d.ts +2 -2
  252. package/lib/components/CreditForm/getFirstStepData.js.map +1 -1
  253. package/lib/components/CreditForm/getFourthStepData.d.ts +2 -2
  254. package/lib/components/CreditForm/getFourthStepData.js.map +1 -1
  255. package/lib/components/CreditForm/getInitialFormState.d.ts +2 -2
  256. package/lib/components/CreditForm/getInitialFormState.js.map +1 -1
  257. package/lib/components/CreditForm/getSecondStepData.d.ts +2 -2
  258. package/lib/components/CreditForm/getSecondStepData.js.map +1 -1
  259. package/lib/components/CreditForm/getThirdStepData.d.ts +2 -2
  260. package/lib/components/CreditForm/getThirdStepData.js.map +1 -1
  261. package/lib/components/CreditForm/getZeroStepData.d.ts +2 -2
  262. package/lib/components/CreditForm/getZeroStepData.js.map +1 -1
  263. package/lib/components/CreditForm/renderInputs.d.ts +2 -2
  264. package/lib/components/CreditForm/renderStep.d.ts +3 -3
  265. package/lib/components/CreditForm/renderStep.js.map +1 -1
  266. package/lib/components/CreditForm/useCreditFormAPI.d.ts +2 -2
  267. package/lib/components/CreditForm/useCreditFormAPI.js.map +1 -1
  268. package/lib/components/CreditForm/utils.d.ts +1 -1
  269. package/lib/hooks/useCreditFormStore.d.ts +13 -0
  270. package/lib/hooks/useCreditFormStore.js +5 -0
  271. package/lib/hooks/useCreditFormStore.js.map +1 -0
  272. package/lib/hooks/useLeadFormData.d.ts +1 -1
  273. package/lib/hooks/useSetter.d.ts +2 -0
  274. package/lib/hooks/useSetter.js +11 -0
  275. package/lib/hooks/useSetter.js.map +1 -0
  276. package/lib/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js +2 -10
  277. package/lib/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js.map +1 -1
  278. package/lib/ui-kit/DialogManager/useDialog.d.ts +4 -1
  279. package/lib/ui-kit/DialogManager/useDialog.js.map +1 -1
  280. package/lib/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
  281. package/lib/ui-kit/FormField/Fields/AmountWorkersField.js +10 -2
  282. package/lib/ui-kit/FormField/Fields/AmountWorkersField.js.map +1 -1
  283. package/lib/ui-kit/FormField/Fields/EmployerActivitiesField.js +10 -2
  284. package/lib/ui-kit/FormField/Fields/EmployerActivitiesField.js.map +1 -1
  285. package/lib/ui-kit/FormField/Fields/EmployerOrganizationField.js +10 -2
  286. package/lib/ui-kit/FormField/Fields/EmployerOrganizationField.js.map +1 -1
  287. package/lib/ui-kit/FormField/Fields/InnField.js +4 -3
  288. package/lib/ui-kit/FormField/Fields/InnField.js.map +1 -1
  289. package/lib/ui-kit/FormField/Fields/OrganizationField.js +10 -2
  290. package/lib/ui-kit/FormField/Fields/OrganizationField.js.map +1 -1
  291. package/lib/ui-kit/FormField/Fields/OrganizationNameField.js +4 -1
  292. package/lib/ui-kit/FormField/Fields/OrganizationNameField.js.map +1 -1
  293. package/lib/ui-kit/FormField/SelectField.d.ts +1 -7
  294. package/lib/ui-kit/FormField/SelectField.js.map +1 -1
  295. package/lib/ui-kit/FormField/updateOrganizationFields.d.ts +4 -0
  296. package/lib/ui-kit/FormField/updateOrganizationFields.js +14 -0
  297. package/lib/ui-kit/FormField/updateOrganizationFields.js.map +1 -0
  298. package/lib/ui-kit/FormField/validators.d.ts +1 -1
  299. package/lib/ui-kit/RichText/RichText.js +3 -6
  300. package/lib/ui-kit/RichText/RichText.js.map +1 -1
  301. package/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +2 -5
  302. package/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +5 -3
  303. package/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
  304. package/mobile/bundle/api/RetailAPI/model/EOrganizationActivityTypes.d.ts +23 -0
  305. package/mobile/bundle/api/RetailAPI/model/LeadFormData.d.ts +7 -0
  306. package/mobile/bundle/api/RetailAPI/utils/getOrganizationParams.d.ts +17 -0
  307. package/mobile/bundle/api/RetailAPI/utils/getUpdateUserProfile.d.ts +2 -2
  308. package/mobile/bundle/api/dadataHints/dadataHintsType.d.ts +3 -0
  309. package/mobile/bundle/bundle.umd.js +381 -256
  310. package/mobile/bundle/bundle.umd.min.js +1 -1
  311. package/mobile/bundle/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -2
  312. package/mobile/bundle/components/ApplicationLeadForm/LeadFormState.d.ts +147 -0
  313. package/mobile/bundle/components/ApplicationLeadForm/consents.d.ts +3 -3
  314. package/mobile/bundle/components/ApplicationLeadForm/getInitialFormState.d.ts +2 -148
  315. package/mobile/bundle/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +2 -2
  316. package/mobile/bundle/components/ApplicationLeadForm/pasreEsiaProfile.d.ts +2 -2
  317. package/mobile/bundle/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +5 -6
  318. package/mobile/bundle/components/ApplicationLeadForm/useInitApplicationLead.d.ts +4 -2
  319. package/mobile/bundle/components/ApplicationLeadForm/useLeadFormStore.d.ts +15 -0
  320. package/mobile/bundle/components/CreditCardForm/CreditCardFormContent.d.ts +2 -2
  321. package/mobile/bundle/components/CreditCardForm/calculateInputs.d.ts +2 -2
  322. package/mobile/bundle/components/CreditCardForm/formStateMap.d.ts +2 -2
  323. package/mobile/bundle/components/CreditCardForm/getCardData.d.ts +2 -2
  324. package/mobile/bundle/components/CreditCardForm/getCreditCardFormTaskData.d.ts +2 -2
  325. package/mobile/bundle/components/CreditCardForm/getFifthStepData.d.ts +2 -2
  326. package/mobile/bundle/components/CreditCardForm/getFourthStepData.d.ts +2 -2
  327. package/mobile/bundle/components/CreditCardForm/getInitialFormState.d.ts +2 -2
  328. package/mobile/bundle/components/CreditCardForm/getSecondStepData.d.ts +2 -2
  329. package/mobile/bundle/components/CreditCardForm/getSixthStepData.d.ts +4 -4
  330. package/mobile/bundle/components/CreditCardForm/getThirdStepData.d.ts +2 -2
  331. package/mobile/bundle/components/CreditCardForm/renderInputs.d.ts +2 -2
  332. package/mobile/bundle/components/CreditCardForm/renderStep.d.ts +3 -3
  333. package/mobile/bundle/components/CreditCardForm/useCreditCardFormAPI.d.ts +2 -2
  334. package/mobile/bundle/components/CreditForm/calculateInputs.d.ts +2 -2
  335. package/mobile/bundle/components/CreditForm/formStateMap.d.ts +2 -2
  336. package/mobile/bundle/components/CreditForm/getCalcData.d.ts +2 -2
  337. package/mobile/bundle/components/CreditForm/getCreditFormTaskData.d.ts +2 -2
  338. package/mobile/bundle/components/CreditForm/getFifthStepData.d.ts +2 -2
  339. package/mobile/bundle/components/CreditForm/getFirstStepData.d.ts +2 -2
  340. package/mobile/bundle/components/CreditForm/getFourthStepData.d.ts +2 -2
  341. package/mobile/bundle/components/CreditForm/getInitialFormState.d.ts +2 -2
  342. package/mobile/bundle/components/CreditForm/getSecondStepData.d.ts +2 -2
  343. package/mobile/bundle/components/CreditForm/getThirdStepData.d.ts +2 -2
  344. package/mobile/bundle/components/CreditForm/getZeroStepData.d.ts +2 -2
  345. package/mobile/bundle/components/CreditForm/renderInputs.d.ts +2 -2
  346. package/mobile/bundle/components/CreditForm/renderStep.d.ts +3 -3
  347. package/mobile/bundle/components/CreditForm/useCreditFormAPI.d.ts +2 -2
  348. package/mobile/bundle/components/CreditForm/utils.d.ts +1 -1
  349. package/mobile/bundle/hooks/useCreditFormStore.d.ts +13 -0
  350. package/mobile/bundle/hooks/useLeadFormData.d.ts +1 -1
  351. package/mobile/bundle/hooks/useSetter.d.ts +2 -0
  352. package/mobile/bundle/ui-kit/DialogManager/useDialog.d.ts +4 -1
  353. package/mobile/bundle/ui-kit/FormField/SelectField.d.ts +1 -7
  354. package/mobile/bundle/ui-kit/FormField/updateOrganizationFields.d.ts +4 -0
  355. package/mobile/bundle/ui-kit/FormField/validators.d.ts +1 -1
  356. package/mobile/bundle/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +2 -5
  357. package/mobile/dist/api/RetailAPI/model/EOrganizationActivityTypes.d.ts +23 -0
  358. package/mobile/dist/api/RetailAPI/model/EOrganizationActivityTypes.js +2 -0
  359. package/mobile/dist/api/RetailAPI/model/EOrganizationActivityTypes.js.map +1 -0
  360. package/mobile/dist/api/RetailAPI/model/LeadFormData.d.ts +7 -0
  361. package/mobile/dist/api/RetailAPI/model/LeadFormData.js +2 -0
  362. package/mobile/dist/api/RetailAPI/model/LeadFormData.js.map +1 -0
  363. package/mobile/dist/api/RetailAPI/utils/getOrganizationParams.d.ts +17 -0
  364. package/mobile/dist/api/RetailAPI/utils/getOrganizationParams.js +101 -0
  365. package/mobile/dist/api/RetailAPI/utils/getOrganizationParams.js.map +1 -0
  366. package/mobile/dist/api/RetailAPI/utils/getUpdateUserProfile.d.ts +2 -2
  367. package/mobile/dist/api/RetailAPI/utils/getUpdateUserProfile.js +1 -0
  368. package/mobile/dist/api/RetailAPI/utils/getUpdateUserProfile.js.map +1 -1
  369. package/mobile/dist/api/dadataHints/dadataHintsType.d.ts +3 -0
  370. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +2 -7
  371. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  372. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -2
  373. package/mobile/dist/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
  374. package/mobile/dist/components/ApplicationLeadForm/LeadFormState.d.ts +147 -0
  375. package/mobile/dist/components/ApplicationLeadForm/LeadFormState.js +2 -0
  376. package/mobile/dist/components/ApplicationLeadForm/LeadFormState.js.map +1 -0
  377. package/mobile/dist/components/ApplicationLeadForm/consents.d.ts +3 -3
  378. package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.d.ts +2 -148
  379. package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.js +3 -5
  380. package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  381. package/mobile/dist/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +2 -2
  382. package/mobile/dist/components/ApplicationLeadForm/getLeadFormTaskData.js.map +1 -1
  383. package/mobile/dist/components/ApplicationLeadForm/pasreEsiaProfile.d.ts +2 -2
  384. package/mobile/dist/components/ApplicationLeadForm/pasreEsiaProfile.js.map +1 -1
  385. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +5 -6
  386. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +11 -19
  387. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  388. package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.d.ts +4 -2
  389. package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js +9 -7
  390. package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  391. package/mobile/dist/components/ApplicationLeadForm/useLeadFormStore.d.ts +15 -0
  392. package/mobile/dist/components/ApplicationLeadForm/useLeadFormStore.js +6 -0
  393. package/mobile/dist/components/ApplicationLeadForm/useLeadFormStore.js.map +1 -0
  394. package/mobile/dist/components/CreditCardForm/CreditCardFormContent.d.ts +2 -2
  395. package/mobile/dist/components/CreditCardForm/calculateInputs.d.ts +2 -2
  396. package/mobile/dist/components/CreditCardForm/formStateMap.d.ts +2 -2
  397. package/mobile/dist/components/CreditCardForm/formStateMap.js.map +1 -1
  398. package/mobile/dist/components/CreditCardForm/getCardData.d.ts +2 -2
  399. package/mobile/dist/components/CreditCardForm/getCardData.js.map +1 -1
  400. package/mobile/dist/components/CreditCardForm/getCreditCardFormTaskData.d.ts +2 -2
  401. package/mobile/dist/components/CreditCardForm/getCreditCardFormTaskData.js.map +1 -1
  402. package/mobile/dist/components/CreditCardForm/getFifthStepData.d.ts +2 -2
  403. package/mobile/dist/components/CreditCardForm/getFifthStepData.js.map +1 -1
  404. package/mobile/dist/components/CreditCardForm/getFourthStepData.d.ts +2 -2
  405. package/mobile/dist/components/CreditCardForm/getFourthStepData.js.map +1 -1
  406. package/mobile/dist/components/CreditCardForm/getInitialFormState.d.ts +2 -2
  407. package/mobile/dist/components/CreditCardForm/getInitialFormState.js.map +1 -1
  408. package/mobile/dist/components/CreditCardForm/getSecondStepData.d.ts +2 -2
  409. package/mobile/dist/components/CreditCardForm/getSecondStepData.js.map +1 -1
  410. package/mobile/dist/components/CreditCardForm/getSixthStepData.d.ts +4 -4
  411. package/mobile/dist/components/CreditCardForm/getSixthStepData.js.map +1 -1
  412. package/mobile/dist/components/CreditCardForm/getThirdStepData.d.ts +2 -2
  413. package/mobile/dist/components/CreditCardForm/getThirdStepData.js.map +1 -1
  414. package/mobile/dist/components/CreditCardForm/renderInputs.d.ts +2 -2
  415. package/mobile/dist/components/CreditCardForm/renderStep.d.ts +3 -3
  416. package/mobile/dist/components/CreditCardForm/renderStep.js.map +1 -1
  417. package/mobile/dist/components/CreditCardForm/useCreditCardFormAPI.d.ts +2 -2
  418. package/mobile/dist/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
  419. package/mobile/dist/components/CreditForm/PendingStatusContent.js.map +1 -1
  420. package/mobile/dist/components/CreditForm/calculateInputs.d.ts +2 -2
  421. package/mobile/dist/components/CreditForm/formStateMap.d.ts +2 -2
  422. package/mobile/dist/components/CreditForm/formStateMap.js.map +1 -1
  423. package/mobile/dist/components/CreditForm/getCalcData.d.ts +2 -2
  424. package/mobile/dist/components/CreditForm/getCalcData.js.map +1 -1
  425. package/mobile/dist/components/CreditForm/getCreditFormTaskData.d.ts +2 -2
  426. package/mobile/dist/components/CreditForm/getCreditFormTaskData.js.map +1 -1
  427. package/mobile/dist/components/CreditForm/getFifthStepData.d.ts +2 -2
  428. package/mobile/dist/components/CreditForm/getFifthStepData.js.map +1 -1
  429. package/mobile/dist/components/CreditForm/getFirstStepData.d.ts +2 -2
  430. package/mobile/dist/components/CreditForm/getFirstStepData.js.map +1 -1
  431. package/mobile/dist/components/CreditForm/getFourthStepData.d.ts +2 -2
  432. package/mobile/dist/components/CreditForm/getFourthStepData.js.map +1 -1
  433. package/mobile/dist/components/CreditForm/getInitialFormState.d.ts +2 -2
  434. package/mobile/dist/components/CreditForm/getInitialFormState.js.map +1 -1
  435. package/mobile/dist/components/CreditForm/getSecondStepData.d.ts +2 -2
  436. package/mobile/dist/components/CreditForm/getSecondStepData.js.map +1 -1
  437. package/mobile/dist/components/CreditForm/getThirdStepData.d.ts +2 -2
  438. package/mobile/dist/components/CreditForm/getThirdStepData.js.map +1 -1
  439. package/mobile/dist/components/CreditForm/getZeroStepData.d.ts +2 -2
  440. package/mobile/dist/components/CreditForm/getZeroStepData.js.map +1 -1
  441. package/mobile/dist/components/CreditForm/renderInputs.d.ts +2 -2
  442. package/mobile/dist/components/CreditForm/renderStep.d.ts +3 -3
  443. package/mobile/dist/components/CreditForm/renderStep.js.map +1 -1
  444. package/mobile/dist/components/CreditForm/useCreditFormAPI.d.ts +2 -2
  445. package/mobile/dist/components/CreditForm/useCreditFormAPI.js.map +1 -1
  446. package/mobile/dist/components/CreditForm/utils.d.ts +1 -1
  447. package/mobile/dist/hooks/useCreditFormStore.d.ts +13 -0
  448. package/mobile/dist/hooks/useCreditFormStore.js +8 -0
  449. package/mobile/dist/hooks/useCreditFormStore.js.map +1 -0
  450. package/mobile/dist/hooks/useLeadFormData.d.ts +1 -1
  451. package/mobile/dist/hooks/useSetter.d.ts +2 -0
  452. package/mobile/dist/hooks/useSetter.js +14 -0
  453. package/mobile/dist/hooks/useSetter.js.map +1 -0
  454. package/mobile/dist/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js +2 -10
  455. package/mobile/dist/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js.map +1 -1
  456. package/mobile/dist/ui-kit/DialogManager/useDialog.d.ts +4 -1
  457. package/mobile/dist/ui-kit/DialogManager/useDialog.js.map +1 -1
  458. package/mobile/dist/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
  459. package/mobile/dist/ui-kit/FormField/Fields/AmountWorkersField.js +10 -2
  460. package/mobile/dist/ui-kit/FormField/Fields/AmountWorkersField.js.map +1 -1
  461. package/mobile/dist/ui-kit/FormField/Fields/EmployerActivitiesField.js +10 -2
  462. package/mobile/dist/ui-kit/FormField/Fields/EmployerActivitiesField.js.map +1 -1
  463. package/mobile/dist/ui-kit/FormField/Fields/EmployerOrganizationField.js +10 -2
  464. package/mobile/dist/ui-kit/FormField/Fields/EmployerOrganizationField.js.map +1 -1
  465. package/mobile/dist/ui-kit/FormField/Fields/InnField.js +4 -3
  466. package/mobile/dist/ui-kit/FormField/Fields/InnField.js.map +1 -1
  467. package/mobile/dist/ui-kit/FormField/Fields/OrganizationField.js +10 -2
  468. package/mobile/dist/ui-kit/FormField/Fields/OrganizationField.js.map +1 -1
  469. package/mobile/dist/ui-kit/FormField/Fields/OrganizationNameField.js +4 -1
  470. package/mobile/dist/ui-kit/FormField/Fields/OrganizationNameField.js.map +1 -1
  471. package/mobile/dist/ui-kit/FormField/SelectField.d.ts +1 -7
  472. package/mobile/dist/ui-kit/FormField/SelectField.js.map +1 -1
  473. package/mobile/dist/ui-kit/FormField/updateOrganizationFields.d.ts +4 -0
  474. package/mobile/dist/ui-kit/FormField/updateOrganizationFields.js +17 -0
  475. package/mobile/dist/ui-kit/FormField/updateOrganizationFields.js.map +1 -0
  476. package/mobile/dist/ui-kit/FormField/validators.d.ts +1 -1
  477. package/mobile/dist/ui-kit/RichText/RichText.js +3 -6
  478. package/mobile/dist/ui-kit/RichText/RichText.js.map +1 -1
  479. package/mobile/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +2 -5
  480. package/mobile/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +5 -3
  481. package/mobile/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
  482. package/mobile/lib/api/RetailAPI/model/EOrganizationActivityTypes.d.ts +23 -0
  483. package/mobile/lib/api/RetailAPI/model/EOrganizationActivityTypes.js +2 -0
  484. package/mobile/lib/api/RetailAPI/model/EOrganizationActivityTypes.js.map +1 -0
  485. package/mobile/lib/api/RetailAPI/model/LeadFormData.d.ts +7 -0
  486. package/mobile/lib/api/RetailAPI/model/LeadFormData.js +2 -0
  487. package/mobile/lib/api/RetailAPI/model/LeadFormData.js.map +1 -0
  488. package/mobile/lib/api/RetailAPI/utils/getOrganizationParams.d.ts +17 -0
  489. package/mobile/lib/api/RetailAPI/utils/getOrganizationParams.js +95 -0
  490. package/mobile/lib/api/RetailAPI/utils/getOrganizationParams.js.map +1 -0
  491. package/mobile/lib/api/RetailAPI/utils/getUpdateUserProfile.d.ts +2 -2
  492. package/mobile/lib/api/RetailAPI/utils/getUpdateUserProfile.js +1 -0
  493. package/mobile/lib/api/RetailAPI/utils/getUpdateUserProfile.js.map +1 -1
  494. package/mobile/lib/api/dadataHints/dadataHintsType.d.ts +3 -0
  495. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +3 -8
  496. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  497. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -2
  498. package/mobile/lib/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
  499. package/mobile/lib/components/ApplicationLeadForm/LeadFormState.d.ts +147 -0
  500. package/mobile/lib/components/ApplicationLeadForm/LeadFormState.js +2 -0
  501. package/mobile/lib/components/ApplicationLeadForm/LeadFormState.js.map +1 -0
  502. package/mobile/lib/components/ApplicationLeadForm/consents.d.ts +3 -3
  503. package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.d.ts +2 -148
  504. package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.js +3 -5
  505. package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  506. package/mobile/lib/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +2 -2
  507. package/mobile/lib/components/ApplicationLeadForm/getLeadFormTaskData.js.map +1 -1
  508. package/mobile/lib/components/ApplicationLeadForm/pasreEsiaProfile.d.ts +2 -2
  509. package/mobile/lib/components/ApplicationLeadForm/pasreEsiaProfile.js.map +1 -1
  510. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +5 -6
  511. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +11 -19
  512. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  513. package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.d.ts +4 -2
  514. package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js +10 -8
  515. package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  516. package/mobile/lib/components/ApplicationLeadForm/useLeadFormStore.d.ts +15 -0
  517. package/mobile/lib/components/ApplicationLeadForm/useLeadFormStore.js +3 -0
  518. package/mobile/lib/components/ApplicationLeadForm/useLeadFormStore.js.map +1 -0
  519. package/mobile/lib/components/CreditCardForm/CreditCardFormContent.d.ts +2 -2
  520. package/mobile/lib/components/CreditCardForm/calculateInputs.d.ts +2 -2
  521. package/mobile/lib/components/CreditCardForm/formStateMap.d.ts +2 -2
  522. package/mobile/lib/components/CreditCardForm/formStateMap.js.map +1 -1
  523. package/mobile/lib/components/CreditCardForm/getCardData.d.ts +2 -2
  524. package/mobile/lib/components/CreditCardForm/getCardData.js.map +1 -1
  525. package/mobile/lib/components/CreditCardForm/getCreditCardFormTaskData.d.ts +2 -2
  526. package/mobile/lib/components/CreditCardForm/getCreditCardFormTaskData.js.map +1 -1
  527. package/mobile/lib/components/CreditCardForm/getFifthStepData.d.ts +2 -2
  528. package/mobile/lib/components/CreditCardForm/getFifthStepData.js.map +1 -1
  529. package/mobile/lib/components/CreditCardForm/getFourthStepData.d.ts +2 -2
  530. package/mobile/lib/components/CreditCardForm/getFourthStepData.js.map +1 -1
  531. package/mobile/lib/components/CreditCardForm/getInitialFormState.d.ts +2 -2
  532. package/mobile/lib/components/CreditCardForm/getInitialFormState.js.map +1 -1
  533. package/mobile/lib/components/CreditCardForm/getSecondStepData.d.ts +2 -2
  534. package/mobile/lib/components/CreditCardForm/getSecondStepData.js.map +1 -1
  535. package/mobile/lib/components/CreditCardForm/getSixthStepData.d.ts +4 -4
  536. package/mobile/lib/components/CreditCardForm/getSixthStepData.js.map +1 -1
  537. package/mobile/lib/components/CreditCardForm/getThirdStepData.d.ts +2 -2
  538. package/mobile/lib/components/CreditCardForm/getThirdStepData.js.map +1 -1
  539. package/mobile/lib/components/CreditCardForm/renderInputs.d.ts +2 -2
  540. package/mobile/lib/components/CreditCardForm/renderStep.d.ts +3 -3
  541. package/mobile/lib/components/CreditCardForm/renderStep.js.map +1 -1
  542. package/mobile/lib/components/CreditCardForm/useCreditCardFormAPI.d.ts +2 -2
  543. package/mobile/lib/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
  544. package/mobile/lib/components/CreditForm/PendingStatusContent.js.map +1 -1
  545. package/mobile/lib/components/CreditForm/calculateInputs.d.ts +2 -2
  546. package/mobile/lib/components/CreditForm/formStateMap.d.ts +2 -2
  547. package/mobile/lib/components/CreditForm/formStateMap.js.map +1 -1
  548. package/mobile/lib/components/CreditForm/getCalcData.d.ts +2 -2
  549. package/mobile/lib/components/CreditForm/getCalcData.js.map +1 -1
  550. package/mobile/lib/components/CreditForm/getCreditFormTaskData.d.ts +2 -2
  551. package/mobile/lib/components/CreditForm/getCreditFormTaskData.js.map +1 -1
  552. package/mobile/lib/components/CreditForm/getFifthStepData.d.ts +2 -2
  553. package/mobile/lib/components/CreditForm/getFifthStepData.js.map +1 -1
  554. package/mobile/lib/components/CreditForm/getFirstStepData.d.ts +2 -2
  555. package/mobile/lib/components/CreditForm/getFirstStepData.js.map +1 -1
  556. package/mobile/lib/components/CreditForm/getFourthStepData.d.ts +2 -2
  557. package/mobile/lib/components/CreditForm/getFourthStepData.js.map +1 -1
  558. package/mobile/lib/components/CreditForm/getInitialFormState.d.ts +2 -2
  559. package/mobile/lib/components/CreditForm/getInitialFormState.js.map +1 -1
  560. package/mobile/lib/components/CreditForm/getSecondStepData.d.ts +2 -2
  561. package/mobile/lib/components/CreditForm/getSecondStepData.js.map +1 -1
  562. package/mobile/lib/components/CreditForm/getThirdStepData.d.ts +2 -2
  563. package/mobile/lib/components/CreditForm/getThirdStepData.js.map +1 -1
  564. package/mobile/lib/components/CreditForm/getZeroStepData.d.ts +2 -2
  565. package/mobile/lib/components/CreditForm/getZeroStepData.js.map +1 -1
  566. package/mobile/lib/components/CreditForm/renderInputs.d.ts +2 -2
  567. package/mobile/lib/components/CreditForm/renderStep.d.ts +3 -3
  568. package/mobile/lib/components/CreditForm/renderStep.js.map +1 -1
  569. package/mobile/lib/components/CreditForm/useCreditFormAPI.d.ts +2 -2
  570. package/mobile/lib/components/CreditForm/useCreditFormAPI.js.map +1 -1
  571. package/mobile/lib/components/CreditForm/utils.d.ts +1 -1
  572. package/mobile/lib/hooks/useCreditFormStore.d.ts +13 -0
  573. package/mobile/lib/hooks/useCreditFormStore.js +5 -0
  574. package/mobile/lib/hooks/useCreditFormStore.js.map +1 -0
  575. package/mobile/lib/hooks/useLeadFormData.d.ts +1 -1
  576. package/mobile/lib/hooks/useSetter.d.ts +2 -0
  577. package/mobile/lib/hooks/useSetter.js +11 -0
  578. package/mobile/lib/hooks/useSetter.js.map +1 -0
  579. package/mobile/lib/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js +2 -10
  580. package/mobile/lib/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js.map +1 -1
  581. package/mobile/lib/ui-kit/DialogManager/useDialog.d.ts +4 -1
  582. package/mobile/lib/ui-kit/DialogManager/useDialog.js.map +1 -1
  583. package/mobile/lib/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
  584. package/mobile/lib/ui-kit/FormField/Fields/AmountWorkersField.js +10 -2
  585. package/mobile/lib/ui-kit/FormField/Fields/AmountWorkersField.js.map +1 -1
  586. package/mobile/lib/ui-kit/FormField/Fields/EmployerActivitiesField.js +10 -2
  587. package/mobile/lib/ui-kit/FormField/Fields/EmployerActivitiesField.js.map +1 -1
  588. package/mobile/lib/ui-kit/FormField/Fields/EmployerOrganizationField.js +10 -2
  589. package/mobile/lib/ui-kit/FormField/Fields/EmployerOrganizationField.js.map +1 -1
  590. package/mobile/lib/ui-kit/FormField/Fields/InnField.js +4 -3
  591. package/mobile/lib/ui-kit/FormField/Fields/InnField.js.map +1 -1
  592. package/mobile/lib/ui-kit/FormField/Fields/OrganizationField.js +10 -2
  593. package/mobile/lib/ui-kit/FormField/Fields/OrganizationField.js.map +1 -1
  594. package/mobile/lib/ui-kit/FormField/Fields/OrganizationNameField.js +4 -1
  595. package/mobile/lib/ui-kit/FormField/Fields/OrganizationNameField.js.map +1 -1
  596. package/mobile/lib/ui-kit/FormField/SelectField.d.ts +1 -7
  597. package/mobile/lib/ui-kit/FormField/SelectField.js.map +1 -1
  598. package/mobile/lib/ui-kit/FormField/updateOrganizationFields.d.ts +4 -0
  599. package/mobile/lib/ui-kit/FormField/updateOrganizationFields.js +14 -0
  600. package/mobile/lib/ui-kit/FormField/updateOrganizationFields.js.map +1 -0
  601. package/mobile/lib/ui-kit/FormField/validators.d.ts +1 -1
  602. package/mobile/lib/ui-kit/RichText/RichText.js +3 -6
  603. package/mobile/lib/ui-kit/RichText/RichText.js.map +1 -1
  604. package/mobile/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +2 -5
  605. package/mobile/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +5 -3
  606. package/mobile/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
  607. package/mobile/src/api/RetailAPI/model/EOrganizationActivityTypes.ts +23 -0
  608. package/mobile/src/api/RetailAPI/model/LeadFormData.ts +7 -0
  609. package/mobile/src/api/RetailAPI/utils/getOrganizationParams.ts +126 -0
  610. package/mobile/src/api/RetailAPI/utils/getUpdateUserProfile.ts +4 -2
  611. package/mobile/src/api/dadataHints/dadataHintsType.ts +3 -0
  612. package/mobile/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +6 -8
  613. package/mobile/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +2 -2
  614. package/mobile/src/components/ApplicationLeadForm/GroupedConsents.tsx +5 -5
  615. package/mobile/src/components/ApplicationLeadForm/LeadFormState.ts +152 -0
  616. package/mobile/src/components/ApplicationLeadForm/consents.ts +3 -3
  617. package/mobile/src/components/ApplicationLeadForm/getInitialFormState.tsx +5 -160
  618. package/mobile/src/components/ApplicationLeadForm/getLeadFormTaskData.ts +2 -2
  619. package/mobile/src/components/ApplicationLeadForm/pasreEsiaProfile.ts +2 -2
  620. package/mobile/src/components/ApplicationLeadForm/{useApplicationLeadApi.ts → useApplicationLeadApi.tsx} +19 -34
  621. package/mobile/src/components/ApplicationLeadForm/useInitApplicationLead.ts +20 -9
  622. package/mobile/src/components/ApplicationLeadForm/useLeadFormStore.ts +12 -0
  623. package/mobile/src/components/CreditCardForm/CreditCardFormContent.ts +2 -2
  624. package/mobile/src/components/CreditCardForm/calculateInputs.ts +2 -2
  625. package/mobile/src/components/CreditCardForm/formStateMap.tsx +2 -2
  626. package/mobile/src/components/CreditCardForm/getCardData.tsx +2 -2
  627. package/mobile/src/components/CreditCardForm/getCreditCardFormTaskData.ts +3 -3
  628. package/mobile/src/components/CreditCardForm/getFifthStepData.ts +2 -2
  629. package/mobile/src/components/CreditCardForm/getFourthStepData.ts +2 -2
  630. package/mobile/src/components/CreditCardForm/getInitialFormState.tsx +2 -2
  631. package/mobile/src/components/CreditCardForm/getSecondStepData.tsx +2 -2
  632. package/mobile/src/components/CreditCardForm/getSixthStepData.ts +4 -4
  633. package/mobile/src/components/CreditCardForm/getThirdStepData.tsx +2 -2
  634. package/mobile/src/components/CreditCardForm/renderInputs.tsx +2 -2
  635. package/mobile/src/components/CreditCardForm/renderStep.tsx +4 -4
  636. package/mobile/src/components/CreditCardForm/useCreditCardFormAPI.tsx +3 -3
  637. package/mobile/src/components/CreditForm/PendingStatusContent.tsx +2 -2
  638. package/mobile/src/components/CreditForm/calculateInputs.ts +2 -2
  639. package/mobile/src/components/CreditForm/formStateMap.tsx +2 -2
  640. package/mobile/src/components/CreditForm/getCalcData.ts +2 -2
  641. package/mobile/src/components/CreditForm/getCreditFormTaskData.ts +3 -3
  642. package/mobile/src/components/CreditForm/getFifthStepData.ts +2 -2
  643. package/mobile/src/components/CreditForm/getFirstStepData.tsx +2 -2
  644. package/mobile/src/components/CreditForm/getFourthStepData.ts +2 -2
  645. package/mobile/src/components/CreditForm/getInitialFormState.tsx +2 -2
  646. package/mobile/src/components/CreditForm/getSecondStepData.tsx +2 -2
  647. package/mobile/src/components/CreditForm/getThirdStepData.ts +2 -2
  648. package/mobile/src/components/CreditForm/getZeroStepData.ts +2 -2
  649. package/mobile/src/components/CreditForm/renderInputs.tsx +2 -2
  650. package/mobile/src/components/CreditForm/renderStep.tsx +4 -4
  651. package/mobile/src/components/CreditForm/useCreditFormAPI.tsx +3 -3
  652. package/mobile/src/components/CreditForm/utils.ts +1 -1
  653. package/mobile/src/hooks/useCreditFormStore.tsx +13 -0
  654. package/mobile/src/hooks/useLeadFormData.ts +1 -1
  655. package/mobile/src/hooks/useSetter.ts +16 -0
  656. package/mobile/src/ui-kit/ConsentBkiDialog/useConsentBkiDialog.tsx +2 -11
  657. package/mobile/src/ui-kit/DialogManager/useDialog.tsx +2 -1
  658. package/mobile/src/ui-kit/EsiaLoginDialog/EsiaLoginDialog.tsx +2 -2
  659. package/mobile/src/ui-kit/FormField/Fields/AmountWorkersField.tsx +12 -2
  660. package/mobile/src/ui-kit/FormField/Fields/EmployerActivitiesField.tsx +12 -2
  661. package/mobile/src/ui-kit/FormField/Fields/EmployerOrganizationField.tsx +12 -2
  662. package/mobile/src/ui-kit/FormField/Fields/InnField.tsx +5 -5
  663. package/mobile/src/ui-kit/FormField/Fields/OrganizationField.tsx +12 -2
  664. package/mobile/src/ui-kit/FormField/Fields/OrganizationNameField.tsx +5 -1
  665. package/mobile/src/ui-kit/FormField/SelectField.tsx +1 -8
  666. package/mobile/src/ui-kit/FormField/updateOrganizationFields.ts +40 -0
  667. package/mobile/src/ui-kit/FormField/validators.ts +1 -1
  668. package/mobile/src/ui-kit/RichText/RichText.tsx +21 -21
  669. package/mobile/src/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.tsx +20 -25
  670. package/package.json +1 -1
  671. package/src/api/RetailAPI/model/EOrganizationActivityTypes.ts +23 -0
  672. package/src/api/RetailAPI/model/LeadFormData.ts +7 -0
  673. package/src/api/RetailAPI/utils/getOrganizationParams.ts +126 -0
  674. package/src/api/RetailAPI/utils/getUpdateUserProfile.ts +4 -2
  675. package/src/api/dadataHints/dadataHintsType.ts +3 -0
  676. package/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +6 -8
  677. package/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +2 -2
  678. package/src/components/ApplicationLeadForm/GroupedConsents.tsx +5 -5
  679. package/src/components/ApplicationLeadForm/LeadFormState.ts +152 -0
  680. package/src/components/ApplicationLeadForm/consents.ts +3 -3
  681. package/src/components/ApplicationLeadForm/getInitialFormState.tsx +5 -160
  682. package/src/components/ApplicationLeadForm/getLeadFormTaskData.ts +2 -2
  683. package/src/components/ApplicationLeadForm/pasreEsiaProfile.ts +2 -2
  684. package/src/components/ApplicationLeadForm/{useApplicationLeadApi.ts → useApplicationLeadApi.tsx} +19 -34
  685. package/src/components/ApplicationLeadForm/useInitApplicationLead.ts +20 -9
  686. package/src/components/ApplicationLeadForm/useLeadFormStore.ts +12 -0
  687. package/src/components/CreditCardForm/CreditCardFormContent.ts +2 -2
  688. package/src/components/CreditCardForm/calculateInputs.ts +2 -2
  689. package/src/components/CreditCardForm/formStateMap.tsx +2 -2
  690. package/src/components/CreditCardForm/getCardData.tsx +2 -2
  691. package/src/components/CreditCardForm/getCreditCardFormTaskData.ts +3 -3
  692. package/src/components/CreditCardForm/getFifthStepData.ts +2 -2
  693. package/src/components/CreditCardForm/getFourthStepData.ts +2 -2
  694. package/src/components/CreditCardForm/getInitialFormState.tsx +2 -2
  695. package/src/components/CreditCardForm/getSecondStepData.tsx +2 -2
  696. package/src/components/CreditCardForm/getSixthStepData.ts +4 -4
  697. package/src/components/CreditCardForm/getThirdStepData.tsx +2 -2
  698. package/src/components/CreditCardForm/renderInputs.tsx +2 -2
  699. package/src/components/CreditCardForm/renderStep.tsx +4 -4
  700. package/src/components/CreditCardForm/useCreditCardFormAPI.tsx +3 -3
  701. package/src/components/CreditForm/PendingStatusContent.tsx +2 -2
  702. package/src/components/CreditForm/calculateInputs.ts +2 -2
  703. package/src/components/CreditForm/formStateMap.tsx +2 -2
  704. package/src/components/CreditForm/getCalcData.ts +2 -2
  705. package/src/components/CreditForm/getCreditFormTaskData.ts +3 -3
  706. package/src/components/CreditForm/getFifthStepData.ts +2 -2
  707. package/src/components/CreditForm/getFirstStepData.tsx +2 -2
  708. package/src/components/CreditForm/getFourthStepData.ts +2 -2
  709. package/src/components/CreditForm/getInitialFormState.tsx +2 -2
  710. package/src/components/CreditForm/getSecondStepData.tsx +2 -2
  711. package/src/components/CreditForm/getThirdStepData.ts +2 -2
  712. package/src/components/CreditForm/getZeroStepData.ts +2 -2
  713. package/src/components/CreditForm/renderInputs.tsx +2 -2
  714. package/src/components/CreditForm/renderStep.tsx +4 -4
  715. package/src/components/CreditForm/useCreditFormAPI.tsx +3 -3
  716. package/src/components/CreditForm/utils.ts +1 -1
  717. package/src/hooks/useCreditFormStore.tsx +13 -0
  718. package/src/hooks/useLeadFormData.ts +1 -1
  719. package/src/hooks/useSetter.ts +16 -0
  720. package/src/ui-kit/ConsentBkiDialog/useConsentBkiDialog.tsx +2 -11
  721. package/src/ui-kit/DialogManager/useDialog.tsx +2 -1
  722. package/src/ui-kit/EsiaLoginDialog/EsiaLoginDialog.tsx +2 -2
  723. package/src/ui-kit/FormField/Fields/AmountWorkersField.tsx +12 -2
  724. package/src/ui-kit/FormField/Fields/EmployerActivitiesField.tsx +12 -2
  725. package/src/ui-kit/FormField/Fields/EmployerOrganizationField.tsx +12 -2
  726. package/src/ui-kit/FormField/Fields/InnField.tsx +5 -5
  727. package/src/ui-kit/FormField/Fields/OrganizationField.tsx +12 -2
  728. package/src/ui-kit/FormField/Fields/OrganizationNameField.tsx +5 -1
  729. package/src/ui-kit/FormField/SelectField.tsx +1 -8
  730. package/src/ui-kit/FormField/updateOrganizationFields.ts +40 -0
  731. package/src/ui-kit/FormField/validators.ts +1 -1
  732. package/src/ui-kit/RichText/RichText.tsx +21 -21
  733. package/src/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.fixture.tsx +7 -10
  734. package/src/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.tsx +20 -25
  735. package/bundle/ui-kit/RichText/getHtmlText.d.ts +0 -1
  736. package/dist/ui-kit/RichText/getHtmlText.d.ts +0 -1
  737. package/dist/ui-kit/RichText/getHtmlText.js +0 -5
  738. package/dist/ui-kit/RichText/getHtmlText.js.map +0 -1
  739. package/lib/ui-kit/RichText/getHtmlText.d.ts +0 -1
  740. package/lib/ui-kit/RichText/getHtmlText.js +0 -2
  741. package/lib/ui-kit/RichText/getHtmlText.js.map +0 -1
  742. package/mobile/bundle/ui-kit/RichText/getHtmlText.d.ts +0 -1
  743. package/mobile/dist/ui-kit/RichText/getHtmlText.d.ts +0 -1
  744. package/mobile/dist/ui-kit/RichText/getHtmlText.js +0 -5
  745. package/mobile/dist/ui-kit/RichText/getHtmlText.js.map +0 -1
  746. package/mobile/lib/ui-kit/RichText/getHtmlText.d.ts +0 -1
  747. package/mobile/lib/ui-kit/RichText/getHtmlText.js +0 -2
  748. package/mobile/lib/ui-kit/RichText/getHtmlText.js.map +0 -1
  749. package/mobile/src/ui-kit/RichText/getHtmlText.tsx +0 -1
  750. package/src/ui-kit/RichText/getHtmlText.tsx +0 -1
@@ -1,7 +1,7 @@
1
1
  import { type Participant } from '../../api/RetailAPI/updateUserTask';
2
- import { type FormState } from '../ApplicationLeadForm/getInitialFormState';
2
+ import { type LeadFormState } from '../ApplicationLeadForm/LeadFormState';
3
3
 
4
- export const getFifthStepData = (formData: FormState): Partial<Participant> => {
4
+ export const getFifthStepData = (formData: LeadFormState): Partial<Participant> => {
5
5
  const { bankruptcyFlg, shareholderFlg, legalEntityName, creditInRshbCd } = formData;
6
6
 
7
7
  return {
@@ -1,8 +1,8 @@
1
1
  import { type Participant } from '../../api/RetailAPI/updateUserTask';
2
- import { type FormState } from '../ApplicationLeadForm/getInitialFormState';
2
+ import { type LeadFormState } from '../ApplicationLeadForm/LeadFormState';
3
3
  import { getParticipantIncomes } from '../CreditForm/utils';
4
4
 
5
- export const getFourthStepData = (formData: FormState): Partial<Participant> => {
5
+ export const getFourthStepData = (formData: LeadFormState): Partial<Participant> => {
6
6
  const {
7
7
  familyStatus,
8
8
  dependents,
@@ -1,10 +1,10 @@
1
- import { type FormState } from '../ApplicationLeadForm/getInitialFormState';
1
+ import { type LeadFormState } from '../ApplicationLeadForm/LeadFormState';
2
2
  import { formStateMap } from './formStateMap';
3
3
 
4
4
  export const getInitialFormState = (
5
5
  step: number,
6
6
  localStorageData: Record<string, any> | null,
7
- ): FormState => ({
7
+ ): LeadFormState => ({
8
8
  ...formStateMap[step],
9
9
  ...localStorageData,
10
10
  limitedBirthday: transformStringToData(localStorageData?.limitedBirthday as string),
@@ -1,10 +1,10 @@
1
1
  import { type Participant } from '../../api/RetailAPI/updateUserTask';
2
2
  import { formatDate } from '../../utils/formatDate';
3
3
  import { formatPhone } from '../../utils/formatPhone';
4
- import { type FormState } from '../ApplicationLeadForm/getInitialFormState';
4
+ import { type LeadFormState } from '../ApplicationLeadForm/LeadFormState';
5
5
  import { getParticipantAddresses, getParticipantContacts } from '../CreditForm/utils';
6
6
 
7
- export const getSecondStepData = (formData: FormState): Partial<Participant> => {
7
+ export const getSecondStepData = (formData: LeadFormState): Partial<Participant> => {
8
8
  const {
9
9
  name,
10
10
  surname,
@@ -1,8 +1,8 @@
1
1
  import { dateToISO } from '../../utils/dateToISO';
2
- import { type FormState } from '../ApplicationLeadForm/getInitialFormState';
2
+ import { type LeadFormState } from '../ApplicationLeadForm/LeadFormState';
3
3
  import { getParticipantAddresses } from '../CreditForm/utils';
4
4
 
5
- export const getDeliveryData = (formData: FormState) => {
5
+ export const getDeliveryData = (formData: LeadFormState) => {
6
6
  const { methodObtain, deliveryDate = '' } = formData;
7
7
 
8
8
  const isCourierDelivery = methodObtain === 'courier';
@@ -16,7 +16,7 @@ export const getDeliveryData = (formData: FormState) => {
16
16
  : {};
17
17
  };
18
18
 
19
- export const getOfficeCode = (formData: FormState) => {
19
+ export const getOfficeCode = (formData: LeadFormState) => {
20
20
  const { addressRetail, methodObtain } = formData;
21
21
 
22
22
  const isOfficeObtain = addressRetail?.key && methodObtain === 'office';
@@ -28,7 +28,7 @@ export const getOfficeCode = (formData: FormState) => {
28
28
  : {};
29
29
  };
30
30
 
31
- export const getSixthStepData = (formData: FormState) => {
31
+ export const getSixthStepData = (formData: LeadFormState) => {
32
32
  const { addressCourier, methodObtain } = formData;
33
33
 
34
34
  const isCourierDelivery = methodObtain === 'courier';
@@ -1,10 +1,10 @@
1
1
  import { type Participant } from '../../api/RetailAPI/updateUserTask';
2
2
  import { formatDate } from '../../utils/formatDate';
3
3
  import { formatPhone } from '../../utils/formatPhone';
4
- import { type FormState } from '../ApplicationLeadForm/getInitialFormState';
4
+ import { type LeadFormState } from '../ApplicationLeadForm/LeadFormState';
5
5
  import { getParticipantAddresses, getParticipantContacts } from '../CreditForm/utils';
6
6
 
7
- export const getThirdStepData = (formData: FormState): Partial<Participant> => {
7
+ export const getThirdStepData = (formData: LeadFormState): Partial<Participant> => {
8
8
  const {
9
9
  beginDate,
10
10
  employment,
@@ -1,11 +1,11 @@
1
1
  import { type FormFieldRegisterer } from '../../hooks/useForm';
2
2
  import { getField } from '../../ui-kit/FormField/getField';
3
3
  import { type FieldDef } from '../ApplicationLeadForm/ApplicationLeadFormContent';
4
- import { type FormState } from '../ApplicationLeadForm/getInitialFormState';
4
+ import { type LeadFormState } from '../ApplicationLeadForm/LeadFormState';
5
5
 
6
6
  export interface RenderInputsProps {
7
7
  inputs: FieldDef[];
8
- field: FormFieldRegisterer<FormState>;
8
+ field: FormFieldRegisterer<LeadFormState>;
9
9
  params?: Record<string, any>;
10
10
  }
11
11
 
@@ -2,16 +2,16 @@ import { type FormFieldRegisterer, type FormOperatorProps } from '../../hooks/us
2
2
  import { inputColumnStyles } from '../../ui-kit/FormField/inputColumnStyle';
3
3
  import { renderTitle } from '../../ui-kit/FormField/renderTitle';
4
4
  import { style } from '../../utils/style';
5
- import { type FormState } from '../ApplicationLeadForm/getInitialFormState';
5
+ import { type LeadFormState } from '../ApplicationLeadForm/LeadFormState';
6
6
  import { calculateInputs, checkCondition, type GetValue } from './calculateInputs';
7
7
  import { type CreditCardSectionsProps } from './CreditCardFormContent';
8
8
  import { renderInfo } from './renderInfo';
9
9
  import { renderInputs } from './renderInputs';
10
10
 
11
- export type CustomSubmit = FormOperatorProps<FormState>['onSubmit'];
11
+ export type CustomSubmit = FormOperatorProps<LeadFormState>['onSubmit'];
12
12
  export interface StepProps {
13
13
  sections?: CreditCardSectionsProps[];
14
- field: FormFieldRegisterer<FormState>;
14
+ field: FormFieldRegisterer<LeadFormState>;
15
15
  step: number;
16
16
  params?: Record<string, any>;
17
17
  }
@@ -32,6 +32,6 @@ export const renderStep = ({ sections, field, step, params }: StepProps) =>
32
32
  });
33
33
 
34
34
  const getValue =
35
- (field: FormFieldRegisterer<FormState>): GetValue =>
35
+ (field: FormFieldRegisterer<LeadFormState>): GetValue =>
36
36
  (name) =>
37
37
  field(name)?.value;
@@ -5,7 +5,7 @@ import { getObjectValidator } from '../../ui-kit/FormField/getObjectValidator';
5
5
  import { objectValidator } from '../../validation/objectValidator';
6
6
  import { isValidationSuccess } from '../../validation/validator';
7
7
  import { type FieldDef } from '../ApplicationLeadForm/ApplicationLeadFormContent';
8
- import { type FormState } from '../ApplicationLeadForm/getInitialFormState';
8
+ import { type LeadFormState } from '../ApplicationLeadForm/LeadFormState';
9
9
  import { calculateInputs, type GetValue } from './calculateInputs';
10
10
  import { getCreditCardFormTaskData } from './getCreditCardFormTaskData';
11
11
 
@@ -29,7 +29,7 @@ export const useCreditCardFormAPI = ({
29
29
  const [profileId] = useLocalStorage<number>('profileId');
30
30
  const [participantId] = useLocalStorage<number>('participantId');
31
31
 
32
- const handleSubmit = useCallback(async (formData: FormState) => {
32
+ const handleSubmit = useCallback(async (formData: LeadFormState) => {
33
33
  const feedbackValidator = objectValidator(
34
34
  getObjectValidator(calculateInputs(getValue(formData))(inputs, step)),
35
35
  );
@@ -78,6 +78,6 @@ const resetForm = (isFinalStep: boolean, response: Response) => {
78
78
  };
79
79
 
80
80
  const getValue =
81
- (formData: FormState): GetValue =>
81
+ (formData: LeadFormState): GetValue =>
82
82
  (name) =>
83
83
  formData[name];
@@ -1,11 +1,11 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
2
  import { useLocalStorage } from '../../hooks/useLocalStorage';
3
- import { type FormState } from '../ApplicationLeadForm/getInitialFormState';
3
+ import { type LeadFormState } from '../ApplicationLeadForm/LeadFormState';
4
4
  import { CreditFormStatus } from './CreditFormStatus';
5
5
 
6
6
  export const PendingStatusContent = JSX(
7
7
  ({ handleExpireTimer }: { handleExpireTimer: () => void }) => {
8
- const [leadForm] = useLocalStorage<FormState>('leadForm');
8
+ const [leadForm] = useLocalStorage<LeadFormState>('leadForm');
9
9
 
10
10
  return (
11
11
  <CreditFormStatus
@@ -1,8 +1,8 @@
1
1
  import { type Option } from '../../ui-kit/Select/Option';
2
2
  import { type FieldDef } from '../ApplicationForm/ApplicationFormContent';
3
- import { type FormState } from '../ApplicationLeadForm/getInitialFormState';
3
+ import { type LeadFormState } from '../ApplicationLeadForm/LeadFormState';
4
4
 
5
- export type GetValue = <K extends keyof FormState>(name: K) => FormState[K];
5
+ export type GetValue = <K extends keyof LeadFormState>(name: K) => LeadFormState[K];
6
6
 
7
7
  export const calculateInputs = (getValue: GetValue) => (inputs: FieldDef[], step: number) =>
8
8
  inputs
@@ -1,6 +1,6 @@
1
- import { type FormState } from '../ApplicationLeadForm/getInitialFormState';
1
+ import { type LeadFormState } from '../ApplicationLeadForm/LeadFormState';
2
2
 
3
- export const formStateMap: Partial<FormState>[] = [
3
+ export const formStateMap: Partial<LeadFormState>[] = [
4
4
  {
5
5
  calculator: {
6
6
  moneyValue: 0,
@@ -1,5 +1,5 @@
1
1
  import { type PaymentType, type UpdateUserTaskBody } from '../../api/RetailAPI/updateUserTask';
2
- import { type FormState } from '../ApplicationLeadForm/getInitialFormState';
2
+ import { type LeadFormState } from '../ApplicationLeadForm/LeadFormState';
3
3
 
4
4
  const PAYMENT_TYPE_DATA: Record<string, PaymentType> = {
5
5
  annuity: { key: 'ANNUITY', value: 'Аннуитетный' },
@@ -7,7 +7,7 @@ const PAYMENT_TYPE_DATA: Record<string, PaymentType> = {
7
7
  };
8
8
 
9
9
  export const getCalcData = (
10
- formData: FormState,
10
+ formData: LeadFormState,
11
11
  ): Pick<UpdateUserTaskBody['task'], 'loanAmount' | 'creditPeriod' | 'paymentTypeCd'> => {
12
12
  const { moneyValue, monthsValue, isAnnuity } = formData?.calculator ?? {};
13
13
 
@@ -1,6 +1,6 @@
1
1
  import { type Participant, type UpdateUserTaskBody } from '../../api/RetailAPI/updateUserTask';
2
2
  import { locationNavigator } from '../../external/locationNavigator';
3
- import { type FormState } from '../ApplicationLeadForm/getInitialFormState';
3
+ import { type LeadFormState } from '../ApplicationLeadForm/LeadFormState';
4
4
  import { getCalcData } from './getCalcData';
5
5
  import { getFifthStepData } from './getFifthStepData';
6
6
  import { getFirstStepData } from './getFirstStepData';
@@ -13,7 +13,7 @@ type getCreditFormTaskDataProps = {
13
13
  participantId: number;
14
14
  taskId: number;
15
15
  profileId: number;
16
- formData: FormState;
16
+ formData: LeadFormState;
17
17
  step?: number;
18
18
  };
19
19
 
@@ -55,7 +55,7 @@ export const getCreditFormTaskData = ({
55
55
  };
56
56
  };
57
57
 
58
- const getCurrentStepData = (step: number, formData: FormState): Partial<Participant> => {
58
+ const getCurrentStepData = (step: number, formData: LeadFormState): Partial<Participant> => {
59
59
  switch (step) {
60
60
  case 0:
61
61
  return getZeroStepData(formData);
@@ -1,7 +1,7 @@
1
1
  import { type UpdateUserTaskBody } from '../../api/RetailAPI/updateUserTask';
2
- import { type FormState } from '../ApplicationLeadForm/getInitialFormState';
2
+ import { type LeadFormState } from '../ApplicationLeadForm/LeadFormState';
3
3
 
4
- export const getFifthStepData = (formData: FormState): Partial<UpdateUserTaskBody['task']> => {
4
+ export const getFifthStepData = (formData: LeadFormState): Partial<UpdateUserTaskBody['task']> => {
5
5
  const { addressRetail } = formData;
6
6
 
7
7
  return {
@@ -1,10 +1,10 @@
1
1
  import { type Participant } from '../../api/RetailAPI/updateUserTask';
2
2
  import { formatDate } from '../../utils/formatDate';
3
3
  import { formatPhone } from '../../utils/formatPhone';
4
- import { type FormState } from '../ApplicationLeadForm/getInitialFormState';
4
+ import { type LeadFormState } from '../ApplicationLeadForm/LeadFormState';
5
5
  import { getParticipantAddresses, getParticipantContacts } from './utils';
6
6
 
7
- export const getFirstStepData = (formData: FormState): Partial<Participant> => {
7
+ export const getFirstStepData = (formData: LeadFormState): Partial<Participant> => {
8
8
  const {
9
9
  name,
10
10
  surname,
@@ -1,7 +1,7 @@
1
1
  import { type Participant } from '../../api/RetailAPI/updateUserTask';
2
- import { type FormState } from '../ApplicationLeadForm/getInitialFormState';
2
+ import { type LeadFormState } from '../ApplicationLeadForm/LeadFormState';
3
3
 
4
- export const getFourthStepData = (formData: FormState): Partial<Participant> => {
4
+ export const getFourthStepData = (formData: LeadFormState): Partial<Participant> => {
5
5
  const { bankruptcyFlg, shareholderFlg, legalEntityName, creditInRshbCd } = formData;
6
6
 
7
7
  return {
@@ -1,10 +1,10 @@
1
- import { type FormState } from '../ApplicationLeadForm/getInitialFormState';
1
+ import { type LeadFormState } from '../ApplicationLeadForm/LeadFormState';
2
2
  import { formStateMap } from './formStateMap';
3
3
 
4
4
  export const getInitialFormState = (
5
5
  step: number,
6
6
  localStorageData: Record<string, any> | null,
7
- ): FormState => ({
7
+ ): LeadFormState => ({
8
8
  ...formStateMap[step],
9
9
  ...localStorageData,
10
10
  limitedBirthday: transformStringToData(localStorageData?.limitedBirthday as string),
@@ -1,10 +1,10 @@
1
1
  import { type Participant } from '../../api/RetailAPI/updateUserTask';
2
2
  import { formatDate } from '../../utils/formatDate';
3
3
  import { formatPhone } from '../../utils/formatPhone';
4
- import { type FormState } from '../ApplicationLeadForm/getInitialFormState';
4
+ import { type LeadFormState } from '../ApplicationLeadForm/LeadFormState';
5
5
  import { getParticipantAddresses, getParticipantContacts } from './utils';
6
6
 
7
- export const getSecondStepData = (formData: FormState): Partial<Participant> => {
7
+ export const getSecondStepData = (formData: LeadFormState): Partial<Participant> => {
8
8
  const {
9
9
  beginDate,
10
10
  employment,
@@ -1,8 +1,8 @@
1
1
  import { type Participant } from '../../api/RetailAPI/updateUserTask';
2
- import { type FormState } from '../ApplicationLeadForm/getInitialFormState';
2
+ import { type LeadFormState } from '../ApplicationLeadForm/LeadFormState';
3
3
  import { getParticipantIncomes } from './utils';
4
4
 
5
- export const getThirdStepData = (formData: FormState): Partial<Participant> => {
5
+ export const getThirdStepData = (formData: LeadFormState): Partial<Participant> => {
6
6
  const {
7
7
  familyStatus,
8
8
  dependents,
@@ -1,8 +1,8 @@
1
1
  import { type Participant } from '../../api/RetailAPI/updateUserTask';
2
- import { type FormState } from '../ApplicationLeadForm/getInitialFormState';
2
+ import { type LeadFormState } from '../ApplicationLeadForm/LeadFormState';
3
3
 
4
4
  export const getZeroStepData = (
5
- formData: FormState,
5
+ formData: LeadFormState,
6
6
  ): Pick<Participant, 'payrollCardRshbFlg' | 'consentInsuranceFlg'> => {
7
7
  const { isInsurance, isSalaryClient } = formData?.calculator ?? {};
8
8
 
@@ -1,11 +1,11 @@
1
1
  import { type FormFieldRegisterer } from '../../hooks/useForm';
2
2
  import { getField } from '../../ui-kit/FormField/getField';
3
3
  import { type FieldDef } from '../ApplicationLeadForm/ApplicationLeadFormContent';
4
- import { type FormState } from '../ApplicationLeadForm/getInitialFormState';
4
+ import { type LeadFormState } from '../ApplicationLeadForm/LeadFormState';
5
5
 
6
6
  export interface RenderInputsProps {
7
7
  inputs: FieldDef[];
8
- field: FormFieldRegisterer<FormState>;
8
+ field: FormFieldRegisterer<LeadFormState>;
9
9
  params?: Record<string, any>;
10
10
  }
11
11
 
@@ -3,16 +3,16 @@ import { inputColumnStyles } from '../../ui-kit/FormField/inputColumnStyle';
3
3
  import { renderTitle } from '../../ui-kit/FormField/renderTitle';
4
4
  import { style } from '../../utils/style';
5
5
  import { type SectionsProps } from '../ApplicationForm/ApplicationFormContent';
6
- import { type FormState } from '../ApplicationLeadForm/getInitialFormState';
6
+ import { type LeadFormState } from '../ApplicationLeadForm/LeadFormState';
7
7
  import { calculateInputs, type GetValue } from './calculateInputs';
8
8
  import { renderInfo } from './renderInfo';
9
9
  import { renderInputs } from './renderInputs';
10
10
 
11
- export type CustomSubmit = FormOperatorProps<FormState>['onSubmit'];
11
+ export type CustomSubmit = FormOperatorProps<LeadFormState>['onSubmit'];
12
12
 
13
13
  export interface StepProps {
14
14
  sections?: SectionsProps[];
15
- field: FormFieldRegisterer<FormState>;
15
+ field: FormFieldRegisterer<LeadFormState>;
16
16
  step: number;
17
17
  params?: Record<string, any>;
18
18
  }
@@ -31,6 +31,6 @@ export const renderStep = ({ sections, field, step, params }: StepProps) =>
31
31
  });
32
32
 
33
33
  const getValue =
34
- (field: FormFieldRegisterer<FormState>): GetValue =>
34
+ (field: FormFieldRegisterer<LeadFormState>): GetValue =>
35
35
  (name) =>
36
36
  field(name)?.value;
@@ -5,7 +5,7 @@ import { getObjectValidator } from '../../ui-kit/FormField/getObjectValidator';
5
5
  import { objectValidator } from '../../validation/objectValidator';
6
6
  import { isValidationSuccess } from '../../validation/validator';
7
7
  import { type FieldDef } from '../ApplicationLeadForm/ApplicationLeadFormContent';
8
- import { type FormState } from '../ApplicationLeadForm/getInitialFormState';
8
+ import { type LeadFormState } from '../ApplicationLeadForm/LeadFormState';
9
9
  import { calculateInputs, type GetValue } from './calculateInputs';
10
10
  import { getCreditFormTaskData } from './getCreditFormTaskData';
11
11
 
@@ -29,7 +29,7 @@ export const useCreditFormAPI = ({
29
29
  const [profileId] = useLocalStorage<number>('profileId');
30
30
  const [participantId] = useLocalStorage<number>('participantId');
31
31
 
32
- const handleSubmit = useCallback(async (formData: FormState) => {
32
+ const handleSubmit = useCallback(async (formData: LeadFormState) => {
33
33
  const feedbackValidator = objectValidator(
34
34
  getObjectValidator(calculateInputs(getValue(formData))(inputs, step)),
35
35
  );
@@ -78,6 +78,6 @@ const resetForm = (isFinalStep: boolean, response: Response) => {
78
78
  };
79
79
 
80
80
  const getValue =
81
- (formData: FormState): GetValue =>
81
+ (formData: LeadFormState): GetValue =>
82
82
  (name) =>
83
83
  formData[name];
@@ -1,4 +1,4 @@
1
- import { type Address } from '../ApplicationLeadForm/getInitialFormState';
1
+ import { type Address } from '../ApplicationLeadForm/LeadFormState';
2
2
 
3
3
  export const fieldsNamesToContactKeysMap = {
4
4
  email: 'EMAIL',
@@ -0,0 +1,13 @@
1
+ import { useLocalStore } from '@redneckz/uni-jsx/lib/Store/useLocalStore';
2
+ import { type LeadProps } from '../api/RetailAPI/model/LeadFormData';
3
+
4
+ export interface CreditFormStore {
5
+ amountWorkers: LeadProps[] | null;
6
+ organization: LeadProps[] | null;
7
+ employerActivities: LeadProps[] | null;
8
+ employerOrganization: LeadProps[] | null;
9
+ }
10
+
11
+ export const useCreditFormStore = () => {
12
+ return useLocalStore<CreditFormStore>();
13
+ };
@@ -1,5 +1,5 @@
1
1
  import { useAsyncData } from '@redneckz/uni-jsx/lib/hooks/useAsyncData';
2
- import { type LeadProps } from '../ui-kit/FormField/SelectField';
2
+ import { type LeadProps } from '../api/RetailAPI/model/LeadFormData';
3
3
  import { fetchJSON } from '../utils/fetchJSON';
4
4
 
5
5
  type ErrorProps = {
@@ -0,0 +1,16 @@
1
+ import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
2
+ import type { Nullable } from '@redneckz/uni-jsx/lib/utils/ts/Nullable';
3
+
4
+ export const useSetter = <T, K extends keyof T>(target: T, key: K) =>
5
+ useCallback(
6
+ (value: Nullable<T[K]> | ((oldValue: Nullable<T[K]>) => Nullable<T[K]>)) => {
7
+ const newValue = value instanceof Function ? value(target[key]) : value;
8
+
9
+ if (newValue !== null && newValue !== undefined) {
10
+ target[key] = newValue;
11
+ } else {
12
+ delete target[key];
13
+ }
14
+ },
15
+ [target, key],
16
+ );
@@ -1,5 +1,4 @@
1
1
  import { updateUserProfile } from '../../api/RetailAPI/updateUserProfile';
2
- import { formatPhone } from '../../utils/formatPhone';
3
2
  import { useDialog } from '../DialogManager/useDialog';
4
3
  import { VerifyPhoneDialog } from '../VerifyPhoneDialog/VerifyPhoneDialog';
5
4
  import { ConsentBkiDialog } from './ConsentBkiDialog';
@@ -30,7 +29,8 @@ export const useConsentBkiDialog = (onClose: () => void) => {
30
29
  (phone?: string, profileId?: number) => async (confirmStatus: string) => {
31
30
  if (confirmStatus === 'SIGNED' && phone) {
32
31
  verifyPhoneDialog.open({
33
- ...verifyPhoneContent(phone),
32
+ phone,
33
+ consents: ['согласие на запрос информации в БКИ'],
34
34
  onSuccess: handleSuccessVerify(profileId),
35
35
  });
36
36
  } else {
@@ -43,12 +43,3 @@ export const useConsentBkiDialog = (onClose: () => void) => {
43
43
  open({ onSubmit: handleSubmitBkiConstent(phone, profileId), onClose }),
44
44
  };
45
45
  };
46
-
47
- const verifyPhoneContent = (phone: string) => ({
48
- title: 'Подтвердите номер телефона',
49
- description: `Мы отправили код на ${phone}`,
50
- phoneNumber: formatPhone(phone),
51
- textButton: 'Далее',
52
- __html: `<span>Вводя код, я подтверждаю, что ознакомлен и подписываю:</span>
53
- <ul><li>согласие на запрос информации в БКИ</li></ul>`,
54
- });
@@ -1,5 +1,6 @@
1
1
  import type { UNIComponent } from '@redneckz/uni-jsx';
2
2
  import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
3
+ import type { VNode } from '../../model/VNode';
3
4
  import type { DialogOptions } from './DialogAction';
4
5
  import { useDialogManager } from './useDialogManager';
5
6
 
@@ -10,7 +11,7 @@ export function useDialog<Props extends { onClose?: () => void }>(
10
11
  const { open, close, ...rest } = useDialogManager();
11
12
 
12
13
  const openDialog = useCallback(
13
- (props: Props, options: Partial<DialogOptions> = {}) =>
14
+ (props: Props & { children?: VNode }, options: Partial<DialogOptions> = {}) =>
14
15
  open({
15
16
  dialog: (
16
17
  <Dialog
@@ -1,7 +1,7 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
2
  import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
3
3
  import { getLink } from '../../api/RetailAPI/getLink';
4
- import { type FormState } from '../../components/ApplicationLeadForm/getInitialFormState';
4
+ import { type LeadFormState } from '../../components/ApplicationLeadForm/LeadFormState';
5
5
  import { locationNavigator } from '../../external/locationNavigator';
6
6
  import { useLocalStorage } from '../../hooks/useLocalStorage';
7
7
  import { Button } from '../Button/Button';
@@ -14,7 +14,7 @@ export interface EsiaLoginDialogProps {
14
14
 
15
15
  export const EsiaLoginDialog = JSX<EsiaLoginDialogProps>(({ onClose }) => {
16
16
  const navigator = locationNavigator();
17
- const [leadForm, setLeadForm] = useLocalStorage<FormState>('leadForm');
17
+ const [leadForm, setLeadForm] = useLocalStorage<LeadFormState>('leadForm');
18
18
  const handleAuth = useCallback(async () => {
19
19
  const resp = await getLink({
20
20
  redirectUri: navigator.href,
@@ -1,15 +1,25 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
+ import { useEffect } from '@redneckz/uni-jsx/lib/hooks';
3
+ import { useCreditFormStore } from '../../../hooks/useCreditFormStore';
2
4
  import { useLeadFormData } from '../../../hooks/useLeadFormData';
3
5
  import { type CustomFieldProps } from '../CustomFieldProps';
4
6
  import { SelectField } from '../SelectField';
5
7
 
6
8
  export const AmountWorkersField = JSX<CustomFieldProps>(({ field, input }) => {
7
- const { data: amountWorkers } = useLeadFormData('EMPLOYEES_NUMBER');
9
+ const { data } = useLeadFormData('EMPLOYEES_NUMBER');
10
+
11
+ const store = useCreditFormStore();
12
+
13
+ useEffect(() => {
14
+ if (data) {
15
+ store.amountWorkers = data;
16
+ }
17
+ }, [data]);
8
18
 
9
19
  return (
10
20
  <SelectField
11
21
  field={field}
12
- source={amountWorkers}
22
+ source={store.amountWorkers ?? []}
13
23
  label="Количество работающих в организации"
14
24
  fieldName="amountWorkers"
15
25
  input={input}
@@ -1,15 +1,25 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
+ import { useEffect } from '@redneckz/uni-jsx/lib/hooks';
3
+ import { useCreditFormStore } from '../../../hooks/useCreditFormStore';
2
4
  import { useLeadFormData } from '../../../hooks/useLeadFormData';
3
5
  import { type CustomFieldProps } from '../CustomFieldProps';
4
6
  import { SelectField } from '../SelectField';
5
7
 
6
8
  export const EmployerActivitiesField = JSX<CustomFieldProps>(({ field, input }) => {
7
- const { data: employerActivities } = useLeadFormData('ORGANIZATION_ACTIVITY_TYPE');
9
+ const { data } = useLeadFormData('ORGANIZATION_ACTIVITY_TYPE');
10
+
11
+ const store = useCreditFormStore();
12
+
13
+ useEffect(() => {
14
+ if (data) {
15
+ store.employerActivities = data;
16
+ }
17
+ }, [data]);
8
18
 
9
19
  return (
10
20
  <SelectField
11
21
  field={field}
12
- source={employerActivities}
22
+ source={store.employerActivities ?? []}
13
23
  label="Вид деятельности организации-работодателя"
14
24
  fieldName="employerActivities"
15
25
  input={input}
@@ -1,15 +1,25 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
+ import { useEffect } from '@redneckz/uni-jsx/lib/hooks';
3
+ import { useCreditFormStore } from '../../../hooks/useCreditFormStore';
2
4
  import { useLeadFormData } from '../../../hooks/useLeadFormData';
3
5
  import { type CustomFieldProps } from '../CustomFieldProps';
4
6
  import { SelectField } from '../SelectField';
5
7
 
6
8
  export const EmployerOrganizationField = JSX<CustomFieldProps>(({ field, input }) => {
7
- const { data: employerOrganization } = useLeadFormData('ORGANIZATION_KIND');
9
+ const { data } = useLeadFormData('ORGANIZATION_KIND');
10
+
11
+ const store = useCreditFormStore();
12
+
13
+ useEffect(() => {
14
+ if (data) {
15
+ store.employerOrganization = data;
16
+ }
17
+ }, [data]);
8
18
 
9
19
  return (
10
20
  <SelectField
11
21
  field={field}
12
- source={employerOrganization}
22
+ source={store.employerOrganization ?? []}
13
23
  label="Вид организации работодателя"
14
24
  fieldName="employerOrganization"
15
25
  input={input}
@@ -1,19 +1,19 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
2
  import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
3
3
  import { type DaDataSuggestion } from '../../../api/dadataHints/dadataHintsType';
4
+ import { useCreditFormStore } from '../../../hooks/useCreditFormStore';
4
5
  import { InputControl } from '../../Input/InputControl';
5
6
  import { type CustomFieldProps } from '../CustomFieldProps';
6
7
  import { validatorObj } from '../getObjectValidator';
7
8
  import { getValidation } from '../getValidation';
8
- import { getAddressFromDaDataItem } from './AddressField';
9
+ import { updateOrganizationFields } from '../updateOrganizationFields';
9
10
 
10
11
  export const InnField = JSX<CustomFieldProps>(({ field, input }) => {
12
+ const store = useCreditFormStore();
13
+
11
14
  const onDaDataChange = useCallback((item: DaDataSuggestion) => {
12
- field?.('organizationAddress')?.onChange?.(
13
- getAddressFromDaDataItem(item.data?.address as DaDataSuggestion),
14
- );
15
15
  field?.('organizationName')?.onChange?.(item.data?.name?.short_with_opf);
16
- field?.('legalForm')?.onChange?.(item.data?.opf?.short);
16
+ updateOrganizationFields(store, field, item);
17
17
  }, []);
18
18
 
19
19
  return (