@redneckz/wildless-cms-uni-blocks 0.5.4 → 0.5.6
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/README.md +10 -3
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +372 -222
- package/bundle/bundle.umd.min.js +1 -1
- package/cosmos-static/icons/ArrowDownIcon.svg +1 -1
- package/cosmos-static/icons/ArrowUpIcon.svg +1 -1
- package/cosmos-static/icons/BuildingIcon.svg +1 -0
- package/cosmos-static/icons/Car2Icon.svg +1 -0
- package/cosmos-static/icons/DocDownloadIcon.svg +1 -1
- package/cosmos-static/icons/DoneIcon.svg +1 -1
- package/cosmos-static/icons/DoneSimpleIcon.svg +1 -0
- package/cosmos-static/icons/GpsIcon.svg +1 -1
- package/cosmos-static/icons/MapMarkerClusterIcon.svg +1 -0
- package/cosmos-static/icons/MapMarkerSingleIcon.svg +1 -0
- package/cosmos-static/icons/MoneysIcon.svg +1 -0
- package/cosmos-static/icons/StrongBoxIcon.svg +1 -0
- package/cosmos-static/icons/UserSquareIcon.svg +1 -0
- package/dist/ProjectSettings.d.ts +4 -0
- package/dist/ProjectSettings.js +6 -0
- package/dist/ProjectSettings.js.map +1 -1
- package/dist/components/Accordion/AccordionContent.d.ts +4 -9
- package/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/dist/components/BenefitsBlock/BenefitsBlockContent.d.ts +12 -19
- package/dist/components/BlockContent.d.ts +2 -3
- package/dist/components/Blocks.d.ts +0 -1
- package/dist/components/Blocks.js +1 -3
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/Bonus/Bonus.js +1 -1
- package/dist/components/Bonus/Bonus.js.map +1 -1
- package/dist/components/Bonus/BonusContent.d.ts +6 -9
- package/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js +3 -5
- package/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
- package/dist/components/BonusBenefitsBlock/BonusBenefitsBlockContent.d.ts +5 -11
- package/dist/components/Calculator/BonusCalculatorForm.js +3 -2
- package/dist/components/Calculator/BonusCalculatorForm.js.map +1 -1
- package/dist/components/Calculator/Calculator.js +1 -1
- package/dist/components/Calculator/Calculator.js.map +1 -1
- package/dist/components/Calculator/CalculatorContent.d.ts +7 -40
- package/dist/components/Calculator/CalculatorValueBlock.js +1 -1
- package/dist/components/Calculator/CreditCalculatorForm.js +4 -3
- package/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/dist/components/Calculator/DepositCalculatorForm.js +21 -2
- package/dist/components/Calculator/DepositCalculatorForm.js.map +1 -1
- package/dist/components/Calculator/EmbeddableCalcBlocks.d.ts +1 -3
- package/dist/components/Calculator/EmbeddableCalcBlocks.js +0 -2
- package/dist/components/Calculator/EmbeddableCalcBlocks.js.map +1 -1
- package/dist/components/Calculator/renderFootnote.d.ts +2 -0
- package/dist/components/Calculator/renderFootnote.js +6 -0
- package/dist/components/Calculator/renderFootnote.js.map +1 -0
- package/dist/components/CardTransfer/CardTransferContent.d.ts +3 -6
- package/dist/components/Catalog/CatalogCard.js.map +1 -1
- package/dist/components/Catalog/CatalogContent.d.ts +2 -5
- package/dist/components/ComparisonTable/ComparisonTableContent.d.ts +9 -43
- package/dist/components/ComparisonTable/TableColumn.d.ts +8 -1
- package/dist/components/ComparisonTable/TableColumn.js.map +1 -1
- package/dist/components/ComparisonTable/TableRow.d.ts +5 -1
- package/dist/components/ComparisonTable/TableRow.js.map +1 -1
- package/dist/components/ContentPage/computeAPIFallback.d.ts +5 -0
- package/dist/components/ContentPage/computeAPIFallback.js +68 -0
- package/dist/components/ContentPage/computeAPIFallback.js.map +1 -0
- package/dist/components/ErrorBlock/ErrorBlockContent.d.ts +17 -4
- package/dist/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +3 -4
- package/dist/components/ExchangeRateTile/renderInput.js +4 -3
- package/dist/components/ExchangeRateTile/renderInput.js.map +1 -1
- package/dist/components/Footer/Footer.js +3 -2
- package/dist/components/Footer/Footer.js.map +1 -1
- package/dist/components/Footer/Footer.mobile.js +3 -2
- package/dist/components/Footer/Footer.mobile.js.map +1 -1
- package/dist/components/Footer/FooterContent.d.ts +5 -9
- package/dist/components/Footer/HorizontalNavigation.d.ts +2 -2
- package/dist/components/Footer/HorizontalNavigation.js.map +1 -1
- package/dist/components/Footer/HorizontalNavigation.mobile.d.ts +2 -2
- package/dist/components/Footer/HorizontalNavigation.mobile.js.map +1 -1
- package/dist/components/Footer/Sitemap.d.ts +2 -0
- package/dist/components/Footer/Sitemap.js +2 -2
- package/dist/components/Footer/Sitemap.js.map +1 -1
- package/dist/components/Gallery/GalleryContent.d.ts +16 -19
- package/dist/components/GracePeriod/GracePeriodContent.d.ts +10 -14
- package/dist/components/Header/Header.fallback.d.ts +2 -0
- package/dist/components/Header/Header.fallback.js +12 -0
- package/dist/components/Header/Header.fallback.js.map +1 -0
- package/dist/components/Header/Header.js +4 -3
- package/dist/components/Header/Header.js.map +1 -1
- package/dist/components/Header/Header.mobile.js +3 -2
- package/dist/components/Header/Header.mobile.js.map +1 -1
- package/dist/components/Header/HeaderContent.d.ts +14 -23
- package/dist/components/Headline/HeadlineContent.d.ts +4 -3
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockContent.d.ts +8 -13
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.d.ts +2 -2
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +2 -2
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
- package/dist/components/MiniGallery/MiniGalleryContent.d.ts +8 -3
- package/dist/components/MobileAppTile/MobileAppTileContent.d.ts +19 -5
- package/dist/components/OfficeServicesBlock/OfficeServicesBlock.js +1 -1
- package/dist/components/OfficeServicesBlock/OfficeServicesBlock.js.map +1 -1
- package/dist/components/OfficeServicesBlock/OfficeServicesBlockContent.d.ts +5 -20
- package/dist/components/OtherProducts/OtherProductsContent.d.ts +3 -4
- package/dist/components/PictureText/PictureText.js +1 -1
- package/dist/components/PictureText/PictureTextContent.d.ts +20 -4
- package/dist/components/ProductBlock/ProductBlockContent.d.ts +13 -10
- package/dist/components/ProductTile/ProductTile.js +13 -8
- package/dist/components/ProductTile/ProductTile.js.map +1 -1
- package/dist/components/ProductTile/ProductTileContent.d.ts +19 -9
- package/dist/components/Recommendation/RecommendationContent.d.ts +20 -2
- package/dist/components/SafeDepositRental/RegionsAndBranches.d.ts +2 -2
- package/dist/components/SafeDepositRental/SafeBoxCases.d.ts +1 -1
- package/dist/components/SafeDepositRental/SafeDepositRental.js +14 -2
- package/dist/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
- package/dist/components/SafeDepositRental/SafeDepositRentalContent.d.ts +6 -21
- package/dist/components/SafeDepositRental/SafeDepositRentalFields.d.ts +9 -0
- package/dist/components/SafeDepositRental/SafeDepositRentalFields.js +21 -0
- package/dist/components/SafeDepositRental/SafeDepositRentalFields.js.map +1 -0
- package/dist/components/SafeDepositRental/SafeDepositRentalForm.d.ts +2 -0
- package/dist/components/SafeDepositRental/SafeDepositRentalForm.js +33 -42
- package/dist/components/SafeDepositRental/SafeDepositRentalForm.js.map +1 -1
- package/dist/components/SafeDepositRental/SafeDepositRentalTotal.d.ts +1 -1
- package/dist/components/SafeDepositRental/SafeDepositRentalTotal.js.map +1 -1
- package/dist/components/SafeDepositRental/SafeDepositRentalTypes.d.ts +10 -0
- package/dist/components/SafeDepositRental/SafeDepositRentalTypes.js +2 -0
- package/dist/components/SafeDepositRental/SafeDepositRentalTypes.js.map +1 -0
- package/dist/components/SafeDepositRental/WrapperSelect.js +2 -2
- package/dist/components/SafeDepositRental/WrapperSelect.js.map +1 -1
- package/dist/components/SafeDepositRental/YandexMap.d.ts +5 -0
- package/dist/components/SafeDepositRental/YandexMap.js +24 -0
- package/dist/components/SafeDepositRental/YandexMap.js.map +1 -0
- package/dist/components/SafeDepositRental/renderClusterer.d.ts +1 -0
- package/dist/components/SafeDepositRental/renderClusterer.js +37 -0
- package/dist/components/SafeDepositRental/renderClusterer.js.map +1 -0
- package/dist/components/SafeDepositRental/useGetRegions.js +1 -1
- package/dist/components/SafeDepositRental/useGetRegions.js.map +1 -1
- package/dist/components/SafeDepositRental/utils.d.ts +3 -0
- package/dist/components/SafeDepositRental/utils.js +15 -0
- package/dist/components/SafeDepositRental/utils.js.map +1 -0
- package/dist/components/StepsBlock/StepsBlockContent.d.ts +6 -25
- package/dist/components/Tabs/TabsContent.d.ts +8 -5
- package/dist/components/TariffsTable/EmbeddableCellData.mobile.d.ts +0 -3
- package/dist/components/TariffsTable/EmbeddableCellData.mobile.js.map +1 -1
- package/dist/components/TariffsTable/TariffsTableContent.d.ts +19 -36
- package/dist/components/TariffsTable/TariffsTableRow.js +2 -1
- package/dist/components/TariffsTable/TariffsTableRow.js.map +1 -1
- package/dist/components/TextBlock/TextBlockContent.d.ts +3 -6
- package/dist/components/Tile/TileContent.d.ts +17 -2
- package/dist/hooks/useFetchSafeBoxes.d.ts +22 -0
- package/dist/hooks/useFetchSafeBoxes.js +17 -0
- package/dist/hooks/useFetchSafeBoxes.js.map +1 -0
- package/dist/hooks/useScript.d.ts +6 -0
- package/dist/hooks/useScript.js +75 -0
- package/dist/hooks/useScript.js.map +1 -0
- package/dist/icons/IconName.d.ts +19 -5
- package/dist/icons/IconName.js +17 -3
- package/dist/icons/IconName.js.map +1 -1
- package/dist/model/ButtonVersion.d.ts +1 -1
- package/dist/model/Footnote.d.ts +4 -0
- package/dist/{components/Navigation/NavigationContent.js → model/Footnote.js} +1 -1
- package/dist/model/Footnote.js.map +1 -0
- package/dist/model/HeadlineType.d.ts +4 -0
- package/dist/model/Picture.d.ts +4 -0
- package/dist/model/ProductColorVersion.d.ts +4 -0
- package/dist/model/ProductColorVersion.js +2 -0
- package/dist/model/ProductColorVersion.js.map +1 -0
- package/dist/react/setup-fixture.js +6 -0
- package/dist/react/setup-fixture.js.map +1 -1
- package/dist/services/sitemap/useSitemap.d.ts +2 -1
- package/dist/services/sitemap/useSitemap.js +2 -2
- package/dist/services/sitemap/useSitemap.js.map +1 -1
- package/dist/types/Fallback.d.ts +5 -0
- package/{mobile/dist/components/Navigation/NavigationContent.js → dist/types/Fallback.js} +1 -1
- package/dist/types/Fallback.js.map +1 -0
- package/dist/types.d.ts +1 -0
- package/dist/ui-kit/BenefitItem/BenefitItem.js +2 -2
- package/dist/ui-kit/BenefitItem/BenefitItem.js.map +1 -1
- package/dist/ui-kit/BenefitItem/BenefitItemProps.d.ts +3 -8
- package/dist/ui-kit/Button/ButtonProps.d.ts +3 -5
- package/dist/ui-kit/Button/ButtonSection.js +2 -1
- package/dist/ui-kit/Button/ButtonSection.js.map +1 -1
- package/dist/ui-kit/Button/LikeButton.js +1 -1
- package/dist/ui-kit/Button/LikeButton.js.map +1 -1
- package/dist/ui-kit/Button/buttonClassNameConstants.js +4 -3
- package/dist/ui-kit/Button/buttonClassNameConstants.js.map +1 -1
- package/dist/ui-kit/Foldable/Foldable.js +1 -1
- package/dist/ui-kit/Foldable/Foldable.js.map +1 -1
- package/dist/ui-kit/Input/Input.js +1 -1
- package/dist/ui-kit/Input/Input.js.map +1 -1
- package/dist/ui-kit/InputRange/InputRange.js +8 -15
- package/dist/ui-kit/InputRange/InputRange.js.map +1 -1
- package/dist/ui-kit/Radio/Radio.js +1 -1
- package/dist/ui-kit/Radio/Radio.js.map +1 -1
- package/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.js +1 -1
- package/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.js.map +1 -1
- package/dist/ui-kit/SearchBar/SearchBarInner.js +2 -2
- package/dist/ui-kit/SearchBar/SearchBarInner.js.map +1 -1
- package/dist/ui-kit/SelectCustom/SelectCustom.d.ts +13 -0
- package/dist/ui-kit/SelectCustom/SelectCustom.js +30 -0
- package/dist/ui-kit/SelectCustom/SelectCustom.js.map +1 -0
- package/dist/wlc.json +5 -0
- package/lib/ProjectSettings.d.ts +4 -0
- package/lib/ProjectSettings.js +6 -0
- package/lib/ProjectSettings.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/Accordion/AccordionContent.d.ts +4 -9
- package/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/lib/components/BenefitsBlock/BenefitsBlockContent.d.ts +12 -19
- package/lib/components/BlockContent.d.ts +2 -3
- package/lib/components/Blocks.d.ts +0 -1
- package/lib/components/Blocks.js +1 -3
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/Bonus/Bonus.js +1 -1
- package/lib/components/Bonus/Bonus.js.map +1 -1
- package/lib/components/Bonus/BonusContent.d.ts +6 -9
- package/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js +3 -5
- package/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
- package/lib/components/BonusBenefitsBlock/BonusBenefitsBlockContent.d.ts +5 -11
- package/lib/components/Calculator/BonusCalculatorForm.js +3 -2
- package/lib/components/Calculator/BonusCalculatorForm.js.map +1 -1
- package/lib/components/Calculator/Calculator.js +1 -1
- package/lib/components/Calculator/Calculator.js.map +1 -1
- package/lib/components/Calculator/CalculatorContent.d.ts +7 -40
- package/lib/components/Calculator/CalculatorValueBlock.js +1 -1
- package/lib/components/Calculator/CreditCalculatorForm.js +4 -3
- package/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/lib/components/Calculator/DepositCalculatorForm.js +21 -2
- package/lib/components/Calculator/DepositCalculatorForm.js.map +1 -1
- package/lib/components/Calculator/EmbeddableCalcBlocks.d.ts +1 -3
- package/lib/components/Calculator/EmbeddableCalcBlocks.js +0 -2
- package/lib/components/Calculator/EmbeddableCalcBlocks.js.map +1 -1
- package/lib/components/Calculator/renderFootnote.d.ts +2 -0
- package/lib/components/Calculator/renderFootnote.js +3 -0
- package/lib/components/Calculator/renderFootnote.js.map +1 -0
- package/lib/components/CardTransfer/CardTransferContent.d.ts +3 -6
- package/lib/components/Catalog/CatalogCard.js.map +1 -1
- package/lib/components/Catalog/CatalogContent.d.ts +2 -5
- package/lib/components/ComparisonTable/ComparisonTableContent.d.ts +9 -43
- package/lib/components/ComparisonTable/TableColumn.d.ts +8 -1
- package/lib/components/ComparisonTable/TableColumn.js.map +1 -1
- package/lib/components/ComparisonTable/TableRow.d.ts +5 -1
- package/lib/components/ComparisonTable/TableRow.js.map +1 -1
- package/lib/components/ContentPage/computeAPIFallback.d.ts +5 -0
- package/lib/components/ContentPage/computeAPIFallback.js +40 -0
- package/lib/components/ContentPage/computeAPIFallback.js.map +1 -0
- package/lib/components/ErrorBlock/ErrorBlockContent.d.ts +17 -4
- package/lib/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +3 -4
- package/lib/components/ExchangeRateTile/renderInput.js +4 -3
- package/lib/components/ExchangeRateTile/renderInput.js.map +1 -1
- package/lib/components/Footer/Footer.js +3 -2
- package/lib/components/Footer/Footer.js.map +1 -1
- package/lib/components/Footer/Footer.mobile.js +3 -2
- package/lib/components/Footer/Footer.mobile.js.map +1 -1
- package/lib/components/Footer/FooterContent.d.ts +5 -9
- package/lib/components/Footer/HorizontalNavigation.d.ts +2 -2
- package/lib/components/Footer/HorizontalNavigation.js.map +1 -1
- package/lib/components/Footer/HorizontalNavigation.mobile.d.ts +2 -2
- package/lib/components/Footer/HorizontalNavigation.mobile.js.map +1 -1
- package/lib/components/Footer/Sitemap.d.ts +2 -0
- package/lib/components/Footer/Sitemap.js +2 -2
- package/lib/components/Footer/Sitemap.js.map +1 -1
- package/lib/components/Gallery/GalleryContent.d.ts +16 -19
- package/lib/components/GracePeriod/GracePeriodContent.d.ts +10 -14
- package/lib/components/Header/Header.fallback.d.ts +2 -0
- package/lib/components/Header/Header.fallback.js +9 -0
- package/lib/components/Header/Header.fallback.js.map +1 -0
- package/lib/components/Header/Header.js +4 -3
- package/lib/components/Header/Header.js.map +1 -1
- package/lib/components/Header/Header.mobile.js +3 -2
- package/lib/components/Header/Header.mobile.js.map +1 -1
- package/lib/components/Header/HeaderContent.d.ts +14 -23
- package/lib/components/Headline/HeadlineContent.d.ts +4 -3
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockContent.d.ts +8 -13
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.d.ts +2 -2
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +2 -2
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
- package/lib/components/MiniGallery/MiniGalleryContent.d.ts +8 -3
- package/lib/components/MobileAppTile/MobileAppTileContent.d.ts +19 -5
- package/lib/components/OfficeServicesBlock/OfficeServicesBlock.js +1 -1
- package/lib/components/OfficeServicesBlock/OfficeServicesBlock.js.map +1 -1
- package/lib/components/OfficeServicesBlock/OfficeServicesBlockContent.d.ts +5 -20
- package/lib/components/OtherProducts/OtherProductsContent.d.ts +3 -4
- package/lib/components/PictureText/PictureText.js +1 -1
- package/lib/components/PictureText/PictureTextContent.d.ts +20 -4
- package/lib/components/ProductBlock/ProductBlockContent.d.ts +13 -10
- package/lib/components/ProductTile/ProductTile.fixture.d.ts +1 -0
- package/lib/components/ProductTile/ProductTile.js +13 -8
- package/lib/components/ProductTile/ProductTile.js.map +1 -1
- package/lib/components/ProductTile/ProductTileContent.d.ts +19 -9
- package/lib/components/Recommendation/RecommendationContent.d.ts +20 -2
- package/lib/components/SafeDepositRental/RegionsAndBranches.d.ts +2 -2
- package/lib/components/SafeDepositRental/SafeBoxCases.d.ts +1 -1
- package/lib/components/SafeDepositRental/SafeDepositRental.js +14 -2
- package/lib/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
- package/lib/components/SafeDepositRental/SafeDepositRentalContent.d.ts +6 -21
- package/lib/components/SafeDepositRental/SafeDepositRentalFields.d.ts +9 -0
- package/lib/components/SafeDepositRental/SafeDepositRentalFields.js +19 -0
- package/lib/components/SafeDepositRental/SafeDepositRentalFields.js.map +1 -0
- package/lib/components/SafeDepositRental/SafeDepositRentalForm.d.ts +2 -0
- package/lib/components/SafeDepositRental/SafeDepositRentalForm.js +33 -42
- package/lib/components/SafeDepositRental/SafeDepositRentalForm.js.map +1 -1
- package/lib/components/SafeDepositRental/SafeDepositRentalTotal.d.ts +1 -1
- package/lib/components/SafeDepositRental/SafeDepositRentalTotal.js.map +1 -1
- package/lib/components/SafeDepositRental/SafeDepositRentalTypes.d.ts +10 -0
- package/lib/components/SafeDepositRental/SafeDepositRentalTypes.js +2 -0
- package/lib/components/SafeDepositRental/SafeDepositRentalTypes.js.map +1 -0
- package/lib/components/SafeDepositRental/WrapperSelect.js +2 -2
- package/lib/components/SafeDepositRental/WrapperSelect.js.map +1 -1
- package/lib/components/SafeDepositRental/YandexMap.d.ts +5 -0
- package/lib/components/SafeDepositRental/YandexMap.js +22 -0
- package/lib/components/SafeDepositRental/YandexMap.js.map +1 -0
- package/lib/components/SafeDepositRental/renderClusterer.d.ts +1 -0
- package/lib/components/SafeDepositRental/renderClusterer.js +34 -0
- package/lib/components/SafeDepositRental/renderClusterer.js.map +1 -0
- package/lib/components/SafeDepositRental/useGetRegions.js +1 -1
- package/lib/components/SafeDepositRental/useGetRegions.js.map +1 -1
- package/lib/components/SafeDepositRental/utils.d.ts +3 -0
- package/lib/components/SafeDepositRental/utils.js +11 -0
- package/lib/components/SafeDepositRental/utils.js.map +1 -0
- package/lib/components/StepsBlock/StepsBlockContent.d.ts +6 -25
- package/lib/components/Tabs/TabsContent.d.ts +8 -5
- package/lib/components/TariffsTable/EmbeddableCellData.mobile.d.ts +0 -3
- package/lib/components/TariffsTable/EmbeddableCellData.mobile.js.map +1 -1
- package/lib/components/TariffsTable/TariffsTableContent.d.ts +19 -36
- package/lib/components/TariffsTable/TariffsTableRow.js +2 -1
- package/lib/components/TariffsTable/TariffsTableRow.js.map +1 -1
- package/lib/components/TextBlock/TextBlockContent.d.ts +3 -6
- package/lib/components/Tile/TileContent.d.ts +17 -2
- package/lib/hooks/useFetchSafeBoxes.d.ts +22 -0
- package/lib/hooks/useFetchSafeBoxes.js +14 -0
- package/lib/hooks/useFetchSafeBoxes.js.map +1 -0
- package/lib/hooks/useScript.d.ts +6 -0
- package/lib/hooks/useScript.js +72 -0
- package/lib/hooks/useScript.js.map +1 -0
- package/lib/icons/IconName.d.ts +19 -5
- package/lib/icons/IconName.js +17 -3
- package/lib/icons/IconName.js.map +1 -1
- package/lib/model/ButtonVersion.d.ts +1 -1
- package/lib/model/Footnote.d.ts +4 -0
- package/lib/model/Footnote.js +2 -0
- package/lib/model/Footnote.js.map +1 -0
- package/lib/model/HeadlineType.d.ts +4 -0
- package/lib/model/Picture.d.ts +4 -0
- package/lib/model/ProductColorVersion.d.ts +4 -0
- package/lib/model/ProductColorVersion.js +2 -0
- package/lib/model/ProductColorVersion.js.map +1 -0
- package/lib/react/setup-fixture.js +3 -0
- package/lib/react/setup-fixture.js.map +1 -1
- package/lib/services/sitemap/useSitemap.d.ts +2 -1
- package/lib/services/sitemap/useSitemap.js +2 -2
- package/lib/services/sitemap/useSitemap.js.map +1 -1
- package/lib/types/Fallback.d.ts +5 -0
- package/lib/types/Fallback.js +2 -0
- package/lib/types/Fallback.js.map +1 -0
- package/lib/types.d.ts +1 -0
- package/lib/ui-kit/BenefitItem/BenefitItem.js +2 -2
- package/lib/ui-kit/BenefitItem/BenefitItem.js.map +1 -1
- package/lib/ui-kit/BenefitItem/BenefitItemProps.d.ts +3 -8
- package/lib/ui-kit/Button/ButtonProps.d.ts +3 -5
- package/lib/ui-kit/Button/ButtonSection.js +2 -1
- package/lib/ui-kit/Button/ButtonSection.js.map +1 -1
- package/lib/ui-kit/Button/LikeButton.js +1 -1
- package/lib/ui-kit/Button/LikeButton.js.map +1 -1
- package/lib/ui-kit/Button/buttonClassNameConstants.js +4 -3
- package/lib/ui-kit/Button/buttonClassNameConstants.js.map +1 -1
- package/lib/ui-kit/Foldable/Foldable.js +1 -1
- package/lib/ui-kit/Foldable/Foldable.js.map +1 -1
- package/lib/ui-kit/Input/Input.js +1 -1
- package/lib/ui-kit/Input/Input.js.map +1 -1
- package/lib/ui-kit/InputRange/InputRange.js +8 -15
- package/lib/ui-kit/InputRange/InputRange.js.map +1 -1
- package/lib/ui-kit/Radio/Radio.js +1 -1
- package/lib/ui-kit/Radio/Radio.js.map +1 -1
- package/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.js +1 -1
- package/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.js.map +1 -1
- package/lib/ui-kit/SearchBar/SearchBarInner.js +2 -2
- package/lib/ui-kit/SearchBar/SearchBarInner.js.map +1 -1
- package/lib/ui-kit/SelectCustom/SelectCustom.d.ts +13 -0
- package/lib/{components/Navigation/Navigation.fixture.d.ts → ui-kit/SelectCustom/SelectCustom.fixture.d.ts} +0 -0
- package/lib/ui-kit/SelectCustom/SelectCustom.js +28 -0
- package/lib/ui-kit/SelectCustom/SelectCustom.js.map +1 -0
- package/lib/wlc.json +5 -0
- package/mobile/bundle/bundle.umd.js +82 -34
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/ProjectSettings.d.ts +4 -0
- package/mobile/dist/ProjectSettings.js +6 -0
- package/mobile/dist/ProjectSettings.js.map +1 -1
- package/mobile/dist/components/Accordion/AccordionContent.d.ts +4 -9
- package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/mobile/dist/components/BenefitsBlock/BenefitsBlockContent.d.ts +12 -19
- package/mobile/dist/components/BlockContent.d.ts +2 -3
- package/mobile/dist/components/Bonus/Bonus.js +1 -1
- package/mobile/dist/components/Bonus/Bonus.js.map +1 -1
- package/mobile/dist/components/Bonus/BonusContent.d.ts +6 -9
- package/mobile/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js +3 -5
- package/mobile/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
- package/mobile/dist/components/BonusBenefitsBlock/BonusBenefitsBlockContent.d.ts +5 -11
- package/mobile/dist/components/Calculator/BonusCalculatorForm.js +3 -2
- package/mobile/dist/components/Calculator/BonusCalculatorForm.js.map +1 -1
- package/mobile/dist/components/Calculator/Calculator.js +1 -1
- package/mobile/dist/components/Calculator/Calculator.js.map +1 -1
- package/mobile/dist/components/Calculator/CalculatorContent.d.ts +7 -40
- package/mobile/dist/components/Calculator/CalculatorValueBlock.js +1 -1
- package/mobile/dist/components/Calculator/CreditCalculatorForm.js +4 -3
- package/mobile/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/mobile/dist/components/Calculator/DepositCalculatorForm.js +21 -2
- package/mobile/dist/components/Calculator/DepositCalculatorForm.js.map +1 -1
- package/mobile/dist/components/Calculator/EmbeddableCalcBlocks.d.ts +1 -3
- package/mobile/dist/components/Calculator/EmbeddableCalcBlocks.js +0 -2
- package/mobile/dist/components/Calculator/EmbeddableCalcBlocks.js.map +1 -1
- package/mobile/dist/components/Calculator/renderFootnote.d.ts +2 -0
- package/mobile/dist/components/Calculator/renderFootnote.js +6 -0
- package/mobile/dist/components/Calculator/renderFootnote.js.map +1 -0
- package/mobile/dist/components/CardTransfer/CardTransferContent.d.ts +3 -6
- package/mobile/dist/components/Catalog/CatalogCard.js.map +1 -1
- package/mobile/dist/components/Catalog/CatalogContent.d.ts +2 -5
- package/mobile/dist/components/ComparisonTable/ComparisonTableContent.d.ts +9 -43
- package/mobile/dist/components/ComparisonTable/TableColumn.d.ts +8 -1
- package/mobile/dist/components/ComparisonTable/TableColumn.js.map +1 -1
- package/mobile/dist/components/ComparisonTable/TableRow.d.ts +5 -1
- package/mobile/dist/components/ComparisonTable/TableRow.js.map +1 -1
- package/mobile/dist/components/ContentPage/computeAPIFallback.d.ts +5 -0
- package/mobile/dist/components/ContentPage/computeAPIFallback.js +68 -0
- package/mobile/dist/components/ContentPage/computeAPIFallback.js.map +1 -0
- package/mobile/dist/components/ErrorBlock/ErrorBlockContent.d.ts +17 -4
- package/mobile/dist/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +3 -4
- package/mobile/dist/components/ExchangeRateTile/renderInput.js +4 -3
- package/mobile/dist/components/ExchangeRateTile/renderInput.js.map +1 -1
- package/mobile/dist/components/Footer/Footer.js +3 -2
- package/mobile/dist/components/Footer/Footer.js.map +1 -1
- package/mobile/dist/components/Footer/FooterContent.d.ts +5 -9
- package/mobile/dist/components/Footer/HorizontalNavigation.d.ts +2 -2
- package/mobile/dist/components/Footer/HorizontalNavigation.js.map +1 -1
- package/mobile/dist/components/Footer/Sitemap.d.ts +2 -0
- package/mobile/dist/components/Footer/Sitemap.js +2 -2
- package/mobile/dist/components/Footer/Sitemap.js.map +1 -1
- package/mobile/dist/components/Gallery/GalleryContent.d.ts +16 -19
- package/mobile/dist/components/GracePeriod/GracePeriodContent.d.ts +10 -14
- package/mobile/dist/components/Header/Header.fallback.d.ts +2 -0
- package/mobile/dist/components/Header/Header.fallback.js +12 -0
- package/mobile/dist/components/Header/Header.fallback.js.map +1 -0
- package/mobile/dist/components/Header/Header.js +3 -2
- package/mobile/dist/components/Header/Header.js.map +1 -1
- package/mobile/dist/components/Header/HeaderContent.d.ts +14 -23
- package/mobile/dist/components/Headline/HeadlineContent.d.ts +4 -3
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockContent.d.ts +8 -13
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.d.ts +2 -2
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +2 -2
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
- package/mobile/dist/components/MiniGallery/MiniGalleryContent.d.ts +8 -3
- package/mobile/dist/components/MobileAppTile/MobileAppTileContent.d.ts +19 -5
- package/mobile/dist/components/OfficeServicesBlock/OfficeServicesBlock.js +1 -1
- package/mobile/dist/components/OfficeServicesBlock/OfficeServicesBlock.js.map +1 -1
- package/mobile/dist/components/OfficeServicesBlock/OfficeServicesBlockContent.d.ts +5 -20
- package/mobile/dist/components/OtherProducts/OtherProductsContent.d.ts +3 -4
- package/mobile/dist/components/PictureText/PictureText.js +1 -1
- package/mobile/dist/components/PictureText/PictureTextContent.d.ts +20 -4
- package/mobile/dist/components/ProductBlock/ProductBlockContent.d.ts +13 -10
- package/mobile/dist/components/ProductTile/ProductTile.js +13 -8
- package/mobile/dist/components/ProductTile/ProductTile.js.map +1 -1
- package/mobile/dist/components/ProductTile/ProductTileContent.d.ts +19 -9
- package/mobile/dist/components/Recommendation/RecommendationContent.d.ts +20 -2
- package/mobile/dist/components/SafeDepositRental/RegionsAndBranches.d.ts +2 -2
- package/mobile/dist/components/SafeDepositRental/SafeBoxCases.d.ts +1 -1
- package/mobile/dist/components/SafeDepositRental/SafeDepositRental.js +14 -2
- package/mobile/dist/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
- package/mobile/dist/components/SafeDepositRental/SafeDepositRentalContent.d.ts +6 -21
- package/mobile/dist/components/SafeDepositRental/SafeDepositRentalFields.d.ts +9 -0
- package/mobile/dist/components/SafeDepositRental/SafeDepositRentalFields.js +21 -0
- package/mobile/dist/components/SafeDepositRental/SafeDepositRentalFields.js.map +1 -0
- package/mobile/dist/components/SafeDepositRental/SafeDepositRentalForm.d.ts +2 -0
- package/mobile/dist/components/SafeDepositRental/SafeDepositRentalForm.js +33 -42
- package/mobile/dist/components/SafeDepositRental/SafeDepositRentalForm.js.map +1 -1
- package/mobile/dist/components/SafeDepositRental/SafeDepositRentalTotal.d.ts +1 -1
- package/mobile/dist/components/SafeDepositRental/SafeDepositRentalTotal.js.map +1 -1
- package/mobile/dist/components/SafeDepositRental/SafeDepositRentalTypes.d.ts +10 -0
- package/mobile/dist/components/SafeDepositRental/SafeDepositRentalTypes.js +2 -0
- package/mobile/dist/components/SafeDepositRental/SafeDepositRentalTypes.js.map +1 -0
- package/mobile/dist/components/SafeDepositRental/WrapperSelect.js +2 -2
- package/mobile/dist/components/SafeDepositRental/WrapperSelect.js.map +1 -1
- package/mobile/dist/components/SafeDepositRental/YandexMap.d.ts +5 -0
- package/mobile/dist/components/SafeDepositRental/YandexMap.js +24 -0
- package/mobile/dist/components/SafeDepositRental/YandexMap.js.map +1 -0
- package/mobile/dist/components/SafeDepositRental/renderClusterer.d.ts +1 -0
- package/mobile/dist/components/SafeDepositRental/renderClusterer.js +37 -0
- package/mobile/dist/components/SafeDepositRental/renderClusterer.js.map +1 -0
- package/mobile/dist/components/SafeDepositRental/useGetRegions.js +1 -1
- package/mobile/dist/components/SafeDepositRental/useGetRegions.js.map +1 -1
- package/mobile/dist/components/SafeDepositRental/utils.d.ts +3 -0
- package/mobile/dist/components/SafeDepositRental/utils.js +15 -0
- package/mobile/dist/components/SafeDepositRental/utils.js.map +1 -0
- package/mobile/dist/components/StepsBlock/StepsBlockContent.d.ts +6 -25
- package/mobile/dist/components/Tabs/TabsContent.d.ts +8 -5
- package/mobile/dist/components/TariffsTable/EmbeddableCellData.d.ts +0 -3
- package/mobile/dist/components/TariffsTable/EmbeddableCellData.js.map +1 -1
- package/mobile/dist/components/TariffsTable/TariffsTableContent.d.ts +19 -36
- package/mobile/dist/components/TariffsTable/TariffsTableRow.js +2 -1
- package/mobile/dist/components/TariffsTable/TariffsTableRow.js.map +1 -1
- package/mobile/dist/components/TextBlock/TextBlockContent.d.ts +3 -6
- package/mobile/dist/components/Tile/TileContent.d.ts +17 -2
- package/mobile/dist/hooks/useFetchSafeBoxes.d.ts +22 -0
- package/mobile/dist/hooks/useFetchSafeBoxes.js +17 -0
- package/mobile/dist/hooks/useFetchSafeBoxes.js.map +1 -0
- package/mobile/dist/hooks/useScript.d.ts +6 -0
- package/mobile/dist/hooks/useScript.js +75 -0
- package/mobile/dist/hooks/useScript.js.map +1 -0
- package/mobile/dist/icons/IconName.d.ts +19 -5
- package/mobile/dist/icons/IconName.js +17 -3
- package/mobile/dist/icons/IconName.js.map +1 -1
- package/mobile/dist/model/ButtonVersion.d.ts +1 -1
- package/mobile/dist/model/Footnote.d.ts +4 -0
- package/mobile/dist/model/Footnote.js +2 -0
- package/mobile/dist/model/Footnote.js.map +1 -0
- package/mobile/dist/model/HeadlineType.d.ts +4 -0
- package/mobile/dist/model/Picture.d.ts +4 -0
- package/mobile/dist/model/ProductColorVersion.d.ts +4 -0
- package/mobile/dist/model/ProductColorVersion.js +2 -0
- package/mobile/dist/model/ProductColorVersion.js.map +1 -0
- package/mobile/dist/react/setup-fixture.js +6 -0
- package/mobile/dist/react/setup-fixture.js.map +1 -1
- package/mobile/dist/services/sitemap/useSitemap.d.ts +2 -1
- package/mobile/dist/services/sitemap/useSitemap.js +2 -2
- package/mobile/dist/services/sitemap/useSitemap.js.map +1 -1
- package/mobile/dist/types/Fallback.d.ts +5 -0
- package/mobile/dist/types/Fallback.js +2 -0
- package/mobile/dist/types/Fallback.js.map +1 -0
- package/mobile/dist/types.d.ts +1 -0
- package/mobile/dist/ui-kit/BenefitItem/BenefitItem.js +2 -2
- package/mobile/dist/ui-kit/BenefitItem/BenefitItem.js.map +1 -1
- package/mobile/dist/ui-kit/BenefitItem/BenefitItemProps.d.ts +3 -8
- package/mobile/dist/ui-kit/Button/ButtonProps.d.ts +3 -5
- package/mobile/dist/ui-kit/Button/ButtonSection.js +2 -1
- package/mobile/dist/ui-kit/Button/ButtonSection.js.map +1 -1
- package/mobile/dist/ui-kit/Button/LikeButton.js +1 -1
- package/mobile/dist/ui-kit/Button/LikeButton.js.map +1 -1
- package/mobile/dist/ui-kit/Button/buttonClassNameConstants.js +4 -3
- package/mobile/dist/ui-kit/Button/buttonClassNameConstants.js.map +1 -1
- package/mobile/dist/ui-kit/Foldable/Foldable.js +1 -1
- package/mobile/dist/ui-kit/Foldable/Foldable.js.map +1 -1
- package/mobile/dist/ui-kit/Input/Input.js +1 -1
- package/mobile/dist/ui-kit/Input/Input.js.map +1 -1
- package/mobile/dist/ui-kit/InputRange/InputRange.js +8 -15
- package/mobile/dist/ui-kit/InputRange/InputRange.js.map +1 -1
- package/mobile/dist/ui-kit/Radio/Radio.js +1 -1
- package/mobile/dist/ui-kit/Radio/Radio.js.map +1 -1
- package/mobile/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.js +1 -1
- package/mobile/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.js.map +1 -1
- package/mobile/dist/ui-kit/SearchBar/SearchBarInner.js +2 -2
- package/mobile/dist/ui-kit/SearchBar/SearchBarInner.js.map +1 -1
- package/mobile/dist/ui-kit/SelectCustom/SelectCustom.d.ts +13 -0
- package/mobile/dist/ui-kit/SelectCustom/SelectCustom.js +30 -0
- package/mobile/dist/ui-kit/SelectCustom/SelectCustom.js.map +1 -0
- package/mobile/dist/wlc.json +5 -0
- package/mobile/lib/ProjectSettings.d.ts +4 -0
- package/mobile/lib/ProjectSettings.js +6 -0
- package/mobile/lib/ProjectSettings.js.map +1 -1
- package/mobile/lib/components/Accordion/AccordionContent.d.ts +4 -9
- package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/mobile/lib/components/BenefitsBlock/BenefitsBlockContent.d.ts +12 -19
- package/mobile/lib/components/BlockContent.d.ts +2 -3
- package/mobile/lib/components/Bonus/Bonus.js +1 -1
- package/mobile/lib/components/Bonus/Bonus.js.map +1 -1
- package/mobile/lib/components/Bonus/BonusContent.d.ts +6 -9
- package/mobile/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js +3 -5
- package/mobile/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
- package/mobile/lib/components/BonusBenefitsBlock/BonusBenefitsBlockContent.d.ts +5 -11
- package/mobile/lib/components/Calculator/BonusCalculatorForm.js +3 -2
- package/mobile/lib/components/Calculator/BonusCalculatorForm.js.map +1 -1
- package/mobile/lib/components/Calculator/Calculator.js +1 -1
- package/mobile/lib/components/Calculator/Calculator.js.map +1 -1
- package/mobile/lib/components/Calculator/CalculatorContent.d.ts +7 -40
- package/mobile/lib/components/Calculator/CalculatorValueBlock.js +1 -1
- package/mobile/lib/components/Calculator/CreditCalculatorForm.js +4 -3
- package/mobile/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/mobile/lib/components/Calculator/DepositCalculatorForm.js +21 -2
- package/mobile/lib/components/Calculator/DepositCalculatorForm.js.map +1 -1
- package/mobile/lib/components/Calculator/EmbeddableCalcBlocks.d.ts +1 -3
- package/mobile/lib/components/Calculator/EmbeddableCalcBlocks.js +0 -2
- package/mobile/lib/components/Calculator/EmbeddableCalcBlocks.js.map +1 -1
- package/mobile/lib/components/Calculator/renderFootnote.d.ts +2 -0
- package/mobile/lib/components/Calculator/renderFootnote.js +3 -0
- package/mobile/lib/components/Calculator/renderFootnote.js.map +1 -0
- package/mobile/lib/components/CardTransfer/CardTransferContent.d.ts +3 -6
- package/mobile/lib/components/Catalog/CatalogCard.js.map +1 -1
- package/mobile/lib/components/Catalog/CatalogContent.d.ts +2 -5
- package/mobile/lib/components/ComparisonTable/ComparisonTableContent.d.ts +9 -43
- package/mobile/lib/components/ComparisonTable/TableColumn.d.ts +8 -1
- package/mobile/lib/components/ComparisonTable/TableColumn.js.map +1 -1
- package/mobile/lib/components/ComparisonTable/TableRow.d.ts +5 -1
- package/mobile/lib/components/ComparisonTable/TableRow.js.map +1 -1
- package/mobile/lib/components/ContentPage/computeAPIFallback.d.ts +5 -0
- package/mobile/lib/components/ContentPage/computeAPIFallback.js +40 -0
- package/mobile/lib/components/ContentPage/computeAPIFallback.js.map +1 -0
- package/mobile/lib/components/ErrorBlock/ErrorBlockContent.d.ts +17 -4
- package/mobile/lib/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +3 -4
- package/mobile/lib/components/ExchangeRateTile/renderInput.js +4 -3
- package/mobile/lib/components/ExchangeRateTile/renderInput.js.map +1 -1
- package/mobile/lib/components/Footer/Footer.js +3 -2
- package/mobile/lib/components/Footer/Footer.js.map +1 -1
- package/mobile/lib/components/Footer/FooterContent.d.ts +5 -9
- package/mobile/lib/components/Footer/HorizontalNavigation.d.ts +2 -2
- package/mobile/lib/components/Footer/HorizontalNavigation.js.map +1 -1
- package/mobile/lib/components/Footer/Sitemap.d.ts +2 -0
- package/mobile/lib/components/Footer/Sitemap.js +2 -2
- package/mobile/lib/components/Footer/Sitemap.js.map +1 -1
- package/mobile/lib/components/Gallery/GalleryContent.d.ts +16 -19
- package/mobile/lib/components/GracePeriod/GracePeriodContent.d.ts +10 -14
- package/mobile/lib/components/Header/Header.fallback.d.ts +2 -0
- package/mobile/lib/components/Header/Header.fallback.js +9 -0
- package/mobile/lib/components/Header/Header.fallback.js.map +1 -0
- package/mobile/lib/components/Header/Header.js +3 -2
- package/mobile/lib/components/Header/Header.js.map +1 -1
- package/mobile/lib/components/Header/HeaderContent.d.ts +14 -23
- package/mobile/lib/components/Headline/HeadlineContent.d.ts +4 -3
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockContent.d.ts +8 -13
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.d.ts +2 -2
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +2 -2
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
- package/mobile/lib/components/MiniGallery/MiniGalleryContent.d.ts +8 -3
- package/mobile/lib/components/MobileAppTile/MobileAppTileContent.d.ts +19 -5
- package/mobile/lib/components/OfficeServicesBlock/OfficeServicesBlock.js +1 -1
- package/mobile/lib/components/OfficeServicesBlock/OfficeServicesBlock.js.map +1 -1
- package/mobile/lib/components/OfficeServicesBlock/OfficeServicesBlockContent.d.ts +5 -20
- package/mobile/lib/components/OtherProducts/OtherProductsContent.d.ts +3 -4
- package/mobile/lib/components/PictureText/PictureText.js +1 -1
- package/mobile/lib/components/PictureText/PictureTextContent.d.ts +20 -4
- package/mobile/lib/components/ProductBlock/ProductBlockContent.d.ts +13 -10
- package/mobile/lib/components/ProductTile/ProductTile.js +13 -8
- package/mobile/lib/components/ProductTile/ProductTile.js.map +1 -1
- package/mobile/lib/components/ProductTile/ProductTileContent.d.ts +19 -9
- package/mobile/lib/components/Recommendation/RecommendationContent.d.ts +20 -2
- package/mobile/lib/components/SafeDepositRental/RegionsAndBranches.d.ts +2 -2
- package/mobile/lib/components/SafeDepositRental/SafeBoxCases.d.ts +1 -1
- package/mobile/lib/components/SafeDepositRental/SafeDepositRental.js +14 -2
- package/mobile/lib/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
- package/mobile/lib/components/SafeDepositRental/SafeDepositRentalContent.d.ts +6 -21
- package/mobile/lib/components/SafeDepositRental/SafeDepositRentalFields.d.ts +9 -0
- package/mobile/lib/components/SafeDepositRental/SafeDepositRentalFields.js +19 -0
- package/mobile/lib/components/SafeDepositRental/SafeDepositRentalFields.js.map +1 -0
- package/mobile/lib/components/SafeDepositRental/SafeDepositRentalForm.d.ts +2 -0
- package/mobile/lib/components/SafeDepositRental/SafeDepositRentalForm.js +33 -42
- package/mobile/lib/components/SafeDepositRental/SafeDepositRentalForm.js.map +1 -1
- package/mobile/lib/components/SafeDepositRental/SafeDepositRentalTotal.d.ts +1 -1
- package/mobile/lib/components/SafeDepositRental/SafeDepositRentalTotal.js.map +1 -1
- package/mobile/lib/components/SafeDepositRental/SafeDepositRentalTypes.d.ts +10 -0
- package/mobile/lib/components/SafeDepositRental/SafeDepositRentalTypes.js +2 -0
- package/mobile/lib/components/SafeDepositRental/SafeDepositRentalTypes.js.map +1 -0
- package/mobile/lib/components/SafeDepositRental/WrapperSelect.js +2 -2
- package/mobile/lib/components/SafeDepositRental/WrapperSelect.js.map +1 -1
- package/mobile/lib/components/SafeDepositRental/YandexMap.d.ts +5 -0
- package/mobile/lib/components/SafeDepositRental/YandexMap.js +22 -0
- package/mobile/lib/components/SafeDepositRental/YandexMap.js.map +1 -0
- package/mobile/lib/components/SafeDepositRental/renderClusterer.d.ts +1 -0
- package/mobile/lib/components/SafeDepositRental/renderClusterer.js +34 -0
- package/mobile/lib/components/SafeDepositRental/renderClusterer.js.map +1 -0
- package/mobile/lib/components/SafeDepositRental/useGetRegions.js +1 -1
- package/mobile/lib/components/SafeDepositRental/useGetRegions.js.map +1 -1
- package/mobile/lib/components/SafeDepositRental/utils.d.ts +3 -0
- package/mobile/lib/components/SafeDepositRental/utils.js +11 -0
- package/mobile/lib/components/SafeDepositRental/utils.js.map +1 -0
- package/mobile/lib/components/StepsBlock/StepsBlockContent.d.ts +6 -25
- package/mobile/lib/components/Tabs/TabsContent.d.ts +8 -5
- package/mobile/lib/components/TariffsTable/EmbeddableCellData.d.ts +0 -3
- package/mobile/lib/components/TariffsTable/EmbeddableCellData.js.map +1 -1
- package/mobile/lib/components/TariffsTable/TariffsTableContent.d.ts +19 -36
- package/mobile/lib/components/TariffsTable/TariffsTableRow.js +2 -1
- package/mobile/lib/components/TariffsTable/TariffsTableRow.js.map +1 -1
- package/mobile/lib/components/TextBlock/TextBlockContent.d.ts +3 -6
- package/mobile/lib/components/Tile/TileContent.d.ts +17 -2
- package/mobile/lib/hooks/useFetchSafeBoxes.d.ts +22 -0
- package/mobile/lib/hooks/useFetchSafeBoxes.js +14 -0
- package/mobile/lib/hooks/useFetchSafeBoxes.js.map +1 -0
- package/mobile/lib/hooks/useScript.d.ts +6 -0
- package/mobile/lib/hooks/useScript.js +72 -0
- package/mobile/lib/hooks/useScript.js.map +1 -0
- package/mobile/lib/icons/IconName.d.ts +19 -5
- package/mobile/lib/icons/IconName.js +17 -3
- package/mobile/lib/icons/IconName.js.map +1 -1
- package/mobile/lib/model/ButtonVersion.d.ts +1 -1
- package/mobile/lib/model/Footnote.d.ts +4 -0
- package/mobile/lib/model/Footnote.js +2 -0
- package/mobile/lib/model/Footnote.js.map +1 -0
- package/mobile/lib/model/HeadlineType.d.ts +4 -0
- package/mobile/lib/model/Picture.d.ts +4 -0
- package/mobile/lib/model/ProductColorVersion.d.ts +4 -0
- package/mobile/lib/model/ProductColorVersion.js +2 -0
- package/mobile/lib/model/ProductColorVersion.js.map +1 -0
- package/mobile/lib/react/setup-fixture.js +3 -0
- package/mobile/lib/react/setup-fixture.js.map +1 -1
- package/mobile/lib/services/sitemap/useSitemap.d.ts +2 -1
- package/mobile/lib/services/sitemap/useSitemap.js +2 -2
- package/mobile/lib/services/sitemap/useSitemap.js.map +1 -1
- package/mobile/lib/types/Fallback.d.ts +5 -0
- package/mobile/lib/types/Fallback.js +2 -0
- package/mobile/lib/types/Fallback.js.map +1 -0
- package/mobile/lib/types.d.ts +1 -0
- package/mobile/lib/ui-kit/BenefitItem/BenefitItem.js +2 -2
- package/mobile/lib/ui-kit/BenefitItem/BenefitItem.js.map +1 -1
- package/mobile/lib/ui-kit/BenefitItem/BenefitItemProps.d.ts +3 -8
- package/mobile/lib/ui-kit/Button/ButtonProps.d.ts +3 -5
- package/mobile/lib/ui-kit/Button/ButtonSection.js +2 -1
- package/mobile/lib/ui-kit/Button/ButtonSection.js.map +1 -1
- package/mobile/lib/ui-kit/Button/LikeButton.js +1 -1
- package/mobile/lib/ui-kit/Button/LikeButton.js.map +1 -1
- package/mobile/lib/ui-kit/Button/buttonClassNameConstants.js +4 -3
- package/mobile/lib/ui-kit/Button/buttonClassNameConstants.js.map +1 -1
- package/mobile/lib/ui-kit/Foldable/Foldable.js +1 -1
- package/mobile/lib/ui-kit/Foldable/Foldable.js.map +1 -1
- package/mobile/lib/ui-kit/Input/Input.js +1 -1
- package/mobile/lib/ui-kit/Input/Input.js.map +1 -1
- package/mobile/lib/ui-kit/InputRange/InputRange.js +8 -15
- package/mobile/lib/ui-kit/InputRange/InputRange.js.map +1 -1
- package/mobile/lib/ui-kit/Radio/Radio.js +1 -1
- package/mobile/lib/ui-kit/Radio/Radio.js.map +1 -1
- package/mobile/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.js +1 -1
- package/mobile/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.js.map +1 -1
- package/mobile/lib/ui-kit/SearchBar/SearchBarInner.js +2 -2
- package/mobile/lib/ui-kit/SearchBar/SearchBarInner.js.map +1 -1
- package/mobile/lib/ui-kit/SelectCustom/SelectCustom.d.ts +13 -0
- package/mobile/lib/ui-kit/SelectCustom/SelectCustom.js +28 -0
- package/mobile/lib/ui-kit/SelectCustom/SelectCustom.js.map +1 -0
- package/mobile/lib/wlc.json +5 -0
- package/mobile/src/ProjectSettings.ts +8 -0
- package/mobile/src/components/Accordion/AccordionContent.ts +5 -9
- package/mobile/src/components/BenefitsBlock/BenefitsBlock.tsx +8 -14
- package/mobile/src/components/BenefitsBlock/BenefitsBlockContent.ts +15 -22
- package/mobile/src/components/BlockContent.ts +1 -3
- package/mobile/src/components/Bonus/Bonus.tsx +1 -1
- package/mobile/src/components/Bonus/BonusContent.ts +6 -8
- package/mobile/src/components/BonusBenefitsBlock/BonusBenefitsBlock.tsx +25 -27
- package/mobile/src/components/BonusBenefitsBlock/BonusBenefitsBlockContent.ts +5 -11
- package/mobile/src/components/Calculator/BonusCalculatorForm.tsx +4 -2
- package/mobile/src/components/Calculator/Calculator.tsx +1 -1
- package/mobile/src/components/Calculator/CalculatorContent.ts +6 -44
- package/mobile/src/components/Calculator/CalculatorValueBlock.tsx +1 -1
- package/mobile/src/components/Calculator/CreditCalculatorForm.tsx +4 -2
- package/mobile/src/components/Calculator/DepositCalculatorForm.tsx +25 -2
- package/mobile/src/components/Calculator/EmbeddableCalcBlocks.tsx +0 -3
- package/mobile/src/components/Calculator/renderFootnote.tsx +2 -0
- package/mobile/src/components/CardTransfer/CardTransferContent.ts +9 -10
- package/mobile/src/components/Catalog/CatalogCard.tsx +4 -3
- package/mobile/src/components/Catalog/CatalogContent.ts +2 -6
- package/mobile/src/components/ComparisonTable/ComparisonTableContent.ts +9 -47
- package/mobile/src/components/ComparisonTable/TableColumn.tsx +10 -1
- package/mobile/src/components/ComparisonTable/TableRow.tsx +5 -1
- package/mobile/src/components/ContentPage/computeAPIFallback.spec.ts +63 -0
- package/mobile/src/components/ContentPage/computeAPIFallback.ts +55 -0
- package/mobile/src/components/ErrorBlock/ErrorBlockContent.ts +17 -4
- package/mobile/src/components/ExchangeRateTile/ExchangeRateTileContent.ts +3 -4
- package/mobile/src/components/ExchangeRateTile/renderInput.tsx +13 -16
- package/mobile/src/components/Footer/Footer.tsx +4 -1
- package/mobile/src/components/Footer/FooterContent.ts +5 -9
- package/mobile/src/components/Footer/HorizontalNavigation.tsx +3 -4
- package/mobile/src/components/Footer/Sitemap.tsx +4 -2
- package/mobile/src/components/Gallery/GalleryContent.ts +16 -19
- package/mobile/src/components/GracePeriod/GracePeriodContent.ts +10 -13
- package/mobile/src/components/Header/Header.fallback.ts +14 -0
- package/mobile/src/components/Header/Header.tsx +4 -2
- package/mobile/src/components/Header/HeaderContent.ts +15 -23
- package/mobile/src/components/Headline/HeadlineContent.ts +9 -9
- package/mobile/src/components/InsuranceAmountBlock/InsuranceAmountBlockContent.ts +8 -13
- package/mobile/src/components/InsuranceAmountBlock/InsuranceAmountBlockInner.tsx +4 -4
- package/mobile/src/components/MiniGallery/MiniGalleryContent.ts +8 -3
- package/mobile/src/components/MobileAppTile/MobileAppTileContent.ts +19 -6
- package/mobile/src/components/OfficeServicesBlock/OfficeServicesBlock.tsx +3 -3
- package/mobile/src/components/OfficeServicesBlock/OfficeServicesBlockContent.ts +5 -20
- package/mobile/src/components/OtherProducts/OtherProductsContent.ts +3 -4
- package/mobile/src/components/PictureText/PictureText.tsx +1 -1
- package/mobile/src/components/PictureText/PictureTextContent.ts +20 -5
- package/mobile/src/components/ProductBlock/ProductBlockContent.ts +13 -10
- package/mobile/src/components/ProductTile/ProductTile.tsx +21 -12
- package/mobile/src/components/ProductTile/ProductTileContent.ts +19 -10
- package/mobile/src/components/Recommendation/RecommendationContent.ts +20 -2
- package/mobile/src/components/SafeDepositRental/RegionsAndBranches.tsx +2 -2
- package/mobile/src/components/SafeDepositRental/SafeBoxCases.tsx +1 -1
- package/mobile/src/components/SafeDepositRental/SafeDepositRental.tsx +33 -9
- package/mobile/src/components/SafeDepositRental/SafeDepositRentalContent.ts +7 -24
- package/mobile/src/components/SafeDepositRental/SafeDepositRentalFields.tsx +77 -0
- package/mobile/src/components/SafeDepositRental/SafeDepositRentalForm.tsx +57 -74
- package/mobile/src/components/SafeDepositRental/SafeDepositRentalTotal.tsx +1 -1
- package/mobile/src/components/SafeDepositRental/SafeDepositRentalTypes.ts +12 -0
- package/mobile/src/components/SafeDepositRental/WrapperSelect.tsx +2 -10
- package/mobile/src/components/SafeDepositRental/YandexMap.tsx +36 -0
- package/mobile/src/components/SafeDepositRental/renderClusterer.ts +45 -0
- package/mobile/src/components/SafeDepositRental/useGetRegions.ts +1 -1
- package/mobile/src/components/SafeDepositRental/utils.ts +17 -0
- package/mobile/src/components/StepsBlock/StepsBlockContent.ts +10 -27
- package/mobile/src/components/Tabs/TabsContent.ts +8 -5
- package/mobile/src/components/TariffsTable/EmbeddableCellData.tsx +0 -4
- package/mobile/src/components/TariffsTable/TariffsTableContent.ts +19 -36
- package/mobile/src/components/TariffsTable/TariffsTableRow.tsx +4 -1
- package/mobile/src/components/TextBlock/TextBlockContent.ts +3 -6
- package/mobile/src/components/Tile/TileContent.ts +17 -3
- package/mobile/src/components/__snapshots__/Blocks.spec.tsx.snap +238 -252
- package/mobile/src/hooks/useFetchSafeBoxes.ts +44 -0
- package/mobile/src/hooks/useScript.ts +97 -0
- package/mobile/src/icons/ArrowDownIcon.svg +1 -1
- package/mobile/src/icons/ArrowUpIcon.svg +1 -1
- package/mobile/src/icons/BuildingIcon.svg +10 -0
- package/mobile/src/icons/Car2Icon.svg +10 -0
- package/mobile/src/icons/DocDownloadIcon.svg +1 -1
- package/mobile/src/icons/DoneIcon.svg +3 -3
- package/mobile/src/icons/DoneSimpleIcon.svg +3 -0
- package/mobile/src/icons/GpsIcon.svg +1 -1
- package/mobile/src/icons/IconName.ts +4 -4
- package/mobile/src/icons/MapMarkerClusterIcon.svg +1 -0
- package/mobile/src/icons/MapMarkerSingleIcon.svg +1 -0
- package/mobile/src/icons/MoneyIcon.svg +5 -1
- package/mobile/src/icons/MoneysIcon.svg +7 -0
- package/mobile/src/icons/Profile2UserIcon.svg +6 -1
- package/mobile/src/icons/StrongBoxIcon.svg +5 -0
- package/mobile/src/icons/UserSquareIcon.svg +5 -0
- package/mobile/src/icons/UserTickIcon.svg +5 -1
- package/mobile/src/model/ButtonVersion.ts +1 -1
- package/mobile/src/model/Footnote.ts +4 -0
- package/mobile/src/model/HeadlineType.ts +5 -0
- package/mobile/src/model/Picture.ts +5 -0
- package/mobile/src/model/ProductColorVersion.ts +4 -0
- package/mobile/src/react/setup-fixture.ts +4 -0
- package/mobile/src/services/sitemap/useSitemap.ts +3 -1
- package/mobile/src/types/Fallback.ts +4 -0
- package/mobile/src/types.ts +1 -0
- package/mobile/src/ui-kit/BenefitItem/BenefitItem.tsx +2 -2
- package/mobile/src/ui-kit/BenefitItem/BenefitItemProps.ts +3 -8
- package/mobile/src/ui-kit/Button/ButtonProps.ts +12 -13
- package/mobile/src/ui-kit/Button/ButtonSection.tsx +19 -2
- package/mobile/src/ui-kit/Button/LikeButton.tsx +1 -1
- package/mobile/src/ui-kit/Button/buttonClassNameConstants.ts +5 -3
- package/mobile/src/ui-kit/Foldable/Foldable.tsx +1 -1
- package/mobile/src/ui-kit/Input/Input.tsx +1 -1
- package/mobile/src/ui-kit/InputRange/InputRange.tsx +24 -25
- package/mobile/src/ui-kit/Radio/Radio.tsx +2 -1
- package/mobile/src/ui-kit/RadioButtonGroup/RadioButtonGroup.tsx +1 -1
- package/mobile/src/ui-kit/SearchBar/SearchBarInner.tsx +2 -2
- package/mobile/src/ui-kit/SelectCustom/SelectCustom.tsx +84 -0
- package/mobile/src/wlc.json +5 -0
- package/package.json +3 -3
- package/src/ProjectSettings.ts +8 -0
- package/src/components/Accordion/AccordionContent.ts +5 -9
- package/src/components/BenefitsBlock/BenefitsBlock.tsx +8 -14
- package/src/components/BenefitsBlock/BenefitsBlockContent.ts +15 -22
- package/src/components/BlockContent.ts +1 -3
- package/src/components/Blocks.ts +1 -3
- package/src/components/Bonus/Bonus.tsx +1 -1
- package/src/components/Bonus/BonusContent.ts +6 -8
- package/src/components/BonusBenefitsBlock/BonusBenefitsBlock.tsx +25 -27
- package/src/components/BonusBenefitsBlock/BonusBenefitsBlockContent.ts +5 -11
- package/src/components/Calculator/BonusCalculatorForm.tsx +4 -2
- package/src/components/Calculator/Calculator.fixture.tsx +5 -21
- package/src/components/Calculator/Calculator.tsx +1 -1
- package/src/components/Calculator/CalculatorContent.ts +6 -44
- package/src/components/Calculator/CalculatorValueBlock.tsx +1 -1
- package/src/components/Calculator/CreditCalculatorForm.tsx +4 -2
- package/src/components/Calculator/DepositCalculatorForm.tsx +25 -2
- package/src/components/Calculator/EmbeddableCalcBlocks.tsx +0 -3
- package/src/components/Calculator/renderFootnote.tsx +2 -0
- package/src/components/CardTransfer/CardTransferContent.ts +9 -10
- package/src/components/Catalog/Catalog.fixture.tsx +2 -2
- package/src/components/Catalog/CatalogCard.tsx +4 -3
- package/src/components/Catalog/CatalogContent.ts +2 -6
- package/src/components/ComparisonTable/ComparisonTableContent.ts +9 -47
- package/src/components/ComparisonTable/TableColumn.tsx +10 -1
- package/src/components/ComparisonTable/TableRow.tsx +5 -1
- package/src/components/ContentPage/computeAPIFallback.spec.ts +63 -0
- package/src/components/ContentPage/computeAPIFallback.ts +55 -0
- package/src/components/ErrorBlock/ErrorBlockContent.ts +17 -4
- package/src/components/ExchangeRateTile/ExchangeRateTileContent.ts +3 -4
- package/src/components/ExchangeRateTile/renderInput.tsx +13 -16
- package/src/components/Footer/Footer.mobile.tsx +4 -1
- package/src/components/Footer/Footer.tsx +5 -1
- package/src/components/Footer/FooterContent.ts +5 -9
- package/src/components/Footer/HorizontalNavigation.mobile.tsx +3 -4
- package/src/components/Footer/HorizontalNavigation.tsx +3 -4
- package/src/components/Footer/Sitemap.tsx +4 -2
- package/src/components/Gallery/GalleryContent.ts +16 -19
- package/src/components/GracePeriod/GracePeriodContent.ts +10 -13
- package/src/components/Header/Header.fallback.ts +14 -0
- package/src/components/Header/Header.mobile.tsx +4 -2
- package/src/components/Header/Header.tsx +7 -2
- package/src/components/Header/HeaderContent.ts +15 -23
- package/src/components/Headline/HeadlineContent.ts +9 -9
- package/src/components/InsuranceAmountBlock/InsuranceAmountBlockContent.ts +8 -13
- package/src/components/InsuranceAmountBlock/InsuranceAmountBlockInner.tsx +4 -4
- package/src/components/MiniGallery/MiniGalleryContent.ts +8 -3
- package/src/components/MobileAppTile/MobileAppTileContent.ts +19 -6
- package/src/components/OfficeServicesBlock/OfficeServicesBlock.tsx +3 -3
- package/src/components/OfficeServicesBlock/OfficeServicesBlockContent.ts +5 -20
- package/src/components/OtherProducts/OtherProductsContent.ts +3 -4
- package/src/components/PictureText/PictureText.tsx +1 -1
- package/src/components/PictureText/PictureTextContent.ts +20 -5
- package/src/components/ProductBlock/ProductBlock.fixture.tsx +1 -21
- package/src/components/ProductBlock/ProductBlockContent.ts +13 -10
- package/src/components/ProductTile/ProductTile.fixture.tsx +12 -0
- package/src/components/ProductTile/ProductTile.tsx +21 -12
- package/src/components/ProductTile/ProductTileContent.ts +19 -10
- package/src/components/Recommendation/RecommendationContent.ts +20 -2
- package/src/components/SafeDepositRental/RegionsAndBranches.tsx +2 -2
- package/src/components/SafeDepositRental/SafeBoxCases.tsx +1 -1
- package/src/components/SafeDepositRental/SafeDepositRental.fixture.tsx +6 -1
- package/src/components/SafeDepositRental/SafeDepositRental.tsx +33 -9
- package/src/components/SafeDepositRental/SafeDepositRentalContent.ts +7 -24
- package/src/components/SafeDepositRental/SafeDepositRentalFields.tsx +77 -0
- package/src/components/SafeDepositRental/SafeDepositRentalForm.tsx +57 -74
- package/src/components/SafeDepositRental/SafeDepositRentalTotal.tsx +1 -1
- package/src/components/SafeDepositRental/SafeDepositRentalTypes.ts +12 -0
- package/src/components/SafeDepositRental/WrapperSelect.tsx +2 -10
- package/src/components/SafeDepositRental/YandexMap.tsx +36 -0
- package/src/components/SafeDepositRental/renderClusterer.ts +45 -0
- package/src/components/SafeDepositRental/useGetRegions.ts +1 -1
- package/src/components/SafeDepositRental/utils.ts +17 -0
- package/src/components/StepsBlock/StepsBlockContent.ts +10 -27
- package/src/components/Tabs/TabsContent.ts +8 -5
- package/src/components/TariffsTable/EmbeddableCellData.mobile.tsx +0 -4
- package/src/components/TariffsTable/TariffsTableContent.ts +19 -36
- package/src/components/TariffsTable/TariffsTableRow.tsx +4 -1
- package/src/components/TextBlock/TextBlockContent.ts +3 -6
- package/src/components/Tile/TileContent.ts +17 -3
- package/src/components/__snapshots__/Blocks.spec.tsx.snap +238 -252
- package/src/hooks/useFetchSafeBoxes.ts +44 -0
- package/src/hooks/useScript.ts +97 -0
- package/src/icons/ArrowDownIcon.svg +1 -1
- package/src/icons/ArrowUpIcon.svg +1 -1
- package/src/icons/BuildingIcon.svg +10 -0
- package/src/icons/Car2Icon.svg +10 -0
- package/src/icons/DocDownloadIcon.svg +1 -1
- package/src/icons/DoneIcon.svg +3 -3
- package/src/icons/DoneSimpleIcon.svg +3 -0
- package/src/icons/GpsIcon.svg +1 -1
- package/src/icons/IconName.ts +26 -5
- package/src/icons/MapMarkerClusterIcon.svg +1 -0
- package/src/icons/MapMarkerSingleIcon.svg +1 -0
- package/src/icons/MoneyIcon.svg +5 -1
- package/src/icons/MoneysIcon.svg +7 -0
- package/src/icons/Profile2UserIcon.svg +6 -1
- package/src/icons/StrongBoxIcon.svg +5 -0
- package/src/icons/UserSquareIcon.svg +5 -0
- package/src/icons/UserTickIcon.svg +5 -1
- package/src/model/ButtonVersion.ts +1 -1
- package/src/model/Footnote.ts +4 -0
- package/src/model/HeadlineType.ts +5 -0
- package/src/model/Picture.ts +5 -0
- package/src/model/ProductColorVersion.ts +4 -0
- package/src/react/setup-fixture.ts +4 -0
- package/src/services/sitemap/useSitemap.ts +3 -1
- package/src/types/Fallback.ts +4 -0
- package/src/types.ts +1 -0
- package/src/ui-kit/BenefitItem/BenefitItem.tsx +2 -2
- package/src/ui-kit/BenefitItem/BenefitItemProps.ts +3 -8
- package/src/ui-kit/Button/ButtonProps.ts +12 -13
- package/src/ui-kit/Button/ButtonSection.tsx +19 -2
- package/src/ui-kit/Button/LikeButton.tsx +1 -1
- package/src/ui-kit/Button/buttonClassNameConstants.ts +5 -3
- package/src/ui-kit/Foldable/Foldable.tsx +1 -1
- package/src/ui-kit/Input/Input.tsx +1 -1
- package/src/ui-kit/InputRange/InputRange.tsx +24 -25
- package/src/ui-kit/Radio/Radio.tsx +2 -1
- package/src/ui-kit/RadioButtonGroup/RadioButtonGroup.tsx +1 -1
- package/src/ui-kit/SearchBar/SearchBarInner.tsx +2 -2
- package/src/ui-kit/SelectCustom/SelectCustom.fixture.tsx +15 -0
- package/src/ui-kit/SelectCustom/SelectCustom.tsx +84 -0
- package/src/wlc.json +5 -0
- package/cosmos-static/icons/StateMortgageIcon.svg +0 -1
- package/dist/components/Calculator/MortgageCalculatorForm.d.ts +0 -5
- package/dist/components/Calculator/MortgageCalculatorForm.js +0 -34
- package/dist/components/Calculator/MortgageCalculatorForm.js.map +0 -1
- package/dist/components/Navigation/Navigation.d.ts +0 -5
- package/dist/components/Navigation/Navigation.js +0 -17
- package/dist/components/Navigation/Navigation.js.map +0 -1
- package/dist/components/Navigation/NavigationContent.d.ts +0 -10
- package/dist/components/Navigation/NavigationContent.js.map +0 -1
- package/dist/components/Navigation/NavigationItem.d.ts +0 -4
- package/dist/components/Navigation/NavigationItem.js +0 -6
- package/dist/components/Navigation/NavigationItem.js.map +0 -1
- package/dist/components/SafeDepositRental/fetchBranches.d.ts +0 -2
- package/dist/components/SafeDepositRental/fetchBranches.js +0 -20
- package/dist/components/SafeDepositRental/fetchBranches.js.map +0 -1
- package/lib/components/Calculator/MortgageCalculatorForm.d.ts +0 -5
- package/lib/components/Calculator/MortgageCalculatorForm.js +0 -32
- package/lib/components/Calculator/MortgageCalculatorForm.js.map +0 -1
- package/lib/components/Navigation/Navigation.d.ts +0 -5
- package/lib/components/Navigation/Navigation.js +0 -15
- package/lib/components/Navigation/Navigation.js.map +0 -1
- package/lib/components/Navigation/NavigationContent.d.ts +0 -10
- package/lib/components/Navigation/NavigationContent.js +0 -2
- package/lib/components/Navigation/NavigationContent.js.map +0 -1
- package/lib/components/Navigation/NavigationItem.d.ts +0 -4
- package/lib/components/Navigation/NavigationItem.js +0 -4
- package/lib/components/Navigation/NavigationItem.js.map +0 -1
- package/lib/components/SafeDepositRental/fetchBranches.d.ts +0 -2
- package/lib/components/SafeDepositRental/fetchBranches.js +0 -17
- package/lib/components/SafeDepositRental/fetchBranches.js.map +0 -1
- package/mobile/dist/components/Calculator/MortgageCalculatorForm.d.ts +0 -5
- package/mobile/dist/components/Calculator/MortgageCalculatorForm.js +0 -34
- package/mobile/dist/components/Calculator/MortgageCalculatorForm.js.map +0 -1
- package/mobile/dist/components/Navigation/Navigation.d.ts +0 -5
- package/mobile/dist/components/Navigation/Navigation.js +0 -17
- package/mobile/dist/components/Navigation/Navigation.js.map +0 -1
- package/mobile/dist/components/Navigation/NavigationContent.d.ts +0 -10
- package/mobile/dist/components/Navigation/NavigationContent.js.map +0 -1
- package/mobile/dist/components/Navigation/NavigationItem.d.ts +0 -4
- package/mobile/dist/components/Navigation/NavigationItem.js +0 -6
- package/mobile/dist/components/Navigation/NavigationItem.js.map +0 -1
- package/mobile/dist/components/SafeDepositRental/fetchBranches.d.ts +0 -2
- package/mobile/dist/components/SafeDepositRental/fetchBranches.js +0 -20
- package/mobile/dist/components/SafeDepositRental/fetchBranches.js.map +0 -1
- package/mobile/lib/components/Calculator/MortgageCalculatorForm.d.ts +0 -5
- package/mobile/lib/components/Calculator/MortgageCalculatorForm.js +0 -32
- package/mobile/lib/components/Calculator/MortgageCalculatorForm.js.map +0 -1
- package/mobile/lib/components/Navigation/Navigation.d.ts +0 -5
- package/mobile/lib/components/Navigation/Navigation.js +0 -15
- package/mobile/lib/components/Navigation/Navigation.js.map +0 -1
- package/mobile/lib/components/Navigation/NavigationContent.d.ts +0 -10
- package/mobile/lib/components/Navigation/NavigationContent.js +0 -2
- package/mobile/lib/components/Navigation/NavigationContent.js.map +0 -1
- package/mobile/lib/components/Navigation/NavigationItem.d.ts +0 -4
- package/mobile/lib/components/Navigation/NavigationItem.js +0 -4
- package/mobile/lib/components/Navigation/NavigationItem.js.map +0 -1
- package/mobile/lib/components/SafeDepositRental/fetchBranches.d.ts +0 -2
- package/mobile/lib/components/SafeDepositRental/fetchBranches.js +0 -17
- package/mobile/lib/components/SafeDepositRental/fetchBranches.js.map +0 -1
- package/mobile/src/components/Calculator/MortgageCalculatorForm.tsx +0 -75
- package/mobile/src/components/Navigation/Navigation.tsx +0 -44
- package/mobile/src/components/Navigation/NavigationContent.ts +0 -11
- package/mobile/src/components/Navigation/NavigationItem.tsx +0 -17
- package/mobile/src/components/SafeDepositRental/fetchBranches.ts +0 -21
- package/mobile/src/icons/StateMortgageIcon.svg +0 -1
- package/src/components/Calculator/MortgageCalculatorForm.tsx +0 -75
- package/src/components/Navigation/Navigation.fixture.tsx +0 -30
- package/src/components/Navigation/Navigation.tsx +0 -44
- package/src/components/Navigation/NavigationContent.ts +0 -11
- package/src/components/Navigation/NavigationItem.tsx +0 -17
- package/src/components/SafeDepositRental/fetchBranches.ts +0 -21
- package/src/icons/StateMortgageIcon.svg +0 -1
package/bundle/bundle.umd.js
CHANGED
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
const useEffect = lazyHook('useEffect');
|
|
14
14
|
const useCallback = lazyHook('useCallback');
|
|
15
15
|
const useMemo = lazyHook('useMemo');
|
|
16
|
+
const useRef = lazyHook('useRef');
|
|
16
17
|
|
|
17
18
|
const setup = (_jsx, _jsxs) => {
|
|
18
19
|
globalThis._uni = {
|
|
@@ -81,6 +82,12 @@
|
|
|
81
82
|
get CDN() {
|
|
82
83
|
return this._.CDN;
|
|
83
84
|
}
|
|
85
|
+
get YANDEX_MAP_API_KEY() {
|
|
86
|
+
return this._.YANDEX_MAP_API_KEY;
|
|
87
|
+
}
|
|
88
|
+
get YANDEX_METRIKA_ID() {
|
|
89
|
+
return this._.YANDEX_METRIKA_ID;
|
|
90
|
+
}
|
|
84
91
|
})();
|
|
85
92
|
|
|
86
93
|
const AUTH_PREFIX = 'guest';
|
|
@@ -304,11 +311,13 @@
|
|
|
304
311
|
IconMap["ArrowUpIcon"] = "ArrowUpIcon";
|
|
305
312
|
IconMap["AtmIcon"] = "AtmIcon";
|
|
306
313
|
IconMap["BankIcon"] = "BankIcon";
|
|
314
|
+
IconMap["BuildingIcon"] = "BuildingIcon";
|
|
307
315
|
IconMap["BurgerIcon"] = "BurgerIcon";
|
|
308
316
|
IconMap["Calendar2Icon"] = "Calendar2Icon";
|
|
309
317
|
IconMap["CalendarCircleIcon"] = "CalendarCircleIcon";
|
|
310
318
|
IconMap["CalendarIcon"] = "CalendarIcon";
|
|
311
319
|
IconMap["CalendarTickIcon"] = "CalendarTickIcon";
|
|
320
|
+
IconMap["Car2Icon"] = "Car2Icon";
|
|
312
321
|
IconMap["CardIcon"] = "CardIcon";
|
|
313
322
|
IconMap["CardPosIcon"] = "CardPosIcon";
|
|
314
323
|
IconMap["CardTickIcon"] = "CardTickIcon";
|
|
@@ -328,6 +337,7 @@
|
|
|
328
337
|
IconMap["DocumentTextIcon"] = "DocumentTextIcon";
|
|
329
338
|
IconMap["DollarIcon"] = "DollarIcon";
|
|
330
339
|
IconMap["DoneIcon"] = "DoneIcon";
|
|
340
|
+
IconMap["DoneSimpleIcon"] = "DoneSimpleIcon";
|
|
331
341
|
IconMap["EarthIcon"] = "EarthIcon";
|
|
332
342
|
IconMap["EmptyWalletChangeIcon"] = "EmptyWalletChangeIcon";
|
|
333
343
|
IconMap["EmptyWalletIcon"] = "EmptyWalletIcon";
|
|
@@ -342,11 +352,14 @@
|
|
|
342
352
|
IconMap["JCBIcon"] = "JCBIcon";
|
|
343
353
|
IconMap["LogoIcon"] = "LogoIcon";
|
|
344
354
|
IconMap["LoupeIcon"] = "LoupeIcon";
|
|
355
|
+
IconMap["MapMarkerClusterIcon"] = "MapMarkerClusterIcon";
|
|
356
|
+
IconMap["MapMarkerSingleIcon"] = "MapMarkerSingleIcon";
|
|
345
357
|
IconMap["MasterCardIcon"] = "MasterCardIcon";
|
|
346
358
|
IconMap["MinusIcon"] = "MinusIcon";
|
|
347
359
|
IconMap["MirIcon"] = "MirIcon";
|
|
348
360
|
IconMap["MoneyIcon"] = "MoneyIcon";
|
|
349
361
|
IconMap["MoneyInsuranceIcon"] = "MoneyInsuranceIcon";
|
|
362
|
+
IconMap["MoneysIcon"] = "MoneysIcon";
|
|
350
363
|
IconMap["MonitorMobileIcon"] = "MonitorMobileIcon";
|
|
351
364
|
IconMap["NewDocIcon"] = "NewDocIcon";
|
|
352
365
|
IconMap["OfficeIcon"] = "OfficeIcon";
|
|
@@ -368,9 +381,10 @@
|
|
|
368
381
|
IconMap["SignDocsIcon"] = "SignDocsIcon";
|
|
369
382
|
IconMap["SmallClockIcon"] = "SmallClockIcon";
|
|
370
383
|
IconMap["SoundIcon"] = "SoundIcon";
|
|
371
|
-
IconMap["
|
|
384
|
+
IconMap["StrongBoxIcon"] = "StrongBoxIcon";
|
|
372
385
|
IconMap["TelegramIcon"] = "TelegramIcon";
|
|
373
386
|
IconMap["UnionPayIcon"] = "UnionPayIcon";
|
|
387
|
+
IconMap["UserSquareIcon"] = "UserSquareIcon";
|
|
374
388
|
IconMap["UserTickIcon"] = "UserTickIcon";
|
|
375
389
|
IconMap["VisaIcon"] = "VisaIcon";
|
|
376
390
|
IconMap["VKIcon"] = "VKIcon";
|
|
@@ -390,11 +404,13 @@
|
|
|
390
404
|
IconTitleMap["ArrowUpIcon"] = "\u0421\u0442\u0440\u0435\u043B\u043A\u0430 \u0432\u0432\u0435\u0440\u0445";
|
|
391
405
|
IconTitleMap["AtmIcon"] = "\u0411\u0430\u043D\u043A\u043E\u043C\u0430\u0442";
|
|
392
406
|
IconTitleMap["BankIcon"] = "\u0411\u0430\u043D\u043A";
|
|
407
|
+
IconTitleMap["BuildingIcon"] = "\u0417\u0434\u0430\u043D\u0438\u0435 \u0441 \u0434\u0435\u0440\u0435\u0432\u043E\u043C";
|
|
393
408
|
IconTitleMap["BurgerIcon"] = "\u0411\u0443\u0440\u0433\u0435\u0440";
|
|
394
409
|
IconTitleMap["Calendar2Icon"] = "\u041A\u0430\u043B\u0435\u043D\u0434\u0430\u0440\u044C 2";
|
|
395
410
|
IconTitleMap["CalendarCircleIcon"] = "\u0421\u043A\u0440\u0443\u0433\u043B\u0451\u043D\u043D\u044B\u0439 \u043A\u0430\u043B\u0435\u043D\u0434\u0430\u0440\u044C";
|
|
396
411
|
IconTitleMap["CalendarIcon"] = "\u041A\u0430\u043B\u0435\u043D\u0434\u0430\u0440\u044C";
|
|
397
412
|
IconTitleMap["CalendarTickIcon"] = "\u041A\u0430\u043B\u0435\u043D\u0434\u0430\u0440\u044C \u0441 \u0433\u0430\u043B\u043E\u0447\u043A\u043E\u0439";
|
|
413
|
+
IconTitleMap["Car2Icon"] = "\u041C\u0430\u0448\u0438\u043D\u04302";
|
|
398
414
|
IconTitleMap["CardIcon"] = "\u041A\u0440\u0435\u0434. \u043A\u0430\u0440\u0442\u0430";
|
|
399
415
|
IconTitleMap["CardPosIcon"] = "\u041A\u0440\u0435\u0434. \u043A\u0430\u0440\u0442\u0430 \u043F\u043E\u0434 \u043D\u0430\u043A\u043B\u043E\u043D\u043E\u043C";
|
|
400
416
|
IconTitleMap["CardTickIcon"] = "\u041A\u0440\u0435\u0434. \u043A\u0430\u0440\u0442\u0430 \u0441 \u0433\u0430\u043B\u043E\u0447\u043A\u043E\u0439";
|
|
@@ -413,7 +429,8 @@
|
|
|
413
429
|
IconTitleMap["DocsIcon"] = "\u0414\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u044B";
|
|
414
430
|
IconTitleMap["DocumentTextIcon"] = "\u0414\u043E\u043A\u0443\u043C\u0435\u043D\u0442 \u0441 \u0442\u0435\u043A\u0441\u0442\u043E\u043C";
|
|
415
431
|
IconTitleMap["DollarIcon"] = "\u0414\u043E\u043B\u043B\u0430\u0440";
|
|
416
|
-
IconTitleMap["DoneIcon"] = "\u0417\u0435\u043B\u0451\u043D\u0430\u044F '\u0433\u0430\u043B\u043E\u0447\u043A\u0430'";
|
|
432
|
+
IconTitleMap["DoneIcon"] = "\u0417\u0435\u043B\u0451\u043D\u0430\u044F '\u0433\u0430\u043B\u043E\u0447\u043A\u0430' \u0432 \u043A\u0440\u0443\u0433\u0435";
|
|
433
|
+
IconTitleMap["DoneSimpleIcon"] = "\u0417\u0435\u043B\u0451\u043D\u0430\u044F '\u0433\u0430\u043B\u043E\u0447\u043A\u0430'";
|
|
417
434
|
IconTitleMap["EarthIcon"] = "\u0417\u0435\u043C\u043B\u044F";
|
|
418
435
|
IconTitleMap["EmptyWalletChangeIcon"] = "\u041F\u0443\u0441\u0442\u043E\u0439 \u043A\u043E\u0448\u0435\u043B\u0451\u043A \u0441 \u0432\u043E\u0437\u0432\u0440\u0430\u0442\u043E\u043C";
|
|
419
436
|
IconTitleMap["EmptyWalletIcon"] = "\u041F\u0443\u0441\u0442\u043E\u0439 \u043A\u043E\u0448\u0435\u043B\u0451\u043A";
|
|
@@ -428,11 +445,14 @@
|
|
|
428
445
|
IconTitleMap["JCBIcon"] = "JCB";
|
|
429
446
|
IconTitleMap["LogoIcon"] = "Logo";
|
|
430
447
|
IconTitleMap["LoupeIcon"] = "\u041B\u0443\u043F\u0430";
|
|
448
|
+
IconTitleMap["MapMarkerClusterIcon"] = "\u041C\u0430\u0440\u043A\u0435\u0440 \u043A\u0430\u0440\u0442\u044B";
|
|
449
|
+
IconTitleMap["MapMarkerSingleIcon"] = "\u041C\u0430\u0440\u043A\u0435\u0440 \u043A\u0430\u0440\u0442\u044B \u0420\u0421\u0425\u0411";
|
|
431
450
|
IconTitleMap["MasterCardIcon"] = "MasterCard";
|
|
432
451
|
IconTitleMap["MinusIcon"] = "\u041C\u0438\u043D\u0443\u0441";
|
|
433
452
|
IconTitleMap["MirIcon"] = "\u041C\u0418\u0420";
|
|
434
453
|
IconTitleMap["MoneyIcon"] = "\u0414\u0435\u043D\u044C\u0433\u0438";
|
|
435
454
|
IconTitleMap["MoneyInsuranceIcon"] = "\u0414\u0435\u043D\u0435\u0436\u043D\u043E\u0435 \u0441\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u043D\u0438\u0435";
|
|
455
|
+
IconTitleMap["MoneysIcon"] = "MoneysIcon";
|
|
436
456
|
IconTitleMap["MonitorMobileIcon"] = "\u041C\u043E\u043D\u0438\u0442\u043E\u0440 \u0438 \u043C\u043E\u0431\u0438\u043B\u044C\u043D\u044B\u0439";
|
|
437
457
|
IconTitleMap["NewDocIcon"] = "\u041D\u043E\u0432\u044B\u0439 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442";
|
|
438
458
|
IconTitleMap["OfficeIcon"] = "\u041E\u0444\u0438\u0441";
|
|
@@ -454,9 +474,10 @@
|
|
|
454
474
|
IconTitleMap["SignDocsIcon"] = "\u041F\u043E\u0434\u043F\u0438\u0441\u0430\u043D\u043D\u044B\u0435 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u044B";
|
|
455
475
|
IconTitleMap["SmallClockIcon"] = "\u041C\u0430\u043B\u0435\u043D\u044C\u043A\u0438\u0435 \u0447\u0430\u0441\u044B";
|
|
456
476
|
IconTitleMap["SoundIcon"] = "\u0417\u0432\u0443\u043A";
|
|
457
|
-
IconTitleMap["
|
|
477
|
+
IconTitleMap["StrongBoxIcon"] = "\u042F\u0449\u0438\u043A \u0441 \u0437\u0430\u043C\u043E\u0447\u043D\u043E\u0439 \u0441\u043A\u0432\u0430\u0436\u0438\u043D\u043E\u0439";
|
|
458
478
|
IconTitleMap["TelegramIcon"] = "\u041B\u043E\u0433\u043E \u00ABTelegram\u00BB";
|
|
459
479
|
IconTitleMap["UnionPayIcon"] = "UnionPay";
|
|
480
|
+
IconTitleMap["UserSquareIcon"] = "\u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C \u0432 \u0440\u0430\u043C\u043A\u0435";
|
|
460
481
|
IconTitleMap["UserTickIcon"] = "\u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C";
|
|
461
482
|
IconTitleMap["VisaIcon"] = "Visa";
|
|
462
483
|
IconTitleMap["VKIcon"] = "\u041B\u043E\u0433\u043E \u00ABVK\u00BB";
|
|
@@ -650,7 +671,7 @@
|
|
|
650
671
|
const { className = '', icon, label, description, version = 'primary', benefitsVersion = 'normal', } = props;
|
|
651
672
|
const isIconWhite = benefitsVersion === 'white' || version === 'secondary';
|
|
652
673
|
const listItemAlign = description ? 'items-start' : 'items-center';
|
|
653
|
-
return (jsxs("div", { className: `flex gap-5 ${listItemAlign} ${className}`, children: [icon ? (jsx("div", { className: renderBenefitIconBgStyle(version, benefitsVersion), children: jsx(Img, { className: "w-
|
|
674
|
+
return (jsxs("div", { className: `flex gap-5 ${listItemAlign} ${className}`, children: [icon ? (jsx("div", { className: renderBenefitIconBgStyle(version, benefitsVersion), children: jsx(Img, { className: "w-6 h-6", image: { ...icon, iconVersion: isIconWhite ? 'white' : 'normal' }, asSVG: true }) })) : null, jsxs("div", { className: "gap-0.5", children: [label ? jsx("div", { className: `text-h6 ${titleStyleMap[version]}`, children: label }) : null, description ? (jsx("div", { className: `text-m-light ${descStyleMap[version]}`, children: description })) : null] })] }));
|
|
654
675
|
});
|
|
655
676
|
function renderBenefitIconBgStyle(version, benefitsVersion) {
|
|
656
677
|
let bgColorStyle = 'bg-primary-main text-black';
|
|
@@ -660,13 +681,13 @@
|
|
|
660
681
|
else if (benefitsVersion === 'normal') {
|
|
661
682
|
bgColorStyle = 'bg-secondary-light text-primary-main';
|
|
662
683
|
}
|
|
663
|
-
return `w-[50px] h-[50px] min-w-[50px] rounded-full p-
|
|
684
|
+
return `w-[50px] h-[50px] min-w-[50px] rounded-full p-2.5 box-border flex items-center justify-center ${bgColorStyle}`;
|
|
664
685
|
}
|
|
665
686
|
|
|
666
687
|
const addSpacesBetweenNumbers = (number) => new Intl.NumberFormat('ru-RU', { maximumSignificantDigits: 3 }).format(number);
|
|
667
688
|
|
|
668
689
|
const PictureText = JSX(({ className = '', context, title, description, image, benefits, version = 'primary', sum, monthLimit, directionRight = false, ...rest }) => {
|
|
669
|
-
return (jsxs(BlockWrapper, { className: `relative font-sans py-12 px-
|
|
690
|
+
return (jsxs(BlockWrapper, { className: `relative font-sans py-12 px-24 ${VersionStyleMap[version]} ${className}`, context: context, ...rest, children: [jsx(Headline, { context: context, className: "!p-0", title: title, description: description, headlineVersion: "M", bgColorHeadline: version, align: "center" }), jsxs("div", { className: 'flex justify-center gap-[122px] mt-[30px]', children: [image?.src ? jsx(Img, { className: directionRight ? 'order-2' : '', image: image }) : null, jsxs("div", { className: "w-[558px] m-auto", children: [benefits?.length ? (jsx("div", { className: "flex flex-col gap-4", children: benefits.map(renderBenefit$2(version)) })) : null, renderInsuranceSumMonth(sum, monthLimit)] })] })] }));
|
|
670
691
|
});
|
|
671
692
|
const renderBenefit$2 = (version) => (benefit, i) => (jsx(BenefitItem, { icon: benefit.icon, label: benefit.label, description: benefit.description, version: version }, String(i)));
|
|
672
693
|
function renderInsuranceSumMonth(sum, monthLimit) {
|
|
@@ -784,10 +805,11 @@
|
|
|
784
805
|
white: 'text-primary-main bg-white hover:text-white hover:bg-primary-hover active:bg-white',
|
|
785
806
|
link: '',
|
|
786
807
|
};
|
|
808
|
+
const DisabledStyle = 'bg-main-divider text-main-disabled';
|
|
787
809
|
const buttonDisabledStyleMap = {
|
|
788
|
-
primary:
|
|
789
|
-
secondary:
|
|
790
|
-
white:
|
|
810
|
+
primary: DisabledStyle,
|
|
811
|
+
secondary: DisabledStyle,
|
|
812
|
+
white: DisabledStyle,
|
|
791
813
|
link: '',
|
|
792
814
|
};
|
|
793
815
|
const buttonStyle = 'text-center font-sans select-none';
|
|
@@ -833,7 +855,8 @@
|
|
|
833
855
|
return null;
|
|
834
856
|
}
|
|
835
857
|
const imgStyle = version === 'primary' ? 'group-hover:text-black' : 'group-hover:text-white';
|
|
836
|
-
|
|
858
|
+
const iconVersion = version === 'secondary' ? 'normal' : 'white';
|
|
859
|
+
return icon ? (jsx(Button, { appendLeft: jsx(Img, { imageClassName: imgStyle, image: { ...icon, iconVersion: iconVersion }, width: "24", height: "24", asSVG: true }), appendRight: jsx(Img, { imageClassName: imgStyle, image: { ...iconRight, iconVersion: iconVersion }, width: "24", height: "24", asSVG: true }), version: version, ...button }, String(i))) : (jsx(Button, { version: version, ...button }, String(i)));
|
|
837
860
|
}
|
|
838
861
|
|
|
839
862
|
const LIST_STYLE_CLASSES = {
|
|
@@ -991,12 +1014,16 @@
|
|
|
991
1014
|
}
|
|
992
1015
|
|
|
993
1016
|
const ProductTile = JSX(({ context, className = '', title, headlineVersion = 'S', description, additionalDescription, benefits = [], buttons, image, version = 'primary', ...rest }) => {
|
|
994
|
-
return (jsxs(BlockWrapper, { context: context, className: `overflow-hidden font-sans p-9 box-border relative justify-between grid
|
|
1017
|
+
return (jsxs(BlockWrapper, { context: context, className: `overflow-hidden font-sans p-9 box-border relative justify-between grid min-h-[364px]
|
|
1018
|
+
${className} ${VersionStyleMap[version]} ${getTileRightPadding(className)}`, ...rest, children: [jsx(Headline, { context: context, className: `!p-0 !bg-transparent z-10 ${title || description ? 'mb-3.5' : ''}`, as: "h2", title: title, description: description, headlineVersion: headlineVersion, bgColorHeadline: version, align: "left" }), renderBenefits$1(benefits, version, image), additionalDescription
|
|
1019
|
+
? renderAdditionalDescription(additionalDescription, image, version)
|
|
1020
|
+
: null, buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttons, className: "flex self-end mt-5 gap-4 z-10 text-l" })) : null, image?.src ? jsx(Img, { className: "absolute right-0 bottom-0", image: image }) : null] }));
|
|
995
1021
|
});
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
return (jsx("div", { className: `z-10 grid grid-cols-[max-content_1fr] auto-rows-auto gap-x-6 gap-y-2.5 items-baseline
|
|
1022
|
+
function renderBenefits$1(benefits, version, image) {
|
|
1023
|
+
// picture width = 242px. Text can overlay picture 20px deep. Outer paddings_x = 36px. 242-36-20 = 186px
|
|
1024
|
+
const BENEFITS_WIDTH = image?.src ? 'max-w-[calc(100%-186px)]' : '100%';
|
|
1025
|
+
return (jsx("div", { className: `z-10 grid grid-cols-[max-content_1fr] auto-rows-auto gap-x-6 gap-y-2.5 items-baseline
|
|
1026
|
+
${BENEFITS_WIDTH}`, children: benefits.length ? benefits.map(renderBenefit(version)) : null }));
|
|
1000
1027
|
}
|
|
1001
1028
|
function renderBenefit(version = 'primary') {
|
|
1002
1029
|
const labelStyleMap = {
|
|
@@ -1011,12 +1038,14 @@
|
|
|
1011
1038
|
];
|
|
1012
1039
|
};
|
|
1013
1040
|
}
|
|
1014
|
-
function renderAdditionalDescription(additionalDescription, version = 'primary') {
|
|
1041
|
+
function renderAdditionalDescription(additionalDescription, image, version = 'primary') {
|
|
1015
1042
|
const descStyleMap = {
|
|
1016
1043
|
primary: 'text-secondary-text',
|
|
1017
1044
|
secondary: 'text-white',
|
|
1018
1045
|
};
|
|
1019
|
-
|
|
1046
|
+
// picture width = 242px. Text can overlay picture 20px deep. Outer paddings_x = 36px. 242-36-20 = 186px
|
|
1047
|
+
const DESCRIPTION_WIDTH = image?.src ? 'max-w-[calc(100%-186px)]' : '100%';
|
|
1048
|
+
return (jsx("div", { className: `text-m-light mt-2.5 z-10 ${DESCRIPTION_WIDTH} ${descStyleMap[version]}`, children: additionalDescription }));
|
|
1020
1049
|
}
|
|
1021
1050
|
|
|
1022
1051
|
const ArrowButton = JSX(({ className, disabled, ...rest }) => (jsx(Button, { rounded: true, className: `group shadow-[0_4px_25px_rgba(0,0,0,0.07)] w-12 h-12 min-h-12 max-h-12 flex items-center justify-center ${disabled
|
|
@@ -1217,7 +1246,7 @@
|
|
|
1217
1246
|
const { context, className = '', title, description, bonusItems, ...rest } = props;
|
|
1218
1247
|
return (jsx(BlockWrapper, { className: `font-sans bg-white p-[50px] pb-9 ${className}`, context: context, ...rest, children: jsxs("div", { className: "container", children: [jsx(Headline, { context: context, className: "!p-0", title: title, description: description, headlineVersion: "M", align: "center" }), jsx("div", { className: "flex flex-wrap w-full mt-9", children: bonusItems
|
|
1219
1248
|
? bonusItems.map((_, i) => {
|
|
1220
|
-
return (jsx("div", { className: "flex-grow w-[49%] border border-gray pl-9 pt-9 pr-6 pb-6 mb-[14px] mx-[7px] even:mr-0 odd:ml-0 last:odd:mx-0", children: jsxs("div", { className: "flex justify-between w-full", children: [jsxs("div", { className: "mr-4", children: [jsx("div", { className: "text-h4", children: _.title }), jsx("div", { className: "text-xl-light mt-[14px] max-w-[488px]", children: _.description })] }), _.bonusCount ? (jsxs("div", { className: "relative -bottom-3 h-auto flex items-end mt-14 shrink-0", children: [jsx("span", { className: "font-mohave -tracking-[5px] text-title-extra bg-clip-text text-transparent bg-green-to-yellow -mb-7", children: _.bonusCount }), jsx("span", { className: "text-
|
|
1249
|
+
return (jsx("div", { className: "flex-grow w-[49%] border border-gray pl-9 pt-9 pr-6 pb-6 mb-[14px] mx-[7px] even:mr-0 odd:ml-0 last:odd:mx-0", children: jsxs("div", { className: "flex justify-between w-full", children: [jsxs("div", { className: "mr-4", children: [jsx("div", { className: "text-h4", children: _.title }), jsx("div", { className: "text-xl-light mt-[14px] max-w-[488px]", children: _.description })] }), _.bonusCount ? (jsxs("div", { className: "relative -bottom-3 h-auto flex items-end mt-14 shrink-0", children: [jsx("span", { className: "font-mohave -tracking-[5px] text-title-extra bg-clip-text text-transparent bg-green-to-yellow -mb-7", children: _.bonusCount }), jsx("span", { className: "text-h2 bg-clip-text text-transparent bg-green-to-yellow", children: _.bonusName })] })) : null] }) }, String(i)));
|
|
1221
1250
|
})
|
|
1222
1251
|
: null })] }) }));
|
|
1223
1252
|
});
|
|
@@ -1235,15 +1264,13 @@
|
|
|
1235
1264
|
}
|
|
1236
1265
|
}
|
|
1237
1266
|
|
|
1238
|
-
const BonusBenefitsBlock = JSX(({ context, className = '', title, subtitle, bonusBenefits, ...rest }) => {
|
|
1239
|
-
return (jsxs(BlockWrapper, { className: `font-sans text-primary-text bg-white p-50 flex flex-col text-center ${className}`, context: context, ...rest, children: [jsx(Headline, { context: context, className: "!p-0", title: title, description: subtitle, headlineVersion: "M", align: "center" }), bonusBenefits?.length ? (jsx("div", { className: `grid gap-1 mt-8 ${getElementsColsValue(className)}`, children: bonusBenefits.map(renderBonusBenefit) })) : null] }));
|
|
1240
|
-
});
|
|
1267
|
+
const BonusBenefitsBlock = JSX(({ context, className = '', title, subtitle, bonusBenefits, ...rest }) => (jsxs(BlockWrapper, { className: `font-sans text-primary-text bg-white p-[50px] flex flex-col text-center ${className}`, context: context, ...rest, children: [jsx(Headline, { context: context, className: "!p-0", title: title, description: subtitle, headlineVersion: "M", align: "center" }), bonusBenefits?.length ? (jsx("div", { className: `grid gap-1 mt-8 ${getElementsColsValue(className)}`, children: bonusBenefits.map(renderBonusBenefit) })) : null] })));
|
|
1241
1268
|
const renderBonusBenefit = (bonusBenefit, i) => {
|
|
1242
|
-
return (jsxs("div", { className: "flex flex-col items-center max-w-[292px]", children: [bonusBenefit?.icon ? (jsx(Img, { className: "h-[
|
|
1269
|
+
return (jsxs("div", { className: "flex flex-col items-center max-w-[292px]", children: [bonusBenefit?.icon ? (jsx(Img, { className: "h-[160px] w-[180px] min-w-[180px] min-h-[160px]", image: bonusBenefit.icon, width: "180", height: "160" })) : null, jsx("div", { children: bonusBenefit?.label ? jsx("span", { className: "text-h6 m-0", children: bonusBenefit.label }) : null })] }, String(i)));
|
|
1243
1270
|
};
|
|
1244
1271
|
|
|
1245
1272
|
const CalculatorValueBlock = JSX(({ title, value, postfix = '', prefix, className = '' }) => {
|
|
1246
|
-
return (jsxs("div", { className: `mb-
|
|
1273
|
+
return (jsxs("div", { className: `mb-7 ${className}`, children: [title ? jsx("div", { className: "text-l-light text-secondary-text", children: title }) : null, value ? (jsxs("div", { className: "text-h3", children: [prefix, " ", addSpacesBetweenNumbers(Math.round(value)), " ", postfix] })) : null] }));
|
|
1247
1274
|
});
|
|
1248
1275
|
|
|
1249
1276
|
const DEFAULT_MIN_SUM = 60000;
|
|
@@ -1289,34 +1316,26 @@
|
|
|
1289
1316
|
return buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttons, className: "flex flex-col mt-7 gap-2" })) : null;
|
|
1290
1317
|
}
|
|
1291
1318
|
|
|
1319
|
+
const clamp = (value, min, max) => Math.max(min, Math.min(value, max));
|
|
1320
|
+
|
|
1292
1321
|
const DISABLED_INPUT_CLASSES = 'disabled:border-main-stroke disabled:bg-main-divider';
|
|
1293
1322
|
const InputRange = JSX(({ className, title, items = [], min = 1, max = 100, step = 1, value = min, disabled = false, onChange, }) => {
|
|
1294
|
-
const
|
|
1323
|
+
const getSanitizedValue = (_) => Number(_.replace(/\D/g, ''));
|
|
1324
|
+
const handleChange = (e) => {
|
|
1295
1325
|
if (!onChange) {
|
|
1296
1326
|
return;
|
|
1297
1327
|
}
|
|
1298
|
-
|
|
1299
|
-
onChange(sanitizedValue);
|
|
1328
|
+
onChange(clamp(getSanitizedValue(e.target.value), min, max));
|
|
1300
1329
|
};
|
|
1301
1330
|
const inputStyle = {
|
|
1302
1331
|
backgroundSize: `${(((value - min) * 100) / (max - min)).toFixed(2)}% 100%`,
|
|
1303
1332
|
};
|
|
1304
|
-
const handleBlur = () => {
|
|
1305
|
-
if (!onChange) {
|
|
1306
|
-
return;
|
|
1307
|
-
}
|
|
1308
|
-
if (value < min) {
|
|
1309
|
-
onChange(min);
|
|
1310
|
-
}
|
|
1311
|
-
if (value > max) {
|
|
1312
|
-
onChange(max);
|
|
1313
|
-
}
|
|
1314
|
-
};
|
|
1315
1333
|
return (jsxs("div", { className: className, children: [jsxs("label", { className: "block relative", children: [title ? jsx("span", { className: "text-m-light", children: title }) : null, jsx("input", { className: `m-0 mt-2 font-sans text-h3 w-full h-14 border border-solid border-main-stroke rounded-md
|
|
1316
|
-
|
|
1334
|
+
outline-none p-0 pl-4 box-border text-primary-text hover:border-primary-hover focus:border-primary-focus ${DISABLED_INPUT_CLASSES}`, value: addSpacesBetweenNumbers(value), disabled: disabled, onChange: handleChange, onBlur: handleChange }), jsx("div", { className: "absolute inset-x-0 -bottom-1 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, disabled: disabled, onChange: handleChange, style: inputStyle }) })] }), renderRangeCaption(items)] }));
|
|
1317
1335
|
});
|
|
1318
|
-
|
|
1319
|
-
|
|
1336
|
+
function renderRangeCaption(items) {
|
|
1337
|
+
return (jsx("div", { className: "flex justify-between my-2", children: items.map((item, i) => (jsx("span", { className: "text-s-light text-secondary-text", children: item }, String(i)))) }));
|
|
1338
|
+
}
|
|
1320
1339
|
|
|
1321
1340
|
const DEFAULT_MONEY_STEP = 1000;
|
|
1322
1341
|
function renderWantedSumInput(title, params, callback) {
|
|
@@ -1341,14 +1360,22 @@
|
|
|
1341
1360
|
};
|
|
1342
1361
|
|
|
1343
1362
|
const consistentDataMap = new Map();
|
|
1344
|
-
function useAsyncData$1(key, fetcher) {
|
|
1363
|
+
function useAsyncData$1(key, fetcher, { fallback } = {}) {
|
|
1345
1364
|
const args = useMemo(() => keyToArgs(key), [key]);
|
|
1346
1365
|
const [data, setData] = useState();
|
|
1347
1366
|
const [error, setError] = useState();
|
|
1367
|
+
const updateData = (_) => {
|
|
1368
|
+
setData(_);
|
|
1369
|
+
setError(undefined);
|
|
1370
|
+
};
|
|
1371
|
+
const updateError = (_) => {
|
|
1372
|
+
setData(undefined);
|
|
1373
|
+
setError(_);
|
|
1374
|
+
};
|
|
1348
1375
|
const chainToConsistentResult = (_) => {
|
|
1349
|
-
_.then(
|
|
1350
|
-
.then(
|
|
1351
|
-
.catch(
|
|
1376
|
+
_.then(rawData => consistentDataMap.get(args) || rawData)
|
|
1377
|
+
.then(updateData)
|
|
1378
|
+
.catch(updateError);
|
|
1352
1379
|
};
|
|
1353
1380
|
useEffect(() => {
|
|
1354
1381
|
const isEmptyKey = args.every(_ => _ === null);
|
|
@@ -1361,15 +1388,17 @@
|
|
|
1361
1388
|
chainToConsistentResult(_);
|
|
1362
1389
|
}
|
|
1363
1390
|
else {
|
|
1364
|
-
|
|
1391
|
+
updateData(_);
|
|
1365
1392
|
}
|
|
1366
1393
|
}
|
|
1367
1394
|
catch (err) {
|
|
1368
|
-
|
|
1395
|
+
updateError(err);
|
|
1369
1396
|
}
|
|
1370
1397
|
}, [fetcher, ...args]);
|
|
1398
|
+
const simpleKey = args[0];
|
|
1399
|
+
const fallbackData = fallback && typeof simpleKey === 'string' && fallback[simpleKey];
|
|
1371
1400
|
return {
|
|
1372
|
-
data,
|
|
1401
|
+
data: !data && !error && fallbackData ? fallbackData : data,
|
|
1373
1402
|
error,
|
|
1374
1403
|
mutate: () => Promise.resolve(undefined),
|
|
1375
1404
|
isValidating: false
|
|
@@ -1391,7 +1420,7 @@
|
|
|
1391
1420
|
}
|
|
1392
1421
|
|
|
1393
1422
|
let impl = useAsyncData$1;
|
|
1394
|
-
const useAsyncData = (
|
|
1423
|
+
const useAsyncData = (...args) => impl(...args);
|
|
1395
1424
|
|
|
1396
1425
|
async function fetchJSON(url, options) {
|
|
1397
1426
|
try {
|
|
@@ -1431,7 +1460,9 @@
|
|
|
1431
1460
|
};
|
|
1432
1461
|
};
|
|
1433
1462
|
|
|
1434
|
-
const
|
|
1463
|
+
const renderFootnote = (text) => text ? jsx("p", { className: "text-s-light text-secondary-text mt-7", children: text }) : null;
|
|
1464
|
+
|
|
1465
|
+
const BonusCalculatorForm = JSX(({ context, className = '', sourceBookDir = '', buttons, footnote }) => {
|
|
1435
1466
|
const [travelExpenseValue, setTravelExpenseValue] = useState(DEFAULT_TRAVEL_MIN_SUM);
|
|
1436
1467
|
const [restExpenseValue, setRestExpenseValue] = useState(DEFAULT_REST_MIN_SUM);
|
|
1437
1468
|
const userInputParams = {
|
|
@@ -1452,7 +1483,7 @@
|
|
|
1452
1483
|
moneyValue: restExpenseValue,
|
|
1453
1484
|
step: 500,
|
|
1454
1485
|
isShowItems: false,
|
|
1455
|
-
}, 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-[
|
|
1486
|
+
}, 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-full max-w-[350px]", children: [yearBonus >= 0 ? jsx(CalculatorValueBlock, { title: "\u0411\u0430\u043B\u043B\u043E\u0432 \u0437\u0430 \u0433\u043E\u0434", value: yearBonus }) : null, renderButtonSection(context, buttons), renderFootnote(footnote)] })] }));
|
|
1456
1487
|
});
|
|
1457
1488
|
|
|
1458
1489
|
const SVG = JSX(({ className, viewBox, fill = 'none', width, height, paths, ...commonOptions }) => {
|
|
@@ -1487,7 +1518,7 @@
|
|
|
1487
1518
|
}
|
|
1488
1519
|
|
|
1489
1520
|
const RadioButtonGroup = JSX(({ items, checkedItem, onChangeCheckedItem }) => {
|
|
1490
|
-
return (jsx("div", { children: items?.map(({ id, text }) => (jsx(Checkbox, { isRadio: true, text: text, checked: checkedItem === id, onChange: () => onChangeCheckedItem(id) }, id))) }));
|
|
1521
|
+
return (jsx("div", { className: "flex flex-col gap-3", children: items?.map(({ id, text }) => (jsx(Checkbox, { isRadio: true, text: text, checked: checkedItem === id, onChange: () => onChangeCheckedItem(id) }, id))) }));
|
|
1491
1522
|
});
|
|
1492
1523
|
|
|
1493
1524
|
function renderPaymentTypeSelector(context, { items, checkedItem, onChange }) {
|
|
@@ -1540,7 +1571,7 @@
|
|
|
1540
1571
|
text: 'Дифференцированный',
|
|
1541
1572
|
},
|
|
1542
1573
|
];
|
|
1543
|
-
const CreditCalculatorForm = JSX(({ context, className = '', sourceBookDir, buttons }) => {
|
|
1574
|
+
const CreditCalculatorForm = JSX(({ context, className = '', sourceBookDir, buttons, footnote }) => {
|
|
1544
1575
|
const [isAnnuity, toggleIsAnnuity] = useState(false);
|
|
1545
1576
|
const [isInsurance, toggleIsInsurance] = useState(true);
|
|
1546
1577
|
const [isSalaryClient, toggleIsSalaryClient] = useState(false);
|
|
@@ -1556,16 +1587,29 @@
|
|
|
1556
1587
|
monthsValue,
|
|
1557
1588
|
};
|
|
1558
1589
|
const calculatorParams = useCreditCalculatorParams(userInputParams, sourceBookDir);
|
|
1559
|
-
return (jsxs("section", { className: className, children: [jsxs("div", { className: "w-[468px]", children: [renderWantedSumInput('Сумма кредита, ₽', { ...calculatorParams, step: 500 }, setMoneyValue), renderMonthsInput('Срок кредита, месяцев', calculatorParams, setMonthsValue), jsxs("div", { className: "mt-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-[
|
|
1590
|
+
return (jsxs("section", { className: className, children: [jsxs("div", { className: "w-[468px]", children: [renderWantedSumInput('Сумма кредита, ₽', { ...calculatorParams, step: 500 }, setMoneyValue), renderMonthsInput('Срок кредита, месяцев', calculatorParams, setMonthsValue), jsxs("div", { className: "mt-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-full max-w-[350px]", children: [jsx(CalculatorValueBlock, { title: isAnnuity ? 'Ежемесячный платеж' : 'Платёж в первый месяц', value: calculatorParams.monthlyPayment, postfix: "\u20BD" }), renderPaymentTypeSelector(context, {
|
|
1560
1591
|
items: paymentTypeItems,
|
|
1561
1592
|
checkedItem: isAnnuity ? ANNUITY : DIFFERENTIAL,
|
|
1562
1593
|
onChange: (text) => toggleIsAnnuity(text === ANNUITY),
|
|
1563
|
-
}), renderButtonSection(context, buttons)] })] }));
|
|
1594
|
+
}), renderButtonSection(context, buttons), renderFootnote(footnote)] })] }));
|
|
1564
1595
|
});
|
|
1565
1596
|
|
|
1566
|
-
const
|
|
1597
|
+
const EVERY_MONTH = 'everyMonth';
|
|
1598
|
+
const AT_END_TERM = 'atEndTerm';
|
|
1599
|
+
const depositTypeItems = [
|
|
1600
|
+
{
|
|
1601
|
+
id: EVERY_MONTH,
|
|
1602
|
+
text: 'Ежемесячно',
|
|
1603
|
+
},
|
|
1604
|
+
{
|
|
1605
|
+
id: AT_END_TERM,
|
|
1606
|
+
text: 'В конце срока',
|
|
1607
|
+
},
|
|
1608
|
+
];
|
|
1609
|
+
const DepositCalculatorForm = JSX(({ context, className = '', rate, buttons, footnote }) => {
|
|
1567
1610
|
const [moneyValue, setMoneyValue] = useState(DEFAULT_SUM);
|
|
1568
1611
|
const [monthsValue, setMonthsValue] = useState(DEFAULT_MONTHS);
|
|
1612
|
+
const [isEveryMonth, toggleIsEveryMonth] = useState(false);
|
|
1569
1613
|
const income = 948841;
|
|
1570
1614
|
const finallySum = 1218841;
|
|
1571
1615
|
return (jsxs("section", { className: className, children: [jsxs("div", { className: "w-[468px]", children: [renderWantedSumInput('Сумма вклада, ₽', {
|
|
@@ -1576,66 +1620,15 @@
|
|
|
1576
1620
|
minMonths: DEFAULT_MIN_MONTHS,
|
|
1577
1621
|
maxMonths: DEFAULT_MAX_MONTHS,
|
|
1578
1622
|
monthsValue,
|
|
1579
|
-
}, setMonthsValue)] }), jsx(Rate, { rate: rate || 1, rateBlockClassName: "tracking-[-25px]", unit: "%" }), jsxs("div", { className: "w-[
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
const { calculatorParams, isInsurance } = params;
|
|
1585
|
-
if (!calculatorParams) {
|
|
1586
|
-
return DEFAULT_RATE;
|
|
1587
|
-
}
|
|
1588
|
-
return isInsurance
|
|
1589
|
-
? calculatorParams?.rateWithInsurance || DEFAULT_RATE
|
|
1590
|
-
: calculatorParams?.rateWithoutInsurance || DEFAULT_RATE;
|
|
1591
|
-
};
|
|
1592
|
-
|
|
1593
|
-
const STEP_MONEY$1 = 1000;
|
|
1594
|
-
function renderInitialFeeInput(title, props, callback) {
|
|
1595
|
-
const { moneyValue } = props;
|
|
1596
|
-
const minSum = DEFAULT_MIN_SUM;
|
|
1597
|
-
const maxSum = DEFAULT_MAX_SUM;
|
|
1598
|
-
return (jsx(InputRange, { className: "mt-7", title: title, items: [
|
|
1599
|
-
`От ${addSpacesBetweenNumbers(minSum)} рублей`,
|
|
1600
|
-
`До ${addSpacesBetweenNumbers(maxSum)} рублей`,
|
|
1601
|
-
], min: minSum, max: maxSum, step: STEP_MONEY$1, value: moneyValue, onChange: callback }));
|
|
1602
|
-
}
|
|
1603
|
-
|
|
1604
|
-
const monthlyPayment = 777777; // TODO: hardcode
|
|
1605
|
-
function renderProposalMortgage({ credit, period, taxRefund }) {
|
|
1606
|
-
return (jsxs("div", { children: [jsxs("div", { className: "flex justify-between", 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", className: "w-[120px]" })] }), jsx(CalculatorValueBlock, { title: "\u0415\u0436\u0435\u043C\u0435\u0441\u044F\u0447\u043D\u044B\u0439 \u043F\u043B\u0430\u0442\u0435\u0436", value: monthlyPayment, postfix: "\u20BD" }), jsx(CalculatorValueBlock, { title: "\u041D\u0430\u043B\u043E\u0433\u043E\u0432\u044B\u0439 \u0432\u044B\u0447\u0435\u0442", value: taxRefund, postfix: "\u20BD" })] }));
|
|
1607
|
-
}
|
|
1608
|
-
|
|
1609
|
-
const STEP_MONEY = 1000;
|
|
1610
|
-
function renderRealEstateValue(title, props, callback) {
|
|
1611
|
-
const { moneyValue } = props;
|
|
1612
|
-
const minSum = DEFAULT_MIN_SUM;
|
|
1613
|
-
const maxSum = DEFAULT_MAX_SUM;
|
|
1614
|
-
return (jsx(InputRange, { title: title, items: [`От ${addSpacesBetweenNumbers(minSum)} ₽`, `До ${addSpacesBetweenNumbers(maxSum)} ₽`], min: minSum, max: maxSum, step: STEP_MONEY, value: moneyValue, onChange: callback }));
|
|
1615
|
-
}
|
|
1616
|
-
|
|
1617
|
-
const MortgageCalculatorForm = JSX(({ context, className = '', buttons }) => {
|
|
1618
|
-
const [moneyValue, setMoneyValue] = useState(1000000);
|
|
1619
|
-
const [monthsValue, setMonthsValue] = useState(12);
|
|
1620
|
-
const [isInsurance, toggleIsInsurance] = useState(false);
|
|
1621
|
-
const [isFullInsurance, toggleIsFullInsurance] = useState(false);
|
|
1622
|
-
const calculatorParams = {}; // getCalculatorParams(context, { isAnnuity: isInsurance });
|
|
1623
|
-
const minMonths = /*calculatorParams?.minMonths ||*/ DEFAULT_MIN_MONTHS;
|
|
1624
|
-
const maxMonths = /* calculatorParams?.maxMonths || */ DEFAULT_MAX_MONTHS;
|
|
1625
|
-
const rate = getCreditRate({ calculatorParams, isInsurance: isInsurance });
|
|
1626
|
-
const proposalMortgageValue = { credit: 3892000, period: 15, taxRefund: 650000 }; // TODO: hardcode
|
|
1627
|
-
return (jsxs("section", { className: className, children: [jsxs("div", { className: "w-[468px]", children: [renderRealEstateValue('Стоимость недвижимости, ₽', { moneyValue }, setMoneyValue), renderInitialFeeInput('Первоначальный взнос, ₽', {
|
|
1628
|
-
moneyValue,
|
|
1629
|
-
}, setMoneyValue), renderMonthsInput('Срок ипотеки, месяцев', {
|
|
1630
|
-
minMonths,
|
|
1631
|
-
maxMonths,
|
|
1632
|
-
monthsValue,
|
|
1633
|
-
}, 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\u0434\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 })] })] }), jsx(Rate, { rate: rate, rateBlockClassName: "tracking-[-25px]", unit: "%" }), jsxs("div", { children: [jsx("div", { className: "w-[351px]", children: renderProposalMortgage(proposalMortgageValue) }), renderButtonSection(context, buttons)] })] }));
|
|
1623
|
+
}, setMonthsValue)] }), jsx(Rate, { rate: rate || 1, rateBlockClassName: "tracking-[-25px]", unit: "%" }), jsxs("div", { className: "w-full max-w-[350px]", 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" })) , renderPaymentTypeSelector(context, {
|
|
1624
|
+
items: depositTypeItems,
|
|
1625
|
+
checkedItem: isEveryMonth ? EVERY_MONTH : AT_END_TERM,
|
|
1626
|
+
onChange: (text) => toggleIsEveryMonth(text === EVERY_MONTH),
|
|
1627
|
+
}), renderButtonSection(context, buttons), renderFootnote(footnote)] })] }));
|
|
1634
1628
|
});
|
|
1635
1629
|
|
|
1636
1630
|
const EmbeddableCalcBlocks = {
|
|
1637
1631
|
CreditCalculatorForm,
|
|
1638
|
-
MortgageCalculatorForm,
|
|
1639
1632
|
DepositCalculatorForm,
|
|
1640
1633
|
BonusCalculatorForm,
|
|
1641
1634
|
};
|
|
@@ -1681,7 +1674,7 @@
|
|
|
1681
1674
|
: `text-m-light text-secondary-text`;
|
|
1682
1675
|
const iconClassName = isActiveBtn ? '' : `text-primary-main`;
|
|
1683
1676
|
return (jsxs("button", { type: "button", onClick: onClick, "aria-label": tab?.title, className: `box-border relative border border-main-stroke cursor-pointer text-left border-b-0 flex hover:h-[88px]
|
|
1684
|
-
${btnClassName}`, children: [jsx(Img, { className: `h-
|
|
1677
|
+
${btnClassName}`, children: [jsx(Img, { className: `h-6 w-6 min-w-6 min-h-6 mr-4 ${iconClassName}`, image: { ...tab?.icon, iconVersion: isActiveBtn ? 'white' : 'normal' }, width: "24", height: "24", asSVG: true }), jsxs("div", { className: "border-0", children: [jsx("div", { className: `${btnTitleClassName}`, children: tab?.title }), jsx("div", { className: `${btnDescClassName}`, children: tab.description })] })] }, String(i)));
|
|
1685
1678
|
}
|
|
1686
1679
|
function renderTabs({ tabsShift, tabsNav, activeSlideIndex, setActiveSlideIndex }) {
|
|
1687
1680
|
return (jsxs("div", { children: [jsx("div", { style: { transform: `translateX(-${tabsShift * 388}px)` }, className: "flex flex-col justify-end items-center h-[126px] pt-9 box-border duration-1000", children: jsx("div", { className: "w-full flex flex-nowrap items-end gap-2", children: tabsNav.map((tab, i) => renderNavButton$2({
|
|
@@ -1869,6 +1862,21 @@
|
|
|
1869
1862
|
return (jsx("div", { className: "pr-[50px]", children: jsxs("div", { className: "flex w-full", children: [jsx("div", { className: FIRST_CELL_CLASSES$1 }), jsx("button", { onClick: onClick, className: "mt-5 flex-1 border-main-stroke border-solid border text-primary-text bg-white hover:border-primary-main hover:text-primary-main", children: jsx("div", { className: "font-sans text-xs-light font-medium py-[11px]", children: !isShowAllRow ? 'Показать все параметры' : 'Скрыть' }) })] }) }));
|
|
1870
1863
|
};
|
|
1871
1864
|
|
|
1865
|
+
const renderErrorContent = (error) => {
|
|
1866
|
+
if (error?.errorContentType === 'Image' && error?.image) {
|
|
1867
|
+
return jsx(Img, { image: error.image });
|
|
1868
|
+
}
|
|
1869
|
+
if (error?.errorContentType === 'Code' && error.code) {
|
|
1870
|
+
return jsx("div", { className: "font-mohave text-title-extra gradient-color-text", children: error.code });
|
|
1871
|
+
}
|
|
1872
|
+
return null;
|
|
1873
|
+
};
|
|
1874
|
+
const ErrorBlock = JSX(({ context, className = '', title, subtitle, error, button }) => {
|
|
1875
|
+
const { useRouter, handlerDecorator } = context;
|
|
1876
|
+
const router = useRouter();
|
|
1877
|
+
return (jsxs("section", { className: `flex flex-col justify-center items-center mt-12 ${className}`, role: "listitem", children: [jsx("div", { className: "flex justify-center py-20", children: renderErrorContent(error) }), title ? jsx(Heading, { headingType: "h1", className: "text-left mb-4", title: title }) : null, subtitle ? (jsx("div", { className: "font-sans text-xl-light text-left mb-7 max-w-[613px] text-center", children: subtitle })) : null, button?.text ? (jsx(Button, { className: "py-4 px-9", version: button?.version, ...useLink({ router, handlerDecorator }, button), children: button.text })) : null] }));
|
|
1878
|
+
});
|
|
1879
|
+
|
|
1872
1880
|
const roundTo = (value, precision = 2) => {
|
|
1873
1881
|
const factor = 10 ** precision;
|
|
1874
1882
|
return Math.round(parseFloat(String(value)) * factor) / factor;
|
|
@@ -1981,23 +1989,38 @@
|
|
|
1981
1989
|
const validInputValue = e.target.validity.valid ? e.target.value : value;
|
|
1982
1990
|
onChange(validInputValue);
|
|
1983
1991
|
};
|
|
1984
|
-
return (jsx("input", { className: `border-main-stroke hover:border-primary-hover active:border-primary-text focus:border-primary-text ${className}`, id: id, name: name || id, type: type, pattern: pattern, placeholder: placeholder, value: value, onChange: handleChange }));
|
|
1985
|
-
});
|
|
1986
|
-
|
|
1987
|
-
const selectStyle = {
|
|
1988
|
-
background: `url('/icons/ArrowDownIcon.svg') no-repeat right 16px top 50%`,
|
|
1989
|
-
};
|
|
1990
|
-
const Select = JSX(({ className = '', id, name, children, value, onChange }) => {
|
|
1991
|
-
return (jsx("select", { className: `appearance-none pl-0.5 ${className}`, style: selectStyle, id: id, name: name || id, value: value, onChange: (e) => onChange(e.target.value), placeholder: "", children: children }));
|
|
1992
|
+
return (jsx("input", { className: `border rounded-md border-main-stroke hover:border-primary-hover active:border-primary-text focus:border-primary-text text-primary-text outline-none ${className}`, id: id, name: name || id, type: type, pattern: pattern, placeholder: placeholder, value: value, onChange: handleChange }));
|
|
1992
1993
|
});
|
|
1993
1994
|
|
|
1994
|
-
const
|
|
1995
|
-
|
|
1995
|
+
const SelectCustom = JSX(({ className = '', isBorder = true, label, options = [], value, onChange }) => {
|
|
1996
|
+
const [selectedItem, setSelectedItem] = useState(options[0] || { key: '', text: '' });
|
|
1997
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
1998
|
+
const choiceOption = (option) => {
|
|
1999
|
+
setSelectedItem(option);
|
|
2000
|
+
setIsOpen(false);
|
|
2001
|
+
onChange(option);
|
|
2002
|
+
};
|
|
2003
|
+
const isSelected = (option) => Boolean(option.key === selectedItem.key);
|
|
2004
|
+
useEffect(() => {
|
|
2005
|
+
setSelectedItem(value || { key: '', text: '' });
|
|
2006
|
+
}, [value]);
|
|
2007
|
+
return (jsxs("div", { className: `${isOpen ? 'z-10' : ''} ${className}`, children: [label ? jsx("span", { className: "mb-2", children: label }) : null, jsxs("div", { className: `relative w-fit`, children: [jsxs("div", { className: `text-m-light flex justify-between min-h-[56px] mb-0.5 p-4 pr-8 text-primary-text cursor-pointer
|
|
2008
|
+
${getBorderStyle(isBorder)}`, onClick: () => setIsOpen(!isOpen), children: [selectedItem.text, jsx(Icon, { name: "ArrowUpIcon", className: `absolute right-3 ${isOpen ? '' : 'rotate-180'}` })] }), options.length > 0 ? (jsx("div", { className: `h-0 ${isOpen ? '' : 'overflow-hidden'}`, children: jsx("div", { className: `bg-white text-l rounded-md`, children: options.map(renderOption(choiceOption, isOpen, isSelected)) }) })) : null] })] }));
|
|
1996
2009
|
});
|
|
2010
|
+
const renderOption = (choiceOption, isOpen, isSelected) => (option, i) => {
|
|
2011
|
+
return (jsxs("div", { onClick: () => {
|
|
2012
|
+
choiceOption(option);
|
|
2013
|
+
}, className: "flex px-4 py-3 cursor-pointer hover:bg-main-divider pr-11", children: [jsx("span", { children: option.text }), jsx(Icon, { name: "DoneSimpleIcon", className: ['absolute right-4 pt-0.5', isSelected(option) && isOpen ? '' : 'hidden'].join(' ') })] }, String(i)));
|
|
2014
|
+
};
|
|
2015
|
+
function getBorderStyle(isBorder) {
|
|
2016
|
+
return isBorder ? 'border border-main-stroke rounded-md hover:border-primary-hover' : '';
|
|
2017
|
+
}
|
|
1997
2018
|
|
|
1998
2019
|
function renderInput(props) {
|
|
1999
2020
|
const { placeholder, rates, selected, value, setValue, setSelected } = props;
|
|
2000
|
-
|
|
2021
|
+
const ratesOptions = rates.map((_) => ({ key: _.code ?? '', text: _.code ?? '' }));
|
|
2022
|
+
const selectedValue = { key: selected, text: selected };
|
|
2023
|
+
return (jsxs("div", { className: "relative flex", children: [jsx(Input, { className: "shrink-0 h-14 pl-4 pt-4 pb-4 text-l w-full appearance-none mr-[-90px]", placeholder: placeholder, type: "text", value: value, onChange: setValue }), ratesOptions.length ? (jsx(SelectCustom, { isBorder: false, onChange: (_) => setSelected(_.key), options: ratesOptions, value: selectedValue })) : null] }));
|
|
2001
2024
|
}
|
|
2002
2025
|
|
|
2003
2026
|
const ExchangeCurrencyCalculator = JSX(({ context, className = '', currencyRatesBuy, currencyRatesSell, button }) => {
|
|
@@ -2110,7 +2133,7 @@
|
|
|
2110
2133
|
|
|
2111
2134
|
const SearchBarInner = JSX(({ className, isMobile = false }) => {
|
|
2112
2135
|
const { term, setTerm } = useSearch();
|
|
2113
|
-
const LoupeIconClassName = isMobile ? 'w-
|
|
2136
|
+
const LoupeIconClassName = isMobile ? 'w-5 h-5' : 'w-6 h-6';
|
|
2114
2137
|
const SearchBarLabelClassName = isMobile ? 'text-s' : 'text-l-light';
|
|
2115
2138
|
const SearchBarInputClassName = isMobile ? ' placeholder-transparent' : 'h-full';
|
|
2116
2139
|
const inputPlaceholder = isMobile ? 'some search' : undefined;
|
|
@@ -2118,7 +2141,7 @@
|
|
|
2118
2141
|
outline-none pr-[6%] border-main-stroke hover:border-primary-hover active:border-primary-text 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) => {
|
|
2119
2142
|
e.preventDefault();
|
|
2120
2143
|
setTerm('');
|
|
2121
|
-
}, 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-
|
|
2144
|
+
}, 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-[3px] right-1", onClick: (ev) => {
|
|
2122
2145
|
ev?.preventDefault();
|
|
2123
2146
|
console.log('click');
|
|
2124
2147
|
}, children: jsx("div", { className: "text-s px-9 py-2.5", children: "\u041D\u0430\u0439\u0442\u0438" }) }))] }));
|
|
@@ -2166,13 +2189,13 @@
|
|
|
2166
2189
|
const subtract = (minuend, subtrahend) => (minuend || []).filter((_) => !subtrahend?.find(cmp(_)));
|
|
2167
2190
|
const mergeTopItems = (left, right) => substitute(left, right).concat(subtract(right, left));
|
|
2168
2191
|
|
|
2169
|
-
function useSitemap() {
|
|
2170
|
-
const { data } = useAsyncData(`/wcms-resources/${projectSettings.SITEMAP || 'sitemap'}.json`, fetchJSONUnsafe);
|
|
2192
|
+
function useSitemap(fallback = {}) {
|
|
2193
|
+
const { data } = useAsyncData(`/wcms-resources/${projectSettings.SITEMAP || 'sitemap'}.json`, fetchJSONUnsafe, { fallback });
|
|
2171
2194
|
return data || {};
|
|
2172
2195
|
}
|
|
2173
2196
|
|
|
2174
|
-
const Sitemap = JSX(({ className = '', items, context }) => {
|
|
2175
|
-
const sitemap = useSitemap();
|
|
2197
|
+
const Sitemap = JSX(({ className = '', items, fallback, context }) => {
|
|
2198
|
+
const sitemap = useSitemap(fallback);
|
|
2176
2199
|
const mergedItems = mergeTopItems(sitemap.topItems, items);
|
|
2177
2200
|
const linkParams = {
|
|
2178
2201
|
router: context.useRouter(),
|
|
@@ -2240,8 +2263,9 @@
|
|
|
2240
2263
|
});
|
|
2241
2264
|
|
|
2242
2265
|
const LEFT_COL_WIDTH_FULL_HD = 'w-[204px]';
|
|
2243
|
-
const Footer = JSX(({ className, documents, relatedEnterprises, contacts, socialMedia, mobileApps, topItems, context, ...rest }) => {
|
|
2244
|
-
|
|
2266
|
+
const Footer = JSX(({ className, documents, relatedEnterprises, contacts, socialMedia, mobileApps, topItems, context, page, ...rest }) => {
|
|
2267
|
+
const fallback = page?.fallback;
|
|
2268
|
+
return (jsxs(BlockWrapper, { tag: "footer", context: context, className: `p-9 bg-white font-sans ${className || ''}`, ...rest, children: [jsxs("div", { className: "flex items-stretch gap-[54px] pb-[30px] xl:gap-8", children: [jsx(Logo, { className: LEFT_COL_WIDTH_FULL_HD }), jsx(SearchBar, { context: context, className: "grow" })] }), jsxs("div", { className: "flex items-stretch gap-[54px] xl:gap-8", children: [jsxs("div", { className: `${LEFT_COL_WIDTH_FULL_HD} flex flex-col shrink-0 overflow-hidden`, children: [jsx(Contacts, { items: contacts, context: context, hasButton: true }), jsx(SocialMedia, { media: socialMedia, context: context, children: "\u0421\u043E\u0446\u0441\u0435\u0442\u0438" }), jsx(SocialMedia, { className: "mt-6", media: mobileApps, context: context, children: "\u041C\u043E\u0431\u0438\u043B\u044C\u043D\u043E\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435" })] }), jsx(Sitemap, { className: "pt-[3px]", context: context, items: topItems, fallback: fallback })] }), jsx(HorizontalNavigation, { className: "mt-[98px]", links: relatedEnterprises, context: context }), jsx(TextInformation, { links: documents, context: context })] }));
|
|
2245
2269
|
});
|
|
2246
2270
|
|
|
2247
2271
|
const GracePeriod = JSX(({ context, className = '', title, description, calendar, ...rest }) => {
|
|
@@ -2395,9 +2419,10 @@
|
|
|
2395
2419
|
'bg-white': 'bg-main-divider',
|
|
2396
2420
|
transparent: 'bg-main-divider opacity-30',
|
|
2397
2421
|
};
|
|
2398
|
-
const Header = JSX(({ className = '', defaultLocation = 'Москва', showSubMenu = true, bgColor = 'bg-white', context, topItems, logo, ...rest }) => {
|
|
2422
|
+
const Header = JSX(({ className = '', defaultLocation = 'Москва', showSubMenu = true, bgColor = 'bg-white', context, topItems, logo, page, ...rest }) => {
|
|
2399
2423
|
const router = context.useRouter();
|
|
2400
|
-
const
|
|
2424
|
+
const fallback = page?.fallback;
|
|
2425
|
+
const sitemap = useSitemap(fallback);
|
|
2401
2426
|
const { handlerDecorator } = context;
|
|
2402
2427
|
const mergedItems = mergeTopItems(sitemap.topItems, topItems);
|
|
2403
2428
|
const [firstPortal] = mergedItems;
|
|
@@ -2405,7 +2430,7 @@
|
|
|
2405
2430
|
? mergedItems.find(isTopItemActive(router)) || firstPortal // Если по слагу невозможно понять к какому подпорталу этот слаг относиться, то выбираем первый подпортал.
|
|
2406
2431
|
: null;
|
|
2407
2432
|
const topMenu = mergedItems.map((_, i) => (jsx(TopItem, { active: _ === activeTopItem, ...useLink({ router, handlerDecorator }, _), "aria-label": _.text, bgColor: bgColor }, String(i))));
|
|
2408
|
-
return (jsx(BlockWrapper, { tag: "header", context: context, className: `pt-6
|
|
2433
|
+
return (jsx(BlockWrapper, { tag: "header", context: context, className: `pt-6 px-20 ${bgColor} ${className} ${showSubMenu && activeTopItem?.items?.length ? 'pb-4' : 'pb-5'}`, ...rest, children: jsxs("div", { className: "container", children: [jsxs("div", { className: "flex items-center", children: [jsx(Logo, { className: "mr-8", bgColor: bgColor, logo: logo }), topMenu, jsx(HeaderSecondaryMenu, { className: "ml-auto", defaultLocation: defaultLocation, bgColor: bgColor })] }), jsx("div", { className: `mt-6 h-[1px] ${BORDER_COLORS[bgColor]}` }), showSubMenu && activeTopItem?.items?.length ? (jsx(HeaderSubMenu, { context: context, subItems: activeTopItem.items, bgColor: bgColor })) : null] }) }));
|
|
2409
2434
|
});
|
|
2410
2435
|
|
|
2411
2436
|
const InsuranceAmountBlockInner = JSX(({ className = '', cards = [], button }) => {
|
|
@@ -2449,13 +2474,13 @@
|
|
|
2449
2474
|
const btnClassName = isActiveBtn
|
|
2450
2475
|
? 'shadow-dark-blue/42 border-primary-main'
|
|
2451
2476
|
: `ease-in duration-300 border-main-stroke`;
|
|
2452
|
-
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-
|
|
2477
|
+
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-5 rounded-full bg-secondary-light mr-[30px]", image: slide.icon, width: "108", height: "108" })) : 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)));
|
|
2453
2478
|
}
|
|
2454
2479
|
function renderValueBlock(title, sum) {
|
|
2455
2480
|
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 })] }));
|
|
2456
2481
|
}
|
|
2457
2482
|
function renderDoneIcon(isActive) {
|
|
2458
|
-
return isActive ? (jsx(Img, { className: `h-
|
|
2483
|
+
return isActive ? (jsx(Img, { className: `h-6 w-6 min-w-6 min-h-6 absolute right-4 top-4`, image: "DoneIcon", width: "24", height: "24" })) : null;
|
|
2459
2484
|
}
|
|
2460
2485
|
|
|
2461
2486
|
const InsuranceAmountBlock = JSX(({ className = '', context, title, insuranceTabs = [], button, ...rest }) => {
|
|
@@ -2500,21 +2525,10 @@
|
|
|
2500
2525
|
return items?.length ? (jsx(List, { items: items, itemClassName: "text-l-light mb-2 last:mb-0", version: version === 'primary' ? 'tile' : 'tile-white' })) : (jsx("span", { className: "text-m-light text-secondary-text", children: "\u041D\u0430\u0432\u0435\u0434\u0438\u0442\u0435 \u043A\u0430\u043C\u0435\u0440\u0443 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430 \u043D\u0430 QR-\u043A\u043E\u0434 \u0438 \u0441\u043A\u0430\u0447\u0430\u0439\u0442\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435" }));
|
|
2501
2526
|
};
|
|
2502
2527
|
|
|
2503
|
-
const NavigationItem = JSX(({ className, text, onClick, href, target, isActive }) => (jsx("a", { className: `bg-inherit no-underline px-4 py-2.5 cursor-pointer rounded text-s border border-solid hover:text-primary-main ${className || ''} ${isActive ? 'border-primary-main text-primary-main' : 'border-white text-secondary-text'}`, onClick: onClick, href: href, target: target, children: text })));
|
|
2504
|
-
|
|
2505
|
-
const Navigation = JSX(({ className, context, title, buttons, ...rest }) => {
|
|
2506
|
-
const router = context.useRouter();
|
|
2507
|
-
const { handlerDecorator } = context;
|
|
2508
|
-
const activeButton = findActiveSubItem(router)(buttons);
|
|
2509
|
-
return (jsxs(BlockWrapper, { context: context, className: `font-sans text-primary-text rounded-[40px] flex items-center justify-between ${className || ''}`, ...rest, children: [jsx("h2", { className: "text-xl font-medium m-0", children: title }), buttons?.length ? (jsx("div", { className: "flex rounded-md overflow-hidden bg-white", children: buttons
|
|
2510
|
-
.filter(({ text }) => text)
|
|
2511
|
-
.map((button, i) => (jsx(NavigationItem, { className: "first:rounded-tl-md first:rounded-bl-md last:rounded-tr-md last:rounded-br-md", isActive: button === activeButton, ...useLink({ router, handlerDecorator }, button) }, String(i)))) })) : null] }));
|
|
2512
|
-
});
|
|
2513
|
-
|
|
2514
2528
|
const OfficeServicesBlock = JSX(({ className = '', context, title, servicesList, anchor = '', ...rest }) => {
|
|
2515
2529
|
return (jsxs(BlockWrapper, { context: context, id: anchor, className: `font-sans bg-white p-8 flex flex-col ${className}`, ...rest, children: [title ? jsx(Heading, { headingType: "h5", className: "mb-5", title: title }) : null, servicesList?.length ? servicesList.map(renderListItems) : null] }));
|
|
2516
2530
|
});
|
|
2517
|
-
const renderListItems = (itemList, i) => (jsxs("li", { className: "flex mb-5 last:mb-0 list-none", children: [itemList.icon ? (jsx(Img, { className: "mr-3
|
|
2531
|
+
const renderListItems = (itemList, i) => (jsxs("li", { className: "flex mb-5 last:mb-0 list-none", children: [itemList.icon ? (jsx(Img, { className: "mr-3 min-w-6 min-h-6 w-6 h-6", width: "24", height: "24", asSVG: true, image: itemList.icon })) : null, itemList.label ? jsx("span", { className: "text-l-light", children: itemList.label }) : null] }, `list_item_${String(i)}`));
|
|
2518
2532
|
|
|
2519
2533
|
const foldableBlockClassNames = 'transition-all duration-300 max-h-0 overflow-hidden';
|
|
2520
2534
|
const useActiveHandler = ({ initialState = false }) => {
|
|
@@ -2541,7 +2555,7 @@
|
|
|
2541
2555
|
initialState: isUnfolded,
|
|
2542
2556
|
});
|
|
2543
2557
|
const buttonClassName = foldButtonClasses ||
|
|
2544
|
-
'border-none bg-primary-main hover:bg-primary-hover px-0 py-5 mb-[1px] w-full font-sans text-white text-h4 flex justify-center cursor-pointer';
|
|
2558
|
+
'border-none bg-primary-main hover:bg-primary-hover focus:bg-primary-main active:bg-primary-active px-0 py-5 mb-[1px] w-full font-sans text-white text-h4 flex justify-center cursor-pointer';
|
|
2545
2559
|
const getFoldButtonLabel = isActive ? 'Скрыть' : foldButtonLabel;
|
|
2546
2560
|
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, { className: "my-auto", name: icon, iconVersion: "white", width: "20", height: "20", asSVG: true })) : null] })) : null] })) : null;
|
|
2547
2561
|
});
|
|
@@ -2680,32 +2694,109 @@
|
|
|
2680
2694
|
}) }));
|
|
2681
2695
|
};
|
|
2682
2696
|
|
|
2683
|
-
const
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2697
|
+
const cachedScriptStatuses = {};
|
|
2698
|
+
function getScriptNode(src) {
|
|
2699
|
+
const node = document.querySelector(`script[src="${src}"]`);
|
|
2700
|
+
const status = node?.getAttribute('data-status');
|
|
2701
|
+
return {
|
|
2702
|
+
node,
|
|
2703
|
+
status,
|
|
2704
|
+
};
|
|
2705
|
+
}
|
|
2706
|
+
function getScriptStatus(type) {
|
|
2707
|
+
return type === 'load' ? 'ready' : 'error';
|
|
2708
|
+
}
|
|
2709
|
+
function getInitialValueStatus(src, options) {
|
|
2710
|
+
if (!src || options?.shouldPreventLoad) {
|
|
2711
|
+
return 'idle';
|
|
2693
2712
|
}
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
return Promise.reject();
|
|
2713
|
+
if (typeof window === 'undefined') {
|
|
2714
|
+
return 'loading';
|
|
2697
2715
|
}
|
|
2716
|
+
return cachedScriptStatuses[src] ?? 'loading';
|
|
2698
2717
|
}
|
|
2718
|
+
function useScript(src, options) {
|
|
2719
|
+
const [status, setStatus] = useState(getInitialValueStatus(src, options));
|
|
2720
|
+
// eslint-disable-next-line complexity
|
|
2721
|
+
useEffect(() => {
|
|
2722
|
+
if (!src || options?.shouldPreventLoad) {
|
|
2723
|
+
return undefined;
|
|
2724
|
+
}
|
|
2725
|
+
const cachedScriptStatus = cachedScriptStatuses[src];
|
|
2726
|
+
if (cachedScriptStatus === 'ready' || cachedScriptStatus === 'error') {
|
|
2727
|
+
setStatus(cachedScriptStatus);
|
|
2728
|
+
return undefined;
|
|
2729
|
+
}
|
|
2730
|
+
const script = getScriptNode(src);
|
|
2731
|
+
let scriptNode = script.node;
|
|
2732
|
+
if (!scriptNode) {
|
|
2733
|
+
scriptNode = document.createElement('script');
|
|
2734
|
+
scriptNode.src = src;
|
|
2735
|
+
scriptNode.async = true;
|
|
2736
|
+
scriptNode.setAttribute('data-status', 'loading');
|
|
2737
|
+
document.body.appendChild(scriptNode);
|
|
2738
|
+
const setAttributeFromEvent = (event) => {
|
|
2739
|
+
const scriptStatus = getScriptStatus(event.type);
|
|
2740
|
+
scriptNode?.setAttribute('data-status', scriptStatus);
|
|
2741
|
+
};
|
|
2742
|
+
scriptNode.addEventListener('load', setAttributeFromEvent);
|
|
2743
|
+
scriptNode.addEventListener('error', setAttributeFromEvent);
|
|
2744
|
+
}
|
|
2745
|
+
else {
|
|
2746
|
+
setStatus(script.status ?? cachedScriptStatus ?? 'loading');
|
|
2747
|
+
}
|
|
2748
|
+
const setStateFromEvent = (event) => {
|
|
2749
|
+
const newStatus = getScriptStatus(event.type);
|
|
2750
|
+
setStatus(newStatus);
|
|
2751
|
+
cachedScriptStatuses[src] = newStatus;
|
|
2752
|
+
};
|
|
2753
|
+
scriptNode.addEventListener('load', setStateFromEvent);
|
|
2754
|
+
scriptNode.addEventListener('error', setStateFromEvent);
|
|
2755
|
+
return () => {
|
|
2756
|
+
if (scriptNode) {
|
|
2757
|
+
scriptNode.removeEventListener('load', setStateFromEvent);
|
|
2758
|
+
scriptNode.removeEventListener('error', setStateFromEvent);
|
|
2759
|
+
}
|
|
2760
|
+
if (scriptNode && options?.removeOnUnmount) {
|
|
2761
|
+
scriptNode.remove();
|
|
2762
|
+
}
|
|
2763
|
+
};
|
|
2764
|
+
}, [src, options?.shouldPreventLoad, options?.removeOnUnmount]);
|
|
2765
|
+
return status;
|
|
2766
|
+
}
|
|
2767
|
+
|
|
2768
|
+
const SAFEBOXES_URL = '/api/v1/safeboxes';
|
|
2769
|
+
function useFetchSafeBoxes(regionCode) {
|
|
2770
|
+
const { data } = useAsyncData(regionCode ? `${SAFEBOXES_URL}?regionCode=${regionCode}` : null, fetchSafeBoxes);
|
|
2771
|
+
return data || [];
|
|
2772
|
+
}
|
|
2773
|
+
const fetchSafeBoxes = (url) => {
|
|
2774
|
+
if (!url) {
|
|
2775
|
+
return {};
|
|
2776
|
+
}
|
|
2777
|
+
return fetchJSON(url, { method: 'GET' });
|
|
2778
|
+
};
|
|
2779
|
+
|
|
2780
|
+
const selectStyle = {
|
|
2781
|
+
background: `url('/icons/ArrowDownIcon.svg') no-repeat right 16px top 50%`,
|
|
2782
|
+
};
|
|
2783
|
+
const Select = JSX(({ className = '', id, name, children, value, onChange }) => {
|
|
2784
|
+
return (jsx("select", { className: `appearance-none pl-0.5 ${className}`, style: selectStyle, id: id, name: name || id, value: value, onChange: (e) => onChange(e.target.value), placeholder: "", children: children }));
|
|
2785
|
+
});
|
|
2699
2786
|
|
|
2700
|
-
const
|
|
2701
|
-
return (
|
|
2787
|
+
const SelectOption = JSX(({ className = '', value, selected, disabled = false, children }) => {
|
|
2788
|
+
return (jsx("option", { className: className, value: `${value}`, selected: selected, disabled: disabled, children: children }));
|
|
2789
|
+
});
|
|
2790
|
+
|
|
2791
|
+
const WrapperSelect = JSX(({ data, fieldLabel, fieldValue, selected, placeholder, setSelected, label }) => {
|
|
2792
|
+
return (jsxs("div", { children: [jsx("span", { className: "block text-m-light mb-2", children: label }), jsxs(Select, { className: `h-14 border border-gray p-4 rounded-md text-s w-full cursor-pointer ${!selected ? 'text-secondary-text' : ''}`, value: selected, onChange: (_) => setSelected(_), children: [placeholder ? jsx(SelectOption, { value: "", children: placeholder }) : null, data.map((_, i) => (jsx(SelectOption, { value: _?.[fieldValue || fieldLabel], children: _?.[fieldLabel] }, String(i))))] })] }));
|
|
2702
2793
|
});
|
|
2703
2794
|
|
|
2704
2795
|
const RegionsAndBranches = JSX(({ regions = [], selectedRegion, onSelectedRegion: onSelectedRegion, branches = [], selectedBranch, onSelectedBranch, }) => {
|
|
2705
2796
|
return (jsxs("div", { className: "flex justify-between mb-6", children: [jsx("div", { className: "w-full mr-4", children: jsx(WrapperSelect, { data: regions, fieldValue: "code", fieldLabel: "name", selected: selectedRegion, setSelected: onSelectedRegion, label: "\u0413\u043E\u0440\u043E\u0434" }) }), jsx("div", { className: "w-full", children: jsx(WrapperSelect, { data: branches, fieldValue: "branchCode", fieldLabel: "address", selected: selectedBranch, setSelected: onSelectedBranch, label: "\u041E\u0442\u0434\u0435\u043B\u0435\u043D\u0438\u0435", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043E\u0442\u0434\u0435\u043B\u0435\u043D\u0438\u0435" }) })] }));
|
|
2706
2797
|
});
|
|
2707
2798
|
|
|
2708
|
-
const Radio = JSX(({ name, text, value, checked, onChange, className }) => (jsx("div", { className: className, children: jsxs("label", { className: "flex items-center relative cursor-pointer", children: [jsx("input", { className: "appearance-none flex justify-center items-center shrink-0 w-5 h-5 border-2 border-primary-main
|
|
2799
|
+
const Radio = JSX(({ name, text, value, checked, onChange, className }) => (jsx("div", { className: className, children: jsxs("label", { className: "flex items-center relative cursor-pointer", children: [jsx("input", { className: "appearance-none flex justify-center items-center shrink-0 w-5 h-5 border-2 border-primary-main\n rounded-full cursor-pointer after:block after:w-2.5 after:h-2.5 after:rounded-full checked:after:bg-primary-main", type: "radio", value: value, name: name, checked: checked, onChange: onChange }), text ? jsx("span", { className: "font-sans ml-3 cursor-pointer", children: text }) : null] }) })));
|
|
2709
2800
|
|
|
2710
2801
|
const RenderRadioButtons = JSX(() => {
|
|
2711
2802
|
const [selectedOption, setSelectedOption] = useState('option2');
|
|
@@ -2722,6 +2813,28 @@
|
|
|
2722
2813
|
return (jsxs("div", { className: "flex justify-between mb-6", children: [jsx("div", { className: "mr-4 w-full", children: jsx(WrapperSelect, { data: caseVolumes, fieldLabel: "volume", selected: selectedCaseVolume, setSelected: onSelectedCaseVolume, label: "\u0420\u0430\u0437\u043C\u0435\u0440", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0430\u0437\u043C\u0435\u0440" }) }), jsx("div", { className: "w-full", children: jsx(WrapperSelect, { data: safeBoxCases, fieldLabel: "safeBoxCasesSize", selected: selectedBoxSize, setSelected: onSelectedBoxSize, label: "\u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B \u044F\u0447\u0435\u0439\u043A\u0438, \u043C\u043C (\u0412\u0445\u0428\u0445\u0414)", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u044F\u0447\u0435\u0439\u043A\u0438" }) })] }));
|
|
2723
2814
|
});
|
|
2724
2815
|
|
|
2816
|
+
const getCoordinates = (data) => {
|
|
2817
|
+
if (Array.isArray(data)) {
|
|
2818
|
+
return data.map((_) => _.gpsLatitude && _.gpsLongitude ? [_.gpsLatitude, _.gpsLongitude] : []);
|
|
2819
|
+
}
|
|
2820
|
+
if (data?.gpsLatitude && data?.gpsLongitude) {
|
|
2821
|
+
return [[data.gpsLatitude, data.gpsLongitude]];
|
|
2822
|
+
}
|
|
2823
|
+
return [];
|
|
2824
|
+
};
|
|
2825
|
+
const getBranch = (branches, selectedBranch) => branches.find((_) => _.branchCode === selectedBranch);
|
|
2826
|
+
|
|
2827
|
+
const SafeDepositRentalFields = JSX(({ regions, selectedRegion, branches, selectedBranch, days, selectedCaseVolume, selectedBoxSize, safeBoxCases, caseVolumes, setPoints, onChange, toggleShowMap, }) => {
|
|
2828
|
+
return (jsxs("div", { className: "flex-1 mr-9", children: [jsx(RegionsAndBranches, { regions: regions, selectedRegion: selectedRegion, onSelectedRegion: (value) => onChange({ selectedRegion: value }), branches: branches, selectedBranch: selectedBranch, onSelectedBranch: onSelectedBranch(onChange, setPoints, branches) }), jsx(RentalPeriod, { days: days, setDays: (value) => onChange({ days: value }) }), jsx(SafeBoxCases, { caseVolumes: caseVolumes, selectedCaseVolume: selectedCaseVolume, onSelectedCaseVolume: onSelectedCaseVolume(onChange), safeBoxCases: safeBoxCases, selectedBoxSize: selectedBoxSize, onSelectedBoxSize: (value) => onChange({ selectedBoxSize: value }) }), jsx("span", { className: "text-secondary-text text-l-light", children: "\u0422\u0438\u043F \u0434\u043E\u0433\u043E\u0432\u043E\u0440\u0430" }), jsxs("div", { className: "flex justify-between items-center mt-5", children: [jsx(RenderRadioButtons, {}), jsx(Button, { text: "\u041E\u0444\u0438\u0441\u044B \u043D\u0430 \u043A\u0430\u0440\u0442\u0435", version: "primary", onClick: toggleShowMap })] })] }));
|
|
2829
|
+
});
|
|
2830
|
+
const onSelectedBranch = (onChange, setPoints, branches) => (value) => {
|
|
2831
|
+
onChange({ selectedBranch: value, selectedCaseVolume: '', selectedBoxSize: '' });
|
|
2832
|
+
setPoints(getCoordinates(value ? getBranch(branches, value) : branches));
|
|
2833
|
+
};
|
|
2834
|
+
const onSelectedCaseVolume = (onChange) => (value) => {
|
|
2835
|
+
onChange({ selectedCaseVolume: value, selectedBoxSize: '' });
|
|
2836
|
+
};
|
|
2837
|
+
|
|
2725
2838
|
const SafeDepositRentalTotal = JSX(({ days, tariffs = [] }) => {
|
|
2726
2839
|
const price = calculatePrice(days, tariffs);
|
|
2727
2840
|
return (jsxs("div", { className: "flex flex-col justify-between", children: [jsxs("div", { className: "flex", children: [renderTotal('Аренда за', days, 'mr-11'), renderTotal('Цена', price + ' ₽')] }), jsxs("div", { className: "bg-primary-main px-10 pt-10 pb-4 text-center", children: [jsx(Img, { image: { icon: 'PackA4Icon' }, width: "290", height: "257", asSVG: true }), jsxs("span", { className: "text-s-light text-white opacity-80 mt-2 inline-block", children: ["\u041D\u0430 \u0440\u0438\u0441\u0443\u043D\u043A\u0438 \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0430 \u043F\u0430\u0447\u043A\u0430", jsx("br", {}), " \u043B\u0438\u0441\u0442\u043E\u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0430 \u04104"] })] })] }));
|
|
@@ -2751,59 +2864,112 @@
|
|
|
2751
2864
|
};
|
|
2752
2865
|
|
|
2753
2866
|
const DEFAULT_DAYS = 26;
|
|
2754
|
-
const SafeDepositRentalForm = JSX((
|
|
2755
|
-
const [
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2867
|
+
const SafeDepositRentalForm = JSX((props) => {
|
|
2868
|
+
const [safeDepositState, setStateDepositState] = useState({
|
|
2869
|
+
selectedRegion: '',
|
|
2870
|
+
selectedBranch: '',
|
|
2871
|
+
selectedCaseVolume: '',
|
|
2872
|
+
selectedBoxSize: '',
|
|
2873
|
+
days: DEFAULT_DAYS,
|
|
2874
|
+
branches: [],
|
|
2875
|
+
});
|
|
2876
|
+
const resultBranches = useFetchSafeBoxes(safeDepositState.selectedRegion);
|
|
2877
|
+
const handleChangeSafeDepositState = (state) => setStateDepositState((oldState) => ({ ...oldState, ...state }));
|
|
2878
|
+
useEffect(() => handleChangeSafeDepositState({
|
|
2879
|
+
selectedRegion: getInitialValueSelectedRegion(props.regions),
|
|
2880
|
+
}), [props.regions]);
|
|
2764
2881
|
useEffect(() => {
|
|
2765
|
-
if (
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
});
|
|
2769
|
-
}
|
|
2770
|
-
else {
|
|
2771
|
-
setBranches([]);
|
|
2882
|
+
if (Array.isArray(resultBranches) && resultBranches.length) {
|
|
2883
|
+
handleChangeSafeDepositState({ branches: resultBranches });
|
|
2884
|
+
props.setPoints(getCoordinates(resultBranches));
|
|
2772
2885
|
}
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
const onSelectedCaseVolume = (value) => {
|
|
2783
|
-
setSelectedCaseVolume(value);
|
|
2784
|
-
setSelectedBoxSize('');
|
|
2785
|
-
};
|
|
2786
|
-
const branch = getBranch(branches, selectedBranch);
|
|
2886
|
+
}, [resultBranches]);
|
|
2887
|
+
useEffect(() => {
|
|
2888
|
+
handleChangeSafeDepositState({
|
|
2889
|
+
selectedBranch: '',
|
|
2890
|
+
selectedCaseVolume: '',
|
|
2891
|
+
selectedBoxSize: '',
|
|
2892
|
+
});
|
|
2893
|
+
}, [safeDepositState.selectedRegion]);
|
|
2894
|
+
const branch = getBranch(safeDepositState.branches, safeDepositState.selectedBranch);
|
|
2787
2895
|
const caseVolumes = getCaseVolumes(branch?.safeBoxCaseVolumes);
|
|
2788
|
-
const safeBoxCases = getCaseVolume(branch?.safeBoxCaseVolumes, selectedCaseVolume)?.safeBoxCases;
|
|
2789
|
-
const tariffs = getTariffs(safeBoxCases, selectedBoxSize);
|
|
2790
|
-
return (jsxs("div", { className: "flex justify-between align-top mb-6", children: [
|
|
2896
|
+
const safeBoxCases = getCaseVolume(branch?.safeBoxCaseVolumes, safeDepositState.selectedCaseVolume)?.safeBoxCases;
|
|
2897
|
+
const tariffs = getTariffs(safeBoxCases, safeDepositState.selectedBoxSize);
|
|
2898
|
+
return (jsxs("div", { className: "flex justify-between align-top mb-6", children: [jsx(SafeDepositRentalFields, { ...safeDepositState, ...props, caseVolumes: caseVolumes, safeBoxCases: safeBoxCases, onChange: handleChangeSafeDepositState }), jsx(SafeDepositRentalTotal, { days: safeDepositState.days, tariffs: tariffs })] }));
|
|
2791
2899
|
});
|
|
2792
|
-
const getInitialValueSelectedRegion = (regions) => regions?.
|
|
2793
|
-
const getBranch = (branches, selectedBranch) => branches.find((_) => _.branchCode === selectedBranch);
|
|
2900
|
+
const getInitialValueSelectedRegion = (regions) => regions?.length && regions[0]?.code ? regions[0].code : '';
|
|
2794
2901
|
const getCaseVolumes = (safeBoxCaseVolumes) => safeBoxCaseVolumes?.length ? safeBoxCaseVolumes?.filter((_) => _?.safeBoxCases?.length) : [];
|
|
2795
2902
|
const getCaseVolume = (caseVolumes, selectedCaseVolume) => caseVolumes?.find((_) => _.volume === selectedCaseVolume);
|
|
2796
2903
|
const getTariffs = (safeBoxCases, selectedBoxSize) => safeBoxCases?.find((_) => _.safeBoxCasesSize === selectedBoxSize)?.tariffs;
|
|
2797
2904
|
|
|
2798
|
-
const REGIONS_URL = '/api/v1/
|
|
2905
|
+
const REGIONS_URL = '/api/v1/regions';
|
|
2799
2906
|
function useGetRegions() {
|
|
2800
2907
|
const { data } = useAsyncData(REGIONS_URL, fetchJSONUnsafe);
|
|
2801
2908
|
return data || [];
|
|
2802
2909
|
}
|
|
2803
2910
|
|
|
2804
|
-
|
|
2911
|
+
function renderClusterer(Map, points) {
|
|
2912
|
+
Map.geoObjects.removeAll();
|
|
2913
|
+
const pointsList = points;
|
|
2914
|
+
const clusterIconContentLayout = ymaps.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>');
|
|
2915
|
+
const clusterer = new ymaps.Clusterer({
|
|
2916
|
+
clusterIcons: [
|
|
2917
|
+
{
|
|
2918
|
+
href: 'icons/MapMarkerClusterIcon.svg',
|
|
2919
|
+
size: [78, 84],
|
|
2920
|
+
offset: [-35, -50],
|
|
2921
|
+
},
|
|
2922
|
+
],
|
|
2923
|
+
clusterIconContentLayout,
|
|
2924
|
+
clusterHideIconOnBalloonOpen: false,
|
|
2925
|
+
geoObjectHideIconOnBalloonOpen: false,
|
|
2926
|
+
});
|
|
2927
|
+
const geoObjects = [];
|
|
2928
|
+
for (let i = 0, len = pointsList.length; i < len; i++) {
|
|
2929
|
+
geoObjects[i] = new ymaps.Placemark(pointsList[i], null, {
|
|
2930
|
+
iconLayout: 'default#image',
|
|
2931
|
+
iconImageHref: 'icons/MapMarkerSingleIcon.svg',
|
|
2932
|
+
iconImageSize: [78, 84],
|
|
2933
|
+
iconImageOffset: [-35, -50],
|
|
2934
|
+
});
|
|
2935
|
+
}
|
|
2936
|
+
clusterer.add(geoObjects);
|
|
2937
|
+
Map.geoObjects.add(clusterer);
|
|
2938
|
+
Map.setBounds(ymaps.util.bounds.fromPoints(pointsList)).then(() => {
|
|
2939
|
+
if (Map.getZoom() > 10) {
|
|
2940
|
+
Map.setZoom(10);
|
|
2941
|
+
}
|
|
2942
|
+
});
|
|
2943
|
+
}
|
|
2944
|
+
|
|
2945
|
+
const YandexMap = JSX(({ points }) => {
|
|
2946
|
+
const map = useRef(null);
|
|
2947
|
+
useEffect(() => {
|
|
2948
|
+
ymaps.ready(() => {
|
|
2949
|
+
map.current = new ymaps.Map('map', {
|
|
2950
|
+
center: points[0],
|
|
2951
|
+
zoom: 10,
|
|
2952
|
+
});
|
|
2953
|
+
renderClusterer(map.current, points);
|
|
2954
|
+
});
|
|
2955
|
+
}, []);
|
|
2956
|
+
if (map.current && points) {
|
|
2957
|
+
renderClusterer(map.current, points);
|
|
2958
|
+
}
|
|
2959
|
+
return (jsxs("div", { className: "pt-12 mt-1 bg-white", children: [jsx(Heading, { title: "\u041E\u0444\u0438\u0441\u044B \u043D\u0430 \u043A\u0430\u0440\u0442\u0435", headingType: "h3", className: "mb-8 text-center" }), jsx("div", { id: "map", className: "h-[640px]" })] }));
|
|
2960
|
+
});
|
|
2961
|
+
|
|
2962
|
+
const SafeDepositRental = JSX(({ title, footnote, context, className = '', ...rest }) => {
|
|
2963
|
+
const [points, setPoints] = useState([]);
|
|
2964
|
+
const [showMap, setShowMap] = useState(false);
|
|
2805
2965
|
const regions = useGetRegions();
|
|
2806
|
-
|
|
2966
|
+
const statusScript = useScript(`https://api-maps.yandex.ru/2.1/?apikey=${projectSettings.YANDEX_MAP_API_KEY}&lang=ru_RU`, {
|
|
2967
|
+
removeOnUnmount: true,
|
|
2968
|
+
});
|
|
2969
|
+
const toggleShowMap = () => {
|
|
2970
|
+
setShowMap(!showMap);
|
|
2971
|
+
};
|
|
2972
|
+
return (jsxs(BlockWrapper, { context: context, className: className, ...rest, children: [jsxs("div", { className: "bg-white px-8 py-12", children: [title ? (jsx(Heading, { title: title, headingType: "h3", as: "h2", className: "mb-2.5 text-center" })) : null, jsx(SafeDepositRentalForm, { regions: regions, setPoints: setPoints, toggleShowMap: toggleShowMap }), footnote ? jsx("p", { className: "text-s-light text-secondary-text", children: footnote }) : null] }), statusScript === 'ready' && points.length && showMap ? (jsx(YandexMap, { points: points })) : null] }));
|
|
2807
2973
|
});
|
|
2808
2974
|
|
|
2809
2975
|
const checkIsIconRenderable = (icon) => Boolean(icon?.icon || icon?.src);
|
|
@@ -3054,7 +3220,7 @@
|
|
|
3054
3220
|
});
|
|
3055
3221
|
|
|
3056
3222
|
const TariffsTableRow = JSX(({ row: { header, data }, activeCardIndex, isLastRow, context, rowIdx }) => {
|
|
3057
|
-
return (jsxs(TariffsTableRowContainer, { context: context, rowIdx: rowIdx, children: [jsx("div", { className: `text-s py-5 ${FIRST_CELL_CLASSES} ${DIVIDER_CLASSES} ${!isLastRow ? 'border-solid' : ''}`, children: jsxs("div", { className: "flex items-center text-primary-text", role: "cell", children: [header?.icon ? (jsx(Img, { className: "mr-[14px] max-w-6 max-h-6", image: header.icon, width: "24px", height: "24px", asSVG: true })) : null, header?.title] }) }), data?.length ? (jsx(TableCarouselContainer, { activeCardIndex: activeCardIndex, columnWidth: COLUMN_WIDTH$1, version: "tariff", children: data.map((cells, i) => (jsx(TariffsTableCell, { cells: cells, isLastRow: isLastRow, rowIdx: rowIdx, cellIdx: i, context: context }, String(i)))) })) : null] }));
|
|
3223
|
+
return (jsxs(TariffsTableRowContainer, { context: context, rowIdx: rowIdx, children: [jsx("div", { className: `text-s py-5 ${FIRST_CELL_CLASSES} ${DIVIDER_CLASSES} ${!isLastRow ? 'border-solid' : ''}`, children: jsxs("div", { className: "flex items-center text-primary-text", role: "cell", children: [header?.icon ? (jsx(Img, { className: "mr-[14px] max-w-6 max-h-6", image: header.icon, width: "24px", height: "24px", asSVG: true })) : null, header?.title ? (jsx(Heading, { headingType: header?.headingType || 'h6', as: "h6", title: header?.title })) : null] }) }), data?.length ? (jsx(TableCarouselContainer, { activeCardIndex: activeCardIndex, columnWidth: COLUMN_WIDTH$1, version: "tariff", children: data.map((cells, i) => (jsx(TariffsTableCell, { cells: cells, isLastRow: isLastRow, rowIdx: rowIdx, cellIdx: i, context: context }, String(i)))) })) : null] }));
|
|
3058
3224
|
});
|
|
3059
3225
|
|
|
3060
3226
|
const TariffsTable = JSX(({ className = '', context, title, description, rowHeaders, tariffsColumns: columns, hiddenRowsNum = 0, ...rest }) => {
|
|
@@ -3079,21 +3245,6 @@
|
|
|
3079
3245
|
return (jsxs("div", { role: "table", children: [jsxs("div", { className: "relative", children: [children, jsx(TableArrowScrollControl, { ...tableArrowScrollControlProps })] }), isScrollAvailable ? (jsx("div", { className: "absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white" })) : null] }));
|
|
3080
3246
|
});
|
|
3081
3247
|
|
|
3082
|
-
const renderErrorContent = (error) => {
|
|
3083
|
-
if (error?.errorContentType === 'Image' && error?.image) {
|
|
3084
|
-
return jsx(Img, { image: error.image });
|
|
3085
|
-
}
|
|
3086
|
-
if (error?.errorContentType === 'Code' && error.code) {
|
|
3087
|
-
return jsx("div", { className: "font-mohave text-title-extra gradient-color-text", children: error.code });
|
|
3088
|
-
}
|
|
3089
|
-
return null;
|
|
3090
|
-
};
|
|
3091
|
-
const ErrorBlock = JSX(({ context, className = '', title, subtitle, error, button }) => {
|
|
3092
|
-
const { useRouter, handlerDecorator } = context;
|
|
3093
|
-
const router = useRouter();
|
|
3094
|
-
return (jsxs("section", { className: `flex flex-col justify-center items-center mt-12 ${className}`, role: "listitem", children: [jsx("div", { className: "flex justify-center py-20", children: renderErrorContent(error) }), title ? jsx(Heading, { headingType: "h1", className: "text-left mb-4", title: title }) : null, subtitle ? (jsx("div", { className: "font-sans text-xl-light text-left mb-7 max-w-[613px] text-center", children: subtitle })) : null, button?.text ? (jsx(Button, { className: "py-4 px-9", version: button?.version, ...useLink({ router, handlerDecorator }, button), children: button.text })) : null] }));
|
|
3095
|
-
});
|
|
3096
|
-
|
|
3097
3248
|
const Blocks = {
|
|
3098
3249
|
Accordion,
|
|
3099
3250
|
BenefitsBlock,
|
|
@@ -3123,7 +3274,6 @@
|
|
|
3123
3274
|
TariffsTable,
|
|
3124
3275
|
TextBlock,
|
|
3125
3276
|
Tile,
|
|
3126
|
-
Navigation,
|
|
3127
3277
|
Placeholder,
|
|
3128
3278
|
BonusBenefitsBlock,
|
|
3129
3279
|
SafeDepositRental,
|
|
@@ -3154,7 +3304,7 @@
|
|
|
3154
3304
|
};
|
|
3155
3305
|
}
|
|
3156
3306
|
|
|
3157
|
-
const LikeButton = JSX(({ className, onClick, ariaLabel }) => (jsx("button", { type: "button", className: `border-0 w-
|
|
3307
|
+
const LikeButton = JSX(({ className, onClick, ariaLabel }) => (jsx("button", { type: "button", className: `border-0 w-9 bg-inherit cursor-pointer ${className || ''}`, onClick: onClick, "aria-label": ariaLabel, children: renderLikeIcon() })));
|
|
3158
3308
|
const renderLikeIcon = () => {
|
|
3159
3309
|
const params = {
|
|
3160
3310
|
stroke: '#292D32',
|