@redneckz/wildless-cms-uni-blocks 0.14.840 → 0.14.842

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 (497) hide show
  1. package/bin/migration-scripts/0.14.832.js +1 -0
  2. package/bundle/blocks.schema.json +1 -1
  3. package/bundle/bundle.umd.js +63 -346
  4. package/bundle/bundle.umd.min.js +1 -1
  5. package/bundle/ui-kit/Loader/Loader.d.ts +1 -1
  6. package/dist/components/BenefitsBlock/BenefitsBlock.js +1 -1
  7. package/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  8. package/dist/components/Blocks.js +0 -6
  9. package/dist/components/Blocks.js.map +1 -1
  10. package/dist/components/Blocks.mobile.js +0 -4
  11. package/dist/components/Blocks.mobile.js.map +1 -1
  12. package/dist/components/CalculatorRefinancing/CalculatorRefinancing.js +1 -1
  13. package/dist/components/CalculatorRefinancing/CalculatorRefinancing.js.map +1 -1
  14. package/dist/components/CardTransfer/CardTransfer.js +1 -8
  15. package/dist/components/CardTransfer/CardTransfer.js.map +1 -1
  16. package/dist/components/CardTransfer/SubmitFailedDialog.js +1 -1
  17. package/dist/components/CardTransfer/SubmitFailedDialog.js.map +1 -1
  18. package/dist/components/Carousel/renderCarouselCards.js +2 -2
  19. package/dist/components/Carousel/renderCarouselCards.js.map +1 -1
  20. package/dist/components/Footer/HorizontalNavigation.js +1 -1
  21. package/dist/components/Footer/HorizontalNavigation.js.map +1 -1
  22. package/dist/components/Footer/TextInformationLink.js +1 -1
  23. package/dist/components/Footer/TextInformationLink.js.map +1 -1
  24. package/dist/components/Header/HeaderTopMenu.js +1 -1
  25. package/dist/components/Header/HeaderTopMenu.js.map +1 -1
  26. package/dist/retail/components/CaptchaDialog/CaptchaDialog.js +1 -1
  27. package/dist/retail/components/CaptchaDialog/CaptchaDialog.js.map +1 -1
  28. package/dist/retail/components/DraftDialog/DraftDialog.js +1 -1
  29. package/dist/retail/components/DraftDialog/DraftDialog.js.map +1 -1
  30. package/dist/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js +1 -1
  31. package/dist/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
  32. package/dist/ui-kit/Calculator/CalculatorStyle.js +1 -1
  33. package/dist/ui-kit/Calculator/CalculatorStyle.js.map +1 -1
  34. package/dist/ui-kit/InputRange/InputRange.js +1 -1
  35. package/dist/ui-kit/InputRange/InputRange.js.map +1 -1
  36. package/dist/ui-kit/LinkButton/ButtonInner.js +1 -1
  37. package/dist/ui-kit/LinkButton/ButtonInner.js.map +1 -1
  38. package/dist/ui-kit/Loader/Loader.d.ts +1 -1
  39. package/dist/ui-kit/Loader/Loader.js.map +1 -1
  40. package/dist/ui-kit/ProgressBar/ProgressBar.js +1 -1
  41. package/lib/common.css +1 -1
  42. package/lib/components/BenefitsBlock/BenefitsBlock.js +1 -1
  43. package/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  44. package/lib/components/Blocks.js +0 -6
  45. package/lib/components/Blocks.js.map +1 -1
  46. package/lib/components/Blocks.mobile.js +0 -4
  47. package/lib/components/Blocks.mobile.js.map +1 -1
  48. package/lib/components/CalculatorRefinancing/CalculatorRefinancing.js +1 -1
  49. package/lib/components/CalculatorRefinancing/CalculatorRefinancing.js.map +1 -1
  50. package/lib/components/CardTransfer/CardTransfer.js +1 -8
  51. package/lib/components/CardTransfer/CardTransfer.js.map +1 -1
  52. package/lib/components/CardTransfer/SubmitFailedDialog.js +1 -1
  53. package/lib/components/CardTransfer/SubmitFailedDialog.js.map +1 -1
  54. package/lib/components/Carousel/renderCarouselCards.js +2 -2
  55. package/lib/components/Carousel/renderCarouselCards.js.map +1 -1
  56. package/lib/components/Footer/HorizontalNavigation.js +1 -1
  57. package/lib/components/Footer/HorizontalNavigation.js.map +1 -1
  58. package/lib/components/Footer/TextInformationLink.js +1 -1
  59. package/lib/components/Footer/TextInformationLink.js.map +1 -1
  60. package/lib/components/Header/HeaderTopMenu.js +1 -1
  61. package/lib/components/Header/HeaderTopMenu.js.map +1 -1
  62. package/lib/retail/components/CaptchaDialog/CaptchaDialog.js +1 -1
  63. package/lib/retail/components/CaptchaDialog/CaptchaDialog.js.map +1 -1
  64. package/lib/retail/components/DraftDialog/DraftDialog.js +1 -1
  65. package/lib/retail/components/DraftDialog/DraftDialog.js.map +1 -1
  66. package/lib/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js +1 -1
  67. package/lib/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
  68. package/lib/ui-kit/Calculator/CalculatorStyle.js +1 -1
  69. package/lib/ui-kit/Calculator/CalculatorStyle.js.map +1 -1
  70. package/lib/ui-kit/InputRange/InputRange.js +1 -1
  71. package/lib/ui-kit/InputRange/InputRange.js.map +1 -1
  72. package/lib/ui-kit/LinkButton/ButtonInner.js +1 -1
  73. package/lib/ui-kit/LinkButton/ButtonInner.js.map +1 -1
  74. package/lib/ui-kit/Loader/Loader.d.ts +1 -1
  75. package/lib/ui-kit/Loader/Loader.js.map +1 -1
  76. package/lib/ui-kit/ProgressBar/ProgressBar.fixture.d.ts +4 -1
  77. package/lib/ui-kit/ProgressBar/ProgressBar.js +1 -1
  78. package/mobile/bundle/bundle.umd.js +35 -246
  79. package/mobile/bundle/bundle.umd.min.js +1 -1
  80. package/mobile/bundle/ui-kit/Loader/Loader.d.ts +1 -1
  81. package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js +1 -1
  82. package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  83. package/mobile/dist/components/Blocks.js +0 -4
  84. package/mobile/dist/components/Blocks.js.map +1 -1
  85. package/mobile/dist/components/CalculatorRefinancing/CalculatorRefinancing.js +1 -1
  86. package/mobile/dist/components/CalculatorRefinancing/CalculatorRefinancing.js.map +1 -1
  87. package/mobile/dist/components/CardTransfer/CardTransfer.js +1 -8
  88. package/mobile/dist/components/CardTransfer/CardTransfer.js.map +1 -1
  89. package/mobile/dist/components/CardTransfer/SubmitFailedDialog.js +1 -1
  90. package/mobile/dist/components/CardTransfer/SubmitFailedDialog.js.map +1 -1
  91. package/mobile/dist/components/Carousel/renderCarouselCards.js +2 -2
  92. package/mobile/dist/components/Carousel/renderCarouselCards.js.map +1 -1
  93. package/mobile/dist/components/Footer/HorizontalNavigation.js +1 -1
  94. package/mobile/dist/components/Footer/HorizontalNavigation.js.map +1 -1
  95. package/mobile/dist/components/Footer/TextInformationLink.js +1 -1
  96. package/mobile/dist/components/Footer/TextInformationLink.js.map +1 -1
  97. package/mobile/dist/components/Header/HeaderTopMenu.js +1 -1
  98. package/mobile/dist/components/Header/HeaderTopMenu.js.map +1 -1
  99. package/mobile/dist/retail/components/CaptchaDialog/CaptchaDialog.js +1 -1
  100. package/mobile/dist/retail/components/CaptchaDialog/CaptchaDialog.js.map +1 -1
  101. package/mobile/dist/retail/components/DraftDialog/DraftDialog.js +1 -1
  102. package/mobile/dist/retail/components/DraftDialog/DraftDialog.js.map +1 -1
  103. package/mobile/dist/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js +1 -1
  104. package/mobile/dist/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
  105. package/mobile/dist/ui-kit/Calculator/CalculatorStyle.js +1 -1
  106. package/mobile/dist/ui-kit/Calculator/CalculatorStyle.js.map +1 -1
  107. package/mobile/dist/ui-kit/InputRange/InputRange.js +1 -1
  108. package/mobile/dist/ui-kit/InputRange/InputRange.js.map +1 -1
  109. package/mobile/dist/ui-kit/LinkButton/ButtonInner.js +1 -1
  110. package/mobile/dist/ui-kit/LinkButton/ButtonInner.js.map +1 -1
  111. package/mobile/dist/ui-kit/Loader/Loader.d.ts +1 -1
  112. package/mobile/dist/ui-kit/Loader/Loader.js.map +1 -1
  113. package/mobile/dist/ui-kit/ProgressBar/ProgressBar.js +1 -1
  114. package/mobile/lib/common.css +1 -1
  115. package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js +1 -1
  116. package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  117. package/mobile/lib/components/Blocks.js +0 -4
  118. package/mobile/lib/components/Blocks.js.map +1 -1
  119. package/mobile/lib/components/CalculatorRefinancing/CalculatorRefinancing.js +1 -1
  120. package/mobile/lib/components/CalculatorRefinancing/CalculatorRefinancing.js.map +1 -1
  121. package/mobile/lib/components/CardTransfer/CardTransfer.js +1 -8
  122. package/mobile/lib/components/CardTransfer/CardTransfer.js.map +1 -1
  123. package/mobile/lib/components/CardTransfer/SubmitFailedDialog.js +1 -1
  124. package/mobile/lib/components/CardTransfer/SubmitFailedDialog.js.map +1 -1
  125. package/mobile/lib/components/Carousel/renderCarouselCards.js +2 -2
  126. package/mobile/lib/components/Carousel/renderCarouselCards.js.map +1 -1
  127. package/mobile/lib/components/Footer/HorizontalNavigation.js +1 -1
  128. package/mobile/lib/components/Footer/HorizontalNavigation.js.map +1 -1
  129. package/mobile/lib/components/Footer/TextInformationLink.js +1 -1
  130. package/mobile/lib/components/Footer/TextInformationLink.js.map +1 -1
  131. package/mobile/lib/components/Header/HeaderTopMenu.js +1 -1
  132. package/mobile/lib/components/Header/HeaderTopMenu.js.map +1 -1
  133. package/mobile/lib/retail/components/CaptchaDialog/CaptchaDialog.js +1 -1
  134. package/mobile/lib/retail/components/CaptchaDialog/CaptchaDialog.js.map +1 -1
  135. package/mobile/lib/retail/components/DraftDialog/DraftDialog.js +1 -1
  136. package/mobile/lib/retail/components/DraftDialog/DraftDialog.js.map +1 -1
  137. package/mobile/lib/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js +1 -1
  138. package/mobile/lib/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
  139. package/mobile/lib/ui-kit/Calculator/CalculatorStyle.js +1 -1
  140. package/mobile/lib/ui-kit/Calculator/CalculatorStyle.js.map +1 -1
  141. package/mobile/lib/ui-kit/InputRange/InputRange.js +1 -1
  142. package/mobile/lib/ui-kit/InputRange/InputRange.js.map +1 -1
  143. package/mobile/lib/ui-kit/LinkButton/ButtonInner.js +1 -1
  144. package/mobile/lib/ui-kit/LinkButton/ButtonInner.js.map +1 -1
  145. package/mobile/lib/ui-kit/Loader/Loader.d.ts +1 -1
  146. package/mobile/lib/ui-kit/Loader/Loader.js.map +1 -1
  147. package/mobile/lib/ui-kit/ProgressBar/ProgressBar.js +1 -1
  148. package/mobile/src/components/BenefitsBlock/BenefitsBlock.tsx +1 -1
  149. package/mobile/src/components/Blocks.ts +0 -4
  150. package/mobile/src/components/CalculatorRefinancing/CalculatorRefinancing.tsx +1 -3
  151. package/mobile/src/components/CardTransfer/CardTransfer.tsx +5 -18
  152. package/mobile/src/components/CardTransfer/SubmitFailedDialog.tsx +2 -2
  153. package/mobile/src/components/Carousel/renderCarouselCards.tsx +2 -6
  154. package/mobile/src/components/Footer/HorizontalNavigation.tsx +1 -1
  155. package/mobile/src/components/Footer/TextInformationLink.tsx +1 -1
  156. package/mobile/src/components/Header/HeaderTopMenu.tsx +1 -5
  157. package/mobile/src/retail/components/CaptchaDialog/CaptchaDialog.tsx +4 -4
  158. package/mobile/src/retail/components/DraftDialog/DraftDialog.tsx +1 -1
  159. package/mobile/src/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.tsx +1 -1
  160. package/mobile/src/ui-kit/Calculator/CalculatorStyle.tsx +1 -1
  161. package/mobile/src/ui-kit/InputRange/InputRange.tsx +1 -1
  162. package/mobile/src/ui-kit/LinkButton/ButtonInner.tsx +1 -1
  163. package/mobile/src/ui-kit/Loader/Loader.tsx +1 -1
  164. package/mobile/src/ui-kit/ProgressBar/ProgressBar.tsx +1 -1
  165. package/package.json +2 -2
  166. package/src/components/BenefitsBlock/BenefitsBlock.tsx +1 -1
  167. package/src/components/Blocks.mobile.ts +0 -4
  168. package/src/components/Blocks.ts +0 -6
  169. package/src/components/CalculatorRefinancing/CalculatorRefinancing.tsx +1 -3
  170. package/src/components/CardTransfer/CardTransfer.tsx +5 -18
  171. package/src/components/CardTransfer/SubmitFailedDialog.tsx +2 -2
  172. package/src/components/Carousel/renderCarouselCards.tsx +2 -6
  173. package/src/components/Footer/HorizontalNavigation.tsx +1 -1
  174. package/src/components/Footer/TextInformationLink.tsx +1 -1
  175. package/src/components/Header/HeaderTopMenu.tsx +1 -5
  176. package/src/icons/IconName.ts +4 -4
  177. package/src/retail/components/CaptchaDialog/CaptchaDialog.tsx +4 -4
  178. package/src/retail/components/DraftDialog/DraftDialog.tsx +1 -1
  179. package/src/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.tsx +1 -1
  180. package/src/ui-kit/Calculator/CalculatorStyle.tsx +1 -1
  181. package/src/ui-kit/InputRange/InputRange.tsx +1 -1
  182. package/src/ui-kit/LinkButton/ButtonInner.tsx +1 -1
  183. package/src/ui-kit/Loader/Loader.tsx +1 -1
  184. package/src/ui-kit/ProgressBar/ProgressBar.fixture.tsx +4 -1
  185. package/src/ui-kit/ProgressBar/ProgressBar.tsx +1 -1
  186. package/bundle/components/CarouselLinks/CarouselLinkButton.d.ts +0 -4
  187. package/bundle/components/CarouselLinks/CarouselLinks.d.ts +0 -6
  188. package/bundle/components/CarouselLinks/CarouselLinksContent.d.ts +0 -15
  189. package/bundle/components/ExchangeRateTile/CurrencyProps.d.ts +0 -6
  190. package/bundle/components/ExchangeRateTile/CurrencyTable.d.ts +0 -7
  191. package/bundle/components/ExchangeRateTile/CurrentLocation.d.ts +0 -6
  192. package/bundle/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +0 -24
  193. package/bundle/components/ExchangeRateTile/ExchangeRateTile.d.ts +0 -5
  194. package/bundle/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +0 -9
  195. package/bundle/components/ExchangeRateTile/calculateResult.d.ts +0 -2
  196. package/bundle/components/ExchangeRateTile/callbackCurrencySelect.d.ts +0 -8
  197. package/bundle/components/ExchangeRateTile/formatCurrency.d.ts +0 -1
  198. package/bundle/components/ExchangeRateTile/renderInput.d.ts +0 -11
  199. package/bundle/components/ExchangeRateTile/useFetchExchangeRateData.d.ts +0 -9
  200. package/bundle/components/InsuranceAmountBlock/InsuranceAmountBlock.d.ts +0 -5
  201. package/bundle/components/InsuranceAmountBlock/InsuranceAmountBlockContent.d.ts +0 -31
  202. package/bundle/components/InsuranceAmountBlock/InsuranceAmountBlockInner.d.ts +0 -7
  203. package/bundle/ui-kit/Rating/Rating.d.ts +0 -1
  204. package/dist/components/CarouselLinks/CarouselLinkButton.d.ts +0 -4
  205. package/dist/components/CarouselLinks/CarouselLinkButton.js +0 -17
  206. package/dist/components/CarouselLinks/CarouselLinkButton.js.map +0 -1
  207. package/dist/components/CarouselLinks/CarouselLinks.d.ts +0 -6
  208. package/dist/components/CarouselLinks/CarouselLinks.js +0 -11
  209. package/dist/components/CarouselLinks/CarouselLinks.js.map +0 -1
  210. package/dist/components/CarouselLinks/CarouselLinksContent.d.ts +0 -15
  211. package/dist/components/CarouselLinks/CarouselLinksContent.js +0 -2
  212. package/dist/components/CarouselLinks/CarouselLinksContent.js.map +0 -1
  213. package/dist/components/ExchangeRateTile/CurrencyProps.d.ts +0 -6
  214. package/dist/components/ExchangeRateTile/CurrencyProps.js +0 -10
  215. package/dist/components/ExchangeRateTile/CurrencyProps.js.map +0 -1
  216. package/dist/components/ExchangeRateTile/CurrencyTable.d.ts +0 -7
  217. package/dist/components/ExchangeRateTile/CurrencyTable.js +0 -23
  218. package/dist/components/ExchangeRateTile/CurrencyTable.js.map +0 -1
  219. package/dist/components/ExchangeRateTile/CurrentLocation.d.ts +0 -6
  220. package/dist/components/ExchangeRateTile/CurrentLocation.js +0 -10
  221. package/dist/components/ExchangeRateTile/CurrentLocation.js.map +0 -1
  222. package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +0 -24
  223. package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +0 -73
  224. package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +0 -1
  225. package/dist/components/ExchangeRateTile/ExchangeRateTile.d.ts +0 -5
  226. package/dist/components/ExchangeRateTile/ExchangeRateTile.js +0 -26
  227. package/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +0 -1
  228. package/dist/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +0 -9
  229. package/dist/components/ExchangeRateTile/ExchangeRateTileContent.js +0 -2
  230. package/dist/components/ExchangeRateTile/ExchangeRateTileContent.js.map +0 -1
  231. package/dist/components/ExchangeRateTile/calculateResult.d.ts +0 -2
  232. package/dist/components/ExchangeRateTile/calculateResult.js +0 -11
  233. package/dist/components/ExchangeRateTile/calculateResult.js.map +0 -1
  234. package/dist/components/ExchangeRateTile/callbackCurrencySelect.d.ts +0 -8
  235. package/dist/components/ExchangeRateTile/callbackCurrencySelect.js +0 -21
  236. package/dist/components/ExchangeRateTile/callbackCurrencySelect.js.map +0 -1
  237. package/dist/components/ExchangeRateTile/formatCurrency.d.ts +0 -1
  238. package/dist/components/ExchangeRateTile/formatCurrency.js +0 -10
  239. package/dist/components/ExchangeRateTile/formatCurrency.js.map +0 -1
  240. package/dist/components/ExchangeRateTile/renderInput.d.ts +0 -11
  241. package/dist/components/ExchangeRateTile/renderInput.js +0 -16
  242. package/dist/components/ExchangeRateTile/renderInput.js.map +0 -1
  243. package/dist/components/ExchangeRateTile/useFetchExchangeRateData.d.ts +0 -9
  244. package/dist/components/ExchangeRateTile/useFetchExchangeRateData.js +0 -13
  245. package/dist/components/ExchangeRateTile/useFetchExchangeRateData.js.map +0 -1
  246. package/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.d.ts +0 -5
  247. package/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js +0 -33
  248. package/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +0 -1
  249. package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockContent.d.ts +0 -31
  250. package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockContent.js +0 -2
  251. package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockContent.js.map +0 -1
  252. package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.d.ts +0 -7
  253. package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +0 -58
  254. package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +0 -1
  255. package/dist/ui-kit/Rating/Rating.d.ts +0 -1
  256. package/dist/ui-kit/Rating/Rating.js +0 -21
  257. package/dist/ui-kit/Rating/Rating.js.map +0 -1
  258. package/lib/components/CarouselLinks/CarouselLinkButton.d.ts +0 -4
  259. package/lib/components/CarouselLinks/CarouselLinkButton.js +0 -15
  260. package/lib/components/CarouselLinks/CarouselLinkButton.js.map +0 -1
  261. package/lib/components/CarouselLinks/CarouselLinks.d.ts +0 -6
  262. package/lib/components/CarouselLinks/CarouselLinks.fixture.d.ts +0 -5
  263. package/lib/components/CarouselLinks/CarouselLinks.fixture.mobile.d.ts +0 -5
  264. package/lib/components/CarouselLinks/CarouselLinks.js +0 -9
  265. package/lib/components/CarouselLinks/CarouselLinks.js.map +0 -1
  266. package/lib/components/CarouselLinks/CarouselLinksContent.d.ts +0 -15
  267. package/lib/components/CarouselLinks/CarouselLinksContent.js +0 -2
  268. package/lib/components/CarouselLinks/CarouselLinksContent.js.map +0 -1
  269. package/lib/components/ExchangeRateTile/CurrencyProps.d.ts +0 -6
  270. package/lib/components/ExchangeRateTile/CurrencyProps.js +0 -8
  271. package/lib/components/ExchangeRateTile/CurrencyProps.js.map +0 -1
  272. package/lib/components/ExchangeRateTile/CurrencyTable.d.ts +0 -7
  273. package/lib/components/ExchangeRateTile/CurrencyTable.js +0 -21
  274. package/lib/components/ExchangeRateTile/CurrencyTable.js.map +0 -1
  275. package/lib/components/ExchangeRateTile/CurrentLocation.d.ts +0 -6
  276. package/lib/components/ExchangeRateTile/CurrentLocation.js +0 -8
  277. package/lib/components/ExchangeRateTile/CurrentLocation.js.map +0 -1
  278. package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +0 -24
  279. package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +0 -71
  280. package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +0 -1
  281. package/lib/components/ExchangeRateTile/ExchangeRateTile.d.ts +0 -5
  282. package/lib/components/ExchangeRateTile/ExchangeRateTile.fixture.d.ts +0 -5
  283. package/lib/components/ExchangeRateTile/ExchangeRateTile.fixture.mobile.d.ts +0 -5
  284. package/lib/components/ExchangeRateTile/ExchangeRateTile.js +0 -24
  285. package/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +0 -1
  286. package/lib/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +0 -9
  287. package/lib/components/ExchangeRateTile/ExchangeRateTileContent.js +0 -2
  288. package/lib/components/ExchangeRateTile/ExchangeRateTileContent.js.map +0 -1
  289. package/lib/components/ExchangeRateTile/calculateResult.d.ts +0 -2
  290. package/lib/components/ExchangeRateTile/calculateResult.js +0 -7
  291. package/lib/components/ExchangeRateTile/calculateResult.js.map +0 -1
  292. package/lib/components/ExchangeRateTile/callbackCurrencySelect.d.ts +0 -8
  293. package/lib/components/ExchangeRateTile/callbackCurrencySelect.js +0 -18
  294. package/lib/components/ExchangeRateTile/callbackCurrencySelect.js.map +0 -1
  295. package/lib/components/ExchangeRateTile/formatCurrency.d.ts +0 -1
  296. package/lib/components/ExchangeRateTile/formatCurrency.js +0 -7
  297. package/lib/components/ExchangeRateTile/formatCurrency.js.map +0 -1
  298. package/lib/components/ExchangeRateTile/renderInput.d.ts +0 -11
  299. package/lib/components/ExchangeRateTile/renderInput.js +0 -13
  300. package/lib/components/ExchangeRateTile/renderInput.js.map +0 -1
  301. package/lib/components/ExchangeRateTile/useFetchExchangeRateData.d.ts +0 -9
  302. package/lib/components/ExchangeRateTile/useFetchExchangeRateData.js +0 -10
  303. package/lib/components/ExchangeRateTile/useFetchExchangeRateData.js.map +0 -1
  304. package/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.d.ts +0 -5
  305. package/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.fixture.d.ts +0 -5
  306. package/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js +0 -31
  307. package/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +0 -1
  308. package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockContent.d.ts +0 -31
  309. package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockContent.js +0 -2
  310. package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockContent.js.map +0 -1
  311. package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.d.ts +0 -7
  312. package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +0 -56
  313. package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +0 -1
  314. package/lib/ui-kit/Rating/Rating.d.ts +0 -1
  315. package/lib/ui-kit/Rating/Rating.fixture.d.ts +0 -5
  316. package/lib/ui-kit/Rating/Rating.js +0 -18
  317. package/lib/ui-kit/Rating/Rating.js.map +0 -1
  318. package/mobile/bundle/components/CarouselLinks/CarouselLinkButton.d.ts +0 -4
  319. package/mobile/bundle/components/CarouselLinks/CarouselLinks.d.ts +0 -6
  320. package/mobile/bundle/components/CarouselLinks/CarouselLinksContent.d.ts +0 -15
  321. package/mobile/bundle/components/ExchangeRateTile/CurrencyProps.d.ts +0 -6
  322. package/mobile/bundle/components/ExchangeRateTile/CurrencyTable.d.ts +0 -7
  323. package/mobile/bundle/components/ExchangeRateTile/CurrentLocation.d.ts +0 -6
  324. package/mobile/bundle/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +0 -24
  325. package/mobile/bundle/components/ExchangeRateTile/ExchangeRateTile.d.ts +0 -5
  326. package/mobile/bundle/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +0 -9
  327. package/mobile/bundle/components/ExchangeRateTile/calculateResult.d.ts +0 -2
  328. package/mobile/bundle/components/ExchangeRateTile/callbackCurrencySelect.d.ts +0 -8
  329. package/mobile/bundle/components/ExchangeRateTile/formatCurrency.d.ts +0 -1
  330. package/mobile/bundle/components/ExchangeRateTile/renderInput.d.ts +0 -11
  331. package/mobile/bundle/components/ExchangeRateTile/useFetchExchangeRateData.d.ts +0 -9
  332. package/mobile/bundle/components/InsuranceAmountBlock/InsuranceAmountBlock.d.ts +0 -5
  333. package/mobile/bundle/components/InsuranceAmountBlock/InsuranceAmountBlockContent.d.ts +0 -31
  334. package/mobile/bundle/components/InsuranceAmountBlock/InsuranceAmountBlockInner.d.ts +0 -7
  335. package/mobile/bundle/ui-kit/Rating/Rating.d.ts +0 -1
  336. package/mobile/dist/components/CarouselLinks/CarouselLinkButton.d.ts +0 -4
  337. package/mobile/dist/components/CarouselLinks/CarouselLinkButton.js +0 -17
  338. package/mobile/dist/components/CarouselLinks/CarouselLinkButton.js.map +0 -1
  339. package/mobile/dist/components/CarouselLinks/CarouselLinks.d.ts +0 -6
  340. package/mobile/dist/components/CarouselLinks/CarouselLinks.js +0 -11
  341. package/mobile/dist/components/CarouselLinks/CarouselLinks.js.map +0 -1
  342. package/mobile/dist/components/CarouselLinks/CarouselLinksContent.d.ts +0 -15
  343. package/mobile/dist/components/CarouselLinks/CarouselLinksContent.js +0 -2
  344. package/mobile/dist/components/CarouselLinks/CarouselLinksContent.js.map +0 -1
  345. package/mobile/dist/components/ExchangeRateTile/CurrencyProps.d.ts +0 -6
  346. package/mobile/dist/components/ExchangeRateTile/CurrencyProps.js +0 -10
  347. package/mobile/dist/components/ExchangeRateTile/CurrencyProps.js.map +0 -1
  348. package/mobile/dist/components/ExchangeRateTile/CurrencyTable.d.ts +0 -7
  349. package/mobile/dist/components/ExchangeRateTile/CurrencyTable.js +0 -23
  350. package/mobile/dist/components/ExchangeRateTile/CurrencyTable.js.map +0 -1
  351. package/mobile/dist/components/ExchangeRateTile/CurrentLocation.d.ts +0 -6
  352. package/mobile/dist/components/ExchangeRateTile/CurrentLocation.js +0 -10
  353. package/mobile/dist/components/ExchangeRateTile/CurrentLocation.js.map +0 -1
  354. package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +0 -24
  355. package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +0 -73
  356. package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +0 -1
  357. package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.d.ts +0 -5
  358. package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js +0 -26
  359. package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +0 -1
  360. package/mobile/dist/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +0 -9
  361. package/mobile/dist/components/ExchangeRateTile/ExchangeRateTileContent.js +0 -2
  362. package/mobile/dist/components/ExchangeRateTile/ExchangeRateTileContent.js.map +0 -1
  363. package/mobile/dist/components/ExchangeRateTile/calculateResult.d.ts +0 -2
  364. package/mobile/dist/components/ExchangeRateTile/calculateResult.js +0 -11
  365. package/mobile/dist/components/ExchangeRateTile/calculateResult.js.map +0 -1
  366. package/mobile/dist/components/ExchangeRateTile/callbackCurrencySelect.d.ts +0 -8
  367. package/mobile/dist/components/ExchangeRateTile/callbackCurrencySelect.js +0 -21
  368. package/mobile/dist/components/ExchangeRateTile/callbackCurrencySelect.js.map +0 -1
  369. package/mobile/dist/components/ExchangeRateTile/formatCurrency.d.ts +0 -1
  370. package/mobile/dist/components/ExchangeRateTile/formatCurrency.js +0 -10
  371. package/mobile/dist/components/ExchangeRateTile/formatCurrency.js.map +0 -1
  372. package/mobile/dist/components/ExchangeRateTile/renderInput.d.ts +0 -11
  373. package/mobile/dist/components/ExchangeRateTile/renderInput.js +0 -16
  374. package/mobile/dist/components/ExchangeRateTile/renderInput.js.map +0 -1
  375. package/mobile/dist/components/ExchangeRateTile/useFetchExchangeRateData.d.ts +0 -9
  376. package/mobile/dist/components/ExchangeRateTile/useFetchExchangeRateData.js +0 -13
  377. package/mobile/dist/components/ExchangeRateTile/useFetchExchangeRateData.js.map +0 -1
  378. package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.d.ts +0 -5
  379. package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js +0 -33
  380. package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +0 -1
  381. package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockContent.d.ts +0 -31
  382. package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockContent.js +0 -2
  383. package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockContent.js.map +0 -1
  384. package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.d.ts +0 -7
  385. package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +0 -58
  386. package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +0 -1
  387. package/mobile/dist/ui-kit/Rating/Rating.d.ts +0 -1
  388. package/mobile/dist/ui-kit/Rating/Rating.js +0 -21
  389. package/mobile/dist/ui-kit/Rating/Rating.js.map +0 -1
  390. package/mobile/lib/components/CarouselLinks/CarouselLinkButton.d.ts +0 -4
  391. package/mobile/lib/components/CarouselLinks/CarouselLinkButton.js +0 -15
  392. package/mobile/lib/components/CarouselLinks/CarouselLinkButton.js.map +0 -1
  393. package/mobile/lib/components/CarouselLinks/CarouselLinks.d.ts +0 -6
  394. package/mobile/lib/components/CarouselLinks/CarouselLinks.js +0 -9
  395. package/mobile/lib/components/CarouselLinks/CarouselLinks.js.map +0 -1
  396. package/mobile/lib/components/CarouselLinks/CarouselLinksContent.d.ts +0 -15
  397. package/mobile/lib/components/CarouselLinks/CarouselLinksContent.js +0 -2
  398. package/mobile/lib/components/CarouselLinks/CarouselLinksContent.js.map +0 -1
  399. package/mobile/lib/components/ExchangeRateTile/CurrencyProps.d.ts +0 -6
  400. package/mobile/lib/components/ExchangeRateTile/CurrencyProps.js +0 -8
  401. package/mobile/lib/components/ExchangeRateTile/CurrencyProps.js.map +0 -1
  402. package/mobile/lib/components/ExchangeRateTile/CurrencyTable.d.ts +0 -7
  403. package/mobile/lib/components/ExchangeRateTile/CurrencyTable.js +0 -21
  404. package/mobile/lib/components/ExchangeRateTile/CurrencyTable.js.map +0 -1
  405. package/mobile/lib/components/ExchangeRateTile/CurrentLocation.d.ts +0 -6
  406. package/mobile/lib/components/ExchangeRateTile/CurrentLocation.js +0 -8
  407. package/mobile/lib/components/ExchangeRateTile/CurrentLocation.js.map +0 -1
  408. package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +0 -24
  409. package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +0 -71
  410. package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +0 -1
  411. package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.d.ts +0 -5
  412. package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js +0 -24
  413. package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +0 -1
  414. package/mobile/lib/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +0 -9
  415. package/mobile/lib/components/ExchangeRateTile/ExchangeRateTileContent.js +0 -2
  416. package/mobile/lib/components/ExchangeRateTile/ExchangeRateTileContent.js.map +0 -1
  417. package/mobile/lib/components/ExchangeRateTile/calculateResult.d.ts +0 -2
  418. package/mobile/lib/components/ExchangeRateTile/calculateResult.js +0 -7
  419. package/mobile/lib/components/ExchangeRateTile/calculateResult.js.map +0 -1
  420. package/mobile/lib/components/ExchangeRateTile/callbackCurrencySelect.d.ts +0 -8
  421. package/mobile/lib/components/ExchangeRateTile/callbackCurrencySelect.js +0 -18
  422. package/mobile/lib/components/ExchangeRateTile/callbackCurrencySelect.js.map +0 -1
  423. package/mobile/lib/components/ExchangeRateTile/formatCurrency.d.ts +0 -1
  424. package/mobile/lib/components/ExchangeRateTile/formatCurrency.js +0 -7
  425. package/mobile/lib/components/ExchangeRateTile/formatCurrency.js.map +0 -1
  426. package/mobile/lib/components/ExchangeRateTile/renderInput.d.ts +0 -11
  427. package/mobile/lib/components/ExchangeRateTile/renderInput.js +0 -13
  428. package/mobile/lib/components/ExchangeRateTile/renderInput.js.map +0 -1
  429. package/mobile/lib/components/ExchangeRateTile/useFetchExchangeRateData.d.ts +0 -9
  430. package/mobile/lib/components/ExchangeRateTile/useFetchExchangeRateData.js +0 -10
  431. package/mobile/lib/components/ExchangeRateTile/useFetchExchangeRateData.js.map +0 -1
  432. package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.d.ts +0 -5
  433. package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js +0 -31
  434. package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +0 -1
  435. package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockContent.d.ts +0 -31
  436. package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockContent.js +0 -2
  437. package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockContent.js.map +0 -1
  438. package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.d.ts +0 -7
  439. package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +0 -56
  440. package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +0 -1
  441. package/mobile/lib/ui-kit/Rating/Rating.d.ts +0 -1
  442. package/mobile/lib/ui-kit/Rating/Rating.js +0 -18
  443. package/mobile/lib/ui-kit/Rating/Rating.js.map +0 -1
  444. package/mobile/src/components/CarouselLinks/CarouselLinkButton.tsx +0 -36
  445. package/mobile/src/components/CarouselLinks/CarouselLinks.example.json +0 -31
  446. package/mobile/src/components/CarouselLinks/CarouselLinks.tsx +0 -50
  447. package/mobile/src/components/CarouselLinks/CarouselLinks.ui.json +0 -16
  448. package/mobile/src/components/CarouselLinks/CarouselLinksContent.ts +0 -22
  449. package/mobile/src/components/ExchangeRateTile/CurrencyProps.ts +0 -6
  450. package/mobile/src/components/ExchangeRateTile/CurrencyTable.tsx +0 -64
  451. package/mobile/src/components/ExchangeRateTile/CurrentLocation.tsx +0 -28
  452. package/mobile/src/components/ExchangeRateTile/ExchangeCurrencyCalculator.tsx +0 -155
  453. package/mobile/src/components/ExchangeRateTile/ExchangeRateTile.example.json +0 -12
  454. package/mobile/src/components/ExchangeRateTile/ExchangeRateTile.tsx +0 -60
  455. package/mobile/src/components/ExchangeRateTile/ExchangeRateTile.ui.json +0 -8
  456. package/mobile/src/components/ExchangeRateTile/ExchangeRateTileContent.ts +0 -11
  457. package/mobile/src/components/ExchangeRateTile/calculateResult.ts +0 -9
  458. package/mobile/src/components/ExchangeRateTile/callbackCurrencySelect.ts +0 -25
  459. package/mobile/src/components/ExchangeRateTile/formatCurrency.ts +0 -8
  460. package/mobile/src/components/ExchangeRateTile/renderInput.tsx +0 -43
  461. package/mobile/src/components/ExchangeRateTile/useFetchExchangeRateData.ts +0 -25
  462. package/mobile/src/components/InsuranceAmountBlock/InsuranceAmountBlock.example.json +0 -89
  463. package/mobile/src/components/InsuranceAmountBlock/InsuranceAmountBlock.tsx +0 -82
  464. package/mobile/src/components/InsuranceAmountBlock/InsuranceAmountBlock.ui.json +0 -21
  465. package/mobile/src/components/InsuranceAmountBlock/InsuranceAmountBlockContent.ts +0 -35
  466. package/mobile/src/components/InsuranceAmountBlock/InsuranceAmountBlockInner.tsx +0 -145
  467. package/mobile/src/ui-kit/Rating/Rating.tsx +0 -39
  468. package/src/components/CarouselLinks/CarouselLinkButton.tsx +0 -36
  469. package/src/components/CarouselLinks/CarouselLinks.example.json +0 -31
  470. package/src/components/CarouselLinks/CarouselLinks.fixture.mobile.tsx +0 -83
  471. package/src/components/CarouselLinks/CarouselLinks.fixture.tsx +0 -40
  472. package/src/components/CarouselLinks/CarouselLinks.tsx +0 -50
  473. package/src/components/CarouselLinks/CarouselLinks.ui.json +0 -16
  474. package/src/components/CarouselLinks/CarouselLinksContent.ts +0 -22
  475. package/src/components/ExchangeRateTile/CurrencyProps.ts +0 -6
  476. package/src/components/ExchangeRateTile/CurrencyTable.tsx +0 -64
  477. package/src/components/ExchangeRateTile/CurrentLocation.tsx +0 -28
  478. package/src/components/ExchangeRateTile/ExchangeCurrencyCalculator.tsx +0 -155
  479. package/src/components/ExchangeRateTile/ExchangeRateTile.example.json +0 -12
  480. package/src/components/ExchangeRateTile/ExchangeRateTile.fixture.mobile.tsx +0 -19
  481. package/src/components/ExchangeRateTile/ExchangeRateTile.fixture.tsx +0 -21
  482. package/src/components/ExchangeRateTile/ExchangeRateTile.tsx +0 -60
  483. package/src/components/ExchangeRateTile/ExchangeRateTile.ui.json +0 -8
  484. package/src/components/ExchangeRateTile/ExchangeRateTileContent.ts +0 -11
  485. package/src/components/ExchangeRateTile/calculateResult.ts +0 -9
  486. package/src/components/ExchangeRateTile/callbackCurrencySelect.ts +0 -25
  487. package/src/components/ExchangeRateTile/formatCurrency.ts +0 -8
  488. package/src/components/ExchangeRateTile/renderInput.tsx +0 -43
  489. package/src/components/ExchangeRateTile/useFetchExchangeRateData.ts +0 -25
  490. package/src/components/InsuranceAmountBlock/InsuranceAmountBlock.example.json +0 -89
  491. package/src/components/InsuranceAmountBlock/InsuranceAmountBlock.fixture.tsx +0 -62
  492. package/src/components/InsuranceAmountBlock/InsuranceAmountBlock.tsx +0 -82
  493. package/src/components/InsuranceAmountBlock/InsuranceAmountBlock.ui.json +0 -21
  494. package/src/components/InsuranceAmountBlock/InsuranceAmountBlockContent.ts +0 -35
  495. package/src/components/InsuranceAmountBlock/InsuranceAmountBlockInner.tsx +0 -145
  496. package/src/ui-kit/Rating/Rating.fixture.tsx +0 -7
  497. package/src/ui-kit/Rating/Rating.tsx +0 -39
@@ -1,155 +0,0 @@
1
- import { JSX } from '@redneckz/uni-jsx';
2
- import { useCallback, useState } from '@redneckz/uni-jsx/lib/hooks';
3
- import { type ComponentType } from '../../model/ComponentType';
4
- import { LinkButton } from '../../ui-kit/LinkButton/LinkButton';
5
- import { type ButtonCommonContent } from '../../ui-kit/LinkButton/LinkButtonContent';
6
- import { calculateResult, formatValue } from './calculateResult';
7
- import { callbackCurrencySelect } from './callbackCurrencySelect';
8
- import { Currency } from './CurrencyProps';
9
- import { renderInput } from './renderInput';
10
-
11
- export interface ExchangeCurrencyItem {
12
- currency?: {
13
- id?: number;
14
- code?: string;
15
- currency?: Currency;
16
- };
17
- buyExchangeRate?: number;
18
- saleExchangeRate?: number;
19
- }
20
-
21
- export interface ExchangeCurrencyCalculatorProps extends ComponentType {
22
- currencyRatesBuy: ExchangeCurrencyItem[];
23
- currencyRatesSell: ExchangeCurrencyItem[];
24
- button?: ButtonCommonContent;
25
- }
26
-
27
- export interface CalcState {
28
- inputSell: string;
29
- inputBuy: string;
30
- selectSell: Currency;
31
- selectBuy: Currency;
32
- }
33
-
34
- export const ExchangeCurrencyCalculator = JSX<ExchangeCurrencyCalculatorProps>(
35
- ({ className = '', currencyRatesBuy, currencyRatesSell, button }) => {
36
- const [calcState, setCalcState] = useState<CalcState>({
37
- inputSell: '',
38
- inputBuy: '',
39
- selectSell: currencyRatesBuy?.[0]?.currency?.currency || Currency.RUB,
40
- selectBuy: currencyRatesSell?.[0]?.currency?.currency || Currency.USD,
41
- });
42
-
43
- const handleSetCalcState = useCallback(
44
- (newState: Partial<CalcState>) => setCalcState((oldState) => ({ ...oldState, ...newState })),
45
- [],
46
- );
47
-
48
- return (
49
- <div className={`flex flex-col gap-m pt-2xl ${className}`}>
50
- {currencyRatesBuy && currencyRatesSell ? (
51
- <div className="grid gap-m">
52
- {renderInput({
53
- placeholder: 'Хочу продать',
54
- rates: currencyRatesSell,
55
- selected: calcState.selectSell,
56
- setSelected: handleSelectSell(calcState, handleSetCalcState, currencyRatesSell),
57
- value: calcState.inputSell,
58
- onChange: (value) =>
59
- handleInputSell(handleSetCalcState, currencyRatesSell)(
60
- value,
61
- calcState.selectSell,
62
- calcState.selectBuy,
63
- ),
64
- })}
65
- {renderInput({
66
- placeholder: 'Получу',
67
- rates: currencyRatesBuy,
68
- selected: calcState.selectBuy,
69
- setSelected: handleSelectBuy(calcState, handleSetCalcState, currencyRatesBuy),
70
- value: calcState.inputBuy,
71
- onChange: (value) =>
72
- handleInputBuy(handleSetCalcState, currencyRatesBuy)(
73
- value,
74
- calcState.selectBuy,
75
- calcState.selectSell,
76
- ),
77
- })}
78
- </div>
79
- ) : null}
80
- {button?.text ? (
81
- <LinkButton text={button.text} version={button?.version} {...button} />
82
- ) : null}
83
- </div>
84
- );
85
- },
86
- );
87
-
88
- const handleSelectSell =
89
- (
90
- calcState: CalcState,
91
- setCalcState: (state: Partial<CalcState>) => void,
92
- currencyRatesSell: ExchangeCurrencyItem[],
93
- ) =>
94
- (value: Currency) => {
95
- setCalcState({ selectSell: value });
96
- callbackCurrencySelect({
97
- value,
98
- oppositeValue: calcState.selectBuy,
99
- handleConvert: (currencyFrom = calcState.selectSell, currencyTo = calcState.selectBuy) => {
100
- handleInputSell(setCalcState, currencyRatesSell)(
101
- calcState.inputSell,
102
- currencyFrom,
103
- currencyTo,
104
- );
105
- },
106
- });
107
- };
108
-
109
- const handleSelectBuy =
110
- (
111
- calcState: CalcState,
112
- setCalcState: (state: Partial<CalcState>) => void,
113
- currencyRatesBuy: ExchangeCurrencyItem[],
114
- ) =>
115
- (value: Currency) => {
116
- setCalcState({ selectBuy: value });
117
- callbackCurrencySelect({
118
- value,
119
- oppositeValue: calcState.selectSell,
120
- handleConvert: (currencyTo = calcState.selectBuy, currencyFrom = calcState.selectSell) =>
121
- handleInputBuy(setCalcState, currencyRatesBuy)(
122
- calcState.inputBuy,
123
- currencyTo,
124
- currencyFrom,
125
- ),
126
- });
127
- };
128
-
129
- const handleInputSell =
130
- (setCalcState: (state: Partial<CalcState>) => void, currencyRatesSell: ExchangeCurrencyItem[]) =>
131
- (value: string, currencyFrom: Currency, currencyTo: Currency) => {
132
- setCalcState({ inputSell: formatValue(value), selectBuy: currencyTo });
133
- const rate =
134
- currencyRatesSell.find((_) => _.currency?.currency === currencyTo)?.buyExchangeRate ||
135
- currencyRatesSell.find((_) => _.currency?.currency === currencyFrom)?.buyExchangeRate;
136
- if (rate) {
137
- setCalcState({
138
- inputBuy: String(calculateResult(value, rate, currencyFrom === Currency.RUB) || ''),
139
- });
140
- }
141
- };
142
-
143
- const handleInputBuy =
144
- (setCalcState: (state: Partial<CalcState>) => void, currencyRatesBuy: ExchangeCurrencyItem[]) =>
145
- (value: string, currencyTo: Currency, currencyFrom: Currency) => {
146
- setCalcState({ inputBuy: formatValue(value), selectSell: currencyFrom });
147
- const rate =
148
- currencyRatesBuy.find((_) => _.currency?.currency === currencyFrom)?.saleExchangeRate ||
149
- currencyRatesBuy.find((_) => _.currency?.currency === currencyTo)?.saleExchangeRate;
150
- if (rate) {
151
- setCalcState({
152
- inputSell: String(calculateResult(value, rate, currencyTo === Currency.RUB) || ''),
153
- });
154
- }
155
- };
@@ -1,12 +0,0 @@
1
- {
2
- "content": {
3
- "version": "primary",
4
- "padding": "",
5
- "button": {
6
- "href": "https://coins.rshb.ru/exchange",
7
- "text": "Купить валюту",
8
- "target": "_blank",
9
- "version": "primary"
10
- }
11
- }
12
- }
@@ -1,19 +0,0 @@
1
- import '../../setup-fixture';
2
-
3
- import { type LinkButtonProps } from '../../ui-kit/LinkButton/LinkButtonProps';
4
- import { ExchangeRateTile } from './ExchangeRateTile';
5
-
6
- const button: LinkButtonProps = {
7
- href: 'https://coins.rshb.ru/exchange',
8
- text: 'Купить валюту',
9
- target: '_blank',
10
- version: 'primary',
11
- };
12
-
13
- export default {
14
- default: (
15
- <div className="container grid grid-cols-12">
16
- <ExchangeRateTile button={button} className="col-span-12" />
17
- </div>
18
- ),
19
- };
@@ -1,21 +0,0 @@
1
- import '../../setup-fixture';
2
-
3
- import { type LinkButtonProps } from '../../ui-kit/LinkButton/LinkButtonProps';
4
- import { PopupManager } from '../../ui-kit/PopupManager/PopupManager';
5
- import { ExchangeRateTile } from './ExchangeRateTile';
6
-
7
- const button: LinkButtonProps = {
8
- href: 'https://coins.rshb.ru/exchange',
9
- text: 'Купить валюту',
10
- target: '_blank',
11
- version: 'primary',
12
- };
13
-
14
- export default {
15
- default: (
16
- <div className="container grid grid-cols-12">
17
- <ExchangeRateTile button={button} className="col-span-8" />
18
- <PopupManager />
19
- </div>
20
- ),
21
- };
@@ -1,60 +0,0 @@
1
- import { JSX } from '@redneckz/uni-jsx';
2
- import { useLocation } from '../../hooks/useLocation';
3
- import { BaseTile } from '../../ui-kit/BaseTile/BaseTile';
4
- import { BlockWrapper } from '../../ui-kit/BlockWrapper';
5
- import { Heading } from '../../ui-kit/Heading/Heading';
6
- import { type UniBlockProps } from '../../UniBlock/UniBlockProps';
7
- import { style } from '../../utils/style';
8
- import { Currency } from './CurrencyProps';
9
- import { CurrencyTable } from './CurrencyTable';
10
- import { CurrentLocation } from './CurrentLocation';
11
- import {
12
- ExchangeCurrencyCalculator,
13
- type ExchangeCurrencyItem,
14
- } from './ExchangeCurrencyCalculator';
15
- import { type ExchangeRateTileContent } from './ExchangeRateTileContent';
16
- import { useFetchExchangeRateData } from './useFetchExchangeRateData';
17
-
18
- export interface ExchangeRateTileProps extends ExchangeRateTileContent, UniBlockProps {}
19
-
20
- export const ExchangeRateTile = JSX<ExchangeRateTileProps>(
21
- ({ className = '', title = 'Курсы обмена валют', button, ...rest }) => {
22
- const currentLocation = useLocation();
23
- const exchangeRates = useFetchExchangeRateData(currentLocation);
24
-
25
- const currencyRates = getCurrencyRates(exchangeRates?.exchangeRate?.currencies);
26
-
27
- const currencyRatesBuy = currencyRates.filter((_) => _.buyExchangeRate);
28
- currencyRatesBuy.unshift({ currency: { currency: Currency.RUB } });
29
-
30
- const currencyRatesSell = currencyRates.filter((_) => _.saleExchangeRate);
31
- currencyRatesSell.push({ currency: { currency: Currency.RUB } });
32
-
33
- return (
34
- <BlockWrapper className={style('box-border min-h-80', className)} {...rest}>
35
- <BaseTile
36
- className="h-full"
37
- title={<Heading headingType="h4" title={title} className="whitespace-pre-wrap" />}
38
- >
39
- <div className="flex w-full gap-6xl flex-wrap @lg:flex-nowrap">
40
- <div className="w-full @2xl:w-auto @5xl:w-1/2">
41
- {currencyRates ? (
42
- <CurrencyTable className="mb-xl" exchangeCurrencyItems={currencyRates} />
43
- ) : null}
44
- <CurrentLocation address={exchangeRates?.address} />
45
- </div>
46
- <ExchangeCurrencyCalculator
47
- className="grow w-1/2"
48
- currencyRatesBuy={currencyRatesBuy}
49
- currencyRatesSell={currencyRatesSell}
50
- button={button}
51
- />
52
- </div>
53
- </BaseTile>
54
- </BlockWrapper>
55
- );
56
- },
57
- );
58
-
59
- const getCurrencyRates = (currencies?: ExchangeCurrencyItem[]) =>
60
- currencies?.filter((_) => [1, 2, 3].includes(_?.currency?.id as number)) || [];
@@ -1,8 +0,0 @@
1
- {
2
- "content": {},
3
- "style": {
4
- "ui:options": {
5
- "minCols": 6
6
- }
7
- }
8
- }
@@ -1,11 +0,0 @@
1
- import { type TitleProps } from '../../model/HeadlineType';
2
- import { type LinkButtonContent } from '../../ui-kit/LinkButton/LinkButtonContent';
3
- import { type UniBlockContent } from '../../UniBlock/UniBlockProps';
4
-
5
- /**
6
- * @title Курсы обмена валют
7
- */
8
- export type ExchangeRateTileContent = UniBlockContent &
9
- TitleProps & {
10
- button?: LinkButtonContent;
11
- };
@@ -1,9 +0,0 @@
1
- import { roundTo } from '../../utils/roundTo';
2
-
3
- export const calculateResult = (value: string, rate: number, precision: boolean) => {
4
- const result = Number(formatValue(value)) * Math.pow(rate, precision ? -1 : 1);
5
-
6
- return Number.isInteger(result) ? result : roundTo(result);
7
- };
8
-
9
- export const formatValue = (value: string) => value.replace(/[^\d.,]/g, '').replace(',', '.');
@@ -1,25 +0,0 @@
1
- import { tableFunc } from '../../utils/tableFunc';
2
- import { Currency } from './CurrencyProps';
3
-
4
- interface TableFuncProps {
5
- value: Currency;
6
- oppositeValue: Currency;
7
- handleConvert: (currencyFrom?: Currency, currencyTo?: Currency) => void;
8
- }
9
-
10
- export const callbackCurrencySelect = (props: TableFuncProps) =>
11
- tableFunc<TableFuncProps, () => void>([
12
- [
13
- (_) => _.value !== Currency.RUB && _.oppositeValue !== Currency.RUB,
14
- () => props.handleConvert(props.value, Currency.RUB),
15
- ],
16
- [
17
- (_) => _.value === Currency.RUB && _.oppositeValue === Currency.RUB,
18
- () => props.handleConvert(props.value, Currency.USD),
19
- ],
20
- [
21
- (_) => _.value === Currency.RUB && _.oppositeValue === Currency.RUB,
22
- () => props.handleConvert(props.value, Currency.CNY),
23
- ],
24
- [() => true, () => props.handleConvert(props.value)],
25
- ])(props)?.();
@@ -1,8 +0,0 @@
1
- import { Currency } from './CurrencyProps';
2
-
3
- const currencyNumberFormat = new Intl.NumberFormat('ru', {
4
- style: 'currency',
5
- currency: Currency.RUB,
6
- });
7
-
8
- export const formatCurrency = (value?: number) => (value ? currencyNumberFormat.format(value) : '');
@@ -1,43 +0,0 @@
1
- import { type ControlProps } from '../../model/ControlProps';
2
- import { type PlaceholderProps } from '../../model/PlaceholderProps';
3
- import { Input } from '../../ui-kit/Input/Input';
4
- import { type Option } from '../../ui-kit/Select/Option';
5
- import { Select } from '../../ui-kit/Select/Select';
6
- import { type Currency } from './CurrencyProps';
7
- import { type ExchangeCurrencyItem } from './ExchangeCurrencyCalculator';
8
-
9
- interface InputProps extends PlaceholderProps, ControlProps<string> {
10
- rates: ExchangeCurrencyItem[];
11
- selected: string;
12
- setSelected: (value: Currency) => void;
13
- }
14
-
15
- export function renderInput(props: InputProps) {
16
- const { placeholder, rates, selected, value, onChange, setSelected } = props;
17
- const ratesOptions: Option[] = rates.map((_) => ({
18
- key: _?.currency?.currency ?? '',
19
- text: _?.currency?.currency ?? '',
20
- }));
21
- const selectedValue: Option = { key: selected, text: selected };
22
-
23
- return (
24
- <div className="relative flex">
25
- <Input
26
- className="shrink-0 text-l w-full appearance-none -mr-20"
27
- placeholder={placeholder}
28
- type="text"
29
- value={value}
30
- onChange={onChange}
31
- />
32
- {ratesOptions.length ? (
33
- <Select
34
- className="absolute right-0"
35
- isBorder={false}
36
- onChange={(_) => setSelected(_.key as Currency)}
37
- options={ratesOptions}
38
- value={selectedValue}
39
- />
40
- ) : null}
41
- </div>
42
- );
43
- }
@@ -1,25 +0,0 @@
1
- import { useAsyncData } from '@redneckz/uni-jsx/lib/hooks/useAsyncData';
2
- import { API_BASE_URI } from '../../api/apiBaseUrl';
3
- import { type ExchangeCurrencyItem } from '../../components/ExchangeRateTile/ExchangeCurrencyCalculator';
4
- import { type Region } from '../../hooks/useRegions';
5
- import { fetchJSONUnsafe, type FetchJSONUnsafeType } from '../../utils/fetchJSON';
6
-
7
- export interface ExchangeData {
8
- exchangeRate?: {
9
- currencies?: ExchangeCurrencyItem[];
10
- };
11
- address?: string;
12
- }
13
-
14
- const EXCHANGE_RATES_URL = `${API_BASE_URI}/exchangerates`;
15
-
16
- export function useFetchExchangeRateData(currentRegion: Region) {
17
- const regionCode = currentRegion?.code || '000';
18
-
19
- const { data } = useAsyncData(
20
- EXCHANGE_RATES_URL + `?regionCode=${regionCode}`,
21
- fetchJSONUnsafe as FetchJSONUnsafeType<ExchangeData>,
22
- );
23
-
24
- return data || {};
25
- }
@@ -1,89 +0,0 @@
1
- {
2
- "content": {
3
- "version": "primary",
4
- "padding": "",
5
- "title": "Заголовок",
6
- "insuranceTabs": [
7
- {
8
- "title": "Описание 1",
9
- "cards": [
10
- {
11
- "sum": 200000,
12
- "fee": 2100,
13
- "icon": {
14
- "format": "webp",
15
- "size": {
16
- "width": 70,
17
- "height": 70
18
- },
19
- "icon": "ActualBalanceIcon"
20
- },
21
- "href": ""
22
- },
23
- {
24
- "sum": 200000,
25
- "fee": 2100,
26
- "icon": {
27
- "format": "webp",
28
- "size": {
29
- "width": 70,
30
- "height": 70
31
- },
32
- "icon": "ActualBalanceIcon"
33
- },
34
- "href": ""
35
- }
36
- ]
37
- },
38
- {
39
- "title": "Описание 2",
40
- "cards": [
41
- {
42
- "sum": 200000,
43
- "fee": 2100,
44
- "icon": {
45
- "format": "webp",
46
- "size": {
47
- "width": 70,
48
- "height": 70
49
- },
50
- "icon": "ActualBalanceIcon"
51
- },
52
- "href": ""
53
- },
54
- {
55
- "sum": 200000,
56
- "fee": 2100,
57
- "icon": {
58
- "format": "webp",
59
- "size": {
60
- "width": 70,
61
- "height": 70
62
- },
63
- "icon": "ActualBalanceIcon"
64
- },
65
- "href": ""
66
- },
67
- {
68
- "sum": 200000,
69
- "fee": 2100,
70
- "icon": {
71
- "format": "webp",
72
- "size": {
73
- "width": 70,
74
- "height": 70
75
- },
76
- "icon": "ActualBalanceIcon"
77
- }
78
- }
79
- ]
80
- }
81
- ],
82
- "button": {
83
- "href": "",
84
- "text": "Выбрать программу",
85
- "target": "_self",
86
- "version": "primary"
87
- }
88
- }
89
- }
@@ -1,62 +0,0 @@
1
- import '../../setup-fixture';
2
-
3
- import { type LinkButtonContent } from '../../ui-kit/LinkButton/LinkButtonContent';
4
- import { InsuranceAmountBlock } from './InsuranceAmountBlock';
5
-
6
- const buttonPrimary: LinkButtonContent = {
7
- href: '/insurance',
8
- text: 'Выбрать программу',
9
- target: '_blank',
10
- version: 'primary',
11
- };
12
-
13
- export default {
14
- default: (
15
- <div className="container grid grid-cols-12">
16
- <InsuranceAmountBlock
17
- className="col-span-12"
18
- title="Выбор страховой суммы"
19
- button={buttonPrimary}
20
- insuranceTabs={[
21
- {
22
- title: 'Индивидуальный',
23
- cards: [
24
- {
25
- sum: 200000,
26
- fee: 2100,
27
- icon: {
28
- icon: 'ActualBalanceIcon',
29
- iconVersion: 'normal',
30
- },
31
- href: '/insurance1',
32
- },
33
- {
34
- sum: 200000,
35
- fee: 2100,
36
- icon: { icon: 'ActualBalanceIcon', iconVersion: 'normal' },
37
- href: '/insurance2',
38
- },
39
- {
40
- sum: 200000,
41
- fee: 2100,
42
- icon: { icon: 'ActualBalanceIcon', iconVersion: 'normal' },
43
- href: '/insurance3',
44
- },
45
- ],
46
- },
47
- {
48
- title: 'Семейный',
49
- cards: [
50
- {
51
- sum: 400000,
52
- fee: 3600,
53
- icon: { icon: 'ActualBalanceIcon', iconVersion: 'normal' },
54
- href: '/insurance4',
55
- },
56
- ],
57
- },
58
- ]}
59
- />
60
- </div>
61
- ),
62
- };
@@ -1,82 +0,0 @@
1
- import { JSX } from '@redneckz/uni-jsx';
2
- import { useCallback, useState } from '@redneckz/uni-jsx/lib/hooks';
3
- import { BlockWrapper } from '../../ui-kit/BlockWrapper';
4
- import { Heading } from '../../ui-kit/Heading/Heading';
5
- import { type UniBlockProps } from '../../UniBlock/UniBlockProps';
6
- import { style } from '../../utils/style';
7
- import { type InsuranceAmountBlockContent } from './InsuranceAmountBlockContent';
8
- import { InsuranceAmountBlockInner } from './InsuranceAmountBlockInner';
9
-
10
- interface NavButtonProps {
11
- title?: string;
12
- i: number;
13
- isActive: boolean;
14
- onClick: () => void;
15
- }
16
-
17
- export interface InsuranceAmountBlockProps extends InsuranceAmountBlockContent, UniBlockProps {}
18
-
19
- export const InsuranceAmountBlock = JSX<InsuranceAmountBlockProps>(
20
- ({ className = '', title, insuranceTabs = [], button, ...rest }) => {
21
- const [activeSlideIndex, setActiveSlideIndex] = useState(0);
22
- const handleActiveSlideIndex = useCallback((_: number) => setActiveSlideIndex(_), []);
23
-
24
- return (
25
- <BlockWrapper
26
- className={style('box-border overflow-hidden relative px-0 space-y-2xl', className)}
27
- defaultPadding="p-6xl"
28
- {...rest}
29
- >
30
- {title ? <Heading className="text-center" title={title} headingType="h3" /> : null}
31
- {insuranceTabs?.length > 1 ? (
32
- <div className="p-xs bg-secondary-light w-fit mx-auto rounded-md">
33
- {insuranceTabs.map((item, i) =>
34
- renderNavButton({
35
- title: item?.title,
36
- i,
37
- isActive: Boolean(i === activeSlideIndex),
38
- onClick: () => handleActiveSlideIndex(i),
39
- }),
40
- )}
41
- </div>
42
- ) : null}
43
- <div
44
- className="flex"
45
- style={{ transform: `translateX(-${activeSlideIndex}00%)` }}
46
- role="list"
47
- >
48
- {renderInsuranceGalleries({
49
- insuranceTabs,
50
- button,
51
- })}
52
- </div>
53
- </BlockWrapper>
54
- );
55
- },
56
- );
57
-
58
- const renderInsuranceGalleries = ({ insuranceTabs, button }: InsuranceAmountBlockContent) => {
59
- const insuranceGalleries = insuranceTabs?.map((_) => _.cards);
60
-
61
- return insuranceGalleries?.length
62
- ? insuranceGalleries.map((cards, i) => (
63
- <InsuranceAmountBlockInner key={String(i)} button={button} cards={cards} />
64
- ))
65
- : null;
66
- };
67
-
68
- function renderNavButton({ title, i, isActive, onClick }: NavButtonProps) {
69
- const btnClassName = isActive ? 'bg-primary-main text-white rounded-md' : `text-secondary-text`;
70
-
71
- return (
72
- <button
73
- type="button"
74
- key={String(i)}
75
- onClick={onClick}
76
- aria-label={`Кнопка ${title}`}
77
- className={`box-border px-m py-s text-m font-light ${btnClassName}`}
78
- >
79
- {title}
80
- </button>
81
- );
82
- }
@@ -1,21 +0,0 @@
1
- {
2
- "content": {
3
- "insuranceTabs": {
4
- "items": {
5
- "cards": {
6
- "items": {
7
- "fee": {
8
- "ui:field": "number"
9
- },
10
- "sum": {
11
- "ui:field": "number"
12
- },
13
- "icon": {
14
- "ui:field": "icon"
15
- }
16
- }
17
- }
18
- }
19
- }
20
- }
21
- }