@redneckz/wildless-cms-uni-blocks 0.14.778 → 0.14.787

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 +179 -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/components/Header/useChatBot.js +2 -1
  45. package/dist/components/Header/useChatBot.js.map +1 -1
  46. package/dist/retail/adaptors/getFamilyStatusAndIncomeData.js +1 -1
  47. package/dist/retail/adaptors/getFamilyStatusAndIncomeData.js.map +1 -1
  48. package/dist/retail/components/DocumentDialog/DocumentDialog.js +1 -1
  49. package/dist/retail/components/DocumentDialog/DocumentDialog.js.map +1 -1
  50. package/dist/retail/components/EsiaLoginDialog/EsiaLoginDialog.js +1 -1
  51. package/dist/retail/components/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
  52. package/dist/retail/components/Fields/AddressCourierField.d.ts +9 -0
  53. package/dist/retail/components/Fields/AddressCourierField.js +50 -0
  54. package/dist/retail/components/Fields/AddressCourierField.js.map +1 -0
  55. package/dist/retail/inputs.d.ts +77 -76
  56. package/dist/retail/inputs.js +6 -1
  57. package/dist/retail/inputs.js.map +1 -1
  58. package/dist/retail/model/LeadFormState.d.ts +2 -2
  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/components/Header/useChatBot.js +2 -1
  99. package/lib/components/Header/useChatBot.js.map +1 -1
  100. package/lib/retail/adaptors/getFamilyStatusAndIncomeData.js +1 -1
  101. package/lib/retail/adaptors/getFamilyStatusAndIncomeData.js.map +1 -1
  102. package/lib/retail/components/DocumentDialog/DocumentDialog.js +1 -1
  103. package/lib/retail/components/DocumentDialog/DocumentDialog.js.map +1 -1
  104. package/lib/retail/components/EsiaLoginDialog/EsiaLoginDialog.js +1 -1
  105. package/lib/retail/components/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
  106. package/lib/retail/components/Fields/AddressCourierField.d.ts +9 -0
  107. package/lib/retail/components/Fields/AddressCourierField.js +48 -0
  108. package/lib/retail/components/Fields/AddressCourierField.js.map +1 -0
  109. package/lib/retail/inputs.d.ts +77 -76
  110. package/lib/retail/inputs.js +6 -1
  111. package/lib/retail/inputs.js.map +1 -1
  112. package/lib/retail/model/LeadFormState.d.ts +2 -2
  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 +177 -121
  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/components/Header/useChatBot.js +2 -1
  167. package/mobile/dist/components/Header/useChatBot.js.map +1 -1
  168. package/mobile/dist/retail/adaptors/getFamilyStatusAndIncomeData.js +1 -1
  169. package/mobile/dist/retail/adaptors/getFamilyStatusAndIncomeData.js.map +1 -1
  170. package/mobile/dist/retail/components/DocumentDialog/DocumentDialog.js +1 -1
  171. package/mobile/dist/retail/components/DocumentDialog/DocumentDialog.js.map +1 -1
  172. package/mobile/dist/retail/components/EsiaLoginDialog/EsiaLoginDialog.js +1 -1
  173. package/mobile/dist/retail/components/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
  174. package/mobile/dist/retail/components/Fields/AddressCourierField.d.ts +9 -0
  175. package/mobile/dist/retail/components/Fields/AddressCourierField.js +50 -0
  176. package/mobile/dist/retail/components/Fields/AddressCourierField.js.map +1 -0
  177. package/mobile/dist/retail/inputs.d.ts +77 -76
  178. package/mobile/dist/retail/inputs.js +6 -1
  179. package/mobile/dist/retail/inputs.js.map +1 -1
  180. package/mobile/dist/retail/model/LeadFormState.d.ts +2 -2
  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/components/Header/useChatBot.js +2 -1
  220. package/mobile/lib/components/Header/useChatBot.js.map +1 -1
  221. package/mobile/lib/retail/adaptors/getFamilyStatusAndIncomeData.js +1 -1
  222. package/mobile/lib/retail/adaptors/getFamilyStatusAndIncomeData.js.map +1 -1
  223. package/mobile/lib/retail/components/DocumentDialog/DocumentDialog.js +1 -1
  224. package/mobile/lib/retail/components/DocumentDialog/DocumentDialog.js.map +1 -1
  225. package/mobile/lib/retail/components/EsiaLoginDialog/EsiaLoginDialog.js +1 -1
  226. package/mobile/lib/retail/components/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
  227. package/mobile/lib/retail/components/Fields/AddressCourierField.d.ts +9 -0
  228. package/mobile/lib/retail/components/Fields/AddressCourierField.js +48 -0
  229. package/mobile/lib/retail/components/Fields/AddressCourierField.js.map +1 -0
  230. package/mobile/lib/retail/inputs.d.ts +77 -76
  231. package/mobile/lib/retail/inputs.js +6 -1
  232. package/mobile/lib/retail/inputs.js.map +1 -1
  233. package/mobile/lib/retail/model/LeadFormState.d.ts +2 -2
  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/components/Header/useChatBot.ts +3 -2
  258. package/mobile/src/retail/adaptors/getFamilyStatusAndIncomeData.ts +1 -1
  259. package/mobile/src/retail/components/DocumentDialog/DocumentDialog.tsx +1 -1
  260. package/mobile/src/retail/components/EsiaLoginDialog/EsiaLoginDialog.tsx +8 -3
  261. package/mobile/src/retail/components/Fields/AddressCourierField.tsx +74 -0
  262. package/mobile/src/retail/inputs.tsx +10 -1
  263. package/mobile/src/retail/model/LeadFormState.ts +2 -2
  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/components/Header/useChatBot.ts +3 -2
  284. package/src/retail/adaptors/getFamilyStatusAndIncomeData.ts +1 -1
  285. package/src/retail/components/DocumentDialog/DocumentDialog.tsx +1 -1
  286. package/src/retail/components/EsiaLoginDialog/EsiaLoginDialog.tsx +8 -3
  287. package/src/retail/components/Fields/AddressCourierField.tsx +74 -0
  288. package/src/retail/inputs.tsx +10 -1
  289. package/src/retail/model/LeadFormState.ts +2 -2
  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,7 +1,7 @@
1
1
  /* eslint-disable max-lines, max-lines-per-function */
2
2
  import { useCallback, useEffect } from '@redneckz/uni-jsx/lib/hooks';
3
3
  import { type JSONRefObject } from '../../data/JSONRefObject';
4
- import { useForm } from '../../hooks/useForm/useForm';
4
+ import { useForm, type FormFieldRegisterer } from '../../hooks/useForm/useForm';
5
5
  import { Button } from '../../ui-kit/Button/Button';
6
6
  import { CalculatorLayout } from '../../ui-kit/Calculator/CalculatorLayout';
7
7
  import { CalculatorStyle } from '../../ui-kit/Calculator/CalculatorStyle';
@@ -20,13 +20,14 @@ import { UniBlock } from '../../UniBlock/UniBlock';
20
20
  import { type UniBlockProps } from '../../UniBlock/UniBlockProps';
21
21
  import { style } from '../../utils/style';
22
22
  import { isDefaultParams } from '../CalculatorCredit/isDefaultParams';
23
- import { type CalculatorDepositContent } from './CalculatorDepositContent';
24
23
  import {
25
- getDepositCalculatorParams,
24
+ type CalculatorDepositContent,
26
25
  type DepositCalculatorData,
27
26
  type DepositCalculatorSourceBookParams,
28
- type TariffsButtonContent,
29
- } from './getDepositCalculatorParams';
27
+ type DepositParams,
28
+ type LinkButtonWithTypeContent,
29
+ } from './CalculatorDepositContent';
30
+ import { getDepositCalculatorParams } from './getDepositCalculatorParams';
30
31
  import { isRubles } from './isRubles';
31
32
  import { getRows, normalizeDepositParams } from './normalize';
32
33
  import { renderDepositParamsForm } from './renderDepositParamsForm';
@@ -38,6 +39,7 @@ const MAP = {
38
39
  isReplenish: 'isReplenish',
39
40
  isWithdrawn: 'isWithdrawn',
40
41
  moneyValue: 'minSum',
42
+ extraPercent: 'extraPercent',
41
43
  };
42
44
 
43
45
  const DEFAULT_CURRENCY: Option = {
@@ -47,11 +49,13 @@ const DEFAULT_CURRENCY: Option = {
47
49
 
48
50
  const DEPOSIT_DEFAULT_SUM = 20000;
49
51
  const DEPOSIT_DEFAULT_MONTHS = 1;
52
+ const DEPOSIT_DEFAULT_EXTRA_PERCENT = { text: 'Без учета надбавки', key: '0' };
50
53
 
51
54
  export interface CalculatorDepositProps extends CalculatorDepositContent, UniBlockProps {
52
55
  className?: string;
53
56
  calcSource?: DepositCalculatorData & JSONRefObject;
54
57
  }
58
+
55
59
  export const CalculatorDeposit = UniBlock<CalculatorDepositProps>(
56
60
  ({
57
61
  className,
@@ -67,7 +71,7 @@ export const CalculatorDeposit = UniBlock<CalculatorDepositProps>(
67
71
  const currencyOptions = rows?.map((_) => _.currency) ?? [DEFAULT_CURRENCY];
68
72
  const normalize = useCallback(normalizeDepositParams(rows), [rows]);
69
73
 
70
- const [userInputParams, { field }] = useForm(
74
+ const [userInputParams, { field }] = useForm<DepositParams>(
71
75
  {
72
76
  moneyValue: getMoneyDefaultValue(defaultParams, DEPOSIT_DEFAULT_SUM),
73
77
  monthsValue: getMonthsDefaultValue(defaultParams, DEPOSIT_DEFAULT_MONTHS),
@@ -77,25 +81,30 @@ export const CalculatorDeposit = UniBlock<CalculatorDepositProps>(
77
81
  isWithdrawn: Boolean(defaultParams?.isWithdrawn),
78
82
  isNewClient: Boolean(defaultParams?.isNewClient),
79
83
  currency: DEFAULT_CURRENCY,
84
+ extraPercent: defaultParams?.extraPercent ?? DEPOSIT_DEFAULT_EXTRA_PERCENT,
80
85
  },
81
86
  { normalizer: normalize },
82
87
  );
83
88
 
84
- const currencyValue = field?.('currency')?.value ?? DEFAULT_CURRENCY;
85
- const isNewClient = field?.('isNewClient')?.value;
89
+ const currencyValue = getCurrencyValue(field);
90
+ const isNewClient = Boolean(field?.('isNewClient')?.value);
91
+ const extraPercents = rows?.find((_) => _?.extraPercents)?.extraPercents;
86
92
  const row = getRows(rows, currencyValue);
87
93
  const calcParams = getDepositCalculatorParams(userInputParams, row, paramsViewSettings);
88
94
  const { rate, income, finalSum, type = '' } = calcParams;
89
-
90
95
  const handleDefaultParamsCals = useCallback(() => {
91
96
  setDefaultParamsCalc({
92
97
  field,
93
- defParams: getDefaultParamsMax(row, isNewClient) as DepositCalculatorSourceBookParams,
98
+ defParams: getDefaultParamsMax(
99
+ row,
100
+ isNewClient,
101
+ extraPercents,
102
+ ) as DepositCalculatorSourceBookParams,
94
103
  calcParams,
95
104
  monthsValue: 'minMonths',
96
105
  map: MAP,
97
106
  });
98
- }, [field, rows]);
107
+ }, [field, rows, extraPercents]);
99
108
 
100
109
  useEffect(() => {
101
110
  if (!isDefaultParams(defaultParams) && row) {
@@ -103,7 +112,11 @@ export const CalculatorDeposit = UniBlock<CalculatorDepositProps>(
103
112
  }
104
113
  }, [defaultParams, rows]);
105
114
 
106
- const isMaxRate = rate === getDefaultParamsMax(row, isNewClient)?.rate;
115
+ const extraRate = field?.('extraPercent')?.value?.key;
116
+ const totalRate = getTotalRate(rate, extraRate);
117
+ const isMaxRate =
118
+ rate === getDefaultParamsMax(row, isNewClient)?.rate &&
119
+ extraRate === extraPercents?.at(-1)?.key;
107
120
 
108
121
  return (
109
122
  <CalculatorLayout className={className} title={title} {...rest}>
@@ -132,10 +145,14 @@ export const CalculatorDeposit = UniBlock<CalculatorDepositProps>(
132
145
  ...field('monthsValue'),
133
146
  value: calcParams.monthsValue,
134
147
  })}
135
- {renderDepositParamsForm({ ...calcParams, ...paramsViewSettings }, field)}
148
+ {renderDepositParamsForm(
149
+ { ...calcParams, ...paramsViewSettings },
150
+ field,
151
+ extraPercents,
152
+ )}
136
153
  </div>
137
154
  {renderRate({
138
- rate,
155
+ rate: totalRate,
139
156
  children: renderMaxRateButton(handleDefaultParamsCals, isMaxRate),
140
157
  })}
141
158
  {renderDepositResult({
@@ -154,7 +171,7 @@ export const CalculatorDeposit = UniBlock<CalculatorDepositProps>(
154
171
 
155
172
  const getStep = (key = '') => (isRubles(key) ? 1000 : 100);
156
173
 
157
- const getTariffButton = (buttons: TariffsButtonContent[] = [], btnType = '') => {
174
+ const getTariffButton = (buttons: LinkButtonWithTypeContent[] = [], btnType = '') => {
158
175
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
159
176
  const { type, ...button } = buttons.find((_) => _.type === btnType) ?? {};
160
177
 
@@ -167,3 +184,9 @@ const renderMaxRateButton = (handleDefaultParamsCals: () => void, isMaxRate = fa
167
184
  Показать максимальную ставку
168
185
  </Button>
169
186
  );
187
+
188
+ const getTotalRate = (rate: number, extraRate?: string): number =>
189
+ Number(rate) + Number(extraRate ?? 0);
190
+
191
+ const getCurrencyValue = (field: FormFieldRegisterer<DepositParams>) =>
192
+ field?.('currency')?.value ?? DEFAULT_CURRENCY;
@@ -1,11 +1,47 @@
1
1
  import {
2
+ type CalcDefaultParamsProps,
2
3
  type CalcValueProps,
3
4
  type CommonCalculatorProps,
4
5
  type CommonDefaultParams,
5
6
  } from '../../ui-kit/Calculator/CalculatorProps';
7
+ import type { LinkButtonContent } from '../../ui-kit/LinkButton/LinkButtonContent';
6
8
  import { type Option } from '../../ui-kit/Select/Option';
7
9
  import { type UniBlockContent } from '../../UniBlock/UniBlockProps';
8
10
 
11
+ export interface DepositCalculatorUserInputParams extends CommonDepositParams, CalcValueProps {}
12
+
13
+ export interface DepositCalculatorParams
14
+ extends DepositCalculatorSourceBookParams,
15
+ DepositCalculatorUserInputParams {
16
+ availableMonths: number[];
17
+ defaultMonth: number;
18
+ income: number;
19
+ finalSum: number;
20
+ currency?: Option;
21
+ }
22
+
23
+ export type LinkButtonWithTypeContent = LinkButtonContent & {
24
+ type?: string;
25
+ };
26
+
27
+ export type DepositCalculatorRowsData = {
28
+ currency: Option;
29
+ rates?: DepositCalculatorSourceBookParams[];
30
+ extraPercents?: Option[];
31
+ };
32
+
33
+ export type DepositCalculatorData = {
34
+ rows?: DepositCalculatorRowsData[];
35
+ buttons?: LinkButtonWithTypeContent[];
36
+ };
37
+
38
+ export interface DepositCalculatorSourceBookParams
39
+ extends CommonDepositParams,
40
+ CalcDefaultParamsProps {
41
+ currency?: Option;
42
+ extraPercent?: Option;
43
+ }
44
+
9
45
  export interface CalculatorDepositParamsViewSettings {
10
46
  /**
11
47
  * @title Выплата процентов
@@ -23,6 +59,8 @@ export interface CalculatorDepositParamsViewSettings {
23
59
  isShowWithdrawn?: boolean;
24
60
  /** @title Новый клиент */
25
61
  isShowNewClient?: boolean;
62
+ /** @title Новый клиент */
63
+ isShowExtraPercent?: boolean;
26
64
  }
27
65
 
28
66
  export interface CommonDepositParams {
@@ -36,6 +74,8 @@ export interface CommonDepositParams {
36
74
  isRemoteRegistration?: boolean;
37
75
  /** @title Новый клиент */
38
76
  isNewClient?: boolean;
77
+ /** @title Дополнительный процент */
78
+ extraPercent?: Option;
39
79
  /** @title Валюта */
40
80
  currency?: Option;
41
81
  /** @hidden */
@@ -43,6 +83,7 @@ export interface CommonDepositParams {
43
83
  }
44
84
 
45
85
  export interface DepositDefaultParams extends CommonDefaultParams, CommonDepositParams {}
86
+
46
87
  export interface DepositParams extends DepositDefaultParams, CalcValueProps {}
47
88
 
48
89
  /**
@@ -1,15 +1,11 @@
1
- import {
2
- type CalcDefaultParamsProps,
3
- type CalcValueProps,
4
- } from '../../ui-kit/Calculator/CalculatorProps';
5
1
  import { checkRangeByKeys, getRangeByKeys } from '../../ui-kit/Calculator/rangeHelpers';
6
- import { type LinkButtonContent } from '../../ui-kit/LinkButton/LinkButtonContent';
7
- import { type Option } from '../../ui-kit/Select/Option';
8
2
  import { arrayByRange } from '../../utils/arrayByRange';
9
3
  import { mergeIntervals } from '../../utils/mergeIntervals';
10
4
  import {
11
5
  type CalculatorDepositParamsViewSettings,
12
- type CommonDepositParams,
6
+ type DepositCalculatorParams,
7
+ type DepositCalculatorSourceBookParams,
8
+ type DepositCalculatorUserInputParams,
13
9
  } from './CalculatorDepositContent';
14
10
 
15
11
  const DEFAULT_DEPOSIT_CALCULATOR_PARAMS: DepositCalculatorSourceBookParams = {
@@ -25,38 +21,6 @@ const DEFAULT_DEPOSIT_CALCULATOR_PARAMS: DepositCalculatorSourceBookParams = {
25
21
  type: '',
26
22
  };
27
23
 
28
- export interface DepositCalculatorSourceBookParams
29
- extends CommonDepositParams,
30
- CalcDefaultParamsProps {
31
- currency?: Option;
32
- }
33
-
34
- export interface DepositCalculatorUserInputParams extends CommonDepositParams, CalcValueProps {}
35
-
36
- export interface DepositCalculatorParams
37
- extends DepositCalculatorSourceBookParams,
38
- DepositCalculatorUserInputParams {
39
- availableMonths: number[];
40
- defaultMonth: number;
41
- income: number;
42
- finalSum: number;
43
- currency?: Option;
44
- }
45
-
46
- export type TariffsButtonContent = LinkButtonContent & {
47
- type?: string;
48
- };
49
-
50
- export type DepositCalculatorRowsData = {
51
- currency: Option;
52
- rates: DepositCalculatorSourceBookParams[];
53
- };
54
-
55
- export type DepositCalculatorData = {
56
- rows?: DepositCalculatorRowsData[];
57
- buttons?: TariffsButtonContent[];
58
- };
59
-
60
24
  export const getDepositCalculatorParams = (
61
25
  userInputParams: DepositCalculatorUserInputParams,
62
26
  rows?: DepositCalculatorSourceBookParams[],
@@ -1,8 +1,7 @@
1
1
  import { getRangeByKeys } from '../../ui-kit/Calculator/rangeHelpers';
2
2
  import { type Option } from '../../ui-kit/Select/Option';
3
3
  import { clamp } from '../../utils/clamp';
4
- import { type DepositParams } from './CalculatorDepositContent';
5
- import { type DepositCalculatorRowsData } from './getDepositCalculatorParams';
4
+ import { type DepositCalculatorRowsData, type DepositParams } from './CalculatorDepositContent';
6
5
  import { isRubles } from './isRubles';
7
6
 
8
7
  export const normalizeDepositParams = (rows?: DepositCalculatorRowsData[]) => (_: DepositParams) =>
@@ -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 })}
@@ -6,6 +6,7 @@ const CHAT_NAMESPACE = 'chatbot';
6
6
  const CHAT_BUTTON_EXTERNAL_NAME = 'text-page__btn-chat';
7
7
  const CHAT_FRAME_ID = 'webchat-js-container:webchat_rshb';
8
8
  const CHAT_STORAGE_NAME = 'webchat-keep-open';
9
+ const BUSINESS_CHAT_PREFIX = '/webchat-api';
9
10
 
10
11
  const CHATBOT_URL: Record<string, string> = {
11
12
  personal: '//chat.mes.rshb.ru/assets/js/webchat_rshb',
@@ -13,7 +14,7 @@ const CHATBOT_URL: Record<string, string> = {
13
14
  };
14
15
 
15
16
  interface WebChat {
16
- render?: (id?: string, isOpen?: boolean) => void;
17
+ render?: (id?: string, isOpen?: boolean, prefix?: string) => void;
17
18
  chatOpen?: () => void;
18
19
  chatClose?: () => void;
19
20
  }
@@ -71,7 +72,7 @@ const renderBusinessChatBot = async (chatUrl: string) => {
71
72
  } else {
72
73
  createChatFrame();
73
74
 
74
- businessChat?.render?.(CHAT_FRAME_ID, true);
75
+ businessChat?.render?.(CHAT_FRAME_ID, true, BUSINESS_CHAT_PREFIX);
75
76
  }
76
77
  };
77
78
 
@@ -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;