@redneckz/wildless-cms-uni-blocks 0.14.865 → 0.14.867

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 (443) hide show
  1. package/bundle/bundle.umd.js +586 -435
  2. package/bundle/bundle.umd.min.js +1 -1
  3. package/bundle/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +4 -5
  4. package/bundle/components/ApplicationLeadForm/useInitApplicationLead.d.ts +6 -0
  5. package/bundle/components/CreditCardForm/getCreditCardFormTaskData.d.ts +1 -3
  6. package/bundle/components/DebitForm/getDebitCardFormTaskData.d.ts +1 -3
  7. package/bundle/retail/adaptors/getCreditFormTaskData.d.ts +1 -3
  8. package/bundle/retail/api/createUserTaskDebit.d.ts +3 -1
  9. package/bundle/retail/api/updateUserTask.d.ts +3 -2
  10. package/bundle/retail/api/updateUserTaskDebit.d.ts +1 -1
  11. package/bundle/retail/components/DraftDialog/parseDraftTask.d.ts +1 -1
  12. package/bundle/retail/components/Fields/InitiateBankruptcyFlgField.d.ts +2 -0
  13. package/bundle/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +7 -2
  14. package/bundle/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +1 -2
  15. package/bundle/retail/content.d.ts +2 -8
  16. package/bundle/retail/inputs.d.ts +1 -1
  17. package/bundle/retail/model/LeadFormState.d.ts +4 -2
  18. package/bundle/retail/model/NameFieldDef.d.ts +1 -1
  19. package/bundle/retail/model/ReferalData.d.ts +0 -1
  20. package/bundle/retail/utils/getMainFormStateMap.d.ts +2 -0
  21. package/dist/components/ApplicationLeadForm/applicationFormData.js +0 -1
  22. package/dist/components/ApplicationLeadForm/applicationFormData.js.map +1 -1
  23. package/dist/components/ApplicationLeadForm/consents.js +0 -4
  24. package/dist/components/ApplicationLeadForm/consents.js.map +1 -1
  25. package/dist/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +4 -5
  26. package/dist/components/ApplicationLeadForm/getLeadFormTaskData.js +20 -17
  27. package/dist/components/ApplicationLeadForm/getLeadFormTaskData.js.map +1 -1
  28. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +12 -11
  29. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  30. package/dist/components/ApplicationLeadForm/useInitApplicationLead.d.ts +6 -0
  31. package/dist/components/ApplicationLeadForm/useInitApplicationLead.js +20 -12
  32. package/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  33. package/dist/components/CreditCardForm/creditCardFormStepsData.js +245 -3
  34. package/dist/components/CreditCardForm/creditCardFormStepsData.js.map +1 -1
  35. package/dist/components/CreditCardForm/formStateMap.js +2 -2
  36. package/dist/components/CreditCardForm/formStateMap.js.map +1 -1
  37. package/dist/components/CreditCardForm/getCreditCardFormTaskData.d.ts +1 -3
  38. package/dist/components/CreditCardForm/getCreditCardFormTaskData.js +24 -30
  39. package/dist/components/CreditCardForm/getCreditCardFormTaskData.js.map +1 -1
  40. package/dist/components/CreditCardForm/useCreditCardFormAPI.js +0 -2
  41. package/dist/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
  42. package/dist/components/CreditForm/CreditForm.js +1 -2
  43. package/dist/components/CreditForm/CreditForm.js.map +1 -1
  44. package/dist/components/CreditForm/creditFormStepsData.js +192 -3
  45. package/dist/components/CreditForm/creditFormStepsData.js.map +1 -1
  46. package/dist/components/CreditForm/formStateMap.js +2 -2
  47. package/dist/components/CreditForm/formStateMap.js.map +1 -1
  48. package/dist/components/CreditForm/useCreditFormAPI.js +1 -3
  49. package/dist/components/CreditForm/useCreditFormAPI.js.map +1 -1
  50. package/dist/components/DebitForm/DebitFormStepsData.js +71 -3
  51. package/dist/components/DebitForm/DebitFormStepsData.js.map +1 -1
  52. package/dist/components/DebitForm/getDebitCardFormTaskData.d.ts +1 -3
  53. package/dist/components/DebitForm/getDebitCardFormTaskData.js +16 -22
  54. package/dist/components/DebitForm/getDebitCardFormTaskData.js.map +1 -1
  55. package/dist/components/DebitForm/useDebitFormAPI.js +0 -2
  56. package/dist/components/DebitForm/useDebitFormAPI.js.map +1 -1
  57. package/dist/retail/adaptors/getCreditFormTaskData.d.ts +1 -3
  58. package/dist/retail/adaptors/getCreditFormTaskData.js +24 -33
  59. package/dist/retail/adaptors/getCreditFormTaskData.js.map +1 -1
  60. package/dist/retail/adaptors/getEmploymentData.js +3 -3
  61. package/dist/retail/adaptors/getEmploymentData.js.map +1 -1
  62. package/dist/retail/adaptors/getFamilyStatusAndIncomeData.js +2 -1
  63. package/dist/retail/adaptors/getFamilyStatusAndIncomeData.js.map +1 -1
  64. package/dist/retail/adaptors/getPersonalInfoData.js +4 -2
  65. package/dist/retail/adaptors/getPersonalInfoData.js.map +1 -1
  66. package/dist/retail/api/checkCode.js +1 -1
  67. package/dist/retail/api/checkCode.js.map +1 -1
  68. package/dist/retail/api/createUserTaskDebit.d.ts +3 -1
  69. package/dist/retail/api/createUserTaskDebit.js.map +1 -1
  70. package/dist/retail/api/updateUserTask.d.ts +3 -2
  71. package/dist/retail/api/updateUserTask.js.map +1 -1
  72. package/dist/retail/api/updateUserTaskDebit.d.ts +1 -1
  73. package/dist/retail/components/DraftDialog/DraftDialog.js +1 -2
  74. package/dist/retail/components/DraftDialog/DraftDialog.js.map +1 -1
  75. package/dist/retail/components/DraftDialog/parseDraftTask.d.ts +1 -1
  76. package/dist/retail/components/DraftDialog/parseDraftTask.js +2 -3
  77. package/dist/retail/components/DraftDialog/parseDraftTask.js.map +1 -1
  78. package/dist/retail/components/Fields/DaDataInnField.js +10 -3
  79. package/dist/retail/components/Fields/DaDataInnField.js.map +1 -1
  80. package/dist/retail/components/Fields/InitiateBankruptcyFlgField.d.ts +2 -0
  81. package/dist/retail/components/Fields/InitiateBankruptcyFlgField.js +7 -0
  82. package/dist/retail/components/Fields/InitiateBankruptcyFlgField.js.map +1 -0
  83. package/dist/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +7 -2
  84. package/dist/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js +19 -10
  85. package/dist/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
  86. package/dist/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +1 -2
  87. package/dist/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js +21 -10
  88. package/dist/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -1
  89. package/dist/retail/content.d.ts +2 -8
  90. package/dist/retail/content.js +3 -361
  91. package/dist/retail/content.js.map +1 -1
  92. package/dist/retail/inputs.d.ts +1 -1
  93. package/dist/retail/inputs.js +2 -1
  94. package/dist/retail/inputs.js.map +1 -1
  95. package/dist/retail/model/LeadFormState.d.ts +4 -2
  96. package/dist/retail/model/NameFieldDef.d.ts +1 -1
  97. package/dist/retail/model/ReferalData.d.ts +0 -1
  98. package/dist/retail/utils/getMainFormStateMap.d.ts +2 -0
  99. package/dist/retail/utils/{mainFormStateMap.js → getMainFormStateMap.js} +6 -4
  100. package/dist/retail/utils/getMainFormStateMap.js.map +1 -0
  101. package/lib/components/ApplicationLeadForm/applicationFormData.js +0 -1
  102. package/lib/components/ApplicationLeadForm/applicationFormData.js.map +1 -1
  103. package/lib/components/ApplicationLeadForm/consents.js +0 -4
  104. package/lib/components/ApplicationLeadForm/consents.js.map +1 -1
  105. package/lib/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +4 -5
  106. package/lib/components/ApplicationLeadForm/getLeadFormTaskData.js +20 -17
  107. package/lib/components/ApplicationLeadForm/getLeadFormTaskData.js.map +1 -1
  108. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +12 -11
  109. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  110. package/lib/components/ApplicationLeadForm/useInitApplicationLead.d.ts +6 -0
  111. package/lib/components/ApplicationLeadForm/useInitApplicationLead.js +20 -12
  112. package/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  113. package/lib/components/CreditCardForm/creditCardFormStepsData.js +244 -2
  114. package/lib/components/CreditCardForm/creditCardFormStepsData.js.map +1 -1
  115. package/lib/components/CreditCardForm/formStateMap.js +2 -2
  116. package/lib/components/CreditCardForm/formStateMap.js.map +1 -1
  117. package/lib/components/CreditCardForm/getCreditCardFormTaskData.d.ts +1 -3
  118. package/lib/components/CreditCardForm/getCreditCardFormTaskData.js +24 -30
  119. package/lib/components/CreditCardForm/getCreditCardFormTaskData.js.map +1 -1
  120. package/lib/components/CreditCardForm/useCreditCardFormAPI.js +0 -2
  121. package/lib/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
  122. package/lib/components/CreditForm/CreditForm.js +1 -2
  123. package/lib/components/CreditForm/CreditForm.js.map +1 -1
  124. package/lib/components/CreditForm/creditFormStepsData.js +191 -2
  125. package/lib/components/CreditForm/creditFormStepsData.js.map +1 -1
  126. package/lib/components/CreditForm/formStateMap.js +2 -2
  127. package/lib/components/CreditForm/formStateMap.js.map +1 -1
  128. package/lib/components/CreditForm/useCreditFormAPI.js +1 -3
  129. package/lib/components/CreditForm/useCreditFormAPI.js.map +1 -1
  130. package/lib/components/DebitForm/DebitFormStepsData.js +70 -2
  131. package/lib/components/DebitForm/DebitFormStepsData.js.map +1 -1
  132. package/lib/components/DebitForm/getDebitCardFormTaskData.d.ts +1 -3
  133. package/lib/components/DebitForm/getDebitCardFormTaskData.js +16 -22
  134. package/lib/components/DebitForm/getDebitCardFormTaskData.js.map +1 -1
  135. package/lib/components/DebitForm/useDebitFormAPI.js +0 -2
  136. package/lib/components/DebitForm/useDebitFormAPI.js.map +1 -1
  137. package/lib/retail/adaptors/getCreditFormTaskData.d.ts +1 -3
  138. package/lib/retail/adaptors/getCreditFormTaskData.js +24 -33
  139. package/lib/retail/adaptors/getCreditFormTaskData.js.map +1 -1
  140. package/lib/retail/adaptors/getEmploymentData.js +3 -3
  141. package/lib/retail/adaptors/getEmploymentData.js.map +1 -1
  142. package/lib/retail/adaptors/getFamilyStatusAndIncomeData.js +2 -1
  143. package/lib/retail/adaptors/getFamilyStatusAndIncomeData.js.map +1 -1
  144. package/lib/retail/adaptors/getPersonalInfoData.js +4 -2
  145. package/lib/retail/adaptors/getPersonalInfoData.js.map +1 -1
  146. package/lib/retail/api/checkCode.js +1 -1
  147. package/lib/retail/api/checkCode.js.map +1 -1
  148. package/lib/retail/api/createUserTaskDebit.d.ts +3 -1
  149. package/lib/retail/api/createUserTaskDebit.js.map +1 -1
  150. package/lib/retail/api/updateUserTask.d.ts +3 -2
  151. package/lib/retail/api/updateUserTask.js.map +1 -1
  152. package/lib/retail/api/updateUserTaskDebit.d.ts +1 -1
  153. package/lib/retail/components/DraftDialog/DraftDialog.js +1 -2
  154. package/lib/retail/components/DraftDialog/DraftDialog.js.map +1 -1
  155. package/lib/retail/components/DraftDialog/parseDraftTask.d.ts +1 -1
  156. package/lib/retail/components/DraftDialog/parseDraftTask.js +2 -3
  157. package/lib/retail/components/DraftDialog/parseDraftTask.js.map +1 -1
  158. package/lib/retail/components/Fields/DaDataInnField.js +10 -3
  159. package/lib/retail/components/Fields/DaDataInnField.js.map +1 -1
  160. package/lib/retail/components/Fields/InitiateBankruptcyFlgField.d.ts +2 -0
  161. package/lib/retail/components/Fields/InitiateBankruptcyFlgField.js +5 -0
  162. package/lib/retail/components/Fields/InitiateBankruptcyFlgField.js.map +1 -0
  163. package/lib/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +7 -2
  164. package/lib/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js +18 -9
  165. package/lib/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
  166. package/lib/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +1 -2
  167. package/lib/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js +21 -10
  168. package/lib/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -1
  169. package/lib/retail/content.d.ts +2 -8
  170. package/lib/retail/content.js +2 -360
  171. package/lib/retail/content.js.map +1 -1
  172. package/lib/retail/inputs.d.ts +1 -1
  173. package/lib/retail/inputs.js +2 -1
  174. package/lib/retail/inputs.js.map +1 -1
  175. package/lib/retail/model/LeadFormState.d.ts +4 -2
  176. package/lib/retail/model/NameFieldDef.d.ts +1 -1
  177. package/lib/retail/model/ReferalData.d.ts +0 -1
  178. package/lib/retail/utils/getMainFormStateMap.d.ts +2 -0
  179. package/lib/retail/utils/{mainFormStateMap.js → getMainFormStateMap.js} +4 -3
  180. package/lib/retail/utils/getMainFormStateMap.js.map +1 -0
  181. package/mobile/bundle/bundle.umd.js +501 -333
  182. package/mobile/bundle/bundle.umd.min.js +1 -1
  183. package/mobile/bundle/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +4 -5
  184. package/mobile/bundle/components/ApplicationLeadForm/useInitApplicationLead.d.ts +6 -0
  185. package/mobile/bundle/components/CreditCardForm/getCreditCardFormTaskData.d.ts +1 -3
  186. package/mobile/bundle/components/DebitForm/getDebitCardFormTaskData.d.ts +1 -3
  187. package/mobile/bundle/retail/adaptors/getCreditFormTaskData.d.ts +1 -3
  188. package/mobile/bundle/retail/api/createUserTaskDebit.d.ts +3 -1
  189. package/mobile/bundle/retail/api/updateUserTask.d.ts +3 -2
  190. package/mobile/bundle/retail/api/updateUserTaskDebit.d.ts +1 -1
  191. package/mobile/bundle/retail/components/DraftDialog/parseDraftTask.d.ts +1 -1
  192. package/mobile/bundle/retail/components/Fields/InitiateBankruptcyFlgField.d.ts +2 -0
  193. package/mobile/bundle/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +7 -2
  194. package/mobile/bundle/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +1 -2
  195. package/mobile/bundle/retail/content.d.ts +2 -8
  196. package/mobile/bundle/retail/inputs.d.ts +1 -1
  197. package/mobile/bundle/retail/model/LeadFormState.d.ts +4 -2
  198. package/mobile/bundle/retail/model/NameFieldDef.d.ts +1 -1
  199. package/mobile/bundle/retail/model/ReferalData.d.ts +0 -1
  200. package/mobile/bundle/retail/utils/getMainFormStateMap.d.ts +2 -0
  201. package/mobile/dist/components/ApplicationLeadForm/applicationFormData.js +0 -1
  202. package/mobile/dist/components/ApplicationLeadForm/applicationFormData.js.map +1 -1
  203. package/mobile/dist/components/ApplicationLeadForm/consents.js +0 -4
  204. package/mobile/dist/components/ApplicationLeadForm/consents.js.map +1 -1
  205. package/mobile/dist/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +4 -5
  206. package/mobile/dist/components/ApplicationLeadForm/getLeadFormTaskData.js +20 -17
  207. package/mobile/dist/components/ApplicationLeadForm/getLeadFormTaskData.js.map +1 -1
  208. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +12 -11
  209. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  210. package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.d.ts +6 -0
  211. package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js +20 -12
  212. package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  213. package/mobile/dist/components/CreditCardForm/creditCardFormStepsData.js +245 -3
  214. package/mobile/dist/components/CreditCardForm/creditCardFormStepsData.js.map +1 -1
  215. package/mobile/dist/components/CreditCardForm/formStateMap.js +2 -2
  216. package/mobile/dist/components/CreditCardForm/formStateMap.js.map +1 -1
  217. package/mobile/dist/components/CreditCardForm/getCreditCardFormTaskData.d.ts +1 -3
  218. package/mobile/dist/components/CreditCardForm/getCreditCardFormTaskData.js +24 -30
  219. package/mobile/dist/components/CreditCardForm/getCreditCardFormTaskData.js.map +1 -1
  220. package/mobile/dist/components/CreditCardForm/useCreditCardFormAPI.js +0 -2
  221. package/mobile/dist/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
  222. package/mobile/dist/components/CreditForm/CreditForm.js +1 -2
  223. package/mobile/dist/components/CreditForm/CreditForm.js.map +1 -1
  224. package/mobile/dist/components/CreditForm/creditFormStepsData.js +192 -3
  225. package/mobile/dist/components/CreditForm/creditFormStepsData.js.map +1 -1
  226. package/mobile/dist/components/CreditForm/formStateMap.js +2 -2
  227. package/mobile/dist/components/CreditForm/formStateMap.js.map +1 -1
  228. package/mobile/dist/components/CreditForm/useCreditFormAPI.js +1 -3
  229. package/mobile/dist/components/CreditForm/useCreditFormAPI.js.map +1 -1
  230. package/mobile/dist/components/DebitForm/DebitFormStepsData.js +71 -3
  231. package/mobile/dist/components/DebitForm/DebitFormStepsData.js.map +1 -1
  232. package/mobile/dist/components/DebitForm/getDebitCardFormTaskData.d.ts +1 -3
  233. package/mobile/dist/components/DebitForm/getDebitCardFormTaskData.js +16 -22
  234. package/mobile/dist/components/DebitForm/getDebitCardFormTaskData.js.map +1 -1
  235. package/mobile/dist/components/DebitForm/useDebitFormAPI.js +0 -2
  236. package/mobile/dist/components/DebitForm/useDebitFormAPI.js.map +1 -1
  237. package/mobile/dist/retail/adaptors/getCreditFormTaskData.d.ts +1 -3
  238. package/mobile/dist/retail/adaptors/getCreditFormTaskData.js +24 -33
  239. package/mobile/dist/retail/adaptors/getCreditFormTaskData.js.map +1 -1
  240. package/mobile/dist/retail/adaptors/getEmploymentData.js +3 -3
  241. package/mobile/dist/retail/adaptors/getEmploymentData.js.map +1 -1
  242. package/mobile/dist/retail/adaptors/getFamilyStatusAndIncomeData.js +2 -1
  243. package/mobile/dist/retail/adaptors/getFamilyStatusAndIncomeData.js.map +1 -1
  244. package/mobile/dist/retail/adaptors/getPersonalInfoData.js +4 -2
  245. package/mobile/dist/retail/adaptors/getPersonalInfoData.js.map +1 -1
  246. package/mobile/dist/retail/api/checkCode.js +1 -1
  247. package/mobile/dist/retail/api/checkCode.js.map +1 -1
  248. package/mobile/dist/retail/api/createUserTaskDebit.d.ts +3 -1
  249. package/mobile/dist/retail/api/createUserTaskDebit.js.map +1 -1
  250. package/mobile/dist/retail/api/updateUserTask.d.ts +3 -2
  251. package/mobile/dist/retail/api/updateUserTask.js.map +1 -1
  252. package/mobile/dist/retail/api/updateUserTaskDebit.d.ts +1 -1
  253. package/mobile/dist/retail/components/DraftDialog/DraftDialog.js +1 -2
  254. package/mobile/dist/retail/components/DraftDialog/DraftDialog.js.map +1 -1
  255. package/mobile/dist/retail/components/DraftDialog/parseDraftTask.d.ts +1 -1
  256. package/mobile/dist/retail/components/DraftDialog/parseDraftTask.js +2 -3
  257. package/mobile/dist/retail/components/DraftDialog/parseDraftTask.js.map +1 -1
  258. package/mobile/dist/retail/components/Fields/DaDataInnField.js +10 -3
  259. package/mobile/dist/retail/components/Fields/DaDataInnField.js.map +1 -1
  260. package/mobile/dist/retail/components/Fields/InitiateBankruptcyFlgField.d.ts +2 -0
  261. package/mobile/dist/retail/components/Fields/InitiateBankruptcyFlgField.js +7 -0
  262. package/mobile/dist/retail/components/Fields/InitiateBankruptcyFlgField.js.map +1 -0
  263. package/mobile/dist/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +7 -2
  264. package/mobile/dist/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js +19 -10
  265. package/mobile/dist/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
  266. package/mobile/dist/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +1 -2
  267. package/mobile/dist/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js +21 -10
  268. package/mobile/dist/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -1
  269. package/mobile/dist/retail/content.d.ts +2 -8
  270. package/mobile/dist/retail/content.js +3 -361
  271. package/mobile/dist/retail/content.js.map +1 -1
  272. package/mobile/dist/retail/inputs.d.ts +1 -1
  273. package/mobile/dist/retail/inputs.js +2 -1
  274. package/mobile/dist/retail/inputs.js.map +1 -1
  275. package/mobile/dist/retail/model/LeadFormState.d.ts +4 -2
  276. package/mobile/dist/retail/model/NameFieldDef.d.ts +1 -1
  277. package/mobile/dist/retail/model/ReferalData.d.ts +0 -1
  278. package/mobile/dist/retail/utils/getMainFormStateMap.d.ts +2 -0
  279. package/mobile/{lib/retail/utils/mainFormStateMap.js → dist/retail/utils/getMainFormStateMap.js} +7 -3
  280. package/mobile/dist/retail/utils/getMainFormStateMap.js.map +1 -0
  281. package/mobile/lib/components/ApplicationLeadForm/applicationFormData.js +0 -1
  282. package/mobile/lib/components/ApplicationLeadForm/applicationFormData.js.map +1 -1
  283. package/mobile/lib/components/ApplicationLeadForm/consents.js +0 -4
  284. package/mobile/lib/components/ApplicationLeadForm/consents.js.map +1 -1
  285. package/mobile/lib/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +4 -5
  286. package/mobile/lib/components/ApplicationLeadForm/getLeadFormTaskData.js +20 -17
  287. package/mobile/lib/components/ApplicationLeadForm/getLeadFormTaskData.js.map +1 -1
  288. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +12 -11
  289. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  290. package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.d.ts +6 -0
  291. package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js +20 -12
  292. package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  293. package/mobile/lib/components/CreditCardForm/creditCardFormStepsData.js +244 -2
  294. package/mobile/lib/components/CreditCardForm/creditCardFormStepsData.js.map +1 -1
  295. package/mobile/lib/components/CreditCardForm/formStateMap.js +2 -2
  296. package/mobile/lib/components/CreditCardForm/formStateMap.js.map +1 -1
  297. package/mobile/lib/components/CreditCardForm/getCreditCardFormTaskData.d.ts +1 -3
  298. package/mobile/lib/components/CreditCardForm/getCreditCardFormTaskData.js +24 -30
  299. package/mobile/lib/components/CreditCardForm/getCreditCardFormTaskData.js.map +1 -1
  300. package/mobile/lib/components/CreditCardForm/useCreditCardFormAPI.js +0 -2
  301. package/mobile/lib/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
  302. package/mobile/lib/components/CreditForm/CreditForm.js +1 -2
  303. package/mobile/lib/components/CreditForm/CreditForm.js.map +1 -1
  304. package/mobile/lib/components/CreditForm/creditFormStepsData.js +191 -2
  305. package/mobile/lib/components/CreditForm/creditFormStepsData.js.map +1 -1
  306. package/mobile/lib/components/CreditForm/formStateMap.js +2 -2
  307. package/mobile/lib/components/CreditForm/formStateMap.js.map +1 -1
  308. package/mobile/lib/components/CreditForm/useCreditFormAPI.js +1 -3
  309. package/mobile/lib/components/CreditForm/useCreditFormAPI.js.map +1 -1
  310. package/mobile/lib/components/DebitForm/DebitFormStepsData.js +70 -2
  311. package/mobile/lib/components/DebitForm/DebitFormStepsData.js.map +1 -1
  312. package/mobile/lib/components/DebitForm/getDebitCardFormTaskData.d.ts +1 -3
  313. package/mobile/lib/components/DebitForm/getDebitCardFormTaskData.js +16 -22
  314. package/mobile/lib/components/DebitForm/getDebitCardFormTaskData.js.map +1 -1
  315. package/mobile/lib/components/DebitForm/useDebitFormAPI.js +0 -2
  316. package/mobile/lib/components/DebitForm/useDebitFormAPI.js.map +1 -1
  317. package/mobile/lib/retail/adaptors/getCreditFormTaskData.d.ts +1 -3
  318. package/mobile/lib/retail/adaptors/getCreditFormTaskData.js +24 -33
  319. package/mobile/lib/retail/adaptors/getCreditFormTaskData.js.map +1 -1
  320. package/mobile/lib/retail/adaptors/getEmploymentData.js +3 -3
  321. package/mobile/lib/retail/adaptors/getEmploymentData.js.map +1 -1
  322. package/mobile/lib/retail/adaptors/getFamilyStatusAndIncomeData.js +2 -1
  323. package/mobile/lib/retail/adaptors/getFamilyStatusAndIncomeData.js.map +1 -1
  324. package/mobile/lib/retail/adaptors/getPersonalInfoData.js +4 -2
  325. package/mobile/lib/retail/adaptors/getPersonalInfoData.js.map +1 -1
  326. package/mobile/lib/retail/api/checkCode.js +1 -1
  327. package/mobile/lib/retail/api/checkCode.js.map +1 -1
  328. package/mobile/lib/retail/api/createUserTaskDebit.d.ts +3 -1
  329. package/mobile/lib/retail/api/createUserTaskDebit.js.map +1 -1
  330. package/mobile/lib/retail/api/updateUserTask.d.ts +3 -2
  331. package/mobile/lib/retail/api/updateUserTask.js.map +1 -1
  332. package/mobile/lib/retail/api/updateUserTaskDebit.d.ts +1 -1
  333. package/mobile/lib/retail/components/DraftDialog/DraftDialog.js +1 -2
  334. package/mobile/lib/retail/components/DraftDialog/DraftDialog.js.map +1 -1
  335. package/mobile/lib/retail/components/DraftDialog/parseDraftTask.d.ts +1 -1
  336. package/mobile/lib/retail/components/DraftDialog/parseDraftTask.js +2 -3
  337. package/mobile/lib/retail/components/DraftDialog/parseDraftTask.js.map +1 -1
  338. package/mobile/lib/retail/components/Fields/DaDataInnField.js +10 -3
  339. package/mobile/lib/retail/components/Fields/DaDataInnField.js.map +1 -1
  340. package/mobile/lib/retail/components/Fields/InitiateBankruptcyFlgField.d.ts +2 -0
  341. package/mobile/lib/retail/components/Fields/InitiateBankruptcyFlgField.js +5 -0
  342. package/mobile/lib/retail/components/Fields/InitiateBankruptcyFlgField.js.map +1 -0
  343. package/mobile/lib/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +7 -2
  344. package/mobile/lib/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js +18 -9
  345. package/mobile/lib/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
  346. package/mobile/lib/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +1 -2
  347. package/mobile/lib/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js +21 -10
  348. package/mobile/lib/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -1
  349. package/mobile/lib/retail/content.d.ts +2 -8
  350. package/mobile/lib/retail/content.js +2 -360
  351. package/mobile/lib/retail/content.js.map +1 -1
  352. package/mobile/lib/retail/inputs.d.ts +1 -1
  353. package/mobile/lib/retail/inputs.js +2 -1
  354. package/mobile/lib/retail/inputs.js.map +1 -1
  355. package/mobile/lib/retail/model/LeadFormState.d.ts +4 -2
  356. package/mobile/lib/retail/model/NameFieldDef.d.ts +1 -1
  357. package/mobile/lib/retail/model/ReferalData.d.ts +0 -1
  358. package/mobile/lib/retail/utils/getMainFormStateMap.d.ts +2 -0
  359. package/mobile/{dist/retail/utils/mainFormStateMap.js → lib/retail/utils/getMainFormStateMap.js} +4 -5
  360. package/mobile/lib/retail/utils/getMainFormStateMap.js.map +1 -0
  361. package/mobile/src/components/ApplicationLeadForm/applicationFormData.tsx +0 -1
  362. package/mobile/src/components/ApplicationLeadForm/consents.ts +0 -4
  363. package/mobile/src/components/ApplicationLeadForm/getLeadFormTaskData.ts +22 -20
  364. package/mobile/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +15 -11
  365. package/mobile/src/components/ApplicationLeadForm/useInitApplicationLead.ts +31 -12
  366. package/mobile/src/components/CreditCardForm/creditCardFormStepsData.tsx +246 -6
  367. package/mobile/src/components/CreditCardForm/formStateMap.tsx +2 -2
  368. package/mobile/src/components/CreditCardForm/getCreditCardFormTaskData.ts +24 -34
  369. package/mobile/src/components/CreditCardForm/useCreditCardFormAPI.tsx +0 -2
  370. package/mobile/src/components/CreditForm/CreditForm.tsx +1 -2
  371. package/mobile/src/components/CreditForm/creditFormStepsData.tsx +194 -6
  372. package/mobile/src/components/CreditForm/formStateMap.tsx +2 -2
  373. package/mobile/src/components/CreditForm/useCreditFormAPI.tsx +1 -3
  374. package/mobile/src/components/DebitForm/DebitFormStepsData.tsx +71 -6
  375. package/mobile/src/components/DebitForm/getDebitCardFormTaskData.ts +16 -26
  376. package/mobile/src/components/DebitForm/useDebitFormAPI.tsx +0 -2
  377. package/mobile/src/retail/adaptors/getCreditFormTaskData.ts +26 -39
  378. package/mobile/src/retail/adaptors/getEmploymentData.tsx +3 -3
  379. package/mobile/src/retail/adaptors/getFamilyStatusAndIncomeData.ts +2 -0
  380. package/mobile/src/retail/adaptors/getPersonalInfoData.tsx +4 -2
  381. package/mobile/src/retail/api/checkCode.ts +1 -1
  382. package/mobile/src/retail/api/createUserTaskDebit.ts +3 -1
  383. package/mobile/src/retail/api/updateUserTask.ts +3 -2
  384. package/mobile/src/retail/api/updateUserTaskDebit.ts +1 -1
  385. package/mobile/src/retail/components/DraftDialog/DraftDialog.tsx +1 -2
  386. package/mobile/src/retail/components/DraftDialog/parseDraftTask.ts +2 -5
  387. package/mobile/src/retail/components/Fields/DaDataInnField.tsx +14 -6
  388. package/mobile/src/retail/components/Fields/InitiateBankruptcyFlgField.tsx +10 -0
  389. package/mobile/src/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.tsx +31 -27
  390. package/mobile/src/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.tsx +22 -10
  391. package/mobile/src/retail/content.tsx +3 -362
  392. package/mobile/src/retail/inputs.tsx +2 -1
  393. package/mobile/src/retail/model/LeadFormState.ts +4 -2
  394. package/mobile/src/retail/model/NameFieldDef.ts +1 -0
  395. package/mobile/src/retail/model/ReferalData.ts +0 -1
  396. package/mobile/src/retail/utils/{mainFormStateMap.ts → getMainFormStateMap.ts} +3 -2
  397. package/package.json +1 -1
  398. package/src/components/ApplicationLeadForm/applicationFormData.tsx +0 -1
  399. package/src/components/ApplicationLeadForm/consents.ts +0 -4
  400. package/src/components/ApplicationLeadForm/getLeadFormTaskData.ts +22 -20
  401. package/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +15 -11
  402. package/src/components/ApplicationLeadForm/useInitApplicationLead.ts +31 -12
  403. package/src/components/CreditCardForm/creditCardFormStepsData.tsx +246 -6
  404. package/src/components/CreditCardForm/formStateMap.tsx +2 -2
  405. package/src/components/CreditCardForm/getCreditCardFormTaskData.ts +24 -34
  406. package/src/components/CreditCardForm/useCreditCardFormAPI.tsx +0 -2
  407. package/src/components/CreditForm/CreditForm.tsx +1 -2
  408. package/src/components/CreditForm/creditFormStepsData.tsx +194 -6
  409. package/src/components/CreditForm/formStateMap.tsx +2 -2
  410. package/src/components/CreditForm/useCreditFormAPI.tsx +1 -3
  411. package/src/components/DebitForm/DebitFormStepsData.tsx +71 -6
  412. package/src/components/DebitForm/getDebitCardFormTaskData.ts +16 -26
  413. package/src/components/DebitForm/useDebitFormAPI.tsx +0 -2
  414. package/src/retail/adaptors/getCreditFormTaskData.ts +26 -39
  415. package/src/retail/adaptors/getEmploymentData.tsx +3 -3
  416. package/src/retail/adaptors/getFamilyStatusAndIncomeData.ts +2 -0
  417. package/src/retail/adaptors/getPersonalInfoData.tsx +4 -2
  418. package/src/retail/api/checkCode.ts +1 -1
  419. package/src/retail/api/createUserTaskDebit.ts +3 -1
  420. package/src/retail/api/updateUserTask.ts +3 -2
  421. package/src/retail/api/updateUserTaskDebit.ts +1 -1
  422. package/src/retail/components/DraftDialog/DraftDialog.tsx +1 -2
  423. package/src/retail/components/DraftDialog/parseDraftTask.ts +2 -5
  424. package/src/retail/components/Fields/DaDataInnField.tsx +14 -6
  425. package/src/retail/components/Fields/InitiateBankruptcyFlgField.tsx +10 -0
  426. package/src/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.tsx +31 -27
  427. package/src/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.tsx +22 -10
  428. package/src/retail/content.tsx +3 -362
  429. package/src/retail/inputs.tsx +2 -1
  430. package/src/retail/model/LeadFormState.ts +4 -2
  431. package/src/retail/model/NameFieldDef.ts +1 -0
  432. package/src/retail/model/ReferalData.ts +0 -1
  433. package/src/retail/utils/{mainFormStateMap.ts → getMainFormStateMap.ts} +3 -2
  434. package/bundle/retail/utils/mainFormStateMap.d.ts +0 -2
  435. package/dist/retail/utils/mainFormStateMap.d.ts +0 -2
  436. package/dist/retail/utils/mainFormStateMap.js.map +0 -1
  437. package/lib/retail/utils/mainFormStateMap.d.ts +0 -2
  438. package/lib/retail/utils/mainFormStateMap.js.map +0 -1
  439. package/mobile/bundle/retail/utils/mainFormStateMap.d.ts +0 -2
  440. package/mobile/dist/retail/utils/mainFormStateMap.d.ts +0 -2
  441. package/mobile/dist/retail/utils/mainFormStateMap.js.map +0 -1
  442. package/mobile/lib/retail/utils/mainFormStateMap.d.ts +0 -2
  443. package/mobile/lib/retail/utils/mainFormStateMap.js.map +0 -1
@@ -2628,10 +2628,6 @@
2628
2628
  text: 'Согласие на получение информационных материалов',
2629
2629
  docId: 18,
2630
2630
  },
2631
- consentPhotoFlg: {
2632
- text: 'Согласие на фотографирование',
2633
- docId: 17,
2634
- },
2635
2631
  };
2636
2632
  const DEBIT_CARD_CONSENTS = {
2637
2633
  processPersonalDataFlg: {
@@ -2670,7 +2666,6 @@
2670
2666
  { name: 'consentInformFlg' },
2671
2667
  { name: 'consentPfrFlg' },
2672
2668
  { name: 'consentInformMaterialsFlg' },
2673
- { name: 'consentPhotoFlg' },
2674
2669
  { name: 'consentFATCA', required: true },
2675
2670
  ];
2676
2671
  return [
@@ -4443,9 +4438,7 @@
4443
4438
  updateOrganizationFields(store, field, item);
4444
4439
  }, []);
4445
4440
  useEffect(() => {
4446
- if (!esiaAccountTypeCd ||
4447
- !inn ||
4448
- !(employerActivities && employerOrganization && organization && amountWorkers)) {
4441
+ if (!esiaAccountTypeCd || !inn || !isDictionariesAlreadyLoad(store)) {
4449
4442
  return;
4450
4443
  }
4451
4444
  (async () => {
@@ -4457,6 +4450,15 @@
4457
4450
  }, [employerActivities, employerOrganization, organization, amountWorkers]);
4458
4451
  return (jsx(DaDataInputControl, { label: "\u0418\u041D\u041D", isInteger: true, maxLength: 12, ...input, ...field(input?.name ?? ''), onDaDataChange: onDaDataChange, disabled: isEsiaAuthorize(field, input) }));
4459
4452
  });
4453
+ const isDictionariesAlreadyLoad = (store) => {
4454
+ const { employerActivities, employerOrganization, organization, amountWorkers, productType } = store;
4455
+ return [
4456
+ employerOrganization,
4457
+ organization,
4458
+ amountWorkers,
4459
+ productType === 'creditCard' ? employerActivities : true,
4460
+ ].every(Boolean);
4461
+ };
4460
4462
 
4461
4463
  const DeliveryDateFiels = JSX(({ field, input }) => (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438", ...field(input?.name ?? ''), minDate: new Date() })));
4462
4464
 
@@ -4568,6 +4570,8 @@
4568
4570
 
4569
4571
  const InfoCardField = JSX(({ input }) => (jsx(InfoCard, { __html: input?.label })));
4570
4572
 
4573
+ const InitiateBankruptcyFlgField = JSX(({ field, input }) => (jsx(CheckboxWithError, { text: "\u042F \u043F\u043B\u0430\u043D\u0438\u0440\u0443\u044E \u0432 \u0431\u043B\u0438\u0436\u0430\u0439\u0448\u0435\u0435 \u0432\u0440\u0435\u043C\u044F \u0438\u043D\u0438\u0446\u0438\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0434\u0435\u043B\u043E \u043E \u0431\u0430\u043D\u043A\u0440\u043E\u0442\u0441\u0442\u0432\u0435 \u0432 \u043E\u0442\u043D\u043E\u0448\u0435\u043D\u0438\u0438 \u0441\u0435\u0431\u044F", ...field(input?.name ?? '') })));
4574
+
4571
4575
  const JobsNumberField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043C\u0435\u0441\u0442 \u0440\u0430\u0431\u043E\u0442\u044B \u0437\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435 5 \u043B\u0435\u0442", placeholder: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043C\u0435\u0441\u0442", isInteger: true, maxLength: 2, ...field(input?.name ?? ''), ...input, disabled: isEsiaAuthorize(field, input) })));
4572
4576
 
4573
4577
  const LastJobExperienceField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u0421\u0442\u0430\u0436 \u043D\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u043C \u0440\u0430\u0431\u043E\u0447\u0435\u043C \u043C\u0435\u0441\u0442\u0435", placeholder: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043B\u0435\u0442", type: "number", maxLength: 2, ...field(input?.name ?? ''), ...input, disabled: isEsiaAuthorize(field, input) })));
@@ -4906,7 +4910,6 @@
4906
4910
  consentInformFlg: ConsentField,
4907
4911
  consentPfrFlg: ConsentField,
4908
4912
  consentInformMaterialsFlg: ConsentField,
4909
- consentPhotoFlg: ConsentField,
4910
4913
  consentFATCA: ConsentField,
4911
4914
  };
4912
4915
  const InputsRetailMap = {
@@ -4953,6 +4956,7 @@
4953
4956
  wages: WagesField,
4954
4957
  mandatoryPayments: MandatoryPaymentsField,
4955
4958
  bankruptcyFlg: BankruptcyFlgField,
4959
+ initiateBankruptcyFlg: InitiateBankruptcyFlgField,
4956
4960
  shareholderFlg: ShareholderFlgField,
4957
4961
  legalEntityName: LegalEntityNameField,
4958
4962
  creditInRshbCd: CreditInRshbCdField,
@@ -5006,6 +5010,12 @@
5006
5010
 
5007
5011
  const renderSubmitButton = (button, isSending = false) => (jsx(SubmitButton$1, { className: "w-full @xl:w-auto", isLoading: isSending, children: button?.text ? button.text : 'Отправить заявку' }));
5008
5012
 
5013
+ const sessionStore = new Store(); // sessionStorage cache
5014
+ replicate(sessionStore, new StorageAdapter(globalThis?.sessionStorage));
5015
+ function useSessionStore() {
5016
+ return useStore(sessionStore);
5017
+ }
5018
+
5009
5019
  const createDraftTask = async (body) => {
5010
5020
  const res = await fetchRetailJSON('/user-data/createDraftTask', 'POST', body);
5011
5021
  return res || {};
@@ -5185,32 +5195,36 @@
5185
5195
 
5186
5196
  const checkCode = async (body) => fetchRetailJSON('/sms/checkCode', 'POST', body).then(saveToken);
5187
5197
  const saveToken = (data) => {
5188
- if (data) {
5198
+ if (data?.access_token && data?.refresh_token) {
5189
5199
  globalThis.sessionStorage.setItem('accessToken', data.access_token);
5190
5200
  globalThis.sessionStorage.setItem('refreshToken', data.refresh_token);
5191
5201
  }
5192
5202
  };
5193
5203
 
5194
5204
  const useVerifyPhoneDialogSubmit = ({ values, onSuccess, }) => {
5205
+ const sessionStore = useSessionStore();
5206
+ const attempts = sessionStore.smsCode?.attempts || 0;
5207
+ const timer = Math.max(getTimer(sessionStore.smsCode?.sendTime || Date.now()), 0);
5195
5208
  const [errorText, setErrorText] = useState('');
5196
5209
  const [isLoading, { setTrue: startLoading, setFalse: endLoading }] = useBool(false);
5197
- const [timeNextReq, setTimeNextReq] = useState(0);
5198
- const [isTimerStarted, setIsTimerStarted] = useState(false);
5199
- const [attempts, setAttempts] = useState(0);
5210
+ const [timeNextReq, setTimeNextReq] = useState(timer);
5200
5211
  const resetError = useCallback(() => setErrorText(''), []);
5201
- const isTimeExpired = Boolean(timeNextReq === 0 && isTimerStarted);
5212
+ const isTimeExpired = Boolean(timeNextReq === 0 && sessionStore.smsCode?.sendTime);
5202
5213
  const isSubmitButtonDisabled = attempts > 2 || isTimeExpired || !values.every(Boolean);
5203
5214
  const handleSubmit = useCallback(async () => {
5204
5215
  try {
5205
- setIsTimerStarted(false);
5206
- setTimeNextReq(0);
5207
- setAttempts((_) => _ + 1);
5216
+ sessionStore.smsCode = {
5217
+ ...sessionStore.smsCode,
5218
+ attempts: attempts + 1,
5219
+ };
5208
5220
  startLoading();
5209
5221
  await checkCode({
5210
5222
  smsText: values.join(''),
5211
5223
  smsCodesSetName: { key: 'AUTHENTICATION' },
5212
5224
  });
5225
+ setTimeNextReq(0);
5213
5226
  resetError();
5227
+ sessionStore.smsCode = null;
5214
5228
  await onSuccess?.(values.join(''));
5215
5229
  }
5216
5230
  catch {
@@ -5221,7 +5235,12 @@
5221
5235
  }
5222
5236
  }, [values, attempts]);
5223
5237
  useEffect(() => {
5224
- setErrorText(isTimeExpired ? 'Код просрочен' : '');
5238
+ if (isTimeExpired) {
5239
+ setErrorText('Код просрочен');
5240
+ }
5241
+ else if (attempts > 2) {
5242
+ setErrorText('Исчерпан лимит ввода смс-кода');
5243
+ }
5225
5244
  }, [isTimeExpired]);
5226
5245
  return {
5227
5246
  handleSubmit,
@@ -5231,14 +5250,17 @@
5231
5250
  timeNextReq,
5232
5251
  isSubmitButtonDisabled,
5233
5252
  setTimeNextReq,
5234
- setIsTimerStarted,
5235
- setAttempts,
5253
+ setErrorText,
5236
5254
  };
5237
5255
  };
5256
+ const getTimer = (sendTime) => TIME_TO_RESEND - Math.floor((Date.now() - sendTime) / 1000);
5238
5257
 
5239
- const VerifyPhoneDialog = JSX(({ phone, code = true, withDescription = true, codeLength = 4, consents, onSuccess = noop, onClose = noop, }) => {
5240
- const [values, setValues] = useState(Array(codeLength).fill(''));
5241
- const { handleSubmit, hasError, errorText, isLoading, timeNextReq, isSubmitButtonDisabled, setTimeNextReq, setIsTimerStarted, setAttempts, } = useVerifyPhoneDialogSubmit({ values, onSuccess });
5258
+ const TIME_TO_RESEND = 180;
5259
+ const CODE_LENGTH = 4;
5260
+ const VerifyPhoneDialog = JSX(({ phone, withDescription = true, consents, onSuccess = noop, onClose = noop }) => {
5261
+ const [values, setValues] = useState(Array(CODE_LENGTH).fill(''));
5262
+ const sessionStore = useSessionStore();
5263
+ const { handleSubmit, hasError, errorText, isLoading, timeNextReq, isSubmitButtonDisabled, setTimeNextReq, setErrorText, } = useVerifyPhoneDialogSubmit({ values, onSuccess });
5242
5264
  const captchaDialog = useDialog(CaptchaDialog);
5243
5265
  const phoneNumber = formatPhone(phone);
5244
5266
  const restartTimer = useCountDownTimer({ seconds: timeNextReq, onTick: setTimeNextReq });
@@ -5248,19 +5270,24 @@
5248
5270
  smsCodesSetName: { key: 'AUTHENTICATION' },
5249
5271
  });
5250
5272
  if (isSuccessSendCode) {
5251
- setAttempts(0);
5252
- setTimeNextReq(180);
5253
- restartTimer(180);
5254
- setIsTimerStarted(true);
5273
+ setTimeNextReq(TIME_TO_RESEND);
5274
+ restartTimer(TIME_TO_RESEND);
5275
+ setErrorText('');
5276
+ sessionStore.smsCode = {
5277
+ sendTime: Date.now(),
5278
+ attempts: 0,
5279
+ };
5255
5280
  }
5256
5281
  else {
5257
5282
  captchaDialog.open({ phoneNumber, sendCode: handleSendCode });
5258
5283
  }
5259
5284
  }, [phoneNumber, restartTimer, onClose]);
5260
5285
  useEffect(() => {
5261
- handleSendCode();
5286
+ if (!sessionStore.smsCode?.sendTime) {
5287
+ handleSendCode();
5288
+ }
5262
5289
  }, []);
5263
- return (jsx(Dialog, { className: "my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-xl p-m", onClose: onClose, children: jsxs("div", { className: "flex flex-col gap-xl items-center rounded-md", children: [jsx(Headline, { className: "w-full", title: "\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435 \u043D\u043E\u043C\u0435\u0440 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430", description: `Мы отправили код на ${phone}`, headlineVersion: "XS", isEmbedded: true, as: "h6" }), code ? (jsx(InputCode, { values: values, setValues: setValues, errorText: errorText, hasError: hasError })) : null, renderText$1(timeNextReq, handleSendCode), withDescription ? (jsxs(RichText, { itemSize: "list-s", children: [jsx("span", { children: "\u0412\u0432\u043E\u0434\u044F \u043A\u043E\u0434, \u044F \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u044E, \u0447\u0442\u043E \u043E\u0437\u043D\u0430\u043A\u043E\u043C\u043B\u0435\u043D \u0438 \u043F\u043E\u0434\u043F\u0438\u0441\u044B\u0432\u0430\u044E: " }), jsx("ul", { children: consents?.map((_, i) => (jsx("li", { children: _ }, `${_}-${i}`))) })] })) : null, renderNextButton(isSubmitButtonDisabled, handleSubmit), isLoading ? jsx(Loader, { blur: false }) : null] }) }));
5290
+ return (jsx(Dialog, { className: "my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-xl p-m", onClose: onClose, children: jsxs("div", { className: "flex flex-col gap-xl items-center rounded-md", children: [jsx(Headline, { className: "w-full", title: "\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435 \u043D\u043E\u043C\u0435\u0440 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430", description: `Мы отправили код на ${phone}`, headlineVersion: "XS", isEmbedded: true, as: "h6" }), jsx(InputCode, { values: values, setValues: setValues, errorText: errorText, hasError: hasError }), renderText$1(timeNextReq, handleSendCode), withDescription ? (jsxs(RichText, { itemSize: "list-s", children: [jsx("span", { children: "\u0412\u0432\u043E\u0434\u044F \u043A\u043E\u0434, \u044F \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u044E, \u0447\u0442\u043E \u043E\u0437\u043D\u0430\u043A\u043E\u043C\u043B\u0435\u043D \u0438 \u043F\u043E\u0434\u043F\u0438\u0441\u044B\u0432\u0430\u044E: " }), jsx("ul", { children: consents?.map((_, i) => (jsx("li", { children: _ }, `${_}-${i}`))) })] })) : null, renderNextButton(isSubmitButtonDisabled, handleSubmit), isLoading ? jsx(Loader, { blur: false }) : null] }) }));
5264
5291
  });
5265
5292
  const renderNextButton = (disabled, onClick) => (jsx(SubmitButton, { text: "\u0414\u0430\u043B\u0435\u0435", disabled: disabled, onClick: onClick }));
5266
5293
  const renderText$1 = (timeNextReq, handleSendCode) => timeNextReq ? (jsxs("div", { className: "flex flex-row text-l font-light text-base", children: ["\u041F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u043D\u043E\u0432\u044B\u0439 \u043A\u043E\u0434 \u043C\u043E\u0436\u043D\u043E \u0447\u0435\u0440\u0435\u0437", jsx(Timer, { className: "pl-2xs", seconds: timeNextReq })] })) : (jsx(Button, { embedded: true, onClick: handleSendCode, children: jsx(ButtonTitle, { children: "\u041F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u043D\u043E\u0432\u044B\u0439 \u043A\u043E\u0434" }) }));
@@ -5400,7 +5427,7 @@
5400
5427
  }, []);
5401
5428
 
5402
5429
  const getFamilyStatusAndIncomeData = (formData) => {
5403
- const { familyStatus, familyMembers, dependents, children, confirmationIncome, wages, mandatoryPayments, additionalIncome, otherIncome, otherPayments, rentalIncome, retirementIncome, snils, armyIdFlg, conscription, } = formData;
5430
+ const { familyStatus, familyMembers, dependents, children, confirmationIncome, wages, mandatoryPayments, additionalIncome, otherIncome, otherPayments, rentalIncome, retirementIncome, snils, armyIdFlg, conscription, initiateBankruptcyFlg, } = formData;
5404
5431
  return {
5405
5432
  maritalStatusCd: familyStatus,
5406
5433
  totalDependents: familyMembers,
@@ -5420,6 +5447,7 @@
5420
5447
  }),
5421
5448
  snils: snils?.replace(/[-\s]/g, ''),
5422
5449
  armyIdFlg,
5450
+ initiateBankruptcyFlg,
5423
5451
  };
5424
5452
  };
5425
5453
  const countIncomeAverage = (wages, retirementIncome) => (Number(wages ?? 0) + Number(retirementIncome ?? 0)).toString();
@@ -5515,10 +5543,10 @@
5515
5543
 
5516
5544
  const parseDraftTask = (task) => {
5517
5545
  const participant = task.participants[0];
5518
- const { classCard: cardCategory, codeWord, paymentSystemTypeCd: paymentSystem, currencyCode: currency, taskSource, } = task;
5546
+ const { classCard: cardCategory, codeWord, paymentSystemTypeCd: paymentSystem, currencyCode: currency, } = task;
5519
5547
  const { loanAmount: moneyValue, creditPeriod: monthsValue, paymentTypeCd } = task;
5520
5548
  const { birthDate: limitedBirthday, midname: middleName, name, surname, birthPlace, dulIssueDate: dulIssueDate, dulIssuedBy, dulNumber, dulSerie, dulSubdivisionCode, educationLevelCd: education, registrationDate: participantDateRegistration, houseTypeCd: housing, genderCd, participantContacts = [], participantAddresses = [], employmentContractDate: beginDate, employmentTypeCd: employment, organizationName, organizationInn: inn, organizationActivityTypeCd: employerActivities, organizationTypeCd: organization, organizationKindCd: employerOrganization, employeesNumberCd: amountWorkers, opf: legalForm, seniority: generalSeniority, generalSeniority: experience5Years, jobsNumber, lastWorkDuration: lastJobExperience, positionCd: positionOrganization, maritalStatusCd: familyStatus, childrenDependents: children, totalDependents: familyMembers, otherDependents: dependents, militaryStatusCd: conscription, participantIncomes, snils, armyIdFlg, bankruptcyFlg, shareholderFlg, nameLegalEntity: legalEntityName, creditInRshbCd, payrollCardRshbFlg: isInsurance, consentInsuranceFlg: isSalaryClient, incomeCertificateCd, profile, } = participant;
5521
- const taskFromDraft = {
5549
+ return {
5522
5550
  currency: currency?.key,
5523
5551
  paymentSystem: getSelectValue(paymentSystem),
5524
5552
  cardCategory: getSelectValue(cardCategory),
@@ -5575,7 +5603,6 @@
5575
5603
  ...getParticipantContacts(participantContacts),
5576
5604
  ...getParticipantGender(genderCd),
5577
5605
  };
5578
- return [taskFromDraft, taskSource === 'ReferalSF'];
5579
5606
  };
5580
5607
 
5581
5608
  const DraftDialog = JSX(function ({ task, isFromLead = false, isDebit = false, sendAspects = noop, onClose = noop, }) {
@@ -5595,13 +5622,12 @@
5595
5622
  };
5596
5623
  const { id: participantId, profile } = participants[0];
5597
5624
  const handleGoToDraft = useCallback(() => {
5598
- const [taskFromDraft, isTaskWithReferalCode] = parseDraftTask(task);
5625
+ const taskFromDraft = parseDraftTask(task);
5599
5626
  retailFormStore.participantId = participantId ?? null;
5600
5627
  retailFormStore.taskId = taskId;
5601
5628
  retailFormStore.profileId = profile?.id ?? null;
5602
5629
  retailFormStore.programId = programmId;
5603
5630
  retailFormStore.leadForm = taskFromDraft;
5604
- retailFormStore.referalData = { isTaskWithReferalCode };
5605
5631
  if (profile?.id) {
5606
5632
  sendAspects(profile.id, taskId);
5607
5633
  }
@@ -5654,10 +5680,9 @@
5654
5680
  };
5655
5681
 
5656
5682
  /* eslint-disable camelcase */
5657
- const getCreditLeadFormTaskData = ({ participantId, taskId, profileId, formData, isTaskWithReferalCode, }) => {
5683
+ const getCreditLeadFormTaskData = ({ participantId, taskId, profileId, formData, marketingInfo, }) => {
5658
5684
  const { name, surname, middleName, limitedBirthday, phone, email } = formData;
5659
- const navigator = locationNavigator();
5660
- const taskSource = isTaskWithReferalCode ? 'ReferalSF' : navigator.origin;
5685
+ const taskSource = getTaskSource(marketingInfo?.utm_source);
5661
5686
  return {
5662
5687
  sendToBank: true,
5663
5688
  taskKind: 'SHORT',
@@ -5684,14 +5709,13 @@
5684
5709
  },
5685
5710
  },
5686
5711
  ],
5687
- marketingInfo: getMarketingInfo(),
5712
+ marketingInfo,
5688
5713
  },
5689
5714
  };
5690
5715
  };
5691
- const getDebitLeadFormTaskData = (formData, programId, isTaskWithReferalCode) => {
5716
+ const getDebitLeadFormTaskData = (formData, programId, marketingInfo) => {
5692
5717
  const { name, surname, middleName, limitedBirthday, phone, email } = formData;
5693
- const navigator = locationNavigator();
5694
- const taskSource = isTaskWithReferalCode ? 'ReferalSF' : navigator.origin;
5718
+ const taskSource = getTaskSource(marketingInfo?.utm_source);
5695
5719
  return {
5696
5720
  task: {
5697
5721
  taskSource,
@@ -5710,18 +5734,24 @@
5710
5734
  }),
5711
5735
  },
5712
5736
  ],
5737
+ marketingInfo: {
5738
+ bannerId: marketingInfo?.bannerId,
5739
+ },
5713
5740
  },
5714
5741
  };
5715
5742
  };
5716
- const getMarketingInfo = () => {
5717
- const params = new URLSearchParams(decodeURIComponent(globalThis.location?.search));
5718
- return {
5719
- utm_campaign: params.get('utm_campaign'),
5720
- utm_medium: params.get('utm_medium'),
5721
- utm_source: params.get('utm_source'),
5722
- utm_content: params.get('utm_content'),
5723
- utm_term: params.get('utm_term'),
5724
- };
5743
+ const getTaskSource = (source) => {
5744
+ switch (source) {
5745
+ case 'referal_sf': {
5746
+ return 'ReferalSF';
5747
+ }
5748
+ case 'vse_svoe': {
5749
+ return 'vseSvoe';
5750
+ }
5751
+ default: {
5752
+ return globalThis.location.origin;
5753
+ }
5754
+ }
5725
5755
  };
5726
5756
 
5727
5757
  const useSaveUserData = () => {
@@ -5761,7 +5791,7 @@
5761
5791
  const [isSending, { setTrue: startSending, setFalse: endSending }] = useBool(false);
5762
5792
  const [ok, setOK] = useState();
5763
5793
  const saveUserData = useSaveUserData();
5764
- const leadFormStore = useLeadFormStore();
5794
+ const sessionStore = useSessionStore();
5765
5795
  const sendAspects = useSendLeadFormAspects({ data });
5766
5796
  const navigator = locationNavigator();
5767
5797
  const goToNextStep = useCallback(() => {
@@ -5777,7 +5807,8 @@
5777
5807
  const profileId = await createUserProfile({
5778
5808
  profile: { phone: formatPhone(transformedFormData.phone) },
5779
5809
  });
5780
- const referalData = leadFormStore.referalData;
5810
+ const referalData = sessionStore.referalData;
5811
+ const marketingInfo = sessionStore.marketingInfo;
5781
5812
  if (!profileId) {
5782
5813
  throw new Error();
5783
5814
  }
@@ -5788,6 +5819,7 @@
5788
5819
  formData: transformedFormData,
5789
5820
  productType,
5790
5821
  referalData,
5822
+ marketingInfo,
5791
5823
  saveUserData,
5792
5824
  sendAspects,
5793
5825
  });
@@ -5843,15 +5875,14 @@
5843
5875
  .filter((_) => formData[_])
5844
5876
  .map((_) => consents[_]?.text);
5845
5877
  };
5846
- const updateUserData = async ({ programId, profileId, formData, productType, referalData, saveUserData, sendAspects, }) => {
5878
+ const updateUserData = async ({ programId, profileId, formData, productType, referalData, marketingInfo, saveUserData, sendAspects, }) => {
5847
5879
  let taskId;
5848
5880
  let participantId;
5849
5881
  const transformedConsents = transformConsentsFields(formData, productType);
5850
- const isTaskWithReferalCode = referalData?.isTaskWithReferalCode;
5851
5882
  await updateUserProfile(getUpdateUserProfileData(profileId, formData, transformedConsents));
5852
5883
  try {
5853
5884
  if (productType === 'debitCard') {
5854
- const debitData = await createUserTaskDebit(getDebitLeadFormTaskData(formData, programId, isTaskWithReferalCode));
5885
+ const debitData = await createUserTaskDebit(getDebitLeadFormTaskData(formData, programId, marketingInfo));
5855
5886
  taskId = debitData.taskId;
5856
5887
  participantId = debitData.participantId;
5857
5888
  }
@@ -5867,10 +5898,10 @@
5867
5898
  taskId,
5868
5899
  profileId,
5869
5900
  formData,
5870
- isTaskWithReferalCode,
5901
+ marketingInfo,
5871
5902
  }));
5872
5903
  }
5873
- if (isTaskWithReferalCode) {
5904
+ if (referalData?.referalCode) {
5874
5905
  await saveReferalInfo({
5875
5906
  taskId,
5876
5907
  ...referalData,
@@ -5884,19 +5915,19 @@
5884
5915
  }
5885
5916
  };
5886
5917
  const transformConsentsFields = (formData, productType) => {
5887
- const { consentOthersFlg, consentPfrFlg, processPersonalDataFlg, consentInformFlg, consentProviderFlg, consentInformMaterialsFlg, consentPhotoFlg, consentFATCA, } = formData;
5918
+ const { consentOthersFlg, consentPfrFlg, processPersonalDataFlg, consentInformFlg, consentProviderFlg, consentInformMaterialsFlg, consentFATCA, } = formData;
5888
5919
  let consents;
5889
5920
  if (productType === 'credit') {
5890
5921
  consents = {
5891
- consentPhotoFlg: consentOthersFlg,
5892
5922
  consentPfrFlg: consentPfrFlg,
5893
5923
  consentInformMaterialsFlg: consentOthersFlg,
5924
+ consentPhotoFlg: false,
5894
5925
  };
5895
5926
  }
5896
5927
  else if (productType === 'creditCard') {
5897
5928
  consents = {
5898
5929
  consentInformMaterialsFlg,
5899
- consentPhotoFlg,
5930
+ consentPhotoFlg: false,
5900
5931
  };
5901
5932
  }
5902
5933
  else {
@@ -6138,10 +6169,11 @@
6138
6169
  return data.every(Boolean);
6139
6170
  };
6140
6171
 
6141
- /* eslint-disable max-lines-per-function */
6172
+ /* eslint-disable camelcase */
6142
6173
  const useInitApplicationLead = ({ inputs, productType, setEsiaStatus, esiaAuthSuccess, }) => {
6143
6174
  const leadFormStore = useLeadFormStore();
6144
6175
  const saveForm = useSetter(leadFormStore, 'leadForm');
6176
+ const sessionStore = useSessionStore();
6145
6177
  const queryFromStorage = globalThis.sessionStorage?.getItem(QUERY_STORAGE_KEY);
6146
6178
  const initialFormState = useMemo(() => getInitialFormState$1(inputs, leadFormStore.leadForm, esiaAuthSuccess), [inputs, leadFormStore.leadForm]);
6147
6179
  const requestEsiaProfile = useCallback(async (code, state) => {
@@ -6168,23 +6200,15 @@
6168
6200
  }, []);
6169
6201
  useEffect(() => {
6170
6202
  leadFormStore.productType = productType;
6171
- const { code, state, referalCode, refererCode, productId } = getLeadQueryParams(leadFormStore.referalData, queryFromStorage);
6203
+ const { code, state, referalCode, refererCode, productId, marketingInfo } = getLeadQueryParams(queryFromStorage, sessionStore);
6172
6204
  if (referalCode) {
6173
- leadFormStore.referalData = {
6205
+ sessionStore.referalData = {
6174
6206
  refererCode,
6175
6207
  referalCode,
6176
6208
  productId,
6177
- isTaskWithReferalCode: true,
6178
- };
6179
- }
6180
- else if (!code) {
6181
- leadFormStore.referalData = {
6182
- refererCode: null,
6183
- referalCode: null,
6184
- productId: null,
6185
- isTaskWithReferalCode: false,
6186
6209
  };
6187
6210
  }
6211
+ sessionStore.marketingInfo = marketingInfo;
6188
6212
  if (code && state) {
6189
6213
  requestEsiaProfile(code, state);
6190
6214
  }
@@ -6195,19 +6219,32 @@
6195
6219
  }, [queryFromStorage]);
6196
6220
  return initialFormState;
6197
6221
  };
6198
- const getLeadQueryParams = (referalData, queryFromStorage) => {
6222
+ const getLeadQueryParams = (queryFromStorage, sessionStore) => {
6223
+ const referalData = sessionStore.referalData;
6224
+ const marketingInfoFromStorage = sessionStore.marketingInfo;
6199
6225
  const queryStorage = new URLSearchParams(decodeURIComponent(queryFromStorage || ''));
6200
6226
  const code = queryStorage.get('code');
6201
6227
  const state = queryStorage.get('state');
6202
6228
  const referalCode = code ? referalData?.referalCode : queryStorage.get('referalCode');
6203
6229
  const refererCode = code ? referalData?.refererCode : queryStorage.get('refererCode');
6204
6230
  const productId = code ? referalData?.productId : queryStorage.get('productId');
6231
+ const marketingInfo = code
6232
+ ? marketingInfoFromStorage
6233
+ : {
6234
+ utm_campaign: queryStorage.get('utm_campaign'),
6235
+ utm_medium: queryStorage.get('utm_medium'),
6236
+ utm_source: queryStorage.get('utm_source'),
6237
+ utm_content: queryStorage.get('utm_content'),
6238
+ utm_term: queryStorage.get('utm_term'),
6239
+ bannerId: queryStorage.get('bannerId'),
6240
+ };
6205
6241
  return {
6206
6242
  code,
6207
6243
  state,
6208
6244
  referalCode,
6209
6245
  refererCode,
6210
6246
  productId,
6247
+ marketingInfo,
6211
6248
  };
6212
6249
  };
6213
6250
 
@@ -7347,12 +7384,6 @@
7347
7384
 
7348
7385
  const CurrencyInput = JSX((props) => (jsx(NumberInput, { ...props, fractionDigits: 2, children: jsx("div", { className: "absolute right-4 bottom-4", children: jsx(Text, { size: "text-xl", font: "font-light", children: "\u20BD" }) }) })));
7349
7386
 
7350
- const sessionStore = new Store(); // sessionStorage cache
7351
- replicate(sessionStore, new StorageAdapter(globalThis?.sessionStorage));
7352
- function useSessionStore() {
7353
- return useStore(sessionStore);
7354
- }
7355
-
7356
7387
  const paymentURLMap = {
7357
7388
  private: 'p2p/registerP2P',
7358
7389
  business: 'b2c/registerB2C',
@@ -7896,7 +7927,7 @@
7896
7927
  }
7897
7928
  };
7898
7929
 
7899
- const mainFormStateMap = [
7930
+ const getMainFormStateMap = (isCredit = false) => [
7900
7931
  {
7901
7932
  surname: '',
7902
7933
  name: '',
@@ -7951,8 +7982,9 @@
7951
7982
  wages: undefined,
7952
7983
  mandatoryPayments: undefined,
7953
7984
  snils: '',
7954
- armyIdFlg: false,
7985
+ armyIdFlg: isCredit ? undefined : false,
7955
7986
  esiaAccountTypeCd: { key: '', text: '' },
7987
+ initiateBankruptcyFlg: isCredit ? false : undefined,
7956
7988
  },
7957
7989
  {
7958
7990
  bankruptcyFlg: false,
@@ -7968,7 +8000,7 @@
7968
8000
  currency: '810',
7969
8001
  codeWord: '',
7970
8002
  },
7971
- ...mainFormStateMap,
8003
+ ...getMainFormStateMap(),
7972
8004
  {
7973
8005
  regionRetail: { key: '', text: '' },
7974
8006
  addressRetail: { key: '', text: '' },
@@ -8009,7 +8041,7 @@
8009
8041
  employmentTypeCd: employment,
8010
8042
  organizationName,
8011
8043
  organizationInn: inn,
8012
- organizationActivityTypeCd: employerActivities,
8044
+ organizationActivityTypeCd: employerActivities?.key ? employerActivities : undefined,
8013
8045
  organizationTypeCd: organization,
8014
8046
  organizationKindCd: employerOrganization,
8015
8047
  employeesNumberCd: amountWorkers,
@@ -8018,17 +8050,17 @@
8018
8050
  generalSeniority: experience5Years,
8019
8051
  jobsNumber,
8020
8052
  lastWorkDuration: lastJobExperience,
8021
- positionCd: positionOrganization,
8053
+ positionCd: positionOrganization?.key ? positionOrganization : undefined,
8022
8054
  participantContacts: getParticipantContacts$1({
8023
8055
  organizationPhone: organizationPhone && formatPhone(organizationPhone),
8024
8056
  }),
8025
8057
  participantAddresses: getParticipantAddresses$1({ organizationAddress }),
8026
- ownershipShare: positionOrganization?.key === 'BUSINESS_OWNER' ? partInBusiness : '',
8058
+ ownershipShare: positionOrganization?.key === 'BUSINESS_OWNER' ? partInBusiness : undefined,
8027
8059
  };
8028
8060
  };
8029
8061
 
8030
8062
  const getPersonalInfoData = (formData) => {
8031
- const { name, surname, middleName, limitedBirthday = '', phone = '', email, sex, birthPlace, dulIssueDate = '', dulIssuedBy, dulNumber, dulSerie, dulSubdivisionCode, education, participantDateRegistration = '', housing, addressRegistration, addressFact, addressMatch, } = formData;
8063
+ const { name, surname, middleName, limitedBirthday = '', phone = '', email, sex, birthPlace, dulIssueDate = '', dulIssuedBy, dulNumber, dulSerie, dulSubdivisionCode, education, participantDateRegistration, housing, addressRegistration, addressFact, addressMatch, } = formData;
8032
8064
  return {
8033
8065
  birthDate: formatDate(limitedBirthday, true),
8034
8066
  midname: middleName,
@@ -8041,7 +8073,9 @@
8041
8073
  dulSerie,
8042
8074
  dulSubdivisionCode,
8043
8075
  educationLevelCd: education,
8044
- registrationDate: formatDate(participantDateRegistration, true),
8076
+ registrationDate: participantDateRegistration
8077
+ ? formatDate(participantDateRegistration, true)
8078
+ : undefined,
8045
8079
  homeMatchFlg: addressMatch,
8046
8080
  houseTypeCd: housing,
8047
8081
  participantContacts: getParticipantContacts$1({
@@ -8097,36 +8131,31 @@
8097
8131
  : {};
8098
8132
  };
8099
8133
 
8100
- const getCreditCardFormTaskData = ({ participantId, taskId, profileId, formData, step = 0, isTaskWithReferalCode, }) => {
8101
- const navigator = locationNavigator();
8102
- const taskSource = isTaskWithReferalCode ? 'ReferalSF' : navigator.origin;
8103
- return {
8104
- sendToBank: true,
8105
- taskKind: 'UNITED',
8106
- task: {
8107
- taskSource,
8108
- id: taskId,
8109
- ...getOfficeCode$1(formData),
8110
- authorizedAgentId: formData?.bankEmployeeCode,
8111
- participants: [
8112
- {
8113
- id: participantId,
8114
- profile: {
8115
- id: profileId,
8116
- },
8117
- roleCd: {
8118
- key: 'BORROWER',
8119
- value: 'Заемщик',
8120
- },
8121
- ...getCurrentStepData$2(step, formData),
8134
+ const getCreditCardFormTaskData = ({ participantId, taskId, profileId, formData, step = 0, }) => ({
8135
+ sendToBank: true,
8136
+ taskKind: 'UNITED',
8137
+ task: {
8138
+ id: taskId,
8139
+ ...getOfficeCode$1(formData),
8140
+ authorizedAgentId: formData?.bankEmployeeCode,
8141
+ participants: [
8142
+ {
8143
+ id: participantId,
8144
+ profile: {
8145
+ id: profileId,
8122
8146
  },
8123
- ],
8124
- ...getCardOptionsData(formData),
8125
- ...getDeliveryData$1(formData),
8126
- files: formData?.files,
8127
- },
8128
- };
8129
- };
8147
+ roleCd: {
8148
+ key: 'BORROWER',
8149
+ value: 'Заемщик',
8150
+ },
8151
+ ...getCurrentStepData$2(step, formData),
8152
+ },
8153
+ ],
8154
+ ...getCardOptionsData(formData),
8155
+ ...getDeliveryData$1(formData),
8156
+ files: formData?.files,
8157
+ },
8158
+ });
8130
8159
  const getCurrentStepData$2 = (step, formData) => {
8131
8160
  switch (step) {
8132
8161
  case 0:
@@ -8167,7 +8196,6 @@
8167
8196
  const handleSubmit = useCallback(async (formData) => {
8168
8197
  startSending();
8169
8198
  retailFormStore.leadForm = formData;
8170
- const referalData = retailFormStore.referalData;
8171
8199
  try {
8172
8200
  const { taskId, profileId, participantId } = retailFormStore;
8173
8201
  if (taskId && profileId && participantId) {
@@ -8177,7 +8205,6 @@
8177
8205
  profileId,
8178
8206
  step,
8179
8207
  formData: formData,
8180
- isTaskWithReferalCode: referalData?.isTaskWithReferalCode,
8181
8208
  }));
8182
8209
  resetForm(response);
8183
8210
  }
@@ -8214,7 +8241,6 @@
8214
8241
  return (jsxs("form", { onSubmit: handleSubmit, className: "space-y-m", children: [renderStep$1({ sections, field, step }), jsx(StepsNavigationButtons$2, { isSending: isSending, step: step, onPrevStep: onPrevStep })] }));
8215
8242
  });
8216
8243
 
8217
- /* eslint-disable max-lines */
8218
8244
  const PERSONAL_DATA = [
8219
8245
  {
8220
8246
  title: 'Персональные данные',
@@ -8250,9 +8276,6 @@
8250
8276
  },
8251
8277
  ],
8252
8278
  },
8253
- ];
8254
- const PERSONAL_INFO_CONTENT = [
8255
- ...PERSONAL_DATA,
8256
8279
  {
8257
8280
  inputs: [
8258
8281
  {
@@ -8261,6 +8284,124 @@
8261
8284
  dadata: true,
8262
8285
  filledByEsia: true,
8263
8286
  },
8287
+ ],
8288
+ },
8289
+ ];
8290
+ const DELIVERY_CARD_CONTENT = [
8291
+ {
8292
+ title: 'Регион обслуживания карты',
8293
+ columns: 1,
8294
+ inputs: [],
8295
+ },
8296
+ {
8297
+ inputs: [
8298
+ {
8299
+ name: 'regionRetail',
8300
+ required: true,
8301
+ },
8302
+ ],
8303
+ },
8304
+ {
8305
+ title: 'Способ получения',
8306
+ columns: 1,
8307
+ inputs: [],
8308
+ condition: {
8309
+ name: 'regionHasDelivery',
8310
+ values: [true],
8311
+ },
8312
+ },
8313
+ {
8314
+ inputs: [
8315
+ {
8316
+ name: 'methodObtain',
8317
+ condition: {
8318
+ name: 'regionHasDelivery',
8319
+ values: [true],
8320
+ },
8321
+ },
8322
+ ],
8323
+ },
8324
+ {
8325
+ title: 'Выбор офиса',
8326
+ columns: 1,
8327
+ inputs: [],
8328
+ condition: {
8329
+ name: 'methodObtain',
8330
+ values: ['office'],
8331
+ },
8332
+ },
8333
+ {
8334
+ title: 'Адрес доставки',
8335
+ columns: 1,
8336
+ inputs: [],
8337
+ condition: {
8338
+ name: 'methodObtain',
8339
+ values: ['courier'],
8340
+ },
8341
+ },
8342
+ {
8343
+ inputs: [
8344
+ {
8345
+ name: 'addressCourier',
8346
+ dadata: true,
8347
+ condition: {
8348
+ name: 'methodObtain',
8349
+ values: ['courier'],
8350
+ },
8351
+ required: true,
8352
+ },
8353
+ ],
8354
+ },
8355
+ {
8356
+ columns: 2,
8357
+ inputs: [
8358
+ {
8359
+ name: 'deliveryDate',
8360
+ condition: {
8361
+ name: 'methodObtain',
8362
+ values: ['courier'],
8363
+ },
8364
+ required: true,
8365
+ },
8366
+ {
8367
+ name: 'deliveryTime',
8368
+ condition: {
8369
+ name: 'methodObtain',
8370
+ values: ['courier'],
8371
+ },
8372
+ },
8373
+ ],
8374
+ },
8375
+ {
8376
+ inputs: [
8377
+ {
8378
+ name: 'comment',
8379
+ condition: {
8380
+ name: 'methodObtain',
8381
+ values: ['courier'],
8382
+ },
8383
+ },
8384
+ ],
8385
+ },
8386
+ {
8387
+ inputs: [
8388
+ {
8389
+ name: 'addressRetail',
8390
+ required: true,
8391
+ condition: {
8392
+ name: 'methodObtain',
8393
+ values: ['office'],
8394
+ },
8395
+ },
8396
+ ],
8397
+ },
8398
+ ];
8399
+
8400
+ /* eslint-disable max-lines */
8401
+ const PERSONAL_INFO_CONTENT$1 = [
8402
+ ...PERSONAL_DATA,
8403
+ {
8404
+ inputs: [
8264
8405
  {
8265
8406
  name: 'education',
8266
8407
  required: true,
@@ -8299,7 +8440,7 @@
8299
8440
  inputs: [{ name: 'addressFact', required: true, dadata: true }],
8300
8441
  },
8301
8442
  ];
8302
- const EMPLOYMENT_CONTENT = [
8443
+ const EMPLOYMENT_CONTENT$1 = [
8303
8444
  {
8304
8445
  title: 'Данные о трудоустройстве',
8305
8446
  inputs: [],
@@ -8372,7 +8513,7 @@
8372
8513
  inputs: [{ name: 'organizationAddress', required: true, dadata: true }],
8373
8514
  },
8374
8515
  ];
8375
- const FAMILY_STATUS_AND_INCOME_CONTENT = [
8516
+ const FAMILY_STATUS_AND_INCOME_CONTENT$1 = [
8376
8517
  {
8377
8518
  title: 'Семейное положение',
8378
8519
  },
@@ -8459,41 +8600,6 @@
8459
8600
  inputs: [{ name: 'creditInRshbCd' }],
8460
8601
  },
8461
8602
  ];
8462
- const COMMON_RETAIL_CONTENT = [
8463
- PERSONAL_INFO_CONTENT,
8464
- EMPLOYMENT_CONTENT,
8465
- FAMILY_STATUS_AND_INCOME_CONTENT,
8466
- ADDITIONAL_CONTENT,
8467
- ];
8468
- const DELIVERY_CREDIT_CONTENT = [
8469
- {
8470
- title: 'Отделение Банка',
8471
- columns: 1,
8472
- inputs: [],
8473
- },
8474
- {
8475
- inputs: [{ name: 'regionRetail', required: true }],
8476
- },
8477
- {
8478
- inputs: [{ name: 'addressRetail', required: true }],
8479
- },
8480
- {
8481
- title: 'Код представителя Банка',
8482
- columns: 1,
8483
- inputs: [],
8484
- },
8485
- {
8486
- inputs: [
8487
- {
8488
- name: 'infoCard',
8489
- label: 'Если представитель Банка помогал Вам в заведении заявки, введите здесь его код',
8490
- },
8491
- ],
8492
- },
8493
- {
8494
- inputs: [{ name: 'bankEmployeeCode' }],
8495
- },
8496
- ];
8497
8603
  const CREDIT_CARD_CONTENT = [
8498
8604
  {
8499
8605
  title: 'Параметры карты',
@@ -8508,229 +8614,34 @@
8508
8614
  ],
8509
8615
  },
8510
8616
  ];
8511
- const CALCULATOR_CONTENT = [
8617
+ const DELIVERY_CREDIT_CARD_CONTENT = [
8618
+ ...DELIVERY_CARD_CONTENT,
8512
8619
  {
8513
- columns: 1,
8514
8620
  inputs: [
8515
8621
  {
8516
- name: 'calculator',
8622
+ name: 'infoCard',
8623
+ label: 'Если представитель Банка помогал Вам в заведении заявки, введите здесь его код',
8624
+ condition: {
8625
+ name: 'methodObtain',
8626
+ values: ['office'],
8627
+ },
8517
8628
  },
8518
- ],
8519
- },
8520
- ];
8521
- const DELIVERY_DEBIT_CARD_CONTENT = [
8522
- {
8523
- title: 'Регион обслуживания карты',
8524
- columns: 1,
8525
- inputs: [],
8526
- },
8527
- {
8528
- inputs: [
8529
8629
  {
8530
- name: 'regionRetail',
8531
- required: true,
8532
- },
8533
- ],
8534
- },
8535
- {
8536
- title: 'Способ получения',
8537
- columns: 1,
8538
- inputs: [],
8539
- condition: {
8540
- name: 'regionHasDelivery',
8541
- values: [true],
8542
- },
8543
- },
8544
- {
8545
- inputs: [
8546
- {
8547
- name: 'methodObtain',
8548
- condition: {
8549
- name: 'regionHasDelivery',
8550
- values: [true],
8551
- },
8552
- },
8553
- ],
8554
- },
8555
- {
8556
- title: 'Выбор офиса',
8557
- columns: 1,
8558
- inputs: [],
8559
- condition: {
8560
- name: 'methodObtain',
8561
- values: ['office'],
8562
- },
8563
- },
8564
- {
8565
- title: 'Адрес доставки',
8566
- columns: 1,
8567
- inputs: [],
8568
- condition: {
8569
- name: 'methodObtain',
8570
- values: ['courier'],
8571
- },
8572
- },
8573
- {
8574
- inputs: [
8575
- {
8576
- name: 'addressCourier',
8577
- dadata: true,
8578
- condition: {
8579
- name: 'methodObtain',
8580
- values: ['courier'],
8581
- },
8582
- required: true,
8583
- },
8584
- ],
8585
- },
8586
- {
8587
- columns: 2,
8588
- inputs: [
8589
- {
8590
- name: 'deliveryDate',
8591
- condition: {
8592
- name: 'methodObtain',
8593
- values: ['courier'],
8594
- },
8595
- required: true,
8596
- },
8597
- {
8598
- name: 'deliveryTime',
8599
- condition: {
8600
- name: 'methodObtain',
8601
- values: ['courier'],
8602
- },
8603
- },
8604
- ],
8605
- },
8606
- {
8607
- inputs: [
8608
- {
8609
- name: 'comment',
8610
- condition: {
8611
- name: 'methodObtain',
8612
- values: ['courier'],
8613
- },
8614
- },
8615
- ],
8616
- },
8617
- {
8618
- inputs: [
8619
- {
8620
- name: 'addressRetail',
8621
- required: true,
8622
- condition: {
8623
- name: 'methodObtain',
8624
- values: ['office'],
8625
- },
8630
+ name: 'bankEmployeeCode',
8631
+ condition: {
8632
+ name: 'methodObtain',
8633
+ values: ['office'],
8634
+ },
8626
8635
  },
8627
8636
  ],
8628
8637
  },
8629
8638
  ];
8630
- const DEBIT_PERSONAL_INFO_CONTENT = [
8631
- ...PERSONAL_DATA,
8632
- {
8633
- inputs: [
8634
- {
8635
- name: 'dulIssuedBy',
8636
- required: true,
8637
- dadata: true,
8638
- filledByEsia: true,
8639
- },
8640
- ],
8641
- },
8642
- {
8643
- title: 'Адрес регистрации по месту жительства',
8644
- columns: 1,
8645
- inputs: [],
8646
- },
8647
- {
8648
- inputs: [
8649
- {
8650
- name: 'addressRegistration',
8651
- required: true,
8652
- dadata: true,
8653
- filledByEsia: true,
8654
- },
8655
- { name: 'addressMatch' },
8656
- ],
8657
- },
8658
- {
8659
- title: 'Адрес фактического проживания (место пребывания РФ)',
8660
- inputs: [],
8661
- },
8662
- {
8663
- inputs: [{ name: 'addressFact', required: true, dadata: true }],
8664
- },
8665
- ];
8666
- const DEBIT_CARD_CONTENT = [
8667
- {
8668
- title: 'Параметры карты',
8669
- inputs: [],
8670
- },
8671
- {
8672
- inputs: [
8673
- { name: 'currency', required: true },
8674
- { name: 'paymentSystem', required: true },
8675
- { name: 'cardCategory', required: true },
8676
- ],
8677
- },
8678
- {
8679
- title: 'Отображение на карте',
8680
- inputs: [],
8681
- },
8682
- {
8683
- columns: 2,
8684
- inputs: [{ name: 'latinName' }, { name: 'latinSurname', required: true }],
8685
- },
8686
- {
8687
- inputs: [
8688
- {
8689
- name: 'infoCard',
8690
- label: 'Проверьте корректность заполненных полей, при необходимости внесите изменения.',
8691
- },
8692
- ],
8693
- },
8694
- {
8695
- inputs: [
8696
- {
8697
- name: 'infoCard',
8698
- label:
8699
- // eslint-disable-next-line max-len
8700
- 'Количество символов ограничивается 20. При этом, если фамилия и имя на карте содержит более 21 символа, то необходимо сократить имя и указывать на карте только первую букву имени и фамилию, если при таком сокращении фамилия и имя не умещается в количество символов – 20, то указывать только фамилию.',
8701
- },
8702
- ],
8703
- },
8704
- {
8705
- inputs: [{ name: 'codeWord', required: true }],
8706
- },
8707
- ];
8708
- const DELIVERY_CREDIT_CARD_CONTENT = [
8709
- ...DELIVERY_DEBIT_CARD_CONTENT,
8710
- {
8711
- inputs: [
8712
- {
8713
- name: 'infoCard',
8714
- label: 'Если представитель Банка помогал Вам в заведении заявки, введите здесь его код',
8715
- condition: {
8716
- name: 'methodObtain',
8717
- values: ['office'],
8718
- },
8719
- },
8720
- {
8721
- name: 'bankEmployeeCode',
8722
- condition: {
8723
- name: 'methodObtain',
8724
- values: ['office'],
8725
- },
8726
- },
8727
- ],
8728
- },
8729
- ];
8730
-
8731
8639
  const stepsSectionsMap$2 = [
8732
8640
  CREDIT_CARD_CONTENT,
8733
- ...COMMON_RETAIL_CONTENT,
8641
+ PERSONAL_INFO_CONTENT$1,
8642
+ EMPLOYMENT_CONTENT$1,
8643
+ FAMILY_STATUS_AND_INCOME_CONTENT$1,
8644
+ ADDITIONAL_CONTENT,
8734
8645
  DELIVERY_CREDIT_CARD_CONTENT,
8735
8646
  ];
8736
8647
 
@@ -8912,38 +8823,33 @@
8912
8823
  };
8913
8824
  };
8914
8825
 
8915
- const getCreditFormTaskData = ({ participantId, taskId, profileId, formData, step = 0, isTaskWithReferalCode, }) => {
8916
- const navigator = locationNavigator();
8917
- const taskSource = isTaskWithReferalCode ? 'ReferalSF' : navigator.origin;
8918
- return {
8919
- sendToBank: true,
8920
- taskKind: 'UNITED',
8921
- task: {
8922
- taskSource,
8923
- id: taskId,
8924
- authorizedAgentId: formData?.bankEmployeeCode,
8925
- participants: [
8926
- {
8927
- id: participantId,
8928
- profile: {
8929
- id: profileId,
8930
- },
8931
- roleCd: {
8932
- key: 'BORROWER',
8933
- value: 'Заемщик',
8934
- },
8935
- ...getCurrentStepData$1(step, formData),
8826
+ const getCreditFormTaskData = ({ participantId, taskId, profileId, formData, step = 0, }) => ({
8827
+ sendToBank: true,
8828
+ taskKind: 'UNITED',
8829
+ task: {
8830
+ id: taskId,
8831
+ authorizedAgentId: formData?.bankEmployeeCode,
8832
+ participants: [
8833
+ {
8834
+ id: participantId,
8835
+ profile: {
8836
+ id: profileId,
8936
8837
  },
8937
- ],
8938
- ...getCalcData(formData),
8939
- ...getDeliveryCreditData(formData),
8940
- esiaAccountTypeCd: {
8941
- key: formData?.esiaAccountTypeCd?.key,
8838
+ roleCd: {
8839
+ key: 'BORROWER',
8840
+ value: 'Заемщик',
8841
+ },
8842
+ ...getCurrentStepData$1(step, formData),
8942
8843
  },
8943
- files: formData?.files,
8844
+ ],
8845
+ ...getCalcData(formData),
8846
+ ...getDeliveryCreditData(formData),
8847
+ esiaAccountTypeCd: {
8848
+ key: formData?.esiaAccountTypeCd?.key,
8944
8849
  },
8945
- };
8946
- };
8850
+ files: formData?.files,
8851
+ },
8852
+ });
8947
8853
  const getCurrentStepData$1 = (step, formData) => {
8948
8854
  switch (step) {
8949
8855
  case 0:
@@ -8954,8 +8860,6 @@
8954
8860
  return getEmploymentData(formData);
8955
8861
  case 3:
8956
8862
  return getFamilyStatusAndIncomeData(formData);
8957
- case 4:
8958
- return getAdditionalInfoData(formData);
8959
8863
  default:
8960
8864
  return {};
8961
8865
  }
@@ -8975,7 +8879,7 @@
8975
8879
  isStateEmployee: false,
8976
8880
  },
8977
8881
  },
8978
- ...mainFormStateMap,
8882
+ ...getMainFormStateMap(true),
8979
8883
  {
8980
8884
  regionRetail: { key: '', text: '' },
8981
8885
  addressRetail: undefined,
@@ -8985,7 +8889,7 @@
8985
8889
 
8986
8890
  const useCreditFormAPI = ({ step, onNextStep, onFinish, }) => {
8987
8891
  const [isSending, { setTrue: startSending, setFalse: endSending }] = useBool(false);
8988
- const isFinalStep = step === 5;
8892
+ const isFinalStep = step === 4;
8989
8893
  const retailFormStore = useRetailFormStore();
8990
8894
  const initialState = useMemo(() => getInitialFormState(step, retailFormStore.leadForm, formStateMap$1), [step, retailFormStore.leadForm]);
8991
8895
  const resetForm = useCallback((response) => {
@@ -9008,7 +8912,6 @@
9008
8912
  const handleSubmit = useCallback(async (formData) => {
9009
8913
  startSending();
9010
8914
  retailFormStore.leadForm = formData;
9011
- const referalData = retailFormStore.referalData;
9012
8915
  try {
9013
8916
  const { taskId, profileId, participantId } = retailFormStore;
9014
8917
  if (taskId && profileId && participantId) {
@@ -9018,7 +8921,6 @@
9018
8921
  profileId,
9019
8922
  step,
9020
8923
  formData: formData,
9021
- isTaskWithReferalCode: referalData?.isTaskWithReferalCode,
9022
8924
  }));
9023
8925
  resetForm(response);
9024
8926
  }
@@ -9057,19 +8959,207 @@
9057
8959
  return (jsxs("form", { onSubmit: handleSubmit, className: "space-y-m", children: [renderStep$1({ sections, field, step, params: { calcData } }), jsx(StepsNavigationButtons$1, { step: step, isSending: isSending, onPrevStep: onPrevStep })] }));
9058
8960
  });
9059
8961
 
8962
+ /* eslint-disable max-lines */
8963
+ const PERSONAL_INFO_CONTENT = [
8964
+ ...PERSONAL_DATA,
8965
+ {
8966
+ title: 'Адрес регистрации по месту жительства',
8967
+ columns: 1,
8968
+ inputs: [],
8969
+ },
8970
+ {
8971
+ inputs: [
8972
+ {
8973
+ name: 'addressRegistration',
8974
+ required: true,
8975
+ dadata: true,
8976
+ filledByEsia: true,
8977
+ },
8978
+ { name: 'addressMatch' },
8979
+ ],
8980
+ },
8981
+ {
8982
+ title: 'Адрес фактического проживания (место пребывания РФ)',
8983
+ inputs: [],
8984
+ },
8985
+ {
8986
+ inputs: [{ name: 'addressFact', required: true, dadata: true }],
8987
+ },
8988
+ ];
8989
+ const EMPLOYMENT_CONTENT = [
8990
+ {
8991
+ title: 'Данные о трудоустройстве',
8992
+ inputs: [],
8993
+ },
8994
+ {
8995
+ inputs: [
8996
+ {
8997
+ name: 'infoCard',
8998
+ label: 'Клиент на момент оформления заявки на кредит должен быть: официально трудоустроен более 6 месяцев, ' +
8999
+ 'если Клиент получает з/п на счет РСХБ, то трудоустроен более 3 месяцев, не должен находиться в декретном отпуске',
9000
+ },
9001
+ ],
9002
+ },
9003
+ {
9004
+ inputs: [
9005
+ { name: 'employment', required: true },
9006
+ { name: 'organizationName', required: true, dadata: true, filledByEsia: true },
9007
+ ],
9008
+ },
9009
+ {
9010
+ columns: 2,
9011
+ inputs: [
9012
+ { name: 'inn', required: true, dadata: true, filledByEsia: true },
9013
+ { name: 'legalForm', required: true },
9014
+ ],
9015
+ },
9016
+ {
9017
+ inputs: [
9018
+ { name: 'organization', required: true },
9019
+ { name: 'amountWorkers', required: true },
9020
+ ],
9021
+ },
9022
+ {
9023
+ columns: 2,
9024
+ inputs: [
9025
+ { name: 'employerOrganization', required: true },
9026
+ { name: 'jobsNumber', required: true, filledByEsia: true },
9027
+ ],
9028
+ },
9029
+ {
9030
+ inputs: [
9031
+ {
9032
+ name: 'organizationPhone',
9033
+ label: 'Телефон работодателя',
9034
+ required: true,
9035
+ },
9036
+ { name: 'beginDate', required: true, filledByEsia: true },
9037
+ ],
9038
+ },
9039
+ {
9040
+ title: 'Адрес работодателя',
9041
+ inputs: [],
9042
+ },
9043
+ {
9044
+ inputs: [{ name: 'organizationAddress', required: true, dadata: true }],
9045
+ },
9046
+ ];
9047
+ const FAMILY_STATUS_AND_INCOME_CONTENT = [
9048
+ {
9049
+ title: 'Семейное положение',
9050
+ },
9051
+ {
9052
+ columns: 1,
9053
+ inputs: [{ name: 'familyStatus', required: true }],
9054
+ },
9055
+ {
9056
+ columns: 2,
9057
+ inputs: [
9058
+ { name: 'children', required: true },
9059
+ { name: 'dependents', required: true },
9060
+ ],
9061
+ },
9062
+ {
9063
+ title: 'Совокупный доход',
9064
+ },
9065
+ {
9066
+ columns: 1,
9067
+ inputs: [
9068
+ {
9069
+ name: 'confirmationIncome',
9070
+ required: true,
9071
+ filledByEsia: true,
9072
+ },
9073
+ ],
9074
+ },
9075
+ {
9076
+ inputs: [
9077
+ {
9078
+ name: 'infoCard',
9079
+ label: 'Сумма основного и дополнительных доходов после вычета налога',
9080
+ },
9081
+ ],
9082
+ },
9083
+ {
9084
+ columns: 1,
9085
+ inputs: [{ name: 'wages', required: true, filledByEsia: true }],
9086
+ },
9087
+ {
9088
+ columns: 1,
9089
+ inputs: [
9090
+ {
9091
+ name: 'retirementIncome',
9092
+ required: true,
9093
+ condition: { name: 'employment', values: ['RETIREE'] },
9094
+ },
9095
+ ],
9096
+ },
9097
+ {
9098
+ columns: 1,
9099
+ inputs: [{ name: 'mandatoryPayments', required: true }],
9100
+ },
9101
+ {
9102
+ columns: 1,
9103
+ inputs: [{ name: 'snils', required: true }],
9104
+ },
9105
+ {
9106
+ columns: 1,
9107
+ inputs: [{ name: 'initiateBankruptcyFlg' }],
9108
+ },
9109
+ ];
9110
+ const DELIVERY_CREDIT_CONTENT = [
9111
+ {
9112
+ title: 'Отделение Банка',
9113
+ columns: 1,
9114
+ inputs: [],
9115
+ },
9116
+ {
9117
+ inputs: [{ name: 'regionRetail', required: true }],
9118
+ },
9119
+ {
9120
+ inputs: [{ name: 'addressRetail', required: true }],
9121
+ },
9122
+ {
9123
+ title: 'Код представителя Банка',
9124
+ columns: 1,
9125
+ inputs: [],
9126
+ },
9127
+ {
9128
+ inputs: [
9129
+ {
9130
+ name: 'infoCard',
9131
+ label: 'Если представитель Банка помогал Вам в заведении заявки, введите здесь его код',
9132
+ },
9133
+ ],
9134
+ },
9135
+ {
9136
+ inputs: [{ name: 'bankEmployeeCode' }],
9137
+ },
9138
+ ];
9139
+ const CALCULATOR_CONTENT = [
9140
+ {
9141
+ columns: 1,
9142
+ inputs: [
9143
+ {
9144
+ name: 'calculator',
9145
+ },
9146
+ ],
9147
+ },
9148
+ ];
9060
9149
  const stepsSectionsMap$1 = [
9061
9150
  CALCULATOR_CONTENT,
9062
- ...COMMON_RETAIL_CONTENT,
9151
+ PERSONAL_INFO_CONTENT,
9152
+ EMPLOYMENT_CONTENT,
9153
+ FAMILY_STATUS_AND_INCOME_CONTENT,
9063
9154
  DELIVERY_CREDIT_CONTENT,
9064
9155
  ];
9065
9156
 
9066
- const STEPS$1 = 5;
9157
+ const STEPS$1 = 4;
9067
9158
  const STEP_TITLES$1 = [
9068
9159
  '',
9069
9160
  'Персональные данные',
9070
9161
  'Данные о трудоустройстве',
9071
9162
  'Семейное положение и доход',
9072
- 'Дополнительные сведения',
9073
9163
  'Отделение Банка',
9074
9164
  ];
9075
9165
  const CreditForm = UniBlock(({ className, programsSource, ...rest }) => {
@@ -9276,28 +9366,23 @@
9276
9366
  };
9277
9367
  };
9278
9368
 
9279
- const getDebitCardFormTaskData = ({ participantId, taskId, formData, programId, step = 0, isTaskWithReferalCode, }) => {
9280
- const navigator = locationNavigator();
9281
- const taskSource = isTaskWithReferalCode ? 'ReferalSF' : navigator.origin;
9282
- return {
9283
- task: {
9284
- taskSource,
9285
- id: taskId,
9286
- creditProgram: {
9287
- code: debitProgrammIdToCardCodesMap[programId],
9288
- },
9289
- ...getOfficeCode(formData),
9290
- participants: [
9291
- {
9292
- id: participantId,
9293
- ...getCurrentStepData(step, formData),
9294
- },
9295
- ],
9296
- ...getCardOptionsData(formData),
9297
- ...getDeliveryData(formData),
9369
+ const getDebitCardFormTaskData = ({ participantId, taskId, formData, programId, step = 0, }) => ({
9370
+ task: {
9371
+ id: taskId,
9372
+ creditProgram: {
9373
+ code: debitProgrammIdToCardCodesMap[programId],
9298
9374
  },
9299
- };
9300
- };
9375
+ ...getOfficeCode(formData),
9376
+ participants: [
9377
+ {
9378
+ id: participantId,
9379
+ ...getCurrentStepData(step, formData),
9380
+ },
9381
+ ],
9382
+ ...getCardOptionsData(formData),
9383
+ ...getDeliveryData(formData),
9384
+ },
9385
+ });
9301
9386
  const getCurrentStepData = (step, formData) => {
9302
9387
  switch (step) {
9303
9388
  case 0:
@@ -9326,7 +9411,6 @@
9326
9411
  const handleSubmit = useCallback(async (formData) => {
9327
9412
  startSending();
9328
9413
  retailFormStore.leadForm = formData;
9329
- const referalData = retailFormStore.referalData;
9330
9414
  try {
9331
9415
  const { taskId, participantId, programId } = retailFormStore;
9332
9416
  if (taskId && participantId && programId) {
@@ -9336,7 +9420,6 @@
9336
9420
  programId,
9337
9421
  step,
9338
9422
  formData: formData,
9339
- isTaskWithReferalCode: referalData?.isTaskWithReferalCode,
9340
9423
  }));
9341
9424
  }
9342
9425
  if (isFinalStep || formData.methodObtain === 'courier') {
@@ -9378,8 +9461,76 @@
9378
9461
  return (jsxs("form", { onSubmit: handleSubmit, className: "space-y-m", children: [renderStep$1({ sections, field, step }), jsx(StepsNavigationButtons, { step: step, isSending: isSending, onPrevStep: onPrevStep })] }));
9379
9462
  });
9380
9463
 
9464
+ const DEBIT_PERSONAL_INFO_CONTENT = [
9465
+ ...PERSONAL_DATA,
9466
+ {
9467
+ title: 'Адрес регистрации по месту жительства',
9468
+ columns: 1,
9469
+ inputs: [],
9470
+ },
9471
+ {
9472
+ inputs: [
9473
+ {
9474
+ name: 'addressRegistration',
9475
+ required: true,
9476
+ dadata: true,
9477
+ filledByEsia: true,
9478
+ },
9479
+ { name: 'addressMatch' },
9480
+ ],
9481
+ },
9482
+ {
9483
+ title: 'Адрес фактического проживания (место пребывания РФ)',
9484
+ inputs: [],
9485
+ },
9486
+ {
9487
+ inputs: [{ name: 'addressFact', required: true, dadata: true }],
9488
+ },
9489
+ ];
9490
+ const DEBIT_CARD_CONTENT = [
9491
+ {
9492
+ title: 'Параметры карты',
9493
+ inputs: [],
9494
+ },
9495
+ {
9496
+ inputs: [
9497
+ { name: 'currency', required: true },
9498
+ { name: 'paymentSystem', required: true },
9499
+ { name: 'cardCategory', required: true },
9500
+ ],
9501
+ },
9502
+ {
9503
+ title: 'Отображение на карте',
9504
+ inputs: [],
9505
+ },
9506
+ {
9507
+ columns: 2,
9508
+ inputs: [{ name: 'latinName' }, { name: 'latinSurname', required: true }],
9509
+ },
9510
+ {
9511
+ inputs: [
9512
+ {
9513
+ name: 'infoCard',
9514
+ label: 'Проверьте корректность заполненных полей, при необходимости внесите изменения.',
9515
+ },
9516
+ ],
9517
+ },
9518
+ {
9519
+ inputs: [
9520
+ {
9521
+ name: 'infoCard',
9522
+ label:
9523
+ // eslint-disable-next-line max-len
9524
+ 'Количество символов ограничивается 20. При этом, если фамилия и имя на карте содержит более 21 символа, то необходимо сократить имя и указывать на карте только первую букву имени и фамилию, если при таком сокращении фамилия и имя не умещается в количество символов – 20, то указывать только фамилию.',
9525
+ },
9526
+ ],
9527
+ },
9528
+ {
9529
+ inputs: [{ name: 'codeWord', required: true }],
9530
+ },
9531
+ ];
9381
9532
  const stepsSectionsMap = [
9382
- DELIVERY_DEBIT_CARD_CONTENT,
9533
+ DELIVERY_CARD_CONTENT,
9383
9534
  DEBIT_PERSONAL_INFO_CONTENT,
9384
9535
  DEBIT_CARD_CONTENT,
9385
9536
  ];
@@ -10996,7 +11147,7 @@
10996
11147
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
10997
11148
  });
10998
11149
 
10999
- const packageVersion = "0.14.864";
11150
+ const packageVersion = "0.14.866";
11000
11151
 
11001
11152
  exports.Blocks = Blocks;
11002
11153
  exports.ContentPage = ContentPage;