@redneckz/wildless-cms-uni-blocks 0.3.9 → 0.3.12

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 (480) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +154 -76
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/cosmos-static/icons/GpsIcon.svg +1 -0
  5. package/dist/components/BaseTile/BaseTile.js +1 -1
  6. package/dist/components/BaseTile/BaseTile.js.map +1 -1
  7. package/dist/components/Blocks.d.ts +1 -0
  8. package/dist/components/Blocks.js +2 -0
  9. package/dist/components/Blocks.js.map +1 -1
  10. package/dist/components/ComparisonTable/ComparisonTable.mobile.d.ts +5 -0
  11. package/dist/components/ComparisonTable/ComparisonTable.mobile.js +46 -0
  12. package/dist/components/ComparisonTable/ComparisonTable.mobile.js.map +1 -0
  13. package/dist/components/ComparisonTable/ComparisonTableContent.d.ts +4 -0
  14. package/dist/components/ComparisonTable/HeaderCell.mobile.d.ts +12 -0
  15. package/dist/components/ComparisonTable/HeaderCell.mobile.js +9 -0
  16. package/dist/components/ComparisonTable/HeaderCell.mobile.js.map +1 -0
  17. package/dist/components/ComparisonTable/TableCell.d.ts +3 -2
  18. package/dist/components/ComparisonTable/TableCell.js.map +1 -1
  19. package/dist/components/ComparisonTable/TableCell.mobile.d.ts +9 -0
  20. package/dist/components/ComparisonTable/TableCell.mobile.js +12 -0
  21. package/dist/components/ComparisonTable/TableCell.mobile.js.map +1 -0
  22. package/dist/components/ComparisonTable/TableColumn.d.ts +10 -0
  23. package/dist/components/ComparisonTable/TableColumn.js +19 -0
  24. package/dist/components/ComparisonTable/TableColumn.js.map +1 -0
  25. package/dist/components/ContentPage/ContentPageContext.d.ts +1 -1
  26. package/dist/components/CreditCalculator/CreditCalculator.d.ts +2 -2
  27. package/dist/components/CreditCalculator/CreditCalculator.js +18 -22
  28. package/dist/components/CreditCalculator/CreditCalculator.js.map +1 -1
  29. package/dist/components/CreditCalculator/getCalculatorParams.d.ts +1 -1
  30. package/dist/components/CreditCalculator/getCreditRate.d.ts +1 -1
  31. package/dist/components/CreditCalculator/getDefaultMonths.d.ts +2 -0
  32. package/dist/components/CreditCalculator/getDefaultMonths.js +8 -0
  33. package/dist/components/CreditCalculator/getDefaultMonths.js.map +1 -0
  34. package/dist/components/CreditCalculator/getDefaultSum.d.ts +2 -0
  35. package/dist/components/CreditCalculator/getDefaultSum.js +8 -0
  36. package/dist/components/CreditCalculator/getDefaultSum.js.map +1 -0
  37. package/dist/components/CreditCalculator/getMonthlyPayment.d.ts +1 -1
  38. package/dist/components/CreditCalculator/renderButton.d.ts +1 -0
  39. package/dist/components/CreditCalculator/renderButton.js +8 -0
  40. package/dist/components/CreditCalculator/renderButton.js.map +1 -0
  41. package/dist/components/CreditCalculator/renderMonthsInput.d.ts +10 -0
  42. package/dist/components/CreditCalculator/renderMonthsInput.js +11 -0
  43. package/dist/components/CreditCalculator/renderMonthsInput.js.map +1 -0
  44. package/dist/components/CreditCalculator/renderProposal.d.ts +1 -0
  45. package/dist/components/CreditCalculator/renderProposal.js +9 -0
  46. package/dist/components/CreditCalculator/renderProposal.js.map +1 -0
  47. package/dist/components/CreditCalculator/renderTermsButton.d.ts +1 -0
  48. package/dist/components/CreditCalculator/renderTermsButton.js +9 -0
  49. package/dist/components/CreditCalculator/renderTermsButton.js.map +1 -0
  50. package/dist/components/CreditCalculator/renderWantedSumInput.d.ts +10 -0
  51. package/dist/components/CreditCalculator/renderWantedSumInput.js +18 -0
  52. package/dist/components/CreditCalculator/renderWantedSumInput.js.map +1 -0
  53. package/dist/components/ExchangeRateTile/CurrencyTable.d.ts +7 -0
  54. package/dist/components/ExchangeRateTile/CurrencyTable.js +19 -0
  55. package/dist/components/ExchangeRateTile/CurrencyTable.js.map +1 -0
  56. package/dist/components/ExchangeRateTile/CurrentLocation.d.ts +7 -0
  57. package/dist/components/ExchangeRateTile/CurrentLocation.js +7 -0
  58. package/dist/components/ExchangeRateTile/CurrentLocation.js.map +1 -0
  59. package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +7 -0
  60. package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +15 -0
  61. package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -0
  62. package/dist/components/ExchangeRateTile/ExchangeRateTile.js +23 -27
  63. package/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  64. package/dist/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +10 -0
  65. package/dist/components/ExchangeRateTile/formatCurrency.d.ts +1 -0
  66. package/dist/components/ExchangeRateTile/formatCurrency.js +6 -0
  67. package/dist/components/ExchangeRateTile/formatCurrency.js.map +1 -0
  68. package/dist/components/Gallery/Gallery.mobile.js +2 -2
  69. package/dist/components/Gallery/Gallery.mobile.js.map +1 -1
  70. package/dist/components/Header/Header.mobile.js +1 -1
  71. package/dist/components/Header/Header.mobile.js.map +1 -1
  72. package/dist/components/ProductBlock/ProductBlockInner.js +1 -1
  73. package/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
  74. package/dist/components/ProductBlock/ProductBlockInner.mobile.js +1 -1
  75. package/dist/components/ProductBlock/ProductBlockInner.mobile.js.map +1 -1
  76. package/dist/hooks/useCreditCalculatorData.js +3 -3
  77. package/dist/hooks/useCreditCalculatorData.js.map +1 -1
  78. package/dist/hooks/useExchangeRates.d.ts +9 -0
  79. package/dist/hooks/useExchangeRates.js +18 -0
  80. package/dist/hooks/useExchangeRates.js.map +1 -0
  81. package/dist/icons/IconName.d.ts +3 -2
  82. package/dist/icons/IconName.js +1 -0
  83. package/dist/icons/IconName.js.map +1 -1
  84. package/dist/model/InputTypes.d.ts +1 -0
  85. package/dist/model/InputTypes.js +2 -0
  86. package/dist/model/InputTypes.js.map +1 -0
  87. package/dist/setup-fixture.js +1 -1
  88. package/dist/setup-fixture.js.map +1 -1
  89. package/dist/ui-kit/Input/Input.d.ts +2 -0
  90. package/dist/ui-kit/Input/Input.js +8 -0
  91. package/dist/ui-kit/Input/Input.js.map +1 -0
  92. package/dist/ui-kit/Input/InputProps.d.ts +8 -0
  93. package/dist/ui-kit/Input/InputProps.js +2 -0
  94. package/dist/ui-kit/Input/InputProps.js.map +1 -0
  95. package/dist/ui-kit/Select/Select.d.ts +6 -0
  96. package/dist/ui-kit/Select/Select.js +8 -0
  97. package/dist/ui-kit/Select/Select.js.map +1 -0
  98. package/dist/ui-kit/Select/SelectOption.d.ts +5 -0
  99. package/dist/ui-kit/Select/SelectOption.js +8 -0
  100. package/dist/ui-kit/Select/SelectOption.js.map +1 -0
  101. package/dist/ui-kit/SwipeListControl/SwipeListControl.js +11 -6
  102. package/dist/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
  103. package/dist/ui-kit/SwipeListControl/SwipeListControlProps.d.ts +1 -0
  104. package/lib/common.css +1 -1
  105. package/lib/components/BaseTile/BaseTile.js +1 -1
  106. package/lib/components/BaseTile/BaseTile.js.map +1 -1
  107. package/lib/components/Blocks.d.ts +1 -0
  108. package/lib/components/Blocks.js +2 -0
  109. package/lib/components/Blocks.js.map +1 -1
  110. package/lib/components/ComparisonTable/ComparisonTable.fixture.mobile.d.ts +5 -0
  111. package/lib/components/ComparisonTable/ComparisonTable.mobile.d.ts +5 -0
  112. package/lib/components/ComparisonTable/ComparisonTable.mobile.js +44 -0
  113. package/lib/components/ComparisonTable/ComparisonTable.mobile.js.map +1 -0
  114. package/lib/components/ComparisonTable/ComparisonTableContent.d.ts +4 -0
  115. package/lib/components/ComparisonTable/HeaderCell.mobile.d.ts +12 -0
  116. package/lib/components/ComparisonTable/HeaderCell.mobile.js +7 -0
  117. package/lib/components/ComparisonTable/HeaderCell.mobile.js.map +1 -0
  118. package/lib/components/ComparisonTable/TableCell.d.ts +3 -2
  119. package/lib/components/ComparisonTable/TableCell.js.map +1 -1
  120. package/lib/components/ComparisonTable/TableCell.mobile.d.ts +9 -0
  121. package/lib/components/ComparisonTable/TableCell.mobile.js +10 -0
  122. package/lib/components/ComparisonTable/TableCell.mobile.js.map +1 -0
  123. package/lib/components/ComparisonTable/TableColumn.d.ts +10 -0
  124. package/lib/components/ComparisonTable/TableColumn.js +17 -0
  125. package/lib/components/ComparisonTable/TableColumn.js.map +1 -0
  126. package/lib/components/ContentPage/ContentPageContext.d.ts +1 -1
  127. package/lib/components/CreditCalculator/CreditCalculator.d.ts +2 -2
  128. package/lib/components/CreditCalculator/CreditCalculator.js +19 -23
  129. package/lib/components/CreditCalculator/CreditCalculator.js.map +1 -1
  130. package/lib/components/CreditCalculator/getCalculatorParams.d.ts +1 -1
  131. package/lib/components/CreditCalculator/getCreditRate.d.ts +1 -1
  132. package/lib/components/CreditCalculator/getDefaultMonths.d.ts +2 -0
  133. package/lib/components/CreditCalculator/getDefaultMonths.js +5 -0
  134. package/lib/components/CreditCalculator/getDefaultMonths.js.map +1 -0
  135. package/lib/components/CreditCalculator/getDefaultSum.d.ts +2 -0
  136. package/lib/components/CreditCalculator/getDefaultSum.js +5 -0
  137. package/lib/components/CreditCalculator/getDefaultSum.js.map +1 -0
  138. package/lib/components/CreditCalculator/getMonthlyPayment.d.ts +1 -1
  139. package/lib/components/CreditCalculator/renderButton.d.ts +1 -0
  140. package/lib/components/CreditCalculator/renderButton.js +5 -0
  141. package/lib/components/CreditCalculator/renderButton.js.map +1 -0
  142. package/lib/components/CreditCalculator/renderMonthsInput.d.ts +10 -0
  143. package/lib/components/CreditCalculator/renderMonthsInput.js +8 -0
  144. package/lib/components/CreditCalculator/renderMonthsInput.js.map +1 -0
  145. package/lib/components/CreditCalculator/renderProposal.d.ts +1 -0
  146. package/lib/components/CreditCalculator/renderProposal.js +6 -0
  147. package/lib/components/CreditCalculator/renderProposal.js.map +1 -0
  148. package/lib/components/CreditCalculator/renderTermsButton.d.ts +1 -0
  149. package/lib/components/CreditCalculator/renderTermsButton.js +6 -0
  150. package/lib/components/CreditCalculator/renderTermsButton.js.map +1 -0
  151. package/lib/components/CreditCalculator/renderWantedSumInput.d.ts +10 -0
  152. package/lib/components/CreditCalculator/renderWantedSumInput.js +15 -0
  153. package/lib/components/CreditCalculator/renderWantedSumInput.js.map +1 -0
  154. package/lib/components/ExchangeRateTile/CurrencyTable.d.ts +7 -0
  155. package/lib/components/ExchangeRateTile/CurrencyTable.js +17 -0
  156. package/lib/components/ExchangeRateTile/CurrencyTable.js.map +1 -0
  157. package/lib/components/ExchangeRateTile/CurrentLocation.d.ts +7 -0
  158. package/lib/components/ExchangeRateTile/CurrentLocation.js +5 -0
  159. package/lib/components/ExchangeRateTile/CurrentLocation.js.map +1 -0
  160. package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +7 -0
  161. package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +13 -0
  162. package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -0
  163. package/lib/components/ExchangeRateTile/ExchangeRateTile.js +23 -27
  164. package/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  165. package/lib/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +10 -0
  166. package/lib/components/ExchangeRateTile/formatCurrency.d.ts +1 -0
  167. package/lib/components/ExchangeRateTile/formatCurrency.js +3 -0
  168. package/lib/components/ExchangeRateTile/formatCurrency.js.map +1 -0
  169. package/lib/components/Gallery/Gallery.mobile.js +2 -2
  170. package/lib/components/Gallery/Gallery.mobile.js.map +1 -1
  171. package/lib/components/Header/Header.mobile.js +1 -1
  172. package/lib/components/Header/Header.mobile.js.map +1 -1
  173. package/lib/components/ProductBlock/ProductBlock.fixture.mobile.d.ts +2 -1
  174. package/lib/components/ProductBlock/ProductBlockInner.js +1 -1
  175. package/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
  176. package/lib/components/ProductBlock/ProductBlockInner.mobile.js +1 -1
  177. package/lib/components/ProductBlock/ProductBlockInner.mobile.js.map +1 -1
  178. package/lib/hooks/useCreditCalculatorData.js +3 -3
  179. package/lib/hooks/useCreditCalculatorData.js.map +1 -1
  180. package/lib/hooks/useExchangeRates.d.ts +9 -0
  181. package/lib/hooks/useExchangeRates.js +15 -0
  182. package/lib/hooks/useExchangeRates.js.map +1 -0
  183. package/lib/icons/IconName.d.ts +3 -2
  184. package/lib/icons/IconName.js +1 -0
  185. package/lib/icons/IconName.js.map +1 -1
  186. package/lib/model/InputTypes.d.ts +1 -0
  187. package/lib/model/InputTypes.js +2 -0
  188. package/lib/model/InputTypes.js.map +1 -0
  189. package/lib/setup-fixture.js +1 -1
  190. package/lib/setup-fixture.js.map +1 -1
  191. package/lib/ui-kit/Input/Input.d.ts +2 -0
  192. package/lib/ui-kit/Input/Input.js +6 -0
  193. package/lib/ui-kit/Input/Input.js.map +1 -0
  194. package/lib/ui-kit/Input/InputProps.d.ts +8 -0
  195. package/lib/ui-kit/Input/InputProps.js +2 -0
  196. package/lib/ui-kit/Input/InputProps.js.map +1 -0
  197. package/lib/ui-kit/Select/Select.d.ts +6 -0
  198. package/lib/ui-kit/Select/Select.js +6 -0
  199. package/lib/ui-kit/Select/Select.js.map +1 -0
  200. package/lib/ui-kit/Select/SelectOption.d.ts +5 -0
  201. package/lib/ui-kit/Select/SelectOption.js +6 -0
  202. package/lib/ui-kit/Select/SelectOption.js.map +1 -0
  203. package/lib/ui-kit/SwipeListControl/SwipeListControl.js +12 -7
  204. package/lib/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
  205. package/lib/ui-kit/SwipeListControl/SwipeListControlProps.d.ts +1 -0
  206. package/mobile/bundle/bundle.umd.js +136 -83
  207. package/mobile/bundle/bundle.umd.min.js +1 -1
  208. package/mobile/dist/components/BaseTile/BaseTile.js +1 -1
  209. package/mobile/dist/components/BaseTile/BaseTile.js.map +1 -1
  210. package/mobile/dist/components/ComparisonTable/ComparisonTable.js +38 -28
  211. package/mobile/dist/components/ComparisonTable/ComparisonTable.js.map +1 -1
  212. package/mobile/dist/components/ComparisonTable/ComparisonTableContent.d.ts +4 -0
  213. package/mobile/dist/components/ComparisonTable/HeaderCell.d.ts +2 -0
  214. package/mobile/dist/components/ComparisonTable/HeaderCell.js +1 -3
  215. package/mobile/dist/components/ComparisonTable/HeaderCell.js.map +1 -1
  216. package/mobile/dist/components/ComparisonTable/TableCell.d.ts +4 -3
  217. package/mobile/dist/components/ComparisonTable/TableCell.js +5 -5
  218. package/mobile/dist/components/ComparisonTable/TableCell.js.map +1 -1
  219. package/mobile/dist/components/ComparisonTable/TableColumn.d.ts +10 -0
  220. package/mobile/dist/components/ComparisonTable/TableColumn.js +19 -0
  221. package/mobile/dist/components/ComparisonTable/TableColumn.js.map +1 -0
  222. package/mobile/dist/components/ContentPage/ContentPageContext.d.ts +1 -1
  223. package/mobile/dist/components/CreditCalculator/CreditCalculator.d.ts +2 -2
  224. package/mobile/dist/components/CreditCalculator/CreditCalculator.js +18 -22
  225. package/mobile/dist/components/CreditCalculator/CreditCalculator.js.map +1 -1
  226. package/mobile/dist/components/CreditCalculator/getCalculatorParams.d.ts +1 -1
  227. package/mobile/dist/components/CreditCalculator/getCreditRate.d.ts +1 -1
  228. package/mobile/dist/components/CreditCalculator/getDefaultMonths.d.ts +2 -0
  229. package/mobile/dist/components/CreditCalculator/getDefaultMonths.js +8 -0
  230. package/mobile/dist/components/CreditCalculator/getDefaultMonths.js.map +1 -0
  231. package/mobile/dist/components/CreditCalculator/getDefaultSum.d.ts +2 -0
  232. package/mobile/dist/components/CreditCalculator/getDefaultSum.js +8 -0
  233. package/mobile/dist/components/CreditCalculator/getDefaultSum.js.map +1 -0
  234. package/mobile/dist/components/CreditCalculator/getMonthlyPayment.d.ts +1 -1
  235. package/mobile/dist/components/CreditCalculator/renderButton.d.ts +1 -0
  236. package/mobile/dist/components/CreditCalculator/renderButton.js +8 -0
  237. package/mobile/dist/components/CreditCalculator/renderButton.js.map +1 -0
  238. package/mobile/dist/components/CreditCalculator/renderMonthsInput.d.ts +10 -0
  239. package/mobile/dist/components/CreditCalculator/renderMonthsInput.js +11 -0
  240. package/mobile/dist/components/CreditCalculator/renderMonthsInput.js.map +1 -0
  241. package/mobile/dist/components/CreditCalculator/renderProposal.d.ts +1 -0
  242. package/mobile/dist/components/CreditCalculator/renderProposal.js +9 -0
  243. package/mobile/dist/components/CreditCalculator/renderProposal.js.map +1 -0
  244. package/mobile/dist/components/CreditCalculator/renderTermsButton.d.ts +1 -0
  245. package/mobile/dist/components/CreditCalculator/renderTermsButton.js +9 -0
  246. package/mobile/dist/components/CreditCalculator/renderTermsButton.js.map +1 -0
  247. package/mobile/dist/components/CreditCalculator/renderWantedSumInput.d.ts +10 -0
  248. package/mobile/dist/components/CreditCalculator/renderWantedSumInput.js +18 -0
  249. package/mobile/dist/components/CreditCalculator/renderWantedSumInput.js.map +1 -0
  250. package/mobile/dist/components/ExchangeRateTile/CurrencyTable.d.ts +7 -0
  251. package/mobile/dist/components/ExchangeRateTile/CurrencyTable.js +19 -0
  252. package/mobile/dist/components/ExchangeRateTile/CurrencyTable.js.map +1 -0
  253. package/mobile/dist/components/ExchangeRateTile/CurrentLocation.d.ts +7 -0
  254. package/mobile/dist/components/ExchangeRateTile/CurrentLocation.js +7 -0
  255. package/mobile/dist/components/ExchangeRateTile/CurrentLocation.js.map +1 -0
  256. package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +7 -0
  257. package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +15 -0
  258. package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -0
  259. package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js +23 -27
  260. package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  261. package/mobile/dist/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +10 -0
  262. package/mobile/dist/components/ExchangeRateTile/formatCurrency.d.ts +1 -0
  263. package/mobile/dist/components/ExchangeRateTile/formatCurrency.js +6 -0
  264. package/mobile/dist/components/ExchangeRateTile/formatCurrency.js.map +1 -0
  265. package/mobile/dist/components/Gallery/Gallery.js +2 -2
  266. package/mobile/dist/components/Gallery/Gallery.js.map +1 -1
  267. package/mobile/dist/components/Header/Header.js +1 -1
  268. package/mobile/dist/components/Header/Header.js.map +1 -1
  269. package/mobile/dist/components/ProductBlock/ProductBlockInner.js +1 -1
  270. package/mobile/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
  271. package/mobile/dist/hooks/useCreditCalculatorData.js +3 -3
  272. package/mobile/dist/hooks/useCreditCalculatorData.js.map +1 -1
  273. package/mobile/dist/hooks/useExchangeRates.d.ts +9 -0
  274. package/mobile/dist/hooks/useExchangeRates.js +18 -0
  275. package/mobile/dist/hooks/useExchangeRates.js.map +1 -0
  276. package/mobile/dist/icons/IconName.d.ts +3 -2
  277. package/mobile/dist/icons/IconName.js +1 -0
  278. package/mobile/dist/icons/IconName.js.map +1 -1
  279. package/mobile/dist/model/InputTypes.d.ts +1 -0
  280. package/mobile/dist/model/InputTypes.js +2 -0
  281. package/mobile/dist/model/InputTypes.js.map +1 -0
  282. package/mobile/dist/setup-fixture.js +1 -1
  283. package/mobile/dist/setup-fixture.js.map +1 -1
  284. package/mobile/dist/ui-kit/Input/Input.d.ts +2 -0
  285. package/mobile/dist/ui-kit/Input/Input.js +8 -0
  286. package/mobile/dist/ui-kit/Input/Input.js.map +1 -0
  287. package/mobile/dist/ui-kit/Input/InputProps.d.ts +8 -0
  288. package/mobile/dist/ui-kit/Input/InputProps.js +2 -0
  289. package/mobile/dist/ui-kit/Input/InputProps.js.map +1 -0
  290. package/mobile/dist/ui-kit/Select/Select.d.ts +6 -0
  291. package/mobile/dist/ui-kit/Select/Select.js +8 -0
  292. package/mobile/dist/ui-kit/Select/Select.js.map +1 -0
  293. package/mobile/dist/ui-kit/Select/SelectOption.d.ts +5 -0
  294. package/mobile/dist/ui-kit/Select/SelectOption.js +8 -0
  295. package/mobile/dist/ui-kit/Select/SelectOption.js.map +1 -0
  296. package/mobile/dist/ui-kit/SwipeListControl/SwipeListControl.js +11 -6
  297. package/mobile/dist/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
  298. package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlProps.d.ts +1 -0
  299. package/mobile/lib/components/BaseTile/BaseTile.js +1 -1
  300. package/mobile/lib/components/BaseTile/BaseTile.js.map +1 -1
  301. package/mobile/lib/components/ComparisonTable/ComparisonTable.js +38 -28
  302. package/mobile/lib/components/ComparisonTable/ComparisonTable.js.map +1 -1
  303. package/mobile/lib/components/ComparisonTable/ComparisonTableContent.d.ts +4 -0
  304. package/mobile/lib/components/ComparisonTable/HeaderCell.d.ts +2 -0
  305. package/mobile/lib/components/ComparisonTable/HeaderCell.js +1 -3
  306. package/mobile/lib/components/ComparisonTable/HeaderCell.js.map +1 -1
  307. package/mobile/lib/components/ComparisonTable/TableCell.d.ts +4 -3
  308. package/mobile/lib/components/ComparisonTable/TableCell.js +6 -6
  309. package/mobile/lib/components/ComparisonTable/TableCell.js.map +1 -1
  310. package/mobile/lib/components/ComparisonTable/TableColumn.d.ts +10 -0
  311. package/mobile/lib/components/ComparisonTable/TableColumn.js +17 -0
  312. package/mobile/lib/components/ComparisonTable/TableColumn.js.map +1 -0
  313. package/mobile/lib/components/ContentPage/ContentPageContext.d.ts +1 -1
  314. package/mobile/lib/components/CreditCalculator/CreditCalculator.d.ts +2 -2
  315. package/mobile/lib/components/CreditCalculator/CreditCalculator.js +19 -23
  316. package/mobile/lib/components/CreditCalculator/CreditCalculator.js.map +1 -1
  317. package/mobile/lib/components/CreditCalculator/getCalculatorParams.d.ts +1 -1
  318. package/mobile/lib/components/CreditCalculator/getCreditRate.d.ts +1 -1
  319. package/mobile/lib/components/CreditCalculator/getDefaultMonths.d.ts +2 -0
  320. package/mobile/lib/components/CreditCalculator/getDefaultMonths.js +5 -0
  321. package/mobile/lib/components/CreditCalculator/getDefaultMonths.js.map +1 -0
  322. package/mobile/lib/components/CreditCalculator/getDefaultSum.d.ts +2 -0
  323. package/mobile/lib/components/CreditCalculator/getDefaultSum.js +5 -0
  324. package/mobile/lib/components/CreditCalculator/getDefaultSum.js.map +1 -0
  325. package/mobile/lib/components/CreditCalculator/getMonthlyPayment.d.ts +1 -1
  326. package/mobile/lib/components/CreditCalculator/renderButton.d.ts +1 -0
  327. package/mobile/lib/components/CreditCalculator/renderButton.js +5 -0
  328. package/mobile/lib/components/CreditCalculator/renderButton.js.map +1 -0
  329. package/mobile/lib/components/CreditCalculator/renderMonthsInput.d.ts +10 -0
  330. package/mobile/lib/components/CreditCalculator/renderMonthsInput.js +8 -0
  331. package/mobile/lib/components/CreditCalculator/renderMonthsInput.js.map +1 -0
  332. package/mobile/lib/components/CreditCalculator/renderProposal.d.ts +1 -0
  333. package/mobile/lib/components/CreditCalculator/renderProposal.js +6 -0
  334. package/mobile/lib/components/CreditCalculator/renderProposal.js.map +1 -0
  335. package/mobile/lib/components/CreditCalculator/renderTermsButton.d.ts +1 -0
  336. package/mobile/lib/components/CreditCalculator/renderTermsButton.js +6 -0
  337. package/mobile/lib/components/CreditCalculator/renderTermsButton.js.map +1 -0
  338. package/mobile/lib/components/CreditCalculator/renderWantedSumInput.d.ts +10 -0
  339. package/mobile/lib/components/CreditCalculator/renderWantedSumInput.js +15 -0
  340. package/mobile/lib/components/CreditCalculator/renderWantedSumInput.js.map +1 -0
  341. package/mobile/lib/components/ExchangeRateTile/CurrencyTable.d.ts +7 -0
  342. package/mobile/lib/components/ExchangeRateTile/CurrencyTable.js +17 -0
  343. package/mobile/lib/components/ExchangeRateTile/CurrencyTable.js.map +1 -0
  344. package/mobile/lib/components/ExchangeRateTile/CurrentLocation.d.ts +7 -0
  345. package/mobile/lib/components/ExchangeRateTile/CurrentLocation.js +5 -0
  346. package/mobile/lib/components/ExchangeRateTile/CurrentLocation.js.map +1 -0
  347. package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +7 -0
  348. package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +13 -0
  349. package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -0
  350. package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js +23 -27
  351. package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  352. package/mobile/lib/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +10 -0
  353. package/mobile/lib/components/ExchangeRateTile/formatCurrency.d.ts +1 -0
  354. package/mobile/lib/components/ExchangeRateTile/formatCurrency.js +3 -0
  355. package/mobile/lib/components/ExchangeRateTile/formatCurrency.js.map +1 -0
  356. package/mobile/lib/components/Gallery/Gallery.js +2 -2
  357. package/mobile/lib/components/Gallery/Gallery.js.map +1 -1
  358. package/mobile/lib/components/Header/Header.js +1 -1
  359. package/mobile/lib/components/Header/Header.js.map +1 -1
  360. package/mobile/lib/components/ProductBlock/ProductBlockInner.js +1 -1
  361. package/mobile/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
  362. package/mobile/lib/hooks/useCreditCalculatorData.js +3 -3
  363. package/mobile/lib/hooks/useCreditCalculatorData.js.map +1 -1
  364. package/mobile/lib/hooks/useExchangeRates.d.ts +9 -0
  365. package/mobile/lib/hooks/useExchangeRates.js +15 -0
  366. package/mobile/lib/hooks/useExchangeRates.js.map +1 -0
  367. package/mobile/lib/icons/IconName.d.ts +3 -2
  368. package/mobile/lib/icons/IconName.js +1 -0
  369. package/mobile/lib/icons/IconName.js.map +1 -1
  370. package/mobile/lib/model/InputTypes.d.ts +1 -0
  371. package/mobile/lib/model/InputTypes.js +2 -0
  372. package/mobile/lib/model/InputTypes.js.map +1 -0
  373. package/mobile/lib/setup-fixture.js +1 -1
  374. package/mobile/lib/setup-fixture.js.map +1 -1
  375. package/mobile/lib/ui-kit/Input/Input.d.ts +2 -0
  376. package/mobile/lib/ui-kit/Input/Input.js +6 -0
  377. package/mobile/lib/ui-kit/Input/Input.js.map +1 -0
  378. package/mobile/lib/ui-kit/Input/InputProps.d.ts +8 -0
  379. package/mobile/lib/ui-kit/Input/InputProps.js +2 -0
  380. package/mobile/lib/ui-kit/Input/InputProps.js.map +1 -0
  381. package/mobile/lib/ui-kit/Select/Select.d.ts +6 -0
  382. package/mobile/lib/ui-kit/Select/Select.js +6 -0
  383. package/mobile/lib/ui-kit/Select/Select.js.map +1 -0
  384. package/mobile/lib/ui-kit/Select/SelectOption.d.ts +5 -0
  385. package/mobile/lib/ui-kit/Select/SelectOption.js +6 -0
  386. package/mobile/lib/ui-kit/Select/SelectOption.js.map +1 -0
  387. package/mobile/lib/ui-kit/SwipeListControl/SwipeListControl.js +12 -7
  388. package/mobile/lib/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
  389. package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlProps.d.ts +1 -0
  390. package/mobile/src/common.css +12 -2
  391. package/mobile/src/components/BaseTile/BaseTile.tsx +1 -1
  392. package/mobile/src/components/ComparisonTable/ComparisonTable.tsx +90 -102
  393. package/mobile/src/components/ComparisonTable/ComparisonTableContent.ts +4 -0
  394. package/mobile/src/components/ComparisonTable/HeaderCell.tsx +34 -30
  395. package/mobile/src/components/ComparisonTable/TableCell.tsx +30 -27
  396. package/mobile/src/components/ComparisonTable/TableColumn.tsx +66 -0
  397. package/mobile/src/components/ContentPage/ContentPageContext.tsx +1 -1
  398. package/mobile/src/components/CreditCalculator/CreditCalculator.tsx +26 -87
  399. package/mobile/src/components/CreditCalculator/getCalculatorParams.ts +1 -1
  400. package/mobile/src/components/CreditCalculator/getCreditRate.ts +1 -1
  401. package/mobile/src/components/CreditCalculator/getDefaultMonths.ts +7 -0
  402. package/mobile/src/components/CreditCalculator/getDefaultSum.ts +7 -0
  403. package/mobile/src/components/CreditCalculator/getMonthlyPayment.ts +1 -1
  404. package/mobile/src/components/CreditCalculator/renderButton.tsx +13 -0
  405. package/mobile/src/components/CreditCalculator/renderMonthsInput.tsx +29 -0
  406. package/mobile/src/components/CreditCalculator/renderProposal.tsx +13 -0
  407. package/mobile/src/components/CreditCalculator/renderTermsButton.tsx +16 -0
  408. package/mobile/src/components/CreditCalculator/renderWantedSumInput.tsx +36 -0
  409. package/mobile/src/components/ExchangeRateTile/CurrencyTable.tsx +47 -0
  410. package/mobile/src/components/ExchangeRateTile/CurrentLocation.tsx +22 -0
  411. package/mobile/src/components/ExchangeRateTile/ExchangeCurrencyCalculator.tsx +47 -0
  412. package/mobile/src/components/ExchangeRateTile/ExchangeRateTile.tsx +48 -79
  413. package/mobile/src/components/ExchangeRateTile/ExchangeRateTileContent.ts +11 -0
  414. package/mobile/src/components/ExchangeRateTile/formatCurrency.ts +3 -0
  415. package/mobile/src/components/Gallery/Gallery.tsx +2 -2
  416. package/mobile/src/components/Header/Header.tsx +1 -1
  417. package/mobile/src/components/ProductBlock/ProductBlock.example.json +11 -1
  418. package/mobile/src/components/ProductBlock/ProductBlockInner.tsx +5 -5
  419. package/mobile/src/hooks/useCreditCalculatorData.ts +3 -7
  420. package/mobile/src/hooks/useExchangeRates.ts +25 -0
  421. package/mobile/src/icons/GpsIcon.svg +8 -0
  422. package/mobile/src/icons/IconName.ts +3 -3
  423. package/mobile/src/model/InputTypes.ts +1 -0
  424. package/mobile/src/setup-fixture.ts +1 -1
  425. package/mobile/src/ui-kit/Input/Input.tsx +8 -0
  426. package/mobile/src/ui-kit/Input/InputProps.ts +9 -0
  427. package/mobile/src/ui-kit/Select/Select.tsx +15 -0
  428. package/mobile/src/ui-kit/Select/SelectOption.tsx +14 -0
  429. package/mobile/src/ui-kit/SwipeListControl/SwipeListControl.tsx +27 -19
  430. package/mobile/src/ui-kit/SwipeListControl/SwipeListControlProps.ts +1 -0
  431. package/package.json +1 -1
  432. package/src/common.css +12 -2
  433. package/src/components/BaseTile/BaseTile.tsx +1 -1
  434. package/src/components/Blocks.ts +2 -0
  435. package/src/components/ComparisonTable/ComparisonTable.fixture.mobile.tsx +152 -0
  436. package/src/components/ComparisonTable/ComparisonTable.mobile.tsx +121 -0
  437. package/src/components/ComparisonTable/ComparisonTableContent.ts +4 -0
  438. package/src/components/ComparisonTable/HeaderCell.mobile.tsx +50 -0
  439. package/src/components/ComparisonTable/TableCell.mobile.tsx +46 -0
  440. package/src/components/ComparisonTable/TableCell.tsx +3 -2
  441. package/src/components/ComparisonTable/TableColumn.tsx +66 -0
  442. package/src/components/ContentPage/ContentPageContext.tsx +1 -1
  443. package/src/components/CreditCalculator/CreditCalculator.tsx +26 -87
  444. package/src/components/CreditCalculator/getCalculatorParams.ts +1 -1
  445. package/src/components/CreditCalculator/getCreditRate.ts +1 -1
  446. package/src/components/CreditCalculator/getDefaultMonths.ts +7 -0
  447. package/src/components/CreditCalculator/getDefaultSum.ts +7 -0
  448. package/src/components/CreditCalculator/getMonthlyPayment.ts +1 -1
  449. package/src/components/CreditCalculator/renderButton.tsx +13 -0
  450. package/src/components/CreditCalculator/renderMonthsInput.tsx +29 -0
  451. package/src/components/CreditCalculator/renderProposal.tsx +13 -0
  452. package/src/components/CreditCalculator/renderTermsButton.tsx +16 -0
  453. package/src/components/CreditCalculator/renderWantedSumInput.tsx +36 -0
  454. package/src/components/ExchangeRateTile/CurrencyTable.tsx +47 -0
  455. package/src/components/ExchangeRateTile/CurrentLocation.tsx +22 -0
  456. package/src/components/ExchangeRateTile/ExchangeCurrencyCalculator.tsx +47 -0
  457. package/src/components/ExchangeRateTile/ExchangeRateTile.fixture.tsx +1 -1
  458. package/src/components/ExchangeRateTile/ExchangeRateTile.tsx +48 -79
  459. package/src/components/ExchangeRateTile/ExchangeRateTileContent.ts +11 -0
  460. package/src/components/ExchangeRateTile/formatCurrency.ts +3 -0
  461. package/src/components/Gallery/Gallery.mobile.tsx +2 -2
  462. package/src/components/Header/Header.mobile.tsx +1 -1
  463. package/src/components/ProductBlock/ProductBlock.example.json +11 -1
  464. package/src/components/ProductBlock/ProductBlock.fixture.mobile.tsx +57 -32
  465. package/src/components/ProductBlock/ProductBlock.fixture.tsx +57 -104
  466. package/src/components/ProductBlock/ProductBlockInner.mobile.tsx +5 -5
  467. package/src/components/ProductBlock/ProductBlockInner.tsx +4 -4
  468. package/src/hooks/useCreditCalculatorData.ts +3 -7
  469. package/src/hooks/useExchangeRates.ts +25 -0
  470. package/src/icons/GpsIcon.svg +8 -0
  471. package/src/icons/IconName.ts +3 -3
  472. package/src/model/InputTypes.ts +1 -0
  473. package/src/setup-fixture.ts +1 -1
  474. package/src/ui-kit/Button/Button.fixture.tsx +2 -6
  475. package/src/ui-kit/Input/Input.tsx +8 -0
  476. package/src/ui-kit/Input/InputProps.ts +9 -0
  477. package/src/ui-kit/Select/Select.tsx +15 -0
  478. package/src/ui-kit/Select/SelectOption.tsx +14 -0
  479. package/src/ui-kit/SwipeListControl/SwipeListControl.tsx +27 -19
  480. package/src/ui-kit/SwipeListControl/SwipeListControlProps.ts +1 -0
@@ -0,0 +1,44 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
2
+ import { JSX } from '@redneckz/uni-jsx';
3
+ import { Heading } from '../../ui-kit/Heading/Heading.js';
4
+ import { SwipeListControl } from '../../ui-kit/SwipeListControl/SwipeListControl.js';
5
+ import { TableColumn } from './TableColumn.js';
6
+ export const ComparisonTable = JSX(({ className, context, title, rowHeaders, columns, visibleRowLength = 0, isColoredFirstColumn = false, useSwiper = false, }) => {
7
+ const tableData = columns?.map(({ data, header }) => ({
8
+ header,
9
+ column: data?.map((cell, i) => ({ cell, rowHeader: rowHeaders?.[i]?.title })),
10
+ })) || [];
11
+ const [columnsViewState, setColumnsViewState] = context.useState(new Array(columns?.length).fill(!visibleRowLength));
12
+ const handleToggleColumn = (i) => {
13
+ columnsViewState[i] = !columnsViewState[i];
14
+ setColumnsViewState([...columnsViewState]);
15
+ };
16
+ return (_jsxs("section", { className: `bg-white font-sans px-4 py-6 overflow-hidden text-primary-text relative ${className || ''}`, children: [title && (_jsx(Heading, { headingType: "h3", className: "font-medium text-center m-0 mb-5", title: title })), renderColumns({
17
+ tableData,
18
+ context,
19
+ visibleRowLength,
20
+ isColoredFirstColumn,
21
+ columnsViewState,
22
+ handleToggleColumn,
23
+ useSwiper,
24
+ setColumnsViewState,
25
+ })] }));
26
+ });
27
+ const renderColumns = ({ context, tableData, visibleRowLength, isColoredFirstColumn, columnsViewState, handleToggleColumn, useSwiper, setColumnsViewState, }) => (_jsx("div", { role: "table", children: tableData?.length ? (useSwiper ? (_jsx(SwipeListControl, { context: context, onSlideChange: onSlideChange(columnsViewState, setColumnsViewState), children: tableData.map(renderColumn({
28
+ context,
29
+ visibleRowLength,
30
+ isColoredFirstColumn,
31
+ columnsViewState,
32
+ handleToggleColumn,
33
+ })) })) : (tableData.map(renderColumn({
34
+ context,
35
+ visibleRowLength,
36
+ isColoredFirstColumn,
37
+ columnsViewState,
38
+ handleToggleColumn,
39
+ })))) : null }));
40
+ const renderColumn = ({ context, visibleRowLength, isColoredFirstColumn, columnsViewState, handleToggleColumn }) => (columnData, i) => (_jsx(TableColumn, { context: context, visibleRowLength: visibleRowLength, showRow: columnsViewState[i], header: columnData.header, columnData: columnData.column, isFillGradient: i === 0 && isColoredFirstColumn, onToggleColumn: () => handleToggleColumn(i) }, String(i)));
41
+ const onSlideChange = (columnsViewState, setColumnsViewState) => () => {
42
+ setColumnsViewState(new Array(columnsViewState.length).fill(false));
43
+ };
44
+ //# sourceMappingURL=ComparisonTable.mobile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ComparisonTable.mobile.js","sourceRoot":"","sources":["../../../src/components/ComparisonTable/ComparisonTable.mobile.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AAElF,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5C,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAChC,CAAC,EACC,SAAS,EACT,OAAO,EACP,KAAK,EACL,UAAU,EACV,OA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G,EAAE;IACpE,mBAAmB,CAAC,IAAI,KAAK,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;AACtE,CAAC,CAAC"}
@@ -23,6 +23,8 @@ export interface CellData {
23
23
  export interface ColumnHeader {
24
24
  /** @title Заголовок */
25
25
  title?: string;
26
+ /** @title Подзаголовок */
27
+ subtitle?: string;
26
28
  icon?: IconName;
27
29
  image?: Picture;
28
30
  link?: LinkProps;
@@ -56,4 +58,6 @@ export interface ComparisonTableContent {
56
58
  isColoredFirstColumn?: boolean;
57
59
  /** @title Отображать заданное количество строк */
58
60
  visibleRowLength?: number;
61
+ /** @title Использовать свайпер- */
62
+ useSwiper?: boolean;
59
63
  }
@@ -0,0 +1,12 @@
1
+ import type { LinkProps } from '../../model/LinkProps';
2
+ import type { Picture } from '../../model/Picture';
3
+ import type { IconName } from '../../ui-kit/Icon/IconProps';
4
+ export interface HeaderCellProps {
5
+ icon?: IconName;
6
+ image?: Picture;
7
+ title?: string;
8
+ subtitle?: string;
9
+ isFillGradient?: boolean;
10
+ link?: LinkProps;
11
+ }
12
+ export declare const HeaderCell: (props: import("@redneckz/uni-jsx").PropsWithChildren<HeaderCellProps, any>, context?: any) => any;
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
2
+ import { JSX } from '@redneckz/uni-jsx';
3
+ import { Heading } from '../../ui-kit/Heading/Heading.js';
4
+ import { Icon } from '../../ui-kit/Icon/Icon.js';
5
+ import { Img } from '../../ui-kit/Img/Img.js';
6
+ export const HeaderCell = JSX(({ icon, image, title, subtitle, isFillGradient }) => (_jsxs("div", { role: "columnheader", scope: "col", children: [icon && (_jsx(Icon, { className: "h-[63px] w-[63px] min-w-[63px] min-h-[63px] mb-4", name: icon, width: "63", height: "63" })), image?.src && (_jsx("div", { className: "mb-3.5", children: _jsx(Img, { image: image }) })), title && (_jsx(Heading, { headingType: "h4", className: `${isFillGradient ? 'text-white' : ''}`, title: title })), subtitle && (_jsx("div", { className: `text-m-sm mb-3.5 ${isFillGradient ? 'text-white' : 'text-secondary-text/80'}`, children: subtitle }))] })));
7
+ //# sourceMappingURL=HeaderCell.mobile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HeaderCell.mobile.js","sourceRoot":"","sources":["../../../src/components/ComparisonTable/HeaderCell.mobile.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAGxC,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAW3C,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAC3B,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,EAAE,EAAE,CAAC,CACpD,eAAK,IAAI,EAAC,cAAc,EAAC,KAAK,EAAC,KAAK,aACjC,IAAI,IAAI,CACP,KAAC,IAAI,IACH,SAAS,EAAC,kDAAkD,EAC5D,IAAI,EAAE,IAAI,EACV,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,GACX,CACH,EACA,KAAK,EAAE,GAAG,IAAI,CACb,cAAK,SAAS,EAAC,QAAQ,YACrB,KAAC,GAAG,IAAC,KAAK,EAAE,KAAK,GAAI,GACjB,CACP,EACA,KAAK,IAAI,CACR,KAAC,OAAO,IACN,WAAW,EAAC,IAAI,EAChB,SAAS,EAAE,GAAG,cAAc,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,EAAE,EAClD,KAAK,EAAE,KAAK,GACZ,CACH,EACA,QAAQ,IAAI,CACX,cACE,SAAS,EAAE,oBAAoB,cAAc,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,wBAAwB,EAAE,YAExF,QAAQ,GACL,CACP,IACG,CACP,CACF,CAAC"}
@@ -1,8 +1,9 @@
1
1
  import type { CellData } from './ComparisonTableContent';
2
2
  export interface TableCellProps {
3
3
  cell: CellData[];
4
- isLastRow: boolean;
5
- isFirstRow: boolean;
4
+ isLastRow?: boolean;
5
+ isFirstRow?: boolean;
6
+ rowHeader?: string;
6
7
  isFillGradient: boolean;
7
8
  }
8
9
  export declare const TableCell: (props: import("@redneckz/uni-jsx").PropsWithChildren<TableCellProps, any>, context?: any) => any;
@@ -1 +1 @@
1
- {"version":3,"file":"TableCell.js","sourceRoot":"","sources":["../../../src/components/ComparisonTable/TableCell.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AASxE,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,CAAiB,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,cAAc,EAAE,EAAE,EAAE;IAC/F,MAAM,kBAAkB,GAAG,iCAAiC,cAAc,IACxE,CAAC,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,yBAC9B,IAAI,cAAc,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;IAErC,MAAM,WAAW,GAAG,eAAe,eAAe,IAChD,cAAc,IAAI,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAC9C,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,YAAY,EAAE,CAAC;IAEjD,OAAO,CACL,cAAK,SAAS,EAAE,kBAAkB,EAAE,IAAI,EAAC,MAAM,YAC7C,cAAK,SAAS,EAAE,WAAW,YACxB,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC,E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,OAAO,CACL,cAAK,SAAS,EAAE,kBAAkB,EAAE,IAAI,EAAC,MAAM,YAC7C,cAAK,SAAS,EAAE,WAAW,YACxB,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC,EAAE,cAAc,CAAC,CAAC,GAC5D,GACF,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,eAAe,GAAG,CAAC,EAAE,KAAK,EAAE,WAAW,EAAY,EAAE,CAAS,EAAE,cAAuB,EAAE,EAAE,CAAC,CAChG,eAAqB,SAAS,EAAC,2BAA2B,aACvD,KAAK,IAAI,CACR,aAAI,SAAS,EAAE,2BAA2B,cAAc,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,EAAE,YAAG,KAAK,GAAM,CAC7F,EACA,WAAW,IAAI,CACd,cACE,SAAS,EAAE,sBAAsB,cAAc,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,qBAAqB,EAAE,YAEvF,WAAW,GACR,CACP,KAVO,MAAM,CAAC,CAAC,CAAC,CAWb,CACP,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { CellData } from './ComparisonTableContent';
2
+ export interface TableCellProps {
3
+ cell: CellData[];
4
+ rowHeader?: string;
5
+ isLastRow?: boolean;
6
+ isFirstRow?: boolean;
7
+ isFillGradient?: boolean;
8
+ }
9
+ export declare const TableCell: (props: import("@redneckz/uni-jsx").PropsWithChildren<TableCellProps, any>, context?: any) => any;
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
2
+ import { JSX } from '@redneckz/uni-jsx';
3
+ import { DIVIDER_CLASSES } from './constants.js';
4
+ export const TableCell = JSX(({ cell, rowHeader, isFillGradient = false }) => {
5
+ const cellWrapperClasses = `box-border flex flex-col`;
6
+ const cellClasses = `h-full ${DIVIDER_CLASSES}`;
7
+ return (_jsx("div", { className: cellWrapperClasses, role: "cell", children: _jsx("div", { className: cellClasses, children: cell.map(renderCellInner(isFillGradient, rowHeader)) }) }));
8
+ });
9
+ const renderCellInner = (isFillGradient, rowHeader) => ({ label, description }, i) => (_jsxs("div", { className: "flex justify-between text-m-sm py-3.5", children: [_jsx("div", { className: `${isFillGradient ? 'text-white/80' : 'text-secondary-text'}`, children: rowHeader }), _jsxs("div", { className: "basis-1/2", children: [label && (_jsx("div", { className: `text-right ${isFillGradient ? 'text-white' : ''}`, children: label })), description && (_jsx("div", { className: `text-right ${isFillGradient ? 'text-white/80' : 'text-secondary-text'}`, children: description }))] })] }, String(i)));
10
+ //# sourceMappingURL=TableCell.mobile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableCell.mobile.js","sourceRoot":"","sources":["../../../src/components/ComparisonTable/TableCell.mobile.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAU9C,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,CAAiB,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,cAAc,GAAG,KAAK,EAAE,EAAE,EAAE;IAC3F,MAAM,kBAAkB,GAAG,0BAA0B,CAAC;IAEtD,MAAM,WAAW,GAAG,UAAU,eAAe,EAAE,CAAC;IAEhD,OAAO,CACL,cAAK,SAAS,EAAE,kBAAkB,EAAE,IAAI,EAAC,MAAM,YAC7C,cAAK,SAAS,EAAE,WAAW,YAAG,IAAI,CAAC,GAAG,CAAC,eAAe,CAAC,cAAc,EAAE,SAAS,CAAC,CAAC,GAAO,GACrF,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,eAAe,GACnB,CAAC,cAAuB,EAAE,SAAkB,EAAE,EAAE,CAChD,CAAC,EAAE,KAAK,EAAE,WAAW,EAAY,EAAE,CAAS,EAAE,EAAE,CAC9C,CACE,eAAqB,SAAS,EAAC,uCAAuC,aACpE,cAAK,SAAS,EAAE,GAAG,cAAc,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,qBAAqB,EAAE,YAC1E,SAAS,GACN,EACN,eAAK,SAAS,EAAC,WAAW,aACvB,KAAK,IAAI,CACR,cAAK,SAAS,EAAE,cAAc,cAAc,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,EAAE,YAAG,KAAK,GAAO,CAClF,EACA,WAAW,IAAI,CACd,cACE,SAAS,EAAE,cAAc,cAAc,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,qBAAqB,EAAE,YAElF,WAAW,GACR,CACP,IACG,KAfE,MAAM,CAAC,CAAC,CAAC,CAgBb,CACP,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { UniBlockProps } from '../../types';
2
+ export interface TableColumnProps extends UniBlockProps {
3
+ header: any;
4
+ columnData: any;
5
+ visibleRowLength: number;
6
+ isFillGradient: boolean;
7
+ showRow: boolean;
8
+ onToggleColumn: () => void;
9
+ }
10
+ export declare const TableColumn: (props: import("@redneckz/uni-jsx").PropsWithChildren<TableColumnProps, any>, context?: any) => any;
@@ -0,0 +1,17 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
2
+ import { JSX } from '@redneckz/uni-jsx';
3
+ import { Button } from '../../ui-kit/Button/Button.js';
4
+ import { GRADIENT } from './constants.js';
5
+ import { HeaderCell } from './HeaderCell.js';
6
+ import { TableCell } from './TableCell.js';
7
+ export const TableColumn = JSX(({ header, columnData, visibleRowLength = 0, isFillGradient, showRow, onToggleColumn }) => {
8
+ const columnDataView = columnData.slice(0, showRow ? columnData.length : visibleRowLength);
9
+ const gradientClassName = isFillGradient ? GRADIENT : '';
10
+ const buttonVersion = isFillGradient ? 'secondary' : 'primary';
11
+ return (_jsxs("div", { className: `border border-main-stroke rounded-md p-4 mb-3.5 ${gradientClassName}`, children: [_jsx(HeaderCell, { ...header, isFillGradient: isFillGradient }), columnDataView?.length
12
+ ? columnDataView.map(({ rowHeader, cell }, i) => (_jsx(TableCell, { cell: cell, rowHeader: rowHeader, isFillGradient: isFillGradient }, String(i))))
13
+ : null, showRow && renderButton({ header, buttonVersion }), renderToggleButton({ onToggleColumn, isFillGradient, showRow })] }));
14
+ });
15
+ const renderButton = ({ header, buttonVersion }) => (_jsx(Button, { href: header.link.href, target: header.link.target, version: buttonVersion, className: "font-medium text-m-sm mt-4 py-[11px]", children: header.link.text }));
16
+ const renderToggleButton = ({ onToggleColumn, isFillGradient, showRow }) => (_jsx("div", { className: "mt-5", children: _jsx("a", { onClick: onToggleColumn, className: `font-medium text-m-sm cursor-pointer ${isFillGradient ? 'text-white/80' : 'text-primary-main'}`, children: !showRow ? 'Показать описание' : 'Скрыть' }) }));
17
+ //# sourceMappingURL=TableColumn.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableColumn.js","sourceRoot":"","sources":["../../../src/components/ComparisonTable/TableColumn.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAGxC,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAWxC,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,CAC5B,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,gBAAgB,GAAG,CAAC,EAAE,cAAc,EAAE,OAAO,EAAE,cAAc,EAAE,EAAE,EAAE;IACxF,MAAM,cAAc,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC;IAC3F,MAAM,iBAAiB,GAAG,cAAc,CAAC,CAAC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C,CAAC,mBACrC,EAAE,YAED,CAAC,OAAO,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,QAAQ,GACxC,GACA,CACP,CAAC"}
@@ -15,7 +15,7 @@ export interface Search {
15
15
  term: string;
16
16
  setTerm: (t: string) => void;
17
17
  }
18
- export declare type AsyncDataHook = <Data, Error = any>(key: string, fetcher: () => Promise<Data>) => {
18
+ export declare type AsyncDataHook = <Data, Error = any>(key: string, fetcher: (key: string) => Promise<Data>) => {
19
19
  data?: Data;
20
20
  error?: Error;
21
21
  };
@@ -1,5 +1,5 @@
1
- import { UniBlockProps } from '../../types';
2
- import { CreditCalculatorContent } from './CreditCalculatorContent';
1
+ import type { UniBlockProps } from '../../types';
2
+ import type { CreditCalculatorContent } from './CreditCalculatorContent';
3
3
  export interface CreditCalculatorProps extends CreditCalculatorContent, UniBlockProps {
4
4
  }
5
5
  export declare const CreditCalculator: (props: import("@redneckz/uni-jsx").PropsWithChildren<CreditCalculatorProps, any>, context?: any) => any;
@@ -1,39 +1,35 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
2
2
  import { JSX } from '@redneckz/uni-jsx';
3
3
  import { useCreditCalculatorData } from '../../hooks/useCreditCalculatorData.js';
4
- import { Button } from '../../ui-kit/Button/Button.js';
5
4
  import { Checkbox } from '../../ui-kit/Checkbox/Checkbox.js';
6
- import { InputRange } from '../../ui-kit/InputRange/InputRange.js';
7
- import { addSpacesBetweenNumbers } from '../../utils/addSpacesBetweenNumbers.js';
8
5
  import { clamp } from '../../utils/clamp.js';
9
- import { DEFAULT_MAX_MONTHS, DEFAULT_MAX_SUM, DEFAULT_MIN_MONTHS, DEFAULT_MIN_SUM, DEFAULT_MONTHS, DEFAULT_SUM, MONTHS_IN_YEAR, } from './constants.js';
6
+ import { DEFAULT_MAX_MONTHS, DEFAULT_MIN_MONTHS, MONTHS_IN_YEAR } from './constants.js';
10
7
  import { getCalculatorParams } from './getCalculatorParams.js';
11
8
  import { getCreditRate } from './getCreditRate.js';
12
9
  import { getCreditTermYears } from './getCreditTermYears.js';
10
+ import { getDefaultMonths } from './getDefaultMonths.js';
11
+ import { getDefaultSum } from './getDefaultSum.js';
13
12
  import { getMonthlyPayment } from './getMonthlyPayment.js';
14
- const STEP_MONEY = 1000;
15
- const STEP_MONTHS = 1;
13
+ import { renderButton } from './renderButton.js';
14
+ import { renderMonthsInput } from './renderMonthsInput.js';
15
+ import { renderProposal } from './renderProposal.js';
16
+ import { renderTermsButton } from './renderTermsButton.js';
17
+ import { renderWantedSumInput } from './renderWantedSumInput.js';
16
18
  const DEFAULT_PAYMENT_TYPE = 'annuity';
17
19
  const borderStyle = 'border-solid border-[3px] border-primary-main rounded-md';
18
- export const CreditCalculator = JSX(({ context, className, directoryName }) => {
20
+ export const CreditCalculator = JSX(({ context, className = '', directoryName }) => {
19
21
  const [moneyValue, setMoneyValue] = context.useState(undefined);
20
22
  const [monthsValue, setMonthsValue] = context.useState(undefined);
21
23
  const [isAnnuityChecked, setIsAnnuityChecked] = context.useState(true);
22
24
  const [isInsuranceChecked, setIsInsuranceChecked] = context.useState(true);
23
25
  const tableRows = useCreditCalculatorData(context.useAsyncData, directoryName).rows;
24
26
  const calculatorParams = getCalculatorParams({ tableRows, isAnnuity: isAnnuityChecked });
25
- const defaultSum = calculatorParams.maxSum && calculatorParams.minSum
26
- ? (calculatorParams.maxSum - calculatorParams.minSum) / 2
27
- : DEFAULT_SUM;
28
- const defaultMonths = calculatorParams.maxMonths && calculatorParams.minMonths
29
- ? Math.round((calculatorParams.maxMonths - calculatorParams.minMonths) / 2)
30
- : DEFAULT_MONTHS;
31
- const minSum = calculatorParams?.minSum || DEFAULT_MIN_SUM;
32
- const maxSum = calculatorParams?.maxSum || DEFAULT_MAX_SUM;
27
+ const defaultSum = getDefaultSum(calculatorParams);
28
+ const defaultMonths = getDefaultMonths(calculatorParams);
33
29
  const minMonths = calculatorParams?.minMonths || DEFAULT_MIN_MONTHS;
34
30
  const maxMonths = calculatorParams?.maxMonths || DEFAULT_MAX_MONTHS;
35
31
  const rate = getCreditRate({ calculatorParams, isInsurance: isInsuranceChecked });
36
- const montlyPayment = getMonthlyPayment({
32
+ const monthlyPayment = getMonthlyPayment({
37
33
  calculatorParams,
38
34
  paymentType: DEFAULT_PAYMENT_TYPE,
39
35
  rate,
@@ -44,12 +40,12 @@ export const CreditCalculator = JSX(({ context, className, directoryName }) => {
44
40
  function handleButtonClick(value) {
45
41
  setMonthsValue(clamp(value * MONTHS_IN_YEAR, minMonths, maxMonths));
46
42
  }
47
- return (_jsx("section", { className: `font-sans text-primary-text p-10 bg-white ${className || ''}`, children: _jsxs("div", { className: `box-border p-[49px] pr-[56px] mx-auto w-max ${borderStyle}`, children: [_jsxs("div", { className: "flex justify-between ", children: [_jsxs("div", { className: "mr-[42px]", children: [_jsx(InputRange, { title: "\u0416\u0435\u043B\u0430\u0435\u043C\u0430\u044F \u0441\u0443\u043C\u043C\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u0430, \u20BD", items: [
48
- `От ${addSpacesBetweenNumbers(minSum)} рублей`,
49
- `До ${addSpacesBetweenNumbers(maxSum)} рублей`,
50
- ], min: minSum, max: maxSum, step: STEP_MONEY, value: moneyValue || defaultSum, onChange: setMoneyValue }), _jsx(InputRange, { className: "mt-[23px]", title: "\u0421\u0440\u043E\u043A \u043A\u0440\u0435\u0434\u0438\u0442\u0430, \u043C\u0435\u0441\u044F\u0446\u0435\u0432", items: ['Или выберите из предложенных вариантов ниже'], min: minMonths, max: maxMonths, step: STEP_MONTHS, value: monthsValue || defaultMonths, onChange: setMonthsValue }), _jsx("div", { className: "flex mb-7", children: creditTermYears.map((number, i) => renderButton(number, i, handleButtonClick)) }), _jsx(Checkbox, { text: "\u041F\u043E\u043B\u0443\u0447\u0430\u044E \u043F\u0435\u043D\u0441\u0438\u044E \u043D\u0430 \u043A\u0430\u0440\u0442\u0443 \u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A\u0430", checked: isAnnuityChecked, onChange: setIsAnnuityChecked }), _jsx(Checkbox, { className: "mt-3 mb-7", text: "\u041A\u043E\u043C\u043F\u043B\u0435\u043A\u0441\u043D\u0430\u044F \u0441\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u044F \u0437\u0430\u0449\u0438\u0442\u0430", checked: isInsuranceChecked, onChange: setIsInsuranceChecked })] }), _jsxs("div", { className: "box-border h-fit p-9 bg-primary-main rounded-md text-white", children: [_jsx("div", { className: "text-base mb-[18px]", children: "\u041D\u0430\u0448\u0435 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435" }), _jsx("div", { className: "text-sm opacity-60", children: "\u0415\u0436\u0435\u043C\u0435\u0441\u044F\u0447\u043D\u044B\u0439 \u043F\u043B\u0430\u0442\u0451\u0436" }), _jsxs("div", { className: "text-lg mb-3", children: [addSpacesBetweenNumbers(Math.round(montlyPayment)), " \u20BD"] }), _jsx("div", { className: "text-sm opacity-60", children: "\u0421\u0442\u0430\u0432\u043A\u0430" }), _jsxs("div", { className: "text-lg", children: [rate, " %"] })] })] }), _jsxs("div", { className: "flex items-center", children: [_jsx(Button, { className: "mr-3", text: "\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u0437\u0430\u044F\u0432\u043A\u0443", version: "primary", href: "#" }), _jsx("div", { className: "w-80 text-2xs leading-4 text-secondary-text", "aria-label": "\u0421\u043E\u0433\u043B\u0430\u0448\u0435\u043D\u0438\u0435 \u043D\u0430 \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u043A\u0443 \u043F\u0435\u0440\u0441\u043E\u043D\u0430\u043B\u044C\u043D\u044B\u0445 \u0434\u0430\u043D\u043D\u044B\u0445", children: "\u041E\u0442\u043F\u0440\u0430\u0432\u043B\u044F\u044F \u0437\u0430\u044F\u0432\u043A\u0443, \u0432\u044B \u0441\u043E\u0433\u043B\u0430\u0448\u0430\u0435\u0442\u0435\u0441\u044C \u043D\u0430 \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u043A\u0443 \u043F\u0435\u0440\u0441\u043E\u043D\u0430\u043B\u044C\u043D\u044B\u0445 \u0434\u0430\u043D\u043D\u044B\u0445 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043D\u043D\u043E \u0442\u0440\u0435\u0431\u043E\u0432\u0430\u043D\u0438\u044F\u043C \u0424\u0417 \u00AB\u041E \u043F\u0435\u0440\u0441\u043E\u043D\u0430\u043B\u044C\u043D\u044B\u0445 \u0434\u0430\u043D\u043D\u044B\u0445\u00BB" })] })] }) }));
43
+ return (_jsx("section", { className: `font-sans text-primary-text p-10 bg-white ${className}`, children: _jsxs("div", { className: `box-border p-[49px] pr-[56px] mx-auto w-max ${borderStyle}`, children: [_jsxs("div", { className: "flex justify-between", children: [_jsxs("div", { className: "mr-[42px]", children: [renderWantedSumInput({ calculatorParams, moneyValue, defaultSum, setMoneyValue }), renderMonthsInput({
44
+ minMonths,
45
+ maxMonths,
46
+ monthsValue,
47
+ defaultMonths,
48
+ setMonthsValue,
49
+ }), _jsx("div", { className: "flex mb-7", children: creditTermYears.map((number, i) => renderButton(number, i, handleButtonClick)) }), _jsx(Checkbox, { text: "\u041F\u043E\u043B\u0443\u0447\u0430\u044E \u043F\u0435\u043D\u0441\u0438\u044E \u043D\u0430 \u043A\u0430\u0440\u0442\u0443 \u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A\u0430", checked: isAnnuityChecked, onChange: setIsAnnuityChecked }), _jsx(Checkbox, { className: "mt-3 mb-7", text: "\u041A\u043E\u043C\u043F\u043B\u0435\u043A\u0441\u043D\u0430\u044F \u0441\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u044F \u0437\u0430\u0449\u0438\u0442\u0430", checked: isInsuranceChecked, onChange: setIsInsuranceChecked })] }), renderProposal(monthlyPayment, rate)] }), renderTermsButton()] }) }));
51
50
  });
52
- function renderButton(number, i, handleClick) {
53
- return (_jsx("button", { className: "bg-secondary-light rounded-3xl h-10 w-[75px] box-border mr-2 flex items-center justify-center cursor-pointer border-none", onClick: () => handleClick(number), children: _jsxs("span", { className: "font-semibold text-sm", children: [number, " ", number === 1 ? 'год' : number > 4 ? 'лет' : 'года'] }) }, String(i)));
54
- }
55
51
  //# sourceMappingURL=CreditCalculator.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CreditCalculator.js","sourceRoot":"","sources":["../../../src/components/CreditCalculator/CreditCalculator.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAE9E,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAChE,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,kBAAkB,EAClB,eAAe,EACf,cAAc,EACd,WAAW,EACX,cAAc,GACf,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAIxD,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,WAAW,GAAG,CAAC,CAAC;AACtB,MAAM,oBAAoB,GAAG,SAAS,CAAC;AAEvC,MAAM,WAAW,GAAG,0DAA0D,CAAC;AAE/E,MAAM,CAAC,MA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AC,CAAC;IAEH,MAAM,eAAe,GAAG,kBAAkB,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IAEjE,SAAS,iBAAiB,CAAC,KAAa;QACtC,cAAc,CAAC,KAAK,CAAC,KAAK,GAAG,cAAc,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC;IACtE,CAAC;IAED,OAAO,CACL,kBAAS,SAAS,EAAE,6CAA6C,SAAS,EAAE,YAC1E,eAAK,SAAS,EAAE,+CAA+C,WAAW,EAAE,aAC1E,eAAK,SAAS,EAAC,sBAAsB,aACnC,eAAK,SAAS,EAAC,WAAW,aACvB,oBAAoB,CAAC,EAAE,gBAAgB,EAAE,UAAU,EAAE,UAAU,EAAE,aAAa,EAAE,CAAC,EACjF,iBAAiB,CAAC;oCACjB,SAAS;oCACT,SAAS;oCACT,WAAW;oCACX,aAAa;oCACb,cAAc;iCACf,CAAC,EACF,cAAK,SAAS,EAAC,WAAW,YACvB,eAAe,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC,EAAE,iBAAiB,CAAC,CAAC,GAC3E,EACN,KAAC,QAAQ,IACP,IAAI,EAAC,wNAAyC,EAC9C,OAAO,EAAE,gBAAgB,EACzB,QAAQ,EAAE,mBAAmB,GAC7B,EACF,KAAC,QAAQ,IACP,SAAS,EAAC,WAAW,EACrB,IAAI,EAAC,gKAA8B,EACnC,OAAO,EAAE,kBAAkB,EAC3B,QAAQ,EAAE,qBAAqB,GAC/B,IACE,EACL,cAAc,CAAC,cAAc,EAAE,IAAI,CAAC,IACjC,EACL,iBAAiB,EAAE,IAChB,GACE,CACX,CAAC;AACJ,CAAC,CACF,CAAC"}
@@ -1,4 +1,4 @@
1
- import { CalculatorParams } from './CreditCalculatorContent';
1
+ import type { CalculatorParams } from './CreditCalculatorContent';
2
2
  interface GetCalculatorParamsParams {
3
3
  tableRows?: CalculatorParams[];
4
4
  isAnnuity?: boolean;
@@ -1,4 +1,4 @@
1
- import { CalculatorParams } from './CreditCalculatorContent';
1
+ import type { CalculatorParams } from './CreditCalculatorContent';
2
2
  interface GetCreditRateParams {
3
3
  calculatorParams?: CalculatorParams;
4
4
  isInsurance: boolean;
@@ -0,0 +1,2 @@
1
+ import type { CalculatorParams } from './CreditCalculatorContent';
2
+ export declare const getDefaultMonths: (calculatorParams: CalculatorParams) => number;
@@ -0,0 +1,5 @@
1
+ import { DEFAULT_MONTHS } from './constants.js';
2
+ export const getDefaultMonths = (calculatorParams) => calculatorParams.maxMonths && calculatorParams.minMonths
3
+ ? Math.round((calculatorParams.maxMonths - calculatorParams.minMonths) / 2)
4
+ : DEFAULT_MONTHS;
5
+ //# sourceMappingURL=getDefaultMonths.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getDefaultMonths.js","sourceRoot":"","sources":["../../../src/components/CreditCalculator/getDefaultMonths.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAG7C,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,gBAAkC,EAAE,EAAE,CACrE,gBAAgB,CAAC,SAAS,IAAI,gBAAgB,CAAC,SAAS;IACtD,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,gBAAgB,CAAC,SAAS,GAAG,gBAAgB,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;IAC3E,CAAC,CAAC,cAAc,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { CalculatorParams } from './CreditCalculatorContent';
2
+ export declare const getDefaultSum: (calculatorParams: CalculatorParams) => number;
@@ -0,0 +1,5 @@
1
+ import { DEFAULT_SUM } from './constants.js';
2
+ export const getDefaultSum = (calculatorParams) => calculatorParams.maxSum && calculatorParams.minSum
3
+ ? (calculatorParams.maxSum - calculatorParams.minSum) / 2
4
+ : DEFAULT_SUM;
5
+ //# sourceMappingURL=getDefaultSum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getDefaultSum.js","sourceRoot":"","sources":["../../../src/components/CreditCalculator/getDefaultSum.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG1C,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,gBAAkC,EAAE,EAAE,CAClE,gBAAgB,CAAC,MAAM,IAAI,gBAAgB,CAAC,MAAM;IAChD,CAAC,CAAC,CAAC,gBAAgB,CAAC,MAAM,GAAG,gBAAgB,CAAC,MAAM,CAAC,GAAG,CAAC;IACzD,CAAC,CAAC,WAAW,CAAC"}
@@ -1,4 +1,4 @@
1
- import { CalculatorParams } from './CreditCalculatorContent';
1
+ import type { CalculatorParams } from './CreditCalculatorContent';
2
2
  declare type PaymentType = 'annuity' | 'differentiated';
3
3
  interface GetMonthlyPaymentParams {
4
4
  calculatorParams?: CalculatorParams;
@@ -0,0 +1 @@
1
+ export declare function renderButton(number: number, i: number, handleClick: (number: number) => void): any;
@@ -0,0 +1,5 @@
1
+ import { jsxs as _jsxs, jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
2
+ export function renderButton(number, i, handleClick) {
3
+ return (_jsx("button", { className: "bg-secondary-light rounded-3xl h-10 w-[75px] box-border mr-2 flex items-center justify-center cursor-pointer border-none", onClick: () => handleClick(number), children: _jsxs("span", { className: "font-semibold text-sm", children: [number, " ", number === 1 ? 'год' : number > 4 ? 'лет' : 'года'] }) }, String(i)));
4
+ }
5
+ //# sourceMappingURL=renderButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderButton.js","sourceRoot":"","sources":["../../../src/components/CreditCalculator/renderButton.tsx"],"names":[],"mappings":";AAAA,MAAM,UAAU,YAAY,CAAC,MAAc,EAAE,CAAS,EAAE,WAAqC;IAC3F,OAAO,CACL,iBAEE,SAAS,EAAC,0HAA0H,EACpI,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,MAAM,CAAC,YAElC,gBAAM,SAAS,EAAC,uBAAuB,aACpC,MAAM,OAAG,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,IACvD,IANF,MAAM,CAAC,CAAC,CAAC,CAOP,CACV,CAAC;AACJ,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { InputRangeProps } from '../../ui-kit/InputRange/InputRangeProps';
2
+ interface RenderMonthsInputProps {
3
+ minMonths: number;
4
+ maxMonths: number;
5
+ monthsValue: number | undefined;
6
+ defaultMonths: number;
7
+ setMonthsValue: InputRangeProps['onChange'];
8
+ }
9
+ export declare function renderMonthsInput(props: RenderMonthsInputProps): any;
10
+ export {};
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
2
+ import { InputRange } from '../../ui-kit/InputRange/InputRange.js';
3
+ const STEP_MONTHS = 1;
4
+ export function renderMonthsInput(props) {
5
+ const { minMonths, maxMonths, monthsValue, defaultMonths, setMonthsValue } = props;
6
+ return (_jsx(InputRange, { className: "mt-[23px]", title: "\u0421\u0440\u043E\u043A \u043A\u0440\u0435\u0434\u0438\u0442\u0430, \u043C\u0435\u0441\u044F\u0446\u0435\u0432", items: ['Или выберите из предложенных вариантов ниже'], min: minMonths, max: maxMonths, step: STEP_MONTHS, value: monthsValue || defaultMonths, onChange: setMonthsValue }));
7
+ }
8
+ //# sourceMappingURL=renderMonthsInput.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderMonthsInput.js","sourceRoot":"","sources":["../../../src/components/CreditCalculator/renderMonthsInput.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAGhE,MAAM,WAAW,GAAG,CAAC,CAAC;AAUtB,MAAM,UAAU,iBAAiB,CAAC,KAA6B;IAC7D,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,EAAE,GAAG,KAAK,CAAC;IAEnF,OAAO,CACL,KAAC,UAAU,IACT,SAAS,EAAC,WAAW,EACrB,KAAK,EAAC,iHAAuB,EAC7B,KAAK,EAAE,CAAC,6CAA6C,CAAC,EACtD,GAAG,EAAE,SAAS,EACd,GAAG,EAAE,SAAS,EACd,IAAI,EAAE,WAAW,EACjB,KAAK,EAAE,WAAW,IAAI,aAAa,EACnC,QAAQ,EAAE,cAAc,GACxB,CACH,CAAC;AACJ,CAAC"}
@@ -0,0 +1 @@
1
+ export declare function renderProposal(monthlyPayment: number, rate: number): any;
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
2
+ import { addSpacesBetweenNumbers } from '../../utils/addSpacesBetweenNumbers.js';
3
+ export function renderProposal(monthlyPayment, rate) {
4
+ return (_jsxs("div", { className: "box-border h-fit p-9 bg-primary-main rounded-md text-white", children: [_jsx("div", { className: "text-base mb-[18px]", children: "\u041D\u0430\u0448\u0435 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435" }), _jsx("div", { className: "text-sm opacity-60", children: "\u0415\u0436\u0435\u043C\u0435\u0441\u044F\u0447\u043D\u044B\u0439 \u043F\u043B\u0430\u0442\u0451\u0436" }), _jsxs("div", { className: "text-lg mb-3", children: [addSpacesBetweenNumbers(Math.round(monthlyPayment)), " \u20BD"] }), _jsx("div", { className: "text-sm opacity-60", children: "\u0421\u0442\u0430\u0432\u043A\u0430" }), _jsxs("div", { className: "text-lg", children: [rate, " %"] })] }));
5
+ }
6
+ //# sourceMappingURL=renderProposal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderProposal.js","sourceRoot":"","sources":["../../../src/components/CreditCalculator/renderProposal.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAE9E,MAAM,UAAU,cAAc,CAAC,cAAsB,EAAE,IAAY;IACjE,OAAO,CACL,eAAK,SAAS,EAAC,4DAA4D,aACzE,cAAK,SAAS,EAAC,qBAAqB,4GAAuB,EAC3D,cAAK,SAAS,EAAC,oBAAoB,wHAAyB,EAC5D,eAAK,SAAS,EAAC,cAAc,aAAE,uBAAuB,CAAC,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,eAAS,EAC3F,cAAK,SAAS,EAAC,oBAAoB,qDAAa,EAChD,eAAK,SAAS,EAAC,SAAS,aAAE,IAAI,UAAS,IACnC,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1 @@
1
+ export declare function renderTermsButton(): any;
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
2
+ import { Button } from '../../ui-kit/Button/Button.js';
3
+ export function renderTermsButton() {
4
+ return (_jsxs("div", { className: "flex items-center", children: [_jsx(Button, { className: "mr-3", text: "\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u0437\u0430\u044F\u0432\u043A\u0443", version: "primary", href: "#" }), _jsx("div", { className: "w-80 text-2xs leading-4 text-secondary-text", "aria-label": "\u0421\u043E\u0433\u043B\u0430\u0448\u0435\u043D\u0438\u0435 \u043D\u0430 \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u043A\u0443 \u043F\u0435\u0440\u0441\u043E\u043D\u0430\u043B\u044C\u043D\u044B\u0445 \u0434\u0430\u043D\u043D\u044B\u0445", children: "\u041E\u0442\u043F\u0440\u0430\u0432\u043B\u044F\u044F \u0437\u0430\u044F\u0432\u043A\u0443, \u0432\u044B \u0441\u043E\u0433\u043B\u0430\u0448\u0430\u0435\u0442\u0435\u0441\u044C \u043D\u0430 \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u043A\u0443 \u043F\u0435\u0440\u0441\u043E\u043D\u0430\u043B\u044C\u043D\u044B\u0445 \u0434\u0430\u043D\u043D\u044B\u0445 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043D\u043D\u043E \u0442\u0440\u0435\u0431\u043E\u0432\u0430\u043D\u0438\u044F\u043C \u0424\u0417 \u00AB\u041E \u043F\u0435\u0440\u0441\u043E\u043D\u0430\u043B\u044C\u043D\u044B\u0445 \u0434\u0430\u043D\u043D\u044B\u0445\u00BB" })] }));
5
+ }
6
+ //# sourceMappingURL=renderTermsButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderTermsButton.js","sourceRoot":"","sources":["../../../src/components/CreditCalculator/renderTermsButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAEpD,MAAM,UAAU,iBAAiB;IAC/B,OAAO,CACL,eAAK,SAAS,EAAC,mBAAmB,aAChC,KAAC,MAAM,IAAC,SAAS,EAAC,MAAM,EAAC,IAAI,EAAC,6FAAkB,EAAC,OAAO,EAAC,SAAS,EAAC,IAAI,EAAC,GAAG,GAAG,EAC9E,cACE,SAAS,EAAC,6CAA6C,gBAC5C,gPAA6C,2pBAIpD,IACF,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { InputRangeProps } from '../../ui-kit/InputRange/InputRangeProps';
2
+ import type { CalculatorParams } from './CreditCalculatorContent';
3
+ interface RenderWantedSumInputProps {
4
+ calculatorParams: CalculatorParams;
5
+ moneyValue: number | undefined;
6
+ defaultSum: number;
7
+ setMoneyValue: InputRangeProps['onChange'];
8
+ }
9
+ export declare function renderWantedSumInput(props: RenderWantedSumInputProps): any;
10
+ export {};
@@ -0,0 +1,15 @@
1
+ import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
2
+ import { InputRange } from '../../ui-kit/InputRange/InputRange.js';
3
+ import { addSpacesBetweenNumbers } from '../../utils/addSpacesBetweenNumbers.js';
4
+ import { DEFAULT_MAX_SUM, DEFAULT_MIN_SUM } from './constants.js';
5
+ const STEP_MONEY = 1000;
6
+ export function renderWantedSumInput(props) {
7
+ const { calculatorParams, moneyValue, defaultSum, setMoneyValue } = props;
8
+ const minSum = calculatorParams?.minSum || DEFAULT_MIN_SUM;
9
+ const maxSum = calculatorParams?.maxSum || DEFAULT_MAX_SUM;
10
+ return (_jsx(InputRange, { title: "\u0416\u0435\u043B\u0430\u0435\u043C\u0430\u044F \u0441\u0443\u043C\u043C\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u0430, \u20BD", items: [
11
+ `От ${addSpacesBetweenNumbers(minSum)} рублей`,
12
+ `До ${addSpacesBetweenNumbers(maxSum)} рублей`,
13
+ ], min: minSum, max: maxSum, step: STEP_MONEY, value: moneyValue || defaultSum, onChange: setMoneyValue }));
14
+ }
15
+ //# sourceMappingURL=renderWantedSumInput.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderWantedSumInput.js","sourceRoot":"","sources":["../../../src/components/CreditCalculator/renderWantedSumInput.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAEhE,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAG/D,MAAM,UAAU,GAAG,IAAI,CAAC;AASxB,MAAM,UAAU,oBAAoB,CAAC,KAAgC;IACnE,MAAM,EAAE,gBAAgB,EAAE,UAAU,EAAE,UAAU,EAAE,aAAa,EAAE,GAAG,KAAK,CAAC;IAE1E,MAAM,MAAM,GAAG,gBAAgB,EAAE,MAAM,IAAI,eAAe,CAAC;IAC3D,MAAM,MAAM,GAAG,gBAAgB,EAAE,MAAM,IAAI,eAAe,CAAC;IAE3D,OAAO,CACL,KAAC,UAAU,IACT,KAAK,EAAC,oIAA2B,EACjC,KAAK,EAAE;YACL,MAAM,uBAAuB,CAAC,MAAM,CAAC,SAAS;YAC9C,MAAM,uBAAuB,CAAC,MAAM,CAAC,SAAS;SAC/C,EACD,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,UAAU,EAChB,KAAK,EAAE,UAAU,IAAI,UAAU,EAC/B,QAAQ,EAAE,aAAa,GACvB,CACH,CAAC;AACJ,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { ExchangeCurrencyItem } from './ExchangeRateTileContent';
2
+ interface CurrencyTableProps {
3
+ className?: string;
4
+ exchangeCurrencyItems: ExchangeCurrencyItem[];
5
+ }
6
+ export declare const CurrencyTable: (props: import("@redneckz/uni-jsx").PropsWithChildren<CurrencyTableProps, any>, context?: any) => any;
7
+ export {};
@@ -0,0 +1,17 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
2
+ import { JSX } from '@redneckz/uni-jsx';
3
+ import { Icon } from '../../ui-kit/Icon/Icon.js';
4
+ import { formatCurrency } from './formatCurrency.js';
5
+ const TABLE_HEAD_STYLE = 'text-left font-normal text-sm text-secondary-text';
6
+ const CURRENCY_ICONS_MAP = {
7
+ USD: 'DollarIcon',
8
+ EUR: 'EuroIcon',
9
+ };
10
+ export const CurrencyTable = JSX(({ className, exchangeCurrencyItems }) => {
11
+ return (_jsxs("table", { className: `h-fit w-fit ${className}`, children: [_jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", { className: TABLE_HEAD_STYLE, children: "\u0412\u0430\u043B\u044E\u0442\u0430" }), _jsx("th", { className: `${TABLE_HEAD_STYLE} pl-11`, children: "\u041A\u0443\u043F\u0438\u0442\u044C" }), _jsx("th", { className: `${TABLE_HEAD_STYLE} pl-11`, children: "\u041F\u0440\u043E\u0434\u0430\u0442\u044C" })] }) }), _jsx("tbody", { children: exchangeCurrencyItems.map((item) => renderCurrencyRow(item)) })] }));
12
+ });
13
+ const renderCurrencyRow = (exchangeCurrencyItem) => {
14
+ const code = exchangeCurrencyItem?.currency?.currency;
15
+ return (_jsxs("tr", { children: [_jsx("td", { className: "pt-4", children: _jsxs("div", { className: "flex items-center", children: [code ? _jsx(Icon, { name: CURRENCY_ICONS_MAP[code], width: "24", height: "24" }) : null, _jsx("span", { className: "ml-2", children: code })] }) }), _jsx("td", { className: "pt-4 pl-11", children: formatCurrency(exchangeCurrencyItem.buyExchangeRate) }), _jsx("td", { className: "pt-4 pl-11", children: formatCurrency(exchangeCurrencyItem.saleExchangeRate) })] }, code));
16
+ };
17
+ //# sourceMappingURL=CurrencyTable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CurrencyTable.js","sourceRoot":"","sources":["../../../src/components/ExchangeRateTile/CurrencyTable.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,gBAAgB,GAAG,mDAAmD,CAAC;AAE7E,MAAM,kBAAkB,GAAG;IACzB,GAAG,EAAE,YAAY;IACjB,GAAG,EAAE,UAAU;CAChB,CAAC;AAOF,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,CAAqB,CAAC,EAAE,SAAS,EAAE,qBAAqB,EAAE,EAAE,EAAE;IAC5F,OAAO,CACL,iBAAO,SAAS,EAAE,eAAe,SAAS,EAAE,aAC1C,0BACE,yBACE,aAAI,SAAS,EAAE,gBAAgB,qDAAa,EAC5C,aAAI,SAAS,EAAE,GAAG,gBAAgB,QAAQ,qDAAa,EACvD,aAAI,SAAS,EAAE,GAAG,gBAAgB,QAAQ,2DAAc,IACrD,GACC,EACR,0BAAQ,qBAAqB,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,GAAS,IACvE,CACT,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,iBAAiB,GAAG,CAAC,oBAA0C,EAAE,EAAE;IACvE,MAAM,IAAI,GAAG,oBAAoB,EAAE,QAAQ,EAAE,QAAQ,CAAC;IACtD,OAAO,CACL,yBACE,aAAI,SAAS,EAAC,MAAM,YAClB,eAAK,SAAS,EAAC,mBAAmB,aAC/B,IAAI,CAAC,CAAC,CAAC,KAAC,IAAI,IAAC,IAAI,EAAE,kBAAkB,CAAC,IAAI,CAAC,EAAE,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,EAC9E,eAAM,SAAS,EAAC,MAAM,YAAE,IAAI,GAAQ,IAChC,GACH,EACL,aAAI,SAAS,EAAC,YAAY,YAAE,cAAc,CAAC,oBAAoB,CAAC,eAAe,CAAC,GAAM,EACtF,aAAI,SAAS,EAAC,YAAY,YAAE,cAAc,CAAC,oBAAoB,CAAC,gBAAgB,CAAC,GAAM,KARhF,IAAI,CASR,CACN,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ interface CurrentLocationProps {
2
+ className?: string;
3
+ address?: string;
4
+ distance?: string;
5
+ }
6
+ export declare const CurrentLocation: (props: import("@redneckz/uni-jsx").PropsWithChildren<CurrentLocationProps, any>, context?: any) => any;
7
+ export {};
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
2
+ import { JSX } from '@redneckz/uni-jsx';
3
+ import { Icon } from '../../ui-kit/Icon/Icon.js';
4
+ export const CurrentLocation = JSX(({ className = '', address, distance }) => (_jsxs("div", { className: `flex text-sm ${className}`, children: [_jsx(Icon, { className: "min-w-fit", name: "GpsIcon", width: "24", height: "24", asSVG: true }), _jsxs("div", { className: "ml-1.5", children: [address ? _jsx("p", { className: "m-0", children: address }) : null, distance ? (_jsxs("p", { className: "text-secondary-text m-0", children: ["\u041A\u0443\u0440\u0441 \u0443\u043A\u0430\u0437\u0430\u043D \u0434\u043B\u044F \u0431\u043B\u0438\u0436\u0430\u0439\u0448\u0435\u0433\u043E \u043E\u0444\u0438\u0441\u0430 - ", distance] })) : null] })] })));
5
+ //# sourceMappingURL=CurrentLocation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CurrentLocation.js","sourceRoot":"","sources":["../../../src/components/ExchangeRateTile/CurrentLocation.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAQ9C,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAChC,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CACzC,eAAK,SAAS,EAAE,gBAAgB,SAAS,EAAE,aACzC,KAAC,IAAI,IAAC,SAAS,EAAC,WAAW,EAAC,IAAI,EAAC,SAAS,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,KAAK,SAAG,EAC1E,eAAK,SAAS,EAAC,QAAQ,aACpB,OAAO,CAAC,CAAC,CAAC,YAAG,SAAS,EAAC,KAAK,YAAE,OAAO,GAAK,CAAC,CAAC,CAAC,IAAI,EACjD,QAAQ,CAAC,CAAC,CAAC,CACV,aAAG,SAAS,EAAC,yBAAyB,gMAAqC,QAAQ,IAAK,CACzF,CAAC,CAAC,CAAC,IAAI,IACJ,IACF,CACP,CACF,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { ExchangeCurrencyItem } from './ExchangeRateTileContent';
2
+ export interface ExchangeCurrencyCalculatorProps {
3
+ exchangeCurrencyItems: ExchangeCurrencyItem[];
4
+ codes: string[];
5
+ className?: string;
6
+ }
7
+ export declare const ExchangeCurrencyCalculator: (props: import("@redneckz/uni-jsx").PropsWithChildren<ExchangeCurrencyCalculatorProps, any>, context?: any) => any;
@@ -0,0 +1,13 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
2
+ import { JSX } from '@redneckz/uni-jsx';
3
+ import { Button } from '../../ui-kit/Button/Button.js';
4
+ import { Input } from '../../ui-kit/Input/Input.js';
5
+ import { Select } from '../../ui-kit/Select/Select.js';
6
+ import { SelectOption } from '../../ui-kit/Select/SelectOption.js';
7
+ export const ExchangeCurrencyCalculator = JSX(({ codes, className = '' }) => {
8
+ return (_jsxs("div", { className: `grid gap-3.5 ${className}`, children: [renderInput('Хочу продать', codes), renderInput('Получу', codes), _jsx(Button, { className: "box-border mt-3.5 py-3 h-12 w-44", version: "primary", href: "#", children: "\u041A\u0443\u043F\u0438\u0442\u044C \u0432\u0430\u043B\u044E\u0442\u0443" })] }));
9
+ });
10
+ function renderInput(placeholder, codes) {
11
+ return (_jsxs("div", { className: "flex items-center", children: [_jsx(Input, { className: "h-10 border pl-2.5 rounded-md text-m-sm w-full appearance-none", type: "number", placeholder: `${placeholder}` }), codes.length ? (_jsx(Select, { className: "h-9 -translate-x-16", children: codes.map((code, i) => (_jsx(SelectOption, { value: code, children: code }, String(i)))) })) : null] }));
12
+ }
13
+ //# sourceMappingURL=ExchangeCurrencyCalculator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExchangeCurrencyCalculator.js","sourceRoot":"","sources":["../../../src/components/ExchangeRateTile/ExchangeCurrencyCalculator.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAShE,MAAM,CAAC,MAAM,0BAA0B,GAAG,GAAG,CAC3C,CAAC,EAAE,KAAK,EAAE,SAAS,GAAG,EAAE,EAAE,EAAE,EAAE;IAC5B,OAAO,CACL,eAAK,SAAS,EAAE,gBAAgB,SAAS,EAAE,aACxC,WAAW,CAAC,cAAc,EAAE,KAAK,CAAC,EAClC,WAAW,CAAC,QAAQ,EAAE,KAAK,CAAC,EAC7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