@redneckz/wildless-cms-uni-blocks 0.14.840 → 0.14.841
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.
- package/bin/migration-scripts/0.14.832.js +1 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +47 -325
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/components/Blocks.js +0 -6
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/Blocks.mobile.js +0 -4
- package/dist/components/Blocks.mobile.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/Blocks.js +0 -6
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/Blocks.mobile.js +0 -4
- package/lib/components/Blocks.mobile.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +20 -226
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/components/Blocks.js +0 -4
- package/mobile/dist/components/Blocks.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/Blocks.js +0 -4
- package/mobile/lib/components/Blocks.js.map +1 -1
- package/mobile/src/components/Blocks.ts +0 -4
- package/package.json +2 -2
- package/src/components/Blocks.mobile.ts +0 -4
- package/src/components/Blocks.ts +0 -6
- package/bundle/components/CarouselLinks/CarouselLinkButton.d.ts +0 -4
- package/bundle/components/CarouselLinks/CarouselLinks.d.ts +0 -6
- package/bundle/components/CarouselLinks/CarouselLinksContent.d.ts +0 -15
- package/bundle/components/ExchangeRateTile/CurrencyProps.d.ts +0 -6
- package/bundle/components/ExchangeRateTile/CurrencyTable.d.ts +0 -7
- package/bundle/components/ExchangeRateTile/CurrentLocation.d.ts +0 -6
- package/bundle/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +0 -24
- package/bundle/components/ExchangeRateTile/ExchangeRateTile.d.ts +0 -5
- package/bundle/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +0 -9
- package/bundle/components/ExchangeRateTile/calculateResult.d.ts +0 -2
- package/bundle/components/ExchangeRateTile/callbackCurrencySelect.d.ts +0 -8
- package/bundle/components/ExchangeRateTile/formatCurrency.d.ts +0 -1
- package/bundle/components/ExchangeRateTile/renderInput.d.ts +0 -11
- package/bundle/components/ExchangeRateTile/useFetchExchangeRateData.d.ts +0 -9
- package/bundle/components/InsuranceAmountBlock/InsuranceAmountBlock.d.ts +0 -5
- package/bundle/components/InsuranceAmountBlock/InsuranceAmountBlockContent.d.ts +0 -31
- package/bundle/components/InsuranceAmountBlock/InsuranceAmountBlockInner.d.ts +0 -7
- package/bundle/ui-kit/Rating/Rating.d.ts +0 -1
- package/dist/components/CarouselLinks/CarouselLinkButton.d.ts +0 -4
- package/dist/components/CarouselLinks/CarouselLinkButton.js +0 -17
- package/dist/components/CarouselLinks/CarouselLinkButton.js.map +0 -1
- package/dist/components/CarouselLinks/CarouselLinks.d.ts +0 -6
- package/dist/components/CarouselLinks/CarouselLinks.js +0 -11
- package/dist/components/CarouselLinks/CarouselLinks.js.map +0 -1
- package/dist/components/CarouselLinks/CarouselLinksContent.d.ts +0 -15
- package/dist/components/CarouselLinks/CarouselLinksContent.js +0 -2
- package/dist/components/CarouselLinks/CarouselLinksContent.js.map +0 -1
- package/dist/components/ExchangeRateTile/CurrencyProps.d.ts +0 -6
- package/dist/components/ExchangeRateTile/CurrencyProps.js +0 -10
- package/dist/components/ExchangeRateTile/CurrencyProps.js.map +0 -1
- package/dist/components/ExchangeRateTile/CurrencyTable.d.ts +0 -7
- package/dist/components/ExchangeRateTile/CurrencyTable.js +0 -23
- package/dist/components/ExchangeRateTile/CurrencyTable.js.map +0 -1
- package/dist/components/ExchangeRateTile/CurrentLocation.d.ts +0 -6
- package/dist/components/ExchangeRateTile/CurrentLocation.js +0 -10
- package/dist/components/ExchangeRateTile/CurrentLocation.js.map +0 -1
- package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +0 -24
- package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +0 -73
- package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +0 -1
- package/dist/components/ExchangeRateTile/ExchangeRateTile.d.ts +0 -5
- package/dist/components/ExchangeRateTile/ExchangeRateTile.js +0 -26
- package/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +0 -1
- package/dist/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +0 -9
- package/dist/components/ExchangeRateTile/ExchangeRateTileContent.js +0 -2
- package/dist/components/ExchangeRateTile/ExchangeRateTileContent.js.map +0 -1
- package/dist/components/ExchangeRateTile/calculateResult.d.ts +0 -2
- package/dist/components/ExchangeRateTile/calculateResult.js +0 -11
- package/dist/components/ExchangeRateTile/calculateResult.js.map +0 -1
- package/dist/components/ExchangeRateTile/callbackCurrencySelect.d.ts +0 -8
- package/dist/components/ExchangeRateTile/callbackCurrencySelect.js +0 -21
- package/dist/components/ExchangeRateTile/callbackCurrencySelect.js.map +0 -1
- package/dist/components/ExchangeRateTile/formatCurrency.d.ts +0 -1
- package/dist/components/ExchangeRateTile/formatCurrency.js +0 -10
- package/dist/components/ExchangeRateTile/formatCurrency.js.map +0 -1
- package/dist/components/ExchangeRateTile/renderInput.d.ts +0 -11
- package/dist/components/ExchangeRateTile/renderInput.js +0 -16
- package/dist/components/ExchangeRateTile/renderInput.js.map +0 -1
- package/dist/components/ExchangeRateTile/useFetchExchangeRateData.d.ts +0 -9
- package/dist/components/ExchangeRateTile/useFetchExchangeRateData.js +0 -13
- package/dist/components/ExchangeRateTile/useFetchExchangeRateData.js.map +0 -1
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.d.ts +0 -5
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js +0 -33
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +0 -1
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockContent.d.ts +0 -31
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockContent.js +0 -2
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockContent.js.map +0 -1
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.d.ts +0 -7
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +0 -58
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +0 -1
- package/dist/ui-kit/Rating/Rating.d.ts +0 -1
- package/dist/ui-kit/Rating/Rating.js +0 -21
- package/dist/ui-kit/Rating/Rating.js.map +0 -1
- package/lib/components/CarouselLinks/CarouselLinkButton.d.ts +0 -4
- package/lib/components/CarouselLinks/CarouselLinkButton.js +0 -15
- package/lib/components/CarouselLinks/CarouselLinkButton.js.map +0 -1
- package/lib/components/CarouselLinks/CarouselLinks.d.ts +0 -6
- package/lib/components/CarouselLinks/CarouselLinks.fixture.d.ts +0 -5
- package/lib/components/CarouselLinks/CarouselLinks.fixture.mobile.d.ts +0 -5
- package/lib/components/CarouselLinks/CarouselLinks.js +0 -9
- package/lib/components/CarouselLinks/CarouselLinks.js.map +0 -1
- package/lib/components/CarouselLinks/CarouselLinksContent.d.ts +0 -15
- package/lib/components/CarouselLinks/CarouselLinksContent.js +0 -2
- package/lib/components/CarouselLinks/CarouselLinksContent.js.map +0 -1
- package/lib/components/ExchangeRateTile/CurrencyProps.d.ts +0 -6
- package/lib/components/ExchangeRateTile/CurrencyProps.js +0 -8
- package/lib/components/ExchangeRateTile/CurrencyProps.js.map +0 -1
- package/lib/components/ExchangeRateTile/CurrencyTable.d.ts +0 -7
- package/lib/components/ExchangeRateTile/CurrencyTable.js +0 -21
- package/lib/components/ExchangeRateTile/CurrencyTable.js.map +0 -1
- package/lib/components/ExchangeRateTile/CurrentLocation.d.ts +0 -6
- package/lib/components/ExchangeRateTile/CurrentLocation.js +0 -8
- package/lib/components/ExchangeRateTile/CurrentLocation.js.map +0 -1
- package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +0 -24
- package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +0 -71
- package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +0 -1
- package/lib/components/ExchangeRateTile/ExchangeRateTile.d.ts +0 -5
- package/lib/components/ExchangeRateTile/ExchangeRateTile.fixture.d.ts +0 -5
- package/lib/components/ExchangeRateTile/ExchangeRateTile.fixture.mobile.d.ts +0 -5
- package/lib/components/ExchangeRateTile/ExchangeRateTile.js +0 -24
- package/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +0 -1
- package/lib/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +0 -9
- package/lib/components/ExchangeRateTile/ExchangeRateTileContent.js +0 -2
- package/lib/components/ExchangeRateTile/ExchangeRateTileContent.js.map +0 -1
- package/lib/components/ExchangeRateTile/calculateResult.d.ts +0 -2
- package/lib/components/ExchangeRateTile/calculateResult.js +0 -7
- package/lib/components/ExchangeRateTile/calculateResult.js.map +0 -1
- package/lib/components/ExchangeRateTile/callbackCurrencySelect.d.ts +0 -8
- package/lib/components/ExchangeRateTile/callbackCurrencySelect.js +0 -18
- package/lib/components/ExchangeRateTile/callbackCurrencySelect.js.map +0 -1
- package/lib/components/ExchangeRateTile/formatCurrency.d.ts +0 -1
- package/lib/components/ExchangeRateTile/formatCurrency.js +0 -7
- package/lib/components/ExchangeRateTile/formatCurrency.js.map +0 -1
- package/lib/components/ExchangeRateTile/renderInput.d.ts +0 -11
- package/lib/components/ExchangeRateTile/renderInput.js +0 -13
- package/lib/components/ExchangeRateTile/renderInput.js.map +0 -1
- package/lib/components/ExchangeRateTile/useFetchExchangeRateData.d.ts +0 -9
- package/lib/components/ExchangeRateTile/useFetchExchangeRateData.js +0 -10
- package/lib/components/ExchangeRateTile/useFetchExchangeRateData.js.map +0 -1
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.d.ts +0 -5
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.fixture.d.ts +0 -5
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js +0 -31
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +0 -1
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockContent.d.ts +0 -31
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockContent.js +0 -2
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockContent.js.map +0 -1
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.d.ts +0 -7
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +0 -56
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +0 -1
- package/lib/ui-kit/Rating/Rating.d.ts +0 -1
- package/lib/ui-kit/Rating/Rating.fixture.d.ts +0 -5
- package/lib/ui-kit/Rating/Rating.js +0 -18
- package/lib/ui-kit/Rating/Rating.js.map +0 -1
- package/mobile/bundle/components/CarouselLinks/CarouselLinkButton.d.ts +0 -4
- package/mobile/bundle/components/CarouselLinks/CarouselLinks.d.ts +0 -6
- package/mobile/bundle/components/CarouselLinks/CarouselLinksContent.d.ts +0 -15
- package/mobile/bundle/components/ExchangeRateTile/CurrencyProps.d.ts +0 -6
- package/mobile/bundle/components/ExchangeRateTile/CurrencyTable.d.ts +0 -7
- package/mobile/bundle/components/ExchangeRateTile/CurrentLocation.d.ts +0 -6
- package/mobile/bundle/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +0 -24
- package/mobile/bundle/components/ExchangeRateTile/ExchangeRateTile.d.ts +0 -5
- package/mobile/bundle/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +0 -9
- package/mobile/bundle/components/ExchangeRateTile/calculateResult.d.ts +0 -2
- package/mobile/bundle/components/ExchangeRateTile/callbackCurrencySelect.d.ts +0 -8
- package/mobile/bundle/components/ExchangeRateTile/formatCurrency.d.ts +0 -1
- package/mobile/bundle/components/ExchangeRateTile/renderInput.d.ts +0 -11
- package/mobile/bundle/components/ExchangeRateTile/useFetchExchangeRateData.d.ts +0 -9
- package/mobile/bundle/components/InsuranceAmountBlock/InsuranceAmountBlock.d.ts +0 -5
- package/mobile/bundle/components/InsuranceAmountBlock/InsuranceAmountBlockContent.d.ts +0 -31
- package/mobile/bundle/components/InsuranceAmountBlock/InsuranceAmountBlockInner.d.ts +0 -7
- package/mobile/bundle/ui-kit/Rating/Rating.d.ts +0 -1
- package/mobile/dist/components/CarouselLinks/CarouselLinkButton.d.ts +0 -4
- package/mobile/dist/components/CarouselLinks/CarouselLinkButton.js +0 -17
- package/mobile/dist/components/CarouselLinks/CarouselLinkButton.js.map +0 -1
- package/mobile/dist/components/CarouselLinks/CarouselLinks.d.ts +0 -6
- package/mobile/dist/components/CarouselLinks/CarouselLinks.js +0 -11
- package/mobile/dist/components/CarouselLinks/CarouselLinks.js.map +0 -1
- package/mobile/dist/components/CarouselLinks/CarouselLinksContent.d.ts +0 -15
- package/mobile/dist/components/CarouselLinks/CarouselLinksContent.js +0 -2
- package/mobile/dist/components/CarouselLinks/CarouselLinksContent.js.map +0 -1
- package/mobile/dist/components/ExchangeRateTile/CurrencyProps.d.ts +0 -6
- package/mobile/dist/components/ExchangeRateTile/CurrencyProps.js +0 -10
- package/mobile/dist/components/ExchangeRateTile/CurrencyProps.js.map +0 -1
- package/mobile/dist/components/ExchangeRateTile/CurrencyTable.d.ts +0 -7
- package/mobile/dist/components/ExchangeRateTile/CurrencyTable.js +0 -23
- package/mobile/dist/components/ExchangeRateTile/CurrencyTable.js.map +0 -1
- package/mobile/dist/components/ExchangeRateTile/CurrentLocation.d.ts +0 -6
- package/mobile/dist/components/ExchangeRateTile/CurrentLocation.js +0 -10
- package/mobile/dist/components/ExchangeRateTile/CurrentLocation.js.map +0 -1
- package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +0 -24
- package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +0 -73
- package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +0 -1
- package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.d.ts +0 -5
- package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js +0 -26
- package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +0 -1
- package/mobile/dist/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +0 -9
- package/mobile/dist/components/ExchangeRateTile/ExchangeRateTileContent.js +0 -2
- package/mobile/dist/components/ExchangeRateTile/ExchangeRateTileContent.js.map +0 -1
- package/mobile/dist/components/ExchangeRateTile/calculateResult.d.ts +0 -2
- package/mobile/dist/components/ExchangeRateTile/calculateResult.js +0 -11
- package/mobile/dist/components/ExchangeRateTile/calculateResult.js.map +0 -1
- package/mobile/dist/components/ExchangeRateTile/callbackCurrencySelect.d.ts +0 -8
- package/mobile/dist/components/ExchangeRateTile/callbackCurrencySelect.js +0 -21
- package/mobile/dist/components/ExchangeRateTile/callbackCurrencySelect.js.map +0 -1
- package/mobile/dist/components/ExchangeRateTile/formatCurrency.d.ts +0 -1
- package/mobile/dist/components/ExchangeRateTile/formatCurrency.js +0 -10
- package/mobile/dist/components/ExchangeRateTile/formatCurrency.js.map +0 -1
- package/mobile/dist/components/ExchangeRateTile/renderInput.d.ts +0 -11
- package/mobile/dist/components/ExchangeRateTile/renderInput.js +0 -16
- package/mobile/dist/components/ExchangeRateTile/renderInput.js.map +0 -1
- package/mobile/dist/components/ExchangeRateTile/useFetchExchangeRateData.d.ts +0 -9
- package/mobile/dist/components/ExchangeRateTile/useFetchExchangeRateData.js +0 -13
- package/mobile/dist/components/ExchangeRateTile/useFetchExchangeRateData.js.map +0 -1
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.d.ts +0 -5
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js +0 -33
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +0 -1
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockContent.d.ts +0 -31
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockContent.js +0 -2
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockContent.js.map +0 -1
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.d.ts +0 -7
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +0 -58
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +0 -1
- package/mobile/dist/ui-kit/Rating/Rating.d.ts +0 -1
- package/mobile/dist/ui-kit/Rating/Rating.js +0 -21
- package/mobile/dist/ui-kit/Rating/Rating.js.map +0 -1
- package/mobile/lib/components/CarouselLinks/CarouselLinkButton.d.ts +0 -4
- package/mobile/lib/components/CarouselLinks/CarouselLinkButton.js +0 -15
- package/mobile/lib/components/CarouselLinks/CarouselLinkButton.js.map +0 -1
- package/mobile/lib/components/CarouselLinks/CarouselLinks.d.ts +0 -6
- package/mobile/lib/components/CarouselLinks/CarouselLinks.js +0 -9
- package/mobile/lib/components/CarouselLinks/CarouselLinks.js.map +0 -1
- package/mobile/lib/components/CarouselLinks/CarouselLinksContent.d.ts +0 -15
- package/mobile/lib/components/CarouselLinks/CarouselLinksContent.js +0 -2
- package/mobile/lib/components/CarouselLinks/CarouselLinksContent.js.map +0 -1
- package/mobile/lib/components/ExchangeRateTile/CurrencyProps.d.ts +0 -6
- package/mobile/lib/components/ExchangeRateTile/CurrencyProps.js +0 -8
- package/mobile/lib/components/ExchangeRateTile/CurrencyProps.js.map +0 -1
- package/mobile/lib/components/ExchangeRateTile/CurrencyTable.d.ts +0 -7
- package/mobile/lib/components/ExchangeRateTile/CurrencyTable.js +0 -21
- package/mobile/lib/components/ExchangeRateTile/CurrencyTable.js.map +0 -1
- package/mobile/lib/components/ExchangeRateTile/CurrentLocation.d.ts +0 -6
- package/mobile/lib/components/ExchangeRateTile/CurrentLocation.js +0 -8
- package/mobile/lib/components/ExchangeRateTile/CurrentLocation.js.map +0 -1
- package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +0 -24
- package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +0 -71
- package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +0 -1
- package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.d.ts +0 -5
- package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js +0 -24
- package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +0 -1
- package/mobile/lib/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +0 -9
- package/mobile/lib/components/ExchangeRateTile/ExchangeRateTileContent.js +0 -2
- package/mobile/lib/components/ExchangeRateTile/ExchangeRateTileContent.js.map +0 -1
- package/mobile/lib/components/ExchangeRateTile/calculateResult.d.ts +0 -2
- package/mobile/lib/components/ExchangeRateTile/calculateResult.js +0 -7
- package/mobile/lib/components/ExchangeRateTile/calculateResult.js.map +0 -1
- package/mobile/lib/components/ExchangeRateTile/callbackCurrencySelect.d.ts +0 -8
- package/mobile/lib/components/ExchangeRateTile/callbackCurrencySelect.js +0 -18
- package/mobile/lib/components/ExchangeRateTile/callbackCurrencySelect.js.map +0 -1
- package/mobile/lib/components/ExchangeRateTile/formatCurrency.d.ts +0 -1
- package/mobile/lib/components/ExchangeRateTile/formatCurrency.js +0 -7
- package/mobile/lib/components/ExchangeRateTile/formatCurrency.js.map +0 -1
- package/mobile/lib/components/ExchangeRateTile/renderInput.d.ts +0 -11
- package/mobile/lib/components/ExchangeRateTile/renderInput.js +0 -13
- package/mobile/lib/components/ExchangeRateTile/renderInput.js.map +0 -1
- package/mobile/lib/components/ExchangeRateTile/useFetchExchangeRateData.d.ts +0 -9
- package/mobile/lib/components/ExchangeRateTile/useFetchExchangeRateData.js +0 -10
- package/mobile/lib/components/ExchangeRateTile/useFetchExchangeRateData.js.map +0 -1
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.d.ts +0 -5
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js +0 -31
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +0 -1
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockContent.d.ts +0 -31
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockContent.js +0 -2
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockContent.js.map +0 -1
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.d.ts +0 -7
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +0 -56
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +0 -1
- package/mobile/lib/ui-kit/Rating/Rating.d.ts +0 -1
- package/mobile/lib/ui-kit/Rating/Rating.js +0 -18
- package/mobile/lib/ui-kit/Rating/Rating.js.map +0 -1
- package/mobile/src/components/CarouselLinks/CarouselLinkButton.tsx +0 -36
- package/mobile/src/components/CarouselLinks/CarouselLinks.example.json +0 -31
- package/mobile/src/components/CarouselLinks/CarouselLinks.tsx +0 -50
- package/mobile/src/components/CarouselLinks/CarouselLinks.ui.json +0 -16
- package/mobile/src/components/CarouselLinks/CarouselLinksContent.ts +0 -22
- package/mobile/src/components/ExchangeRateTile/CurrencyProps.ts +0 -6
- package/mobile/src/components/ExchangeRateTile/CurrencyTable.tsx +0 -64
- package/mobile/src/components/ExchangeRateTile/CurrentLocation.tsx +0 -28
- package/mobile/src/components/ExchangeRateTile/ExchangeCurrencyCalculator.tsx +0 -155
- package/mobile/src/components/ExchangeRateTile/ExchangeRateTile.example.json +0 -12
- package/mobile/src/components/ExchangeRateTile/ExchangeRateTile.tsx +0 -60
- package/mobile/src/components/ExchangeRateTile/ExchangeRateTile.ui.json +0 -8
- package/mobile/src/components/ExchangeRateTile/ExchangeRateTileContent.ts +0 -11
- package/mobile/src/components/ExchangeRateTile/calculateResult.ts +0 -9
- package/mobile/src/components/ExchangeRateTile/callbackCurrencySelect.ts +0 -25
- package/mobile/src/components/ExchangeRateTile/formatCurrency.ts +0 -8
- package/mobile/src/components/ExchangeRateTile/renderInput.tsx +0 -43
- package/mobile/src/components/ExchangeRateTile/useFetchExchangeRateData.ts +0 -25
- package/mobile/src/components/InsuranceAmountBlock/InsuranceAmountBlock.example.json +0 -89
- package/mobile/src/components/InsuranceAmountBlock/InsuranceAmountBlock.tsx +0 -82
- package/mobile/src/components/InsuranceAmountBlock/InsuranceAmountBlock.ui.json +0 -21
- package/mobile/src/components/InsuranceAmountBlock/InsuranceAmountBlockContent.ts +0 -35
- package/mobile/src/components/InsuranceAmountBlock/InsuranceAmountBlockInner.tsx +0 -145
- package/mobile/src/ui-kit/Rating/Rating.tsx +0 -39
- package/src/components/CarouselLinks/CarouselLinkButton.tsx +0 -36
- package/src/components/CarouselLinks/CarouselLinks.example.json +0 -31
- package/src/components/CarouselLinks/CarouselLinks.fixture.mobile.tsx +0 -83
- package/src/components/CarouselLinks/CarouselLinks.fixture.tsx +0 -40
- package/src/components/CarouselLinks/CarouselLinks.tsx +0 -50
- package/src/components/CarouselLinks/CarouselLinks.ui.json +0 -16
- package/src/components/CarouselLinks/CarouselLinksContent.ts +0 -22
- package/src/components/ExchangeRateTile/CurrencyProps.ts +0 -6
- package/src/components/ExchangeRateTile/CurrencyTable.tsx +0 -64
- package/src/components/ExchangeRateTile/CurrentLocation.tsx +0 -28
- package/src/components/ExchangeRateTile/ExchangeCurrencyCalculator.tsx +0 -155
- package/src/components/ExchangeRateTile/ExchangeRateTile.example.json +0 -12
- package/src/components/ExchangeRateTile/ExchangeRateTile.fixture.mobile.tsx +0 -19
- package/src/components/ExchangeRateTile/ExchangeRateTile.fixture.tsx +0 -21
- package/src/components/ExchangeRateTile/ExchangeRateTile.tsx +0 -60
- package/src/components/ExchangeRateTile/ExchangeRateTile.ui.json +0 -8
- package/src/components/ExchangeRateTile/ExchangeRateTileContent.ts +0 -11
- package/src/components/ExchangeRateTile/calculateResult.ts +0 -9
- package/src/components/ExchangeRateTile/callbackCurrencySelect.ts +0 -25
- package/src/components/ExchangeRateTile/formatCurrency.ts +0 -8
- package/src/components/ExchangeRateTile/renderInput.tsx +0 -43
- package/src/components/ExchangeRateTile/useFetchExchangeRateData.ts +0 -25
- package/src/components/InsuranceAmountBlock/InsuranceAmountBlock.example.json +0 -89
- package/src/components/InsuranceAmountBlock/InsuranceAmountBlock.fixture.tsx +0 -62
- package/src/components/InsuranceAmountBlock/InsuranceAmountBlock.tsx +0 -82
- package/src/components/InsuranceAmountBlock/InsuranceAmountBlock.ui.json +0 -21
- package/src/components/InsuranceAmountBlock/InsuranceAmountBlockContent.ts +0 -35
- package/src/components/InsuranceAmountBlock/InsuranceAmountBlockInner.tsx +0 -145
- package/src/ui-kit/Rating/Rating.fixture.tsx +0 -7
- package/src/ui-kit/Rating/Rating.tsx +0 -39
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
type AdditionalDescriptionProps,
|
|
3
|
-
type HeadlineCommonProps,
|
|
4
|
-
} from '../../model/HeadlineType';
|
|
5
|
-
import { type LinkProps } from '../../model/LinkProps';
|
|
6
|
-
import { type IconProps } from '../../model/Picture';
|
|
7
|
-
import { type UniBlockContent } from '../../UniBlock/UniBlockProps';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* @title Шапка колонки
|
|
11
|
-
*/
|
|
12
|
-
export type CarouselLinkProps = IconProps & LinkProps;
|
|
13
|
-
|
|
14
|
-
/** @title Карусель с ссылками */
|
|
15
|
-
export type CarouselLinksContent = UniBlockContent &
|
|
16
|
-
HeadlineCommonProps &
|
|
17
|
-
AdditionalDescriptionProps & {
|
|
18
|
-
/** @title Ссылки */
|
|
19
|
-
links?: CarouselLinkProps[];
|
|
20
|
-
/** @title Отступы вложенных компонентов */
|
|
21
|
-
isInnerPadding?: boolean;
|
|
22
|
-
};
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import { type ComponentType } from '../../model/ComponentType';
|
|
3
|
-
import { Img } from '../../ui-kit/Img/Img';
|
|
4
|
-
import { Text } from '../../ui-kit/Text/Text';
|
|
5
|
-
import { style } from '../../utils/style';
|
|
6
|
-
import { type ExchangeCurrencyItem } from './ExchangeCurrencyCalculator';
|
|
7
|
-
import { formatCurrency } from './formatCurrency';
|
|
8
|
-
|
|
9
|
-
const TABLE_STYLE_BASE = 'text-m font-light text-secondary-text ';
|
|
10
|
-
const TABLE_HEAD_STYLE = `${TABLE_STYLE_BASE} text-left`;
|
|
11
|
-
const TABLE_HEAD_STYLE_CENTER = `${TABLE_STYLE_BASE} pl-5xl text-center`;
|
|
12
|
-
const TABLE_HEAD_STYLE_RIGHT = `${TABLE_STYLE_BASE} pl-5xl text-right`;
|
|
13
|
-
|
|
14
|
-
const CURRENCY_ICONS_MAP = {
|
|
15
|
-
USD: 'DollarIcon',
|
|
16
|
-
EUR: 'EuroIcon',
|
|
17
|
-
CNY: 'ChineseYuanRenminbiIcon',
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
interface CurrencyTableProps extends ComponentType {
|
|
21
|
-
exchangeCurrencyItems: ExchangeCurrencyItem[];
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export const CurrencyTable = JSX<CurrencyTableProps>(({ className, exchangeCurrencyItems }) => (
|
|
25
|
-
<table className={style('h-fit w-full', className)}>
|
|
26
|
-
<thead>
|
|
27
|
-
<tr>
|
|
28
|
-
<th className={TABLE_HEAD_STYLE}>
|
|
29
|
-
<Text size="text-m">Валюта</Text>
|
|
30
|
-
</th>
|
|
31
|
-
<th className={TABLE_HEAD_STYLE_CENTER}>
|
|
32
|
-
<Text size="text-m">Купить</Text>
|
|
33
|
-
</th>
|
|
34
|
-
<th className={TABLE_HEAD_STYLE_RIGHT}>
|
|
35
|
-
<Text size="text-m">Продать</Text>
|
|
36
|
-
</th>
|
|
37
|
-
</tr>
|
|
38
|
-
</thead>
|
|
39
|
-
<tbody>{exchangeCurrencyItems.map(renderCurrencyRow)}</tbody>
|
|
40
|
-
</table>
|
|
41
|
-
));
|
|
42
|
-
|
|
43
|
-
const renderCurrencyRow = (exchangeCurrencyItem: ExchangeCurrencyItem) => {
|
|
44
|
-
const currency = exchangeCurrencyItem?.currency?.currency;
|
|
45
|
-
|
|
46
|
-
return (
|
|
47
|
-
<tr key={currency} className="pb-2xs text-h6">
|
|
48
|
-
<td className="pt-m m-auto flex text-left">
|
|
49
|
-
<div className="flex items-center gap-xs">
|
|
50
|
-
{currency ? (
|
|
51
|
-
<Img image={{ icon: CURRENCY_ICONS_MAP[currency] }} width="24" height="24" />
|
|
52
|
-
) : null}
|
|
53
|
-
<Text size="text-h6">{currency}</Text>
|
|
54
|
-
</div>
|
|
55
|
-
</td>
|
|
56
|
-
<td className="pt-m pl-5xl text-center">
|
|
57
|
-
<Text size="text-h6">{formatCurrency(exchangeCurrencyItem?.saleExchangeRate)}</Text>
|
|
58
|
-
</td>
|
|
59
|
-
<td className="pt-m pl-5xl text-right">
|
|
60
|
-
<Text size="text-h6">{formatCurrency(exchangeCurrencyItem?.buyExchangeRate)}</Text>
|
|
61
|
-
</td>
|
|
62
|
-
</tr>
|
|
63
|
-
);
|
|
64
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import { type ComponentType } from '../../model/ComponentType';
|
|
3
|
-
import { type Picture } from '../../model/Picture';
|
|
4
|
-
import { RoundedIcon } from '../../ui-kit/Icon/RoundedIcon';
|
|
5
|
-
import { Paragraph } from '../../ui-kit/Paragraph/Paragraph';
|
|
6
|
-
import { style } from '../../utils/style';
|
|
7
|
-
|
|
8
|
-
interface CurrentLocationProps extends ComponentType {
|
|
9
|
-
address?: string;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const icon: Picture = { icon: 'GpsIcon' };
|
|
13
|
-
|
|
14
|
-
export const CurrentLocation = JSX<CurrentLocationProps>(({ className = '', address }) => (
|
|
15
|
-
<div className={style('flex gap-s w-full justify-between @sm:justify-center', className)}>
|
|
16
|
-
<RoundedIcon {...icon} iconBgVersion="primary" className="shrink-0" />
|
|
17
|
-
<div className="space-y-2xs whitespace-pre-wrap">
|
|
18
|
-
{address ? (
|
|
19
|
-
<Paragraph size="text-l" color="text-primary-main">
|
|
20
|
-
{address}
|
|
21
|
-
</Paragraph>
|
|
22
|
-
) : null}
|
|
23
|
-
<Paragraph size="text-m" color="text-secondary-text">
|
|
24
|
-
Курс указан для заданного офиса
|
|
25
|
-
</Paragraph>
|
|
26
|
-
</div>
|
|
27
|
-
</div>
|
|
28
|
-
));
|
|
@@ -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,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,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,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
|
-
}
|