@redneckz/wildless-cms-uni-blocks 0.14.547 → 0.14.549

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 (391) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +150 -106
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +3 -3
  5. package/bundle/components/ApplicationForm/CustomFieldProps.d.ts +1 -0
  6. package/bundle/components/ApplicationForm/LocalitiesField.d.ts +2 -0
  7. package/bundle/components/ApplicationForm/PartnerCommentsField.d.ts +1 -1
  8. package/bundle/components/ApplicationForm/ProductField.d.ts +2 -0
  9. package/bundle/components/ApplicationForm/SecondaryPhoneField.d.ts +2 -0
  10. package/bundle/components/ApplicationForm/{contants.d.ts → constants.d.ts} +2 -0
  11. package/bundle/components/ApplicationForm/getField.d.ts +0 -4
  12. package/bundle/components/ApplicationForm/getRegionUrl.d.ts +1 -0
  13. package/bundle/components/ApplicationForm/isRenderField.d.ts +6 -0
  14. package/bundle/components/CalculatorDeposit/CalculatorDepositContent.d.ts +11 -2
  15. package/bundle/components/CalculatorDeposit/getDepositCalculatorParams.d.ts +2 -1
  16. package/bundle/components/CalculatorDeposit/isRubles.d.ts +1 -0
  17. package/bundle/components/CalculatorDeposit/utils.d.ts +17 -0
  18. package/bundle/hooks/useForm.d.ts +2 -1
  19. package/bundle/hooks/useRegions.d.ts +2 -1
  20. package/bundle/ui-kit/Calculator/getDefaultParams.d.ts +1 -2
  21. package/dist/components/ApplicationForm/ApplicationFormContent.d.ts +3 -3
  22. package/dist/components/ApplicationForm/CustomFieldProps.d.ts +1 -0
  23. package/dist/components/ApplicationForm/FeedbackMethodField.js +2 -2
  24. package/dist/components/ApplicationForm/FeedbackMethodField.js.map +1 -1
  25. package/dist/components/ApplicationForm/FeedbackTypeField.js +3 -3
  26. package/dist/components/ApplicationForm/FeedbackTypeField.js.map +1 -1
  27. package/dist/components/ApplicationForm/LocalitiesField.d.ts +2 -0
  28. package/dist/components/ApplicationForm/LocalitiesField.js +24 -0
  29. package/dist/components/ApplicationForm/LocalitiesField.js.map +1 -0
  30. package/dist/components/ApplicationForm/PartnerCommentsField.d.ts +1 -1
  31. package/dist/components/ApplicationForm/PartnerCommentsField.js +6 -8
  32. package/dist/components/ApplicationForm/PartnerCommentsField.js.map +1 -1
  33. package/dist/components/ApplicationForm/ProductField.d.ts +2 -0
  34. package/dist/components/ApplicationForm/ProductField.js +10 -0
  35. package/dist/components/ApplicationForm/ProductField.js.map +1 -0
  36. package/dist/components/ApplicationForm/RegionField.js +2 -2
  37. package/dist/components/ApplicationForm/RegionField.js.map +1 -1
  38. package/dist/components/ApplicationForm/SecondaryPhoneField.d.ts +2 -0
  39. package/dist/components/ApplicationForm/SecondaryPhoneField.js +14 -0
  40. package/dist/components/ApplicationForm/SecondaryPhoneField.js.map +1 -0
  41. package/dist/components/ApplicationForm/ServiceDirectionField.js +2 -2
  42. package/dist/components/ApplicationForm/ServiceDirectionField.js.map +1 -1
  43. package/dist/components/ApplicationForm/UltraPremiumField.js +2 -2
  44. package/dist/components/ApplicationForm/UltraPremiumField.js.map +1 -1
  45. package/{lib/components/ApplicationForm/contants.d.ts → dist/components/ApplicationForm/constants.d.ts} +2 -0
  46. package/dist/components/ApplicationForm/constants.js +34 -0
  47. package/dist/components/ApplicationForm/constants.js.map +1 -0
  48. package/dist/components/ApplicationForm/getField.d.ts +0 -4
  49. package/dist/components/ApplicationForm/getField.js +13 -11
  50. package/dist/components/ApplicationForm/getField.js.map +1 -1
  51. package/dist/components/ApplicationForm/getInitialFormState.js +6 -6
  52. package/dist/components/ApplicationForm/getInitialFormState.js.map +1 -1
  53. package/dist/components/ApplicationForm/getObjectValidator.js +3 -0
  54. package/dist/components/ApplicationForm/getObjectValidator.js.map +1 -1
  55. package/dist/components/ApplicationForm/getRegionUrl.d.ts +1 -0
  56. package/dist/components/ApplicationForm/getRegionUrl.js +6 -0
  57. package/dist/components/ApplicationForm/getRegionUrl.js.map +1 -0
  58. package/dist/components/ApplicationForm/isRenderField.d.ts +6 -0
  59. package/dist/components/ApplicationForm/isRenderField.js +9 -0
  60. package/dist/components/ApplicationForm/isRenderField.js.map +1 -0
  61. package/dist/components/CalculatorDeposit/CalculatorDeposit.js +25 -47
  62. package/dist/components/CalculatorDeposit/CalculatorDeposit.js.map +1 -1
  63. package/dist/components/CalculatorDeposit/CalculatorDepositContent.d.ts +11 -2
  64. package/dist/components/CalculatorDeposit/getDepositCalculatorParams.d.ts +2 -1
  65. package/dist/components/CalculatorDeposit/getDepositCalculatorParams.js +15 -11
  66. package/dist/components/CalculatorDeposit/getDepositCalculatorParams.js.map +1 -1
  67. package/dist/components/CalculatorDeposit/isRubles.d.ts +1 -0
  68. package/dist/components/CalculatorDeposit/isRubles.js +5 -0
  69. package/dist/components/CalculatorDeposit/isRubles.js.map +1 -0
  70. package/dist/components/CalculatorDeposit/renderDepositParamsForm.js +4 -3
  71. package/dist/components/CalculatorDeposit/renderDepositParamsForm.js.map +1 -1
  72. package/dist/components/CalculatorDeposit/utils.d.ts +17 -0
  73. package/dist/components/CalculatorDeposit/utils.js +32 -0
  74. package/dist/components/CalculatorDeposit/utils.js.map +1 -0
  75. package/dist/hooks/useForm.d.ts +2 -1
  76. package/dist/hooks/useForm.js +22 -12
  77. package/dist/hooks/useForm.js.map +1 -1
  78. package/dist/hooks/useRegions.d.ts +2 -1
  79. package/dist/hooks/useRegions.js +2 -2
  80. package/dist/hooks/useRegions.js.map +1 -1
  81. package/dist/ui-kit/BenefitsList/DefaultBenefitsList.js +1 -7
  82. package/dist/ui-kit/BenefitsList/DefaultBenefitsList.js.map +1 -1
  83. package/dist/ui-kit/Calculator/CalculatorStyle.js +1 -1
  84. package/dist/ui-kit/Calculator/getDefaultParams.d.ts +1 -2
  85. package/dist/ui-kit/Calculator/getDefaultParams.js +1 -1
  86. package/dist/ui-kit/Calculator/getDefaultParams.js.map +1 -1
  87. package/lib/common.css +1 -1
  88. package/lib/components/ApplicationForm/ApplicationForm.fixture.d.ts +1 -0
  89. package/lib/components/ApplicationForm/ApplicationFormContent.d.ts +3 -3
  90. package/lib/components/ApplicationForm/CustomFieldProps.d.ts +1 -0
  91. package/lib/components/ApplicationForm/FeedbackMethodField.js +1 -1
  92. package/lib/components/ApplicationForm/FeedbackMethodField.js.map +1 -1
  93. package/lib/components/ApplicationForm/FeedbackTypeField.js +1 -1
  94. package/lib/components/ApplicationForm/FeedbackTypeField.js.map +1 -1
  95. package/lib/components/ApplicationForm/LocalitiesField.d.ts +2 -0
  96. package/lib/components/ApplicationForm/LocalitiesField.js +22 -0
  97. package/lib/components/ApplicationForm/LocalitiesField.js.map +1 -0
  98. package/lib/components/ApplicationForm/PartnerCommentsField.d.ts +1 -1
  99. package/lib/components/ApplicationForm/PartnerCommentsField.js +5 -7
  100. package/lib/components/ApplicationForm/PartnerCommentsField.js.map +1 -1
  101. package/lib/components/ApplicationForm/ProductField.d.ts +2 -0
  102. package/lib/components/ApplicationForm/ProductField.js +8 -0
  103. package/lib/components/ApplicationForm/ProductField.js.map +1 -0
  104. package/lib/components/ApplicationForm/RegionField.js +2 -2
  105. package/lib/components/ApplicationForm/RegionField.js.map +1 -1
  106. package/lib/components/ApplicationForm/SecondaryPhoneField.d.ts +2 -0
  107. package/lib/components/ApplicationForm/SecondaryPhoneField.js +12 -0
  108. package/lib/components/ApplicationForm/SecondaryPhoneField.js.map +1 -0
  109. package/lib/components/ApplicationForm/ServiceDirectionField.js +1 -1
  110. package/lib/components/ApplicationForm/ServiceDirectionField.js.map +1 -1
  111. package/lib/components/ApplicationForm/UltraPremiumField.js +1 -1
  112. package/lib/components/ApplicationForm/UltraPremiumField.js.map +1 -1
  113. package/{dist/components/ApplicationForm/contants.d.ts → lib/components/ApplicationForm/constants.d.ts} +2 -0
  114. package/lib/components/ApplicationForm/{contants.js → constants.js} +10 -1
  115. package/lib/components/ApplicationForm/constants.js.map +1 -0
  116. package/lib/components/ApplicationForm/getField.d.ts +0 -4
  117. package/lib/components/ApplicationForm/getField.js +11 -8
  118. package/lib/components/ApplicationForm/getField.js.map +1 -1
  119. package/lib/components/ApplicationForm/getInitialFormState.js +1 -1
  120. package/lib/components/ApplicationForm/getInitialFormState.js.map +1 -1
  121. package/lib/components/ApplicationForm/getObjectValidator.js +3 -0
  122. package/lib/components/ApplicationForm/getObjectValidator.js.map +1 -1
  123. package/lib/components/ApplicationForm/getRegionUrl.d.ts +1 -0
  124. package/lib/components/ApplicationForm/getRegionUrl.js +3 -0
  125. package/lib/components/ApplicationForm/getRegionUrl.js.map +1 -0
  126. package/lib/components/ApplicationForm/isRenderField.d.ts +6 -0
  127. package/lib/components/ApplicationForm/isRenderField.js +6 -0
  128. package/lib/components/ApplicationForm/isRenderField.js.map +1 -0
  129. package/lib/components/CalculatorDeposit/CalculatorDeposit.js +25 -47
  130. package/lib/components/CalculatorDeposit/CalculatorDeposit.js.map +1 -1
  131. package/lib/components/CalculatorDeposit/CalculatorDepositContent.d.ts +11 -2
  132. package/lib/components/CalculatorDeposit/getDepositCalculatorParams.d.ts +2 -1
  133. package/lib/components/CalculatorDeposit/getDepositCalculatorParams.js +15 -11
  134. package/lib/components/CalculatorDeposit/getDepositCalculatorParams.js.map +1 -1
  135. package/lib/components/CalculatorDeposit/isRubles.d.ts +1 -0
  136. package/lib/components/CalculatorDeposit/isRubles.js +2 -0
  137. package/lib/components/CalculatorDeposit/isRubles.js.map +1 -0
  138. package/lib/components/CalculatorDeposit/renderDepositParamsForm.js +4 -3
  139. package/lib/components/CalculatorDeposit/renderDepositParamsForm.js.map +1 -1
  140. package/lib/components/CalculatorDeposit/utils.d.ts +17 -0
  141. package/lib/components/CalculatorDeposit/utils.js +25 -0
  142. package/lib/components/CalculatorDeposit/utils.js.map +1 -0
  143. package/lib/hooks/useForm.d.ts +2 -1
  144. package/lib/hooks/useForm.js +23 -13
  145. package/lib/hooks/useForm.js.map +1 -1
  146. package/lib/hooks/useRegions.d.ts +2 -1
  147. package/lib/hooks/useRegions.js +2 -2
  148. package/lib/hooks/useRegions.js.map +1 -1
  149. package/lib/ui-kit/BenefitsList/DefaultBenefitsList.js +1 -7
  150. package/lib/ui-kit/BenefitsList/DefaultBenefitsList.js.map +1 -1
  151. package/lib/ui-kit/Calculator/CalculatorStyle.js +1 -1
  152. package/lib/ui-kit/Calculator/getDefaultParams.d.ts +1 -2
  153. package/lib/ui-kit/Calculator/getDefaultParams.js +1 -1
  154. package/lib/ui-kit/Calculator/getDefaultParams.js.map +1 -1
  155. package/mobile/bundle/bundle.umd.js +150 -106
  156. package/mobile/bundle/bundle.umd.min.js +1 -1
  157. package/mobile/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +3 -3
  158. package/mobile/bundle/components/ApplicationForm/CustomFieldProps.d.ts +1 -0
  159. package/mobile/bundle/components/ApplicationForm/LocalitiesField.d.ts +2 -0
  160. package/mobile/bundle/components/ApplicationForm/PartnerCommentsField.d.ts +1 -1
  161. package/mobile/bundle/components/ApplicationForm/ProductField.d.ts +2 -0
  162. package/mobile/bundle/components/ApplicationForm/SecondaryPhoneField.d.ts +2 -0
  163. package/mobile/bundle/components/ApplicationForm/{contants.d.ts → constants.d.ts} +2 -0
  164. package/mobile/bundle/components/ApplicationForm/getField.d.ts +0 -4
  165. package/mobile/bundle/components/ApplicationForm/getRegionUrl.d.ts +1 -0
  166. package/mobile/bundle/components/ApplicationForm/isRenderField.d.ts +6 -0
  167. package/mobile/bundle/components/CalculatorDeposit/CalculatorDepositContent.d.ts +11 -2
  168. package/mobile/bundle/components/CalculatorDeposit/getDepositCalculatorParams.d.ts +2 -1
  169. package/mobile/bundle/components/CalculatorDeposit/isRubles.d.ts +1 -0
  170. package/mobile/bundle/components/CalculatorDeposit/utils.d.ts +17 -0
  171. package/mobile/bundle/hooks/useForm.d.ts +2 -1
  172. package/mobile/bundle/hooks/useRegions.d.ts +2 -1
  173. package/mobile/bundle/ui-kit/Calculator/getDefaultParams.d.ts +1 -2
  174. package/mobile/dist/components/ApplicationForm/ApplicationFormContent.d.ts +3 -3
  175. package/mobile/dist/components/ApplicationForm/CustomFieldProps.d.ts +1 -0
  176. package/mobile/dist/components/ApplicationForm/FeedbackMethodField.js +2 -2
  177. package/mobile/dist/components/ApplicationForm/FeedbackMethodField.js.map +1 -1
  178. package/mobile/dist/components/ApplicationForm/FeedbackTypeField.js +3 -3
  179. package/mobile/dist/components/ApplicationForm/FeedbackTypeField.js.map +1 -1
  180. package/mobile/dist/components/ApplicationForm/LocalitiesField.d.ts +2 -0
  181. package/mobile/dist/components/ApplicationForm/LocalitiesField.js +24 -0
  182. package/mobile/dist/components/ApplicationForm/LocalitiesField.js.map +1 -0
  183. package/mobile/dist/components/ApplicationForm/PartnerCommentsField.d.ts +1 -1
  184. package/mobile/dist/components/ApplicationForm/PartnerCommentsField.js +6 -8
  185. package/mobile/dist/components/ApplicationForm/PartnerCommentsField.js.map +1 -1
  186. package/mobile/dist/components/ApplicationForm/ProductField.d.ts +2 -0
  187. package/mobile/dist/components/ApplicationForm/ProductField.js +10 -0
  188. package/mobile/dist/components/ApplicationForm/ProductField.js.map +1 -0
  189. package/mobile/dist/components/ApplicationForm/RegionField.js +2 -2
  190. package/mobile/dist/components/ApplicationForm/RegionField.js.map +1 -1
  191. package/mobile/dist/components/ApplicationForm/SecondaryPhoneField.d.ts +2 -0
  192. package/mobile/dist/components/ApplicationForm/SecondaryPhoneField.js +14 -0
  193. package/mobile/dist/components/ApplicationForm/SecondaryPhoneField.js.map +1 -0
  194. package/mobile/dist/components/ApplicationForm/ServiceDirectionField.js +2 -2
  195. package/mobile/dist/components/ApplicationForm/ServiceDirectionField.js.map +1 -1
  196. package/mobile/dist/components/ApplicationForm/UltraPremiumField.js +2 -2
  197. package/mobile/dist/components/ApplicationForm/UltraPremiumField.js.map +1 -1
  198. package/mobile/dist/components/ApplicationForm/constants.d.ts +7 -0
  199. package/mobile/dist/components/ApplicationForm/constants.js +34 -0
  200. package/mobile/dist/components/ApplicationForm/constants.js.map +1 -0
  201. package/mobile/dist/components/ApplicationForm/getField.d.ts +0 -4
  202. package/mobile/dist/components/ApplicationForm/getField.js +13 -11
  203. package/mobile/dist/components/ApplicationForm/getField.js.map +1 -1
  204. package/mobile/dist/components/ApplicationForm/getInitialFormState.js +6 -6
  205. package/mobile/dist/components/ApplicationForm/getInitialFormState.js.map +1 -1
  206. package/mobile/dist/components/ApplicationForm/getObjectValidator.js +3 -0
  207. package/mobile/dist/components/ApplicationForm/getObjectValidator.js.map +1 -1
  208. package/mobile/dist/components/ApplicationForm/getRegionUrl.d.ts +1 -0
  209. package/mobile/dist/components/ApplicationForm/getRegionUrl.js +6 -0
  210. package/mobile/dist/components/ApplicationForm/getRegionUrl.js.map +1 -0
  211. package/mobile/dist/components/ApplicationForm/isRenderField.d.ts +6 -0
  212. package/mobile/dist/components/ApplicationForm/isRenderField.js +9 -0
  213. package/mobile/dist/components/ApplicationForm/isRenderField.js.map +1 -0
  214. package/mobile/dist/components/CalculatorDeposit/CalculatorDeposit.js +25 -47
  215. package/mobile/dist/components/CalculatorDeposit/CalculatorDeposit.js.map +1 -1
  216. package/mobile/dist/components/CalculatorDeposit/CalculatorDepositContent.d.ts +11 -2
  217. package/mobile/dist/components/CalculatorDeposit/getDepositCalculatorParams.d.ts +2 -1
  218. package/mobile/dist/components/CalculatorDeposit/getDepositCalculatorParams.js +15 -11
  219. package/mobile/dist/components/CalculatorDeposit/getDepositCalculatorParams.js.map +1 -1
  220. package/mobile/dist/components/CalculatorDeposit/isRubles.d.ts +1 -0
  221. package/mobile/dist/components/CalculatorDeposit/isRubles.js +5 -0
  222. package/mobile/dist/components/CalculatorDeposit/isRubles.js.map +1 -0
  223. package/mobile/dist/components/CalculatorDeposit/renderDepositParamsForm.js +4 -3
  224. package/mobile/dist/components/CalculatorDeposit/renderDepositParamsForm.js.map +1 -1
  225. package/mobile/dist/components/CalculatorDeposit/utils.d.ts +17 -0
  226. package/mobile/dist/components/CalculatorDeposit/utils.js +32 -0
  227. package/mobile/dist/components/CalculatorDeposit/utils.js.map +1 -0
  228. package/mobile/dist/hooks/useForm.d.ts +2 -1
  229. package/mobile/dist/hooks/useForm.js +22 -12
  230. package/mobile/dist/hooks/useForm.js.map +1 -1
  231. package/mobile/dist/hooks/useRegions.d.ts +2 -1
  232. package/mobile/dist/hooks/useRegions.js +2 -2
  233. package/mobile/dist/hooks/useRegions.js.map +1 -1
  234. package/mobile/dist/ui-kit/BenefitsList/DefaultBenefitsList.js +1 -7
  235. package/mobile/dist/ui-kit/BenefitsList/DefaultBenefitsList.js.map +1 -1
  236. package/mobile/dist/ui-kit/Calculator/CalculatorStyle.js +1 -1
  237. package/mobile/dist/ui-kit/Calculator/getDefaultParams.d.ts +1 -2
  238. package/mobile/dist/ui-kit/Calculator/getDefaultParams.js +1 -1
  239. package/mobile/dist/ui-kit/Calculator/getDefaultParams.js.map +1 -1
  240. package/mobile/lib/common.css +1 -1
  241. package/mobile/lib/components/ApplicationForm/ApplicationFormContent.d.ts +3 -3
  242. package/mobile/lib/components/ApplicationForm/CustomFieldProps.d.ts +1 -0
  243. package/mobile/lib/components/ApplicationForm/FeedbackMethodField.js +1 -1
  244. package/mobile/lib/components/ApplicationForm/FeedbackMethodField.js.map +1 -1
  245. package/mobile/lib/components/ApplicationForm/FeedbackTypeField.js +1 -1
  246. package/mobile/lib/components/ApplicationForm/FeedbackTypeField.js.map +1 -1
  247. package/mobile/lib/components/ApplicationForm/LocalitiesField.d.ts +2 -0
  248. package/mobile/lib/components/ApplicationForm/LocalitiesField.js +22 -0
  249. package/mobile/lib/components/ApplicationForm/LocalitiesField.js.map +1 -0
  250. package/mobile/lib/components/ApplicationForm/PartnerCommentsField.d.ts +1 -1
  251. package/mobile/lib/components/ApplicationForm/PartnerCommentsField.js +5 -7
  252. package/mobile/lib/components/ApplicationForm/PartnerCommentsField.js.map +1 -1
  253. package/mobile/lib/components/ApplicationForm/ProductField.d.ts +2 -0
  254. package/mobile/lib/components/ApplicationForm/ProductField.js +8 -0
  255. package/mobile/lib/components/ApplicationForm/ProductField.js.map +1 -0
  256. package/mobile/lib/components/ApplicationForm/RegionField.js +2 -2
  257. package/mobile/lib/components/ApplicationForm/RegionField.js.map +1 -1
  258. package/mobile/lib/components/ApplicationForm/SecondaryPhoneField.d.ts +2 -0
  259. package/mobile/lib/components/ApplicationForm/SecondaryPhoneField.js +12 -0
  260. package/mobile/lib/components/ApplicationForm/SecondaryPhoneField.js.map +1 -0
  261. package/mobile/lib/components/ApplicationForm/ServiceDirectionField.js +1 -1
  262. package/mobile/lib/components/ApplicationForm/ServiceDirectionField.js.map +1 -1
  263. package/mobile/lib/components/ApplicationForm/UltraPremiumField.js +1 -1
  264. package/mobile/lib/components/ApplicationForm/UltraPremiumField.js.map +1 -1
  265. package/mobile/lib/components/ApplicationForm/constants.d.ts +7 -0
  266. package/mobile/lib/components/ApplicationForm/{contants.js → constants.js} +10 -1
  267. package/mobile/lib/components/ApplicationForm/constants.js.map +1 -0
  268. package/mobile/lib/components/ApplicationForm/getField.d.ts +0 -4
  269. package/mobile/lib/components/ApplicationForm/getField.js +11 -8
  270. package/mobile/lib/components/ApplicationForm/getField.js.map +1 -1
  271. package/mobile/lib/components/ApplicationForm/getInitialFormState.js +1 -1
  272. package/mobile/lib/components/ApplicationForm/getInitialFormState.js.map +1 -1
  273. package/mobile/lib/components/ApplicationForm/getObjectValidator.js +3 -0
  274. package/mobile/lib/components/ApplicationForm/getObjectValidator.js.map +1 -1
  275. package/mobile/lib/components/ApplicationForm/getRegionUrl.d.ts +1 -0
  276. package/mobile/lib/components/ApplicationForm/getRegionUrl.js +3 -0
  277. package/mobile/lib/components/ApplicationForm/getRegionUrl.js.map +1 -0
  278. package/mobile/lib/components/ApplicationForm/isRenderField.d.ts +6 -0
  279. package/mobile/lib/components/ApplicationForm/isRenderField.js +6 -0
  280. package/mobile/lib/components/ApplicationForm/isRenderField.js.map +1 -0
  281. package/mobile/lib/components/CalculatorDeposit/CalculatorDeposit.js +25 -47
  282. package/mobile/lib/components/CalculatorDeposit/CalculatorDeposit.js.map +1 -1
  283. package/mobile/lib/components/CalculatorDeposit/CalculatorDepositContent.d.ts +11 -2
  284. package/mobile/lib/components/CalculatorDeposit/getDepositCalculatorParams.d.ts +2 -1
  285. package/mobile/lib/components/CalculatorDeposit/getDepositCalculatorParams.js +15 -11
  286. package/mobile/lib/components/CalculatorDeposit/getDepositCalculatorParams.js.map +1 -1
  287. package/mobile/lib/components/CalculatorDeposit/isRubles.d.ts +1 -0
  288. package/mobile/lib/components/CalculatorDeposit/isRubles.js +2 -0
  289. package/mobile/lib/components/CalculatorDeposit/isRubles.js.map +1 -0
  290. package/mobile/lib/components/CalculatorDeposit/renderDepositParamsForm.js +4 -3
  291. package/mobile/lib/components/CalculatorDeposit/renderDepositParamsForm.js.map +1 -1
  292. package/mobile/lib/components/CalculatorDeposit/utils.d.ts +17 -0
  293. package/mobile/lib/components/CalculatorDeposit/utils.js +25 -0
  294. package/mobile/lib/components/CalculatorDeposit/utils.js.map +1 -0
  295. package/mobile/lib/hooks/useForm.d.ts +2 -1
  296. package/mobile/lib/hooks/useForm.js +23 -13
  297. package/mobile/lib/hooks/useForm.js.map +1 -1
  298. package/mobile/lib/hooks/useRegions.d.ts +2 -1
  299. package/mobile/lib/hooks/useRegions.js +2 -2
  300. package/mobile/lib/hooks/useRegions.js.map +1 -1
  301. package/mobile/lib/ui-kit/BenefitsList/DefaultBenefitsList.js +1 -7
  302. package/mobile/lib/ui-kit/BenefitsList/DefaultBenefitsList.js.map +1 -1
  303. package/mobile/lib/ui-kit/Calculator/CalculatorStyle.js +1 -1
  304. package/mobile/lib/ui-kit/Calculator/getDefaultParams.d.ts +1 -2
  305. package/mobile/lib/ui-kit/Calculator/getDefaultParams.js +1 -1
  306. package/mobile/lib/ui-kit/Calculator/getDefaultParams.js.map +1 -1
  307. package/mobile/src/components/ApplicationForm/ApplicationForm.example.json +79 -0
  308. package/mobile/src/components/ApplicationForm/ApplicationFormContent.ts +6 -2
  309. package/mobile/src/components/ApplicationForm/CustomFieldProps.ts +1 -0
  310. package/mobile/src/components/ApplicationForm/FeedbackMethodField.tsx +1 -1
  311. package/mobile/src/components/ApplicationForm/FeedbackTypeField.tsx +1 -1
  312. package/mobile/src/components/ApplicationForm/LocalitiesField.tsx +34 -0
  313. package/mobile/src/components/ApplicationForm/PartnerCommentsField.tsx +10 -9
  314. package/mobile/src/components/ApplicationForm/ProductField.tsx +15 -0
  315. package/mobile/src/components/ApplicationForm/RegionField.tsx +2 -2
  316. package/mobile/src/components/ApplicationForm/SecondaryPhoneField.tsx +18 -0
  317. package/mobile/src/components/ApplicationForm/ServiceDirectionField.tsx +1 -1
  318. package/mobile/src/components/ApplicationForm/UltraPremiumField.tsx +1 -1
  319. package/mobile/src/components/ApplicationForm/{contants.tsx → constants.tsx} +11 -0
  320. package/mobile/src/components/ApplicationForm/getField.tsx +16 -23
  321. package/mobile/src/components/ApplicationForm/getInitialFormState.tsx +1 -1
  322. package/mobile/src/components/ApplicationForm/getObjectValidator.tsx +3 -0
  323. package/mobile/src/components/ApplicationForm/getRegionUrl.tsx +4 -0
  324. package/mobile/src/components/ApplicationForm/isRenderField.tsx +15 -0
  325. package/mobile/src/components/CalculatorDeposit/CalculatorDeposit.tsx +47 -71
  326. package/mobile/src/components/CalculatorDeposit/CalculatorDepositContent.ts +10 -1
  327. package/mobile/src/components/CalculatorDeposit/getDepositCalculatorParams.ts +14 -9
  328. package/mobile/src/components/CalculatorDeposit/isRubles.tsx +1 -0
  329. package/mobile/src/components/CalculatorDeposit/renderDepositParamsForm.tsx +5 -2
  330. package/mobile/src/components/CalculatorDeposit/utils.tsx +37 -0
  331. package/mobile/src/hooks/useForm.ts +33 -16
  332. package/mobile/src/hooks/useRegions.ts +3 -2
  333. package/mobile/src/ui-kit/BenefitsList/DefaultBenefitsList.tsx +1 -23
  334. package/mobile/src/ui-kit/Calculator/CalculatorStyle.tsx +1 -1
  335. package/mobile/src/ui-kit/Calculator/getDefaultParams.tsx +3 -3
  336. package/package.json +1 -1
  337. package/src/components/ApplicationForm/ApplicationForm.example.json +79 -0
  338. package/src/components/ApplicationForm/ApplicationForm.fixture.tsx +34 -0
  339. package/src/components/ApplicationForm/ApplicationFormContent.ts +6 -2
  340. package/src/components/ApplicationForm/CustomFieldProps.ts +1 -0
  341. package/src/components/ApplicationForm/FeedbackMethodField.tsx +1 -1
  342. package/src/components/ApplicationForm/FeedbackTypeField.tsx +1 -1
  343. package/src/components/ApplicationForm/LocalitiesField.tsx +34 -0
  344. package/src/components/ApplicationForm/PartnerCommentsField.tsx +10 -9
  345. package/src/components/ApplicationForm/ProductField.tsx +15 -0
  346. package/src/components/ApplicationForm/RegionField.tsx +2 -2
  347. package/src/components/ApplicationForm/SecondaryPhoneField.tsx +18 -0
  348. package/src/components/ApplicationForm/ServiceDirectionField.tsx +1 -1
  349. package/src/components/ApplicationForm/UltraPremiumField.tsx +1 -1
  350. package/src/components/ApplicationForm/{contants.tsx → constants.tsx} +11 -0
  351. package/src/components/ApplicationForm/getField.tsx +16 -23
  352. package/src/components/ApplicationForm/getInitialFormState.tsx +1 -1
  353. package/src/components/ApplicationForm/getObjectValidator.tsx +3 -0
  354. package/src/components/ApplicationForm/getRegionUrl.tsx +4 -0
  355. package/src/components/ApplicationForm/isRenderField.tsx +15 -0
  356. package/src/components/CalculatorDeposit/CalculatorDeposit.fixture.tsx +2 -0
  357. package/src/components/CalculatorDeposit/CalculatorDeposit.tsx +47 -71
  358. package/src/components/CalculatorDeposit/CalculatorDepositContent.ts +10 -1
  359. package/src/components/CalculatorDeposit/getDepositCalculatorParams.ts +14 -9
  360. package/src/components/CalculatorDeposit/isRubles.tsx +1 -0
  361. package/src/components/CalculatorDeposit/renderDepositParamsForm.tsx +5 -2
  362. package/src/components/CalculatorDeposit/utils.tsx +37 -0
  363. package/src/hooks/useForm.ts +33 -16
  364. package/src/hooks/useRegions.ts +3 -2
  365. package/src/ui-kit/BenefitsList/DefaultBenefitsList.tsx +1 -23
  366. package/src/ui-kit/Calculator/CalculatorStyle.tsx +1 -1
  367. package/src/ui-kit/Calculator/getDefaultParams.tsx +3 -3
  368. package/bundle/components/CalculatorDeposit/isNotRubles.d.ts +0 -1
  369. package/dist/components/ApplicationForm/contants.js +0 -25
  370. package/dist/components/ApplicationForm/contants.js.map +0 -1
  371. package/dist/components/CalculatorDeposit/isNotRubles.d.ts +0 -1
  372. package/dist/components/CalculatorDeposit/isNotRubles.js +0 -5
  373. package/dist/components/CalculatorDeposit/isNotRubles.js.map +0 -1
  374. package/lib/components/ApplicationForm/contants.js.map +0 -1
  375. package/lib/components/CalculatorDeposit/isNotRubles.d.ts +0 -1
  376. package/lib/components/CalculatorDeposit/isNotRubles.js +0 -2
  377. package/lib/components/CalculatorDeposit/isNotRubles.js.map +0 -1
  378. package/mobile/bundle/components/CalculatorDeposit/isNotRubles.d.ts +0 -1
  379. package/mobile/dist/components/ApplicationForm/contants.d.ts +0 -5
  380. package/mobile/dist/components/ApplicationForm/contants.js +0 -25
  381. package/mobile/dist/components/ApplicationForm/contants.js.map +0 -1
  382. package/mobile/dist/components/CalculatorDeposit/isNotRubles.d.ts +0 -1
  383. package/mobile/dist/components/CalculatorDeposit/isNotRubles.js +0 -5
  384. package/mobile/dist/components/CalculatorDeposit/isNotRubles.js.map +0 -1
  385. package/mobile/lib/components/ApplicationForm/contants.d.ts +0 -5
  386. package/mobile/lib/components/ApplicationForm/contants.js.map +0 -1
  387. package/mobile/lib/components/CalculatorDeposit/isNotRubles.d.ts +0 -1
  388. package/mobile/lib/components/CalculatorDeposit/isNotRubles.js +0 -2
  389. package/mobile/lib/components/CalculatorDeposit/isNotRubles.js.map +0 -1
  390. package/mobile/src/components/CalculatorDeposit/isNotRubles.tsx +0 -1
  391. package/src/components/CalculatorDeposit/isNotRubles.tsx +0 -1
@@ -17,7 +17,7 @@ export type SubmitButtonProps = TextProps & {
17
17
  /**
18
18
  * @title Название поля ввода
19
19
  * @required
20
- * @enumNames ["Фамилия", "Имя", "Отчество", "Email", "Телефон", "ФИО", "ИНН", "Комментарий", "Регион", "Адрес", "Тип формы", "День рождения", "Клиент банка", "Согласие на получение материалов", "Тип эквайринга", "Онлайн касса", "POS-терминал", "Направление обслуживания", "Ультра/Премиум", "Тип обратной связи", "Способ получения ответа", "Банковский служащий", "Дата и время обращени", "Дополнительный телефон", "ВЭД", "Срок (месяцев)", "Сумма ₽", "Годовой доход", "Количество объектов инкассации", "Комментарий партнёров", "Согласие на обработку"]
20
+ * @enumNames ["Фамилия", "Имя", "Отчество", "Email", "Телефон", "ФИО", "ИНН", "Комментарий", "Регион", "Регион выездной сервис", "Адрес", "Тип формы", "День рождения", "Клиент банка", "Согласие на получение материалов", "Тип эквайринга", "Онлайн касса", "POS-терминал", "Направление обслуживания", "Ультра/Премиум", "Тип обратной связи", "Способ получения ответа", "Банковский служащий", "Дата и время обращени", "Дополнительный телефон", "ВЭД", "Срок (месяцев)", "Сумма ₽", "Годовой доход", "Количество объектов инкассации", "День встречи", "Продукт", "Комментарий партнёров", "Согласие на обработку"]
21
21
  */
22
22
  export type NameFieldDef =
23
23
  | 'surname'
@@ -49,6 +49,9 @@ export type NameFieldDef =
49
49
  | 'amount'
50
50
  | 'annualRevenue'
51
51
  | 'collectionCount'
52
+ | 'desiredMeetingDate'
53
+ | 'product'
54
+ | 'localities'
52
55
  | 'partnerComments'
53
56
  | 'consentDataProcessing';
54
57
 
@@ -115,7 +118,8 @@ type TypeFormFieldDef =
115
118
  | 'KVED'
116
119
  | 'ULTRASERVICE'
117
120
  | 'PREMIUMSERVICE'
118
- | 'FEEDBACK';
121
+ | 'FEEDBACK'
122
+ | 'OUTSERVICE';
119
123
 
120
124
  /**
121
125
  * @title Количество колонок
@@ -4,4 +4,5 @@ import { type FieldDef } from './ApplicationFormContent';
4
4
  export interface CustomFieldProps {
5
5
  field: FormFieldRegisterer<any>;
6
6
  input?: FieldDef;
7
+ url?: string;
7
8
  }
@@ -1,7 +1,7 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
2
  import { SelectControl } from '../../ui-kit/Select/SelectControl';
3
3
  import { withValidator } from '../../validation/withValidator';
4
- import { FEEDBACK_METHOD } from './contants';
4
+ import { FEEDBACK_METHOD } from './constants';
5
5
  import { type CustomFieldProps } from './CustomFieldProps';
6
6
  import { validatorObj } from './getObjectValidator';
7
7
 
@@ -2,7 +2,7 @@ import { JSX } from '@redneckz/uni-jsx';
2
2
  import { useEffect } from '@redneckz/uni-jsx/lib/hooks';
3
3
  import { SelectControl } from '../../ui-kit/Select/SelectControl';
4
4
  import { withValidator } from '../../validation/withValidator';
5
- import { FEEDBACK_TYPES, SERVICE_DIRECTIONS } from './contants';
5
+ import { FEEDBACK_TYPES, SERVICE_DIRECTIONS } from './constants';
6
6
  import { type CustomFieldProps } from './CustomFieldProps';
7
7
  import { validatorObj } from './getObjectValidator';
8
8
 
@@ -0,0 +1,34 @@
1
+ import { JSX } from '@redneckz/uni-jsx';
2
+ import { useEffect } from '@redneckz/uni-jsx/lib/hooks';
3
+ import { useRegions } from '../../hooks/useRegions';
4
+ import { SelectControl } from '../../ui-kit/Select/SelectControl';
5
+ import { OUT_SERVICE_URL } from './constants';
6
+ import { type CustomFieldProps } from './CustomFieldProps';
7
+ import { validatorObj } from './getObjectValidator';
8
+ import { getValidation } from './getValidation';
9
+
10
+ type RegionFieldProps = CustomFieldProps;
11
+
12
+ export const LocalitiesField = JSX<RegionFieldProps>(({ field, input }) => {
13
+ const fieldRegion = field('region');
14
+ const regionKey = fieldRegion?.value?.key;
15
+ const localities = useRegions(OUT_SERVICE_URL)
16
+ ?.find((_) => _.code === regionKey)
17
+ ?.localities?.map((_) => ({ key: _, text: _ }));
18
+
19
+ useEffect(() => {
20
+ if (regionKey !== '') {
21
+ field?.('localities')?.onChange?.('');
22
+ }
23
+ }, [regionKey]);
24
+
25
+ return (
26
+ <SelectControl
27
+ label="Населенный пункт"
28
+ placeholder="Выберите отделение"
29
+ options={localities}
30
+ {...getValidation(field('localities'), validatorObj.localities, input?.required)}
31
+ isSearch={true}
32
+ />
33
+ );
34
+ });
@@ -1,18 +1,19 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
- import { InputPhoneControl } from '../../ui-kit/Input/InputPhoneControl';
3
- import { withValidator } from '../../validation/withValidator';
2
+ import { InputControl } from '../../ui-kit/Input/InputControl';
3
+ import { type FieldDef } from './ApplicationFormContent';
4
4
  import { type CustomFieldProps } from './CustomFieldProps';
5
5
  import { validatorObj } from './getObjectValidator';
6
+ import { getValidation } from './getValidation';
6
7
 
7
- export const SecondaryPhoneField = JSX<CustomFieldProps>(({ field }) => {
8
- const fieldPhone = field('secondaryPhone');
8
+ export const PartnerCommentsField = JSX<CustomFieldProps>(({ field, input }) => {
9
+ const { required, ...rest } = input as FieldDef;
9
10
 
10
11
  return (
11
- <InputPhoneControl
12
- label="Дополнительный телефон"
13
- {...(!fieldPhone.value || fieldPhone.value === '+7 ('
14
- ? fieldPhone
15
- : withValidator(fieldPhone, validatorObj.secondaryPhone))}
12
+ <InputControl
13
+ {...getValidation(field('partnerComments'), validatorObj.partnerComments, required)}
14
+ placeholder="Укажите интересующий вас вопрос"
15
+ isTextarea={true}
16
+ {...rest}
16
17
  />
17
18
  );
18
19
  });
@@ -0,0 +1,15 @@
1
+ import { JSX } from '@redneckz/uni-jsx';
2
+ import { SelectControl } from '../../ui-kit/Select/SelectControl';
3
+ import { withValidator } from '../../validation/withValidator';
4
+ import { PRODUCT_TYPE } from './constants';
5
+ import { type CustomFieldProps } from './CustomFieldProps';
6
+ import { validatorObj } from './getObjectValidator';
7
+
8
+ export const ProductField = JSX<CustomFieldProps>(({ field }) => (
9
+ <SelectControl
10
+ placeholder="Выберите продукт"
11
+ label="Продукт"
12
+ options={PRODUCT_TYPE}
13
+ {...withValidator(field('product'), validatorObj.product)}
14
+ />
15
+ ));
@@ -6,8 +6,8 @@ import { type CustomFieldProps } from './CustomFieldProps';
6
6
  import { validatorObj } from './getObjectValidator';
7
7
  import { getValidation } from './getValidation';
8
8
 
9
- export const RegionField = JSX<CustomFieldProps>(({ field, input }) => {
10
- const regions = useRegions();
9
+ export const RegionField = JSX<CustomFieldProps>(({ field, input, url }) => {
10
+ const regions = useRegions(url);
11
11
 
12
12
  return (
13
13
  <SelectControl
@@ -0,0 +1,18 @@
1
+ import { JSX } from '@redneckz/uni-jsx';
2
+ import { InputPhoneControl } from '../../ui-kit/Input/InputPhoneControl';
3
+ import { withValidator } from '../../validation/withValidator';
4
+ import { type CustomFieldProps } from './CustomFieldProps';
5
+ import { validatorObj } from './getObjectValidator';
6
+
7
+ export const SecondaryPhoneField = JSX<CustomFieldProps>(({ field }) => {
8
+ const fieldPhone = field('secondaryPhone');
9
+
10
+ return (
11
+ <InputPhoneControl
12
+ label="Дополнительный телефон"
13
+ {...(!fieldPhone.value || fieldPhone.value === '+7 ('
14
+ ? fieldPhone
15
+ : withValidator(fieldPhone, validatorObj.secondaryPhone))}
16
+ />
17
+ );
18
+ });
@@ -1,7 +1,7 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
2
  import { SelectControl } from '../../ui-kit/Select/SelectControl';
3
3
  import { withValidator } from '../../validation/withValidator';
4
- import { SERVICE_DIRECTIONS } from './contants';
4
+ import { SERVICE_DIRECTIONS } from './constants';
5
5
  import { type CustomFieldProps } from './CustomFieldProps';
6
6
  import { validatorObj } from './getObjectValidator';
7
7
 
@@ -1,7 +1,7 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
2
  import { SelectControl } from '../../ui-kit/Select/SelectControl';
3
3
  import { withValidator } from '../../validation/withValidator';
4
- import { SERVICE_TYPES } from './contants';
4
+ import { SERVICE_TYPES } from './constants';
5
5
  import { type CustomFieldProps } from './CustomFieldProps';
6
6
  import { validatorObj } from './getObjectValidator';
7
7
  export const UltraPremiumField = JSX<CustomFieldProps>(({ field }) => (
@@ -25,3 +25,14 @@ export const FEEDBACK_METHOD: Option[] = [
25
25
  { key: 'phone', text: 'Телефонный звонок' },
26
26
  { key: 'email', text: 'Электронное сообщение' },
27
27
  ];
28
+
29
+ export const PRODUCT_TYPE: Option[] = [
30
+ { key: 'Карта дебетовая', text: 'Карта дебетовая' },
31
+ { key: 'Карта кредитная', text: 'Карта кредитная' },
32
+ { key: 'Потребительский кредит', text: 'Потребительский кредит' },
33
+ { key: 'Ипотечный кредит', text: 'Ипотечный кредит' },
34
+ { key: 'Вклад', text: 'Вклад' },
35
+ { key: 'Накопительный счет', text: 'Накопительный счет' },
36
+ ];
37
+
38
+ export const OUT_SERVICE_URL = '/api/v1/outservice/outserviceregions';
@@ -11,13 +11,18 @@ import { CommentField } from './CommentField';
11
11
  import { FeedbackMethodField } from './FeedbackMethodField';
12
12
  import { FeedbackTypeField } from './FeedbackTypeField';
13
13
  import { validatorObj } from './getObjectValidator';
14
+ import { getRegionUrl } from './getRegionUrl';
14
15
  import { getValidation } from './getValidation';
15
16
  import { IsClientField } from './IsClientField';
17
+ import { isRenderField } from './isRenderField';
18
+ import { LocalitiesField } from './LocalitiesField';
16
19
  import { OnlineCheckoutField } from './OnlineCheckoutField';
17
- import { SecondaryPhoneField } from './PartnerCommentsField';
20
+ import { PartnerCommentsField } from './PartnerCommentsField';
18
21
  import { PosTerminalField } from './PosTerminalField';
22
+ import { ProductField } from './ProductField';
19
23
  import { RegionField } from './RegionField';
20
24
  import { RegionPremiumField } from './RegionPremiumField';
25
+ import { SecondaryPhoneField } from './SecondaryPhoneField';
21
26
  import { ServiceDirectionField } from './ServiceDirectionField';
22
27
  import { TermField } from './TermField';
23
28
  import { UltraPremiumField } from './UltraPremiumField';
@@ -77,7 +82,7 @@ export const getField =
77
82
  region: isPremium ? (
78
83
  <RegionPremiumField field={field} />
79
84
  ) : (
80
- <RegionField field={field} input={input} />
85
+ <RegionField field={field} input={input} url={getRegionUrl(typeForm)} />
81
86
  ),
82
87
  addressBranch: <AddressBranchField field={field} input={input} isPremium={isPremium} />,
83
88
  birthday: (
@@ -86,6 +91,14 @@ export const getField =
86
91
  {...getValidation(field('birthday'), validatorObj.birthday, required)}
87
92
  />
88
93
  ),
94
+ desiredMeetingDate: (
95
+ <DatePickerControl
96
+ label="Желаемая дата встречи"
97
+ {...getValidation(field('desiredMeetingDate'), validatorObj.meetingDay, required)}
98
+ />
99
+ ),
100
+ product: <ProductField field={field} />,
101
+ localities: <LocalitiesField field={field} input={input} />,
89
102
  isClient: <IsClientField field={field} />,
90
103
  consentToReceiveMaterials: (
91
104
  <CheckboxWithError
@@ -93,14 +106,7 @@ export const getField =
93
106
  text="Согласен на получение информационных и аналитических материалов по электронной почте"
94
107
  />
95
108
  ),
96
- partnerComments: (
97
- <InputControl
98
- {...getValidation(field('partnerComments'), validatorObj.partnerComments, required)}
99
- placeholder="Укажите интересующий вас вопрос"
100
- isTextarea={true}
101
- {...rest}
102
- />
103
- ),
109
+ partnerComments: <PartnerCommentsField field={field} input={input} />,
104
110
  collectionCount: (
105
111
  <InputControl
106
112
  label="Количество объектов инкассации"
@@ -140,16 +146,3 @@ export const getField =
140
146
  <div key={String(i)}>{InputsMap[input?.name]}</div>
141
147
  ) : null;
142
148
  };
143
-
144
- export function isRenderField({
145
- input,
146
- field,
147
- }: {
148
- input: FieldDef;
149
- field: FormFieldRegisterer<any>;
150
- }) {
151
- const { condition } = input;
152
- const { value } = field(condition?.name || '');
153
-
154
- return !condition || condition?.values?.find((_) => _ === (value?.key ?? value));
155
- }
@@ -1,7 +1,7 @@
1
1
  import { type Option } from '../../ui-kit/Select/Option';
2
2
  import { ACQUIRING_TYPES } from './AcquiringField';
3
3
  import { type FieldDef } from './ApplicationFormContent';
4
- import { FEEDBACK_METHOD, FEEDBACK_TYPES, SERVICE_DIRECTIONS, SERVICE_TYPES } from './contants';
4
+ import { FEEDBACK_METHOD, FEEDBACK_TYPES, SERVICE_DIRECTIONS, SERVICE_TYPES } from './constants';
5
5
  import { VED_TYPES } from './VedField';
6
6
 
7
7
  export interface FormState {
@@ -30,6 +30,9 @@ export const validatorObj: Record<string, Validator> = {
30
30
  feedbackMethod: defaultSelectValidator,
31
31
  serviceType: defaultSelectValidator,
32
32
  serviceDirection: defaultSelectValidator,
33
+ meetingDay: defaultValidator,
34
+ product: defaultValidator,
35
+ localities: defaultValidator,
33
36
  consentDataProcessing: agreementValidator,
34
37
  annualRevenue: defaultValidator,
35
38
  };
@@ -0,0 +1,4 @@
1
+ import { OUT_SERVICE_URL } from './constants';
2
+
3
+ export const getRegionUrl = (typeForm?: string) =>
4
+ typeForm === 'OUTSERVICE' ? OUT_SERVICE_URL : undefined;
@@ -0,0 +1,15 @@
1
+ import type { FormFieldRegisterer } from '../../hooks/useForm';
2
+ import type { FieldDef } from './ApplicationFormContent';
3
+
4
+ export function isRenderField({
5
+ input,
6
+ field,
7
+ }: {
8
+ input: FieldDef;
9
+ field: FormFieldRegisterer<any>;
10
+ }) {
11
+ const { condition } = input;
12
+ const { value } = field(condition?.name || '');
13
+
14
+ return !condition || condition?.values?.find((_) => _ === (value?.key ?? value));
15
+ }
@@ -68,6 +68,7 @@ export default {
68
68
  isShowWithdrawn: true,
69
69
  isShowRemoteRegistration: true,
70
70
  isShowMonthlyInterestPayment: true,
71
+ isShowNewClient: true,
71
72
  }}
72
73
  calcSource={{
73
74
  $ref: '/wcms-resources/vklad-calculator-main-data.json',
@@ -86,6 +87,7 @@ export default {
86
87
  isShowWithdrawn: true,
87
88
  isShowRemoteRegistration: true,
88
89
  isShowMonthlyInterestPayment: true,
90
+ isShowNewClient: true,
89
91
  }}
90
92
  defaultParams={{ sum: 65000, isRemoteRegistration: true }}
91
93
  calcSource={{
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable max-lines, max-lines-per-function */
2
- import { useEffect, useState } from '@redneckz/uni-jsx/lib/hooks';
2
+ import { useCallback, useEffect } from '@redneckz/uni-jsx/lib/hooks';
3
3
  import { type JSONRefObject } from '../../data/JSONRefObject';
4
4
  import { useForm } from '../../hooks/useForm';
5
5
  import { Button } from '../../ui-kit/Button/Button';
@@ -18,20 +18,25 @@ import { type Option } from '../../ui-kit/Select/Option';
18
18
  import { SelectControl } from '../../ui-kit/Select/SelectControl';
19
19
  import { UniBlock } from '../../UniBlock/UniBlock';
20
20
  import { type UniBlockProps } from '../../UniBlock/UniBlockProps';
21
- import { clamp } from '../../utils/clamp';
22
21
  import { style } from '../../utils/style';
23
22
  import { isDefaultParams } from '../CalculatorCredit/isDefaultParams';
24
- import { isNotRubles } from '././isNotRubles';
25
- import { type CalculatorDepositContent } from './CalculatorDepositContent';
23
+ import { type CalculatorDepositContent, type DepositParams } from './CalculatorDepositContent';
26
24
  import {
27
25
  getDepositCalculatorParams,
28
26
  type DepositCalculatorData,
29
- type DepositCalculatorRowsData,
30
27
  type DepositCalculatorSourceBookParams,
31
28
  type TariffsButtonContent,
32
29
  } from './getDepositCalculatorParams';
30
+ import { isRubles } from './isRubles';
33
31
  import { renderDepositParamsForm } from './renderDepositParamsForm';
34
32
  import { renderDepositResult } from './renderDepositResult';
33
+ import {
34
+ getRows,
35
+ normalizeCurrency,
36
+ normalizeMoneyValue,
37
+ normalizeMonthValue,
38
+ normalizeReplenishWithdrawn,
39
+ } from './utils';
35
40
 
36
41
  const MAP = {
37
42
  isMonthlyInterestPayment: 'isMonthlyInterestPayment',
@@ -47,6 +52,7 @@ const DEFAULT_CURRENCY: Option = {
47
52
  };
48
53
 
49
54
  const DEPOSIT_DEFAULT_SUM = 20000;
55
+ const DEPOSIT_DEFAULT_MONTHS = 1;
50
56
 
51
57
  export interface CalculatorDepositProps extends CalculatorDepositContent, UniBlockProps {
52
58
  className?: string;
@@ -65,81 +71,57 @@ export const CalculatorDeposit = UniBlock<CalculatorDepositProps>(
65
71
  }) => {
66
72
  const { rows } = calcSource ?? {};
67
73
  const currencyOptions = rows?.map((_) => _.currency) ?? [DEFAULT_CURRENCY];
68
-
69
- const [userInputParams, { field }] = useForm({
70
- moneyValue: getMoneyDefaultValue(defaultParams, DEPOSIT_DEFAULT_SUM),
71
- monthsValue: getMonthsDefaultValue(defaultParams),
72
- isMonthlyInterestPayment: Boolean(defaultParams?.isMonthlyInterestPayment),
73
- isRemoteRegistration: Boolean(defaultParams?.isRemoteRegistration),
74
- isReplenish: Boolean(defaultParams?.isReplenish),
75
- isWithdrawn: Boolean(defaultParams?.isWithdrawn),
76
- currency: DEFAULT_CURRENCY,
77
- });
78
- const currencyValue = field?.('currency')?.value;
79
- const { onChange: setMonthsValue } = field('monthsValue');
80
- const { onChange: setMoneyValue } = field('moneyValue');
81
-
82
- const row = getRows(rows, currencyValue);
83
- const [defParams, setDefParams] = useState(getDefaultParamsMax(rows?.[0]?.rates));
84
-
85
- const calcParams = getDepositCalculatorParams(
86
- userInputParams,
87
- getRows(rows, currencyValue),
88
- paramsViewSettings,
74
+ const normalize = useCallback(
75
+ (_: DepositParams) =>
76
+ !rows
77
+ ? _
78
+ : {
79
+ ..._,
80
+ ...normalizeReplenishWithdrawn(_),
81
+ ...normalizeMoneyValue(_, rows),
82
+ ...normalizeMonthValue(_, rows),
83
+ ...normalizeCurrency(_, rows),
84
+ },
85
+
86
+ [rows],
87
+ );
88
+ const [userInputParams, { field }] = useForm(
89
+ {
90
+ moneyValue: getMoneyDefaultValue(defaultParams, DEPOSIT_DEFAULT_SUM),
91
+ monthsValue: getMonthsDefaultValue(defaultParams, DEPOSIT_DEFAULT_MONTHS),
92
+ isMonthlyInterestPayment: Boolean(defaultParams?.isMonthlyInterestPayment),
93
+ isRemoteRegistration: Boolean(defaultParams?.isRemoteRegistration),
94
+ isReplenish: Boolean(defaultParams?.isReplenish),
95
+ isWithdrawn: Boolean(defaultParams?.isWithdrawn),
96
+ isNewClient: Boolean(defaultParams?.isNewClient),
97
+ currency: DEFAULT_CURRENCY,
98
+ },
99
+ { normalize },
89
100
  );
90
101
 
91
- useEffect(() => {
92
- if (currencyOptions?.[0]) {
93
- field?.('currency')?.onChange?.(currencyOptions?.[0]);
94
- }
95
- }, [calcSource]);
102
+ const currencyValue = field?.('currency')?.value ?? DEFAULT_CURRENCY;
103
+ const isNewClient = field?.('isNewClient')?.value;
104
+ const row = getRows(rows, currencyValue);
105
+ const calcParams = getDepositCalculatorParams(userInputParams, row, paramsViewSettings);
106
+ const { rate, income, finalSum, type = '' } = calcParams;
96
107
 
97
108
  const handleDefaultParamsCals = () => {
98
109
  setDefaultParamsCalc({
99
110
  field,
100
- defParams: defParams as DepositCalculatorSourceBookParams,
111
+ defParams: getDefaultParamsMax(row, isNewClient) as DepositCalculatorSourceBookParams,
101
112
  calcParams,
102
113
  monthsValue: 'minMonths',
103
114
  map: MAP,
104
115
  });
105
116
  };
106
117
 
107
- const { defaultMonth, rate, income, finalSum, type = '' } = calcParams;
108
-
109
- useEffect(() => {
110
- setDefParams(getDefaultParamsMax(row));
111
- }, [currencyValue, rows]);
112
-
113
- useEffect(() => {
114
- !userInputParams.monthsValue && setMonthsValue && setMonthsValue(defaultMonth);
115
- }, [defaultMonth]);
116
-
117
- useEffect(() => {
118
- setMoneyValue &&
119
- setMoneyValue(clamp(userInputParams.moneyValue, calcParams.minSum, calcParams.maxSum));
120
- }, [calcParams.minSum, calcParams.maxSum, row]);
121
-
122
118
  useEffect(() => {
123
- if (!isDefaultParams(defaultParams) && defParams) {
119
+ if (!isDefaultParams(defaultParams) && row) {
124
120
  handleDefaultParamsCals();
125
121
  }
126
- }, [defParams, defaultParams]);
122
+ }, [defaultParams, rows]);
127
123
 
128
- useEffect(() => {
129
- setMoneyValue?.(clamp(userInputParams.moneyValue, calcParams.minSum, calcParams.maxSum));
130
- if (isNotRubles(currencyValue?.key)) {
131
- field?.('isReplenish')?.onChange?.(false);
132
- field?.('isWithdrawn')?.onChange?.(false);
133
- }
134
- }, [currencyValue]);
135
-
136
- useEffect(() => {
137
- if (!isDefaultParams(defaultParams) && defParams) {
138
- handleDefaultParamsCals();
139
- }
140
- }, [defaultParams, row, defParams]);
141
-
142
- const isMaxRate = rate === defParams?.rate;
124
+ const isMaxRate = rate === getDefaultParamsMax(row, isNewClient)?.rate;
143
125
 
144
126
  return (
145
127
  <CalculatorLayout className={className} title={title} {...rest}>
@@ -188,7 +170,7 @@ export const CalculatorDeposit = UniBlock<CalculatorDepositProps>(
188
170
  },
189
171
  );
190
172
 
191
- const getStep = (key = '') => (isNotRubles(key) ? 100 : 1000);
173
+ const getStep = (key = '') => (isRubles(key) ? 1000 : 100);
192
174
 
193
175
  const getTariffButton = (buttons: TariffsButtonContent[] = [], btnType = '') => {
194
176
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
@@ -203,9 +185,3 @@ const renderMaxRateButton = (handleDefaultParamsCals: () => void, isMaxRate = fa
203
185
  Показать максимальную ставку
204
186
  </Button>
205
187
  );
206
-
207
- const getRows = (rows?: DepositCalculatorRowsData[], currencyValue?: Option) => {
208
- const { rates } = rows?.find((_) => _?.currency.key === currencyValue?.key) ?? {};
209
-
210
- return rates ?? rows?.[0]?.rates;
211
- };
@@ -1,7 +1,9 @@
1
1
  import {
2
+ type CalcValueProps,
2
3
  type CommonCalculatorProps,
3
4
  type CommonDefaultParams,
4
5
  } from '../../ui-kit/Calculator/CalculatorProps';
6
+ import { type Option } from '../../ui-kit/Select/Option';
5
7
  import { type UniBlockContent } from '../../UniBlock/UniBlockProps';
6
8
 
7
9
  export interface CalculatorDepositParamsViewSettings {
@@ -19,10 +21,12 @@ export interface CalculatorDepositParamsViewSettings {
19
21
  isShowReplenish?: boolean;
20
22
  /** @title Снятие */
21
23
  isShowWithdrawn?: boolean;
24
+ /** @title Новый клиент */
25
+ isShowNewClient?: boolean;
22
26
  }
23
27
 
24
28
  export interface CommonDepositParams {
25
- /** @title Возможность помолнять */
29
+ /** @title Возможность пополнять */
26
30
  isReplenish?: boolean;
27
31
  /** @title Возможно снимать */
28
32
  isWithdrawn?: boolean;
@@ -30,11 +34,16 @@ export interface CommonDepositParams {
30
34
  isMonthlyInterestPayment?: boolean;
31
35
  /** @title Дистанционное оформление */
32
36
  isRemoteRegistration?: boolean;
37
+ /** @title Новый клиент */
38
+ isNewClient?: boolean;
39
+ /** @title Валюта */
40
+ currency?: Option;
33
41
  /** @hidden */
34
42
  type?: string;
35
43
  }
36
44
 
37
45
  export interface DepositDefaultParams extends CommonDefaultParams, CommonDepositParams {}
46
+ export interface DepositParams extends DepositDefaultParams, CalcValueProps {}
38
47
 
39
48
  /**
40
49
  * @title Калькулятор вкладов
@@ -27,7 +27,9 @@ const DEFAULT_DEPOSIT_CALCULATOR_PARAMS: DepositCalculatorSourceBookParams = {
27
27
 
28
28
  export interface DepositCalculatorSourceBookParams
29
29
  extends CommonDepositParams,
30
- CalcDefaultParamsProps {}
30
+ CalcDefaultParamsProps {
31
+ currency?: Option;
32
+ }
31
33
 
32
34
  export interface DepositCalculatorUserInputParams extends CommonDepositParams, CalcValueProps {}
33
35
 
@@ -47,7 +49,7 @@ export type TariffsButtonContent = LinkButtonContent & {
47
49
 
48
50
  export type DepositCalculatorRowsData = {
49
51
  currency: Option;
50
- rates?: DepositCalculatorSourceBookParams[];
52
+ rates: DepositCalculatorSourceBookParams[];
51
53
  };
52
54
 
53
55
  export type DepositCalculatorData = {
@@ -66,35 +68,38 @@ export const getDepositCalculatorParams = (
66
68
  const isExcludeRemoteRegistration = !paramsViewSettings?.isShowRemoteRegistration;
67
69
  const isExcludeReplenish = !paramsViewSettings?.isShowReplenish;
68
70
  const isExcludeWithdrawn = !paramsViewSettings?.isShowWithdrawn;
71
+ const isExcludeNewClient = !paramsViewSettings?.isShowNewClient;
69
72
  const depositCalculatorSourceBookParams =
70
- rows?.find(
71
- (row) =>
73
+ rows?.find((row) =>
74
+ [
72
75
  checkRowByParam({
73
76
  row,
74
77
  userInputParams,
75
78
  paramKey: 'isReplenish',
76
79
  isExclude: isExcludeReplenish,
77
- }) &&
80
+ }),
78
81
  checkRowByParam({
79
82
  row,
80
83
  userInputParams,
81
84
  paramKey: 'isWithdrawn',
82
85
  isExclude: isExcludeWithdrawn,
83
- }) &&
86
+ }),
84
87
  checkRowByParam({
85
88
  row,
86
89
  userInputParams,
87
90
  paramKey: 'isMonthlyInterestPayment',
88
91
  isExclude: isExcludeMonthlyInterestPayment,
89
- }) &&
92
+ }),
90
93
  checkRowByParam({
91
94
  row,
92
95
  userInputParams,
93
96
  paramKey: 'isRemoteRegistration',
94
97
  isExclude: isExcludeRemoteRegistration,
95
- }) &&
96
- checkRangeByKeys(moneyValue, ['minSum', 'maxSum'], row) &&
98
+ }),
99
+ isExcludeNewClient || userInputParams?.['isNewClient'] === row?.['isNewClient'],
100
+ checkRangeByKeys(moneyValue, ['minSum', 'maxSum'], row),
97
101
  checkRangeByKeys(monthsValue || defaultMonth, ['minMonths', 'maxMonths'], row),
102
+ ].every(Boolean),
98
103
  ) || DEFAULT_DEPOSIT_CALCULATOR_PARAMS;
99
104
 
100
105
  const { rate } = depositCalculatorSourceBookParams;
@@ -0,0 +1 @@
1
+ export const isRubles = (currency = 'rub') => currency === 'rub';