@redneckz/wildless-cms-uni-blocks 0.14.779 → 0.14.788

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 (294) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +178 -122
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/bundle/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -1
  5. package/bundle/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +3 -2
  6. package/bundle/components/CalculatorDeposit/CalculatorDeposit.d.ts +1 -2
  7. package/bundle/components/CalculatorDeposit/CalculatorDepositContent.d.ts +31 -1
  8. package/bundle/components/CalculatorDeposit/getDepositCalculatorParams.d.ts +1 -27
  9. package/bundle/components/CalculatorDeposit/normalize.d.ts +2 -3
  10. package/bundle/components/CalculatorDeposit/renderDepositParamsForm.d.ts +3 -3
  11. package/bundle/components/CalculatorDeposit/renderRegistrationType.d.ts +1 -1
  12. package/bundle/retail/components/Fields/AddressCourierField.d.ts +9 -0
  13. package/bundle/retail/inputs.d.ts +77 -76
  14. package/bundle/retail/model/LeadFormState.d.ts +2 -2
  15. package/bundle/ui-kit/Calculator/getDefaultParams.d.ts +11 -2
  16. package/bundle/ui-kit/Calculator/renderBinaryRadioButtonGroup.d.ts +1 -2
  17. package/bundle/ui-kit/Calculator/setDefaultParamsCalc.d.ts +1 -1
  18. package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +2 -1
  19. package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  20. package/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -1
  21. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +3 -2
  22. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +10 -1
  23. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  24. package/dist/components/CalculatorBusinessDeposit/CalculatorBusinessDeposit.js +0 -3
  25. package/dist/components/CalculatorBusinessDeposit/CalculatorBusinessDeposit.js.map +1 -1
  26. package/dist/components/CalculatorCredit/CalculatorCredit.js +0 -2
  27. package/dist/components/CalculatorCredit/CalculatorCredit.js.map +1 -1
  28. package/dist/components/CalculatorDeposit/CalculatorDeposit.d.ts +1 -2
  29. package/dist/components/CalculatorDeposit/CalculatorDeposit.js +16 -7
  30. package/dist/components/CalculatorDeposit/CalculatorDeposit.js.map +1 -1
  31. package/dist/components/CalculatorDeposit/CalculatorDepositContent.d.ts +31 -1
  32. package/dist/components/CalculatorDeposit/getDepositCalculatorParams.d.ts +1 -27
  33. package/dist/components/CalculatorDeposit/getDepositCalculatorParams.js.map +1 -1
  34. package/dist/components/CalculatorDeposit/normalize.d.ts +2 -3
  35. package/dist/components/CalculatorDeposit/normalize.js.map +1 -1
  36. package/dist/components/CalculatorDeposit/renderDepositParamsForm.d.ts +3 -3
  37. package/dist/components/CalculatorDeposit/renderDepositParamsForm.js +30 -41
  38. package/dist/components/CalculatorDeposit/renderDepositParamsForm.js.map +1 -1
  39. package/dist/components/CalculatorDeposit/renderRegistrationType.d.ts +1 -1
  40. package/dist/components/CalculatorDeposit/renderRegistrationType.js +11 -7
  41. package/dist/components/CalculatorDeposit/renderRegistrationType.js.map +1 -1
  42. package/dist/components/CalculatorRefinancing/CalculatorRefinancing.js +1 -4
  43. package/dist/components/CalculatorRefinancing/CalculatorRefinancing.js.map +1 -1
  44. package/dist/retail/adaptors/getFamilyStatusAndIncomeData.js +1 -1
  45. package/dist/retail/adaptors/getFamilyStatusAndIncomeData.js.map +1 -1
  46. package/dist/retail/components/DocumentDialog/DocumentDialog.js +1 -1
  47. package/dist/retail/components/DocumentDialog/DocumentDialog.js.map +1 -1
  48. package/dist/retail/components/EsiaLoginDialog/EsiaLoginDialog.js +1 -1
  49. package/dist/retail/components/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
  50. package/dist/retail/components/Fields/AddressCourierField.d.ts +9 -0
  51. package/dist/retail/components/Fields/AddressCourierField.js +50 -0
  52. package/dist/retail/components/Fields/AddressCourierField.js.map +1 -0
  53. package/dist/retail/inputs.d.ts +77 -76
  54. package/dist/retail/inputs.js +6 -1
  55. package/dist/retail/inputs.js.map +1 -1
  56. package/dist/retail/model/LeadFormState.d.ts +2 -2
  57. package/dist/ui-kit/Calculator/Rate.js +1 -1
  58. package/dist/ui-kit/Calculator/Rate.js.map +1 -1
  59. package/dist/ui-kit/Calculator/getDefaultParams.d.ts +11 -2
  60. package/dist/ui-kit/Calculator/getDefaultParams.js +7 -1
  61. package/dist/ui-kit/Calculator/getDefaultParams.js.map +1 -1
  62. package/dist/ui-kit/Calculator/renderBinaryRadioButtonGroup.d.ts +1 -2
  63. package/dist/ui-kit/Calculator/renderBinaryRadioButtonGroup.js +1 -1
  64. package/dist/ui-kit/Calculator/renderBinaryRadioButtonGroup.js.map +1 -1
  65. package/dist/ui-kit/Calculator/renderPaymentType.js +2 -0
  66. package/dist/ui-kit/Calculator/renderPaymentType.js.map +1 -1
  67. package/dist/ui-kit/Calculator/renderPayout.js +2 -0
  68. package/dist/ui-kit/Calculator/renderPayout.js.map +1 -1
  69. package/dist/ui-kit/Calculator/setDefaultParamsCalc.d.ts +1 -1
  70. package/lib/common.css +1 -1
  71. package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +2 -1
  72. package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  73. package/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -1
  74. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +3 -2
  75. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +10 -1
  76. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  77. package/lib/components/CalculatorBusinessDeposit/CalculatorBusinessDeposit.js +0 -3
  78. package/lib/components/CalculatorBusinessDeposit/CalculatorBusinessDeposit.js.map +1 -1
  79. package/lib/components/CalculatorCredit/CalculatorCredit.js +0 -2
  80. package/lib/components/CalculatorCredit/CalculatorCredit.js.map +1 -1
  81. package/lib/components/CalculatorDeposit/CalculatorDeposit.d.ts +1 -2
  82. package/lib/components/CalculatorDeposit/CalculatorDeposit.fixture.d.ts +1 -0
  83. package/lib/components/CalculatorDeposit/CalculatorDeposit.js +17 -8
  84. package/lib/components/CalculatorDeposit/CalculatorDeposit.js.map +1 -1
  85. package/lib/components/CalculatorDeposit/CalculatorDepositContent.d.ts +31 -1
  86. package/lib/components/CalculatorDeposit/getDepositCalculatorParams.d.ts +1 -27
  87. package/lib/components/CalculatorDeposit/getDepositCalculatorParams.js.map +1 -1
  88. package/lib/components/CalculatorDeposit/normalize.d.ts +2 -3
  89. package/lib/components/CalculatorDeposit/normalize.js.map +1 -1
  90. package/lib/components/CalculatorDeposit/renderDepositParamsForm.d.ts +3 -3
  91. package/lib/components/CalculatorDeposit/renderDepositParamsForm.js +32 -43
  92. package/lib/components/CalculatorDeposit/renderDepositParamsForm.js.map +1 -1
  93. package/lib/components/CalculatorDeposit/renderRegistrationType.d.ts +1 -1
  94. package/lib/components/CalculatorDeposit/renderRegistrationType.js +11 -7
  95. package/lib/components/CalculatorDeposit/renderRegistrationType.js.map +1 -1
  96. package/lib/components/CalculatorRefinancing/CalculatorRefinancing.js +1 -4
  97. package/lib/components/CalculatorRefinancing/CalculatorRefinancing.js.map +1 -1
  98. package/lib/retail/adaptors/getFamilyStatusAndIncomeData.js +1 -1
  99. package/lib/retail/adaptors/getFamilyStatusAndIncomeData.js.map +1 -1
  100. package/lib/retail/components/DocumentDialog/DocumentDialog.js +1 -1
  101. package/lib/retail/components/DocumentDialog/DocumentDialog.js.map +1 -1
  102. package/lib/retail/components/EsiaLoginDialog/EsiaLoginDialog.js +1 -1
  103. package/lib/retail/components/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
  104. package/lib/retail/components/Fields/AddressCourierField.d.ts +9 -0
  105. package/lib/retail/components/Fields/AddressCourierField.js +48 -0
  106. package/lib/retail/components/Fields/AddressCourierField.js.map +1 -0
  107. package/lib/retail/inputs.d.ts +77 -76
  108. package/lib/retail/inputs.js +6 -1
  109. package/lib/retail/inputs.js.map +1 -1
  110. package/lib/retail/model/LeadFormState.d.ts +2 -2
  111. package/lib/ui-kit/Calculator/Rate.js +1 -1
  112. package/lib/ui-kit/Calculator/Rate.js.map +1 -1
  113. package/lib/ui-kit/Calculator/getDefaultParams.d.ts +11 -2
  114. package/lib/ui-kit/Calculator/getDefaultParams.js +7 -1
  115. package/lib/ui-kit/Calculator/getDefaultParams.js.map +1 -1
  116. package/lib/ui-kit/Calculator/renderBinaryRadioButtonGroup.d.ts +1 -2
  117. package/lib/ui-kit/Calculator/renderBinaryRadioButtonGroup.js +1 -1
  118. package/lib/ui-kit/Calculator/renderBinaryRadioButtonGroup.js.map +1 -1
  119. package/lib/ui-kit/Calculator/renderPaymentType.js +2 -0
  120. package/lib/ui-kit/Calculator/renderPaymentType.js.map +1 -1
  121. package/lib/ui-kit/Calculator/renderPayout.js +2 -0
  122. package/lib/ui-kit/Calculator/renderPayout.js.map +1 -1
  123. package/lib/ui-kit/Calculator/setDefaultParamsCalc.d.ts +1 -1
  124. package/mobile/bundle/bundle.umd.js +178 -122
  125. package/mobile/bundle/bundle.umd.min.js +1 -1
  126. package/mobile/bundle/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -1
  127. package/mobile/bundle/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +3 -2
  128. package/mobile/bundle/components/CalculatorDeposit/CalculatorDeposit.d.ts +1 -2
  129. package/mobile/bundle/components/CalculatorDeposit/CalculatorDepositContent.d.ts +31 -1
  130. package/mobile/bundle/components/CalculatorDeposit/getDepositCalculatorParams.d.ts +1 -27
  131. package/mobile/bundle/components/CalculatorDeposit/normalize.d.ts +2 -3
  132. package/mobile/bundle/components/CalculatorDeposit/renderDepositParamsForm.d.ts +3 -3
  133. package/mobile/bundle/components/CalculatorDeposit/renderRegistrationType.d.ts +1 -1
  134. package/mobile/bundle/retail/components/Fields/AddressCourierField.d.ts +9 -0
  135. package/mobile/bundle/retail/inputs.d.ts +77 -76
  136. package/mobile/bundle/retail/model/LeadFormState.d.ts +2 -2
  137. package/mobile/bundle/ui-kit/Calculator/getDefaultParams.d.ts +11 -2
  138. package/mobile/bundle/ui-kit/Calculator/renderBinaryRadioButtonGroup.d.ts +1 -2
  139. package/mobile/bundle/ui-kit/Calculator/setDefaultParamsCalc.d.ts +1 -1
  140. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +2 -1
  141. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  142. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -1
  143. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +3 -2
  144. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +10 -1
  145. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  146. package/mobile/dist/components/CalculatorBusinessDeposit/CalculatorBusinessDeposit.js +0 -3
  147. package/mobile/dist/components/CalculatorBusinessDeposit/CalculatorBusinessDeposit.js.map +1 -1
  148. package/mobile/dist/components/CalculatorCredit/CalculatorCredit.js +0 -2
  149. package/mobile/dist/components/CalculatorCredit/CalculatorCredit.js.map +1 -1
  150. package/mobile/dist/components/CalculatorDeposit/CalculatorDeposit.d.ts +1 -2
  151. package/mobile/dist/components/CalculatorDeposit/CalculatorDeposit.js +16 -7
  152. package/mobile/dist/components/CalculatorDeposit/CalculatorDeposit.js.map +1 -1
  153. package/mobile/dist/components/CalculatorDeposit/CalculatorDepositContent.d.ts +31 -1
  154. package/mobile/dist/components/CalculatorDeposit/getDepositCalculatorParams.d.ts +1 -27
  155. package/mobile/dist/components/CalculatorDeposit/getDepositCalculatorParams.js.map +1 -1
  156. package/mobile/dist/components/CalculatorDeposit/normalize.d.ts +2 -3
  157. package/mobile/dist/components/CalculatorDeposit/normalize.js.map +1 -1
  158. package/mobile/dist/components/CalculatorDeposit/renderDepositParamsForm.d.ts +3 -3
  159. package/mobile/dist/components/CalculatorDeposit/renderDepositParamsForm.js +30 -41
  160. package/mobile/dist/components/CalculatorDeposit/renderDepositParamsForm.js.map +1 -1
  161. package/mobile/dist/components/CalculatorDeposit/renderRegistrationType.d.ts +1 -1
  162. package/mobile/dist/components/CalculatorDeposit/renderRegistrationType.js +11 -7
  163. package/mobile/dist/components/CalculatorDeposit/renderRegistrationType.js.map +1 -1
  164. package/mobile/dist/components/CalculatorRefinancing/CalculatorRefinancing.js +1 -4
  165. package/mobile/dist/components/CalculatorRefinancing/CalculatorRefinancing.js.map +1 -1
  166. package/mobile/dist/retail/adaptors/getFamilyStatusAndIncomeData.js +1 -1
  167. package/mobile/dist/retail/adaptors/getFamilyStatusAndIncomeData.js.map +1 -1
  168. package/mobile/dist/retail/components/DocumentDialog/DocumentDialog.js +1 -1
  169. package/mobile/dist/retail/components/DocumentDialog/DocumentDialog.js.map +1 -1
  170. package/mobile/dist/retail/components/EsiaLoginDialog/EsiaLoginDialog.js +1 -1
  171. package/mobile/dist/retail/components/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
  172. package/mobile/dist/retail/components/Fields/AddressCourierField.d.ts +9 -0
  173. package/mobile/dist/retail/components/Fields/AddressCourierField.js +50 -0
  174. package/mobile/dist/retail/components/Fields/AddressCourierField.js.map +1 -0
  175. package/mobile/dist/retail/inputs.d.ts +77 -76
  176. package/mobile/dist/retail/inputs.js +6 -1
  177. package/mobile/dist/retail/inputs.js.map +1 -1
  178. package/mobile/dist/retail/model/LeadFormState.d.ts +2 -2
  179. package/mobile/dist/ui-kit/Calculator/Rate.js +1 -1
  180. package/mobile/dist/ui-kit/Calculator/Rate.js.map +1 -1
  181. package/mobile/dist/ui-kit/Calculator/getDefaultParams.d.ts +11 -2
  182. package/mobile/dist/ui-kit/Calculator/getDefaultParams.js +7 -1
  183. package/mobile/dist/ui-kit/Calculator/getDefaultParams.js.map +1 -1
  184. package/mobile/dist/ui-kit/Calculator/renderBinaryRadioButtonGroup.d.ts +1 -2
  185. package/mobile/dist/ui-kit/Calculator/renderBinaryRadioButtonGroup.js +1 -1
  186. package/mobile/dist/ui-kit/Calculator/renderBinaryRadioButtonGroup.js.map +1 -1
  187. package/mobile/dist/ui-kit/Calculator/renderPaymentType.js +2 -0
  188. package/mobile/dist/ui-kit/Calculator/renderPaymentType.js.map +1 -1
  189. package/mobile/dist/ui-kit/Calculator/renderPayout.js +2 -0
  190. package/mobile/dist/ui-kit/Calculator/renderPayout.js.map +1 -1
  191. package/mobile/dist/ui-kit/Calculator/setDefaultParamsCalc.d.ts +1 -1
  192. package/mobile/lib/common.css +1 -1
  193. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +2 -1
  194. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  195. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -1
  196. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +3 -2
  197. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +10 -1
  198. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  199. package/mobile/lib/components/CalculatorBusinessDeposit/CalculatorBusinessDeposit.js +0 -3
  200. package/mobile/lib/components/CalculatorBusinessDeposit/CalculatorBusinessDeposit.js.map +1 -1
  201. package/mobile/lib/components/CalculatorCredit/CalculatorCredit.js +0 -2
  202. package/mobile/lib/components/CalculatorCredit/CalculatorCredit.js.map +1 -1
  203. package/mobile/lib/components/CalculatorDeposit/CalculatorDeposit.d.ts +1 -2
  204. package/mobile/lib/components/CalculatorDeposit/CalculatorDeposit.js +17 -8
  205. package/mobile/lib/components/CalculatorDeposit/CalculatorDeposit.js.map +1 -1
  206. package/mobile/lib/components/CalculatorDeposit/CalculatorDepositContent.d.ts +31 -1
  207. package/mobile/lib/components/CalculatorDeposit/getDepositCalculatorParams.d.ts +1 -27
  208. package/mobile/lib/components/CalculatorDeposit/getDepositCalculatorParams.js.map +1 -1
  209. package/mobile/lib/components/CalculatorDeposit/normalize.d.ts +2 -3
  210. package/mobile/lib/components/CalculatorDeposit/normalize.js.map +1 -1
  211. package/mobile/lib/components/CalculatorDeposit/renderDepositParamsForm.d.ts +3 -3
  212. package/mobile/lib/components/CalculatorDeposit/renderDepositParamsForm.js +32 -43
  213. package/mobile/lib/components/CalculatorDeposit/renderDepositParamsForm.js.map +1 -1
  214. package/mobile/lib/components/CalculatorDeposit/renderRegistrationType.d.ts +1 -1
  215. package/mobile/lib/components/CalculatorDeposit/renderRegistrationType.js +11 -7
  216. package/mobile/lib/components/CalculatorDeposit/renderRegistrationType.js.map +1 -1
  217. package/mobile/lib/components/CalculatorRefinancing/CalculatorRefinancing.js +1 -4
  218. package/mobile/lib/components/CalculatorRefinancing/CalculatorRefinancing.js.map +1 -1
  219. package/mobile/lib/retail/adaptors/getFamilyStatusAndIncomeData.js +1 -1
  220. package/mobile/lib/retail/adaptors/getFamilyStatusAndIncomeData.js.map +1 -1
  221. package/mobile/lib/retail/components/DocumentDialog/DocumentDialog.js +1 -1
  222. package/mobile/lib/retail/components/DocumentDialog/DocumentDialog.js.map +1 -1
  223. package/mobile/lib/retail/components/EsiaLoginDialog/EsiaLoginDialog.js +1 -1
  224. package/mobile/lib/retail/components/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
  225. package/mobile/lib/retail/components/Fields/AddressCourierField.d.ts +9 -0
  226. package/mobile/lib/retail/components/Fields/AddressCourierField.js +48 -0
  227. package/mobile/lib/retail/components/Fields/AddressCourierField.js.map +1 -0
  228. package/mobile/lib/retail/inputs.d.ts +77 -76
  229. package/mobile/lib/retail/inputs.js +6 -1
  230. package/mobile/lib/retail/inputs.js.map +1 -1
  231. package/mobile/lib/retail/model/LeadFormState.d.ts +2 -2
  232. package/mobile/lib/ui-kit/Calculator/Rate.js +1 -1
  233. package/mobile/lib/ui-kit/Calculator/Rate.js.map +1 -1
  234. package/mobile/lib/ui-kit/Calculator/getDefaultParams.d.ts +11 -2
  235. package/mobile/lib/ui-kit/Calculator/getDefaultParams.js +7 -1
  236. package/mobile/lib/ui-kit/Calculator/getDefaultParams.js.map +1 -1
  237. package/mobile/lib/ui-kit/Calculator/renderBinaryRadioButtonGroup.d.ts +1 -2
  238. package/mobile/lib/ui-kit/Calculator/renderBinaryRadioButtonGroup.js +1 -1
  239. package/mobile/lib/ui-kit/Calculator/renderBinaryRadioButtonGroup.js.map +1 -1
  240. package/mobile/lib/ui-kit/Calculator/renderPaymentType.js +2 -0
  241. package/mobile/lib/ui-kit/Calculator/renderPaymentType.js.map +1 -1
  242. package/mobile/lib/ui-kit/Calculator/renderPayout.js +2 -0
  243. package/mobile/lib/ui-kit/Calculator/renderPayout.js.map +1 -1
  244. package/mobile/lib/ui-kit/Calculator/setDefaultParamsCalc.d.ts +1 -1
  245. package/mobile/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +2 -0
  246. package/mobile/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +2 -0
  247. package/mobile/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +13 -1
  248. package/mobile/src/components/CalculatorBusinessDeposit/CalculatorBusinessDeposit.tsx +0 -3
  249. package/mobile/src/components/CalculatorCredit/CalculatorCredit.tsx +0 -2
  250. package/mobile/src/components/CalculatorDeposit/CalculatorDeposit.tsx +38 -15
  251. package/mobile/src/components/CalculatorDeposit/CalculatorDepositContent.ts +41 -0
  252. package/mobile/src/components/CalculatorDeposit/getDepositCalculatorParams.ts +3 -39
  253. package/mobile/src/components/CalculatorDeposit/normalize.tsx +1 -2
  254. package/mobile/src/components/CalculatorDeposit/renderDepositParamsForm.tsx +65 -52
  255. package/mobile/src/components/CalculatorDeposit/renderRegistrationType.tsx +15 -8
  256. package/mobile/src/components/CalculatorRefinancing/CalculatorRefinancing.tsx +1 -4
  257. package/mobile/src/retail/adaptors/getFamilyStatusAndIncomeData.ts +1 -1
  258. package/mobile/src/retail/components/DocumentDialog/DocumentDialog.tsx +1 -1
  259. package/mobile/src/retail/components/EsiaLoginDialog/EsiaLoginDialog.tsx +8 -3
  260. package/mobile/src/retail/components/Fields/AddressCourierField.tsx +74 -0
  261. package/mobile/src/retail/inputs.tsx +10 -1
  262. package/mobile/src/retail/model/LeadFormState.ts +2 -2
  263. package/mobile/src/ui-kit/Calculator/Rate.tsx +1 -1
  264. package/mobile/src/ui-kit/Calculator/getDefaultParams.tsx +13 -6
  265. package/mobile/src/ui-kit/Calculator/renderBinaryRadioButtonGroup.tsx +2 -11
  266. package/mobile/src/ui-kit/Calculator/renderPaymentType.tsx +2 -0
  267. package/mobile/src/ui-kit/Calculator/renderPayout.tsx +2 -0
  268. package/mobile/src/ui-kit/Calculator/setDefaultParamsCalc.tsx +1 -1
  269. package/package.json +1 -1
  270. package/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +2 -0
  271. package/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +2 -0
  272. package/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +13 -1
  273. package/src/components/CalculatorBusinessDeposit/CalculatorBusinessDeposit.tsx +0 -3
  274. package/src/components/CalculatorCredit/CalculatorCredit.tsx +0 -2
  275. package/src/components/CalculatorDeposit/CalculatorDeposit.fixture.tsx +12 -0
  276. package/src/components/CalculatorDeposit/CalculatorDeposit.tsx +38 -15
  277. package/src/components/CalculatorDeposit/CalculatorDepositContent.ts +41 -0
  278. package/src/components/CalculatorDeposit/getDepositCalculatorParams.ts +3 -39
  279. package/src/components/CalculatorDeposit/normalize.tsx +1 -2
  280. package/src/components/CalculatorDeposit/renderDepositParamsForm.tsx +65 -52
  281. package/src/components/CalculatorDeposit/renderRegistrationType.tsx +15 -8
  282. package/src/components/CalculatorRefinancing/CalculatorRefinancing.tsx +1 -4
  283. package/src/retail/adaptors/getFamilyStatusAndIncomeData.ts +1 -1
  284. package/src/retail/components/DocumentDialog/DocumentDialog.tsx +1 -1
  285. package/src/retail/components/EsiaLoginDialog/EsiaLoginDialog.tsx +8 -3
  286. package/src/retail/components/Fields/AddressCourierField.tsx +74 -0
  287. package/src/retail/inputs.tsx +10 -1
  288. package/src/retail/model/LeadFormState.ts +2 -2
  289. package/src/ui-kit/Calculator/Rate.tsx +1 -1
  290. package/src/ui-kit/Calculator/getDefaultParams.tsx +13 -6
  291. package/src/ui-kit/Calculator/renderBinaryRadioButtonGroup.tsx +2 -11
  292. package/src/ui-kit/Calculator/renderPaymentType.tsx +2 -0
  293. package/src/ui-kit/Calculator/renderPayout.tsx +2 -0
  294. package/src/ui-kit/Calculator/setDefaultParamsCalc.tsx +1 -1
@@ -1,71 +1,84 @@
1
1
  import { type FormFieldRegisterer } from '../../hooks/useForm/useForm';
2
- import { renderBinaryRadioButtonGroup } from '../../ui-kit/Calculator/renderBinaryRadioButtonGroup';
2
+ import {
3
+ renderBinaryRadioButtonGroup,
4
+ type BinaryRadioButtonGroupProps,
5
+ } from '../../ui-kit/Calculator/renderBinaryRadioButtonGroup';
3
6
  import { renderPayout } from '../../ui-kit/Calculator/renderPayout';
4
7
  import { Checkbox } from '../../ui-kit/Checkbox/Checkbox';
5
- import { type CalculatorDepositParamsViewSettings } from './CalculatorDepositContent';
6
- import { type DepositCalculatorParams } from './getDepositCalculatorParams';
8
+ import { type Option } from '../../ui-kit/Select/Option';
9
+ import { Select, type SelectProps } from '../../ui-kit/Select/Select';
10
+ import { Text } from '../../ui-kit/Text/Text';
11
+ import {
12
+ type CalculatorDepositParamsViewSettings,
13
+ type DepositCalculatorParams,
14
+ } from './CalculatorDepositContent';
7
15
  import { renderRegistrationType } from './renderRegistrationType';
8
16
 
9
17
  export const renderDepositParamsForm = (
10
18
  params: DepositCalculatorParams & CalculatorDepositParamsViewSettings,
11
19
  field: FormFieldRegisterer<any>,
20
+ extraPercents?: Option[],
12
21
  ) => {
13
22
  const isCurrency = params?.currency?.key !== 'rub';
14
23
 
15
24
  return (
16
- <div className="grid gap-lg">
17
- <div className="flex gap-lg">
18
- {params.isShowReplenish
19
- ? renderBinaryRadioButtonGroup({
20
- title: 'Пополнение',
21
- ...field('isReplenish'),
22
- value: params.isReplenish,
23
- orientation: 'vertical',
24
- items: [
25
- { id: 'withReplenish', text: 'С пополнением' },
26
- { id: 'withoutReplenish', text: 'Без пополнения' },
27
- ],
28
- disabled: isCurrency,
29
- })
30
- : null}
31
- {params.isShowWithdrawn
32
- ? renderBinaryRadioButtonGroup({
33
- title: 'Снятие',
34
- ...field('isWithdrawn'),
35
- value: params.isWithdrawn,
36
- orientation: 'vertical',
37
- items: [
38
- { id: 'wthDrawn', text: 'Со снятием' },
39
- { id: 'noWithdrawn', text: 'Без снятия' },
40
- ],
41
- disabled: isCurrency,
42
- })
43
- : null}
44
- </div>
25
+ <div className="grid grid-cols-2 gap-lg">
26
+ {renderReplenish(field('isReplenish'), params, isCurrency)}
27
+ {renderWithdrawn(field('isWithdrawn'), params, isCurrency)}
45
28
  {renderSeparator(params.isShowReplenish || params.isShowWithdrawn)}
46
- <div className="flex gap-lg">
47
- {params.isShowMonthlyInterestPayment
48
- ? renderPayout({
49
- title: 'Выплата процентов',
50
- ...field('isMonthlyInterestPayment'),
51
- value: params.isMonthlyInterestPayment,
52
- orientation: 'vertical',
53
- })
54
- : null}
55
- {params.isShowRemoteRegistration
56
- ? renderRegistrationType({
57
- title: 'Оформление',
58
- ...field('isRemoteRegistration'),
59
- value: params.isRemoteRegistration,
60
- orientation: 'vertical',
61
- })
62
- : null}
63
- </div>
64
- {renderSeparator(params.isShowNewClient)}
29
+ {params.isShowMonthlyInterestPayment ? renderPayout(field('isMonthlyInterestPayment')) : null}
30
+ {renderRegistrationType(field('isRemoteRegistration'), params.isShowRemoteRegistration)}
31
+ {renderExtraPercents(field('extraPercent'), extraPercents)}
65
32
  {params.isShowNewClient ? <Checkbox text="Новый вкладчик" {...field('isNewClient')} /> : null}
66
33
  </div>
67
34
  );
68
35
  };
69
36
 
37
+ const renderReplenish = (
38
+ props: Partial<BinaryRadioButtonGroupProps>,
39
+ params: DepositCalculatorParams & CalculatorDepositParamsViewSettings,
40
+ isCurrency = false,
41
+ ) =>
42
+ params.isShowReplenish
43
+ ? renderBinaryRadioButtonGroup({
44
+ ...props,
45
+ title: 'Пополнение',
46
+ orientation: 'vertical',
47
+ items: [
48
+ { id: 'withReplenish', text: 'С пополнением' },
49
+ { id: 'withoutReplenish', text: 'Без пополнения' },
50
+ ],
51
+ disabled: isCurrency,
52
+ })
53
+ : null;
54
+
55
+ const renderWithdrawn = (
56
+ props: Partial<BinaryRadioButtonGroupProps>,
57
+ params: DepositCalculatorParams & CalculatorDepositParamsViewSettings,
58
+ isCurrency = false,
59
+ ) =>
60
+ params.isShowWithdrawn
61
+ ? renderBinaryRadioButtonGroup({
62
+ ...props,
63
+ title: 'Снятие',
64
+ orientation: 'vertical',
65
+ items: [
66
+ { id: 'wthDrawn', text: 'Со снятием' },
67
+ { id: 'noWithdrawn', text: 'Без снятия' },
68
+ ],
69
+ disabled: isCurrency,
70
+ })
71
+ : null;
72
+
70
73
  const renderSeparator = (isShow = false) =>
71
- isShow ? <div className="border-b border-main-divider w-full"></div> : null;
74
+ isShow ? <div className="border-b border-main-divider col-span-2 w-full"></div> : null;
75
+
76
+ const renderExtraPercents = (props: Partial<SelectProps>, extraPercents?: Option[]) =>
77
+ extraPercents?.length ? (
78
+ <div className="w-full space-y-s col-span-2">
79
+ <Text color="text-secondary-text" font="font-light">
80
+ Надбавка за операции по карте
81
+ </Text>
82
+ <Select options={extraPercents} {...props} />
83
+ </div>
84
+ ) : null;
@@ -3,11 +3,18 @@ import {
3
3
  type BinaryRadioButtonGroupProps,
4
4
  } from '../../ui-kit/Calculator/renderBinaryRadioButtonGroup';
5
5
 
6
- export const renderRegistrationType = (props: Partial<BinaryRadioButtonGroupProps>) =>
7
- renderBinaryRadioButtonGroup({
8
- ...props,
9
- items: [
10
- { id: 'remote', text: 'Дистанционно' },
11
- { id: 'office', text: 'Офис Банка' },
12
- ],
13
- });
6
+ export const renderRegistrationType = (
7
+ props: Partial<BinaryRadioButtonGroupProps>,
8
+ isShow = false,
9
+ ) =>
10
+ isShow
11
+ ? renderBinaryRadioButtonGroup({
12
+ ...props,
13
+ title: 'Оформление',
14
+ orientation: 'vertical',
15
+ items: [
16
+ { id: 'remote', text: 'Дистанционно' },
17
+ { id: 'office', text: 'Офис Банка' },
18
+ ],
19
+ })
20
+ : null;
@@ -57,9 +57,6 @@ export const CalculatorRefinancing = UniBlock<RefinancingCalculatorProp>(
57
57
  );
58
58
 
59
59
  const paymentTypeElement = renderPaymentType({
60
- title: '',
61
- mobileTitle: 'Тип платежа',
62
- orientation: 'vertical',
63
60
  ...field('isAnnuity'),
64
61
  });
65
62
 
@@ -114,7 +111,7 @@ export const CalculatorRefinancing = UniBlock<RefinancingCalculatorProp>(
114
111
  postfix="₽"
115
112
  />
116
113
  {calcParams.benefit > 0 ? (
117
- <CalculatorValue title={'Выгода в месяц'} value={calcParams.benefit} postfix="₽" />
114
+ <CalculatorValue title="Выгода в месяц" value={calcParams.benefit} postfix="₽" />
118
115
  ) : null}
119
116
  <div className="hidden sm:block mb-lg">{paymentTypeElement}</div>
120
117
  {renderButtonsSection(buttons, { isVertical: true })}
@@ -44,4 +44,4 @@ export const getFamilyStatusAndIncomeData = (formData: LeadFormState): Partial<P
44
44
  };
45
45
 
46
46
  export const countIncomeAverage = (wages?: number, retirementIncome?: number) =>
47
- Number(wages) + Number(retirementIncome);
47
+ Number(wages ?? 0) + Number(retirementIncome ?? 0);
@@ -13,7 +13,7 @@ export const DocumentDialog = JSX<DocumentDialogProps>(({ src, onClose, onDocume
13
13
  const isMobileMode = useMobileMode();
14
14
 
15
15
  return (
16
- <Dialog className="my-6xl max-w-4xl mx-auto px-0 min-h-0 pb-0" onClose={onClose}>
16
+ <Dialog className="my-6xl max-w-4xl mx-auto px-0 min-h-0 pb-0 z-[101]" onClose={onClose}>
17
17
  {isMobileMode ? (
18
18
  <img src={src} />
19
19
  ) : (
@@ -45,11 +45,16 @@ export const EsiaLoginDialog = JSX<EsiaLoginDialogProps>(({ onClose }) => {
45
45
  </ul>
46
46
  <Img image={{ icon: 'GosUslugiIcon', iconVersion: 'normal' }} height="70" />
47
47
  </div>
48
- <div className="flex flex-wrap gap-lg w-full">
49
- <Button type="button" onClick={handleAuth}>
48
+ <div className="@container flex flex-wrap gap-lg w-full">
49
+ <Button type="button" onClick={handleAuth} className="w-full md:w-auto">
50
50
  Заполнить через Госуслуги
51
51
  </Button>
52
- <Button type="button" version="secondary" onClick={handleClose}>
52
+ <Button
53
+ type="button"
54
+ version="secondary"
55
+ onClick={handleClose}
56
+ className="w-full md:w-auto"
57
+ >
53
58
  Пропустить
54
59
  </Button>
55
60
  </div>
@@ -0,0 +1,74 @@
1
+ import { useCallback, useEffect, useState } from '@redneckz/uni-jsx/lib/hooks';
2
+ import { type JSONRefObject } from '../../../data/JSONRefObject';
3
+ import { type CustomFieldProps } from '../../../ui-kit/FormField/CustomFieldProps';
4
+ import { UniBlock } from '../../../UniBlock/UniBlock';
5
+ import { type UniBlockProps } from '../../../UniBlock/UniBlockProps';
6
+ import { type DaDataSuggestion } from '../../api/dadataHints/dadataHintsType';
7
+ import { DaDataInputControl } from '../DaDataInputControl/DaDataInputControl';
8
+ import { getAddressFromDaDataItem } from './AddressField';
9
+
10
+ export interface AddressCourierFieldProps extends CustomFieldProps, UniBlockProps {
11
+ source?: JSONRefObject & {
12
+ deliveryCities?: string[];
13
+ };
14
+ }
15
+
16
+ export const AddressCourierField = UniBlock<AddressCourierFieldProps>(
17
+ ({ field, input, source }) => {
18
+ const [errorCity, setErrorCity] = useState('');
19
+ const fieldValue = field('addressCourier')?.value;
20
+ const currentLocality = fieldValue?.locality;
21
+ const currentCity = fieldValue?.city;
22
+
23
+ useEffect(() => {
24
+ if (
25
+ (currentCity || currentLocality) &&
26
+ !source?.deliveryCities?.includes(currentCity as string)
27
+ ) {
28
+ field?.('addressCourier')?.onChange?.({
29
+ ...fieldValue,
30
+ house: '',
31
+ });
32
+ setErrorCity('Город недоступен для доставки');
33
+ } else {
34
+ setErrorCity('');
35
+ }
36
+ }, [currentCity, currentLocality, source]);
37
+
38
+ const onDaDataChange = useCallback((item: DaDataSuggestion) => {
39
+ field?.('addressCourier')?.onChange?.(getAddressFromDaDataItem(item));
40
+ }, []);
41
+
42
+ const onChange = useCallback((value: string) => {
43
+ field?.('addressCourier')?.onChange?.({
44
+ apartment: '',
45
+ city: '',
46
+ district: '',
47
+ fullAddress: value,
48
+ fiasCode: '',
49
+ house: '',
50
+ locality: '',
51
+ okatoRegionCode: '',
52
+ postcode: '',
53
+ region: '',
54
+ regionCode: '',
55
+ street: '',
56
+ qc: '',
57
+ qcComplete: '',
58
+ qcHouse: '',
59
+ });
60
+ }, []);
61
+
62
+ return (
63
+ <DaDataInputControl
64
+ label="Адрес"
65
+ {...field('addressCourier')}
66
+ value={fieldValue?.fullAddress}
67
+ onChange={onChange}
68
+ {...input}
69
+ error={errorCity || field('addressCourier')?.error}
70
+ onDaDataChange={onDaDataChange}
71
+ />
72
+ );
73
+ },
74
+ );
@@ -1,4 +1,7 @@
1
+ /* eslint-disable max-lines */
2
+ import { type CustomFieldProps } from '../ui-kit/FormField/CustomFieldProps';
1
3
  import { PhoneField } from '../ui-kit/FormField/Fields/PhoneField';
4
+ import { AddressCourierField } from './components/Fields/AddressCourierField';
2
5
  import { AddressFactField } from './components/Fields/AddressFactField';
3
6
  import { AddressField } from './components/Fields/AddressField';
4
7
  import { AddressMatchField } from './components/Fields/AddressMatchField';
@@ -65,6 +68,10 @@ import { SurnameField } from './components/Fields/SurnameField';
65
68
  import { TotalIncomeField } from './components/Fields/TotalIncomeField';
66
69
  import { WagesField } from './components/Fields/WagesField';
67
70
 
71
+ const DELIVERY_CITIES_REF = {
72
+ $ref: '/wcms-resources/delivery-cities-data.json',
73
+ };
74
+
68
75
  export const InputsApplicationLeadMap = {
69
76
  limitedBirthday: LimitedBirthdayField,
70
77
  name: NameField,
@@ -142,7 +149,9 @@ export const InputsRetailMap = {
142
149
  };
143
150
 
144
151
  export const InputRetailCardMap = {
145
- addressCourier: AddressField,
152
+ addressCourier: (props: CustomFieldProps) => (
153
+ <AddressCourierField {...props} source={DELIVERY_CITIES_REF} />
154
+ ),
146
155
  paymentSystem: PaymentSystemField,
147
156
  currency: CurrencyField,
148
157
  cardCategory: CardCategoryField,
@@ -57,7 +57,7 @@ export interface Address {
57
57
  qcHouse?: string;
58
58
  }
59
59
 
60
- export interface Calculator {
60
+ export interface CalculatorProps {
61
61
  moneyValue?: number;
62
62
  monthsValue?: number;
63
63
  isAnnuity?: boolean;
@@ -164,7 +164,7 @@ export interface LeadFormState extends FormRetailConsents, FormStateDeliveryType
164
164
  cardCategory?: Option;
165
165
  codeWord?: string;
166
166
  esiaAccountTypeCd?: Option;
167
- calculator?: Calculator;
167
+ calculator?: CalculatorProps;
168
168
  addressRetail?: Option;
169
169
  loanAmount?: number;
170
170
  creditPeriod?: number;
@@ -28,7 +28,7 @@ export const Rate = JSX<RateProps>(
28
28
  {title}
29
29
  </Text>
30
30
  <div className="relative">
31
- <div className="flex @xl:justify-center gradient-color-text">
31
+ <div className="flex @xl:justify-center gradient-color-text gap-xs">
32
32
  <span className="font-mohave text-title-huge -mt-m tracking-[-15px]">
33
33
  {toLocalNumberFormat(fractionDigits, { fixed: true })(rate)}
34
34
  </span>
@@ -1,4 +1,5 @@
1
- import { type DepositCalculatorSourceBookParams } from '../../components/CalculatorDeposit/getDepositCalculatorParams';
1
+ import { type DepositCalculatorSourceBookParams } from '../../components/CalculatorDeposit/CalculatorDepositContent';
2
+ import { type Option } from '../Select/Option';
2
3
  import { type CalcDefaultParamsProps } from './CalculatorProps';
3
4
 
4
5
  export const getDefaultParamsMin = (rateRows?: CalcDefaultParamsProps[]) =>
@@ -9,11 +10,17 @@ export const getDefaultParamsMin = (rateRows?: CalcDefaultParamsProps[]) =>
9
10
  export const getDefaultParamsMax = (
10
11
  rateRows: DepositCalculatorSourceBookParams[] = [],
11
12
  isNewClient = false,
12
- ) =>
13
- getDefaultParams(
14
- [(i: number, acc: number) => i > acc, (i, prev) => i?.minSum < prev?.minSum],
15
- rateRows?.filter((_) => isNewClient === Boolean(_?.isNewClient)),
16
- );
13
+ extraPercents: Option[] = [],
14
+ ) => {
15
+ return {
16
+ ...getDefaultParams(
17
+ [(i: number, acc: number) => i > acc, (i, prev) => i?.minSum < prev?.minSum],
18
+ rateRows?.filter((_) => isNewClient === Boolean(_?.isNewClient)),
19
+ ),
20
+ extraPercent: extraPercents.at(-1),
21
+ extraPercents,
22
+ };
23
+ };
17
24
 
18
25
  const getDefaultParams = (
19
26
  comparators: [
@@ -8,7 +8,6 @@ import { Text } from '../../ui-kit/Text/Text';
8
8
  export interface BinaryRadioButtonGroupProps {
9
9
  items: [truthy: RadioButtonItem, falsy: RadioButtonItem];
10
10
  title?: string;
11
- mobileTitle?: string;
12
11
  orientation?: ListOrientation;
13
12
  value?: boolean;
14
13
  className?: string;
@@ -19,27 +18,19 @@ export interface BinaryRadioButtonGroupProps {
19
18
  export const renderBinaryRadioButtonGroup = ({
20
19
  items,
21
20
  title,
22
- mobileTitle = title,
23
21
  orientation = 'horizontal',
24
22
  value,
25
23
  onChange,
26
24
  ...rest
27
25
  }: BinaryRadioButtonGroupProps) => (
28
- <div className="grid gap-s whitespace-nowrap">
26
+ <div className="grid gap-s whitespace-nowrap lg:sm:col-span-1 col-span-2">
29
27
  {title ? (
30
- <div className="hidden @5xl:block" role="radiogroup" aria-label={title}>
28
+ <div role="radiogroup" aria-label={title}>
31
29
  <Text color="text-secondary-text" font="font-light">
32
30
  {title}
33
31
  </Text>
34
32
  </div>
35
33
  ) : null}
36
- {mobileTitle ? (
37
- <div className="@5xl:hidden" role="radiogroup" aria-label={mobileTitle}>
38
- <Text color="text-secondary-text" font="font-light">
39
- {mobileTitle}
40
- </Text>
41
- </div>
42
- ) : null}
43
34
 
44
35
  <RadioButtonGroup
45
36
  orientation={orientation}
@@ -6,6 +6,8 @@ import {
6
6
  export const renderPaymentType = (props: Partial<BinaryRadioButtonGroupProps>) =>
7
7
  renderBinaryRadioButtonGroup({
8
8
  ...props,
9
+ title: 'Тип платежа',
10
+ orientation: 'vertical',
9
11
  className: 'sm:flex-col',
10
12
  items: [
11
13
  { id: 'annuity', text: 'Аннуитетный' },
@@ -6,6 +6,8 @@ import {
6
6
  export const renderPayout = (props: Partial<BinaryRadioButtonGroupProps>) =>
7
7
  renderBinaryRadioButtonGroup({
8
8
  ...props,
9
+ title: 'Выплата процентов',
10
+ orientation: 'vertical',
9
11
  items: [
10
12
  { id: 'everyMonth', text: 'Ежемесячно' },
11
13
  { id: 'atEndTerm', text: 'В конце срока' },
@@ -5,7 +5,7 @@ import {
5
5
  import {
6
6
  type DepositCalculatorParams,
7
7
  type DepositCalculatorSourceBookParams,
8
- } from '../../components/CalculatorDeposit/getDepositCalculatorParams';
8
+ } from '../../components/CalculatorDeposit/CalculatorDepositContent';
9
9
  import { type FormFieldRegisterer } from '../../hooks/useForm/useForm';
10
10
  import { clamp } from '../../utils/clamp';
11
11
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redneckz/wildless-cms-uni-blocks",
3
- "version": "0.14.779",
3
+ "version": "0.14.788",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "author": "ЦК",
@@ -29,6 +29,7 @@ export const ApplicationLeadForm = JSX<ApplicationLeadFormProps>(
29
29
  nextStepLink = '/credit-lead',
30
30
  button,
31
31
  productType = 'credit',
32
+ data,
32
33
  ...rest
33
34
  }) => {
34
35
  const applicationFormData = useMemo(() => getApplicationFormData(productType), [productType]);
@@ -48,6 +49,7 @@ export const ApplicationLeadForm = JSX<ApplicationLeadFormProps>(
48
49
  programId,
49
50
  nextStepLink,
50
51
  productType,
52
+ data,
51
53
  });
52
54
 
53
55
  const [, { field, onSubmit }] = useForm(initialFormState, {
@@ -1,3 +1,4 @@
1
+ import { type AspectsProps } from '../../model/AspectsProps';
1
2
  import { type TextProps, type TitleProps } from '../../model/HeadlineType';
2
3
  import { type LinkButtonVersion } from '../../model/LinkButtonVersion';
3
4
  import { type InputRetailSectionsType } from '../../retail/model/InputSectionsType';
@@ -13,6 +14,7 @@ export type ProductType = 'credit' | 'creditCard' | 'debitCard';
13
14
  * @title Форма заявки настраиваемая
14
15
  */
15
16
  export type ApplicationLeadFormContent = UniBlockContent &
17
+ AspectsProps &
16
18
  TitleProps &
17
19
  InputRetailSectionsType & {
18
20
  /** @title Кнопка */
@@ -1,6 +1,9 @@
1
1
  /* eslint-disable max-lines */
2
2
  import { useCallback, useState } from '@redneckz/uni-jsx/lib/hooks';
3
3
  import { useBool } from '@redneckz/uni-jsx/lib/hooks/useBool';
4
+ import { handleAspects } from '../../hooks/useAspects/handleAspects';
5
+ import { useAspects } from '../../hooks/useAspects/useAspects';
6
+ import { type AspectsProps } from '../../model/AspectsProps';
4
7
  import { createDraftTask } from '../../retail/api/createDraftTask';
5
8
  import { createUserProfile } from '../../retail/api/createUserProfile';
6
9
  import { createUserTaskDebit } from '../../retail/api/createUserTaskDebit';
@@ -15,26 +18,30 @@ import { VerifyPhoneDialog } from '../../retail/components/VerifyPhoneDialog/Ver
15
18
  import { type FormRetailConsents, type LeadFormState } from '../../retail/model/LeadFormState';
16
19
  import { getUpdateUserProfileData } from '../../retail/utils/getUpdateUserProfile';
17
20
  import { useDialog } from '../../ui-kit/DialogManager/useDialog';
21
+ import { type PreventableEventWithTarget } from '../../ui-kit/PreventableEvent';
18
22
  import { formatPhone } from '../../utils/formatPhone';
19
23
  import { type ProductType } from './ApplicationLeadFormContent';
20
24
  import { productTypeToConsentsMap } from './consents';
21
25
  import { getCreditLeadFormTaskData, getDebitLeadFormTaskData } from './getLeadFormTaskData';
22
26
  import { useSaveUserData, type UserData } from './useSaveUserData';
23
27
 
24
- interface ApplicationLeadApiProps {
28
+ interface ApplicationLeadApiProps extends AspectsProps {
25
29
  programId: string;
26
30
  nextStepLink: string;
27
31
  productType: ProductType;
28
32
  }
29
33
 
34
+ // eslint-disable-next-line max-lines-per-function
30
35
  export const useApplicationLeadApi = ({
31
36
  programId,
32
37
  nextStepLink,
33
38
  productType,
39
+ data,
34
40
  }: ApplicationLeadApiProps) => {
35
41
  const [isSending, { setTrue: startSending, setFalse: endSending }] = useBool(false);
36
42
  const [ok, setOK] = useState<boolean | undefined>();
37
43
  const saveUserData = useSaveUserData();
44
+ const aspects = useAspects();
38
45
 
39
46
  const openEsiaLoginDialog = useEsiaLoginDialog(nextStepLink);
40
47
  const consentBkiDialog = useConsentBkiDialog(openEsiaLoginDialog);
@@ -57,6 +64,11 @@ export const useApplicationLeadApi = ({
57
64
  productType,
58
65
  saveUserData,
59
66
  });
67
+ handleAspects({
68
+ aspectsAttributes: data,
69
+ aspects,
70
+ ev: {} as PreventableEventWithTarget,
71
+ });
60
72
  verifyPhoneDialog.close();
61
73
  if (productType === 'debitCard') {
62
74
  openEsiaLoginDialog();
@@ -77,10 +77,7 @@ export const CalculatorBusinessDeposit = UniBlock<CalculatorBusinessDepositProp>
77
77
  <div className="flex flex-col sm:flex-row gap-y-m gap-x-5xl">
78
78
  {renderBusinessDepositParamsForm(calculatorParams, field)}
79
79
  {renderPayout({
80
- title: 'Выплата процентов',
81
- orientation: 'vertical',
82
80
  ...field('isMonthlyInterestPayment'),
83
- className: 'sm:flex-col',
84
81
  })}
85
82
  </div>
86
83
  </div>
@@ -78,8 +78,6 @@ export const CalculatorCredit = UniBlock<CalculatorDepositProps>(
78
78
 
79
79
  const calcParams = getCreditCalculatorParams(userInputParams, calcSource, paramsViewSettings);
80
80
  const paymentTypeElement = renderPaymentType({
81
- title: 'Тип платежа',
82
- orientation: 'vertical',
83
81
  ...field('isAnnuity'),
84
82
  });
85
83
  const { onChange: setMoneyValue } = field('moneyValue');
@@ -97,4 +97,16 @@ export default {
97
97
  <PopupManager />
98
98
  </div>
99
99
  ),
100
+ extraPercents: (
101
+ <div className="container grid grid-cols-12">
102
+ <CalculatorDeposit
103
+ {...calculator}
104
+ title="Калькулятор с задаными дефолтными значениями"
105
+ paramsViewSettings={{
106
+ isShowReplenish: true,
107
+ }}
108
+ />
109
+ <PopupManager />
110
+ </div>
111
+ ),
100
112
  };