@redneckz/wildless-cms-uni-blocks 0.3.69 → 0.3.71
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/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +467 -423
- package/bundle/bundle.umd.min.js +1 -1
- package/cosmos-static/icons/DoneIcon.svg +1 -0
- package/dist/components/Accordion/Accordion.mobile.js.map +1 -1
- package/dist/components/BlockContent.d.ts +3 -1
- package/dist/components/Blocks.d.ts +1 -1
- package/dist/components/Blocks.js +2 -2
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js +2 -2
- package/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
- package/dist/components/Calculator/Calculator.js +7 -3
- package/dist/components/Calculator/Calculator.js.map +1 -1
- package/dist/components/Calculator/getCalculatorParams.js +2 -1
- package/dist/components/Calculator/getCalculatorParams.js.map +1 -1
- package/dist/components/Calculator/getCreditRate.js +2 -1
- package/dist/components/Calculator/getCreditRate.js.map +1 -1
- package/dist/components/Calculator/getMonthlyPayment.js +2 -1
- package/dist/components/Calculator/getMonthlyPayment.js.map +1 -1
- package/dist/components/Calculator/renderCalculatorBlock.js.map +1 -1
- package/dist/components/ComparisonTable/HeaderCell.mobile.js +4 -2
- package/dist/components/ComparisonTable/HeaderCell.mobile.js.map +1 -1
- package/dist/components/ComparisonTable/TableCell.js +3 -1
- package/dist/components/ComparisonTable/TableCell.js.map +1 -1
- package/dist/components/ComparisonTable/TableCell.mobile.js +3 -1
- package/dist/components/ComparisonTable/TableCell.mobile.js.map +1 -1
- package/dist/components/ComparisonTable/TableRow.js +2 -1
- package/dist/components/ComparisonTable/TableRow.js.map +1 -1
- package/dist/components/ContentPage/ContentPageContext.d.ts +14 -3
- package/dist/components/ExchangeRateTile/CurrencyProps.d.ts +5 -0
- package/dist/components/ExchangeRateTile/CurrencyProps.js +9 -0
- package/dist/components/ExchangeRateTile/CurrencyProps.js.map +1 -0
- package/dist/components/ExchangeRateTile/CurrencyTable.d.ts +1 -1
- package/dist/components/ExchangeRateTile/CurrencyTable.js +2 -2
- package/dist/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
- package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +16 -4
- package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +68 -9
- package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
- package/dist/components/ExchangeRateTile/ExchangeRateTile.js +7 -19
- package/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/dist/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +0 -10
- package/dist/components/ExchangeRateTile/calculateResult.d.ts +2 -0
- package/dist/components/ExchangeRateTile/calculateResult.js +11 -0
- package/dist/components/ExchangeRateTile/calculateResult.js.map +1 -0
- package/dist/components/ExchangeRateTile/callbackCurrencySelect.d.ts +8 -0
- package/dist/components/ExchangeRateTile/callbackCurrencySelect.js +17 -0
- package/dist/components/ExchangeRateTile/callbackCurrencySelect.js.map +1 -0
- package/dist/components/ExchangeRateTile/formatCurrency.js +5 -1
- package/dist/components/ExchangeRateTile/formatCurrency.js.map +1 -1
- package/dist/components/ExchangeRateTile/renderButton.d.ts +1 -0
- package/dist/components/ExchangeRateTile/renderButton.js +9 -0
- package/dist/components/ExchangeRateTile/renderButton.js.map +1 -0
- package/dist/components/ExchangeRateTile/renderInput.d.ts +12 -0
- package/dist/components/ExchangeRateTile/renderInput.js +12 -0
- package/dist/components/ExchangeRateTile/renderInput.js.map +1 -0
- package/dist/components/Footer/Footer.js +1 -1
- package/dist/components/Footer/Footer.js.map +1 -1
- package/dist/components/Footer/MediaButton.js +4 -13
- package/dist/components/Footer/MediaButton.js.map +1 -1
- package/dist/components/Footer/TextInformation.js +1 -1
- package/dist/components/Footer/TextInformation.js.map +1 -1
- package/dist/components/Gallery/Gallery.mobile.js +2 -2
- package/dist/components/Gallery/Gallery.mobile.js.map +1 -1
- package/dist/components/Gallery/GalleryCardInner.js +2 -2
- package/dist/components/Gallery/GalleryCardInner.js.map +1 -1
- package/dist/components/Gallery/GalleryInner.js +7 -2
- package/dist/components/Gallery/GalleryInner.js.map +1 -1
- package/dist/components/GroupBlock/BlocksTypeProps.d.ts +4 -1
- package/dist/components/GroupBlock/GroupBlock.js +3 -3
- package/dist/components/GroupBlock/GroupBlock.js.map +1 -1
- package/dist/components/GroupBlock/GroupBlockTabs.js +2 -2
- package/dist/components/GroupBlock/GroupBlockTabs.js.map +1 -1
- package/dist/components/GroupBlock/GroupBlocksItem.js +1 -1
- package/dist/components/GroupBlock/GroupBlocksItem.js.map +1 -1
- package/dist/components/Header/DropdownMenu.d.ts +13 -0
- package/dist/components/Header/DropdownMenu.js +18 -0
- package/dist/components/Header/DropdownMenu.js.map +1 -0
- package/dist/components/Header/HeaderSubMenu.js +19 -32
- package/dist/components/Header/HeaderSubMenu.js.map +1 -1
- package/dist/components/Insurance/Insurance.js +4 -6
- package/dist/components/Insurance/Insurance.js.map +1 -1
- package/dist/components/Insurance/InsuranceContent.d.ts +2 -5
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.d.ts +5 -0
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js +34 -0
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +1 -0
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockContent.d.ts +30 -0
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockContent.js +2 -0
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockContent.js.map +1 -0
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.d.ts +5 -0
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +55 -0
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -0
- package/dist/components/LinkDocs/LinkDocsListItemBase.js +2 -1
- package/dist/components/LinkDocs/LinkDocsListItemBase.js.map +1 -1
- package/dist/components/Placeholder/Placeholder.js +1 -1
- package/dist/components/Placeholder/Placeholder.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlockInner.js +1 -1
- package/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlockInner.mobile.js +1 -1
- package/dist/components/ProductBlock/ProductBlockInner.mobile.js.map +1 -1
- package/dist/components/ProductTile/ProductTile.js +2 -2
- package/dist/components/ProductTile/ProductTile.js.map +1 -1
- package/dist/components/Recommendation/Recommendation.js +7 -2
- package/dist/components/Recommendation/Recommendation.js.map +1 -1
- package/dist/components/StepsBlock/StepsBlock.js +1 -1
- package/dist/components/StepsBlock/StepsBlock.js.map +1 -1
- package/dist/components/Tile/Tile.js +4 -4
- package/dist/components/Tile/Tile.js.map +1 -1
- package/dist/components/Tile/TileContent.d.ts +5 -0
- package/dist/content-page-repository/mapJSON.d.ts +1 -1
- package/dist/content-page-repository/mapJSON.js +9 -7
- package/dist/content-page-repository/mapJSON.js.map +1 -1
- package/dist/content-page-repository/transformMarkdown.js +2 -1
- package/dist/content-page-repository/transformMarkdown.js.map +1 -1
- package/dist/content-page-repository/transformPicture.js +6 -3
- package/dist/content-page-repository/transformPicture.js.map +1 -1
- package/dist/hooks/useCreditCalculatorData.d.ts +1 -2
- package/dist/hooks/useCreditCalculatorData.js.map +1 -1
- package/dist/hooks/useExchangeRates.d.ts +2 -8
- package/dist/hooks/useExchangeRates.js +52 -3
- package/dist/hooks/useExchangeRates.js.map +1 -1
- package/dist/hooks/useTableArrowScrollControl.js +3 -3
- package/dist/hooks/useTableArrowScrollControl.js.map +1 -1
- package/dist/icons/IconName.d.ts +4 -2
- package/dist/icons/IconName.js +2 -0
- package/dist/icons/IconName.js.map +1 -1
- package/dist/model/Insurance.d.ts +6 -0
- package/dist/{components/CreditCalculator/CreditCalculatorContent.js → model/Insurance.js} +1 -1
- package/dist/model/Insurance.js.map +1 -0
- package/dist/react/IntersectionObserverTag.d.ts +3 -0
- package/dist/react/IntersectionObserverTag.js +17 -0
- package/dist/react/IntersectionObserverTag.js.map +1 -0
- package/dist/{setup-fixture.d.ts → react/setup-fixture.d.ts} +1 -1
- package/{mobile/dist → dist/react}/setup-fixture.js +3 -1
- package/dist/react/setup-fixture.js.map +1 -0
- package/dist/services/sitemap/isHrefActive.d.ts +1 -1
- package/dist/services/sitemap/isHrefActive.js +1 -1
- package/dist/services/sitemap/isHrefActive.js.map +1 -1
- package/dist/ui-kit/Button/ArrowButton.d.ts +1 -1
- package/dist/ui-kit/Button/ArrowButton.js.map +1 -1
- package/dist/ui-kit/Button/ButtonSection.js +2 -1
- package/dist/ui-kit/Button/ButtonSection.js.map +1 -1
- package/dist/ui-kit/Button/renderArrows.d.ts +10 -0
- package/dist/ui-kit/Button/renderArrows.js +9 -0
- package/dist/ui-kit/Button/renderArrows.js.map +1 -0
- package/dist/ui-kit/Img/Img.mobile.js +1 -1
- package/dist/ui-kit/Img/Img.mobile.js.map +1 -1
- package/dist/ui-kit/Input/Input.js +6 -2
- package/dist/ui-kit/Input/Input.js.map +1 -1
- package/dist/ui-kit/Input/InputProps.d.ts +3 -0
- package/dist/ui-kit/InputRange/InputRange.js +10 -6
- package/dist/ui-kit/InputRange/InputRange.js.map +1 -1
- package/dist/ui-kit/SVG.js +1 -1
- package/dist/ui-kit/SVG.js.map +1 -1
- package/dist/ui-kit/SearchBar.mobile.js +1 -1
- package/dist/ui-kit/SearchBar.mobile.js.map +1 -1
- package/dist/ui-kit/Select/Select.d.ts +2 -0
- package/dist/ui-kit/Select/Select.js +2 -2
- package/dist/ui-kit/Select/Select.js.map +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListControl.js +2 -2
- package/dist/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListControlDots.js +2 -1
- package/dist/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
- package/dist/ui-kit/SwipeListControl/utils/getIndexParts.js +3 -2
- package/dist/ui-kit/SwipeListControl/utils/getIndexParts.js.map +1 -1
- package/dist/ui-kit/TableArrowScrollControl/TableArrowScrollControl.js +9 -3
- package/dist/ui-kit/TableArrowScrollControl/TableArrowScrollControl.js.map +1 -1
- package/dist/ui-kit/TableArrowScrollControl/TableArrowScrollControlProps.d.ts +5 -4
- package/dist/ui-kit/Tabs/Tabs.js +2 -1
- package/dist/ui-kit/Tabs/Tabs.js.map +1 -1
- package/dist/ui-kit/TopItem/TopItem.js +6 -8
- package/dist/ui-kit/TopItem/TopItem.js.map +1 -1
- package/dist/utils/changeHashOnScroll.js +2 -1
- package/dist/utils/changeHashOnScroll.js.map +1 -1
- package/dist/utils/getCurrentDate.js +1 -1
- package/dist/utils/roundTo.d.ts +1 -0
- package/dist/utils/roundTo.js +8 -0
- package/dist/utils/roundTo.js.map +1 -0
- package/lib/common.css +1 -1
- package/lib/components/Accordion/Accordion.mobile.js.map +1 -1
- package/lib/components/BlockContent.d.ts +3 -1
- package/lib/components/Blocks.d.ts +1 -1
- package/lib/components/Blocks.js +2 -2
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js +2 -2
- package/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
- package/lib/components/Calculator/Calculator.js +8 -4
- package/lib/components/Calculator/Calculator.js.map +1 -1
- package/lib/components/Calculator/getCalculatorParams.js +2 -1
- package/lib/components/Calculator/getCalculatorParams.js.map +1 -1
- package/lib/components/Calculator/getCreditRate.js +2 -1
- package/lib/components/Calculator/getCreditRate.js.map +1 -1
- package/lib/components/Calculator/getMonthlyPayment.js +2 -1
- package/lib/components/Calculator/getMonthlyPayment.js.map +1 -1
- package/lib/components/Calculator/renderCalculatorBlock.js.map +1 -1
- package/lib/components/ComparisonTable/HeaderCell.mobile.js +4 -2
- package/lib/components/ComparisonTable/HeaderCell.mobile.js.map +1 -1
- package/lib/components/ComparisonTable/TableCell.js +3 -1
- package/lib/components/ComparisonTable/TableCell.js.map +1 -1
- package/lib/components/ComparisonTable/TableCell.mobile.js +3 -1
- package/lib/components/ComparisonTable/TableCell.mobile.js.map +1 -1
- package/lib/components/ComparisonTable/TableRow.js +2 -1
- package/lib/components/ComparisonTable/TableRow.js.map +1 -1
- package/lib/components/ContentPage/ContentPageContext.d.ts +14 -3
- package/lib/components/ExchangeRateTile/CurrencyProps.d.ts +5 -0
- package/lib/components/ExchangeRateTile/CurrencyProps.js +7 -0
- package/lib/components/ExchangeRateTile/CurrencyProps.js.map +1 -0
- package/lib/components/ExchangeRateTile/CurrencyTable.d.ts +1 -1
- package/lib/components/ExchangeRateTile/CurrencyTable.js +2 -2
- package/lib/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
- package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +16 -4
- package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +69 -10
- package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
- package/lib/components/ExchangeRateTile/ExchangeRateTile.js +7 -19
- package/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/lib/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +0 -10
- package/lib/components/ExchangeRateTile/calculateResult.d.ts +2 -0
- package/lib/components/ExchangeRateTile/calculateResult.js +7 -0
- package/lib/components/ExchangeRateTile/calculateResult.js.map +1 -0
- package/lib/components/ExchangeRateTile/callbackCurrencySelect.d.ts +8 -0
- package/lib/components/ExchangeRateTile/callbackCurrencySelect.js +14 -0
- package/lib/components/ExchangeRateTile/callbackCurrencySelect.js.map +1 -0
- package/lib/components/ExchangeRateTile/formatCurrency.js +5 -1
- package/lib/components/ExchangeRateTile/formatCurrency.js.map +1 -1
- package/lib/components/ExchangeRateTile/renderButton.d.ts +1 -0
- package/lib/components/ExchangeRateTile/renderButton.js +6 -0
- package/lib/components/ExchangeRateTile/renderButton.js.map +1 -0
- package/lib/components/ExchangeRateTile/renderInput.d.ts +12 -0
- package/lib/components/ExchangeRateTile/renderInput.js +9 -0
- package/lib/components/ExchangeRateTile/renderInput.js.map +1 -0
- package/lib/components/Footer/Footer.js +1 -1
- package/lib/components/Footer/Footer.js.map +1 -1
- package/lib/components/Footer/MediaButton.js +4 -13
- package/lib/components/Footer/MediaButton.js.map +1 -1
- package/lib/components/Footer/TextInformation.js +1 -1
- package/lib/components/Footer/TextInformation.js.map +1 -1
- package/lib/components/Gallery/Gallery.mobile.js +2 -2
- package/lib/components/Gallery/Gallery.mobile.js.map +1 -1
- package/lib/components/Gallery/GalleryCardInner.js +2 -2
- package/lib/components/Gallery/GalleryCardInner.js.map +1 -1
- package/lib/components/Gallery/GalleryInner.js +7 -2
- package/lib/components/Gallery/GalleryInner.js.map +1 -1
- package/lib/components/GroupBlock/BlocksTypeProps.d.ts +4 -1
- package/lib/components/GroupBlock/GroupBlock.fixture.d.ts +1 -0
- package/lib/components/GroupBlock/GroupBlock.js +3 -3
- package/lib/components/GroupBlock/GroupBlock.js.map +1 -1
- package/lib/components/GroupBlock/GroupBlockTabs.js +2 -2
- package/lib/components/GroupBlock/GroupBlockTabs.js.map +1 -1
- package/lib/components/GroupBlock/GroupBlocksItem.js +1 -1
- package/lib/components/GroupBlock/GroupBlocksItem.js.map +1 -1
- package/lib/components/Header/DropdownMenu.d.ts +13 -0
- package/lib/components/Header/DropdownMenu.js +16 -0
- package/lib/components/Header/DropdownMenu.js.map +1 -0
- package/lib/components/Header/HeaderSubMenu.js +19 -32
- package/lib/components/Header/HeaderSubMenu.js.map +1 -1
- package/lib/components/Headline/Headline.fixture.d.ts +9 -3
- package/lib/components/Headline/Headline.fixture.mobile.d.ts +13 -3
- package/lib/components/Insurance/Insurance.fixture.d.ts +2 -1
- package/lib/components/Insurance/Insurance.js +4 -6
- package/lib/components/Insurance/Insurance.js.map +1 -1
- package/lib/components/Insurance/InsuranceContent.d.ts +2 -5
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.d.ts +5 -0
- package/lib/components/{CreditCalculator/CreditCalculator.fixture.d.ts → InsuranceAmountBlock/InsuranceAmountBlock.fixture.d.ts} +0 -0
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js +32 -0
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +1 -0
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockContent.d.ts +30 -0
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockContent.js +2 -0
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockContent.js.map +1 -0
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.d.ts +5 -0
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +53 -0
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -0
- package/lib/components/LinkDocs/LinkDocsListItemBase.js +2 -1
- package/lib/components/LinkDocs/LinkDocsListItemBase.js.map +1 -1
- package/lib/components/Placeholder/Placeholder.js +1 -1
- package/lib/components/Placeholder/Placeholder.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlock.fixture.d.ts +10 -2
- package/lib/components/ProductBlock/ProductBlockInner.js +1 -1
- package/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlockInner.mobile.js +1 -1
- package/lib/components/ProductBlock/ProductBlockInner.mobile.js.map +1 -1
- package/lib/components/ProductTile/ProductTile.js +2 -2
- package/lib/components/ProductTile/ProductTile.js.map +1 -1
- package/lib/components/Recommendation/Recommendation.fixture.d.ts +3 -0
- package/lib/components/Recommendation/Recommendation.js +7 -2
- package/lib/components/Recommendation/Recommendation.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlock.fixture.mobile.d.ts +7 -1
- package/lib/components/StepsBlock/StepsBlock.js +1 -1
- package/lib/components/StepsBlock/StepsBlock.js.map +1 -1
- package/lib/components/TextBlock/TextBlock.fixture.d.ts +3 -1
- package/lib/components/TextBlock/TextBlock.fixture.mobile.d.ts +3 -1
- package/lib/components/Tile/Tile.js +4 -4
- package/lib/components/Tile/Tile.js.map +1 -1
- package/lib/components/Tile/TileContent.d.ts +5 -0
- package/lib/content-page-repository/mapJSON.d.ts +1 -1
- package/lib/content-page-repository/mapJSON.js +9 -7
- package/lib/content-page-repository/mapJSON.js.map +1 -1
- package/lib/content-page-repository/transformMarkdown.js +2 -1
- package/lib/content-page-repository/transformMarkdown.js.map +1 -1
- package/lib/content-page-repository/transformPicture.js +6 -3
- package/lib/content-page-repository/transformPicture.js.map +1 -1
- package/lib/hooks/useCreditCalculatorData.d.ts +1 -2
- package/lib/hooks/useCreditCalculatorData.js.map +1 -1
- package/lib/hooks/useExchangeRates.d.ts +2 -8
- package/lib/hooks/useExchangeRates.js +52 -3
- package/lib/hooks/useExchangeRates.js.map +1 -1
- package/lib/hooks/useTableArrowScrollControl.js +3 -3
- package/lib/hooks/useTableArrowScrollControl.js.map +1 -1
- package/lib/icons/IconName.d.ts +4 -2
- package/lib/icons/IconName.js +2 -0
- package/lib/icons/IconName.js.map +1 -1
- package/lib/model/Insurance.d.ts +6 -0
- package/lib/model/Insurance.js +2 -0
- package/lib/model/Insurance.js.map +1 -0
- package/lib/react/IntersectionObserverTag.d.ts +3 -0
- package/lib/react/IntersectionObserverTag.js +14 -0
- package/lib/react/IntersectionObserverTag.js.map +1 -0
- package/lib/{setup-fixture.d.ts → react/setup-fixture.d.ts} +1 -1
- package/{mobile/lib → lib/react}/setup-fixture.js +3 -1
- package/lib/react/setup-fixture.js.map +1 -0
- package/lib/services/sitemap/isHrefActive.d.ts +1 -1
- package/lib/services/sitemap/isHrefActive.js +1 -1
- package/lib/services/sitemap/isHrefActive.js.map +1 -1
- package/lib/ui-kit/Button/ArrowButton.d.ts +1 -1
- package/lib/ui-kit/Button/ArrowButton.js.map +1 -1
- package/lib/ui-kit/Button/Button.fixture.d.ts +1 -1
- package/lib/ui-kit/Button/Button.fixture.mobile.d.ts +1 -1
- package/lib/ui-kit/Button/ButtonSection.js +2 -1
- package/lib/ui-kit/Button/ButtonSection.js.map +1 -1
- package/lib/ui-kit/Button/renderArrows.d.ts +10 -0
- package/lib/ui-kit/Button/renderArrows.js +6 -0
- package/lib/ui-kit/Button/renderArrows.js.map +1 -0
- package/lib/ui-kit/HeaderItem/HeaderItem.fixture.d.ts +1 -1
- package/lib/ui-kit/Icon/Icon.fixture.d.ts +1 -1
- package/lib/ui-kit/Img/Img.mobile.js +1 -1
- package/lib/ui-kit/Img/Img.mobile.js.map +1 -1
- package/lib/ui-kit/Input/Input.js +6 -2
- package/lib/ui-kit/Input/Input.js.map +1 -1
- package/lib/ui-kit/Input/InputProps.d.ts +3 -0
- package/lib/ui-kit/InputRange/InputRange.js +10 -6
- package/lib/ui-kit/InputRange/InputRange.js.map +1 -1
- package/lib/ui-kit/List/List.fixture.d.ts +1 -1
- package/lib/ui-kit/Logo/Logo.fixture.d.ts +1 -1
- package/lib/ui-kit/SVG.js +1 -1
- package/lib/ui-kit/SVG.js.map +1 -1
- package/lib/ui-kit/SearchBar.mobile.js +1 -1
- package/lib/ui-kit/SearchBar.mobile.js.map +1 -1
- package/lib/ui-kit/Select/Select.d.ts +2 -0
- package/lib/ui-kit/Select/Select.js +2 -2
- package/lib/ui-kit/Select/Select.js.map +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListControl.js +2 -2
- package/lib/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListControlDots.js +2 -1
- package/lib/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
- package/lib/ui-kit/SwipeListControl/utils/getIndexParts.js +3 -2
- package/lib/ui-kit/SwipeListControl/utils/getIndexParts.js.map +1 -1
- package/lib/ui-kit/TableArrowScrollControl/TableArrowScrollControl.js +10 -4
- package/lib/ui-kit/TableArrowScrollControl/TableArrowScrollControl.js.map +1 -1
- package/lib/ui-kit/TableArrowScrollControl/TableArrowScrollControlProps.d.ts +5 -4
- package/lib/ui-kit/Tabs/Tabs.js +2 -1
- package/lib/ui-kit/Tabs/Tabs.js.map +1 -1
- package/lib/ui-kit/TopItem/TopItem.fixture.d.ts +1 -1
- package/lib/ui-kit/TopItem/TopItem.js +6 -8
- package/lib/ui-kit/TopItem/TopItem.js.map +1 -1
- package/lib/utils/changeHashOnScroll.js +2 -1
- package/lib/utils/changeHashOnScroll.js.map +1 -1
- package/lib/utils/getCurrentDate.js +1 -1
- package/lib/utils/roundTo.d.ts +1 -0
- package/lib/utils/roundTo.js +5 -0
- package/lib/utils/roundTo.js.map +1 -0
- package/mobile/bundle/bundle.umd.js +216 -69
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/components/Accordion/Accordion.js.map +1 -1
- package/mobile/dist/components/BlockContent.d.ts +3 -1
- package/mobile/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js +2 -2
- package/mobile/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
- package/mobile/dist/components/Calculator/Calculator.js +7 -3
- package/mobile/dist/components/Calculator/Calculator.js.map +1 -1
- package/mobile/dist/components/Calculator/getCalculatorParams.js +2 -1
- package/mobile/dist/components/Calculator/getCalculatorParams.js.map +1 -1
- package/mobile/dist/components/Calculator/getCreditRate.js +2 -1
- package/mobile/dist/components/Calculator/getCreditRate.js.map +1 -1
- package/mobile/dist/components/Calculator/getMonthlyPayment.js +2 -1
- package/mobile/dist/components/Calculator/getMonthlyPayment.js.map +1 -1
- package/mobile/dist/components/Calculator/renderCalculatorBlock.js.map +1 -1
- package/mobile/dist/components/ComparisonTable/HeaderCell.js +4 -2
- package/mobile/dist/components/ComparisonTable/HeaderCell.js.map +1 -1
- package/mobile/dist/components/ComparisonTable/TableCell.js +3 -1
- package/mobile/dist/components/ComparisonTable/TableCell.js.map +1 -1
- package/mobile/dist/components/ComparisonTable/TableRow.js +2 -1
- package/mobile/dist/components/ComparisonTable/TableRow.js.map +1 -1
- package/mobile/dist/components/ContentPage/ContentPageContext.d.ts +14 -3
- package/mobile/dist/components/ExchangeRateTile/CurrencyProps.d.ts +5 -0
- package/mobile/dist/components/ExchangeRateTile/CurrencyProps.js +9 -0
- package/mobile/dist/components/ExchangeRateTile/CurrencyProps.js.map +1 -0
- package/mobile/dist/components/ExchangeRateTile/CurrencyTable.d.ts +1 -1
- package/mobile/dist/components/ExchangeRateTile/CurrencyTable.js +2 -2
- package/mobile/dist/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
- package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +16 -4
- package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +68 -9
- package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
- package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js +7 -19
- package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/mobile/dist/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +0 -10
- package/mobile/dist/components/ExchangeRateTile/calculateResult.d.ts +2 -0
- package/mobile/dist/components/ExchangeRateTile/calculateResult.js +11 -0
- package/mobile/dist/components/ExchangeRateTile/calculateResult.js.map +1 -0
- package/mobile/dist/components/ExchangeRateTile/callbackCurrencySelect.d.ts +8 -0
- package/mobile/dist/components/ExchangeRateTile/callbackCurrencySelect.js +17 -0
- package/mobile/dist/components/ExchangeRateTile/callbackCurrencySelect.js.map +1 -0
- package/mobile/dist/components/ExchangeRateTile/formatCurrency.js +5 -1
- package/mobile/dist/components/ExchangeRateTile/formatCurrency.js.map +1 -1
- package/mobile/dist/components/ExchangeRateTile/renderButton.d.ts +1 -0
- package/mobile/dist/components/ExchangeRateTile/renderButton.js +9 -0
- package/mobile/dist/components/ExchangeRateTile/renderButton.js.map +1 -0
- package/mobile/dist/components/ExchangeRateTile/renderInput.d.ts +12 -0
- package/mobile/dist/components/ExchangeRateTile/renderInput.js +12 -0
- package/mobile/dist/components/ExchangeRateTile/renderInput.js.map +1 -0
- package/mobile/dist/components/Footer/MediaButton.js +4 -13
- package/mobile/dist/components/Footer/MediaButton.js.map +1 -1
- package/mobile/dist/components/Gallery/Gallery.js +2 -2
- package/mobile/dist/components/Gallery/Gallery.js.map +1 -1
- package/mobile/dist/components/Gallery/GalleryCardInner.js +2 -2
- package/mobile/dist/components/Gallery/GalleryCardInner.js.map +1 -1
- package/mobile/dist/components/Gallery/GalleryInner.js +7 -2
- package/mobile/dist/components/Gallery/GalleryInner.js.map +1 -1
- package/mobile/dist/components/GroupBlock/BlocksTypeProps.d.ts +4 -1
- package/mobile/dist/components/GroupBlock/GroupBlock.js +3 -3
- package/mobile/dist/components/GroupBlock/GroupBlock.js.map +1 -1
- package/mobile/dist/components/GroupBlock/GroupBlockTabs.js +2 -2
- package/mobile/dist/components/GroupBlock/GroupBlockTabs.js.map +1 -1
- package/mobile/dist/components/GroupBlock/GroupBlocksItem.js +1 -1
- package/mobile/dist/components/GroupBlock/GroupBlocksItem.js.map +1 -1
- package/mobile/dist/components/Header/DropdownMenu.d.ts +13 -0
- package/mobile/dist/components/Header/DropdownMenu.js +18 -0
- package/mobile/dist/components/Header/DropdownMenu.js.map +1 -0
- package/mobile/dist/components/Header/HeaderSubMenu.js +19 -32
- package/mobile/dist/components/Header/HeaderSubMenu.js.map +1 -1
- package/mobile/dist/components/Insurance/Insurance.js +4 -6
- package/mobile/dist/components/Insurance/Insurance.js.map +1 -1
- package/mobile/dist/components/Insurance/InsuranceContent.d.ts +2 -5
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.d.ts +5 -0
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js +34 -0
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +1 -0
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockContent.d.ts +30 -0
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockContent.js +2 -0
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockContent.js.map +1 -0
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.d.ts +5 -0
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +55 -0
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -0
- package/mobile/dist/components/LinkDocs/LinkDocsListItemBase.js +2 -1
- package/mobile/dist/components/LinkDocs/LinkDocsListItemBase.js.map +1 -1
- package/mobile/dist/components/Placeholder/Placeholder.js +1 -1
- package/mobile/dist/components/Placeholder/Placeholder.js.map +1 -1
- package/mobile/dist/components/ProductBlock/ProductBlockInner.js +1 -1
- package/mobile/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/mobile/dist/components/ProductTile/ProductTile.js +2 -2
- package/mobile/dist/components/ProductTile/ProductTile.js.map +1 -1
- package/mobile/dist/components/Recommendation/Recommendation.js +7 -2
- package/mobile/dist/components/Recommendation/Recommendation.js.map +1 -1
- package/mobile/dist/components/Tile/Tile.js +4 -4
- package/mobile/dist/components/Tile/Tile.js.map +1 -1
- package/mobile/dist/components/Tile/TileContent.d.ts +5 -0
- package/mobile/dist/content-page-repository/mapJSON.d.ts +1 -1
- package/mobile/dist/content-page-repository/mapJSON.js +9 -7
- package/mobile/dist/content-page-repository/mapJSON.js.map +1 -1
- package/mobile/dist/content-page-repository/transformMarkdown.js +2 -1
- package/mobile/dist/content-page-repository/transformMarkdown.js.map +1 -1
- package/mobile/dist/content-page-repository/transformPicture.js +6 -3
- package/mobile/dist/content-page-repository/transformPicture.js.map +1 -1
- package/mobile/dist/hooks/useCreditCalculatorData.d.ts +1 -2
- package/mobile/dist/hooks/useCreditCalculatorData.js.map +1 -1
- package/mobile/dist/hooks/useExchangeRates.d.ts +2 -8
- package/mobile/dist/hooks/useExchangeRates.js +52 -3
- package/mobile/dist/hooks/useExchangeRates.js.map +1 -1
- package/mobile/dist/hooks/useTableArrowScrollControl.js +3 -3
- package/mobile/dist/hooks/useTableArrowScrollControl.js.map +1 -1
- package/mobile/dist/icons/IconName.d.ts +4 -2
- package/mobile/dist/icons/IconName.js +2 -0
- package/mobile/dist/icons/IconName.js.map +1 -1
- package/mobile/dist/model/Insurance.d.ts +6 -0
- package/mobile/dist/{components/CreditCalculator/CreditCalculatorContent.js → model/Insurance.js} +1 -1
- package/mobile/dist/model/Insurance.js.map +1 -0
- package/mobile/dist/react/IntersectionObserverTag.d.ts +3 -0
- package/mobile/dist/react/IntersectionObserverTag.js +17 -0
- package/mobile/dist/react/IntersectionObserverTag.js.map +1 -0
- package/mobile/dist/{setup-fixture.d.ts → react/setup-fixture.d.ts} +1 -1
- package/{dist → mobile/dist/react}/setup-fixture.js +3 -1
- package/mobile/dist/react/setup-fixture.js.map +1 -0
- package/mobile/dist/services/sitemap/isHrefActive.d.ts +1 -1
- package/mobile/dist/services/sitemap/isHrefActive.js +1 -1
- package/mobile/dist/services/sitemap/isHrefActive.js.map +1 -1
- package/mobile/dist/ui-kit/Button/ArrowButton.d.ts +1 -1
- package/mobile/dist/ui-kit/Button/ArrowButton.js.map +1 -1
- package/mobile/dist/ui-kit/Button/ButtonSection.js +2 -1
- package/mobile/dist/ui-kit/Button/ButtonSection.js.map +1 -1
- package/mobile/dist/ui-kit/Button/renderArrows.d.ts +10 -0
- package/mobile/dist/ui-kit/Button/renderArrows.js +9 -0
- package/mobile/dist/ui-kit/Button/renderArrows.js.map +1 -0
- package/mobile/dist/ui-kit/Img/Img.js +1 -1
- package/mobile/dist/ui-kit/Img/Img.js.map +1 -1
- package/mobile/dist/ui-kit/Input/Input.js +6 -2
- package/mobile/dist/ui-kit/Input/Input.js.map +1 -1
- package/mobile/dist/ui-kit/Input/InputProps.d.ts +3 -0
- package/mobile/dist/ui-kit/InputRange/InputRange.js +10 -6
- package/mobile/dist/ui-kit/InputRange/InputRange.js.map +1 -1
- package/mobile/dist/ui-kit/SVG.js +1 -1
- package/mobile/dist/ui-kit/SVG.js.map +1 -1
- package/mobile/dist/ui-kit/Select/Select.d.ts +2 -0
- package/mobile/dist/ui-kit/Select/Select.js +2 -2
- package/mobile/dist/ui-kit/Select/Select.js.map +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControl.js +2 -2
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlDots.js +2 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/utils/getIndexParts.js +3 -2
- package/mobile/dist/ui-kit/SwipeListControl/utils/getIndexParts.js.map +1 -1
- package/mobile/dist/ui-kit/TableArrowScrollControl/TableArrowScrollControl.js +9 -3
- package/mobile/dist/ui-kit/TableArrowScrollControl/TableArrowScrollControl.js.map +1 -1
- package/mobile/dist/ui-kit/TableArrowScrollControl/TableArrowScrollControlProps.d.ts +5 -4
- package/mobile/dist/ui-kit/Tabs/Tabs.js +2 -1
- package/mobile/dist/ui-kit/Tabs/Tabs.js.map +1 -1
- package/mobile/dist/ui-kit/TopItem/TopItem.js +6 -8
- package/mobile/dist/ui-kit/TopItem/TopItem.js.map +1 -1
- package/mobile/dist/utils/changeHashOnScroll.js +2 -1
- package/mobile/dist/utils/changeHashOnScroll.js.map +1 -1
- package/mobile/dist/utils/getCurrentDate.js +1 -1
- package/mobile/dist/utils/roundTo.d.ts +1 -0
- package/mobile/dist/utils/roundTo.js +8 -0
- package/mobile/dist/utils/roundTo.js.map +1 -0
- package/mobile/lib/components/Accordion/Accordion.js.map +1 -1
- package/mobile/lib/components/BlockContent.d.ts +3 -1
- package/mobile/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js +2 -2
- package/mobile/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
- package/mobile/lib/components/Calculator/Calculator.js +8 -4
- package/mobile/lib/components/Calculator/Calculator.js.map +1 -1
- package/mobile/lib/components/Calculator/getCalculatorParams.js +2 -1
- package/mobile/lib/components/Calculator/getCalculatorParams.js.map +1 -1
- package/mobile/lib/components/Calculator/getCreditRate.js +2 -1
- package/mobile/lib/components/Calculator/getCreditRate.js.map +1 -1
- package/mobile/lib/components/Calculator/getMonthlyPayment.js +2 -1
- package/mobile/lib/components/Calculator/getMonthlyPayment.js.map +1 -1
- package/mobile/lib/components/Calculator/renderCalculatorBlock.js.map +1 -1
- package/mobile/lib/components/ComparisonTable/HeaderCell.js +4 -2
- package/mobile/lib/components/ComparisonTable/HeaderCell.js.map +1 -1
- package/mobile/lib/components/ComparisonTable/TableCell.js +3 -1
- package/mobile/lib/components/ComparisonTable/TableCell.js.map +1 -1
- package/mobile/lib/components/ComparisonTable/TableRow.js +2 -1
- package/mobile/lib/components/ComparisonTable/TableRow.js.map +1 -1
- package/mobile/lib/components/ContentPage/ContentPageContext.d.ts +14 -3
- package/mobile/lib/components/ExchangeRateTile/CurrencyProps.d.ts +5 -0
- package/mobile/lib/components/ExchangeRateTile/CurrencyProps.js +7 -0
- package/mobile/lib/components/ExchangeRateTile/CurrencyProps.js.map +1 -0
- package/mobile/lib/components/ExchangeRateTile/CurrencyTable.d.ts +1 -1
- package/mobile/lib/components/ExchangeRateTile/CurrencyTable.js +2 -2
- package/mobile/lib/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
- package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +16 -4
- package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +69 -10
- package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
- package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js +7 -19
- package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/mobile/lib/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +0 -10
- package/mobile/lib/components/ExchangeRateTile/calculateResult.d.ts +2 -0
- package/mobile/lib/components/ExchangeRateTile/calculateResult.js +7 -0
- package/mobile/lib/components/ExchangeRateTile/calculateResult.js.map +1 -0
- package/mobile/lib/components/ExchangeRateTile/callbackCurrencySelect.d.ts +8 -0
- package/mobile/lib/components/ExchangeRateTile/callbackCurrencySelect.js +14 -0
- package/mobile/lib/components/ExchangeRateTile/callbackCurrencySelect.js.map +1 -0
- package/mobile/lib/components/ExchangeRateTile/formatCurrency.js +5 -1
- package/mobile/lib/components/ExchangeRateTile/formatCurrency.js.map +1 -1
- package/mobile/lib/components/ExchangeRateTile/renderButton.d.ts +1 -0
- package/mobile/lib/components/ExchangeRateTile/renderButton.js +6 -0
- package/mobile/lib/components/ExchangeRateTile/renderButton.js.map +1 -0
- package/mobile/lib/components/ExchangeRateTile/renderInput.d.ts +12 -0
- package/mobile/lib/components/ExchangeRateTile/renderInput.js +9 -0
- package/mobile/lib/components/ExchangeRateTile/renderInput.js.map +1 -0
- package/mobile/lib/components/Footer/MediaButton.js +4 -13
- package/mobile/lib/components/Footer/MediaButton.js.map +1 -1
- package/mobile/lib/components/Gallery/Gallery.js +2 -2
- package/mobile/lib/components/Gallery/Gallery.js.map +1 -1
- package/mobile/lib/components/Gallery/GalleryCardInner.js +2 -2
- package/mobile/lib/components/Gallery/GalleryCardInner.js.map +1 -1
- package/mobile/lib/components/Gallery/GalleryInner.js +7 -2
- package/mobile/lib/components/Gallery/GalleryInner.js.map +1 -1
- package/mobile/lib/components/GroupBlock/BlocksTypeProps.d.ts +4 -1
- package/mobile/lib/components/GroupBlock/GroupBlock.js +3 -3
- package/mobile/lib/components/GroupBlock/GroupBlock.js.map +1 -1
- package/mobile/lib/components/GroupBlock/GroupBlockTabs.js +2 -2
- package/mobile/lib/components/GroupBlock/GroupBlockTabs.js.map +1 -1
- package/mobile/lib/components/GroupBlock/GroupBlocksItem.js +1 -1
- package/mobile/lib/components/GroupBlock/GroupBlocksItem.js.map +1 -1
- package/mobile/lib/components/Header/DropdownMenu.d.ts +13 -0
- package/mobile/lib/components/Header/DropdownMenu.js +16 -0
- package/mobile/lib/components/Header/DropdownMenu.js.map +1 -0
- package/mobile/lib/components/Header/HeaderSubMenu.js +19 -32
- package/mobile/lib/components/Header/HeaderSubMenu.js.map +1 -1
- package/mobile/lib/components/Insurance/Insurance.js +4 -6
- package/mobile/lib/components/Insurance/Insurance.js.map +1 -1
- package/mobile/lib/components/Insurance/InsuranceContent.d.ts +2 -5
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.d.ts +5 -0
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js +32 -0
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +1 -0
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockContent.d.ts +30 -0
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockContent.js +2 -0
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockContent.js.map +1 -0
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.d.ts +5 -0
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +53 -0
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -0
- package/mobile/lib/components/LinkDocs/LinkDocsListItemBase.js +2 -1
- package/mobile/lib/components/LinkDocs/LinkDocsListItemBase.js.map +1 -1
- package/mobile/lib/components/Placeholder/Placeholder.js +1 -1
- package/mobile/lib/components/Placeholder/Placeholder.js.map +1 -1
- package/mobile/lib/components/ProductBlock/ProductBlockInner.js +1 -1
- package/mobile/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/mobile/lib/components/ProductTile/ProductTile.js +2 -2
- package/mobile/lib/components/ProductTile/ProductTile.js.map +1 -1
- package/mobile/lib/components/Recommendation/Recommendation.js +7 -2
- package/mobile/lib/components/Recommendation/Recommendation.js.map +1 -1
- package/mobile/lib/components/Tile/Tile.js +4 -4
- package/mobile/lib/components/Tile/Tile.js.map +1 -1
- package/mobile/lib/components/Tile/TileContent.d.ts +5 -0
- package/mobile/lib/content-page-repository/mapJSON.d.ts +1 -1
- package/mobile/lib/content-page-repository/mapJSON.js +9 -7
- package/mobile/lib/content-page-repository/mapJSON.js.map +1 -1
- package/mobile/lib/content-page-repository/transformMarkdown.js +2 -1
- package/mobile/lib/content-page-repository/transformMarkdown.js.map +1 -1
- package/mobile/lib/content-page-repository/transformPicture.js +6 -3
- package/mobile/lib/content-page-repository/transformPicture.js.map +1 -1
- package/mobile/lib/hooks/useCreditCalculatorData.d.ts +1 -2
- package/mobile/lib/hooks/useCreditCalculatorData.js.map +1 -1
- package/mobile/lib/hooks/useExchangeRates.d.ts +2 -8
- package/mobile/lib/hooks/useExchangeRates.js +52 -3
- package/mobile/lib/hooks/useExchangeRates.js.map +1 -1
- package/mobile/lib/hooks/useTableArrowScrollControl.js +3 -3
- package/mobile/lib/hooks/useTableArrowScrollControl.js.map +1 -1
- package/mobile/lib/icons/IconName.d.ts +4 -2
- package/mobile/lib/icons/IconName.js +2 -0
- package/mobile/lib/icons/IconName.js.map +1 -1
- package/mobile/lib/model/Insurance.d.ts +6 -0
- package/mobile/lib/model/Insurance.js +2 -0
- package/mobile/lib/model/Insurance.js.map +1 -0
- package/mobile/lib/react/IntersectionObserverTag.d.ts +3 -0
- package/mobile/lib/react/IntersectionObserverTag.js +14 -0
- package/mobile/lib/react/IntersectionObserverTag.js.map +1 -0
- package/mobile/lib/{setup-fixture.d.ts → react/setup-fixture.d.ts} +1 -1
- package/{lib → mobile/lib/react}/setup-fixture.js +3 -1
- package/mobile/lib/react/setup-fixture.js.map +1 -0
- package/mobile/lib/services/sitemap/isHrefActive.d.ts +1 -1
- package/mobile/lib/services/sitemap/isHrefActive.js +1 -1
- package/mobile/lib/services/sitemap/isHrefActive.js.map +1 -1
- package/mobile/lib/ui-kit/Button/ArrowButton.d.ts +1 -1
- package/mobile/lib/ui-kit/Button/ArrowButton.js.map +1 -1
- package/mobile/lib/ui-kit/Button/ButtonSection.js +2 -1
- package/mobile/lib/ui-kit/Button/ButtonSection.js.map +1 -1
- package/mobile/lib/ui-kit/Button/renderArrows.d.ts +10 -0
- package/mobile/lib/ui-kit/Button/renderArrows.js +6 -0
- package/mobile/lib/ui-kit/Button/renderArrows.js.map +1 -0
- package/mobile/lib/ui-kit/Img/Img.js +1 -1
- package/mobile/lib/ui-kit/Img/Img.js.map +1 -1
- package/mobile/lib/ui-kit/Input/Input.js +6 -2
- package/mobile/lib/ui-kit/Input/Input.js.map +1 -1
- package/mobile/lib/ui-kit/Input/InputProps.d.ts +3 -0
- package/mobile/lib/ui-kit/InputRange/InputRange.js +10 -6
- package/mobile/lib/ui-kit/InputRange/InputRange.js.map +1 -1
- package/mobile/lib/ui-kit/SVG.js +1 -1
- package/mobile/lib/ui-kit/SVG.js.map +1 -1
- package/mobile/lib/ui-kit/Select/Select.d.ts +2 -0
- package/mobile/lib/ui-kit/Select/Select.js +2 -2
- package/mobile/lib/ui-kit/Select/Select.js.map +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControl.js +2 -2
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlDots.js +2 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/utils/getIndexParts.js +3 -2
- package/mobile/lib/ui-kit/SwipeListControl/utils/getIndexParts.js.map +1 -1
- package/mobile/lib/ui-kit/TableArrowScrollControl/TableArrowScrollControl.js +10 -4
- package/mobile/lib/ui-kit/TableArrowScrollControl/TableArrowScrollControl.js.map +1 -1
- package/mobile/lib/ui-kit/TableArrowScrollControl/TableArrowScrollControlProps.d.ts +5 -4
- package/mobile/lib/ui-kit/Tabs/Tabs.js +2 -1
- package/mobile/lib/ui-kit/Tabs/Tabs.js.map +1 -1
- package/mobile/lib/ui-kit/TopItem/TopItem.js +6 -8
- package/mobile/lib/ui-kit/TopItem/TopItem.js.map +1 -1
- package/mobile/lib/utils/changeHashOnScroll.js +2 -1
- package/mobile/lib/utils/changeHashOnScroll.js.map +1 -1
- package/mobile/lib/utils/getCurrentDate.js +1 -1
- package/mobile/lib/utils/roundTo.d.ts +1 -0
- package/mobile/lib/utils/roundTo.js +5 -0
- package/mobile/lib/utils/roundTo.js.map +1 -0
- package/mobile/src/components/Accordion/Accordion.tsx +1 -3
- package/mobile/src/components/BlockContent.ts +5 -1
- package/mobile/src/components/BonusBenefitsBlock/BonusBenefitsBlock.example.json +1 -1
- package/mobile/src/components/BonusBenefitsBlock/BonusBenefitsBlock.tsx +4 -8
- package/mobile/src/components/Calculator/Calculator.tsx +8 -22
- package/mobile/src/components/Calculator/getCalculatorParams.ts +3 -1
- package/mobile/src/components/Calculator/getCreditRate.ts +3 -1
- package/mobile/src/components/Calculator/getMonthlyPayment.ts +3 -1
- package/mobile/src/components/Calculator/renderCalculatorBlock.tsx +0 -7
- package/mobile/src/components/ComparisonTable/HeaderCell.tsx +7 -13
- package/mobile/src/components/ComparisonTable/TableCell.tsx +7 -8
- package/mobile/src/components/ComparisonTable/TableRow.tsx +6 -9
- package/mobile/src/components/ContentPage/ContentPage.page.json +50 -6
- package/mobile/src/components/ContentPage/ContentPageContext.tsx +20 -4
- package/mobile/src/components/ExchangeRateTile/CurrencyProps.ts +5 -0
- package/mobile/src/components/ExchangeRateTile/CurrencyTable.tsx +4 -4
- package/mobile/src/components/ExchangeRateTile/ExchangeCurrencyCalculator.tsx +120 -35
- package/mobile/src/components/ExchangeRateTile/ExchangeRateTile.tsx +14 -28
- package/mobile/src/components/ExchangeRateTile/ExchangeRateTileContent.ts +0 -11
- package/mobile/src/components/ExchangeRateTile/calculateResult.ts +8 -0
- package/mobile/src/components/ExchangeRateTile/callbackCurrencySelect.ts +21 -0
- package/mobile/src/components/ExchangeRateTile/formatCurrency.ts +6 -1
- package/mobile/src/components/ExchangeRateTile/renderButton.tsx +14 -0
- package/mobile/src/components/ExchangeRateTile/renderInput.tsx +43 -0
- package/mobile/src/components/Footer/MediaButton.tsx +7 -17
- package/mobile/src/components/Gallery/Gallery.tsx +2 -2
- package/mobile/src/components/Gallery/GalleryCardInner.tsx +2 -2
- package/mobile/src/components/Gallery/GalleryInner.tsx +10 -20
- package/mobile/src/components/GroupBlock/BlocksTypeProps.ts +4 -1
- package/mobile/src/components/GroupBlock/GroupBlock.example.json +8 -7
- package/mobile/src/components/GroupBlock/GroupBlock.tsx +9 -4
- package/mobile/src/components/GroupBlock/GroupBlockTabs.tsx +4 -4
- package/mobile/src/components/GroupBlock/GroupBlocksItem.tsx +1 -1
- package/mobile/src/components/Header/DropdownMenu.tsx +72 -0
- package/mobile/src/components/Header/HeaderSubMenu.tsx +45 -87
- package/mobile/src/components/Insurance/Insurance.example.json +21 -0
- package/mobile/src/components/Insurance/Insurance.tsx +10 -9
- package/mobile/src/components/Insurance/InsuranceContent.ts +9 -11
- package/mobile/src/components/InsuranceAmountBlock/InsuranceAmountBlock.example.json +44 -0
- package/mobile/src/components/InsuranceAmountBlock/InsuranceAmountBlock.tsx +84 -0
- package/mobile/src/components/InsuranceAmountBlock/InsuranceAmountBlockContent.ts +33 -0
- package/mobile/src/components/InsuranceAmountBlock/InsuranceAmountBlockInner.tsx +147 -0
- package/mobile/src/components/LinkDocs/LinkDocsListItemBase.tsx +3 -1
- package/mobile/src/components/Placeholder/Placeholder.tsx +6 -2
- package/mobile/src/components/ProductBlock/ProductBlock.example.json +1 -5
- package/mobile/src/components/ProductBlock/ProductBlockInner.tsx +1 -1
- package/mobile/src/components/ProductTile/ProductTile.tsx +2 -2
- package/mobile/src/components/Recommendation/Recommendation.tsx +7 -15
- package/mobile/src/components/TariffsTable/TariffsTable.example.json +1 -5
- package/mobile/src/components/Tile/Tile.example.json +1 -0
- package/mobile/src/components/Tile/Tile.tsx +4 -2
- package/mobile/src/components/Tile/TileContent.ts +5 -0
- package/mobile/src/content-page-repository/mapJSON.ts +11 -7
- package/mobile/src/content-page-repository/transformMarkdown.ts +3 -1
- package/mobile/src/content-page-repository/transformPicture.ts +8 -3
- package/mobile/src/hooks/useCreditCalculatorData.ts +2 -3
- package/mobile/src/hooks/useExchangeRates.ts +70 -10
- package/mobile/src/hooks/useTableArrowScrollControl.ts +3 -3
- package/mobile/src/icons/DoneIcon.svg +4 -0
- package/mobile/src/icons/IconName.ts +4 -4
- package/mobile/src/model/Insurance.ts +6 -0
- package/mobile/src/react/IntersectionObserverTag.tsx +23 -0
- package/mobile/src/{setup-fixture.ts → react/setup-fixture.ts} +5 -2
- package/mobile/src/services/sitemap/isHrefActive.ts +2 -1
- package/mobile/src/ui-kit/Button/ArrowButton.tsx +1 -1
- package/mobile/src/ui-kit/Button/ButtonSection.tsx +3 -1
- package/mobile/src/ui-kit/Button/renderArrows.tsx +41 -0
- package/mobile/src/ui-kit/Img/Img.tsx +1 -0
- package/mobile/src/ui-kit/Input/Input.tsx +21 -5
- package/mobile/src/ui-kit/Input/InputProps.ts +3 -0
- package/mobile/src/ui-kit/InputRange/InputRange.tsx +14 -6
- package/mobile/src/ui-kit/SVG.tsx +2 -2
- package/mobile/src/ui-kit/Select/Select.tsx +17 -7
- package/mobile/src/ui-kit/SwipeListControl/SwipeListControl.tsx +9 -4
- package/mobile/src/ui-kit/SwipeListControl/SwipeListControlDots.tsx +3 -1
- package/mobile/src/ui-kit/SwipeListControl/utils/getIndexParts.ts +6 -2
- package/mobile/src/ui-kit/TableArrowScrollControl/TableArrowScrollControl.tsx +9 -18
- package/mobile/src/ui-kit/TableArrowScrollControl/TableArrowScrollControlProps.ts +6 -4
- package/mobile/src/ui-kit/Tabs/Tabs.tsx +4 -3
- package/mobile/src/ui-kit/TopItem/TopItem.tsx +8 -9
- package/mobile/src/utils/changeHashOnScroll.ts +3 -1
- package/mobile/src/utils/getCurrentDate.ts +1 -1
- package/mobile/src/utils/roundTo.ts +4 -0
- package/package.json +3 -3
- package/src/components/Accordion/Accordion.fixture.mobile.tsx +1 -1
- package/src/components/Accordion/Accordion.fixture.tsx +11 -11
- package/src/components/Accordion/Accordion.mobile.tsx +1 -3
- package/src/components/BenefitsBlock/BenefitsBlock.fixture.tsx +1 -1
- package/src/components/BlockContent.ts +5 -1
- package/src/components/Blocks.ts +2 -2
- package/src/components/Bonus/Bonus.fixture.tsx +1 -1
- package/src/components/BonusBenefitsBlock/BonusBenefitsBlock.example.json +1 -1
- package/src/components/BonusBenefitsBlock/BonusBenefitsBlock.fixture.tsx +1 -1
- package/src/components/BonusBenefitsBlock/BonusBenefitsBlock.tsx +4 -8
- package/src/components/Calculator/Calculator.fixture.tsx +4 -4
- package/src/components/Calculator/Calculator.tsx +8 -22
- package/src/components/Calculator/getCalculatorParams.ts +3 -1
- package/src/components/Calculator/getCreditRate.ts +3 -1
- package/src/components/Calculator/getMonthlyPayment.ts +3 -1
- package/src/components/Calculator/renderCalculatorBlock.tsx +0 -7
- package/src/components/ComparisonTable/ComparisonTable.fixture.mobile.tsx +2 -26
- package/src/components/ComparisonTable/ComparisonTable.fixture.tsx +1 -1
- package/src/components/ComparisonTable/HeaderCell.mobile.tsx +7 -13
- package/src/components/ComparisonTable/TableCell.mobile.tsx +7 -8
- package/src/components/ComparisonTable/TableCell.tsx +7 -10
- package/src/components/ComparisonTable/TableRow.tsx +6 -9
- package/src/components/ContentPage/ContentPage.fixture.mobile.tsx +1 -1
- package/src/components/ContentPage/ContentPage.fixture.tsx +1 -1
- package/src/components/ContentPage/ContentPage.page.json +50 -6
- package/src/components/ContentPage/ContentPageContext.tsx +20 -4
- package/src/components/ExchangeRateTile/CurrencyProps.ts +5 -0
- package/src/components/ExchangeRateTile/CurrencyTable.tsx +4 -4
- package/src/components/ExchangeRateTile/ExchangeCurrencyCalculator.tsx +120 -35
- package/src/components/ExchangeRateTile/ExchangeRateTile.fixture.tsx +1 -1
- package/src/components/ExchangeRateTile/ExchangeRateTile.tsx +14 -28
- package/src/components/ExchangeRateTile/ExchangeRateTileContent.ts +0 -11
- package/src/components/ExchangeRateTile/calculateResult.ts +8 -0
- package/src/components/ExchangeRateTile/callbackCurrencySelect.ts +21 -0
- package/src/components/ExchangeRateTile/formatCurrency.ts +6 -1
- package/src/components/ExchangeRateTile/renderButton.tsx +14 -0
- package/src/components/ExchangeRateTile/renderInput.tsx +43 -0
- package/src/components/Footer/Footer.fixture.mobile.tsx +1 -1
- package/src/components/Footer/Footer.fixture.tsx +1 -1
- package/src/components/Footer/Footer.tsx +1 -1
- package/src/components/Footer/MediaButton.tsx +7 -17
- package/src/components/Footer/TextInformation.tsx +2 -2
- package/src/components/Gallery/Gallery.fixture.mobile.tsx +2 -24
- package/src/components/Gallery/Gallery.fixture.tsx +1 -1
- package/src/components/Gallery/Gallery.mobile.tsx +2 -2
- package/src/components/Gallery/GalleryCardInner.tsx +2 -2
- package/src/components/Gallery/GalleryInner.tsx +10 -20
- package/src/components/GracePeriod/GracePeriod.fixture.tsx +1 -1
- package/src/components/GroupBlock/BlocksTypeProps.ts +4 -1
- package/src/components/GroupBlock/GroupBlock.example.json +8 -7
- package/src/components/GroupBlock/GroupBlock.fixture.tsx +19 -3
- package/src/components/GroupBlock/GroupBlock.tsx +9 -4
- package/src/components/GroupBlock/GroupBlockTabs.tsx +4 -4
- package/src/components/GroupBlock/GroupBlocksItem.tsx +1 -1
- package/src/components/Header/DropdownMenu.tsx +72 -0
- package/src/components/Header/Header.fixture.mobile.tsx +1 -1
- package/src/components/Header/Header.fixture.tsx +1 -1
- package/src/components/Header/HeaderSubMenu.tsx +45 -87
- package/src/components/Headline/Headline.fixture.mobile.tsx +45 -4
- package/src/components/Headline/Headline.fixture.tsx +31 -7
- package/src/components/Insurance/Insurance.example.json +21 -0
- package/src/components/Insurance/Insurance.fixture.tsx +11 -6
- package/src/components/Insurance/Insurance.tsx +10 -9
- package/src/components/Insurance/InsuranceContent.ts +9 -11
- package/src/components/InsuranceAmountBlock/InsuranceAmountBlock.example.json +44 -0
- package/src/components/InsuranceAmountBlock/InsuranceAmountBlock.fixture.tsx +52 -0
- package/src/components/InsuranceAmountBlock/InsuranceAmountBlock.tsx +84 -0
- package/src/components/InsuranceAmountBlock/InsuranceAmountBlockContent.ts +33 -0
- package/src/components/InsuranceAmountBlock/InsuranceAmountBlockInner.tsx +147 -0
- package/src/components/LikeControl/LikeControl.fixture.tsx +1 -1
- package/src/components/LinkDocs/LinkDocs.fixture.mobile.tsx +2 -2
- package/src/components/LinkDocs/LinkDocs.fixture.tsx +2 -2
- package/src/components/LinkDocs/LinkDocsListItemBase.tsx +3 -1
- package/src/components/LinkList/LinkList.fixture.tsx +1 -1
- package/src/components/MiniGallery/MiniGallery.fixture.tsx +1 -1
- package/src/components/MobileAppTile/MobileAppTile.fixture.mobile.tsx +1 -1
- package/src/components/MobileAppTile/MobileAppTile.fixture.tsx +1 -1
- package/src/components/Navigation/Navigation.fixture.tsx +1 -1
- package/src/components/NavigatorTabs/NavigatorTabs.fixture.tsx +1 -1
- package/src/components/OtherProducts/OtherProducts.fixture.tsx +1 -1
- package/src/components/PictureText/PictureText.fixture.tsx +1 -1
- package/src/components/Placeholder/Placeholder.fixture.mobile.tsx +1 -1
- package/src/components/Placeholder/Placeholder.fixture.tsx +1 -1
- package/src/components/Placeholder/Placeholder.tsx +6 -2
- package/src/components/ProductBlock/ProductBlock.example.json +1 -5
- package/src/components/ProductBlock/ProductBlock.fixture.mobile.tsx +2 -2
- package/src/components/ProductBlock/ProductBlock.fixture.tsx +35 -5
- package/src/components/ProductBlock/ProductBlockInner.mobile.tsx +1 -1
- package/src/components/ProductBlock/ProductBlockInner.tsx +1 -1
- package/src/components/ProductGallery/ProductGallery.fixture.mobile.tsx +1 -1
- package/src/components/ProductGallery/ProductGallery.fixture.tsx +2 -2
- package/src/components/ProductTile/ProductTile.fixture.tsx +1 -1
- package/src/components/ProductTile/ProductTile.tsx +2 -2
- package/src/components/PromoTile/PromoTile.fixture.tsx +2 -2
- package/src/components/Recommendation/Recommendation.fixture.tsx +18 -13
- package/src/components/Recommendation/Recommendation.tsx +7 -15
- package/src/components/StepsBlock/StepsBlock.fixture.mobile.tsx +38 -3
- package/src/components/StepsBlock/StepsBlock.fixture.tsx +4 -4
- package/src/components/StepsBlock/StepsBlock.tsx +1 -1
- package/src/components/TariffsTable/TariffsTable.example.json +1 -5
- package/src/components/TariffsTable/TariffsTable.fixture.mobile.tsx +2 -30
- package/src/components/TariffsTable/TariffsTable.fixture.tsx +1 -1
- package/src/components/TextBlock/TextBlock.fixture.mobile.tsx +106 -103
- package/src/components/TextBlock/TextBlock.fixture.tsx +65 -87
- package/src/components/Tile/Tile.example.json +1 -0
- package/src/components/Tile/Tile.fixture.tsx +2 -1
- package/src/components/Tile/Tile.tsx +4 -2
- package/src/components/Tile/TileContent.ts +5 -0
- package/src/content-page-repository/mapJSON.ts +11 -7
- package/src/content-page-repository/transformMarkdown.ts +3 -1
- package/src/content-page-repository/transformPicture.ts +8 -3
- package/src/hooks/useCreditCalculatorData.ts +2 -3
- package/src/hooks/useExchangeRates.ts +70 -10
- package/src/hooks/useTableArrowScrollControl.ts +3 -3
- package/src/icons/DoneIcon.svg +4 -0
- package/src/icons/IconName.ts +4 -1
- package/src/model/Insurance.ts +6 -0
- package/src/react/IntersectionObserverTag.tsx +23 -0
- package/src/{setup-fixture.ts → react/setup-fixture.ts} +5 -2
- package/src/services/sitemap/isHrefActive.ts +2 -1
- package/src/ui-kit/Button/ArrowButton.tsx +1 -1
- package/src/ui-kit/Button/Button.fixture.mobile.tsx +1 -1
- package/src/ui-kit/Button/Button.fixture.tsx +1 -1
- package/src/ui-kit/Button/ButtonSection.tsx +3 -1
- package/src/ui-kit/Button/renderArrows.tsx +41 -0
- package/src/ui-kit/HeaderItem/HeaderItem.fixture.tsx +1 -1
- package/src/ui-kit/Icon/Icon.fixture.tsx +2 -2
- package/src/ui-kit/Img/Img.mobile.tsx +1 -0
- package/src/ui-kit/Input/Input.tsx +21 -5
- package/src/ui-kit/Input/InputProps.ts +3 -0
- package/src/ui-kit/InputRange/InputRange.tsx +14 -6
- package/src/ui-kit/List/List.fixture.tsx +1 -1
- package/src/ui-kit/Logo/Logo.fixture.tsx +1 -1
- package/src/ui-kit/SVG.tsx +2 -2
- package/src/ui-kit/SearchBar.mobile.tsx +1 -3
- package/src/ui-kit/Select/Select.tsx +17 -7
- package/src/ui-kit/SwipeListControl/SwipeListControl.fixture.mobile.tsx +1 -1
- package/src/ui-kit/SwipeListControl/SwipeListControl.tsx +9 -4
- package/src/ui-kit/SwipeListControl/SwipeListControlDots.tsx +3 -1
- package/src/ui-kit/SwipeListControl/utils/getIndexParts.ts +6 -2
- package/src/ui-kit/TableArrowScrollControl/TableArrowScrollControl.tsx +9 -18
- package/src/ui-kit/TableArrowScrollControl/TableArrowScrollControlProps.ts +6 -4
- package/src/ui-kit/Tabs/Tabs.tsx +4 -3
- package/src/ui-kit/TopItem/TopItem.fixture.tsx +1 -1
- package/src/ui-kit/TopItem/TopItem.tsx +8 -9
- package/src/utils/changeHashOnScroll.ts +3 -1
- package/src/utils/getCurrentDate.ts +1 -1
- package/src/utils/roundTo.ts +4 -0
- package/dist/components/CreditCalculator/CreditCalculator.d.ts +0 -5
- package/dist/components/CreditCalculator/CreditCalculator.js +0 -14
- package/dist/components/CreditCalculator/CreditCalculator.js.map +0 -1
- package/dist/components/CreditCalculator/CreditCalculatorContent.d.ts +0 -30
- package/dist/components/CreditCalculator/CreditCalculatorContent.js.map +0 -1
- package/dist/components/CreditCalculator/CreditCalculatorForm.d.ts +0 -5
- package/dist/components/CreditCalculator/CreditCalculatorForm.js +0 -53
- package/dist/components/CreditCalculator/CreditCalculatorForm.js.map +0 -1
- package/dist/components/CreditCalculator/constants.d.ts +0 -7
- package/dist/components/CreditCalculator/constants.js +0 -10
- package/dist/components/CreditCalculator/constants.js.map +0 -1
- package/dist/components/CreditCalculator/defaultTabs.d.ts +0 -2
- package/dist/components/CreditCalculator/defaultTabs.js +0 -23
- package/dist/components/CreditCalculator/defaultTabs.js.map +0 -1
- package/dist/components/CreditCalculator/getCalculatorParams.d.ts +0 -7
- package/dist/components/CreditCalculator/getCalculatorParams.js +0 -11
- package/dist/components/CreditCalculator/getCalculatorParams.js.map +0 -1
- package/dist/components/CreditCalculator/getCreditRate.d.ts +0 -7
- package/dist/components/CreditCalculator/getCreditRate.js +0 -13
- package/dist/components/CreditCalculator/getCreditRate.js.map +0 -1
- package/dist/components/CreditCalculator/getCreditTermYears.d.ts +0 -1
- package/dist/components/CreditCalculator/getCreditTermYears.js +0 -15
- package/dist/components/CreditCalculator/getCreditTermYears.js.map +0 -1
- package/dist/components/CreditCalculator/getDefaultMonths.d.ts +0 -2
- package/dist/components/CreditCalculator/getDefaultMonths.js +0 -8
- package/dist/components/CreditCalculator/getDefaultMonths.js.map +0 -1
- package/dist/components/CreditCalculator/getDefaultSum.d.ts +0 -2
- package/dist/components/CreditCalculator/getDefaultSum.js +0 -8
- package/dist/components/CreditCalculator/getDefaultSum.js.map +0 -1
- package/dist/components/CreditCalculator/getMonthlyPayment.d.ts +0 -11
- package/dist/components/CreditCalculator/getMonthlyPayment.js +0 -19
- package/dist/components/CreditCalculator/getMonthlyPayment.js.map +0 -1
- package/dist/components/CreditCalculator/renderButton.d.ts +0 -1
- package/dist/components/CreditCalculator/renderButton.js +0 -15
- package/dist/components/CreditCalculator/renderButton.js.map +0 -1
- package/dist/components/CreditCalculator/renderMonthsInput.d.ts +0 -10
- package/dist/components/CreditCalculator/renderMonthsInput.js +0 -11
- package/dist/components/CreditCalculator/renderMonthsInput.js.map +0 -1
- package/dist/components/CreditCalculator/renderProposal.d.ts +0 -1
- package/dist/components/CreditCalculator/renderProposal.js +0 -9
- package/dist/components/CreditCalculator/renderProposal.js.map +0 -1
- package/dist/components/CreditCalculator/renderTermsButton.d.ts +0 -1
- package/dist/components/CreditCalculator/renderTermsButton.js +0 -9
- package/dist/components/CreditCalculator/renderTermsButton.js.map +0 -1
- package/dist/components/CreditCalculator/renderWantedSumInput.d.ts +0 -10
- package/dist/components/CreditCalculator/renderWantedSumInput.js +0 -18
- package/dist/components/CreditCalculator/renderWantedSumInput.js.map +0 -1
- package/dist/components/Header/HeaderSubMenuObserver.d.ts +0 -1
- package/dist/components/Header/HeaderSubMenuObserver.js +0 -36
- package/dist/components/Header/HeaderSubMenuObserver.js.map +0 -1
- package/dist/setup-fixture.js.map +0 -1
- package/lib/components/CreditCalculator/CreditCalculator.d.ts +0 -5
- package/lib/components/CreditCalculator/CreditCalculator.js +0 -12
- package/lib/components/CreditCalculator/CreditCalculator.js.map +0 -1
- package/lib/components/CreditCalculator/CreditCalculatorContent.d.ts +0 -30
- package/lib/components/CreditCalculator/CreditCalculatorContent.js +0 -2
- package/lib/components/CreditCalculator/CreditCalculatorContent.js.map +0 -1
- package/lib/components/CreditCalculator/CreditCalculatorForm.d.ts +0 -5
- package/lib/components/CreditCalculator/CreditCalculatorForm.js +0 -51
- package/lib/components/CreditCalculator/CreditCalculatorForm.js.map +0 -1
- package/lib/components/CreditCalculator/constants.d.ts +0 -7
- package/lib/components/CreditCalculator/constants.js +0 -8
- package/lib/components/CreditCalculator/constants.js.map +0 -1
- package/lib/components/CreditCalculator/defaultTabs.d.ts +0 -2
- package/lib/components/CreditCalculator/defaultTabs.js +0 -21
- package/lib/components/CreditCalculator/defaultTabs.js.map +0 -1
- package/lib/components/CreditCalculator/getCalculatorParams.d.ts +0 -7
- package/lib/components/CreditCalculator/getCalculatorParams.js +0 -8
- package/lib/components/CreditCalculator/getCalculatorParams.js.map +0 -1
- package/lib/components/CreditCalculator/getCreditRate.d.ts +0 -7
- package/lib/components/CreditCalculator/getCreditRate.js +0 -10
- package/lib/components/CreditCalculator/getCreditRate.js.map +0 -1
- package/lib/components/CreditCalculator/getCreditTermYears.d.ts +0 -1
- package/lib/components/CreditCalculator/getCreditTermYears.js +0 -12
- package/lib/components/CreditCalculator/getCreditTermYears.js.map +0 -1
- package/lib/components/CreditCalculator/getDefaultMonths.d.ts +0 -2
- package/lib/components/CreditCalculator/getDefaultMonths.js +0 -5
- package/lib/components/CreditCalculator/getDefaultMonths.js.map +0 -1
- package/lib/components/CreditCalculator/getDefaultSum.d.ts +0 -2
- package/lib/components/CreditCalculator/getDefaultSum.js +0 -5
- package/lib/components/CreditCalculator/getDefaultSum.js.map +0 -1
- package/lib/components/CreditCalculator/getMonthlyPayment.d.ts +0 -11
- package/lib/components/CreditCalculator/getMonthlyPayment.js +0 -16
- package/lib/components/CreditCalculator/getMonthlyPayment.js.map +0 -1
- package/lib/components/CreditCalculator/renderButton.d.ts +0 -1
- package/lib/components/CreditCalculator/renderButton.js +0 -12
- package/lib/components/CreditCalculator/renderButton.js.map +0 -1
- package/lib/components/CreditCalculator/renderMonthsInput.d.ts +0 -10
- package/lib/components/CreditCalculator/renderMonthsInput.js +0 -8
- package/lib/components/CreditCalculator/renderMonthsInput.js.map +0 -1
- package/lib/components/CreditCalculator/renderProposal.d.ts +0 -1
- package/lib/components/CreditCalculator/renderProposal.js +0 -6
- package/lib/components/CreditCalculator/renderProposal.js.map +0 -1
- package/lib/components/CreditCalculator/renderTermsButton.d.ts +0 -1
- package/lib/components/CreditCalculator/renderTermsButton.js +0 -6
- package/lib/components/CreditCalculator/renderTermsButton.js.map +0 -1
- package/lib/components/CreditCalculator/renderWantedSumInput.d.ts +0 -10
- package/lib/components/CreditCalculator/renderWantedSumInput.js +0 -15
- package/lib/components/CreditCalculator/renderWantedSumInput.js.map +0 -1
- package/lib/components/Header/HeaderSubMenuObserver.d.ts +0 -1
- package/lib/components/Header/HeaderSubMenuObserver.js +0 -34
- package/lib/components/Header/HeaderSubMenuObserver.js.map +0 -1
- package/lib/setup-fixture.js.map +0 -1
- package/mobile/dist/components/CreditCalculator/CreditCalculator.d.ts +0 -5
- package/mobile/dist/components/CreditCalculator/CreditCalculator.js +0 -14
- package/mobile/dist/components/CreditCalculator/CreditCalculator.js.map +0 -1
- package/mobile/dist/components/CreditCalculator/CreditCalculatorContent.d.ts +0 -30
- package/mobile/dist/components/CreditCalculator/CreditCalculatorContent.js.map +0 -1
- package/mobile/dist/components/CreditCalculator/CreditCalculatorForm.d.ts +0 -5
- package/mobile/dist/components/CreditCalculator/CreditCalculatorForm.js +0 -53
- package/mobile/dist/components/CreditCalculator/CreditCalculatorForm.js.map +0 -1
- package/mobile/dist/components/CreditCalculator/constants.d.ts +0 -7
- package/mobile/dist/components/CreditCalculator/constants.js +0 -10
- package/mobile/dist/components/CreditCalculator/constants.js.map +0 -1
- package/mobile/dist/components/CreditCalculator/defaultTabs.d.ts +0 -2
- package/mobile/dist/components/CreditCalculator/defaultTabs.js +0 -23
- package/mobile/dist/components/CreditCalculator/defaultTabs.js.map +0 -1
- package/mobile/dist/components/CreditCalculator/getCalculatorParams.d.ts +0 -7
- package/mobile/dist/components/CreditCalculator/getCalculatorParams.js +0 -11
- package/mobile/dist/components/CreditCalculator/getCalculatorParams.js.map +0 -1
- package/mobile/dist/components/CreditCalculator/getCreditRate.d.ts +0 -7
- package/mobile/dist/components/CreditCalculator/getCreditRate.js +0 -13
- package/mobile/dist/components/CreditCalculator/getCreditRate.js.map +0 -1
- package/mobile/dist/components/CreditCalculator/getCreditTermYears.d.ts +0 -1
- package/mobile/dist/components/CreditCalculator/getCreditTermYears.js +0 -15
- package/mobile/dist/components/CreditCalculator/getCreditTermYears.js.map +0 -1
- package/mobile/dist/components/CreditCalculator/getDefaultMonths.d.ts +0 -2
- package/mobile/dist/components/CreditCalculator/getDefaultMonths.js +0 -8
- package/mobile/dist/components/CreditCalculator/getDefaultMonths.js.map +0 -1
- package/mobile/dist/components/CreditCalculator/getDefaultSum.d.ts +0 -2
- package/mobile/dist/components/CreditCalculator/getDefaultSum.js +0 -8
- package/mobile/dist/components/CreditCalculator/getDefaultSum.js.map +0 -1
- package/mobile/dist/components/CreditCalculator/getMonthlyPayment.d.ts +0 -11
- package/mobile/dist/components/CreditCalculator/getMonthlyPayment.js +0 -19
- package/mobile/dist/components/CreditCalculator/getMonthlyPayment.js.map +0 -1
- package/mobile/dist/components/CreditCalculator/renderButton.d.ts +0 -1
- package/mobile/dist/components/CreditCalculator/renderButton.js +0 -15
- package/mobile/dist/components/CreditCalculator/renderButton.js.map +0 -1
- package/mobile/dist/components/CreditCalculator/renderMonthsInput.d.ts +0 -10
- package/mobile/dist/components/CreditCalculator/renderMonthsInput.js +0 -11
- package/mobile/dist/components/CreditCalculator/renderMonthsInput.js.map +0 -1
- package/mobile/dist/components/CreditCalculator/renderProposal.d.ts +0 -1
- package/mobile/dist/components/CreditCalculator/renderProposal.js +0 -9
- package/mobile/dist/components/CreditCalculator/renderProposal.js.map +0 -1
- package/mobile/dist/components/CreditCalculator/renderTermsButton.d.ts +0 -1
- package/mobile/dist/components/CreditCalculator/renderTermsButton.js +0 -9
- package/mobile/dist/components/CreditCalculator/renderTermsButton.js.map +0 -1
- package/mobile/dist/components/CreditCalculator/renderWantedSumInput.d.ts +0 -10
- package/mobile/dist/components/CreditCalculator/renderWantedSumInput.js +0 -18
- package/mobile/dist/components/CreditCalculator/renderWantedSumInput.js.map +0 -1
- package/mobile/dist/components/Header/HeaderSubMenuObserver.d.ts +0 -1
- package/mobile/dist/components/Header/HeaderSubMenuObserver.js +0 -36
- package/mobile/dist/components/Header/HeaderSubMenuObserver.js.map +0 -1
- package/mobile/dist/setup-fixture.js.map +0 -1
- package/mobile/lib/components/CreditCalculator/CreditCalculator.d.ts +0 -5
- package/mobile/lib/components/CreditCalculator/CreditCalculator.js +0 -12
- package/mobile/lib/components/CreditCalculator/CreditCalculator.js.map +0 -1
- package/mobile/lib/components/CreditCalculator/CreditCalculatorContent.d.ts +0 -30
- package/mobile/lib/components/CreditCalculator/CreditCalculatorContent.js +0 -2
- package/mobile/lib/components/CreditCalculator/CreditCalculatorContent.js.map +0 -1
- package/mobile/lib/components/CreditCalculator/CreditCalculatorForm.d.ts +0 -5
- package/mobile/lib/components/CreditCalculator/CreditCalculatorForm.js +0 -51
- package/mobile/lib/components/CreditCalculator/CreditCalculatorForm.js.map +0 -1
- package/mobile/lib/components/CreditCalculator/constants.d.ts +0 -7
- package/mobile/lib/components/CreditCalculator/constants.js +0 -8
- package/mobile/lib/components/CreditCalculator/constants.js.map +0 -1
- package/mobile/lib/components/CreditCalculator/defaultTabs.d.ts +0 -2
- package/mobile/lib/components/CreditCalculator/defaultTabs.js +0 -21
- package/mobile/lib/components/CreditCalculator/defaultTabs.js.map +0 -1
- package/mobile/lib/components/CreditCalculator/getCalculatorParams.d.ts +0 -7
- package/mobile/lib/components/CreditCalculator/getCalculatorParams.js +0 -8
- package/mobile/lib/components/CreditCalculator/getCalculatorParams.js.map +0 -1
- package/mobile/lib/components/CreditCalculator/getCreditRate.d.ts +0 -7
- package/mobile/lib/components/CreditCalculator/getCreditRate.js +0 -10
- package/mobile/lib/components/CreditCalculator/getCreditRate.js.map +0 -1
- package/mobile/lib/components/CreditCalculator/getCreditTermYears.d.ts +0 -1
- package/mobile/lib/components/CreditCalculator/getCreditTermYears.js +0 -12
- package/mobile/lib/components/CreditCalculator/getCreditTermYears.js.map +0 -1
- package/mobile/lib/components/CreditCalculator/getDefaultMonths.d.ts +0 -2
- package/mobile/lib/components/CreditCalculator/getDefaultMonths.js +0 -5
- package/mobile/lib/components/CreditCalculator/getDefaultMonths.js.map +0 -1
- package/mobile/lib/components/CreditCalculator/getDefaultSum.d.ts +0 -2
- package/mobile/lib/components/CreditCalculator/getDefaultSum.js +0 -5
- package/mobile/lib/components/CreditCalculator/getDefaultSum.js.map +0 -1
- package/mobile/lib/components/CreditCalculator/getMonthlyPayment.d.ts +0 -11
- package/mobile/lib/components/CreditCalculator/getMonthlyPayment.js +0 -16
- package/mobile/lib/components/CreditCalculator/getMonthlyPayment.js.map +0 -1
- package/mobile/lib/components/CreditCalculator/renderButton.d.ts +0 -1
- package/mobile/lib/components/CreditCalculator/renderButton.js +0 -12
- package/mobile/lib/components/CreditCalculator/renderButton.js.map +0 -1
- package/mobile/lib/components/CreditCalculator/renderMonthsInput.d.ts +0 -10
- package/mobile/lib/components/CreditCalculator/renderMonthsInput.js +0 -8
- package/mobile/lib/components/CreditCalculator/renderMonthsInput.js.map +0 -1
- package/mobile/lib/components/CreditCalculator/renderProposal.d.ts +0 -1
- package/mobile/lib/components/CreditCalculator/renderProposal.js +0 -6
- package/mobile/lib/components/CreditCalculator/renderProposal.js.map +0 -1
- package/mobile/lib/components/CreditCalculator/renderTermsButton.d.ts +0 -1
- package/mobile/lib/components/CreditCalculator/renderTermsButton.js +0 -6
- package/mobile/lib/components/CreditCalculator/renderTermsButton.js.map +0 -1
- package/mobile/lib/components/CreditCalculator/renderWantedSumInput.d.ts +0 -10
- package/mobile/lib/components/CreditCalculator/renderWantedSumInput.js +0 -15
- package/mobile/lib/components/CreditCalculator/renderWantedSumInput.js.map +0 -1
- package/mobile/lib/components/Header/HeaderSubMenuObserver.d.ts +0 -1
- package/mobile/lib/components/Header/HeaderSubMenuObserver.js +0 -34
- package/mobile/lib/components/Header/HeaderSubMenuObserver.js.map +0 -1
- package/mobile/lib/setup-fixture.js.map +0 -1
- package/mobile/src/components/CreditCalculator/CreditCalculator.example.json +0 -25
- package/mobile/src/components/CreditCalculator/CreditCalculator.tsx +0 -31
- package/mobile/src/components/CreditCalculator/CreditCalculatorContent.ts +0 -34
- package/mobile/src/components/CreditCalculator/CreditCalculatorForm.tsx +0 -92
- package/mobile/src/components/CreditCalculator/constants.ts +0 -8
- package/mobile/src/components/CreditCalculator/defaultTabs.ts +0 -22
- package/mobile/src/components/CreditCalculator/getCalculatorParams.ts +0 -16
- package/mobile/src/components/CreditCalculator/getCreditRate.ts +0 -18
- package/mobile/src/components/CreditCalculator/getCreditTermYears.spec.ts +0 -10
- package/mobile/src/components/CreditCalculator/getCreditTermYears.ts +0 -15
- package/mobile/src/components/CreditCalculator/getDefaultMonths.ts +0 -7
- package/mobile/src/components/CreditCalculator/getDefaultSum.ts +0 -7
- package/mobile/src/components/CreditCalculator/getMonthlyPayment.ts +0 -32
- package/mobile/src/components/CreditCalculator/renderButton.tsx +0 -23
- package/mobile/src/components/CreditCalculator/renderMonthsInput.tsx +0 -29
- package/mobile/src/components/CreditCalculator/renderProposal.tsx +0 -13
- package/mobile/src/components/CreditCalculator/renderTermsButton.tsx +0 -16
- package/mobile/src/components/CreditCalculator/renderWantedSumInput.tsx +0 -36
- package/mobile/src/components/Header/HeaderSubMenuObserver.ts +0 -48
- package/mobile/src/components/Insurance/Insuranse.example.json +0 -36
- package/src/components/CreditCalculator/CreditCalculator.example.json +0 -25
- package/src/components/CreditCalculator/CreditCalculator.fixture.tsx +0 -32
- package/src/components/CreditCalculator/CreditCalculator.tsx +0 -31
- package/src/components/CreditCalculator/CreditCalculatorContent.ts +0 -34
- package/src/components/CreditCalculator/CreditCalculatorForm.tsx +0 -92
- package/src/components/CreditCalculator/constants.ts +0 -8
- package/src/components/CreditCalculator/defaultTabs.ts +0 -22
- package/src/components/CreditCalculator/getCalculatorParams.ts +0 -16
- package/src/components/CreditCalculator/getCreditRate.ts +0 -18
- package/src/components/CreditCalculator/getCreditTermYears.spec.ts +0 -10
- package/src/components/CreditCalculator/getCreditTermYears.ts +0 -15
- package/src/components/CreditCalculator/getDefaultMonths.ts +0 -7
- package/src/components/CreditCalculator/getDefaultSum.ts +0 -7
- package/src/components/CreditCalculator/getMonthlyPayment.ts +0 -32
- package/src/components/CreditCalculator/renderButton.tsx +0 -23
- package/src/components/CreditCalculator/renderMonthsInput.tsx +0 -29
- package/src/components/CreditCalculator/renderProposal.tsx +0 -13
- package/src/components/CreditCalculator/renderTermsButton.tsx +0 -16
- package/src/components/CreditCalculator/renderWantedSumInput.tsx +0 -36
- package/src/components/Header/HeaderSubMenuObserver.ts +0 -48
- package/src/components/Insurance/Insuranse.example.json +0 -36
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import type { FuncReturnVoid, UniBlockProps } from '../../types';
|
|
3
|
-
import { ArrowButton } from '../../ui-kit/Button/ArrowButton';
|
|
4
3
|
import { Img } from '../../ui-kit/Img/Img';
|
|
5
|
-
import type { CalculatorBlockDef, CalculatorContent } from './CalculatorContent';
|
|
6
|
-
import { CalculatorNav } from './CalculatorContent';
|
|
4
|
+
import type { CalculatorBlockDef, CalculatorContent, CalculatorNav } from './CalculatorContent';
|
|
7
5
|
import { renderCalculatorBlock } from './renderCalculatorBlock';
|
|
6
|
+
import { renderArrows } from '../../ui-kit/Button/renderArrows';
|
|
8
7
|
|
|
9
8
|
export interface CalculatorProps extends CalculatorContent, UniBlockProps {}
|
|
10
9
|
|
|
@@ -22,9 +21,6 @@ type NavButtonProps = {
|
|
|
22
21
|
onClick: FuncReturnVoid<MouseEvent>;
|
|
23
22
|
};
|
|
24
23
|
|
|
25
|
-
const arrowBtnStyle =
|
|
26
|
-
'absolute w-[56px] h-[56px] min-h-[56px] max-h-[56px] top-1 z-10 mt-[25px] bg-white rounded-full';
|
|
27
|
-
|
|
28
24
|
export const Calculator = JSX<CalculatorProps>(
|
|
29
25
|
({ className = '', context, calcTabs = [], anchor = null }) => {
|
|
30
26
|
const tabsNav = calcTabs.map((_) => _.nav || ({} as CalculatorNav));
|
|
@@ -50,22 +46,12 @@ export const Calculator = JSX<CalculatorProps>(
|
|
|
50
46
|
{tabsNav.length > 1
|
|
51
47
|
? renderTabs({ tabsShift, tabsNav, activeSlideIndex, setActiveSlideIndex })
|
|
52
48
|
: null}
|
|
53
|
-
{
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
/>
|
|
60
|
-
) : null}
|
|
61
|
-
{showNextButton ? (
|
|
62
|
-
<ArrowButton
|
|
63
|
-
className={`${arrowBtnStyle} right-3 top-3 rotate-180`}
|
|
64
|
-
onClick={handleNextClick}
|
|
65
|
-
ariaLabel="Пролистать вправо"
|
|
66
|
-
data-block-control="scroll-right"
|
|
67
|
-
/>
|
|
68
|
-
) : null}
|
|
49
|
+
{renderArrows({
|
|
50
|
+
handler: [handlePrevClick, handleNextClick],
|
|
51
|
+
isShown: [showPrevButton, showNextButton],
|
|
52
|
+
btnClass: ['left-3', 'right-3'],
|
|
53
|
+
className: 'top-8',
|
|
54
|
+
})}
|
|
69
55
|
</div>
|
|
70
56
|
<div
|
|
71
57
|
className="flex"
|
|
@@ -8,7 +8,9 @@ interface GetCalculatorParamsParams {
|
|
|
8
8
|
export const getCalculatorParams = (params: GetCalculatorParamsParams) => {
|
|
9
9
|
const { tableRows, isAnnuity = false } = params;
|
|
10
10
|
|
|
11
|
-
if (!tableRows)
|
|
11
|
+
if (!tableRows) {
|
|
12
|
+
return {};
|
|
13
|
+
}
|
|
12
14
|
|
|
13
15
|
const calculatorParams = tableRows.find((row) => row.isAnnuity === isAnnuity);
|
|
14
16
|
|
|
@@ -10,7 +10,9 @@ interface GetCreditRateParams {
|
|
|
10
10
|
export const getCreditRate = (params: GetCreditRateParams) => {
|
|
11
11
|
const { calculatorParams, isInsurance } = params;
|
|
12
12
|
|
|
13
|
-
if (!calculatorParams)
|
|
13
|
+
if (!calculatorParams) {
|
|
14
|
+
return DEFAULT_RATE;
|
|
15
|
+
}
|
|
14
16
|
|
|
15
17
|
return isInsurance
|
|
16
18
|
? calculatorParams?.rateWithInsurance || DEFAULT_RATE
|
|
@@ -15,7 +15,9 @@ interface GetMonthlyPaymentParams {
|
|
|
15
15
|
export const getMonthlyPayment = (params: GetMonthlyPaymentParams) => {
|
|
16
16
|
const { calculatorParams, paymentType, rate, sum, months } = params;
|
|
17
17
|
|
|
18
|
-
if (!calculatorParams)
|
|
18
|
+
if (!calculatorParams) {
|
|
19
|
+
return 0;
|
|
20
|
+
}
|
|
19
21
|
|
|
20
22
|
const finalSum = clamp(
|
|
21
23
|
sum,
|
|
@@ -1,14 +1,7 @@
|
|
|
1
1
|
import type { JSXBlock } from '../../components/ContentPage/ContentPage';
|
|
2
|
-
import type { ContentPageContext } from '../../components/ContentPage/ContentPageContext';
|
|
3
2
|
import type { CalculatorBlockDef } from './CalculatorContent';
|
|
4
3
|
import { EmbeddableCalcBlocks, EmbeddableCalcProps } from './EmbeddableCalcBlocks';
|
|
5
4
|
|
|
6
|
-
type EmbeddableCalcBlocks = {
|
|
7
|
-
blockCalcTabs?: CalculatorBlockDef[];
|
|
8
|
-
context: ContentPageContext;
|
|
9
|
-
className?: string;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
5
|
export const renderCalculatorBlock =
|
|
13
6
|
({ context, className }: any) =>
|
|
14
7
|
(blockCalcTabs: CalculatorBlockDef, i: number) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Picture } from '../../model/Picture';
|
|
2
|
-
import { context } from '../../setup-fixture';
|
|
2
|
+
import { context } from '../../react/setup-fixture';
|
|
3
3
|
import { ComparisonTable } from './ComparisonTable';
|
|
4
4
|
import type { Column } from './ComparisonTableContent';
|
|
5
5
|
|
|
@@ -96,30 +96,6 @@ const columns: Column[] = [
|
|
|
96
96
|
],
|
|
97
97
|
],
|
|
98
98
|
},
|
|
99
|
-
{
|
|
100
|
-
header: {
|
|
101
|
-
title: 'Профсоюзная',
|
|
102
|
-
image: image3,
|
|
103
|
-
link: {
|
|
104
|
-
text: 'Подробнее',
|
|
105
|
-
href: '/credits',
|
|
106
|
-
},
|
|
107
|
-
},
|
|
108
|
-
data: [
|
|
109
|
-
[{ label: 'Нет' }],
|
|
110
|
-
[{ label: 'Бесплатно' }],
|
|
111
|
-
[{ label: 'Есть' }],
|
|
112
|
-
[{ label: 'До 20%' }],
|
|
113
|
-
[
|
|
114
|
-
{
|
|
115
|
-
label: 'Бесплатно',
|
|
116
|
-
description: 'При обороте по карте от 10000 ₽ в месяц',
|
|
117
|
-
},
|
|
118
|
-
],
|
|
119
|
-
[{ label: '69 рублей в месяц' }],
|
|
120
|
-
[{ description: 'Для членов профсоюзных организаций' }],
|
|
121
|
-
],
|
|
122
|
-
},
|
|
123
99
|
];
|
|
124
100
|
export default {
|
|
125
101
|
default: (
|
|
@@ -131,7 +107,7 @@ export default {
|
|
|
131
107
|
context={context}
|
|
132
108
|
rowHeaders={rowHeaders}
|
|
133
109
|
orientation="vertical"
|
|
134
|
-
columns={
|
|
110
|
+
columns={columns}
|
|
135
111
|
visibleRowLength={2}
|
|
136
112
|
/>
|
|
137
113
|
</div>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Picture } from '../../model/Picture';
|
|
2
|
-
import { context } from '../../setup-fixture';
|
|
2
|
+
import { context } from '../../react/setup-fixture';
|
|
3
3
|
import { ComparisonTable } from './ComparisonTable';
|
|
4
4
|
import type { Column } from './ComparisonTableContent';
|
|
5
5
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import type { LinkProps } from '../../model/LinkProps';
|
|
3
3
|
import type { Picture } from '../../model/Picture';
|
|
4
|
-
import { Img } from '../../ui-kit/Img/Img';
|
|
5
4
|
import { Heading } from '../../ui-kit/Heading/Heading';
|
|
5
|
+
import { Img } from '../../ui-kit/Img/Img';
|
|
6
6
|
|
|
7
7
|
export interface HeaderCellProps {
|
|
8
8
|
icon?: Picture;
|
|
@@ -13,6 +13,10 @@ export interface HeaderCellProps {
|
|
|
13
13
|
link?: LinkProps;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
const headingStyle = (isFillGradient = false): string => (isFillGradient ? 'text-white' : '');
|
|
17
|
+
const subtitleStyle = (isFillGradient = false): string =>
|
|
18
|
+
`text-m-sm mb-3.5 ${isFillGradient ? 'text-white' : 'text-secondary-text/80'}`;
|
|
19
|
+
|
|
16
20
|
export const HeaderCell = JSX<HeaderCellProps>(
|
|
17
21
|
({ icon, image, title, subtitle, isFillGradient }) => (
|
|
18
22
|
<div role="columnheader" scope="col">
|
|
@@ -30,19 +34,9 @@ export const HeaderCell = JSX<HeaderCellProps>(
|
|
|
30
34
|
</div>
|
|
31
35
|
)}
|
|
32
36
|
{title ? (
|
|
33
|
-
<Heading
|
|
34
|
-
headingType="h4"
|
|
35
|
-
className={`${isFillGradient ? 'text-white' : ''}`}
|
|
36
|
-
title={title}
|
|
37
|
-
/>
|
|
38
|
-
) : null}
|
|
39
|
-
{subtitle ? (
|
|
40
|
-
<div
|
|
41
|
-
className={`text-m-sm mb-3.5 ${isFillGradient ? 'text-white' : 'text-secondary-text/80'}`}
|
|
42
|
-
>
|
|
43
|
-
{subtitle}
|
|
44
|
-
</div>
|
|
37
|
+
<Heading headingType="h4" className={headingStyle(isFillGradient)} title={title} />
|
|
45
38
|
) : null}
|
|
39
|
+
{subtitle ? <div className={subtitleStyle(isFillGradient)}>{subtitle}</div> : null}
|
|
46
40
|
</div>
|
|
47
41
|
),
|
|
48
42
|
);
|
|
@@ -22,6 +22,11 @@ export const TableCell = JSX<TableCellProps>(({ cell, rowHeader, isFillGradient
|
|
|
22
22
|
);
|
|
23
23
|
});
|
|
24
24
|
|
|
25
|
+
const labelStyle = (isFillGradient = false): string =>
|
|
26
|
+
`text-right ${isFillGradient ? 'text-white' : ''}`;
|
|
27
|
+
const descriptionStyle = (isFillGradient = false): string =>
|
|
28
|
+
`text-right ${isFillGradient ? 'text-white/80' : 'text-secondary-text'}`;
|
|
29
|
+
|
|
25
30
|
const renderCellInner =
|
|
26
31
|
(isFillGradient: boolean, rowHeader?: string) =>
|
|
27
32
|
({ label, description }: CellData, i: number) =>
|
|
@@ -31,15 +36,9 @@ const renderCellInner =
|
|
|
31
36
|
{rowHeader}
|
|
32
37
|
</div>
|
|
33
38
|
<div className="basis-1/2">
|
|
34
|
-
{label ? (
|
|
35
|
-
<div className={`text-right ${isFillGradient ? 'text-white' : ''}`}>{label}</div>
|
|
36
|
-
) : null}
|
|
39
|
+
{label ? <div className={labelStyle(isFillGradient)}>{label}</div> : null}
|
|
37
40
|
{description ? (
|
|
38
|
-
<div
|
|
39
|
-
className={`text-right ${isFillGradient ? 'text-white/80' : 'text-secondary-text'}`}
|
|
40
|
-
>
|
|
41
|
-
{description}
|
|
42
|
-
</div>
|
|
41
|
+
<div className={descriptionStyle(isFillGradient)}>{description}</div>
|
|
43
42
|
) : null}
|
|
44
43
|
</div>
|
|
45
44
|
</div>
|
|
@@ -28,17 +28,14 @@ export const TableCell = JSX<TableCellProps>(({ cell, isFirstRow, isLastRow, isF
|
|
|
28
28
|
);
|
|
29
29
|
});
|
|
30
30
|
|
|
31
|
+
const labelStyle = (isFillGradient = false): string =>
|
|
32
|
+
`text-xl font-medium m-0 ${isFillGradient ? 'text-white' : ''}`;
|
|
33
|
+
const descriptionStyle = (isFillGradient = false): string =>
|
|
34
|
+
`text-sm opacity-80 ${isFillGradient ? 'text-white' : 'text-secondary-text'}`;
|
|
35
|
+
|
|
31
36
|
const renderCellInner = ({ label, description }: CellData, i: number, isFillGradient: boolean) => (
|
|
32
37
|
<div key={String(i)} className="first:pt-7 pt-6 last:pb-7">
|
|
33
|
-
{label ? (
|
|
34
|
-
|
|
35
|
-
) : null}
|
|
36
|
-
{description ? (
|
|
37
|
-
<div
|
|
38
|
-
className={`text-sm opacity-80 ${isFillGradient ? 'text-white' : 'text-secondary-text'}`}
|
|
39
|
-
>
|
|
40
|
-
{description}
|
|
41
|
-
</div>
|
|
42
|
-
) : null}
|
|
38
|
+
{label ? <h4 className={labelStyle(isFillGradient)}>{label}</h4> : null}
|
|
39
|
+
{description ? <div className={descriptionStyle(isFillGradient)}>{description}</div> : null}
|
|
43
40
|
</div>
|
|
44
41
|
);
|
|
@@ -14,18 +14,15 @@ export interface TableRowProps {
|
|
|
14
14
|
isLastRow: boolean;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
+
const titleStyle = (isLastRow = false) =>
|
|
18
|
+
`text-sm py-7 ${DIVIDER_CLASSES} ${FIRST_CELL_CLASSES} ${
|
|
19
|
+
isLastRow ? 'border-b-0' : 'border-solid'
|
|
20
|
+
}`;
|
|
21
|
+
|
|
17
22
|
export const TableRow = JSX<TableRowProps>(
|
|
18
23
|
({ row: { header, data }, activeCardIndex, isColoredFirstColumn, isFirstRow, isLastRow }) => (
|
|
19
24
|
<TableRowContainer>
|
|
20
|
-
{header?.title ? (
|
|
21
|
-
<div
|
|
22
|
-
className={`text-sm py-7 ${DIVIDER_CLASSES} ${FIRST_CELL_CLASSES} ${
|
|
23
|
-
!isLastRow ? 'border-solid' : 'border-b-0'
|
|
24
|
-
}`}
|
|
25
|
-
>
|
|
26
|
-
{header.title}
|
|
27
|
-
</div>
|
|
28
|
-
) : null}
|
|
25
|
+
{header?.title ? <div className={titleStyle(isLastRow)}>{header.title}</div> : null}
|
|
29
26
|
{data?.length ? (
|
|
30
27
|
<TableCarouselContainer activeCardIndex={activeCardIndex} columnWidth={COLUMN_WIDTH}>
|
|
31
28
|
{data.map((cell, i) => (
|
|
@@ -1953,11 +1953,6 @@
|
|
|
1953
1953
|
}
|
|
1954
1954
|
}
|
|
1955
1955
|
},
|
|
1956
|
-
{
|
|
1957
|
-
"type": "CreditCalculator",
|
|
1958
|
-
"anchor": "calculator",
|
|
1959
|
-
"style": ["col-span-12"]
|
|
1960
|
-
},
|
|
1961
1956
|
{
|
|
1962
1957
|
"type": "Recommendation",
|
|
1963
1958
|
"style": ["col-span-12"],
|
|
@@ -2155,7 +2150,7 @@
|
|
|
2155
2150
|
"content": {
|
|
2156
2151
|
"title": "Страховые риски и продукты",
|
|
2157
2152
|
"description": "Описание",
|
|
2158
|
-
"
|
|
2153
|
+
"sum": 500000,
|
|
2159
2154
|
"image": {
|
|
2160
2155
|
"src": "insurance.png",
|
|
2161
2156
|
"title": "страхование",
|
|
@@ -2188,6 +2183,55 @@
|
|
|
2188
2183
|
]
|
|
2189
2184
|
}
|
|
2190
2185
|
},
|
|
2186
|
+
{
|
|
2187
|
+
"type": "InsuranceAmountBlock",
|
|
2188
|
+
"style": ["col-span-12"],
|
|
2189
|
+
"content": {
|
|
2190
|
+
"title": "Выбор страховой суммы",
|
|
2191
|
+
"button": {
|
|
2192
|
+
"href": "https://rshb.ru",
|
|
2193
|
+
"text": "Выбрать программу"
|
|
2194
|
+
},
|
|
2195
|
+
"insuranceTabs": [
|
|
2196
|
+
{
|
|
2197
|
+
"title": "Индивидуальный",
|
|
2198
|
+
"cards": [
|
|
2199
|
+
{
|
|
2200
|
+
"sum": 200000,
|
|
2201
|
+
"fee": 2100,
|
|
2202
|
+
"icon": { "icon": "ActualBalanceIcon" }
|
|
2203
|
+
},
|
|
2204
|
+
{
|
|
2205
|
+
"sum": 200000,
|
|
2206
|
+
"fee": 2100,
|
|
2207
|
+
"icon": { "icon": "ActualBalanceIcon" }
|
|
2208
|
+
},
|
|
2209
|
+
{
|
|
2210
|
+
"sum": 200000,
|
|
2211
|
+
"fee": 2100,
|
|
2212
|
+
"icon": { "icon": "ActualBalanceIcon" }
|
|
2213
|
+
}
|
|
2214
|
+
]
|
|
2215
|
+
},
|
|
2216
|
+
{
|
|
2217
|
+
"title": "Семейный",
|
|
2218
|
+
"cards": [
|
|
2219
|
+
{
|
|
2220
|
+
"sum": 400000,
|
|
2221
|
+
"fee": 3600,
|
|
2222
|
+
"icon": { "icon": "ActualBalanceIcon" }
|
|
2223
|
+
},
|
|
2224
|
+
{
|
|
2225
|
+
"sum": 400000,
|
|
2226
|
+
"fee": 3600,
|
|
2227
|
+
"icon": { "icon": "ActualBalanceIcon" }
|
|
2228
|
+
}
|
|
2229
|
+
]
|
|
2230
|
+
}
|
|
2231
|
+
]
|
|
2232
|
+
}
|
|
2233
|
+
},
|
|
2234
|
+
|
|
2191
2235
|
{
|
|
2192
2236
|
"type": "Footer",
|
|
2193
2237
|
"style": ["col-span-12"],
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { VNode } from '../../model/VNode';
|
|
2
|
+
import type { FuncReturnVoid } from '../../types';
|
|
3
|
+
|
|
1
4
|
export interface Router {
|
|
2
5
|
pathname: string;
|
|
3
6
|
query: Record<string, string | string[] | undefined>;
|
|
@@ -20,19 +23,32 @@ export interface Search {
|
|
|
20
23
|
setTerm: (t: string) => void;
|
|
21
24
|
}
|
|
22
25
|
|
|
23
|
-
export type AsyncDataHook = <Data,
|
|
26
|
+
export type AsyncDataHook = <Data, Err = any>(
|
|
24
27
|
key: string,
|
|
25
|
-
fetcher: (
|
|
26
|
-
) => { data?: Data; error?:
|
|
28
|
+
fetcher: (fetcherKey: string) => Promise<Data>,
|
|
29
|
+
) => { data?: Data; error?: Err };
|
|
27
30
|
|
|
28
31
|
export type GeolocationHook = (defaultLocation: string) => [string, () => void];
|
|
29
32
|
|
|
33
|
+
export type SetStateAction<S> = S | ((prevState: S) => S);
|
|
34
|
+
export type SetStateHook = <State>(
|
|
35
|
+
initialState: State | (() => State),
|
|
36
|
+
) => [State, FuncReturnVoid<SetStateAction<State>>];
|
|
37
|
+
|
|
38
|
+
export interface IntersectionObserverTagProps {
|
|
39
|
+
Tag: string;
|
|
40
|
+
children?: VNode;
|
|
41
|
+
observerCallback: IntersectionObserverCallback;
|
|
42
|
+
observerOptions?: IntersectionObserverInit;
|
|
43
|
+
}
|
|
44
|
+
|
|
30
45
|
export interface ContentPageContext {
|
|
31
46
|
useRouter: () => Router;
|
|
32
|
-
useState:
|
|
47
|
+
useState: SetStateHook;
|
|
33
48
|
useAsyncData: AsyncDataHook;
|
|
34
49
|
useGeolocation: GeolocationHook;
|
|
35
50
|
useLikeService: () => LikeService;
|
|
36
51
|
useSearch: () => Search;
|
|
37
52
|
handlerDecorator?: HandlerDecorator;
|
|
53
|
+
IntersectionObserverTag: (props: IntersectionObserverTagProps & Record<string, any>) => VNode;
|
|
38
54
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { Img } from '../../ui-kit/Img/Img';
|
|
3
|
-
import type { ExchangeCurrencyItem } from './
|
|
3
|
+
import type { ExchangeCurrencyItem } from './ExchangeCurrencyCalculator';
|
|
4
4
|
import { formatCurrency } from './formatCurrency';
|
|
5
5
|
|
|
6
6
|
const TABLE_HEAD_STYLE = 'font-light text-left font-normal text-sm text-secondary-text';
|
|
@@ -31,7 +31,7 @@ export const CurrencyTable = JSX<CurrencyTableProps>(({ className, exchangeCurre
|
|
|
31
31
|
});
|
|
32
32
|
|
|
33
33
|
const renderCurrencyRow = (exchangeCurrencyItem: ExchangeCurrencyItem) => {
|
|
34
|
-
const code = exchangeCurrencyItem?.
|
|
34
|
+
const code = exchangeCurrencyItem?.code;
|
|
35
35
|
return (
|
|
36
36
|
<tr key={code} className="pb-1">
|
|
37
37
|
<td className="pt-4">
|
|
@@ -41,10 +41,10 @@ const renderCurrencyRow = (exchangeCurrencyItem: ExchangeCurrencyItem) => {
|
|
|
41
41
|
</div>
|
|
42
42
|
</td>
|
|
43
43
|
<td className="pt-4 pl-11 m-title-md font-light">
|
|
44
|
-
{formatCurrency(exchangeCurrencyItem.
|
|
44
|
+
{formatCurrency(exchangeCurrencyItem.buy)}
|
|
45
45
|
</td>
|
|
46
46
|
<td className="pt-4 pl-11 m-title-md font-light">
|
|
47
|
-
{formatCurrency(exchangeCurrencyItem.
|
|
47
|
+
{formatCurrency(exchangeCurrencyItem.sell)}
|
|
48
48
|
</td>
|
|
49
49
|
</tr>
|
|
50
50
|
);
|
|
@@ -1,47 +1,132 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
import type { FuncReturnVoid, UniBlockProps } from '../../types';
|
|
3
|
+
import { calculateResult, formatValue } from './calculateResult';
|
|
4
|
+
import { callbackCurrencySelect } from './callbackCurrencySelect';
|
|
5
|
+
import { Currency } from './CurrencyProps';
|
|
6
|
+
import { renderButton } from './renderButton';
|
|
7
|
+
import { renderInput } from './renderInput';
|
|
8
|
+
|
|
9
|
+
export interface ExchangeCurrencyItem {
|
|
10
|
+
code?: Currency;
|
|
11
|
+
buy?: number;
|
|
12
|
+
sell?: number;
|
|
13
|
+
}
|
|
14
|
+
export interface ExchangeCurrencyCalculatorProps extends UniBlockProps {
|
|
11
15
|
className?: string;
|
|
16
|
+
currencyRatesBuy: ExchangeCurrencyItem[];
|
|
17
|
+
currencyRatesSell: ExchangeCurrencyItem[];
|
|
18
|
+
}
|
|
19
|
+
export interface CalcState {
|
|
20
|
+
inputSell: string;
|
|
21
|
+
inputBuy: string;
|
|
22
|
+
selectSell: Currency;
|
|
23
|
+
selectBuy: Currency;
|
|
12
24
|
}
|
|
13
25
|
|
|
14
26
|
export const ExchangeCurrencyCalculator = JSX<ExchangeCurrencyCalculatorProps>(
|
|
15
|
-
({
|
|
27
|
+
({ context, className = '', currencyRatesBuy, currencyRatesSell }) => {
|
|
28
|
+
const [calcState, setCalcState] = context.useState<CalcState>({
|
|
29
|
+
inputSell: '',
|
|
30
|
+
inputBuy: '',
|
|
31
|
+
selectSell: currencyRatesBuy?.[0]?.code || Currency.RUB,
|
|
32
|
+
selectBuy: currencyRatesSell?.[0]?.code || Currency.USD,
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
const handleSetCalcState = (newState: Partial<CalcState>) => {
|
|
36
|
+
setCalcState((oldState) => ({ ...oldState, ...newState }));
|
|
37
|
+
};
|
|
38
|
+
|
|
16
39
|
return (
|
|
17
40
|
<div className={`grid gap-3.5 ${className}`}>
|
|
18
|
-
{renderInput(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
41
|
+
{renderInput({
|
|
42
|
+
placeholder: 'Хочу продать',
|
|
43
|
+
rates: currencyRatesBuy,
|
|
44
|
+
selected: calcState.selectSell,
|
|
45
|
+
setSelected: handleSelectSell(calcState, handleSetCalcState, currencyRatesSell),
|
|
46
|
+
value: calcState.inputSell,
|
|
47
|
+
setValue: (value) =>
|
|
48
|
+
handleInputSell(handleSetCalcState, currencyRatesSell)(
|
|
49
|
+
value,
|
|
50
|
+
calcState.selectSell,
|
|
51
|
+
calcState.selectBuy,
|
|
52
|
+
),
|
|
53
|
+
})}
|
|
54
|
+
{renderInput({
|
|
55
|
+
placeholder: 'Получу',
|
|
56
|
+
rates: currencyRatesSell,
|
|
57
|
+
selected: calcState.selectBuy,
|
|
58
|
+
setSelected: handleSelectBuy(calcState, handleSetCalcState, currencyRatesBuy),
|
|
59
|
+
value: calcState.inputBuy,
|
|
60
|
+
setValue: (value) =>
|
|
61
|
+
handleInputBuy(handleSetCalcState, currencyRatesBuy)(
|
|
62
|
+
value,
|
|
63
|
+
calcState.selectBuy,
|
|
64
|
+
calcState.selectSell,
|
|
65
|
+
),
|
|
66
|
+
})}
|
|
67
|
+
{renderButton()}
|
|
23
68
|
</div>
|
|
24
69
|
);
|
|
25
70
|
},
|
|
26
71
|
);
|
|
27
72
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
73
|
+
const handleSelectSell =
|
|
74
|
+
(
|
|
75
|
+
calcState: CalcState,
|
|
76
|
+
setCalcState: FuncReturnVoid<Partial<CalcState>>,
|
|
77
|
+
currencyRatesSell: ExchangeCurrencyItem[],
|
|
78
|
+
) =>
|
|
79
|
+
(value: Currency) => {
|
|
80
|
+
setCalcState({ selectSell: value });
|
|
81
|
+
callbackCurrencySelect({
|
|
82
|
+
value,
|
|
83
|
+
oppositeValue: calcState.selectBuy,
|
|
84
|
+
handleConvert: (codeFrom = calcState.selectSell, codeTo = calcState.selectBuy) => {
|
|
85
|
+
handleInputSell(setCalcState, currencyRatesSell)(calcState.inputSell, codeFrom, codeTo);
|
|
86
|
+
},
|
|
87
|
+
});
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
const handleSelectBuy =
|
|
91
|
+
(
|
|
92
|
+
calcState: CalcState,
|
|
93
|
+
setCalcState: FuncReturnVoid<Partial<CalcState>>,
|
|
94
|
+
currencyRatesBuy: ExchangeCurrencyItem[],
|
|
95
|
+
) =>
|
|
96
|
+
(value: Currency) => {
|
|
97
|
+
setCalcState({ selectBuy: value });
|
|
98
|
+
callbackCurrencySelect({
|
|
99
|
+
value,
|
|
100
|
+
oppositeValue: calcState.selectSell,
|
|
101
|
+
handleConvert: (codeTo = calcState.selectBuy, codeFrom = calcState.selectSell) =>
|
|
102
|
+
handleInputBuy(setCalcState, currencyRatesBuy)(calcState.inputBuy, codeTo, codeFrom),
|
|
103
|
+
});
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
const handleInputSell =
|
|
107
|
+
(setCalcState: FuncReturnVoid<Partial<CalcState>>, currencyRatesSell: ExchangeCurrencyItem[]) =>
|
|
108
|
+
(value: string, codeFrom: Currency, codeTo: Currency) => {
|
|
109
|
+
setCalcState({ inputSell: formatValue(value), selectBuy: codeTo });
|
|
110
|
+
const rate =
|
|
111
|
+
currencyRatesSell.find((_) => _.code === codeTo)?.buy ||
|
|
112
|
+
currencyRatesSell.find((_) => _.code === codeFrom)?.sell;
|
|
113
|
+
if (rate) {
|
|
114
|
+
setCalcState({
|
|
115
|
+
inputBuy: String(calculateResult(value, rate, codeFrom === Currency.RUB) || ''),
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
const handleInputBuy =
|
|
121
|
+
(setCalcState: FuncReturnVoid<Partial<CalcState>>, currencyRatesBuy: ExchangeCurrencyItem[]) =>
|
|
122
|
+
(value: string, codeTo: Currency, codeFrom: Currency) => {
|
|
123
|
+
setCalcState({ inputBuy: formatValue(value), selectSell: codeFrom });
|
|
124
|
+
const rate =
|
|
125
|
+
currencyRatesBuy.find((_) => _.code === codeFrom)?.sell ||
|
|
126
|
+
currencyRatesBuy.find((_) => _.code === codeTo)?.buy;
|
|
127
|
+
if (rate) {
|
|
128
|
+
setCalcState({
|
|
129
|
+
inputSell: String(calculateResult(value, rate, codeTo === Currency.RUB) || ''),
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
};
|