@redneckz/wildless-cms-uni-blocks 0.9.11 → 0.9.13

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 (350) hide show
  1. package/bin/migrateContentUnit.js +1 -1
  2. package/bundle/blocks.schema.json +1 -1
  3. package/bundle/bundle.umd.js +131 -56
  4. package/bundle/bundle.umd.min.js +1 -1
  5. package/bundle/components/Calculator/CalculatorContent.d.ts +18 -17
  6. package/bundle/components/Calculator/DepositCalculatorForm.d.ts +2 -2
  7. package/bundle/components/Calculator/rangeHelpers.d.ts +1 -0
  8. package/bundle/components/Calculator/renderMonthsInput.d.ts +1 -0
  9. package/bundle/components/Calculator/useDepositCalculatorParams.d.ts +3 -1
  10. package/bundle/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -6
  11. package/bundle/components/Footer/MediaButton.d.ts +3 -4
  12. package/bundle/content-page-repository/ContentPageRepository.d.ts +1 -5
  13. package/bundle/content-page-repository/alignImg.d.ts +9 -0
  14. package/bundle/content-page-repository/computeImgOutputPath.d.ts +3 -0
  15. package/bundle/content-page-repository/resizeImg.d.ts +3 -0
  16. package/bundle/content-page-repository/transformContentPage.d.ts +1 -0
  17. package/bundle/content-page-repository/transformImg.d.ts +6 -5
  18. package/bundle/content-page-repository/transformPicture.d.ts +1 -1
  19. package/bundle/ui-kit/InputListRange/InputListRange.d.ts +2 -0
  20. package/bundle/ui-kit/InputListRange/InputListRangeProps.d.ts +10 -0
  21. package/bundle/utils/arrayByRange.d.ts +1 -0
  22. package/bundle/utils/isPictureSizeEmpty.d.ts +2 -2
  23. package/bundle/utils/mergeIntervals.d.ts +1 -0
  24. package/dist/components/Calculator/CalculatorContent.d.ts +18 -17
  25. package/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
  26. package/dist/components/Calculator/DepositCalculatorForm.d.ts +2 -2
  27. package/dist/components/Calculator/DepositCalculatorForm.js +21 -11
  28. package/dist/components/Calculator/DepositCalculatorForm.js.map +1 -1
  29. package/dist/components/Calculator/constants.js +1 -1
  30. package/dist/components/Calculator/constants.js.map +1 -1
  31. package/dist/components/Calculator/rangeHelpers.d.ts +1 -0
  32. package/dist/components/Calculator/rangeHelpers.js +4 -1
  33. package/dist/components/Calculator/rangeHelpers.js.map +1 -1
  34. package/dist/components/Calculator/renderMonthsInput.d.ts +1 -0
  35. package/dist/components/Calculator/renderMonthsInput.js +3 -2
  36. package/dist/components/Calculator/renderMonthsInput.js.map +1 -1
  37. package/dist/components/Calculator/useCreditCalculatorParams.js +27 -29
  38. package/dist/components/Calculator/useCreditCalculatorParams.js.map +1 -1
  39. package/dist/components/Calculator/useDepositCalculatorParams.d.ts +3 -1
  40. package/dist/components/Calculator/useDepositCalculatorParams.js +22 -6
  41. package/dist/components/Calculator/useDepositCalculatorParams.js.map +1 -1
  42. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -6
  43. package/dist/components/Footer/MediaButton.d.ts +3 -4
  44. package/dist/components/Footer/MediaButton.js.map +1 -1
  45. package/dist/content-page-repository/ContentPageRepository.d.ts +1 -5
  46. package/dist/content-page-repository/ContentPageRepository.js +7 -25
  47. package/dist/content-page-repository/ContentPageRepository.js.map +1 -1
  48. package/dist/content-page-repository/alignImg.d.ts +9 -0
  49. package/dist/content-page-repository/alignImg.js +23 -0
  50. package/dist/content-page-repository/alignImg.js.map +1 -0
  51. package/dist/content-page-repository/computeImgOutputPath.d.ts +3 -0
  52. package/dist/content-page-repository/computeImgOutputPath.js +18 -0
  53. package/dist/content-page-repository/computeImgOutputPath.js.map +1 -0
  54. package/dist/content-page-repository/resizeImg.d.ts +3 -0
  55. package/dist/content-page-repository/resizeImg.js +19 -0
  56. package/dist/content-page-repository/resizeImg.js.map +1 -0
  57. package/dist/content-page-repository/transformContentPage.d.ts +1 -0
  58. package/dist/content-page-repository/transformContentPage.js +25 -19
  59. package/dist/content-page-repository/transformContentPage.js.map +1 -1
  60. package/dist/content-page-repository/transformImg.d.ts +6 -5
  61. package/dist/content-page-repository/transformImg.js +26 -76
  62. package/dist/content-page-repository/transformImg.js.map +1 -1
  63. package/dist/content-page-repository/transformPicture.d.ts +1 -1
  64. package/dist/content-page-repository/transformPicture.js +8 -16
  65. package/dist/content-page-repository/transformPicture.js.map +1 -1
  66. package/dist/ui-kit/InputListRange/InputListRange.d.ts +2 -0
  67. package/dist/ui-kit/InputListRange/InputListRange.js +41 -0
  68. package/dist/ui-kit/InputListRange/InputListRange.js.map +1 -0
  69. package/dist/ui-kit/InputListRange/InputListRangeProps.d.ts +10 -0
  70. package/dist/ui-kit/InputListRange/InputListRangeProps.js +2 -0
  71. package/dist/ui-kit/InputListRange/InputListRangeProps.js.map +1 -0
  72. package/dist/ui-kit/Select/Select.js +2 -1
  73. package/dist/ui-kit/Select/Select.js.map +1 -1
  74. package/dist/utils/arrayByRange.d.ts +1 -0
  75. package/dist/utils/arrayByRange.js +5 -0
  76. package/dist/utils/arrayByRange.js.map +1 -0
  77. package/dist/utils/isPictureSizeEmpty.d.ts +2 -2
  78. package/dist/utils/isPictureSizeEmpty.js +1 -1
  79. package/dist/utils/isPictureSizeEmpty.js.map +1 -1
  80. package/dist/utils/mergeIntervals.d.ts +1 -0
  81. package/dist/utils/mergeIntervals.js +20 -0
  82. package/dist/utils/mergeIntervals.js.map +1 -0
  83. package/lib/common.css +1 -1
  84. package/lib/components/Calculator/CalculatorContent.d.ts +18 -17
  85. package/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
  86. package/lib/components/Calculator/DepositCalculatorForm.d.ts +2 -2
  87. package/lib/components/Calculator/DepositCalculatorForm.js +22 -12
  88. package/lib/components/Calculator/DepositCalculatorForm.js.map +1 -1
  89. package/lib/components/Calculator/constants.js +1 -1
  90. package/lib/components/Calculator/constants.js.map +1 -1
  91. package/lib/components/Calculator/rangeHelpers.d.ts +1 -0
  92. package/lib/components/Calculator/rangeHelpers.js +2 -0
  93. package/lib/components/Calculator/rangeHelpers.js.map +1 -1
  94. package/lib/components/Calculator/renderMonthsInput.d.ts +1 -0
  95. package/lib/components/Calculator/renderMonthsInput.js +3 -2
  96. package/lib/components/Calculator/renderMonthsInput.js.map +1 -1
  97. package/lib/components/Calculator/useCreditCalculatorParams.js +27 -29
  98. package/lib/components/Calculator/useCreditCalculatorParams.js.map +1 -1
  99. package/lib/components/Calculator/useDepositCalculatorParams.d.ts +3 -1
  100. package/lib/components/Calculator/useDepositCalculatorParams.js +22 -6
  101. package/lib/components/Calculator/useDepositCalculatorParams.js.map +1 -1
  102. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -6
  103. package/lib/components/Footer/MediaButton.d.ts +3 -4
  104. package/lib/components/Footer/MediaButton.js.map +1 -1
  105. package/lib/content-page-repository/ContentPageRepository.d.ts +1 -5
  106. package/lib/content-page-repository/ContentPageRepository.js +8 -26
  107. package/lib/content-page-repository/ContentPageRepository.js.map +1 -1
  108. package/lib/content-page-repository/alignImg.d.ts +9 -0
  109. package/lib/content-page-repository/alignImg.js +17 -0
  110. package/lib/content-page-repository/alignImg.js.map +1 -0
  111. package/lib/content-page-repository/computeImgOutputPath.d.ts +3 -0
  112. package/lib/content-page-repository/computeImgOutputPath.js +12 -0
  113. package/lib/content-page-repository/computeImgOutputPath.js.map +1 -0
  114. package/lib/content-page-repository/resizeImg.d.ts +3 -0
  115. package/lib/content-page-repository/resizeImg.js +13 -0
  116. package/lib/content-page-repository/resizeImg.js.map +1 -0
  117. package/lib/content-page-repository/transformContentPage.d.ts +1 -0
  118. package/lib/content-page-repository/transformContentPage.js +23 -18
  119. package/lib/content-page-repository/transformContentPage.js.map +1 -1
  120. package/lib/content-page-repository/transformImg.d.ts +6 -5
  121. package/lib/content-page-repository/transformImg.js +26 -76
  122. package/lib/content-page-repository/transformImg.js.map +1 -1
  123. package/lib/content-page-repository/transformPicture.d.ts +1 -1
  124. package/lib/content-page-repository/transformPicture.js +8 -16
  125. package/lib/content-page-repository/transformPicture.js.map +1 -1
  126. package/lib/ui-kit/InputListRange/InputListRange.d.ts +2 -0
  127. package/lib/ui-kit/InputListRange/InputListRange.js +39 -0
  128. package/lib/ui-kit/InputListRange/InputListRange.js.map +1 -0
  129. package/lib/ui-kit/InputListRange/InputListRangeProps.d.ts +10 -0
  130. package/lib/ui-kit/InputListRange/InputListRangeProps.js +2 -0
  131. package/lib/ui-kit/InputListRange/InputListRangeProps.js.map +1 -0
  132. package/lib/ui-kit/Select/Select.js +2 -1
  133. package/lib/ui-kit/Select/Select.js.map +1 -1
  134. package/lib/utils/arrayByRange.d.ts +1 -0
  135. package/lib/utils/arrayByRange.js +2 -0
  136. package/lib/utils/arrayByRange.js.map +1 -0
  137. package/lib/utils/isPictureSizeEmpty.d.ts +2 -2
  138. package/lib/utils/isPictureSizeEmpty.js +1 -1
  139. package/lib/utils/isPictureSizeEmpty.js.map +1 -1
  140. package/lib/utils/mergeIntervals.d.ts +1 -0
  141. package/lib/utils/mergeIntervals.js +17 -0
  142. package/lib/utils/mergeIntervals.js.map +1 -0
  143. package/mobile/bundle/bundle.umd.js +1 -1
  144. package/mobile/bundle/bundle.umd.min.js +1 -1
  145. package/mobile/bundle/components/Calculator/CalculatorContent.d.ts +18 -17
  146. package/mobile/bundle/components/Calculator/DepositCalculatorForm.d.ts +2 -2
  147. package/mobile/bundle/components/Calculator/rangeHelpers.d.ts +1 -0
  148. package/mobile/bundle/components/Calculator/renderMonthsInput.d.ts +1 -0
  149. package/mobile/bundle/components/Calculator/useDepositCalculatorParams.d.ts +3 -1
  150. package/mobile/bundle/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -6
  151. package/mobile/bundle/components/Footer/MediaButton.d.ts +3 -4
  152. package/mobile/bundle/content-page-repository/ContentPageRepository.d.ts +1 -5
  153. package/mobile/bundle/content-page-repository/alignImg.d.ts +9 -0
  154. package/mobile/bundle/content-page-repository/computeImgOutputPath.d.ts +3 -0
  155. package/mobile/bundle/content-page-repository/resizeImg.d.ts +3 -0
  156. package/mobile/bundle/content-page-repository/transformContentPage.d.ts +1 -0
  157. package/mobile/bundle/content-page-repository/transformImg.d.ts +6 -5
  158. package/mobile/bundle/content-page-repository/transformPicture.d.ts +1 -1
  159. package/mobile/bundle/ui-kit/InputListRange/InputListRange.d.ts +2 -0
  160. package/mobile/bundle/ui-kit/InputListRange/InputListRangeProps.d.ts +10 -0
  161. package/mobile/bundle/utils/arrayByRange.d.ts +1 -0
  162. package/mobile/bundle/utils/isPictureSizeEmpty.d.ts +2 -2
  163. package/mobile/bundle/utils/mergeIntervals.d.ts +1 -0
  164. package/mobile/dist/components/Calculator/CalculatorContent.d.ts +18 -17
  165. package/mobile/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
  166. package/mobile/dist/components/Calculator/DepositCalculatorForm.d.ts +2 -2
  167. package/mobile/dist/components/Calculator/DepositCalculatorForm.js +21 -11
  168. package/mobile/dist/components/Calculator/DepositCalculatorForm.js.map +1 -1
  169. package/mobile/dist/components/Calculator/constants.js +1 -1
  170. package/mobile/dist/components/Calculator/constants.js.map +1 -1
  171. package/mobile/dist/components/Calculator/rangeHelpers.d.ts +1 -0
  172. package/mobile/dist/components/Calculator/rangeHelpers.js +4 -1
  173. package/mobile/dist/components/Calculator/rangeHelpers.js.map +1 -1
  174. package/mobile/dist/components/Calculator/renderMonthsInput.d.ts +1 -0
  175. package/mobile/dist/components/Calculator/renderMonthsInput.js +3 -2
  176. package/mobile/dist/components/Calculator/renderMonthsInput.js.map +1 -1
  177. package/mobile/dist/components/Calculator/useCreditCalculatorParams.js +27 -29
  178. package/mobile/dist/components/Calculator/useCreditCalculatorParams.js.map +1 -1
  179. package/mobile/dist/components/Calculator/useDepositCalculatorParams.d.ts +3 -1
  180. package/mobile/dist/components/Calculator/useDepositCalculatorParams.js +22 -6
  181. package/mobile/dist/components/Calculator/useDepositCalculatorParams.js.map +1 -1
  182. package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -6
  183. package/mobile/dist/components/Footer/MediaButton.d.ts +3 -4
  184. package/mobile/dist/components/Footer/MediaButton.js.map +1 -1
  185. package/mobile/dist/content-page-repository/ContentPageRepository.d.ts +1 -5
  186. package/mobile/dist/content-page-repository/ContentPageRepository.js +7 -25
  187. package/mobile/dist/content-page-repository/ContentPageRepository.js.map +1 -1
  188. package/mobile/dist/content-page-repository/alignImg.d.ts +9 -0
  189. package/mobile/dist/content-page-repository/alignImg.js +23 -0
  190. package/mobile/dist/content-page-repository/alignImg.js.map +1 -0
  191. package/mobile/dist/content-page-repository/computeImgOutputPath.d.ts +3 -0
  192. package/mobile/dist/content-page-repository/computeImgOutputPath.js +18 -0
  193. package/mobile/dist/content-page-repository/computeImgOutputPath.js.map +1 -0
  194. package/mobile/dist/content-page-repository/resizeImg.d.ts +3 -0
  195. package/mobile/dist/content-page-repository/resizeImg.js +19 -0
  196. package/mobile/dist/content-page-repository/resizeImg.js.map +1 -0
  197. package/mobile/dist/content-page-repository/transformContentPage.d.ts +1 -0
  198. package/mobile/dist/content-page-repository/transformContentPage.js +25 -19
  199. package/mobile/dist/content-page-repository/transformContentPage.js.map +1 -1
  200. package/mobile/dist/content-page-repository/transformImg.d.ts +6 -5
  201. package/mobile/dist/content-page-repository/transformImg.js +26 -76
  202. package/mobile/dist/content-page-repository/transformImg.js.map +1 -1
  203. package/mobile/dist/content-page-repository/transformPicture.d.ts +1 -1
  204. package/mobile/dist/content-page-repository/transformPicture.js +8 -16
  205. package/mobile/dist/content-page-repository/transformPicture.js.map +1 -1
  206. package/mobile/dist/ui-kit/InputListRange/InputListRange.d.ts +2 -0
  207. package/mobile/dist/ui-kit/InputListRange/InputListRange.js +41 -0
  208. package/mobile/dist/ui-kit/InputListRange/InputListRange.js.map +1 -0
  209. package/mobile/dist/ui-kit/InputListRange/InputListRangeProps.d.ts +10 -0
  210. package/mobile/dist/ui-kit/InputListRange/InputListRangeProps.js +2 -0
  211. package/mobile/dist/ui-kit/InputListRange/InputListRangeProps.js.map +1 -0
  212. package/mobile/dist/ui-kit/Select/Select.js +2 -1
  213. package/mobile/dist/ui-kit/Select/Select.js.map +1 -1
  214. package/mobile/dist/utils/arrayByRange.d.ts +1 -0
  215. package/mobile/dist/utils/arrayByRange.js +5 -0
  216. package/mobile/dist/utils/arrayByRange.js.map +1 -0
  217. package/mobile/dist/utils/isPictureSizeEmpty.d.ts +2 -2
  218. package/mobile/dist/utils/isPictureSizeEmpty.js +1 -1
  219. package/mobile/dist/utils/isPictureSizeEmpty.js.map +1 -1
  220. package/mobile/dist/utils/mergeIntervals.d.ts +1 -0
  221. package/mobile/dist/utils/mergeIntervals.js +20 -0
  222. package/mobile/dist/utils/mergeIntervals.js.map +1 -0
  223. package/mobile/lib/components/Calculator/CalculatorContent.d.ts +18 -17
  224. package/mobile/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
  225. package/mobile/lib/components/Calculator/DepositCalculatorForm.d.ts +2 -2
  226. package/mobile/lib/components/Calculator/DepositCalculatorForm.js +22 -12
  227. package/mobile/lib/components/Calculator/DepositCalculatorForm.js.map +1 -1
  228. package/mobile/lib/components/Calculator/constants.js +1 -1
  229. package/mobile/lib/components/Calculator/constants.js.map +1 -1
  230. package/mobile/lib/components/Calculator/rangeHelpers.d.ts +1 -0
  231. package/mobile/lib/components/Calculator/rangeHelpers.js +2 -0
  232. package/mobile/lib/components/Calculator/rangeHelpers.js.map +1 -1
  233. package/mobile/lib/components/Calculator/renderMonthsInput.d.ts +1 -0
  234. package/mobile/lib/components/Calculator/renderMonthsInput.js +3 -2
  235. package/mobile/lib/components/Calculator/renderMonthsInput.js.map +1 -1
  236. package/mobile/lib/components/Calculator/useCreditCalculatorParams.js +27 -29
  237. package/mobile/lib/components/Calculator/useCreditCalculatorParams.js.map +1 -1
  238. package/mobile/lib/components/Calculator/useDepositCalculatorParams.d.ts +3 -1
  239. package/mobile/lib/components/Calculator/useDepositCalculatorParams.js +22 -6
  240. package/mobile/lib/components/Calculator/useDepositCalculatorParams.js.map +1 -1
  241. package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -6
  242. package/mobile/lib/components/Footer/MediaButton.d.ts +3 -4
  243. package/mobile/lib/components/Footer/MediaButton.js.map +1 -1
  244. package/mobile/lib/content-page-repository/ContentPageRepository.d.ts +1 -5
  245. package/mobile/lib/content-page-repository/ContentPageRepository.js +8 -26
  246. package/mobile/lib/content-page-repository/ContentPageRepository.js.map +1 -1
  247. package/mobile/lib/content-page-repository/alignImg.d.ts +9 -0
  248. package/mobile/lib/content-page-repository/alignImg.js +17 -0
  249. package/mobile/lib/content-page-repository/alignImg.js.map +1 -0
  250. package/mobile/lib/content-page-repository/computeImgOutputPath.d.ts +3 -0
  251. package/mobile/lib/content-page-repository/computeImgOutputPath.js +12 -0
  252. package/mobile/lib/content-page-repository/computeImgOutputPath.js.map +1 -0
  253. package/mobile/lib/content-page-repository/resizeImg.d.ts +3 -0
  254. package/mobile/lib/content-page-repository/resizeImg.js +13 -0
  255. package/mobile/lib/content-page-repository/resizeImg.js.map +1 -0
  256. package/mobile/lib/content-page-repository/transformContentPage.d.ts +1 -0
  257. package/mobile/lib/content-page-repository/transformContentPage.js +23 -18
  258. package/mobile/lib/content-page-repository/transformContentPage.js.map +1 -1
  259. package/mobile/lib/content-page-repository/transformImg.d.ts +6 -5
  260. package/mobile/lib/content-page-repository/transformImg.js +26 -76
  261. package/mobile/lib/content-page-repository/transformImg.js.map +1 -1
  262. package/mobile/lib/content-page-repository/transformPicture.d.ts +1 -1
  263. package/mobile/lib/content-page-repository/transformPicture.js +8 -16
  264. package/mobile/lib/content-page-repository/transformPicture.js.map +1 -1
  265. package/mobile/lib/ui-kit/InputListRange/InputListRange.d.ts +2 -0
  266. package/mobile/lib/ui-kit/InputListRange/InputListRange.js +39 -0
  267. package/mobile/lib/ui-kit/InputListRange/InputListRange.js.map +1 -0
  268. package/mobile/lib/ui-kit/InputListRange/InputListRangeProps.d.ts +10 -0
  269. package/mobile/lib/ui-kit/InputListRange/InputListRangeProps.js +2 -0
  270. package/mobile/lib/ui-kit/InputListRange/InputListRangeProps.js.map +1 -0
  271. package/mobile/lib/ui-kit/Select/Select.js +2 -1
  272. package/mobile/lib/ui-kit/Select/Select.js.map +1 -1
  273. package/mobile/lib/utils/arrayByRange.d.ts +1 -0
  274. package/mobile/lib/utils/arrayByRange.js +2 -0
  275. package/mobile/lib/utils/arrayByRange.js.map +1 -0
  276. package/mobile/lib/utils/isPictureSizeEmpty.d.ts +2 -2
  277. package/mobile/lib/utils/isPictureSizeEmpty.js +1 -1
  278. package/mobile/lib/utils/isPictureSizeEmpty.js.map +1 -1
  279. package/mobile/lib/utils/mergeIntervals.d.ts +1 -0
  280. package/mobile/lib/utils/mergeIntervals.js +17 -0
  281. package/mobile/lib/utils/mergeIntervals.js.map +1 -0
  282. package/mobile/src/components/Calculator/Calculator.example.json +3 -1
  283. package/mobile/src/components/Calculator/CalculatorContent.ts +20 -19
  284. package/mobile/src/components/Calculator/CreditCalculatorForm.tsx +6 -7
  285. package/mobile/src/components/Calculator/DepositCalculatorForm.tsx +48 -15
  286. package/mobile/src/components/Calculator/constants.ts +1 -1
  287. package/mobile/src/components/Calculator/rangeHelpers.ts +10 -0
  288. package/mobile/src/components/Calculator/renderMonthsInput.tsx +13 -2
  289. package/mobile/src/components/Calculator/useCreditCalculatorParams.ts +8 -10
  290. package/mobile/src/components/Calculator/useDepositCalculatorParams.ts +36 -9
  291. package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.example.json +1 -2
  292. package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCardContent.ts +2 -8
  293. package/mobile/src/components/Footer/MediaButton.tsx +3 -5
  294. package/mobile/src/content-page-repository/ContentPageRepository.ts +8 -40
  295. package/mobile/src/content-page-repository/alignImg.ts +32 -0
  296. package/mobile/src/content-page-repository/computeImgOutputPath.ts +20 -0
  297. package/mobile/src/content-page-repository/resizeImg.ts +18 -0
  298. package/mobile/src/content-page-repository/transformContentPage.ts +25 -18
  299. package/mobile/src/content-page-repository/transformImg.ts +49 -121
  300. package/mobile/src/content-page-repository/transformPicture.ts +9 -21
  301. package/mobile/src/ui-kit/InputListRange/InputListRange.tsx +99 -0
  302. package/mobile/src/ui-kit/InputListRange/InputListRangeProps.ts +11 -0
  303. package/mobile/src/ui-kit/Select/Select.tsx +8 -1
  304. package/mobile/src/utils/arrayByRange.ts +4 -0
  305. package/mobile/src/utils/isPictureSizeEmpty.ts +3 -3
  306. package/mobile/src/utils/mergeIntervals.ts +19 -0
  307. package/package.json +1 -1
  308. package/src/components/Calculator/Calculator.example.json +3 -1
  309. package/src/components/Calculator/Calculator.fixture.tsx +4 -0
  310. package/src/components/Calculator/CalculatorContent.ts +20 -19
  311. package/src/components/Calculator/CreditCalculatorForm.tsx +6 -7
  312. package/src/components/Calculator/DepositCalculatorForm.tsx +48 -15
  313. package/src/components/Calculator/constants.ts +1 -1
  314. package/src/components/Calculator/rangeHelpers.ts +10 -0
  315. package/src/components/Calculator/renderMonthsInput.tsx +13 -2
  316. package/src/components/Calculator/useCreditCalculatorParams.ts +8 -10
  317. package/src/components/Calculator/useDepositCalculatorParams.ts +36 -9
  318. package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.example.json +1 -2
  319. package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.fixture.tsx +0 -9
  320. package/src/components/CarouselRecommendationCard/CarouselRecommendationCardContent.ts +2 -8
  321. package/src/components/Footer/MediaButton.tsx +3 -5
  322. package/src/content-page-repository/ContentPageRepository.ts +8 -40
  323. package/src/content-page-repository/alignImg.ts +32 -0
  324. package/src/content-page-repository/computeImgOutputPath.ts +20 -0
  325. package/src/content-page-repository/resizeImg.ts +18 -0
  326. package/src/content-page-repository/transformContentPage.ts +25 -18
  327. package/src/content-page-repository/transformImg.ts +49 -121
  328. package/src/content-page-repository/transformPicture.ts +9 -21
  329. package/src/ui-kit/InputListRange/InputListRange.tsx +99 -0
  330. package/src/ui-kit/InputListRange/InputListRangeProps.ts +11 -0
  331. package/src/ui-kit/Select/Select.tsx +8 -1
  332. package/src/utils/arrayByRange.ts +4 -0
  333. package/src/utils/isPictureSizeEmpty.ts +3 -3
  334. package/src/utils/mergeIntervals.ts +19 -0
  335. package/bundle/content-page-repository/transformImgPath.d.ts +0 -8
  336. package/dist/content-page-repository/transformImgPath.d.ts +0 -8
  337. package/dist/content-page-repository/transformImgPath.js +0 -22
  338. package/dist/content-page-repository/transformImgPath.js.map +0 -1
  339. package/lib/content-page-repository/transformImgPath.d.ts +0 -8
  340. package/lib/content-page-repository/transformImgPath.js +0 -16
  341. package/lib/content-page-repository/transformImgPath.js.map +0 -1
  342. package/mobile/bundle/content-page-repository/transformImgPath.d.ts +0 -8
  343. package/mobile/dist/content-page-repository/transformImgPath.d.ts +0 -8
  344. package/mobile/dist/content-page-repository/transformImgPath.js +0 -22
  345. package/mobile/dist/content-page-repository/transformImgPath.js.map +0 -1
  346. package/mobile/lib/content-page-repository/transformImgPath.d.ts +0 -8
  347. package/mobile/lib/content-page-repository/transformImgPath.js +0 -16
  348. package/mobile/lib/content-page-repository/transformImgPath.js.map +0 -1
  349. package/mobile/src/content-page-repository/transformImgPath.ts +0 -30
  350. package/src/content-page-repository/transformImgPath.ts +0 -30
@@ -17,31 +17,32 @@ export interface CreditCalculatorParamsViewSettings {
17
17
  /** @title Комплексная страховая защита */
18
18
  isShowInsurance?: boolean;
19
19
  }
20
+ export interface DepositCalculatorParamsViewSettings {
21
+ /**
22
+ * @title Выплата процентов
23
+ * @default true
24
+ */
25
+ isShowMonthlyInterestPayment?: boolean;
26
+ /**
27
+ * @title Оформление
28
+ * @default true
29
+ */
30
+ isShowRemoteRegistration?: boolean;
31
+ }
20
32
  export interface CreditCalculatorProps extends CommonCalculatorProps {
21
33
  /** @title Настройка отображения чекбоксов */
22
34
  paramsViewSettings?: CreditCalculatorParamsViewSettings;
23
35
  }
36
+ export interface DepositCalculatorProps extends CommonCalculatorProps {
37
+ /** @title Настройка отображения радио */
38
+ paramsViewSettings?: DepositCalculatorParamsViewSettings;
39
+ }
24
40
  export interface BusinessDepositCalculatorProps extends CommonCalculatorProps {
25
41
  /** @title Сноска снизу блока */
26
42
  bottomFootnote?: string;
27
43
  /** @title Показывать название депозита */
28
44
  isShowDepositeName?: boolean;
29
45
  }
30
- /**
31
- * TODO: данные из справочника
32
- **/
33
- export interface DepositCalculatorParams {
34
- /** @hidden */
35
- minSum?: number;
36
- /** @hidden */
37
- maxSum?: number;
38
- /** @hidden */
39
- minMonths?: number;
40
- /** @hidden */
41
- maxMonths?: number;
42
- /** @hidden */
43
- rate?: number;
44
- }
45
46
  /**
46
47
  * ? Общий интерфейс для всех типов калькуляторов?
47
48
  * ? Используется во вложенных функциях. Может быть как то разбить это и вынести отсюда?
@@ -67,14 +68,14 @@ export declare type CreditCalculatorParamsDef = TitleProps & CreditCalculatorPro
67
68
  * @title Калькулятор вкладов
68
69
  * @default {"calcType": "DepositCalculatorForm"}
69
70
  */
70
- export declare type DepositCalculatorParamsDef = TitleProps & DepositCalculatorParams & CommonCalculatorProps & {
71
+ export declare type DepositCalculatorParamsDef = TitleProps & DepositCalculatorProps & {
71
72
  calcType: 'DepositCalculatorForm';
72
73
  };
73
74
  /**
74
75
  * @title Калькулятор вкладов - бизнес
75
76
  * @default {"calcType": "BusinessDepositCalculatorForm"}
76
77
  */
77
- export declare type BusinessDepositCalculatorParamsDef = TitleProps & DepositCalculatorParams & BusinessDepositCalculatorProps & {
78
+ export declare type BusinessDepositCalculatorParamsDef = TitleProps & BusinessDepositCalculatorProps & {
78
79
  calcType: 'BusinessDepositCalculatorForm';
79
80
  };
80
81
  /**
@@ -1,5 +1,5 @@
1
- import { CommonCalculatorProps } from './CalculatorContent';
2
- export interface DepositCalculatorProp extends CommonCalculatorProps {
1
+ import { DepositCalculatorProps } from './CalculatorContent';
2
+ export interface DepositCalculatorProp extends DepositCalculatorProps {
3
3
  className?: string;
4
4
  }
5
5
  export declare const DepositCalculatorForm: import("@redneckz/uni-jsx").UNIComponent<DepositCalculatorProp, any, any>;
@@ -1,4 +1,5 @@
1
1
  export declare const getRangeByKeys: <MinKey extends string, MaxKey extends string, T extends Record<MinKey | MaxKey, number>>([minKey, maxKey]: [MinKey, MaxKey], rows?: T[]) => {
2
2
  [x: string]: unknown;
3
3
  };
4
+ export declare const getMergeRangesByKeys: <MinKey extends string, MaxKey extends string, T extends Record<MinKey | MaxKey, number>>([minKey, maxKey]: [MinKey, MaxKey], rows?: T[]) => number[][];
4
5
  export declare const checkRangeByKeys: <MinKey extends string, MaxKey extends string, T extends Record<MinKey | MaxKey, number>>(value: number, [minKey, maxKey]: [MinKey, MaxKey], sourceBookRow: T) => boolean;
@@ -3,6 +3,7 @@ interface RenderMonthsInputParams {
3
3
  minMonths: number;
4
4
  maxMonths: number;
5
5
  monthsValue: number;
6
+ availableMonths?: Array<number>;
6
7
  }
7
8
  export declare function renderMonthsInput(title: string, params: RenderMonthsInputParams, callback?: (value: number) => void): JSX.Element;
8
9
  export {};
@@ -1,3 +1,4 @@
1
+ import { DepositCalculatorParamsViewSettings } from './CalculatorContent';
1
2
  export interface CommonDepositParams {
2
3
  isMonthlyInterestPayment: boolean;
3
4
  isRemoteRegistration: boolean;
@@ -14,10 +15,11 @@ export interface DepositCalculatorUserInputParams extends CommonDepositParams {
14
15
  monthsValue: number;
15
16
  }
16
17
  export interface DepositCalculatorParams extends DepositCalculatorSourceBookParams, DepositCalculatorUserInputParams {
18
+ availableMonths: number[];
17
19
  income: number;
18
20
  finalSum: number;
19
21
  }
20
22
  export declare type DepositCalculatorData = {
21
23
  rows: DepositCalculatorSourceBookParams[];
22
24
  };
23
- export declare const useDepositCalculatorParams: (userInputParams: DepositCalculatorUserInputParams, sourceBookDir?: string) => DepositCalculatorParams;
25
+ export declare const useDepositCalculatorParams: (userInputParams: DepositCalculatorUserInputParams, sourceBookDir?: string, paramsViewSettings?: DepositCalculatorParamsViewSettings) => DepositCalculatorParams;
@@ -1,15 +1,11 @@
1
- import type { ButtonVersion } from '../../model/ButtonVersion';
2
1
  import type { HeadlineCommonProps } from '../../model/HeadlineType';
3
2
  import type { UniBlockContent } from '../../model/JSXBlock';
4
3
  import type { LinkCommonProps } from '../../model/LinkProps';
5
4
  import type { IconProps } from '../../model/Picture';
6
- import type { ButtonWithIconProps } from '../../ui-kit/Button/ButtonProps';
5
+ import type { ButtonProps } from '../../ui-kit/Button/ButtonProps';
7
6
  import type { ListContent } from '../../ui-kit/List/ListContent';
8
7
  import type { TextAlign } from '../../ui-kit/Text/TextProps';
9
- export declare type RecommendationSocialMedia = LinkCommonProps & IconProps & ButtonWithIconProps & {
10
- version: ButtonVersion;
11
- rounded?: boolean;
12
- };
8
+ export declare type RecommendationSocialMedia = LinkCommonProps & IconProps & ButtonProps;
13
9
  /**
14
10
  * @title Карточка рекомендаций
15
11
  */
@@ -1,8 +1,7 @@
1
- import type { IconVersion } from '../../model/IconVersion';
2
- import type { ButtonWithIconProps } from '../../ui-kit/Button/ButtonProps';
1
+ import type { IconProps } from '../../model/Picture';
2
+ import type { ButtonProps } from '../../ui-kit/Button/ButtonProps';
3
3
  export declare type ButtonSize = 'default' | 'small';
4
- interface MediaButtonProps extends ButtonWithIconProps {
5
- iconVersion?: IconVersion;
4
+ interface MediaButtonProps extends ButtonProps, IconProps {
6
5
  buttonSize?: ButtonSize;
7
6
  }
8
7
  export declare const MediaButton: import("@redneckz/uni-jsx").UNIComponent<MediaButtonProps, any, any>;
@@ -3,12 +3,8 @@ import type { TransformationOptions } from './TransformationOptions';
3
3
  export declare class ContentPageRepository {
4
4
  private readonly options;
5
5
  static readonly inst: ContentPageRepository;
6
- private cache;
7
6
  constructor(options?: TransformationOptions);
8
7
  listAllContentPages(): Promise<string[]>;
9
- getAllContentPages(): Promise<ContentPageDef[]>;
10
- getSecondaryContentPages(customPageType?: string): Promise<ContentPageDef[]>;
11
- getContentPageBySlug(slug: string): Promise<ContentPageDef | undefined>;
12
- getIndexPage(): Promise<ContentPageDef | undefined>;
13
8
  readPage(filePath: string): Promise<ContentPageDef>;
9
+ generatePage(filePath: string): Promise<ContentPageDef>;
14
10
  }
@@ -0,0 +1,9 @@
1
+ import type { Sharp } from 'sharp';
2
+ import type { ImageSize } from '../model/ImageSize';
3
+ import type { ImgAlignment } from '../model/Picture';
4
+ interface ImgAlignmentParams {
5
+ containerSize?: Partial<ImageSize>;
6
+ alignment?: ImgAlignment;
7
+ }
8
+ export declare const alignImg: ({ containerSize, alignment }: ImgAlignmentParams) => (chain: Sharp) => Promise<Sharp>;
9
+ export {};
@@ -0,0 +1,3 @@
1
+ import type { ImgSource } from '../model/Picture';
2
+ import type { TransformationOptions } from './TransformationOptions';
3
+ export declare function computeImgOutputPath(imgInputPath: string, { contentDir, publicDir, format, size, alignment }: TransformationOptions & ImgSource): string;
@@ -0,0 +1,3 @@
1
+ import type { ResizeOptions, Sharp } from 'sharp';
2
+ import type { ImageSize } from '../model/ImageSize';
3
+ export declare const resizeImg: (size?: Partial<ImageSize>, options?: ResizeOptions) => (chain: Sharp) => Sharp;
@@ -1,3 +1,4 @@
1
1
  import type { ContentPageDef } from '../model/ContentPageDef';
2
2
  import type { TransformationOptions } from './TransformationOptions';
3
3
  export declare function transformContentPage(pagePath: string, options: TransformationOptions): Promise<ContentPageDef>;
4
+ export declare const generatedPagePath: (pagePath: string) => string;
@@ -1,11 +1,12 @@
1
1
  import type { ImageSize } from '../model/ImageSize';
2
2
  import type { ImgSource } from '../model/Picture';
3
3
  import type { TransformationOptions } from './TransformationOptions';
4
- declare type TransformImgParams = {
5
- pagePath: string;
6
- src: string;
4
+ declare type ImgOutputPath = string;
5
+ declare type TransformationTaskKey = ImgOutputPath;
6
+ declare type TransformationTasksCache = Map<TransformationTaskKey, Promise<ImgOutputPath>>;
7
+ declare type TransformImgOptions = TransformationOptions & ImgSource & {
7
8
  containerSize?: ImageSize;
8
- transformationOptions: TransformationOptions & ImgSource;
9
+ cache?: TransformationTasksCache;
9
10
  };
10
- export declare function transformImg({ pagePath, src, containerSize, transformationOptions, }: TransformImgParams): Promise<string>;
11
+ export declare function transformImg(src: string, pagePath: string, options: TransformImgOptions): ImgOutputPath | Promise<ImgOutputPath>;
11
12
  export {};
@@ -1,3 +1,3 @@
1
1
  import type { Picture } from '../model/Picture';
2
2
  import type { TransformationOptions } from './TransformationOptions';
3
- export declare function transformPicture(pagePath: string, picture: Picture, options: TransformationOptions): Promise<Picture>;
3
+ export declare function transformPicture(picture: Picture, pagePath: string, options: TransformationOptions): Promise<Picture>;
@@ -0,0 +1,2 @@
1
+ import type { InputListRangeProps } from './InputListRangeProps';
2
+ export declare const InputListRange: import("@redneckz/uni-jsx").UNIComponent<InputListRangeProps, any, any>;
@@ -0,0 +1,10 @@
1
+ import type { ListContent } from '../List/ListContent';
2
+ export interface InputListRangeProps extends ListContent {
3
+ className?: string;
4
+ items?: string[];
5
+ list?: number[];
6
+ value?: number;
7
+ title?: string;
8
+ disabled?: boolean;
9
+ onChange?: (value: number) => void;
10
+ }
@@ -0,0 +1 @@
1
+ export declare const arrayByRange: (start: number, stop: number, step?: number) => number[];
@@ -1,2 +1,2 @@
1
- import type { Picture } from '../model/Picture';
2
- export declare function isPictureSizeEmpty(size: Picture['size']): boolean;
1
+ import type { ImageSize } from '../model/ImageSize';
2
+ export declare function isPictureSizeEmpty(size: Partial<ImageSize> | undefined): boolean;
@@ -0,0 +1 @@
1
+ export declare const mergeIntervals: (intervals: number[][]) => number[][];
@@ -17,31 +17,32 @@ export interface CreditCalculatorParamsViewSettings {
17
17
  /** @title Комплексная страховая защита */
18
18
  isShowInsurance?: boolean;
19
19
  }
20
+ export interface DepositCalculatorParamsViewSettings {
21
+ /**
22
+ * @title Выплата процентов
23
+ * @default true
24
+ */
25
+ isShowMonthlyInterestPayment?: boolean;
26
+ /**
27
+ * @title Оформление
28
+ * @default true
29
+ */
30
+ isShowRemoteRegistration?: boolean;
31
+ }
20
32
  export interface CreditCalculatorProps extends CommonCalculatorProps {
21
33
  /** @title Настройка отображения чекбоксов */
22
34
  paramsViewSettings?: CreditCalculatorParamsViewSettings;
23
35
  }
36
+ export interface DepositCalculatorProps extends CommonCalculatorProps {
37
+ /** @title Настройка отображения радио */
38
+ paramsViewSettings?: DepositCalculatorParamsViewSettings;
39
+ }
24
40
  export interface BusinessDepositCalculatorProps extends CommonCalculatorProps {
25
41
  /** @title Сноска снизу блока */
26
42
  bottomFootnote?: string;
27
43
  /** @title Показывать название депозита */
28
44
  isShowDepositeName?: boolean;
29
45
  }
30
- /**
31
- * TODO: данные из справочника
32
- **/
33
- export interface DepositCalculatorParams {
34
- /** @hidden */
35
- minSum?: number;
36
- /** @hidden */
37
- maxSum?: number;
38
- /** @hidden */
39
- minMonths?: number;
40
- /** @hidden */
41
- maxMonths?: number;
42
- /** @hidden */
43
- rate?: number;
44
- }
45
46
  /**
46
47
  * ? Общий интерфейс для всех типов калькуляторов?
47
48
  * ? Используется во вложенных функциях. Может быть как то разбить это и вынести отсюда?
@@ -67,14 +68,14 @@ export declare type CreditCalculatorParamsDef = TitleProps & CreditCalculatorPro
67
68
  * @title Калькулятор вкладов
68
69
  * @default {"calcType": "DepositCalculatorForm"}
69
70
  */
70
- export declare type DepositCalculatorParamsDef = TitleProps & DepositCalculatorParams & CommonCalculatorProps & {
71
+ export declare type DepositCalculatorParamsDef = TitleProps & DepositCalculatorProps & {
71
72
  calcType: 'DepositCalculatorForm';
72
73
  };
73
74
  /**
74
75
  * @title Калькулятор вкладов - бизнес
75
76
  * @default {"calcType": "BusinessDepositCalculatorForm"}
76
77
  */
77
- export declare type BusinessDepositCalculatorParamsDef = TitleProps & DepositCalculatorParams & BusinessDepositCalculatorProps & {
78
+ export declare type BusinessDepositCalculatorParamsDef = TitleProps & BusinessDepositCalculatorProps & {
78
79
  calcType: 'BusinessDepositCalculatorForm';
79
80
  };
80
81
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"CreditCalculatorForm.js","sourceRoot":"","sources":["../../../src/components/Calculator/CreditCalculatorForm.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAC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,CAAC,CAC3B,4CACG,kBAAkB,CAAC,CAAC,CAAC,CACpB,uBAAC,mBAAQ,IACP,IAAI,EAAC,qOAA4C,EACjD,OAAO,EAAE,cAAc,EACvB,QAAQ,EAAE,oBAAoB,GAC9B,CACH,CAAC,CAAC,CAAC,IAAI,EACP,mBAAmB,CAAC,CAAC,CAAC,CACrB,uBAAC,mBAAQ,IACP,SAAS,EAAC,MAAM,EAChB,IAAI,EAAC,6KAAiC,EACtC,OAAO,EAAE,eAAe,EACxB,QAAQ,EAAE,qBAAqB,GAC/B,CACH,CAAC,CAAC,CAAC,IAAI,EACP,mBAAmB,CAAC,CAAC,CAAC,CACrB,uBAAC,mBAAQ,IACP,SAAS,EAAC,MAAM,EAChB,IAAI,EAAC,wNAAyC,EAC9C,OAAO,EAAE,eAAe,EACxB,QAAQ,EAAE,qBAAqB,GAC/B,CACH,CAAC,CAAC,CAAC,IAAI,EACP,eAAe,CAAC,CAAC,CAAC,CACjB,uBAAC,mBAAQ,IACP,SAAS,EAAC,MAAM,EAChB,IAAI,EAAC,gKAA8B,EACnC,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAE,iBAAiB,GAC3B,CACH,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC"}
@@ -1,5 +1,5 @@
1
- import { CommonCalculatorProps } from './CalculatorContent';
2
- export interface DepositCalculatorProp extends CommonCalculatorProps {
1
+ import { DepositCalculatorProps } from './CalculatorContent';
2
+ export interface DepositCalculatorProp extends DepositCalculatorProps {
3
3
  className?: string;
4
4
  }
5
5
  export declare const DepositCalculatorForm: import("@redneckz/uni-jsx").UNIComponent<DepositCalculatorProp, any, any>;
@@ -15,7 +15,7 @@ const renderMonthsInput_1 = require("./renderMonthsInput");
15
15
  const renderRegistrationType_1 = require("./renderRegistrationType");
16
16
  const renderWantedSumInput_1 = require("./renderWantedSumInput");
17
17
  const useDepositCalculatorParams_1 = require("./useDepositCalculatorParams");
18
- exports.DepositCalculatorForm = (0, uni_jsx_1.JSX)(({ className = '', sourceBookDir, buttons, footnote }) => {
18
+ exports.DepositCalculatorForm = (0, uni_jsx_1.JSX)(({ className = '', sourceBookDir, buttons, footnote, paramsViewSettings }) => {
19
19
  const [moneyValue, setMoneyValue] = (0, hooks_1.useState)(constants_1.DEFAULT_SUM);
20
20
  const handleMoneyValue = (0, hooks_1.useCallback)((_) => setMoneyValue(_), []);
21
21
  const [monthsValue, setMonthsValue] = (0, hooks_1.useState)(constants_1.DEFAULT_MONTHS);
@@ -30,20 +30,30 @@ exports.DepositCalculatorForm = (0, uni_jsx_1.JSX)(({ className = '', sourceBook
30
30
  isRemoteRegistration,
31
31
  };
32
32
  const handleMonthsValue = (0, hooks_1.useCallback)((_) => setMonthsValue(_), []);
33
- const calculatorParams = (0, useDepositCalculatorParams_1.useDepositCalculatorParams)(userInputParams, sourceBookDir);
33
+ const calculatorParams = (0, useDepositCalculatorParams_1.useDepositCalculatorParams)(userInputParams, sourceBookDir, paramsViewSettings);
34
34
  const { income, finalSum, rate } = calculatorParams;
35
35
  return ((0, jsx_runtime_1.jsxs)("section", { className: (0, style_1.style)('flex justify-between', className), children: [(0, jsx_runtime_1.jsxs)("div", { className: "w-[468px]", children: [(0, renderWantedSumInput_1.renderWantedSumInput)('Сумма вклада, ₽', {
36
36
  ...calculatorParams,
37
37
  }, handleMoneyValue), (0, renderMonthsInput_1.renderMonthsInput)('Срок вклада, месяцев', {
38
38
  ...calculatorParams,
39
- }, handleMonthsValue), (0, jsx_runtime_1.jsxs)("div", { className: "mt-7 flex flex-col gap-y-7", children: [(0, renderInterestPayment_1.renderInterestPayment)({
40
- isMonthlyInterestPayment,
41
- callback: handleIsMonthlyInterestPayment,
42
- title: 'Выплата процентов',
43
- }), (0, renderRegistrationType_1.renderRegistrationType)({
44
- isRemoteRegistration,
45
- callback: handleIsRemoteRegistration,
46
- title: 'Оформление',
47
- })] })] }), (0, jsx_runtime_1.jsx)(Rate_1.Rate, { rate: rate, rateBlockClassName: "tracking-[-25px]", unit: "%" }), (0, jsx_runtime_1.jsxs)("div", { className: "w-full max-w-[350px]", children: [(0, jsx_runtime_1.jsx)(CalculatorValueBlock_1.CalculatorValueBlock, { title: "\u0414\u043E\u0445\u043E\u0434 \u043F\u043E \u0432\u043A\u043B\u0430\u0434\u0443", value: income, postfix: "\u20BD", prefix: "+" }), (0, jsx_runtime_1.jsx)(CalculatorValueBlock_1.CalculatorValueBlock, { title: "\u0421\u0443\u043C\u043C\u0430 \u0432 \u043A\u043E\u043D\u0446\u0435 \u0441\u0440\u043E\u043A\u0430", value: finalSum, postfix: "\u20BD" }), (0, renderButtonsSection_1.renderButtonsSection)(buttons, { className: 'mt-7', isVertical: true }), (0, renderFootnote_1.renderFootnote)(footnote)] })] }));
39
+ }, handleMonthsValue), (0, jsx_runtime_1.jsx)("div", { className: "mt-7", children: renderDepositParamsForm({
40
+ ...calculatorParams,
41
+ ...paramsViewSettings,
42
+ handleIsMonthlyInterestPayment,
43
+ handleIsRemoteRegistration,
44
+ }) })] }), (0, jsx_runtime_1.jsx)(Rate_1.Rate, { rate: rate, rateBlockClassName: "tracking-[-25px]", unit: "%" }), (0, jsx_runtime_1.jsxs)("div", { className: "w-full max-w-[350px]", children: [(0, jsx_runtime_1.jsx)(CalculatorValueBlock_1.CalculatorValueBlock, { title: "\u0414\u043E\u0445\u043E\u0434 \u043F\u043E \u0432\u043A\u043B\u0430\u0434\u0443", value: income, postfix: "\u20BD", prefix: "+" }), (0, jsx_runtime_1.jsx)(CalculatorValueBlock_1.CalculatorValueBlock, { title: "\u0421\u0443\u043C\u043C\u0430 \u0432 \u043A\u043E\u043D\u0446\u0435 \u0441\u0440\u043E\u043A\u0430", value: finalSum, postfix: "\u20BD" }), (0, renderButtonsSection_1.renderButtonsSection)(buttons, { className: 'mt-7', isVertical: true }), (0, renderFootnote_1.renderFootnote)(footnote)] })] }));
48
45
  });
46
+ const renderDepositParamsForm = ({ isMonthlyInterestPayment, isRemoteRegistration, isShowMonthlyInterestPayment, isShowRemoteRegistration, handleIsMonthlyInterestPayment, handleIsRemoteRegistration, }) => ((0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col gap-y-7", children: [isShowMonthlyInterestPayment
47
+ ? (0, renderInterestPayment_1.renderInterestPayment)({
48
+ isMonthlyInterestPayment,
49
+ callback: handleIsMonthlyInterestPayment,
50
+ title: 'Выплата процентов',
51
+ })
52
+ : null, isShowRemoteRegistration
53
+ ? (0, renderRegistrationType_1.renderRegistrationType)({
54
+ isRemoteRegistration,
55
+ callback: handleIsRemoteRegistration,
56
+ title: 'Оформление',
57
+ })
58
+ : null] }));
49
59
  //# sourceMappingURL=DepositCalculatorForm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DepositCalculatorForm.js","sourceRoot":"","sources":["../../../src/components/Calculator/DepositCalculatorForm.tsx"],"names":[],"mappings":";;;AAAA,OAAO;AAEP,+CAAwC;AACxC,uDAAoE;AACpE,mFAAgF;AAChF,6CAA0C;AAE1C,iEAA8D;AAC9D,2CAA0D;AAC1D,iCAA8B;AAC9B,qDAAkD;AAClD,mEAAgE;AAChE,2DAAwD;AACxD,qEAAkE;AAClE,iEAA8D;AAC9D,6EAA0E;AAM7D,QAAA,qBAAqB,GAAG,IAAA,aAAG,EACtC,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,aAAa,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;IACvD,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,IAAA,gBAAQ,EAAC,uBAAW,CAAC,CAAC;IAC1D,MAAM,gBAAgB,GAAG,IAAA,mBAAW,EAAC,CAAC,CAAS,EAAE,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAC1E,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,IAAA,gBAAQ,EAAC,0BAAc,CAAC,CAAC;IAC/D,MAAM,CAAC,wBAAwB,EAAE,8BAA8B,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAA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KAAK,EAAE,YAAY;6BACpB,CAAC,IACE,IACF,EACN,uBAAC,WAAI,IAAC,IAAI,EAAE,IAAI,EAAE,kBAAkB,EAAC,kBAAkB,EAAC,IAAI,EAAC,GAAG,GAAG,EACnE,iCAAK,SAAS,EAAC,sBAAsB,aACnC,uBAAC,2CAAoB,IAAC,KAAK,EAAC,kFAAiB,EAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAC,QAAG,EAAC,MAAM,EAAC,GAAG,GAAG,EACtF,uBAAC,2CAAoB,IAAC,KAAK,EAAC,qGAAqB,EAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAC,QAAG,GAAG,EAChF,IAAA,2CAAoB,EAAC,OAAO,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,EACtE,IAAA,+BAAc,EAAC,QAAQ,CAAC,IACrB,IACE,CACX,CAAC;AACJ,CAAC,CACF,CAAC"}
1
+ {"version":3,"file":"DepositCalculatorForm.js","sourceRoot":"","sources":["../../../src/components/Calculator/DepositCalculatorForm.tsx"],"names":[],"mappings":";;;AAAA,OAAO;AAEP,+CAAwC;AACxC,uDAAoE;AACpE,mFAAgF;AAChF,6CAA0C;AAE1C,iEAA8D;AAC9D,2CAA0D;AAC1D,iCAA8B;AAC9B,qDAAkD;AAClD,mEAAgE;AAChE,2DAAwD;AACxD,qEAAkE;AAClE,iEAA8D;AAC9D,6EAAmG;AAMtF,QAAA,qBAAqB,GAAG,IAAA,aAAG,EACtC,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,aAAa,EAAE,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,EAAE,EAAE;IAC3E,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,IAAA,gBAAQ,EAAC,uBAAW,CAAC,CAAC;IAC1D,MAAM,gBAAgB,GAAG,IAAA,mBAAW,EAAC,CAAC,CAAS,EAAE,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,EAA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_CALCULATOR_PARAMS = {
44
44
  minSum: 50000,
45
45
  maxSum: 5000000,
46
46
  minMonths: 2,
47
- maxMonths: 120,
47
+ maxMonths: 10,
48
48
  rate: 0,
49
49
  isMonthlyInterestPayment: true,
50
50
  isRemoteRegistration: true,
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/components/Calculator/constants.ts"],"names":[],"mappings":";;AAKa,QAAA,eAAe,GAAG,KAAK,CAAC;AACxB,QAAA,eAAe,GAAG,OAAO,CAAC;AAC1B,QAAA,WAAW,GAAG,CAAC,uBAAe,GAAG,uBAAe,CAAC,GAAG,CAAC,CAAC;AACtD,QAAA,kBAAkB,GAAG,EAAE,CAAC;AACxB,QAAA,kBAAkB,GAAG,EAAE,CAAC;AACxB,QAAA,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,0BAAkB,GAAG,0BAAkB,CAAC,GAAG,CAAC,CAAC,CAAC;AAC3E,QAAA,oBAAoB,GAAG,MAAM,CAAC;AAC9B,QAAA,iBAAiB,GAAG,CAAC,CAAC;AACtB,QAAA,iBAAiB,GAAG,IAAI,CAAC;AACzB,QAAA,sBAAsB,GAAG,EAAE,CAAC,CAAC,wDAAwD;AACrF,QAAA,2BAA2B,GAAG,EAAE,CAAC;AACjC,QAAA,2BAA2B,GAAG,GAAG,CAAC;AAClC,QAAA,qBAAqB,GAAG,EAAE,CAAC;AAC3B,QAAA,cAAc,GAAG,EAAE,CAAC;AAEpB,QAAA,qBAAqB,GAAG,sBAAc,GAAG,GAAG,CAAC;AAE7C,QAAA,gCAAgC,GAAqC;IAChF,MAAM,EAAE,uBAAe;IACvB,MAAM,EAAE,uBAAe;IACvB,SAAS,EAAE,0BAAkB;IAC7B,SAAS,EAAE,0BAAkB;IAC7B,IAAI,EAAE,CAAC;IACP,cAAc,EAAE,IAAI;IACpB,eAAe,EAAE,KAAK;IACtB,eAAe,EAAE,IAAI;IACrB,WAAW,EAAE,IAAI;CAClB,CAAC;AAEW,QAAA,sBAAsB,GAAG,IAAI,CAAC;AAC9B,QAAA,oBAAoB,GAAG,IAAI,CAAC;AAE5B,QAAA,+BAA+B,GAAoC;IAC9E,YAAY,EAAE,IAAI;IAClB,YAAY,EAAE,MAAM;IACpB,WAAW,EAAE,IAAI;IACjB,WAAW,EAAE,MAAM;IACnB,QAAQ,EAAE,IAAI;IACd,aAAa,EAAE,CAAC;IAChB,mBAAmB,EAAE,KAAK;IAC1B,iBAAiB,EAAE,IAAI;IACvB,eAAe,EAAE,KAAK;IACtB,aAAa,EAAE,IAAI;CACpB,CAAC;AAEW,QAAA,iCAAiC,GAAsC;IAClF,MAAM,EAAE,KAAK;IACb,MAAM,EAAE,OAAO;IACf,SAAS,EAAE,CAAC;IACZ,SAAS,EAAE,GAAG;IACd,IAAI,EAAE,CAAC;IACP,wBAAwB,EAAE,IAAI;IAC9B,oBAAoB,EAAE,IAAI;CAC3B,CAAC;AAEW,QAAA,0CAA0C,GACrD;IACE,MAAM,EAAE,IAAI;IACZ,MAAM,EAAE,MAAM;IACd,OAAO,EAAE,yBAAiB;IAC1B,OAAO,EAAE,yBAAiB;IAC1B,IAAI,EAAE,CAAC;IACP,wBAAwB,EAAE,IAAI;IAC9B,aAAa,EAAE,KAAK;IACpB,mBAAmB,EAAE,KAAK;IAC1B,eAAe,EAAE,KAAK;IACtB,YAAY,EAAE,sBAAsB;CACrC,CAAC;AAES,QAAA,uBAAuB,GAAG,wBAAwB,CAAC;AACnD,QAAA,sBAAsB,GAAG,uBAAuB,CAAC;AACjD,QAAA,wBAAwB,GAAG,yBAAyB,CAAC;AACrD,QAAA,iCAAiC,GAAG,0BAA0B,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/components/Calculator/constants.ts"],"names":[],"mappings":";;AAKa,QAAA,eAAe,GAAG,KAAK,CAAC;AACxB,QAAA,eAAe,GAAG,OAAO,CAAC;AAC1B,QAAA,WAAW,GAAG,CAAC,uBAAe,GAAG,uBAAe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CAAiC,GAAsC;IAClF,MAAM,EAAE,KAAK;IACb,MAAM,EAAE,OAAO;IACf,SAAS,EAAE,CAAC;IACZ,SAAS,EAAE,EAAE;IACb,IAAI,EAAE,CAAC;IACP,wBAAwB,EAAE,IAAI;IAC9B,oBAAoB,EAAE,IAAI;CAC3B,CAAC;AAEW,QAAA,0CAA0C,GACrD;IACE,MAAM,EAAE,IAAI;IACZ,MAAM,EAAE,MAAM;IACd,OAAO,EAAE,yBAAiB;IAC1B,OAAO,EAAE,yBAAiB;IAC1B,IAAI,EAAE,CAAC;IACP,wBAAwB,EAAE,IAAI;IAC9B,aAAa,EAAE,KAAK;IACpB,mBAAmB,EAAE,KAAK;IAC1B,eAAe,EAAE,KAAK;IACtB,YAAY,EAAE,sBAAsB;CACrC,CAAC;AAES,QAAA,uBAAuB,GAAG,wBAAwB,CAAC;AACnD,QAAA,sBAAsB,GAAG,uBAAuB,CAAC;AACjD,QAAA,wBAAwB,GAAG,yBAAyB,CAAC;AACrD,QAAA,iCAAiC,GAAG,0BAA0B,CAAC"}
@@ -1,4 +1,5 @@
1
1
  export declare const getRangeByKeys: <MinKey extends string, MaxKey extends string, T extends Record<MinKey | MaxKey, number>>([minKey, maxKey]: [MinKey, MaxKey], rows?: T[]) => {
2
2
  [x: string]: unknown;
3
3
  };
4
+ export declare const getMergeRangesByKeys: <MinKey extends string, MaxKey extends string, T extends Record<MinKey | MaxKey, number>>([minKey, maxKey]: [MinKey, MaxKey], rows?: T[]) => number[][];
4
5
  export declare const checkRangeByKeys: <MinKey extends string, MaxKey extends string, T extends Record<MinKey | MaxKey, number>>(value: number, [minKey, maxKey]: [MinKey, MaxKey], sourceBookRow: T) => boolean;
@@ -1,12 +1,15 @@
1
1
  Object.defineProperty(exports, "__esModule", { value: true });
2
- exports.checkRangeByKeys = exports.getRangeByKeys = void 0;
2
+ exports.checkRangeByKeys = exports.getMergeRangesByKeys = exports.getRangeByKeys = void 0;
3
3
  const maxBy_1 = require("../../utils/maxBy");
4
+ const mergeIntervals_1 = require("../../utils/mergeIntervals");
4
5
  const minBy_1 = require("../../utils/minBy");
5
6
  const getRangeByKeys = ([minKey, maxKey], rows = []) => ({
6
7
  [minKey]: rows.length ? (0, minBy_1.minBy)()(rows.map((row) => row[minKey])) : 0,
7
8
  [maxKey]: rows.length ? (0, maxBy_1.maxBy)()(rows.map((row) => row[maxKey])) : 0,
8
9
  });
9
10
  exports.getRangeByKeys = getRangeByKeys;
11
+ const getMergeRangesByKeys = ([minKey, maxKey], rows = []) => (0, mergeIntervals_1.mergeIntervals)(rows.map((row) => [row[minKey], row[maxKey]]));
12
+ exports.getMergeRangesByKeys = getMergeRangesByKeys;
10
13
  const checkRangeByKeys = (value, [minKey, maxKey], sourceBookRow) => value >= sourceBookRow[minKey] && value <= sourceBookRow[maxKey];
11
14
  exports.checkRangeByKeys = checkRangeByKeys;
12
15
  //# sourceMappingURL=rangeHelpers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"rangeHelpers.js","sourceRoot":"","sources":["../../../src/components/Calculator/rangeHelpers.ts"],"names":[],"mappings":";;AAAA,6CAA0C;AAC1C,6CAA0C;AAEnC,MAAM,cAAc,GAAG,CAK5B,CAAC,MAAM,EAAE,MAAM,CAAmB,EAClC,OAAY,EAAE,EACd,EAAE,CAAC,CAAC;IACJ,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAA,aAAK,GAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACnE,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAA,aAAK,GAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CACpE,CAAC,CAAC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5D,MAAM,gBAAgB,GAAG,CAK9B,KAAa,EACb,CAAC,MAAM,EAAE,MAAM,CAAmB,EAClC,aAAgB,EACP,EAAE,CAAC,KAAK,IAAI,aAAa,CAAC,MAAM,CAAC,IAAI,KAAK,IAAI,aAAa,CAAC,MAAM,CAAC,CAAC;AARlE,QAAA,gBAAgB,oBAQkD"}
@@ -3,6 +3,7 @@ interface RenderMonthsInputParams {
3
3
  minMonths: number;
4
4
  maxMonths: number;
5
5
  monthsValue: number;
6
+ availableMonths?: Array<number>;
6
7
  }
7
8
  export declare function renderMonthsInput(title: string, params: RenderMonthsInputParams, callback?: (value: number) => void): JSX.Element;
8
9
  export {};
@@ -1,16 +1,17 @@
1
1
  Object.defineProperty(exports, "__esModule", { value: true });
2
2
  exports.renderMonthsInput = void 0;
3
3
  const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
4
+ const InputListRange_1 = require("../../ui-kit/InputListRange/InputListRange");
4
5
  const InputRange_1 = require("../../ui-kit/InputRange/InputRange");
5
6
  const clamp_1 = require("../../utils/clamp");
6
7
  const STEP_MONTHS = 1;
7
8
  function renderMonthsInput(title, params, callback) {
8
- const { minMonths, maxMonths, monthsValue } = params;
9
+ const { minMonths, maxMonths, monthsValue, availableMonths } = params;
9
10
  const monthText = (month) => {
10
11
  const text = Number(month) % 10 === 1 ? 'месяца' : 'месяцев';
11
12
  return `${month} ${text}`;
12
13
  };
13
- return ((0, jsx_runtime_1.jsx)(InputRange_1.InputRange, { className: "mt-7", title: title, items: [`От ${monthText(minMonths)}`, `До ${monthText(maxMonths)}`], min: minMonths, max: maxMonths, step: STEP_MONTHS, value: (0, clamp_1.clamp)(monthsValue, minMonths, maxMonths), onChange: callback }));
14
+ return availableMonths?.length ? ((0, jsx_runtime_1.jsx)(InputListRange_1.InputListRange, { className: "mt-7", title: title, items: [`От ${monthText(minMonths)}`, `До ${monthText(maxMonths)}`], list: availableMonths, value: (0, clamp_1.clamp)(monthsValue, minMonths, maxMonths), onChange: callback })) : ((0, jsx_runtime_1.jsx)(InputRange_1.InputRange, { className: "mt-7", title: title, items: [`От ${monthText(minMonths)}`, `До ${monthText(maxMonths)}`], min: minMonths, max: maxMonths, step: STEP_MONTHS, value: (0, clamp_1.clamp)(monthsValue, minMonths, maxMonths), onChange: callback }));
14
15
  }
15
16
  exports.renderMonthsInput = renderMonthsInput;
16
17
  //# sourceMappingURL=renderMonthsInput.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"renderMonthsInput.js","sourceRoot":"","sources":["../../../src/components/Calculator/renderMonthsInput.tsx"],"names":[],"mappings":";;;AAAA,mEAAgE;AAChE,6CAA0C;AAE1C,MAAM,WAAW,GAAG,CAAC,CAAC;AAQtB,SAAgB,iBAAiB,CAC/B,KAAa,EACb,MAA+B,EAC/B,QAAkC;IAElC,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,GAAG,MAAM,CAAC;IACrD,MAAM,SAAS,GAAG,CAAC,KAAa,EAAE,EAAE;QAClC,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;QAE7D,OAAO,GAAG,KAAK,IAAI,IAAI,EAAE,CAAC;IAC5B,CAAC,CAAC;IAEF,OAAO,CACL,uBAAC,uBAAU,IACT,SAAS,EAAC,MAAM,EAChB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,CAAC,MAAM,SAAS,CAAC,SAAS,CAAC,EAAE,EAAE,MAAM,SAAS,CAAC,SAAS,CAAC,EAAE,CAAC,EACnE,GAAG,EAAE,SAAS,EACd,GAAG,EAAE,SAAS,EACd,IAAI,EAAE,WAAW,EACjB,KAAK,EAAE,IAAA,aAAK,EAAC,WAAW,EAAE,SAAS,EAAE,SAAS,CAAC,EAC/C,QAAQ,EAAE,QAAQ,GAClB,CACH,CAAC;AACJ,CAAC;AAxBD,8CAwBC"}
1
+ {"version":3,"file":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AAS,CAAC,EAC/C,QAAQ,EAAE,QAAQ,GAClB,CACH,CAAC;AACJ,CAAC;AAjCD,8CAiCC"}
@@ -7,38 +7,36 @@ const useCalculatorParams_1 = require("./useCalculatorParams");
7
7
  const useCreditCalculatorParams = (userInputParams, sourceBookDir, paramsViewSettings) => {
8
8
  const { moneyValue, monthsValue } = userInputParams;
9
9
  const data = (0, useCalculatorParams_1.useCalculatorParams)(sourceBookDir || constants_1.CREDIT_CALC_DEFAULT_DIR);
10
- const creditCalculatorSourceBookParams = data?.rows?.find((row) => {
11
- const isExcludeSalaryClient = !paramsViewSettings?.isShowSalaryClient;
12
- const isExcludeStateEmployee = !paramsViewSettings?.isShowStateEmployee;
13
- const isExcludePensionClient = !paramsViewSettings?.isShowPensionClient;
14
- const isExcludeInsurance = !paramsViewSettings?.isShowInsurance;
15
- return (checkRowByParam({
10
+ const isExcludeSalaryClient = !paramsViewSettings?.isShowSalaryClient;
11
+ const isExcludeStateEmployee = !paramsViewSettings?.isShowStateEmployee;
12
+ const isExcludePensionClient = !paramsViewSettings?.isShowPensionClient;
13
+ const isExcludeInsurance = !paramsViewSettings?.isShowInsurance;
14
+ const creditCalculatorSourceBookParams = data?.rows?.find((row) => checkRowByParam({
15
+ row,
16
+ userInputParams,
17
+ paramKey: 'isSalaryClient',
18
+ isExclude: isExcludeSalaryClient,
19
+ }) &&
20
+ checkRowByParam({
16
21
  row,
17
22
  userInputParams,
18
- paramKey: 'isSalaryClient',
19
- isExclude: isExcludeSalaryClient,
23
+ paramKey: 'isStateEmployee',
24
+ isExclude: isExcludeStateEmployee,
20
25
  }) &&
21
- checkRowByParam({
22
- row,
23
- userInputParams,
24
- paramKey: 'isStateEmployee',
25
- isExclude: isExcludeStateEmployee,
26
- }) &&
27
- checkRowByParam({
28
- row,
29
- userInputParams,
30
- paramKey: 'isPensionClient',
31
- isExclude: isExcludePensionClient,
32
- }) &&
33
- checkRowByParam({
34
- row,
35
- userInputParams,
36
- paramKey: 'isInsurance',
37
- isExclude: isExcludeInsurance,
38
- }) &&
39
- (0, rangeHelpers_1.checkRangeByKeys)(moneyValue, ['minSum', 'maxSum'], row) &&
40
- (0, rangeHelpers_1.checkRangeByKeys)(monthsValue, ['minMonths', 'maxMonths'], row));
41
- }) || constants_1.DEFAULT_CREDIT_CALCULATOR_PARAMS;
26
+ checkRowByParam({
27
+ row,
28
+ userInputParams,
29
+ paramKey: 'isPensionClient',
30
+ isExclude: isExcludePensionClient,
31
+ }) &&
32
+ checkRowByParam({
33
+ row,
34
+ userInputParams,
35
+ paramKey: 'isInsurance',
36
+ isExclude: isExcludeInsurance,
37
+ }) &&
38
+ (0, rangeHelpers_1.checkRangeByKeys)(moneyValue, ['minSum', 'maxSum'], row) &&
39
+ (0, rangeHelpers_1.checkRangeByKeys)(monthsValue, ['minMonths', 'maxMonths'], row)) || constants_1.DEFAULT_CREDIT_CALCULATOR_PARAMS;
42
40
  const { rate } = creditCalculatorSourceBookParams;
43
41
  const monthlyPayment = (0, getMonthlyPayment_1.getMonthlyPayment)(rate, userInputParams);
44
42
  const sourceBookRows = data?.rows || [constants_1.DEFAULT_CREDIT_CALCULATOR_PARAMS];
@@ -1 +1 @@
1
- {"version":3,"file":"useCreditCalculatorParams.js","sourceRoot":"","sources":["../../../src/components/Calculator/useCreditCalculatorParams.ts"],"names":[],"mappings":";;AACA,2CAAwF;AACxF,2DAAwD;AACxD,iDAAkE;AAClE,+DAA4D;AAgCrD,MAAM,yBAAyB,GAAG,CACvC,eAAgD,EAChD,aAAsB,EACtB,kBAAuD,EAC/B,EAAE;IAC1B,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,GAAG,eAAe,CAAC;IACpD,MAAM,IAAI,GAAG,IAAA,yCAAmB,EAAuB,aAAa,IAAI,mCAAuB,CAAC,CAAC;IACjG,MAAM,gCAAgC,GACpC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE;QACvB,MAAM,qBAAqB,GAAG,CAAC,kBAAk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EAAE,WAAW,CAAC,EAAE,cAAc,CAAC;QAC7D,GAAG,eAAe;QAClB,cAAc;KACf,CAAC;AACJ,CAAC,CAAC;AAvDW,QAAA,yBAAyB,6BAuDpC;AASF,MAAM,eAAe,GAAG,CAAC,EAAE,GAAG,EAAE,eAAe,EAAE,QAAQ,EAAE,SAAS,EAAwB,EAAE,EAAE,CAC9F,SAAS,IAAI,eAAe,CAAC,QAAQ,CAAC,KAAK,GAAG,CAAC,QAAQ,CAAC,CAAC"}
1
+ {"version":3,"file":"useCreditCalculatorParams.js","sourceRoot":"","sources":["../../../src/components/Calculator/useCreditCalculatorParams.ts"],"names":[],"mappings":";;AACA,2CAAwF;AACxF,2DAAwD;AACxD,iDAAkE;AAClE,+DAA4D;AAgCrD,MAAM,yBAAyB,GAAG,CACvC,eAAgD,EAChD,aAAsB,EACtB,kBAAuD,EAC/B,EAAE;IAC1B,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,GAAG,eAAe,CAAC;IACpD,MAAM,IAAI,GAAG,IAAA,yCAAmB,EAAuB,aAAa,IAAI,mCAAuB,CAAC,CAAC;IACjG,MAAM,qBAAqB,GAAG,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;IACtE,MAAM,sBAAsB,GAAG,CAAC,kBAAkB,EAAE,mBAAmB,CAAC;IACxE,MAAM,sBAAsB,GAAG,CAAC,kBAAkB,EAAE,mBAAmB,CAAC;IACxE,MAAM,kBAAkB,GAAG,CAAC,kBAAkB,EAAE,eAAe,CAAC;IAChE,MAAM,gCAAgC,GACpC,IAAI,EAAE,IAAI,EAAE,IAAI,CACd,CAAC,GAAG,EAAE,EAAE,CACN,eAAe,CAAC;QACd,GAAG;QACH,eAAe;QACf,QAAQ,EAAE,gBAAgB;QAC1B,SAAS,EAAE,qBAAqB;KACjC,CAAC;QACF,eAAe,CAAC;YACd,GAAG;YACH,eAAe;YACf,QAAQ,EAAE,iBAAiB;YAC3B,SAAS,EAAE,sBAAsB;SAClC,CAAC;QACF,eAAe,CAAC;YACd,GAAG;YACH,eAAe;YACf,QAAQ,EAAE,iBAAiB;YAC3B,SAAS,EAAE,sBAAsB;SAClC,CAAC;QACF,eAAe,CAAC;YACd,GAAG;YACH,eAAe;YACf,QAAQ,EAAE,aAAa;YACvB,SAAS,EAAE,kBAAkB;SAC9B,CAAC;QACF,IAAA,+BAAgB,EAAC,UAAU,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAAE,GAAG,CAAC;QACvD,IAAA,+BAAgB,EAAC,WAAW,EAAE,CAAC,WAAW,EAAE,WAAW,CAAC,EAAE,GAAG,CAAC,CACjE,IAAI,4CAAgC,CAAC;IAExC,MAAM,EAAE,IAAI,EAAE,GAAG,gCAAgC,CAAC;IAClD,MAAM,cAAc,GAAG,IAAA,qCAAiB,EAAC,IAAI,EAAE,eAAe,CAAC,CAAC;IAChE,MAAM,cAAc,GAAG,IAAI,EAAE,IAAI,IAAI,CAAC,4CAAgC,CAAC,CAAC;IAExE,OAAO;QACL,GAAG,gCAAgC;QACnC,GAAG,IAAA,6BAAc,EAAC,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAAE,cAAc,CAAC;QACvD,GAAG,IAAA,6BAAc,EAAC,CAAC,WAAW,EAAE,WAAW,CAAC,EAAE,cAAc,CAAC;QAC7D,GAAG,eAAe;QAClB,cAAc;KACf,CAAC;AACJ,CAAC,CAAC;AArDW,QAAA,yBAAyB,6BAqDpC;AASF,MAAM,eAAe,GAAG,CAAC,EAAE,GAAG,EAAE,eAAe,EAAE,QAAQ,EAAE,SAAS,EAAwB,EAAE,EAAE,CAC9F,SAAS,IAAI,eAAe,CAAC,QAAQ,CAAC,KAAK,GAAG,CAAC,QAAQ,CAAC,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { DepositCalculatorParamsViewSettings } from './CalculatorContent';
1
2
  export interface CommonDepositParams {
2
3
  isMonthlyInterestPayment: boolean;
3
4
  isRemoteRegistration: boolean;
@@ -14,10 +15,11 @@ export interface DepositCalculatorUserInputParams extends CommonDepositParams {
14
15
  monthsValue: number;
15
16
  }
16
17
  export interface DepositCalculatorParams extends DepositCalculatorSourceBookParams, DepositCalculatorUserInputParams {
18
+ availableMonths: number[];
17
19
  income: number;
18
20
  finalSum: number;
19
21
  }
20
22
  export declare type DepositCalculatorData = {
21
23
  rows: DepositCalculatorSourceBookParams[];
22
24
  };
23
- export declare const useDepositCalculatorParams: (userInputParams: DepositCalculatorUserInputParams, sourceBookDir?: string) => DepositCalculatorParams;
25
+ export declare const useDepositCalculatorParams: (userInputParams: DepositCalculatorUserInputParams, sourceBookDir?: string, paramsViewSettings?: DepositCalculatorParamsViewSettings) => DepositCalculatorParams;