@redneckz/wildless-cms-uni-blocks 0.14.154 → 0.14.155

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 (437) hide show
  1. package/bundle/api/LeadServiceAPI.d.ts +10 -1
  2. package/bundle/blocks.schema.json +1 -1
  3. package/bundle/bundle.umd.js +131 -220
  4. package/bundle/bundle.umd.min.js +1 -1
  5. package/bundle/components/ApplicationForm/AddressBranchField.d.ts +2 -1
  6. package/bundle/components/ApplicationForm/ApplicationFormAcquiring.d.ts +1 -0
  7. package/bundle/components/ApplicationForm/ApplicationFormAntiFraud.d.ts +1 -1
  8. package/bundle/components/ApplicationForm/ApplicationFormBusinessCard.d.ts +2 -1
  9. package/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +0 -1
  10. package/bundle/components/ApplicationForm/ApplicationFormCorruption.d.ts +2 -2
  11. package/bundle/components/ApplicationForm/ApplicationFormCredit.d.ts +3 -2
  12. package/bundle/components/ApplicationForm/ApplicationFormFeedback.d.ts +1 -1
  13. package/bundle/components/ApplicationForm/ApplicationFormSelfCollection.d.ts +2 -2
  14. package/bundle/components/ApplicationForm/ApplicationFormWed.d.ts +6 -5
  15. package/bundle/components/ApplicationForm/DatePickerControl.d.ts +1 -0
  16. package/bundle/components/ApplicationForm/RegionPremiumField.d.ts +6 -0
  17. package/bundle/components/ApplicationForm/SelectControl.d.ts +2 -0
  18. package/bundle/components/ApplicationForm/renderWedDataOrganization.d.ts +1 -4
  19. package/bundle/hooks/useForm.d.ts +4 -1
  20. package/bundle/hooks/usePremiumBranchesByRegions.d.ts +1 -0
  21. package/bundle/ui-kit/Input/InputProps.d.ts +1 -0
  22. package/dist/api/LeadServiceAPI.d.ts +10 -1
  23. package/dist/api/LeadServiceAPI.js +23 -1
  24. package/dist/api/LeadServiceAPI.js.map +1 -1
  25. package/dist/components/ApplicationForm/AddressBranchField.d.ts +2 -1
  26. package/dist/components/ApplicationForm/AddressBranchField.js +7 -4
  27. package/dist/components/ApplicationForm/AddressBranchField.js.map +1 -1
  28. package/dist/components/ApplicationForm/ApplicationForm.js +3 -1
  29. package/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
  30. package/dist/components/ApplicationForm/ApplicationFormAcquiring.d.ts +1 -0
  31. package/dist/components/ApplicationForm/ApplicationFormAcquiring.js +6 -11
  32. package/dist/components/ApplicationForm/ApplicationFormAcquiring.js.map +1 -1
  33. package/dist/components/ApplicationForm/ApplicationFormAntiFraud.d.ts +1 -1
  34. package/dist/components/ApplicationForm/ApplicationFormAntiFraud.js +3 -11
  35. package/dist/components/ApplicationForm/ApplicationFormAntiFraud.js.map +1 -1
  36. package/dist/components/ApplicationForm/ApplicationFormBusinessCard.d.ts +2 -1
  37. package/dist/components/ApplicationForm/ApplicationFormBusinessCard.js +10 -16
  38. package/dist/components/ApplicationForm/ApplicationFormBusinessCard.js.map +1 -1
  39. package/dist/components/ApplicationForm/ApplicationFormContent.d.ts +0 -1
  40. package/dist/components/ApplicationForm/ApplicationFormCorruption.d.ts +2 -2
  41. package/dist/components/ApplicationForm/ApplicationFormCorruption.js +4 -12
  42. package/dist/components/ApplicationForm/ApplicationFormCorruption.js.map +1 -1
  43. package/dist/components/ApplicationForm/ApplicationFormCredit.d.ts +3 -2
  44. package/dist/components/ApplicationForm/ApplicationFormCredit.js +10 -21
  45. package/dist/components/ApplicationForm/ApplicationFormCredit.js.map +1 -1
  46. package/dist/components/ApplicationForm/ApplicationFormDeposit.js +6 -9
  47. package/dist/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
  48. package/dist/components/ApplicationForm/ApplicationFormFeedback.d.ts +1 -1
  49. package/dist/components/ApplicationForm/ApplicationFormFeedback.js +7 -7
  50. package/dist/components/ApplicationForm/ApplicationFormFeedback.js.map +1 -1
  51. package/dist/components/ApplicationForm/ApplicationFormIndividuals.js +6 -14
  52. package/dist/components/ApplicationForm/ApplicationFormIndividuals.js.map +1 -1
  53. package/dist/components/ApplicationForm/ApplicationFormSelfCollection.d.ts +2 -2
  54. package/dist/components/ApplicationForm/ApplicationFormSelfCollection.js +5 -15
  55. package/dist/components/ApplicationForm/ApplicationFormSelfCollection.js.map +1 -1
  56. package/dist/components/ApplicationForm/ApplicationFormUltraPremium.js +6 -27
  57. package/dist/components/ApplicationForm/ApplicationFormUltraPremium.js.map +1 -1
  58. package/dist/components/ApplicationForm/ApplicationFormWed.d.ts +6 -5
  59. package/dist/components/ApplicationForm/ApplicationFormWed.js +12 -20
  60. package/dist/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
  61. package/dist/components/ApplicationForm/DatePickerControl.d.ts +1 -0
  62. package/dist/components/ApplicationForm/DatePickerControl.js +1 -1
  63. package/dist/components/ApplicationForm/DatePickerControl.js.map +1 -1
  64. package/dist/components/ApplicationForm/InputControl.js +1 -1
  65. package/dist/components/ApplicationForm/InputControl.js.map +1 -1
  66. package/dist/components/ApplicationForm/PhoneInputControl.js +1 -1
  67. package/dist/components/ApplicationForm/PhoneInputControl.js.map +1 -1
  68. package/dist/components/ApplicationForm/RegionPremiumField.d.ts +6 -0
  69. package/dist/components/ApplicationForm/RegionPremiumField.js +17 -0
  70. package/dist/components/ApplicationForm/RegionPremiumField.js.map +1 -0
  71. package/dist/components/ApplicationForm/SelectControl.d.ts +2 -0
  72. package/dist/components/ApplicationForm/SelectControl.js +1 -1
  73. package/dist/components/ApplicationForm/SelectControl.js.map +1 -1
  74. package/dist/components/ApplicationForm/handleSubmit.js +3 -51
  75. package/dist/components/ApplicationForm/handleSubmit.js.map +1 -1
  76. package/dist/components/ApplicationForm/renderAcquiringDataOrganization.js +1 -1
  77. package/dist/components/ApplicationForm/renderAcquiringDataOrganization.js.map +1 -1
  78. package/dist/components/ApplicationForm/renderCreditDataOrganization.js +1 -1
  79. package/dist/components/ApplicationForm/renderCreditDataOrganization.js.map +1 -1
  80. package/dist/components/ApplicationForm/renderUserData.js +1 -1
  81. package/dist/components/ApplicationForm/renderUserData.js.map +1 -1
  82. package/dist/components/ApplicationForm/renderWedDataOrganization.d.ts +1 -4
  83. package/dist/components/ApplicationForm/renderWedDataOrganization.js +3 -3
  84. package/dist/components/ApplicationForm/renderWedDataOrganization.js.map +1 -1
  85. package/dist/hooks/useForm.d.ts +4 -1
  86. package/dist/hooks/useForm.js +2 -2
  87. package/dist/hooks/useForm.js.map +1 -1
  88. package/dist/hooks/usePremiumBranchesByRegions.d.ts +1 -0
  89. package/dist/hooks/usePremiumBranchesByRegions.js.map +1 -1
  90. package/dist/ui-kit/Input/InputProps.d.ts +1 -0
  91. package/dist/utils/formatPhone.js +1 -1
  92. package/dist/utils/formatPhone.js.map +1 -1
  93. package/lib/api/LeadServiceAPI.d.ts +10 -1
  94. package/lib/api/LeadServiceAPI.js +23 -1
  95. package/lib/api/LeadServiceAPI.js.map +1 -1
  96. package/lib/common.css +1 -1
  97. package/lib/components/ApplicationForm/AddressBranchField.d.ts +2 -1
  98. package/lib/components/ApplicationForm/AddressBranchField.js +7 -4
  99. package/lib/components/ApplicationForm/AddressBranchField.js.map +1 -1
  100. package/lib/components/ApplicationForm/ApplicationForm.js +3 -1
  101. package/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
  102. package/lib/components/ApplicationForm/ApplicationFormAcquiring.d.ts +1 -0
  103. package/lib/components/ApplicationForm/ApplicationFormAcquiring.js +6 -11
  104. package/lib/components/ApplicationForm/ApplicationFormAcquiring.js.map +1 -1
  105. package/lib/components/ApplicationForm/ApplicationFormAntiFraud.d.ts +1 -1
  106. package/lib/components/ApplicationForm/ApplicationFormAntiFraud.js +3 -11
  107. package/lib/components/ApplicationForm/ApplicationFormAntiFraud.js.map +1 -1
  108. package/lib/components/ApplicationForm/ApplicationFormBusinessCard.d.ts +2 -1
  109. package/lib/components/ApplicationForm/ApplicationFormBusinessCard.js +10 -16
  110. package/lib/components/ApplicationForm/ApplicationFormBusinessCard.js.map +1 -1
  111. package/lib/components/ApplicationForm/ApplicationFormContent.d.ts +0 -1
  112. package/lib/components/ApplicationForm/ApplicationFormCorruption.d.ts +2 -2
  113. package/lib/components/ApplicationForm/ApplicationFormCorruption.js +4 -12
  114. package/lib/components/ApplicationForm/ApplicationFormCorruption.js.map +1 -1
  115. package/lib/components/ApplicationForm/ApplicationFormCredit.d.ts +3 -2
  116. package/lib/components/ApplicationForm/ApplicationFormCredit.js +10 -21
  117. package/lib/components/ApplicationForm/ApplicationFormCredit.js.map +1 -1
  118. package/lib/components/ApplicationForm/ApplicationFormDeposit.js +6 -9
  119. package/lib/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
  120. package/lib/components/ApplicationForm/ApplicationFormFeedback.d.ts +1 -1
  121. package/lib/components/ApplicationForm/ApplicationFormFeedback.js +7 -7
  122. package/lib/components/ApplicationForm/ApplicationFormFeedback.js.map +1 -1
  123. package/lib/components/ApplicationForm/ApplicationFormIndividuals.js +7 -15
  124. package/lib/components/ApplicationForm/ApplicationFormIndividuals.js.map +1 -1
  125. package/lib/components/ApplicationForm/ApplicationFormSelfCollection.d.ts +2 -2
  126. package/lib/components/ApplicationForm/ApplicationFormSelfCollection.js +5 -15
  127. package/lib/components/ApplicationForm/ApplicationFormSelfCollection.js.map +1 -1
  128. package/lib/components/ApplicationForm/ApplicationFormUltraPremium.js +6 -27
  129. package/lib/components/ApplicationForm/ApplicationFormUltraPremium.js.map +1 -1
  130. package/lib/components/ApplicationForm/ApplicationFormWed.d.ts +6 -5
  131. package/lib/components/ApplicationForm/ApplicationFormWed.js +12 -20
  132. package/lib/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
  133. package/lib/components/ApplicationForm/DatePickerControl.d.ts +1 -0
  134. package/lib/components/ApplicationForm/DatePickerControl.js +1 -1
  135. package/lib/components/ApplicationForm/DatePickerControl.js.map +1 -1
  136. package/lib/components/ApplicationForm/InputControl.js +1 -1
  137. package/lib/components/ApplicationForm/InputControl.js.map +1 -1
  138. package/lib/components/ApplicationForm/PhoneInputControl.js +1 -1
  139. package/lib/components/ApplicationForm/PhoneInputControl.js.map +1 -1
  140. package/lib/components/ApplicationForm/RegionPremiumField.d.ts +6 -0
  141. package/lib/components/ApplicationForm/RegionPremiumField.js +15 -0
  142. package/lib/components/ApplicationForm/RegionPremiumField.js.map +1 -0
  143. package/lib/components/ApplicationForm/SelectControl.d.ts +2 -0
  144. package/lib/components/ApplicationForm/SelectControl.js +1 -1
  145. package/lib/components/ApplicationForm/SelectControl.js.map +1 -1
  146. package/lib/components/ApplicationForm/handleSubmit.js +3 -51
  147. package/lib/components/ApplicationForm/handleSubmit.js.map +1 -1
  148. package/lib/components/ApplicationForm/renderAcquiringDataOrganization.js +1 -1
  149. package/lib/components/ApplicationForm/renderAcquiringDataOrganization.js.map +1 -1
  150. package/lib/components/ApplicationForm/renderCreditDataOrganization.js +1 -1
  151. package/lib/components/ApplicationForm/renderCreditDataOrganization.js.map +1 -1
  152. package/lib/components/ApplicationForm/renderUserData.js +1 -1
  153. package/lib/components/ApplicationForm/renderUserData.js.map +1 -1
  154. package/lib/components/ApplicationForm/renderWedDataOrganization.d.ts +1 -4
  155. package/lib/components/ApplicationForm/renderWedDataOrganization.js +3 -3
  156. package/lib/components/ApplicationForm/renderWedDataOrganization.js.map +1 -1
  157. package/lib/hooks/useForm.d.ts +4 -1
  158. package/lib/hooks/useForm.js +2 -2
  159. package/lib/hooks/useForm.js.map +1 -1
  160. package/lib/hooks/usePremiumBranchesByRegions.d.ts +1 -0
  161. package/lib/hooks/usePremiumBranchesByRegions.js.map +1 -1
  162. package/lib/ui-kit/Input/InputProps.d.ts +1 -0
  163. package/lib/utils/formatPhone.js +1 -1
  164. package/lib/utils/formatPhone.js.map +1 -1
  165. package/mobile/bundle/api/LeadServiceAPI.d.ts +10 -1
  166. package/mobile/bundle/bundle.umd.js +131 -220
  167. package/mobile/bundle/bundle.umd.min.js +1 -1
  168. package/mobile/bundle/components/ApplicationForm/AddressBranchField.d.ts +2 -1
  169. package/mobile/bundle/components/ApplicationForm/ApplicationFormAcquiring.d.ts +1 -0
  170. package/mobile/bundle/components/ApplicationForm/ApplicationFormAntiFraud.d.ts +1 -1
  171. package/mobile/bundle/components/ApplicationForm/ApplicationFormBusinessCard.d.ts +2 -1
  172. package/mobile/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +0 -1
  173. package/mobile/bundle/components/ApplicationForm/ApplicationFormCorruption.d.ts +2 -2
  174. package/mobile/bundle/components/ApplicationForm/ApplicationFormCredit.d.ts +3 -2
  175. package/mobile/bundle/components/ApplicationForm/ApplicationFormFeedback.d.ts +1 -1
  176. package/mobile/bundle/components/ApplicationForm/ApplicationFormSelfCollection.d.ts +2 -2
  177. package/mobile/bundle/components/ApplicationForm/ApplicationFormWed.d.ts +6 -5
  178. package/mobile/bundle/components/ApplicationForm/DatePickerControl.d.ts +1 -0
  179. package/mobile/bundle/components/ApplicationForm/RegionPremiumField.d.ts +6 -0
  180. package/mobile/bundle/components/ApplicationForm/SelectControl.d.ts +2 -0
  181. package/mobile/bundle/components/ApplicationForm/renderWedDataOrganization.d.ts +1 -4
  182. package/mobile/bundle/hooks/useForm.d.ts +4 -1
  183. package/mobile/bundle/hooks/usePremiumBranchesByRegions.d.ts +1 -0
  184. package/mobile/bundle/ui-kit/Input/InputProps.d.ts +1 -0
  185. package/mobile/dist/api/LeadServiceAPI.d.ts +10 -1
  186. package/mobile/dist/api/LeadServiceAPI.js +23 -1
  187. package/mobile/dist/api/LeadServiceAPI.js.map +1 -1
  188. package/mobile/dist/components/ApplicationForm/AddressBranchField.d.ts +2 -1
  189. package/mobile/dist/components/ApplicationForm/AddressBranchField.js +7 -4
  190. package/mobile/dist/components/ApplicationForm/AddressBranchField.js.map +1 -1
  191. package/mobile/dist/components/ApplicationForm/ApplicationForm.js +3 -1
  192. package/mobile/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
  193. package/mobile/dist/components/ApplicationForm/ApplicationFormAcquiring.d.ts +1 -0
  194. package/mobile/dist/components/ApplicationForm/ApplicationFormAcquiring.js +6 -11
  195. package/mobile/dist/components/ApplicationForm/ApplicationFormAcquiring.js.map +1 -1
  196. package/mobile/dist/components/ApplicationForm/ApplicationFormAntiFraud.d.ts +1 -1
  197. package/mobile/dist/components/ApplicationForm/ApplicationFormAntiFraud.js +3 -11
  198. package/mobile/dist/components/ApplicationForm/ApplicationFormAntiFraud.js.map +1 -1
  199. package/mobile/dist/components/ApplicationForm/ApplicationFormBusinessCard.d.ts +2 -1
  200. package/mobile/dist/components/ApplicationForm/ApplicationFormBusinessCard.js +10 -16
  201. package/mobile/dist/components/ApplicationForm/ApplicationFormBusinessCard.js.map +1 -1
  202. package/mobile/dist/components/ApplicationForm/ApplicationFormContent.d.ts +0 -1
  203. package/mobile/dist/components/ApplicationForm/ApplicationFormCorruption.d.ts +2 -2
  204. package/mobile/dist/components/ApplicationForm/ApplicationFormCorruption.js +4 -12
  205. package/mobile/dist/components/ApplicationForm/ApplicationFormCorruption.js.map +1 -1
  206. package/mobile/dist/components/ApplicationForm/ApplicationFormCredit.d.ts +3 -2
  207. package/mobile/dist/components/ApplicationForm/ApplicationFormCredit.js +10 -21
  208. package/mobile/dist/components/ApplicationForm/ApplicationFormCredit.js.map +1 -1
  209. package/mobile/dist/components/ApplicationForm/ApplicationFormDeposit.js +6 -9
  210. package/mobile/dist/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
  211. package/mobile/dist/components/ApplicationForm/ApplicationFormFeedback.d.ts +1 -1
  212. package/mobile/dist/components/ApplicationForm/ApplicationFormFeedback.js +7 -7
  213. package/mobile/dist/components/ApplicationForm/ApplicationFormFeedback.js.map +1 -1
  214. package/mobile/dist/components/ApplicationForm/ApplicationFormIndividuals.js +6 -14
  215. package/mobile/dist/components/ApplicationForm/ApplicationFormIndividuals.js.map +1 -1
  216. package/mobile/dist/components/ApplicationForm/ApplicationFormSelfCollection.d.ts +2 -2
  217. package/mobile/dist/components/ApplicationForm/ApplicationFormSelfCollection.js +5 -15
  218. package/mobile/dist/components/ApplicationForm/ApplicationFormSelfCollection.js.map +1 -1
  219. package/mobile/dist/components/ApplicationForm/ApplicationFormUltraPremium.js +6 -27
  220. package/mobile/dist/components/ApplicationForm/ApplicationFormUltraPremium.js.map +1 -1
  221. package/mobile/dist/components/ApplicationForm/ApplicationFormWed.d.ts +6 -5
  222. package/mobile/dist/components/ApplicationForm/ApplicationFormWed.js +12 -20
  223. package/mobile/dist/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
  224. package/mobile/dist/components/ApplicationForm/DatePickerControl.d.ts +1 -0
  225. package/mobile/dist/components/ApplicationForm/DatePickerControl.js +1 -1
  226. package/mobile/dist/components/ApplicationForm/DatePickerControl.js.map +1 -1
  227. package/mobile/dist/components/ApplicationForm/InputControl.js +1 -1
  228. package/mobile/dist/components/ApplicationForm/InputControl.js.map +1 -1
  229. package/mobile/dist/components/ApplicationForm/PhoneInputControl.js +1 -1
  230. package/mobile/dist/components/ApplicationForm/PhoneInputControl.js.map +1 -1
  231. package/mobile/dist/components/ApplicationForm/RegionPremiumField.d.ts +6 -0
  232. package/mobile/dist/components/ApplicationForm/RegionPremiumField.js +17 -0
  233. package/mobile/dist/components/ApplicationForm/RegionPremiumField.js.map +1 -0
  234. package/mobile/dist/components/ApplicationForm/SelectControl.d.ts +2 -0
  235. package/mobile/dist/components/ApplicationForm/SelectControl.js +1 -1
  236. package/mobile/dist/components/ApplicationForm/SelectControl.js.map +1 -1
  237. package/mobile/dist/components/ApplicationForm/handleSubmit.js +3 -51
  238. package/mobile/dist/components/ApplicationForm/handleSubmit.js.map +1 -1
  239. package/mobile/dist/components/ApplicationForm/renderAcquiringDataOrganization.js +1 -1
  240. package/mobile/dist/components/ApplicationForm/renderAcquiringDataOrganization.js.map +1 -1
  241. package/mobile/dist/components/ApplicationForm/renderCreditDataOrganization.js +1 -1
  242. package/mobile/dist/components/ApplicationForm/renderCreditDataOrganization.js.map +1 -1
  243. package/mobile/dist/components/ApplicationForm/renderUserData.js +1 -1
  244. package/mobile/dist/components/ApplicationForm/renderUserData.js.map +1 -1
  245. package/mobile/dist/components/ApplicationForm/renderWedDataOrganization.d.ts +1 -4
  246. package/mobile/dist/components/ApplicationForm/renderWedDataOrganization.js +3 -3
  247. package/mobile/dist/components/ApplicationForm/renderWedDataOrganization.js.map +1 -1
  248. package/mobile/dist/hooks/useForm.d.ts +4 -1
  249. package/mobile/dist/hooks/useForm.js +2 -2
  250. package/mobile/dist/hooks/useForm.js.map +1 -1
  251. package/mobile/dist/hooks/usePremiumBranchesByRegions.d.ts +1 -0
  252. package/mobile/dist/hooks/usePremiumBranchesByRegions.js.map +1 -1
  253. package/mobile/dist/ui-kit/Input/InputProps.d.ts +1 -0
  254. package/mobile/dist/utils/formatPhone.js +1 -1
  255. package/mobile/dist/utils/formatPhone.js.map +1 -1
  256. package/mobile/lib/api/LeadServiceAPI.d.ts +10 -1
  257. package/mobile/lib/api/LeadServiceAPI.js +23 -1
  258. package/mobile/lib/api/LeadServiceAPI.js.map +1 -1
  259. package/mobile/lib/common.css +1 -1
  260. package/mobile/lib/components/ApplicationForm/AddressBranchField.d.ts +2 -1
  261. package/mobile/lib/components/ApplicationForm/AddressBranchField.js +7 -4
  262. package/mobile/lib/components/ApplicationForm/AddressBranchField.js.map +1 -1
  263. package/mobile/lib/components/ApplicationForm/ApplicationForm.js +3 -1
  264. package/mobile/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
  265. package/mobile/lib/components/ApplicationForm/ApplicationFormAcquiring.d.ts +1 -0
  266. package/mobile/lib/components/ApplicationForm/ApplicationFormAcquiring.js +6 -11
  267. package/mobile/lib/components/ApplicationForm/ApplicationFormAcquiring.js.map +1 -1
  268. package/mobile/lib/components/ApplicationForm/ApplicationFormAntiFraud.d.ts +1 -1
  269. package/mobile/lib/components/ApplicationForm/ApplicationFormAntiFraud.js +3 -11
  270. package/mobile/lib/components/ApplicationForm/ApplicationFormAntiFraud.js.map +1 -1
  271. package/mobile/lib/components/ApplicationForm/ApplicationFormBusinessCard.d.ts +2 -1
  272. package/mobile/lib/components/ApplicationForm/ApplicationFormBusinessCard.js +10 -16
  273. package/mobile/lib/components/ApplicationForm/ApplicationFormBusinessCard.js.map +1 -1
  274. package/mobile/lib/components/ApplicationForm/ApplicationFormContent.d.ts +0 -1
  275. package/mobile/lib/components/ApplicationForm/ApplicationFormCorruption.d.ts +2 -2
  276. package/mobile/lib/components/ApplicationForm/ApplicationFormCorruption.js +4 -12
  277. package/mobile/lib/components/ApplicationForm/ApplicationFormCorruption.js.map +1 -1
  278. package/mobile/lib/components/ApplicationForm/ApplicationFormCredit.d.ts +3 -2
  279. package/mobile/lib/components/ApplicationForm/ApplicationFormCredit.js +10 -21
  280. package/mobile/lib/components/ApplicationForm/ApplicationFormCredit.js.map +1 -1
  281. package/mobile/lib/components/ApplicationForm/ApplicationFormDeposit.js +6 -9
  282. package/mobile/lib/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
  283. package/mobile/lib/components/ApplicationForm/ApplicationFormFeedback.d.ts +1 -1
  284. package/mobile/lib/components/ApplicationForm/ApplicationFormFeedback.js +7 -7
  285. package/mobile/lib/components/ApplicationForm/ApplicationFormFeedback.js.map +1 -1
  286. package/mobile/lib/components/ApplicationForm/ApplicationFormIndividuals.js +7 -15
  287. package/mobile/lib/components/ApplicationForm/ApplicationFormIndividuals.js.map +1 -1
  288. package/mobile/lib/components/ApplicationForm/ApplicationFormSelfCollection.d.ts +2 -2
  289. package/mobile/lib/components/ApplicationForm/ApplicationFormSelfCollection.js +5 -15
  290. package/mobile/lib/components/ApplicationForm/ApplicationFormSelfCollection.js.map +1 -1
  291. package/mobile/lib/components/ApplicationForm/ApplicationFormUltraPremium.js +6 -27
  292. package/mobile/lib/components/ApplicationForm/ApplicationFormUltraPremium.js.map +1 -1
  293. package/mobile/lib/components/ApplicationForm/ApplicationFormWed.d.ts +6 -5
  294. package/mobile/lib/components/ApplicationForm/ApplicationFormWed.js +12 -20
  295. package/mobile/lib/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
  296. package/mobile/lib/components/ApplicationForm/DatePickerControl.d.ts +1 -0
  297. package/mobile/lib/components/ApplicationForm/DatePickerControl.js +1 -1
  298. package/mobile/lib/components/ApplicationForm/DatePickerControl.js.map +1 -1
  299. package/mobile/lib/components/ApplicationForm/InputControl.js +1 -1
  300. package/mobile/lib/components/ApplicationForm/InputControl.js.map +1 -1
  301. package/mobile/lib/components/ApplicationForm/PhoneInputControl.js +1 -1
  302. package/mobile/lib/components/ApplicationForm/PhoneInputControl.js.map +1 -1
  303. package/mobile/lib/components/ApplicationForm/RegionPremiumField.d.ts +6 -0
  304. package/mobile/lib/components/ApplicationForm/RegionPremiumField.js +15 -0
  305. package/mobile/lib/components/ApplicationForm/RegionPremiumField.js.map +1 -0
  306. package/mobile/lib/components/ApplicationForm/SelectControl.d.ts +2 -0
  307. package/mobile/lib/components/ApplicationForm/SelectControl.js +1 -1
  308. package/mobile/lib/components/ApplicationForm/SelectControl.js.map +1 -1
  309. package/mobile/lib/components/ApplicationForm/handleSubmit.js +3 -51
  310. package/mobile/lib/components/ApplicationForm/handleSubmit.js.map +1 -1
  311. package/mobile/lib/components/ApplicationForm/renderAcquiringDataOrganization.js +1 -1
  312. package/mobile/lib/components/ApplicationForm/renderAcquiringDataOrganization.js.map +1 -1
  313. package/mobile/lib/components/ApplicationForm/renderCreditDataOrganization.js +1 -1
  314. package/mobile/lib/components/ApplicationForm/renderCreditDataOrganization.js.map +1 -1
  315. package/mobile/lib/components/ApplicationForm/renderUserData.js +1 -1
  316. package/mobile/lib/components/ApplicationForm/renderUserData.js.map +1 -1
  317. package/mobile/lib/components/ApplicationForm/renderWedDataOrganization.d.ts +1 -4
  318. package/mobile/lib/components/ApplicationForm/renderWedDataOrganization.js +3 -3
  319. package/mobile/lib/components/ApplicationForm/renderWedDataOrganization.js.map +1 -1
  320. package/mobile/lib/hooks/useForm.d.ts +4 -1
  321. package/mobile/lib/hooks/useForm.js +2 -2
  322. package/mobile/lib/hooks/useForm.js.map +1 -1
  323. package/mobile/lib/hooks/usePremiumBranchesByRegions.d.ts +1 -0
  324. package/mobile/lib/hooks/usePremiumBranchesByRegions.js.map +1 -1
  325. package/mobile/lib/ui-kit/Input/InputProps.d.ts +1 -0
  326. package/mobile/lib/utils/formatPhone.js +1 -1
  327. package/mobile/lib/utils/formatPhone.js.map +1 -1
  328. package/mobile/src/api/LeadServiceAPI.ts +50 -3
  329. package/mobile/src/components/ApplicationForm/AddressBranchField.tsx +21 -15
  330. package/mobile/src/components/ApplicationForm/ApplicationForm.tsx +7 -1
  331. package/mobile/src/components/ApplicationForm/ApplicationForm.ui.json +1 -1
  332. package/mobile/src/components/ApplicationForm/ApplicationFormAcquiring.tsx +12 -12
  333. package/mobile/src/components/ApplicationForm/ApplicationFormAntiFraud.tsx +6 -15
  334. package/mobile/src/components/ApplicationForm/ApplicationFormBusinessCard.tsx +24 -18
  335. package/mobile/src/components/ApplicationForm/ApplicationFormContent.ts +0 -1
  336. package/mobile/src/components/ApplicationForm/ApplicationFormCorruption.tsx +8 -20
  337. package/mobile/src/components/ApplicationForm/ApplicationFormCredit.tsx +13 -29
  338. package/mobile/src/components/ApplicationForm/ApplicationFormDeposit.tsx +8 -10
  339. package/mobile/src/components/ApplicationForm/ApplicationFormFeedback.tsx +20 -22
  340. package/mobile/src/components/ApplicationForm/ApplicationFormIndividuals.tsx +7 -17
  341. package/mobile/src/components/ApplicationForm/ApplicationFormSelfCollection.tsx +9 -23
  342. package/mobile/src/components/ApplicationForm/ApplicationFormUltraPremium.tsx +12 -49
  343. package/mobile/src/components/ApplicationForm/ApplicationFormWed.tsx +25 -27
  344. package/mobile/src/components/ApplicationForm/DatePickerControl.tsx +3 -2
  345. package/mobile/src/components/ApplicationForm/InputControl.tsx +3 -3
  346. package/mobile/src/components/ApplicationForm/PhoneInputControl.tsx +2 -2
  347. package/mobile/src/components/ApplicationForm/RegionPremiumField.tsx +28 -0
  348. package/mobile/src/components/ApplicationForm/SelectControl.tsx +10 -6
  349. package/mobile/src/components/ApplicationForm/handleSubmit.tsx +3 -52
  350. package/mobile/src/components/ApplicationForm/renderAcquiringDataOrganization.tsx +4 -4
  351. package/mobile/src/components/ApplicationForm/renderCreditDataOrganization.tsx +4 -2
  352. package/mobile/src/components/ApplicationForm/renderUserData.tsx +3 -3
  353. package/mobile/src/components/ApplicationForm/renderWedDataOrganization.tsx +4 -20
  354. package/mobile/src/hooks/useForm.ts +3 -2
  355. package/mobile/src/hooks/usePremiumBranchesByRegions.ts +1 -0
  356. package/mobile/src/ui-kit/Input/InputProps.ts +1 -0
  357. package/mobile/src/utils/formatPhone.ts +1 -1
  358. package/package.json +1 -1
  359. package/src/api/LeadServiceAPI.ts +50 -3
  360. package/src/components/ApplicationForm/AddressBranchField.tsx +21 -15
  361. package/src/components/ApplicationForm/ApplicationForm.fixture.tsx +1 -1
  362. package/src/components/ApplicationForm/ApplicationForm.tsx +7 -1
  363. package/src/components/ApplicationForm/ApplicationForm.ui.json +1 -1
  364. package/src/components/ApplicationForm/ApplicationFormAcquiring.tsx +12 -12
  365. package/src/components/ApplicationForm/ApplicationFormAntiFraud.tsx +6 -15
  366. package/src/components/ApplicationForm/ApplicationFormBusinessCard.tsx +24 -18
  367. package/src/components/ApplicationForm/ApplicationFormContent.ts +0 -1
  368. package/src/components/ApplicationForm/ApplicationFormCorruption.tsx +8 -20
  369. package/src/components/ApplicationForm/ApplicationFormCredit.tsx +13 -29
  370. package/src/components/ApplicationForm/ApplicationFormDeposit.tsx +8 -10
  371. package/src/components/ApplicationForm/ApplicationFormFeedback.tsx +20 -22
  372. package/src/components/ApplicationForm/ApplicationFormIndividuals.tsx +7 -17
  373. package/src/components/ApplicationForm/ApplicationFormSelfCollection.tsx +9 -23
  374. package/src/components/ApplicationForm/ApplicationFormUltraPremium.tsx +12 -49
  375. package/src/components/ApplicationForm/ApplicationFormWed.tsx +25 -27
  376. package/src/components/ApplicationForm/DatePickerControl.tsx +3 -2
  377. package/src/components/ApplicationForm/InputControl.tsx +3 -3
  378. package/src/components/ApplicationForm/PhoneInputControl.tsx +2 -2
  379. package/src/components/ApplicationForm/RegionPremiumField.tsx +28 -0
  380. package/src/components/ApplicationForm/SelectControl.tsx +10 -6
  381. package/src/components/ApplicationForm/handleSubmit.tsx +3 -52
  382. package/src/components/ApplicationForm/renderAcquiringDataOrganization.tsx +4 -4
  383. package/src/components/ApplicationForm/renderCreditDataOrganization.tsx +4 -2
  384. package/src/components/ApplicationForm/renderUserData.tsx +3 -3
  385. package/src/components/ApplicationForm/renderWedDataOrganization.tsx +4 -20
  386. package/src/hooks/useForm.ts +3 -2
  387. package/src/hooks/usePremiumBranchesByRegions.ts +1 -0
  388. package/src/ui-kit/Input/InputProps.ts +1 -0
  389. package/src/utils/formatPhone.ts +1 -1
  390. package/bundle/components/ApplicationForm/renderBusinessCardDataOrganization.d.ts +0 -4
  391. package/bundle/components/ApplicationForm/renderSlideCheckboxes.d.ts +0 -4
  392. package/bundle/components/ApplicationForm/renderTextarea.d.ts +0 -11
  393. package/dist/components/ApplicationForm/renderBusinessCardDataOrganization.d.ts +0 -4
  394. package/dist/components/ApplicationForm/renderBusinessCardDataOrganization.js +0 -11
  395. package/dist/components/ApplicationForm/renderBusinessCardDataOrganization.js.map +0 -1
  396. package/dist/components/ApplicationForm/renderSlideCheckboxes.d.ts +0 -4
  397. package/dist/components/ApplicationForm/renderSlideCheckboxes.js +0 -7
  398. package/dist/components/ApplicationForm/renderSlideCheckboxes.js.map +0 -1
  399. package/dist/components/ApplicationForm/renderTextarea.d.ts +0 -11
  400. package/dist/components/ApplicationForm/renderTextarea.js +0 -10
  401. package/dist/components/ApplicationForm/renderTextarea.js.map +0 -1
  402. package/lib/components/ApplicationForm/renderBusinessCardDataOrganization.d.ts +0 -3
  403. package/lib/components/ApplicationForm/renderBusinessCardDataOrganization.js +0 -8
  404. package/lib/components/ApplicationForm/renderBusinessCardDataOrganization.js.map +0 -1
  405. package/lib/components/ApplicationForm/renderSlideCheckboxes.d.ts +0 -3
  406. package/lib/components/ApplicationForm/renderSlideCheckboxes.js +0 -4
  407. package/lib/components/ApplicationForm/renderSlideCheckboxes.js.map +0 -1
  408. package/lib/components/ApplicationForm/renderTextarea.d.ts +0 -10
  409. package/lib/components/ApplicationForm/renderTextarea.js +0 -7
  410. package/lib/components/ApplicationForm/renderTextarea.js.map +0 -1
  411. package/mobile/bundle/components/ApplicationForm/renderBusinessCardDataOrganization.d.ts +0 -4
  412. package/mobile/bundle/components/ApplicationForm/renderSlideCheckboxes.d.ts +0 -4
  413. package/mobile/bundle/components/ApplicationForm/renderTextarea.d.ts +0 -11
  414. package/mobile/dist/components/ApplicationForm/renderBusinessCardDataOrganization.d.ts +0 -4
  415. package/mobile/dist/components/ApplicationForm/renderBusinessCardDataOrganization.js +0 -11
  416. package/mobile/dist/components/ApplicationForm/renderBusinessCardDataOrganization.js.map +0 -1
  417. package/mobile/dist/components/ApplicationForm/renderSlideCheckboxes.d.ts +0 -4
  418. package/mobile/dist/components/ApplicationForm/renderSlideCheckboxes.js +0 -7
  419. package/mobile/dist/components/ApplicationForm/renderSlideCheckboxes.js.map +0 -1
  420. package/mobile/dist/components/ApplicationForm/renderTextarea.d.ts +0 -11
  421. package/mobile/dist/components/ApplicationForm/renderTextarea.js +0 -10
  422. package/mobile/dist/components/ApplicationForm/renderTextarea.js.map +0 -1
  423. package/mobile/lib/components/ApplicationForm/renderBusinessCardDataOrganization.d.ts +0 -4
  424. package/mobile/lib/components/ApplicationForm/renderBusinessCardDataOrganization.js +0 -8
  425. package/mobile/lib/components/ApplicationForm/renderBusinessCardDataOrganization.js.map +0 -1
  426. package/mobile/lib/components/ApplicationForm/renderSlideCheckboxes.d.ts +0 -4
  427. package/mobile/lib/components/ApplicationForm/renderSlideCheckboxes.js +0 -4
  428. package/mobile/lib/components/ApplicationForm/renderSlideCheckboxes.js.map +0 -1
  429. package/mobile/lib/components/ApplicationForm/renderTextarea.d.ts +0 -11
  430. package/mobile/lib/components/ApplicationForm/renderTextarea.js +0 -7
  431. package/mobile/lib/components/ApplicationForm/renderTextarea.js.map +0 -1
  432. package/mobile/src/components/ApplicationForm/renderBusinessCardDataOrganization.tsx +0 -22
  433. package/mobile/src/components/ApplicationForm/renderSlideCheckboxes.tsx +0 -10
  434. package/mobile/src/components/ApplicationForm/renderTextarea.tsx +0 -42
  435. package/src/components/ApplicationForm/renderBusinessCardDataOrganization.tsx +0 -22
  436. package/src/components/ApplicationForm/renderSlideCheckboxes.tsx +0 -10
  437. package/src/components/ApplicationForm/renderTextarea.tsx +0 -42
@@ -1,3 +1,6 @@
1
+ import { type JSONRecord, type JSONScalar } from '@redneckz/json-ref/lib/JSONNode';
2
+ import { formatPhone } from '../utils/formatPhone';
3
+
1
4
  interface DaDataSuggestion<T> {
2
5
  value?: string;
3
6
  unrestricted_value?: string;
@@ -12,16 +15,55 @@ export interface DaDataResult {
12
15
  suggestions?: DaDataSuggestion<DaDataAddress>[];
13
16
  }
14
17
 
18
+ export type LeadRequest = Record<string, JSONRecord | JSONScalar | null> & {
19
+ typeForm?: string;
20
+ addressBranch?: string;
21
+ phone?: string;
22
+ email?: string;
23
+ inn?: string;
24
+ secondaryPhoneNumber?: string;
25
+ };
26
+
15
27
  export function LeadServiceAPI() {
16
- async function send(body: Record<string, string>, isIndividualType = false) {
28
+ // eslint-disable-next-line complexity
29
+ async function send(body: LeadRequest, isIndividualType = false) {
17
30
  const url = isIndividualType ? '/api/v1/lead' : '/api/v1/sendcorporatelead';
18
-
31
+ const {
32
+ typeForm,
33
+ region,
34
+ phone = '',
35
+ email,
36
+ birthday,
37
+ inn,
38
+ fullName,
39
+ addressBranch,
40
+ secondaryPhone = '',
41
+ bankEmpolee,
42
+ applicationDate,
43
+ ...staticBody
44
+ } = body;
45
+ const submitBody = {
46
+ typeForm,
47
+ [isIndividualType ? 'regionBranch' : 'region']: region,
48
+ [isIndividualType ? 'phoneNumber' : 'phone']: formatPhone(phone),
49
+ [isIndividualType ? 'email' : 'mail']: email,
50
+ ...(isIndividualType ? { birthday } : { inn, fullName }),
51
+ ...(typeForm === 'FEEDBACK'
52
+ ? {}
53
+ : {
54
+ addressBranch,
55
+ bankEmpolee,
56
+ applicationDate,
57
+ ...getSecondaryPhone(secondaryPhone as string),
58
+ }),
59
+ ...staticBody,
60
+ };
19
61
  try {
20
62
  const response = await fetch(url, {
21
63
  method: 'POST',
22
64
  headers: { 'Content-Type': 'application/json' },
23
65
  mode: 'cors',
24
- body: JSON.stringify(body),
66
+ body: JSON.stringify(submitBody),
25
67
  });
26
68
 
27
69
  if (!response?.ok) {
@@ -40,3 +82,8 @@ export function LeadServiceAPI() {
40
82
  send,
41
83
  };
42
84
  }
85
+
86
+ const getSecondaryPhone = (secondaryPhone?: string) =>
87
+ !secondaryPhone || secondaryPhone === '+7 ('
88
+ ? {}
89
+ : { secondaryPhoneNumber: formatPhone(secondaryPhone) };
@@ -1,27 +1,33 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
2
  import { useBranches } from '../../hooks/useBranches';
3
3
  import { type FormFieldRegisterer } from '../../hooks/useForm';
4
+ import { usePremiumBranchesByRegions } from '../../hooks/usePremiumBranchesByRegions';
4
5
  import { withValidator } from '../../validation/withValidator';
5
6
  import { SelectControl } from './SelectControl';
6
7
  import { defaultValidator } from './validators';
7
8
 
8
9
  interface RegionFieldProps {
9
10
  field: FormFieldRegisterer<any>;
10
- key?: string;
11
+ regionKey?: string;
12
+ isPremium?: boolean;
11
13
  }
12
14
 
13
- export const AddressBranchField = JSX<RegionFieldProps>(({ field, key = '' }) => {
14
- const addressByBranch = useBranches(key).filter((branch) => branch?.address);
15
+ export const AddressBranchField = JSX<RegionFieldProps>(
16
+ ({ field, regionKey, isPremium = false }) => {
17
+ const addressBranch = isPremium
18
+ ? usePremiumBranchesByRegions().find((_) => _?.region === regionKey)?.branches
19
+ : useBranches(regionKey).filter((branch) => branch?.address);
15
20
 
16
- return (
17
- <SelectControl
18
- label="Адрес*"
19
- placeholder="Выберите адрес"
20
- options={addressByBranch.map(({ branchCode = '', address = '' }) => ({
21
- key: branchCode,
22
- text: address,
23
- }))}
24
- {...withValidator(field('addressBranch'), defaultValidator)}
25
- />
26
- );
27
- });
21
+ return (
22
+ <SelectControl
23
+ label="Адрес"
24
+ placeholder="Выберите адрес"
25
+ options={(addressBranch || []).map(({ address = '' }) => ({
26
+ key: address,
27
+ text: address,
28
+ }))}
29
+ {...withValidator(field('addressBranch'), defaultValidator)}
30
+ />
31
+ );
32
+ },
33
+ );
@@ -80,7 +80,7 @@ const ApplicationFormSelfCollection: ApplicationFormContent = {
80
80
  formBlock: {
81
81
  ...formBlockProps,
82
82
  formType: 'ApplicationFormSelfCollection',
83
- title: 'Факты коррупции',
83
+ title: 'Самоинкассация (ЮЛ) ',
84
84
  },
85
85
  };
86
86
 
@@ -21,7 +21,8 @@ export const ApplicationForm = JSX<ApplicationFormProps>((props) => {
21
21
  const [responseType, setResponseType] = useState<'OK' | 'Fail' | ''>('');
22
22
 
23
23
  const handleSubmit = useCallback(async (data: Record<string, any>, isIndividualType = false) => {
24
- const status = (await API.send(data, isIndividualType)) ? 'OK' : 'Fail';
24
+ const formatData = getFormatData(data);
25
+ const status = (await API.send(formatData, isIndividualType)) ? 'OK' : 'Fail';
25
26
  setResponseType(status);
26
27
 
27
28
  return status;
@@ -55,3 +56,8 @@ const renderEmbeddedForm = (
55
56
 
56
57
  return <EmbeddedForm {...formBlock} onSubmit={handleSubmit} />;
57
58
  };
59
+
60
+ const getFormatData = (data: Record<string, any>) =>
61
+ Object.fromEntries(
62
+ Object.entries(data).map(([k, v]) => [k, (v?.region ? v?.text : v?.key) || v]),
63
+ );
@@ -7,7 +7,7 @@
7
7
  "product": {
8
8
  "ui:widget": "sourceBookDataDropdown",
9
9
  "ui:options": {
10
- "sourceName": "products"
10
+ "sourceBookPath": "wcms-resources/products"
11
11
  }
12
12
  }
13
13
  }
@@ -2,7 +2,7 @@ import { JSX } from '@redneckz/uni-jsx';
2
2
  import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
3
3
  import { useForm } from '../../hooks/useForm';
4
4
  import { type Option } from '../../ui-kit/Select/Option';
5
- import { formatPhone } from '../../utils/formatPhone';
5
+ import { SlideCheckbox } from '../../ui-kit/SlideCheckbox/SlideCheckbox';
6
6
  import { objectValidator } from '../../validation/objectValidator';
7
7
  import { isValidationSuccess } from '../../validation/validator';
8
8
  import { type ApplicationFormsProps } from './ApplicationFormsProps';
@@ -10,11 +10,11 @@ import { Footnote } from './Footnote';
10
10
  import { formStyle } from './formStyle';
11
11
  import { renderAcquiringDataOrganization } from './renderAcquiringDataOrganization';
12
12
  import { renderAcquiringRegion } from './renderAcquiringRegion';
13
- import { renderSlideCheckboxes } from './renderSlideCheckboxes';
14
13
  import { renderSubmitButton } from './renderSubmitButton';
15
14
  import { defaultValidator, innValidator, nameValidator, phoneValidator } from './validators';
16
15
 
17
16
  export interface AcquiringFormState {
17
+ typeForm: Option;
18
18
  acquiringType?: Option;
19
19
  region?: Option;
20
20
  fullName: string;
@@ -26,6 +26,7 @@ export interface AcquiringFormState {
26
26
  }
27
27
 
28
28
  const initialFormState: AcquiringFormState = {
29
+ typeForm: { key: 'acqr', text: 'Предупреждение о мошенничестве' },
29
30
  acquiringType: { key: 'trade', text: 'Торговый эквайринг' },
30
31
  fullName: '',
31
32
  inn: '',
@@ -49,8 +50,7 @@ export const ApplicationFormAcquiring = JSX<ApplicationFormsProps>((props) => {
49
50
 
50
51
  const handleSubmit = useCallback(
51
52
  (formState: AcquiringFormState) => {
52
- const { acquiringType, region, fullName, inn, name, phone, onlineCheckout, posTerminal } =
53
- formState;
53
+ const { acquiringType, onlineCheckout, posTerminal, ...usedForm } = formState;
54
54
  const isTradeAcquiring = getSlideCheckboxes(acquiringType?.key);
55
55
  const partnerComments = `Вид эквайринга=${acquiringType?.text || ''}${
56
56
  isTradeAcquiring
@@ -59,13 +59,8 @@ export const ApplicationFormAcquiring = JSX<ApplicationFormsProps>((props) => {
59
59
  }`;
60
60
 
61
61
  const submitData = {
62
- typeForm: 'acqr',
63
- region: region?.text || '',
64
62
  partnerComments,
65
- fullName,
66
- inn,
67
- name,
68
- phone: formatPhone(phone),
63
+ ...usedForm,
69
64
  };
70
65
 
71
66
  isValidationSuccess(acquiringValidator(formState)) && onSubmit(submitData, false);
@@ -73,14 +68,19 @@ export const ApplicationFormAcquiring = JSX<ApplicationFormsProps>((props) => {
73
68
  [onSubmit],
74
69
  );
75
70
 
76
- const [, { field, ...formProps }] = useForm(initialFormState, handleSubmit);
71
+ const [, { field, ...formProps }] = useForm(initialFormState, { onSubmit: handleSubmit });
77
72
  const isSlideCheckboxes = getSlideCheckboxes(field('acquiringType').value?.key);
78
73
 
79
74
  return (
80
75
  <form className={formStyle} onSubmit={formProps.onSubmit}>
81
76
  {renderAcquiringRegion({ field, title: 'Вид эквайринга и регион' })}
82
77
  {renderAcquiringDataOrganization(field, 'Данные организации')}
83
- {isSlideCheckboxes ? renderSlideCheckboxes(field) : null}
78
+ {isSlideCheckboxes ? (
79
+ <div>
80
+ <SlideCheckbox text="Хочу купить онлайн-кассу" {...field('onlineCheckout')} />
81
+ <SlideCheckbox text="Хочу купить POS-терминал" {...field('posTerminal')} />
82
+ </div>
83
+ ) : null}
84
84
  {renderSubmitButton(button)}
85
85
  <Footnote link={link} />
86
86
  </form>
@@ -3,7 +3,6 @@ import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
3
3
  import { useForm } from '../../hooks/useForm';
4
4
  import { CheckboxWithError } from '../../ui-kit/Checkbox/CheckboxWithError';
5
5
  import { type Option } from '../../ui-kit/Select/Option';
6
- import { formatPhone } from '../../utils/formatPhone';
7
6
  import { objectValidator } from '../../validation/objectValidator';
8
7
  import { isValidationSuccess } from '../../validation/validator';
9
8
  import { withValidator } from '../../validation/withValidator';
@@ -21,7 +20,7 @@ export type AntiFraudFormState = UserDataState & {
21
20
  phone: string;
22
21
  birthday: Date | undefined;
23
22
  isClient: boolean;
24
- comment?: string;
23
+ comment: string;
25
24
  consentDataProcessing: boolean;
26
25
  };
27
26
 
@@ -41,7 +40,6 @@ const feedbackValidator = objectValidator({
41
40
  name: nameValidator,
42
41
  birthday: defaultValidator,
43
42
  phone: phoneValidator,
44
- isClient: checkboxValidator,
45
43
  comment: defaultValidator,
46
44
  consentDataProcessing: checkboxValidator,
47
45
  });
@@ -49,33 +47,26 @@ const feedbackValidator = objectValidator({
49
47
  export const ApplicationFormAntiFraud = JSX<ApplicationFormsProps>(({ button, link, onSubmit }) => {
50
48
  const handleSubmit = useCallback(
51
49
  (formState: AntiFraudFormState) => {
52
- const { typeForm, phone, ...usedFields } = formState;
53
-
54
- const submitData = {
55
- ...usedFields,
56
- typeForm: typeForm.key,
57
- phone: formatPhone(phone),
58
- };
59
- isValidationSuccess(feedbackValidator(formState)) && onSubmit(submitData, true);
50
+ isValidationSuccess(feedbackValidator(formState)) && onSubmit(formState, true);
60
51
  },
61
52
  [onSubmit],
62
53
  );
63
54
 
64
- const [, { field, ...formProps }] = useForm(initialFormState, handleSubmit);
55
+ const [, { field, ...formProps }] = useForm(initialFormState, { onSubmit: handleSubmit });
65
56
 
66
57
  return (
67
58
  <form className={formStyle} onSubmit={formProps.onSubmit}>
68
59
  <ApplicationFieldsetLayout>
69
60
  <div className={oneColumnFormStyle}>
70
61
  {renderUserData<AntiFraudFormState>(field, true)}
71
- <PhoneInputControl label="Телефон*" {...withValidator(field('phone'), phoneValidator)} />
62
+ <PhoneInputControl label="Телефон" {...withValidator(field('phone'), phoneValidator)} />
72
63
  <CheckboxWithError
73
- {...withValidator(field('isClient'), checkboxValidator)}
64
+ {...field('isClient')}
74
65
  text='Являюсь клиентом банка АО "Россельхозбанк"'
75
66
  />
76
67
  <InputControl
77
68
  {...withValidator(field('comment'), defaultValidator)}
78
- placeholder="Комментарий*"
69
+ placeholder="Комментарий"
79
70
  isTextarea={true}
80
71
  />
81
72
  {renderAgreementWithSubmit(field('consentDataProcessing'), link, button)}
@@ -2,30 +2,34 @@ import { JSX } from '@redneckz/uni-jsx';
2
2
  import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
3
3
  import { useForm } from '../../hooks/useForm';
4
4
  import { type Option } from '../../ui-kit/Select/Option';
5
- import { formatPhone } from '../../utils/formatPhone';
6
5
  import { objectValidator } from '../../validation/objectValidator';
7
6
  import { isValidationSuccess } from '../../validation/validator';
7
+ import { withValidator } from '../../validation/withValidator';
8
+ import { ApplicationFieldsetLayout, formChildrenStyle } from './ApplicationFieldsetLayout';
8
9
  import { type ApplicationFormsProps } from './ApplicationFormsProps';
9
10
  import { Footnote } from './Footnote';
10
11
  import { formStyle } from './formStyle';
12
+ import { InputControl } from './InputControl';
13
+ import { PhoneInputControl } from './PhoneInputControl';
11
14
  import { RegionField } from './RegionField';
12
- import { renderBusinessCardDataOrganization } from './renderBusinessCardDataOrganization';
13
15
  import { renderSubmitButton } from './renderSubmitButton';
14
16
  import { defaultValidator, innValidator, nameValidator, phoneValidator } from './validators';
15
17
 
16
18
  export interface BusinessCardFormState {
19
+ typeForm: Option;
17
20
  region?: Option;
18
21
  name: string;
19
22
  phone: string;
20
23
  inn: string;
21
- mail: string;
24
+ email: string;
22
25
  }
23
26
 
24
27
  const initialFormState: BusinessCardFormState = {
28
+ typeForm: { key: 'bcrd', text: 'Заявка на бизнес-карту' },
25
29
  name: '',
26
30
  phone: '',
27
31
  inn: '',
28
- mail: '',
32
+ email: '',
29
33
  };
30
34
 
31
35
  const businessCardValidator = objectValidator({
@@ -33,7 +37,7 @@ const businessCardValidator = objectValidator({
33
37
  name: nameValidator,
34
38
  phone: phoneValidator,
35
39
  inn: innValidator,
36
- mail: defaultValidator,
40
+ email: defaultValidator,
37
41
  });
38
42
 
39
43
  export const ApplicationFormBusinessCard = JSX<ApplicationFormsProps>((props) => {
@@ -41,27 +45,29 @@ export const ApplicationFormBusinessCard = JSX<ApplicationFormsProps>((props) =>
41
45
 
42
46
  const handleSubmit = useCallback(
43
47
  (formState: BusinessCardFormState) => {
44
- const { region, name, phone, inn, mail } = formState;
45
-
46
- isValidationSuccess(businessCardValidator(formState)) &&
47
- onSubmit({
48
- typeForm: 'bcrd',
49
- region: region?.text || '',
50
- name,
51
- inn,
52
- mail,
53
- phone: formatPhone(phone),
54
- });
48
+ isValidationSuccess(businessCardValidator(formState)) && onSubmit(formState);
55
49
  },
56
50
  [onSubmit],
57
51
  );
58
52
 
59
- const [, { field, ...formProps }] = useForm(initialFormState, handleSubmit);
53
+ const [, { field, ...formProps }] = useForm(initialFormState, { onSubmit: handleSubmit });
60
54
 
61
55
  return (
62
56
  <form className={formStyle} onSubmit={formProps.onSubmit}>
63
57
  <RegionField field={field} />
64
- {renderBusinessCardDataOrganization(field)}
58
+ <ApplicationFieldsetLayout>
59
+ <div className={formChildrenStyle}>
60
+ <InputControl label="Контактное лицо" {...withValidator(field('name'), nameValidator)} />
61
+ <InputControl label="ИНН" {...withValidator(field('inn'), innValidator)} />
62
+ </div>
63
+ <div className={formChildrenStyle}>
64
+ <PhoneInputControl label="Телефон" {...withValidator(field('phone'), phoneValidator)} />
65
+ <InputControl
66
+ label="Электронная почта"
67
+ {...withValidator(field('email'), defaultValidator)}
68
+ />
69
+ </div>
70
+ </ApplicationFieldsetLayout>
65
71
  {renderSubmitButton(button)}
66
72
  <Footnote link={link} />
67
73
  </form>
@@ -134,7 +134,6 @@ export type UltraPremiumFormParamsDef = TitleProps &
134
134
  CommonApplicationFormProps & {
135
135
  /** @default ApplicationUltraPremium */
136
136
  formType: 'ApplicationFormUltraPremium';
137
- /** @title Выберите продукт */
138
137
  defaultType?: UltraPremiumTypeProps;
139
138
  };
140
139
 
@@ -4,7 +4,6 @@ import { JSX } from '@redneckz/uni-jsx';
4
4
  import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
5
5
  import { useForm } from '../../hooks/useForm';
6
6
  import { type Option } from '../../ui-kit/Select/Option';
7
- import { formatPhone } from '../../utils/formatPhone';
8
7
  import { objectValidator } from '../../validation/objectValidator';
9
8
  import { isValidationSuccess } from '../../validation/validator';
10
9
  import { withValidator } from '../../validation/withValidator';
@@ -22,14 +21,14 @@ export type CorruptionFormState = UserDataState & {
22
21
  typeForm: Option;
23
22
  region?: Option;
24
23
  phone: string;
25
- email?: string;
26
- comment?: string;
24
+ email: string;
25
+ comment: string;
27
26
  consentDataProcessing: boolean;
28
27
  };
29
28
 
30
29
  const initialFormState: CorruptionFormState = {
31
- ...initialUserFormState,
32
30
  typeForm: { key: 'CORRUPTION', text: 'Факты коррупции' },
31
+ ...initialUserFormState,
33
32
  phone: '',
34
33
  email: '',
35
34
  comment: '',
@@ -51,20 +50,12 @@ export const ApplicationFormCorruption = JSX<ApplicationFormsProps>(
51
50
  ({ button, link, onSubmit }) => {
52
51
  const handleSubmit = useCallback(
53
52
  (formState: CorruptionFormState) => {
54
- const { typeForm, phone, region, ...usedFields } = formState;
55
-
56
- const submitData = {
57
- ...usedFields,
58
- typeForm: typeForm.key,
59
- regionBranch: region?.text,
60
- phone: formatPhone(phone),
61
- };
62
- isValidationSuccess(feedbackValidator(formState)) && onSubmit(submitData, true);
53
+ isValidationSuccess(feedbackValidator(formState)) && onSubmit(formState, true);
63
54
  },
64
55
  [onSubmit],
65
56
  );
66
57
 
67
- const [, { field, ...formProps }] = useForm(initialFormState, handleSubmit);
58
+ const [, { field, ...formProps }] = useForm(initialFormState, { onSubmit: handleSubmit });
68
59
 
69
60
  return (
70
61
  <form className={formStyle} onSubmit={formProps.onSubmit}>
@@ -72,17 +63,14 @@ export const ApplicationFormCorruption = JSX<ApplicationFormsProps>(
72
63
  <div className={oneColumnFormStyle}>
73
64
  {renderUserData<CorruptionFormState>(field, false)}
74
65
  <RegionField field={field} />
75
- <PhoneInputControl
76
- label="Телефон*"
77
- {...withValidator(field('phone'), phoneValidator)}
78
- />
66
+ <PhoneInputControl label="Телефон" {...withValidator(field('phone'), phoneValidator)} />
79
67
  <InputControl
80
- label="Электронная почта*"
68
+ label="Электронная почта"
81
69
  {...withValidator(field('email'), defaultValidator)}
82
70
  />
83
71
  <InputControl
84
72
  {...withValidator(field('comment'), defaultValidator)}
85
- placeholder="Ваше сообщение*"
73
+ placeholder="Ваше сообщение"
86
74
  isTextarea={true}
87
75
  />
88
76
  {renderAgreementWithSubmit(field('consentDataProcessing'), link, button)}
@@ -1,12 +1,10 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
2
  import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
3
- import { useBranches } from '../../hooks/useBranches';
4
3
  import { useForm } from '../../hooks/useForm';
5
4
  import { type Option } from '../../ui-kit/Select/Option';
6
- import { formatPhone } from '../../utils/formatPhone';
7
5
  import { objectValidator } from '../../validation/objectValidator';
8
6
  import { isValidationSuccess } from '../../validation/validator';
9
- import { withValidator } from '../../validation/withValidator';
7
+ import { AddressBranchField } from './AddressBranchField';
10
8
  import { ApplicationFieldsetLayout, formChildrenStyle } from './ApplicationFieldsetLayout';
11
9
  import { type ApplicationFormsProps } from './ApplicationFormsProps';
12
10
  import { MIN_CREDIT_AMOUNT } from './CreditParameters';
@@ -16,30 +14,31 @@ import { RegionField } from './RegionField';
16
14
  import { renderCreditDataOrganization } from './renderCreditDataOrganization';
17
15
  import { renderCreditParameters } from './renderCreditParameters';
18
16
  import { renderSubmitButton } from './renderSubmitButton';
19
- import { SelectControl } from './SelectControl';
20
17
  import { defaultValidator, innValidator, nameValidator, phoneValidator } from './validators';
21
18
 
22
19
  export interface CreditFormState {
20
+ typeForm: Option;
23
21
  amount: number;
24
22
  term: number;
25
23
  fullName: string;
26
24
  inn: string;
27
25
  name: string;
28
26
  phone: string;
29
- mail: string;
27
+ email: string;
30
28
  region?: Option;
31
- department?: Option;
29
+ addressBranch?: Option;
32
30
  annualRevenue: string;
33
31
  }
34
32
 
35
33
  const initialFormState: CreditFormState = {
34
+ typeForm: { key: 'cred', text: 'Кредит' },
36
35
  amount: MIN_CREDIT_AMOUNT,
37
36
  term: 12,
38
37
  fullName: '',
39
38
  inn: '',
40
39
  name: '',
41
40
  phone: '',
42
- mail: '',
41
+ email: '',
43
42
  annualRevenue: '',
44
43
  };
45
44
 
@@ -50,33 +49,26 @@ const creditValidator = objectValidator({
50
49
  name: nameValidator,
51
50
  phone: phoneValidator,
52
51
  region: defaultValidator,
53
- department: defaultValidator,
54
52
  });
55
53
 
56
54
  export const ApplicationFormCredit = JSX<ApplicationFormsProps>(({ button, link, onSubmit }) => {
57
55
  const handleSubmit = useCallback(
58
56
  (formState: CreditFormState) => {
59
- const { amount, term, fullName, inn, name, phone, mail, region, department, annualRevenue } =
60
- formState;
57
+ const { amount, term, addressBranch, annualRevenue, ...usedFields } = formState;
61
58
 
62
59
  isValidationSuccess(creditValidator(formState)) &&
63
60
  onSubmit({
64
- typeForm: 'cred',
65
- fullName,
66
- inn,
67
- name,
68
- phone: formatPhone(phone),
69
- mail,
70
- region: region?.text || '',
71
- department: department?.text || '',
61
+ ...usedFields,
62
+ addressBranch: addressBranch?.text || '',
72
63
  partnerComments: `Сумма=${amount}/Срок=${term}/Выручка=${annualRevenue}`,
73
64
  });
74
65
  },
75
66
  [onSubmit],
76
67
  );
77
68
 
78
- const [formState, { field, ...formProps }] = useForm(initialFormState, handleSubmit);
79
- const branches = useBranches(formState.region?.key).filter((branch) => branch?.address);
69
+ const [formState, { field, ...formProps }] = useForm(initialFormState, {
70
+ onSubmit: handleSubmit,
71
+ });
80
72
 
81
73
  return (
82
74
  <form className={formStyle} onSubmit={formProps.onSubmit}>
@@ -87,15 +79,7 @@ export const ApplicationFormCredit = JSX<ApplicationFormsProps>(({ button, link,
87
79
  <RegionField field={field} />
88
80
  </div>
89
81
  <div className={formChildrenStyle}>
90
- <SelectControl
91
- label="Адрес"
92
- placeholder="Выберите адрес"
93
- options={branches.map(({ branchCode = '', address = '' }) => ({
94
- key: branchCode,
95
- text: address,
96
- }))}
97
- {...withValidator(field('department'), defaultValidator)}
98
- />
82
+ <AddressBranchField field={field} regionKey={formState.region?.key} />
99
83
  </div>
100
84
  </ApplicationFieldsetLayout>
101
85
  {renderSubmitButton(button)}
@@ -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 { useForm } from '../../hooks/useForm';
4
- import { formatPhone } from '../../utils/formatPhone';
4
+ import { type Option } from '../../ui-kit/Select/Option';
5
5
  import { objectValidator } from '../../validation/objectValidator';
6
6
  import { isValidationSuccess } from '../../validation/validator';
7
7
  import { withValidator } from '../../validation/withValidator';
@@ -15,11 +15,13 @@ import { renderSubmitButton } from './renderSubmitButton';
15
15
  import { nameValidator, phoneValidator } from './validators';
16
16
 
17
17
  interface DepositFormState {
18
+ typeForm: Option;
18
19
  name: string;
19
20
  phone: string;
20
21
  }
21
22
 
22
23
  const initialFormState: DepositFormState = {
24
+ typeForm: { key: 'dpst', text: 'Заявка на депозит' },
23
25
  name: '',
24
26
  phone: '',
25
27
  };
@@ -32,19 +34,15 @@ const depositValidator = objectValidator({
32
34
  export const ApplicationFormDeposit = JSX<ApplicationFormsProps>(({ button, link, onSubmit }) => {
33
35
  const handleSubmit = useCallback(
34
36
  (formState: DepositFormState) => {
35
- const { name, phone } = formState;
36
-
37
- isValidationSuccess(depositValidator(formState)) &&
38
- onSubmit({
39
- typeForm: 'dpst',
40
- name,
41
- phone: formatPhone(phone),
42
- });
37
+ isValidationSuccess(depositValidator(formState)) && onSubmit(formState);
43
38
  },
44
39
  [onSubmit],
45
40
  );
46
41
 
47
- const [, { field, ...formProps }] = useForm(initialFormState, handleSubmit);
42
+ const [, { field, ...formProps }] = useForm(initialFormState, {
43
+ onSubmit: handleSubmit,
44
+ resetOnSubmit: false,
45
+ });
48
46
 
49
47
  return (
50
48
  <form className={formStyle} onSubmit={formProps.onSubmit}>