@redneckz/wildless-cms-uni-blocks 0.3.83 → 0.3.85
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 +390 -324
- package/bundle/bundle.umd.min.js +1 -1
- package/cosmos-static/icons/Logo.svg +1 -0
- package/dist/components/Calculator/BonusCalculatorForm.d.ts +3 -3
- package/dist/components/Calculator/BonusCalculatorForm.js +23 -29
- package/dist/components/Calculator/BonusCalculatorForm.js.map +1 -1
- package/dist/components/Calculator/Calculator.js +7 -7
- package/dist/components/Calculator/Calculator.js.map +1 -1
- package/dist/components/Calculator/CalculatorContent.d.ts +14 -4
- package/dist/components/Calculator/CreditCalculatorForm.d.ts +4 -2
- package/dist/components/Calculator/CreditCalculatorForm.js +38 -41
- package/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/dist/components/Calculator/DepositCalculatorForm.js +14 -28
- package/dist/components/Calculator/DepositCalculatorForm.js.map +1 -1
- package/dist/components/Calculator/EmbeddableCalcBlocks.d.ts +4 -4
- package/dist/components/Calculator/EmbeddableCalcBlocks.js +2 -2
- package/dist/components/Calculator/EmbeddableCalcBlocks.js.map +1 -1
- package/dist/components/Calculator/MortgageCalculatorForm.js +14 -28
- package/dist/components/Calculator/MortgageCalculatorForm.js.map +1 -1
- package/dist/components/Calculator/Rate.d.ts +7 -0
- package/dist/components/Calculator/Rate.js +6 -0
- package/dist/components/Calculator/Rate.js.map +1 -0
- package/dist/components/Calculator/constants.d.ts +13 -4
- package/dist/components/Calculator/constants.js +34 -5
- package/dist/components/Calculator/constants.js.map +1 -1
- package/dist/components/Calculator/getBonus.d.ts +2 -0
- package/dist/components/Calculator/getBonus.js +16 -0
- package/dist/components/Calculator/getBonus.js.map +1 -0
- package/dist/components/Calculator/getDefaultMonths.d.ts +1 -2
- package/dist/components/Calculator/getDefaultMonths.js +1 -4
- package/dist/components/Calculator/getDefaultMonths.js.map +1 -1
- package/dist/components/Calculator/getDefaultSum.d.ts +1 -2
- package/dist/components/Calculator/getDefaultSum.js +1 -3
- package/dist/components/Calculator/getDefaultSum.js.map +1 -1
- package/dist/components/Calculator/getMonthlyPayment.d.ts +6 -11
- package/dist/components/Calculator/getMonthlyPayment.js +10 -11
- package/dist/components/Calculator/getMonthlyPayment.js.map +1 -1
- package/dist/components/Calculator/renderCalculatorBlock.d.ts +1 -1
- package/dist/components/Calculator/renderCalculatorBlock.js +3 -3
- package/dist/components/Calculator/renderCalculatorBlock.js.map +1 -1
- package/dist/components/Calculator/renderInitialFeeInput.d.ts +3 -8
- package/dist/components/Calculator/renderInitialFeeInput.js +7 -6
- package/dist/components/Calculator/renderInitialFeeInput.js.map +1 -1
- package/dist/components/Calculator/renderMonthsInput.d.ts +3 -7
- package/dist/components/Calculator/renderMonthsInput.js +4 -3
- package/dist/components/Calculator/renderMonthsInput.js.map +1 -1
- package/dist/components/Calculator/renderPaymentTypeSelector.d.ts +5 -0
- package/dist/components/Calculator/renderPaymentTypeSelector.js +9 -0
- package/dist/components/Calculator/renderPaymentTypeSelector.js.map +1 -0
- package/dist/components/Calculator/renderRealEstateValue.d.ts +2 -7
- package/dist/components/Calculator/renderRealEstateValue.js +6 -5
- package/dist/components/Calculator/renderRealEstateValue.js.map +1 -1
- package/dist/components/Calculator/renderWantedSumInput.d.ts +6 -9
- package/dist/components/Calculator/renderWantedSumInput.js +5 -7
- package/dist/components/Calculator/renderWantedSumInput.js.map +1 -1
- package/dist/components/Calculator/useBonusCalculatorParams.d.ts +37 -0
- package/dist/components/Calculator/useBonusCalculatorParams.js +18 -0
- package/dist/components/Calculator/useBonusCalculatorParams.js.map +1 -0
- package/dist/components/Calculator/useCalculatorParams.d.ts +2 -0
- package/dist/components/Calculator/useCalculatorParams.js +12 -0
- package/dist/components/Calculator/useCalculatorParams.js.map +1 -0
- package/dist/components/Calculator/useCreditCalculatorParams.d.ts +28 -0
- package/dist/components/Calculator/useCreditCalculatorParams.js +26 -0
- package/dist/components/Calculator/useCreditCalculatorParams.js.map +1 -0
- package/dist/components/ExchangeRateTile/CurrencyTable.js +2 -2
- package/dist/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
- package/dist/components/ExchangeRateTile/CurrentLocation.js +1 -1
- package/dist/components/ExchangeRateTile/CurrentLocation.js.map +1 -1
- package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +2 -0
- package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +3 -3
- package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
- package/dist/components/ExchangeRateTile/ExchangeRateTile.js +2 -3
- package/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/dist/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +2 -0
- package/dist/components/ExchangeRateTile/renderButton.d.ts +1 -1
- package/dist/components/ExchangeRateTile/renderButton.js +2 -2
- package/dist/components/ExchangeRateTile/renderButton.js.map +1 -1
- package/dist/components/ExchangeRateTile/renderInput.js +1 -1
- package/dist/components/ExchangeRateTile/renderInput.js.map +1 -1
- package/dist/components/Footer/HorizontalNavigation.js +2 -2
- package/dist/components/Footer/HorizontalNavigation.js.map +1 -1
- package/dist/components/Footer/HorizontalNavigation.mobile.js +2 -2
- package/dist/components/Footer/HorizontalNavigation.mobile.js.map +1 -1
- package/dist/components/Footer/HorizontalNavigationLink.d.ts +8 -0
- package/dist/components/Footer/HorizontalNavigationLink.js +6 -0
- package/dist/components/Footer/HorizontalNavigationLink.js.map +1 -0
- package/dist/components/Footer/MediaButton.js +2 -1
- package/dist/components/Footer/MediaButton.js.map +1 -1
- package/dist/components/Footer/TextInformation.js +2 -2
- package/dist/components/Footer/TextInformation.js.map +1 -1
- package/dist/components/Footer/TextInformation.mobile.js +2 -2
- package/dist/components/Footer/TextInformation.mobile.js.map +1 -1
- package/dist/components/Footer/TextInformationLink.d.ts +8 -0
- package/dist/components/Footer/TextInformationLink.js +6 -0
- package/dist/components/Footer/TextInformationLink.js.map +1 -0
- package/dist/components/Gallery/Gallery.mobile.js +2 -1
- package/dist/components/Gallery/Gallery.mobile.js.map +1 -1
- package/dist/components/GroupBlock/GroupBlockTabs.js +4 -4
- package/dist/components/GroupBlock/GroupBlockTabs.js.map +1 -1
- package/dist/components/GroupBlock/GroupBlocksItem.d.ts +1 -1
- package/dist/components/GroupBlock/renderBlocksTypes.js +4 -2
- package/dist/components/GroupBlock/renderBlocksTypes.js.map +1 -1
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js +6 -7
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +1 -1
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockContent.d.ts +2 -2
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +18 -16
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
- package/dist/components/LinkDocs/LinkDocs.js.map +1 -1
- package/dist/components/NavigatorTabs/NavigatorTabItem.js +2 -2
- package/dist/components/NavigatorTabs/NavigatorTabItem.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlock.js +3 -1
- package/dist/components/ProductBlock/ProductBlock.js.map +1 -1
- package/dist/components/ProductBlock/renderBackwardButton.js +2 -1
- package/dist/components/ProductBlock/renderBackwardButton.js.map +1 -1
- package/dist/components/ProductGallery/ProductGalleryBlock.d.ts +1 -1
- package/dist/components/ProductGallery/ProductGalleryBlock.js +1 -1
- package/dist/components/ProductGallery/ProductGalleryBlock.js.map +1 -1
- package/dist/components/StepsBlock/StepsBlock.js +3 -1
- package/dist/components/StepsBlock/StepsBlock.js.map +1 -1
- package/dist/components/StepsBlock/StepsBlock.mobile.js +1 -1
- package/dist/components/StepsBlock/StepsBlock.mobile.js.map +1 -1
- package/dist/components/TariffsTable/TariffsTable.mobile.js +3 -2
- package/dist/components/TariffsTable/TariffsTable.mobile.js.map +1 -1
- package/dist/components/TextBlock/TextBlock.js.map +1 -1
- package/dist/components/TextBlock/TextBlock.mobile.js +2 -1
- package/dist/components/TextBlock/TextBlock.mobile.js.map +1 -1
- package/dist/components/Tile/Tile.js +4 -3
- package/dist/components/Tile/Tile.js.map +1 -1
- package/dist/content-page-repository/transformPicture.js +7 -3
- package/dist/content-page-repository/transformPicture.js.map +1 -1
- package/dist/hooks/useExchangeRates.js +5 -7
- package/dist/hooks/useExchangeRates.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/Picture.d.ts +4 -3
- package/dist/services/sitemap/findActiveSubItem.js +1 -2
- package/dist/services/sitemap/findActiveSubItem.js.map +1 -1
- package/dist/ui-kit/BlockWrapper.js +2 -2
- package/dist/ui-kit/BlockWrapper.js.map +1 -1
- package/dist/ui-kit/BlocksList/renderBlocksList.js +4 -2
- package/dist/ui-kit/BlocksList/renderBlocksList.js.map +1 -1
- package/dist/ui-kit/Button/ButtonSection.js +1 -1
- package/dist/ui-kit/Button/ButtonSection.js.map +1 -1
- package/dist/ui-kit/Checkbox/Checkbox.js +5 -2
- package/dist/ui-kit/Checkbox/Checkbox.js.map +1 -1
- package/dist/ui-kit/Checkbox/CheckboxProps.d.ts +2 -1
- package/dist/ui-kit/Foldable/Foldable.js +4 -2
- package/dist/ui-kit/Foldable/Foldable.js.map +1 -1
- package/dist/ui-kit/HeaderItem/HeaderItem.js +2 -2
- package/dist/ui-kit/HeaderItem/HeaderItem.js.map +1 -1
- package/dist/ui-kit/HeaderItem/HeaderItem.mobile.js +4 -4
- package/dist/ui-kit/HeaderItem/HeaderItem.mobile.js.map +1 -1
- package/dist/ui-kit/Heading/Heading.js +1 -1
- package/dist/ui-kit/Heading/Heading.js.map +1 -1
- package/dist/ui-kit/Heading/Heading.mobile.js +1 -1
- package/dist/ui-kit/Heading/Heading.mobile.js.map +1 -1
- package/dist/ui-kit/Img/Img.d.ts +0 -3
- package/dist/ui-kit/Img/Img.js +4 -30
- package/dist/ui-kit/Img/Img.js.map +1 -1
- package/dist/ui-kit/Img/Img.mobile.d.ts +0 -3
- package/dist/ui-kit/Img/Img.mobile.js +4 -31
- package/dist/ui-kit/Img/Img.mobile.js.map +1 -1
- package/dist/ui-kit/Img/ImgAsPicture.d.ts +4 -0
- package/dist/ui-kit/Img/ImgAsPicture.js +32 -0
- package/dist/ui-kit/Img/ImgAsPicture.js.map +1 -0
- package/dist/ui-kit/Img/ImgInner.d.ts +2 -0
- package/dist/ui-kit/Img/ImgInner.js +19 -0
- package/dist/ui-kit/Img/ImgInner.js.map +1 -0
- package/dist/ui-kit/Img/ImgProps.d.ts +1 -0
- package/dist/ui-kit/Logo/Logo.js +1 -9
- package/dist/ui-kit/Logo/Logo.js.map +1 -1
- package/dist/ui-kit/Logo/Logo.mobile.js +2 -9
- package/dist/ui-kit/Logo/Logo.mobile.js.map +1 -1
- package/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.d.ts +12 -0
- package/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.js +9 -0
- package/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.js.map +1 -0
- package/dist/ui-kit/SearchBar/SearchBar.js +3 -8
- package/dist/ui-kit/SearchBar/SearchBar.js.map +1 -1
- package/dist/ui-kit/SearchBar/SearchBar.mobile.js +3 -7
- package/dist/ui-kit/SearchBar/SearchBar.mobile.js.map +1 -1
- package/dist/ui-kit/SearchBar/SearchBarInner.d.ts +5 -0
- package/dist/ui-kit/SearchBar/SearchBarInner.js +24 -0
- package/dist/ui-kit/SearchBar/SearchBarInner.js.map +1 -0
- package/lib/common.css +1 -1
- package/lib/components/Calculator/BonusCalculatorForm.d.ts +3 -3
- package/lib/components/Calculator/BonusCalculatorForm.js +23 -29
- package/lib/components/Calculator/BonusCalculatorForm.js.map +1 -1
- package/lib/components/Calculator/Calculator.js +7 -7
- package/lib/components/Calculator/Calculator.js.map +1 -1
- package/lib/components/Calculator/CalculatorContent.d.ts +14 -4
- package/lib/components/Calculator/CreditCalculatorForm.d.ts +4 -2
- package/lib/components/Calculator/CreditCalculatorForm.js +38 -41
- package/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/lib/components/Calculator/DepositCalculatorForm.js +15 -29
- package/lib/components/Calculator/DepositCalculatorForm.js.map +1 -1
- package/lib/components/Calculator/EmbeddableCalcBlocks.d.ts +4 -4
- package/lib/components/Calculator/EmbeddableCalcBlocks.js +2 -2
- package/lib/components/Calculator/EmbeddableCalcBlocks.js.map +1 -1
- package/lib/components/Calculator/MortgageCalculatorForm.js +14 -28
- package/lib/components/Calculator/MortgageCalculatorForm.js.map +1 -1
- package/lib/components/Calculator/Rate.d.ts +7 -0
- package/lib/components/Calculator/Rate.js +4 -0
- package/lib/components/Calculator/Rate.js.map +1 -0
- package/lib/components/Calculator/constants.d.ts +13 -4
- package/lib/components/Calculator/constants.js +33 -4
- package/lib/components/Calculator/constants.js.map +1 -1
- package/lib/components/Calculator/getBonus.d.ts +2 -0
- package/lib/components/Calculator/getBonus.js +13 -0
- package/lib/components/Calculator/getBonus.js.map +1 -0
- package/lib/components/Calculator/getDefaultMonths.d.ts +1 -2
- package/lib/components/Calculator/getDefaultMonths.js +1 -4
- package/lib/components/Calculator/getDefaultMonths.js.map +1 -1
- package/lib/components/Calculator/getDefaultSum.d.ts +1 -2
- package/lib/components/Calculator/getDefaultSum.js +1 -3
- package/lib/components/Calculator/getDefaultSum.js.map +1 -1
- package/lib/components/Calculator/getMonthlyPayment.d.ts +6 -11
- package/lib/components/Calculator/getMonthlyPayment.js +11 -12
- package/lib/components/Calculator/getMonthlyPayment.js.map +1 -1
- package/lib/components/Calculator/renderCalculatorBlock.d.ts +1 -1
- package/lib/components/Calculator/renderCalculatorBlock.js +3 -3
- package/lib/components/Calculator/renderCalculatorBlock.js.map +1 -1
- package/lib/components/Calculator/renderInitialFeeInput.d.ts +3 -8
- package/lib/components/Calculator/renderInitialFeeInput.js +7 -6
- package/lib/components/Calculator/renderInitialFeeInput.js.map +1 -1
- package/lib/components/Calculator/renderMonthsInput.d.ts +3 -7
- package/lib/components/Calculator/renderMonthsInput.js +4 -3
- package/lib/components/Calculator/renderMonthsInput.js.map +1 -1
- package/lib/components/Calculator/renderPaymentTypeSelector.d.ts +5 -0
- package/lib/components/Calculator/renderPaymentTypeSelector.js +6 -0
- package/lib/components/Calculator/renderPaymentTypeSelector.js.map +1 -0
- package/lib/components/Calculator/renderRealEstateValue.d.ts +2 -7
- package/lib/components/Calculator/renderRealEstateValue.js +6 -5
- package/lib/components/Calculator/renderRealEstateValue.js.map +1 -1
- package/lib/components/Calculator/renderWantedSumInput.d.ts +6 -9
- package/lib/components/Calculator/renderWantedSumInput.js +5 -7
- package/lib/components/Calculator/renderWantedSumInput.js.map +1 -1
- package/lib/components/Calculator/useBonusCalculatorParams.d.ts +37 -0
- package/lib/components/Calculator/useBonusCalculatorParams.js +15 -0
- package/lib/components/Calculator/useBonusCalculatorParams.js.map +1 -0
- package/lib/components/Calculator/useCalculatorParams.d.ts +2 -0
- package/lib/components/Calculator/useCalculatorParams.js +9 -0
- package/lib/components/Calculator/useCalculatorParams.js.map +1 -0
- package/lib/components/Calculator/useCreditCalculatorParams.d.ts +28 -0
- package/lib/components/Calculator/useCreditCalculatorParams.js +23 -0
- package/lib/components/Calculator/useCreditCalculatorParams.js.map +1 -0
- package/lib/components/ExchangeRateTile/CurrencyTable.js +2 -2
- package/lib/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
- package/lib/components/ExchangeRateTile/CurrentLocation.js +1 -1
- package/lib/components/ExchangeRateTile/CurrentLocation.js.map +1 -1
- package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +2 -0
- package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +3 -3
- package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
- package/lib/components/ExchangeRateTile/ExchangeRateTile.js +2 -3
- package/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/lib/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +2 -0
- package/lib/components/ExchangeRateTile/renderButton.d.ts +1 -1
- package/lib/components/ExchangeRateTile/renderButton.js +2 -2
- package/lib/components/ExchangeRateTile/renderButton.js.map +1 -1
- package/lib/components/ExchangeRateTile/renderInput.js +1 -1
- package/lib/components/ExchangeRateTile/renderInput.js.map +1 -1
- package/lib/components/Footer/HorizontalNavigation.js +2 -2
- package/lib/components/Footer/HorizontalNavigation.js.map +1 -1
- package/lib/components/Footer/HorizontalNavigation.mobile.js +2 -2
- package/lib/components/Footer/HorizontalNavigation.mobile.js.map +1 -1
- package/lib/components/Footer/HorizontalNavigationLink.d.ts +8 -0
- package/lib/components/Footer/HorizontalNavigationLink.js +4 -0
- package/lib/components/Footer/HorizontalNavigationLink.js.map +1 -0
- package/lib/components/Footer/MediaButton.js +2 -1
- package/lib/components/Footer/MediaButton.js.map +1 -1
- package/lib/components/Footer/TextInformation.js +2 -2
- package/lib/components/Footer/TextInformation.js.map +1 -1
- package/lib/components/Footer/TextInformation.mobile.js +2 -2
- package/lib/components/Footer/TextInformation.mobile.js.map +1 -1
- package/lib/components/Footer/TextInformationLink.d.ts +8 -0
- package/lib/components/Footer/TextInformationLink.js +4 -0
- package/lib/components/Footer/TextInformationLink.js.map +1 -0
- package/lib/components/Gallery/Gallery.mobile.js +2 -1
- package/lib/components/Gallery/Gallery.mobile.js.map +1 -1
- package/lib/components/GroupBlock/GroupBlockTabs.js +4 -4
- package/lib/components/GroupBlock/GroupBlockTabs.js.map +1 -1
- package/lib/components/GroupBlock/GroupBlocksItem.d.ts +1 -1
- package/lib/components/GroupBlock/renderBlocksTypes.js +4 -2
- package/lib/components/GroupBlock/renderBlocksTypes.js.map +1 -1
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js +6 -7
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +1 -1
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockContent.d.ts +2 -2
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +18 -16
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
- package/lib/components/LinkDocs/LinkDocs.js.map +1 -1
- package/lib/components/NavigatorTabs/NavigatorTabItem.js +2 -2
- package/lib/components/NavigatorTabs/NavigatorTabItem.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlock.js +3 -1
- package/lib/components/ProductBlock/ProductBlock.js.map +1 -1
- package/lib/components/ProductBlock/renderBackwardButton.js +2 -1
- package/lib/components/ProductBlock/renderBackwardButton.js.map +1 -1
- package/lib/components/ProductGallery/ProductGalleryBlock.d.ts +1 -1
- package/lib/components/ProductGallery/ProductGalleryBlock.js +1 -1
- package/lib/components/ProductGallery/ProductGalleryBlock.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlock.js +3 -1
- package/lib/components/StepsBlock/StepsBlock.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlock.mobile.js +1 -1
- package/lib/components/StepsBlock/StepsBlock.mobile.js.map +1 -1
- package/lib/components/TariffsTable/TariffsTable.mobile.js +3 -2
- package/lib/components/TariffsTable/TariffsTable.mobile.js.map +1 -1
- package/lib/components/TextBlock/TextBlock.js.map +1 -1
- package/lib/components/TextBlock/TextBlock.mobile.js +2 -1
- package/lib/components/TextBlock/TextBlock.mobile.js.map +1 -1
- package/lib/components/Tile/Tile.js +4 -3
- package/lib/components/Tile/Tile.js.map +1 -1
- package/lib/content-page-repository/transformPicture.js +7 -3
- package/lib/content-page-repository/transformPicture.js.map +1 -1
- package/lib/hooks/useExchangeRates.js +5 -7
- package/lib/hooks/useExchangeRates.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/Picture.d.ts +4 -3
- package/lib/services/sitemap/findActiveSubItem.js +1 -2
- package/lib/services/sitemap/findActiveSubItem.js.map +1 -1
- package/lib/ui-kit/BlockWrapper.js +2 -2
- package/lib/ui-kit/BlockWrapper.js.map +1 -1
- package/lib/ui-kit/BlocksList/renderBlocksList.js +4 -2
- package/lib/ui-kit/BlocksList/renderBlocksList.js.map +1 -1
- package/lib/ui-kit/Button/ButtonSection.js +1 -1
- package/lib/ui-kit/Button/ButtonSection.js.map +1 -1
- package/lib/ui-kit/Checkbox/Checkbox.js +5 -2
- package/lib/ui-kit/Checkbox/Checkbox.js.map +1 -1
- package/lib/ui-kit/Checkbox/CheckboxProps.d.ts +2 -1
- package/lib/ui-kit/Foldable/Foldable.js +4 -2
- package/lib/ui-kit/Foldable/Foldable.js.map +1 -1
- package/lib/ui-kit/HeaderItem/HeaderItem.js +2 -2
- package/lib/ui-kit/HeaderItem/HeaderItem.js.map +1 -1
- package/lib/ui-kit/HeaderItem/HeaderItem.mobile.js +4 -4
- package/lib/ui-kit/HeaderItem/HeaderItem.mobile.js.map +1 -1
- package/lib/ui-kit/Heading/Heading.js +1 -1
- package/lib/ui-kit/Heading/Heading.js.map +1 -1
- package/lib/ui-kit/Heading/Heading.mobile.js +1 -1
- package/lib/ui-kit/Heading/Heading.mobile.js.map +1 -1
- package/lib/ui-kit/Img/Img.d.ts +0 -3
- package/lib/ui-kit/Img/Img.js +4 -29
- package/lib/ui-kit/Img/Img.js.map +1 -1
- package/lib/ui-kit/Img/Img.mobile.d.ts +0 -3
- package/lib/ui-kit/Img/Img.mobile.js +4 -30
- package/lib/ui-kit/Img/Img.mobile.js.map +1 -1
- package/lib/ui-kit/Img/ImgAsPicture.d.ts +4 -0
- package/lib/ui-kit/Img/ImgAsPicture.js +29 -0
- package/lib/ui-kit/Img/ImgAsPicture.js.map +1 -0
- package/lib/ui-kit/Img/ImgInner.d.ts +2 -0
- package/lib/ui-kit/Img/ImgInner.js +17 -0
- package/lib/ui-kit/Img/ImgInner.js.map +1 -0
- package/lib/ui-kit/Img/ImgProps.d.ts +1 -0
- package/lib/ui-kit/Logo/Logo.js +1 -9
- package/lib/ui-kit/Logo/Logo.js.map +1 -1
- package/lib/ui-kit/Logo/Logo.mobile.js +2 -9
- package/lib/ui-kit/Logo/Logo.mobile.js.map +1 -1
- package/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.d.ts +12 -0
- package/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.fixture.d.ts +4 -0
- package/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.js +7 -0
- package/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.js.map +1 -0
- package/lib/ui-kit/SearchBar/SearchBar.js +4 -9
- package/lib/ui-kit/SearchBar/SearchBar.js.map +1 -1
- package/lib/ui-kit/SearchBar/SearchBar.mobile.js +4 -8
- package/lib/ui-kit/SearchBar/SearchBar.mobile.js.map +1 -1
- package/lib/ui-kit/SearchBar/SearchBarInner.d.ts +5 -0
- package/lib/ui-kit/SearchBar/SearchBarInner.js +22 -0
- package/lib/ui-kit/SearchBar/SearchBarInner.js.map +1 -0
- package/mobile/bundle/bundle.umd.js +117 -93
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/components/Calculator/BonusCalculatorForm.d.ts +3 -3
- package/mobile/dist/components/Calculator/BonusCalculatorForm.js +23 -29
- package/mobile/dist/components/Calculator/BonusCalculatorForm.js.map +1 -1
- package/mobile/dist/components/Calculator/Calculator.js +7 -7
- package/mobile/dist/components/Calculator/Calculator.js.map +1 -1
- package/mobile/dist/components/Calculator/CalculatorContent.d.ts +14 -4
- package/mobile/dist/components/Calculator/CreditCalculatorForm.d.ts +4 -2
- package/mobile/dist/components/Calculator/CreditCalculatorForm.js +38 -41
- package/mobile/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/mobile/dist/components/Calculator/DepositCalculatorForm.js +14 -28
- package/mobile/dist/components/Calculator/DepositCalculatorForm.js.map +1 -1
- package/mobile/dist/components/Calculator/EmbeddableCalcBlocks.d.ts +4 -4
- package/mobile/dist/components/Calculator/EmbeddableCalcBlocks.js +2 -2
- package/mobile/dist/components/Calculator/EmbeddableCalcBlocks.js.map +1 -1
- package/mobile/dist/components/Calculator/MortgageCalculatorForm.js +14 -28
- package/mobile/dist/components/Calculator/MortgageCalculatorForm.js.map +1 -1
- package/mobile/dist/components/Calculator/Rate.d.ts +7 -0
- package/mobile/dist/components/Calculator/Rate.js +6 -0
- package/mobile/dist/components/Calculator/Rate.js.map +1 -0
- package/mobile/dist/components/Calculator/constants.d.ts +13 -4
- package/mobile/dist/components/Calculator/constants.js +34 -5
- package/mobile/dist/components/Calculator/constants.js.map +1 -1
- package/mobile/dist/components/Calculator/getBonus.d.ts +2 -0
- package/mobile/dist/components/Calculator/getBonus.js +16 -0
- package/mobile/dist/components/Calculator/getBonus.js.map +1 -0
- package/mobile/dist/components/Calculator/getDefaultMonths.d.ts +1 -2
- package/mobile/dist/components/Calculator/getDefaultMonths.js +1 -4
- package/mobile/dist/components/Calculator/getDefaultMonths.js.map +1 -1
- package/mobile/dist/components/Calculator/getDefaultSum.d.ts +1 -2
- package/mobile/dist/components/Calculator/getDefaultSum.js +1 -3
- package/mobile/dist/components/Calculator/getDefaultSum.js.map +1 -1
- package/mobile/dist/components/Calculator/getMonthlyPayment.d.ts +6 -11
- package/mobile/dist/components/Calculator/getMonthlyPayment.js +10 -11
- package/mobile/dist/components/Calculator/getMonthlyPayment.js.map +1 -1
- package/mobile/dist/components/Calculator/renderCalculatorBlock.d.ts +1 -1
- package/mobile/dist/components/Calculator/renderCalculatorBlock.js +3 -3
- package/mobile/dist/components/Calculator/renderCalculatorBlock.js.map +1 -1
- package/mobile/dist/components/Calculator/renderInitialFeeInput.d.ts +3 -8
- package/mobile/dist/components/Calculator/renderInitialFeeInput.js +7 -6
- package/mobile/dist/components/Calculator/renderInitialFeeInput.js.map +1 -1
- package/mobile/dist/components/Calculator/renderMonthsInput.d.ts +3 -7
- package/mobile/dist/components/Calculator/renderMonthsInput.js +4 -3
- package/mobile/dist/components/Calculator/renderMonthsInput.js.map +1 -1
- package/mobile/dist/components/Calculator/renderPaymentTypeSelector.d.ts +5 -0
- package/mobile/dist/components/Calculator/renderPaymentTypeSelector.js +9 -0
- package/mobile/dist/components/Calculator/renderPaymentTypeSelector.js.map +1 -0
- package/mobile/dist/components/Calculator/renderRealEstateValue.d.ts +2 -7
- package/mobile/dist/components/Calculator/renderRealEstateValue.js +6 -5
- package/mobile/dist/components/Calculator/renderRealEstateValue.js.map +1 -1
- package/mobile/dist/components/Calculator/renderWantedSumInput.d.ts +6 -9
- package/mobile/dist/components/Calculator/renderWantedSumInput.js +5 -7
- package/mobile/dist/components/Calculator/renderWantedSumInput.js.map +1 -1
- package/mobile/dist/components/Calculator/useBonusCalculatorParams.d.ts +37 -0
- package/mobile/dist/components/Calculator/useBonusCalculatorParams.js +18 -0
- package/mobile/dist/components/Calculator/useBonusCalculatorParams.js.map +1 -0
- package/mobile/dist/components/Calculator/useCalculatorParams.d.ts +2 -0
- package/mobile/dist/components/Calculator/useCalculatorParams.js +12 -0
- package/mobile/dist/components/Calculator/useCalculatorParams.js.map +1 -0
- package/mobile/dist/components/Calculator/useCreditCalculatorParams.d.ts +28 -0
- package/mobile/dist/components/Calculator/useCreditCalculatorParams.js +26 -0
- package/mobile/dist/components/Calculator/useCreditCalculatorParams.js.map +1 -0
- package/mobile/dist/components/ExchangeRateTile/CurrencyTable.js +2 -2
- package/mobile/dist/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
- package/mobile/dist/components/ExchangeRateTile/CurrentLocation.js +1 -1
- package/mobile/dist/components/ExchangeRateTile/CurrentLocation.js.map +1 -1
- package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +2 -0
- package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +3 -3
- package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
- package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js +2 -3
- package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/mobile/dist/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +2 -0
- package/mobile/dist/components/ExchangeRateTile/renderButton.d.ts +1 -1
- package/mobile/dist/components/ExchangeRateTile/renderButton.js +2 -2
- package/mobile/dist/components/ExchangeRateTile/renderButton.js.map +1 -1
- package/mobile/dist/components/ExchangeRateTile/renderInput.js +1 -1
- package/mobile/dist/components/ExchangeRateTile/renderInput.js.map +1 -1
- package/mobile/dist/components/Footer/HorizontalNavigation.js +2 -2
- package/mobile/dist/components/Footer/HorizontalNavigation.js.map +1 -1
- package/mobile/dist/components/Footer/HorizontalNavigationLink.d.ts +8 -0
- package/mobile/dist/components/Footer/HorizontalNavigationLink.js +6 -0
- package/mobile/dist/components/Footer/HorizontalNavigationLink.js.map +1 -0
- package/mobile/dist/components/Footer/MediaButton.js +2 -1
- package/mobile/dist/components/Footer/MediaButton.js.map +1 -1
- package/mobile/dist/components/Footer/TextInformation.js +2 -2
- package/mobile/dist/components/Footer/TextInformation.js.map +1 -1
- package/mobile/dist/components/Footer/TextInformationLink.d.ts +8 -0
- package/mobile/dist/components/Footer/TextInformationLink.js +6 -0
- package/mobile/dist/components/Footer/TextInformationLink.js.map +1 -0
- package/mobile/dist/components/Gallery/Gallery.js +2 -1
- package/mobile/dist/components/Gallery/Gallery.js.map +1 -1
- package/mobile/dist/components/GroupBlock/GroupBlockTabs.js +4 -4
- package/mobile/dist/components/GroupBlock/GroupBlockTabs.js.map +1 -1
- package/mobile/dist/components/GroupBlock/GroupBlocksItem.d.ts +1 -1
- package/mobile/dist/components/GroupBlock/renderBlocksTypes.js +4 -2
- package/mobile/dist/components/GroupBlock/renderBlocksTypes.js.map +1 -1
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js +6 -7
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +1 -1
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockContent.d.ts +2 -2
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +18 -16
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
- package/mobile/dist/components/NavigatorTabs/NavigatorTabItem.js +2 -2
- package/mobile/dist/components/NavigatorTabs/NavigatorTabItem.js.map +1 -1
- package/mobile/dist/components/ProductBlock/renderBackwardButton.js +2 -1
- package/mobile/dist/components/ProductBlock/renderBackwardButton.js.map +1 -1
- package/mobile/dist/components/ProductGallery/ProductGalleryBlock.d.ts +1 -1
- package/mobile/dist/components/ProductGallery/ProductGalleryBlock.js +1 -1
- package/mobile/dist/components/ProductGallery/ProductGalleryBlock.js.map +1 -1
- package/mobile/dist/components/StepsBlock/StepsBlock.js +1 -1
- package/mobile/dist/components/StepsBlock/StepsBlock.js.map +1 -1
- package/mobile/dist/components/TariffsTable/TariffsTable.js +3 -2
- package/mobile/dist/components/TariffsTable/TariffsTable.js.map +1 -1
- package/mobile/dist/components/TextBlock/TextBlock.js +2 -1
- package/mobile/dist/components/TextBlock/TextBlock.js.map +1 -1
- package/mobile/dist/components/Tile/Tile.js +4 -3
- package/mobile/dist/components/Tile/Tile.js.map +1 -1
- package/mobile/dist/content-page-repository/transformPicture.js +7 -3
- package/mobile/dist/content-page-repository/transformPicture.js.map +1 -1
- package/mobile/dist/hooks/useExchangeRates.js +5 -7
- package/mobile/dist/hooks/useExchangeRates.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/Picture.d.ts +4 -3
- package/mobile/dist/services/sitemap/findActiveSubItem.js +1 -2
- package/mobile/dist/services/sitemap/findActiveSubItem.js.map +1 -1
- package/mobile/dist/ui-kit/BlockWrapper.js +2 -2
- package/mobile/dist/ui-kit/BlockWrapper.js.map +1 -1
- package/mobile/dist/ui-kit/BlocksList/renderBlocksList.js +4 -2
- package/mobile/dist/ui-kit/BlocksList/renderBlocksList.js.map +1 -1
- package/mobile/dist/ui-kit/Button/ButtonSection.js +1 -1
- package/mobile/dist/ui-kit/Button/ButtonSection.js.map +1 -1
- package/mobile/dist/ui-kit/Checkbox/Checkbox.js +5 -2
- package/mobile/dist/ui-kit/Checkbox/Checkbox.js.map +1 -1
- package/mobile/dist/ui-kit/Checkbox/CheckboxProps.d.ts +2 -1
- package/mobile/dist/ui-kit/Foldable/Foldable.js +4 -2
- package/mobile/dist/ui-kit/Foldable/Foldable.js.map +1 -1
- package/mobile/dist/ui-kit/HeaderItem/HeaderItem.js +4 -4
- package/mobile/dist/ui-kit/HeaderItem/HeaderItem.js.map +1 -1
- package/mobile/dist/ui-kit/Heading/Heading.js +1 -1
- package/mobile/dist/ui-kit/Heading/Heading.js.map +1 -1
- package/mobile/dist/ui-kit/Img/Img.d.ts +0 -3
- package/mobile/dist/ui-kit/Img/Img.js +4 -31
- package/mobile/dist/ui-kit/Img/Img.js.map +1 -1
- package/mobile/dist/ui-kit/Img/ImgAsPicture.d.ts +4 -0
- package/mobile/dist/ui-kit/Img/ImgAsPicture.js +32 -0
- package/mobile/dist/ui-kit/Img/ImgAsPicture.js.map +1 -0
- package/mobile/dist/ui-kit/Img/ImgInner.d.ts +2 -0
- package/mobile/dist/ui-kit/Img/ImgInner.js +19 -0
- package/mobile/dist/ui-kit/Img/ImgInner.js.map +1 -0
- package/mobile/dist/ui-kit/Img/ImgProps.d.ts +1 -0
- package/mobile/dist/ui-kit/Logo/Logo.js +2 -9
- package/mobile/dist/ui-kit/Logo/Logo.js.map +1 -1
- package/mobile/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.d.ts +12 -0
- package/mobile/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.js +9 -0
- package/mobile/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.js.map +1 -0
- package/mobile/dist/ui-kit/SearchBar/SearchBar.js +3 -7
- package/mobile/dist/ui-kit/SearchBar/SearchBar.js.map +1 -1
- package/mobile/dist/ui-kit/SearchBar/SearchBarInner.d.ts +5 -0
- package/mobile/dist/ui-kit/SearchBar/SearchBarInner.js +24 -0
- package/mobile/dist/ui-kit/SearchBar/SearchBarInner.js.map +1 -0
- package/mobile/lib/components/Calculator/BonusCalculatorForm.d.ts +3 -3
- package/mobile/lib/components/Calculator/BonusCalculatorForm.js +23 -29
- package/mobile/lib/components/Calculator/BonusCalculatorForm.js.map +1 -1
- package/mobile/lib/components/Calculator/Calculator.js +7 -7
- package/mobile/lib/components/Calculator/Calculator.js.map +1 -1
- package/mobile/lib/components/Calculator/CalculatorContent.d.ts +14 -4
- package/mobile/lib/components/Calculator/CreditCalculatorForm.d.ts +4 -2
- package/mobile/lib/components/Calculator/CreditCalculatorForm.js +38 -41
- package/mobile/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/mobile/lib/components/Calculator/DepositCalculatorForm.js +15 -29
- package/mobile/lib/components/Calculator/DepositCalculatorForm.js.map +1 -1
- package/mobile/lib/components/Calculator/EmbeddableCalcBlocks.d.ts +4 -4
- package/mobile/lib/components/Calculator/EmbeddableCalcBlocks.js +2 -2
- package/mobile/lib/components/Calculator/EmbeddableCalcBlocks.js.map +1 -1
- package/mobile/lib/components/Calculator/MortgageCalculatorForm.js +14 -28
- package/mobile/lib/components/Calculator/MortgageCalculatorForm.js.map +1 -1
- package/mobile/lib/components/Calculator/Rate.d.ts +7 -0
- package/mobile/lib/components/Calculator/Rate.js +4 -0
- package/mobile/lib/components/Calculator/Rate.js.map +1 -0
- package/mobile/lib/components/Calculator/constants.d.ts +13 -4
- package/mobile/lib/components/Calculator/constants.js +33 -4
- package/mobile/lib/components/Calculator/constants.js.map +1 -1
- package/mobile/lib/components/Calculator/getBonus.d.ts +2 -0
- package/mobile/lib/components/Calculator/getBonus.js +13 -0
- package/mobile/lib/components/Calculator/getBonus.js.map +1 -0
- package/mobile/lib/components/Calculator/getDefaultMonths.d.ts +1 -2
- package/mobile/lib/components/Calculator/getDefaultMonths.js +1 -4
- package/mobile/lib/components/Calculator/getDefaultMonths.js.map +1 -1
- package/mobile/lib/components/Calculator/getDefaultSum.d.ts +1 -2
- package/mobile/lib/components/Calculator/getDefaultSum.js +1 -3
- package/mobile/lib/components/Calculator/getDefaultSum.js.map +1 -1
- package/mobile/lib/components/Calculator/getMonthlyPayment.d.ts +6 -11
- package/mobile/lib/components/Calculator/getMonthlyPayment.js +11 -12
- package/mobile/lib/components/Calculator/getMonthlyPayment.js.map +1 -1
- package/mobile/lib/components/Calculator/renderCalculatorBlock.d.ts +1 -1
- package/mobile/lib/components/Calculator/renderCalculatorBlock.js +3 -3
- package/mobile/lib/components/Calculator/renderCalculatorBlock.js.map +1 -1
- package/mobile/lib/components/Calculator/renderInitialFeeInput.d.ts +3 -8
- package/mobile/lib/components/Calculator/renderInitialFeeInput.js +7 -6
- package/mobile/lib/components/Calculator/renderInitialFeeInput.js.map +1 -1
- package/mobile/lib/components/Calculator/renderMonthsInput.d.ts +3 -7
- package/mobile/lib/components/Calculator/renderMonthsInput.js +4 -3
- package/mobile/lib/components/Calculator/renderMonthsInput.js.map +1 -1
- package/mobile/lib/components/Calculator/renderPaymentTypeSelector.d.ts +5 -0
- package/mobile/lib/components/Calculator/renderPaymentTypeSelector.js +6 -0
- package/mobile/lib/components/Calculator/renderPaymentTypeSelector.js.map +1 -0
- package/mobile/lib/components/Calculator/renderRealEstateValue.d.ts +2 -7
- package/mobile/lib/components/Calculator/renderRealEstateValue.js +6 -5
- package/mobile/lib/components/Calculator/renderRealEstateValue.js.map +1 -1
- package/mobile/lib/components/Calculator/renderWantedSumInput.d.ts +6 -9
- package/mobile/lib/components/Calculator/renderWantedSumInput.js +5 -7
- package/mobile/lib/components/Calculator/renderWantedSumInput.js.map +1 -1
- package/mobile/lib/components/Calculator/useBonusCalculatorParams.d.ts +37 -0
- package/mobile/lib/components/Calculator/useBonusCalculatorParams.js +15 -0
- package/mobile/lib/components/Calculator/useBonusCalculatorParams.js.map +1 -0
- package/mobile/lib/components/Calculator/useCalculatorParams.d.ts +2 -0
- package/mobile/lib/components/Calculator/useCalculatorParams.js +9 -0
- package/mobile/lib/components/Calculator/useCalculatorParams.js.map +1 -0
- package/mobile/lib/components/Calculator/useCreditCalculatorParams.d.ts +28 -0
- package/mobile/lib/components/Calculator/useCreditCalculatorParams.js +23 -0
- package/mobile/lib/components/Calculator/useCreditCalculatorParams.js.map +1 -0
- package/mobile/lib/components/ExchangeRateTile/CurrencyTable.js +2 -2
- package/mobile/lib/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
- package/mobile/lib/components/ExchangeRateTile/CurrentLocation.js +1 -1
- package/mobile/lib/components/ExchangeRateTile/CurrentLocation.js.map +1 -1
- package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +2 -0
- package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +3 -3
- package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
- package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js +2 -3
- package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/mobile/lib/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +2 -0
- package/mobile/lib/components/ExchangeRateTile/renderButton.d.ts +1 -1
- package/mobile/lib/components/ExchangeRateTile/renderButton.js +2 -2
- package/mobile/lib/components/ExchangeRateTile/renderButton.js.map +1 -1
- package/mobile/lib/components/ExchangeRateTile/renderInput.js +1 -1
- package/mobile/lib/components/ExchangeRateTile/renderInput.js.map +1 -1
- package/mobile/lib/components/Footer/HorizontalNavigation.js +2 -2
- package/mobile/lib/components/Footer/HorizontalNavigation.js.map +1 -1
- package/mobile/lib/components/Footer/HorizontalNavigationLink.d.ts +8 -0
- package/mobile/lib/components/Footer/HorizontalNavigationLink.js +4 -0
- package/mobile/lib/components/Footer/HorizontalNavigationLink.js.map +1 -0
- package/mobile/lib/components/Footer/MediaButton.js +2 -1
- package/mobile/lib/components/Footer/MediaButton.js.map +1 -1
- package/mobile/lib/components/Footer/TextInformation.js +2 -2
- package/mobile/lib/components/Footer/TextInformation.js.map +1 -1
- package/mobile/lib/components/Footer/TextInformationLink.d.ts +8 -0
- package/mobile/lib/components/Footer/TextInformationLink.js +4 -0
- package/mobile/lib/components/Footer/TextInformationLink.js.map +1 -0
- package/mobile/lib/components/Gallery/Gallery.js +2 -1
- package/mobile/lib/components/Gallery/Gallery.js.map +1 -1
- package/mobile/lib/components/GroupBlock/GroupBlockTabs.js +4 -4
- package/mobile/lib/components/GroupBlock/GroupBlockTabs.js.map +1 -1
- package/mobile/lib/components/GroupBlock/GroupBlocksItem.d.ts +1 -1
- package/mobile/lib/components/GroupBlock/renderBlocksTypes.js +4 -2
- package/mobile/lib/components/GroupBlock/renderBlocksTypes.js.map +1 -1
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js +6 -7
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +1 -1
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockContent.d.ts +2 -2
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +18 -16
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
- package/mobile/lib/components/NavigatorTabs/NavigatorTabItem.js +2 -2
- package/mobile/lib/components/NavigatorTabs/NavigatorTabItem.js.map +1 -1
- package/mobile/lib/components/ProductBlock/renderBackwardButton.js +2 -1
- package/mobile/lib/components/ProductBlock/renderBackwardButton.js.map +1 -1
- package/mobile/lib/components/ProductGallery/ProductGalleryBlock.d.ts +1 -1
- package/mobile/lib/components/ProductGallery/ProductGalleryBlock.js +1 -1
- package/mobile/lib/components/ProductGallery/ProductGalleryBlock.js.map +1 -1
- package/mobile/lib/components/StepsBlock/StepsBlock.js +1 -1
- package/mobile/lib/components/StepsBlock/StepsBlock.js.map +1 -1
- package/mobile/lib/components/TariffsTable/TariffsTable.js +3 -2
- package/mobile/lib/components/TariffsTable/TariffsTable.js.map +1 -1
- package/mobile/lib/components/TextBlock/TextBlock.js +2 -1
- package/mobile/lib/components/TextBlock/TextBlock.js.map +1 -1
- package/mobile/lib/components/Tile/Tile.js +4 -3
- package/mobile/lib/components/Tile/Tile.js.map +1 -1
- package/mobile/lib/content-page-repository/transformPicture.js +7 -3
- package/mobile/lib/content-page-repository/transformPicture.js.map +1 -1
- package/mobile/lib/hooks/useExchangeRates.js +5 -7
- package/mobile/lib/hooks/useExchangeRates.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/Picture.d.ts +4 -3
- package/mobile/lib/services/sitemap/findActiveSubItem.js +1 -2
- package/mobile/lib/services/sitemap/findActiveSubItem.js.map +1 -1
- package/mobile/lib/ui-kit/BlockWrapper.js +2 -2
- package/mobile/lib/ui-kit/BlockWrapper.js.map +1 -1
- package/mobile/lib/ui-kit/BlocksList/renderBlocksList.js +4 -2
- package/mobile/lib/ui-kit/BlocksList/renderBlocksList.js.map +1 -1
- package/mobile/lib/ui-kit/Button/ButtonSection.js +1 -1
- package/mobile/lib/ui-kit/Button/ButtonSection.js.map +1 -1
- package/mobile/lib/ui-kit/Checkbox/Checkbox.js +5 -2
- package/mobile/lib/ui-kit/Checkbox/Checkbox.js.map +1 -1
- package/mobile/lib/ui-kit/Checkbox/CheckboxProps.d.ts +2 -1
- package/mobile/lib/ui-kit/Foldable/Foldable.js +4 -2
- package/mobile/lib/ui-kit/Foldable/Foldable.js.map +1 -1
- package/mobile/lib/ui-kit/HeaderItem/HeaderItem.js +4 -4
- package/mobile/lib/ui-kit/HeaderItem/HeaderItem.js.map +1 -1
- package/mobile/lib/ui-kit/Heading/Heading.js +1 -1
- package/mobile/lib/ui-kit/Heading/Heading.js.map +1 -1
- package/mobile/lib/ui-kit/Img/Img.d.ts +0 -3
- package/mobile/lib/ui-kit/Img/Img.js +4 -30
- package/mobile/lib/ui-kit/Img/Img.js.map +1 -1
- package/mobile/lib/ui-kit/Img/ImgAsPicture.d.ts +4 -0
- package/mobile/lib/ui-kit/Img/ImgAsPicture.js +29 -0
- package/mobile/lib/ui-kit/Img/ImgAsPicture.js.map +1 -0
- package/mobile/lib/ui-kit/Img/ImgInner.d.ts +2 -0
- package/mobile/lib/ui-kit/Img/ImgInner.js +17 -0
- package/mobile/lib/ui-kit/Img/ImgInner.js.map +1 -0
- package/mobile/lib/ui-kit/Img/ImgProps.d.ts +1 -0
- package/mobile/lib/ui-kit/Logo/Logo.js +2 -9
- package/mobile/lib/ui-kit/Logo/Logo.js.map +1 -1
- package/mobile/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.d.ts +12 -0
- package/mobile/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.js +7 -0
- package/mobile/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.js.map +1 -0
- package/mobile/lib/ui-kit/SearchBar/SearchBar.js +4 -8
- package/mobile/lib/ui-kit/SearchBar/SearchBar.js.map +1 -1
- package/mobile/lib/ui-kit/SearchBar/SearchBarInner.d.ts +5 -0
- package/mobile/lib/ui-kit/SearchBar/SearchBarInner.js +22 -0
- package/mobile/lib/ui-kit/SearchBar/SearchBarInner.js.map +1 -0
- package/mobile/src/components/Calculator/BonusCalculatorForm.tsx +43 -51
- package/mobile/src/components/Calculator/Calculator.tsx +8 -8
- package/mobile/src/components/Calculator/CalculatorContent.ts +14 -4
- package/mobile/src/components/Calculator/CreditCalculatorForm.tsx +62 -62
- package/mobile/src/components/Calculator/DepositCalculatorForm.tsx +34 -35
- package/mobile/src/components/Calculator/EmbeddableCalcBlocks.tsx +3 -3
- package/mobile/src/components/Calculator/MortgageCalculatorForm.tsx +29 -37
- package/mobile/src/components/Calculator/Rate.tsx +22 -0
- package/mobile/src/components/Calculator/constants.ts +41 -4
- package/mobile/src/components/Calculator/getBonus.ts +38 -0
- package/mobile/src/components/Calculator/getDefaultMonths.ts +2 -7
- package/mobile/src/components/Calculator/getDefaultSum.ts +2 -5
- package/mobile/src/components/Calculator/getMonthlyPayment.ts +12 -28
- package/mobile/src/components/Calculator/renderCalculatorBlock.tsx +4 -4
- package/mobile/src/components/Calculator/renderInitialFeeInput.tsx +10 -14
- package/mobile/src/components/Calculator/renderMonthsInput.tsx +7 -10
- package/mobile/src/components/Calculator/renderPaymentTypeSelector.tsx +12 -0
- package/mobile/src/components/Calculator/renderRealEstateValue.tsx +9 -13
- package/mobile/src/components/Calculator/renderWantedSumInput.tsx +12 -26
- package/mobile/src/components/Calculator/useBonusCalculatorParams.ts +55 -0
- package/mobile/src/components/Calculator/useCalculatorParams.ts +16 -0
- package/mobile/src/components/Calculator/useCreditCalculatorParams.ts +70 -0
- package/mobile/src/components/ExchangeRateTile/CurrencyTable.tsx +5 -9
- package/mobile/src/components/ExchangeRateTile/CurrentLocation.tsx +6 -4
- package/mobile/src/components/ExchangeRateTile/ExchangeCurrencyCalculator.tsx +5 -3
- package/mobile/src/components/ExchangeRateTile/ExchangeRateTile.example.json +8 -0
- package/mobile/src/components/ExchangeRateTile/ExchangeRateTile.tsx +6 -12
- package/mobile/src/components/ExchangeRateTile/ExchangeRateTileContent.ts +3 -0
- package/mobile/src/components/ExchangeRateTile/renderButton.tsx +3 -8
- package/mobile/src/components/ExchangeRateTile/renderInput.tsx +2 -2
- package/mobile/src/components/Footer/HorizontalNavigation.tsx +2 -20
- package/mobile/src/components/Footer/HorizontalNavigationLink.tsx +21 -0
- package/mobile/src/components/Footer/MediaButton.tsx +2 -7
- package/mobile/src/components/Footer/TextInformation.tsx +2 -22
- package/mobile/src/components/Footer/TextInformationLink.tsx +23 -0
- package/mobile/src/components/Gallery/Gallery.tsx +3 -5
- package/mobile/src/components/GroupBlock/GroupBlockTabs.tsx +4 -4
- package/mobile/src/components/GroupBlock/GroupBlocksItem.tsx +2 -2
- package/mobile/src/components/GroupBlock/renderBlocksTypes.tsx +6 -3
- package/mobile/src/components/InsuranceAmountBlock/InsuranceAmountBlock.example.json +45 -9
- package/mobile/src/components/InsuranceAmountBlock/InsuranceAmountBlock.tsx +22 -27
- package/mobile/src/components/InsuranceAmountBlock/InsuranceAmountBlockContent.ts +2 -2
- package/mobile/src/components/InsuranceAmountBlock/InsuranceAmountBlockInner.tsx +12 -7
- package/mobile/src/components/NavigatorTabs/NavigatorTabItem.tsx +2 -2
- package/mobile/src/components/ProductBlock/renderBackwardButton.tsx +6 -3
- package/mobile/src/components/ProductGallery/ProductGalleryBlock.tsx +4 -3
- package/mobile/src/components/StepsBlock/StepsBlock.tsx +2 -6
- package/mobile/src/components/TariffsTable/TariffsTable.tsx +4 -7
- package/mobile/src/components/TextBlock/TextBlock.tsx +2 -1
- package/mobile/src/components/Tile/Tile.example.json +0 -1
- package/mobile/src/components/Tile/Tile.tsx +6 -3
- package/mobile/src/content-page-repository/transformPicture.ts +7 -5
- package/mobile/src/hooks/useExchangeRates.ts +6 -7
- package/mobile/src/icons/IconName.ts +4 -4
- package/mobile/src/icons/Logo.svg +7 -0
- package/mobile/src/model/Picture.ts +5 -3
- package/mobile/src/services/sitemap/findActiveSubItem.ts +2 -3
- package/mobile/src/ui-kit/BlockWrapper.tsx +2 -5
- package/mobile/src/ui-kit/BlocksList/renderBlocksList.tsx +6 -3
- package/mobile/src/ui-kit/Button/ButtonSection.tsx +1 -1
- package/mobile/src/ui-kit/Checkbox/Checkbox.tsx +18 -13
- package/mobile/src/ui-kit/Checkbox/CheckboxProps.ts +2 -1
- package/mobile/src/ui-kit/Foldable/Foldable.tsx +7 -5
- package/mobile/src/ui-kit/HeaderItem/HeaderItem.tsx +4 -6
- package/mobile/src/ui-kit/Heading/Heading.tsx +1 -1
- package/mobile/src/ui-kit/Img/Img.tsx +4 -71
- package/mobile/src/ui-kit/Img/ImgAsPicture.tsx +60 -0
- package/mobile/src/ui-kit/Img/ImgInner.tsx +37 -0
- package/mobile/src/ui-kit/Img/ImgProps.ts +1 -0
- package/mobile/src/ui-kit/Logo/Logo.tsx +2 -13
- package/mobile/src/ui-kit/RadioButtonGroup/RadioButtonGroup.tsx +32 -0
- package/mobile/src/ui-kit/SearchBar/SearchBar.tsx +3 -41
- package/mobile/src/ui-kit/SearchBar/SearchBarInner.tsx +72 -0
- package/package.json +2 -1
- package/src/components/Calculator/BonusCalculatorForm.tsx +43 -51
- package/src/components/Calculator/Calculator.fixture.tsx +2 -14
- package/src/components/Calculator/Calculator.tsx +8 -8
- package/src/components/Calculator/CalculatorContent.ts +14 -4
- package/src/components/Calculator/CreditCalculatorForm.tsx +62 -62
- package/src/components/Calculator/DepositCalculatorForm.tsx +34 -35
- package/src/components/Calculator/EmbeddableCalcBlocks.tsx +3 -3
- package/src/components/Calculator/MortgageCalculatorForm.tsx +29 -37
- package/src/components/Calculator/Rate.tsx +22 -0
- package/src/components/Calculator/constants.ts +41 -4
- package/src/components/Calculator/getBonus.ts +38 -0
- package/src/components/Calculator/getDefaultMonths.ts +2 -7
- package/src/components/Calculator/getDefaultSum.ts +2 -5
- package/src/components/Calculator/getMonthlyPayment.ts +12 -28
- package/src/components/Calculator/renderCalculatorBlock.tsx +4 -4
- package/src/components/Calculator/renderInitialFeeInput.tsx +10 -14
- package/src/components/Calculator/renderMonthsInput.tsx +7 -10
- package/src/components/Calculator/renderPaymentTypeSelector.tsx +12 -0
- package/src/components/Calculator/renderRealEstateValue.tsx +9 -13
- package/src/components/Calculator/renderWantedSumInput.tsx +12 -26
- package/src/components/Calculator/useBonusCalculatorParams.ts +55 -0
- package/src/components/Calculator/useCalculatorParams.ts +16 -0
- package/src/components/Calculator/useCreditCalculatorParams.ts +70 -0
- package/src/components/ExchangeRateTile/CurrencyTable.tsx +5 -9
- package/src/components/ExchangeRateTile/CurrentLocation.tsx +6 -4
- package/src/components/ExchangeRateTile/ExchangeCurrencyCalculator.tsx +5 -3
- package/src/components/ExchangeRateTile/ExchangeRateTile.example.json +8 -0
- package/src/components/ExchangeRateTile/ExchangeRateTile.fixture.tsx +9 -1
- package/src/components/ExchangeRateTile/ExchangeRateTile.tsx +6 -12
- package/src/components/ExchangeRateTile/ExchangeRateTileContent.ts +3 -0
- package/src/components/ExchangeRateTile/renderButton.tsx +3 -8
- package/src/components/ExchangeRateTile/renderInput.tsx +2 -2
- package/src/components/Footer/HorizontalNavigation.mobile.tsx +2 -20
- package/src/components/Footer/HorizontalNavigation.tsx +2 -20
- package/src/components/Footer/HorizontalNavigationLink.tsx +21 -0
- package/src/components/Footer/MediaButton.tsx +2 -7
- package/src/components/Footer/TextInformation.mobile.tsx +2 -22
- package/src/components/Footer/TextInformation.tsx +2 -22
- package/src/components/Footer/TextInformationLink.tsx +23 -0
- package/src/components/Gallery/Gallery.mobile.tsx +3 -5
- package/src/components/GroupBlock/GroupBlockTabs.tsx +4 -4
- package/src/components/GroupBlock/GroupBlocksItem.tsx +2 -2
- package/src/components/GroupBlock/renderBlocksTypes.tsx +6 -3
- package/src/components/InsuranceAmountBlock/InsuranceAmountBlock.example.json +45 -9
- package/src/components/InsuranceAmountBlock/InsuranceAmountBlock.fixture.tsx +7 -2
- package/src/components/InsuranceAmountBlock/InsuranceAmountBlock.tsx +22 -27
- package/src/components/InsuranceAmountBlock/InsuranceAmountBlockContent.ts +2 -2
- package/src/components/InsuranceAmountBlock/InsuranceAmountBlockInner.tsx +12 -7
- package/src/components/LinkDocs/LinkDocs.tsx +1 -1
- package/src/components/NavigatorTabs/NavigatorTabItem.tsx +2 -2
- package/src/components/ProductBlock/ProductBlock.tsx +8 -2
- package/src/components/ProductBlock/renderBackwardButton.tsx +6 -3
- package/src/components/ProductGallery/ProductGalleryBlock.tsx +6 -11
- package/src/components/StepsBlock/StepsBlock.mobile.tsx +2 -6
- package/src/components/StepsBlock/StepsBlock.tsx +10 -8
- package/src/components/TariffsTable/TariffsTable.mobile.tsx +4 -7
- package/src/components/TextBlock/TextBlock.mobile.tsx +2 -1
- package/src/components/TextBlock/TextBlock.tsx +1 -1
- package/src/components/Tile/Tile.example.json +0 -1
- package/src/components/Tile/Tile.tsx +6 -3
- package/src/content-page-repository/transformPicture.ts +7 -5
- package/src/hooks/useExchangeRates.ts +6 -7
- package/src/icons/IconName.ts +4 -1
- package/src/icons/Logo.svg +7 -0
- package/src/model/Picture.ts +5 -3
- package/src/services/sitemap/findActiveSubItem.ts +2 -3
- package/src/ui-kit/BlockWrapper.tsx +2 -5
- package/src/ui-kit/BlocksList/renderBlocksList.tsx +6 -3
- package/src/ui-kit/Button/ButtonSection.tsx +1 -1
- package/src/ui-kit/Checkbox/Checkbox.tsx +18 -13
- package/src/ui-kit/Checkbox/CheckboxProps.ts +2 -1
- package/src/ui-kit/Foldable/Foldable.tsx +7 -5
- package/src/ui-kit/HeaderItem/HeaderItem.mobile.tsx +4 -6
- package/src/ui-kit/HeaderItem/HeaderItem.tsx +2 -2
- package/src/ui-kit/Heading/Heading.mobile.tsx +1 -1
- package/src/ui-kit/Heading/Heading.tsx +1 -1
- package/src/ui-kit/Img/Img.mobile.tsx +4 -71
- package/src/ui-kit/Img/Img.tsx +6 -60
- package/src/ui-kit/Img/ImgAsPicture.tsx +60 -0
- package/src/ui-kit/Img/ImgInner.tsx +37 -0
- package/src/ui-kit/Img/ImgProps.ts +1 -0
- package/src/ui-kit/Logo/Logo.mobile.tsx +2 -13
- package/src/ui-kit/Logo/Logo.tsx +5 -11
- package/src/ui-kit/RadioButtonGroup/RadioButtonGroup.fixture.tsx +26 -0
- package/src/ui-kit/RadioButtonGroup/RadioButtonGroup.tsx +32 -0
- package/src/ui-kit/SearchBar/SearchBar.mobile.tsx +3 -41
- package/src/ui-kit/SearchBar/SearchBar.tsx +3 -43
- package/src/ui-kit/SearchBar/SearchBarInner.tsx +72 -0
- package/dist/components/Calculator/getCalculatorParams.d.ts +0 -7
- package/dist/components/Calculator/getCalculatorParams.js +0 -12
- package/dist/components/Calculator/getCalculatorParams.js.map +0 -1
- package/dist/components/Calculator/renderRate.d.ts +0 -8
- package/dist/components/Calculator/renderRate.js +0 -9
- package/dist/components/Calculator/renderRate.js.map +0 -1
- package/dist/components/ProductGallery/ProductGalleryBlock.mobile.d.ts +0 -8
- package/dist/components/ProductGallery/ProductGalleryBlock.mobile.js +0 -14
- package/dist/components/ProductGallery/ProductGalleryBlock.mobile.js.map +0 -1
- package/dist/hooks/useCreditCalculatorData.d.ts +0 -2
- package/dist/hooks/useCreditCalculatorData.js +0 -15
- package/dist/hooks/useCreditCalculatorData.js.map +0 -1
- package/dist/ui-kit/SearchBar.mobile.d.ts +0 -2
- package/dist/ui-kit/SearchBar.mobile.js +0 -14
- package/dist/ui-kit/SearchBar.mobile.js.map +0 -1
- package/lib/components/Calculator/getCalculatorParams.d.ts +0 -7
- package/lib/components/Calculator/getCalculatorParams.js +0 -9
- package/lib/components/Calculator/getCalculatorParams.js.map +0 -1
- package/lib/components/Calculator/renderRate.d.ts +0 -8
- package/lib/components/Calculator/renderRate.js +0 -6
- package/lib/components/Calculator/renderRate.js.map +0 -1
- package/lib/components/ProductGallery/ProductGalleryBlock.mobile.d.ts +0 -8
- package/lib/components/ProductGallery/ProductGalleryBlock.mobile.js +0 -12
- package/lib/components/ProductGallery/ProductGalleryBlock.mobile.js.map +0 -1
- package/lib/hooks/useCreditCalculatorData.d.ts +0 -2
- package/lib/hooks/useCreditCalculatorData.js +0 -12
- package/lib/hooks/useCreditCalculatorData.js.map +0 -1
- package/lib/ui-kit/SearchBar.mobile.d.ts +0 -2
- package/lib/ui-kit/SearchBar.mobile.js +0 -12
- package/lib/ui-kit/SearchBar.mobile.js.map +0 -1
- package/mobile/dist/components/Calculator/getCalculatorParams.d.ts +0 -7
- package/mobile/dist/components/Calculator/getCalculatorParams.js +0 -12
- package/mobile/dist/components/Calculator/getCalculatorParams.js.map +0 -1
- package/mobile/dist/components/Calculator/renderRate.d.ts +0 -8
- package/mobile/dist/components/Calculator/renderRate.js +0 -9
- package/mobile/dist/components/Calculator/renderRate.js.map +0 -1
- package/mobile/dist/hooks/useCreditCalculatorData.d.ts +0 -2
- package/mobile/dist/hooks/useCreditCalculatorData.js +0 -15
- package/mobile/dist/hooks/useCreditCalculatorData.js.map +0 -1
- package/mobile/lib/components/Calculator/getCalculatorParams.d.ts +0 -7
- package/mobile/lib/components/Calculator/getCalculatorParams.js +0 -9
- package/mobile/lib/components/Calculator/getCalculatorParams.js.map +0 -1
- package/mobile/lib/components/Calculator/renderRate.d.ts +0 -8
- package/mobile/lib/components/Calculator/renderRate.js +0 -6
- package/mobile/lib/components/Calculator/renderRate.js.map +0 -1
- package/mobile/lib/hooks/useCreditCalculatorData.d.ts +0 -2
- package/mobile/lib/hooks/useCreditCalculatorData.js +0 -12
- package/mobile/lib/hooks/useCreditCalculatorData.js.map +0 -1
- package/mobile/src/components/Calculator/getCalculatorParams.ts +0 -18
- package/mobile/src/components/Calculator/renderRate.tsx +0 -22
- package/mobile/src/hooks/useCreditCalculatorData.ts +0 -20
- package/src/components/Calculator/getCalculatorParams.ts +0 -18
- package/src/components/Calculator/renderRate.tsx +0 -22
- package/src/components/ProductGallery/ProductGalleryBlock.mobile.tsx +0 -32
- package/src/hooks/useCreditCalculatorData.ts +0 -20
- package/src/ui-kit/SearchBar.mobile.tsx +0 -45
package/bundle/bundle.umd.js
CHANGED
|
@@ -194,9 +194,9 @@
|
|
|
194
194
|
if (entry.isIntersecting) ;
|
|
195
195
|
};
|
|
196
196
|
|
|
197
|
-
const BlockWrapper = JSX(({ anchor, className, context, children, Tag = 'section'
|
|
197
|
+
const BlockWrapper = JSX(({ anchor, className, context, children, Tag = 'section' }) => {
|
|
198
198
|
const { IntersectionObserverTag } = context;
|
|
199
|
-
return anchor ? (jsx(IntersectionObserverTag, { Tag: Tag, className: className, observerCallback: changeHashOnObserve, observerOptions: { threshold: 1 }, anchor: anchor,
|
|
199
|
+
return anchor ? (jsx(IntersectionObserverTag, { Tag: Tag, className: className, observerCallback: changeHashOnObserve, observerOptions: { threshold: 1 }, anchor: anchor, children: children })) : (jsx(Tag, { className: className, children: children }));
|
|
200
200
|
});
|
|
201
201
|
|
|
202
202
|
const HEADING_STYLE_MAP = {
|
|
@@ -210,7 +210,7 @@
|
|
|
210
210
|
const Heading = JSX((props) => {
|
|
211
211
|
const { className = '', headingType, title, as } = props;
|
|
212
212
|
if (!headingType) {
|
|
213
|
-
return;
|
|
213
|
+
return null;
|
|
214
214
|
}
|
|
215
215
|
const Tag = as || headingType;
|
|
216
216
|
return (jsx(Tag, { className: `font-sans m-0 ${HEADING_STYLE_MAP[headingType]} ${className}`, children: title }));
|
|
@@ -263,6 +263,7 @@
|
|
|
263
263
|
IconMap["InterestGrowthIcon"] = "InterestGrowthIcon";
|
|
264
264
|
IconMap["InterestIcon"] = "InterestIcon";
|
|
265
265
|
IconMap["JCBIcon"] = "JCBIcon";
|
|
266
|
+
IconMap["Logo"] = "Logo";
|
|
266
267
|
IconMap["LoupeIcon"] = "LoupeIcon";
|
|
267
268
|
IconMap["MasterCardIcon"] = "MasterCardIcon";
|
|
268
269
|
IconMap["MinusIcon"] = "MinusIcon";
|
|
@@ -345,6 +346,7 @@
|
|
|
345
346
|
IconTitleMap["InterestGrowthIcon"] = "\u0414\u0438\u0430\u0433\u0440\u0430\u043C\u043C\u0430 \u0440\u043E\u0441\u0442\u0430";
|
|
346
347
|
IconTitleMap["InterestIcon"] = "\u0421\u043A\u0438\u0434\u043A\u0430";
|
|
347
348
|
IconTitleMap["JCBIcon"] = "JCB";
|
|
349
|
+
IconTitleMap["Logo"] = "Logo";
|
|
348
350
|
IconTitleMap["LoupeIcon"] = "\u041B\u0443\u043F\u0430";
|
|
349
351
|
IconTitleMap["MasterCardIcon"] = "MasterCard";
|
|
350
352
|
IconTitleMap["MinusIcon"] = "\u041C\u0438\u043D\u0443\u0441";
|
|
@@ -431,34 +433,49 @@
|
|
|
431
433
|
return typeof image === 'string' ? 'normal' : image.iconVersion || 'normal';
|
|
432
434
|
}
|
|
433
435
|
|
|
434
|
-
const
|
|
435
|
-
if (
|
|
436
|
-
return
|
|
437
|
-
}
|
|
438
|
-
// backwards compatibility with existing icons in usage
|
|
439
|
-
const icon = typeof image === 'string' ? image : image.icon;
|
|
440
|
-
if (icon || icon === '') {
|
|
441
|
-
return icon.length ? (jsx(Icon, { className: className, imageClassName: imageClassName, iconVersion: getIconVersion(image), name: icon, ...iconProps })) : null;
|
|
436
|
+
const sourcesComparator = (a, b) => {
|
|
437
|
+
if (a.media && b.media) {
|
|
438
|
+
return a.media - b.media;
|
|
442
439
|
}
|
|
443
|
-
return
|
|
444
|
-
}
|
|
445
|
-
const ImgAsPicture = JSX(({ className = '', image, imageClassName = '' }) => {
|
|
440
|
+
return 0;
|
|
441
|
+
};
|
|
442
|
+
const ImgAsPicture = JSX(({ className = '', image, imageClassName = '', isMobile = false }) => {
|
|
446
443
|
if (!image) {
|
|
447
444
|
return null;
|
|
448
445
|
}
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
446
|
+
const pictureStyles = isMobile ? 'flex' : 'flex-none';
|
|
447
|
+
return (jsxs("picture", { className: `${pictureStyles} ${className}`, children: [image?.sources?.length
|
|
448
|
+
? image.sources
|
|
449
|
+
.sort(sourcesComparator)
|
|
450
|
+
.map(({ src, format, media, size }, index) => (jsx("source", { srcSet: src, type: formatToMimeType(format), media: media ? `(max-width: ${media}px)` : '', ...size }, `${index}_${src}`)))
|
|
451
|
+
: null, renderImg(image, imageClassName, isMobile)] }));
|
|
452
452
|
});
|
|
453
|
-
const renderImg = (image, imageClassName = '') => {
|
|
453
|
+
const renderImg = (image, imageClassName = '', isMobile = false) => {
|
|
454
454
|
const title = image.title || '';
|
|
455
455
|
const alt = image.alt || image.title;
|
|
456
|
-
|
|
456
|
+
const imgStyle = isMobile ? 'm-auto' : 'm-0';
|
|
457
|
+
return (jsx("img", { src: image.src, className: `${imgStyle} ${imageClassName}`, alt: alt, title: title, ...image.size }));
|
|
457
458
|
};
|
|
458
459
|
function formatToMimeType(format) {
|
|
459
460
|
return format ? `image/${String(format)}` : undefined;
|
|
460
461
|
}
|
|
461
462
|
|
|
463
|
+
const ImgInner = JSX(({ className = '', image, imageClassName = '', isMobile, ...iconProps }) => {
|
|
464
|
+
if (!image) {
|
|
465
|
+
return null;
|
|
466
|
+
}
|
|
467
|
+
// backwards compatibility with existing icons in usage
|
|
468
|
+
const icon = typeof image === 'string' ? image : image.icon;
|
|
469
|
+
if (icon || icon === '') {
|
|
470
|
+
return icon.length ? (jsx(Icon, { className: className, imageClassName: imageClassName, iconVersion: getIconVersion(image), name: icon, ...iconProps })) : null;
|
|
471
|
+
}
|
|
472
|
+
return (jsx(ImgAsPicture, { className: className, imageClassName: imageClassName, image: image, isMobile: isMobile }));
|
|
473
|
+
});
|
|
474
|
+
|
|
475
|
+
const Img = JSX(({ className = '', imageClassName, image, ...iconProps }) => {
|
|
476
|
+
return (jsx(ImgInner, { className: className, imageClassName: imageClassName, image: image, ...iconProps }));
|
|
477
|
+
});
|
|
478
|
+
|
|
462
479
|
function style2className(style) {
|
|
463
480
|
return style ? style.filter(Boolean).join(' ') : '';
|
|
464
481
|
}
|
|
@@ -660,7 +677,7 @@
|
|
|
660
677
|
});
|
|
661
678
|
function renderButton$2({ icon, iconRight, ...button }, i) {
|
|
662
679
|
if (!button?.text) {
|
|
663
|
-
return;
|
|
680
|
+
return null;
|
|
664
681
|
}
|
|
665
682
|
return icon ? (jsx(Button, { appendLeft: jsx(Img, { image: icon, width: "24", height: "24", asSVG: true }), appendRight: jsx(Img, { image: iconRight, width: "24", height: "24", asSVG: true }), ...button }, String(i))) : (jsx(Button, { ...button }, String(i)));
|
|
666
683
|
}
|
|
@@ -751,9 +768,10 @@
|
|
|
751
768
|
};
|
|
752
769
|
|
|
753
770
|
function renderBackwardButton(button, version, className) {
|
|
771
|
+
const { text, href, target, onClick } = button;
|
|
754
772
|
const iconVersion = version === 'primary' ? 'white' : 'black';
|
|
755
773
|
const backwardIcon = button?.icon || { icon: 'ArrowLeftIcon' };
|
|
756
|
-
return (jsxs("div", { className: `flex items-center ${className}`, children: [jsx(Button, { version: version, rounded: true, className: "w-12 h-12 min-h-12 min-w-12 flex items-center justify-center mr-3", ariaLabel:
|
|
774
|
+
return (jsxs("div", { className: `flex items-center ${className}`, children: [jsx(Button, { version: version, rounded: true, className: "w-12 h-12 min-h-12 min-w-12 flex items-center justify-center mr-3", ariaLabel: text, href: href, target: target, onClick: onClick, children: jsx(Img, { className: "w-4 h-4", image: { ...backwardIcon, iconVersion }, asSVG: true }) }), text ? jsx("span", { className: "text-m-md font-light", children: text }) : null] }));
|
|
757
775
|
}
|
|
758
776
|
|
|
759
777
|
const productBlockStyleMap$1 = {
|
|
@@ -768,7 +786,9 @@
|
|
|
768
786
|
const { context, className = '', breadcrumbs, backwardButton, version = 'primary', ...otherProps } = props;
|
|
769
787
|
const router = context.useRouter();
|
|
770
788
|
const { handlerDecorator } = context;
|
|
771
|
-
return (jsxs(BlockWrapper, { context: context, className: `font-sans overflow-hidden pt-[50px] pl-[50px] pb-[50px] pr-[7.5rem] box-border min-h-[420px] ${productBlockStyleMap$1[version]} ${className}`, ...otherProps, children: [backwardButton?.text
|
|
789
|
+
return (jsxs(BlockWrapper, { context: context, className: `font-sans overflow-hidden pt-[50px] pl-[50px] pb-[50px] pr-[7.5rem] box-border min-h-[420px] ${productBlockStyleMap$1[version]} ${className}`, ...otherProps, children: [backwardButton?.text
|
|
790
|
+
? renderBackwardButton(useLink({ router, handlerDecorator }, backwardButton), version, 'mb-10 -mt-2.5')
|
|
791
|
+
: null, breadcrumbs?.length ? (jsx("div", { className: "text-xs mb-6", children: joinList(jsx("span", { className: `mx-2 ${breadcrumbsStyleMap[version]}`, children: "/" }))(breadcrumbs.map((breadcrumb, i) => (jsx(Breadcrumb, { ...useLink({ router, handlerDecorator }, { className: breadcrumbsStyleMap[version], ...breadcrumb }) }, String(i))))) })) : null, jsx(ProductBlockInner, { context: context, version: version, ...otherProps })] }));
|
|
772
792
|
});
|
|
773
793
|
|
|
774
794
|
const textBlockStyleMaps = {
|
|
@@ -840,11 +860,12 @@
|
|
|
840
860
|
};
|
|
841
861
|
const Tile = JSX((props) => {
|
|
842
862
|
const { context, title, headingType = 'h3', description, items, children, buttons, image, isDotted = true, className = '', version = 'primary', ...rest } = props;
|
|
843
|
-
|
|
844
|
-
|
|
863
|
+
const headingTextClassName = version === 'primary' ? 'text-primary-text' : '';
|
|
864
|
+
return (jsx(BlockWrapper, { context: context, className: `overflow-hidden font-sans p-9 pr-3 box-border ${className} ${tileStyleMap[version]} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `, ...rest, children: jsxs(BaseTile, { context: context, title: title ? (jsx(Heading, { headingType: headingType, as: "h3", title: title, className: `whitespace-pre-wrap max-w-[600px] mb-3 ${headingTextClassName}` })) : null, buttons: buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttons.map((button) => ({ ...button, className: 'w-[158px]' })), className: "flex mt-9 gap-3" })) : null, image: image?.src && jsx(Img, { className: "mt-auto ml-7", image: image }), children: [description ? (jsx(Description, { className: "max-w-[600px] text-title-new-sm font-light", description: description })) : null, children, renderList$2(items, version, isDotted)] }) }));
|
|
845
865
|
});
|
|
846
866
|
function renderList$2(items, version, isDotted) {
|
|
847
|
-
|
|
867
|
+
const listVersion = version === 'primary' ? 'tile' : 'tile-white';
|
|
868
|
+
return items?.length ? (jsx(List, { items: items, isDotted: isDotted, itemClassName: "text-title-2xs font-light mt-2", version: listVersion })) : null;
|
|
848
869
|
}
|
|
849
870
|
|
|
850
871
|
const productTileStyleMap = {
|
|
@@ -974,11 +995,13 @@
|
|
|
974
995
|
|
|
975
996
|
const renderBlocksList = ({ blocks, context, className = '' }) => blocks?.length ? blocks.map(renderBlock$2({ context, className })) : null;
|
|
976
997
|
const renderBlock$2 = ({ context, className }) => (block, i) => {
|
|
977
|
-
|
|
998
|
+
if (!block) {
|
|
999
|
+
return null;
|
|
1000
|
+
}
|
|
1001
|
+
const { style, blockListType: type, ...rest } = block;
|
|
978
1002
|
if (!type || !(type in EmbeddableBlocks)) {
|
|
979
1003
|
return null;
|
|
980
1004
|
}
|
|
981
|
-
const { style, ...rest } = block;
|
|
982
1005
|
const classNameBlock = style2className(style);
|
|
983
1006
|
const EmbeddedBlock = EmbeddableBlocks[type];
|
|
984
1007
|
return (jsx(EmbeddedBlock, { className: `${className} ${classNameBlock}`, context: context, ...rest }, `block_${i}`));
|
|
@@ -1080,47 +1103,54 @@
|
|
|
1080
1103
|
return (jsxs("div", { className: "flex flex-col items-center max-w-[292px]", children: [bonusBenefit?.icon ? (jsx(Img, { className: "h-[180px] w-[160px] min-w-[160px] min-h-[160px]", image: bonusBenefit.icon, width: "160", height: "180" })) : null, jsx("div", { children: bonusBenefit?.label ? jsx("span", { className: "title-2xs m-0", children: bonusBenefit.label }) : null })] }, String(i)));
|
|
1081
1104
|
};
|
|
1082
1105
|
|
|
1083
|
-
function useCreditCalculatorData(useAsyncData, directoryName) {
|
|
1084
|
-
const { data } = useAsyncData(creditCalculatorUrl(directoryName), fetchCreditCalculatorData);
|
|
1085
|
-
return data || {};
|
|
1086
|
-
}
|
|
1087
|
-
async function fetchCreditCalculatorData(url) {
|
|
1088
|
-
const response = await fetch(url);
|
|
1089
|
-
return await response.json();
|
|
1090
|
-
}
|
|
1091
|
-
function creditCalculatorUrl(directoryName) {
|
|
1092
|
-
return `/wcms-resources/${directoryName || 'credit-calculator-data'}.json`;
|
|
1093
|
-
}
|
|
1094
|
-
|
|
1095
|
-
const SVG = JSX(({ className, viewBox, fill = 'none', width, height, paths, ...commonOptions }) => {
|
|
1096
|
-
return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: className, viewBox: viewBox, fill: fill, width: width, height: height, children: paths.map(({ d, fill: pathFill, ...options }, i) => (jsx("path", { d: d, fill: pathFill || 'currentColor', ...commonOptions, ...options }, i))) }));
|
|
1097
|
-
});
|
|
1098
|
-
|
|
1099
|
-
const CHECK_PATHS = [
|
|
1100
|
-
{
|
|
1101
|
-
d: 'M10.207.793a1 1 0 0 1 0 1.414l-6 6a1 1 0 0 1-1.414 0l-2.5-2.5a1 1 0 0 1 1.414-1.414L3.5 6.086 8.793.793a1 1 0 0 1 1.414 0Z',
|
|
1102
|
-
fillRule: 'evenodd',
|
|
1103
|
-
clipRule: 'evenodd',
|
|
1104
|
-
fill: 'white',
|
|
1105
|
-
},
|
|
1106
|
-
];
|
|
1107
|
-
const Checkbox = JSX(({ text, checked, onChange, className }) => (jsx("div", { className: className, children: jsxs("label", { className: "flex items-center cursor-pointer relative", children: [jsx("input", { className: `peer appearance-none w-5 h-5 border-solid border ${checked ? 'border-black' : 'border-main-stroke'} rounded checked:bg-primary-main checked:border-primary-main m-0`, type: "checkbox", onChange: (e) => {
|
|
1108
|
-
onChange(e.target.checked);
|
|
1109
|
-
}, checked: checked }), jsx(SVG, { paths: CHECK_PATHS, className: "hidden absolute left-1 ml-px peer-checked:block", width: "11", height: "9", fill: "white", viewBox: "0 0 11 9" }), text ? jsx("span", { className: "font-sans ml-3 text-m-base cursor-pointer", children: text }) : null] }) })));
|
|
1110
|
-
|
|
1111
1106
|
const addSpacesBetweenNumbers = (number) => new Intl.NumberFormat('ru-RU', { maximumSignificantDigits: 3 }).format(number);
|
|
1112
1107
|
|
|
1113
1108
|
const CalculatorValueBlock = JSX(({ title, value, postfix = '', prefix, className = '' }) => {
|
|
1114
1109
|
return (jsxs("div", { className: `mb-5 ${className}`, children: [title ? jsx("div", { className: "text-base font-light", children: title }) : null, value ? (jsxs("div", { className: "text-title font-normal", children: [prefix, " ", addSpacesBetweenNumbers(Math.round(value)), " ", postfix] })) : null] }));
|
|
1115
1110
|
});
|
|
1116
1111
|
|
|
1117
|
-
const DEFAULT_MIN_SUM =
|
|
1118
|
-
const DEFAULT_MAX_SUM =
|
|
1112
|
+
const DEFAULT_MIN_SUM = 60000;
|
|
1113
|
+
const DEFAULT_MAX_SUM = 2000000;
|
|
1119
1114
|
const DEFAULT_SUM = (DEFAULT_MAX_SUM - DEFAULT_MIN_SUM) / 2;
|
|
1120
|
-
const DEFAULT_MIN_MONTHS =
|
|
1121
|
-
const DEFAULT_MAX_MONTHS =
|
|
1115
|
+
const DEFAULT_MIN_MONTHS = 13;
|
|
1116
|
+
const DEFAULT_MAX_MONTHS = 60;
|
|
1122
1117
|
const DEFAULT_MONTHS = Math.round((DEFAULT_MAX_MONTHS - DEFAULT_MIN_MONTHS) / 2);
|
|
1123
1118
|
const MONTHS_IN_YEAR = 12;
|
|
1119
|
+
const MONTHLY_INTEREST_RATE = MONTHS_IN_YEAR * 100;
|
|
1120
|
+
const DEFAULT_CREDIT_CALCULATOR_PARAMS = {
|
|
1121
|
+
minSum: DEFAULT_MIN_SUM,
|
|
1122
|
+
maxSum: DEFAULT_MAX_SUM,
|
|
1123
|
+
minMonths: DEFAULT_MIN_MONTHS,
|
|
1124
|
+
maxMonths: DEFAULT_MAX_MONTHS,
|
|
1125
|
+
rateBottomRange: 10,
|
|
1126
|
+
rateTopRange: 7,
|
|
1127
|
+
isSalaryClient: true,
|
|
1128
|
+
isStateEmployee: true,
|
|
1129
|
+
isInsurance: true,
|
|
1130
|
+
sumBorder: 999999,
|
|
1131
|
+
};
|
|
1132
|
+
const DEFAULT_TRAVEL_MIN_SUM = 6000;
|
|
1133
|
+
const DEFAULT_REST_MIN_SUM = 6000;
|
|
1134
|
+
const DEFAULT_BONUS_CALCULATOR_PARAMS = {
|
|
1135
|
+
minSumTravel: 6000,
|
|
1136
|
+
maxSumTravel: 200000,
|
|
1137
|
+
minSumOther: 6000,
|
|
1138
|
+
maxSumOther: 200000,
|
|
1139
|
+
maxBonus: 5000,
|
|
1140
|
+
prefMonthsNum: 2,
|
|
1141
|
+
prefTravelBonusRate: 0.015,
|
|
1142
|
+
prefRestBonusRate: 0.01,
|
|
1143
|
+
travelBonusRate: 0.015,
|
|
1144
|
+
restBonusRate: 0.01,
|
|
1145
|
+
};
|
|
1146
|
+
const CREDIT_CALC_DEFAULT_DIR = 'credit-calculator-data';
|
|
1147
|
+
const BONUS_CALC_DEFAULT_DIR = 'bonus-calculator-data';
|
|
1148
|
+
|
|
1149
|
+
const Rate = JSX(({ rate, title = 'Ставка', unit, rateBlockClassName }) => (jsxs("div", { children: [jsx("div", { className: "text-sm font-light ml-3", children: title }), jsxs("div", { className: "flex justify-start", children: [jsx("span", { className: `block calc-rate-text font-mohave text-highlighted pr-6 -mt-4 ${rateBlockClassName}`, children: String(rate).replace('.', ',') }), unit ? jsx("span", { className: "calc-rate-text text-[65px] leading-[75px]", children: unit }) : ''] })] })));
|
|
1150
|
+
|
|
1151
|
+
function renderButtonSection(context, buttons) {
|
|
1152
|
+
return buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttons, className: "flex flex-col mt-7 gap-2" })) : null;
|
|
1153
|
+
}
|
|
1124
1154
|
|
|
1125
1155
|
const InputRange = JSX(({ className, title, items = [], min = 1, max = 100, step = 1, value = min, onChange }) => {
|
|
1126
1156
|
const handleChange = (_) => {
|
|
@@ -1148,226 +1178,250 @@
|
|
|
1148
1178
|
outline-none p-0 pl-4 box-border text-primary-text`, value: addSpacesBetweenNumbers(value), onChange: (e) => handleChange(e.target.value), onBlur: handleBlur }), jsx("div", { className: "absolute inset-x-0 bottom-[-4px] px-4 leading-[18px]", children: jsx("input", { className: "box-border w-full m-0 cursor-pointer slider", type: "range", min: min, max: max, step: step, value: value, onChange: (e) => handleChange(e.target.value), style: inputStyle }) })] }), jsx("div", { className: "flex justify-between my-3", children: items.map((item, i) => (jsx("span", { className: "text-sm leading-[14px] text-secondary-text pl-4", children: item }, String(i)))) })] }));
|
|
1149
1179
|
});
|
|
1150
1180
|
|
|
1151
|
-
const
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
const maxSum =
|
|
1181
|
+
const clamp = (value, min, max) => Math.max(min, Math.min(value, max));
|
|
1182
|
+
|
|
1183
|
+
const DEFAULT_MONEY_STEP = 1000;
|
|
1184
|
+
function renderWantedSumInput(title, params, callback) {
|
|
1185
|
+
const { moneyValue, minSum, maxSum, step = DEFAULT_MONEY_STEP, isShowItems = true } = params;
|
|
1156
1186
|
const items = [
|
|
1157
1187
|
`От ${addSpacesBetweenNumbers(minSum)} ₽`,
|
|
1158
1188
|
`До ${addSpacesBetweenNumbers(maxSum)} ₽`,
|
|
1159
1189
|
];
|
|
1160
|
-
return (jsx(InputRange, {
|
|
1190
|
+
return (jsx(InputRange, { title: title, items: isShowItems ? items : [], min: minSum, max: maxSum, step: step, value: clamp(moneyValue, minSum, maxSum), onChange: callback }));
|
|
1161
1191
|
}
|
|
1162
1192
|
|
|
1163
|
-
const
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
return DEFAULT_RATE;
|
|
1193
|
+
const getBonus = (params, bonusTravelValue, bonusOtherValue) => {
|
|
1194
|
+
const { minSumTravel, minSumOther, maxBonus, prefMonthsNum, prefTravelBonusRate, prefRestBonusRate, travelBonusRate, restBonusRate, } = params;
|
|
1195
|
+
if (bonusTravelValue === minSumTravel && bonusOtherValue === minSumOther) {
|
|
1196
|
+
return [0, 0];
|
|
1168
1197
|
}
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1198
|
+
const prefBonus = Math.min(Math.round(prefTravelBonusRate * bonusTravelValue) +
|
|
1199
|
+
Math.round(prefRestBonusRate * bonusOtherValue), maxBonus);
|
|
1200
|
+
const bonus = Math.min(Math.round(travelBonusRate * bonusTravelValue) + Math.round(restBonusRate * bonusOtherValue), maxBonus);
|
|
1201
|
+
const yearBonus = prefBonus * prefMonthsNum + bonus * (MONTHS_IN_YEAR - prefMonthsNum);
|
|
1202
|
+
return [prefBonus, yearBonus];
|
|
1172
1203
|
};
|
|
1173
1204
|
|
|
1174
|
-
|
|
1175
|
-
const {
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
const
|
|
1180
|
-
return
|
|
1181
|
-
}
|
|
1205
|
+
function useCalculatorParams(useAsyncData, dir) {
|
|
1206
|
+
const { data } = useAsyncData(`/wcms-resources/${dir}.json`, fetchCalculatorSourceBookParams);
|
|
1207
|
+
return data;
|
|
1208
|
+
}
|
|
1209
|
+
async function fetchCalculatorSourceBookParams(url) {
|
|
1210
|
+
const response = await fetch(url);
|
|
1211
|
+
return await response.json();
|
|
1212
|
+
}
|
|
1182
1213
|
|
|
1183
|
-
const
|
|
1184
|
-
|
|
1185
|
-
|
|
1214
|
+
const getBonusCalculatorParams = (context, userInputParams, sourceBookDir) => {
|
|
1215
|
+
const { travelExpenseValue, restExpenseValue } = userInputParams;
|
|
1216
|
+
const bonusCalculatorSourceBookParams = useCalculatorParams(context.useAsyncData, sourceBookDir || BONUS_CALC_DEFAULT_DIR) || DEFAULT_BONUS_CALCULATOR_PARAMS;
|
|
1217
|
+
const [monthBonus, yearBonus] = getBonus(bonusCalculatorSourceBookParams, travelExpenseValue, restExpenseValue);
|
|
1218
|
+
return {
|
|
1219
|
+
...bonusCalculatorSourceBookParams,
|
|
1220
|
+
...userInputParams,
|
|
1221
|
+
monthBonus,
|
|
1222
|
+
yearBonus,
|
|
1223
|
+
};
|
|
1224
|
+
};
|
|
1186
1225
|
|
|
1187
|
-
const
|
|
1188
|
-
|
|
1189
|
-
|
|
1226
|
+
const BonusCalculatorForm = JSX(({ context, className = '', sourceBookDir, buttons }) => {
|
|
1227
|
+
const [travelExpenseValue, setTravelExpenseValue] = context.useState(DEFAULT_TRAVEL_MIN_SUM);
|
|
1228
|
+
const [restExpenseValue, setRestExpenseValue] = context.useState(DEFAULT_REST_MIN_SUM);
|
|
1229
|
+
const userInputParams = {
|
|
1230
|
+
travelExpenseValue,
|
|
1231
|
+
restExpenseValue,
|
|
1232
|
+
};
|
|
1233
|
+
const { minSumTravel, maxSumTravel, minSumOther, maxSumOther, monthBonus, yearBonus } = getBonusCalculatorParams(context, userInputParams, sourceBookDir);
|
|
1234
|
+
return (jsxs("section", { className: className, children: [jsxs("div", { className: "w-[468px]", children: [renderWantedSumInput('Сумма покупок в категории путешествия, ₽', {
|
|
1235
|
+
minSum: minSumTravel,
|
|
1236
|
+
maxSum: maxSumTravel,
|
|
1237
|
+
moneyValue: travelExpenseValue,
|
|
1238
|
+
step: 500,
|
|
1239
|
+
isShowItems: false,
|
|
1240
|
+
}, setTravelExpenseValue), renderWantedSumInput('Сумма покупок в остальных категориях, ₽', {
|
|
1241
|
+
className: 'mt-6',
|
|
1242
|
+
minSum: minSumOther,
|
|
1243
|
+
maxSum: maxSumOther,
|
|
1244
|
+
moneyValue: restExpenseValue,
|
|
1245
|
+
step: 500,
|
|
1246
|
+
isShowItems: false,
|
|
1247
|
+
}, setRestExpenseValue)] }), jsx("div", { children: monthBonus >= 0 ? (jsx(Rate, { title: "\u0411\u0430\u043B\u043B\u043E\u0432 \u0437\u0430 \u043C\u0435\u0441\u044F\u0446", rate: monthBonus, rateBlockClassName: "tracking-[-14px]" })) : null }), jsxs("div", { className: "w-[240px]", children: [yearBonus >= 0 ? jsx(CalculatorValueBlock, { title: "\u0411\u0430\u043B\u043B\u043E\u0432 \u0437\u0430 \u0433\u043E\u0434", value: yearBonus }) : null, renderButtonSection(context, buttons)] })] }));
|
|
1248
|
+
});
|
|
1190
1249
|
|
|
1191
|
-
const
|
|
1250
|
+
const SVG = JSX(({ className, viewBox, fill = 'none', width, height, paths, ...commonOptions }) => {
|
|
1251
|
+
return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: className, viewBox: viewBox, fill: fill, width: width, height: height, children: paths.map(({ d, fill: pathFill, ...options }, i) => (jsx("path", { d: d, fill: pathFill || 'currentColor', ...commonOptions, ...options }, i))) }));
|
|
1252
|
+
});
|
|
1192
1253
|
|
|
1193
|
-
const
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1254
|
+
const CHECK_PATHS = [
|
|
1255
|
+
{
|
|
1256
|
+
d: 'M10.207.793a1 1 0 0 1 0 1.414l-6 6a1 1 0 0 1-1.414 0l-2.5-2.5a1 1 0 0 1 1.414-1.414L3.5 6.086 8.793.793a1 1 0 0 1 1.414 0Z',
|
|
1257
|
+
fillRule: 'evenodd',
|
|
1258
|
+
clipRule: 'evenodd',
|
|
1259
|
+
fill: 'white',
|
|
1260
|
+
},
|
|
1261
|
+
];
|
|
1262
|
+
const Checkbox = JSX(({ className, text, checked, isRadio, onChange }) => (jsx("div", { className: className, children: jsxs("label", { className: "flex items-center cursor-pointer relative", children: [jsx("input", { className: `peer appearance-none w-5 h-5 border-solid
|
|
1263
|
+
${isRadio ? 'rounded-full border-2' : 'rounded checked:bg-primary-main border'}
|
|
1264
|
+
${checked ? 'border-black' : 'border-main-stroke'}
|
|
1265
|
+
checked:border-primary-main m-0`, type: "checkbox", onChange: (e) => {
|
|
1266
|
+
onChange(e.target.checked);
|
|
1267
|
+
}, checked: checked }), isRadio ? (jsx("div", { className: "left-1 w-3 h-3 rounded-full bg-primary-main hidden absolute peer-checked:block" })) : (jsx(SVG, { paths: CHECK_PATHS, className: "hidden absolute left-1 ml-px peer-checked:block", width: "11", height: "9", fill: "white", viewBox: "0 0 11 9" })), text ? jsx("span", { className: "font-sans ml-3 text-m-base cursor-pointer", children: text }) : null] }) })));
|
|
1207
1268
|
|
|
1208
1269
|
const STEP_MONTHS = 1;
|
|
1209
|
-
function renderMonthsInput(
|
|
1210
|
-
const {
|
|
1270
|
+
function renderMonthsInput(title, params, callback) {
|
|
1271
|
+
const { minMonths, maxMonths, monthsValue } = params;
|
|
1211
1272
|
const monthText = (month) => {
|
|
1212
1273
|
const text = Number(month) % 10 === 1 ? 'месяца' : 'месяцев';
|
|
1213
1274
|
return `${month} ${text}`;
|
|
1214
1275
|
};
|
|
1215
|
-
return (jsx(InputRange, { className: "mt-6", title: title, items: [`От ${monthText(minMonths)}`, `До ${monthText(maxMonths)}`], min: minMonths, max: maxMonths, step: STEP_MONTHS, value: monthsValue
|
|
1276
|
+
return (jsx(InputRange, { className: "mt-6", title: title, items: [`От ${monthText(minMonths)}`, `До ${monthText(maxMonths)}`], min: minMonths, max: maxMonths, step: STEP_MONTHS, value: clamp(monthsValue, minMonths, maxMonths), onChange: callback }));
|
|
1216
1277
|
}
|
|
1217
1278
|
|
|
1218
|
-
|
|
1219
|
-
return
|
|
1220
|
-
}
|
|
1279
|
+
const RadioButtonGroup = JSX(({ items, checkedItem, onChangeCheckedItem }) => {
|
|
1280
|
+
return (jsx("div", { children: items?.map(({ id, text }) => (jsx(Checkbox, { isRadio: true, text: text, checked: checkedItem === id, onChange: () => onChangeCheckedItem(id) }, id))) }));
|
|
1281
|
+
});
|
|
1221
1282
|
|
|
1222
|
-
function
|
|
1223
|
-
|
|
1224
|
-
return (jsxs("div", { children: [jsx("div", { className: "text-sm font-light ml-3", children: title }), jsxs("div", { className: "flex justify-start", children: [jsx("span", { className: `calc-rate-text font-mohave text-title-huge pr-4 mt-[-16px] ${className}`, children: rateFormat }), sup ? jsx("span", { className: "calc-rate-text text-[65px] leading-[75px]", children: sup }) : ''] })] }));
|
|
1283
|
+
function renderPaymentTypeSelector(context, { items, checkedItem, onChange }) {
|
|
1284
|
+
return (jsx(RadioButtonGroup, { context: context, items: items, checkedItem: checkedItem, onChangeCheckedItem: onChange }));
|
|
1225
1285
|
}
|
|
1226
1286
|
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1287
|
+
/**
|
|
1288
|
+
* Формулы расчёта аннуитетных и дифференцированных платежей:
|
|
1289
|
+
* https://finuslugi.ru/potrebitelskie_kredity/stat_annuitetnye_i_differentsirovannye_platezhi
|
|
1290
|
+
*/
|
|
1291
|
+
const getMonthlyPayment = (rate, params) => {
|
|
1292
|
+
const { isAnnuity, moneyValue, monthsValue } = params;
|
|
1293
|
+
if (isAnnuity) {
|
|
1294
|
+
const i = rate / MONTHLY_INTEREST_RATE; // Используется значение ставки в процентах
|
|
1295
|
+
return moneyValue * (i + i / (Math.pow(1 + i, monthsValue) - 1));
|
|
1296
|
+
}
|
|
1297
|
+
else {
|
|
1298
|
+
return Math.round(moneyValue / monthsValue) + moneyValue * (rate / (MONTHS_IN_YEAR * 100)); // Используется значение ставки (rate) в процентах, делённое на сто.
|
|
1299
|
+
}
|
|
1300
|
+
};
|
|
1301
|
+
|
|
1302
|
+
const getCreditCalculatorParams = (context, userInputParams, sourceBookDir) => {
|
|
1303
|
+
const { isInsurance, isSalaryClient, isStateEmployee, moneyValue } = userInputParams;
|
|
1304
|
+
const data = useCalculatorParams(context.useAsyncData, sourceBookDir || CREDIT_CALC_DEFAULT_DIR);
|
|
1305
|
+
const creditCalculatorSourceBookParams = data?.rows.find((_) => {
|
|
1306
|
+
return (isInsurance === _.isInsurance &&
|
|
1307
|
+
isSalaryClient === _.isSalaryClient &&
|
|
1308
|
+
isStateEmployee === _.isStateEmployee);
|
|
1309
|
+
}) || DEFAULT_CREDIT_CALCULATOR_PARAMS;
|
|
1310
|
+
const { rateBottomRange, rateTopRange, sumBorder } = creditCalculatorSourceBookParams;
|
|
1311
|
+
const finalRate = moneyValue <= sumBorder ? rateBottomRange : rateTopRange;
|
|
1312
|
+
const monthlyPayment = getMonthlyPayment(finalRate, userInputParams);
|
|
1313
|
+
const extendedCalculatorParams = {
|
|
1314
|
+
...creditCalculatorSourceBookParams,
|
|
1315
|
+
...userInputParams,
|
|
1316
|
+
finalRate,
|
|
1317
|
+
monthlyPayment,
|
|
1318
|
+
};
|
|
1319
|
+
return extendedCalculatorParams;
|
|
1320
|
+
};
|
|
1321
|
+
|
|
1322
|
+
const ANNUITY = 'annuity';
|
|
1323
|
+
const DIFFERENTIAL = 'differential';
|
|
1324
|
+
const paymentTypeItems = [
|
|
1325
|
+
{
|
|
1326
|
+
id: ANNUITY,
|
|
1327
|
+
text: 'Аннуитетный',
|
|
1328
|
+
},
|
|
1329
|
+
{
|
|
1330
|
+
id: DIFFERENTIAL,
|
|
1331
|
+
text: 'Дифференцированный',
|
|
1332
|
+
},
|
|
1333
|
+
];
|
|
1334
|
+
const CreditCalculatorForm = JSX(({ context, className = '', sourceBookDir, buttons }) => {
|
|
1231
1335
|
const [isAnnuity, toggleIsAnnuity] = context.useState(false);
|
|
1232
|
-
const [
|
|
1233
|
-
const [
|
|
1234
|
-
const
|
|
1235
|
-
const
|
|
1236
|
-
const
|
|
1237
|
-
const
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1336
|
+
const [isInsurance, toggleIsInsurance] = context.useState(true);
|
|
1337
|
+
const [isSalaryClient, toggleIsSalaryClient] = context.useState(false);
|
|
1338
|
+
const [isStateEmployee, toggleIsStateEmployee] = context.useState(false);
|
|
1339
|
+
const [moneyValue, setMoneyValue] = context.useState(DEFAULT_SUM);
|
|
1340
|
+
const [monthsValue, setMonthsValue] = context.useState(DEFAULT_MONTHS);
|
|
1341
|
+
const userInputParams = {
|
|
1342
|
+
isAnnuity,
|
|
1343
|
+
isInsurance,
|
|
1344
|
+
isSalaryClient,
|
|
1345
|
+
isStateEmployee,
|
|
1346
|
+
moneyValue,
|
|
1347
|
+
monthsValue,
|
|
1348
|
+
};
|
|
1349
|
+
const calculatorParams = getCreditCalculatorParams(context, userInputParams, sourceBookDir);
|
|
1350
|
+
return (jsxs("section", { className: className, children: [jsxs("div", { className: "w-[468px]", children: [renderWantedSumInput('Сумма кредита, ₽', { ...calculatorParams, step: 500 }, setMoneyValue), renderMonthsInput('Срок кредита, месяцев', calculatorParams, setMonthsValue), jsxs("div", { className: "pt-7", children: [jsx(Checkbox, { text: "\u041F\u043E\u043B\u0443\u0447\u0430\u044E \u0437\u0430\u0440\u043F\u043B\u0430\u0442\u0443 \u043D\u0430 \u0441\u0447\u0451\u0442 \u0432 \u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A\u0435", checked: isSalaryClient, onChange: toggleIsSalaryClient }), jsx(Checkbox, { className: "mt-3", text: "\u0420\u0430\u0431\u043E\u0442\u0430\u044E \u0432 \u0431\u044E\u0434\u0436\u0435\u0442\u043D\u043E\u0439 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", checked: isStateEmployee, onChange: toggleIsStateEmployee }), jsx(Checkbox, { className: "mt-3", text: "\u041A\u043E\u043C\u043F\u043B\u0435\u043A\u0441\u043D\u0430\u044F \u0441\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u044F \u0437\u0430\u0449\u0438\u0442\u0430", checked: isInsurance, onChange: toggleIsInsurance })] })] }), jsx(Rate, { title: "\u0421\u0442\u0430\u0432\u043A\u0430", rate: calculatorParams.finalRate, rateBlockClassName: "tracking-[-25px]", unit: "%" }), jsxs("div", { className: "w-[351px]", children: [jsx(CalculatorValueBlock, { title: isAnnuity ? 'Ежемесячный платеж' : 'Платёж в первый месяц', value: calculatorParams.monthlyPayment, postfix: "\u20BD" }), renderPaymentTypeSelector(context, {
|
|
1351
|
+
items: paymentTypeItems,
|
|
1352
|
+
checkedItem: isAnnuity ? ANNUITY : DIFFERENTIAL,
|
|
1353
|
+
onChange: (text) => toggleIsAnnuity(text === ANNUITY),
|
|
1354
|
+
}), renderButtonSection(context, buttons)] })] }));
|
|
1355
|
+
});
|
|
1356
|
+
|
|
1357
|
+
const DepositCalculatorForm = JSX(({ context, className = '', buttons, rate }) => {
|
|
1358
|
+
const [moneyValue, setMoneyValue] = context.useState(DEFAULT_SUM);
|
|
1359
|
+
const [monthsValue, setMonthsValue] = context.useState(DEFAULT_MONTHS);
|
|
1360
|
+
const income = 948841;
|
|
1361
|
+
const finallySum = 1218841;
|
|
1362
|
+
return (jsxs("section", { className: className, children: [jsxs("div", { className: "w-[468px]", children: [renderWantedSumInput('Сумма вклада, ₽', {
|
|
1363
|
+
moneyValue,
|
|
1364
|
+
minSum: DEFAULT_MIN_SUM,
|
|
1365
|
+
maxSum: DEFAULT_MAX_SUM,
|
|
1366
|
+
}, setMoneyValue), renderMonthsInput('Срок вклада, месяцев', {
|
|
1367
|
+
minMonths: DEFAULT_MIN_MONTHS,
|
|
1368
|
+
maxMonths: DEFAULT_MAX_MONTHS,
|
|
1253
1369
|
monthsValue,
|
|
1254
|
-
|
|
1255
|
-
setMonthsValue,
|
|
1256
|
-
}), jsxs("div", { className: "pt-7", children: [jsx(Checkbox, { text: "\u041F\u043E\u043B\u0443\u0447\u0430\u044E \u0437\u0430\u0440\u043F\u043B\u0430\u0442\u0443 \u043D\u0430 \u0441\u0447\u0451\u0442 \u0432 \u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A\u0435", checked: isAnnuity, onChange: toggleIsAnnuity }), jsx(Checkbox, { className: "mt-3", text: "\u0420\u0430\u0431\u043E\u0442\u0430\u044E \u0432 \u0431\u044E\u0434\u0436\u0435\u0442\u043D\u043E\u0439 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", checked: isBudgetary, onChange: toggleIsBudgetary }), jsx(Checkbox, { className: "mt-3", text: "\u041A\u043E\u043C\u043F\u043B\u0435\u043A\u0441\u043D\u0430\u044F \u0441\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u044F \u0437\u0430\u0449\u0438\u0442\u0430", checked: isInsurance, onChange: toggleIsInsurance })] })] }), jsx("div", { children: rate
|
|
1257
|
-
? renderRate({ rate: rate, title: 'Ставка', sup: '%', className: 'tracking-[-25px]' })
|
|
1258
|
-
: null }), jsxs("div", { className: "w-[351px]", children: [monthlyPayment ? (jsx(CalculatorValueBlock, { title: "\u0415\u0436\u0435\u043C\u0435\u0441\u044F\u0447\u043D\u044B\u0439 \u043F\u043B\u0430\u0442\u0435\u0436", value: monthlyPayment, postfix: "\u20BD" })) : null, renderButtonSection(context, buttons)] })] }));
|
|
1370
|
+
}, setMonthsValue)] }), jsx(Rate, { rate: rate || 1, rateBlockClassName: "tracking-[-25px]", unit: "%" }), jsxs("div", { className: "w-[351px]", children: [(jsx(CalculatorValueBlock, { title: "\u0414\u043E\u0445\u043E\u0434 \u043F\u043E \u0432\u043A\u043B\u0430\u0434\u0443", value: income, postfix: "\u20BD", prefix: "+" })) , (jsx(CalculatorValueBlock, { title: "\u0421\u0443\u043C\u043C\u0430 \u0432 \u043A\u043E\u043D\u0446\u0435 \u0441\u0440\u043E\u043A\u0430", value: finallySum, postfix: "\u20BD" })) , renderButtonSection(context, buttons)] })] }));
|
|
1259
1371
|
});
|
|
1260
1372
|
|
|
1261
|
-
const
|
|
1262
|
-
|
|
1263
|
-
const { calculatorParams,
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1373
|
+
const DEFAULT_RATE = 10.2;
|
|
1374
|
+
const getCreditRate = (params) => {
|
|
1375
|
+
const { calculatorParams, isInsurance } = params;
|
|
1376
|
+
if (!calculatorParams) {
|
|
1377
|
+
return DEFAULT_RATE;
|
|
1378
|
+
}
|
|
1379
|
+
return isInsurance
|
|
1380
|
+
? calculatorParams?.rateWithInsurance || DEFAULT_RATE
|
|
1381
|
+
: calculatorParams?.rateWithoutInsurance || DEFAULT_RATE;
|
|
1382
|
+
};
|
|
1268
1383
|
|
|
1269
|
-
const STEP_MONEY = 1000;
|
|
1270
|
-
function renderInitialFeeInput(props) {
|
|
1271
|
-
const {
|
|
1272
|
-
const minSum =
|
|
1273
|
-
const maxSum =
|
|
1274
|
-
return (jsx(InputRange, { className: "mt-6", title:
|
|
1384
|
+
const STEP_MONEY$1 = 1000;
|
|
1385
|
+
function renderInitialFeeInput(title, props, callback) {
|
|
1386
|
+
const { moneyValue } = props;
|
|
1387
|
+
const minSum = DEFAULT_MIN_SUM;
|
|
1388
|
+
const maxSum = DEFAULT_MAX_SUM;
|
|
1389
|
+
return (jsx(InputRange, { className: "mt-6", title: title, items: [
|
|
1275
1390
|
`От ${addSpacesBetweenNumbers(minSum)} рублей`,
|
|
1276
1391
|
`До ${addSpacesBetweenNumbers(maxSum)} рублей`,
|
|
1277
|
-
], min: minSum, max: maxSum, step: STEP_MONEY, value: moneyValue
|
|
1392
|
+
], min: minSum, max: maxSum, step: STEP_MONEY$1, value: moneyValue, onChange: callback }));
|
|
1278
1393
|
}
|
|
1279
1394
|
|
|
1280
1395
|
function renderProposalMortgage({ credit, period, taxRefund }) {
|
|
1281
1396
|
return (jsxs("div", { children: [jsx(CalculatorValueBlock, { title: "\u0421\u0443\u043C\u043C\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u0430", value: credit, postfix: "\u20BD" }), jsx(CalculatorValueBlock, { title: "\u0421\u0440\u043E\u043A", value: period, postfix: "\u043B\u0435\u0442" }), jsx(CalculatorValueBlock, { title: "\u041D\u0430\u043B\u043E\u0433\u043E\u0432\u044B\u0439 \u0432\u044B\u0447\u0435\u0442", value: taxRefund, postfix: "\u20BD" })] }));
|
|
1282
1397
|
}
|
|
1283
1398
|
|
|
1399
|
+
const STEP_MONEY = 1000;
|
|
1400
|
+
function renderRealEstateValue(title, props, callback) {
|
|
1401
|
+
const { moneyValue } = props;
|
|
1402
|
+
const minSum = DEFAULT_MIN_SUM;
|
|
1403
|
+
const maxSum = DEFAULT_MAX_SUM;
|
|
1404
|
+
return (jsx(InputRange, { title: title, items: [`От ${addSpacesBetweenNumbers(minSum)} ₽`, `До ${addSpacesBetweenNumbers(maxSum)} ₽`], min: minSum, max: maxSum, step: STEP_MONEY, value: moneyValue, onChange: callback }));
|
|
1405
|
+
}
|
|
1406
|
+
|
|
1284
1407
|
const MortgageCalculatorForm = JSX(({ context, className = '', buttons }) => {
|
|
1285
|
-
const [moneyValue, setMoneyValue] = context.useState(
|
|
1286
|
-
const [monthsValue, setMonthsValue] = context.useState(
|
|
1408
|
+
const [moneyValue, setMoneyValue] = context.useState(1000000);
|
|
1409
|
+
const [monthsValue, setMonthsValue] = context.useState(12);
|
|
1287
1410
|
const [isInsurance, toggleIsInsurance] = context.useState(false);
|
|
1288
1411
|
const [isFullInsurance, toggleIsFullInsurance] = context.useState(false);
|
|
1289
|
-
const
|
|
1290
|
-
const
|
|
1291
|
-
const
|
|
1292
|
-
const defaultMonths = getDefaultMonths(calculatorParams);
|
|
1293
|
-
const minMonths = calculatorParams?.minMonths || DEFAULT_MIN_MONTHS;
|
|
1294
|
-
const maxMonths = calculatorParams?.maxMonths || DEFAULT_MAX_MONTHS;
|
|
1412
|
+
const calculatorParams = {}; // getCalculatorParams(context, { isAnnuity: isInsurance });
|
|
1413
|
+
const minMonths = /*calculatorParams?.minMonths ||*/ DEFAULT_MIN_MONTHS;
|
|
1414
|
+
const maxMonths = /* calculatorParams?.maxMonths || */ DEFAULT_MAX_MONTHS;
|
|
1295
1415
|
const rate = getCreditRate({ calculatorParams, isInsurance: isInsurance });
|
|
1296
1416
|
const monthlyPayment = 777777; // TODO: hardcode
|
|
1297
1417
|
const proposalMortgageValue = { credit: 3892000, period: 15, taxRefund: 650000 }; // TODO: hardcode
|
|
1298
|
-
return (jsxs("section", { className: className, children: [jsxs("div", { className: "w-[468px]", children: [renderRealEstateValue(
|
|
1299
|
-
calculatorParams,
|
|
1418
|
+
return (jsxs("section", { className: className, children: [jsxs("div", { className: "w-[468px]", children: [renderRealEstateValue('Стоимость недвижимости, ₽', { moneyValue }, setMoneyValue), renderInitialFeeInput('Первоначальный взнос, ₽', {
|
|
1300
1419
|
moneyValue,
|
|
1301
|
-
|
|
1302
|
-
setMoneyValue,
|
|
1303
|
-
}), renderMonthsInput({
|
|
1304
|
-
title: 'Срок ипотеки, месяцев',
|
|
1420
|
+
}, setMoneyValue), renderMonthsInput('Срок ипотеки, месяцев', {
|
|
1305
1421
|
minMonths,
|
|
1306
1422
|
maxMonths,
|
|
1307
1423
|
monthsValue,
|
|
1308
|
-
|
|
1309
|
-
setMonthsValue,
|
|
1310
|
-
}), jsxs("div", { className: "mt-7", children: [jsx(Checkbox, { text: "\u0421\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u043D\u0438\u0435 \u0436\u0438\u0437\u043D\u0438", checked: isInsurance, onChange: toggleIsInsurance }), jsx(Checkbox, { className: "mt-4", text: "\u0421\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u043D\u0438\u0435 \u0436\u0438\u0437\u043D\u0438, \u0437\u043B\u043E\u0440\u043E\u0432\u044C\u044F \u0438 \u0432\u0440\u0435\u043C\u0435\u043D\u043D\u043E\u0439 \u0443\u0442\u0440\u0430\u0442\u044B \u0442\u0440\u0443\u0434\u043E\u0441\u043F\u043E\u0441\u043E\u0431\u043D\u043E\u0441\u0442\u0438", checked: isFullInsurance, onChange: toggleIsFullInsurance })] })] }), jsxs("div", { children: [jsx("div", { children: rate
|
|
1311
|
-
? renderRate({ rate: rate, title: 'Ставка', sup: '%', className: 'tracking-[-25px]' })
|
|
1312
|
-
: null }), jsx(CalculatorValueBlock, { title: "\u0415\u0436\u0435\u043C\u0435\u0441\u044F\u0447\u043D\u044B\u0439 \u043F\u043B\u0430\u0442\u0435\u0436", value: monthlyPayment, postfix: "\u20BD" })] }), jsxs("div", { children: [jsx("div", { className: "w-[351px]", children: renderProposalMortgage(proposalMortgageValue) }), renderButtonSection(context, buttons)] })] }));
|
|
1313
|
-
});
|
|
1314
|
-
|
|
1315
|
-
const DepositCalculatorForm = JSX(({ context, className = '', buttons, rate, minSum, maxSum, minMonths, maxMonths }) => {
|
|
1316
|
-
const [moneyValue, setMoneyValue] = context.useState(undefined);
|
|
1317
|
-
const [monthsValue, setMonthsValue] = context.useState(undefined);
|
|
1318
|
-
const tableRows = useCreditCalculatorData(context.useAsyncData, 'directoryName').rows;
|
|
1319
|
-
const calculatorParams = getCalculatorParams({ tableRows, isAnnuity: false });
|
|
1320
|
-
const defaultSum = getDefaultSum(calculatorParams);
|
|
1321
|
-
const defaultMonths = getDefaultMonths(calculatorParams);
|
|
1322
|
-
const income = 948841;
|
|
1323
|
-
const finallySum = 1218841;
|
|
1324
|
-
return (jsxs("section", { className: className, children: [jsxs("div", { className: "w-[468px]", children: [renderWantedSumInput({
|
|
1325
|
-
title: 'Сумма вклада, ₽',
|
|
1326
|
-
calculatorParams: { minSum, maxSum },
|
|
1327
|
-
moneyValue,
|
|
1328
|
-
defaultSum,
|
|
1329
|
-
setMoneyValue,
|
|
1330
|
-
}), renderMonthsInput({
|
|
1331
|
-
title: 'Срок вклада, месяцев',
|
|
1332
|
-
minMonths: minMonths || DEFAULT_MIN_MONTHS,
|
|
1333
|
-
maxMonths: maxMonths || DEFAULT_MAX_MONTHS,
|
|
1334
|
-
monthsValue,
|
|
1335
|
-
defaultMonths,
|
|
1336
|
-
setMonthsValue,
|
|
1337
|
-
})] }), jsx("div", { children: rate
|
|
1338
|
-
? renderRate({ rate: rate, title: 'Ставка', sup: '%', className: 'tracking-[-25px]' })
|
|
1339
|
-
: null }), jsxs("div", { className: "w-[351px]", children: [(jsx(CalculatorValueBlock, { title: "\u0414\u043E\u0445\u043E\u0434 \u043F\u043E \u0432\u043A\u043B\u0430\u0434\u0443", value: income, postfix: "\u20BD", prefix: "+" })) , (jsx(CalculatorValueBlock, { title: "\u0421\u0443\u043C\u043C\u0430 \u0432 \u043A\u043E\u043D\u0446\u0435 \u0441\u0440\u043E\u043A\u0430", value: finallySum, postfix: "\u20BD" })) , renderButtonSection(context, buttons)] })] }));
|
|
1340
|
-
});
|
|
1341
|
-
|
|
1342
|
-
const BonusCalculatorForm = JSX(({ context, className = '', buttons, bonus, minSumTrip, maxSumTrip, minSumOther, maxSumOther, }) => {
|
|
1343
|
-
const [bonusTripValue, setBonusTripValue] = context.useState(undefined);
|
|
1344
|
-
const [bonusOtherValue, setBonusOtherValue] = context.useState(undefined);
|
|
1345
|
-
const calculatorTripParams = { minSum: minSumTrip, maxSum: maxSumTrip };
|
|
1346
|
-
const calculatorOtherParams = { minSum: minSumOther, maxSum: maxSumOther };
|
|
1347
|
-
const incomeBonus = 948841;
|
|
1348
|
-
const bonusOrDef = bonus || 2528;
|
|
1349
|
-
return (jsxs("section", { className: className, children: [jsxs("div", { className: "w-[468px]", children: [renderWantedSumInput({
|
|
1350
|
-
title: 'Сумма покупок в категории путешествия, ₽',
|
|
1351
|
-
calculatorParams: calculatorTripParams,
|
|
1352
|
-
moneyValue: bonusTripValue,
|
|
1353
|
-
defaultSum: getDefaultSum(calculatorTripParams),
|
|
1354
|
-
setMoneyValue: setBonusTripValue,
|
|
1355
|
-
isShowItems: false,
|
|
1356
|
-
}), renderWantedSumInput({
|
|
1357
|
-
className: 'mt-6',
|
|
1358
|
-
title: 'Сумма покупок в остальных категориях, ₽',
|
|
1359
|
-
calculatorParams: calculatorOtherParams,
|
|
1360
|
-
moneyValue: bonusOtherValue,
|
|
1361
|
-
defaultSum: getDefaultSum(calculatorOtherParams),
|
|
1362
|
-
setMoneyValue: setBonusOtherValue,
|
|
1363
|
-
isShowItems: false,
|
|
1364
|
-
})] }), jsx("div", { children: bonusOrDef
|
|
1365
|
-
? renderRate({
|
|
1366
|
-
rate: bonusOrDef,
|
|
1367
|
-
title: 'Баллов за месяц',
|
|
1368
|
-
className: 'tracking-[-14px]',
|
|
1369
|
-
})
|
|
1370
|
-
: null }), jsxs("div", { className: "w-[240px]", children: [jsx(CalculatorValueBlock, { title: "\u0411\u0430\u043B\u043B\u043E\u0432 \u0437\u0430 \u0433\u043E\u0434", value: incomeBonus }) , renderButtonSection(context, buttons)] })] }));
|
|
1424
|
+
}, setMonthsValue), jsxs("div", { className: "mt-7", children: [jsx(Checkbox, { text: "\u0421\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u043D\u0438\u0435 \u0436\u0438\u0437\u043D\u0438", checked: isInsurance, onChange: toggleIsInsurance }), jsx(Checkbox, { className: "mt-4", text: "\u0421\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u043D\u0438\u0435 \u0436\u0438\u0437\u043D\u0438, \u0437\u043B\u043E\u0440\u043E\u0432\u044C\u044F \u0438 \u0432\u0440\u0435\u043C\u0435\u043D\u043D\u043E\u0439 \u0443\u0442\u0440\u0430\u0442\u044B \u0442\u0440\u0443\u0434\u043E\u0441\u043F\u043E\u0441\u043E\u0431\u043D\u043E\u0441\u0442\u0438", checked: isFullInsurance, onChange: toggleIsFullInsurance })] })] }), jsxs("div", { children: [jsx(Rate, { rate: rate, rateBlockClassName: "tracking-[-25px]", unit: "%" }), jsx(CalculatorValueBlock, { title: "\u0415\u0436\u0435\u043C\u0435\u0441\u044F\u0447\u043D\u044B\u0439 \u043F\u043B\u0430\u0442\u0435\u0436", value: monthlyPayment, postfix: "\u20BD" })] }), jsxs("div", { children: [jsx("div", { className: "w-[351px]", children: renderProposalMortgage(proposalMortgageValue) }), renderButtonSection(context, buttons)] })] }));
|
|
1371
1425
|
});
|
|
1372
1426
|
|
|
1373
1427
|
const EmbeddableCalcBlocks = {
|
|
@@ -1377,24 +1431,24 @@
|
|
|
1377
1431
|
BonusCalculatorForm,
|
|
1378
1432
|
};
|
|
1379
1433
|
|
|
1380
|
-
const renderCalculatorBlock = ({ context, className }) => (
|
|
1381
|
-
const type =
|
|
1434
|
+
const renderCalculatorBlock = ({ context, className }) => (block, i) => {
|
|
1435
|
+
const type = block?.calcType;
|
|
1382
1436
|
if (!type || !(type in EmbeddableCalcBlocks)) {
|
|
1383
1437
|
return null;
|
|
1384
1438
|
}
|
|
1385
1439
|
const EmbeddedBlock = EmbeddableCalcBlocks[type];
|
|
1386
|
-
return (jsx("section", { className: `box-border relative flex shrink-0 basis-full ${className}`, role: "listitem", children: jsx("div", { className: "box-border p-9 w-full", children: jsx(EmbeddedBlock, { context: context, ...
|
|
1440
|
+
return (jsx("section", { className: `box-border relative flex shrink-0 basis-full ${className}`, role: "listitem", children: jsx("div", { className: "box-border p-9 w-full", children: jsx(EmbeddedBlock, { context: context, ...block, className: "flex justify-between" }) }) }, String(i)));
|
|
1387
1441
|
};
|
|
1388
1442
|
|
|
1389
|
-
const Calculator = JSX(({ className = '', context,
|
|
1390
|
-
const tabsNav =
|
|
1391
|
-
const
|
|
1443
|
+
const Calculator = JSX(({ className = '', context, calculatorTabs = [], ...rest }) => {
|
|
1444
|
+
const tabsNav = calculatorTabs.map((_) => _.nav || {});
|
|
1445
|
+
const calculatorBlocks = calculatorTabs.map(({ calculatorBlock }) => calculatorBlock || {});
|
|
1392
1446
|
const [activeSlideIndex, setActiveSlideIndex] = context.useState(0);
|
|
1393
1447
|
const [tabsShift, setTabsShift] = context.useState(0);
|
|
1394
1448
|
const handleNextClick = () => setTabsShift(tabsShift + 1);
|
|
1395
1449
|
const handlePrevClick = () => setTabsShift(tabsShift - 1);
|
|
1396
|
-
const isGalleryScrollAvailable =
|
|
1397
|
-
const showNextButton = isGalleryScrollAvailable &&
|
|
1450
|
+
const isGalleryScrollAvailable = calculatorTabs?.length > 3;
|
|
1451
|
+
const showNextButton = isGalleryScrollAvailable && calculatorTabs?.length > tabsShift + 3;
|
|
1398
1452
|
const showPrevButton = tabsShift > 0;
|
|
1399
1453
|
return (jsxs(BlockWrapper, { context: context, className: `box-border overflow-hidden relative font-sans w-100 bg-white text-primary-text ${className}`, ...rest, children: [jsxs("div", { children: [tabsNav.length > 1
|
|
1400
1454
|
? renderTabs({ tabsShift, tabsNav, activeSlideIndex, setActiveSlideIndex })
|
|
@@ -1403,8 +1457,8 @@
|
|
|
1403
1457
|
isShown: [showPrevButton, showNextButton],
|
|
1404
1458
|
btnClass: ['left-3', 'right-3'],
|
|
1405
1459
|
className: 'top-8',
|
|
1406
|
-
})] }), jsx("div", { className: "flex", style: { transform: `translateX(-${activeSlideIndex}00%)` }, role: "list", children:
|
|
1407
|
-
?
|
|
1460
|
+
})] }), jsx("div", { className: "flex", style: { transform: `translateX(-${activeSlideIndex}00%)` }, role: "list", children: calculatorBlocks?.length
|
|
1461
|
+
? calculatorBlocks.map(renderCalculatorBlock({ context, className }))
|
|
1408
1462
|
: null })] }));
|
|
1409
1463
|
});
|
|
1410
1464
|
function renderNavButton$2({ tab, i, activeSlideIndex, onClick }) {
|
|
@@ -1571,6 +1625,7 @@
|
|
|
1571
1625
|
}
|
|
1572
1626
|
catch (err) {
|
|
1573
1627
|
console.error(err);
|
|
1628
|
+
return Promise.resolve();
|
|
1574
1629
|
}
|
|
1575
1630
|
}
|
|
1576
1631
|
const EXCHANGE_RATES_URL = 'https://coins.rshb.ru/api/catalog/vue_storefront_magento_1_currency_rates_average/currency_rates_average/_search?size=10000';
|
|
@@ -1602,33 +1657,17 @@
|
|
|
1602
1657
|
};
|
|
1603
1658
|
const getCurrencyListByRate = (currencyRates) => currencyRates.reduce((result, _) => {
|
|
1604
1659
|
const currencyInfo = _['currency_first'];
|
|
1605
|
-
|
|
1606
|
-
return result;
|
|
1607
|
-
}
|
|
1608
|
-
const currencyCode = currencyInfo.code;
|
|
1660
|
+
const currencyCode = currencyInfo?.code;
|
|
1609
1661
|
if (!result.some((i) => i.code === currencyCode)) {
|
|
1610
1662
|
result.push({
|
|
1611
1663
|
code: currencyCode,
|
|
1612
|
-
buy: Number(_.rate_buy),
|
|
1613
|
-
sell: Number(_.rate_sell),
|
|
1664
|
+
buy: roundRate(Number(_.rate_buy)),
|
|
1665
|
+
sell: roundRate(Number(_.rate_sell)),
|
|
1614
1666
|
});
|
|
1615
1667
|
}
|
|
1616
1668
|
return result;
|
|
1617
1669
|
}, []);
|
|
1618
|
-
const
|
|
1619
|
-
|
|
1620
|
-
function getTileHeadingType(className = '') {
|
|
1621
|
-
const colSpan = getColSpan(className);
|
|
1622
|
-
if (colSpan <= 4) {
|
|
1623
|
-
return 'h4';
|
|
1624
|
-
}
|
|
1625
|
-
else if (colSpan <= 8) {
|
|
1626
|
-
return 'h3';
|
|
1627
|
-
}
|
|
1628
|
-
else {
|
|
1629
|
-
return 'h2';
|
|
1630
|
-
}
|
|
1631
|
-
}
|
|
1670
|
+
const roundRate = (value) => Math.round(value * 1000) / 1000;
|
|
1632
1671
|
|
|
1633
1672
|
var Currency;
|
|
1634
1673
|
(function (Currency) {
|
|
@@ -1643,7 +1682,7 @@
|
|
|
1643
1682
|
});
|
|
1644
1683
|
const formatCurrency = (value) => (value ? currencyNumberFormat.format(value) : '');
|
|
1645
1684
|
|
|
1646
|
-
const TABLE_HEAD_STYLE = '
|
|
1685
|
+
const TABLE_HEAD_STYLE = 'text-left text-m text-secondary-text';
|
|
1647
1686
|
const CURRENCY_ICONS_MAP = {
|
|
1648
1687
|
USD: 'DollarIcon',
|
|
1649
1688
|
EUR: 'EuroIcon',
|
|
@@ -1653,10 +1692,10 @@
|
|
|
1653
1692
|
});
|
|
1654
1693
|
const renderCurrencyRow = (exchangeCurrencyItem) => {
|
|
1655
1694
|
const code = exchangeCurrencyItem?.code;
|
|
1656
|
-
return (jsxs("tr", { className: "pb-1", children: [jsx("td", { className: "pt-4", children: jsxs("div", { className: "flex items-center", children: [code ? jsx(Img, { image: { icon: CURRENCY_ICONS_MAP[code] }, width: "24", height: "24" }) : null, jsx("span", { className: "
|
|
1695
|
+
return (jsxs("tr", { className: "pb-1 text-h6", children: [jsx("td", { className: "pt-4", children: jsxs("div", { className: "flex items-center", children: [code ? jsx(Img, { image: { icon: CURRENCY_ICONS_MAP[code] }, width: "24", height: "24" }) : null, jsx("span", { className: "ml-2", children: code })] }) }), jsx("td", { className: "pt-4 pl-11", children: formatCurrency(exchangeCurrencyItem?.sell) }), jsx("td", { className: "pt-4 pl-11", children: formatCurrency(exchangeCurrencyItem?.buy) })] }, code));
|
|
1657
1696
|
};
|
|
1658
1697
|
|
|
1659
|
-
const CurrentLocation = JSX(({ className = '', address, distance }) => (jsxs("div", { className: `flex
|
|
1698
|
+
const CurrentLocation = JSX(({ className = '', address, distance }) => (jsxs("div", { className: `flex ${className}`, children: [jsx(Img, { image: { icon: 'GpsIcon' }, width: "24", height: "24", asSVG: true }), jsxs("div", { className: "ml-3", children: [address ? jsx("p", { className: "text-primary-main m-0 mb-1 text-l", children: address }) : null, distance ? (jsxs("p", { className: "text-secondary-text m-0 text-m", children: ["\u041A\u0443\u0440\u0441 \u0443\u043A\u0430\u0437\u0430\u043D \u0434\u043B\u044F \u0431\u043B\u0438\u0436\u0430\u0439\u0448\u0435\u0433\u043E \u043E\u0444\u0438\u0441\u0430 - ", distance] })) : null] })] })));
|
|
1660
1699
|
|
|
1661
1700
|
const roundTo = (value, precision = 2) => {
|
|
1662
1701
|
const factor = Math.pow(10, precision);
|
|
@@ -1686,8 +1725,8 @@
|
|
|
1686
1725
|
[() => true, () => props.handleConvert(props.value)],
|
|
1687
1726
|
])(props)?.();
|
|
1688
1727
|
|
|
1689
|
-
function renderButton() {
|
|
1690
|
-
return (jsx(Button, { className: "
|
|
1728
|
+
function renderButton(button) {
|
|
1729
|
+
return (jsx(Button, { className: "py-4 mr-1", version: button?.version, href: button?.href, target: "_blank", children: button?.text }));
|
|
1691
1730
|
}
|
|
1692
1731
|
|
|
1693
1732
|
const Input = JSX(({ className = '', id, name, type = 'text', placeholder, pattern, value, onChange }) => {
|
|
@@ -1708,10 +1747,10 @@
|
|
|
1708
1747
|
|
|
1709
1748
|
function renderInput(props) {
|
|
1710
1749
|
const { placeholder, rates, selected, value, setValue, setSelected } = props;
|
|
1711
|
-
return (jsxs("div", { className: "relative flex items-center", children: [jsx(Input, { className: "h-
|
|
1750
|
+
return (jsxs("div", { className: "relative flex items-center", children: [jsx(Input, { className: "h-13 border pl-4 pt-4 pb-4 rounded-md text-l w-full appearance-none -mr-12", placeholder: placeholder, type: "text", value: value, onChange: setValue }), rates.length ? (jsx(Select, { className: "h-9 -translate-x-4 bg-transparent", value: selected, onChange: (_) => setSelected(_), children: rates.map((_, i) => (jsx(SelectOption, { value: _.code, children: _.code }, String(i)))) })) : null] }));
|
|
1712
1751
|
}
|
|
1713
1752
|
|
|
1714
|
-
const ExchangeCurrencyCalculator = JSX(({ context, className = '', currencyRatesBuy, currencyRatesSell }) => {
|
|
1753
|
+
const ExchangeCurrencyCalculator = JSX(({ context, className = '', currencyRatesBuy, currencyRatesSell, button }) => {
|
|
1715
1754
|
const [calcState, setCalcState] = context.useState({
|
|
1716
1755
|
inputSell: '',
|
|
1717
1756
|
inputBuy: '',
|
|
@@ -1721,7 +1760,7 @@
|
|
|
1721
1760
|
const handleSetCalcState = (newState) => {
|
|
1722
1761
|
setCalcState((oldState) => ({ ...oldState, ...newState }));
|
|
1723
1762
|
};
|
|
1724
|
-
return (jsxs("div", { className: `grid gap-
|
|
1763
|
+
return (jsxs("div", { className: `grid gap-[18px] pt-2 ${className}`, children: [renderInput({
|
|
1725
1764
|
placeholder: 'Хочу продать',
|
|
1726
1765
|
rates: currencyRatesBuy,
|
|
1727
1766
|
selected: calcState.selectSell,
|
|
@@ -1735,7 +1774,7 @@
|
|
|
1735
1774
|
setSelected: handleSelectBuy(calcState, handleSetCalcState, currencyRatesBuy),
|
|
1736
1775
|
value: calcState.inputBuy,
|
|
1737
1776
|
setValue: (value) => handleInputBuy(handleSetCalcState, currencyRatesBuy)(value, calcState.selectBuy, calcState.selectSell),
|
|
1738
|
-
}), renderButton()] }));
|
|
1777
|
+
}), button?.text ? renderButton(button) : null] }));
|
|
1739
1778
|
});
|
|
1740
1779
|
const handleSelectSell = (calcState, setCalcState, currencyRatesSell) => (value) => {
|
|
1741
1780
|
setCalcState({ selectSell: value });
|
|
@@ -1780,22 +1819,15 @@
|
|
|
1780
1819
|
address: 'Москва, ул.Ленина д.28',
|
|
1781
1820
|
distance: '6км',
|
|
1782
1821
|
};
|
|
1783
|
-
const ExchangeRateTile = JSX(({ className = '', context, title = 'Курсы обмена валют', ...rest }) => {
|
|
1822
|
+
const ExchangeRateTile = JSX(({ className = '', context, title = 'Курсы обмена валют', button, ...rest }) => {
|
|
1784
1823
|
const currencyRates = useExchangeRates(context.useAsyncData);
|
|
1785
1824
|
const currencyRatesBuy = currencyRates.filter((_) => _.buy);
|
|
1786
1825
|
currencyRatesBuy.unshift({ code: Currency.RUB });
|
|
1787
1826
|
const currencyRatesSell = currencyRates.filter((_) => _.sell);
|
|
1788
1827
|
currencyRatesSell.push({ code: Currency.RUB });
|
|
1789
|
-
return (jsx(BlockWrapper, { context: context, className: `bg-white text-primary-text font-sans p-9 box-border ${className}`, ...rest, children: jsx(BaseTile, { context: context, title: jsx(Heading, { headingType:
|
|
1828
|
+
return (jsx(BlockWrapper, { context: context, className: `bg-white text-primary-text font-sans p-9 box-border ${className}`, ...rest, children: jsx(BaseTile, { context: context, title: jsx(Heading, { headingType: "h4", title: title, className: "whitespace-pre-wrap text-h4" }), children: jsxs("div", { className: "flex", children: [jsxs("div", { className: "mr-14 pt-4", children: [currencyRates ? (jsx(CurrencyTable, { className: "mb-[30px]", exchangeCurrencyItems: currencyRates })) : null, jsx(CurrentLocation, { ...DEFAULT_LOCATION })] }), currencyRates.length && currencyRatesBuy.length && currencyRatesSell.length ? (jsx(ExchangeCurrencyCalculator, { className: "grow", context: context, currencyRatesBuy: currencyRatesBuy, currencyRatesSell: currencyRatesSell, button: button })) : null] }) }) }));
|
|
1790
1829
|
});
|
|
1791
1830
|
|
|
1792
|
-
const LOGO_PATHS = [
|
|
1793
|
-
'm13.72 25.51 4.42-4.33v-2.95l-4.42 4.32v2.96Zm0-10.98 4.42-4.35V7.41l-4.42 4.31v2.8Zm0 3.63 4.42-4.33v-2.78l-4.42 4.32v2.8ZM12.46 7.44l-.6-.56V0h-.66v6.22l-.58-.57V0h-.67v5l-.59-.58V0H8.7v6.56l4.44 4.33V0h-.67v7.44Zm1.26 14.35 4.42-4.33v-2.78L13.72 19v2.8Zm-5.03-.61 4.44 4.33v-2.96l-4.44-4.32v2.95Zm8.79-16.76-.59.58V0h-.66v5.66l-.6.56V0h-.66v6.87l-.58.57V0h-.67v10.9l4.42-4.34V0h-.66v4.42Zm-8.79 5.76 4.44 4.35v-2.8L8.69 7.4v2.77Zm0 3.65 4.44 4.33v-2.8l-4.44-4.3v2.77Zm0 3.63 4.44 4.33V19l-4.44-4.31v2.78Zm26.37 2.29H24.3a2.25 2.25 0 0 0 .36-1.22 2.32 2.32 0 0 0-2.33-2.31 2.32 2.32 0 0 0-2.31 2.31c0 .5.16.96.43 1.34a.74.74 0 0 0-.33.61c0 .26.14.49.33.62a2.32 2.32 0 0 0-.43 1.34 2.31 2.31 0 0 0 2.31 2.31 2.32 2.32 0 0 0 2.33-2.31c0-.45-.13-.87-.36-1.22h8.01v.49h-.8v.68h.8v.7h-.8v1.3h.8v-.58h1.17v.58h.79v-1.3h-.79v-.7h.79v-.68h-.79v-.5h1.58a.56.56 0 0 0 .56-.56v-.34a.57.57 0 0 0-.56-.56Zm-11.53 2.7a1.2 1.2 0 0 1-2.4 0c0-.24.08-.47.2-.66l.34-.56a.97.97 0 0 1-.34-.75c0-.3.13-.56.33-.74l-.32-.56a1.13 1.13 0 0 1-.2-.66 1.2 1.2 0 0 1 2.4 0c0 .49-.56 1.65-.56 1.65v.62c-.01.01.55 1.17.55 1.66ZM4.67 18.34v2.89c0 2.75 1.2 4.53 1.9 5.21l4.58 4.5c1.28 1.25 1.5 1.66 1.79 2.37v-3.2c0-2.84-1.44-3.94-2.19-4.67-1.73-1.68-2.89-2.8-3.82-3.73a8.98 8.98 0 0 1-2.26-3.37Zm6.08 14.24c-1.73-1.7-2.89-2.8-3.82-3.73a10 10 0 0 1-2.25-2.98v2.49a7.87 7.87 0 0 0 1.89 5.24l4.58 4.47c1.28 1.25 1.5 1.85 1.79 2.55v-3.37c0-2.85-1.45-3.95-2.19-4.67Z',
|
|
1794
|
-
'M19.88 5.34c-.32 0-.64 0-.96.02V6.7a18.5 18.5 0 1 1 .95 36.94A18.5 18.5 0 0 1 1.35 25.17c0-5.67 2.55-10.73 6.58-14.13V9.32A19.78 19.78 0 0 0 0 25.17C0 36.12 8.9 45 19.88 45a19.85 19.85 0 0 0 19.86-19.83c0-10.95-8.9-19.83-19.87-19.83Z',
|
|
1795
|
-
'M33.93 35.53c.3-.41.6-.85.87-1.3v-2.66h-.87v3.96Zm2.54-4.92c.12-.4.24-.78.34-1.16h-2.88v.7h.43c.77-.02 1.63-.03 2.11.46Zm-19.19-1.27h-.78v7.91h.78v-7.9Z',
|
|
1796
|
-
'M14.7 27.83h2.58c.67 0 1.14.14 1.4.4.27.25.4.72.4 1.38v7.4c0 .66-.12 1.12-.4 1.38-.4.41-1.16.41-1.78.41l-.4-.01v3.5l.78.14v-2.88c1.2 0 1.97-.4 2.34-1.22v4.29h.26l.5-.01V29.74c0-.68.13-1.16.4-1.43.25-.27.72-.4 1.37-.4.67 0 1.65-.1 2.16.4.26.27.38.76.38 1.43v3.8h-1.77v-4.06h-.77v12.99c.26-.03.5-.07.77-.12V34.3h1.77v7.64c.36-.1.72-.21 1.08-.34v-7c0-.8.19-1.4 1-1.67l-.9-4.87h1.8l.3 5.31h.22l.3-5.31h1.88l-1.01 4.87c.84.3 1.01.81 1.01 1.66v4.53a16.63 16.63 0 0 0 1.5-1.27v-9.83h5.25l.1-.72H24.93l.17.89c-.38-.72-1.12-1.08-2.2-1.08h-.77c-1.3 0-2.1.52-2.4 1.55-.27-1.08-1.1-1.62-2.46-1.62h-3.36v14.52c.26.09.52.18.78.25V27.84Zm16.29 5.58-.85-.8.85-4.37v5.17Z',
|
|
1797
|
-
'M27.66 40.79c.27-.14.55-.28.8-.43v-5.98h-.8v6.4Z',
|
|
1798
|
-
];
|
|
1799
1831
|
const SVG_COLOR = {
|
|
1800
1832
|
'bg-white': 'text-primary-main',
|
|
1801
1833
|
transparent: 'text-white',
|
|
@@ -1805,19 +1837,33 @@
|
|
|
1805
1837
|
transparent: 'text-white',
|
|
1806
1838
|
};
|
|
1807
1839
|
const Logo = JSX(({ className = '', href, logo, children = logo?.title, targetBlank, bgColor = 'bg-white', hideTitle, }) => {
|
|
1808
|
-
return (jsxs("a", { className: `inline-flex items-center font-sans no-underline ${className}`, href: href || '/', target: targetBlank ? '_blank' : '_self', "aria-label": logo?.title || 'Россельхозбанк', children: [logo?.image?.src ? (jsx(Img, { image: logo.image, className: SVG_COLOR[bgColor], width: "40", height: "45", asSVG: true })) : (jsx(
|
|
1840
|
+
return (jsxs("a", { className: `inline-flex items-center font-sans no-underline ${className}`, href: href || '/', target: targetBlank ? '_blank' : '_self', "aria-label": logo?.title || 'Россельхозбанк', children: [logo?.image?.src ? (jsx(Img, { image: logo.image, className: SVG_COLOR[bgColor], width: "40", height: "45", asSVG: true })) : (jsx(Img, { image: { icon: 'Logo' }, className: `${SVG_COLOR[bgColor]} w-10`, width: "40", height: "45", asSVG: true })), hideTitle ? null : renderTitle(children, bgColor, logo?.title)] }));
|
|
1809
1841
|
});
|
|
1810
1842
|
const renderTitle = (children, bgColor, title) => {
|
|
1811
1843
|
const text = children || title || 'Россельхозбанк';
|
|
1812
1844
|
return jsx("span", { className: `${TEXT_COLOR[bgColor]} font-medium ml-2.5`, children: text });
|
|
1813
1845
|
};
|
|
1814
1846
|
|
|
1815
|
-
const
|
|
1847
|
+
const SearchBarInner = JSX(({ className, context, isMobile = false }) => {
|
|
1816
1848
|
const { term, setTerm } = context.useSearch();
|
|
1817
|
-
|
|
1849
|
+
const LoupeIconClassName = isMobile ? 'w-[20px] h-[20px]' : 'w-[24px] h-[24px]';
|
|
1850
|
+
const SearchBarLabelClassName = isMobile ? 'font-normal text-sm' : 'font-light text-base';
|
|
1851
|
+
const SearchBarInputClassName = isMobile
|
|
1852
|
+
? ' placeholder-transparent font-normal'
|
|
1853
|
+
: 'font-light h-full';
|
|
1854
|
+
const inputPlaceholder = isMobile ? 'some search' : null;
|
|
1855
|
+
return (jsxs("form", { className: `font-sans relative ${className}`, children: [jsxs("div", { className: "absolute rounded h-full flex items-center justify-center pl-4 max-w-[170px] gap-3.5 pointer-events-none", children: [jsx("div", { className: LoupeIconClassName, children: jsx(Img, { image: "LoupeIcon", width: "24", height: "24" }) }), term ? null : (jsx("label", { htmlFor: "search-bar-input", className: `text-secondary-text ${SearchBarLabelClassName}`, children: "\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0441\u0430\u0439\u0442\u0443" }))] }), jsx("input", { id: "search-bar-input", className: `h-12 pl-12 w-full peer text-base text-black border border-solid rounded box-border
|
|
1856
|
+
outline-none pr-[6%] border-main-divider focus:border-primary-text ${SearchBarInputClassName}`, value: term, onChange: (e) => setTerm(e.target.value), type: "text", name: "search-bar-input", placeholder: inputPlaceholder }), isMobile ? (jsx("button", { className: "visible peer-placeholder-shown:invisible absolute top-2 right-3 w-6 h-6 p-1 bg-transparent cursor-pointer border-none", onClick: (e) => {
|
|
1857
|
+
e.preventDefault();
|
|
1858
|
+
setTerm('');
|
|
1859
|
+
}, children: jsx(Img, { image: "CloseIcon", width: "24", height: "24" }) })) : (jsx(Button, { version: "primary", text: "\u041D\u0430\u0439\u0442\u0438", className: "invisible peer-focus:visible absolute top-1 right-1", onClick: (e) => {
|
|
1818
1860
|
e.preventDefault();
|
|
1819
1861
|
console.log('click');
|
|
1820
|
-
}, children: jsx("div", { className: "font-normal text-sm px-9 py-[9px]", children: "\u041D\u0430\u0439\u0442\u0438" }) })] }));
|
|
1862
|
+
}, children: jsx("div", { className: "font-normal text-sm px-9 py-[9px]", children: "\u041D\u0430\u0439\u0442\u0438" }) }))] }));
|
|
1863
|
+
});
|
|
1864
|
+
|
|
1865
|
+
const SearchBar = JSX(({ className = '', context }) => {
|
|
1866
|
+
return jsx(SearchBarInner, { context: context, className: className });
|
|
1821
1867
|
});
|
|
1822
1868
|
|
|
1823
1869
|
const Contacts = JSX(({ className = '', items, hasButton, context }) => {
|
|
@@ -1845,12 +1891,13 @@
|
|
|
1845
1891
|
};
|
|
1846
1892
|
const formatTel = (s) => s.replaceAll(/\D/g, '');
|
|
1847
1893
|
|
|
1894
|
+
const HorizontalNavigationLink = JSX(({ className = '', index, text, href, target, onClick }) => (jsx("a", { className: `font-sans text-secondary-text hover:text-primary-main inline-block no-underline ${className}`, href: href, target: target, onClick: onClick, children: text || `Документ ${index}` })));
|
|
1895
|
+
|
|
1848
1896
|
const HorizontalNavigation = JSX(({ links, className = '', context }) => {
|
|
1849
1897
|
const router = context.useRouter();
|
|
1850
1898
|
const { handlerDecorator } = context;
|
|
1851
|
-
return (jsx("div", { className: className, children: links?.length ? (jsx("div", { className: "flex justify-between items-center gap-5 py-5 border-solid border-x-0 border-y border-y-main-divider", children: links.map((_, i) => (jsx(HorizontalNavigationLink, { index: i, ...useLink({ router, handlerDecorator }, _) }, String(i)))) })) : null }));
|
|
1899
|
+
return (jsx("div", { className: className, children: links?.length ? (jsx("div", { className: "flex justify-between items-center gap-5 py-5 border-solid border-x-0 border-y border-y-main-divider", children: links.map((_, i) => (jsx(HorizontalNavigationLink, { index: i, className: "font-light max-w-[292px]", ...useLink({ router, handlerDecorator }, _) }, String(i)))) })) : null }));
|
|
1852
1900
|
});
|
|
1853
|
-
const HorizontalNavigationLink = JSX(({ className = '', index, text, href, target, onClick }) => (jsx("a", { className: `font-sans font-light text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px] ${className}`, href: href, target: target, onClick: onClick, children: text || `Документ ${index}` })));
|
|
1854
1901
|
|
|
1855
1902
|
const cmp = (a) => (b) => a?.href === b?.href;
|
|
1856
1903
|
const substitute = (items, substitution) => (items || []).map((_) => substitution?.find(cmp(_)) || _);
|
|
@@ -1920,7 +1967,8 @@
|
|
|
1920
1967
|
? 'bg-secondary-light hover:bg-secondary-hover'
|
|
1921
1968
|
: 'border-main-divider border-solid border-[1px] hover:bg-primary-main';
|
|
1922
1969
|
const isPrimary = version === 'primary';
|
|
1923
|
-
|
|
1970
|
+
const imageClassName = isPrimary ? 'group-hover:text-white' : '';
|
|
1971
|
+
return (jsx("a", { className: `flex items-center justify-center rounded-md w-14 h-14 group box-border ${classes} ${isPrimary ? 'hover:text-black' : ''}`, href: href, "aria-label": label, target: "_blank", rel: "noopener noreferrer", children: icon ? (jsx(Img, { image: icon, imageClassName: imageClassName, width: "24", height: "24", asSVG: true })) : null }));
|
|
1924
1972
|
});
|
|
1925
1973
|
|
|
1926
1974
|
const SocialMedia = JSX(({ className = '', media, version, context, children }) => {
|
|
@@ -1929,12 +1977,13 @@
|
|
|
1929
1977
|
return (jsxs("div", { children: [jsx("div", { className: `flex gap-2.5 ${className}`, children: media?.map((_, index) => (jsx(MediaButton, { version: version, ...useLink({ router, handlerDecorator }, _) }, String(index)))) }), jsx("span", { className: "font-light text-sm text-secondary-text", children: children })] }));
|
|
1930
1978
|
});
|
|
1931
1979
|
|
|
1980
|
+
const TextInformationLink = JSX(({ className = '', index, text, href, target, onClick }) => (jsx("a", { className: `font-sans text-xs text-secondary-text visited:text-secondary-text hover:text-primary-text inline-block no-underline max-w-[292px] ${className}`, href: href, target: target, onClick: onClick, children: text || `Документ ${index}` })));
|
|
1981
|
+
|
|
1932
1982
|
const TextInformation = JSX(({ className, links, context }) => {
|
|
1933
1983
|
const router = context.useRouter();
|
|
1934
1984
|
const { handlerDecorator } = context;
|
|
1935
|
-
return (jsxs("div", { className: `${className || ''}`, children: [jsx("div", { className: "pt-5", children: jsx("span", { className: "font-sans font-light text-xs text-secondary-text", children: `\u00a9\u00A02000-${new Date().getFullYear()}\u00A0АО \u00ABРоссельхозбанк\u00BB Генеральная лицензия Банка России \u2116\u00A03349 от\u00A012.08.2015\u00A0г.` }) }), links?.length ? (jsx("div", { className: "flex justify-start items-start gap-5 pt-2.5", children: links.map((_, i) => (jsx(TextInformationLink, { index: i, ...useLink({ router, handlerDecorator }, _) }, String(i)))) })) : null] }));
|
|
1985
|
+
return (jsxs("div", { className: `${className || ''}`, children: [jsx("div", { className: "pt-5", children: jsx("span", { className: "font-sans font-light text-xs text-secondary-text", children: `\u00a9\u00A02000-${new Date().getFullYear()}\u00A0АО \u00ABРоссельхозбанк\u00BB Генеральная лицензия Банка России \u2116\u00A03349 от\u00A012.08.2015\u00A0г.` }) }), links?.length ? (jsx("div", { className: "flex justify-start items-start gap-5 pt-2.5", children: links.map((_, i) => (jsx(TextInformationLink, { index: i, className: "font-light", ...useLink({ router, handlerDecorator }, _) }, String(i)))) })) : null] }));
|
|
1936
1986
|
});
|
|
1937
|
-
const TextInformationLink = JSX(({ className, index, text, href, target, onClick }) => (jsx("a", { className: `font-sans font-light text-xs text-secondary-text visited:text-secondary-text hover:text-primary-text inline-block no-underline max-w-[292px] ${className || ''}`, href: href, target: target, onClick: onClick, children: text || `Документ ${index}` })));
|
|
1938
1987
|
|
|
1939
1988
|
const LEFT_COL_WIDTH_FULL_HD = 'w-[204px]';
|
|
1940
1989
|
const Footer = JSX(({ className, documents, relatedEnterprises, contacts, socialMedia, mobileApps, topItems, context, ...rest }) => {
|
|
@@ -1981,15 +2030,15 @@
|
|
|
1981
2030
|
};
|
|
1982
2031
|
|
|
1983
2032
|
const GroupBlockTabs = JSX((props) => {
|
|
1984
|
-
const { tabs, currentTag, onTabClick, className = '', isShowCounter } = props;
|
|
1985
|
-
return (jsx("div", { className: `mb-2 box-border flex gap-x-1 ${className}`, role: "tablist", children: tabs?.map(renderTab$1(onTabClick,
|
|
2033
|
+
const { tabs, currentTag, onTabClick, className = '', isShowCounter = false } = props;
|
|
2034
|
+
return (jsx("div", { className: `mb-2 box-border flex gap-x-1 ${className}`, role: "tablist", children: tabs?.map(renderTab$1(onTabClick, currentTag, isShowCounter)) }));
|
|
1986
2035
|
});
|
|
1987
2036
|
const badgeStyle = 'min-w-[22px] w-[22px] h-[22px] rounded-full text-m-sm';
|
|
1988
|
-
const renderTab$1 = (onTabClick,
|
|
2037
|
+
const renderTab$1 = (onTabClick, currentTag, isShowCounter = false) => (tab, i) => {
|
|
1989
2038
|
const isActive = currentTag === tab.tag;
|
|
1990
2039
|
const tabBg = isActive ? 'bg-primary-main' : 'group bg-white';
|
|
1991
2040
|
const tabText = isActive ? 'text-white' : 'text-secondary-text group-hover:text-primary-main';
|
|
1992
|
-
const counterBlockStyle = `${badgeStyle}
|
|
2041
|
+
const counterBlockStyle = `${badgeStyle}
|
|
1993
2042
|
${isActive ? 'bg-white/30 text-white' : 'bg-secondary-light text-secondary-text'}`;
|
|
1994
2043
|
return (jsx("div", { className: `flex h-full w-full h-12 flex-1 cursor-pointer mr-2 last:mr-0 box-content ${tabBg}`, role: "tab", onClick: () => onTabClick(tab.tag), "aria-selected": String(isActive), tag: tab?.tag, children: jsxs("div", { className: "flex flex-1 items-center justify-center", children: [tab?.title ? jsx("h3", { className: tabText, children: tab?.title }) : null, isShowCounter ? (jsx("div", { className: `flex items-center justify-center ml-8 text-s-bold ${counterBlockStyle}`, children: jsx("span", { children: tab.count }) })) : null] }) }, String(i)));
|
|
1995
2044
|
};
|
|
@@ -2059,23 +2108,22 @@
|
|
|
2059
2108
|
|
|
2060
2109
|
const findActiveSubItem = (router) => (items = []) => {
|
|
2061
2110
|
const possibleActiveSubItems = items?.filter(isSubItemActive(router));
|
|
2062
|
-
|
|
2111
|
+
return possibleActiveSubItems?.length
|
|
2063
2112
|
? maxBy((_) => _.href?.length || 0)(possibleActiveSubItems) // More specific item with max length
|
|
2064
2113
|
: null;
|
|
2065
|
-
return activeSubItem;
|
|
2066
2114
|
};
|
|
2067
2115
|
|
|
2068
2116
|
const TEXT_CLASSES$1 = 'font-sans font-light text-base';
|
|
2069
2117
|
const BORDER_CLASSES = 'absolute left-0 -bottom-3 w-full h-[2px]';
|
|
2070
2118
|
const HeaderItem = JSX(({ className = '', text, href, target, active, onClick, children, bgColor = 'bg-white', dataItemName, }) => (jsxs("a", { className: `relative inline-block bg-transparent text-center no-underline ${className}`, href: href, target: target, onClick: onClick, "data-item-name": dataItemName, children: [jsx("span", { className: getTextClasses$1(bgColor, active), children: text || children }), active ? jsx("div", { className: getBorderClasses(bgColor, active) }) : null] })));
|
|
2071
|
-
const getTextClasses$1 = (bgColor, active) => {
|
|
2119
|
+
const getTextClasses$1 = (bgColor, active = false) => {
|
|
2072
2120
|
let classes = 'text-white';
|
|
2073
2121
|
if (bgColor === 'bg-white') {
|
|
2074
2122
|
classes = active ? 'text-primary-main' : 'text-primary-text hover:text-primary-main';
|
|
2075
2123
|
}
|
|
2076
2124
|
return `${classes} ${TEXT_CLASSES$1}`;
|
|
2077
2125
|
};
|
|
2078
|
-
const getBorderClasses = (bgColor, active) => {
|
|
2126
|
+
const getBorderClasses = (bgColor, active = false) => {
|
|
2079
2127
|
if (!active) {
|
|
2080
2128
|
return BORDER_CLASSES;
|
|
2081
2129
|
}
|
|
@@ -2158,20 +2206,21 @@
|
|
|
2158
2206
|
const showNextButton = isGalleryScrollAvailable && galleryLength > tabsShift + 2;
|
|
2159
2207
|
const isLastShift = galleryLength === tabsShift + 2;
|
|
2160
2208
|
const showPrevButton = tabsShift > 0;
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2209
|
+
const activeHref = cards[activeSlideIndex]?.href;
|
|
2210
|
+
return (jsxs("section", { className: `min-w-full text-center ${className}`, children: [jsxs("div", { className: "relative mt-7 overflow-hidden", children: [galleryLength
|
|
2211
|
+
? renderGallery({
|
|
2212
|
+
tabsShift,
|
|
2213
|
+
cards,
|
|
2214
|
+
activeSlideIndex,
|
|
2215
|
+
isLastShift,
|
|
2216
|
+
setActiveSlideIndex,
|
|
2217
|
+
})
|
|
2218
|
+
: null, renderArrows({
|
|
2219
|
+
handler: [handlePrevClick, handleNextClick],
|
|
2220
|
+
isShown: [showPrevButton, showNextButton],
|
|
2221
|
+
btnClass: ['left-[50px]', 'right-[50px]'],
|
|
2222
|
+
className: 'top-[62px]',
|
|
2223
|
+
}), showPrevButton ? (jsx("div", { className: "absolute top-0 left-0 h-full w-[136px] bg-opacity-from-white" })) : null, showNextButton ? (jsx("div", { className: "absolute top-0 right-0 h-full w-[136px] bg-opacity-to-white" })) : null] }), jsx(Button, { className: "w-[240px] p-4 text-center", version: "primary", href: activeHref, children: "\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u043F\u0440\u043E\u0433\u0440\u0430\u043C\u043C\u0443" })] }));
|
|
2175
2224
|
});
|
|
2176
2225
|
function renderGallery({ tabsShift, cards, activeSlideIndex, isLastShift, setActiveSlideIndex, }) {
|
|
2177
2226
|
const tabsShiftWidth = isLastShift ? tabsShift * 460 - 240 : tabsShift * 460;
|
|
@@ -2187,32 +2236,32 @@
|
|
|
2187
2236
|
const btnClassName = isActiveBtn
|
|
2188
2237
|
? 'shadow-dark-blue/42 border-primary-main'
|
|
2189
2238
|
: `ease-in duration-300 border-main-stroke`;
|
|
2190
|
-
return (jsxs("button", { type: "button", onClick: onClick, className: `p-[30px] min-w-[460px] flex items-center bg-white border-solid border relative ${btnClassName}`, children: [slide?.icon ? (jsx(Img, { className:
|
|
2239
|
+
return (jsxs("button", { type: "button", onClick: onClick, className: `p-[30px] min-w-[460px] flex items-center bg-white border-solid border relative ${btnClassName}`, children: [slide?.icon ? (jsx(Img, { className: "p-3 rounded-full bg-secondary-light mr-[30px]", image: slide.icon, width: "70", height: "70" })) : null, jsxs("div", { className: "flex gap-3.5", children: [slide?.sum ? renderValueBlock('страховая сумма', slide.sum) : null, slide?.fee ? renderValueBlock('страховой взнос', slide.fee) : null] }), renderDoneIcon(isActiveBtn)] }, String(i)));
|
|
2191
2240
|
}
|
|
2192
2241
|
function renderValueBlock(title, sum) {
|
|
2193
|
-
return (jsxs("div", { className: "flex flex-col text-left", children: [jsxs("span", { className: "
|
|
2242
|
+
return (jsxs("div", { className: "flex flex-col text-left whitespace-pre", children: [jsxs("span", { className: "text-h6", children: [addSpacesBetweenNumbers(sum), " \u20BD"] }), jsx("span", { className: "text-secondary-text text-l mt-1", children: title })] }));
|
|
2194
2243
|
}
|
|
2195
2244
|
function renderDoneIcon(isActive) {
|
|
2196
2245
|
return isActive ? (jsx(Img, { className: `h-[24px] w-[24px] min-w-[24px] min-h-[24px] absolute right-4 top-4`, image: "DoneIcon", width: "24", height: "24" })) : null;
|
|
2197
2246
|
}
|
|
2198
2247
|
|
|
2199
|
-
const InsuranceAmountBlock = JSX(({ className = '', context, title, insuranceTabs = [],
|
|
2248
|
+
const InsuranceAmountBlock = JSX(({ className = '', context, title, insuranceTabs = [], ...rest }) => {
|
|
2200
2249
|
const [activeSlideIndex, setActiveSlideIndex] = context.useState(0);
|
|
2201
|
-
return (jsxs(BlockWrapper, { context: context, className: `box-border py-[50px] overflow-hidden relative font-sans w-100 bg-white ${className}`, ...rest, children: [title ? jsx(Heading, { className: "text-center", title: title, headingType: "h3" }) : null, jsx("div", { className: "p-1.5 bg-secondary-light w-fit m-auto rounded-md mt-[34px]", children: insuranceTabs.map((item, i) => renderNavButton$1({
|
|
2250
|
+
return (jsxs(BlockWrapper, { context: context, className: `box-border py-[50px] overflow-hidden relative font-sans w-100 bg-white ${className}`, ...rest, children: [title ? jsx(Heading, { className: "text-center", title: title, headingType: "h3" }) : null, insuranceTabs?.length > 1 ? (jsx("div", { className: "p-1.5 bg-secondary-light w-fit m-auto rounded-md mt-[34px]", children: insuranceTabs.map((item, i) => renderNavButton$1({
|
|
2202
2251
|
title: item?.title,
|
|
2203
2252
|
i,
|
|
2204
2253
|
activeSlideIndex,
|
|
2205
2254
|
onClick: () => setActiveSlideIndex(i),
|
|
2206
|
-
})) }), jsx("div", { className: "flex", style: { transform: `translateX(-${activeSlideIndex}00%)` }, role: "list", children: renderInsuranceGalleries({
|
|
2255
|
+
})) })) : null, jsx("div", { className: "flex", style: { transform: `translateX(-${activeSlideIndex}00%)` }, role: "list", children: renderInsuranceGalleries({
|
|
2207
2256
|
context,
|
|
2208
2257
|
className,
|
|
2209
2258
|
insuranceTabs,
|
|
2210
|
-
}) })
|
|
2259
|
+
}) })] }));
|
|
2211
2260
|
});
|
|
2212
2261
|
const renderInsuranceGalleries = ({ insuranceTabs, context, className = '', }) => {
|
|
2213
2262
|
const insuranceGalleries = insuranceTabs?.map((_) => _.cards);
|
|
2214
2263
|
return insuranceGalleries?.length
|
|
2215
|
-
? insuranceGalleries.map((cards) => (jsx(InsuranceAmountBlockInner, { context: context, className: className, cards: cards })))
|
|
2264
|
+
? insuranceGalleries.map((cards, i) => (jsx(InsuranceAmountBlockInner, { context: context, className: className, cards: cards }, String(i))))
|
|
2216
2265
|
: null;
|
|
2217
2266
|
};
|
|
2218
2267
|
function renderNavButton$1({ title, i, activeSlideIndex, onClick }) {
|
|
@@ -2220,7 +2269,7 @@
|
|
|
2220
2269
|
const btnClassName = isActiveBtn
|
|
2221
2270
|
? 'bg-primary-main text-white rounded-md'
|
|
2222
2271
|
: `text-secondary-text`;
|
|
2223
|
-
return (jsx("button", { type: "button", onClick: onClick, "aria-label": title, className: `box-border px-4 py-3 text-m
|
|
2272
|
+
return (jsx("button", { type: "button", onClick: onClick, "aria-label": title, className: `box-border px-4 py-3 text-m ${btnClassName}`, children: title }, String(i)));
|
|
2224
2273
|
}
|
|
2225
2274
|
|
|
2226
2275
|
const mobileAppStyleMap = {
|
|
@@ -2253,11 +2302,11 @@
|
|
|
2253
2302
|
const TEXT_CLASSES = 'font-sans font-normal text-m-md';
|
|
2254
2303
|
const LINK_CLASSES = 'flex-1 flex items-center justify-center cursor-pointer';
|
|
2255
2304
|
const NavigatorTabItem = JSX(({ className = '', text, active, onClick, href, target = '_self', children }) => (jsx("a", { className: getLinkClasses(className, active), target: target, href: href, onClick: onClick, children: jsx("span", { className: getTextClasses(active), children: text || children }) })));
|
|
2256
|
-
const getLinkClasses = (className, active) => {
|
|
2305
|
+
const getLinkClasses = (className, active = false) => {
|
|
2257
2306
|
const classes = active ? 'bg-primary-main' : 'group bg-white';
|
|
2258
2307
|
return `${classes} ${LINK_CLASSES} ${className}`;
|
|
2259
2308
|
};
|
|
2260
|
-
const getTextClasses = (active) => {
|
|
2309
|
+
const getTextClasses = (active = false) => {
|
|
2261
2310
|
const classes = active ? 'text-white' : 'text-secondary-text group-hover:text-primary-main ';
|
|
2262
2311
|
return `${classes} ${TEXT_CLASSES}`;
|
|
2263
2312
|
};
|
|
@@ -2298,8 +2347,10 @@
|
|
|
2298
2347
|
context,
|
|
2299
2348
|
initialState: isUnfolded,
|
|
2300
2349
|
});
|
|
2301
|
-
|
|
2302
|
-
|
|
2350
|
+
const buttonClassName = foldButtonClasses ||
|
|
2351
|
+
'border-none bg-primary-main px-0 py-[26px] mb-[1px] w-full font-sans text-white text-base flex justify-center cursor-pointer';
|
|
2352
|
+
const getFoldButtonLabel = isActive ? 'Скрыть' : foldButtonLabel;
|
|
2353
|
+
return blocks ? (jsxs("div", { children: [renderBlocks(blocks, render, { blocksToHide, isActive, containerClasses }), hiddenBlocksNum ? (jsxs("button", { className: buttonClassName, "data-theme": foldButtonDataTheme, onClick: handleToggle, children: [jsx("span", { className: "pr-3", children: getFoldButtonLabel }), icon ? jsx(Icon, { name: icon, iconVersion: "white", width: "20", height: "20", asSVG: true }) : null] })) : null] })) : null;
|
|
2303
2354
|
});
|
|
2304
2355
|
const renderBlocks = (blocks, render, { blocksToHide, isActive, containerClasses }) => {
|
|
2305
2356
|
const visibleBlocks = blocks.slice(0, blocks.length - blocksToHide);
|
|
@@ -2322,6 +2373,19 @@
|
|
|
2322
2373
|
return (jsx(BlockWrapper, { context: context, className: `font-sans text-primary-text ${className}`, ...rest, children: blockItems?.length ? (jsx("div", { className: "box-border1", children: blockItems.map((item, i) => (jsx(OtherProductsItem, { ...item, dataTheme: colorPalette, context: context }, `BlockItem${i}`))) })) : null }));
|
|
2323
2374
|
});
|
|
2324
2375
|
|
|
2376
|
+
function getTileHeadingType(className = '') {
|
|
2377
|
+
const colSpan = getColSpan(className);
|
|
2378
|
+
if (colSpan <= 4) {
|
|
2379
|
+
return 'h4';
|
|
2380
|
+
}
|
|
2381
|
+
else if (colSpan <= 8) {
|
|
2382
|
+
return 'h3';
|
|
2383
|
+
}
|
|
2384
|
+
else {
|
|
2385
|
+
return 'h2';
|
|
2386
|
+
}
|
|
2387
|
+
}
|
|
2388
|
+
|
|
2325
2389
|
const GOLDEN_RATIO = 1.618;
|
|
2326
2390
|
const Placeholder = JSX(({ className, context, title, description = 'Блок в разработке...', ...rest }) => {
|
|
2327
2391
|
return (jsx(BlockWrapper, { context: context, className: `bg-white text-primary-text font-sans p-9 box-border ${className} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `, ...rest, children: jsxs(BaseTile, { context: context, title: title ? (jsx(Heading, { headingType: getTileHeadingType(className), title: title, className: `whitespace-pre-wrap max-w-[600px]` })) : null, children: [description ? (jsx(Description, { className: "mt-4 max-w-[600px]", description: description })) : null, jsx("figure", { className: "m-0 min-w-[600px]", children: renderShimmer() })] }) }));
|
|
@@ -2456,6 +2520,8 @@
|
|
|
2456
2520
|
const StepsBlock = JSX(({ className = '', title, showLines = true, steps = [], button, version = 'primary', ...rest }) => {
|
|
2457
2521
|
const styleMap = getStyleMap(version);
|
|
2458
2522
|
const shortGaps = steps.length > 3;
|
|
2523
|
+
const stepGap = shortGaps ? 'gap-x-3' : 'gap-x-[101px]';
|
|
2524
|
+
const lineOpacity = showLines ? '' : 'opacity-0';
|
|
2459
2525
|
return (jsxs(BlockWrapper, { className: [
|
|
2460
2526
|
'box-border font-sans text-primary-text bg-white',
|
|
2461
2527
|
shortGaps ? 'px-20' : 'px-[70px]',
|
|
@@ -2463,7 +2529,7 @@
|
|
|
2463
2529
|
styleMap.background,
|
|
2464
2530
|
styleMap.title,
|
|
2465
2531
|
className,
|
|
2466
|
-
].join(' '), ...rest, children: [jsx(Heading, { headingType: "h2", className: "max-w-[47rem] text-center", title: title }), steps?.length ? (jsxs("div", { className:
|
|
2532
|
+
].join(' '), ...rest, children: [title ? (jsx(Heading, { headingType: "h2", className: "max-w-[47rem] text-center mb-9", title: title })) : null, steps?.length ? (jsxs("div", { className: "box-border", children: [jsx("div", { className: "flex items-center px-[88px]", children: joinList(jsx("div", { className: `h-0.5 w-full bg-secondary-light ${lineOpacity}` }))(steps.map(renderStepIcon(styleMap))) }), jsx("div", { className: `flex justify-between ${stepGap}`, children: steps.map(renderStepTitle(styleMap, Boolean(button?.text))) })] })) : null, button?.text ? (jsx(Button, { className: "mt-8 w-full max-w-[240px]", version: "primary", ...button })) : null] }));
|
|
2467
2533
|
});
|
|
2468
2534
|
const renderStepIcon = (styleMap) => ({ icon }, i) => {
|
|
2469
2535
|
return (jsx("div", { className: "flex flex-col items-center text-center relative", children: jsx("div", { className: `h-[100px] w-[100px] min-w-[100px] min-h-[100px] rounded-full p-[26px] box-border z-10 ${styleMap.iconBackground}`, children: checkIsIconRenderable(icon) ? (jsx(Img, { image: icon, width: "48", height: "48", asSVG: true })) : (jsx("span", { className: `font-normal text-title-sm ${styleMap.title}`, children: i + 1 })) }) }, String(i)));
|